hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses sequencelengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses sequencelengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses sequencelengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7e9653d546ade6c8ce9b53c49b25b1b21568a5c | 5,267 | py | Python | VisualGimp/Markup.py | duangsuse/VisualGimp | 79776fded12595ab3c56855b5ae56e2242780b2e | [
"MIT"
] | 2 | 2019-05-07T12:09:11.000Z | 2019-05-08T09:31:44.000Z | VisualGimp/Markup.py | duangsuse-valid-projects/VisualGimp | 79776fded12595ab3c56855b5ae56e2242780b2e | [
"MIT"
] | null | null | null | VisualGimp/Markup.py | duangsuse-valid-projects/VisualGimp | 79776fded12595ab3c56855b5ae56e2242780b2e | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- encoding: utf-8 -*-
# Gimp Markup Builder
# author: duangsuse
# date: Thu May 02 2019 CST
| 24.962085 | 106 | 0.584204 | #!/usr/bin/env python2
# -*- encoding: utf-8 -*-
# Gimp Markup Builder
# author: duangsuse
# date: Thu May 02 2019 CST
from os import linesep
from Util import stream_join
class MarkupBuilder:
''' Gimp Markup SGML builder '''
def __init__(self, indent = -1, nl = linesep, buffer = str):
self.marks = buffer()
... | 0 | 0 | 0 | 5,069 | 0 | 0 | 0 | 8 | 69 |
8796a12ade2e6974f6dfc98adc77e755604d7da8 | 895 | py | Python | sqlalchemy_redshift/__init__.py | Hivestack/sqlalchemy-redshift | 6226ffe4c6f3583606016492641e1bd5d351933a | [
"MIT"
] | null | null | null | sqlalchemy_redshift/__init__.py | Hivestack/sqlalchemy-redshift | 6226ffe4c6f3583606016492641e1bd5d351933a | [
"MIT"
] | null | null | null | sqlalchemy_redshift/__init__.py | Hivestack/sqlalchemy-redshift | 6226ffe4c6f3583606016492641e1bd5d351933a | [
"MIT"
] | null | null | null | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
)
for package in ['psycopg2', 'p... | 31.964286 | 79 | 0.727374 | from pkg_resources import DistributionNotFound, get_distribution, parse_version
try:
import psycopg2 # noqa: F401
except ImportError:
raise ImportError(
'No module named psycopg2. Please install either '
'psycopg2 or psycopg2-binary package for CPython '
'or psycopg2cffi for Pypy.'
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -6 | 40 |
fdbf1c941811766f3c215aa9700b09effe98e5e6 | 134 | py | Python | ch2/chapter2_features_of_fastapi_02.py | PacktPublishing/Understanding-How-Web-APIs-Work | 63220e7bf6b31315c46650e45c670ca9a01011fc | [
"MIT"
] | 2 | 2021-10-03T09:34:34.000Z | 2021-10-04T04:52:48.000Z | ch2/chapter2_features_of_fastapi_02.py | PacktPublishing/Understanding-How-Web-APIs-Work | 63220e7bf6b31315c46650e45c670ca9a01011fc | [
"MIT"
] | 1 | 2021-04-25T05:57:34.000Z | 2021-04-25T14:49:24.000Z | ch2/chapter2_features_of_fastapi_02.py | PacktPublishing/Understanding-How-Web-APIs-Work | 63220e7bf6b31315c46650e45c670ca9a01011fc | [
"MIT"
] | 3 | 2021-05-13T09:39:27.000Z | 2021-06-29T05:51:46.000Z | # -*- coding: utf-8 -*-
| 33.5 | 57 | 0.58209 | # -*- coding: utf-8 -*-
def message(age: int = 0, name: str = 'stranger') -> str:
return f'Hello {name}, you are {age} years old'
| 0 | 0 | 0 | 0 | 0 | 88 | 0 | 0 | 22 |
515654029ae48e70e4487c739d107ea440403f1d | 8,124 | py | Python | Lib/site-packages/hackedit/app/templates.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | Lib/site-packages/hackedit/app/templates.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/hackedit/app/templates.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | """
This module contains the top level API for managing the project/file templates.
"""
import json
import os
from hackedit.app import settings
def create(template, dest_dir, answers):
"""
Creates a file/project from the specified template, at the specified directory.
:param template: Template data.
... | 31.126437 | 100 | 0.563269 | """
This module contains the top level API for managing the project/file templates.
"""
import json
import logging
import os
import re
from binaryornot.check import is_binary
from hackedit.app import settings
def create(template, dest_dir, answers):
"""
Creates a file/project from the specified template, at... | 0 | 0 | 0 | 0 | 3,037 | 1,348 | 0 | -1 | 220 |
1a60970d1a4cf3ecc7aacdd16b38eca549a34840 | 1,845 | py | Python | src/tubize/videotomp4.py | olivervinn/tubizescripts | 8756f322d3e31f76f8b77cb8e084ded5941e29fa | [
"MIT"
] | null | null | null | src/tubize/videotomp4.py | olivervinn/tubizescripts | 8756f322d3e31f76f8b77cb8e084ded5941e29fa | [
"MIT"
] | null | null | null | src/tubize/videotomp4.py | olivervinn/tubizescripts | 8756f322d3e31f76f8b77cb8e084ded5941e29fa | [
"MIT"
] | null | null | null | """
Convert video format x to MP4/H.264.
"""
import logging
logger = logging.getLogger(__name__)
| 32.368421 | 107 | 0.571816 | """
Convert video format x to MP4/H.264.
"""
import os
import sys
import logging
from .videometainfo import VideoMetaInfo
from .utils import sizeof_fmt, time_fmt, find_files, check_dependencies, call, ffmpeg
logger = logging.getLogger(__name__)
class VideoToMP4:
"""To Mp4"""
SUPPORTED_EXTENSIONS = ".wmv, .... | 0 | 0 | 0 | 1,573 | 0 | 0 | 0 | 60 | 113 |
8052d0446907259540de210ff2c92410c7342f2e | 117 | py | Python | setup.py | snasiriany/parasol | 88b99704676fb1253b8bc6402665a3174a00072d | [
"MIT"
] | 66 | 2019-01-07T23:59:26.000Z | 2021-12-29T16:51:56.000Z | setup.py | snasiriany/parasol | 88b99704676fb1253b8bc6402665a3174a00072d | [
"MIT"
] | 8 | 2019-01-09T01:35:54.000Z | 2021-08-23T20:05:03.000Z | setup.py | snasiriany/parasol | 88b99704676fb1253b8bc6402665a3174a00072d | [
"MIT"
] | 21 | 2019-03-26T01:02:33.000Z | 2022-01-26T20:34:34.000Z | from setuptools import setup
setup(
name='parasol',
dependency_links=[
],
install_requires=[
]
)
| 13 | 28 | 0.623932 | from setuptools import setup
setup(
name='parasol',
dependency_links=[
],
install_requires=[
]
)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
79299c770a188b579e6412af89f2263960e65f50 | 568 | py | Python | app/migrations/0007_auto_20211102_1946.py | Rqwannn/Rudemy | fe2d84540f3cc64c0ff6821e5f2fac22675fd381 | [
"MIT"
] | 3 | 2021-12-27T06:16:26.000Z | 2022-01-20T02:13:03.000Z | app/migrations/0007_auto_20211102_1946.py | Rqwannn/Rudemy | fe2d84540f3cc64c0ff6821e5f2fac22675fd381 | [
"MIT"
] | null | null | null | app/migrations/0007_auto_20211102_1946.py | Rqwannn/Rudemy | fe2d84540f3cc64c0ff6821e5f2fac22675fd381 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-11-02 12:46
| 21.846154 | 67 | 0.549296 | # Generated by Django 3.2.8 on 2021-11-02 12:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0006_auto_20211102_1928'),
]
operations = [
migrations.RemoveField(
model_name='profile',
name='skill',
... | 0 | 0 | 0 | 454 | 0 | 0 | 0 | 19 | 46 |
752ee840202809a32e9848a1a2c9a1828e74e71c | 5,132 | py | Python | oasislmf/model_execution/conf.py | ibailey-SCOR/OasisLMF | 966b4de4e1e64851970f4291c5bdfe7edc20cb7a | [
"BSD-3-Clause"
] | null | null | null | oasislmf/model_execution/conf.py | ibailey-SCOR/OasisLMF | 966b4de4e1e64851970f4291c5bdfe7edc20cb7a | [
"BSD-3-Clause"
] | null | null | null | oasislmf/model_execution/conf.py | ibailey-SCOR/OasisLMF | 966b4de4e1e64851970f4291c5bdfe7edc20cb7a | [
"BSD-3-Clause"
] | null | null | null | import csv
import io
import json
import warnings
from collections import defaultdict
from ..utils.exceptions import OasisException
def _get_summaries(summary_file):
"""
Get a list representation of a summary file.
"""
summaries_dict = defaultdict(lambda: {'leccalc': {}})
with io.open(summary_fi... | 36.657143 | 100 | 0.677319 | import csv
import io
import json
import logging
import os
import warnings
from collections import defaultdict
from ..utils.exceptions import OasisException
from ..utils.log import oasis_log
from .files import GENERAL_SETTINGS_FILE, GUL_SUMMARIES_FILE, IL_SUMMARIES_FILE, MODEL_SETTINGS_FILE
def _get_summaries(summar... | 0 | 2,033 | 0 | 0 | 0 | 0 | 0 | 72 | 111 |
cb8ea6149e57e707c1ee331f670e37c8feb61914 | 6,815 | py | Python | codes/functions.py | Wenupi/protoplanetary_disks | 51f8decbec5415e1da9893316f03d32ca5ab27de | [
"MIT"
] | null | null | null | codes/functions.py | Wenupi/protoplanetary_disks | 51f8decbec5415e1da9893316f03d32ca5ab27de | [
"MIT"
] | null | null | null | codes/functions.py | Wenupi/protoplanetary_disks | 51f8decbec5415e1da9893316f03d32ca5ab27de | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#--------------------------------------------------------------------------------
#Changes the sky coordinates (x,y,z) to the disk coordinates (x_d,y_d,z_d)
#The x axis is the rotation axis
#--------------------------------------------------------------------------------
#Radiative transfer equa... | 43.685897 | 134 | 0.501981 | #!/usr/bin/env python
#--------------------------------------------------------------------------------
#Changes the sky coordinates (x,y,z) to the disk coordinates (x_d,y_d,z_d)
#The x axis is the rotation axis
def FUN_rotation(x,y,z):
x_d = x
y_d = y*np.cos(inc) - z*np.sin(inc)
z_d = y*np.sin(inc) + ... | 0 | 0 | 0 | 0 | 0 | 4,676 | 0 | 0 | 176 |
d281bf9d519356903906b4ce02f43f84e40f8147 | 2,893 | py | Python | F0AM_Tools/TUV_to_mat.py | jdhask/pyMCM | 32b65e1dff2e9626df5d52623fd1ac4af29f8c57 | [
"MIT"
] | 1 | 2021-11-15T19:24:40.000Z | 2021-11-15T19:24:40.000Z | F0AM_Tools/TUV_to_mat.py | jdhask/pyMCM | 32b65e1dff2e9626df5d52623fd1ac4af29f8c57 | [
"MIT"
] | null | null | null | F0AM_Tools/TUV_to_mat.py | jdhask/pyMCM | 32b65e1dff2e9626df5d52623fd1ac4af29f8c57 | [
"MIT"
] | 2 | 2021-11-15T19:23:46.000Z | 2021-11-29T12:42:26.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 16 18:06:05 2021
@author: jhask
"""
import csv
import pandas as pd
import numpy as np
import re
import scipy.io as sio
import os
# Map MCM names to TUV labels
j_vals_dict= dict({
'O3 -> O2 + O(1D)':'J1',
'O3 -> O2 + O(3P)':'J2',
'H2O2 -> 2 OH':'J3',... | 30.452632 | 105 | 0.5458 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 16 18:06:05 2021
@author: jhask
"""
import csv
import pandas as pd
import numpy as np
import re
import scipy.io as sio
import os
# Map MCM names to TUV labels
j_vals_dict= dict({
'O3 -> O2 + O(1D)':'J1',
'O3 -> O2 + O(3P)':'J2',
'H2O2 -> 2 OH':'J3',... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1d7b25e9a1db4f378a05b7199423917d7b5b9f81 | 1,343 | py | Python | extract_url.py | nickinack/extract_url | d084ca0a791d5c50ab2accaee7cb4d0b981bd132 | [
"MIT"
] | 2 | 2022-02-07T05:51:36.000Z | 2022-02-07T05:52:11.000Z | extract_url.py | nickinack/extract_url | d084ca0a791d5c50ab2accaee7cb4d0b981bd132 | [
"MIT"
] | null | null | null | extract_url.py | nickinack/extract_url | d084ca0a791d5c50ab2accaee7cb4d0b981bd132 | [
"MIT"
] | 1 | 2020-05-18T08:29:22.000Z | 2020-05-18T08:29:22.000Z | '''
Imports
'''
import sys as sys
import csv
from collections import defaultdict
import re
'''
URL Extract
'''
columns = defaultdict(list)
with open('SecurityIDRBT.csv') as f:
reader = csv.DictReader(f) # read rows into a dictionary format
for row in reader: # read a row as {column1: value1, column... | 29.844444 | 95 | 0.603127 | '''
Imports
'''
from config import *
from newspaper import Article
import sys as sys
import pandas as pd
import csv
from collections import defaultdict
import re
'''
URL Extract
'''
columns = defaultdict(list)
with open('SecurityIDRBT.csv') as f:
reader = csv.DictReader(f) # read rows into a diction... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 70 |
56b682792eb61ccb189ac68b9d7a874cbd6c0a60 | 3,279 | py | Python | test/python/test_mapper_coupling.py | kifumi/qiskit-terra | 203fca6d694a18824a6b12cbabd3dd2c64dd12ae | [
"Apache-2.0"
] | 1 | 2018-11-01T01:35:43.000Z | 2018-11-01T01:35:43.000Z | test/python/test_mapper_coupling.py | a-amaral/qiskit-terra | e73beba1e68de2617046a7e1e9eeac375b61de81 | [
"Apache-2.0"
] | null | null | null | test/python/test_mapper_coupling.py | a-amaral/qiskit-terra | e73beba1e68de2617046a7e1e9eeac375b61de81 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=missing-docstring
| 36.433333 | 88 | 0.633425 | # -*- coding: utf-8 -*-
# Copyright 2018, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
# pylint: disable=missing-docstring
from qiskit.mapper import _coupling
from .common import QiskitTestCase
class Coupling... | 0 | 0 | 0 | 2,951 | 0 | 0 | 0 | 27 | 68 |
d991aedad470b351e70cf5b10b085c74cc95e474 | 462 | py | Python | env/Lib/site-packages/values/__init__.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | 4 | 2022-02-06T00:54:58.000Z | 2022-02-25T12:44:43.000Z | env/Lib/site-packages/values/__init__.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | 3 | 2021-03-23T04:58:47.000Z | 2021-04-02T02:40:54.000Z | env/Lib/site-packages/values/__init__.py | KaceyHirth/Library-DBMS-System | 40b425ed5c7b46627b7c48724b2d20e7a64cf025 | [
"MIT"
] | 1 | 2022-02-08T13:43:20.000Z | 2022-02-08T13:43:20.000Z | __all__ = ['get']
def get(input):
"""return a list with input values or [] if input is None"""
if input is None:
return []
if not _iterable(input) or _string(input):
return [input]
return list(input)
| 18.48 | 64 | 0.645022 | __all__ = ['get']
import collections
def _iterable(obj):
return isinstance(obj, collections.Iterable)
def _string(value):
try:
return isinstance(value, basestring)
except NameError:
return isinstance(value, str)
def get(input):
"""return a list with input values or [] if input is... | 0 | 0 | 0 | 0 | 0 | 159 | 0 | -3 | 69 |
d0e19b396bd5c3861e79601ace321dbbd96d9384 | 165 | py | Python | vnpy/app/strategy_reviewer/ui/__init__.py | xyh888/vnpy | 7b51716928ab9574f171a2eda190b37b4f393bb1 | [
"MIT"
] | 5 | 2019-05-24T05:19:55.000Z | 2020-07-29T13:21:49.000Z | vnpy/app/strategy_reviewer/ui/__init__.py | xyh888/vnpy | 7b51716928ab9574f171a2eda190b37b4f393bb1 | [
"MIT"
] | null | null | null | vnpy/app/strategy_reviewer/ui/__init__.py | xyh888/vnpy | 7b51716928ab9574f171a2eda190b37b4f393bb1 | [
"MIT"
] | 2 | 2019-07-01T02:14:04.000Z | 2020-07-29T13:21:53.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/8/20 0020 16:49
# @Author : Hadrianl
# @File : __init__.py | 23.571429 | 36 | 0.630303 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/8/20 0020 16:49
# @Author : Hadrianl
# @File : __init__.py
from .widget import StrategyReviewer | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 23 |
4a04e22adafbd1373a9d9fc82325fd3d15005b8b | 647 | py | Python | Lesson 13.gf/xml_Leader2.py | gfoo003/programming-together | 225e0a2255dd8da1f1ef32d2a88deea27c050f10 | [
"MIT"
] | null | null | null | Lesson 13.gf/xml_Leader2.py | gfoo003/programming-together | 225e0a2255dd8da1f1ef32d2a88deea27c050f10 | [
"MIT"
] | null | null | null | Lesson 13.gf/xml_Leader2.py | gfoo003/programming-together | 225e0a2255dd8da1f1ef32d2a88deea27c050f10 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
xml_string = '''
<stuff>
<users>
<user x = "2">
<id>001</id>
<name>Chuck</name>
</user>
<user x = "7">
<id>007</id>
<name>Brent</name>
</user>
</users>
</stuff>
'''
root_stuff = ET.fromstring(xml... | 23.107143 | 48 | 0.565688 | import xml.etree.ElementTree as ET
xml_string = '''
<stuff>
<users>
<user x = "2">
<id>001</id>
<name>Chuck</name>
</user>
<user x = "7">
<id>007</id>
<name>Brent</name>
</user>
</users>
</stuff>
'''
root_stuff = ET.fromstring(xml... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bebc974c59298f013c68b5d5e434ba4b2d82a0a8 | 213 | py | Python | 第4章/program/Chapter_4_dummy.py | kingname/SourceCodeOfBook | ab7275108994dca564905818b678bbd2f771c18e | [
"MIT"
] | 274 | 2018-10-01T11:07:25.000Z | 2022-03-17T13:48:45.000Z | 第4章/program/Chapter_4_dummy.py | kingname/SourceCodeOfBook | ab7275108994dca564905818b678bbd2f771c18e | [
"MIT"
] | 6 | 2019-02-28T14:18:21.000Z | 2022-03-02T14:57:39.000Z | 第4章/program/Chapter_4_dummy.py | kingname/SourceCodeOfBook | ab7275108994dca564905818b678bbd2f771c18e | [
"MIT"
] | 110 | 2018-10-16T06:08:37.000Z | 2022-03-16T08:19:29.000Z | from multiprocessing.dummy import Pool
pool = Pool(3)
origin_num = [x for x in range(10)]
result = pool.map(calc_power2, origin_num)
print(f'1-10{result}')
| 16.384615 | 42 | 0.71831 | from multiprocessing.dummy import Pool
def calc_power2(num):
return num * num
pool = Pool(3)
origin_num = [x for x in range(10)]
result = pool.map(calc_power2, origin_num)
print(f'计算1-10的平方分别为:{result}')
| 27 | 0 | 0 | 0 | 0 | 21 | 0 | 0 | 23 |
cee8341ee37a27bddc6bb669594ab3c522880752 | 11,688 | py | Python | pystiche_papers/li_wand_2016/_loss.py | pystiche/papers | 0d8179dc51f6eda0b27fa525dc0b86b866bc88e1 | [
"BSD-3-Clause"
] | 1 | 2021-09-30T09:30:07.000Z | 2021-09-30T09:30:07.000Z | pystiche_papers/li_wand_2016/_loss.py | pystiche/papers | 0d8179dc51f6eda0b27fa525dc0b86b866bc88e1 | [
"BSD-3-Clause"
] | 20 | 2021-10-10T13:37:25.000Z | 2022-03-31T07:31:45.000Z | pystiche_papers/li_wand_2016/_loss.py | pystiche/papers | 0d8179dc51f6eda0b27fa525dc0b86b866bc88e1 | [
"BSD-3-Clause"
] | null | null | null | from typing import Optional
from pystiche import enc, loss
from pystiche_papers.utils import HyperParameters
from ._utils import (hyper_parameters as _hyper_parameters, multi_layer_encoder as _multi_layer_encoder)
__all__ = [
"FeatureReconstructionLoss",
"content_loss",
"MRFLoss",
"style_loss",
"T... | 37.461538 | 110 | 0.693703 | from typing import Any, Optional, Tuple, Union
import torch
from torch.nn.functional import mse_loss
import pystiche
import pystiche.loss.functional as F
from pystiche import enc, loss
from pystiche_papers.utils import HyperParameters
from ._utils import (
extract_normalized_patches2d,
hyper_parameters as _h... | 0 | 0 | 0 | 5,385 | 0 | 488 | 0 | 128 | 186 |
1b3186c99a60818dc9d24b438538877520aa1347 | 2,640 | py | Python | tests/conftest.py | Z2PackDev/bands_inspect | 76fdb0130d9ff64c738365a1911bc61f035927f2 | [
"Apache-2.0"
] | 1 | 2017-12-19T07:21:56.000Z | 2017-12-19T07:21:56.000Z | tests/conftest.py | Z2PackDev/bands-inspect | 76fdb0130d9ff64c738365a1911bc61f035927f2 | [
"Apache-2.0"
] | 3 | 2018-02-27T09:07:46.000Z | 2018-03-06T12:26:04.000Z | tests/conftest.py | Z2PackDev/bands_inspect | 76fdb0130d9ff64c738365a1911bc61f035927f2 | [
"Apache-2.0"
] | 1 | 2017-12-19T07:21:55.000Z | 2017-12-19T07:21:55.000Z | # -*- coding: utf-8 -*-
# (c) 2017-2019, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
"""
Configuration file for the pytest tests.
"""
#--------------------------FIXTURES-------------------------------------#
| 30.697674 | 168 | 0.659848 | # -*- coding: utf-8 -*-
# (c) 2017-2019, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
"""
Configuration file for the pytest tests.
"""
import os
import json
import pytest
import numpy as np
import bands_inspect as bi
import parameters # pylint: disable=wrong-import-order... | 0 | 2,124 | 0 | 0 | 0 | 0 | 0 | -32 | 289 |
a365ad738e2f0d42460bbe15195bfcc181ad7c09 | 3,518 | py | Python | src/tensorrt/tools/caffe_engine/call_engine_to_infer_all.py | aimuch/AIEnvConfig | 4ccd54e9c601e8c91efebcec1a50115d75d0cf96 | [
"MIT"
] | 250 | 2019-06-14T16:12:20.000Z | 2022-03-27T09:56:26.000Z | src/tensorrt/tools/caffe_engine/call_engine_to_infer_all.py | aimuch/AIEnvConfig | 4ccd54e9c601e8c91efebcec1a50115d75d0cf96 | [
"MIT"
] | 6 | 2018-08-10T07:15:39.000Z | 2018-10-23T01:51:17.000Z | src/tensorrt/tools/caffe_engine/call_engine_to_infer_all.py | aimuch/AIEnvConfig | 4ccd54e9c601e8c91efebcec1a50115d75d0cf96 | [
"MIT"
] | 41 | 2019-08-16T13:42:13.000Z | 2022-02-23T03:38:09.000Z | # import tensorflow as tf
import tensorrt as trt
import pycuda.driver as cuda
# import uff
import numpy as np
TEST_PATH = "/media/andy/Data/DevWorkSpace/Projects/imageClassifier/data/test/"
LABEL = 0
ENGINE_PATH = "/home/andy/caffe/examples/mydata/slot_classifier/engine/px2_classifier.engine"
NET_INPUT_SHAPE = (256,... | 30.327586 | 105 | 0.677658 | import os
# import tensorflow as tf
import tensorrt as trt
from tensorrt.parsers import uffparser
import pycuda.driver as cuda
# import uff
import cv2
import numpy as np
from tqdm import tqdm
TEST_PATH = "/media/andy/Data/DevWorkSpace/Projects/imageClassifier/data/test/"
LABEL = 0
ENGINE_PATH = "/home/andy/caffe/exa... | 0 | 0 | 0 | 0 | 0 | 1,347 | 0 | -6 | 133 |
3db8ec872b628c2d5573b83d71f828295df1aa7e | 2,054 | py | Python | machineLearning.py | z-Wind/EQOptimum | c046daec2c6218277a3fec9fa0c87bea0b30ff2f | [
"MIT"
] | null | null | null | machineLearning.py | z-Wind/EQOptimum | c046daec2c6218277a3fec9fa0c87bea0b30ff2f | [
"MIT"
] | null | null | null | machineLearning.py | z-Wind/EQOptimum | c046daec2c6218277a3fec9fa0c87bea0b30ff2f | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
from sklearn.neural_network import MLPRegressor
if __name__ == "__main__":
# Create a random dataset
# [fc, bandwidth, gain]
n = 100
filtersNum = 1
X, Y = genXY(n=n, filtersNum=filtersNum)
# Fit regression model
regr = MLPRegressor(h... | 27.026316 | 82 | 0.556962 | import filters
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import freqz
from sklearn.neural_network import MLPRegressor
def filterModel(x):
# [fc, bandwidth, gain]
w_final = None
db_final = 0
fs = 44100
for fc, BW, gain in x:
b, a = filters.bandpass_... | 0 | 0 | 0 | 0 | 0 | 921 | 0 | -1 | 123 |
6f7dc504b463999eb2e9b24300c31ee083334da5 | 980 | py | Python | src/utils/dist.py | shaoeric/torch-atom | 7688fc38c0d19fe4d13a9773115df911ffe6eaaa | [
"MIT"
] | 28 | 2022-03-06T06:04:54.000Z | 2022-03-27T04:14:33.000Z | src/utils/dist.py | shaoeric/torch-atom | 7688fc38c0d19fe4d13a9773115df911ffe6eaaa | [
"MIT"
] | null | null | null | src/utils/dist.py | shaoeric/torch-atom | 7688fc38c0d19fe4d13a9773115df911ffe6eaaa | [
"MIT"
] | 3 | 2022-03-11T07:01:58.000Z | 2022-03-17T05:34:41.000Z | import torch.distributed as dist
def synchronize():
"""
Helper function to synchronize (barrier) among all processes when
using distributed training
"""
if not dist.is_available():
return
if not dist.is_initialized():
return
world_size = dist.get_world_size()
if wo... | 22.790698 | 72 | 0.626531 | import torch.distributed as dist
import torch
def get_world_size():
if not dist.is_available():
return 1
if not dist.is_initialized():
return 1
return dist.get_world_size()
def get_rank():
if not dist.is_available():
return 0
if not dist.is_initialized():
return 0
... | 0 | 0 | 0 | 0 | 0 | 507 | 0 | -9 | 114 |
7d4f4e96803718430d878ca088bcaed92b3079cc | 3,822 | py | Python | base_pool/mysql_pool/mysql_views.py | zhanzhangwei/kafka-study | 6be4167319b855c9560e92932aae628f87a5e680 | [
"Apache-2.0"
] | null | null | null | base_pool/mysql_pool/mysql_views.py | zhanzhangwei/kafka-study | 6be4167319b855c9560e92932aae628f87a5e680 | [
"Apache-2.0"
] | null | null | null | base_pool/mysql_pool/mysql_views.py | zhanzhangwei/kafka-study | 6be4167319b855c9560e92932aae628f87a5e680 | [
"Apache-2.0"
] | null | null | null | import pymysql
mysql_client = MysqlClient()
| 30.576 | 113 | 0.545526 | import json
import pymysql
import datetime
from dbutils.pooled_db import PooledDB
import pymysql
from conf.common import *
class MysqlClient(object):
__pool = None
def __init__(self):
"""
:param mincached:连接池中空闲连接的初始数量
:param maxcached:连接池中空闲连接的最大数量
:param maxshared:共享连接的最大数... | 492 | 280 | 0 | 3,199 | 0 | 0 | 0 | -2 | 134 |
fbbdf9d38ba25ab279b3c1a4de1e0e092ad03325 | 8,998 | py | Python | scripts/jupyter_vdi.py | ScottWales/cosima-cookbook | 0ed83e2165efe5badfca59e2dccf835ab7acecca | [
"Apache-2.0"
] | null | null | null | scripts/jupyter_vdi.py | ScottWales/cosima-cookbook | 0ed83e2165efe5badfca59e2dccf835ab7acecca | [
"Apache-2.0"
] | null | null | null | scripts/jupyter_vdi.py | ScottWales/cosima-cookbook | 0ed83e2165efe5badfca59e2dccf835ab7acecca | [
"Apache-2.0"
] | 1 | 2020-01-30T05:36:08.000Z | 2020-01-30T05:36:08.000Z | #!/usr/bin/env python
"""
Script to launch a VDI session (or connect to already running session)
and start a Jupyter server on the VDI
A ssh tunnel from the local machine to the VDI is set up and the local
webbrowser is spawned.
This is a python3 script (uses unicode strings). If you don't have
python3 on your local... | 33.574627 | 146 | 0.629362 | #!/usr/bin/env python
"""
Script to launch a VDI session (or connect to already running session)
and start a Jupyter server on the VDI
A ssh tunnel from the local machine to the VDI is set up and the local
webbrowser is spawned.
This is a python3 script (uses unicode strings). If you don't have
python3 on your local... | 0 | 0 | 0 | 0 | 0 | 4,784 | 0 | -48 | 279 |
1fa6873ff966dcc647833979508b75f9d44bd7bd | 2,703 | py | Python | utils/data.py | YOUSIKI/PyTorch-FBS | 5e94c3183f064ef5ed7f4b7d82b076056200b368 | [
"Apache-2.0"
] | 10 | 2020-09-14T02:40:37.000Z | 2022-01-13T11:13:36.000Z | utils/data.py | YOUSIKI/PyTorch-FBS | 5e94c3183f064ef5ed7f4b7d82b076056200b368 | [
"Apache-2.0"
] | 2 | 2020-11-28T05:48:45.000Z | 2022-03-11T13:44:50.000Z | utils/data.py | YOUSIKI/PyTorch-FBS | 5e94c3183f064ef5ed7f4b7d82b076056200b368 | [
"Apache-2.0"
] | 2 | 2020-11-28T02:27:08.000Z | 2021-11-24T03:10:10.000Z | # -*- coding=utf-8 -*-
__all__ = [
'tiny_imagenet',
'imagewoof2',
'imagenette2'
]
_default_batch_size = 32
_default_num_workers = 4
| 34.653846 | 69 | 0.532741 | # -*- coding=utf-8 -*-
__all__ = [
'tiny_imagenet',
'imagewoof2',
'imagenette2'
]
import os
import torch
import torchvision
_default_batch_size = 32
_default_num_workers = 4
def _transform(train=True):
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]
if train:
return torchvi... | 0 | 0 | 0 | 0 | 0 | 2,418 | 0 | -24 | 159 |
838d22d0dea3f0cea788de6ba72e416ad4ef2add | 1,917 | py | Python | tests/e2e/runner.py | wilzbach/storyscript-sls | d71d74a53852ebae54bdaab341678b04f2775411 | [
"Apache-2.0"
] | null | null | null | tests/e2e/runner.py | wilzbach/storyscript-sls | d71d74a53852ebae54bdaab341678b04f2775411 | [
"Apache-2.0"
] | null | null | null | tests/e2e/runner.py | wilzbach/storyscript-sls | d71d74a53852ebae54bdaab341678b04f2775411 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env pytest
from tests.e2e.utils.fixtures import find_test_files
test_files = find_test_files(relative=True)
# compile a story and compare its completion with the expected tree
# load a story from the file system and load its expected result file (.json)
| 28.191176 | 77 | 0.720396 | #!/usr/bin/env pytest
import io
import json
from os import path
from pytest import fixture, mark
from sls import App
import storyscript.hub.Hub as StoryHub
from storyhub.sdk.AutoUpdateThread import AutoUpdateThread
from tests.e2e.utils.features import parse_options
from tests.e2e.utils.fixtures import find_test_fi... | 0 | 335 | 0 | 0 | 0 | 955 | 0 | 83 | 270 |
a028f9eab21f99b975a3ac640714e3b636189bcc | 342 | py | Python | Misc/Become_a_Python_Developer/2_Programming Fundamentals in the Real World/Ex_Files_Programming_Realworld/Exercise Files/Ch05/05_03/start_05_03_coordinates.py | specter01wj/LAB-Lynda | 1915ada66f4498cdf15a0e2a068c938e325e9ba3 | [
"MIT"
] | null | null | null | Misc/Become_a_Python_Developer/2_Programming Fundamentals in the Real World/Ex_Files_Programming_Realworld/Exercise Files/Ch05/05_03/start_05_03_coordinates.py | specter01wj/LAB-Lynda | 1915ada66f4498cdf15a0e2a068c938e325e9ba3 | [
"MIT"
] | 8 | 2020-07-08T06:20:03.000Z | 2022-03-02T10:05:06.000Z | Misc/Become_a_Python_Developer/2_Programming Fundamentals in the Real World/Ex_Files_Programming_Realworld/Exercise Files/Ch05/05_03/start_05_03_coordinates.py | specter01wj/LAB-Lynda | 1915ada66f4498cdf15a0e2a068c938e325e9ba3 | [
"MIT"
] | null | null | null | """ Where's My Mouse? """
import tkinter
root = tkinter.Tk()
root.bind('<Button>', mouse_click)
root.mainloop()
| 22.8 | 39 | 0.599415 | """ Where's My Mouse? """
import tkinter
def mouse_click(event):
# retrieve XY coords as a tuple
coords = root.winfo_pointerxy()
print('coords: {}'.format(coords))
print('X: {}'.format(coords[0]))
print('Y: {}'.format(coords[1]))
root = tkinter.Tk()
root.bind('<Button>', mouse_cli... | 0 | 0 | 0 | 0 | 0 | 194 | 0 | 0 | 25 |
b485f685ca90029c0dd0acd04f32bc0b55820f14 | 2,906 | py | Python | examples/fsm/bot/middleware.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 13 | 2021-01-21T12:43:10.000Z | 2022-03-23T11:11:59.000Z | examples/fsm/bot/middleware.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 259 | 2020-02-26T08:51:03.000Z | 2022-03-23T11:08:36.000Z | examples/fsm/bot/middleware.py | ExpressApp/pybotx | 97c8b1ce5d45a05567ed01d545cb43174a2dcbb9 | [
"MIT"
] | 5 | 2019-12-02T16:19:22.000Z | 2021-11-22T20:33:34.000Z | from typing import Final
_default_transition: Final = object()
| 32.651685 | 87 | 0.639023 | from dataclasses import dataclass
from enum import Enum
from typing import Callable, Dict, Final, Optional, Type, Union
from botx import Bot, Collector, Message
from botx.concurrency import callable_to_coroutine
from botx.middlewares.base import BaseMiddleware
from botx.typing import Executor
_default_transition: Fin... | 0 | 143 | 858 | 1,314 | 0 | 137 | 0 | 137 | 248 |
42f3981074dbd8b6458eb716c4608442ffca1db6 | 6,411 | py | Python | webenmr/lib/convrdc.py | andreagia/WEBNMR | 512a8cc04cf69300796585feae722614501389a9 | [
"Apache-2.0"
] | null | null | null | webenmr/lib/convrdc.py | andreagia/WEBNMR | 512a8cc04cf69300796585feae722614501389a9 | [
"Apache-2.0"
] | null | null | null | webenmr/lib/convrdc.py | andreagia/WEBNMR | 512a8cc04cf69300796585feae722614501389a9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''
This program attempts to convert XPLOR Pseudocontact shift restraints in AMBER format
XPLOR:
assign ( resid 200 and name OO ) ( resid 200 and name Z ) ( resid 200 and name X ) (resid 200 and name Y ) ( resid 13 and name C ) 0.2400 0.2000
assign ( resid 200 and name OO ) ( resid 200 ... | 31.426471 | 154 | 0.511777 | #!/usr/bin/env python
'''
This program attempts to convert XPLOR Pseudocontact shift restraints in AMBER format
XPLOR:
assign ( resid 200 and name OO ) ( resid 200 and name Z ) ( resid 200 and name X ) (resid 200 and name Y ) ( resid 13 and name C ) 0.2400 0.2000
assign ( resid 200 and name OO ) ( resid 200 ... | 0 | 0 | 0 | 0 | 0 | 3,870 | 0 | 10 | 200 |
1441c3ed71c2dc67d784d782e0dab2d91d827d06 | 2,134 | py | Python | lptrack/versions.py | gieseladev/lptrack | fb4c64021c23522f96733db41ceb69f0ccb9b713 | [
"MIT"
] | null | null | null | lptrack/versions.py | gieseladev/lptrack | fb4c64021c23522f96733db41ceb69f0ccb9b713 | [
"MIT"
] | null | null | null | lptrack/versions.py | gieseladev/lptrack | fb4c64021c23522f96733db41ceb69f0ccb9b713 | [
"MIT"
] | null | null | null | """Versioned body readers and writers for track message bodies.
Attributes:
LATEST_VERSION (int): Latest version supported by the library.
"""
from typing import Callable
from . import TrackInfo, codec
LATEST_VERSION = 2
ReaderType = Callable[[codec.Reader], TrackInfo]
WriterType = Callable[[codec.Write... | 25.404762 | 83 | 0.698219 | """Versioned body readers and writers for track message bodies.
Attributes:
LATEST_VERSION (int): Latest version supported by the library.
"""
from typing import Callable, Tuple
from . import TrackInfo, codec
LATEST_VERSION = 2
def _read_body_v1_2(stream: codec.Reader, version: int) -> TrackInfo:
return T... | 0 | 0 | 0 | 0 | 0 | 1,120 | 0 | 7 | 161 |
45b20d04060d1b766f35010e3ce9fedfd6a34eba | 96 | py | Python | venv/lib/python3.8/site-packages/poetry/core/toml/__init__.py | Retraces/UkraineBot | 3d5d7f8aaa58fa0cb8b98733b8808e5dfbdb8b71 | [
"MIT"
] | 2 | 2022-03-13T01:58:52.000Z | 2022-03-31T06:07:54.000Z | venv/lib/python3.8/site-packages/poetry/core/toml/__init__.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | 19 | 2021-11-20T04:09:18.000Z | 2022-03-23T15:05:55.000Z | venv/lib/python3.8/site-packages/poetry/core/toml/__init__.py | DesmoSearch/Desmobot | b70b45df3485351f471080deb5c785c4bc5c4beb | [
"MIT"
] | null | null | null | /home/runner/.cache/pip/pool/f3/de/85/7dca1e096a43e00e6ff1ca900dda1ca91c8c5c3a1d6798e466a9173a00 | 96 | 96 | 0.895833 | /home/runner/.cache/pip/pool/f3/de/85/7dca1e096a43e00e6ff1ca900dda1ca91c8c5c3a1d6798e466a9173a00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4053282fdcb4c61c6094cfb3f6a832822c2a096c | 2,371 | py | Python | venv/lib/python2.7/site-packages/cement/ext/ext_alarm.py | zwachtel11/fruitful-backend | 45b8994917182e7b684b9e25944cc79c9494c9f3 | [
"MIT"
] | 95 | 2018-06-05T10:49:32.000Z | 2019-12-31T11:07:36.000Z | v_env/lib/python3.7/site-packages/cement/ext/ext_alarm.py | buds-lab/expanded-psychrometric-chart | e7267f57584d8ba645507189ea4a8e474c67e0de | [
"MIT"
] | 51 | 2019-10-08T01:53:02.000Z | 2021-06-04T22:02:21.000Z | v_env/lib/python3.7/site-packages/cement/ext/ext_alarm.py | buds-lab/expanded-psychrometric-chart | e7267f57584d8ba645507189ea4a8e474c67e0de | [
"MIT"
] | 29 | 2018-09-17T06:10:32.000Z | 2022-03-19T13:15:30.000Z | """
The Alarm Extension provides easy access to setting an application alarm to
handle timing out operations. See the
`Python Signal Library <https://docs.python.org/3.5/library/signal.html>`_.
Requirements
------------
* No external dependencies.
* Only available on Unix/Linux
Configuration
-------------
This ... | 22.158879 | 75 | 0.619148 | """
The Alarm Extension provides easy access to setting an application alarm to
handle timing out operations. See the
`Python Signal Library <https://docs.python.org/3.5/library/signal.html>`_.
Requirements
------------
* No external dependencies.
* Only available on Unix/Linux
Configuration
-------------
This ... | 0 | 0 | 0 | 853 | 0 | 204 | 0 | -8 | 92 |
77ab3b36a849175fa4c24f12a76941077ea58584 | 570 | py | Python | scripts/docker/migrate.py | guligon90/uac-registry | cb5afe941919c2d9ceffa8d8bf220613b7a20613 | [
"MIT"
] | null | null | null | scripts/docker/migrate.py | guligon90/uac-registry | cb5afe941919c2d9ceffa8d8bf220613b7a20613 | [
"MIT"
] | null | null | null | scripts/docker/migrate.py | guligon90/uac-registry | cb5afe941919c2d9ceffa8d8bf220613b7a20613 | [
"MIT"
] | null | null | null | # Base imports
# Project imports
| 31.666667 | 82 | 0.670175 | # Base imports
import subprocess
from typing import Iterable, Optional
# Project imports
from docker import common
from docker.run import run
def migrate(arguments: Iterable[str], deps: Optional[bool] = True) -> int:
print(">>>>>>>>>> Running database migration <<<<<<<<<<")
run(['backend', 'python3', common.... | 0 | 0 | 0 | 0 | 0 | 379 | 0 | 21 | 134 |
f979d82751598eba221d7677df764b4451b8c896 | 971 | py | Python | adw_test/make_small_dataset.py | clinfo/DeepKF | ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1 | [
"MIT"
] | 5 | 2019-12-19T13:33:36.000Z | 2021-06-01T06:08:16.000Z | adw_test/make_small_dataset.py | clinfo/DeepKF | ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1 | [
"MIT"
] | 24 | 2020-03-03T19:40:55.000Z | 2021-05-26T15:27:38.000Z | adw_test/make_small_dataset.py | clinfo/DeepKF | ee4f1be28e5f3bfa46bb47dbdc4d5f678eed36c1 | [
"MIT"
] | 1 | 2019-12-19T13:35:07.000Z | 2019-12-19T13:35:07.000Z | import json
import glob
import numpy as np
import os
path = "data_state_space_v3/"
out_path = "small_data/"
files = glob.glob(path + "*.npy") #
train_data_num = 100
test_data_num = 10
train_data = {}
test_data = {}
for filename in files:
obj = np.load(filename)
if filename.find("_test.npy") >= 0:
tes... | 26.243243 | 62 | 0.669413 | import json
import glob
import numpy as np
import os
path = "data_state_space_v3/"
out_path = "small_data/"
files = glob.glob(path + "*.npy") # ワイルドカードが使用可能
train_data_num = 100
test_data_num = 10
train_data = {}
test_data = {}
for filename in files:
obj = np.load(filename)
if filename.find("_test.npy") >= 0:... | 36 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
991fa516fb5524187777ee16359f8b1f0cb6ad59 | 859 | py | Python | 3M/W9/7.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | 2 | 2021-11-25T13:38:36.000Z | 2021-11-25T13:42:56.000Z | 3M/W9/7.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | null | null | null | 3M/W9/7.py | allenalvin333/Hackerrank_Prep | 26ed5b874daba4775d006824d36f9e82ea5ff1ea | [
"MIT"
] | 1 | 2021-11-25T13:38:43.000Z | 2021-11-25T13:38:43.000Z | # https://www.hackerrank.com/challenges/three-month-preparation-kit-maxsubarray/problem
#!/bin/python3
import os
#
# Complete the 'maxSubarray' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts INTEGER_ARRAY arr as parameter.
#
if __name__ == '__main__':
fptr = open(... | 21.475 | 87 | 0.615832 | # https://www.hackerrank.com/challenges/three-month-preparation-kit-maxsubarray/problem
#!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'maxSubarray' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts INTEGER_ARRAY arr as parameter... | 0 | 0 | 0 | 0 | 0 | 164 | 0 | -41 | 112 |
End of preview. Expand in Data Studio
This is a dataset originated from bigcode/the-stack-dedup with some filters applied. The filters filtered in this dataset are:
- remove_non_ascii
- remove_decorators
- remove_async
- remove_classes
- remove_generators
- remove_function_no_docstring
- remove_class_no_docstring
- remove_unused_imports
- remove_delete_markers
- Downloads last month
- 24