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
f730c75227bfe93ee337638f1e0109a02d1051eb
5,810
py
Python
examples/python/01-list-properties.py
lkucalaba/tiscamera
e1fa7b21bb4dd777ae8039dfa072cfa2daa88244
[ "Apache-2.0" ]
241
2015-02-20T09:10:41.000Z
2022-03-18T08:53:26.000Z
examples/python/01-list-properties.py
lkucalaba/tiscamera
e1fa7b21bb4dd777ae8039dfa072cfa2daa88244
[ "Apache-2.0" ]
435
2015-01-19T10:18:01.000Z
2022-03-28T08:03:08.000Z
examples/python/01-list-properties.py
lkucalaba/tiscamera
e1fa7b21bb4dd777ae8039dfa072cfa2daa88244
[ "Apache-2.0" ]
141
2015-01-03T17:54:08.000Z
2022-02-09T09:55:15.000Z
#!/usr/bin/env python3 # Copyright 2017 The Imaging Source Europe GmbH # # 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 a...
39.52381
111
0.492083
import sys import gi gi.require_version("Tcam", "0.1") gi.require_version("Gst", "1.0") from gi.repository import Tcam, Gst def list_properties(camera): property_names = camera.get_tcam_property_names() for name in property_names: (ret, value, min_value, max_value, ...
true
true
f730c798c4b285ab0b5e4e74ccc09a60d81e0f7c
999
py
Python
xknx/io/__init__.py
Trance-Paradox/xknx
d5603361080f96aafd19c14d17fb1ff391064b3f
[ "MIT" ]
null
null
null
xknx/io/__init__.py
Trance-Paradox/xknx
d5603361080f96aafd19c14d17fb1ff391064b3f
[ "MIT" ]
null
null
null
xknx/io/__init__.py
Trance-Paradox/xknx
d5603361080f96aafd19c14d17fb1ff391064b3f
[ "MIT" ]
null
null
null
""" This package contains all objects managing Tunneling and Routing Connections.. - KNXIPInterface is the overall managing class. - GatewayScanner searches for available KNX/IP devices in the local network. - Routing uses UDP/Multicast to communicate with KNX/IP device. - Tunnel uses UDP packets and builds a static t...
32.225806
81
0.778779
from .connection import ConnectionConfig, ConnectionType from .const import DEFAULT_MCAST_GRP, DEFAULT_MCAST_PORT from .gateway_scanner import GatewayDescriptor, GatewayScanFilter, GatewayScanner from .knxip_interface import KNXIPInterface, knx_interface_factory from .routing import Routing from .self_description impo...
true
true
f730c7e66e7b5401646dde6b3811d9692fd237b4
19,430
py
Python
aiida/common/utils.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
180
2019-07-12T07:45:26.000Z
2022-03-22T13:16:57.000Z
aiida/common/utils.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
2,325
2019-07-04T13:41:44.000Z
2022-03-31T12:17:10.000Z
aiida/common/utils.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
88
2019-07-06T01:42:39.000Z
2022-03-18T14:20:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
31.491086
119
0.616212
BDA', 'Λ') .replace('SIGMA', 'Σ') ) return re.sub(r'_(.?)', r'_{\1}', label) @classmethod def _prettify_label_gnuplot_simple(cls, label): if label == 'G': return 'Γ' return re.sub(r'(\d+)', r'_{\1}', label) @classmethod def _prettify_lab...
true
true
f730c80708b6ee28cd92b114db169a45bb83104e
119
py
Python
upload/urls.py
caggri/FOFviz
776ab387d832a86eea1a1b9064040d9b012494a7
[ "MIT" ]
2
2020-05-24T22:28:53.000Z
2020-05-25T21:58:24.000Z
upload/urls.py
caggri/FOFviz
776ab387d832a86eea1a1b9064040d9b012494a7
[ "MIT" ]
null
null
null
upload/urls.py
caggri/FOFviz
776ab387d832a86eea1a1b9064040d9b012494a7
[ "MIT" ]
1
2021-10-16T12:26:29.000Z
2021-10-16T12:26:29.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.upload_page, name='upload_page') ]
19.833333
51
0.714286
from django.urls import path from . import views urlpatterns = [ path('', views.upload_page, name='upload_page') ]
true
true
f730c8765556ac16d2af1dc5795cdc3cd2145c3c
1,321
py
Python
test/test_settings_mapping_extended.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_settings_mapping_extended.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_settings_mapping_extended.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software 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 l...
26.959184
89
0.74489
from __future__ import absolute_import import os import sys import unittest import swagger_client from swagger_client.rest import ApiException from swagger_client.models.settings_mapping_extended import SettingsMappingExtended class TestSettingsMappingExtended(unittest.TestCase): def setUp(self): pa...
true
true
f730c98fb8903a540d71dd9033f8551f5e81af7c
1,316
py
Python
garden_scorer/src/tracing.py
emilybache/BeeFriendly
7582d8f7140f2d0088404d9cb1d47b6231606c49
[ "MIT" ]
4
2020-06-14T13:42:39.000Z
2022-01-29T14:36:53.000Z
garden_scorer/src/tracing.py
emilybache/BeeFriendly
7582d8f7140f2d0088404d9cb1d47b6231606c49
[ "MIT" ]
2
2022-02-13T15:19:44.000Z
2022-02-25T12:32:16.000Z
garden_scorer/src/tracing.py
emilybache/BeeFriendly
7582d8f7140f2d0088404d9cb1d47b6231606c49
[ "MIT" ]
4
2020-06-11T09:31:45.000Z
2021-08-17T14:00:41.000Z
import logging import opentracing from jaeger_client import Config def init_tracer(service): logging.getLogger('').handlers = [] logging.basicConfig(format='%(message)s', level=logging.DEBUG) config = Config( config={ 'sampler': { 'type': 'const', 'para...
26.857143
71
0.617781
import logging import opentracing from jaeger_client import Config def init_tracer(service): logging.getLogger('').handlers = [] logging.basicConfig(format='%(message)s', level=logging.DEBUG) config = Config( config={ 'sampler': { 'type': 'const', 'para...
true
true
f730c9ef609a4b060b7dbaf45e19609d9f71c5b5
2,359
py
Python
nei/physics/shocks.py
EigenDev/NEI-Research
5d6f110426f57668156665a69fcf9c83575ccdb8
[ "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
3
2018-02-09T00:19:06.000Z
2019-03-11T12:32:25.000Z
nei/physics/shocks.py
EigenDev/NEI-Research
5d6f110426f57668156665a69fcf9c83575ccdb8
[ "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
34
2018-02-07T19:15:27.000Z
2018-08-09T19:01:40.000Z
nei/physics/shocks.py
EigenDev/NEI-Research
5d6f110426f57668156665a69fcf9c83575ccdb8
[ "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
3
2018-02-07T19:19:27.000Z
2018-06-04T19:49:44.000Z
""" Shocks is a module that consists of canonical hydrodynamical equations used for modeling astrophysical plasmas Classes: Shocks -- A class that emcompasses a multitude of hydrodynamical shock equations relevant for plasma calculations. Functions: rh_density -- Returns the density jump relation deri...
27.430233
84
0.576939
class MHD: def __init__(self): pass def rh_density(self, init_dens, gamma, mach): dens_ratio = ((gamma+1)*mach**2)/(2+(gamma-1)*mach**2) final_dens = dens_ratio*init_dens return final_dens def rh_temp(self, init_temp, gamma, mach): temp_ratio = ( ( ( (gamma...
true
true
f730ca0f79f5f46c3e0c9a27ff65e95253be08cd
2,053
py
Python
smsgateway/south_migrations/0001_initial.py
vikingco/django-smsgateway
91675e599a147f4d7e64ff4c4455dbf75ed753d3
[ "BSD-3-Clause" ]
13
2015-03-11T06:55:50.000Z
2022-02-08T16:50:16.000Z
smsgateway/south_migrations/0001_initial.py
vikingco/django-smsgateway
91675e599a147f4d7e64ff4c4455dbf75ed753d3
[ "BSD-3-Clause" ]
17
2015-03-19T12:27:41.000Z
2019-12-09T14:21:21.000Z
smsgateway/south_migrations/0001_initial.py
vikingco/django-smsgateway
91675e599a147f4d7e64ff4c4455dbf75ed753d3
[ "BSD-3-Clause" ]
7
2015-05-15T00:14:49.000Z
2019-06-27T02:46:09.000Z
from __future__ import absolute_import from south.db import db from django.db import models from smsgateway.models import * class Migration: def forwards(self, orm): # Adding model 'SMS' db.create_table('smsgateway_sms', ( ('id', orm['smsgateway.SMS:id']), ('s...
40.254902
131
0.543595
from __future__ import absolute_import from south.db import db from django.db import models from smsgateway.models import * class Migration: def forwards(self, orm): db.create_table('smsgateway_sms', ( ('id', orm['smsgateway.SMS:id']), ('sent', orm['smsgatewa...
true
true
f730ca8c7c983ea347a4f2157407b637efc8c630
1,495
py
Python
scripts/archive_gs.py
wsjeon/softlearning
8ceba916e5b3b2df66a1aa51bed3ff703e394a56
[ "MIT" ]
1
2019-04-02T03:07:03.000Z
2019-04-02T03:07:03.000Z
scripts/archive_gs.py
wsjeon/softlearning
8ceba916e5b3b2df66a1aa51bed3ff703e394a56
[ "MIT" ]
11
2020-01-28T22:32:20.000Z
2022-03-11T23:37:57.000Z
scripts/archive_gs.py
wsjeon/softlearning
8ceba916e5b3b2df66a1aa51bed3ff703e394a56
[ "MIT" ]
1
2019-12-27T19:00:57.000Z
2019-12-27T19:00:57.000Z
#!/usr/bin/python import argparse import os import subprocess def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( 'archive_path', type=str, default=None, nargs='?') parser.add_argument( '--dry', action='store_true', default=False) args = parser.parse_args() ...
24.508197
78
0.660201
import argparse import os import subprocess def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( 'archive_path', type=str, default=None, nargs='?') parser.add_argument( '--dry', action='store_true', default=False) args = parser.parse_args() return args de...
true
true
f730cc80fc1c397a68a520a6bdf3278598eb7a4b
1,100
py
Python
opennem/spiders/nem/price.py
tourdownunder/opennem
deec3e2079db9d9d84171010fd0c239170d1e7ce
[ "MIT" ]
null
null
null
opennem/spiders/nem/price.py
tourdownunder/opennem
deec3e2079db9d9d84171010fd0c239170d1e7ce
[ "MIT" ]
1
2020-09-06T04:17:59.000Z
2020-09-06T04:17:59.000Z
opennem/spiders/nem/price.py
tourdownunder/opennem
deec3e2079db9d9d84171010fd0c239170d1e7ce
[ "MIT" ]
null
null
null
from opennem.pipelines.nem.opennem import NemwebUnitScadaOpenNEMStorePipeline from opennem.spiders.nemweb import NemwebSpider class NemwebLatestPriceSpider(NemwebSpider): name = "au.nem.latest.price" start_url = ( "http://www.nemweb.com.au/Reports/CURRENT/Dispatchprices_PRE_AP/" ) limit = 1 ...
27.5
77
0.710909
from opennem.pipelines.nem.opennem import NemwebUnitScadaOpenNEMStorePipeline from opennem.spiders.nemweb import NemwebSpider class NemwebLatestPriceSpider(NemwebSpider): name = "au.nem.latest.price" start_url = ( "http://www.nemweb.com.au/Reports/CURRENT/Dispatchprices_PRE_AP/" ) limit = 1 ...
true
true
f730cd205556860fc0fce04a73efaf2df2cf84e7
11,087
py
Python
h1st/tests/core/test_schemas_validator.py
Mou-Ikkai/h1st
da47a8f1ad6af532c549e075fba19e3b3692de89
[ "Apache-2.0" ]
2
2020-08-21T07:49:08.000Z
2020-08-21T07:49:13.000Z
h1st/tests/core/test_schemas_validator.py
Mou-Ikkai/h1st
da47a8f1ad6af532c549e075fba19e3b3692de89
[ "Apache-2.0" ]
3
2020-11-13T19:06:07.000Z
2022-02-10T02:06:03.000Z
h1st/tests/core/test_schemas_validator.py
Mou-Ikkai/h1st
da47a8f1ad6af532c549e075fba19e3b3692de89
[ "Apache-2.0" ]
null
null
null
from typing import Union, Optional, List from unittest import TestCase import pyarrow as pa import pandas as pd import numpy as np from h1st.schema.schema_validator import SchemaValidator dummy = lambda: None class SchemaTestCase(TestCase): def test_validate_schema(self): # empty schema self.ass...
32.89911
105
0.495355
from typing import Union, Optional, List from unittest import TestCase import pyarrow as pa import pandas as pd import numpy as np from h1st.schema.schema_validator import SchemaValidator dummy = lambda: None class SchemaTestCase(TestCase): def test_validate_schema(self): self.assertTrue(Schema...
true
true
f730cdbd78f4b2942915fd52265954f7c4985bfb
20,098
py
Python
synapse/app/generic_worker.py
jklippel/synapse
451f25172afc0ce46e416c73fa703c5edf279d54
[ "Apache-2.0" ]
null
null
null
synapse/app/generic_worker.py
jklippel/synapse
451f25172afc0ce46e416c73fa703c5edf279d54
[ "Apache-2.0" ]
null
null
null
synapse/app/generic_worker.py
jklippel/synapse
451f25172afc0ce46e416c73fa703c5edf279d54
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 OpenMarket Ltd # Copyright 2020 The Matrix.org Foundation C.I.C. # # 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/...
41.524793
90
0.661359
import logging import sys from typing import Dict, Optional from twisted.internet import address from twisted.web.resource import IResource from twisted.web.server import Request import synapse import synapse.events from synapse.api.errors import HttpResponseException, RequestSendFailed, SynapseError f...
true
true
f730cf032970e255c2e4811c7121b858b9e1fb44
35,119
py
Python
mrcnn/utils.py
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation
49d8a07d600c538e3b706a531af4029823b70236
[ "MIT" ]
null
null
null
mrcnn/utils.py
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation
49d8a07d600c538e3b706a531af4029823b70236
[ "MIT" ]
null
null
null
mrcnn/utils.py
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation
49d8a07d600c538e3b706a531af4029823b70236
[ "MIT" ]
1
2021-04-22T01:39:25.000Z
2021-04-22T01:39:25.000Z
""" Mask R-CNN Common utility functions and classes. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import sys import os import logging import math import random import numpy as np import tensorflow as tf import scipy import sk...
39.953356
105
0.599248
import sys import os import logging import math import random import numpy as np import tensorflow as tf import scipy import skimage.color import skimage.io import skimage.transform import urllib.request import shutil import warnings from distutils.version import LooseVersion COCO_MODEL_URL = "https...
true
true
f730cf4ecdd22af444f24b4e7185bfbd91d7f33c
1,937
py
Python
PyUE4Builder/actions/copy.py
rfsheffer/PyUE4Builder
2b2a978431ba5426238a03ecaae5a73836a0598c
[ "MIT" ]
12
2018-04-15T01:46:01.000Z
2022-01-06T01:34:34.000Z
PyUE4Builder/actions/copy.py
rfsheffer/PyUE4Builder
2b2a978431ba5426238a03ecaae5a73836a0598c
[ "MIT" ]
null
null
null
PyUE4Builder/actions/copy.py
rfsheffer/PyUE4Builder
2b2a978431ba5426238a03ecaae5a73836a0598c
[ "MIT" ]
2
2017-12-04T18:30:12.000Z
2018-04-15T01:46:02.000Z
#!/usr/bin/env python from actions.action import Action import os import contextlib import re import shutil __author__ = "Ryan Sheffer" __copyright__ = "Copyright 2020, Sheffer Online Services" __credits__ = ["Ryan Sheffer", "VREAL"] class Copy(Action): """ Copy Action An action designed to copy file/s ...
34.589286
112
0.621064
from actions.action import Action import os import contextlib import re import shutil __author__ = "Ryan Sheffer" __copyright__ = "Copyright 2020, Sheffer Online Services" __credits__ = ["Ryan Sheffer", "VREAL"] class Copy(Action): def __init__(self, config, **kwargs): super().__init__(config, **kwargs...
true
true
f730cf881812347d409f1942f37890aa47f0c756
493
py
Python
objectModel/Python/cdm/enums/__init__.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/cdm/enums/__init__.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
3
2021-05-11T23:57:12.000Z
2021-08-04T05:03:05.000Z
objectModel/Python/cdm/enums/__init__.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
null
null
null
from .cdm_attribute_context_type import CdmAttributeContextType from .cdm_data_format import CdmDataFormat from .cdm_object_type import CdmObjectType from .cdm_relationship_discovery_style import CdmRelationshipDiscoveryStyle from .cdm_status_level import CdmStatusLevel from .cdm_validation_step import CdmValidationSte...
30.8125
75
0.827586
from .cdm_attribute_context_type import CdmAttributeContextType from .cdm_data_format import CdmDataFormat from .cdm_object_type import CdmObjectType from .cdm_relationship_discovery_style import CdmRelationshipDiscoveryStyle from .cdm_status_level import CdmStatusLevel from .cdm_validation_step import CdmValidationSte...
true
true
f730cf98d59bd05918ee808444ad2fd2d6821f0d
577
py
Python
app/user/migrations/0026_auto_20170819_0854.py
Sovol2018/sovolo
54250e42b4af3391d2f99690f45b93ab240563c2
[ "MIT" ]
2
2017-06-06T11:34:49.000Z
2017-10-24T13:09:50.000Z
app/user/migrations/0026_auto_20170819_0854.py
Sovol2018/sovolo
54250e42b4af3391d2f99690f45b93ab240563c2
[ "MIT" ]
346
2016-08-09T20:50:57.000Z
2018-08-28T06:52:17.000Z
app/user/migrations/0026_auto_20170819_0854.py
hejob/sovolo
8b73253d7bf0427c7ae0ebb6d8e3d70e118e8427
[ "MIT" ]
3
2017-11-27T14:07:57.000Z
2018-08-13T15:51:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-18 23:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0025_remove_user_user_todo'), ] operations = [ migrations.RenameField( ...
22.192308
48
0.580589
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0025_remove_user_user_todo'), ] operations = [ migrations.RenameField( model_name='skill', old_name='user_todo', ...
true
true
f730cfc2579f214ca1f28d1781de2677a358113d
2,377
py
Python
queue_util/serializers.py
EDITD/queue_util
383267388bcfeb1c8bc0cf749f28d5073b067c1b
[ "MIT" ]
null
null
null
queue_util/serializers.py
EDITD/queue_util
383267388bcfeb1c8bc0cf749f28d5073b067c1b
[ "MIT" ]
21
2015-11-20T14:37:38.000Z
2020-10-05T11:09:22.000Z
queue_util/serializers.py
EDITD/queue_util
383267388bcfeb1c8bc0cf749f28d5073b067c1b
[ "MIT" ]
null
null
null
# kombu v4 will come out with the following commit in: # https://github.com/celery/kombu/commit/010aae8ccf16ad2fa5a9c3d6f3b84b21e1c1677a # which does the same thing, but this also allows us to not have to enable # insecure serializers from datetime import datetime import msgpack import six from kombu.serialization im...
27.964706
94
0.671435
from datetime import datetime import msgpack import six from kombu.serialization import register DATE_FORMAT = '%Y%m%dT%H:%M:%S.%f' MESSAGE_CONTENT_TYPE = 'application/x-unicode-msgpack-with-dates' MESSAGE_CONTENT_ENCODING = 'binary' def decode_datetime(obj): if b'__datetime__' in obj: ob...
true
true
f730cffb583fb3b775af4106c24d4268b0e55606
3,050
py
Python
scripts/logs_analyzer.py
onzehub/onzecurrency
08f82126be349a639a6421463a3d9038761b661f
[ "MIT" ]
null
null
null
scripts/logs_analyzer.py
onzehub/onzecurrency
08f82126be349a639a6421463a3d9038761b661f
[ "MIT" ]
null
null
null
scripts/logs_analyzer.py
onzehub/onzecurrency
08f82126be349a639a6421463a3d9038761b661f
[ "MIT" ]
null
null
null
# Follow every step every server's log has gone through # Formulate a conclusion # Also count blocks # a search function, a 1 file assembler of all log files import os, glob, sys import argparse from datetime import datetime def main(): # Initialize parser parser = argparse.ArgumentParser() # Addi...
32.105263
107
0.612131
# Formulate a conclusion # Also count blocks # a search function, a 1 file assembler of all log files import os, glob, sys import argparse from datetime import datetime def main(): # Initialize parser parser = argparse.ArgumentParser() # Adding optional arguments parser.add_argument("-a", "--...
true
true
f730d0ca0994a465860202a1c7adb5a31237673d
894
py
Python
sentry_sdk/integrations/argv.py
Siecje/sentry-python
d8405491c60c5b7c3d2ec3ed97ab4bea104f4e51
[ "BSD-2-Clause" ]
1
2020-11-02T11:31:01.000Z
2020-11-02T11:31:01.000Z
sentry_sdk/integrations/argv.py
Siecje/sentry-python
d8405491c60c5b7c3d2ec3ed97ab4bea104f4e51
[ "BSD-2-Clause" ]
null
null
null
sentry_sdk/integrations/argv.py
Siecje/sentry-python
d8405491c60c5b7c3d2ec3ed97ab4bea104f4e51
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import import sys from sentry_sdk.hub import Hub from sentry_sdk.integrations import Integration from sentry_sdk.scope import add_global_event_processor if False: from typing import Any from typing import Dict class ArgvIntegration(Integration): identifier = "argv" ...
28.83871
73
0.624161
from __future__ import absolute_import import sys from sentry_sdk.hub import Hub from sentry_sdk.integrations import Integration from sentry_sdk.scope import add_global_event_processor if False: from typing import Any from typing import Dict class ArgvIntegration(Integration): identifier = "argv" ...
true
true
f730d1918786544a8b85c5af03acfaf23f6d5b25
13,005
py
Python
packit/specfile.py
FilipSchad/packit
d57da48c649ed9e0212b6a7ca5fc6428c217bc71
[ "MIT" ]
23
2020-09-03T01:21:57.000Z
2022-03-16T17:06:28.000Z
packit/specfile.py
FilipSchad/packit
d57da48c649ed9e0212b6a7ca5fc6428c217bc71
[ "MIT" ]
642
2020-08-03T06:52:35.000Z
2022-03-31T19:35:38.000Z
packit/specfile.py
FilipSchad/packit
d57da48c649ed9e0212b6a7ca5fc6428c217bc71
[ "MIT" ]
19
2020-08-13T09:55:42.000Z
2022-01-19T20:53:53.000Z
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import inspect import re from logging import getLogger from pathlib import Path from typing import Union, List, Optional, Dict from packit.patches import PatchMetadata from rebasehelper.helpers.macro_helper import MacroHelper from rebasehe...
38.026316
128
0.596463
import inspect import re from logging import getLogger from pathlib import Path from typing import Union, List, Optional, Dict from packit.patches import PatchMetadata from rebasehelper.helpers.macro_helper import MacroHelper from rebasehelper.specfile import SpecFile, RebaseHelperError, saves, PatchObject from reb...
true
true
f730d1cc76d0f5de69d6d7933ece019dfff3c3cf
598
py
Python
setup.py
guate/division-politica
98ecd566dfc5a0417240756e0b085b423f23181b
[ "MIT" ]
null
null
null
setup.py
guate/division-politica
98ecd566dfc5a0417240756e0b085b423f23181b
[ "MIT" ]
2
2015-12-14T20:21:05.000Z
2015-12-16T23:01:21.000Z
setup.py
guate/division-politica
98ecd566dfc5a0417240756e0b085b423f23181b
[ "MIT" ]
2
2015-12-14T20:31:47.000Z
2020-06-03T16:50:28.000Z
from setuptools import setup with open('README.md', 'r') as ld: long_description = ld.read() setup_args = dict( name='guate.division-politica', use_scm_version=True, packages=['guate.division_politica'], include_package_data=True, author='Darwin Monroy', author_email='contact@darwinmonroy....
22.148148
49
0.66388
from setuptools import setup with open('README.md', 'r') as ld: long_description = ld.read() setup_args = dict( name='guate.division-politica', use_scm_version=True, packages=['guate.division_politica'], include_package_data=True, author='Darwin Monroy', author_email='contact@darwinmonroy....
true
true
f730d1d7c471e58cd2224140890fda9894003216
4,612
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.130435
282
0.686904
from .sub_resource_py3 import SubResource class InboundNatRule(SubResource): _validation = { 'backend_ip_configuration': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguratio...
true
true
f730d290273fed913ab812d544850db1a348c0e6
8,101
py
Python
python/pyspark/accumulators.py
yqtaowhu/Spark
a381bce7285ec30f58f28f523dfcfe0c13221bbf
[ "Apache-2.0" ]
25
2020-02-21T20:53:38.000Z
2022-03-03T03:16:31.000Z
python/pyspark/accumulators.py
yqtaowhu/Spark
a381bce7285ec30f58f28f523dfcfe0c13221bbf
[ "Apache-2.0" ]
7
2021-01-21T01:36:00.000Z
2021-04-26T21:01:16.000Z
python/pyspark/accumulators.py
yqtaowhu/Spark
a381bce7285ec30f58f28f523dfcfe0c13221bbf
[ "Apache-2.0" ]
5
2020-03-25T15:55:10.000Z
2021-06-22T01:20:15.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
30.115242
94
0.670658
import sys import select import struct if sys.version < '3': import SocketServer else: import socketserver as SocketServer import threading from pyspark.serializers import read_int, PickleSerializer __all__ = ['Accumulator', 'AccumulatorParam'] pickleSer = PickleSerializer() _accumulato...
true
true
f730d557ff0c45b46669b134b1aeeb556ec7ffa6
2,556
py
Python
src/main.py
WillGITCode/raspberry-robot
b81814be34837f12074774df40cf86b9111be0a6
[ "MIT" ]
null
null
null
src/main.py
WillGITCode/raspberry-robot
b81814be34837f12074774df40cf86b9111be0a6
[ "MIT" ]
null
null
null
src/main.py
WillGITCode/raspberry-robot
b81814be34837f12074774df40cf86b9111be0a6
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO from time import sleep from modules import ping_sensor from modules import motor_board from modules import control_surfaces # create controller gamePad = control_surfaces.XboxController() # Motor board pins motor_board.init_motor_pins([7, 11, 13, 15]) # Ping sensor ping1 = ping_sensor.PingSensor...
35.5
86
0.527387
import RPi.GPIO as GPIO from time import sleep from modules import ping_sensor from modules import motor_board from modules import control_surfaces gamePad = control_surfaces.XboxController() motor_board.init_motor_pins([7, 11, 13, 15]) ping1 = ping_sensor.PingSensor(16) servo1 = 18 def avoid_obstacles(): if ...
true
true
f730d58fe767fb93f47ac9ae884ef0cfe731f30b
381
py
Python
001-100/16/16.py
junwei-wang/project-euler
abd728037e0f73f0f52f2ae4d40d468b307f34de
[ "MIT" ]
null
null
null
001-100/16/16.py
junwei-wang/project-euler
abd728037e0f73f0f52f2ae4d40d468b307f34de
[ "MIT" ]
null
null
null
001-100/16/16.py
junwei-wang/project-euler
abd728037e0f73f0f52f2ae4d40d468b307f34de
[ "MIT" ]
null
null
null
#!/usr/bin/env python from math import log x = 2 y = 1000 # get sum of exp of 2 = y t = y exp = 0 l = list() while y > 0: if y & 1: l.append(exp) exp += 1 y >>= 1 # get mult mult = x # x ^ 1 = x ^ (2^0) cur_exp = 0 res = 1 for exp in l: while cur_exp < exp: mult **= 2 ...
13.137931
36
0.485564
from math import log x = 2 y = 1000 t = y exp = 0 l = list() while y > 0: if y & 1: l.append(exp) exp += 1 y >>= 1 mult = x cur_exp = 0 res = 1 for exp in l: while cur_exp < exp: mult **= 2 cur_exp += 1 res *= mult print sum(map(int, str(res)))
false
true
f730d5a0e8a7dfd1b3a7e4a2eaba92d308f2bc8f
625
py
Python
test/data/outofdate/Makefile.py
ActiveState/mk
2d0afd81ce4e8a3f39885cae5a50ded7bece7f76
[ "MIT" ]
2
2015-12-21T22:35:16.000Z
2017-08-29T14:47:38.000Z
test/data/outofdate/Makefile.py
ActiveState/mk
2d0afd81ce4e8a3f39885cae5a50ded7bece7f76
[ "MIT" ]
1
2020-05-14T12:59:01.000Z
2020-12-11T18:34:07.000Z
test/data/outofdate/Makefile.py
ActiveState/mk
2d0afd81ce4e8a3f39885cae5a50ded7bece7f76
[ "MIT" ]
null
null
null
import os import shutil import time from mklib import Task from mklib.common import relpath class foo(Task): default = True results = ["foo.txt"] deps = ["bar.txt"] def make(self): src = self.deps[0].path dst = self.results[0].path self.log.info("cp %s %s", relpath(src), relpat...
21.551724
61
0.552
import os import shutil import time from mklib import Task from mklib.common import relpath class foo(Task): default = True results = ["foo.txt"] deps = ["bar.txt"] def make(self): src = self.deps[0].path dst = self.results[0].path self.log.info("cp %s %s", relpath(src), relpat...
true
true
f730d5bf2e956011187143d53e9143c85a16e283
72
py
Python
QPublic/__init__.py
Quantamatics/QPublic
4591125626755ae3f0b6d71c8e275adb79c21d10
[ "MIT" ]
null
null
null
QPublic/__init__.py
Quantamatics/QPublic
4591125626755ae3f0b6d71c8e275adb79c21d10
[ "MIT" ]
null
null
null
QPublic/__init__.py
Quantamatics/QPublic
4591125626755ae3f0b6d71c8e275adb79c21d10
[ "MIT" ]
null
null
null
from __future__ import absolute_import from QPublic import (MarketData)
24
38
0.861111
from __future__ import absolute_import from QPublic import (MarketData)
true
true
f730d81cd96a012f361da653f7b9e5d5f24304f6
1,281
py
Python
mlearning2.py
tobiasaditya/datascience_beginner
fa6868073951259e0a5f8a702de0bcc17c13d295
[ "MIT" ]
null
null
null
mlearning2.py
tobiasaditya/datascience_beginner
fa6868073951259e0a5f8a702de0bcc17c13d295
[ "MIT" ]
null
null
null
mlearning2.py
tobiasaditya/datascience_beginner
fa6868073951259e0a5f8a702de0bcc17c13d295
[ "MIT" ]
null
null
null
import seaborn as sb import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn import metrics person = {'finances':[1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,7,4,1,8,5,2,9,6,3,9,8,7,6,5,4,3,2,1,1,9,7,3,8,2,7], ...
34.621622
106
0.673692
import seaborn as sb import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn import metrics person = {'finances':[1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,7,4,1,8,5,2,9,6,3,9,8,7,6,5,4,3,2,1,1,9,7,3,8,2,7], ...
true
true
f730d894d50aaa291f54e9162a0aec5485653323
5,761
py
Python
main.py
evlko/ICTonBot
f0bd4436c11f8907281671aa15969f13781c3d33
[ "MIT" ]
1
2020-11-22T09:41:20.000Z
2020-11-22T09:41:20.000Z
main.py
evlko/ICTonBot
f0bd4436c11f8907281671aa15969f13781c3d33
[ "MIT" ]
null
null
null
main.py
evlko/ICTonBot
f0bd4436c11f8907281671aa15969f13781c3d33
[ "MIT" ]
1
2020-11-24T17:44:59.000Z
2020-11-24T17:44:59.000Z
import time import telebot import components.config as config import components.dialogs as dialogs from components.config import UserState from components.core import bot, logger from components.database.dbworker import DatabaseWorker from components.dialogs import DialogEvent from data.subject_list import subject_lis...
41.746377
115
0.720361
import time import telebot import components.config as config import components.dialogs as dialogs from components.config import UserState from components.core import bot, logger from components.database.dbworker import DatabaseWorker from components.dialogs import DialogEvent from data.subject_list import subject_lis...
true
true
f730d915401357d800d6479065f4d905aeb50b81
1,048
py
Python
examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
51
2018-11-11T12:47:38.000Z
2022-03-06T08:39:43.000Z
examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
2
2019-11-15T03:21:45.000Z
2020-09-10T11:53:58.000Z
examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
14
2018-12-12T09:12:14.000Z
2021-10-17T14:30:25.000Z
#add parent dir to find package. Only needed for source code build, pip install doesn't need it. import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0,parentdir) import gym from pybullet_en...
26.2
96
0.68416
import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0,parentdir) import gym from pybullet_envs.bullet.cartpole_bullet import CartPoleBulletEnv from baselines import deepq def callback(l...
true
true
f730d987678190ed5d27c075040ca4013481b942
7,805
py
Python
dev/enas/search_space/enas_search_space.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
null
null
null
dev/enas/search_space/enas_search_space.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
null
null
null
dev/enas/search_space/enas_search_space.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
null
null
null
""" Search space from Efficient Neural Architecture Search (Pham'17) """ from __future__ import print_function from builtins import str from builtins import range from builtins import object from collections import OrderedDict import tensorflow as tf import numpy as np from deep_architect.helpers import tensorflow_ea...
36.471963
80
0.556054
from __future__ import print_function from builtins import str from builtins import range from builtins import object from collections import OrderedDict import tensorflow as tf import numpy as np from deep_architect.helpers import tensorflow_eager_support as htfe from deep_architect.hyperparameters import D from dev...
true
true
f730da02becc00411ae503923f2d15f5e8664061
15,428
py
Python
api/models/taco_models/fatchord_version.py
elainevoice/backend
9b5fef59001fd6c2040affc80cd5cb9690c73795
[ "Apache-2.0" ]
3
2020-12-28T16:45:56.000Z
2021-12-18T08:38:29.000Z
api/models/taco_models/fatchord_version.py
elainevoice/backend
9b5fef59001fd6c2040affc80cd5cb9690c73795
[ "Apache-2.0" ]
1
2020-12-14T13:09:42.000Z
2020-12-14T13:09:42.000Z
api/models/taco_models/fatchord_version.py
elainevoice/backend
9b5fef59001fd6c2040affc80cd5cb9690c73795
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from api.models.utils.distribution import sample_from_discretized_mix_logistic from api.models.utils.display import * from api.models.utils.dsp import * import os import numpy as np from pathlib import Path from typing import Union class ResBlock(nn.M...
35.143508
113
0.565401
import torch import torch.nn as nn import torch.nn.functional as F from api.models.utils.distribution import sample_from_discretized_mix_logistic from api.models.utils.display import * from api.models.utils.dsp import * import os import numpy as np from pathlib import Path from typing import Union class ResBlock(nn.M...
true
true
f730daa97bd0bc4461d40eeb73adb796aceb822a
6,036
py
Python
micropython/neolamp/neolamp/api.py
hydronics2/esp8266
cdd72145ce94bdcbbabb52429c5c160f73ce4207
[ "BSD-2-Clause" ]
68
2016-11-27T18:10:35.000Z
2021-12-19T16:41:43.000Z
micropython/neolamp/neolamp/api.py
hydronics2/esp8266
cdd72145ce94bdcbbabb52429c5c160f73ce4207
[ "BSD-2-Clause" ]
21
2017-01-03T12:23:22.000Z
2022-01-06T16:19:25.000Z
micropython/neolamp/neolamp/api.py
hydronics2/esp8266
cdd72145ce94bdcbbabb52429c5c160f73ce4207
[ "BSD-2-Clause" ]
34
2017-01-06T16:54:45.000Z
2021-12-17T10:11:13.000Z
# # Copyright (c) dushin.net All Rights Reserved # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the foll...
45.383459
133
0.610007
import logging import uhttpd class Handler : def __init__(self, controller, verbose=False): self.controller = controller self.verbose = verbose def get(self, api_request): context = api_request['context'] if len(context) > 0 : if contex...
true
true
f730dae3cf13445bce8f10c0034724f7175109a5
32,617
py
Python
tests/components/automation/test_sun.py
squirrel289/core
6c5bcbfc3ee40927458e9188d6b79bf63933d3f9
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
tests/components/sun/test_trigger.py
SicAriuSx83/core
162c39258e68ae42fe4e1560ae91ed54f5662409
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
tests/components/sun/test_trigger.py
SicAriuSx83/core
162c39258e68ae42fe4e1560ae91ed54f5662409
[ "Apache-2.0" ]
3
2020-10-18T07:08:40.000Z
2021-06-21T02:26:00.000Z
"""The tests for the sun automation.""" from datetime import datetime import pytest from homeassistant.components import sun import homeassistant.components.automation as automation from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.setup import async_setup_component import homeass...
38.645735
86
0.616366
from datetime import datetime import pytest from homeassistant.components import sun import homeassistant.components.automation as automation from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.setup import async_setup_component import homeassistant.util.dt as dt_util from tests.as...
true
true
f730db018b5a100d3b9690cd2c3518425836dcfb
2,353
py
Python
setup.py
wdv4758h/rsglob
342f950c240b5d84c629ecf4fec348401975d2ba
[ "BSD-2-Clause" ]
null
null
null
setup.py
wdv4758h/rsglob
342f950c240b5d84c629ecf4fec348401975d2ba
[ "BSD-2-Clause" ]
null
null
null
setup.py
wdv4758h/rsglob
342f950c240b5d84c629ecf4fec348401975d2ba
[ "BSD-2-Clause" ]
null
null
null
import os import sys from setuptools import find_packages, setup, Extension try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements try: from setuptools_rust import RustExtension except ImportError: import subprocess errno...
30.960526
83
0.677008
import os import sys from setuptools import find_packages, setup, Extension try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements try: from setuptools_rust import RustExtension except ImportError: import subprocess errno = subprocess.c...
true
true
f730db449a2b60d8fb643fdf8902b444b885c8dd
8,163
py
Python
tests/sentry/models/test_group.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
tests/sentry/models/test_group.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/models/test_group.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from datetime import timedelta import pytest from django.db.models import ProtectedError from django.utils import timezone from sentry.models import ( Group, GroupRedirect, GroupSnooze, GroupStatus, Release, get_group_with_redirect, ) from sentry.testuti...
36.119469
99
0.665932
from __future__ import absolute_import from datetime import timedelta import pytest from django.db.models import ProtectedError from django.utils import timezone from sentry.models import ( Group, GroupRedirect, GroupSnooze, GroupStatus, Release, get_group_with_redirect, ) from sentry.testuti...
true
true
f730dc094d5bd9f4ac6d2d6e6904d61429656ce2
944
py
Python
fuzzer/handling_module.py
junorouse/dynamic-fuzzer
7cb82c56da776211458338771854ecf7071ca1e7
[ "MIT" ]
17
2017-02-20T02:06:05.000Z
2022-02-23T03:07:22.000Z
fuzzer/handling_module.py
junorouse/dynamic-fuzzer
7cb82c56da776211458338771854ecf7071ca1e7
[ "MIT" ]
6
2017-02-09T06:15:34.000Z
2020-10-02T05:42:25.000Z
fuzzer/handling_module.py
junorouse/dynamic-fuzzer
7cb82c56da776211458338771854ecf7071ca1e7
[ "MIT" ]
2
2019-09-22T01:19:32.000Z
2020-05-20T01:56:53.000Z
import importlib from json import loads from base64 import b64decode import sys import gevent.monkey gevent.monkey.patch_all() import gevent import config from os import getpid from requests import post def fetch(module): global message m = importlib.import_module('modules.'+module) m.go(message) def ...
20.085106
117
0.616525
import importlib from json import loads from base64 import b64decode import sys import gevent.monkey gevent.monkey.patch_all() import gevent import config from os import getpid from requests import post def fetch(module): global message m = importlib.import_module('modules.'+module) m.go(message) def ...
true
true
f730dded7d098ef55bd8cd83fe02c10e14f1e36a
16,100
py
Python
dynamic_selection/trainer/archive/svd_classifier.py
Kthyeon/FINE
ae8a24a4a2514feafd9a9ed394af87f397708ccf
[ "MIT" ]
2
2021-12-22T02:25:00.000Z
2022-01-06T09:33:11.000Z
dynamic_selection/trainer/archive/svd_classifier.py
Kthyeon/FINE
ae8a24a4a2514feafd9a9ed394af87f397708ccf
[ "MIT" ]
null
null
null
dynamic_selection/trainer/archive/svd_classifier.py
Kthyeon/FINE
ae8a24a4a2514feafd9a9ed394af87f397708ccf
[ "MIT" ]
2
2021-10-01T14:39:06.000Z
2022-01-06T09:33:12.000Z
import torch import numpy as np from tqdm import tqdm from sklearn import cluster #bol_norm True -> Divide by norm of feature def same_score(v_ortho_dict, features, labels, bol_norm=False): features = torch.from_numpy(features).cuda() scores = torch.zeros(features.shape[0]) for indx, feat in enumerate...
39.655172
126
0.646149
import torch import numpy as np from tqdm import tqdm from sklearn import cluster def same_score(v_ortho_dict, features, labels, bol_norm=False): features = torch.from_numpy(features).cuda() scores = torch.zeros(features.shape[0]) for indx, feat in enumerate(features): tmp_scores = torch.dot(...
true
true
f730de9b8bc194c6a46cc963b869fd564ac8a7d0
752
py
Python
doc_finder/urls.py
sandipan1/document_finder
e867868e8d2ec96c8034e0a23bf28d75b38eca6e
[ "Apache-2.0" ]
null
null
null
doc_finder/urls.py
sandipan1/document_finder
e867868e8d2ec96c8034e0a23bf28d75b38eca6e
[ "Apache-2.0" ]
null
null
null
doc_finder/urls.py
sandipan1/document_finder
e867868e8d2ec96c8034e0a23bf28d75b38eca6e
[ "Apache-2.0" ]
null
null
null
"""doc_finder URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
34.181818
77
0.710106
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f730ded6c31e174a53ff3335e49d999b7bc074f2
718
py
Python
src/commands/__init__.py
darklab8/darklab_darkbot
2a6bb2f1a423989f3fce18371eb07f56c9e98bcd
[ "MIT" ]
1
2022-03-17T05:55:56.000Z
2022-03-17T05:55:56.000Z
src/commands/__init__.py
darklab8/darklab_darkbot
2a6bb2f1a423989f3fce18371eb07f56c9e98bcd
[ "MIT" ]
1
2022-02-23T11:31:43.000Z
2022-02-23T11:31:43.000Z
src/commands/__init__.py
darklab8/darklab_darkbot
2a6bb2f1a423989f3fce18371eb07f56c9e98bcd
[ "MIT" ]
null
null
null
from discord.ext import commands from .root import attach_root from .base import attach_base from .system import attach_system from .region import attach_region from .friend import attach_friend from .enemy import attach_enemy from .unrecognized import attach_unrecognized from .forum import attach_forum def attach_co...
31.217391
70
0.768802
from discord.ext import commands from .root import attach_root from .base import attach_base from .system import attach_system from .region import attach_region from .friend import attach_friend from .enemy import attach_enemy from .unrecognized import attach_unrecognized from .forum import attach_forum def attach_co...
true
true
f730def843346a0a824d97dd5d8478aa29af6a02
114
py
Python
OnlySnarf/src/elements/__init__.py
sec-js/onlysnarf
c8c32abb5d6b22c08fc7e29b41211530fb583b85
[ "MIT" ]
null
null
null
OnlySnarf/src/elements/__init__.py
sec-js/onlysnarf
c8c32abb5d6b22c08fc7e29b41211530fb583b85
[ "MIT" ]
null
null
null
OnlySnarf/src/elements/__init__.py
sec-js/onlysnarf
c8c32abb5d6b22c08fc7e29b41211530fb583b85
[ "MIT" ]
null
null
null
from .driver import ELEMENTS as driverElements from .profile import ELEMENTS as profileElements # from . import *
28.5
48
0.807018
from .driver import ELEMENTS as driverElements from .profile import ELEMENTS as profileElements
true
true
f730df351880e20d36330b8671d36979568d9b3b
1,894
py
Python
src/cicd/utils/config.py
szn/snowflake-cicd
63350c2e0a3dda77969371c07189cc00073799a8
[ "MIT" ]
1
2022-01-17T20:31:40.000Z
2022-01-17T20:31:40.000Z
src/cicd/utils/config.py
szn/snowflake-cicd
63350c2e0a3dda77969371c07189cc00073799a8
[ "MIT" ]
null
null
null
src/cicd/utils/config.py
szn/snowflake-cicd
63350c2e0a3dda77969371c07189cc00073799a8
[ "MIT" ]
null
null
null
import configparser import functools from os import path from pathlib import Path class Config(): """Config wrapper that reads global config and user config.""" PROJECT_ROOT = path.join(path.dirname(path.realpath(__file__)), '..') CONFIG_INI = path.join(PROJECT_ROOT, 'config.ini') HOME_DIR = Path.hom...
35.735849
114
0.6283
import configparser import functools from os import path from pathlib import Path class Config(): PROJECT_ROOT = path.join(path.dirname(path.realpath(__file__)), '..') CONFIG_INI = path.join(PROJECT_ROOT, 'config.ini') HOME_DIR = Path.home() CONN_INI = path.join(HOME_DIR, '.snowflake-cicd.ini') ...
true
true
f730dfaef937c0ed1212f93f8a13aa36e4deb679
2,312
py
Python
app/views/users/messages/views.py
dandye/DjanGoat
72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d
[ "MIT" ]
65
2017-08-18T15:12:03.000Z
2021-08-14T16:50:07.000Z
app/views/users/messages/views.py
dandye/DjanGoat
72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d
[ "MIT" ]
83
2017-11-28T21:45:20.000Z
2021-11-02T18:52:52.000Z
app/views/users/messages/views.py
dandye/DjanGoat
72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d
[ "MIT" ]
71
2017-08-17T14:58:01.000Z
2022-02-02T17:09:49.000Z
from __future__ import unicode_literals from django.http import HttpResponse from django.contrib import messages from django.views.decorators.http import require_http_methods from django.shortcuts import render, redirect from django.utils import timezone from app.decorators import user_is_authenticated from app.model...
37.290323
75
0.62846
from __future__ import unicode_literals from django.http import HttpResponse from django.contrib import messages from django.views.decorators.http import require_http_methods from django.shortcuts import render, redirect from django.utils import timezone from app.decorators import user_is_authenticated from app.model...
true
true
f730e068ae999111bb773778e3014d2a1af34e42
5,643
py
Python
stats_csv_latency.py
maria-kuruvilla/temp_collective_new
c45b72cee7c17072507eb67790d1699f5684098a
[ "MIT" ]
null
null
null
stats_csv_latency.py
maria-kuruvilla/temp_collective_new
c45b72cee7c17072507eb67790d1699f5684098a
[ "MIT" ]
null
null
null
stats_csv_latency.py
maria-kuruvilla/temp_collective_new
c45b72cee7c17072507eb67790d1699f5684098a
[ "MIT" ]
null
null
null
""" Goal - to produce a csv file with temp, gs rep, loom and latency """ import os import pathlib from pprint import pprint import numpy as np from scipy import stats from scipy.spatial import distance import matplotlib.pyplot as plt from matplotlib.pyplot import figure import trajectorytools as tt import trajector...
32.618497
181
0.606238
import os import pathlib from pprint import pprint import numpy as np from scipy import stats from scipy.spatial import distance import matplotlib.pyplot as plt from matplotlib.pyplot import figure import trajectorytools as tt import trajectorytools.plot as ttplot import trajectorytools.socialcontext as ttsocial fro...
true
true
f730e06a010416203fc8fedf3c5013230e453033
300
py
Python
0-notes/job-search/Cracking_the_Coding_Interview/C03StacksQueues/questions/3.5-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C03StacksQueues/questions/3.5-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C03StacksQueues/questions/3.5-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# 3.5 Sort Stack # Write a program to sort a stack such that the smallest items are on top. # You can use an additional temporary stack, but you may not copy the elements into # any other data structure such as an array. # The stack supports the following operations: push, pop, peek, and isEmpty.
42.857143
83
0.756667
true
true
f730e09591819247a3e35ea00055913be97dcb22
44,059
py
Python
prometheus_client/core.py
canonical-ols/client_python
3088bc14d419d4f54efd2a4ea12469eedbfa0a37
[ "Apache-2.0" ]
null
null
null
prometheus_client/core.py
canonical-ols/client_python
3088bc14d419d4f54efd2a4ea12469eedbfa0a37
[ "Apache-2.0" ]
null
null
null
prometheus_client/core.py
canonical-ols/client_python
3088bc14d419d4f54efd2a4ea12469eedbfa0a37
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from __future__ import unicode_literals from collections import namedtuple import copy import json import math import mmap import os import re import struct import sys from threading import Lock import time from timeit import default_timer import types from .decorator import decorate if sys.versio...
33.302343
142
0.599582
from __future__ import unicode_literals from collections import namedtuple import copy import json import math import mmap import os import re import struct import sys from threading import Lock import time from timeit import default_timer import types from .decorator import decorate if sys.version_info > (3,): ...
true
true
f730e0c9b1f31a3eee78a5557358da4420318669
4,761
py
Python
sauronlab/model/audio.py
dmyersturnbull/sauronlab
c458b622efd3cb70c2547ec64ea9d11c293ab8f6
[ "Apache-2.0" ]
null
null
null
sauronlab/model/audio.py
dmyersturnbull/sauronlab
c458b622efd3cb70c2547ec64ea9d11c293ab8f6
[ "Apache-2.0" ]
73
2021-02-03T21:32:44.000Z
2022-03-28T05:14:24.000Z
sauronlab/model/audio.py
dmyersturnbull/sauronlab
c458b622efd3cb70c2547ec64ea9d11c293ab8f6
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from dataclasses import dataclass import pydub from sauronlab.core.core_imports import * class AudioTools: """ """ @classmethod def save( cls, audio_segment: pydub.AudioSegment, path: PathLike, audio_format: str = "flac" ) -> None: path = Tools.pr...
28.508982
99
0.568788
from __future__ import annotations from dataclasses import dataclass import pydub from sauronlab.core.core_imports import * class AudioTools: @classmethod def save( cls, audio_segment: pydub.AudioSegment, path: PathLike, audio_format: str = "flac" ) -> None: path = Tools.prepped_file(p...
true
true
f730e1135c8fea9159d94e87c994c3afdad3a26d
961
py
Python
neurokit2/ecg/__init__.py
kassyray/NeuroKit
b84d110a71d5d17c0d1efde0d60d00446fda16cb
[ "MIT" ]
null
null
null
neurokit2/ecg/__init__.py
kassyray/NeuroKit
b84d110a71d5d17c0d1efde0d60d00446fda16cb
[ "MIT" ]
null
null
null
neurokit2/ecg/__init__.py
kassyray/NeuroKit
b84d110a71d5d17c0d1efde0d60d00446fda16cb
[ "MIT" ]
null
null
null
"""Submodule for NeuroKit.""" # Aliases from ..signal import signal_rate as ecg_rate from .ecg_analyze import ecg_analyze from .ecg_clean import ecg_clean from .ecg_delineate import ecg_delineate from .ecg_eventrelated import ecg_eventrelated from .ecg_findpeaks import ecg_findpeaks from .ecg_intervalrelated import ec...
24.025
52
0.756504
from ..signal import signal_rate as ecg_rate from .ecg_analyze import ecg_analyze from .ecg_clean import ecg_clean from .ecg_delineate import ecg_delineate from .ecg_eventrelated import ecg_eventrelated from .ecg_findpeaks import ecg_findpeaks from .ecg_intervalrelated import ecg_intervalrelated from .ecg_peaks impor...
true
true
f730e11872186a9944e9e1f5e54f6d220b4f6018
889
py
Python
user/admin.py
cxq1/c
52507017f676b4ebed561581ced0d4edf15cdc70
[ "MIT" ]
1
2019-03-22T05:54:24.000Z
2019-03-22T05:54:24.000Z
user/admin.py
cxq1/c
52507017f676b4ebed561581ced0d4edf15cdc70
[ "MIT" ]
4
2021-04-08T18:40:39.000Z
2021-06-10T17:40:34.000Z
user/admin.py
cxq1/c
52507017f676b4ebed561581ced0d4edf15cdc70
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import Profile,OAuthRelationship class ProfileInline(admin.StackedInline): model = Profile can_delete = False class UserAdmin(BaseUserAdmin): ...
31.75
94
0.735658
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import Profile,OAuthRelationship class ProfileInline(admin.StackedInline): model = Profile can_delete = False class UserAdmin(BaseUserAdmin): ...
true
true
f730e24212521f633f0af8ecc5da5663ec75c84c
215
py
Python
setup.py
patrickwest/mgx-sim
f1457540dedf72076478f1af8765bb4d1ab197e9
[ "BSD-3-Clause" ]
null
null
null
setup.py
patrickwest/mgx-sim
f1457540dedf72076478f1af8765bb4d1ab197e9
[ "BSD-3-Clause" ]
null
null
null
setup.py
patrickwest/mgx-sim
f1457540dedf72076478f1af8765bb4d1ab197e9
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name="mgxsim", version="0.0.1", description="metagenomics utils.", packages=["mgxsim"], install_requires = [ "biopython", "pandas", ], )
15.357143
38
0.572093
from setuptools import setup setup( name="mgxsim", version="0.0.1", description="metagenomics utils.", packages=["mgxsim"], install_requires = [ "biopython", "pandas", ], )
true
true
f730e2ab3a729344733257366e77e28fa9f64056
321
py
Python
goetia/__init__.py
camillescott/goetia
677e3ef028be6b70a2dacbcf7a4e83f4bb9fdf9a
[ "MIT" ]
3
2020-02-27T00:53:02.000Z
2021-03-09T06:26:48.000Z
goetia/__init__.py
camillescott/goetia
677e3ef028be6b70a2dacbcf7a4e83f4bb9fdf9a
[ "MIT" ]
1
2022-03-24T22:47:49.000Z
2022-03-24T22:47:49.000Z
goetia/__init__.py
camillescott/goetia
677e3ef028be6b70a2dacbcf7a4e83f4bb9fdf9a
[ "MIT" ]
null
null
null
import os import cppyy from .initializor import initialize with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'VERSION')) as fp: __version__ = fp.read().strip() initialize('goetia', 'libgoetiaCppyy.so', 'goetia.map') del initialize from goetia import goetia as libgoetia from cppyy import nullptr...
22.928571
85
0.760125
import os import cppyy from .initializor import initialize with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'VERSION')) as fp: __version__ = fp.read().strip() initialize('goetia', 'libgoetiaCppyy.so', 'goetia.map') del initialize from goetia import goetia as libgoetia from cppyy import nullptr...
true
true
f730e2bdc6d22911b0eead0f336abb6bd7a95a50
6,476
py
Python
app/lib/hydrofunctions/typing.py
edgewize/django-dashboard-dattaable
1d8d02425ea77c248d2987f29e545bd97c62da77
[ "MIT" ]
null
null
null
app/lib/hydrofunctions/typing.py
edgewize/django-dashboard-dattaable
1d8d02425ea77c248d2987f29e545bd97c62da77
[ "MIT" ]
4
2020-04-11T16:34:58.000Z
2021-06-02T01:26:35.000Z
app/lib/hydrofunctions/typing.py
edgewize/django-dashboard-dattaable
1d8d02425ea77c248d2987f29e545bd97c62da77
[ "MIT" ]
null
null
null
""" hydrofunctions.typing ~~~~~~~~~~~~~~~~~~~~~ This module contains functions for testing that user input is valid. Why 'pre-check' user imputs, instead of using standard python duck typing? These functions are meant to enhance an interactive session for the user, and will check a user's parameters before r...
40.987342
114
0.61782
from __future__ import absolute_import, print_function, division, unicode_literals import re def check_parameter_string(candidate, param): parameters = { "site": "NWIS station id(s) should be a string or list of strings," + "often in the form of an eight digit number enclosed in quotes.", ...
true
true
f730e4028c13ff210cb1005b2bee0aebae3b584f
592
py
Python
scripts/create_model_vs_data_txt.py
phenix-project/phenix_html
a56f221c450590abfd2f0d03737c582c8ac5e563
[ "BSD-3-Clause" ]
null
null
null
scripts/create_model_vs_data_txt.py
phenix-project/phenix_html
a56f221c450590abfd2f0d03737c582c8ac5e563
[ "BSD-3-Clause" ]
null
null
null
scripts/create_model_vs_data_txt.py
phenix-project/phenix_html
a56f221c450590abfd2f0d03737c582c8ac5e563
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import mmtbx.model_vs_data import libtbx.load_env from six.moves import cStringIO as StringIO import os.path as op import os import sys def run(): html_dir = libtbx.env.find_in_repositories(relative_path="phenix_html") dest_dir = op.join(html_dir, "rst_files", "reference") l...
28.190476
74
0.738176
from __future__ import print_function import mmtbx.model_vs_data import libtbx.load_env from six.moves import cStringIO as StringIO import os.path as op import os import sys def run(): html_dir = libtbx.env.find_in_repositories(relative_path="phenix_html") dest_dir = op.join(html_dir, "rst_files", "reference") l...
true
true
f730e40e6191fecbd2be8442259456de0521ad96
2,298
py
Python
tests/ui/test_home.py
adele-angel/selenium-test-automation
23aac2e195883ea72cf0f2668cdb7cedd885ec24
[ "MIT" ]
null
null
null
tests/ui/test_home.py
adele-angel/selenium-test-automation
23aac2e195883ea72cf0f2668cdb7cedd885ec24
[ "MIT" ]
null
null
null
tests/ui/test_home.py
adele-angel/selenium-test-automation
23aac2e195883ea72cf0f2668cdb7cedd885ec24
[ "MIT" ]
null
null
null
import pytest import allure from config.credentials import Credentials from framework.pages.HomePage import HomePage from infra.screenshot_generator import get_screenshot from infra.shared_steps import SharedSteps from infra.string_util import identifier_generator @allure.title('Test navigation into "New Project" pag...
38.949153
147
0.755004
import pytest import allure from config.credentials import Credentials from framework.pages.HomePage import HomePage from infra.screenshot_generator import get_screenshot from infra.shared_steps import SharedSteps from infra.string_util import identifier_generator @allure.title('Test navigation into "New Project" pag...
true
true
f730e509a5cb334c83d0d7e50b92c0635bdffed4
782
py
Python
dataset/wrapped_dataloader.py
Aquarium1222/Electricity-Forecasting
9f945d3fd8006e5d77da08ff7861577965109ec8
[ "MIT" ]
null
null
null
dataset/wrapped_dataloader.py
Aquarium1222/Electricity-Forecasting
9f945d3fd8006e5d77da08ff7861577965109ec8
[ "MIT" ]
null
null
null
dataset/wrapped_dataloader.py
Aquarium1222/Electricity-Forecasting
9f945d3fd8006e5d77da08ff7861577965109ec8
[ "MIT" ]
null
null
null
from dataset.electric_dataloader import ElectricDataloader from dataset.preprocessor import Preprocessor class WrappedDataloader: def __init__(self, dataloader, func): self.dataloader = dataloader self.func = func def __len__(self): return len(self.dataloader) def __iter__(self):...
26.066667
58
0.742967
from dataset.electric_dataloader import ElectricDataloader from dataset.preprocessor import Preprocessor class WrappedDataloader: def __init__(self, dataloader, func): self.dataloader = dataloader self.func = func def __len__(self): return len(self.dataloader) def __iter__(self):...
true
true
f730e637b6cdd9ca1951b596c2df73147bceb07c
13,442
py
Python
mlir/test/python/integration/dialects/linalg/opsrun.py
mgehre-xlx/sycl
2086745509ef4bc298d7bbec402a123dae68f25e
[ "Apache-2.0" ]
61
2019-04-12T18:49:57.000Z
2022-03-19T22:23:16.000Z
mlir/test/python/integration/dialects/linalg/opsrun.py
mgehre-xlx/sycl
2086745509ef4bc298d7bbec402a123dae68f25e
[ "Apache-2.0" ]
127
2019-04-09T00:55:50.000Z
2022-03-21T15:35:41.000Z
mlir/test/python/integration/dialects/linalg/opsrun.py
mgehre-xlx/sycl
2086745509ef4bc298d7bbec402a123dae68f25e
[ "Apache-2.0" ]
10
2019-04-02T18:25:40.000Z
2022-02-15T07:11:37.000Z
# RUN: %PYTHON %s 2>&1 | FileCheck %s import ctypes import sys from mlir.ir import * from mlir.dialects import builtin from mlir.dialects import linalg from mlir.dialects import std from mlir.passmanager import * from mlir.execution_engine import * # Log everything to stderr and flush so that we have a unified strea...
30.411765
79
0.651912
import ctypes import sys from mlir.ir import * from mlir.dialects import builtin from mlir.dialects import linalg from mlir.dialects import std from mlir.passmanager import * from mlir.execution_engine import * def log(*args): print(*args, file=sys.stderr) sys.stderr.flush() matmul_boiler = """ func @main()...
true
true
f730e7211dcf7013c3950efeeb1f7cb0ef3dae31
316
py
Python
webdemo/api/controllers/root.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
webdemo/api/controllers/root.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
webdemo/api/controllers/root.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
from pecan import rest from wsme import types as wtypes from webdemo.api.controllers.v1 import controller as v1_controller from webdemo.api import expose class RootController(rest.RestController): v1 = v1_controller.V1Controller() @expose.expose(wtypes.text) def get(self): return "webdemo"
21.066667
66
0.756329
from pecan import rest from wsme import types as wtypes from webdemo.api.controllers.v1 import controller as v1_controller from webdemo.api import expose class RootController(rest.RestController): v1 = v1_controller.V1Controller() @expose.expose(wtypes.text) def get(self): return "webdemo"
true
true
f730e75319233d0ac8ad0b52753232168804b1d8
13,463
py
Python
pyinduct/parabolic/general.py
pyinduct/pyinduct
f743ecfcee3b940505ec95b48fa07bb1648cfcc1
[ "BSD-3-Clause" ]
1
2017-01-26T14:26:55.000Z
2017-01-26T14:26:55.000Z
pyinduct/parabolic/general.py
pyinduct/pyinduct
f743ecfcee3b940505ec95b48fa07bb1648cfcc1
[ "BSD-3-Clause" ]
89
2017-01-31T12:52:18.000Z
2020-12-14T23:31:53.000Z
pyinduct/parabolic/general.py
pyinduct/pyinduct
f743ecfcee3b940505ec95b48fa07bb1648cfcc1
[ "BSD-3-Clause" ]
5
2017-01-26T14:35:41.000Z
2018-10-23T06:52:32.000Z
from collections.abc import Callable import warnings import numpy as np from scipy.optimize import fsolve from ..core import Function, find_roots, ConstantFunction from ..eigenfunctions import SecondOrderOperator from ..placeholder import (ScalarFunction, TestFunction, FieldVariable, ScalarTerm, ...
34.609254
113
0.587016
from collections.abc import Callable import warnings import numpy as np from scipy.optimize import fsolve from ..core import Function, find_roots, ConstantFunction from ..eigenfunctions import SecondOrderOperator from ..placeholder import (ScalarFunction, TestFunction, FieldVariable, ScalarTerm, ...
true
true
f730e7ff83b04baa1e0997a21573175be97d9f24
13,185
py
Python
account/migrations/0011_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
account/migrations/0011_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
account/migrations/0011_initial.py
Amechi101/indieapp
606c1346f65c343eb2cc8f7fba9d555b8c30a7fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Account' db.create_table(u'account_account', ( ...
68.316062
195
0.593174
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table(u'account_account', ( (u'id', self.gf('django.db.models.fields.Auto...
true
true
f730e8f89e65c95d296e2cde955fa32203c26f03
11,449
py
Python
litex/build/efinix/ifacewriter.py
andykitchen/litex
85d6cb4b8df98730bd83b412dff6108df188bbb4
[ "ADSL" ]
null
null
null
litex/build/efinix/ifacewriter.py
andykitchen/litex
85d6cb4b8df98730bd83b412dff6108df188bbb4
[ "ADSL" ]
null
null
null
litex/build/efinix/ifacewriter.py
andykitchen/litex
85d6cb4b8df98730bd83b412dff6108df188bbb4
[ "ADSL" ]
1
2022-02-11T01:07:07.000Z
2022-02-11T01:07:07.000Z
# # This file is part of LiteX. # # Copyright (c) 2021 Franck Jullien <franck.jullien@collshade.fr> # SPDX-License-Identifier: BSD-2-Clause import os import csv import re import datetime from xml.dom import expatbuilder import xml.etree.ElementTree as et from litex.build import tools namespaces = { "efxpt" : "h...
40.17193
159
0.537427
import os import csv import re import datetime from xml.dom import expatbuilder import xml.etree.ElementTree as et from litex.build import tools namespaces = { "efxpt" : "http://www.efinixinc.com/peri_design_db", "xi" : "http://www.w3.org/2001/XInclude" } class InterfaceWriterBlock(dict): def...
true
true
f730ec2bfb3b16a954fec00652bacff3f553b828
4,007
py
Python
totem/TotemModel.py
amonmillner/playfulportfolio
d848d9c87d28fd9930c50e44cd7c5f4cdd2db93d
[ "MIT" ]
1
2019-04-22T18:50:52.000Z
2019-04-22T18:50:52.000Z
totem/TotemModel.py
amonmillner/playfulportfolio
d848d9c87d28fd9930c50e44cd7c5f4cdd2db93d
[ "MIT" ]
null
null
null
totem/TotemModel.py
amonmillner/playfulportfolio
d848d9c87d28fd9930c50e44cd7c5f4cdd2db93d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created April 2019 @author: Amon Millner This is a module that contains a class that serves as a model for the totem game built, which is an example of the Model-View-Controller (MVC) framework. """ import pygame, copy from pygame.locals import * import random class TotemModel(object): ...
38.902913
88
0.572498
import pygame, copy from pygame.locals import * import random class TotemModel(object): def __init__(self, size=(640,480),number_of_faces=0): self.width, self.height = size self.level = 1 self.foundation = {} self.direction = 'left' self.reset_game = 0 self.won_gam...
true
true
f730ed6d33436dced0bf6a00b2f80e83c54ec3ea
18,160
py
Python
tests/utils/test_imageutil.py
shokakucarrier/atomic-reactor
3ad81a5532cde317d0fddd4578f27438e88ee637
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_imageutil.py
shokakucarrier/atomic-reactor
3ad81a5532cde317d0fddd4578f27438e88ee637
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_imageutil.py
shokakucarrier/atomic-reactor
3ad81a5532cde317d0fddd4578f27438e88ee637
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import pytest import tarfile import io import os from flexmock import flexmock from pathlib import Path from osbs.utils import ImageName fr...
42.931442
111
0.644934
import pytest import tarfile import io import os from flexmock import flexmock from pathlib import Path from osbs.utils import ImageName from atomic_reactor import config from atomic_reactor import util from atomic_reactor.utils import imageutil, retries @pytest.fixture def df_images(): return util.DockerfileI...
true
true
f730ed7aa9f9349f15c6cbfc5165fbc8a60781f3
1,755
py
Python
MGSIM/Commands/Genome_download.py
nick-youngblut/MGSIM
9edae3c170cf5100b3408a853a87e1205e70dd1b
[ "MIT" ]
3
2019-09-02T11:03:40.000Z
2021-12-13T15:59:06.000Z
MGSIM/Commands/Genome_download.py
nick-youngblut/MGSIM
9edae3c170cf5100b3408a853a87e1205e70dd1b
[ "MIT" ]
2
2020-11-13T13:04:47.000Z
2022-02-03T14:58:13.000Z
MGSIM/Commands/Genome_download.py
nick-youngblut/MGSIM
9edae3c170cf5100b3408a853a87e1205e70dd1b
[ "MIT" ]
1
2020-08-13T12:40:39.000Z
2020-08-13T12:40:39.000Z
#!/usr/bin/env python """ genome_download: downloading genomes Usage: genome_download [options] <accession_table> genome_download -h | --help genome_download --version Options: <accessin_table> Taxon-accession table (see Description). Use '-' if from STDIN. -d=<d> Output dir...
28.770492
85
0.631339
import sys,os import logging t import docopt from MGSIM import Genome_Download basicConfig(format='%(asctime)s - %(message)s', level=logging.DEBUG) def opt_parse(args=None): if args is None: args = docopt(__doc__, version='0.1') else: args = docopt(__doc__, version='0.1', argv=arg...
true
true
f730edaf07a7da17bb74420c371eafd4f32d6873
7,584
py
Python
fixtura/contact.py
KateRuss/python_training
38ea3f710fd9ba3b555277aac84a1ccda752b056
[ "Apache-2.0" ]
null
null
null
fixtura/contact.py
KateRuss/python_training
38ea3f710fd9ba3b555277aac84a1ccda752b056
[ "Apache-2.0" ]
null
null
null
fixtura/contact.py
KateRuss/python_training
38ea3f710fd9ba3b555277aac84a1ccda752b056
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.contact import Contact from selenium.webdriver.support.ui import Select import re class ContactHelper: def __init__(self, app): self.app = app def fill_contact_form(self, contact): wd = self.app.wd # fill contact fields (displayd on home page) ...
41.900552
116
0.654272
from model.contact import Contact from selenium.webdriver.support.ui import Select import re class ContactHelper: def __init__(self, app): self.app = app def fill_contact_form(self, contact): wd = self.app.wd self.change_contact_field("firstname", contact.first_name) ...
true
true
f730edc45a14dd6184a9dea61869338a9c700c7e
545
py
Python
dashboard/models.py
Lukmanhakim112/ppdb
c6179478b4c1f0b6cec77a8a059a6e418f6263f1
[ "MIT" ]
null
null
null
dashboard/models.py
Lukmanhakim112/ppdb
c6179478b4c1f0b6cec77a8a059a6e418f6263f1
[ "MIT" ]
null
null
null
dashboard/models.py
Lukmanhakim112/ppdb
c6179478b4c1f0b6cec77a8a059a6e418f6263f1
[ "MIT" ]
null
null
null
from django.db import models from django.utils import timezone from users.models import CustomUser from primaseru import choices class StudentStatus(models.Model): student = models.OneToOneField(CustomUser, on_delete=models.CASCADE) accepted = models.BooleanField('Diterima', db_index=True, null=True) maj...
34.0625
110
0.766972
from django.db import models from django.utils import timezone from users.models import CustomUser from primaseru import choices class StudentStatus(models.Model): student = models.OneToOneField(CustomUser, on_delete=models.CASCADE) accepted = models.BooleanField('Diterima', db_index=True, null=True) maj...
true
true
f730edff89f56bcceeeca88db6221bf6caeacef5
27,762
py
Python
tacotron2/model.py
HudsonHuang/tacotron2
fa55a0b633abe358e1258e1dc3b40d85e17b3450
[ "BSD-3-Clause" ]
null
null
null
tacotron2/model.py
HudsonHuang/tacotron2
fa55a0b633abe358e1258e1dc3b40d85e17b3450
[ "BSD-3-Clause" ]
null
null
null
tacotron2/model.py
HudsonHuang/tacotron2
fa55a0b633abe358e1258e1dc3b40d85e17b3450
[ "BSD-3-Clause" ]
null
null
null
# ***************************************************************************** # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
40.002882
108
0.630394
from math import sqrt import torch from torch.autograd import Variable from torch import nn from torch.nn import functional as F import sys from os.path import abspath, dirname sys.path.append(abspath(dirname(__file__)+'/../')) from common.layers import ConvNorm, LinearNorm from common.utils...
true
true
f730efb7bb6d6467c2a0411647710d26fbaf595b
17,309
py
Python
models/tacotron.py
peter3125/WaveRNN
ef34b9d91dfbff3197c8cc20d3ed272b222a5ec2
[ "MIT" ]
null
null
null
models/tacotron.py
peter3125/WaveRNN
ef34b9d91dfbff3197c8cc20d3ed272b222a5ec2
[ "MIT" ]
null
null
null
models/tacotron.py
peter3125/WaveRNN
ef34b9d91dfbff3197c8cc20d3ed272b222a5ec2
[ "MIT" ]
null
null
null
import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class HighwayNetwork(nn.Module): def __init__(self, size): super().__init__() self.W1 = nn.Linear(size, size) self.W2 = nn.Linear(size, size) self.W1.bias.data.fill_(0.) def...
37.223656
110
0.60847
import os import numpy as np import torch import torch.nn as nn import torch.nn.functional as F class HighwayNetwork(nn.Module): def __init__(self, size): super().__init__() self.W1 = nn.Linear(size, size) self.W2 = nn.Linear(size, size) self.W1.bias.data.fill_(0.) def...
true
true
f730efec7b67472ded36ecfb1b4ff7670ef81c41
849
py
Python
slixmpp/xmlstream/handler/xmlwaiter.py
anirudhrata/slixmpp
1fcee0e80a212eeb274d2f560e69099d8a61bf7f
[ "BSD-3-Clause" ]
86
2016-07-04T13:26:02.000Z
2022-02-19T10:26:21.000Z
slixmpp/xmlstream/handler/xmlwaiter.py
anirudhrata/slixmpp
1fcee0e80a212eeb274d2f560e69099d8a61bf7f
[ "BSD-3-Clause" ]
10
2016-09-30T18:55:41.000Z
2020-05-01T14:22:47.000Z
slixmpp/xmlstream/handler/xmlwaiter.py
anirudhrata/slixmpp
1fcee0e80a212eeb274d2f560e69099d8a61bf7f
[ "BSD-3-Clause" ]
45
2016-09-30T18:48:41.000Z
2022-03-18T21:39:33.000Z
# Slixmpp: The Slick XMPP Library # Copyright (C) 2010 Nathanael C. Fritz # This file is part of Slixmpp. # See the file LICENSE for copying permission. from slixmpp.xmlstream.stanzabase import StanzaBase from slixmpp.xmlstream.handler import Waiter class XMLWaiter(Waiter): """ The XMLWaiter class is ident...
26.53125
65
0.674912
from slixmpp.xmlstream.stanzabase import StanzaBase from slixmpp.xmlstream.handler import Waiter class XMLWaiter(Waiter): def prerun(self, payload: StanzaBase) -> None: Waiter.prerun(self, payload.xml)
true
true
f730f06f9acee549a188aa709f31f37e19a2c108
8,731
py
Python
tensorpack/RL/expreplay.py
skoppula/ternarynet
1a67251f7f5a1cdf854f87f90f841655c7c9f11c
[ "Apache-2.0" ]
109
2017-01-16T23:55:36.000Z
2021-08-31T17:48:08.000Z
f1/F1_track1/tensorpack/RL/expreplay.py
mihahauke/vizdoom_cig2017
42baffa7c6ee43db618605838ea6f9e0547001d1
[ "MIT" ]
19
2018-01-28T23:05:33.000Z
2022-03-11T23:14:57.000Z
tensorpack/RL/expreplay.py
czhu95/ternarynet
1a67251f7f5a1cdf854f87f90f841655c7c9f11c
[ "Apache-2.0" ]
46
2017-01-23T07:35:10.000Z
2021-12-26T13:52:19.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # File: expreplay.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import numpy as np from collections import deque, namedtuple import threading from tqdm import tqdm import six from six.moves import queue from ..dataflow import DataFlow from ..utils import * from ..utils.con...
38.126638
98
0.593746
import numpy as np from collections import deque, namedtuple import threading from tqdm import tqdm import six from six.moves import queue from ..dataflow import DataFlow from ..utils import * from ..utils.concurrency import LoopThread from ..callbacks.base import Callback __all__ = ['ExpReplay'] Experience = n...
true
true
f730f172a583af4fe7d0cf23626ad4bacc89fb28
12,835
py
Python
tests/plugins/test_plugins_manager.py
raspberryfield/airflow
3eb67af7a3fab61b7f691da66129c228af27d95e
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
3
2021-07-30T16:46:46.000Z
2021-10-19T07:18:47.000Z
tests/plugins/test_plugins_manager.py
raspberryfield/airflow
3eb67af7a3fab61b7f691da66129c228af27d95e
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
6
2019-03-16T02:09:30.000Z
2019-06-27T03:27:34.000Z
tests/plugins/test_plugins_manager.py
raspberryfield/airflow
3eb67af7a3fab61b7f691da66129c228af27d95e
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2021-05-12T13:17:37.000Z
2021-05-12T13:17:37.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
40.109375
109
0.67651
import importlib import logging import sys import unittest from unittest import mock from airflow.hooks.base import BaseHook from airflow.plugins_manager import AirflowPlugin from airflow.www import app as application from tests.test_utils.mock_plugins import mock_plugin_manager py39 = sys.version_in...
true
true
f730f299d4453e3f89f5e91f3e64c62d116cabde
1,003
py
Python
person/management/commands/run_person_connector.py
AlenaYanish/Data_converter
dbeeb5c135de7f2d74dff9260a4080e7f07727f6
[ "MIT" ]
null
null
null
person/management/commands/run_person_connector.py
AlenaYanish/Data_converter
dbeeb5c135de7f2d74dff9260a4080e7f07727f6
[ "MIT" ]
null
null
null
person/management/commands/run_person_connector.py
AlenaYanish/Data_converter
dbeeb5c135de7f2d74dff9260a4080e7f07727f6
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand, CommandError from data_ocean.command_progress import CommandProgress from data_ocean.savepoint import Savepoint from person.controllers import ConnectorsController, SOURCES class Command(BaseCommand): help = '---' def add_arguments(self, parser): p...
34.586207
91
0.663011
from django.core.management.base import BaseCommand, CommandError from data_ocean.command_progress import CommandProgress from data_ocean.savepoint import Savepoint from person.controllers import ConnectorsController, SOURCES class Command(BaseCommand): help = '---' def add_arguments(self, parser): p...
true
true
f730f358f211cb3b98b0df17cabeb3129381fe6a
4,840
py
Python
nikola/plugins/task_render_posts.py
kotnik/nikola
d08ed98b1b9bf7cbdabf06a18b51a3acdb745625
[ "MIT" ]
null
null
null
nikola/plugins/task_render_posts.py
kotnik/nikola
d08ed98b1b9bf7cbdabf06a18b51a3acdb745625
[ "MIT" ]
null
null
null
nikola/plugins/task_render_posts.py
kotnik/nikola
d08ed98b1b9bf7cbdabf06a18b51a3acdb745625
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright © 2012-2013 Roberto Alsina and others. # Permission is hereby granted, free of charge, to any # person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the # Software without restriction, including without limitation # the rights t...
33.846154
93
0.568595
from copy import copy import codecs import string from nikola.plugin_categories import Task from nikola import utils, rc4 def wrap_encrypt(path, password): with codecs.open(path, 'rb+', 'utf8') as inf: data = inf.read() + "<!--tail-->" data = CRYPT.substitute(data=rc4.rc4(pa...
true
true
f730f40810a9ab1ca74ee1b70e362abf40ace529
3,700
py
Python
Visualize.py
BlindBMan/Facial-Recognition
1f0c65174de2223a81797fee7722227a712a37bc
[ "MIT" ]
null
null
null
Visualize.py
BlindBMan/Facial-Recognition
1f0c65174de2223a81797fee7722227a712a37bc
[ "MIT" ]
null
null
null
Visualize.py
BlindBMan/Facial-Recognition
1f0c65174de2223a81797fee7722227a712a37bc
[ "MIT" ]
null
null
null
import cv2 as cv import os import numpy as np import pdb import ntpath import glob from Parameters import * def show_detections_without_ground_truth(detections, scores, file_names, params: Parameters): """ Afiseaza si salveaza imaginile adnotate. detections: numpy array de dimensiune NX4, unde N este numa...
48.684211
137
0.699189
import cv2 as cv import os import numpy as np import pdb import ntpath import glob from Parameters import * def show_detections_without_ground_truth(detections, scores, file_names, params: Parameters): test_images_path = os.path.join(params.dir_test_examples, '*.jpg') test_files = glob.glob(test_images_path) ...
true
true
f730f477cc08bbd4b7ffa1a11537af10fd058b92
1,852
py
Python
couch/setup.py
brentm5/integrations-core
5cac8788c95d8820435ef9c5d32d6a5463cf491d
[ "BSD-3-Clause" ]
4
2021-06-21T19:21:49.000Z
2021-06-23T21:21:55.000Z
couch/setup.py
brentm5/integrations-core
5cac8788c95d8820435ef9c5d32d6a5463cf491d
[ "BSD-3-Clause" ]
null
null
null
couch/setup.py
brentm5/integrations-core
5cac8788c95d8820435ef9c5d32d6a5463cf491d
[ "BSD-3-Clause" ]
1
2021-06-21T19:21:51.000Z
2021-06-21T19:21:51.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) # Always prefer setuptools over distutils from setuptools import setup # To use a consistent encoding from codecs import open from os import path HERE = path.abspath(path.dirname(__file__)) # Get the long descr...
27.235294
75
0.682505
from setuptools import setup from codecs import open from os import path HERE = path.abspath(path.dirname(__file__)) with open(path.join(HERE, 'README.md'), encoding='utf-8') as f: long_description = f.read() ABOUT = {} with open(path.join(HERE, "datadog_checks", "couch", "__about__.py")) as f: exec(...
true
true
f730f49df8a3829de88cd50a3529de49a0e5a694
691
py
Python
FirstStepsInPython/Basics/Exams/exam_22_may_2021/04. Computer Firm.py
Pittor052/SoftUni-Studies
1ee6341082f6ccfa45b3e82824c37722bcf2fb31
[ "MIT" ]
null
null
null
FirstStepsInPython/Basics/Exams/exam_22_may_2021/04. Computer Firm.py
Pittor052/SoftUni-Studies
1ee6341082f6ccfa45b3e82824c37722bcf2fb31
[ "MIT" ]
null
null
null
FirstStepsInPython/Basics/Exams/exam_22_may_2021/04. Computer Firm.py
Pittor052/SoftUni-Studies
1ee6341082f6ccfa45b3e82824c37722bcf2fb31
[ "MIT" ]
1
2021-10-07T18:30:42.000Z
2021-10-07T18:30:42.000Z
computers = int ( input () ) total_computers = computers total_rating = 0 total_sales = 0 while not computers == 0: command = int ( input () ) possible_sales = 0 last_digit = command % 10 first_two_digits = command // 10 rating = last_digit if rating == 3: possible_sales = first_two_digi...
28.791667
48
0.652677
computers = int ( input () ) total_computers = computers total_rating = 0 total_sales = 0 while not computers == 0: command = int ( input () ) possible_sales = 0 last_digit = command % 10 first_two_digits = command // 10 rating = last_digit if rating == 3: possible_sales = first_two_digi...
true
true
f730f4bb2a5ba41e87a7dec1872c02f8fb5be670
633
py
Python
points.py
romeroyakovlev/ii
ae9485df2c3565871994c146001a72db511f3700
[ "CC0-1.0" ]
1
2017-09-29T09:35:04.000Z
2017-09-29T09:35:04.000Z
points.py
romeroyakovlev/ii
ae9485df2c3565871994c146001a72db511f3700
[ "CC0-1.0" ]
null
null
null
points.py
romeroyakovlev/ii
ae9485df2c3565871994c146001a72db511f3700
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- import hashlib, random def sha(s): return hashlib.sha256(s).hexdigest()[:16] def _salt(): return str(random.randint(1,99999999)) def save_point(phash,u): open('points.txt','a').write('%s:%s\n' % (phash,u)) def check_hash(s): p = open('points.txt').read().splitlines() for...
22.607143
55
0.57188
import hashlib, random def sha(s): return hashlib.sha256(s).hexdigest()[:16] def _salt(): return str(random.randint(1,99999999)) def save_point(phash,u): open('points.txt','a').write('%s:%s\n' % (phash,u)) def check_hash(s): p = open('points.txt').read().splitlines() for i,n in enumerate(p,1):...
false
true
f730f61c0558a354a0cd7c399108c3d7b08479b3
4,692
py
Python
Tools/SeeDot/seedot/predictor.py
krantikiran/EdgeML
e5c7bd7c56884ca61f6d54cedb0074553cfdc896
[ "MIT" ]
1
2020-03-26T17:19:54.000Z
2020-03-26T17:19:54.000Z
Tools/SeeDot/seedot/predictor.py
krantikiran/EdgeML
e5c7bd7c56884ca61f6d54cedb0074553cfdc896
[ "MIT" ]
2
2020-03-26T02:59:12.000Z
2020-04-23T19:09:00.000Z
Tools/SeeDot/seedot/predictor.py
krantikiran/EdgeML
e5c7bd7c56884ca61f6d54cedb0074553cfdc896
[ "MIT" ]
3
2020-03-25T18:45:39.000Z
2020-12-17T19:09:54.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. import os import subprocess import seedot.config as config import seedot.util as Util # Program to build and run the predictor project using msbuild # The accuracy and other statistics are written to the output file specifi...
29.509434
82
0.563725
import os import subprocess import seedot.config as config import seedot.util as Util class Predictor: def __init__(self, algo, version, datasetType, outputDir, scaleForX): self.algo, self.version, self.datasetType = algo, version, datasetType self.outputDir = outputDir os.makedir...
true
true
f730f62a1e645556614119a1ae7ca46137ef0109
16,444
py
Python
lib/python3.8/site-packages/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/cisco/iosxr/plugins/modules/iosxr_lldp_interfaces.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is au...
22.681379
135
0.580151
TenGigE0/0/0/0" # }, # { # "name": "GigabitEthernet0/0/0/1" # }, # { # "name": "GigabitEthernet0/0/0/2" # } # ] # # "commands": [ # "interface GigabitEthernet0/0/0/2", # "lldp destination mac-address ieee-nearest-non-tmpr-bridge", # "ll...
true
true
f730f63d759dc5797a07be61282a64af7a309b97
1,495
py
Python
pool/models/move_to_origin.py
VisualMine/PlaneNet
a4327f0233dd3a5c4de375c2857402d28b308230
[ "MIT" ]
372
2018-03-27T23:26:38.000Z
2022-03-30T02:58:51.000Z
pool/models/move_to_origin.py
Piratelhx/PlaneNet
88eb76d88bb678bd26b7f101f0bb273e4897e92d
[ "MIT" ]
38
2018-04-17T02:03:23.000Z
2022-02-17T07:44:28.000Z
pool/models/move_to_origin.py
Piratelhx/PlaneNet
88eb76d88bb678bd26b7f101f0bb273e4897e92d
[ "MIT" ]
90
2018-03-27T13:47:17.000Z
2022-03-16T03:22:27.000Z
import csv import sys import numpy as np with open(sys.argv[1]) as modelFile: modelLoader = csv.reader(modelFile, delimiter=' ') xs = [] ys = [] zs = [] for lineIndex, line in enumerate(modelLoader): if len(line) == 0: continue if line[0] == 'v': xs.a...
25.338983
74
0.53311
import csv import sys import numpy as np with open(sys.argv[1]) as modelFile: modelLoader = csv.reader(modelFile, delimiter=' ') xs = [] ys = [] zs = [] for lineIndex, line in enumerate(modelLoader): if len(line) == 0: continue if line[0] == 'v': xs.a...
true
true
f730f66e6200f2f186c044ebd1d89110eb96e4d6
1,179
py
Python
FlaskRESTFULAPITest_JE/venv/Lib/site-packages/itsdangerous/_compat.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
2
2022-01-06T11:52:57.000Z
2022-01-09T01:53:56.000Z
FlaskRESTFULAPITest_JE/venv/Lib/site-packages/itsdangerous/_compat.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
FlaskRESTFULAPITest_JE/venv/Lib/site-packages/itsdangerous/_compat.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
import decimal import hmac import numbers import sys PY2 = sys.version_info[0] == 2 if PY2: from itertools import izip text_type = unicode # noqa: 821 else: izip = zip text_type = str number_types = (numbers.Real, decimal.Decimal) def _constant_time_compare(val1, val2): """...
25.085106
80
0.645462
import decimal import hmac import numbers import sys PY2 = sys.version_info[0] == 2 if PY2: from itertools import izip text_type = unicode else: izip = zip text_type = str number_types = (numbers.Real, decimal.Decimal) def _constant_time_compare(val1, val2): len_eq = len(va...
true
true
f730f6f1c65f95e6079be44f28f2c5b909f64b71
1,999
py
Python
flagging_site/data/_store/refresh.py
danivalades/flagging
b1a097594e9b7d9e101edef9bb6abf98a333383c
[ "MIT" ]
null
null
null
flagging_site/data/_store/refresh.py
danivalades/flagging
b1a097594e9b7d9e101edef9bb6abf98a333383c
[ "MIT" ]
null
null
null
flagging_site/data/_store/refresh.py
danivalades/flagging
b1a097594e9b7d9e101edef9bb6abf98a333383c
[ "MIT" ]
null
null
null
"""The data store contains offline versions of the data so that you can run a demo version of the website without the vault keys, or simply develop parts of the website that don't require actively updated data without having to worry. This data is used for the actual website when the `USE_MOCK_DATA` config variable is...
37.018519
79
0.737869
import os import sys from typing import Optional import click DATA_STORE_PATH = os.path.dirname(__file__) @click.command() @click.option('--vault_password', prompt=True, default=lambda: os.environ.get('VAULT_PASSWORD', None)) def refresh_data_store(vault_password: Optional[str] = None) ->...
true
true
f730f74e730a3d369e068ece021021184632f611
5,546
py
Python
src/pyscaffold/exceptions.py
CarliJoy/pyscaffold
6e6f8779c4a20fbab81b72c6a12716c877d8c062
[ "MIT" ]
null
null
null
src/pyscaffold/exceptions.py
CarliJoy/pyscaffold
6e6f8779c4a20fbab81b72c6a12716c877d8c062
[ "MIT" ]
null
null
null
src/pyscaffold/exceptions.py
CarliJoy/pyscaffold
6e6f8779c4a20fbab81b72c6a12716c877d8c062
[ "MIT" ]
null
null
null
""" Functions for exception manipulation + custom exceptions used by PyScaffold to identify common deviations from the expected behavior. """ import functools import logging import sys import traceback from typing import Optional, cast if sys.version_info[:2] >= (3, 8): # TODO: Import directly (no need for conditi...
31.691429
87
0.671114
import functools import logging import sys import traceback from typing import Optional, cast if sys.version_info[:2] >= (3, 8): from importlib.metadata import EntryPoint else: from importlib_metadata import EntryPoint from . import __version__ as pyscaffold_version def exceptions2exit(exception_li...
true
true
f730f8239795450f1ada30cddacbcdbea7bc8310
4,465
py
Python
test/functional/wallet_keypool_topup.py
t-bast/bitcoin
42fedb4acd3cfa813059fcc3f96b2a41f78d9074
[ "MIT" ]
213
2015-01-25T19:45:22.000Z
2022-02-24T22:48:03.000Z
test/functional/wallet_keypool_topup.py
t-bast/bitcoin
42fedb4acd3cfa813059fcc3f96b2a41f78d9074
[ "MIT" ]
51
2019-11-03T04:00:14.000Z
2022-03-30T07:17:34.000Z
test/functional/wallet_keypool_topup.py
t-bast/bitcoin
42fedb4acd3cfa813059fcc3f96b2a41f78d9074
[ "MIT" ]
47
2018-08-03T04:55:45.000Z
2022-03-10T07:50:31.000Z
#!/usr/bin/env python3 # Copyright (c) 2017-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test HD Wallet keypool restore function. Two nodes. Node1 is under test. Node0 is providing transactio...
47
164
0.657783
import os import shutil from test_framework.blocktools import COINBASE_MATURITY from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, ) class KeypoolRestoreTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True...
true
true
f730f8777658d70018bebdae1f628b30914e95b6
14,193
py
Python
tests/workflows/test_imaging_component_workflows.py
mfarrera/algorithm-reference-library
7331812aa7cc3501a15d3392cecf6ea65b43f91e
[ "Apache-2.0" ]
null
null
null
tests/workflows/test_imaging_component_workflows.py
mfarrera/algorithm-reference-library
7331812aa7cc3501a15d3392cecf6ea65b43f91e
[ "Apache-2.0" ]
null
null
null
tests/workflows/test_imaging_component_workflows.py
mfarrera/algorithm-reference-library
7331812aa7cc3501a15d3392cecf6ea65b43f91e
[ "Apache-2.0" ]
null
null
null
""" Unit tests for pipelines expressed via dask.delayed """ import logging import sys import unittest import numpy from astropy import units as u from astropy.coordinates import SkyCoord from data_models.polarisation import PolarisationFrame from processing_components.image.operations import export_image_to_fits, ...
47.949324
141
0.606989
import logging import sys import unittest import numpy from astropy import units as u from astropy.coordinates import SkyCoord from data_models.polarisation import PolarisationFrame from processing_components.image.operations import export_image_to_fits, smooth_image from processing_components.imaging.base import pr...
true
true
f730f92c5485f29626ae1c7b418475779522b722
1,420
py
Python
channel.py
michael-riess/language-proctor-bot
86eb22e298a86ecd79e484c7a3ece2797fe5f027
[ "MIT" ]
null
null
null
channel.py
michael-riess/language-proctor-bot
86eb22e298a86ecd79e484c7a3ece2797fe5f027
[ "MIT" ]
1
2021-03-03T12:37:20.000Z
2021-03-03T15:37:28.000Z
channel.py
michael-riess/language-proctor-bot
86eb22e298a86ecd79e484c7a3ece2797fe5f027
[ "MIT" ]
null
null
null
from replit import db from locales import locales # ======================================================== # Posts message to discord channel (translated according to channel) # ======================================================== async def say(channel, message, arguments=None): message = locales.get(get_chann...
35.5
68
0.445775
from replit import db from locales import locales async def say(channel, message, arguments=None): message = locales.get(get_channel_lang(channel.id), message) if arguments is not None: await channel.send(message.format(*arguments)) else: await channel.send(message) def set_channel_lang(channel, c...
true
true
f730fa6f7583c67acbf528ee804850ee2c0663f1
1,663
py
Python
modules/demo/ipc/graph/fa2.py
mzegar/node-rapids
5b2c3dafbec5f17dcedf8147a8f668a986622cc4
[ "Apache-2.0" ]
39
2021-08-04T17:30:03.000Z
2022-03-27T18:20:05.000Z
modules/demo/ipc/graph/fa2.py
love-lena/node-rapids
27c9e2468372df4fae3779d859089b54c8d32c4f
[ "Apache-2.0" ]
77
2021-03-12T18:04:01.000Z
2021-08-02T20:07:24.000Z
modules/demo/ipc/graph/fa2.py
love-lena/node-rapids
27c9e2468372df4fae3779d859089b54c8d32c4f
[ "Apache-2.0" ]
7
2021-03-12T19:42:40.000Z
2021-07-27T21:57:26.000Z
# Copyright (c) 2020-2021, NVIDIA CORPORATION. # # 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 agre...
29.696429
74
0.708358
import warnings warnings.filterwarnings("ignore", category=UserWarning) warnings.filterwarnings("ignore", category=DeprecationWarning) import python.test_data as datasets from python.callback import GraphZmqCallback import zmq import cudf import cugraph import asyncio import zmq.asyncio graph, nodes, ...
true
true
f730fa84e14eb5fbcbc033f780025ae0e6b55f8c
2,664
py
Python
facebook_business/adobjects/lookalikespec.py
MyrikLD/facebook-python-business-sdk
a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814
[ "CNRI-Python" ]
576
2018-05-01T19:09:32.000Z
2022-03-31T11:45:11.000Z
facebook_business/adobjects/lookalikespec.py
MyrikLD/facebook-python-business-sdk
a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814
[ "CNRI-Python" ]
217
2018-05-03T07:31:59.000Z
2022-03-29T14:19:52.000Z
facebook_business/adobjects/lookalikespec.py
MyrikLD/facebook-python-business-sdk
a53c8ba0e8f7d0b41b385c60089f6ba00fa5c814
[ "CNRI-Python" ]
323
2018-05-01T20:32:26.000Z
2022-03-29T07:05:12.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
36
79
0.704204
from facebook_business.adobjects.abstractobject import AbstractObject class LookalikeSpec( AbstractObject, ): def __init__(self, api=None): super(LookalikeSpec, self).__init__() self._isLookalikeSpec = True self._api = api class Field(AbstractObject.Field): ...
true
true
f730fbd03f80351c68af026f82203af4a85f5514
421
py
Python
sphinxnotes/snippet/builder.py
sphinx-notes/khufu
4225086f0e5d7d8262598d755a5f19e8ad4ebbba
[ "BSD-3-Clause" ]
1
2021-02-28T12:18:23.000Z
2021-02-28T12:18:23.000Z
sphinxnotes/snippet/builder.py
sphinx-notes/khufu
4225086f0e5d7d8262598d755a5f19e8ad4ebbba
[ "BSD-3-Clause" ]
10
2021-02-28T08:54:00.000Z
2022-01-16T05:17:03.000Z
sphinxnotes/snippet/builder.py
sphinx-notes/khufu
4225086f0e5d7d8262598d755a5f19e8ad4ebbba
[ "BSD-3-Clause" ]
1
2021-12-24T11:34:15.000Z
2021-12-24T11:34:15.000Z
""" sphinxnotes.snippet.builder ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dummy builder for triggering extension. :copyright: Copyright 2021 Shengyu Zhang. :license: BSD, see LICENSE for details. """ from sphinx.builders.dummy import DummyBuilder from sphinx.locale import __ class Builder(DummyBuilder): ...
23.388889
83
0.67696
from sphinx.builders.dummy import DummyBuilder from sphinx.locale import __ class Builder(DummyBuilder): name = 'snippet' epilog = __('The snippet builder is a dummy builder for triggering extension.')
true
true
f730fd394f2382010c04a8a3319d21739e722bf6
252
py
Python
linear-search-ordered.py
vaibhavmule/PythonExercise
5b32d8db5290db5ced2c8730191fd73936d4c3d4
[ "MIT" ]
null
null
null
linear-search-ordered.py
vaibhavmule/PythonExercise
5b32d8db5290db5ced2c8730191fd73936d4c3d4
[ "MIT" ]
null
null
null
linear-search-ordered.py
vaibhavmule/PythonExercise
5b32d8db5290db5ced2c8730191fd73936d4c3d4
[ "MIT" ]
null
null
null
foo = [1, 2, 3, 4, 6, 9, 10] def search(arr, item): for i in arr: if i == item: return True elif i > item: return False return False print(search(foo, 5)) print(search(foo, 9)) print(search(foo, 20))
15.75
28
0.515873
foo = [1, 2, 3, 4, 6, 9, 10] def search(arr, item): for i in arr: if i == item: return True elif i > item: return False return False print(search(foo, 5)) print(search(foo, 9)) print(search(foo, 20))
true
true
f730fe3ff4f0f24911ddbed8aa3feac509e8a169
3,707
py
Python
lib/rucio/tests/mock/fts3.py
brianv0/rucio
127a36fd53e5b4d9eb14ab02fe6c36443d78bfd0
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/mock/fts3.py
brianv0/rucio
127a36fd53e5b4d9eb14ab02fe6c36443d78bfd0
[ "Apache-2.0" ]
null
null
null
lib/rucio/tests/mock/fts3.py
brianv0/rucio
127a36fd53e5b4d9eb14ab02fe6c36443d78bfd0
[ "Apache-2.0" ]
null
null
null
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - Mario Lassnig, <mario...
32.80531
149
0.677367
import datetime import random import time from sqlalchemy import and_, or_ from rucio.common.utils import generate_uuid from rucio.core.monitor import record_counter, record_timer from rucio.db.sqla import test_models from rucio.db.sqla.constants import FTSState from rucio.db.sqla.session import read_session...
true
true
f730ff473e3acc560575f38f17d8a90a26b95e0f
1,191
py
Python
mainsite/models/link_note.py
xjlin0/attendee
6f0f3bfd64b2c6410af18823cd423d71a2ca59c7
[ "MIT" ]
2
2019-08-26T09:16:09.000Z
2019-11-04T15:07:06.000Z
mainsite/models/link_note.py
xjlin0/attendee
6f0f3bfd64b2c6410af18823cd423d71a2ca59c7
[ "MIT" ]
null
null
null
mainsite/models/link_note.py
xjlin0/attendee
6f0f3bfd64b2c6410af18823cd423d71a2ca59c7
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from . import RecordStatusEnum class LinkNote(models.Model): id = models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID') ...
42.535714
140
0.751469
from django.db import models from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from . import RecordStatusEnum class LinkNote(models.Model): id = models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID') ...
true
true
f73102329030fad1a68ba5bb5eb01f8d626f5c90
2,780
py
Python
data/cirq_new/cirq_program/startCirq_pragma440.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_pragma440.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_pragma440.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=20 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( ...
33.095238
92
0.646043
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( self, circuit: 'cirq.Circuit', index: int, op: 'cirq.Operation' ) -> Optional[cirq.Poi...
true
true
f731026b4115633e600f543fa4ca1b692d3b160d
8,578
py
Python
mjrl/algos/model_accel/sampling.py
YujieLu10/tslam
1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd
[ "Apache-2.0" ]
null
null
null
mjrl/algos/model_accel/sampling.py
YujieLu10/tslam
1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd
[ "Apache-2.0" ]
null
null
null
mjrl/algos/model_accel/sampling.py
YujieLu10/tslam
1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd
[ "Apache-2.0" ]
null
null
null
import logging import numpy as np from mjrl.utils.gym_env import GymEnv from mjrl.utils import tensor_utils logging.disable(logging.CRITICAL) import multiprocessing as mp from multiprocessing import set_start_method try: set_start_method('spawn') except RuntimeError: pass import time as timer import torch loggi...
31.653137
104
0.551877
import logging import numpy as np from mjrl.utils.gym_env import GymEnv from mjrl.utils import tensor_utils logging.disable(logging.CRITICAL) import multiprocessing as mp from multiprocessing import set_start_method try: set_start_method('spawn') except RuntimeError: pass import time as timer import torch loggi...
true
true
f7310364126b99c5b9600e09110e9f438c281858
3,594
py
Python
tests/test_fast/test_timeout.py
ponty/EasyProcess
4b3f5ab487ec46133e361958d6061262bfad91c3
[ "BSD-2-Clause" ]
86
2015-02-17T11:41:18.000Z
2022-03-05T08:05:29.000Z
tests/test_fast/test_timeout.py
ponty/EasyProcess
4b3f5ab487ec46133e361958d6061262bfad91c3
[ "BSD-2-Clause" ]
18
2015-02-11T21:03:13.000Z
2022-03-20T14:32:51.000Z
tests/test_fast/test_timeout.py
ponty/EasyProcess
4b3f5ab487ec46133e361958d6061262bfad91c3
[ "BSD-2-Clause" ]
22
2015-02-11T20:47:00.000Z
2021-11-01T15:26:23.000Z
import sys import time import pytest from easyprocess import EasyProcess python = sys.executable def test_timeout(): p = EasyProcess("sleep 1").start() p.wait(0.2) assert p.is_alive() p.wait(0.2) assert p.is_alive() p.wait(2) assert not p.is_alive() assert EasyProcess("sleep 0.3")....
27.022556
148
0.664162
import sys import time import pytest from easyprocess import EasyProcess python = sys.executable def test_timeout(): p = EasyProcess("sleep 1").start() p.wait(0.2) assert p.is_alive() p.wait(0.2) assert p.is_alive() p.wait(2) assert not p.is_alive() assert EasyProcess("sleep 0.3")....
true
true
f73103cefcd8b17fc9dcdef65d4a5a5b4f9acc4f
695
py
Python
src/api/tests/test_profile_views.py
ThaDeveloper/grind
fa90b65d12e6d9b3d658b132874801ecda08c57f
[ "MIT" ]
1
2019-11-06T22:26:26.000Z
2019-11-06T22:26:26.000Z
src/api/tests/test_profile_views.py
ThaDeveloper/grind
fa90b65d12e6d9b3d658b132874801ecda08c57f
[ "MIT" ]
5
2021-03-19T02:49:44.000Z
2021-06-10T19:13:00.000Z
src/api/tests/test_profile_views.py
ThaDeveloper/grind
fa90b65d12e6d9b3d658b132874801ecda08c57f
[ "MIT" ]
null
null
null
from api.tests.base import BaseTestCase class TestUserViews(BaseTestCase): """ Test Profile views """ def test_get_profile(self): """ Test can get single user profile """ self.create_user(self.new_user) response = self.test_client().get('/api/v1/accounts/baduism/profile/') self...
36.578947
78
0.657554
from api.tests.base import BaseTestCase class TestUserViews(BaseTestCase): def test_get_profile(self): self.create_user(self.new_user) response = self.test_client().get('/api/v1/accounts/baduism/profile/') self.assertEqual(200, response.status_code) self.assertIn("baduism", str(res...
true
true
f73103d5420139f7c03250e39dd0213ce905d5f1
80
py
Python
Python/01. Introduction/002. Python If-Else.py
stonehengee/HackerrankPractice
ec052e7447391e40d1919cf0b641ff5023da3da3
[ "MIT" ]
null
null
null
Python/01. Introduction/002. Python If-Else.py
stonehengee/HackerrankPractice
ec052e7447391e40d1919cf0b641ff5023da3da3
[ "MIT" ]
null
null
null
Python/01. Introduction/002. Python If-Else.py
stonehengee/HackerrankPractice
ec052e7447391e40d1919cf0b641ff5023da3da3
[ "MIT" ]
null
null
null
# Problem: https://www.hackerrank.com/challenges/py-if-else/problem # Score: 10
26.666667
67
0.75
true
true
f731070f8dc603977540d4cf5cd5175788bed0e5
2,389
py
Python
src/data_layers/ffeedbackcm100k_layer.py
emiliocuestaf/CycloRec
cf0bf39ff185f0b1ef8d1c6fe1d424a23c7716f7
[ "MIT" ]
3
2021-01-26T06:05:17.000Z
2021-02-11T21:47:09.000Z
src/data_layers/ffeedbackcm100k_layer.py
emiliocuestaf/CycloRec
cf0bf39ff185f0b1ef8d1c6fe1d424a23c7716f7
[ "MIT" ]
null
null
null
src/data_layers/ffeedbackcm100k_layer.py
emiliocuestaf/CycloRec
cf0bf39ff185f0b1ef8d1c6fe1d424a23c7716f7
[ "MIT" ]
1
2021-01-26T06:05:18.000Z
2021-01-26T06:05:18.000Z
import pandas as pd import numpy as np #import random as rd #from sklearn.neighbors import NearestNeighbors #from scipy.sparse import csr_matrix # OWN from cyclorec.data_layers.data_layer import DataLayer class FFeedbackCm100kLayer(DataLayer): """ The only difference between this layer and Cm100kLayer is the feed...
38.532258
130
0.626622
import pandas as pd import numpy as np from cyclorec.data_layers.data_layer import DataLayer class FFeedbackCm100kLayer(DataLayer): def __init__(self, name, test_proportion): rating_normalization = 'bin' if rating_normalization == 'bin': rating_conversor = dict({1: 0,...
true
true
f7310722bb4f9358a5e09b900096f1971cd0392f
1,999
py
Python
dask/cache.py
dgerlanc/dask
627b2bc7bca9e86d938767056bc001f819824335
[ "BSD-3-Clause" ]
2
2020-11-30T14:04:19.000Z
2021-11-08T11:29:07.000Z
dask/cache.py
dgerlanc/dask
627b2bc7bca9e86d938767056bc001f819824335
[ "BSD-3-Clause" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
dask/cache.py
dgerlanc/dask
627b2bc7bca9e86d938767056bc001f819824335
[ "BSD-3-Clause" ]
1
2019-01-31T02:44:12.000Z
2019-01-31T02:44:12.000Z
from .callbacks import Callback from timeit import default_timer from numbers import Number import sys overhead = sys.getsizeof(1.23) * 4 + sys.getsizeof(()) * 4 class Cache(Callback): """Use cache for computation Examples -------- >>> cache = Cache(1e9) # doctest: +SKIP The cache can...
30.287879
87
0.578789
from .callbacks import Callback from timeit import default_timer from numbers import Number import sys overhead = sys.getsizeof(1.23) * 4 + sys.getsizeof(()) * 4 class Cache(Callback): def __init__(self, cache, *args, **kwargs): try: import cachey except ImportError as ex: ...
true
true
f73108a0572bbd0f825ddaada87e96d987ccfd6b
8,856
py
Python
auxiliary/model.py
hellolele/PoseFromShape
b7cd6fc7eab5be7710e34557504c192d36c35000
[ "MIT" ]
2
2019-07-12T14:10:37.000Z
2019-07-12T14:10:39.000Z
auxiliary/model.py
tim885/PoseFromShape
7daf9e4889af065861d2719cd2bca2de8a45d185
[ "MIT" ]
null
null
null
auxiliary/model.py
tim885/PoseFromShape
7daf9e4889af065861d2719cd2bca2de8a45d185
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.autograd import Variable import resnet # ============================================================================ # # Baseline network # # ====================...
47.106383
134
0.630872
import torch import torch.nn as nn import torch.nn.parallel import torch.utils.data from torch.autograd import Variable import resnet class BaselineEstimator(nn.Module): def __init__(self, img_feature_dim=1024, separate_branch=False, azi_classes=24, ele_classes=12, inp_classes=24, pretrained_resn...
true
true
f73109ae32ef645c13d5883015d019e998ed1a8c
1,758
py
Python
assignment1/learners/ANN.py
prestononeal/CS-7641-assignments
c3a6815ba1be837084c60c3dd0dc8e8e702aa9b7
[ "MIT" ]
148
2018-12-18T21:14:04.000Z
2022-03-04T09:13:21.000Z
assignment1/learners/ANN.py
prestononeal/CS-7641-assignments
c3a6815ba1be837084c60c3dd0dc8e8e702aa9b7
[ "MIT" ]
22
2019-01-20T00:11:06.000Z
2021-05-01T17:21:58.000Z
assignment1/learners/ANN.py
prestononeal/CS-7641-assignments
c3a6815ba1be837084c60c3dd0dc8e8e702aa9b7
[ "MIT" ]
172
2019-01-09T06:01:54.000Z
2022-03-25T22:53:19.000Z
from sklearn import neural_network import learners class ANNLearner(learners.BaseLearner): def __init__(self, hidden_layer_sizes=(100,), activation="relu", solver='adam', alpha=0.0001, batch_size='auto', learnin...
30.842105
53
0.512514
from sklearn import neural_network import learners class ANNLearner(learners.BaseLearner): def __init__(self, hidden_layer_sizes=(100,), activation="relu", solver='adam', alpha=0.0001, batch_size='auto', learnin...
true
true