hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
79016d568d1d2d7d5bfde9336a443d48a6be49e7
1,683
py
Python
configs/positional_encoding_in_gans/mspie-stylegan2_c2_config-d_ffhq_256-512_b3x8_1100k.py
plutoyuxie/mmgeneration
0a7f5d16c970de1766ebf049d7a0264fe506504b
[ "Apache-2.0" ]
718
2021-04-15T11:26:20.000Z
2022-03-31T03:11:56.000Z
configs/positional_encoding_in_gans/mspie-stylegan2_c2_config-d_ffhq_256-512_b3x8_1100k.py
plutoyuxie/mmgeneration
0a7f5d16c970de1766ebf049d7a0264fe506504b
[ "Apache-2.0" ]
191
2021-04-15T12:13:34.000Z
2022-03-31T16:04:36.000Z
configs/positional_encoding_in_gans/mspie-stylegan2_c2_config-d_ffhq_256-512_b3x8_1100k.py
plutoyuxie/mmgeneration
0a7f5d16c970de1766ebf049d7a0264fe506504b
[ "Apache-2.0" ]
107
2021-04-15T12:38:41.000Z
2022-03-27T02:47:16.000Z
_base_ = [ '../_base_/datasets/ffhq_flip.py', '../_base_/models/stylegan/stylegan2_base.py', '../_base_/default_runtime.py' ] model = dict( type='MSPIEStyleGAN2', generator=dict( type='MSStyleGANv2Generator', head_pos_encoding=dict(type='CSG'), deconv2conv=True, up_a...
26.714286
79
0.649436
_base_ = [ '../_base_/datasets/ffhq_flip.py', '../_base_/models/stylegan/stylegan2_base.py', '../_base_/default_runtime.py' ] model = dict( type='MSPIEStyleGAN2', generator=dict( type='MSStyleGANv2Generator', head_pos_encoding=dict(type='CSG'), deconv2conv=True, up_a...
true
true
79016e655840dcf25f5b90b8bffc280f87a56c79
4,446
py
Python
pandas_ta/overlap/hilo.py
MyBourse/pandas-ta
5998e92e39b71cd79a6e75d7c599492181af5f65
[ "MIT" ]
2
2021-03-30T01:23:14.000Z
2021-04-02T18:04:51.000Z
pandas_ta/overlap/hilo.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
pandas_ta/overlap/hilo.py
lukaszbinden/pandas-ta
98478f8bf049a4c8748d6f3c795f4f335ced05ca
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from numpy import NaN as npNaN from pandas import DataFrame, Series # from pandas_ta.overlap.ma import ma from .ma import ma from pandas_ta.utils import get_offset, verify_series def hilo(high, low, close, high_length=None, low_length=None, mamode=None, offset=None, **kwargs): """Indicator...
34.734375
111
0.65857
from numpy import NaN as npNaN from pandas import DataFrame, Series from .ma import ma from pandas_ta.utils import get_offset, verify_series def hilo(high, low, close, high_length=None, low_length=None, mamode=None, offset=None, **kwargs): high = verify_series(high) low = verify_series(low) close =...
true
true
79016f66e59c16e4a1773919bca295e44f37e80c
4,367
py
Python
rasa/nlu/tokenizers/tokenizer.py
Performek/rasa
d4a88c3b97ca4cf81d011834bfbb63abbf39d697
[ "Apache-2.0" ]
1
2020-02-18T03:48:44.000Z
2020-02-18T03:48:44.000Z
rasa/nlu/tokenizers/tokenizer.py
Doometnick/rasa
969dc83a83f989a7774b2ff3ba186272b18bc73a
[ "Apache-2.0" ]
4
2020-09-25T18:31:22.000Z
2022-02-09T23:27:20.000Z
rasa/nlu/tokenizers/tokenizer.py
Doometnick/rasa
969dc83a83f989a7774b2ff3ba186272b18bc73a
[ "Apache-2.0" ]
null
null
null
import logging from typing import Text, List, Optional, Dict, Any from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.training_data import TrainingData, Message from rasa.nlu.components import Component from rasa.nlu.constants import ( RESPONSE_ATTRIBUTE, TEXT_ATTRIBUTE, CLS_TOKEN, TOKENS_NAM...
31.644928
88
0.608198
import logging from typing import Text, List, Optional, Dict, Any from rasa.nlu.config import RasaNLUModelConfig from rasa.nlu.training_data import TrainingData, Message from rasa.nlu.components import Component from rasa.nlu.constants import ( RESPONSE_ATTRIBUTE, TEXT_ATTRIBUTE, CLS_TOKEN, TOKENS_NAM...
true
true
79016fa6c6014fafe5eec382b6be4da591309ba9
32
py
Python
edureka.py
jatin06/learning-git
4e531193a95f6dc8daeb5c4c7a15a2fe786583ae
[ "MIT" ]
null
null
null
edureka.py
jatin06/learning-git
4e531193a95f6dc8daeb5c4c7a15a2fe786583ae
[ "MIT" ]
null
null
null
edureka.py
jatin06/learning-git
4e531193a95f6dc8daeb5c4c7a15a2fe786583ae
[ "MIT" ]
null
null
null
print ("welcome to edureka!! ")
16
31
0.65625
print ("welcome to edureka!! ")
true
true
790171254393847e77c757edc13e944620e1e566
6,472
py
Python
dask/array/wrap.py
BlueOwlDev/dask
a1187b13321d69565b9c21359d739c239bd04c65
[ "BSD-3-Clause" ]
null
null
null
dask/array/wrap.py
BlueOwlDev/dask
a1187b13321d69565b9c21359d739c239bd04c65
[ "BSD-3-Clause" ]
null
null
null
dask/array/wrap.py
BlueOwlDev/dask
a1187b13321d69565b9c21359d739c239bd04c65
[ "BSD-3-Clause" ]
null
null
null
from functools import partial from itertools import product import numpy as np from tlz import curry from ..base import tokenize from ..utils import funcname from .blockwise import BlockwiseCreateArray from .core import Array, normalize_chunks from .utils import ( meta_from_array, empty_like_safe, full_l...
27.896552
87
0.645705
from functools import partial from itertools import product import numpy as np from tlz import curry from ..base import tokenize from ..utils import funcname from .blockwise import BlockwiseCreateArray from .core import Array, normalize_chunks from .utils import ( meta_from_array, empty_like_safe, full_l...
true
true
79017191ffb25ad0bc2d39bcd4d208278628a040
924
py
Python
Scripts/GridSearch/ModelBuilderRLF.py
bio-hpc/sibila
337ea84692d6ea4f4d3e4de9da51f5ee53cff6d7
[ "Apache-2.0" ]
1
2022-03-07T11:05:31.000Z
2022-03-07T11:05:31.000Z
Scripts/GridSearch/ModelBuilderRLF.py
bio-hpc/sibila
337ea84692d6ea4f4d3e4de9da51f5ee53cff6d7
[ "Apache-2.0" ]
null
null
null
Scripts/GridSearch/ModelBuilderRLF.py
bio-hpc/sibila
337ea84692d6ea4f4d3e4de9da51f5ee53cff6d7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ModelBuilderRLF.py: """ __author__ = "Antonio Jesús Banegas-Luna" __version__ = "1.0" __maintainer__ = "Antonio" __email__ = "ajbanegas@ucam.edu" __status__ = "Development" from BaseModelBuilder import BaseModelBuilder class ModelBuilderRLF(BaseModelBuilder): de...
24.972973
48
0.580087
__author__ = "Antonio Jesús Banegas-Luna" __version__ = "1.0" __maintainer__ = "Antonio" __email__ = "ajbanegas@ucam.edu" __status__ = "Development" from BaseModelBuilder import BaseModelBuilder class ModelBuilderRLF(BaseModelBuilder): def get_default_model(self): p = {} p['model'] = self.mode...
true
true
79017262dd9a268afd502f5cc32e22c15e723371
154
py
Python
analysis/tools/count_histories.py
beykyle/omp-uq
7d9b720d874b634f3a56878ce34f29553441194e
[ "MIT" ]
null
null
null
analysis/tools/count_histories.py
beykyle/omp-uq
7d9b720d874b634f3a56878ce34f29553441194e
[ "MIT" ]
null
null
null
analysis/tools/count_histories.py
beykyle/omp-uq
7d9b720d874b634f3a56878ce34f29553441194e
[ "MIT" ]
null
null
null
import sys from CGMFtk import histories as fh if __name__ == "__main__": hist = fh.Histories(sys.argv[1]) print(len(hist.getFissionHistories()))
22
42
0.714286
import sys from CGMFtk import histories as fh if __name__ == "__main__": hist = fh.Histories(sys.argv[1]) print(len(hist.getFissionHistories()))
true
true
790173969efb945f4bb3a24471e09eea76be1304
299
py
Python
nsls2_catalogs/tes/__init__.py
NSLS-II/nsls2-catalogs
8dab7db65335ccd20eacf7f2e999d64ec7325620
[ "BSD-3-Clause" ]
null
null
null
nsls2_catalogs/tes/__init__.py
NSLS-II/nsls2-catalogs
8dab7db65335ccd20eacf7f2e999d64ec7325620
[ "BSD-3-Clause" ]
null
null
null
nsls2_catalogs/tes/__init__.py
NSLS-II/nsls2-catalogs
8dab7db65335ccd20eacf7f2e999d64ec7325620
[ "BSD-3-Clause" ]
null
null
null
from databroker.v1 import from_config from databroker.v0 import Broker from .. import load_config name = 'tes' v0_catalog = Broker.from_config(load_config(f'{name}/{name}.yml')) v1_catalog = from_config(load_config(f'{name}/{name}.yml')) catalog = from_config(load_config(f'{name}/{name}.yml')).v2
33.222222
66
0.755853
from databroker.v1 import from_config from databroker.v0 import Broker from .. import load_config name = 'tes' v0_catalog = Broker.from_config(load_config(f'{name}/{name}.yml')) v1_catalog = from_config(load_config(f'{name}/{name}.yml')) catalog = from_config(load_config(f'{name}/{name}.yml')).v2
true
true
790173bd5e7c35d6cbb74a0b6289f9a3f37db36b
3,356
py
Python
airsenal/framework/player_model.py
JPKFin/AIrsenal
7824ae4c07c9f21336f2986c0439549e9c346433
[ "MIT" ]
null
null
null
airsenal/framework/player_model.py
JPKFin/AIrsenal
7824ae4c07c9f21336f2986c0439549e9c346433
[ "MIT" ]
null
null
null
airsenal/framework/player_model.py
JPKFin/AIrsenal
7824ae4c07c9f21336f2986c0439549e9c346433
[ "MIT" ]
null
null
null
import jax.numpy as jnp import jax.random as random import numpyro import numpyro.distributions as dist from numpyro.infer import MCMC, NUTS from typing import Any, Dict, Optional class PlayerModel(object): """ numpyro implementation of the AIrsenal player model. """ def __init__(self): self...
33.227723
88
0.554827
import jax.numpy as jnp import jax.random as random import numpyro import numpyro.distributions as dist from numpyro.infer import MCMC, NUTS from typing import Any, Dict, Optional class PlayerModel(object): def __init__(self): self.player_ids = None self.samples = None @staticmethod def...
true
true
7901746461fddaa02bec11dd3bbf9afc1a3b1382
49,985
py
Python
ty_lib/test_pattern_generator2.py
colour-science/sample_code
8bda35b674d770da5a0e6c210634a77691527fce
[ "BSD-3-Clause" ]
1
2021-01-23T03:06:53.000Z
2021-01-23T03:06:53.000Z
ty_lib/test_pattern_generator2.py
colour-science/sample_code
8bda35b674d770da5a0e6c210634a77691527fce
[ "BSD-3-Clause" ]
null
null
null
ty_lib/test_pattern_generator2.py
colour-science/sample_code
8bda35b674d770da5a0e6c210634a77691527fce
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 評価用のテストパターン作成ツール集 """ import os import cv2 import matplotlib.pyplot as plt import numpy as np from colour.colorimetry import CMFS, ILLUMINANTS from colour.models import XYZ_to_xy, xy_to_XYZ, XYZ_to_RGB, RGB_to_XYZ from colour.models import xy_to_xyY, xyY_to_XYZ, Lab...
29.806202
105
0.573112
import os import cv2 import matplotlib.pyplot as plt import numpy as np from colour.colorimetry import CMFS, ILLUMINANTS from colour.models import XYZ_to_xy, xy_to_XYZ, XYZ_to_RGB, RGB_to_XYZ from colour.models import xy_to_xyY, xyY_to_XYZ, Lab_to_XYZ from colour.models import BT709_COLOURSPACE from colour.utilitie...
true
true
790175423e938eeaeb79260c59952e39d2b5a8cf
1,637
py
Python
recognition/base.py
ReanGD/smart-home
0d3ebe3213ad275f64490218ca3dbc0128c12339
[ "Apache-2.0" ]
1
2018-07-31T21:17:37.000Z
2018-07-31T21:17:37.000Z
recognition/base.py
ReanGD/smart-home
0d3ebe3213ad275f64490218ca3dbc0128c12339
[ "Apache-2.0" ]
null
null
null
recognition/base.py
ReanGD/smart-home
0d3ebe3213ad275f64490218ca3dbc0128c12339
[ "Apache-2.0" ]
null
null
null
from audio import Stream, AudioSettings class PhraseRecognizer(object): def __init__(self, config, audio_settings: AudioSettings): self._config = config self._audio_settings = audio_settings def get_config(self): return self._config def get_audio_settings(self) -> AudioSettings: ...
28.719298
70
0.717776
from audio import Stream, AudioSettings class PhraseRecognizer(object): def __init__(self, config, audio_settings: AudioSettings): self._config = config self._audio_settings = audio_settings def get_config(self): return self._config def get_audio_settings(self) -> AudioSettings: ...
true
true
79017579a201dcf5f57280058af9232110541daf
6,839
py
Python
sdk/python/pulumi_azure_nextgen/network/get_express_route_gateway.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/get_express_route_gateway.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/get_express_route_gateway.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
36.967568
201
0.663109
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs __all__ = [ 'GetExpressRouteGatewayResult', 'AwaitableGetExpressRouteGatewayResult', 'get_express_route_gateway', ] @pulumi.output_typ...
true
true
790175df71984046c36d0e478a37d48f8b80d535
236
py
Python
tests/sample_sdk_https.py
jframos/sdklib
0cc1126e94b823fad6cc47e6a00549cad6d2f771
[ "BSD-2-Clause" ]
3
2016-12-15T15:54:37.000Z
2021-08-10T03:16:18.000Z
tests/sample_sdk_https.py
jframos/sdklib
0cc1126e94b823fad6cc47e6a00549cad6d2f771
[ "BSD-2-Clause" ]
44
2016-04-13T08:19:45.000Z
2022-01-14T12:58:44.000Z
tests/sample_sdk_https.py
jframos/sdklib
0cc1126e94b823fad6cc47e6a00549cad6d2f771
[ "BSD-2-Clause" ]
5
2016-11-22T11:23:28.000Z
2020-01-28T12:26:10.000Z
from sdklib.http import HttpSdk class SampleHttpsHttpSdk(HttpSdk): DEFAULT_HOST = "https://www.google.com" API_IVANPRJCTS_PATH = "/ivanprjcts" def get_ivanprjcts(self): return self.get(self.API_IVANPRJCTS_PATH)
19.666667
49
0.728814
from sdklib.http import HttpSdk class SampleHttpsHttpSdk(HttpSdk): DEFAULT_HOST = "https://www.google.com" API_IVANPRJCTS_PATH = "/ivanprjcts" def get_ivanprjcts(self): return self.get(self.API_IVANPRJCTS_PATH)
true
true
79017678f78ba6aa7a00b756d1da6a0797025124
3,270
py
Python
src/unittest/python/plugins/python/test_plugin_helper_tests.py
igordertigor/pybuilder
772cf66a6fea86c59bd76f22388b0ce964b2fc1a
[ "Apache-2.0" ]
1
2019-01-17T03:35:32.000Z
2019-01-17T03:35:32.000Z
src/unittest/python/plugins/python/test_plugin_helper_tests.py
igordertigor/pybuilder
772cf66a6fea86c59bd76f22388b0ce964b2fc1a
[ "Apache-2.0" ]
1
2022-03-10T13:19:18.000Z
2022-03-10T13:19:18.000Z
src/unittest/python/plugins/python/test_plugin_helper_tests.py
igordertigor/pybuilder
772cf66a6fea86c59bd76f22388b0ce964b2fc1a
[ "Apache-2.0" ]
1
2020-11-02T10:06:11.000Z
2020-11-02T10:06:11.000Z
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
39.878049
113
0.654434
import unittest from pybuilder.errors import BuildFailedException from pybuilder.plugins.python.test_plugin_helper import ReportsProcessor from test_utils import Mock, patch class ReportsProcessorTests(unittest.TestCase): def setUp(self): self.reports_processor = ReportsProcessor(Mock()...
true
true
790177febcf816c121cc0c602b65cc695b8cd1ec
692
py
Python
nltk_utils.py
Serkanbezek/Chatbot-NLP-PyTorch
680dfa788fa3e3162470a79e7bbd4aa02088a24d
[ "MIT" ]
1
2022-03-03T18:27:23.000Z
2022-03-03T18:27:23.000Z
nltk_utils.py
Serkanbezek/Chatbot-NLP-PyTorch
680dfa788fa3e3162470a79e7bbd4aa02088a24d
[ "MIT" ]
null
null
null
nltk_utils.py
Serkanbezek/Chatbot-NLP-PyTorch
680dfa788fa3e3162470a79e7bbd4aa02088a24d
[ "MIT" ]
null
null
null
import nltk import numpy as np #nltk.download('punkt') #downloading a package with a pretrained tokenizer from nltk.stem.porter import PorterStemmer stemmer = PorterStemmer() def tokenize(sentence): #splitting a string into meaningful units return nltk.word_tokenize(sentence) def stem(word): ...
26.615385
80
0.703757
import nltk import numpy as np r = PorterStemmer() def tokenize(sentence): return nltk.word_tokenize(sentence) def stem(word): return stemmer.stem(word.lower()) def bag_of_words(tokenized_sentence, all_words): tokenized_sentence = [stem(w) for w in tokenized_sentence] bag = np.ze...
true
true
790178b67adb1c4d32e83058746158b4273e9c8f
2,349
py
Python
simiki/config.py
timgates42/simiki
22e544254577477c3f624c9d201f644580f36231
[ "MIT" ]
1,034
2015-01-04T05:50:05.000Z
2022-03-23T03:08:25.000Z
simiki/config.py
timgates42/simiki
22e544254577477c3f624c9d201f644580f36231
[ "MIT" ]
102
2015-01-12T01:20:10.000Z
2020-12-31T01:47:25.000Z
simiki/config.py
timgates42/simiki
22e544254577477c3f624c9d201f644580f36231
[ "MIT" ]
215
2015-01-25T13:49:49.000Z
2022-03-22T09:14:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import os import os.path import sys import io import logging import datetime from pprint import pprint import yaml import tzlocal class ConfigFileNotFound(Exception): pass def _set_default_config(): conf...
24.989362
75
0.585355
from __future__ import absolute_import, unicode_literals import os import os.path import sys import io import logging import datetime from pprint import pprint import yaml import tzlocal class ConfigFileNotFound(Exception): pass def _set_default_config(): config = { "url": "", "title": "...
true
true
790178e3ed0bcfa7aa502d7406e2a2ec79590747
3,678
py
Python
ckanext/stats/stats.py
mabah-mst/ckan
105f613272c2e31daa0081ead24c678bf1b55c22
[ "Apache-2.0" ]
6
2015-11-09T00:44:51.000Z
2019-11-21T14:56:01.000Z
ckanext/stats/stats.py
syats/ckan
599ff35f9c289bab674f544367d5acdb1d2c9423
[ "Apache-2.0" ]
39
2015-02-18T17:32:23.000Z
2022-03-11T18:03:36.000Z
ckanext/stats/stats.py
cascaoSDC/ckan
75a08caa7c688ce70229dfea7070cc667a15c5e8
[ "BSD-3-Clause" ]
17
2015-03-13T18:05:05.000Z
2020-11-06T13:55:32.000Z
# encoding: utf-8 import datetime import logging from ckan.common import config from six import text_type from sqlalchemy import Table, select, join, func, and_ import ckan.plugins as p import ckan.model as model log = logging.getLogger(__name__) cache_enabled = p.toolkit.asbool( config.get('ckanext.stats.cache_...
32.839286
76
0.576672
import datetime import logging from ckan.common import config from six import text_type from sqlalchemy import Table, select, join, func, and_ import ckan.plugins as p import ckan.model as model log = logging.getLogger(__name__) cache_enabled = p.toolkit.asbool( config.get('ckanext.stats.cache_enabled', False) ...
true
true
7901792d7e756f8286ce38810accc3742ee607a0
1,299
py
Python
blockchain/Transaction.py
kaifkhan1040/voting
272f7eaed7793d86e35a6c10001ee852432cf6ee
[ "MIT" ]
12
2019-05-11T11:28:37.000Z
2021-02-25T19:40:58.000Z
blockchain/Transaction.py
kaifkhan1040/voting
272f7eaed7793d86e35a6c10001ee852432cf6ee
[ "MIT" ]
8
2019-05-07T18:50:45.000Z
2020-10-21T11:23:16.000Z
blockchain/Transaction.py
kaifkhan1040/voting
272f7eaed7793d86e35a6c10001ee852432cf6ee
[ "MIT" ]
7
2019-05-11T08:16:03.000Z
2020-11-30T08:34:15.000Z
import hashlib from fastecdsa import keys, curve, ecdsa from hashlib import sha256 from uuid import uuid4 class Transaction: def __init__(self, from_address, to_address, amount): self.from_address = from_address self.to_address = to_address self.amount = amount self.id = str(uuid4...
30.928571
120
0.635874
import hashlib from fastecdsa import keys, curve, ecdsa from hashlib import sha256 from uuid import uuid4 class Transaction: def __init__(self, from_address, to_address, amount): self.from_address = from_address self.to_address = to_address self.amount = amount self.id = str(uuid4...
true
true
790179b1396fdd73fefa5d3753233d7ab0acfc5c
1,185
py
Python
api/src/opentrons/hardware_control/g_code_parsing/g_code_functionality_defs/tempdeck/get_temp_g_code_functionality_def.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/g_code_parsing/g_code_functionality_defs/tempdeck/get_temp_g_code_functionality_def.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
null
null
null
api/src/opentrons/hardware_control/g_code_parsing/g_code_functionality_defs/tempdeck/get_temp_g_code_functionality_def.py
knownmed/opentrons
d02eb3c6cbf9f1c8c05c5e9e1dac30a92a8c5e6c
[ "Apache-2.0" ]
null
null
null
import re from typing import Dict from opentrons.hardware_control.g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( # noqa: E501 GCodeFunctionalityDefBase, ) class GetTempGCodeFunctionalityDef(GCodeFunctionalityDefBase): RESPONSE_RE = re.compile(r"T:(?P<set_temp>.*?)C:(?P<curren...
34.852941
125
0.605063
import re from typing import Dict from opentrons.hardware_control.g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import ( GCodeFunctionalityDefBase, ) class GetTempGCodeFunctionalityDef(GCodeFunctionalityDefBase): RESPONSE_RE = re.compile(r"T:(?P<set_temp>.*?)C:(?P<current_temp>\d+.\...
true
true
79017a40dd5a88091830cc6c4a40fd29b48a50dc
1,105
py
Python
Python3/Tornado/apps/pg/PG_Wallet/src/lib/sql.py
youngqqcn/QBlockChainNotes
85122049024dc5555705bf016312491a51966621
[ "MIT" ]
24
2018-11-01T03:36:43.000Z
2022-03-28T08:20:30.000Z
Python3/Tornado/apps/pg/PG_Wallet/src/lib/sql.py
songning4/QBlockChainNotes
d65ede073f5a20f728f41cc6850409693820cdb1
[ "MIT" ]
57
2019-12-04T08:26:47.000Z
2022-03-08T07:35:15.000Z
Python3/Tornado/apps/pg/PG_Wallet/src/lib/sql.py
youngqqcn/QBlockChainNotes
85122049024dc5555705bf016312491a51966621
[ "MIT" ]
11
2019-01-04T08:41:57.000Z
2022-03-16T03:51:36.000Z
#!coding:utf8 #author:yqq #date:2020/4/30 0030 17:11 #description: import os import pymysql SQL_PASSWD = os.environ.get('SQL_PWD') def open(host : str,usr : str, passwd : str,db_name : str): conn = pymysql.connect(host=host, user=usr, password=passwd, db=db_name, charset='utf8', ...
21.666667
71
0.643439
import os import pymysql SQL_PASSWD = os.environ.get('SQL_PWD') def open(host : str,usr : str, passwd : str,db_name : str): conn = pymysql.connect(host=host, user=usr, password=passwd, db=db_name, charset='utf8', cursorclass=pymysql.cursors.DictCursor) return conn def c...
true
true
79017c0607032cf5f29a9166dd2136111da20517
3,223
py
Python
demo.py
ijinmao/CAM-Localization
dfa214be984f77d577dba1065e2c63e0c1b0b82b
[ "MIT" ]
4
2017-09-07T05:55:58.000Z
2019-09-05T04:02:41.000Z
demo.py
ijinmao/CAM-Localization
dfa214be984f77d577dba1065e2c63e0c1b0b82b
[ "MIT" ]
null
null
null
demo.py
ijinmao/CAM-Localization
dfa214be984f77d577dba1065e2c63e0c1b0b82b
[ "MIT" ]
1
2019-04-02T05:03:25.000Z
2019-04-02T05:03:25.000Z
import numpy as np import cv2 import matplotlib.pylab as plt from keras.preprocessing.image import load_img from keras.models import model_from_json from models import ( create_cam_model, preprocess_image, get_cam_img ) # Define CAM conv layer name CAM_CONV_LAYER = 'cam_conv_layer' def read_model(model_path, wei...
25.784
97
0.730996
import numpy as np import cv2 import matplotlib.pylab as plt from keras.preprocessing.image import load_img from keras.models import model_from_json from models import ( create_cam_model, preprocess_image, get_cam_img ) CAM_CONV_LAYER = 'cam_conv_layer' def read_model(model_path, weigths_path): model = model_f...
true
true
79017c62423711590bccd2042772a130938484bb
25,242
py
Python
python/pyspark/sql/session.py
YoufuLi/radlog
669c2b28f7ef4f9f6d94d353a3b180c1ad3b99e5
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "PostgreSQL", "BSD-3-Clause" ]
2
2019-04-03T06:39:06.000Z
2019-06-23T16:43:49.000Z
python/pyspark/sql/session.py
YoufuLi/radlog
669c2b28f7ef4f9f6d94d353a3b180c1ad3b99e5
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "PostgreSQL", "BSD-3-Clause" ]
1
2021-08-31T03:40:28.000Z
2021-08-31T06:38:38.000Z
python/pyspark/sql/session.py
YoufuLi/radlog
669c2b28f7ef4f9f6d94d353a3b180c1ad3b99e5
[ "BSD-3-Clause-Open-MPI", "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "MIT", "MIT-0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause-Clear", "PostgreSQL", "BSD-3-Clause" ]
1
2019-04-03T05:00:51.000Z
2019-04-03T05:00:51.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...
38.833846
100
0.598605
from __future__ import print_function import sys import warnings from functools import reduce from threading import RLock if sys.version >= '3': basestring = unicode = str else: from itertools import imap as map from pyspark import since from pyspark.rdd import RDD, ignore_unicode_prefix from...
true
true
79017db60e73d804537d0dcbeefc4a9df9259ba7
4,771
py
Python
core/tests/test_helpers.py
uktrade/directory-ui-supplier
b91bb07dbcb1d69a032a0536b8eff6e0e96196ef
[ "MIT" ]
2
2017-06-02T09:09:06.000Z
2017-07-19T22:51:16.000Z
core/tests/test_helpers.py
uktrade/directory-ui-supplier
b91bb07dbcb1d69a032a0536b8eff6e0e96196ef
[ "MIT" ]
409
2016-12-28T12:14:27.000Z
2019-08-01T11:11:48.000Z
core/tests/test_helpers.py
uktrade/directory-ui-supplier
b91bb07dbcb1d69a032a0536b8eff6e0e96196ef
[ "MIT" ]
5
2017-08-30T08:11:29.000Z
2019-06-04T20:40:34.000Z
import pytest import requests from directory_constants import expertise, sectors from django.shortcuts import Http404 from django.urls import reverse from core import helpers import core.tests.helpers @pytest.mark.parametrize('status_code,exception', ( (400, requests.exceptions.HTTPError), (404, Http404), ...
31.388158
78
0.607001
import pytest import requests from directory_constants import expertise, sectors from django.shortcuts import Http404 from django.urls import reverse from core import helpers import core.tests.helpers @pytest.mark.parametrize('status_code,exception', ( (400, requests.exceptions.HTTPError), (404, Http404), ...
true
true
79017dde051b610290823593c239642b85ff636f
6,965
py
Python
auction/models/bases.py
JohnRomanski/django-auction
bc6982c8f34a9a6914badb203424eca7f3219685
[ "MIT" ]
1
2021-02-04T21:48:53.000Z
2021-02-04T21:48:53.000Z
auction/models/bases.py
JohnRomanski/django-auction
bc6982c8f34a9a6914badb203424eca7f3219685
[ "MIT" ]
null
null
null
auction/models/bases.py
JohnRomanski/django-auction
bc6982c8f34a9a6914badb203424eca7f3219685
[ "MIT" ]
null
null
null
from decimal import Decimal from django.db import models from polymorphic.models import PolymorphicModel from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericFo...
36.657895
169
0.649103
from decimal import Decimal from django.db import models from polymorphic.models import PolymorphicModel from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericFo...
true
true
79017ec0b14fe9afce886b1930ce41463eeb6e58
2,871
py
Python
cvpods/engine/predictor.py
reinforcementdriving/cvpods
32d98b74745020be035a0e20337ad934201615c4
[ "Apache-2.0" ]
null
null
null
cvpods/engine/predictor.py
reinforcementdriving/cvpods
32d98b74745020be035a0e20337ad934201615c4
[ "Apache-2.0" ]
null
null
null
cvpods/engine/predictor.py
reinforcementdriving/cvpods
32d98b74745020be035a0e20337ad934201615c4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding:utf-8 -*- from copy import deepcopy import torch from cvpods.checkpoint import DefaultCheckpointer from cvpods.data import build_transform_gens __all__ = ["DefaultPredictor"] class DefaultPredictor: """ Create a simple end-to-end predictor with the given config that runs on ...
35.012195
93
0.634622
from copy import deepcopy import torch from cvpods.checkpoint import DefaultCheckpointer from cvpods.data import build_transform_gens __all__ = ["DefaultPredictor"] class DefaultPredictor: def __init__(self, cfg, meta): self.cfg = deepcopy(cfg) if self.cfg.MODEL.DEVICE.startswith("cuda:"): ...
true
true
7901805fc8cdf86e45d1ce43b59c72b49765ded2
16,435
py
Python
mezzanine/core/managers.py
abendig/mezzanine
3219ac9ba2d6d94ce63e8b2a747c3b264b13beec
[ "BSD-2-Clause" ]
null
null
null
mezzanine/core/managers.py
abendig/mezzanine
3219ac9ba2d6d94ce63e8b2a747c3b264b13beec
[ "BSD-2-Clause" ]
null
null
null
mezzanine/core/managers.py
abendig/mezzanine
3219ac9ba2d6d94ce63e8b2a747c3b264b13beec
[ "BSD-2-Clause" ]
null
null
null
from __future__ import unicode_literals from future.builtins import int, zip from functools import reduce from operator import ior, iand from string import punctuation from django.core.exceptions import ImproperlyConfigured from django.db.models import Manager, Q, CharField, TextField from django.db.models.loading im...
43.364116
78
0.61369
from __future__ import unicode_literals from future.builtins import int, zip from functools import reduce from operator import ior, iand from string import punctuation from django.core.exceptions import ImproperlyConfigured from django.db.models import Manager, Q, CharField, TextField from django.db.models.loading im...
true
true
790180b6fa6ecd539778f977414d0a204e12f6bf
2,465
py
Python
tests/dashboard/widgets/test_reg_error_normality_widget.py
Tapot/evidently
ab9b91425d622566b663565508dd1c43e741f515
[ "Apache-2.0" ]
null
null
null
tests/dashboard/widgets/test_reg_error_normality_widget.py
Tapot/evidently
ab9b91425d622566b663565508dd1c43e741f515
[ "Apache-2.0" ]
null
null
null
tests/dashboard/widgets/test_reg_error_normality_widget.py
Tapot/evidently
ab9b91425d622566b663565508dd1c43e741f515
[ "Apache-2.0" ]
null
null
null
from typing import Optional import pandas as pd import pytest from evidently.analyzers.regression_performance_analyzer import RegressionPerformanceAnalyzer from evidently.model.widget import BaseWidgetInfo from evidently.options import OptionsProvider from evidently.pipeline.column_mapping import ColumnMapping from ...
33.310811
101
0.696552
from typing import Optional import pandas as pd import pytest from evidently.analyzers.regression_performance_analyzer import RegressionPerformanceAnalyzer from evidently.model.widget import BaseWidgetInfo from evidently.options import OptionsProvider from evidently.pipeline.column_mapping import ColumnMapping from ...
true
true
7901825d081d4734618c345f5991cc10b05e2e24
1,370
py
Python
Chapter13/listing13_7.py
hohsieh/osgeopy-code
932157c748c8fedb67d862b266a983fdd29ead56
[ "MIT" ]
160
2015-01-11T06:45:11.000Z
2022-03-07T15:09:57.000Z
Chapter13/listing13_7.py
sthagen/osgeopy-code
bc85f4ec7a630b53502ee491e400057b67cdab22
[ "MIT" ]
3
2018-09-29T11:34:13.000Z
2020-07-20T16:45:23.000Z
Chapter13/listing13_7.py
sthagen/osgeopy-code
bc85f4ec7a630b53502ee491e400057b67cdab22
[ "MIT" ]
108
2015-05-28T11:29:01.000Z
2022-02-12T12:01:46.000Z
# Script that uses meshgrid to get map coordinates and then plots # the DEM in 3d. import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from osgeo import gdal ds = gdal.Open(r'D:\osgeopy-data\Washington\dem\sthelens_utm.tif') band = ds.GetRasterBand(1) ov_band = band.GetOverview...
27.4
66
0.713869
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from osgeo import gdal ds = gdal.Open(r'D:\osgeopy-data\Washington\dem\sthelens_utm.tif') band = ds.GetRasterBand(1) ov_band = band.GetOverview(band.GetOverviewCount() - 3) data = ov_band.ReadAsArray() geotransform = ds.Ge...
true
true
790182ffa231c5da4b7f2cb69babcff3bf2c1dc2
4,946
py
Python
ebl/fragmentarium/application/annotations_service.py
ElectronicBabylonianLiterature/dictionary
5977a57314cf57f94f75cd12520f178b1d6a6555
[ "MIT" ]
null
null
null
ebl/fragmentarium/application/annotations_service.py
ElectronicBabylonianLiterature/dictionary
5977a57314cf57f94f75cd12520f178b1d6a6555
[ "MIT" ]
null
null
null
ebl/fragmentarium/application/annotations_service.py
ElectronicBabylonianLiterature/dictionary
5977a57314cf57f94f75cd12520f178b1d6a6555
[ "MIT" ]
null
null
null
from io import BytesIO from typing import Tuple, Sequence import attr from PIL import Image from ebl.changelog import Changelog from ebl.ebl_ai_client import EblAiClient from ebl.files.application.file_repository import FileRepository from ebl.fragmentarium.application.annotations_repository import AnnotationsReposit...
37.755725
86
0.697736
from io import BytesIO from typing import Tuple, Sequence import attr from PIL import Image from ebl.changelog import Changelog from ebl.ebl_ai_client import EblAiClient from ebl.files.application.file_repository import FileRepository from ebl.fragmentarium.application.annotations_repository import AnnotationsReposit...
true
true
79018386380f0f5a1f9ccfd59456ae05b5b003cf
1,562
py
Python
procedures/points_B_ICG_Lozaano_Equation.py
k-cybulski/sigman-project
1f51e04dddb375eb58182664296b7b3f1db71756
[ "MIT" ]
1
2017-11-10T10:42:07.000Z
2017-11-10T10:42:07.000Z
procedures/points_B_ICG_Lozaano_Equation.py
k-cybulski/sigman-project
1f51e04dddb375eb58182664296b7b3f1db71756
[ "MIT" ]
21
2017-12-28T13:39:55.000Z
2018-07-16T14:34:29.000Z
procedures/points_B_ICG_Lozaano_Equation.py
k-cybulski/sigman-project
1f51e04dddb375eb58182664296b7b3f1db71756
[ "MIT" ]
1
2018-02-25T13:57:50.000Z
2018-02-25T13:57:50.000Z
import numpy as np from sigman.analyzer import InvalidArgumentError procedure_type = 'points' description = ( """Procedure calculate time of B point from equation: RB = 1.233RZ-0.0032RZ^2-31.59 where RZ - time between R and dz/dt max [ms] RB - time between R and B Equation was proposed by D.L. Lozano in pa...
26.931034
79
0.630602
import numpy as np from sigman.analyzer import InvalidArgumentError procedure_type = 'points' description = ( """Procedure calculate time of B point from equation: RB = 1.233RZ-0.0032RZ^2-31.59 where RZ - time between R and dz/dt max [ms] RB - time between R and B Equation was proposed by D.L. Lozano in pa...
true
true
790183bb62764197eb48efd6c0be97946020eba2
396
py
Python
kongoauth/wsgi.py
toast38coza/KongOAuth
827d6f0cb47c67903f0a0236f56cd20c18bb84bb
[ "MIT" ]
null
null
null
kongoauth/wsgi.py
toast38coza/KongOAuth
827d6f0cb47c67903f0a0236f56cd20c18bb84bb
[ "MIT" ]
3
2020-02-11T23:09:10.000Z
2021-06-10T18:21:30.000Z
kongoauth/wsgi.py
toast38coza/KongOAuth
827d6f0cb47c67903f0a0236f56cd20c18bb84bb
[ "MIT" ]
null
null
null
""" WSGI config for kongoauth project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SE...
23.294118
78
0.787879
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kongoauth.settings") application = get_wsgi_application()
true
true
7901840e1caccf4c39615aa05782447db4ea89d4
13,614
py
Python
tabular/src/autogluon/tabular/models/knn/knn_model.py
taesup-aws/autogluon
51b20c4a18de148b4f06b384e56b102c86727153
[ "Apache-2.0" ]
null
null
null
tabular/src/autogluon/tabular/models/knn/knn_model.py
taesup-aws/autogluon
51b20c4a18de148b4f06b384e56b102c86727153
[ "Apache-2.0" ]
null
null
null
tabular/src/autogluon/tabular/models/knn/knn_model.py
taesup-aws/autogluon
51b20c4a18de148b4f06b384e56b102c86727153
[ "Apache-2.0" ]
null
null
null
import logging import numpy as np import math import psutil import time from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_OBJECT, S_BOOL, S_TEXT_NGRAM, S_TEXT_SPECIAL, S_DATETIME_AS_INT from autogluon.core.constants import REGRESSION from autogluon.core.utils.exceptions import NotEnoughMemoryError fro...
48.106007
237
0.653518
import logging import numpy as np import math import psutil import time from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_OBJECT, S_BOOL, S_TEXT_NGRAM, S_TEXT_SPECIAL, S_DATETIME_AS_INT from autogluon.core.constants import REGRESSION from autogluon.core.utils.exceptions import NotEnoughMemoryError fro...
true
true
7901846bb4048b9e0097cb7fd952f59be6683ece
1,750
py
Python
tests/test_cache.py
gvigneron/webapp2_caffeine
1c920e77b48555886dff5206cc5e83179f23c8f1
[ "Apache-2.0" ]
null
null
null
tests/test_cache.py
gvigneron/webapp2_caffeine
1c920e77b48555886dff5206cc5e83179f23c8f1
[ "Apache-2.0" ]
null
null
null
tests/test_cache.py
gvigneron/webapp2_caffeine
1c920e77b48555886dff5206cc5e83179f23c8f1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime import time import unittest from webapp2_caffeine.cache import CacheContainer from webapp2_caffeine.cache import flush class DummyCache(CacheContainer): key = 'dummy_cache' @property def fresh_value(self): return datetime.now() class Cache...
26.119403
65
0.641143
from datetime import datetime import time import unittest from webapp2_caffeine.cache import CacheContainer from webapp2_caffeine.cache import flush class DummyCache(CacheContainer): key = 'dummy_cache' @property def fresh_value(self): return datetime.now() class CacheContainerTest(unittest....
true
true
790184f2ee82e1be0871186debe15bfcb841f23a
3,103
py
Python
app/service/socketservice.py
mohansd/cyx-xElec-server
bef67274ba85d6172ac1ef4dd3df8c8ce86c6c61
[ "Apache-2.0" ]
null
null
null
app/service/socketservice.py
mohansd/cyx-xElec-server
bef67274ba85d6172ac1ef4dd3df8c8ce86c6c61
[ "Apache-2.0" ]
null
null
null
app/service/socketservice.py
mohansd/cyx-xElec-server
bef67274ba85d6172ac1ef4dd3df8c8ce86c6c61
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from app.libs.utils import data_decode import socket, socketserver, threading import traceback class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): ip = "" port = 0 timeOut = 100 def __init__(self, request, client_address, server): from app.service.device i...
30.126214
89
0.565259
from app.libs.utils import data_decode import socket, socketserver, threading import traceback class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): ip = "" port = 0 timeOut = 100 def __init__(self, request, client_address, server): from app.service.device import Device se...
true
true
79018509c992165fc5ca9150cd98660c06939562
651
py
Python
app/Meetup/Filter.py
benjifs/site_bot
9d342d39e927e4f0b175ccb186c3f8c997bd8d35
[ "MIT" ]
1
2019-10-27T13:13:12.000Z
2019-10-27T13:13:12.000Z
app/Meetup/Filter.py
benjifs/site_bot
9d342d39e927e4f0b175ccb186c3f8c997bd8d35
[ "MIT" ]
10
2019-10-02T12:34:03.000Z
2020-10-28T00:19:20.000Z
app/Meetup/Filter.py
OpenTwinCities/site_bot
a6e5d056462bed1559eed8232e4d1c0e6323e3c4
[ "MIT" ]
2
2019-10-06T23:12:49.000Z
2019-10-22T23:22:09.000Z
# -*- coding: utf8 -*- def filter_event(event, happening_before): """Check if the following keys are present. These keys only show up when using the API. If fetching from the iCal, JSON, or RSS feeds it will just compare the dates """ status = True visibility = True actions = True ...
28.304348
60
0.6298
def filter_event(event, happening_before): status = True visibility = True actions = True if 'status' in event: status = event['status'] == 'upcoming' if 'visibility' in event: visibility = event['visibility'] == 'public' if 'self' in event: actions = 'announce' not in...
true
true
79018541666340e37da7601f2619ebf06e3d9707
26,877
py
Python
keras/initializers/initializers_v2.py
winnerineast/keras
1e94c43d7ba0d7b6b629b2300e40470f495bdbe0
[ "Apache-2.0" ]
null
null
null
keras/initializers/initializers_v2.py
winnerineast/keras
1e94c43d7ba0d7b6b629b2300e40470f495bdbe0
[ "Apache-2.0" ]
null
null
null
keras/initializers/initializers_v2.py
winnerineast/keras
1e94c43d7ba0d7b6b629b2300e40470f495bdbe0
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.041721
162
0.699111
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from keras import backend from tensorflow.python.ops import init_ops_v2 from tensorflow.python.util.tf_export import keras_export @keras_export('keras.initializers.Initi...
true
true
790187d3fe7399dfc406b03a12c16e7f62d46c93
9,607
py
Python
tools/c7n_mailer/c7n_mailer/cli.py
blade2005/cloud-custodian
21ecdd60ae8a78887cf9d135367b283ce88b0fd9
[ "Apache-2.0" ]
null
null
null
tools/c7n_mailer/c7n_mailer/cli.py
blade2005/cloud-custodian
21ecdd60ae8a78887cf9d135367b283ce88b0fd9
[ "Apache-2.0" ]
79
2019-03-20T12:27:06.000Z
2019-08-14T14:07:04.000Z
tools/c7n_mailer/c7n_mailer/cli.py
blade2005/cloud-custodian
21ecdd60ae8a78887cf9d135367b283ce88b0fd9
[ "Apache-2.0" ]
2
2019-04-22T15:20:23.000Z
2019-08-27T12:37:51.000Z
from __future__ import absolute_import, division, print_function, unicode_literals import argparse import functools import logging from os import path import boto3 import jsonschema from c7n_mailer import deploy, utils from c7n_mailer.azure_mailer.azure_queue_processor import MailerAzureQueueProcessor from c7n_mailer...
37.527344
100
0.575518
from __future__ import absolute_import, division, print_function, unicode_literals import argparse import functools import logging from os import path import boto3 import jsonschema from c7n_mailer import deploy, utils from c7n_mailer.azure_mailer.azure_queue_processor import MailerAzureQueueProcessor from c7n_mailer...
true
true
790188ae02814f0707a255110003d194b42b7e35
17,512
py
Python
sdk/python/pulumi_azure_native/recoveryservices/v20181220/outputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/recoveryservices/v20181220/outputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/recoveryservices/v20181220/outputs.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
41.794749
134
0.672624
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = [ 'WorkloadCrrAccessTokenResponse', ] @pulumi.output_type class WorkloadCrrAccessTokenResponse(dict): def __init__(__self__, *, obj...
true
true
7901891fab450fcfb03bc8eb0dc2bfbb1fba0b44
1,181
py
Python
djangocms_tacc_section/cms_plugins.py
tacc-wbomar/Core-CMS-Plugin-Section
9b5f652c6e01e46df5d5caa09cfa9ea6663823d0
[ "BSD-2-Clause" ]
null
null
null
djangocms_tacc_section/cms_plugins.py
tacc-wbomar/Core-CMS-Plugin-Section
9b5f652c6e01e46df5d5caa09cfa9ea6663823d0
[ "BSD-2-Clause" ]
null
null
null
djangocms_tacc_section/cms_plugins.py
tacc-wbomar/Core-CMS-Plugin-Section
9b5f652c6e01e46df5d5caa09cfa9ea6663823d0
[ "BSD-2-Clause" ]
null
null
null
from djangocms_style.cms_plugins import StylePlugin from cms.plugin_pool import plugin_pool from django.utils.translation import gettext_lazy as _ from .models import TaccsiteSection # Plugins @plugin_pool.register_plugin class TaccsiteSectionPlugin(StylePlugin): """ Patterns > "Section" Plugin https://...
28.119048
101
0.58171
from djangocms_style.cms_plugins import StylePlugin from cms.plugin_pool import plugin_pool from django.utils.translation import gettext_lazy as _ from .models import TaccsiteSection @plugin_pool.register_plugin class TaccsiteSectionPlugin(StylePlugin): module = 'TACC Site' model = TaccsiteSection name...
true
true
79018926c625feed767a46b117b2755cd86f2c6a
9,602
py
Python
tests/test_transition.py
kishorehariram/django-logic
955f18211443b30ce39a845495e136d7590183a6
[ "MIT" ]
null
null
null
tests/test_transition.py
kishorehariram/django-logic
955f18211443b30ce39a845495e136d7590183a6
[ "MIT" ]
null
null
null
tests/test_transition.py
kishorehariram/django-logic
955f18211443b30ce39a845495e136d7590183a6
[ "MIT" ]
null
null
null
from unittest.mock import patch from django.test import TestCase from django_logic.state import State from django_logic.transition import Transition from tests.models import Invoice def disable_invoice(invoice: Invoice, *args, **kwargs): invoice.is_available = False invoice.save() def update_invoice(invoi...
45.507109
108
0.687669
from unittest.mock import patch from django.test import TestCase from django_logic.state import State from django_logic.transition import Transition from tests.models import Invoice def disable_invoice(invoice: Invoice, *args, **kwargs): invoice.is_available = False invoice.save() def update_invoice(invoi...
true
true
79018a4edf7335e2c6b90bf59e8f83a975bfb1c9
1,625
py
Python
Head/typer.py
D3crypT0r/D3crypt
1e8b0a61e604442590d72c7df05921384584968e
[ "MIT" ]
null
null
null
Head/typer.py
D3crypT0r/D3crypt
1e8b0a61e604442590d72c7df05921384584968e
[ "MIT" ]
null
null
null
Head/typer.py
D3crypT0r/D3crypt
1e8b0a61e604442590d72c7df05921384584968e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # MIT License # # Copyright (c) 2020 EntySec # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
33.854167
80
0.720615
import sys import tty import termios from Head.d3crypt import ghost class typer: def __init__(self): self.d3crypt = d3crypt() def get_char(self): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) try: tty.setraw(fd) return sy...
true
true
79018a7b4549f9cc20a13df03126349d8fd41ee5
5,524
py
Python
api/dailymed/tests/test_api.py
coderxio/dailymed-api
90fe5f8b40a854ff7543ec9b8c4fc0232fdd0dfc
[ "MIT" ]
10
2020-09-23T14:13:35.000Z
2022-03-01T17:39:23.000Z
api/dailymed/tests/test_api.py
coderxio/dailymed-api
90fe5f8b40a854ff7543ec9b8c4fc0232fdd0dfc
[ "MIT" ]
30
2020-09-04T14:43:35.000Z
2021-01-24T01:17:08.000Z
api/dailymed/tests/test_api.py
coderxio/dailymed-api
90fe5f8b40a854ff7543ec9b8c4fc0232fdd0dfc
[ "MIT" ]
3
2020-12-22T01:49:32.000Z
2022-02-10T01:56:05.000Z
from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from dailymed.models import Set, Spl, InactiveIngredient from dailymed.serializers import SplSerializer import json from pathlib import Path SPL_URL = reverse('spl-list') PR...
33.478788
78
0.589971
from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from dailymed.models import Set, Spl, InactiveIngredient from dailymed.serializers import SplSerializer import json from pathlib import Path SPL_URL = reverse('spl-list') PR...
true
true
79018a9ee37928d5ce7164c02c528c9f2c624d84
16,071
py
Python
botorch/acquisition/monte_carlo.py
BradyBromley/botorch
ea7f8fa2cead9c581309437a1f2f59ed070cb59e
[ "MIT" ]
1
2020-07-21T21:25:16.000Z
2020-07-21T21:25:16.000Z
botorch/acquisition/monte_carlo.py
zpao/botorch
270599207f5b9bf8c66e1197ad2632bb69c3d3b9
[ "MIT" ]
null
null
null
botorch/acquisition/monte_carlo.py
zpao/botorch
270599207f5b9bf8c66e1197ad2632bb69c3d3b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved r""" Batch acquisition functions using the reparameterization trick in combination with (quasi) Monte-Carlo sampling. See [Rezende2014reparam]_ and [Wilson2017reparam]_ .. [Rezende2014reparam] D. J. Rezende, S. Mohamed,...
39.197561
86
0.62759
import math from abc import ABC, abstractmethod from typing import Optional, Union import torch from torch import Tensor from ..exceptions.errors import UnsupportedError from ..models.model import Model from ..sampling.samplers import MCSampler, SobolQMCNormalSampler from ..utils.transforms import ( concaten...
true
true
79018b8a2227af6bfbfbee3c81e94b7f005b0dbb
923
py
Python
ml/rl/test/models/test_sequence_model.py
joshrose/Horizon
a2eb407b31a16560ae78aa6751eb83672a122a7e
[ "BSD-3-Clause" ]
2
2021-01-11T18:16:32.000Z
2021-11-30T09:34:58.000Z
ml/rl/test/models/test_sequence_model.py
joshrose/Horizon
a2eb407b31a16560ae78aa6751eb83672a122a7e
[ "BSD-3-Clause" ]
null
null
null
ml/rl/test/models/test_sequence_model.py
joshrose/Horizon
a2eb407b31a16560ae78aa6751eb83672a122a7e
[ "BSD-3-Clause" ]
2
2021-01-06T01:06:50.000Z
2021-06-24T01:12:52.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging import unittest from ml.rl.models.example_sequence_model import ExampleSequenceModel from ml.rl.test.models.test_utils import check_save_load logger = logging.getLogger(__name__) class TestExampleSequence...
30.766667
87
0.713976
import logging import unittest from ml.rl.models.example_sequence_model import ExampleSequenceModel from ml.rl.test.models.test_utils import check_save_load logger = logging.getLogger(__name__) class TestExampleSequenceModel(unittest.TestCase): def test_basic(self): state_dim = 8 model = Exa...
true
true
79018bc4d2b547771235d267e6304eb5b3a7f9bc
5,093
py
Python
RA_project/code_python/image_score_posi.py
erialc-cal/NLP-FOMC
2a8ad113a87e79f5d7beefa6cfd4653f445c92d5
[ "MIT" ]
null
null
null
RA_project/code_python/image_score_posi.py
erialc-cal/NLP-FOMC
2a8ad113a87e79f5d7beefa6cfd4653f445c92d5
[ "MIT" ]
null
null
null
RA_project/code_python/image_score_posi.py
erialc-cal/NLP-FOMC
2a8ad113a87e79f5d7beefa6cfd4653f445c92d5
[ "MIT" ]
null
null
null
import pandas as pd import datetime import matplotlib.pyplot as plt import ast from gensim.parsing.preprocessing import STOPWORDS from nltk.corpus import stopwords from collections import defaultdict from nltk.stem import WordNetLemmatizer import datetime stop_words = stopwords.words('english') lemmatizer = WordNet...
20.703252
121
0.650697
import pandas as pd import datetime import matplotlib.pyplot as plt import ast from gensim.parsing.preprocessing import STOPWORDS from nltk.corpus import stopwords from collections import defaultdict from nltk.stem import WordNetLemmatizer import datetime stop_words = stopwords.words('english') lemmatizer = WordNet...
true
true
79018e109b0d2d3d27d91efe0ab7e0e7574f3780
8,692
py
Python
docs/conf.py
SherazKhan/cortex
f0430d11cc81a64c78edda1a62513f6d739ab8e1
[ "MIT" ]
null
null
null
docs/conf.py
SherazKhan/cortex
f0430d11cc81a64c78edda1a62513f6d739ab8e1
[ "MIT" ]
null
null
null
docs/conf.py
SherazKhan/cortex
f0430d11cc81a64c78edda1a62513f6d739ab8e1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys # ...
34.768
85
0.70168
import sys # setup.py install" in the RTD Advanced Settings. import os on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if on_rtd: import inspect from sphinx import apidoc __location__ = os.path.join(os.getcwd(), os.path.dirname( inspect.getfile(inspect.currentframe()))) ...
true
true
7901910f895ef5344f1b27738ca27ce8ce0d37e9
6,947
py
Python
magenta/models/image_stylization/image_stylization_finetune.py
dubreuia/magenta
2679a1a096001808957ad99a1859181f3926cfdf
[ "Apache-2.0" ]
1
2019-11-29T15:18:32.000Z
2019-11-29T15:18:32.000Z
magenta/models/image_stylization/image_stylization_finetune.py
hdanak/magenta
acd6dedc315ea159c6f15750dd09aabdadc47515
[ "Apache-2.0" ]
null
null
null
magenta/models/image_stylization/image_stylization_finetune.py
hdanak/magenta
acd6dedc315ea159c6f15750dd09aabdadc47515
[ "Apache-2.0" ]
1
2021-09-22T18:37:38.000Z
2021-09-22T18:37:38.000Z
# Copyright 2019 The Magenta Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
41.35119
80
0.678854
from __future__ import absolute_import from __future__ import division from __future__ import print_function import ast import os from magenta.models.image_stylization import image_utils from magenta.models.image_stylization import learning from magenta.models.image_stylization import model from magent...
true
true
79019284060513350aab929d8bb76a390a968486
2,942
py
Python
hmc5883lStream/code/quick2wire/test_gpio.py
roblee357/JRone
f6c3080f260858f12da0be9f353cc9b62fd47c06
[ "MIT" ]
null
null
null
hmc5883lStream/code/quick2wire/test_gpio.py
roblee357/JRone
f6c3080f260858f12da0be9f353cc9b62fd47c06
[ "MIT" ]
null
null
null
hmc5883lStream/code/quick2wire/test_gpio.py
roblee357/JRone
f6c3080f260858f12da0be9f353cc9b62fd47c06
[ "MIT" ]
null
null
null
import os from quick2wire.gpio import pins, In, Out, PullDown, gpio_admin import pytest @pytest.mark.gpio @pytest.mark.loopback class TestGPIO: def test_pin_must_be_opened_before_use_and_is_unusable_after_being_closed(self): pin = pins.pin(0) with pytest.raises(IOError): pin....
28.563107
90
0.569001
import os from quick2wire.gpio import pins, In, Out, PullDown, gpio_admin import pytest @pytest.mark.gpio @pytest.mark.loopback class TestGPIO: def test_pin_must_be_opened_before_use_and_is_unusable_after_being_closed(self): pin = pins.pin(0) with pytest.raises(IOError): pin....
true
true
790192adbfddfd2c9c18cf72bae9e8e8538e918a
10,194
py
Python
assignment3/a3_mongo_queries_abw.py
ekselan/DS-Unit-3-Sprint-2-SQL-and-Databases
cde39e22d82362f4ebb771677ab838946c89bb52
[ "MIT" ]
null
null
null
assignment3/a3_mongo_queries_abw.py
ekselan/DS-Unit-3-Sprint-2-SQL-and-Databases
cde39e22d82362f4ebb771677ab838946c89bb52
[ "MIT" ]
null
null
null
assignment3/a3_mongo_queries_abw.py
ekselan/DS-Unit-3-Sprint-2-SQL-and-Databases
cde39e22d82362f4ebb771677ab838946c89bb52
[ "MIT" ]
null
null
null
# inclass/mongo_queries.py import pymongo import os from dotenv import load_dotenv import sqlite3 load_dotenv() DB_USER = os.getenv("MONGO_USER", default="OOPS") DB_PASSWORD = os.getenv("MONGO_PASSWORD", default="OOPS") CLUSTER_NAME = os.getenv("MONGO_CLUSTER_NAME", default="OOPS") connection_uri = f"mongodb+srv://{D...
26.685864
150
0.566314
import pymongo import os from dotenv import load_dotenv import sqlite3 load_dotenv() DB_USER = os.getenv("MONGO_USER", default="OOPS") DB_PASSWORD = os.getenv("MONGO_PASSWORD", default="OOPS") CLUSTER_NAME = os.getenv("MONGO_CLUSTER_NAME", default="OOPS") connection_uri = f"mongodb+srv://{DB_USER}:{DB_PASSWORD}@{CLU...
true
true
790193b2894b656e53418e9157030a6e99a9f686
2,909
py
Python
django/contrib/contenttypes/tests.py
jamespacileo/django
9d3f86c72f5d22113b8cb5cd006abb9297f2fd4e
[ "BSD-3-Clause" ]
2
2016-01-21T14:59:43.000Z
2017-09-21T09:50:36.000Z
django/contrib/contenttypes/tests.py
coderanger/django
4d358bd07c81badb95bf672d60fc131fe1c28789
[ "BSD-3-Clause" ]
1
2022-02-11T15:34:08.000Z
2022-02-11T15:34:08.000Z
django/contrib/contenttypes/tests.py
jamespacileo/django
9d3f86c72f5d22113b8cb5cd006abb9297f2fd4e
[ "BSD-3-Clause" ]
null
null
null
from django import db from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.contenttypes.views import shortcut from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test...
38.786667
77
0.663802
from django import db from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.contrib.contenttypes.views import shortcut from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test...
true
true
790193e67c0db381911710bf7ce3a6907825f58b
1,737
py
Python
flash_examples/object_detection.py
tszumowski/lightning-flash
d094fee4065d3d8d1337eed451041ee17fdf50aa
[ "Apache-2.0" ]
null
null
null
flash_examples/object_detection.py
tszumowski/lightning-flash
d094fee4065d3d8d1337eed451041ee17fdf50aa
[ "Apache-2.0" ]
null
null
null
flash_examples/object_detection.py
tszumowski/lightning-flash
d094fee4065d3d8d1337eed451041ee17fdf50aa
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.74
106
0.763961
import torch import flash from flash.core.data.utils import download_data from flash.image import ObjectDetectionData, ObjectDetector download_data("https://github.com/zhiqwang/yolov5-rt-stack/releases/download/v0.3.0/coco128.zip", "data/") datamodule = ObjectDetectionData.from_coco( train_folder=...
true
true
7901947e2a69429f5625edd884761977b10d5f6b
1,815
py
Python
tests/test_electricity.py
tngTUDOR/premise
f3ab48b590afaefe6ef431846561e934cac35de9
[ "BSD-3-Clause" ]
null
null
null
tests/test_electricity.py
tngTUDOR/premise
f3ab48b590afaefe6ef431846561e934cac35de9
[ "BSD-3-Clause" ]
null
null
null
tests/test_electricity.py
tngTUDOR/premise
f3ab48b590afaefe6ef431846561e934cac35de9
[ "BSD-3-Clause" ]
null
null
null
# content of test_electricity.py from premise import DATA_DIR from premise.electricity import Electricity from premise.data_collection import IAMDataCollection REGION_MAPPING_FILEPATH = (DATA_DIR / "regionmappingH12.csv") PRODUCTION_PER_TECH = (DATA_DIR / "electricity" / "electricity_production_volumes_per_tech.csv") ...
30.25
121
0.616529
from premise import DATA_DIR from premise.electricity import Electricity from premise.data_collection import IAMDataCollection REGION_MAPPING_FILEPATH = (DATA_DIR / "regionmappingH12.csv") PRODUCTION_PER_TECH = (DATA_DIR / "electricity" / "electricity_production_volumes_per_tech.csv") LOSS_PER_COUNTRY = (DATA_DIR / "...
true
true
7901954b2a84511020bb138f9a4bd5abd9e54aa6
11,497
py
Python
optuna/structs.py
VladSkripniuk/optuna
81d5b67a81ae14d606e6d6120ce50d02e90b0942
[ "MIT" ]
null
null
null
optuna/structs.py
VladSkripniuk/optuna
81d5b67a81ae14d606e6d6120ce50d02e90b0942
[ "MIT" ]
null
null
null
optuna/structs.py
VladSkripniuk/optuna
81d5b67a81ae14d606e6d6120ce50d02e90b0942
[ "MIT" ]
null
null
null
import enum import warnings from optuna import exceptions from optuna import logging from optuna import type_checking if type_checking.TYPE_CHECKING: from datetime import datetime # NOQA from typing import Any # NOQA from typing import Dict # NOQA from typing import Optional # NOQA from optun...
32.02507
99
0.604593
import enum import warnings from optuna import exceptions from optuna import logging from optuna import type_checking if type_checking.TYPE_CHECKING: from datetime import datetime from typing import Any from typing import Dict from typing import Optional from optuna.distributions import B...
true
true
79019570f0ce5422b5ebfd62f0b79654a0cff3e6
4,541
py
Python
airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
Daemonxiao/airbyte
34146564ba17423da8000e983722094f2426367e
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
Daemonxiao/airbyte
34146564ba17423da8000e983722094f2426367e
[ "MIT" ]
null
null
null
airbyte-integrations/connectors/source-tiktok-marketing/source_tiktok_marketing/spec.py
Daemonxiao/airbyte
34146564ba17423da8000e983722094f2426367e
[ "MIT" ]
null
null
null
# # Copyright (c) 2021 Airbyte, Inc., all rights reserved. # import json import re from typing import Union from jsonschema import RefResolver from pydantic import BaseModel, Field from .streams import DEFAULT_START_DATE, ReportGranularity class OauthCredSpec(BaseModel): class Config: title = "OAuth2....
36.328
126
0.68355
import json import re from typing import Union from jsonschema import RefResolver from pydantic import BaseModel, Field from .streams import DEFAULT_START_DATE, ReportGranularity class OauthCredSpec(BaseModel): class Config: title = "OAuth2.0" auth_type: str = Field(default="oauth2.0", const=T...
true
true
7901972788c7e85bdf00e42e2955aa26e1516f7f
839
py
Python
examples/Basic_Disease_Models/Example_1/generate_events.py
healthbadge/episimmer
fcb3f7df812be045e2a6d031cac42080ad850d60
[ "BSD-3-Clause" ]
16
2021-04-26T14:52:32.000Z
2022-01-22T07:13:06.000Z
examples/Basic_Disease_Models/Example_1/generate_events.py
healthbadge/episimmer
fcb3f7df812be045e2a6d031cac42080ad850d60
[ "BSD-3-Clause" ]
34
2021-05-21T12:53:24.000Z
2022-02-09T16:30:40.000Z
examples/Basic_Disease_Models/Example_1/generate_events.py
healthbadge/episimmer
fcb3f7df812be045e2a6d031cac42080ad850d60
[ "BSD-3-Clause" ]
4
2021-04-08T07:52:06.000Z
2021-05-29T05:58:15.000Z
import random import numpy as np def write_to_file(filename,no_locations,no_agents): info_dict={} #ID enumerates from 0 to n-1 header='Location Index:Agents:Time Interval' n=random.randint(10,20) f=open(filename,'w') f.write(str(n)+'\n') f.write(header+'\n') for i in range(n): line=str(random.randint(0,no...
27.064516
51
0.72944
import random import numpy as np def write_to_file(filename,no_locations,no_agents): info_dict={} header='Location Index:Agents:Time Interval' n=random.randint(10,20) f=open(filename,'w') f.write(str(n)+'\n') f.write(header+'\n') for i in range(n): line=str(random.randint(0,no_locations-1))+':' for i i...
true
true
790198c2c1cf564a270c200b70a30d603910f570
7,354
py
Python
python_modules/dagster/dagster/core/storage/event_log/polling_event_watcher.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/dagster/dagster/core/storage/event_log/polling_event_watcher.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/dagster/dagster/core/storage/event_log/polling_event_watcher.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
import threading from typing import Callable, List, MutableMapping, NamedTuple from dagster import check from dagster.core.events.log import EventLogEntry from .sql_event_log import SqlEventLogStorage POLLING_CADENCE = 0.1 # 100 ms class CallbackAfterCursor(NamedTuple): """Callback passed from Observer class ...
44.841463
104
0.68371
import threading from typing import Callable, List, MutableMapping, NamedTuple from dagster import check from dagster.core.events.log import EventLogEntry from .sql_event_log import SqlEventLogStorage POLLING_CADENCE = 0.1 class CallbackAfterCursor(NamedTuple): start_cursor: int callback: Callable[[Even...
true
true
790199eeccb4e794f0e44752ad662d398aed9d94
1,332
py
Python
djangocms_newsletter/cmsplugin_newsletter/cms_plugins.py
nephila/djangocms-newsletter
5ebd8d3e1e2c85b2791d0261a954469f2548c840
[ "BSD-3-Clause" ]
null
null
null
djangocms_newsletter/cmsplugin_newsletter/cms_plugins.py
nephila/djangocms-newsletter
5ebd8d3e1e2c85b2791d0261a954469f2548c840
[ "BSD-3-Clause" ]
null
null
null
djangocms_newsletter/cmsplugin_newsletter/cms_plugins.py
nephila/djangocms-newsletter
5ebd8d3e1e2c85b2791d0261a954469f2548c840
[ "BSD-3-Clause" ]
2
2021-03-15T13:33:53.000Z
2021-05-18T20:34:47.000Z
"""Plugins for CMS""" from django.utils.translation import ugettext_lazy as _ from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from emencia.django.newsletter.cmsplugin_newsletter import settings from emencia.django.newsletter.cmsplugin_newsletter.models import SubscriptionFormPlugin f...
34.153846
88
0.698949
from django.utils.translation import ugettext_lazy as _ from cms.plugin_base import CMSPluginBase from cms.plugin_pool import plugin_pool from emencia.django.newsletter.cmsplugin_newsletter import settings from emencia.django.newsletter.cmsplugin_newsletter.models import SubscriptionFormPlugin from emencia.django.new...
true
true
79019cd943ae685404eb86da4eca1e080ec0167d
3,361
py
Python
lab01/lab01/settings.py
car1os1/TECSUP-DAE-2021-2-B
263be9e52814ec96708650d4e417ab393075d74e
[ "MIT" ]
null
null
null
lab01/lab01/settings.py
car1os1/TECSUP-DAE-2021-2-B
263be9e52814ec96708650d4e417ab393075d74e
[ "MIT" ]
null
null
null
lab01/lab01/settings.py
car1os1/TECSUP-DAE-2021-2-B
263be9e52814ec96708650d4e417ab393075d74e
[ "MIT" ]
null
null
null
""" Django settings for lab01 project. Generated by 'django-admin startproject' using Django 3.2.6. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ fr...
26.674603
92
0.675097
from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = 'django-insecure-7-8hv&pc-$$1)7eiiy2m#m^o6cx%oqqv9@z071ec0%218iwt0!' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth',...
true
true
79019d36bbcb74e56567c705cb5879346cda1bc4
11,711
py
Python
test/test_client.py
roidnn/google-maps-services-python
ca439ee9b5aaca21ffba54134c91e991dcccb4b4
[ "Apache-2.0" ]
1
2021-09-01T16:52:26.000Z
2021-09-01T16:52:26.000Z
test/test_client.py
lamantin/google-maps-services-python
396e03ce3ffc7d1d98634c9932408272cfc20c18
[ "Apache-2.0" ]
null
null
null
test/test_client.py
lamantin/google-maps-services-python
396e03ce3ffc7d1d98634c9932408272cfc20c18
[ "Apache-2.0" ]
null
null
null
# # Copyright 2014 Google Inc. All rights reserved. # # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
38.14658
88
0.571343
import responses import time import googlemaps from googlemaps import client as _client import test as _test import requests class ClientTest(_test.TestCase): def test_no_api_key(self): with self.assertRaises(Exception): client = googlemaps.Client() client.direc...
true
true
79019d60a3b662abbc61d3a75776f4170b15dd80
1,294
py
Python
autoshort.py
lawja/AutoSHRTNR
7c9242df3b40913449a7a714fdd02abf4c608f26
[ "MIT" ]
1
2017-12-09T21:23:53.000Z
2017-12-09T21:23:53.000Z
autoshort.py
lawja/AutoSHRTNR
7c9242df3b40913449a7a714fdd02abf4c608f26
[ "MIT" ]
null
null
null
autoshort.py
lawja/AutoSHRTNR
7c9242df3b40913449a7a714fdd02abf4c608f26
[ "MIT" ]
null
null
null
import inspect import os import pyperclip import requests import time from urllib.parse import quote # a list of the request error classes request_errors = [obj for name, obj in inspect.getmembers(requests.exceptions) if inspect.isclass(obj) and issubclass(obj, Exception)] # main daemon loop while Tr...
34.972973
78
0.629057
import inspect import os import pyperclip import requests import time from urllib.parse import quote request_errors = [obj for name, obj in inspect.getmembers(requests.exceptions) if inspect.isclass(obj) and issubclass(obj, Exception)] while True: clipboard = pyperclip.paste() try: ...
true
true
79019e6692b7080cea95100ec92b84990cdcb1bc
761
py
Python
setup.py
adalekin/ngenix-test
8d0b001e614cc6d18002ccd224cb8c3568128774
[ "MIT" ]
null
null
null
setup.py
adalekin/ngenix-test
8d0b001e614cc6d18002ccd224cb8c3568128774
[ "MIT" ]
null
null
null
setup.py
adalekin/ngenix-test
8d0b001e614cc6d18002ccd224cb8c3568128774
[ "MIT" ]
null
null
null
import versioneer commands = versioneer.get_cmdclass().copy() try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages setup( name='ngenix-test', version=versioneer.get_version(), packages=find_packages(), url='https://git...
26.241379
53
0.65703
import versioneer commands = versioneer.get_cmdclass().copy() try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages setup( name='ngenix-test', version=versioneer.get_version(), packages=find_packages(), url='https://git...
true
true
79019ffe232bf2e663c2267cee507d701388e4be
8,841
py
Python
wandb/fastai/__init__.py
MPGek/client
541d760c5cb8776b1ad5fcf1362d7382811cbc61
[ "Apache-2.0" ]
1
2020-08-20T14:02:47.000Z
2020-08-20T14:02:47.000Z
wandb/fastai/__init__.py
MPGek/client
541d760c5cb8776b1ad5fcf1362d7382811cbc61
[ "Apache-2.0" ]
null
null
null
wandb/fastai/__init__.py
MPGek/client
541d760c5cb8776b1ad5fcf1362d7382811cbc61
[ "Apache-2.0" ]
null
null
null
''' This module hooks fast.ai Learners to Weights & Biases through a callback. Requested logged data can be configured through the callback constructor. Examples: WandbCallback can be used when initializing the Learner:: ``` from wandb.fastai import WandbCallback [...] learn = Learner(...
37.944206
120
0.575274
import wandb import fastai from fastai.callbacks import TrackerCallback from pathlib import Path import random try: import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt except: print('Warning: matplotlib required if logging sample image predictions') class WandbCallback(TrackerCal...
true
true
7901a00a8ef641d86ee6c4066844159e728c9071
1,193
py
Python
app/controllers/auth/register.py
TheSynt4x/flask-blog
11176c15e390f5652ad286b5395f5a27af1c9989
[ "MIT" ]
null
null
null
app/controllers/auth/register.py
TheSynt4x/flask-blog
11176c15e390f5652ad286b5395f5a27af1c9989
[ "MIT" ]
null
null
null
app/controllers/auth/register.py
TheSynt4x/flask-blog
11176c15e390f5652ad286b5395f5a27af1c9989
[ "MIT" ]
null
null
null
from flask import render_template, flash, redirect, url_for, request from flask.views import MethodView from app.middleware import auth from app.models.user import User from app.validators.register_form import RegisterForm from app.services import avatar_service class RegisterController(MethodView): @auth.optional...
25.934783
74
0.709975
from flask import render_template, flash, redirect, url_for, request from flask.views import MethodView from app.middleware import auth from app.models.user import User from app.validators.register_form import RegisterForm from app.services import avatar_service class RegisterController(MethodView): @auth.optional...
true
true
7901a0eb62057284280314ec3af6eb03662f1df9
1,602
py
Python
hue/hue_api.py
BenDoan/playground
2d9dea78eccb22c7118414b163fb434c52eec078
[ "MIT" ]
1
2015-05-24T08:36:04.000Z
2015-05-24T08:36:04.000Z
hue/hue_api.py
BenDoan/playground
2d9dea78eccb22c7118414b163fb434c52eec078
[ "MIT" ]
9
2021-02-08T20:47:00.000Z
2022-02-18T03:22:11.000Z
hue/hue_api.py
BenDoan/playground
2d9dea78eccb22c7118414b163fb434c52eec078
[ "MIT" ]
null
null
null
import json import requests HUE_NUPNP_URL = "https://www.meethue.com/api/nupnp" class APIException(Exception): pass class HueAPI(object): def __init__(self, username): self.username = username self.ip = self.discover_hub_ip() @property def base_url(self): return "http://{}...
23.910448
74
0.576779
import json import requests HUE_NUPNP_URL = "https://www.meethue.com/api/nupnp" class APIException(Exception): pass class HueAPI(object): def __init__(self, username): self.username = username self.ip = self.discover_hub_ip() @property def base_url(self): return "http://{}...
true
true
7901a103c51919e85415fd5af4bf3af003105056
1,330
py
Python
fastapi_example/util/auth_util.py
pkyosx/fastapi-example
234b2da6b3d60989f9e75483671bc0c2710592bd
[ "MIT" ]
null
null
null
fastapi_example/util/auth_util.py
pkyosx/fastapi-example
234b2da6b3d60989f9e75483671bc0c2710592bd
[ "MIT" ]
null
null
null
fastapi_example/util/auth_util.py
pkyosx/fastapi-example
234b2da6b3d60989f9e75483671bc0c2710592bd
[ "MIT" ]
null
null
null
import time from dataclasses import dataclass import jwt from util.enum_util import EnumBase class Role(EnumBase): USER = "USER" ADMIN = "ADMIN" class Perm(EnumBase): NONE = "NONE" READ_MSG = "READ_MSG" WRITE_MSG = "WRITE_MSG" @dataclass class Identity: user: str role: Role.to_enum()...
23.333333
78
0.605263
import time from dataclasses import dataclass import jwt from util.enum_util import EnumBase class Role(EnumBase): USER = "USER" ADMIN = "ADMIN" class Perm(EnumBase): NONE = "NONE" READ_MSG = "READ_MSG" WRITE_MSG = "WRITE_MSG" @dataclass class Identity: user: str role: Role.to_enum()...
true
true
7901a15e89880b5c6796a693c8ee4e1f1b87d075
42,243
py
Python
devito/passes/clusters/aliases.py
garg-aayush/devito
b1e8fffdee7d6b556ff19a372d69ed1aebee675a
[ "MIT" ]
1
2021-05-31T04:56:33.000Z
2021-05-31T04:56:33.000Z
devito/passes/clusters/aliases.py
garg-aayush/devito
b1e8fffdee7d6b556ff19a372d69ed1aebee675a
[ "MIT" ]
null
null
null
devito/passes/clusters/aliases.py
garg-aayush/devito
b1e8fffdee7d6b556ff19a372d69ed1aebee675a
[ "MIT" ]
null
null
null
from collections import OrderedDict, defaultdict, namedtuple from functools import partial from itertools import groupby from cached_property import cached_property import numpy as np from devito.ir import (SEQUENTIAL, PARALLEL, PARALLEL_IF_PVT, ROUNDABLE, DataSpace, Forward, IterationInstance,...
35.173189
90
0.581848
from collections import OrderedDict, defaultdict, namedtuple from functools import partial from itertools import groupby from cached_property import cached_property import numpy as np from devito.ir import (SEQUENTIAL, PARALLEL, PARALLEL_IF_PVT, ROUNDABLE, DataSpace, Forward, IterationInstance,...
true
true
7901a174287c6ae84ab3d0881bd2c6713655d9cf
1,879
py
Python
tests/incident/test_get.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/incident/test_get.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
tests/incident/test_get.py
asyncee/pycamunda
f4834d224ff99fcf80874efeaedf68a8a2efa926
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest.mock import pytest import pycamunda.incident from tests.mock import raise_requests_exception_mock, not_ok_response_mock def test_get_params(engine_url): get_incident = pycamunda.incident.Get(url=engine_url, id_='anId') assert get_incident.url == engine_url + '/incid...
34.796296
83
0.77009
import unittest.mock import pytest import pycamunda.incident from tests.mock import raise_requests_exception_mock, not_ok_response_mock def test_get_params(engine_url): get_incident = pycamunda.incident.Get(url=engine_url, id_='anId') assert get_incident.url == engine_url + '/incident/anId' assert ge...
true
true
7901a26f2959e2b1afa84e883181b3ce059e4fa4
25,608
py
Python
lib/googlecloudsdk/api_lib/compute/containers_utils.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/api_lib/compute/containers_utils.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/googlecloudsdk/api_lib/compute/containers_utils.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2016 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
34.512129
117
0.694275
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import itertools import re import enum from googlecloudsdk.api_lib.compute import exceptions from googlecloudsdk.api_lib.compute import metadata_utils from googlecloudsdk.api_lib.compute.operat...
true
true
7901a3e8f02d8f8d5c8f255e43848232d4a5ec4e
41
py
Python
tcodtest.py
Rosuav/libtcodpy
7d76cac7cd3e6930f09558c6735ef44859ebb4e3
[ "Unlicense" ]
3
2018-03-14T23:48:00.000Z
2019-02-15T17:50:21.000Z
tcodtest.py
Rosuav/libtcodpy
7d76cac7cd3e6930f09558c6735ef44859ebb4e3
[ "Unlicense" ]
null
null
null
tcodtest.py
Rosuav/libtcodpy
7d76cac7cd3e6930f09558c6735ef44859ebb4e3
[ "Unlicense" ]
null
null
null
import libtcodpy libtcodpy.say_hello()
8.2
21
0.804878
import libtcodpy libtcodpy.say_hello()
true
true
7901a405bba454615704364a1d7b2850bd853fea
151
py
Python
suggestions/urls.py
MindMantraSIH/paathshaala
28fcee05f49e7b5dec734d6b9c46a5630e687c5d
[ "MIT" ]
null
null
null
suggestions/urls.py
MindMantraSIH/paathshaala
28fcee05f49e7b5dec734d6b9c46a5630e687c5d
[ "MIT" ]
null
null
null
suggestions/urls.py
MindMantraSIH/paathshaala
28fcee05f49e7b5dec734d6b9c46a5630e687c5d
[ "MIT" ]
null
null
null
from django.urls import path from . import views from django.urls import path, include urlpatterns = [ path('',views.savedata,name="savedata"), ]
18.875
44
0.728477
from django.urls import path from . import views from django.urls import path, include urlpatterns = [ path('',views.savedata,name="savedata"), ]
true
true
7901a54bf20b6019a3838d28b9a1ebd9102164c7
196
py
Python
CodeChef/problems/PROBCAT/main.py
object-oriented-human/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
1
2022-02-21T15:43:01.000Z
2022-02-21T15:43:01.000Z
CodeChef/problems/PROBCAT/main.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
CodeChef/problems/PROBCAT/main.py
foooop/competitive
9e761020e887d8980a39a64eeaeaa39af0ecd777
[ "MIT" ]
null
null
null
tc = int(input()) while tc: tc -= 1 x = int(input()) if 1 <= x and x < 100: print("Easy") elif 100 <= x and x < 200: print("Medium") else: print("Hard")
19.6
30
0.44898
tc = int(input()) while tc: tc -= 1 x = int(input()) if 1 <= x and x < 100: print("Easy") elif 100 <= x and x < 200: print("Medium") else: print("Hard")
true
true
7901a5c2e696a85bd807869a99aea8105a03f612
30,278
py
Python
experiment code/GPU Experiments Code/task_submit_save.py
qore-dl/qore-dl-code
dc60df8fd072df5c641005992630f43892b7f78e
[ "Apache-2.0" ]
null
null
null
experiment code/GPU Experiments Code/task_submit_save.py
qore-dl/qore-dl-code
dc60df8fd072df5c641005992630f43892b7f78e
[ "Apache-2.0" ]
null
null
null
experiment code/GPU Experiments Code/task_submit_save.py
qore-dl/qore-dl-code
dc60df8fd072df5c641005992630f43892b7f78e
[ "Apache-2.0" ]
null
null
null
#https://blog.csdn.net/orangefly0214/article/details/81387077 import MultiTemplate from MultiTemplate import TaskTemplate # https://blog.csdn.net/u013812710/article/details/72886491 # https://blog.csdn.net/ismr_m/article/details/53100896 #https://blog.csdn.net/bcfdsagbfcisbg/article/details/78134172 import kubernetes i...
46.155488
219
0.594986
import MultiTemplate from MultiTemplate import TaskTemplate import kubernetes import os import influxdb import time import yaml def check_path(name): train_dir = os.path.join('/tfdata/k8snfs/', name) print(train_dir) if not os.path.exists(train_dir): os.makedirs(train_dir) return train_dir ...
true
true
7901a7ae2350f0fe3414e33aee4cd0df685ec183
15,431
py
Python
python/mxnet/gluon/nn/basic_layers.py
IIMarch/mxnet
64c35f2d41f5bad3f9cbf4d4fda9cf3bf3dadb4b
[ "Apache-2.0" ]
null
null
null
python/mxnet/gluon/nn/basic_layers.py
IIMarch/mxnet
64c35f2d41f5bad3f9cbf4d4fda9cf3bf3dadb4b
[ "Apache-2.0" ]
null
null
null
python/mxnet/gluon/nn/basic_layers.py
IIMarch/mxnet
64c35f2d41f5bad3f9cbf4d4fda9cf3bf3dadb4b
[ "Apache-2.0" ]
1
2018-11-30T21:34:24.000Z
2018-11-30T21:34:24.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 u...
35.637413
97
0.580325
from ..block import Block, HybridBlock from ..utils import _indent class Sequential(Block): def __init__(self, prefix=None, params=None): super(Sequential, self).__init__(prefix=prefix, params=params) def add(self, block): self.register_child(block) def forward(self, ...
true
true
7901a80de89eb080152807d040a6b0cd565910ee
3,346
py
Python
Clases/Palabras.py
JorgeSchelotto/TrabajoFinalSeminarioPython
aae8cc914ff55cc09b7538722f27e1ec22954e57
[ "MIT" ]
null
null
null
Clases/Palabras.py
JorgeSchelotto/TrabajoFinalSeminarioPython
aae8cc914ff55cc09b7538722f27e1ec22954e57
[ "MIT" ]
null
null
null
Clases/Palabras.py
JorgeSchelotto/TrabajoFinalSeminarioPython
aae8cc914ff55cc09b7538722f27e1ec22954e57
[ "MIT" ]
null
null
null
__author__ = 'Burgos, Agustin - Schelotto, Jorge' # -*- coding: utf-8 -*- # Copyright 2018 autors: Burgos Agustin, Schelotto Jorge # # 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 res...
35.978495
128
0.633293
__author__ = 'Burgos, Agustin - Schelotto, Jorge' import pygame class Palabras(pygame.sprite.Sprite): def __init__(self, ruta, nombre, x, y): super().__init__() self.__palabra = nombre self.__click = False self.image = pygame.image.load(ruta).convert_alpha() ...
true
true
7901a83dc9858dc4b704285fb8cf552df259a434
7,107
py
Python
examples/pytorch/ogb/line/reading_data.py
harshgrovr/Graphs_Thesis
9ffd0d23c8f8b4bd53db9fd5b9bf5776666814e0
[ "Apache-2.0" ]
2
2020-08-05T07:21:51.000Z
2021-02-20T10:22:23.000Z
examples/pytorch/ogb/line/reading_data.py
xyanAI/dgl
36daf66f6216bad4d30651311bcb87aa45dd33d5
[ "Apache-2.0" ]
1
2019-02-06T02:02:41.000Z
2019-02-06T20:22:32.000Z
examples/pytorch/ogb/line/reading_data.py
xyanAI/dgl
36daf66f6216bad4d30651311bcb87aa45dd33d5
[ "Apache-2.0" ]
3
2019-03-04T12:46:05.000Z
2019-08-14T18:53:19.000Z
import os import numpy as np import scipy.sparse as sp import pickle import torch from torch.utils.data import DataLoader from dgl.data.utils import download, _get_dgl_url, get_download_dir, extract_archive import random import time import dgl def ReadTxtNet(file_path="", undirected=True): """ Read the txt network...
33.523585
113
0.555649
import os import numpy as np import scipy.sparse as sp import pickle import torch from torch.utils.data import DataLoader from dgl.data.utils import download, _get_dgl_url, get_download_dir, extract_archive import random import time import dgl def ReadTxtNet(file_path="", undirected=True): if file_path == 'youtube...
true
true
7901a89ee3d3c11e49347b9e169696120963f78e
1,884
py
Python
meraki/api/mg_dhcp_settings.py
NoFliesOnYou/dashboard-api-python
3185d0e8a9a38eba9127ac640dcbb02444e7adf2
[ "MIT" ]
null
null
null
meraki/api/mg_dhcp_settings.py
NoFliesOnYou/dashboard-api-python
3185d0e8a9a38eba9127ac640dcbb02444e7adf2
[ "MIT" ]
3
2020-11-08T08:50:59.000Z
2021-12-13T20:47:15.000Z
flask/meraki/api/mg_dhcp_settings.py
cyberdevnet/mer-hacker
a7dddd03c5b02a2f8c84d711b69868d2b94f1f99
[ "MIT" ]
null
null
null
class MGDHCPSettings(object): def __init__(self, session): super(MGDHCPSettings, self).__init__() self._session = session def getNetworkCellularGatewaySettingsDhcp(self, networkId: str): """ **List common DHCP settings of MGs** https://developer.cisco.com/meraki/api/...
40.956522
166
0.636943
class MGDHCPSettings(object): def __init__(self, session): super(MGDHCPSettings, self).__init__() self._session = session def getNetworkCellularGatewaySettingsDhcp(self, networkId: str): metadata = { 'tags': ['MG DHCP settings'], 'operation': 'getNetworkCell...
true
true
7901a98d4fe4226ee2b868d6b15ef9b15f874051
8,738
py
Python
sdk/graphrbac/azure-graphrbac/azure/graphrbac/models/application_update_parameters.py
16pierre/azure-sdk-for-python
1505d348c6660c1d5a39630522a059a2e3e38839
[ "MIT" ]
null
null
null
sdk/graphrbac/azure-graphrbac/azure/graphrbac/models/application_update_parameters.py
16pierre/azure-sdk-for-python
1505d348c6660c1d5a39630522a059a2e3e38839
[ "MIT" ]
null
null
null
sdk/graphrbac/azure-graphrbac/azure/graphrbac/models/application_update_parameters.py
16pierre/azure-sdk-for-python
1505d348c6660c1d5a39630522a059a2e3e38839
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
55.656051
114
0.707027
from .application_base import ApplicationBase class ApplicationUpdateParameters(ApplicationBase): _attribute_map = { 'allow_guests_sign_in': {'key': 'allowGuestsSignIn', 'type': 'bool'}, 'allow_passthrough_users': {'key': 'allowPassthroughUsers', 'type': 'bool'}, 'app_logo_url'...
true
true
7901aaade44c85abaf27653db1e6058e1609af80
7,148
py
Python
venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/scaleway_ip.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/scaleway_ip.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/community/general/plugins/modules/scaleway_ip.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Scaleway IP management module # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: scaleway_ip short_descriptio...
27.178707
131
0.615837
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = ''' --- module: scaleway_ip short_description: Scaleway IP management module author: Remy Leone (@remyleone) description: - This module manages IP on Scaleway account U(https://developer.scaleway.com...
true
true
7901aca03203d142adecf88e42823f69d90c6575
52,847
py
Python
egs/wsj/s5/steps/cleanup/internal/segment_ctm_edits.py
HunterJiang/kaldi
3fe38c82fa0936f7a4ea3347a54e9e00fb2471a8
[ "Apache-2.0" ]
319
2016-10-24T23:08:04.000Z
2022-03-08T02:36:51.000Z
egs/wsj/s5/steps/cleanup/internal/segment_ctm_edits.py
zwcih/kaldi-ctc
2c47b99f5efba22cb3989eed1a7757bf5d9927ce
[ "Apache-2.0" ]
18
2017-01-12T12:08:07.000Z
2020-06-18T07:37:20.000Z
egs/wsj/s5/steps/cleanup/internal/segment_ctm_edits.py
zwcih/kaldi-ctc
2c47b99f5efba22cb3989eed1a7757bf5d9927ce
[ "Apache-2.0" ]
87
2016-10-25T04:39:48.000Z
2021-12-24T07:47:31.000Z
#!/usr/bin/env python # Copyright 2016 Vimal Manohar # 2016 Johns Hopkins University (author: Daniel Povey) # Apache 2.0 from __future__ import print_function import sys, operator, argparse, os from collections import defaultdict # This script reads 'ctm-edits' file format that is produced by get_ctm_e...
51.010618
125
0.641058
from __future__ import print_function import sys, operator, argparse, os from collections import defaultdict parser = argparse.ArgumentParser( description = "This program produces segmentation and text information " "based on reading ctm-edits input format which is produced by " "steps/cleanu...
true
true
7901acf7eec972aa6135b6cc59d029e7919989aa
12,518
py
Python
train_semisup.py
danielvarga/vat_tf
0b40b256922b7996558504a5d2c3556b5f9fff15
[ "MIT" ]
null
null
null
train_semisup.py
danielvarga/vat_tf
0b40b256922b7996558504a5d2c3556b5f9fff15
[ "MIT" ]
null
null
null
train_semisup.py
danielvarga/vat_tf
0b40b256922b7996558504a5d2c3556b5f9fff15
[ "MIT" ]
null
null
null
import time import numpy as np import tensorflow as tf import layers as L import vat FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('device', '/gpu:0', "device") tf.app.flags.DEFINE_string('dataset', 'cifar10', "{cifar10, svhn}") tf.app.flags.DEFINE_string('log_dir', "", "log_dir") tf.app.flags.DEFINE_inte...
47.778626
132
0.582202
import time import numpy as np import tensorflow as tf import layers as L import vat FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('device', '/gpu:0', "device") tf.app.flags.DEFINE_string('dataset', 'cifar10', "{cifar10, svhn}") tf.app.flags.DEFINE_string('log_dir', "", "log_dir") tf.app.flags.DEFINE_inte...
true
true
7901adc9c188a39b0cf7d9c63de2e761bf3b34c6
503
py
Python
ongabot/handler/helpcommand.py
walkerjens/telegram.ongabot
3c4edd8ba9815c087ed18b07f3f4bc9c90701d60
[ "MIT" ]
null
null
null
ongabot/handler/helpcommand.py
walkerjens/telegram.ongabot
3c4edd8ba9815c087ed18b07f3f4bc9c90701d60
[ "MIT" ]
null
null
null
ongabot/handler/helpcommand.py
walkerjens/telegram.ongabot
3c4edd8ba9815c087ed18b07f3f4bc9c90701d60
[ "MIT" ]
null
null
null
"""This module contains the HelpCommandHandler class.""" from telegram import Update from telegram.ext import CommandHandler, CallbackContext import utils.helper as helper class HelpCommandHandler(CommandHandler): """Handler for /help command""" def __init__(self): CommandHandler.__init__(self, "hel...
27.944444
59
0.747515
from telegram import Update from telegram.ext import CommandHandler, CallbackContext import utils.helper as helper class HelpCommandHandler(CommandHandler): def __init__(self): CommandHandler.__init__(self, "help", callback) def callback(update: Update, _: CallbackContext): update.message.reply_te...
true
true
7901adeebc4eddb9811775a1dd8834093c7ac65d
2,057
py
Python
examples/pylab_examples/mri_with_eeg.py
yuvallanger/matplotlib
e0020d318a9a9685594c6bff4631f74599321459
[ "MIT", "BSD-3-Clause" ]
8
2017-04-11T08:55:30.000Z
2022-03-25T04:31:26.000Z
examples/pylab_examples/mri_with_eeg.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
null
null
null
examples/pylab_examples/mri_with_eeg.py
epgauss/matplotlib
c9898ea9a30c67c579ab27cd61b68e2abae0fb0e
[ "MIT", "BSD-3-Clause" ]
14
2015-10-05T04:15:46.000Z
2020-06-11T18:06:02.000Z
#!/usr/bin/env python """ This now uses the imshow command instead of pcolor which *is much faster* """ from __future__ import division, print_function import numpy as np from matplotlib.pyplot import * from matplotlib.collections import LineCollection import matplotlib.cbook as cbook # I use if 1 to break up the di...
26.037975
71
0.618376
from __future__ import division, print_function import numpy as np from matplotlib.pyplot import * from matplotlib.collections import LineCollection import matplotlib.cbook as cbook if 1: dfile = cbook.get_sample_data('s1045.ima.gz') im = np.fromstring(dfile.read(), np.uint16).astype(float) im...
true
true
7901b00068d35d764431ee575b195d337b0598bd
840
py
Python
pyNastran/gui/matplotlib_backend.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
293
2015-03-22T20:22:01.000Z
2022-03-14T20:28:24.000Z
pyNastran/gui/matplotlib_backend.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
512
2015-03-14T18:39:27.000Z
2022-03-31T16:15:43.000Z
pyNastran/gui/matplotlib_backend.py
ACea15/pyNastran
5ffc37d784b52c882ea207f832bceb6b5eb0e6d4
[ "BSD-3-Clause" ]
136
2015-03-19T03:26:06.000Z
2022-03-25T22:14:54.000Z
""" Selects a matplotlib backend so you can run without a GUI/tkinter. Supports: - PyQt5 - PySide2 - WX - Tkinter """ from pyNastran.gui import IS_DEV if IS_DEV: # there is no interactive backend when testing on TravisCI matplotlib_backend = 'Agg' else: # fails if using the terminal and PyQt/PySide & ...
28.965517
77
0.642857
from pyNastran.gui import IS_DEV if IS_DEV: matplotlib_backend = 'Agg' else: try: from pyNastran.gui.qt_version import qt_int matplotlib_backend = 'Qt%iAgg' % qt_int except ImportError: try: # default matplotlib backend import ...
true
true
7901b022a8a252e56a5eb0648b1a4bcfdfff373f
110
py
Python
ocra/download.py
mzntaka0/ocra
037afc508ac319efbcec99a72b9b3793cecf3fc9
[ "Apache-2.0" ]
4
2018-12-27T01:43:51.000Z
2019-08-15T03:01:15.000Z
audy/mix/speaker.py
mzntaka0/audy
e347aac79ceb783df23a51e842672aaa7b1f7514
[ "Apache-2.0" ]
1
2019-09-09T08:46:18.000Z
2019-09-09T08:46:18.000Z
audy/mix/speaker.py
mzntaka0/audy
e347aac79ceb783df23a51e842672aaa7b1f7514
[ "Apache-2.0" ]
1
2019-11-08T13:48:51.000Z
2019-11-08T13:48:51.000Z
# -*- coding: utf-8 -*- """ """ import argparse import os import sys if __name__ == '__main__': pass
7.857143
26
0.572727
import argparse import os import sys if __name__ == '__main__': pass
true
true
7901b0441f6d52e9d452fb15661e518e8db12f07
2,615
py
Python
brainrender_gui/widgets/add_regions.py
brainglobe/bg-brainrender-gui
4048f789fbdc1a5d4c5c652a4f37222446c8aa2f
[ "BSD-3-Clause" ]
7
2020-07-09T10:27:38.000Z
2020-10-13T13:16:20.000Z
brainrender_gui/widgets/add_regions.py
brainglobe/bg-brainrender-gui
4048f789fbdc1a5d4c5c652a4f37222446c8aa2f
[ "BSD-3-Clause" ]
12
2020-07-31T15:03:49.000Z
2020-12-11T08:00:20.000Z
brainrender_gui/widgets/add_regions.py
brainglobe/bg-brainrender-gui
4048f789fbdc1a5d4c5c652a4f37222446c8aa2f
[ "BSD-3-Clause" ]
null
null
null
from qtpy.QtWidgets import QDialog, QLineEdit, QPushButton, QLabel, QVBoxLayout from brainrender_gui.style import style, update_css class AddRegionsWindow(QDialog): left = 250 top = 250 width = 400 height = 300 label_msg = ( "Write the acronyms of brainregions " + "you wish to ad...
27.526316
79
0.602677
from qtpy.QtWidgets import QDialog, QLineEdit, QPushButton, QLabel, QVBoxLayout from brainrender_gui.style import style, update_css class AddRegionsWindow(QDialog): left = 250 top = 250 width = 400 height = 300 label_msg = ( "Write the acronyms of brainregions " + "you wish to ad...
true
true
7901b06d39b2aefc93c03f56e1b5273f667d41c6
1,652
py
Python
federation/protocols/activitypub/signing.py
weex/federation
01357aacb04b076442ce5f803a0fc65df5a74d09
[ "BSD-3-Clause" ]
93
2016-11-26T10:52:13.000Z
2022-01-15T20:07:35.000Z
federation/protocols/activitypub/signing.py
weex/federation
01357aacb04b076442ce5f803a0fc65df5a74d09
[ "BSD-3-Clause" ]
75
2016-10-18T10:15:44.000Z
2019-10-05T22:16:32.000Z
federation/protocols/activitypub/signing.py
weex/federation
01357aacb04b076442ce5f803a0fc65df5a74d09
[ "BSD-3-Clause" ]
9
2017-04-08T08:03:45.000Z
2021-09-13T22:00:48.000Z
""" Thank you Funkwhale for inspiration on the HTTP signatures parts <3 https://funkwhale.audio/ """ import datetime import logging from typing import Union import pytz from Crypto.PublicKey.RSA import RsaKey from requests_http_signature import HTTPSignatureHeaderAuth from federation.types import RequestType from fe...
31.769231
97
0.734867
import datetime import logging from typing import Union import pytz from Crypto.PublicKey.RSA import RsaKey from requests_http_signature import HTTPSignatureHeaderAuth from federation.types import RequestType from federation.utils.network import parse_http_date from federation.utils.text import encode_if_text logger...
true
true
7901b4a1191898ebebf5d5a2dddf1341b901ae6e
4,005
py
Python
dhis2_core/src/dhis2/code_list/svcm.py
dhis2/dhis2-python-cli
d5ec976a5c04e6897756e3be14924ec74a4456fd
[ "BSD-3-Clause" ]
7
2020-10-15T08:54:50.000Z
2021-12-19T14:37:49.000Z
dhis2_core/src/dhis2/code_list/svcm.py
dhis2/dhis2-python-cli
d5ec976a5c04e6897756e3be14924ec74a4456fd
[ "BSD-3-Clause" ]
3
2016-08-12T14:11:14.000Z
2021-03-08T17:06:29.000Z
dhis2_core/src/dhis2/code_list/svcm.py
dhis2/dhis2-python-cli
d5ec976a5c04e6897756e3be14924ec74a4456fd
[ "BSD-3-Clause" ]
4
2016-02-10T23:03:08.000Z
2020-12-28T13:18:49.000Z
import json import logging import sys from typing import Any, Callable, Dict, List from dhis2.core.http import BaseHttpRequest from dhis2.core.inventory import HostResolved, Inventory, resolve_one from fhir.resources.bundle import Bundle from .models.svcm import CodeList, SVCMConfig from .svcm_resources import build_...
28.204225
114
0.615481
import json import logging import sys from typing import Any, Callable, Dict, List from dhis2.core.http import BaseHttpRequest from dhis2.core.inventory import HostResolved, Inventory, resolve_one from fhir.resources.bundle import Bundle from .models.svcm import CodeList, SVCMConfig from .svcm_resources import build_...
true
true
7901b729a1fcda59aaac394589b9db9c6d3c000a
93
py
Python
src/UOJ_1933 - (3425561) Accepted.py
miguelarauj1o/UOJ
eb195754829c42c3dcf1a68616e63da1386cb5a9
[ "MIT" ]
80
2015-01-07T01:18:40.000Z
2021-05-04T15:23:18.000Z
src/UOJ_1933 - (3425561) Accepted.py
miguelarauj1o/OJ
eb195754829c42c3dcf1a68616e63da1386cb5a9
[ "MIT" ]
1
2019-01-07T01:13:32.000Z
2019-01-07T01:13:32.000Z
src/UOJ_1933 - (3425561) Accepted.py
miguelarauj1o/OJ
eb195754829c42c3dcf1a68616e63da1386cb5a9
[ "MIT" ]
28
2015-03-05T11:53:23.000Z
2020-07-05T15:50:42.000Z
a, b = raw_input().split() a = int(a) b = int(b) if b > a: print(b) else: print(a)1
11.625
27
0.505376
a, b = raw_input().split() a = int(a) b = int(b) if b > a: print(b) else: print(a)1
false
true
7901b7d9d3e6f43d5bf1e3baba09c66f4e443df2
1,943
py
Python
Twitter_scraping/graph_builder.py
TristanThomson/Year-3-Final-Project
07a588ff3312040c6ff41fd170c1909357991c66
[ "OML" ]
2
2020-01-01T16:04:04.000Z
2020-01-27T13:14:22.000Z
Twitter_scraping/graph_builder.py
TristanThomson/Year-3-Final-Project
07a588ff3312040c6ff41fd170c1909357991c66
[ "OML" ]
null
null
null
Twitter_scraping/graph_builder.py
TristanThomson/Year-3-Final-Project
07a588ff3312040c6ff41fd170c1909357991c66
[ "OML" ]
null
null
null
import os import networkx as nx import pandas as pd from pathlib import Path from Twitter_scraping.scraper_helper import RandomPicker G = nx.DiGraph() # initialises empty NetworkX graph min_list = RandomPicker().min_df["Twitter"].dropna() # Pandas series from the "Twitter" col of the SYI dataset mep_list = RandomPic...
41.340426
124
0.58106
import os import networkx as nx import pandas as pd from pathlib import Path from Twitter_scraping.scraper_helper import RandomPicker G = nx.DiGraph() min_list = RandomPicker().min_df["Twitter"].dropna() mep_list = RandomPicker().all_df["Twitter"].dropna() rootdir = os.getcwd() def check_minorities(): for ...
true
true
7901b7f2fa29741d72328bdbdbf92fc4d5c5f847
12,675
py
Python
mmdet/models/backbones/res2net.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
12,377
2017-12-04T02:46:57.000Z
2022-03-31T16:48:31.000Z
mmdet/models/backbones/res2net.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
1,851
2017-12-05T05:41:23.000Z
2022-03-30T13:06:22.000Z
mmdet/models/backbones/res2net.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
4,198
2017-12-05T02:57:19.000Z
2022-03-30T10:29:37.000Z
import math import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.utils import get_root_log...
36.008523
79
0.527732
import math import torch import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (build_conv_layer, build_norm_layer, constant_init, kaiming_init) from mmcv.runner import load_checkpoint from torch.nn.modules.batchnorm import _BatchNorm from mmdet.utils import get_root_log...
true
true
7901b864d323897254d20ffd6ca52e6cb5e50268
27,129
py
Python
legal-api/tests/unit/services/test_authorization.py
leksmall/lear
cc7d75be830d12bfcc33b89bb2c4f34795bcd518
[ "Apache-2.0" ]
null
null
null
legal-api/tests/unit/services/test_authorization.py
leksmall/lear
cc7d75be830d12bfcc33b89bb2c4f34795bcd518
[ "Apache-2.0" ]
null
null
null
legal-api/tests/unit/services/test_authorization.py
leksmall/lear
cc7d75be830d12bfcc33b89bb2c4f34795bcd518
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # 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 agr...
48.531306
135
0.635925
from http import HTTPStatus import pytest from flask import jsonify from legal_api.models.business import Business from legal_api.services.authz import BASIC_USER, COLIN_SVC_ROLE, STAFF_ROLE, authorized, get_allowed, is_allowed from tests import integration_authorization, not_github_ci from .utils impo...
true
true
7901b8fe19a02fe5084433c0ffdfd6efc080c6c9
3,118
py
Python
nilearn/plotting/__init__.py
OliverWarrington/nilearn
d42d3b10eb543619ed4189f05b74ef2e75a92068
[ "BSD-2-Clause" ]
827
2015-01-30T23:11:42.000Z
2022-03-29T21:21:05.000Z
nilearn/plotting/__init__.py
OliverWarrington/nilearn
d42d3b10eb543619ed4189f05b74ef2e75a92068
[ "BSD-2-Clause" ]
2,845
2015-01-04T22:14:41.000Z
2022-03-31T20:28:09.000Z
nilearn/plotting/__init__.py
OliverWarrington/nilearn
d42d3b10eb543619ed4189f05b74ef2e75a92068
[ "BSD-2-Clause" ]
484
2015-02-03T10:58:19.000Z
2022-03-29T21:57:16.000Z
""" Plotting code for nilearn """ # Original Authors: Chris Filo Gorgolewski, Gael Varoquaux import os import sys import importlib ############################################################################### # Make sure that we don't get DISPLAY problems when running without X on # unices def _set_mpl_backend(): ...
42.712329
79
0.645927
import os import sys import importlib
true
true
7901ba540a18823e6758a809e3c64cd14f3b70b8
662
py
Python
crawler_news/items.py
SecondDim/crawler-base
21ba30a3f6a62f2eaee336331abeca04d2a4ed24
[ "MIT" ]
11
2019-12-21T14:57:17.000Z
2021-07-15T17:32:10.000Z
crawler_news/items.py
SecondDim/crawler-base
21ba30a3f6a62f2eaee336331abeca04d2a4ed24
[ "MIT" ]
6
2020-01-24T13:26:01.000Z
2022-02-01T23:05:28.000Z
crawler_news/items.py
SecondDim/crawler-base
21ba30a3f6a62f2eaee336331abeca04d2a4ed24
[ "MIT" ]
3
2020-02-28T06:07:20.000Z
2021-01-07T09:58:47.000Z
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://docs.scrapy.org/en/latest/topics/items.html import scrapy class CrawlerNewsItem(scrapy.Item): url = scrapy.Field() # str article_from = scrapy.Field() # str article_type = scrapy.Field() # str ...
27.583333
53
0.651057
import scrapy class CrawlerNewsItem(scrapy.Item): url = scrapy.Field() article_from = scrapy.Field() article_type = scrapy.Field() title = scrapy.Field() publish_date = scrapy.Field() authors = scrapy.Field() tags = scrapy.Field() text = scrapy.Field() text_html = sc...
true
true
7901bc9f1d31af5d50513e0c15bc57162093e24e
26,892
py
Python
falcon/inspect.py
hzdwang/falcon-1
1df2c0b7f21de773b3de70ea44af26f225c1887c
[ "Apache-2.0" ]
2
2020-12-09T04:13:18.000Z
2020-12-09T04:13:22.000Z
falcon/inspect.py
hzdwang/falcon-1
1df2c0b7f21de773b3de70ea44af26f225c1887c
[ "Apache-2.0" ]
null
null
null
falcon/inspect.py
hzdwang/falcon-1
1df2c0b7f21de773b3de70ea44af26f225c1887c
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 by Federico Caselli # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
34.040506
93
0.622564
from functools import partial import inspect from typing import Callable, Dict, List, Optional, Type from falcon import App, app_helpers from falcon.routing import CompiledRouter def inspect_app(app: App) -> 'AppInfo': routes = inspect_routes(app) static = inspect_static_routes(app) sinks =...
true
true
7901bd5b4b172d6f3e1c4b47ac8b79bb97033ac2
6,202
py
Python
tpdatasrc/tpgamefiles/rules/char_class/class016_sorcerer.py
edoipi/TemplePlus
f0e552289822fea908f16daa379fa568b1bd286d
[ "MIT" ]
null
null
null
tpdatasrc/tpgamefiles/rules/char_class/class016_sorcerer.py
edoipi/TemplePlus
f0e552289822fea908f16daa379fa568b1bd286d
[ "MIT" ]
null
null
null
tpdatasrc/tpgamefiles/rules/char_class/class016_sorcerer.py
edoipi/TemplePlus
f0e552289822fea908f16daa379fa568b1bd286d
[ "MIT" ]
null
null
null
from toee import * import char_class_utils import char_editor ################################################### def GetConditionName(): # used by API return "Sorcerer" # def GetSpellCasterConditionName(): # return "Sorcerer Spellcasting" def GetCategory(): return "Core 3.5 Ed Classes" def GetClassDefinitionFla...
28.319635
149
0.688165
from toee import * import char_class_utils import char_editor lIncrement = 1): classLvl = obj.stat_level_get(classEnum) if classLvlNew <= 0: classLvlNew = classLvl + 1 maxSpellLvl = char_editor.get_max_spell_level( obj, classEnum, classLvlNew ) spAvail = char_editor.get_learnable_spells(obj, classEnum, maxSp...
false
true
7901bf183b68ae45dd4aeedf3308e89b5a443829
2,790
py
Python
query_CNFUN.py
CNBP/RCAPI
5d7bb0e3bad0928529e84f404830de90c6c03143
[ "MIT" ]
null
null
null
query_CNFUN.py
CNBP/RCAPI
5d7bb0e3bad0928529e84f404830de90c6c03143
[ "MIT" ]
null
null
null
query_CNFUN.py
CNBP/RCAPI
5d7bb0e3bad0928529e84f404830de90c6c03143
[ "MIT" ]
null
null
null
import sys from query_common import filter_records, ProjectMixins from redcap import Project # note this is from PyCap.redcap from typing import List """ This class of functions are responsible of retrieving relevant data structures from the CNFUN tables """ class CNFUN_project(ProjectMixins): """ One baby ...
32.44186
110
0.650538
import sys from query_common import filter_records, ProjectMixins from redcap import Project from typing import List class CNFUN_project(ProjectMixins): def __init__( self, Token, URL, get_all_field=False, ): self.project = Project(URL, Token) # These are very important ID...
true
true
7901bf4e043fcf1e2f4bfc4e4937b25cd22a1088
758
py
Python
src/engine/main.py
libercapital/dados_publicos_cnpj_receita_federal
a02f98ebb1e5aa64539cc371d94ba78a49647214
[ "MIT" ]
7
2022-02-04T22:02:01.000Z
2022-03-08T22:55:29.000Z
src/engine/main.py
libercapital/dados_publicos_cnpj_receita_federal
a02f98ebb1e5aa64539cc371d94ba78a49647214
[ "MIT" ]
3
2022-02-04T22:48:01.000Z
2022-02-10T01:53:00.000Z
src/engine/main.py
libercapital/dados_publicos_cnpj_receita_federal
a02f98ebb1e5aa64539cc371d94ba78a49647214
[ "MIT" ]
1
2022-03-18T17:07:18.000Z
2022-03-18T17:07:18.000Z
from src.engine.company_root import CompanyRoot from src.engine.company_root_simples import CompanyRootSimples from src.engine.partners import Partners from src.engine.company import Company from src.engine.company_tax_regime import CompanyTaxRegime from src.engine.ref_date import main as engine_ref_date from s...
32.956522
63
0.777045
from src.engine.company_root import CompanyRoot from src.engine.company_root_simples import CompanyRootSimples from src.engine.partners import Partners from src.engine.company import Company from src.engine.company_tax_regime import CompanyTaxRegime from src.engine.ref_date import main as engine_ref_date from s...
true
true
7901bfee3778dd08118d7ec1c5e0e0d9e7c93415
1,004
py
Python
alipay/aop/api/response/AlipayBossFncSettleSettlementbillCreateResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayBossFncSettleSettlementbillCreateResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayBossFncSettleSettlementbillCreateResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.SettlementbillOpenApiDTO import SettlementbillOpenApiDTO class AlipayBossFncSettleSettlementbillCreateResponse(AlipayResponse): def __init__(self): super...
33.466667
120
0.74004
import json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.SettlementbillOpenApiDTO import SettlementbillOpenApiDTO class AlipayBossFncSettleSettlementbillCreateResponse(AlipayResponse): def __init__(self): super(AlipayBossFncSettleSettlementbillCreateResp...
true
true
7901c0b5cba908fba613856a95ce492e8e7595c5
910
py
Python
medium/Q105_ConstructBinaryTreeFromPreorderAndInorderTraversal.py
Kaciras/leetcode
d203aecd1afe1af13a0384a9c657c8424aab322d
[ "MIT" ]
null
null
null
medium/Q105_ConstructBinaryTreeFromPreorderAndInorderTraversal.py
Kaciras/leetcode
d203aecd1afe1af13a0384a9c657c8424aab322d
[ "MIT" ]
null
null
null
medium/Q105_ConstructBinaryTreeFromPreorderAndInorderTraversal.py
Kaciras/leetcode
d203aecd1afe1af13a0384a9c657c8424aab322d
[ "MIT" ]
null
null
null
from utils import TreeNode, binary_tree class Solution: def __init__(self): self.index = 0 # 利用[中序遍历左边元素数量 = 左子树节点总数]可以省掉这个计数的字段 def buildTree(self, preorder, inorder): """ :type preorder: List[int] :type inorder: List[int] :rtype: TreeNode """ if not preorder: return None def build_node(lo, h...
26
83
0.642857
from utils import TreeNode, binary_tree class Solution: def __init__(self): self.index = 0 def buildTree(self, preorder, inorder): if not preorder: return None def build_node(lo, hi): node = TreeNode(preorder[self.index]) self.index += 1 j = inorder.index(node.val, lo, hi) if self.index <...
true
true
7901c1a4e85e018c419102609aa51b2d41092f36
1,187
py
Python
scripts/batchAnnotator.py
PRIDE-Cluster/cluster-result-importer
354150e2ea527bcc1d3398f75ebbeb346a4c3dc7
[ "Apache-2.0" ]
null
null
null
scripts/batchAnnotator.py
PRIDE-Cluster/cluster-result-importer
354150e2ea527bcc1d3398f75ebbeb346a4c3dc7
[ "Apache-2.0" ]
1
2015-02-09T16:35:54.000Z
2015-02-09T16:37:51.000Z
scripts/batchAnnotator.py
PRIDE-Cluster/cluster-result-importer
354150e2ea527bcc1d3398f75ebbeb346a4c3dc7
[ "Apache-2.0" ]
null
null
null
import sys from subprocess import Popen import cx_Oracle root_directory = sys.argv[1] def main(directory): public_projects = get_public_project_accessions() for project_accession in public_projects: Popen(['./runAnnotator.sh', directory, str(project_accession)]) # get all the project references fr...
28.261905
173
0.730413
import sys from subprocess import Popen import cx_Oracle root_directory = sys.argv[1] def main(directory): public_projects = get_public_project_accessions() for project_accession in public_projects: Popen(['./runAnnotator.sh', directory, str(project_accession)]) def get_public_project_accessions(...
true
true