hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
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
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
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
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75d7254a115d766e188f6e7e2742f4f6b94479e
3,488
py
Python
wagtail_references/examples.py
cividi/wagtail_references
820e4211a504ba9703401fcd131ced204506392f
[ "MIT" ]
4
2019-04-19T18:24:15.000Z
2019-11-17T13:58:48.000Z
wagtail_references/examples.py
cividi/wagtail_references
820e4211a504ba9703401fcd131ced204506392f
[ "MIT" ]
13
2019-04-29T10:50:41.000Z
2022-02-10T10:52:56.000Z
wagtail_references/examples.py
cividi/wagtail_references
820e4211a504ba9703401fcd131ced204506392f
[ "MIT" ]
1
2021-12-13T22:08:20.000Z
2021-12-13T22:08:20.000Z
# A series of example bibtex entries for use in testing of this and third party libraries using wagtail_references. # These examples were exported from Mendeley Desktop (then internal/nonpublic items anonymised). article1 = """@article{Clark2017a, author = {Clark, Thomas and Lueck, Rolf G. and Hay, Alex E. and Davey...
37.505376
123
0.738532
article1 = """@article{Clark2017a, author = {Clark, Thomas and Lueck, Rolf G. and Hay, Alex E. and Davey, Thomas and Stern, Peter and Horwitz, Rachel}, journal = {Proc. of the 12th European Wave and Tidal Energy Conference}, pages = {7}, title = {{InSTREAM : Measurement , Characterisation and Simulation of Turbulenc...
true
true
f75d733c6bc2f68a3b4764cad9eaeb6940ad65e1
557
py
Python
ConversaoInsertMySQL.py
tie-dados-abertos/tcepe
6c1f616ef2352af41704e0320d2fe2e0dd97ac96
[ "MIT" ]
null
null
null
ConversaoInsertMySQL.py
tie-dados-abertos/tcepe
6c1f616ef2352af41704e0320d2fe2e0dd97ac96
[ "MIT" ]
null
null
null
ConversaoInsertMySQL.py
tie-dados-abertos/tcepe
6c1f616ef2352af41704e0320d2fe2e0dd97ac96
[ "MIT" ]
null
null
null
import os script_path = "C:/Users/Eudes/Documents/scriptTce" def percorrePastaRetornaListaSQL(caminho): if not os.path.exists(script_path): return "Este caminho não Existe." else: for diretorio,pasta,listaArquivo in os.walk(caminho): return [caminho + "/" + x for x in listaArquivo...
26.52381
61
0.667864
import os script_path = "C:/Users/Eudes/Documents/scriptTce" def percorrePastaRetornaListaSQL(caminho): if not os.path.exists(script_path): return "Este caminho não Existe." else: for diretorio,pasta,listaArquivo in os.walk(caminho): return [caminho + "/" + x for x in listaArquivo...
true
true
f75d7439ef6aba290389c21da52b1a4ba65dd8d3
2,379
py
Python
setup.py
rastytheamateur/django-appsettings
bff4948bde810a2a654e5f078f6709466bd5fb7f
[ "ISC" ]
8
2020-04-21T12:51:17.000Z
2022-02-21T05:56:08.000Z
setup.py
rastytheamateur/django-appsettings
bff4948bde810a2a654e5f078f6709466bd5fb7f
[ "ISC" ]
42
2017-11-07T10:38:17.000Z
2020-03-23T12:31:50.000Z
setup.py
pawamoy/django-appsettings
bff4948bde810a2a654e5f078f6709466bd5fb7f
[ "0BSD" ]
3
2018-03-19T18:19:45.000Z
2020-03-10T15:36:49.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ Setup script. Uses setuptools. Long description is a concatenation of README.rst and CHANGELOG.rst. """ from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename, dirname, join, splitext from set...
30.113924
74
0.588062
from __future__ import absolute_import, print_function import io import re from glob import glob from os.path import basename, dirname, join, splitext from setuptools import find_packages, setup def read(*names, **kwargs): return io.open( join(dirname(__file__), *names), encoding=kwargs.get('e...
true
true
f75d74ae86ddcd42f83bec3e2462d8cfd767cf77
445
py
Python
pyvista/core/__init__.py
LucaZampieri/pyvista
ae2a7a0559961839c5aa2979228fcdef1f4b188e
[ "MIT" ]
null
null
null
pyvista/core/__init__.py
LucaZampieri/pyvista
ae2a7a0559961839c5aa2979228fcdef1f4b188e
[ "MIT" ]
null
null
null
pyvista/core/__init__.py
LucaZampieri/pyvista
ae2a7a0559961839c5aa2979228fcdef1f4b188e
[ "MIT" ]
null
null
null
"""Core routines.""" from .common import Common, DataObject from .composite import MultiBlock from .filters import (CompositeFilters, DataSetFilters, PolyDataFilters, UnstructuredGridFilters, UniformGridFilters) from .grid import Grid, RectilinearGrid, UniformGrid from .pyvista_ndarray import pyv...
40.454545
75
0.795506
from .common import Common, DataObject from .composite import MultiBlock from .filters import (CompositeFilters, DataSetFilters, PolyDataFilters, UnstructuredGridFilters, UniformGridFilters) from .grid import Grid, RectilinearGrid, UniformGrid from .pyvista_ndarray import pyvista_ndarray from .ob...
true
true
f75d753f62413304802419db8a39b3491520dbbb
2,840
py
Python
amqpstorm/tests/unit/uri_connection/test_uri_connection_exception.py
ZygusPatryk/amqpstorm
0f3ad84a529f12769d34638a88c38f3055cb05cd
[ "MIT" ]
140
2016-06-07T18:53:57.000Z
2022-03-23T01:50:15.000Z
amqpstorm/tests/unit/uri_connection/test_uri_connection_exception.py
ZygusPatryk/amqpstorm
0f3ad84a529f12769d34638a88c38f3055cb05cd
[ "MIT" ]
85
2016-04-11T23:32:32.000Z
2022-03-19T07:21:21.000Z
amqpstorm/tests/unit/uri_connection/test_uri_connection_exception.py
ZygusPatryk/amqpstorm
0f3ad84a529f12769d34638a88c38f3055cb05cd
[ "MIT" ]
38
2016-04-20T20:21:13.000Z
2022-03-23T05:31:58.000Z
import imp import ssl import sys from amqpstorm import AMQPConnectionError from amqpstorm import UriConnection from amqpstorm import compatibility from amqpstorm.tests.utility import TestFramework from amqpstorm.tests.utility import unittest class UriConnectionExceptionTests(TestFramework): @unittest.skipIf(sys....
37.368421
76
0.640141
import imp import ssl import sys from amqpstorm import AMQPConnectionError from amqpstorm import UriConnection from amqpstorm import compatibility from amqpstorm.tests.utility import TestFramework from amqpstorm.tests.utility import unittest class UriConnectionExceptionTests(TestFramework): @unittest.skipIf(sys....
true
true
f75d75b669fccf07d782512cb292078254e716ee
1,098
py
Python
load_from_local_xml_store_to_db.py
viperior/non-profit-browser
ea2ba107d9f6a4b2bad09f97e5145f4c2e15baaa
[ "MIT" ]
2
2021-04-10T02:40:16.000Z
2021-04-10T02:41:07.000Z
load_from_local_xml_store_to_db.py
viperior/non-profit-browser
ea2ba107d9f6a4b2bad09f97e5145f4c2e15baaa
[ "MIT" ]
null
null
null
load_from_local_xml_store_to_db.py
viperior/non-profit-browser
ea2ba107d9f6a4b2bad09f97e5145f4c2e15baaa
[ "MIT" ]
null
null
null
import database_connection import json import os import progressbar import return_filing import time def main(): with open('config.json', 'r') as config_file: config_data = json.load(config_file) limit = config_data['load_limit'] directory = config_data['local_xml_storage_directory'] file_list...
31.371429
108
0.673953
import database_connection import json import os import progressbar import return_filing import time def main(): with open('config.json', 'r') as config_file: config_data = json.load(config_file) limit = config_data['load_limit'] directory = config_data['local_xml_storage_directory'] file_list...
true
true
f75d75d48833e1c6d8acd59b970510355dbe01a7
3,183
py
Python
src/ti/icss/__init__.py
hstarmans/py-uio
9cfbbef5eb96709685c9d32a2079e41cd5669b9b
[ "MIT" ]
null
null
null
src/ti/icss/__init__.py
hstarmans/py-uio
9cfbbef5eb96709685c9d32a2079e41cd5669b9b
[ "MIT" ]
null
null
null
src/ti/icss/__init__.py
hstarmans/py-uio
9cfbbef5eb96709685c9d32a2079e41cd5669b9b
[ "MIT" ]
null
null
null
########## Programmable Real-Time Unit -- ###################################### ########## -- Industrial Communication Subsystem (PRU-ICSS) #################### ## ## aka PRUSS, but not to be confused with the old one of Freon/Primus. from uio import Uio from .cfg import Cfg from .core import Core from .intc import I...
31.514851
80
0.552937
from uio import Uio from .cfg import Cfg from .core import Core from .intc import Intc from ..ecap import ECap class Icss( Uio ): def __init__( self, path ): super().__init__( path ) try: self.ddr = self.region( 'ddr' ) except KeyError: try: self.dd...
true
true
f75d763d2609eb1bd73e4604e52d2c75e4889df2
344
py
Python
zoo/public/hrnet/hrnet_w64.py
megvii-research/basecls
6b395a0a888370b4523764afb78a5a7634a3f6cd
[ "Apache-2.0" ]
23
2021-12-08T02:35:01.000Z
2022-03-16T02:23:19.000Z
zoo/public/hrnet/hrnet_w64.py
megvii-research/basecls
6b395a0a888370b4523764afb78a5a7634a3f6cd
[ "Apache-2.0" ]
4
2021-12-23T11:31:17.000Z
2022-02-28T01:35:31.000Z
zoo/public/hrnet/hrnet_w64.py
megvii-research/basecls
6b395a0a888370b4523764afb78a5a7634a3f6cd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. from basecls.configs import HRNetConfig _cfg = dict( model=dict( name="hrnet_w64", ), ) class Cfg(HRNetConfig): def __init__(self, values_or_file=None, **kwargs): super().__init__(_cfg) self.merge(va...
21.5
58
0.665698
from basecls.configs import HRNetConfig _cfg = dict( model=dict( name="hrnet_w64", ), ) class Cfg(HRNetConfig): def __init__(self, values_or_file=None, **kwargs): super().__init__(_cfg) self.merge(values_or_file, **kwargs)
true
true
f75d767cd8a576dea6df46910f1f1445b160a328
8,385
py
Python
moto/backend_index.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
moto/backend_index.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
moto/backend_index.py
symroe/moto
4e106995af6f2820273528fca8a4e9ee288690a5
[ "Apache-2.0" ]
null
null
null
# autogenerated by ./scripts/update_backend_index.py import re backend_url_patterns = [ ("acm", re.compile("https?://acm\\.(.+)\\.amazonaws\\.com")), ("apigateway", re.compile("https?://apigateway\\.(.+)\\.amazonaws.com")), ( "applicationautoscaling", re.compile("https?://application-autosc...
53.407643
95
0.535719
import re backend_url_patterns = [ ("acm", re.compile("https?://acm\\.(.+)\\.amazonaws\\.com")), ("apigateway", re.compile("https?://apigateway\\.(.+)\\.amazonaws.com")), ( "applicationautoscaling", re.compile("https?://application-autoscaling\\.(.+)\\.amazonaws.com"), ), ("appsync"...
true
true
f75d76b0d40c38e5a7f5dbbf315dffb2449a4be1
2,301
py
Python
msvd/beam_search.py
adwardlee/video_to_text
0ea2e671b84263b3f8ab76e27a49f879912e1e3e
[ "MIT" ]
4
2019-07-10T10:35:14.000Z
2019-09-13T13:49:00.000Z
msvd/beam_search.py
sususushi/video_to_text
0ea2e671b84263b3f8ab76e27a49f879912e1e3e
[ "MIT" ]
null
null
null
msvd/beam_search.py
sususushi/video_to_text
0ea2e671b84263b3f8ab76e27a49f879912e1e3e
[ "MIT" ]
2
2019-05-12T02:02:06.000Z
2019-07-10T12:35:12.000Z
import math import numpy as np import tensorflow as tf import heapq class Caption(object): def __init__(self, sentence, img_state, language_state, logprob, score, metadata=None): """Initializes the Caption. Args: sentence: List of word ids in the caption. state: Model state after generating the p...
28.407407
89
0.669274
import math import numpy as np import tensorflow as tf import heapq class Caption(object): def __init__(self, sentence, img_state, language_state, logprob, score, metadata=None): self.sentence = sentence self.language_state = language_state self.img_state = img_state self.logprob = logprob self.s...
true
true
f75d76b3504e0159bc48b1ec6fe8e184887f0e71
213
py
Python
api/scrapers.py
evilsloth/a4kScrapers-server
94bd90eccb13cc7fc4a5fc8999ff2f621b94344b
[ "MIT" ]
null
null
null
api/scrapers.py
evilsloth/a4kScrapers-server
94bd90eccb13cc7fc4a5fc8999ff2f621b94344b
[ "MIT" ]
null
null
null
api/scrapers.py
evilsloth/a4kScrapers-server
94bd90eccb13cc7fc4a5fc8999ff2f621b94344b
[ "MIT" ]
null
null
null
from providers.a4kScrapers import en as scrapers from flask_restful import Resource, request from flask import jsonify class Scrapers(Resource): def get(self): return jsonify(scrapers.get_torrent())
23.666667
48
0.774648
from providers.a4kScrapers import en as scrapers from flask_restful import Resource, request from flask import jsonify class Scrapers(Resource): def get(self): return jsonify(scrapers.get_torrent())
true
true
f75d778d4e1ebfdcee4802f27e5f182d90591a9c
157
py
Python
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_BestCycle_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_BestCycle_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Logit/model_control_one_enabled_Logit_MovingAverage_BestCycle_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['BestCycle'] , ['MLP'] );
39.25
79
0.745223
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['BestCycle'] , ['MLP'] );
true
true
f75d77b0bd6552c0d6199956def41a1753e6c394
1,388
py
Python
assets/2020-01-18/zoogle/contribs/views.py
dhilipsiva/talks
9892cf2cec1db08655f19336edc2b080d8403de9
[ "MIT" ]
4
2016-09-20T17:15:52.000Z
2020-05-19T10:12:19.000Z
assets/2020-01-18/zoogle/contribs/views.py
dhilipsiva/talks
9892cf2cec1db08655f19336edc2b080d8403de9
[ "MIT" ]
6
2016-11-26T05:39:21.000Z
2021-07-30T11:24:13.000Z
assets/2020-01-18/zoogle/contribs/views.py
dhilipsiva/talks
9892cf2cec1db08655f19336edc2b080d8403de9
[ "MIT" ]
3
2016-11-26T09:14:16.000Z
2017-07-12T16:06:10.000Z
from django.shortcuts import render from django.http import JsonResponse from zoogle_pb2 import Void, Query from zoogle.zdocs.models import Zdoc from zoogle.zmail.models import Zmail from zoogle.contribs.clients.zmail import zmail_stub from zoogle.contribs.clients.zdocs import zdocs_stub def index(request): retu...
27.215686
63
0.688761
from django.shortcuts import render from django.http import JsonResponse from zoogle_pb2 import Void, Query from zoogle.zdocs.models import Zdoc from zoogle.zmail.models import Zmail from zoogle.contribs.clients.zmail import zmail_stub from zoogle.contribs.clients.zdocs import zdocs_stub def index(request): retu...
true
true
f75d78385cf91bde661b10bb8d743b53b0518489
6,778
py
Python
src/zope/securitypolicy/tests/test_securitymap.py
zopefoundation/zope.securitypolicy
c62c2ffd68522cf37099f953df10bfa34c65de71
[ "ZPL-2.1" ]
1
2016-10-13T15:39:44.000Z
2016-10-13T15:39:44.000Z
src/zope/securitypolicy/tests/test_securitymap.py
zopefoundation/zope.securitypolicy
c62c2ffd68522cf37099f953df10bfa34c65de71
[ "ZPL-2.1" ]
11
2016-03-24T15:37:39.000Z
2020-04-09T15:01:58.000Z
src/zope/securitypolicy/tests/test_securitymap.py
zopefoundation/zope.securitypolicy
c62c2ffd68522cf37099f953df10bfa34c65de71
[ "ZPL-2.1" ]
1
2015-04-03T09:36:12.000Z
2015-04-03T09:36:12.000Z
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
32.123223
78
0.577309
import unittest from zope.securitypolicy.securitymap import SecurityMap from zope.securitypolicy.securitymap import PersistentSecurityMap from zope.security.management import setSecurityPolicy, getInteraction from zope.security.management import newInteraction, endInteraction class InteractionStub(object): invali...
true
true
f75d783c166e9f7cc234dcf66dc9372c3c900825
1,730
py
Python
07-Decorator/07-01-decorator.py
xiaohui100/FluentPython
b65fad00e724598657c21660ffa8fa9c5507cf3e
[ "MIT" ]
null
null
null
07-Decorator/07-01-decorator.py
xiaohui100/FluentPython
b65fad00e724598657c21660ffa8fa9c5507cf3e
[ "MIT" ]
null
null
null
07-Decorator/07-01-decorator.py
xiaohui100/FluentPython
b65fad00e724598657c21660ffa8fa9c5507cf3e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ @author: Alfons @contact: alfons_xh@163.com @file: 07-01-decorator.py @time: 18-2-26 下午9:27 @version: v1.0 """ # python 装饰器 # 1.能把被装饰的函数替换成其他函数。 # 2.装饰器在加载模块时立即执行。 # 3.装饰器的强大在于它能够在不修改原有业务逻辑的情况下对代码进行扩展, # 权限校验、用户认证、日志记录、性能测试、事务处理、缓存等都是装饰器的绝佳应用场景, # 能够最大程度地对代码进行复用。 print("...
17.3
59
0.6
print("*" * 32 + "python 装饰器" + "*" * 32) registry_list = [] def func_cheat(): print("Running cheat.") def registry(func): print("Running registry(%s)" % func) registry_list.append(func) return func_cheat if func.__name__ == "func1" else func @registry def func1(): print("Running func1()") ...
true
true
f75d795a4c82145c519e10773db84160599efec8
50,386
py
Python
src/azure-cli/azure/cli/command_modules/acs/_help.py
Zay2k/azure-cli
1ef59bace4dfad9cba137f49c8974aca4b0fff90
[ "MIT" ]
1
2020-08-10T23:50:16.000Z
2020-08-10T23:50:16.000Z
src/azure-cli/azure/cli/command_modules/acs/_help.py
chickenloop/azure-cli
3c9b5651c20c450344f23c2de624ff0321647e7b
[ "MIT" ]
2
2020-09-12T04:31:23.000Z
2020-09-14T06:31:04.000Z
src/azure-cli/azure/cli/command_modules/acs/_help.py
hackathon-cli-recommendation/azure-cli
b9df3c9cfd400627912e5751bb6dcd429670b2c7
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
49.936571
337
0.730778
from knack.help_files import helps helps['acs'] = """ type: group short-summary: Manage Azure Container Services. long-summary: | ACS will be retired as a standalone service on January 31, 2020. If you use the Kubernetes orchestrator, please migrate to AKS by January 31, 2020. """ helps['acs browse'] = """...
true
true
f75d7b0e47ca9ecb5aba00c2be64736a6d0a7ec5
40,465
py
Python
modelzoo/DIEN/train.py
nvzhou/DeepRec-1
d69d6a4c27434dbec8c295b98aefcd7912908d4b
[ "Apache-2.0" ]
null
null
null
modelzoo/DIEN/train.py
nvzhou/DeepRec-1
d69d6a4c27434dbec8c295b98aefcd7912908d4b
[ "Apache-2.0" ]
null
null
null
modelzoo/DIEN/train.py
nvzhou/DeepRec-1
d69d6a4c27434dbec8c295b98aefcd7912908d4b
[ "Apache-2.0" ]
1
2022-01-12T07:18:09.000Z
2022-01-12T07:18:09.000Z
import time import argparse import tensorflow as tf import os import sys import math import collections from tensorflow.python.client import timeline import json from tensorflow.python.ops import partitioned_variables from tensorflow.contrib.rnn.python.ops.core_rnn_cell import _Linear from tensorflow.python.feature_c...
42.865466
104
0.551983
import time import argparse import tensorflow as tf import os import sys import math import collections from tensorflow.python.client import timeline import json from tensorflow.python.ops import partitioned_variables from tensorflow.contrib.rnn.python.ops.core_rnn_cell import _Linear from tensorflow.python.feature_c...
true
true
f75d7b13f88599466f4098d81fe0fbfca6d51c50
3,597
py
Python
depth_training.py
aliayub7/CBCL_RGBD
f80c23c5f4521eceef554ae765a06e329dfcd93d
[ "MIT" ]
2
2020-10-03T04:50:20.000Z
2020-10-12T16:31:11.000Z
depth_training.py
aliayub7/CBCL_RGBD
f80c23c5f4521eceef554ae765a06e329dfcd93d
[ "MIT" ]
null
null
null
depth_training.py
aliayub7/CBCL_RGBD
f80c23c5f4521eceef554ae765a06e329dfcd93d
[ "MIT" ]
2
2020-10-03T04:51:32.000Z
2022-03-15T13:17:19.000Z
import numpy as np import sys import os import time import pickle from PIL import Image from copy import deepcopy import cv2 import json import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.transforms as transforms from torch.autograd import Variable from torchvision.uti...
35.264706
131
0.745899
import numpy as np import sys import os import time import pickle from PIL import Image from copy import deepcopy import cv2 import json import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.transforms as transforms from torch.autograd import Variable from torchvision.uti...
true
true
f75d7d09160f6862a01746a35ca8fbdf418355f5
3,117
py
Python
effect/test_fold.py
mannygit/effect3
c739312d34c5740eb0945c487a0a5e0429cf6359
[ "MIT", "Unlicense" ]
null
null
null
effect/test_fold.py
mannygit/effect3
c739312d34c5740eb0945c487a0a5e0429cf6359
[ "MIT", "Unlicense" ]
null
null
null
effect/test_fold.py
mannygit/effect3
c739312d34c5740eb0945c487a0a5e0429cf6359
[ "MIT", "Unlicense" ]
null
null
null
import operator from pytest import raises from effect import Effect, Error, base_dispatcher, sync_perform from effect.fold import FoldError, fold_effect, sequence from effect.testing import perform_sequence def test_fold_effect(): """ :func:`fold_effect` folds the given function over the results of the ...
30.262136
79
0.650946
import operator from pytest import raises from effect import Effect, Error, base_dispatcher, sync_perform from effect.fold import FoldError, fold_effect, sequence from effect.testing import perform_sequence def test_fold_effect(): effs = [Effect('a'), Effect('b'), Effect('c')] dispatcher = [ ('a',...
true
true
f75d7f054ae806fb365bf105069f1e431f0de302
1,098
py
Python
odp/api/routers/project.py
SAEONData/Open-Data-Platform
cfd2a53e145ec86e187d7c4e1260df17ec6dcb03
[ "MIT" ]
2
2021-03-04T07:09:47.000Z
2022-01-02T19:23:41.000Z
odp/api/routers/project.py
SAEONData/Open-Data-Platform
cfd2a53e145ec86e187d7c4e1260df17ec6dcb03
[ "MIT" ]
18
2020-09-16T09:16:45.000Z
2022-01-25T14:17:42.000Z
odp/api/routers/project.py
SAEONData/Open-Data-Platform
cfd2a53e145ec86e187d7c4e1260df17ec6dcb03
[ "MIT" ]
1
2021-06-25T13:02:57.000Z
2021-06-25T13:02:57.000Z
from typing import List from fastapi import APIRouter, Depends from odp.api.dependencies.auth import Authorizer, AuthData from odp.api.dependencies.ckan import get_ckan_client from odp.api.models.auth import Role, Scope from odp.api.models.project import Project from odp.config import config from odp.lib.ckan import ...
30.5
73
0.720401
from typing import List from fastapi import APIRouter, Depends from odp.api.dependencies.auth import Authorizer, AuthData from odp.api.dependencies.ckan import get_ckan_client from odp.api.models.auth import Role, Scope from odp.api.models.project import Project from odp.config import config from odp.lib.ckan import ...
true
true
f75d7f41f15ddf73fb5d252bbce215fadae5c351
3,663
py
Python
aiida/manage/backup/backup_general.py
pranavmodx/aiida-core
0edbbf82dfb97ab130914d1674a6f2217eba5971
[ "BSD-2-Clause", "MIT" ]
null
null
null
aiida/manage/backup/backup_general.py
pranavmodx/aiida-core
0edbbf82dfb97ab130914d1674a6f2217eba5971
[ "BSD-2-Clause", "MIT" ]
2
2019-03-06T11:23:42.000Z
2020-03-09T09:34:07.000Z
aiida/manage/backup/backup_general.py
lorisercole/aiida-core
84c2098318bf234641219e55795726f99dc25a16
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
40.7
118
0.60142
import os from aiida.orm import Node from aiida.manage.backup.backup_base import AbstractBackup, BackupError from aiida.common.folders import RepositoryFolder from aiida.orm.utils.repository import Repository class Backup(AbstractBackup): def _query_first_node(self): return Node.objects.find(order_by='...
true
true
f75d8056d252f05063a906d0c7a30199a76fe13c
195
py
Python
tests/detector/does_not_inherit/__init__.py
dadaloop82/viseron
1c6c446a4856e16c0e2ed6b9323d169fbdcae20f
[ "MIT" ]
399
2020-08-31T21:13:07.000Z
2022-03-31T18:54:26.000Z
tests/detector/does_not_inherit/__init__.py
dadaloop82/viseron
1c6c446a4856e16c0e2ed6b9323d169fbdcae20f
[ "MIT" ]
157
2020-09-01T18:59:56.000Z
2022-03-25T07:14:19.000Z
tests/detector/does_not_inherit/__init__.py
dadaloop82/viseron
1c6c446a4856e16c0e2ed6b9323d169fbdcae20f
[ "MIT" ]
53
2020-09-01T07:35:59.000Z
2022-03-28T23:21:16.000Z
"""Dummy class that does not inherit from the required AbstractObjectDetection.""" class ObjectDetection: """Dummy class that does not inherit from the required AbstractObjectDetection."""
32.5
86
0.779487
class ObjectDetection:
true
true
f75d80c882f8d751621cb6d076da338ba332a9fa
6,079
py
Python
PPP/constraints.py
hemahecodes/PPP
8514249900a4ee62d223d5ada61361969c3bb5a5
[ "Apache-2.0" ]
null
null
null
PPP/constraints.py
hemahecodes/PPP
8514249900a4ee62d223d5ada61361969c3bb5a5
[ "Apache-2.0" ]
null
null
null
PPP/constraints.py
hemahecodes/PPP
8514249900a4ee62d223d5ada61361969c3bb5a5
[ "Apache-2.0" ]
1
2020-10-01T13:54:07.000Z
2020-10-01T13:54:07.000Z
#!/bin/python import sys import os import argparse from collections import defaultdict import PPP.substructure_search as ss AMINOACIDS = ["VAL", "ASN", "GLY", "LEU", "ILE", "SER", "ASP", "LYS", "MET", "GLN", "TRP", "ARG", "ALA", "THR", "PRO", "PHE", "GLU", "HIS", "HIP", "TYR",...
40.798658
172
0.620497
import sys import os import argparse from collections import defaultdict import PPP.substructure_search as ss AMINOACIDS = ["VAL", "ASN", "GLY", "LEU", "ILE", "SER", "ASP", "LYS", "MET", "GLN", "TRP", "ARG", "ALA", "THR", "PRO", "PHE", "GLU", "HIS", "HIP", "TYR", ...
true
true
f75d815dbdb29ca9b461fb5849098603ba22e418
23,019
py
Python
olfactorybulb/slices/CoronalSlice/GC3_2.py
fameshpatel/olfactorybulb
8d7a644b4560309ef177c0590ff73ed4c2432604
[ "MIT" ]
null
null
null
olfactorybulb/slices/CoronalSlice/GC3_2.py
fameshpatel/olfactorybulb
8d7a644b4560309ef177c0590ff73ed4c2432604
[ "MIT" ]
null
null
null
olfactorybulb/slices/CoronalSlice/GC3_2.py
fameshpatel/olfactorybulb
8d7a644b4560309ef177c0590ff73ed4c2432604
[ "MIT" ]
null
null
null
from neuron import h class TransformGC3: def __init__(self): # Create a section lookup by section name # Note: this assumes each section has a unique name self.name2section = { sec.name(): sec for sec in h.allsec() } # This will store the new section coordinates self.sect...
170.511111
1,530
0.668535
from neuron import h class TransformGC3: def __init__(self): self.name2section = { sec.name(): sec for sec in h.allsec() } self.section_coords = { } def set_coords(self, sec_name): nrn_section = self.name2section[sec_name] new_coords ...
true
true
f75d820f2c57d9ccb06483ab099f0bb8fa441b74
1,621
py
Python
hard-gists/5574345/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/5574345/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/5574345/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
import numpy import random from numpy import arange #from classification import * from sklearn import metrics from sklearn.datasets import fetch_mldata from sklearn.ensemble import RandomForestClassifier from sklearn.utils import shuffle import time def run(): mnist = fetch_mldata('MNIST original') #mnist.dat...
30.018519
69
0.708205
import numpy import random from numpy import arange from sklearn import metrics from sklearn.datasets import fetch_mldata from sklearn.ensemble import RandomForestClassifier from sklearn.utils import shuffle import time def run(): mnist = fetch_mldata('MNIST original') n_train = 60000 n_test =...
false
true
f75d82144a44c600c7f6e9ffdbf80543d0aabd28
2,812
py
Python
components/anchor_generator.py
DdeGeus/single-network-panoptic-segmentation
891f13b8bca0f41e298900fe1c73bc3035caef5d
[ "Apache-2.0" ]
32
2019-06-17T06:28:15.000Z
2021-12-20T15:40:56.000Z
components/anchor_generator.py
DdeGeus/single-network-panoptic-segmentation
891f13b8bca0f41e298900fe1c73bc3035caef5d
[ "Apache-2.0" ]
14
2019-07-11T10:04:37.000Z
2022-03-11T23:49:52.000Z
components/anchor_generator.py
DdeGeus/single-network-panoptic-segmentation
891f13b8bca0f41e298900fe1c73bc3035caef5d
[ "Apache-2.0" ]
4
2019-06-17T06:28:17.000Z
2022-03-18T19:06:25.000Z
import tensorflow as tf import numpy as np from utils import box_utils def generate(base_size, stride, scales, ratios, features_height, features_width, offset=None): """ Args: base_size: (height, width) stride: (height, width) ...
29.291667
74
0.629445
import tensorflow as tf import numpy as np from utils import box_utils def generate(base_size, stride, scales, ratios, features_height, features_width, offset=None): with tf.variable_scope('anchor_generator'): if offset is None: ...
true
true
f75d8228af94e3d15928d49dd7b2821263bd1bb0
3,663
py
Python
example/django_pytest/project/settings.py
sephiartlist/dynaconf
9c5f60b289c1f0fa3f899f1962a8fe5712c74eab
[ "MIT" ]
2,293
2015-08-14T22:39:31.000Z
2022-03-31T12:44:49.000Z
example/django_pytest/project/settings.py
sephiartlist/dynaconf
9c5f60b289c1f0fa3f899f1962a8fe5712c74eab
[ "MIT" ]
676
2015-08-20T19:29:56.000Z
2022-03-31T13:45:51.000Z
example/django_pytest/project/settings.py
sephiartlist/dynaconf
9c5f60b289c1f0fa3f899f1962a8fe5712c74eab
[ "MIT" ]
255
2015-12-02T21:16:33.000Z
2022-03-20T22:03:46.000Z
""" https://docs.djangoproject.com/en/1.11/topics/settings/ https://docs.djangoproject.com/en/1.11/ref/settings/ https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ """ import os from collections import OrderedDict BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # SECURITY WARNIN...
25.978723
79
0.66694
import os from collections import OrderedDict BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = "yeicahshiquohc3Mae8ahl9yah7fa9eiCh6ooyiefaeheipiobe1fikohL6ahpho" DEBUG = os.environ.get("DJANGO_DEBUG", "false").lower() == "true" if DEBUG: EMAIL_BACKEND = "django.core.mail.backe...
true
true
f75d823e5f5b2b0e3227ae4d24cb5d1e4d65278f
5,043
py
Python
src/zoom.py
egornevezhin/Zoom2Youtube
c8ff1c0ddbf95ffcf151e135b76adc5044126bb8
[ "MIT" ]
null
null
null
src/zoom.py
egornevezhin/Zoom2Youtube
c8ff1c0ddbf95ffcf151e135b76adc5044126bb8
[ "MIT" ]
null
null
null
src/zoom.py
egornevezhin/Zoom2Youtube
c8ff1c0ddbf95ffcf151e135b76adc5044126bb8
[ "MIT" ]
null
null
null
import os.path from datetime import datetime from datetime import timedelta from urllib.parse import urljoin import requests from jwt_auth import make_http_headers from jwt_auth import generate_access_token class ZoomJWTClient(object): BASE_URL = 'https://api.zoom.us/v2/' def __init__( self, ...
30.563636
101
0.57208
import os.path from datetime import datetime from datetime import timedelta from urllib.parse import urljoin import requests from jwt_auth import make_http_headers from jwt_auth import generate_access_token class ZoomJWTClient(object): BASE_URL = 'https://api.zoom.us/v2/' def __init__( self, ...
true
true
f75d8484f763e403a44d3d45c0f4245f6cedf63f
1,238
py
Python
two_factor/apps.py
martino/django-two-factor-auth
b615d261a20574c73455c7df02009a5be32e3906
[ "MIT" ]
null
null
null
two_factor/apps.py
martino/django-two-factor-auth
b615d261a20574c73455c7df02009a5be32e3906
[ "MIT" ]
null
null
null
two_factor/apps.py
martino/django-two-factor-auth
b615d261a20574c73455c7df02009a5be32e3906
[ "MIT" ]
1
2020-12-10T09:06:19.000Z
2020-12-10T09:06:19.000Z
from webauthn import webauthn from django.apps import AppConfig from django.conf import settings class TwoFactorConfig(AppConfig): name = 'two_factor' verbose_name = "Django Two Factor Authentication" defaults = { 'TWO_FACTOR_DEVICE_PREFERENCE': { # a lower value means higher priority...
37.515152
90
0.686591
from webauthn import webauthn from django.apps import AppConfig from django.conf import settings class TwoFactorConfig(AppConfig): name = 'two_factor' verbose_name = "Django Two Factor Authentication" defaults = { 'TWO_FACTOR_DEVICE_PREFERENCE': { 'two_factor.models.Webaut...
true
true
f75d850f72b061ccefac67029dbb7cf0939d8d78
1,410
py
Python
590 N-ary Tree Postorder Traversal.py
krishna13052001/LeetCode
cd6ec626bea61f0bd9e8493622074f9e69a7a1c3
[ "MIT" ]
872
2015-06-15T12:02:41.000Z
2022-03-30T08:44:35.000Z
590 N-ary Tree Postorder Traversal.py
nadeemshaikh-github/LeetCode
3fb14aeea62a960442e47dfde9f964c7ffce32be
[ "MIT" ]
8
2015-06-21T15:11:59.000Z
2022-02-01T11:22:34.000Z
590 N-ary Tree Postorder Traversal.py
nadeemshaikh-github/LeetCode
3fb14aeea62a960442e47dfde9f964c7ffce32be
[ "MIT" ]
328
2015-06-28T03:10:35.000Z
2022-03-29T11:05:28.000Z
#!/usr/bin/python3 """ Given an n-ary tree, return the postorder traversal of its nodes' values. For example, given a 3-ary tree: Return its postorder traversal as: [5,6,3,2,4,1]. Note: Recursive solution is trivial, could you do it iteratively? """ # Definition for a Node. class Node: def __init__(self, val, ...
21.692308
73
0.512766
class Node: def __init__(self, val, children): self.val = val self.children = children from typing import List from collections import deque class Solution: def postorder(self, root: 'Node') -> List[int]: if not root: return [] ret = deque() stk = [root...
true
true
f75d853b22e6524cf93f282a8839f8a428906134
1,548
py
Python
package_tests/tests/helpers.py
oleo65/graphene-django-firebase-auth
f40bc43138f6e31fe25b323fd8e115c447129cbf
[ "MIT" ]
6
2020-03-28T14:56:32.000Z
2022-03-13T07:26:00.000Z
package_tests/tests/helpers.py
oleo65/graphene-django-firebase-auth
f40bc43138f6e31fe25b323fd8e115c447129cbf
[ "MIT" ]
5
2020-02-11T23:24:50.000Z
2021-06-10T17:51:47.000Z
package_tests/tests/helpers.py
oleo65/graphene-django-firebase-auth
f40bc43138f6e31fe25b323fd8e115c447129cbf
[ "MIT" ]
7
2020-05-25T19:45:13.000Z
2022-03-13T08:14:36.000Z
from firebase_admin import auth from package_tests.models import User # Stubs stub_firebase_token = 'stub_firebase_token' stub_firebase_uid = 'stub_firebase_uid' stub_email = 'daniel@danieljs.tech' stub_username = 'dspacejs' # Mock classes class MockUserRecord(object): email = None display_name = None ...
26.237288
74
0.703488
from firebase_admin import auth from package_tests.models import User stub_firebase_token = 'stub_firebase_token' stub_firebase_uid = 'stub_firebase_uid' stub_email = 'daniel@danieljs.tech' stub_username = 'dspacejs' class MockUserRecord(object): email = None display_name = None uid = None def ...
true
true
f75d856b22edce8e6cd637db37c56400e6903cfd
648
py
Python
src_python/PySMLite/SMLiteBuilder.py
fawdlstty/smlite
63a799e219879ccec87da00b77687c0b19ce4242
[ "MIT" ]
6
2021-02-19T17:19:21.000Z
2022-01-10T08:59:55.000Z
src_python/PySMLite/SMLiteBuilder.py
fawdlstty/smlite
63a799e219879ccec87da00b77687c0b19ce4242
[ "MIT" ]
1
2021-02-19T17:18:36.000Z
2021-09-15T10:59:07.000Z
src_python/PySMLite/SMLiteBuilder.py
fawdlstty/smlite
63a799e219879ccec87da00b77687c0b19ce4242
[ "MIT" ]
2
2021-06-16T18:23:15.000Z
2021-09-08T14:31:48.000Z
# -*- coding: utf-8 -*- from SMLite import SMLite from ItemStruct._SMLite_ConfigState import _SMLite_ConfigState class SMLiteBuilder (object): def __init__ (self): self.__states = {} self.__builded = False def Configure (self, state): if self.__builded: raise Exception ("shouldn't configure builder after ...
24.923077
65
0.731481
from SMLite import SMLite from ItemStruct._SMLite_ConfigState import _SMLite_ConfigState class SMLiteBuilder (object): def __init__ (self): self.__states = {} self.__builded = False def Configure (self, state): if self.__builded: raise Exception ("shouldn't configure builder after builded.") if state in...
true
true
f75d85bb3629455534292d5f32122eb0ed1575cb
3,635
py
Python
common-python/rest_wrappers/oc/oc/delete_vpn_endpoint.py
LaudateCorpus1/atg-commerce-iaas
f1ae31657fc0111a5c019d46a28a3c81aae1acb2
[ "MIT" ]
28
2016-11-07T14:03:25.000Z
2022-02-01T08:46:52.000Z
common-python/rest_wrappers/oc/oc/delete_vpn_endpoint.py
LaudateCorpus1/atg-commerce-iaas
f1ae31657fc0111a5c019d46a28a3c81aae1acb2
[ "MIT" ]
3
2016-11-09T13:23:03.000Z
2018-04-05T15:49:22.000Z
common-python/rest_wrappers/oc/oc/delete_vpn_endpoint.py
LaudateCorpus1/atg-commerce-iaas
f1ae31657fc0111a5c019d46a28a3c81aae1acb2
[ "MIT" ]
13
2016-10-27T17:59:38.000Z
2022-02-18T04:38:38.000Z
#!/usr/bin/python # Copyright (c) 2013, 2014-2017 Oracle and/or its affiliates. All rights reserved. """Provide Module Description """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# __author__ = "Andrew Hopkinson (Oracle Cloud Solutions A-Team)" __copyright__ = "Copyright (...
31.336207
115
0.611829
__author__ = "Andrew Hopkinson (Oracle Cloud Solutions A-Team)" __copyright__ = "Copyright (c) 2013, 2014-2017 Oracle and/or its affiliates. All rights reserved." __ekitversion__ = "@VERSION@" __ekitrelease__ = "@RELEASE@" __version__ = "1.0.0.0" __date__ = "@BUILDDATE@" __status__ = "Development" __module__ = "dele...
true
true
f75d8620180b13b9231ad4b8ae2bd4baa5ff3b21
746
py
Python
histonets/collections/forms.py
sul-cidr/histonets-arch
6105de90905d54db604b0606d517f53782aae16d
[ "MIT" ]
null
null
null
histonets/collections/forms.py
sul-cidr/histonets-arch
6105de90905d54db604b0606d517f53782aae16d
[ "MIT" ]
19
2018-04-19T19:32:59.000Z
2018-06-04T23:20:03.000Z
histonets/collections/forms.py
sul-cidr/histonets-arch
6105de90905d54db604b0606d517f53782aae16d
[ "MIT" ]
null
null
null
import json from django import forms from histonets.collections.models import Collection class CollectionForm(forms.ModelForm): images = forms.CharField(widget=forms.Textarea) class Meta: model = Collection fields = ['label', 'description'] def clean_images(self): try: ...
27.62963
79
0.619303
import json from django import forms from histonets.collections.models import Collection class CollectionForm(forms.ModelForm): images = forms.CharField(widget=forms.Textarea) class Meta: model = Collection fields = ['label', 'description'] def clean_images(self): try: ...
true
true
f75d884ea1767018e1156658e946b34545d20d7e
1,825
py
Python
alipay/aop/api/domain/AlipayMerchantOrderUnlimitedQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayMerchantOrderUnlimitedQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayMerchantOrderUnlimitedQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayMerchantOrderUnlimitedQueryModel(object): def __init__(self): self._biz_no = None self._buyer_id = None self._order_id = None @property def bi...
25.704225
67
0.572603
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayMerchantOrderUnlimitedQueryModel(object): def __init__(self): self._biz_no = None self._buyer_id = None self._order_id = None @property def biz_no(self): return self._biz_no @...
true
true
f75d885233a338dd804e8d732afdb0be4e2ad803
558
py
Python
src/comments/api/urls.py
hungtt57/blog-api
220b970097b75a9cdf24b5575f49ed1b1b1cc7ca
[ "MIT" ]
null
null
null
src/comments/api/urls.py
hungtt57/blog-api
220b970097b75a9cdf24b5575f49ed1b1b1cc7ca
[ "MIT" ]
null
null
null
src/comments/api/urls.py
hungtt57/blog-api
220b970097b75a9cdf24b5575f49ed1b1b1cc7ca
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.contrib import admin from .views import ( CommentCreateAPIView, CommentDetailAPIView, CommentListAPIView, # CommentEditAPIView ) urlpatterns = [ url(r'^$', CommentListAPIView.as_view(), name='list'), url(r'^create/$', CommentCreateAPIView.as_view(), ...
31
76
0.66129
from django.conf.urls import url from django.contrib import admin from .views import ( CommentCreateAPIView, CommentDetailAPIView, CommentListAPIView, ) urlpatterns = [ url(r'^$', CommentListAPIView.as_view(), name='list'), url(r'^create/$', CommentCreateAPIView.as_view(), name='create'), url...
true
true
f75d88cc3c792d70619287ad88d870caffe452d8
16,362
py
Python
src/aceinna/devices/dmu/uart_provider.py
lihaiyong827/python-openimu
f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4
[ "Apache-2.0" ]
41
2018-07-20T17:30:33.000Z
2022-02-24T08:17:39.000Z
src/aceinna/devices/dmu/uart_provider.py
lihaiyong827/python-openimu
f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4
[ "Apache-2.0" ]
52
2018-06-25T22:15:14.000Z
2022-03-10T07:30:56.000Z
src/aceinna/devices/dmu/uart_provider.py
lihaiyong827/python-openimu
f1c536ba4182aaeabd87b63c08ebd92f97e8dbb4
[ "Apache-2.0" ]
31
2018-12-19T00:10:08.000Z
2022-03-19T02:14:03.000Z
import os import re import time import json import struct import datetime import threading from ..base import OpenDeviceBase from ..decorator import with_device_message from ...framework.utils import (helper, resource) from . import dmu_helper from .configuration_field import CONFIGURATION_FIELD_DEFINES_SINGLETON from ...
31.709302
96
0.57493
import os import re import time import json import struct import datetime import threading from ..base import OpenDeviceBase from ..decorator import with_device_message from ...framework.utils import (helper, resource) from . import dmu_helper from .configuration_field import CONFIGURATION_FIELD_DEFINES_SINGLETON from ...
true
true
f75d8913c3606449fc40b929074611555ae15dcc
106
py
Python
section-22-unittesting/02_mock_basic/mock_example.py
mugan86/bootcamp-basic-to-expert-from-scratch
028aab243386e5a75d84aea319c480ec54913c53
[ "MIT" ]
31
2022-01-19T18:33:40.000Z
2022-03-29T16:24:44.000Z
section-22-unittesting/02_mock_basic/mock_example.py
mugan86/bootcamp-basic-to-expert-from-scratch
028aab243386e5a75d84aea319c480ec54913c53
[ "MIT" ]
1
2022-02-09T17:47:17.000Z
2022-02-09T17:47:17.000Z
section-22-unittesting/02_mock_basic/mock_example.py
mugan86/bootcamp-basic-to-expert-from-scratch
028aab243386e5a75d84aea319c480ec54913c53
[ "MIT" ]
4
2022-01-20T15:41:09.000Z
2022-03-29T16:25:08.000Z
def hello(): return get_greeting() def get_greeting(): return "Hola Mundo en el curso de Python"
17.666667
45
0.688679
def hello(): return get_greeting() def get_greeting(): return "Hola Mundo en el curso de Python"
true
true
f75d8bd2d3c1b1c9817f3ccef79f8fc395887fed
7,001
py
Python
research/object_detection/builders/post_processing_builder.py
hanranCode/models
8e5fbdadcf66f90117b448a8acb0ac3259897d55
[ "Apache-2.0" ]
3
2019-12-15T18:05:04.000Z
2021-04-30T16:26:04.000Z
research/object_detection/builders/post_processing_builder.py
junhwanjang/tf_object_detection_multi_channels
9b7fef7bc5df0e0c76f6e579f2efce7752ab8fdf
[ "Apache-2.0" ]
10
2020-01-28T23:15:47.000Z
2022-03-12T00:11:34.000Z
research/object_detection/builders/post_processing_builder.py
junhwanjang/tf_object_detection_multi_channels
9b7fef7bc5df0e0c76f6e579f2efce7752ab8fdf
[ "Apache-2.0" ]
5
2020-06-02T09:14:45.000Z
2022-02-05T17:32:44.000Z
# Copyright 2019 The TensorFlow 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...
43.216049
80
0.786745
import functools import tensorflow as tf from object_detection.builders import calibration_builder from object_detection.core import post_processing from object_detection.protos import post_processing_pb2 def build(post_processing_config): if not isinstance(post_processing_config, post_processing_pb2.PostProcessi...
true
true
f75d8c9b8f348f0ba276d65ae7b4c574ae42b1f2
5,352
py
Python
alquileres/views.py
CarlosAndresTambascia/Metodologia-de-Sistemas-3-UTN
85898463143b8e99e5c1d6c882e4ca2041cba015
[ "MIT" ]
1
2020-10-17T01:44:07.000Z
2020-10-17T01:44:07.000Z
alquileres/views.py
CarlosAndresTambascia/Sistema-de-Alquileres
85898463143b8e99e5c1d6c882e4ca2041cba015
[ "MIT" ]
null
null
null
alquileres/views.py
CarlosAndresTambascia/Sistema-de-Alquileres
85898463143b8e99e5c1d6c882e4ca2041cba015
[ "MIT" ]
null
null
null
from datetime import datetime from django.shortcuts import render, redirect from django.http import Http404 from alquileres.models import * # Create your views here. def index(request): ciudades = Ciudad.objects.all() if 'filter' in request.GET: filtrados = Propiedad.objects.all().filter(ciudad=reques...
41.488372
158
0.594918
from datetime import datetime from django.shortcuts import render, redirect from django.http import Http404 from alquileres.models import * def index(request): ciudades = Ciudad.objects.all() if 'filter' in request.GET: filtrados = Propiedad.objects.all().filter(ciudad=request.GET['idCiudad']) ...
true
true
f75d8cd3809b176b4d0a30171af45569ae037a4d
8,087
py
Python
tests/migrations/test_migrations.py
karlwnw/django-money
897de31395b8aed4ef56eaf95c00a4f9f67cc40e
[ "BSD-3-Clause" ]
1,160
2015-05-09T07:37:27.000Z
2022-03-28T07:37:00.000Z
tests/migrations/test_migrations.py
karlwnw/django-money
897de31395b8aed4ef56eaf95c00a4f9f67cc40e
[ "BSD-3-Clause" ]
541
2015-05-04T13:18:17.000Z
2022-03-29T22:50:39.000Z
tests/migrations/test_migrations.py
karlwnw/django-money
897de31395b8aed4ef56eaf95c00a4f9f67cc40e
[ "BSD-3-Clause" ]
249
2015-05-09T07:37:29.000Z
2022-03-31T16:41:29.000Z
import os from textwrap import dedent from django.db import migrations import pytest import tests from djmoney.models.fields import CurrencyField, MoneyField from .helpers import get_operations class TestMigrationFramework: installed_apps = ["djmoney", "money_app"] migration_output = ["*Applying money_app...
34.266949
117
0.581427
import os from textwrap import dedent from django.db import migrations import pytest import tests from djmoney.models.fields import CurrencyField, MoneyField from .helpers import get_operations class TestMigrationFramework: installed_apps = ["djmoney", "money_app"] migration_output = ["*Applying money_app...
true
true
f75d8d258360fc43e12b2343182d89f14a01ef8c
102
py
Python
helios_auth/auth_systems/facebookclient/djangofb/default_app/urls.py
IspBrasil/helios-server
92f0a6c867d6cd2f005514480fbfc2ac89a7b5bc
[ "Apache-2.0" ]
24
2019-03-22T12:11:30.000Z
2021-11-23T20:14:19.000Z
helios_auth/auth_systems/facebookclient/djangofb/default_app/urls.py
IspBrasil/helios-server
92f0a6c867d6cd2f005514480fbfc2ac89a7b5bc
[ "Apache-2.0" ]
4
2018-08-15T18:29:52.000Z
2020-09-11T12:16:06.000Z
helios_auth/auth_systems/facebookclient/djangofb/default_app/urls.py
IspBrasil/helios-server
92f0a6c867d6cd2f005514480fbfc2ac89a7b5bc
[ "Apache-2.0" ]
41
2018-09-27T14:32:59.000Z
2022-02-17T00:35:38.000Z
from django.conf.urls import url from views import canvas urlpatterns = [ url(r'^$', canvas), ]
12.75
32
0.676471
from django.conf.urls import url from views import canvas urlpatterns = [ url(r'^$', canvas), ]
true
true
f75d8d30035044d0fc7c174e2c4e4b10810d8a8b
11,274
py
Python
dataframe.py
enmerk4r/NoLA-Scraper
140348cf006ed83d28a727f7ef67380022a9abff
[ "MIT" ]
null
null
null
dataframe.py
enmerk4r/NoLA-Scraper
140348cf006ed83d28a727f7ef67380022a9abff
[ "MIT" ]
null
null
null
dataframe.py
enmerk4r/NoLA-Scraper
140348cf006ed83d28a727f7ef67380022a9abff
[ "MIT" ]
null
null
null
import os import uuid class PageRep: def __init__(self, ownerParcelInfoItem, valueInfoItemList, saleTransferInfoItemList, pageUrl ): self.OwnerParcelInfo = ownerParcelInfoItem self.ValueInfoItemList = valueInfoItemList self.SaleTransferInfoList = saleTransferInfoItemLis...
39.978723
136
0.601384
import os import uuid class PageRep: def __init__(self, ownerParcelInfoItem, valueInfoItemList, saleTransferInfoItemList, pageUrl ): self.OwnerParcelInfo = ownerParcelInfoItem self.ValueInfoItemList = valueInfoItemList self.SaleTransferInfoList = saleTransferInfoItemLis...
true
true
f75d8e146c15ee448dc4569bcf1ca8257fe67101
2,291
py
Python
pynex/fast_math.py
Pixelsuft/pynex
c129244d4b8148a4b155425c1f7207892d51aaeb
[ "MIT" ]
null
null
null
pynex/fast_math.py
Pixelsuft/pynex
c129244d4b8148a4b155425c1f7207892d51aaeb
[ "MIT" ]
null
null
null
pynex/fast_math.py
Pixelsuft/pynex
c129244d4b8148a4b155425c1f7207892d51aaeb
[ "MIT" ]
null
null
null
import math import numba # type: ignore @numba.njit(fastmath=True) def try_sqrt(number: any) -> float: try: return math.sqrt(number) except ValueError: return 0.0 @numba.njit(fastmath=True) def is_colliding_rect(rect: any, xy: tuple, offset_x: int = 0, offset_y: int = 0) -> bool: return...
35.246154
117
0.618944
import math import numba @numba.njit(fastmath=True) def try_sqrt(number: any) -> float: try: return math.sqrt(number) except ValueError: return 0.0 @numba.njit(fastmath=True) def is_colliding_rect(rect: any, xy: tuple, offset_x: int = 0, offset_y: int = 0) -> bool: return rect[2] + rect...
true
true
f75d8e640cd04d234e634c7a08c43d348279caa1
414
py
Python
.waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/extras/wurf/mandatory_options.py
looopTools/sw9-source
a2910ced89d26253c2df4e05d907a69823ed5e45
[ "MIT" ]
null
null
null
.waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/extras/wurf/mandatory_options.py
looopTools/sw9-source
a2910ced89d26253c2df4e05d907a69823ed5e45
[ "MIT" ]
null
null
null
.waf-1.9.8-6657823688b736c1d1a4e2c4e8e198b4/waflib/extras/wurf/mandatory_options.py
looopTools/sw9-source
a2910ced89d26253c2df4e05d907a69823ed5e45
[ "MIT" ]
null
null
null
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file class MandatoryOptions(object): def __init__(self,options): self.options=options def __getattr__(self,name): call=getattr(self.options,name) def require(*args,**kwargs): value=call(*args,*...
25.875
78
0.727053
class MandatoryOptions(object): def __init__(self,options): self.options=options def __getattr__(self,name): call=getattr(self.options,name) def require(*args,**kwargs): value=call(*args,**kwargs) if not value: raise RuntimeError("WTF Dude") return value return require
true
true
f75d8e809006564bfeb22e45dc2ffd145182d687
1,431
py
Python
gemd/entity/value/nominal_composition.py
ventura-rivera/gemd-python
078eed39de852f830111b77306c2f35146de8ec3
[ "Apache-2.0" ]
null
null
null
gemd/entity/value/nominal_composition.py
ventura-rivera/gemd-python
078eed39de852f830111b77306c2f35146de8ec3
[ "Apache-2.0" ]
null
null
null
gemd/entity/value/nominal_composition.py
ventura-rivera/gemd-python
078eed39de852f830111b77306c2f35146de8ec3
[ "Apache-2.0" ]
null
null
null
"""A nominal composition value.""" from gemd.entity.value.composition_value import CompositionValue class NominalComposition(CompositionValue): """ Nominal composition, represented as a map from the component names to the quantities. The quantities do not express an uncertainty but also do not imply that...
31.8
97
0.662474
from gemd.entity.value.composition_value import CompositionValue class NominalComposition(CompositionValue): typ = "nominal_composition" def __init__(self, quantities=None): self._quantities = None self.quantities = quantities @property def quantities(self): return self._qua...
true
true
f75d8f1865a15f9bd32c7c4f34a2d400acebe761
1,084
py
Python
src/homework/homework11/main.py
acc-cosc-1336/cosc-1336-spring-2018-EricScotty
80c0249a583dc178cfc7bb95b851d7f3240dc3e9
[ "MIT" ]
null
null
null
src/homework/homework11/main.py
acc-cosc-1336/cosc-1336-spring-2018-EricScotty
80c0249a583dc178cfc7bb95b851d7f3240dc3e9
[ "MIT" ]
null
null
null
src/homework/homework11/main.py
acc-cosc-1336/cosc-1336-spring-2018-EricScotty
80c0249a583dc178cfc7bb95b851d7f3240dc3e9
[ "MIT" ]
null
null
null
from src.homework.homework11.player import Player from src.homework.homework11.game_log import GameLog from src.homework.homework11.die6 import Die6 from src.homework.homework11.die8 import Die8 #write import statements for Die6 and Die8 classes game_log1 = GameLog() #ASSIGNMENT 12: Write statements to crea...
29.297297
118
0.77214
from src.homework.homework11.player import Player from src.homework.homework11.game_log import GameLog from src.homework.homework11.die6 import Die6 from src.homework.homework11.die8 import Die8 game_log1 = GameLog() die6 = Die6() die8 = Die8() Player(game_log1, die6, die8).roll_doubles() game_l...
true
true
f75d8f69fc6fc32e83324db2803ba033ca59c388
373
py
Python
chigozie-oduah-012/project9/resizing.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
chigozie-oduah-012/project9/resizing.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
chigozie-oduah-012/project9/resizing.py
cornelia247/cil-internship-cohort-01
b8184337056d378eab16d26b40b26ed58cd177bb
[ "MIT" ]
null
null
null
from os import error from PIL import Image def main(): try: image = open_image('image1.jpg') newImage = image.resize((200, 200)) newImage.save('image2.jpg') print("done") except: print ("There was an error processing the image.") def open_image(file_location): image...
21.941176
58
0.632708
from os import error from PIL import Image def main(): try: image = open_image('image1.jpg') newImage = image.resize((200, 200)) newImage.save('image2.jpg') print("done") except: print ("There was an error processing the image.") def open_image(file_location): image...
true
true
f75d9049fd5af6ff8d82566a528ef75baba6c94a
17,549
py
Python
onadata/settings/common.py
alijaafar/kobocat
c92c547f3ecd51648bee0d62f90db64b041b673a
[ "BSD-2-Clause" ]
null
null
null
onadata/settings/common.py
alijaafar/kobocat
c92c547f3ecd51648bee0d62f90db64b041b673a
[ "BSD-2-Clause" ]
null
null
null
onadata/settings/common.py
alijaafar/kobocat
c92c547f3ecd51648bee0d62f90db64b041b673a
[ "BSD-2-Clause" ]
null
null
null
# vim: set fileencoding=utf-8 # this system uses structured settings as defined in # http://www.slideshare.net/jacobian/the-best-and-worst-of-django # # this is the base settings.py -- which contains settings common to all # implementations of ona: edit it at last resort # # local customizations should be done in sever...
34.075728
99
0.718673
import logging import multiprocessing import os import subprocess import sys from celery.signals import after_setup_logger from django.core.exceptions import SuspiciousOperation from django.utils.log import AdminEmailHandler import djcelery from pymongo import MongoClient djcelery.setup_loader() BASE_DIR = os.pat...
true
true
f75d9080879b3828212a1a60bf1a4636c69b8707
5,771
py
Python
object_detection/core/anchor_generator.py
apacha/Mensural-Detector
d924a651bca5ccb97c7b45861b9ef5ef6e4cb26e
[ "MIT" ]
9
2018-12-21T15:11:43.000Z
2021-04-28T06:49:30.000Z
object_detection/core/anchor_generator.py
apacha/Mensural-Detector
d924a651bca5ccb97c7b45861b9ef5ef6e4cb26e
[ "MIT" ]
null
null
null
object_detection/core/anchor_generator.py
apacha/Mensural-Detector
d924a651bca5ccb97c7b45861b9ef5ef6e4cb26e
[ "MIT" ]
6
2019-01-25T02:53:39.000Z
2021-04-28T06:49:33.000Z
# Copyright 2017 The TensorFlow 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...
40.356643
86
0.660891
from abc import ABCMeta from abc import abstractmethod import tensorflow as tf class AnchorGenerator(object): __metaclass__ = ABCMeta @abstractmethod def name_scope(self): pass @property def check_num_anchors(self): return True @abstractmethod def num_anchors_per_locat...
true
true
f75d9117f9d620bd813ee3f9b2e806ea4b89900a
4,582
py
Python
nemo_text_processing/text_normalization/en/taggers/roman.py
bugface/NeMo
431c561380a120e9e164a4c9deed8f1ca9acace5
[ "Apache-2.0" ]
null
null
null
nemo_text_processing/text_normalization/en/taggers/roman.py
bugface/NeMo
431c561380a120e9e164a4c9deed8f1ca9acace5
[ "Apache-2.0" ]
null
null
null
nemo_text_processing/text_normalization/en/taggers/roman.py
bugface/NeMo
431c561380a120e9e164a4c9deed8f1ca9acace5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # Copyright 2015 and onwards Google, Inc. # # 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/license...
40.548673
117
0.641205
from nemo_text_processing.text_normalization.en.graph_utils import NEMO_ALPHA, GraphFst from nemo_text_processing.text_normalization.en.utils import get_abs_path, load_labels try: import pynini from pynini.lib import pynutil PYNINI_AVAILABLE = True except (ModuleNotFoundError, ImportError): PYNINI_A...
true
true
f75d92779584fde281e454209471d45812297c4e
70
py
Python
codql-report/reader/__init__.py
Heersin/codeql_packer
5d1258ce2419a67161ac3b844219ebdbe5310e59
[ "MIT" ]
null
null
null
codql-report/reader/__init__.py
Heersin/codeql_packer
5d1258ce2419a67161ac3b844219ebdbe5310e59
[ "MIT" ]
null
null
null
codql-report/reader/__init__.py
Heersin/codeql_packer
5d1258ce2419a67161ac3b844219ebdbe5310e59
[ "MIT" ]
null
null
null
from . import csv_mod from . import sarif_mod from . import server_mod
23.333333
24
0.8
from . import csv_mod from . import sarif_mod from . import server_mod
true
true
f75d92959178a8d8940156058aac714c00773b28
2,435
py
Python
app.py
Aditibansal2603/fake-news-predictor
9d4ba2ed95799ca63d0fa7f3f5ad0e6f09b9b215
[ "MIT" ]
null
null
null
app.py
Aditibansal2603/fake-news-predictor
9d4ba2ed95799ca63d0fa7f3f5ad0e6f09b9b215
[ "MIT" ]
null
null
null
app.py
Aditibansal2603/fake-news-predictor
9d4ba2ed95799ca63d0fa7f3f5ad0e6f09b9b215
[ "MIT" ]
null
null
null
import re import pickle import numpy as np import pandas as pd import torch from string import punctuation from nltk.stem import WordNetLemmatizer from nltk.tokenize import sent_tokenize, word_tokenize from sklearn.feature_extraction.text import CountVectorizer from flask import Flask, render_template, request, jsonif...
27.670455
88
0.682957
import re import pickle import numpy as np import pandas as pd import torch from string import punctuation from nltk.stem import WordNetLemmatizer from nltk.tokenize import sent_tokenize, word_tokenize from sklearn.feature_extraction.text import CountVectorizer from flask import Flask, render_template, request, jsonif...
true
true
f75d929b6d680b1f958cfe2f534091b905bc8c59
15,787
py
Python
flask_app/bkapp/bk_settings.py
maciek3000/GnuCash-Expenses-Vis
ab0849f49b9b50f81798fc4c769b0aee6ae03b1e
[ "Unlicense" ]
9
2020-05-03T14:34:36.000Z
2021-06-22T18:51:32.000Z
flask_app/bkapp/bk_settings.py
maciek3000/GnuCash-Expenses-Vis
ab0849f49b9b50f81798fc4c769b0aee6ae03b1e
[ "Unlicense" ]
null
null
null
flask_app/bkapp/bk_settings.py
maciek3000/GnuCash-Expenses-Vis
ab0849f49b9b50f81798fc4c769b0aee6ae03b1e
[ "Unlicense" ]
2
2020-05-03T14:33:24.000Z
2020-10-28T17:26:22.000Z
import pandas as pd from datetime import datetime from bokeh.models.widgets import RadioGroup, CheckboxGroup, DateRangeSlider from bokeh.layouts import column from ..observer import Observer from .pandas_functions import create_combinations_of_sep_values class Settings(object): """Settings Object used in BokehA...
46.160819
118
0.677773
import pandas as pd from datetime import datetime from bokeh.models.widgets import RadioGroup, CheckboxGroup, DateRangeSlider from bokeh.layouts import column from ..observer import Observer from .pandas_functions import create_combinations_of_sep_values class Settings(object): chosen_categories = Obs...
true
true
f75d92ebeccd5f957948589d51dd34f359602787
83,077
py
Python
src/olympia/addons/models.py
nayaldivya/addons-server
297f76f8152260fb9d91bf9ed71687b33f4bb4d3
[ "BSD-3-Clause" ]
2
2021-07-19T03:26:43.000Z
2021-07-24T03:12:52.000Z
src/olympia/addons/models.py
nayaldivya/addons-server
297f76f8152260fb9d91bf9ed71687b33f4bb4d3
[ "BSD-3-Clause" ]
null
null
null
src/olympia/addons/models.py
nayaldivya/addons-server
297f76f8152260fb9d91bf9ed71687b33f4bb4d3
[ "BSD-3-Clause" ]
1
2021-07-19T03:26:52.000Z
2021-07-19T03:26:52.000Z
# -*- coding: utf-8 -*- import hashlib import itertools import os import re import time import uuid from datetime import datetime from urllib.parse import urlsplit from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction from django.db.models imp...
36.421306
92
0.636024
import hashlib import itertools import os import re import time import uuid from datetime import datetime from urllib.parse import urlsplit from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import models, transaction from django.db.models import F, Max, Q, signals a...
true
true
f75d9322a76c52147a3599b72d69ba3f10619787
4,938
py
Python
conans/client/hook_manager.py
kindlychung/conan
6bf1fc73937fe8e8a536a066a65af8fa53f401cb
[ "MIT" ]
null
null
null
conans/client/hook_manager.py
kindlychung/conan
6bf1fc73937fe8e8a536a066a65af8fa53f401cb
[ "MIT" ]
null
null
null
conans/client/hook_manager.py
kindlychung/conan
6bf1fc73937fe8e8a536a066a65af8fa53f401cb
[ "MIT" ]
null
null
null
import traceback import os import sys import uuid from collections import defaultdict from conans.client.output import ScopedOutput from conans.errors import ConanException, NotFoundException from conans.client.tools.files import chdir from conans.util.files import save attribute_checker_hook = """ def pre_export(ou...
41.15
95
0.571081
import traceback import os import sys import uuid from collections import defaultdict from conans.client.output import ScopedOutput from conans.errors import ConanException, NotFoundException from conans.client.tools.files import chdir from conans.util.files import save attribute_checker_hook = """ def pre_export(ou...
true
true
f75d934c49a510db22b8229885093a6e932c55a3
1,489
py
Python
subtle_data_crimes/functions/zpad_funcs.py
mikgroup/subtle_data_crimes
210025d9cb8f92583f5f983be15af06b57cfea36
[ "MIT" ]
8
2021-12-12T02:32:30.000Z
2021-12-17T02:26:26.000Z
subtle_data_crimes/functions/zpad_funcs.py
mikgroup/data_crimes
210025d9cb8f92583f5f983be15af06b57cfea36
[ "MIT" ]
null
null
null
subtle_data_crimes/functions/zpad_funcs.py
mikgroup/data_crimes
210025d9cb8f92583f5f983be15af06b57cfea36
[ "MIT" ]
null
null
null
""" This module includes functions for experiments with the zero-padding preprocessing pipeline (subtle inverse crime I). Efrat Shimron (UC Berkeley, 2021). """ import numpy as np from subtle_data_crimes.functions.utils import merge_multicoil_data, calc_pad_half ################################## helper func #######...
35.452381
117
0.652787
import numpy as np from subtle_data_crimes.functions.utils import merge_multicoil_data, calc_pad_half def zpad_merge_scale(ksp_block_multicoil, pad_ratio): NX = ksp_block_multicoil.shape[1] NY = ksp_block_multicoil.shape[2] pad_half_dim1, N_tot_dim1 = calc_pad_half(NX, pad_ratio) pad_half_dim2...
true
true
f75d940f1933a64bbc0370f481eb5268dba0ec0b
4,381
py
Python
nf_dataset.py
SVAI/teamSTIR
9f59f6e655a86bad4f917eb64ebd066401efc428
[ "MIT" ]
1
2019-10-04T19:18:38.000Z
2019-10-04T19:18:38.000Z
nf_dataset.py
SVAI/teamSTIR
9f59f6e655a86bad4f917eb64ebd066401efc428
[ "MIT" ]
1
2020-03-02T03:01:14.000Z
2020-03-02T04:05:51.000Z
nf_dataset.py
SVAI/teamSTIR
9f59f6e655a86bad4f917eb64ebd066401efc428
[ "MIT" ]
1
2019-09-15T21:45:36.000Z
2019-09-15T21:45:36.000Z
# by @eickenberg import torch import numpy as np from patch_dataset import PatchDataset from torch.utils.data import ConcatDataset import glob import os import nibabel class ZipDataset(torch.utils.data.Dataset): def __init__(self, *datasets): self.datasets = datasets def __len__(self): ret...
34.769841
114
0.616298
import torch import numpy as np from patch_dataset import PatchDataset from torch.utils.data import ConcatDataset import glob import os import nibabel class ZipDataset(torch.utils.data.Dataset): def __init__(self, *datasets): self.datasets = datasets def __len__(self): return min(len(datas...
true
true
f75d947487c58566cc8c11395ab32b934335def2
722
py
Python
setup.py
stdevPavelmc/DHT11_Python_OPi.GPIO
ac9168f12cd4bc9054d295e16461f8d5319c5c43
[ "MIT" ]
null
null
null
setup.py
stdevPavelmc/DHT11_Python_OPi.GPIO
ac9168f12cd4bc9054d295e16461f8d5319c5c43
[ "MIT" ]
null
null
null
setup.py
stdevPavelmc/DHT11_Python_OPi.GPIO
ac9168f12cd4bc9054d295e16461f8d5319c5c43
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="dht11", version="0.1.0", author="Pavel Milanes", author_email="pavelm@gmail.com", description="Python library for reading DHT11 sensor on Orange Pi SBCs", long_descripti...
28.88
76
0.67036
from setuptools import setup, find_packages with open("README.md", "r") as fh: long_description = fh.read() setup( name="dht11", version="0.1.0", author="Pavel Milanes", author_email="pavelm@gmail.com", description="Python library for reading DHT11 sensor on Orange Pi SBCs", long_descripti...
true
true
f75d958d33d2cceb6370eaf61de76cb794607dbe
268
py
Python
tests/artificial/transf_Fisher/trend_PolyTrend/cycle_7/ar_12/test_artificial_1024_Fisher_PolyTrend_7_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_Fisher/trend_PolyTrend/cycle_7/ar_12/test_artificial_1024_Fisher_PolyTrend_7_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_Fisher/trend_PolyTrend/cycle_7/ar_12/test_artificial_1024_Fisher_PolyTrend_7_12_20.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Fisher", sigma = 0.0, exog_count = 20, ar_order = 12);
38.285714
163
0.731343
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Fisher", sigma = 0.0, exog_count = 20, ar_order = 12);
true
true
f75d9658eb3921b0075cea2e79a7fa229385e83d
1,197
py
Python
get_colors.py
ireneferfo/VanGoghColorz
e41bd6a08cef6b2954c0e60613dd9ddd0fbc7045
[ "CC-BY-4.0" ]
null
null
null
get_colors.py
ireneferfo/VanGoghColorz
e41bd6a08cef6b2954c0e60613dd9ddd0fbc7045
[ "CC-BY-4.0" ]
null
null
null
get_colors.py
ireneferfo/VanGoghColorz
e41bd6a08cef6b2954c0e60613dd9ddd0fbc7045
[ "CC-BY-4.0" ]
null
null
null
from collections import Counter from sklearn.cluster import KMeans import cv2 sizeX = 600 sizeY = 400 def preprocess(raw): image = cv2.resize(raw, (sizeX, sizeY), interpolation = cv2.INTER_AREA) image = image.reshape(image.shape[0]*image.shape[1], 3) return image ...
29.195122
117
0.654971
from collections import Counter from sklearn.cluster import KMeans import cv2 sizeX = 600 sizeY = 400 def preprocess(raw): image = cv2.resize(raw, (sizeX, sizeY), interpolation = cv2.INTER_AREA) image = image.reshape(image.shape[0]*image.shape[1], 3) return image ...
true
true
f75d973ce4e366b34f0fb715971e78c0a4c5309f
1,148
py
Python
app/models/user.py
postmodern-paste/postmodern-paste
5289309a7bb3f8e8aca984dcb06cdb9cfc55bb69
[ "MIT" ]
null
null
null
app/models/user.py
postmodern-paste/postmodern-paste
5289309a7bb3f8e8aca984dcb06cdb9cfc55bb69
[ "MIT" ]
5
2020-02-16T16:18:10.000Z
2021-03-20T19:21:58.000Z
app/models/user.py
postmodern-paste/postmodern-paste
5289309a7bb3f8e8aca984dcb06cdb9cfc55bb69
[ "MIT" ]
1
2020-04-03T12:18:03.000Z
2020-04-03T12:18:03.000Z
import time import util.testing from modern_paste import db class User(db.Model): __tablename__ = 'user' user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) is_active = db.Column(db.Boolean) signup_time = db.Column(db.Integer) signup_ip = db.Column(db.Text) username = db.Co...
24.425532
73
0.635017
import time import util.testing from modern_paste import db class User(db.Model): __tablename__ = 'user' user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) is_active = db.Column(db.Boolean) signup_time = db.Column(db.Integer) signup_ip = db.Column(db.Text) username = db.Co...
true
true
f75d97fe16d3860f9a748185649204d95cd3ffca
1,688
py
Python
thedarkness/rooms.py
AndrewScholly/FlaskTheDarkness
47ed6649f0dc1e0c75920a872165c8db9c2086a5
[ "MIT" ]
null
null
null
thedarkness/rooms.py
AndrewScholly/FlaskTheDarkness
47ed6649f0dc1e0c75920a872165c8db9c2086a5
[ "MIT" ]
null
null
null
thedarkness/rooms.py
AndrewScholly/FlaskTheDarkness
47ed6649f0dc1e0c75920a872165c8db9c2086a5
[ "MIT" ]
null
null
null
from flask import request import python_game_code.random_functions class room1(object): which_room = "Finding the Sword" def choices(self): return self.room1_scene1 class room1_scene1(room1): def choices(self): rocks = [ 'throw rock', 'throw rocks', 'throw', ...
24.463768
221
0.613744
from flask import request import python_game_code.random_functions class room1(object): which_room = "Finding the Sword" def choices(self): return self.room1_scene1 class room1_scene1(room1): def choices(self): rocks = [ 'throw rock', 'throw rocks', 'throw', ...
true
true
f75d983a067211d286c45de2d93cb39cb3894f72
4,233
py
Python
AppServer/lib/django-1.4/tests/regressiontests/bulk_create/tests.py
loftwah/appscale
586fc1347ebc743d7a632de698f4dbfb09ae38d6
[ "Apache-2.0" ]
790
2015-01-03T02:13:39.000Z
2020-05-10T19:53:57.000Z
AppServer/lib/django-1.4/tests/regressiontests/bulk_create/tests.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
1,361
2015-01-08T23:09:40.000Z
2020-04-14T00:03:04.000Z
AppServer/lib/django-1.4/tests/regressiontests/bulk_create/tests.py
nlake44/appscale
6944af660ca4cb772c9b6c2332ab28e5ef4d849f
[ "Apache-2.0" ]
155
2015-01-08T22:59:31.000Z
2020-04-08T08:01:53.000Z
from __future__ import with_statement, absolute_import from operator import attrgetter from django.db import connection from django.test import TestCase, skipIfDBFeature from django.test.utils import override_settings from .models import Country, Restaurant, Pizzeria, State, TwoFields class BulkCreateTests(TestCas...
39.194444
86
0.621073
from __future__ import with_statement, absolute_import from operator import attrgetter from django.db import connection from django.test import TestCase, skipIfDBFeature from django.test.utils import override_settings from .models import Country, Restaurant, Pizzeria, State, TwoFields class BulkCreateTests(TestCas...
true
true
f75d985c83d9dafebf0e0abf7a0eee2833946b6d
5,939
py
Python
src/sima/riflex/envelopecurvespecification.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/envelopecurvespecification.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/riflex/envelopecurvespecification.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# This an autogenerated file # # Generated with EnvelopeCurveSpecification from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.envelopecurvespecification import EnvelopeCurveSpecificationBlueprint from typing import Dict from sima.riflex.matrixplotfi...
29.695
283
0.646237
from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.envelopecurvespecification import EnvelopeCurveSpecificationBlueprint from typing import Dict from sima.riflex.matrixplotfileoption import MatrixPlotFileOption from sima.sima.moao import MOAO from si...
true
true
f75d98745f8bb5f44f016f73dddb5848239e46a1
34,823
py
Python
packages/python/pyfora/test/PyAstFreeVariableAnalyses_test.py
ufora/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
571
2015-11-05T20:07:07.000Z
2022-01-24T22:31:09.000Z
packages/python/pyfora/test/PyAstFreeVariableAnalyses_test.py
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
218
2015-11-05T20:37:55.000Z
2021-05-30T03:53:50.000Z
packages/python/pyfora/test/PyAstFreeVariableAnalyses_test.py
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
40
2015-11-07T21:42:19.000Z
2021-05-23T03:48:19.000Z
# Copyright 2015 Ufora Inc. # # 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 or agreed to i...
28.357492
97
0.435775
import ast import copy import os import textwrap import unittest import pyfora.pyAst.PyAstFreeVariableAnalyses as PyAstFreeVariableAnalyses import pyfora.pyAst.NodeVisitorBases as NodeVisitorBases import pyfora.Exceptions as Exceptions import pyfora.pyAst.PyAstUtil as PyAstUtil class PyAstFreeVariableAnalyses_test(u...
true
true
f75d987d41c706bb753b8d45ffbd9ce4b04076b6
1,981
py
Python
benchmark/startPyquil3332.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil3332.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil3332.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=44 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += CNOT(0,3) # number=13 ...
25.727273
64
0.563352
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += CNOT(0,3) prog += CNOT(0,3) prog += X(3) prog += RX(-3.110176727...
true
true
f75d98c52875d3f6e0080567159e199771c243d0
8,780
py
Python
bokeh/models/layouts.py
azjps/bokeh
13375db53d4c60216f3bcf5aacccb081cf19450a
[ "BSD-3-Clause" ]
1
2017-04-27T09:15:48.000Z
2017-04-27T09:15:48.000Z
app/static/libs/bokeh/bokeh/models/layouts.py
TBxy/bokeh_start_app
755494f6bc60e92ce17022bbd7f707a39132cbd0
[ "MIT" ]
null
null
null
app/static/libs/bokeh/bokeh/models/layouts.py
TBxy/bokeh_start_app
755494f6bc60e92ce17022bbd7f707a39132cbd0
[ "MIT" ]
null
null
null
""" Various kinds of layout components. """ from __future__ import absolute_import import warnings import logging logger = logging.getLogger(__name__) from ..core import validation from ..core.validation.warnings import ( EMPTY_LAYOUT, BOTH_CHILD_AND_ROOT, ) from ..core.enums import SizingMode from ..core.p...
35.12
105
0.653872
from __future__ import absolute_import import warnings import logging logger = logging.getLogger(__name__) from ..core import validation from ..core.validation.warnings import ( EMPTY_LAYOUT, BOTH_CHILD_AND_ROOT, ) from ..core.enums import SizingMode from ..core.properties import abstract, Bool, Enum, Int, I...
true
true
f75d994aee4eb19a0600b2c8eea950576d300328
368
py
Python
HackerRank/Problem Solving/01. solveMeFirst/solution.py
accidentalgenius09/competitive-programming-solution
210746a7928dcd601ad9a735de52cf7135851070
[ "MIT" ]
8
2020-08-03T01:53:13.000Z
2022-01-09T14:47:58.000Z
HackerRank/Problem Solving/01. solveMeFirst/solution.py
accidentalgenius09/competitive-programming-solution
210746a7928dcd601ad9a735de52cf7135851070
[ "MIT" ]
null
null
null
HackerRank/Problem Solving/01. solveMeFirst/solution.py
accidentalgenius09/competitive-programming-solution
210746a7928dcd601ad9a735de52cf7135851070
[ "MIT" ]
4
2020-09-29T11:28:53.000Z
2021-06-02T15:34:55.000Z
''' Topic : Algorithms Subtopic : SolveMeFirst Language : Python Problem Statement : sum of the above two integers Url : https://www.hackerrank.com/challenges/solve-me-first/problem ''' def solveMeFirst(a:int,b:int): # Hint: Type return a+b below return a + b num1 = int(input()) num2 = int(in...
21.647059
70
0.67663
def solveMeFirst(a:int,b:int): return a + b num1 = int(input()) num2 = int(input()) res = solveMeFirst(num1,num2) print(res)
true
true
f75d9997b7dbb9bbb1a9978773256b1348fc16bf
1,592
py
Python
sl-as-pds/PDS/indy_pdp.py
SOFIE-project/SMAUG-Owner
8dd2dc2dcc3ef81878442a85c8b5a3ac5185e4bb
[ "Apache-2.0" ]
1
2021-03-29T15:11:46.000Z
2021-03-29T15:11:46.000Z
sl-as-pds/PDS/indy_pdp.py
SOFIE-project/SMAUG-Owner
8dd2dc2dcc3ef81878442a85c8b5a3ac5185e4bb
[ "Apache-2.0" ]
null
null
null
sl-as-pds/PDS/indy_pdp.py
SOFIE-project/SMAUG-Owner
8dd2dc2dcc3ef81878442a85c8b5a3ac5185e4bb
[ "Apache-2.0" ]
1
2021-01-30T02:49:38.000Z
2021-01-30T02:49:38.000Z
from indy import did,wallet,crypto, anoncreds import asyncio import base64 import random import json class Indy_pdp: def __init__(self): with open('conf/indy.conf') as f: conf = json.load(f) self.acl = conf['acl'] self.password = conf['admin_password'] def create_nonce(sel...
37.904762
123
0.618719
from indy import did,wallet,crypto, anoncreds import asyncio import base64 import random import json class Indy_pdp: def __init__(self): with open('conf/indy.conf') as f: conf = json.load(f) self.acl = conf['acl'] self.password = conf['admin_password'] def create_nonce(sel...
true
true
f75d99d2129b3cc78fb9f1ac60dd18d020115cdc
27,775
py
Python
teaser/examples/e9_building_data_import_from_excel.py
DaJansenGit/TEASER
ef19f2253a7ba312e285854d8509644b335744a0
[ "MIT" ]
1
2021-06-15T10:43:51.000Z
2021-06-15T10:43:51.000Z
teaser/examples/e9_building_data_import_from_excel.py
PRemmen/TEASER
25edb5be547a750e3ad35c02a97949d2b45bce32
[ "MIT" ]
null
null
null
teaser/examples/e9_building_data_import_from_excel.py
PRemmen/TEASER
25edb5be547a750e3ad35c02a97949d2b45bce32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: Martin Raetz # @Date: 2019-02-19 18:41:56 # @Last Modified by: Martin Rätz # @Last Modified time: 29.11.2019 """ This script demonstrates how a building can be generated by importing building data from excel. An appropriate example file with some building data is imported from exam...
43.534483
112
0.595932
import os from teaser.project import Project from teaser.logic.buildingobjects.building import Building from teaser.logic.buildingobjects.thermalzone import ThermalZone from teaser.logic.buildingobjects.useconditions import UseConditions from teaser.logic.buildingobjects.buildingphysics.outerwall import OuterWall fro...
true
true
f75d9abf157862ab998b99068ef2776838379de1
464
py
Python
tests/test_config.py
Renaud11232/pyduinocli
46d62d07b7bdbb77fd70b9c8e98dc2b980951c40
[ "MIT" ]
6
2020-01-16T20:02:26.000Z
2022-03-30T12:58:10.000Z
tests/test_config.py
Renaud11232/pyduinocli
46d62d07b7bdbb77fd70b9c8e98dc2b980951c40
[ "MIT" ]
4
2019-09-14T14:35:54.000Z
2020-02-18T15:14:04.000Z
tests/test_config.py
Renaud11232/pyduinocli
46d62d07b7bdbb77fd70b9c8e98dc2b980951c40
[ "MIT" ]
1
2019-11-26T19:43:27.000Z
2019-11-26T19:43:27.000Z
from . import * import os class TestConfigCommand(TestBase): def test_dump(self): dump = self._arduino.config.dump()["result"] self.assertIsInstance(dump, dict) self.assertIn("directories", dump) def test_init(self): config_path = self._arduino.config.init(".")["result"].spli...
23.2
77
0.642241
from . import * import os class TestConfigCommand(TestBase): def test_dump(self): dump = self._arduino.config.dump()["result"] self.assertIsInstance(dump, dict) self.assertIn("directories", dump) def test_init(self): config_path = self._arduino.config.init(".")["result"].spli...
true
true
f75d9b5a5bb3c0b5bed4ef3e800e884e2471198b
2,534
py
Python
apps/utils/base_crypt.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
75
2021-07-14T09:32:36.000Z
2022-03-31T15:26:53.000Z
apps/utils/base_crypt.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
561
2021-07-14T07:45:47.000Z
2022-03-31T11:41:28.000Z
apps/utils/base_crypt.py
qqqqqie/bk-log
1765f1901aafaa6fb6a57b8db5d35dd32b3cb5c1
[ "MIT" ]
41
2021-07-14T07:39:50.000Z
2022-03-25T09:22:18.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available. Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. BK-LOG 蓝鲸日志平台 is licensed under the MIT License. License for BK-LOG 蓝鲸日志平台: ------------------------------------------------...
39.59375
111
0.704025
from __future__ import absolute_import from __future__ import unicode_literals import base64 from Crypto.Cipher import AES from django.conf import settings class BaseCrypt(object): _bk_crypt = False ROOT_KEY = b"TencentBkApp-Key" ROOT_IV = b"TencentBkApp--Iv" def __init__(self, instance_key=se...
true
true
f75d9b730354719dfea3d55d1634478138b3b36d
2,450
py
Python
venv/Lib/site-packages/jupyter_client/tests/signalkernel.py
mirosa25/ITI-202-Final-Project
b46e7ffccf43a52ee0e72b889c5aac6887228dc2
[ "MIT" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
venv/Lib/site-packages/jupyter_client/tests/signalkernel.py
mirosa25/ITI-202-Final-Project
b46e7ffccf43a52ee0e72b889c5aac6887228dc2
[ "MIT" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
venv/Lib/site-packages/jupyter_client/tests/signalkernel.py
mirosa25/ITI-202-Final-Project
b46e7ffccf43a52ee0e72b889c5aac6887228dc2
[ "MIT" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
"""Test kernel for signalling subprocesses""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import os from subprocess import Popen, PIPE import sys import time from ipykernel.displayhook import ZMQDisplayHook from ipykernel.kernelbase import Kernel from ipykern...
31.410256
91
0.612245
import os from subprocess import Popen, PIPE import sys import time from ipykernel.displayhook import ZMQDisplayHook from ipykernel.kernelbase import Kernel from ipykernel.kernelapp import IPKernelApp class SignalTestKernel(Kernel): implementation = 'signaltest' implementation_version = '0.0' banner =...
true
true
f75d9c11c8b2fcc6909d450bd73d4053610b41b1
386
py
Python
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/production.py
makinacorpus/cookiecutter-simple-django
8b0bbcfa0a75f9928d05c362168814261e969a4b
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/production.py
makinacorpus/cookiecutter-simple-django
8b0bbcfa0a75f9928d05c362168814261e969a4b
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/settings/production.py
makinacorpus/cookiecutter-simple-django
8b0bbcfa0a75f9928d05c362168814261e969a4b
[ "BSD-3-Clause" ]
1
2021-04-11T07:03:56.000Z
2021-04-11T07:03:56.000Z
from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('{{cookiecutter.author_name}}', '{{cookiecutter.email}}'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '{{cookiecutter.repo_name}}', 'USER': '', ...
16.083333
63
0.528497
from .base import * DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('{{cookiecutter.author_name}}', '{{cookiecutter.email}}'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '{{cookiecutter.repo_name}}', 'USER': '', ...
true
true
f75d9c966c32f9ca96cb9541532dba387019c374
4,699
py
Python
python_modules/dagster/setup.py
a-cid/dagster
13fefd6aea44b63338377e02ca4af6e868bdba47
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/setup.py
a-cid/dagster
13fefd6aea44b63338377e02ca4af6e868bdba47
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/setup.py
a-cid/dagster
13fefd6aea44b63338377e02ca4af6e868bdba47
[ "Apache-2.0" ]
null
null
null
from typing import Dict from setuptools import find_packages, setup # type: ignore def long_description() -> str: return """ ## Dagster Dagster is a data orchestrator for machine learning, analytics, and ETL. Dagster lets you define pipelines in terms of the data flow between reusable, logical components, then...
37.895161
136
0.535646
from typing import Dict from setuptools import find_packages, setup def long_description() -> str: return """ ## Dagster Dagster is a data orchestrator for machine learning, analytics, and ETL. Dagster lets you define pipelines in terms of the data flow between reusable, logical components, then test locally a...
true
true
f75d9d4aaab346d8593631aab8511200122a610e
86
py
Python
src/boilerplate/__init__.py
noelbundick/azure-python-boilerplate
25d5af9fe7df60a09a6dd3893846ffefe4056962
[ "MIT" ]
5
2019-03-03T18:47:49.000Z
2019-11-24T19:32:46.000Z
src/boilerplate/__init__.py
noelbundick/azure-python-boilerplate
25d5af9fe7df60a09a6dd3893846ffefe4056962
[ "MIT" ]
6
2019-03-02T17:19:51.000Z
2019-05-04T19:37:07.000Z
src/boilerplate/__init__.py
noelbundick/azure-python-boilerplate
25d5af9fe7df60a09a6dd3893846ffefe4056962
[ "MIT" ]
1
2019-03-04T02:36:52.000Z
2019-03-04T02:36:52.000Z
""" Minimal placeholder module """ from boilerplate import hello Hello = hello.Hello
17.2
34
0.755814
from boilerplate import hello Hello = hello.Hello
true
true
f75d9e2a4e7d632d5aaa434b3f31770ba8daf1f3
8,015
py
Python
src/oci/data_safe/models/diffs.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/data_safe/models/diffs.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/data_safe/models/diffs.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
32.06
245
0.632938
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class Diffs(object): SEVERITY_HIGH = "HIGH" SEVERITY_MEDIUM = "MEDIUM" SEVERITY_LOW = "LOW" ...
true
true
f75da044c4c95623e56f6dee67a1098fa9194edd
54,065
py
Python
mac/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/translate/v3beta1/translate_v3beta1_messages.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
null
null
null
mac/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/translate/v3beta1/translate_v3beta1_messages.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
4
2020-07-21T12:51:46.000Z
2022-01-22T10:29:25.000Z
mac/google-cloud-sdk/lib/googlecloudsdk/third_party/apis/translate/v3beta1/translate_v3beta1_messages.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
1
2020-07-25T18:17:57.000Z
2020-07-25T18:17:57.000Z
"""Generated message classes for translate version v3beta1. Integrates text translation into your website or application. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages from apitools.base.py import encoding from apitools.base.py im...
42.238281
89
0.736965
from apitools.base.protorpclite import messages as _messages from apitools.base.py import encoding from apitools.base.py import extra_types package = 'translate' class BatchTranslateTextRequest(_messages.Message): @encoding.MapUnrecognizedFields('additionalProperties') class GlossariesValue(_messages.Message)...
true
true
f75da06a0a1e419562371efb69b36f96362c5294
15,585
py
Python
bokeh/client/connection.py
lvcarlosja/bokeh
f258eb867515d3b493589886c4699a9ca032a6b0
[ "BSD-3-Clause" ]
null
null
null
bokeh/client/connection.py
lvcarlosja/bokeh
f258eb867515d3b493589886c4699a9ca032a6b0
[ "BSD-3-Clause" ]
12
2020-08-26T20:19:29.000Z
2020-08-26T20:19:52.000Z
bokeh/client/connection.py
lvcarlosja/bokeh
f258eb867515d3b493589886c4699a9ca032a6b0
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
37.82767
119
0.571447
import logging log = logging.getLogger(__name__) from tornado.httpclient import HTTPClientError, HTTPRequest from tornado.ioloop import IOLoop from tornado.websocket import WebSocketError, websocket_connect from ..protocol import Protocol from ..protocol.exceptions import MessageError, ProtocolError, ValidationErro...
true
true
f75da175985bf3d88b30c749ba5cdd0580fe7668
106
py
Python
backend/tests/scripts/output.py
daviidli/summary
86077f55bc9f8d73e8a4059f7e85f43334392c72
[ "MIT" ]
1
2020-11-28T15:24:16.000Z
2020-11-28T15:24:16.000Z
backend/tests/scripts/output.py
daviidli/summary
86077f55bc9f8d73e8a4059f7e85f43334392c72
[ "MIT" ]
10
2020-09-05T19:04:39.000Z
2022-02-27T10:51:31.000Z
backend/tests/scripts/output.py
daviidli/summary
86077f55bc9f8d73e8a4059f7e85f43334392c72
[ "MIT" ]
null
null
null
import sys def main(argv): print("Hello World!") if __name__ == "__main__": main(sys.argv[1:])
11.777778
26
0.613208
import sys def main(argv): print("Hello World!") if __name__ == "__main__": main(sys.argv[1:])
true
true
f75da1fdfac4ed5c12138a21ee02f3ce6b9b37e5
16,227
py
Python
mne/io/write.py
RDoerfel/mne-python
46197d4926f4654dc1df2e0cabbfb26642fd884d
[ "BSD-3-Clause" ]
null
null
null
mne/io/write.py
RDoerfel/mne-python
46197d4926f4654dc1df2e0cabbfb26642fd884d
[ "BSD-3-Clause" ]
null
null
null
mne/io/write.py
RDoerfel/mne-python
46197d4926f4654dc1df2e0cabbfb26642fd884d
[ "BSD-3-Clause" ]
null
null
null
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from gzip import GzipFile import os.path as op import re import time import uuid import numpy as np from scipy import linalg, sparse from .constants import FIFF from ..fixes i...
35.047516
79
0.633697
from gzip import GzipFile import os.path as op import re import time import uuid import numpy as np from scipy import linalg, sparse from .constants import FIFF from ..fixes import _fn35 from ..utils import logger, _file_like from ..utils.numerics import _cal_to_julian DATE_NONE = (0, 2 ** 31 - 1) def _write(fid,...
true
true
f75da2b19590af697827408fc0d827830fb9753b
8,543
py
Python
azdev/operations/linter/rules/help_rules.py
qwordy/azure-cli-dev-tools
cb0349814fa3a32744af214a3e0e8607287104fc
[ "MIT" ]
1
2020-03-24T13:33:25.000Z
2020-03-24T13:33:25.000Z
azdev/operations/linter/rules/help_rules.py
qwordy/azure-cli-dev-tools
cb0349814fa3a32744af214a3e0e8607287104fc
[ "MIT" ]
null
null
null
azdev/operations/linter/rules/help_rules.py
qwordy/azure-cli-dev-tools
cb0349814fa3a32744af214a3e0e8607287104fc
[ "MIT" ]
1
2019-06-01T15:00:27.000Z
2019-06-01T15:00:27.000Z
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- im...
41.877451
137
0.65024
import shlex import re import mock from knack.log import get_logger from ..rule_decorators import help_file_entry_rule from ..linter import RuleError from ..util import LinterError _az_pattern = 'az\s*' + '(([^\"\'])*|' + '((\"[^\"]*\"\s*)|(\'[^\']*\'\s*))' + ')' _CMD_SUB_1 = re.compile("\$\(\s*" + "(" + _az_pa...
true
true
f75da34cf71c49d15d74292639d9bf7350774b47
931
py
Python
datasets/__init__.py
HAadams/detr
0485e3ce3ac0d5b09af28d07914bd0a41c09a8b1
[ "Apache-2.0" ]
null
null
null
datasets/__init__.py
HAadams/detr
0485e3ce3ac0d5b09af28d07914bd0a41c09a8b1
[ "Apache-2.0" ]
null
null
null
datasets/__init__.py
HAadams/detr
0485e3ce3ac0d5b09af28d07914bd0a41c09a8b1
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch.utils.data import torchvision from .coco import build as build_coco def get_coco_api_from_dataset(dataset): for _ in range(10): # if isinstance(dataset, torchvision.datasets.CocoDetection): # break if ...
35.807692
70
0.716434
import torch.utils.data import torchvision from .coco import build as build_coco def get_coco_api_from_dataset(dataset): for _ in range(10): if isinstance(dataset, torch.utils.data.Subset): dataset = dataset.dataset if isinstance(dataset, torchvision.datasets.CocoDetection...
true
true
f75da6110691bed86d32cdbf9242986f413e5851
14,705
py
Python
apps/useradmin/src/useradmin/ldap_access.py
bopopescu/hue-5
665c275d0c0570b1a4a34a293503cc72ec35695c
[ "Apache-2.0" ]
1
2018-05-07T05:40:36.000Z
2018-05-07T05:40:36.000Z
apps/useradmin/src/useradmin/ldap_access.py
lockhart39/HueQualityAndIngestionApp
c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c
[ "Apache-2.0" ]
null
null
null
apps/useradmin/src/useradmin/ldap_access.py
lockhart39/HueQualityAndIngestionApp
c75e55a43a8bdeb7aa0f5bf2101ec72b01dcac1c
[ "Apache-2.0" ]
1
2020-07-26T01:58:08.000Z
2020-07-26T01:58:08.000Z
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
36.7625
170
0.69337
import ldap import ldap.filter import logging import re from django.contrib.auth.models import User import desktop.conf from desktop.lib.python_util import CaseInsensitiveDict LOG = logging.getLogger(__name__) CACHED_LDAP_CONN = None class LdapBindException(Exception): pass class LdapSearchException(Exceptio...
true
true
f75da71622d87c417bfa6c7d2382486445eadb80
31,594
py
Python
lib/googlecloudsdk/core/metrics.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/core/metrics.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/core/metrics.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 2013 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...
33.291886
80
0.710768
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import contextlib import json import os import pickle import platform import socket import subprocess import sys import tempfile import time from googlecloudsdk.core import config from googlecloudsdk.core ...
true
true
f75da72e4d602e0fa2143e65dc7dfb60e1ac0db8
17,849
py
Python
lib/ceilometer_utils.py
Vultaire/charm-ceilometer
4c450fed8c08afe14007b52f7dbd9344ae45eae9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
lib/ceilometer_utils.py
Vultaire/charm-ceilometer
4c450fed8c08afe14007b52f7dbd9344ae45eae9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
lib/ceilometer_utils.py
Vultaire/charm-ceilometer
4c450fed8c08afe14007b52f7dbd9344ae45eae9
[ "ECL-2.0", "Apache-2.0" ]
2
2019-08-05T19:37:03.000Z
2019-08-05T20:06:01.000Z
# Copyright 2016 Canonical Ltd # # 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 or agreed to in writing, s...
33.17658
79
0.672363
import os import uuid import subprocess from collections import OrderedDict from charmhelpers.contrib.openstack import ( templating, context, ) from ceilometer_contexts import ( ApacheSSLContext, LoggingConfigContext, MongoDBContext, CeilometerContext, HAProxyContext, MetricServiceCon...
true
true
f75da73670f76a9529f8ef8aeb568eb6f2625781
1,570
py
Python
data-detective-airflow/data_detective_airflow/test_utilities/assertions.py
dmitriy-e/metadata-governance
018a879951dee3f3c2c05ac8e05b8360dd7f4ab3
[ "Apache-2.0" ]
5
2021-12-01T09:55:23.000Z
2021-12-21T16:23:33.000Z
data-detective-airflow/data_detective_airflow/test_utilities/assertions.py
dmitriy-e/metadata-governance
018a879951dee3f3c2c05ac8e05b8360dd7f4ab3
[ "Apache-2.0" ]
1
2021-11-16T15:55:34.000Z
2021-11-16T15:55:34.000Z
data-detective-airflow/data_detective_airflow/test_utilities/assertions.py
dmitriy-e/metadata-governance
018a879951dee3f3c2c05ac8e05b8360dd7f4ab3
[ "Apache-2.0" ]
2
2021-11-03T09:43:09.000Z
2021-11-17T10:16:29.000Z
import functools from hashlib import md5 import dill from pandas import DataFrame, Series # pylint: disable=too-many-return-statements def to_bytes(obj: object) -> bytes: """Convert any object to bytes @param obj: @return: """ if isinstance(obj, DataFrame): if obj.empty: retur...
28.545455
87
0.626115
import functools from hashlib import md5 import dill from pandas import DataFrame, Series def to_bytes(obj: object) -> bytes: if isinstance(obj, DataFrame): if obj.empty: return b'empty' return to_bytes(obj.apply(to_bytes, axis=1)) if isinstance(obj, Series): if obj.empty:...
true
true
f75da74c84271fcdb2b2f129e3680ddcdfca9b7d
4,751
py
Python
tensorflow/python/training/device_setter_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2016-12-12T09:46:14.000Z
2016-12-12T09:46:14.000Z
tensorflow/python/training/device_setter_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/training/device_setter_test.py
connectthefuture/tensorflow
93812423fcd5878aa2c1d0b68dc0496980c8519d
[ "Apache-2.0" ]
1
2020-07-20T18:02:33.000Z
2020-07-20T18:02:33.000Z
# Copyright 2015 The TensorFlow 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...
41.675439
80
0.660282
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf class DeviceSetterTest(tf.test.TestCase): _cluster_spec = tf.train.ClusterSpec({ "ps": ["ps0:2222", "ps1:2222"], "worker": ["worker0:2222", "worker1:2222", "worker2:2222...
true
true
f75da7ce8c24633ebdc2513b11ed317bddc7e3fe
1,432
py
Python
Arduino/arduino_interface.py
ultpnml/ult_instruments
3c9dd6b26e993bba3e20c7f91af6510152850cfd
[ "BSD-3-Clause" ]
1
2020-04-13T10:42:46.000Z
2020-04-13T10:42:46.000Z
Arduino/arduino_interface.py
ultpnml/ult_instruments
3c9dd6b26e993bba3e20c7f91af6510152850cfd
[ "BSD-3-Clause" ]
null
null
null
Arduino/arduino_interface.py
ultpnml/ult_instruments
3c9dd6b26e993bba3e20c7f91af6510152850cfd
[ "BSD-3-Clause" ]
1
2022-02-06T01:07:12.000Z
2022-02-06T01:07:12.000Z
#arduino_interface.py #Python-Arduino Interface #Assumes Arduino on COM4 #Dillon Wong 04/08/2018 #TODO: Wrapper to switch X-Y capacitance meter #TODO: Wrapper to activate voltage divider relays import serial class arduino: def __init__(self, com_port = 'COM4'): self.arduino = serial.Serial(...
30.468085
62
0.585196
import serial class arduino: def __init__(self, com_port = 'COM4'): self.arduino = serial.Serial('COM4', 9600) def write(self, pin, high_or_low): if 2 <= pin <= 13: if high_or_low == 1: self.arduino.write(chr(128+pi...
false
true
f75daad6c316d1e061586985c34333a4c5bca8b6
3,679
py
Python
dimod/generators/constraints.py
rahmani15/dimod
4e5918dbf35ad02d4ddcc022c8c94b47d91978bd
[ "Apache-2.0" ]
null
null
null
dimod/generators/constraints.py
rahmani15/dimod
4e5918dbf35ad02d4ddcc022c8c94b47d91978bd
[ "Apache-2.0" ]
null
null
null
dimod/generators/constraints.py
rahmani15/dimod
4e5918dbf35ad02d4ddcc022c8c94b47d91978bd
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 D-Wave Systems Inc. # # 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 or...
32.557522
90
0.59364
import collections.abc as abc import numpy as np from dimod.binary_quadratic_model import BinaryQuadraticModel from dimod.decorators import graph_argument, vartype_argument from dimod.vartypes import BINARY __all__ = 'combinations', def combinations(n, k, strength=1, vartype=BINARY): if isinstance(n, abc.Size...
true
true
f75dabd98909d7ae0ca557c0c14d9868f4b9f77b
1,839
py
Python
week4/task18.py
sdanil-ops/stepik-beegeek-python
02302ab85d581962a82cbce766b7b284d4c5491e
[ "MIT" ]
null
null
null
week4/task18.py
sdanil-ops/stepik-beegeek-python
02302ab85d581962a82cbce766b7b284d4c5491e
[ "MIT" ]
null
null
null
week4/task18.py
sdanil-ops/stepik-beegeek-python
02302ab85d581962a82cbce766b7b284d4c5491e
[ "MIT" ]
1
2021-08-18T00:58:27.000Z
2021-08-18T00:58:27.000Z
# ----------------------------------------------------------- # Copyright (c) 2021. Danil Smirnov # Zoom challenged Flash and offered him a fair fight in the # form of a race. If Zoom is faster than Flash, you need # to output "NO", if Flash is faster than Zoom, you need # to output "YES", if their sp...
36.78
93
0.565525
# ----------------------------------------------------------- class SpeedstersRace: zoom_speed: int flash_speed: int winner: str class SpeedstersRaceWinner: def __init__(self, zoom_speed: int, flash_speed): SpeedstersRace.zoom_speed = zoom_speed SpeedstersRace.flash_...
true
true
f75dac59ec17719df865826b8d86750f76ed68eb
3,418
py
Python
statsd/setup.py
dvanderveer/integrations-core
41dd9950296455457c9b7342584153678503d5aa
[ "BSD-3-Clause" ]
null
null
null
statsd/setup.py
dvanderveer/integrations-core
41dd9950296455457c9b7342584153678503d5aa
[ "BSD-3-Clause" ]
null
null
null
statsd/setup.py
dvanderveer/integrations-core
41dd9950296455457c9b7342584153678503d5aa
[ "BSD-3-Clause" ]
null
null
null
# Always prefer setuptools over distutils from setuptools import setup # To use a consistent encoding from codecs import open from os import path import json import re here = path.abspath(path.dirname(__file__)) def parse_req_line(line): line = line.strip() if not line or line.startswith('--hash') or line[0]...
28.247934
92
0.631363
from setuptools import setup from codecs import open from os import path import json import re here = path.abspath(path.dirname(__file__)) def parse_req_line(line): line = line.strip() if not line or line.startswith('--hash') or line[0] == '#': return None req = line.rpartition('#') if len(re...
true
true
f75dace193e51b97ca2f157859b9af1db2dd1969
3,329
py
Python
dataset/bbox_gen.py
kakainet/TexSet
95c09724893a275b46a12d7b5ef2ae211203a2aa
[ "MIT" ]
2
2020-11-03T03:29:48.000Z
2022-02-26T13:42:46.000Z
dataset/bbox_gen.py
kakainet/TexSet
95c09724893a275b46a12d7b5ef2ae211203a2aa
[ "MIT" ]
null
null
null
dataset/bbox_gen.py
kakainet/TexSet
95c09724893a275b46a12d7b5ef2ae211203a2aa
[ "MIT" ]
null
null
null
import cv2 import numpy as np import argparse import os import json def iswhite(p): return p[0] > 180 and p[1] > 180 and p[2] > 180 def convert(o): if isinstance(o, np.int64): return int(o) else: return o def avgcolor(img): total = [0, 0, 0] ctr = 0 eps = int(0.1 * sum(img....
29.990991
88
0.553019
import cv2 import numpy as np import argparse import os import json def iswhite(p): return p[0] > 180 and p[1] > 180 and p[2] > 180 def convert(o): if isinstance(o, np.int64): return int(o) else: return o def avgcolor(img): total = [0, 0, 0] ctr = 0 eps = int(0.1 * sum(img....
true
true
f75dad1a908cd9515ec0ceb89ed5c42182cd92e4
8,725
py
Python
train_argo.py
zzx9636/cross-view
9a7e874be607eefa7bd34934e274cc376e99f65f
[ "MIT" ]
null
null
null
train_argo.py
zzx9636/cross-view
9a7e874be607eefa7bd34934e274cc376e99f65f
[ "MIT" ]
null
null
null
train_argo.py
zzx9636/cross-view
9a7e874be607eefa7bd34934e274cc376e99f65f
[ "MIT" ]
null
null
null
import os import random import time import numpy as np import torch import torch.optim as optim from torch.utils.data import DataLoader from crossView import PVA_model, Argoverse from opt import get_args import tqdm from datetime import datetime from utils import mean_IU, mean_precision import wandb def readlines(f...
36.506276
120
0.564585
import os import random import time import numpy as np import torch import torch.optim as optim from torch.utils.data import DataLoader from crossView import PVA_model, Argoverse from opt import get_args import tqdm from datetime import datetime from utils import mean_IU, mean_precision import wandb def readlines(f...
true
true
f75dae3f836ea89d98fc4fcc6602f1e0334739a1
1,670
py
Python
libs/video_processing.py
tyommik/rewiever
7f5262f5844c2ef46c7be3a41f761911def6ffcb
[ "MIT" ]
null
null
null
libs/video_processing.py
tyommik/rewiever
7f5262f5844c2ef46c7be3a41f761911def6ffcb
[ "MIT" ]
6
2021-03-31T19:31:42.000Z
2022-03-12T00:07:26.000Z
libs/video_processing.py
tyommik/rewiever
7f5262f5844c2ef46c7be3a41f761911def6ffcb
[ "MIT" ]
1
2022-03-01T11:45:50.000Z
2022-03-01T11:45:50.000Z
import cv2 from libs.ffmpeg_reader import FFMPEG_VideoReader def mat2bytes(image): image = image[:, :, ::-1] return cv2.imencode('.jpg', image)[1].tostring() class VideoCapture: def __init__(self, video_source, start_frame=0, shift_time=0): self.video = FFMPEG_VideoReader(video_source, True) ...
29.821429
82
0.599401
import cv2 from libs.ffmpeg_reader import FFMPEG_VideoReader def mat2bytes(image): image = image[:, :, ::-1] return cv2.imencode('.jpg', image)[1].tostring() class VideoCapture: def __init__(self, video_source, start_frame=0, shift_time=0): self.video = FFMPEG_VideoReader(video_source, True) ...
true
true
f75daea4b21237a527cdac009204e70c0fe34226
403
py
Python
src/main/python/text.py
debmalya/EmailClassification
9bb2bf34c81ed01d8258814b79c6c99aaed769a5
[ "Apache-2.0" ]
null
null
null
src/main/python/text.py
debmalya/EmailClassification
9bb2bf34c81ed01d8258814b79c6c99aaed769a5
[ "Apache-2.0" ]
null
null
null
src/main/python/text.py
debmalya/EmailClassification
9bb2bf34c81ed01d8258814b79c6c99aaed769a5
[ "Apache-2.0" ]
null
null
null
import re def get_text(string): """ normalizing white space and stripping HTML markups. """ text = re.sub('\s+',' ',string) text = re.sub(r'<.*?>',' ',text) return text print get_text("<pre>Hi,<br><br>Unless I&#69;m mistaken, this bill has not been paida Do I know if there is a problem or if it&#69;s just...
31
220
0.665012
import re def get_text(string): """ normalizing white space and stripping HTML markups. """ text = re.sub('\s+',' ',string) text = re.sub(r'<.*?>',' ',text) return text print get_text("<pre>Hi,<br><br>Unless I&#69;m mistaken, this bill has not been paida Do I know if there is a problem or if it&#69;s just...
false
true
f75daf6e93ffdbb3bd238e19009367f2cb221fba
1,258
py
Python
bspump/http/web/source.py
thatch/BitSwanPump
98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f
[ "BSD-3-Clause" ]
17
2019-02-14T09:26:03.000Z
2022-03-11T09:23:52.000Z
bspump/http/web/source.py
thatch/BitSwanPump
98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f
[ "BSD-3-Clause" ]
91
2019-05-06T18:59:02.000Z
2022-01-11T06:22:32.000Z
bspump/http/web/source.py
thatch/BitSwanPump
98a5b8d09f9b59d5361611cee0bd45e7b4c69e3f
[ "BSD-3-Clause" ]
10
2019-04-23T08:48:58.000Z
2022-02-13T14:24:28.000Z
import logging from ...abc.source import Source # L = logging.getLogger(__name__) # class WebServiceSource(Source): ''' This source is to be integrated into aiohttp.web as a 'View'. Example: async def view(self, request): await self.WebServiceSource.put(None, data, request) return aiohttp.web.Response(text...
26.208333
65
0.748013
import logging from ...abc.source import Source L = logging.getLogger(__name__) class WebServiceSource(Source): async def put(self, context, data, request): if context is None: context = {} context['webservicesource.remote'] = request.remote context['webservicesource.path'] = request.path context[...
true
true
f75db00cabe92637a693bd8ca423e1bfcca1f676
3,919
py
Python
src/IRCBuffer.py
dngfx/MagicBot
56abfce2aac28f36e24ebe00229625196b269907
[ "WTFPL" ]
1
2020-12-31T03:10:42.000Z
2020-12-31T03:10:42.000Z
src/IRCBuffer.py
dngfx/MagicBot
56abfce2aac28f36e24ebe00229625196b269907
[ "WTFPL" ]
3
2020-10-12T21:27:28.000Z
2021-08-12T09:46:55.000Z
src/IRCBuffer.py
dngfx/MagicBot
56abfce2aac28f36e24ebe00229625196b269907
[ "WTFPL" ]
1
2020-10-12T21:17:58.000Z
2020-10-12T21:17:58.000Z
import collections import dataclasses import datetime import re import typing import uuid from src import IRCBot, IRCServer, utils MAX_LINES = 2 ** 10 @dataclasses.dataclass class BufferLine(object): sender: str message: str action: bool tags: dict from_self: bool method: str deleted: ...
29.246269
87
0.574636
import collections import dataclasses import datetime import re import typing import uuid from src import IRCBot, IRCServer, utils MAX_LINES = 2 ** 10 @dataclasses.dataclass class BufferLine(object): sender: str message: str action: bool tags: dict from_self: bool method: str deleted: ...
true
true
f75db042fb2953ae23e303384d13c07b5f6c1023
1,720
py
Python
lib/scheduler/recording_job.py
overholts/tuner
761a40d152d3c7afc681aaaecf1660bc93d68a97
[ "MIT" ]
1
2020-12-26T21:56:50.000Z
2020-12-26T21:56:50.000Z
lib/scheduler/recording_job.py
overholts/tuner
761a40d152d3c7afc681aaaecf1660bc93d68a97
[ "MIT" ]
3
2019-10-28T18:16:25.000Z
2019-11-23T07:50:28.000Z
lib/scheduler/recording_job.py
overholts/tuner
761a40d152d3c7afc681aaaecf1660bc93d68a97
[ "MIT" ]
null
null
null
import logging from datetime import datetime from pathlib import Path import inflection from lib.audio.mp3_recorder import MP3Recorder from lib.entities import Source from lib.environment import Environment from lib.library.file_store import FileStore from lib.pipeline.ffmpeg_file_processor import FFMpegFileProcessor...
30.175439
83
0.706395
import logging from datetime import datetime from pathlib import Path import inflection from lib.audio.mp3_recorder import MP3Recorder from lib.entities import Source from lib.environment import Environment from lib.library.file_store import FileStore from lib.pipeline.ffmpeg_file_processor import FFMpegFileProcessor...
true
true