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 listlengths 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 listlengths 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 listlengths 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e873498081e03115e60ff957c07187f88d592852 | 234 | py | Python | DeepLearningArchitectures/UNet/utils/eval_utils.py | SCCH-KVS/NuclearSegmentationPipeline | 5b4a37b74890e0a6fb767061c60a9f2a880d370d | [
"MIT"
] | 13 | 2019-05-22T08:41:17.000Z | 2022-03-08T03:09:52.000Z | DeepLearningArchitectures/UNet/utils/eval_utils.py | SCCH-KVS/NuclearSegmentationPipeline | 5b4a37b74890e0a6fb767061c60a9f2a880d370d | [
"MIT"
] | 15 | 2020-01-28T22:53:59.000Z | 2022-03-12T00:55:09.000Z | DeepLearningArchitectures/UNet/utils/eval_utils.py | SCCH-KVS/NuclearSegmentationPipeline | 5b4a37b74890e0a6fb767061c60a9f2a880d370d | [
"MIT"
] | 3 | 2020-06-18T09:35:54.000Z | 2022-02-17T03:55:25.000Z |
import numpy as np
def dice(Seg, G):
""" compute dice coefficient """
if (np.sum(G) + np.sum(Seg)) == 0:
dice = 1.0
else:
dice = (2.0 * np.sum(Seg[G == 1])) / (np.sum(Seg) + np.sum(G))
return dice
| 16.714286 | 70 | 0.491453 |
import numpy as np
def dice(Seg, G):
""" compute dice coefficient """
if (np.sum(G) + np.sum(Seg)) == 0:
dice = 1.0
else:
dice = (2.0 * np.sum(Seg[G == 1])) / (np.sum(Seg) + np.sum(G))
return dice
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
856f3a910328a62b4076e005f1ae33d6461f6712 | 339 | py | Python | general-practice/Exercises solved/w3resource/basic/Exercise17.py | lugabrielbueno/Projeto | f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0 | [
"MIT"
] | null | null | null | general-practice/Exercises solved/w3resource/basic/Exercise17.py | lugabrielbueno/Projeto | f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0 | [
"MIT"
] | null | null | null | general-practice/Exercises solved/w3resource/basic/Exercise17.py | lugabrielbueno/Projeto | f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0 | [
"MIT"
] | null | null | null | #Write a Python program to test whether a number is within 100 of 1000 or 2000
print(test(120))
print(test(0))
print(test(80))
print(test(999))
print(test(1000)) | 22.6 | 78 | 0.59587 | #Write a Python program to test whether a number is within 100 of 1000 or 2000
def test(n):
try:
n = int(n)
except :
print("WHOOPS! That's not a number.")
else:
return ((abs(1000 - n) <= 100) or (abs(2000 - n) <= 100))
print(test(120))
print(test(0))
print(test(80))
print(test(999)... | 0 | 0 | 0 | 0 | 0 | 154 | 0 | 0 | 23 |
8127c8e521ccf46b076734cbd11931846df1ca60 | 1,264 | py | Python | DDoS_Scripts/skype.py | thexaoulm/dos | fd8a3bc623e7615df062edde34e5972a0545d668 | [
"MIT"
] | 2 | 2020-05-26T12:51:01.000Z | 2021-12-24T01:27:52.000Z | DDoS_Scripts/skype.py | thexaoulm/dos | fd8a3bc623e7615df062edde34e5972a0545d668 | [
"MIT"
] | null | null | null | DDoS_Scripts/skype.py | thexaoulm/dos | fd8a3bc623e7615df062edde34e5972a0545d668 | [
"MIT"
] | 1 | 2021-10-10T03:45:08.000Z | 2021-10-10T03:45:08.000Z | import urllib2
import sys
#Simple Class Color
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
has_colours = has_colours(sys.stdout)
# Resolver:
printout("*\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\*\r\n" , RED)
printout("Python ~ Skype Resolver By Phobia\r\n" , CYAN)
printout(" Sky... | 27.478261 | 73 | 0.55538 | import urllib2
import sys
#Simple Class Color
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
def has_colours(stream):
if not hasattr(stream, "isatty"):
return False
if not stream.isatty():
return False
try:
import curses
curses.setupterm()
return... | 0 | 0 | 0 | 0 | 0 | 450 | 0 | 0 | 48 |
297d6ff449f7ac76202f630c73fcaa65c329792c | 3,722 | py | Python | pyemma/coordinates/util/stat.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | null | null | null | pyemma/coordinates/util/stat.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | null | null | null | pyemma/coordinates/util/stat.py | trendelkampschroer/PyEMMA | ee5784d5c1c5bc070fe2e9e6ad4f24b36185dc20 | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | 38.371134 | 93 | 0.682429 | # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University
# Berlin, 14195 Berlin, Germany.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source ... | 0 | 126 | 0 | 0 | 0 | 0 | 0 | 24 | 45 |
4efcfe7dccbdea68f65bb4d43a53e7d154e10322 | 390 | py | Python | tests/apps/dummy/token.py | florimondmanca/starlette-auth-toolkit | e33646af772c82efd5c80ec39c41aff68cc6cd90 | [
"MIT"
] | 35 | 2019-05-12T14:29:32.000Z | 2022-01-26T04:49:45.000Z | tests/apps/dummy/token.py | florimondmanca/starlette-auth-toolkit | e33646af772c82efd5c80ec39c41aff68cc6cd90 | [
"MIT"
] | 10 | 2019-05-12T13:16:21.000Z | 2019-07-27T14:59:39.000Z | tests/apps/dummy/token.py | florimondmanca/starlette-auth-toolkit | e33646af772c82efd5c80ec39c41aff68cc6cd90 | [
"MIT"
] | null | null | null |
TOKEN = "s3kr3t_t0k3n"
| 20.526316 | 62 | 0.723077 | from starlette.authentication import SimpleUser
from starlette_auth_toolkit.base.backends import BaseTokenAuth
from ..utils import get_base_app
TOKEN = "s3kr3t_t0k3n"
class TokenAuth(BaseTokenAuth):
async def verify(self, token: str):
if token != TOKEN:
return None
return SimpleUser... | 0 | 0 | 98 | 10 | 0 | 38 | 0 | 78 | 140 |
98b31d5a85d42662f446c6e62aac19f75e48fec8 | 71 | py | Python | src/MMCQsc/version.py | Soltus/color-theme-analyse | bcbab80d0dcd502861bb2daa3473dc46bc747399 | [
"MIT"
] | null | null | null | src/MMCQsc/version.py | Soltus/color-theme-analyse | bcbab80d0dcd502861bb2daa3473dc46bc747399 | [
"MIT"
] | null | null | null | src/MMCQsc/version.py | Soltus/color-theme-analyse | bcbab80d0dcd502861bb2daa3473dc46bc747399 | [
"MIT"
] | null | null | null | __version__ = "0.1.dev39"
version = "0.1.dev39"
version_tuple = (0, 1)
| 17.75 | 25 | 0.661972 | __version__ = "0.1.dev39"
version = "0.1.dev39"
version_tuple = (0, 1)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
065e2c65f3b407be64747b7f7a43057b3055a7c3 | 360 | py | Python | fps_folder.py | ychnlgy/VideoEditor | a6ae2366c5cbbedc376a08539a0ce39efc45e362 | [
"MIT"
] | null | null | null | fps_folder.py | ychnlgy/VideoEditor | a6ae2366c5cbbedc376a08539a0ce39efc45e362 | [
"MIT"
] | null | null | null | fps_folder.py | ychnlgy/VideoEditor | a6ae2366c5cbbedc376a08539a0ce39efc45e362 | [
"MIT"
] | null | null | null |
import fps as fps_mod
if __name__ == "__main__":
main(**fps_mod.collect_args()) | 21.176471 | 39 | 0.611111 | import os
import fps as fps_mod
def main(path, fps, speed):
dname = os.path.dirname(path)
ext = os.path.splitext(path)[1]
for f in os.listdir(dname):
if not f.endswith(ext):
continue
fpath = os.path.join(dname, f)
fps_mod.main(fpath, fps, speed)
if __name__ == "__mai... | 0 | 0 | 0 | 0 | 0 | 240 | 0 | -12 | 45 |
543ab8bc2451665f84d1ea8193b5552359c5acb4 | 1,121 | py | Python | hist/urls.py | lmarent/historias_clinicas | 3580c0af8a40cf9b88c1b59ca6eb00a03c5d254a | [
"MIT"
] | null | null | null | hist/urls.py | lmarent/historias_clinicas | 3580c0af8a40cf9b88c1b59ca6eb00a03c5d254a | [
"MIT"
] | null | null | null | hist/urls.py | lmarent/historias_clinicas | 3580c0af8a40cf9b88c1b59ca6eb00a03c5d254a | [
"MIT"
] | null | null | null | from django.urls import include, path
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.contrib import admin
from django.views.generic.base import RedirectView
# Uncomment the next two lines to enable the admin:
admin.autodiscover()
admin.site.enable_nav_sidebar = False
ad... | 30.297297 | 71 | 0.719001 | from django.urls import include, path
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.contrib import admin
from django.views.generic.base import RedirectView
# Uncomment the next two lines to enable the admin:
admin.autodiscover()
admin.site.enable_nav_sidebar = False
ad... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
296dc3f2386d5d27f1d7d7ed0ae7b3539c17b6d5 | 4,303 | py | Python | erle.py | e841018/ERLE | ccdc6bc243c3f74d0cc5c1b5d5e73c88ee4c148e | [
"MIT"
] | 2 | 2020-11-26T00:01:11.000Z | 2021-03-13T00:58:32.000Z | erle.py | e841018/ERLE | ccdc6bc243c3f74d0cc5c1b5d5e73c88ee4c148e | [
"MIT"
] | 1 | 2021-03-13T00:54:37.000Z | 2021-03-15T01:01:51.000Z | erle.py | e841018/ERLE | ccdc6bc243c3f74d0cc5c1b5d5e73c88ee4c148e | [
"MIT"
] | 1 | 2021-07-19T21:49:23.000Z | 2021-07-19T21:49:23.000Z | # encode image of shape (n<=24, 1080, 1920) with Enhanced Run-Length Encoding (ERLE) described in http://www.ti.com/lit/pdf/dlpu018
import numpy as np
import struct
pack32be = struct.Struct('>I').pack # uint32 big endian
def get_header():
'''
generate header defined in section 2.4.2
'''
header = byt... | 27.76129 | 131 | 0.577736 | # encode image of shape (n<=24, 1080, 1920) with Enhanced Run-Length Encoding (ERLE) described in http://www.ti.com/lit/pdf/dlpu018
import numpy as np
import struct
pack32be = struct.Struct('>I').pack # uint32 big endian
def get_header():
'''
generate header defined in section 2.4.2
'''
header = byt... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
16e870d111e14a4fdb1011cc0322b77c320e8a98 | 1,169 | py | Python | setup.py | alanyee/costBuddy | 6b27a0d5fa4d3f6bc8f0cf8c4c69756e068050c2 | [
"Apache-2.0"
] | 101 | 2020-02-06T17:58:06.000Z | 2022-02-23T12:04:21.000Z | setup.py | alanyee/costBuddy | 6b27a0d5fa4d3f6bc8f0cf8c4c69756e068050c2 | [
"Apache-2.0"
] | 14 | 2020-03-26T22:50:11.000Z | 2022-03-06T06:57:53.000Z | setup.py | alanyee/costBuddy | 6b27a0d5fa4d3f6bc8f0cf8c4c69756e068050c2 | [
"Apache-2.0"
] | 18 | 2020-02-11T03:10:49.000Z | 2022-03-15T05:46:33.000Z | from setuptools import setup
setup(
name="costBuddy",
license="MIT",
description="Taming AWS cost proactively",
long_description=get_long_description(),
author="A lot of people",
author_email="opensource@intuit.com",
packages=["src"],
python_requires='>=3.6',
classifiers=[
... | 32.472222 | 70 | 0.601369 | import os.path
from setuptools import setup
def get_long_description():
descr = []
for fname in ('README.md',):
with open(fname) as f:
descr.append(f.read())
return '\n\n'.join(descr)
setup(
name="costBuddy",
license="MIT",
description="Taming AWS cost proactively",
lo... | 0 | 0 | 0 | 0 | 0 | 150 | 0 | -7 | 45 |
77e81b9c2a4f27d75811c66527928490b5a0fd32 | 2,015 | py | Python | processing/names.py | yzerlaut/model-curation | fccea0e0be5585522c6d032361ae215906792383 | [
"Apache-2.0"
] | null | null | null | processing/names.py | yzerlaut/model-curation | fccea0e0be5585522c6d032361ae215906792383 | [
"Apache-2.0"
] | null | null | null | processing/names.py | yzerlaut/model-curation | fccea0e0be5585522c6d032361ae215906792383 | [
"Apache-2.0"
] | 1 | 2020-02-28T09:19:53.000Z | 2020-02-28T09:19:53.000Z |
author_special_cases = {
"Jeanette Hellgren Kotaleski": ("Jeanette", "Hellgren Kotaleski"),
"Hellgren Kotaleski J": ("Jeanette", "Hellgren Kotaleski"),
"Joo Pedro Santos": ("Joo Pedro", "Santos"),
"Yi Ming Lai": ("Yi Ming", "Lai"),
"Luis Georg Romundstad": ("Luis Georg", "Romundstad"),
"Johann... | 42.87234 | 121 | 0.604467 |
author_special_cases = {
"Jeanette Hellgren Kotaleski": ("Jeanette", "Hellgren Kotaleski"),
"Hellgren Kotaleski J": ("Jeanette", "Hellgren Kotaleski"),
"João Pedro Santos": ("João Pedro", "Santos"),
"Yi Ming Lai": ("Yi Ming", "Lai"),
"Luis Georg Romundstad": ("Luis Georg", "Romundstad"),
"Joha... | 28 | 0 | 0 | 0 | 0 | 968 | 0 | 0 | 23 |
56eea5013476e623e9bffdd17e6b765b8b3ffe71 | 1,864 | py | Python | classification_tools.py | 0zym4nd145/classification-tools | 50e9a1f6a542dc10de02d0fa24444232d326bad4 | [
"Unlicense"
] | null | null | null | classification_tools.py | 0zym4nd145/classification-tools | 50e9a1f6a542dc10de02d0fa24444232d326bad4 | [
"Unlicense"
] | null | null | null | classification_tools.py | 0zym4nd145/classification-tools | 50e9a1f6a542dc10de02d0fa24444232d326bad4 | [
"Unlicense"
] | null | null | null | __author__ = "Lucas Ortega Venzel"
__license__ = "The Unlicense"
__version__ = "0.1"
__maintainer__ = "Lucas Ortega Venzel"
__email__ = "venzellucas@gmail.com"
__status__ = "Testing"
| 37.28 | 119 | 0.629292 | __author__ = "Lucas Ortega Venzel"
__license__ = "The Unlicense"
__version__ = "0.1"
__maintainer__ = "Lucas Ortega Venzel"
__email__ = "venzellucas@gmail.com"
__status__ = "Testing"
from itertools import product
from tqdm import tqdm
from sklearn.metrics import make_scorer
from sklearn.model_selection import cross_v... | 0 | 0 | 0 | 1,512 | 0 | 0 | 0 | 56 | 112 |
fee6528e9cb131eb72c6bf39ae764894cfba2963 | 6,894 | py | Python | phial/phial.py | madelyneriksen/phial | 5bf3abb9a92fa90d5cbdc13dd026afa1aa611979 | [
"MIT"
] | null | null | null | phial/phial.py | madelyneriksen/phial | 5bf3abb9a92fa90d5cbdc13dd026afa1aa611979 | [
"MIT"
] | null | null | null | phial/phial.py | madelyneriksen/phial | 5bf3abb9a92fa90d5cbdc13dd026afa1aa611979 | [
"MIT"
] | null | null | null | # pylint: disable=too-few-public-methods, attribute-defined-outside-init
"""A tiny, async webframework written in Python3."""
| 34.47 | 83 | 0.592254 | # pylint: disable=too-few-public-methods, attribute-defined-outside-init
"""A tiny, async webframework written in Python3."""
import re
import cgi
from io import BytesIO
from urllib.parse import parse_qs
from types import FunctionType
async def default404(_, error=''):
"""Default 404 handler."""
return Respon... | 0 | 832 | 1,514 | 4,145 | 0 | 0 | 0 | -1 | 271 |
dcd218c0289ce9b7f6d199768d1c16cfd1556619 | 3,576 | py | Python | pyrecon/tests/utils.py | cosmodesi/pyrecon | 2af43b9caba847a54c50ef1807f28575a6ddcde6 | [
"BSD-3-Clause"
] | 2 | 2022-01-07T12:23:57.000Z | 2022-01-22T20:34:16.000Z | pyrecon/tests/utils.py | cosmodesi/pyrecon | 2af43b9caba847a54c50ef1807f28575a6ddcde6 | [
"BSD-3-Clause"
] | 11 | 2021-11-16T16:36:30.000Z | 2022-01-31T11:32:57.000Z | pyrecon/tests/utils.py | cosmodesi/pyrecon | 2af43b9caba847a54c50ef1807f28575a6ddcde6 | [
"BSD-3-Clause"
] | 4 | 2021-11-25T11:43:32.000Z | 2021-11-30T01:13:27.000Z | import os
catalog_dir = '_catalogs'
box_data_fn = os.path.join(catalog_dir, 'box_data.fits')
data_fn = os.path.join(catalog_dir, 'data.fits')
randoms_fn = os.path.join(catalog_dir, 'randoms.fits')
bias = 2.0
| 39.296703 | 112 | 0.677293 | import os
import time
import numpy as np
import fitsio
catalog_dir = '_catalogs'
box_data_fn = os.path.join(catalog_dir, 'box_data.fits')
data_fn = os.path.join(catalog_dir, 'data.fits')
randoms_fn = os.path.join(catalog_dir, 'randoms.fits')
bias = 2.0
def mkdir(dirname):
try:
os.makedirs(dirname)
... | 0 | 0 | 0 | 0 | 0 | 3,224 | 0 | -21 | 159 |
62c2cc18a3573e4b6c6ea824120fce5d8b25fafd | 5,618 | py | Python | tests/monero_client/utils/base58.py | TheCharlatan/app-monero | d17d478de2caf89949714e13e0976d54caa3d4d0 | [
"Apache-2.0"
] | 188 | 2017-06-21T20:28:31.000Z | 2018-08-18T18:43:06.000Z | tests/monero_client/utils/base58.py | TheCharlatan/app-monero | d17d478de2caf89949714e13e0976d54caa3d4d0 | [
"Apache-2.0"
] | 41 | 2020-05-10T12:15:19.000Z | 2022-03-04T14:26:03.000Z | tests/monero_client/utils/base58.py | TheCharlatan/app-monero | d17d478de2caf89949714e13e0976d54caa3d4d0 | [
"Apache-2.0"
] | 41 | 2018-08-29T06:40:50.000Z | 2020-04-01T06:14:18.000Z | """MoneroPy - A python toolbox for Monero
Copyright (C) 2016 The MoneroPy Developers.
MoneroPy is released under the BSD 3-Clause license. Use and redistribution of
this software is subject to the license terms in the LICENSE file found in the
top-level directory of this distribution.
Modified by emesik and rooterkyb... | 29.260417 | 81 | 0.61659 | """MoneroPy - A python toolbox for Monero
Copyright (C) 2016 The MoneroPy Developers.
MoneroPy is released under the BSD 3-Clause license. Use and redistribution of
this software is subject to the license terms in the LICENSE file found in the
top-level directory of this distribution.
Modified by emesik and rooterkyb... | 0 | 0 | 0 | 0 | 0 | 2,282 | 0 | 0 | 138 |
bfbf2775331a03a13f313e8d31040ac4d657ef11 | 1,110 | py | Python | setup.py | ridha/aws-iot-device-sdk-python | 57f0e200fe4b168aa83cf1817c0d1cffb5e8b9b7 | [
"Apache-2.0"
] | null | null | null | setup.py | ridha/aws-iot-device-sdk-python | 57f0e200fe4b168aa83cf1817c0d1cffb5e8b9b7 | [
"Apache-2.0"
] | null | null | null | setup.py | ridha/aws-iot-device-sdk-python | 57f0e200fe4b168aa83cf1817c0d1cffb5e8b9b7 | [
"Apache-2.0"
] | null | null | null | import sys
from setuptools import setup, find_packages
sys.path.insert(0, 'AWSIoTPythonSDK')
import AWSIoTPythonSDK
currentVersion = AWSIoTPythonSDK.__version__
setup(
name='AWSIoTPythonSDK',
packages=find_packages(exclude=('tests', )),
version=currentVersion,
description='SDK for connecting to AWS Io... | 35.806452 | 107 | 0.657658 | import sys
from setuptools import setup, find_packages
sys.path.insert(0, 'AWSIoTPythonSDK')
import AWSIoTPythonSDK
currentVersion = AWSIoTPythonSDK.__version__
setup(
name='AWSIoTPythonSDK',
packages=find_packages(exclude=('tests', )),
version=currentVersion,
description='SDK for connecting to AWS Io... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ed936266701c6bedc1e51e614ac577c4409cd461 | 900 | py | Python | mercadopago/resources/__init__.py | nlgonzalez/sdk-python | 972082b1a1c0015fce376a42f53e4696b163bc0b | [
"MIT"
] | 100 | 2015-02-17T03:16:15.000Z | 2022-03-28T17:22:14.000Z | mercadopago/resources/__init__.py | nlgonzalez/sdk-python | 972082b1a1c0015fce376a42f53e4696b163bc0b | [
"MIT"
] | 29 | 2015-06-15T18:40:09.000Z | 2022-02-24T15:36:03.000Z | mercadopago/resources/__init__.py | nlgonzalez/sdk-python | 972082b1a1c0015fce376a42f53e4696b163bc0b | [
"MIT"
] | 58 | 2015-01-16T21:46:45.000Z | 2022-02-25T21:26:22.000Z | """
Module: resources/__init__.py
"""
| 47.368421 | 72 | 0.885556 | """
Module: resources/__init__.py
"""
from mercadopago.resources.advanced_payment import AdvancedPayment
from mercadopago.resources.card_token import CardToken
from mercadopago.resources.card import Card
from mercadopago.resources.customer import Customer
from mercadopago.resources.disbursement_refund import Disburseme... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 532 | 330 |
a95c65571a0200700421ec453cd45993f7efc70c | 24 | py | Python | basic_algorithm/search/hiuresticSearch/IDA_star.py | vax521/algorithms | ffcb4af8c7956ee1dcb4c48252fe235d9e275dab | [
"Unlicense"
] | null | null | null | basic_algorithm/search/hiuresticSearch/IDA_star.py | vax521/algorithms | ffcb4af8c7956ee1dcb4c48252fe235d9e275dab | [
"Unlicense"
] | null | null | null | basic_algorithm/search/hiuresticSearch/IDA_star.py | vax521/algorithms | ffcb4af8c7956ee1dcb4c48252fe235d9e275dab | [
"Unlicense"
] | null | null | null | #
initial_mat = [] | 8 | 16 | 0.625 | # 数码问题
initial_mat = [] | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f49e5f6f07421e5f97643e1946fcc8211f70950d | 14,113 | py | Python | scripts/sync_jsons.py | charlesbrandt/medley | 9c035687ccc19034027d497f65a7d1d8dbabf460 | [
"MIT"
] | null | null | null | scripts/sync_jsons.py | charlesbrandt/medley | 9c035687ccc19034027d497f65a7d1d8dbabf460 | [
"MIT"
] | null | null | null | scripts/sync_jsons.py | charlesbrandt/medley | 9c035687ccc19034027d497f65a7d1d8dbabf460 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
# By: Charles Brandt [code at contextiskey dot com]
# On: 2014.07.09 14:56:09
# License: MIT
# Requires: moments
# based off of:
# /c/templates/scripts/diff_directories.py
# Description:
#
# takes two directory paths as input
# looks at the contents of both directories
# and recursively fi... | 32.974299 | 129 | 0.542975 | #!/usr/bin/env python
"""
# By: Charles Brandt [code at contextiskey dot com]
# On: 2014.07.09 14:56:09
# License: MIT
# Requires: moments
# based off of:
# /c/templates/scripts/diff_directories.py
# Description:
#
# takes two directory paths as input
# looks at the contents of both directories
# and recursively fi... | 0 | 0 | 0 | 0 | 0 | 10,297 | 0 | 58 | 340 |
c373e3e96fc268c772252db67854304ed8adcb78 | 1,688 | py | Python | generate_ensemble.py | RadostW/PyIDPDiffusion | 5f6587b33555c49fbcc696222e3bb17bc3f3ad5d | [
"MIT"
] | null | null | null | generate_ensemble.py | RadostW/PyIDPDiffusion | 5f6587b33555c49fbcc696222e3bb17bc3f3ad5d | [
"MIT"
] | null | null | null | generate_ensemble.py | RadostW/PyIDPDiffusion | 5f6587b33555c49fbcc696222e3bb17bc3f3ad5d | [
"MIT"
] | null | null | null | import numpy as np
def _get_chain_recursive(begin,end,sizes):
#print((begin,end,sizes))
"""
Get chain starting with bead of size sizes[begin] and ending with bead sizes[end-1]
"""
if begin == end:
return np.array([[]])
elif begin == end-1:
return np.array([[0,0,0]])
els... | 33.098039 | 116 | 0.574645 | import numpy as np
def get_spherical():
vec = np.random.randn(3)
return vec/np.sqrt(np.sum(vec**2))
def _get_chain_recursive(begin,end,sizes):
#print((begin,end,sizes))
"""
Get chain starting with bead of size sizes[begin] and ending with bead sizes[end-1]
"""
if begin == end:
... | 0 | 0 | 0 | 0 | 0 | 180 | 0 | 0 | 69 |
2201b59cb783ae6c998792bb326a7aff502e4ae2 | 675 | py | Python | ropgadget/__init__.py | nurmukhametov/ROPgadget | 15ffb1b08d64991ecdd4131e07e8a3118930c629 | [
"BSD-3-Clause"
] | 1 | 2021-05-24T09:49:01.000Z | 2021-05-24T09:49:01.000Z | ropgadget/__init__.py | nurmukhametov/ROPgadget | 15ffb1b08d64991ecdd4131e07e8a3118930c629 | [
"BSD-3-Clause"
] | null | null | null | ropgadget/__init__.py | nurmukhametov/ROPgadget | 15ffb1b08d64991ecdd4131e07e8a3118930c629 | [
"BSD-3-Clause"
] | null | null | null | ## -*- coding: utf-8 -*-
##
## Jonathan Salwan - 2014-05-12 - ROPgadget tool
##
## http://twitter.com/JonathanSalwan
## http://shell-storm.org/project/ROPgadget/
##
import ropgadget.args
import ropgadget.binary
import ropgadget.core
import ropgadget.gadgets
import ropgadget.options
import ropgadget.rgutils
import r... | 22.5 | 56 | 0.703704 | ## -*- coding: utf-8 -*-
##
## Jonathan Salwan - 2014-05-12 - ROPgadget tool
##
## http://twitter.com/JonathanSalwan
## http://shell-storm.org/project/ROPgadget/
##
import ropgadget.args
import ropgadget.binary
import ropgadget.core
import ropgadget.gadgets
import ropgadget.options
import ropgadget.rgutils
import r... | 0 | 0 | 0 | 0 | 0 | 235 | 0 | 4 | 45 |
c4d928e45c82e04c48a8fc4d432242f2777fcc58 | 5,786 | py | Python | tf_agents/bandits/agents/dropout_thompson_sampling_agent.py | witwolf/agents | e084e5184757dd84374e9b67176b8623d4b18a0f | [
"Apache-2.0"
] | null | null | null | tf_agents/bandits/agents/dropout_thompson_sampling_agent.py | witwolf/agents | e084e5184757dd84374e9b67176b8623d4b18a0f | [
"Apache-2.0"
] | null | null | null | tf_agents/bandits/agents/dropout_thompson_sampling_agent.py | witwolf/agents | e084e5184757dd84374e9b67176b8623d4b18a0f | [
"Apache-2.0"
] | 2 | 2019-10-23T23:31:30.000Z | 2019-10-25T21:32:26.000Z | # coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 42.859259 | 80 | 0.742136 | # coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 0 | 4,670 | 0 | 0 | 0 | 0 | 0 | 56 | 113 |
9dc26d9798fcbb521fd6ce6a1e07d3b535eef44c | 2,988 | py | Python | xero_python/finance/models/pnl_account_class.py | gavinwhyte/xero-python | 53a028c3b7c51da1db203b616bf7b7a028a4a1d2 | [
"MIT"
] | 1 | 2022-01-22T20:50:36.000Z | 2022-01-22T20:50:36.000Z | xero_python/finance/models/pnl_account_class.py | kos7138/xero-python | fd4b00016366880d61b42437397e732f53fc8ce2 | [
"MIT"
] | null | null | null | xero_python/finance/models/pnl_account_class.py | kos7138/xero-python | fd4b00016366880d61b42437397e732f53fc8ce2 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Xero Finance API
The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech... | 32.129032 | 222 | 0.653949 | # coding: utf-8
"""
Xero Finance API
The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital. # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech... | 0 | 1,490 | 0 | 1,081 | 0 | 0 | 0 | 7 | 83 |
b0de55585c58bc2d193909f8fc03e4dc7f614331 | 764 | py | Python | Mission_to_Mars/app.py | LaurenPrins/web-scraping-challenge | cb7be04c247bb4557bbca76648593694a5b591c7 | [
"ADSL"
] | null | null | null | Mission_to_Mars/app.py | LaurenPrins/web-scraping-challenge | cb7be04c247bb4557bbca76648593694a5b591c7 | [
"ADSL"
] | null | null | null | Mission_to_Mars/app.py | LaurenPrins/web-scraping-challenge | cb7be04c247bb4557bbca76648593694a5b591c7 | [
"ADSL"
] | null | null | null | from flask import Flask
from flask_pymongo import PyMongo
# Create an instance of Flask
app = Flask(__name__)
# Use flask_pymongo to set up mongo connection
mongo = PyMongo(app, uri="mongodb://localhost:27017/mars_db")
# Route to render index.html template using data from Mongo
if __name__ == "__main__":
app.r... | 23.875 | 68 | 0.719895 | from flask import Flask, render_template, redirect
from flask_pymongo import PyMongo
import scrape_mars
# Create an instance of Flask
app = Flask(__name__)
# Use flask_pymongo to set up mongo connection
mongo = PyMongo(app, uri="mongodb://localhost:27017/mars_db")
# Route to render index.html template using data fro... | 0 | 334 | 0 | 0 | 0 | 0 | 0 | 24 | 67 |
db1e7725e4b4297b4a83f3f3934d5413b169328d | 1,102 | gyp | Python | binding.gyp | hokein/node-minizip | 245a9bf8c76e2d563f62b81f77d7d6725fd2d7ee | [
"MIT"
] | 11 | 2015-08-11T04:29:27.000Z | 2020-03-01T18:34:50.000Z | binding.gyp | hokein/node-minizip | 245a9bf8c76e2d563f62b81f77d7d6725fd2d7ee | [
"MIT"
] | 8 | 2015-08-11T04:29:12.000Z | 2019-11-04T10:52:43.000Z | binding.gyp | hokein/node-minizip | 245a9bf8c76e2d563f62b81f77d7d6725fd2d7ee | [
"MIT"
] | 5 | 2015-08-12T13:07:32.000Z | 2021-04-21T07:09:07.000Z | {
'targets': [
{
'target_name': 'node-minizip',
'sources': [
'src/zip.cc',
'src/zip.h',
'src/zip_api.cc',
'src/zip_async_worker.cc',
'src/zip_async_worker.h',
'src/zip_internal.cc',
'src/zip_internal.h',
'src/zip_reader.cc',
'src/... | 23.956522 | 80 | 0.428312 | {
'targets': [
{
'target_name': 'node-minizip',
'sources': [
'src/zip.cc',
'src/zip.h',
'src/zip_api.cc',
'src/zip_async_worker.cc',
'src/zip_async_worker.h',
'src/zip_internal.cc',
'src/zip_internal.h',
'src/zip_reader.cc',
'src/... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2faa7f0bbb3b346275770b9f8980243bdb2ef81 | 3,595 | py | Python | talentmap_api/messaging/views.py | MetaPhase-Consulting/State-TalentMAP-API | 4e238cbfe241fd3d0a718a9a0fc038dbed00f13b | [
"CC0-1.0"
] | 7 | 2018-10-17T15:13:05.000Z | 2021-12-10T14:53:38.000Z | talentmap_api/messaging/views.py | MetaPhase-Consulting/State-TalentMAP-API | 4e238cbfe241fd3d0a718a9a0fc038dbed00f13b | [
"CC0-1.0"
] | 208 | 2018-12-28T17:11:00.000Z | 2022-03-29T18:47:23.000Z | talentmap_api/messaging/views.py | MetaPhase-Consulting/State-TalentMAP-API | 4e238cbfe241fd3d0a718a9a0fc038dbed00f13b | [
"CC0-1.0"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
| 35.95 | 117 | 0.659249 | import pydash
import json
import maya
import logging
from django.core.exceptions import ObjectDoesNotExist
from django.shortcuts import get_object_or_404
from django.apps import apps
from rest_framework.viewsets import GenericViewSet
from rest_framework.views import APIView
from rest_framework import mixins
from rest... | 0 | 0 | 0 | 2,708 | 0 | 0 | 0 | 409 | 424 |
33473a6443ccb5fb6a4f23d5610405059e9050b9 | 4,818 | py | Python | app/models.py | folkrav/B65-CvMS | f2a5d5ee9a9101f215035c68f6c4524cfab7671b | [
"MIT"
] | 1 | 2016-11-04T06:17:46.000Z | 2016-11-04T06:17:46.000Z | app/models.py | folkrav/B65-CvMS | f2a5d5ee9a9101f215035c68f6c4524cfab7671b | [
"MIT"
] | null | null | null | app/models.py | folkrav/B65-CvMS | f2a5d5ee9a9101f215035c68f6c4524cfab7671b | [
"MIT"
] | null | null | null | from app import db
users_privileges = db.Table('users_privileges', db.Model.metadata,
db.Column('id_privilege', db.Integer, db.ForeignKey('privilege_groups.id')),
db.Column('id_user', db.Integer, db.ForeignKey('users.id'))
)
article_collaborators = db.Table('article_collaborators', db.Model.metadata,
db... | 30.493671 | 124 | 0.693234 | from app import db
from werkzeug.security import generate_password_hash, check_password_hash
from datetime import datetime
from flask_login import UserMixin, AnonymousUserMixin
users_privileges = db.Table('users_privileges', db.Model.metadata,
db.Column('id_privilege', db.Integer, db.ForeignKey('privilege_groups.... | 0 | 246 | 0 | 3,507 | 0 | 0 | 0 | 92 | 249 |
3469ccdd2551da677abf3b6cdf3e96993a099efc | 2,846 | py | Python | pymtl3/stdlib/connects/connect_bits2bitstruct.py | mondO/pymtl3 | 9869dda28c01926cee6da94ebdeac2a210150c62 | [
"BSD-3-Clause"
] | 1 | 2022-01-03T06:22:11.000Z | 2022-01-03T06:22:11.000Z | pymtl3/stdlib/connects/connect_bits2bitstruct.py | mondO/pymtl3 | 9869dda28c01926cee6da94ebdeac2a210150c62 | [
"BSD-3-Clause"
] | null | null | null | pymtl3/stdlib/connects/connect_bits2bitstruct.py | mondO/pymtl3 | 9869dda28c01926cee6da94ebdeac2a210150c62 | [
"BSD-3-Clause"
] | null | null | null | '''
==========================================================================
connect_bits2bitstruct.py
==========================================================================
A connect function that connects a bits signal and a bitsrtuct signal that
has the same width.
Author : Yanghui Ou
Date : Feb 24, 2020
''... | 36.487179 | 77 | 0.593113 | '''
==========================================================================
connect_bits2bitstruct.py
==========================================================================
A connect function that connects a bits signal and a bitsrtuct signal that
has the same width.
Author : Yanghui Ou
Date : Feb 24, 2020
''... | 0 | 0 | 0 | 0 | 0 | 1,965 | 0 | 68 | 90 |
c460299a342a0c8f49195f7bfb3ba61dfa104d6f | 1,430 | py | Python | actions/overscan.py | Redcarred2/PiBoy-Configurator2 | 215b5a5aee16edb0a54d3fe82549f28c5f9c9a4b | [
"CC0-1.0"
] | 8 | 2021-04-12T12:49:48.000Z | 2022-03-07T13:09:18.000Z | actions/overscan.py | Redcarred2/PiBoy-Configurator2 | 215b5a5aee16edb0a54d3fe82549f28c5f9c9a4b | [
"CC0-1.0"
] | 3 | 2021-04-13T18:34:14.000Z | 2021-08-17T17:18:49.000Z | actions/overscan.py | Redcarred2/PiBoy-Configurator2 | 215b5a5aee16edb0a54d3fe82549f28c5f9c9a4b | [
"CC0-1.0"
] | 2 | 2021-04-14T07:54:48.000Z | 2021-08-16T02:51:05.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
sys.path.insert(1, '../')
BOOT_CONFIG_FILE = "/boot/config.txt"
if __name__ == "__main__":
x= main()
print( x )
| 25.535714 | 192 | 0.653846 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(1, '../')
import tools
BOOT_CONFIG_FILE = "/boot/config.txt"
def main():
bootConfigFile = open(BOOT_CONFIG_FILE, 'r')
lines = bootConfigFile.readlines()
bootConfigFile.close()
action = str(sys.argv[1])
newLines = []
if action == ... | 0 | 0 | 0 | 0 | 0 | 1,206 | 0 | -21 | 68 |
33f2487a933db2289f89a84a041c37aa054f3c62 | 559 | py | Python | src/rpasdt/algorithm/graph_export_import.py | damianfraszczak/rpasdt | 57039dea485f89d97aafc39ea52f595e35633826 | [
"MIT"
] | 2 | 2021-09-10T07:43:07.000Z | 2021-09-10T07:44:54.000Z | src/rpasdt/algorithm/graph_export_import.py | damianfraszczak/rpasdt | 57039dea485f89d97aafc39ea52f595e35633826 | [
"MIT"
] | null | null | null | src/rpasdt/algorithm/graph_export_import.py | damianfraszczak/rpasdt | 57039dea485f89d97aafc39ea52f595e35633826 | [
"MIT"
] | 2 | 2022-01-17T14:47:49.000Z | 2022-02-14T10:28:45.000Z | """Graph export/import utilities."""
import networkx as nx
from rpasdt.algorithm.taxonomies import GraphDataFormatEnum
GRAPH_EXPORTER = {
GraphDataFormatEnum.MULTILINE_ADJLIST: lambda graph: list(
nx.generate_multiline_adjlist(graph)
)
}
GRAPH_IMPORTER = {
GraphDataFormatEnum.MULTILINE_ADJLIST... | 23.291667 | 83 | 0.733453 | """Graph export/import utilities."""
from typing import List, Union
import networkx as nx
from rpasdt.algorithm.taxonomies import GraphDataFormatEnum
def _fetch_lines(data: Union[str, List[str]]) -> List[str]:
return data.split("\n") if isinstance(data, str) else data
GRAPH_EXPORTER = {
GraphDataFormatEnu... | 0 | 0 | 0 | 0 | 0 | 101 | 0 | 9 | 45 |
9af00b2941583ed3261f459b71cf2449692cdfcf | 269 | py | Python | Visualization/correlation_heat_map.py | Thehunk1206/EDA-and-Regression-Analysis | db71a2a61ebaf370bae8b70385f9ceb8f1fc839b | [
"MIT"
] | null | null | null | Visualization/correlation_heat_map.py | Thehunk1206/EDA-and-Regression-Analysis | db71a2a61ebaf370bae8b70385f9ceb8f1fc839b | [
"MIT"
] | null | null | null | Visualization/correlation_heat_map.py | Thehunk1206/EDA-and-Regression-Analysis | db71a2a61ebaf370bae8b70385f9ceb8f1fc839b | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
data = pd.read_csv("kc_house_data.csv")
data.drop('id',axis=1,inplace=True)
data.drop('date',axis=1,inplace=True)
plt.figure(figsize=(15,15))
sns.heatmap(data.corr(),annot=True)
plt.show()
| 16.8125 | 39 | 0.739777 | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
data = pd.read_csv("kc_house_data.csv")
data.drop('id',axis=1,inplace=True)
data.drop('date',axis=1,inplace=True)
plt.figure(figsize=(15,15))
sns.heatmap(data.corr(),annot=True)
plt.show()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
725058cf3a643d346723760cc3b67435aded1422 | 7,914 | py | Python | code/analysis/simulations.py | elevien/yeast_dna_repair | 0203ecf48791e711abbe280cd041095c6ee1c18d | [
"Unlicense"
] | null | null | null | code/analysis/simulations.py | elevien/yeast_dna_repair | 0203ecf48791e711abbe280cd041095c6ee1c18d | [
"Unlicense"
] | null | null | null | code/analysis/simulations.py | elevien/yeast_dna_repair | 0203ecf48791e711abbe280cd041095c6ee1c18d | [
"Unlicense"
] | null | null | null |
# ----------------------------------------------------------------------------
# pre-defined models
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# pre-defined models
# ---------------------------------... | 34.863436 | 102 | 0.549406 | import copy,math
import numpy as np
import pandas as pd
class bellman_harris_model_base:
def __init__(self,f,f0,Q,type_names):
'''
This is a base class for implementing multi-type population growth models.
can be sub-classes (see below) to implement specific models, such as
consta... | 0 | 0 | 0 | 7,022 | 0 | 0 | 0 | -10 | 158 |
36654c038c971d8f957ace333949b8bbc0b87c47 | 14,758 | py | Python | Data_utils/data_reader.py | CVLAB-Unibo/Learning2AdaptForStereo | 549290859b6d5e81d2e3248a7066249508bfdd46 | [
"Apache-2.0"
] | 74 | 2019-03-31T13:03:05.000Z | 2022-03-24T00:53:47.000Z | Data_utils/data_reader.py | CVLAB-Unibo/Learning2AdaptForStereo | 549290859b6d5e81d2e3248a7066249508bfdd46 | [
"Apache-2.0"
] | 7 | 2019-08-12T03:40:15.000Z | 2021-01-05T18:38:18.000Z | Data_utils/data_reader.py | CVLAB-Unibo/Learning2AdaptForStereo | 549290859b6d5e81d2e3248a7066249508bfdd46 | [
"Apache-2.0"
] | 12 | 2019-05-18T08:04:06.000Z | 2020-09-15T16:15:26.000Z | import tensorflow as tf
import numpy as np
import re
def readPFM(file):
"""
Load a pfm file as a numpy array
Args:
file: path to the file to be loaded
Returns:
content of the file as a numpy array
"""
file = open(file, 'rb')
color = None
width = None
height = None
... | 35.561446 | 178 | 0.636536 | import tensorflow as tf
import numpy as np
import cv2
import re
import os
import random
from Data_utils import preprocessing
from functools import partial
def readPFM(file):
"""
Load a pfm file as a numpy array
Args:
file: path to the file to be loaded
Returns:
content of the file as a... | 6 | 0 | 0 | 11,836 | 0 | 0 | 0 | -8 | 180 |
f4614e016772f7974d1e8ee059c5c44b3b2c82f9 | 898 | py | Python | mephisto/abstractions/blueprints/abstract/static_task/empty_task_builder.py | anchit/Mephisto | e9ae83ce310e1b5a8a90557dc94736d1e297a2a3 | [
"MIT"
] | 167 | 2020-06-15T21:25:19.000Z | 2022-03-31T20:58:19.000Z | mephisto/abstractions/blueprints/abstract/static_task/empty_task_builder.py | anchit/Mephisto | e9ae83ce310e1b5a8a90557dc94736d1e297a2a3 | [
"MIT"
] | 364 | 2020-06-22T17:02:18.000Z | 2022-03-31T23:40:35.000Z | mephisto/abstractions/blueprints/abstract/static_task/empty_task_builder.py | anchit/Mephisto | e9ae83ce310e1b5a8a90557dc94736d1e297a2a3 | [
"MIT"
] | 47 | 2020-07-26T18:03:21.000Z | 2022-03-31T07:46:45.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
| 39.043478 | 99 | 0.710468 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from mephisto.abstractions.blueprint import TaskBuilder
class EmptyStaticTaskBuilder(TaskBuilder):
"""
Abstrac... | 0 | 0 | 0 | 618 | 0 | 0 | 0 | 34 | 46 |
d41de299b9661678caee63b9200bacf2375e5986 | 1,293 | py | Python | util.py | KarypisLab/grade-prediction | 930035b00a1708255170c4f7111765f70f309ac0 | [
"MIT"
] | null | null | null | util.py | KarypisLab/grade-prediction | 930035b00a1708255170c4f7111765f70f309ac0 | [
"MIT"
] | null | null | null | util.py | KarypisLab/grade-prediction | 930035b00a1708255170c4f7111765f70f309ac0 | [
"MIT"
] | 1 | 2020-12-18T06:57:45.000Z | 2020-12-18T06:57:45.000Z | import torch.nn as nn
import torch.optim as optim
| 25.352941 | 67 | 0.665893 | import numpy as np
from torch.autograd import Variable
import torch
import torch.nn as nn
from torch.nn import MSELoss
import torch.optim as optim
from torch.utils.data import DataLoader
import math
from sklearn.metrics import mean_squared_error, mean_absolute_error
import argparse
import logging
import time
import tor... | 0 | 0 | 0 | 0 | 86 | 762 | 0 | 39 | 356 |
b7ff485b3602cfd4d98322aca836f27efdba9275 | 312 | py | Python | src/data_generator/test1.py | krishukr/cpp-code | 1c94401682227bd86c0d9295134d43582247794e | [
"MIT"
] | 1 | 2021-08-13T14:27:39.000Z | 2021-08-13T14:27:39.000Z | src/data_generator/test1.py | krishukr/cpp-code | 1c94401682227bd86c0d9295134d43582247794e | [
"MIT"
] | null | null | null | src/data_generator/test1.py | krishukr/cpp-code | 1c94401682227bd86c0d9295134d43582247794e | [
"MIT"
] | null | null | null |
for i in range(0, 10):
io = IO(file_prefix="a", data_id=i + 1)
n = randint(2, 1001)
m = randint(1, 2001)
io.input_writeln(n, m)
graph = Graph.graph(n, m)
io.input_writeln(graph.to_str(output=Edge.unweighted_edge, shuffle=True))
io.output_gen("../../bin/a")
| 19.5 | 77 | 0.61859 | from cyaron import *
for i in range(0, 10):
io = IO(file_prefix="a", data_id=i + 1)
n = randint(2, 1001)
m = randint(1, 2001)
io.input_writeln(n, m)
graph = Graph.graph(n, m)
io.input_writeln(graph.to_str(output=Edge.unweighted_edge, shuffle=True))
io.output_gen("../../bin/a")
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | -1 | 22 |
20ae66f3505fcd27d030e4ad04f173c912228194 | 2,608 | py | Python | scripts/mri_analyses/rename_unpacked_folders.py | hallez/tempcon_pub | 88a8ff0efab714b783583bad9d77651d63bf8e5f | [
"MIT"
] | null | null | null | scripts/mri_analyses/rename_unpacked_folders.py | hallez/tempcon_pub | 88a8ff0efab714b783583bad9d77651d63bf8e5f | [
"MIT"
] | null | null | null | scripts/mri_analyses/rename_unpacked_folders.py | hallez/tempcon_pub | 88a8ff0efab714b783583bad9d77651d63bf8e5f | [
"MIT"
] | null | null | null | import yaml
import os.path
if __name__ == '__main__':
config = yaml.load(open('config.yml', 'r'))
directories = config['directories']
default_analyzed_dirs_path = os.path.join(directories['mri_analysis_scripts'], 'default_dirs.yml')
default_analyzed_dirs = yaml.load(open(default_analyzed_dirs_path, '... | 39.515152 | 113 | 0.618098 | import yaml
import os.path
import shutil
def move_if_exists(source, destination):
if os.path.exists(destination):
print 'Skipping move of ' + source + ' to ' + destination + ' - destination already exists.'
return
if not os.path.exists(source):
print 'Cannot move ' + source + ' to ' + ... | 0 | 0 | 0 | 0 | 0 | 409 | 0 | -8 | 45 |
e7c71cb4d666a1f7c6a5fd7b467e435128d3011b | 1,365 | py | Python | py/save.py | HarfoucheLab/A-Primer-on-AI-in-Plant-Digital-Phenomics | 41b84cee9ffeec41d0856276c9af39d1f73020e7 | [
"MIT"
] | null | null | null | py/save.py | HarfoucheLab/A-Primer-on-AI-in-Plant-Digital-Phenomics | 41b84cee9ffeec41d0856276c9af39d1f73020e7 | [
"MIT"
] | null | null | null | py/save.py | HarfoucheLab/A-Primer-on-AI-in-Plant-Digital-Phenomics | 41b84cee9ffeec41d0856276c9af39d1f73020e7 | [
"MIT"
] | null | null | null | import os
import torch
def save_model_w_condition(model, model_dir, model_name, accu, target_accu, rank=0, log=print):
'''
model: this is not the multigpu model
'''
if rank == 0:
if accu > target_accu:
log('\tabove {0:.2f}%'.format(target_accu * 100))
# torch.save(obj=mo... | 48.75 | 118 | 0.61685 | import os
import torch
def save_model_w_condition(model, model_dir, model_name, accu, target_accu, rank=0, log=print):
'''
model: this is not the multigpu model
'''
if rank == 0:
if accu > target_accu:
log('\tabove {0:.2f}%'.format(target_accu * 100))
# torch.save(obj=mo... | 0 | 0 | 0 | 0 | 0 | 830 | 0 | 0 | 23 |
903d635f70cd63d634914dbdfc60cd86cd53e890 | 2,307 | py | Python | AutoHotkey/alt codes hotstrings.py | JellyJoe198/python-macros | 87009c5bb3f3e6e4180d58166f465b0101caa912 | [
"MIT"
] | 1 | 2022-02-07T15:42:48.000Z | 2022-02-07T15:42:48.000Z | AutoHotkey/alt codes hotstrings.py | JellyJoe198/python-macros | 87009c5bb3f3e6e4180d58166f465b0101caa912 | [
"MIT"
] | 2 | 2021-03-29T18:51:23.000Z | 2021-03-31T02:52:13.000Z | AutoHotkey/alt codes hotstrings.py | JellyJoe198/python-macros | 87009c5bb3f3e6e4180d58166f465b0101caa912 | [
"MIT"
] | null | null | null | characters116 =['','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','space','!','"','#','$','%','&',"'",'(',')','*','+',',','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S'... | 49.085106 | 529 | 0.330733 | characters116 =['☺','☻','♥','♦','♣','♠','•','◘','○','◙','♂','♀','♪','♫','☼','►','◄','↕','‼','¶','§','▬','↨','↑','↓','→','←','∟','↔','▲','▼','space','!','"','#','$','%','&',"'",'(',')','*','+',',','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','<','=','>','?','@','A','B','C','D','E','F','G','H','I','J','K',... | 412 | 0 | 0 | 0 | 0 | 712 | 0 | 0 | 115 |
d3abcadc4168f48ae5a3b8afcc0c6966ceda2764 | 3,389 | py | Python | src/data_processor/calculated_fields_laps.py | krezac/tesla-race-analyzer | d86c18f335abea3801335dd8bcd58b9b35b487fe | [
"MIT"
] | 1 | 2021-01-27T23:26:49.000Z | 2021-01-27T23:26:49.000Z | src/data_processor/calculated_fields_laps.py | krezac/tesla-race-analyzer | d86c18f335abea3801335dd8bcd58b9b35b487fe | [
"MIT"
] | 1 | 2021-01-05T10:58:15.000Z | 2021-01-05T10:58:15.000Z | src/data_processor/calculated_fields_laps.py | krezac/tesla-race-analyzer | d86c18f335abea3801335dd8bcd58b9b35b487fe | [
"MIT"
] | null | null | null | from typing import Optional, Dict, Any
import pendulum
from src.data_models import Configuration
def add_calculated_fields(*,
current_item: Dict[str, Any],
initial_status,
current_status,
position_list,
... | 39.406977 | 127 | 0.67483 | from typing import Optional, Dict, List, Any
import pendulum
from src.data_models import CalculatedFieldDescription
from src.data_models import Configuration
def add_calculated_fields(*,
current_item: Dict[str, Any],
initial_status,
curren... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 23 |
8b9952cca475caff15fa17d5d8acbd86cd2a8147 | 5,511 | py | Python | ldsbde/cli/utils.py | linz/lds-bde-loader | 15b5fbc962c4766b73893fa01bdde6ca9a3a6807 | [
"BSD-3-Clause"
] | null | null | null | ldsbde/cli/utils.py | linz/lds-bde-loader | 15b5fbc962c4766b73893fa01bdde6ca9a3a6807 | [
"BSD-3-Clause"
] | 2 | 2019-05-08T07:58:01.000Z | 2019-08-05T08:09:03.000Z | ldsbde/cli/utils.py | linz/lds-bde-loader | 15b5fbc962c4766b73893fa01bdde6ca9a3a6807 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import logging
import logging.config
import os
from functools import update_wrapper, partial
import click
import yaml
from ldsbde.core.job import Job
L = logging.getLogger("ldsbde")
def with_config(func):
""" Populate ctx.config with the parsed contents of the config file """
f = cli... | 30.960674 | 129 | 0.606242 | #!/usr/bin/env python
import datetime
import fcntl
import logging
import logging.config
import os
import re
import tempfile
from functools import update_wrapper, partial
import click
import yaml
from ldsbde.core.bde import BDEProcessor
from ldsbde.core.job import Job
L = logging.getLogger("ldsbde")
def with_confi... | 0 | 1,347 | 0 | 0 | 808 | 1,127 | 0 | -14 | 238 |
189fbe17e638b8ee2c94ea3ad94cad26acb5d4a4 | 49 | py | Python | Python_Eason/BinarySearch/N.61. Search for a Range.py | EaSonic/LintCode | f06ffbabf2548bc815d01a917913b1f0f80e86be | [
"MIT"
] | null | null | null | Python_Eason/BinarySearch/N.61. Search for a Range.py | EaSonic/LintCode | f06ffbabf2548bc815d01a917913b1f0f80e86be | [
"MIT"
] | null | null | null | Python_Eason/BinarySearch/N.61. Search for a Range.py | EaSonic/LintCode | f06ffbabf2548bc815d01a917913b1f0f80e86be | [
"MIT"
] | null | null | null | # Time: O(lgn)
# Space: O(n)
# NOT IMPLEMENTED
| 9.8 | 17 | 0.591837 | # Time: O(lgn)
# Space: O(n)
# NOT IMPLEMENTED
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0003ad58a91b47223cf93d8e59d2f5d8bfe8730f | 3,841 | py | Python | posts/migrations/0006_auto_20210505_2358.py | Kolokol2002/Yatube | a21da14cae159950cfe053b9a66c908db8b9c09a | [
"BSD-3-Clause"
] | null | null | null | posts/migrations/0006_auto_20210505_2358.py | Kolokol2002/Yatube | a21da14cae159950cfe053b9a66c908db8b9c09a | [
"BSD-3-Clause"
] | null | null | null | posts/migrations/0006_auto_20210505_2358.py | Kolokol2002/Yatube | a21da14cae159950cfe053b9a66c908db8b9c09a | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.13 on 2021-05-05 20:58
| 42.208791 | 178 | 0.598802 | # Generated by Django 2.2.13 on 2021-05-05 20:58
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('posts', '0005_remove_po... | 398 | 0 | 0 | 3,461 | 0 | 0 | 0 | 41 | 90 |
bcf91cddd6b1c95d5f32df979ffa65775a8e8eb8 | 1,358 | py | Python | examc/console.py | goto40/examc | 2e18c0285ad990f56f93e4d97a64dbacf1f128a0 | [
"MIT"
] | 4 | 2020-02-05T20:30:52.000Z | 2021-01-09T20:49:04.000Z | examc/console.py | goto40/examc | 2e18c0285ad990f56f93e4d97a64dbacf1f128a0 | [
"MIT"
] | null | null | null | examc/console.py | goto40/examc | 2e18c0285ad990f56f93e4d97a64dbacf1f128a0 | [
"MIT"
] | null | null | null |
if __name__ == "__main__":
examc()
| 37.722222 | 74 | 0.555965 | import argparse
import subprocess
from examc.generator import generate_exam
import sys
def examc():
parser = argparse.ArgumentParser(description='examc')
parser.add_argument('-I', '--in-folder', dest='in_folder',
default=None, type=str,
help='folder where to loo... | 0 | 0 | 0 | 0 | 0 | 1,206 | 0 | -1 | 111 |
56eeb0d0d67f3877089cbe359402f011678274da | 17,410 | py | Python | plot_evaluation.py | JanKalo/RelAlign | 7311f5215a8ce42eb6ffa094772e1de28a3a7c65 | [
"MIT"
] | 4 | 2019-10-28T01:39:36.000Z | 2022-01-07T09:56:58.000Z | plot_evaluation.py | ifis-tu-bs/RelAlign | 7311f5215a8ce42eb6ffa094772e1de28a3a7c65 | [
"MIT"
] | 6 | 2020-01-28T22:18:13.000Z | 2022-02-09T23:31:37.000Z | plot_evaluation.py | JanKalo/RelAlign | 7311f5215a8ce42eb6ffa094772e1de28a3a7c65 | [
"MIT"
] | null | null | null | #!/usr/bin/python -u
# force matplotlib agg backend
import matplotlib
matplotlib.use("agg")
# %%%%%%%%%%%%%%%%%%%%%%%%%%%
# PLOTTING-RELATED TWEAKABLES
# %%%%%%%%%%%%%%%%%%%%%%%%%%%
color_map = None
print_title = None
gaussian_enable = None
gaussian_sigma = None
interpolation_enable = None
interpolation_segments = N... | 46.303191 | 112 | 0.666686 | #!/usr/bin/python -u
# force matplotlib agg backend
import matplotlib
matplotlib.use("agg")
import matplotlib.pyplot as plt
from scipy.ndimage.filters import gaussian_filter1d
from scipy.interpolate import UnivariateSpline
import os
import numpy as np
from argparse import ArgumentParser
# %%%%%%%%%%%%%%%%%%%%%%%%%%%... | 0 | 0 | 0 | 0 | 0 | 16,618 | 0 | 64 | 225 |
9cc3950b1cbba0d83efd347f687c72a08fba06fc | 13,083 | py | Python | reference_harvester.py | mpi2/impc-reference-harvester | bf372df3e1924355c80e7b5c83f07886d1e4c267 | [
"Apache-2.0"
] | null | null | null | reference_harvester.py | mpi2/impc-reference-harvester | bf372df3e1924355c80e7b5c83f07886d1e4c267 | [
"Apache-2.0"
] | null | null | null | reference_harvester.py | mpi2/impc-reference-harvester | bf372df3e1924355c80e7b5c83f07886d1e4c267 | [
"Apache-2.0"
] | 1 | 2018-11-27T11:38:51.000Z | 2018-11-27T11:38:51.000Z |
if __name__ == "__main__":
harvest()
| 40.009174 | 99 | 0.512879 | import csv
from itertools import chain
import click
from joblib import Parallel, delayed
from tqdm import tqdm
from docs.impc_header import header
from utils import (
mousemine_api,
europe_pmc_api,
mongo_access,
config,
nlp,
allele_importer,
)
from utils.solr_access import resolve_allele
@cl... | 0 | 12,701 | 0 | 0 | 0 | 0 | 0 | 137 | 201 |
995fadda9cf2f83c02d4639a849ecf48fc64efba | 695 | py | Python | airbnbClone/api/migrations/0011_auto_20180915_1351.py | seannguyn/airbnb | 17bbf75ece95d8666597650c9e7c269867df8d6e | [
"MIT"
] | 1 | 2019-04-04T00:00:51.000Z | 2019-04-04T00:00:51.000Z | airbnbClone/api/migrations/0011_auto_20180915_1351.py | seannguyn/airbnb | 17bbf75ece95d8666597650c9e7c269867df8d6e | [
"MIT"
] | 9 | 2018-10-06T17:29:29.000Z | 2022-03-11T23:30:05.000Z | airbnbClone/api/migrations/0011_auto_20180915_1351.py | seannguyn/airbnb | 17bbf75ece95d8666597650c9e7c269867df8d6e | [
"MIT"
] | 2 | 2018-08-01T07:54:56.000Z | 2018-09-10T14:38:57.000Z | # Generated by Django 2.1 on 2018-09-15 13:51
| 26.730769 | 110 | 0.628777 | # Generated by Django 2.1 on 2018-09-15 13:51
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('api', '0010_merge_20180915_1350'),
]
operations = [
migrations.AlterField(
model_name... | 0 | 0 | 0 | 538 | 0 | 0 | 0 | 20 | 90 |
5ddeeaddddb9eef688151bbf14d73e58fb13cd7c | 4,029 | py | Python | uberSlipStapler.py | mutekinootoko/UberSlipStapler | 44d8551a2fa1a58361c6bbb9bae7ddba5b801f6a | [
"MIT"
] | 1 | 2018-06-12T14:46:29.000Z | 2018-06-12T14:46:29.000Z | uberSlipStapler.py | mutekinootoko/UberSlipStapler | 44d8551a2fa1a58361c6bbb9bae7ddba5b801f6a | [
"MIT"
] | null | null | null | uberSlipStapler.py | mutekinootoko/UberSlipStapler | 44d8551a2fa1a58361c6bbb9bae7ddba5b801f6a | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# python 2.7
import argparse
from GmailServiceWrap import GmailServiceWrap
import datetime
import pdfkit
import os
from UberSlip import UberSlipType
# FILL THIS
GMAIL_USER_ID = None
def stapleAndPrintSlips(slips, year, month) :
'''
Staple matching slips toghter and print to pdf
Returns... | 31.476563 | 147 | 0.689005 | # -*- encoding: utf-8 -*-
# python 2.7
import argparse
from GmailServiceWrap import GmailServiceWrap
import datetime
import pdfkit
import os
from UberSlip import UberSlipType
# FILL THIS
GMAIL_USER_ID = None
def stapleAndPrintSlips(slips, year, month) :
'''
Staple matching slips toghter and print to pdf
Returns... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
755183268e2eff8a67eecf3d329a1a42d2c5331f | 8,676 | py | Python | openapi_server/models/parameter.py | eugenegesdisc/gmuedr | e8b3e5c7b8d18421d875f0f6f778a37a6d8ec3fd | [
"MIT"
] | null | null | null | openapi_server/models/parameter.py | eugenegesdisc/gmuedr | e8b3e5c7b8d18421d875f0f6f778a37a6d8ec3fd | [
"MIT"
] | null | null | null | openapi_server/models/parameter.py | eugenegesdisc/gmuedr | e8b3e5c7b8d18421d875f0f6f778a37a6d8ec3fd | [
"MIT"
] | null | null | null | # coding: utf-8
| 27.897106 | 308 | 0.621139 | # coding: utf-8
from datetime import date, datetime
from typing import List, Dict, Type
from openapi_server.models.base_model_ import Model
from openapi_server.models.extent import Extent
from openapi_server.models.observed_property import ObservedProperty
from openapi_server.models.one_ofintegerarray import OneOfin... | 0 | 5,275 | 0 | 2,874 | 0 | 0 | 0 | 286 | 224 |
bdf1aa5b8450c10de49fdb8c17b896a36617f6a0 | 12,223 | py | Python | cdc_kafka/metric_reporting/accumulator.py | woodlee/sqlserver-cdc-to-kafka | 602c17432a87c1aaee94dc6c971cde8496314fda | [
"MIT"
] | 10 | 2020-04-09T09:32:54.000Z | 2021-10-04T09:20:59.000Z | cdc_kafka/metric_reporting/accumulator.py | woodlee/sqlserver-cdc-to-kafka | 602c17432a87c1aaee94dc6c971cde8496314fda | [
"MIT"
] | 4 | 2019-10-04T14:15:32.000Z | 2020-05-13T18:48:58.000Z | cdc_kafka/metric_reporting/accumulator.py | woodlee/sqlserver-cdc-to-kafka | 602c17432a87c1aaee94dc6c971cde8496314fda | [
"MIT"
] | 6 | 2019-11-11T18:01:00.000Z | 2021-06-09T09:49:57.000Z |
from .. import constants, sql_queries
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .. import clock_sync
| 54.566964 | 120 | 0.734271 | import datetime
from abc import ABC
from typing import List, Any, Dict
import pyodbc
import sortedcontainers
from .. import constants, sql_queries
from . import metrics
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .. import clock_sync
class AccumulatorAbstract(ABC):
def reset_and_start(self) -> ... | 0 | 0 | 0 | 11,922 | 0 | 0 | 0 | -1 | 179 |
2d3f04af81bcfb13c145b3c402f4f9a84ce56bbc | 1,962 | py | Python | hw6/0603-656377418-Garg.py | kgarg8/cs559-uic-neural-networks | 49ff812b0b6ecc4bbfc5151fb435c3c70c1a63b4 | [
"MIT"
] | null | null | null | hw6/0603-656377418-Garg.py | kgarg8/cs559-uic-neural-networks | 49ff812b0b6ecc4bbfc5151fb435c3c70c1a63b4 | [
"MIT"
] | null | null | null | hw6/0603-656377418-Garg.py | kgarg8/cs559-uic-neural-networks | 49ff812b0b6ecc4bbfc5151fb435c3c70c1a63b4 | [
"MIT"
] | null | null | null | # inference
import torch, torch.nn as nn
from torchvision import datasets, transforms
test_batch_size = 100
saved_model_path = '0602-656377418-Garg.pt'
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
checkpoint = torch.load(saved_model_path, map_location=device)
model ... | 37.730769 | 102 | 0.621305 | # inference
import torch, torch.nn as nn, torch.nn.functional as F, random, numpy as np
from torchvision import datasets, transforms
class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(3, 32, 3, 1)
self.conv2 = nn.Conv2d(32, 64, 3, 1)
s... | 0 | 0 | 0 | 656 | 0 | 0 | 0 | 47 | 23 |
8d55f9fee452aa7f2eb5c3ec22790009ceec7a2e | 721 | py | Python | testes e exercícios/exercicios/script_069.py | LightSnow17/exercicios-Python | 3ac016ce284860f45d71cfb396d33a73ec06c25d | [
"MIT"
] | null | null | null | testes e exercícios/exercicios/script_069.py | LightSnow17/exercicios-Python | 3ac016ce284860f45d71cfb396d33a73ec06c25d | [
"MIT"
] | null | null | null | testes e exercícios/exercicios/script_069.py | LightSnow17/exercicios-Python | 3ac016ce284860f45d71cfb396d33a73ec06c25d | [
"MIT"
] | null | null | null | idade = maior = menor = homens = 0
while True:
sexo = contin = ''
idade = int(input('Digite sua idade: '))
while sexo != 'F' and sexo != 'M':
sexo = str(input('Digite o seu sexo: ')).upper()[0]
if idade >= 18:
maior += 1
if sexo == 'M':
homens += 1
if sexo == 'F':
... | 28.84 | 65 | 0.528433 | idade = maior = menor = homens = 0
while True:
sexo = contin = ''
idade = int(input('Digite sua idade: '))
while sexo != 'F' and sexo != 'M':
sexo = str(input('Digite o seu sexo: ')).upper()[0]
if idade >= 18:
maior += 1
if sexo == 'M':
homens += 1
if sexo == 'F':
... | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
315e5e57119e3e81ad0b29b6a3de77d63fbdbefa | 1,378 | py | Python | widgy/contrib/form_builder/migrations/0005_auto_20180425_2149.py | isopets/django-widgy | de6920b2b25699888eee1cc9b4d28f2aa5905ce1 | [
"Apache-2.0"
] | 168 | 2015-01-04T17:22:45.000Z | 2022-01-28T09:53:35.000Z | widgy/contrib/form_builder/migrations/0005_auto_20180425_2149.py | isopets/django-widgy | de6920b2b25699888eee1cc9b4d28f2aa5905ce1 | [
"Apache-2.0"
] | 82 | 2015-01-09T18:14:32.000Z | 2020-10-08T18:13:07.000Z | widgy/contrib/form_builder/migrations/0005_auto_20180425_2149.py | isopets/django-widgy | de6920b2b25699888eee1cc9b4d28f2aa5905ce1 | [
"Apache-2.0"
] | 61 | 2015-01-09T17:16:51.000Z | 2021-07-03T08:52:27.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-04-25 21:49
from __future__ import unicode_literals
| 29.319149 | 71 | 0.583454 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-04-25 21:49
from __future__ import unicode_literals
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('form_builder', '0004_auto_20171117_2056'),
]
operations = [
mig... | 0 | 0 | 0 | 1,187 | 0 | 0 | 0 | 9 | 68 |
aded1c17b83249f2b48edb140875c6f0042035d0 | 937 | py | Python | test.py | KohMat/carracing-dreamer | 1e46bf0e6bcbb45adc2fef1b9b65f54e2706f77d | [
"MIT"
] | 2 | 2021-01-20T12:49:46.000Z | 2021-12-22T09:14:43.000Z | test.py | KohMat/carracing-dreamer | 1e46bf0e6bcbb45adc2fef1b9b65f54e2706f77d | [
"MIT"
] | 1 | 2021-03-31T01:25:02.000Z | 2021-04-28T09:07:41.000Z | test.py | KohMat/carracing-dreamer | 1e46bf0e6bcbb45adc2fef1b9b65f54e2706f77d | [
"MIT"
] | null | null | null | import torch
from dreamer.carracing import (DenseModel, Env, ObservationDecoder, ObservationEncoder, Policy, Posterior, Prior)
from dreamer import Dreamer
if __name__ == "__main__":
use_cuda = torch.cuda.is_available()
device = torch.device("cuda" if use_cuda else "cpu")
weight_dir = "weight"
env = ... | 20.369565 | 56 | 0.599787 | import torch
from dreamer.carracing import (
DenseModel,
Env,
ObservationDecoder,
ObservationEncoder,
Policy,
Posterior,
Prior,
)
from dreamer import Dreamer
if __name__ == "__main__":
use_cuda = torch.cuda.is_available()
device = torch.device("cuda" if use_cuda else "cpu")
we... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0 |
e949b215365a5d02bea7d59a535d915d7fdebdde | 1,598 | py | Python | setup.py | labdave/kube_api | 891d998b10ce64433bf04bd01a669ac7e295a89f | [
"MIT"
] | null | null | null | setup.py | labdave/kube_api | 891d998b10ce64433bf04bd01a669ac7e295a89f | [
"MIT"
] | null | null | null | setup.py | labdave/kube_api | 891d998b10ce64433bf04bd01a669ac7e295a89f | [
"MIT"
] | null | null | null | """Build Script for setuptools
This build script must be executed outside of the source code directory.
The version number will be generated using the most recent tag and the number of commits on the master branch.
[TAG].[COMMIT_COUNT]
See Also: https://packaging.python.org/tutorials/packaging-projects/
"""
import se... | 34.73913 | 110 | 0.710889 | """Build Script for setuptools
This build script must be executed outside of the source code directory.
The version number will be generated using the most recent tag and the number of commits on the master branch.
[TAG].[COMMIT_COUNT]
See Also: https://packaging.python.org/tutorials/packaging-projects/
"""
import se... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
ebc0a3a7d6c0e0466a04a5e1b3e1116c52242529 | 12,527 | py | Python | sample_extension/train_dnas_cnn.py | xuechendi/nas | ec78fb099faa06ca1d1fd65eab854d17a8b69e1a | [
"MIT"
] | null | null | null | sample_extension/train_dnas_cnn.py | xuechendi/nas | ec78fb099faa06ca1d1fd65eab854d17a8b69e1a | [
"MIT"
] | null | null | null | sample_extension/train_dnas_cnn.py | xuechendi/nas | ec78fb099faa06ca1d1fd65eab854d17a8b69e1a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Ravi Krishna 07/23/21
# Various import statements.
import torch
import torch.nn as nn
from nas_searchmanager import... | 48.366795 | 266 | 0.632554 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Ravi Krishna 07/23/21
# Various import statements.
import torch
import torch.nn as nn
from nas_searchmanager import... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -17 | 44 |
b92a8b61fb9225a297d3be8aff00922456486780 | 4,648 | py | Python | tool/pid_settings/views.py | outech-robotic/code | b57acba3faae606f4d0c3cf210bc0716d7fef4e7 | [
"MIT"
] | 7 | 2020-04-15T16:42:56.000Z | 2021-12-25T10:12:13.000Z | tool/pid_settings/views.py | outech-robotic/code | b57acba3faae606f4d0c3cf210bc0716d7fef4e7 | [
"MIT"
] | 37 | 2020-04-15T15:49:31.000Z | 2022-02-27T03:53:48.000Z | tool/pid_settings/views.py | outech-robotic/code | b57acba3faae606f4d0c3cf210bc0716d7fef4e7 | [
"MIT"
] | null | null | null |
FILE_NAME = 'pid_coef.json'
| 27.832335 | 80 | 0.547762 | import json
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Optional
from flask import request, redirect, render_template, Flask
from flask_socketio import SocketIO
from tool.pid_settings.forms import AllPIDForms, OrderForm
FILE_NAME = 'pid_coef.json'
@dataclass
class PID:
... | 0 | 2,206 | 0 | 658 | 0 | 1,189 | 0 | 111 | 447 |
56dfddada85a4af705d9deee2c180b9388e83cc7 | 6,744 | py | Python | oip/main.py | thatch/objectsinpython | 38bdf439d7d79c4dd58ed8637e44ecb01ad1419a | [
"MIT"
] | null | null | null | oip/main.py | thatch/objectsinpython | 38bdf439d7d79c4dd58ed8637e44ecb01ad1419a | [
"MIT"
] | 1 | 2020-11-27T23:43:10.000Z | 2020-12-01T06:43:50.000Z | oip/main.py | thatch/objectsinpython | 38bdf439d7d79c4dd58ed8637e44ecb01ad1419a | [
"MIT"
] | 2 | 2019-11-23T02:28:24.000Z | 2021-05-02T07:50:30.000Z | # Copyright 2019 John Reese
# Licensed under the MIT license
try:
except ImportError:
pass
NIB = "NIB"
NIN = "NIN"
NIF = "NIF"
DEBOUNCE = 0.02 # how long to wait on up/down changes
REPEAT = object()
INTERVAL = 0.1
| 30.242152 | 88 | 0.514235 | # Copyright 2019 John Reese
# Licensed under the MIT license
import gc
import sys
from sys import stdin, stdout
from time import monotonic
from digitalio import DigitalInOut, Direction, Pull
from supervisor import runtime
from touchio import TouchIn
from .serial import ALL_COMMANDS, VERSION
try:
from typing im... | 0 | 0 | 0 | 6,213 | 0 | 0 | 0 | 80 | 228 |
1da77936819ef87dcc57adbe5ac3a97d72c61576 | 426,133 | py | Python | ion/services/sa/observatory/asset_tracking.py | ooici/coi-services | 43246f46a82e597345507afd7dfc7373cb346afa | [
"BSD-2-Clause"
] | 3 | 2016-09-20T09:50:06.000Z | 2018-08-10T01:41:38.000Z | ion/services/sa/observatory/asset_tracking.py | ooici/coi-services | 43246f46a82e597345507afd7dfc7373cb346afa | [
"BSD-2-Clause"
] | null | null | null | ion/services/sa/observatory/asset_tracking.py | ooici/coi-services | 43246f46a82e597345507afd7dfc7373cb346afa | [
"BSD-2-Clause"
] | 2 | 2016-03-16T22:25:49.000Z | 2016-11-26T14:54:21.000Z | #!/usr/bin/env python
"""Services for asset tracking """
| 49.916013 | 197 | 0.538614 | #!/usr/bin/env python
"""Services for asset tracking """
import csv
from xlwt import Workbook
import binascii
import uuid
import re
from ion.util.xlsparser import XLSParser
from pyon.core import bootstrap
from ooi.logging import log
from pyon.core.exception import NotFound, BadRequest, Inconsistent
from pyon.public ... | 0 | 0 | 0 | 425,596 | 0 | 0 | 0 | 186 | 289 |
9f4613f3b1802727b86aa699389ec5df5f4afd90 | 7,796 | py | Python | samtools-stats/main.py | icgc-argo-workflows/argo-qc-tools | 762fe9f4415673ee5241f725ff5ae726a0077bef | [
"MIT"
] | 1 | 2021-07-23T13:35:18.000Z | 2021-07-23T13:35:18.000Z | samtools-stats/main.py | icgc-argo-qc-wg/argo-qc-tools | 13a3f11ff914832edb292df6d7028d9780441f0c | [
"MIT"
] | 6 | 2021-07-06T22:25:15.000Z | 2021-10-15T15:54:57.000Z | samtools-stats/main.py | icgc-argo-workflows/argo-qc-tools | 762fe9f4415673ee5241f725ff5ae726a0077bef | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2021, ICGC ARGO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the righ... | 36.773585 | 117 | 0.655464 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright (c) 2021, ICGC ARGO
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the righ... | 0 | 0 | 0 | 0 | 0 | 5,494 | 0 | -21 | 203 |
e746ab00dac288e4810f1212d5cd849c6a93bf91 | 929 | py | Python | main.py | sampriti-sahu/C-111 | 40c0d4e348d884657f28927ce7b6f25679913571 | [
"MIT"
] | null | null | null | main.py | sampriti-sahu/C-111 | 40c0d4e348d884657f28927ce7b6f25679913571 | [
"MIT"
] | null | null | null | main.py | sampriti-sahu/C-111 | 40c0d4e348d884657f28927ce7b6f25679913571 | [
"MIT"
] | null | null | null | import plotly.figure_factory as ff
import plotly.graph_objects as go
import statistics
import pandas as pd
df =pd.read_csv("studentMarks.csv")
data = df["Math_score"].tolist()
std_deviation = statistics.stdev(mean_list)
mean = statistics.mean(mean_list)
print("mean of sampling distribution",mean)
... | 28.151515 | 80 | 0.664155 | import plotly.figure_factory as ff
import plotly.graph_objects as go
import statistics
import random
import csv
import pandas as pd
df =pd.read_csv("studentMarks.csv")
data = df["Math_score"].tolist()
def random_set_of_mean(counter):
dataset=[]
for i in range(0,counter):
random_i... | 0 | 0 | 0 | 0 | 0 | 397 | 0 | -19 | 71 |
3d03889c1a5fa0285757568019f95102b9007ee1 | 287 | py | Python | rl_coach/__init__.py | JohnnyPeng18/coach | 1ee9e10747c535b387a00c946efa220efd114d47 | [
"Apache-2.0"
] | 1,960 | 2017-10-19T10:31:24.000Z | 2020-11-07T18:19:23.000Z | rl_coach/__init__.py | Jimmy-INL/coach | 59e08034c685c2b9c9d649ee0f00a90b8b6eed94 | [
"Apache-2.0"
] | 349 | 2017-10-21T17:17:18.000Z | 2020-10-17T13:39:56.000Z | rl_coach/__init__.py | Jimmy-INL/coach | 59e08034c685c2b9c9d649ee0f00a90b8b6eed94 | [
"Apache-2.0"
] | 428 | 2017-10-21T01:32:58.000Z | 2020-11-07T13:49:49.000Z | # This gets rid of NumPy FutureWarnings that occur at TF import
import warnings
warnings.filterwarnings('ignore',category=FutureWarning)
# This gets rid of TF 2.0 related deprecation warnings
import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
| 35.875 | 64 | 0.797909 | # This gets rid of NumPy FutureWarnings that occur at TF import
import warnings
warnings.filterwarnings('ignore',category=FutureWarning)
# This gets rid of TF 2.0 related deprecation warnings
import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a1941634b1e3b619419b5163086adbc1fd9ae4ff | 1,923 | py | Python | qctests/ICDC_aqc_07_spike_check.py | BillMills/AutoQC | cb56fa5bb2115170ec204edd84e2d69ce84be820 | [
"MIT"
] | 17 | 2015-01-31T00:35:58.000Z | 2020-10-26T19:01:46.000Z | qctests/ICDC_aqc_07_spike_check.py | castelao/AutoQC | eb85422c1a6a5ff965a1ef96b3cb29240a66b506 | [
"MIT"
] | 163 | 2015-01-21T03:44:42.000Z | 2022-01-09T22:03:12.000Z | qctests/ICDC_aqc_07_spike_check.py | BillMills/AutoQC | cb56fa5bb2115170ec204edd84e2d69ce84be820 | [
"MIT"
] | 11 | 2015-06-04T14:32:22.000Z | 2021-04-11T05:18:09.000Z | '''
Python version of check_aqc_07_spike_check.f.
Details of the original code are:
c/ DATE: JANUARY 25 2016
c/ AUTHOR: Viktor Gouretski
c/ AUTHOR'S AFFILIATION: Integrated Climate Data Center, University of Hamburg, Hamburg, Germany
c/ PROJECT: International Quality Controlled Ocean DataBase (IQuOD... | 24.974026 | 98 | 0.624025 | '''
Python version of check_aqc_07_spike_check.f.
Details of the original code are:
c/ DATE: JANUARY 25 2016
c/ AUTHOR: Viktor Gouretski
c/ AUTHOR'S AFFILIATION: Integrated Climate Data Center, University of Hamburg, Hamburg, Germany
c/ PROJECT: International Quality Controlled Ocean DataBase (IQuOD... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c6cc095020fea26e0f1e59d0873b950b957caad4 | 10,334 | py | Python | src/modules/tcp/http.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 46 | 2020-04-18T16:42:59.000Z | 2022-01-31T22:08:52.000Z | src/modules/tcp/http.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | null | null | null | src/modules/tcp/http.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 11 | 2020-04-23T12:46:18.000Z | 2022-02-04T12:53:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 25.143552 | 82 | 0.539481 | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 0 | 8,052 | 0 | 694 | 0 | 0 | 0 | 36 | 111 |
f45e87112539a279d5ac542e9f9f9468881f4c89 | 2,047 | py | Python | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_htmllib.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_htmllib.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_htmllib.py | CEOALT1/RefindPlusUDK | 116b957ad735f96fbb6d80a0ba582046960ba164 | [
"BSD-2-Clause"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z |
from test import test_support
htmllib = test_support.import_module('htmllib', deprecated=True)
if __name__ == "__main__":
test_main()
| 29.242857 | 71 | 0.520274 | import formatter
import unittest
from test import test_support
htmllib = test_support.import_module('htmllib', deprecated=True)
class AnchorCollector(htmllib.HTMLParser):
def __init__(self, *args, **kw):
self.__anchors = []
htmllib.HTMLParser.__init__(self, *args, **kw)
def get_a... | 0 | 0 | 0 | 1,714 | 0 | 46 | 0 | -11 | 146 |
a25688c0aa440366b595a5efbcad4905298542ba | 690 | py | Python | networkapi/requisicaovips/admin/requisicao_vip.py | vinicius-marinho/GloboNetworkAPI | 94651d3b4dd180769bc40ec966814f3427ccfb5b | [
"Apache-2.0"
] | 73 | 2015-04-13T17:56:11.000Z | 2022-03-24T06:13:07.000Z | networkapi/requisicaovips/admin/requisicao_vip.py | leopoldomauricio/GloboNetworkAPI | 3b5b2e336d9eb53b2c113977bfe466b23a50aa29 | [
"Apache-2.0"
] | 99 | 2015-04-03T01:04:46.000Z | 2021-10-03T23:24:48.000Z | networkapi/requisicaovips/admin/requisicao_vip.py | shildenbrand/GloboNetworkAPI | 515d5e961456cee657c08c275faa1b69b7452719 | [
"Apache-2.0"
] | 64 | 2015-08-05T21:26:29.000Z | 2022-03-22T01:06:28.000Z | # -*- coding: utf-8 -*-
| 31.363636 | 75 | 0.67971 | # -*- coding: utf-8 -*-
from django.contrib import admin
class RequisicaoVipsAdmin(admin.ModelAdmin):
search_fields = ['id', 'ip']
list_display = ['id', 'validado',
'vip_criado', 'get_ip', 'get_healthcheck']
list_filter = ('validado', 'vip_criado')
def get_ip(self, obj):
r... | 0 | 0 | 0 | 609 | 0 | 0 | 0 | 11 | 45 |
be94de7d490f9012b722c853250e29638d602f98 | 30,967 | py | Python | TEST_PROJET-1.0-pc/renpy/display/swdraw.py | Dune0lyn/otome | e365b474e7df3f76ccc0853fd1665f6529a59304 | [
"CC0-1.0"
] | null | null | null | TEST_PROJET-1.0-pc/renpy/display/swdraw.py | Dune0lyn/otome | e365b474e7df3f76ccc0853fd1665f6529a59304 | [
"CC0-1.0"
] | null | null | null | TEST_PROJET-1.0-pc/renpy/display/swdraw.py | Dune0lyn/otome | e365b474e7df3f76ccc0853fd1665f6529a59304 | [
"CC0-1.0"
] | null | null | null | # Copyright 2004-2019 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | 27.092738 | 125 | 0.541706 | # Copyright 2004-2019 Tom Rothamel <pytom@bishoujo.us>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, m... | 0 | 0 | 0 | 17,414 | 0 | 4,129 | 0 | -32 | 158 |
5d94806318979548f91fdefe056058fbc3dadaf7 | 11,654 | py | Python | tests/platform_tests/thermal_control_test_helper.py | macikgozwa/sonic-mgmt | 86338be8b2e55fd03d4913037d0e641e443762b0 | [
"Apache-2.0"
] | null | null | null | tests/platform_tests/thermal_control_test_helper.py | macikgozwa/sonic-mgmt | 86338be8b2e55fd03d4913037d0e641e443762b0 | [
"Apache-2.0"
] | 1 | 2020-11-26T14:24:02.000Z | 2020-11-26T14:24:02.000Z | tests/platform_tests/thermal_control_test_helper.py | macikgozwa/sonic-mgmt | 86338be8b2e55fd03d4913037d0e641e443762b0 | [
"Apache-2.0"
] | null | null | null | import logging
import time
import os
from tests.common.config_reload import config_reload
DUT_THERMAL_POLICY_FILE = '/usr/share/sonic/device/{}/thermal_policy.json'
DUT_THERMAL_POLICY_BACKUP_FILE = '/usr/share/sonic/device/{}/thermal_policy.json.bak'
BASE_DIR = os.path.dirname(os.path.realpath(__file__))
FILES_DIR = o... | 34.78806 | 115 | 0.656942 | import logging
import time
import os
import pytest
from tests.common.utilities import wait_until
from tests.common.config_reload import config_reload
from tests.common.reboot import reboot
DUT_THERMAL_POLICY_FILE = '/usr/share/sonic/device/{}/thermal_policy.json'
DUT_THERMAL_POLICY_BACKUP_FILE = '/usr/share/sonic/de... | 0 | 1,865 | 0 | 5,465 | 0 | 95 | 0 | 33 | 232 |
73d4ffedaf562eeb938ae7496f5f3b046e5e22ce | 12,171 | py | Python | tensor2tensor/utils/diet.py | kpe/tensor2tensor | 453c473030c354a3d9a4c27b12bcec8942334bf4 | [
"Apache-2.0"
] | 2 | 2019-01-03T17:14:51.000Z | 2019-01-09T08:41:50.000Z | tensor2tensor/utils/diet.py | kpe/tensor2tensor | 453c473030c354a3d9a4c27b12bcec8942334bf4 | [
"Apache-2.0"
] | 2 | 2019-03-27T22:12:16.000Z | 2019-03-27T22:27:07.000Z | tensor2tensor/utils/diet.py | kpe/tensor2tensor | 453c473030c354a3d9a4c27b12bcec8942334bf4 | [
"Apache-2.0"
] | 2 | 2018-08-24T11:13:17.000Z | 2018-11-01T07:00:33.000Z | # coding=utf-8
# Copyright 2019 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 33.436813 | 80 | 0.681867 | # coding=utf-8
# Copyright 2019 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 0 | 601 | 0 | 5,578 | 0 | 234 | 0 | 0 | 144 |
51e32524b57b41598613196baaa6828fcb2d8603 | 12,863 | py | Python | segmentation_pipeline.py | christinab12/bone-cement-injection-planning | d45f0b9a1bf355b7e247b3c6fc2d2e1d9af160ef | [
"MIT"
] | 4 | 2021-06-26T19:59:39.000Z | 2022-01-20T05:31:46.000Z | segmentation_pipeline.py | christinab12/bone-cement-injection-planning | d45f0b9a1bf355b7e247b3c6fc2d2e1d9af160ef | [
"MIT"
] | null | null | null | segmentation_pipeline.py | christinab12/bone-cement-injection-planning | d45f0b9a1bf355b7e247b3c6fc2d2e1d9af160ef | [
"MIT"
] | 5 | 2021-06-26T20:47:55.000Z | 2022-02-08T14:42:30.000Z | import argparse
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Spine Segmentation Pipeline')
parser.add_argument('--model_dir', default='models')
parser.add_argument('--pat_dir', default='sub-kypho005/post_fracture/ct.nii.gz')
parser.add_argument('--save_dir', default='sub-... | 41.493548 | 122 | 0.606157 | import os
import torch
import argparse
import numpy as np
import nibabel as nib
import utils_segmentation as utils
from matplotlib import pyplot as plt
from dipy.align.reslice import reslice
from nets.localization_network import LocalizationNet
from nets.labelling_network import LabellingNet
from nets.segmentation_netw... | 0 | 287 | 0 | 11,644 | 0 | 0 | 0 | 121 | 265 |
3e7a59ea11559b072541617753bd0e3fa5eade2b | 855 | py | Python | web_console_v2/api/fedlearner_webconsole/utils/tars.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 772 | 2020-01-21T13:59:42.000Z | 2022-03-30T08:20:16.000Z | web_console_v2/api/fedlearner_webconsole/utils/tars.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 126 | 2020-03-03T07:54:39.000Z | 2022-03-08T23:24:03.000Z | web_console_v2/api/fedlearner_webconsole/utils/tars.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 198 | 2020-01-22T02:16:17.000Z | 2022-03-31T01:13:05.000Z | # Copyright 2021 The FedLearner Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.884615 | 74 | 0.740351 | # Copyright 2021 The FedLearner Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 0 | 173 | 0 | -8 | 0 | 0 | 0 | -7 | 71 |
35eb86a707b2251b457a821d11b36415bf6b9013 | 19,909 | py | Python | loader.py | onurgu/ner-tagger-dynet | 4daaf10189bc33a4f7c10448f9f26ee1bfdeed65 | [
"MIT"
] | 21 | 2017-12-26T12:53:03.000Z | 2021-01-07T16:43:08.000Z | loader.py | onurgu/ner-tagger-dynet | 4daaf10189bc33a4f7c10448f9f26ee1bfdeed65 | [
"MIT"
] | 2 | 2018-05-22T23:22:51.000Z | 2018-06-17T19:04:27.000Z | loader.py | onurgu/ner-tagger-dynet | 4daaf10189bc33a4f7c10448f9f26ee1bfdeed65 | [
"MIT"
] | 6 | 2018-01-17T10:32:30.000Z | 2019-12-12T06:36:02.000Z | # coding=utf-8
import os
import re
import codecs
from utils import create_dico, create_mapping, zero_digits
from utils import iob2, iob_iobes
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
import numpy as np
def load_sentences(path, lower, zeros):
"""
Load senten... | 39.897796 | 162 | 0.571802 | # coding=utf-8
import os
import re
import codecs
from utils import create_dico, create_mapping, zero_digits
from utils import iob2, iob_iobes
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
import numpy as np
def load_sentences(path, lower, zeros):
"""
Load senten... | 24 | 0 | 0 | 0 | 0 | 6,522 | 0 | 0 | 311 |
7ba2dec31bf9f95d635e5e4e9c89d988b48ee5c8 | 4,907 | py | Python | util/fuzz/nonrouting.py | mmicko/prjoxide | eda3e796719f1961dc188f921c222911f63789bb | [
"0BSD"
] | 80 | 2019-12-10T21:06:12.000Z | 2021-02-06T09:12:37.000Z | util/fuzz/nonrouting.py | mmicko/prjoxide | eda3e796719f1961dc188f921c222911f63789bb | [
"0BSD"
] | 13 | 2021-03-18T12:59:25.000Z | 2022-03-30T11:35:51.000Z | util/fuzz/nonrouting.py | mmicko/prjoxide | eda3e796719f1961dc188f921c222911f63789bb | [
"0BSD"
] | 4 | 2020-10-04T22:23:15.000Z | 2021-01-29T21:51:25.000Z | """
Utilities for fuzzing non-routing configuration. This is the counterpart to interconnect.py
"""
import threading
import libpyprjoxide
import fuzzconfig
def fuzz_word_setting(config, name, length, get_sv_substs, desc=""):
"""
Fuzz a multi-bit setting, such as LUT initialisation
:param config: FuzzConf... | 49.07 | 141 | 0.705727 | """
Utilities for fuzzing non-routing configuration. This is the counterpart to interconnect.py
"""
import threading
import tiles
import libpyprjoxide
import fuzzconfig
def fuzz_word_setting(config, name, length, get_sv_substs, desc=""):
"""
Fuzz a multi-bit setting, such as LUT initialisation
:param con... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -9 | 22 |
19ac869f428d231247be7deab59d6622a7143096 | 137 | py | Python | dao/sessionDao.py | zhuxiyulu/sugar | c780618aa6493779cc869e984f8e38be9314e1b8 | [
"Apache-2.0"
] | 2 | 2018-06-14T15:28:10.000Z | 2019-01-11T07:11:32.000Z | dao/sessionDao.py | zhuxiyulu/sugar | c780618aa6493779cc869e984f8e38be9314e1b8 | [
"Apache-2.0"
] | null | null | null | dao/sessionDao.py | zhuxiyulu/sugar | c780618aa6493779cc869e984f8e38be9314e1b8 | [
"Apache-2.0"
] | null | null | null | import redis
pool = redis.ConnectionPool(host='127.0.0.1', port=6379)
redisCon = redis.Redis(connection_pool=pool, charset='utf-8')
| 27.4 | 62 | 0.729927 | import redis
pool = redis.ConnectionPool(host='127.0.0.1', port=6379)
redisCon = redis.Redis(connection_pool=pool, charset='utf-8')
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8849e217bff5835a7f377de368307e2daede7ee7 | 1,613 | py | Python | pymote2.1/pymote/examples/graphs.py | chinmaydd/RouteSense | a2088d0151be7c76d269d2c5466750423fbe9e02 | [
"MIT"
] | 17 | 2015-09-15T11:07:27.000Z | 2022-03-21T23:27:27.000Z | pymote2.1/pymote/examples/graphs.py | chinmaydd/RouteSense | a2088d0151be7c76d269d2c5466750423fbe9e02 | [
"MIT"
] | 1 | 2019-04-13T11:09:05.000Z | 2019-04-13T11:09:05.000Z | pymote2.1/pymote/examples/graphs.py | chinmaydd/RouteSense | a2088d0151be7c76d269d2c5466750423fbe9e02 | [
"MIT"
] | 13 | 2016-03-26T01:29:17.000Z | 2022-03-17T02:32:00.000Z | from networkx.generators.classic import star_graph, balanced_tree, barbell_graph
from networkx.generators.social import florentine_families_graph
from networkx import Graph, is_connected, draw
from networkx.algorithms.operators import union_all, disjoint_union_all
try:
from matplotlib import pyplot as plt... | 36.659091 | 84 | 0.790453 | from pymote import *
from networkx.generators.classic import star_graph,balanced_tree,barbell_graph
from networkx.generators.social import florentine_families_graph
from networkx import Graph, is_connected,draw
from networkx.algorithms.operators import union_all, disjoint_union_all
try:
from matplotlib im... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -4 | 22 |
22825ebdb55057564a09add55055abb6b20c1113 | 68,152 | py | Python | trace/google/cloud/trace_v2/proto/trace_pb2.py | hzyi-google/google-cloud-python | aa3c3ca303b385a6b118204ce91fa803c1d001b9 | [
"Apache-2.0"
] | 1 | 2019-12-09T11:40:28.000Z | 2019-12-09T11:40:28.000Z | trace/google/cloud/trace_v2/proto/trace_pb2.py | hzyi-google/google-cloud-python | aa3c3ca303b385a6b118204ce91fa803c1d001b9 | [
"Apache-2.0"
] | 3 | 2019-06-20T05:20:15.000Z | 2019-06-27T05:01:16.000Z | trace/google/cloud/trace_v2/proto/trace_pb2.py | hzyi-google/google-cloud-python | aa3c3ca303b385a6b118204ce91fa803c1d001b9 | [
"Apache-2.0"
] | 1 | 2021-12-27T05:31:45.000Z | 2021-12-27T05:31:45.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/devtools/cloudtrace_v2/proto/trace.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.protobuf import mes... | 35.681675 | 5,004 | 0.615374 | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/devtools/cloudtrace_v2/proto/trace.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.protobuf import mes... | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a2caca4bd7ba80b43cc831c8a34b54d6a8ec7dd3 | 356 | py | Python | custom_components/solis_pv_inverter/models.py | jansaris/solis-pv-inverter | 238e653fc2057ea0c2362cb0f542bb2bbca635fd | [
"MIT"
] | null | null | null | custom_components/solis_pv_inverter/models.py | jansaris/solis-pv-inverter | 238e653fc2057ea0c2362cb0f542bb2bbca635fd | [
"MIT"
] | null | null | null | custom_components/solis_pv_inverter/models.py | jansaris/solis-pv-inverter | 238e653fc2057ea0c2362cb0f542bb2bbca635fd | [
"MIT"
] | null | null | null | """Models for the Solis PV Inverter integration."""
from __future__ import annotations
| 25.428571 | 67 | 0.800562 | """Models for the Solis PV Inverter integration."""
from __future__ import annotations
from dataclasses import dataclass
from homeassistant.components.sensor import SensorEntityDescription
@dataclass
class SolisSensorEntityDescription(SensorEntityDescription):
"""Sensor entity description for Solis PV Inverter.... | 0 | 141 | 0 | 0 | 0 | 0 | 0 | 58 | 69 |
6b40deda36d709f528e8744658227cc9953c90dd | 7,888 | py | Python | yellowbrick/datasets/path.py | mrtrkmn/yellowbrick | efd942063455f1c148c3c691d8100d726b09ac90 | [
"Apache-2.0"
] | 3,662 | 2016-05-19T19:16:28.000Z | 2022-03-30T00:25:19.000Z | yellowbrick/datasets/path.py | mrtrkmn/yellowbrick | efd942063455f1c148c3c691d8100d726b09ac90 | [
"Apache-2.0"
] | 1,047 | 2016-05-18T15:20:59.000Z | 2022-03-30T16:12:49.000Z | yellowbrick/datasets/path.py | mrtrkmn/yellowbrick | efd942063455f1c148c3c691d8100d726b09ac90 | [
"Apache-2.0"
] | 602 | 2016-05-18T15:02:35.000Z | 2022-03-27T16:57:11.000Z | # yellowbrick.datasets.path
# Helper functions for looking up dataset paths.
#
# Author: Benjamin Bengfort
# Created: Thu Jul 26 14:10:51 2018 -0400
#
# Copyright (C) 2018 The scikit-yb developers
# For license information, see LICENSE.txt
#
# ID: path.py [7082742] benjamin@bengfort.com $
"""
Helper functions for loo... | 32.73029 | 87 | 0.634635 | # yellowbrick.datasets.path
# Helper functions for looking up dataset paths.
#
# Author: Benjamin Bengfort
# Created: Thu Jul 26 14:10:51 2018 -0400
#
# Copyright (C) 2018 The scikit-yb developers
# For license information, see LICENSE.txt
#
# ID: path.py [7082742] benjamin@bengfort.com $
"""
Helper functions for loo... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6079c25c8c24dbea693f8edb5584813420a79440 | 4,305 | py | Python | src/w3aio.py | mimirblockchainsolutions/w3aio | ec5880a53970bf3946c5feaa2c20119b48fb77d1 | [
"MIT"
] | 3 | 2018-10-18T18:43:31.000Z | 2020-10-01T23:45:20.000Z | src/w3aio.py | mimirblockchainsolutions/w3aio | ec5880a53970bf3946c5feaa2c20119b48fb77d1 | [
"MIT"
] | null | null | null | src/w3aio.py | mimirblockchainsolutions/w3aio | ec5880a53970bf3946c5feaa2c20119b48fb77d1 | [
"MIT"
] | null | null | null | import logging
from functools import partial
log = logging.getLogger(__name__)
combine = lambda L: { k: v for d in L for k, v in d.items() }
pipe = lambda transport,api: combine([{method:partial(pipeline,transport,getattr(api,method))} for method in dir(api) if method[0] != '_'])
| 28.892617 | 179 | 0.674797 | from .api import (Eth, Personal)
from .callablecontract import CallableContract
from .filter import Filter
from .hextools import HexTools
from .keccak import keccak
from .poller import Poller
from .soliditykeccak import solidityKeccak
from .structs import Structs
from .types import Types
from .w3json import w3json
from... | 0 | 295 | 1,163 | 2,079 | 0 | 0 | 0 | 126 | 355 |
a702d629b27b4e329de80d5a1d92f4670a582e0f | 3,471 | py | Python | rev1.py | killua4564/AIS3-2018-CTF-final | 50a111b2b36ef649c5c7bcdd5a6535a786deb44b | [
"MIT"
] | 1 | 2018-08-06T03:52:14.000Z | 2018-08-06T03:52:14.000Z | rev1.py | killua4564/AIS3-2018-CTF-final | 50a111b2b36ef649c5c7bcdd5a6535a786deb44b | [
"MIT"
] | null | null | null | rev1.py | killua4564/AIS3-2018-CTF-final | 50a111b2b36ef649c5c7bcdd5a6535a786deb44b | [
"MIT"
] | null | null | null | import hashlib
v19 = [0] * 28
B = [0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x41, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x49, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x53, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x33, 0x59, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x7B, 0x59, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x... | 70.836735 | 388 | 0.630078 | import hashlib
v19 = [0] * 28
B = [0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x41, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x49, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x53, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x45, 0x33, 0x59, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x7B, 0x59, 0x59, 0x59, 0x59, 0x45, 0x45, 0x45, 0x... | 0 | 0 | 0 | 0 | 0 | 49 | 0 | 0 | 23 |
5fa912777a18f382d012a599ad305a7f96e7ea86 | 3,764 | py | Python | lib/googlecloudsdk/command_lib/storage/tasks/task.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 2 | 2019-11-10T09:17:07.000Z | 2019-12-18T13:44:08.000Z | lib/googlecloudsdk/command_lib/storage/tasks/task.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | null | null | null | lib/googlecloudsdk/command_lib/storage/tasks/task.py | google-cloud-sdk-unofficial/google-cloud-sdk | 2a48a04df14be46c8745050f98768e30474a1aac | [
"Apache-2.0"
] | 1 | 2020-07-25T01:40:19.000Z | 2020-07-25T01:40:19.000Z | # -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 31.107438 | 80 | 0.729543 | # -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 0 | 288 | 0 | 1,008 | 0 | 0 | 0 | -4 | 137 |
88ffc9a85f91de07346077f0878d8fffca94e3ea | 809 | py | Python | pokerscores/api/urls.py | dannytrigo/django-pokerscores | 657da3dcf4aec59387ccfdad404536c5a0f4e9e1 | [
"Apache-2.0"
] | null | null | null | pokerscores/api/urls.py | dannytrigo/django-pokerscores | 657da3dcf4aec59387ccfdad404536c5a0f4e9e1 | [
"Apache-2.0"
] | null | null | null | pokerscores/api/urls.py | dannytrigo/django-pokerscores | 657da3dcf4aec59387ccfdad404536c5a0f4e9e1 | [
"Apache-2.0"
] | 1 | 2020-01-12T18:19:03.000Z | 2020-01-12T18:19:03.000Z | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^login/', views.login, name='login'),
url(r'^logout/', views.logout, name='logout'),
url(r'^avatar/(?P<profile_id>[0-9]+)/$', views.avatar, name='avatar'),
url(r'^leagues/$', ... | 36.772727 | 85 | 0.614339 | from django.conf.urls import url
from . import views
from rest_framework import routers
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^login/', views.login, name='login'),
url(r'^logout/', views.logout, name='logout'),
url(r'^avatar/(?P<profile_id>[0-9]+)/$', views.avatar, name... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 23 |
ddd129b813bd242fa64178c10c08b11282f846cb | 5,015 | py | Python | hack_manager.py | MinN-XI/Hack-Manager | e9ae676e8a1a199d9e12a937efad3cf1d8c2b939 | [
"MIT"
] | 1 | 2021-01-11T10:39:35.000Z | 2021-01-11T10:39:35.000Z | hack_manager.py | MinN-XI/Hack-Manager | e9ae676e8a1a199d9e12a937efad3cf1d8c2b939 | [
"MIT"
] | 1 | 2021-01-11T12:08:11.000Z | 2021-02-03T04:48:21.000Z | hack_manager.py | MinN-XI/Hack-Manager | e9ae676e8a1a199d9e12a937efad3cf1d8c2b939 | [
"MIT"
] | 1 | 2021-02-03T04:49:36.000Z | 2021-02-03T04:49:36.000Z | #!/usr/bin/env python3
# GBA FE Hack Manager by MinN
#
# To use: run this once to create a rom folder for your hack roms and a patch folder for your patches
# Put FE6_clean.gba FE7_clean.gba FE8_clean.gba FE7J_clean.gba FE8J_clean.gba in the parent folder as patching targets
# This tool will not verify your FE roms' ch... | 41.106557 | 118 | 0.588036 | #!/usr/bin/env python3
# GBA FE Hack Manager by MinN
#
# To use: run this once to create a rom folder for your hack roms and a patch folder for your patches
# Put FE6_clean.gba FE7_clean.gba FE8_clean.gba FE7J_clean.gba FE8J_clean.gba in the parent folder as patching targets
# This tool will not verify your FE roms' ch... | 0 | 0 | 0 | 0 | 0 | 4,075 | 0 | -34 | 222 |
8f8374aa4ed28ef41d1936dd762c76ea578c062e | 99 | py | Python | src/a03pakiety/pakiet/trzeci/__init__.py | tborzyszkowski/PSPI_Wstep_do_programowania | 4aca4dfe5a8daed19d7852dd29b6cfa57df8f51c | [
"MIT"
] | null | null | null | src/a03pakiety/pakiet/trzeci/__init__.py | tborzyszkowski/PSPI_Wstep_do_programowania | 4aca4dfe5a8daed19d7852dd29b6cfa57df8f51c | [
"MIT"
] | null | null | null | src/a03pakiety/pakiet/trzeci/__init__.py | tborzyszkowski/PSPI_Wstep_do_programowania | 4aca4dfe5a8daed19d7852dd29b6cfa57df8f51c | [
"MIT"
] | null | null | null | # __all__ = ["trzy_1", "trzy_2", "trzy_3"]
__all__ = ["trzy_1"]
print ("Init modulu ", __name__)
| 16.5 | 42 | 0.616162 | # __all__ = ["trzy_1", "trzy_2", "trzy_3"]
__all__ = ["trzy_1"]
print ("Init modulu ", __name__)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8c7608012816de5893736ac9dcb804e06fe58cee | 564 | py | Python | mwtypes/files/p7z.py | mediawiki-utilities/python-mwtypes | b9d3588f30c127958234c1cb71686e128b17618a | [
"MIT"
] | 1 | 2016-01-07T09:21:25.000Z | 2016-01-07T09:21:25.000Z | mwtypes/files/p7z.py | halfak/python-mwtypes | b9d3588f30c127958234c1cb71686e128b17618a | [
"MIT"
] | 3 | 2016-01-11T15:52:04.000Z | 2020-01-03T19:20:41.000Z | mwtypes/files/p7z.py | halfak/python-mwtypes | b9d3588f30c127958234c1cb71686e128b17618a | [
"MIT"
] | 3 | 2016-01-06T19:07:57.000Z | 2019-01-15T11:00:07.000Z | import io
import os
import subprocess
file_open = open
def reader(path):
"""
Turns a path to a dump file into a file-like object of (decompressed)
XML data assuming that '7z' is installed and will know what to do.
:Parameters:
path : `str`
the path to the dump file to read
""... | 23.5 | 73 | 0.583333 | import io
import os
import subprocess
file_open = open
def reader(path):
"""
Turns a path to a dump file into a file-like object of (decompressed)
XML data assuming that '7z' is installed and will know what to do.
:Parameters:
path : `str`
the path to the dump file to read
""... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7f7d22aa5827c7608bd0fa4b693e35352bca57b4 | 3,066 | py | Python | python/cont_record.py | neo164/ML | 671a966f92b378fde4e25a2cbfbfbd79567b1b31 | [
"BSD-2-Clause"
] | 54 | 2016-08-23T06:33:23.000Z | 2018-11-02T01:31:24.000Z | python/cont_record.py | neo164/ML | 671a966f92b378fde4e25a2cbfbfbd79567b1b31 | [
"BSD-2-Clause"
] | null | null | null | python/cont_record.py | neo164/ML | 671a966f92b378fde4e25a2cbfbfbd79567b1b31 | [
"BSD-2-Clause"
] | 15 | 2016-06-22T11:47:50.000Z | 2019-06-28T23:17:28.000Z | # import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
import collections, operator
import time
import cv2
import csv
import numpy
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
camera.resolution = (640, 480)
camera.framerate = 32... | 31.285714 | 105 | 0.643183 | # import the necessary packages
from picamera.array import PiRGBArray
from picamera import PiCamera
import collections, operator
import time
import json
import cv2
import csv
import numpy
# initialize the camera and grab a reference to the raw camera capture
camera = PiCamera()
camera.resolution = (640, 480)
camera.fr... | 0 | 0 | 0 | 0 | 0 | 97 | 0 | -10 | 45 |
2792b0a9fb4e2188fea0b5fa431e014ea594954f | 524 | py | Python | python_tools/plot_gps.py | AbnerCSZ/EKF2 | 970ae5e1f15aab13e651a25721b0b7c455bda117 | [
"BSD-3-Clause"
] | 4 | 2019-01-29T11:51:43.000Z | 2020-08-04T08:49:35.000Z | python_tools/plot_gps.py | AbnerCSZ/EKF2 | 970ae5e1f15aab13e651a25721b0b7c455bda117 | [
"BSD-3-Clause"
] | null | null | null | python_tools/plot_gps.py | AbnerCSZ/EKF2 | 970ae5e1f15aab13e651a25721b0b7c455bda117 | [
"BSD-3-Clause"
] | 2 | 2020-06-28T23:58:11.000Z | 2020-10-02T02:15:16.000Z | import matplotlib.pyplot as plt2
import numpy as np4
import matplotlib as mpl
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = 'NSimSun,Times New Roman'
(t, a, b, c, d, e, lat, lon, hgt, f, g, h, i, j) = np4.loadtxt('/home/abner/UFO/ecl/EKF/build/data/gps_data.txt', unpack=True)
... | 27.578947 | 127 | 0.681298 | import matplotlib.pyplot as plt2
import numpy as np4
import matplotlib as mpl
import matplotlib as mpl2
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = 'NSimSun,Times New Roman'
(t, a, b, c, d, e, lat, lon, hgt, f, g, h, i, j) = np4.loadtxt('/home/abner/UFO/ecl/EKF/build/data/gps_da... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 23 |
45be475507c7a2a5f3b1b33544f27e569d1b8110 | 9,180 | py | Python | aRibeiro/opengl/GLTexture.py | A-Ribeiro/ARibeiroPythonFramework | e81c5499d642560264c2f1d5a5194aded9c3b45a | [
"MIT"
] | 1 | 2021-07-22T16:26:56.000Z | 2021-07-22T16:26:56.000Z | aRibeiro/opengl/GLTexture.py | A-Ribeiro/ARibeiroPythonFramework | e81c5499d642560264c2f1d5a5194aded9c3b45a | [
"MIT"
] | null | null | null | aRibeiro/opengl/GLTexture.py | A-Ribeiro/ARibeiroPythonFramework | e81c5499d642560264c2f1d5a5194aded9c3b45a | [
"MIT"
] | 1 | 2021-07-27T13:13:47.000Z | 2021-07-27T13:13:47.000Z | #
# For this is how God loved the world:<br/>
# he gave his only Son, so that everyone<br/>
# who believes in him may not perish<br/>
# but may have eternal life.
#
# John 3:16
#
| 48.315789 | 154 | 0.672004 | #
# For this is how God loved the world:<br/>
# he gave his only Son, so that everyone<br/>
# who believes in him may not perish<br/>
# but may have eternal life.
#
# John 3:16
#
from OpenGL.GL import *
import OpenGL.extensions
import numpy as np
from aRibeiro.window import *
class GLTexture:
def __init__(self, w... | 0 | 0 | 0 | 8,879 | 0 | 0 | 0 | 10 | 111 |
fc6e494757bdc01246a93972b41f2a0c3a2e7634 | 413 | py | Python | videos/migrations/0003_auto_20191223_2030.py | drewvpham/xclude.com | 103e89e2326c4c6fbfab819c43bc4e4634913bc9 | [
"MIT"
] | null | null | null | videos/migrations/0003_auto_20191223_2030.py | drewvpham/xclude.com | 103e89e2326c4c6fbfab819c43bc4e4634913bc9 | [
"MIT"
] | 17 | 2019-12-26T06:20:07.000Z | 2022-02-10T09:04:51.000Z | videos/migrations/0003_auto_20191223_2030.py | drewvpham/xclude.com | 103e89e2326c4c6fbfab819c43bc4e4634913bc9 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.7 on 2019-12-23 20:30
| 21.736842 | 81 | 0.602906 | # Generated by Django 2.2.7 on 2019-12-23 20:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('videos', '0002_auto_20191207_2341'),
]
operations = [
migrations.AlterField(
model_name='video',
name='tags',
... | 0 | 0 | 0 | 299 | 0 | 0 | 0 | 19 | 46 |
2e11c89f02a04d0ecae3bafad71de07601ccdc86 | 1,668 | py | Python | test_Search_hotel.py | lblaszkowski/ProjectInPytest | e3d57eafafbe233b1bcd72476f7a37a6c3863016 | [
"Apache-2.0"
] | null | null | null | test_Search_hotel.py | lblaszkowski/ProjectInPytest | e3d57eafafbe233b1bcd72476f7a37a6c3863016 | [
"Apache-2.0"
] | null | null | null | test_Search_hotel.py | lblaszkowski/ProjectInPytest | e3d57eafafbe233b1bcd72476f7a37a6c3863016 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.implicitly_wait(10)
driver.maximize_window()
driver.get("http://www.kurs-selenium.pl/demo/")
driver.find_element_by_xpath("//span[text()='Search by Hotel or City Nam... | 36.26087 | 85 | 0.730216 | from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.implicitly_wait(10)
driver.maximize_window()
driver.get("http://www.kurs-selenium.pl/demo/")
driver.find_element_by_xpath("//span[text()='Search by Hotel or City Nam... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8f0439b3594a7e20b30d133bfa6481d980ca2d0a | 3,636 | py | Python | omaha_server/omaha/dynamic_preferences_registry.py | makar21/omaha-server | b84cdf6e67d9106e7a86b447204de4f82397b019 | [
"Apache-2.0"
] | 142 | 2015-02-10T05:46:28.000Z | 2020-03-21T13:18:31.000Z | omaha_server/omaha/dynamic_preferences_registry.py | tuladhar/omaha-server | 6cfd86e4319e03af0eb319fae6c867691ffc2c36 | [
"Apache-2.0"
] | 272 | 2015-01-15T09:43:49.000Z | 2020-03-30T08:29:30.000Z | omaha_server/omaha/dynamic_preferences_registry.py | tuladhar/omaha-server | 6cfd86e4319e03af0eb319fae6c867691ffc2c36 | [
"Apache-2.0"
] | 77 | 2015-01-29T19:13:39.000Z | 2020-03-21T06:45:35.000Z | # coding: utf8
"""
This software is licensed under the Apache 2 license, quoted below.
Copyright 2015 Crystalnix Limited
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/... | 30.3 | 83 | 0.765677 | # coding: utf8
"""
This software is licensed under the Apache 2 license, quoted below.
Copyright 2015 Crystalnix Limited
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/... | 0 | 1,937 | 0 | 349 | 0 | 0 | 0 | 122 | 388 |
0ee6b800b707d7a0d444d6172a094af935103d5e | 10,991 | py | Python | applications/FluidDynamicsApplication/python_scripts/fluid_solver.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 2 | 2020-04-30T19:13:08.000Z | 2021-04-14T19:40:47.000Z | applications/FluidDynamicsApplication/python_scripts/fluid_solver.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 1 | 2020-04-30T19:19:09.000Z | 2020-05-02T14:22:36.000Z | applications/FluidDynamicsApplication/python_scripts/fluid_solver.py | AndreaVoltan/MyKratos7.0 | e977752722e8ef1b606f25618c4bf8fd04c434cc | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
# Importing the Kratos Library
# Import applications
| 47.786957 | 150 | 0.703758 | from __future__ import print_function, absolute_import, division # makes KratosMultiphysics backward compatible with python 2.6 and 2.7
import sys
# Importing the Kratos Library
import KratosMultiphysics
from python_solver import PythonSolver
# Import applications
import KratosMultiphysics.FluidDynamicsApplication a... | 0 | 0 | 0 | 10,546 | 0 | 67 | 0 | 52 | 134 |
3a796889f5408b7f964a8473f9c0361c8b04f65a | 169 | py | Python | tron/serialize/runstate/__init__.py | analogue/Tron | 9e09f8e76ab9f9aea61501c4d20bccef37d5bf0b | [
"Apache-2.0"
] | null | null | null | tron/serialize/runstate/__init__.py | analogue/Tron | 9e09f8e76ab9f9aea61501c4d20bccef37d5bf0b | [
"Apache-2.0"
] | null | null | null | tron/serialize/runstate/__init__.py | analogue/Tron | 9e09f8e76ab9f9aea61501c4d20bccef37d5bf0b | [
"Apache-2.0"
] | null | null | null | # State types
from __future__ import absolute_import
from __future__ import unicode_literals
JOB_STATE = 'job_state'
MCP_STATE = 'mcp_state'
MESOS_STATE = 'mesos_state'
| 24.142857 | 39 | 0.822485 | # State types
from __future__ import absolute_import
from __future__ import unicode_literals
JOB_STATE = 'job_state'
MCP_STATE = 'mcp_state'
MESOS_STATE = 'mesos_state'
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0d76a73916b0ee82ce3d0dd91bae7487b636066a | 309 | py | Python | Ch5/adderLambda.py | PacktPublishing/Learn-Computer-Science-and-Python | d72cf401cfd9edc1d93ebf3c2c629072a88f3289 | [
"MIT"
] | 1 | 2020-01-26T13:19:12.000Z | 2020-01-26T13:19:12.000Z | Ch5/adderLambda.py | PacktPublishing/Learn-Computer-Science-and-Python | d72cf401cfd9edc1d93ebf3c2c629072a88f3289 | [
"MIT"
] | null | null | null | Ch5/adderLambda.py | PacktPublishing/Learn-Computer-Science-and-Python | d72cf401cfd9edc1d93ebf3c2c629072a88f3289 | [
"MIT"
] | 3 | 2019-12-25T17:54:03.000Z | 2020-11-27T22:41:31.000Z | import sys
adder = lambda x, y: x + y
if(len(sys.argv) == 3):
x = int(sys.argv[1])
y = int(sys.argv[2])
z = adder(x, y)
print (x, " + ", y, " = ", z )
else:
print ("You need to include the 2 numbers you want me to add. For example:")
print ("python.py " + sys.argv[0], " 4 5") | 25.75 | 80 | 0.517799 | import sys
adder = lambda x, y: x + y
if(len(sys.argv) == 3):
x = int(sys.argv[1])
y = int(sys.argv[2])
z = adder(x, y)
print (x, " + ", y, " = ", z )
else:
print ("You need to include the 2 numbers you want me to add. For example:")
print ("python.py " + sys.argv[0], " 4 5") | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
089094f829108021e6902fb60d1b08164578dd2b | 371 | py | Python | convlab2/laug/Word_Perturbation/multiwoz/types.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 339 | 2020-03-04T09:43:22.000Z | 2022-03-26T17:27:38.000Z | convlab2/laug/Word_Perturbation/multiwoz/types.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 122 | 2020-04-12T04:19:06.000Z | 2022-03-23T14:20:57.000Z | convlab2/laug/Word_Perturbation/multiwoz/types.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 138 | 2020-02-18T16:48:04.000Z | 2022-03-26T17:27:43.000Z | from typing import TypeVar, NewType, Union, List, Dict
SampleType = TypeVar("SampleType")
StringType = str
WordType = TokenType = NewType("TokenType", str)
TokenListType = WordListType = List[TokenType]
SentenceType = Union[StringType, TokenListType]
MultiwozSampleType = Dict[str, Union[None, list, dict]]
Mu... | 33.727273 | 56 | 0.762803 | from typing import TypeVar, NewType, Union, List, Dict
SampleType = TypeVar("SampleType")
StringType = str
WordType = TokenType = NewType("TokenType", str)
TokenListType = WordListType = List[TokenType]
SentenceType = Union[StringType, TokenListType]
MultiwozSampleType = Dict[str, Union[None, list, dict]]
Mu... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
3a86da3a6456359d98eda707ff729f7c54efc49e | 1,324 | py | Python | onnxruntime/python/tools/featurizer_ops/data_frame_tool_test.py | codemzs/onnxruntime | c69194ec4c8c9674368113aa6044d0db708cd813 | [
"MIT"
] | 4 | 2019-06-06T23:48:57.000Z | 2021-06-03T11:51:45.000Z | onnxruntime/python/tools/featurizer_ops/data_frame_tool_test.py | Montaer/onnxruntime | 6dc25a60f8b058a556964801d99d5508641dcf69 | [
"MIT"
] | null | null | null | onnxruntime/python/tools/featurizer_ops/data_frame_tool_test.py | Montaer/onnxruntime | 6dc25a60f8b058a556964801d99d5508641dcf69 | [
"MIT"
] | 3 | 2019-05-07T01:29:04.000Z | 2020-08-09T08:36:12.000Z | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#--------------------------------------------------------------------------
import sys
if __name__ == "__main__":
sys.exit(main())
| 36.777778 | 145 | 0.617825 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#--------------------------------------------------------------------------
import argparse
import onnxruntime as onnxrt
import numpy as np
import pan... | 0 | 0 | 0 | 0 | 0 | 859 | 0 | 4 | 156 |
1f460c21badd96a6f7a8e20de2516fa8db2e6407 | 7,187 | py | Python | src/utils.py | mrdvince/dltb_hpu | 7007242f81d4ec2ce88061d76480411119efe121 | [
"MIT"
] | null | null | null | src/utils.py | mrdvince/dltb_hpu | 7007242f81d4ec2ce88061d76480411119efe121 | [
"MIT"
] | null | null | null | src/utils.py | mrdvince/dltb_hpu | 7007242f81d4ec2ce88061d76480411119efe121 | [
"MIT"
] | null | null | null |
# https://github.com/HabanaAI/Model-References/blob/master/PyTorch/computer_vision/segmentation/Unet/utils/utils.py
if __name__ == "__main__":
get_data()
| 32.373874 | 144 | 0.650341 | import os
import shutil
from copy import deepcopy
from glob import glob
from pathlib import Path
import opendatasets as od
import pytorch_lightning as pl
import torch
from PIL import Image, ImageChops
from pytorch_lightning.callbacks import ModelCheckpoint
from tqdm.auto import tqdm
def download(dataset_url, data_di... | 0 | 0 | 0 | 3,017 | 0 | 3,437 | 0 | 42 | 518 |
08de40a766bbee58f1d5879113cb488262979432 | 1,442 | py | Python | examples/ex08_wall_interfaces.py | gramaziokohler/robotic_assembly_workshop | 252d9750175061fd7d4746a4701afd42882773a5 | [
"MIT"
] | 19 | 2019-02-08T13:07:49.000Z | 2020-12-21T12:41:51.000Z | examples/ex08_wall_interfaces.py | gramaziokohler/robotic_assembly_workshop | 252d9750175061fd7d4746a4701afd42882773a5 | [
"MIT"
] | 11 | 2019-01-31T09:32:11.000Z | 2020-11-06T14:12:21.000Z | examples/ex08_wall_interfaces.py | gramaziokohler/robotic_assembly_workshop | 252d9750175061fd7d4746a4701afd42882773a5 | [
"MIT"
] | 8 | 2019-03-05T13:38:27.000Z | 2021-04-13T07:01:52.000Z | """Add a support plate to a wll assembly and identify the interfaces.
Steps
-----
1. Load an assembly from a json file
2. Compute the footprint of the assembly
3. Add a support in the XY plane at least the size to the footprint
4. Compute the interfaces of the assembly
5. Serialise the result
Parameters
--... | 25.75 | 91 | 0.720527 | """Add a support plate to a wll assembly and identify the interfaces.
Steps
-----
1. Load an assembly from a json file
2. Compute the footprint of the assembly
3. Add a support in the XY plane at least the size to the footprint
4. Compute the interfaces of the assembly
5. Serialise the result
Parameters
--... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e3f53cc4086f6f624c481c4db61ffdfa2d28b179 | 5,402 | py | Python | qf_lib_tests/unit_tests/common/timeseries_analysis/test_risk_contribution_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 198 | 2019-08-16T15:09:23.000Z | 2022-03-30T12:44:00.000Z | qf_lib_tests/unit_tests/common/timeseries_analysis/test_risk_contribution_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 13 | 2021-01-07T10:15:19.000Z | 2022-03-29T13:01:47.000Z | qf_lib_tests/unit_tests/common/timeseries_analysis/test_risk_contribution_analysis.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 29 | 2019-08-16T15:21:28.000Z | 2022-02-23T09:53:49.000Z | # Copyright 2016-present CERN European Organization for Nuclear Research
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | 55.122449 | 112 | 0.693077 | # Copyright 2016-present CERN – European Organization for Nuclear Research
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | 3 | 0 | 0 | 4,100 | 0 | 0 | 0 | 351 | 223 |
d23512ab3b8bac75bfff97303c87f81c76863aba | 3,518 | py | Python | tf_seq2seq/test_mean_detection.py | scottgigante/tf_seq2seq | 743d5b224457a6730ab48707dce28920bbfe21a0 | [
"MIT"
] | null | null | null | tf_seq2seq/test_mean_detection.py | scottgigante/tf_seq2seq | 743d5b224457a6730ab48707dce28920bbfe21a0 | [
"MIT"
] | null | null | null | tf_seq2seq/test_mean_detection.py | scottgigante/tf_seq2seq | 743d5b224457a6730ab48707dce28920bbfe21a0 | [
"MIT"
] | null | null | null |
import tensorflow as tf
import numpy as np
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from NanoporeData import NanoporeData
from FakeNanoporeData import FakeNanoporeData
from NanoporeModel import... | 32.275229 | 133 | 0.656623 |
import tensorflow as tf
import numpy as np
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.DEBUG)
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from NanoporeData import NanoporeData
from FakeNanoporeData import FakeNanoporeData
from NanoporeModel import... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |