hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f768f7d0b38c927368fa9932b9b642f9aa39f2ee
11,456
py
Python
test/functional/mining_pos_reorg.py
hydrus7/JDCOIN
9aa9d6928846c86547f31f17fe89e49657a9eccd
[ "MIT" ]
5
2021-07-21T04:00:22.000Z
2021-12-19T05:31:33.000Z
test/functional/mining_pos_reorg.py
hydrus7/JDCOIN
9aa9d6928846c86547f31f17fe89e49657a9eccd
[ "MIT" ]
1
2021-07-24T02:23:51.000Z
2021-07-24T02:23:51.000Z
test/functional/mining_pos_reorg.py
hydrus7/JDCOIN
9aa9d6928846c86547f31f17fe89e49657a9eccd
[ "MIT" ]
1
2021-03-03T02:04:51.000Z
2021-03-03T02:04:51.000Z
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The JDCOIN developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.authproxy import JSONRPCException from test_framework.test_framework import JdCoinTestFrame...
46.380567
115
0.631634
from test_framework.authproxy import JSONRPCException from test_framework.test_framework import JdCoinTestFramework from test_framework.util import ( sync_blocks, assert_equal, assert_raises_rpc_error, connect_nodes, connect_nodes_clique, disconnect_nodes, set_node_times, DecimalAmt, ) ...
true
true
f768f8af972e919994b843a322acca060adf0b49
5,460
py
Python
examples/basics/cifar-convnet.py
fangchao111/tensorpack
87059de51331e540ca35eb295953ee16e3f59cee
[ "Apache-2.0" ]
null
null
null
examples/basics/cifar-convnet.py
fangchao111/tensorpack
87059de51331e540ca35eb295953ee16e3f59cee
[ "Apache-2.0" ]
null
null
null
examples/basics/cifar-convnet.py
fangchao111/tensorpack
87059de51331e540ca35eb295953ee16e3f59cee
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: cifar-convnet.py # Author: Yuxin Wu import tensorflow as tf import argparse import os from tensorpack import * from tensorpack.tfutils.summary import * from tensorpack.dataflow import dataset from tensorpack.utils.gpu import get_num_gpu """ A small convnet model f...
35.686275
94
0.613553
import tensorflow as tf import argparse import os from tensorpack import * from tensorpack.tfutils.summary import * from tensorpack.dataflow import dataset from tensorpack.utils.gpu import get_num_gpu class Model(ModelDesc): def __init__(self, cifar_classnum): super(Model, self).__init__() self....
true
true
f768fbd5d8b756df2f61be8c5d364b1b85fe83de
472
py
Python
tests/conftest.py
fp4code/django-entangled
279f6c999095a5a7213a2b7f0e95ae353638822b
[ "MIT" ]
84
2019-05-27T17:28:00.000Z
2022-03-30T20:28:45.000Z
tests/conftest.py
fp4code/django-entangled
279f6c999095a5a7213a2b7f0e95ae353638822b
[ "MIT" ]
12
2019-07-26T16:41:42.000Z
2022-03-22T13:09:55.000Z
tests/conftest.py
fp4code/django-entangled
279f6c999095a5a7213a2b7f0e95ae353638822b
[ "MIT" ]
7
2019-11-11T00:13:16.000Z
2022-02-10T20:52:00.000Z
import pytest from django.contrib.auth import get_user_model from .models import Category @pytest.fixture(autouse=True) def tenants(): User = get_user_model() User.objects.create(username='John') User.objects.create(username='Mary') return User.objects.all() @pytest.fixture(autouse=True) def categ...
22.47619
55
0.747881
import pytest from django.contrib.auth import get_user_model from .models import Category @pytest.fixture(autouse=True) def tenants(): User = get_user_model() User.objects.create(username='John') User.objects.create(username='Mary') return User.objects.all() @pytest.fixture(autouse=True) def categ...
true
true
f768fbd890aa858308d2d0a97bcac43e5ac6f865
593
py
Python
workalendar/europe/luxembourg.py
vanadium23/workalendar
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
[ "MIT" ]
null
null
null
workalendar/europe/luxembourg.py
vanadium23/workalendar
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
[ "MIT" ]
null
null
null
workalendar/europe/luxembourg.py
vanadium23/workalendar
4c67b5a7900fa56d7a93b767c6cbd8f1cc6b70a7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from workalendar.core import WesternCalendar, ChristianMixin from workalendar.registry import iso_register @iso_register('LU') class Luxembourg(WesternCalendar, ChristianMixin): name = 'Luxembourg' include_easter_monday = True include_ascens...
26.954545
60
0.725126
from __future__ import unicode_literals from workalendar.core import WesternCalendar, ChristianMixin from workalendar.registry import iso_register @iso_register('LU') class Luxembourg(WesternCalendar, ChristianMixin): name = 'Luxembourg' include_easter_monday = True include_ascension = True include_w...
true
true
f768fcfbe7fe5f8b2494d8f1bf33d61748e66004
1,872
py
Python
misc/cube_gif_test.py
zamlz/dlcampjeju2018-I2A-cube
85ae7a2084ca490ea685ff3d30e82720fb58c0ea
[ "MIT" ]
14
2018-07-19T03:56:45.000Z
2019-10-01T12:09:01.000Z
misc/cube_gif_test.py
zamlz/dlcampjeju2018-I2A-cube
85ae7a2084ca490ea685ff3d30e82720fb58c0ea
[ "MIT" ]
null
null
null
misc/cube_gif_test.py
zamlz/dlcampjeju2018-I2A-cube
85ae7a2084ca490ea685ff3d30e82720fb58c0ea
[ "MIT" ]
null
null
null
import gym import sys import cube_gym import time from common.multiprocessing_env import SubprocVecEnv import tensorflow as tf import matplotlib.pyplot as plt import matplotlib.animation as animation from a2c import ActorCritic from policy import * def env_fn(): env = gym.make('cube-x3-v0') env.unwrapped._re...
24
90
0.587073
import gym import sys import cube_gym import time from common.multiprocessing_env import SubprocVecEnv import tensorflow as tf import matplotlib.pyplot as plt import matplotlib.animation as animation from a2c import ActorCritic from policy import * def env_fn(): env = gym.make('cube-x3-v0') env.unwrapped._re...
true
true
f768fda825b49e221f07af96fd1c60b7f243bff8
439
py
Python
Python/string/manacher.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
2
2021-09-05T13:17:01.000Z
2021-09-05T13:17:06.000Z
Python/string/manacher.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
null
null
null
Python/string/manacher.py
NatsubiSogan/comp_library
9f06d947951db40e051bd506fd8722fb75c3688b
[ "Apache-2.0" ]
null
null
null
# Manacher's Algorithm class Manacher(): def __init__(self, s: str) -> None: self.s = s def coustruct(self) -> list: i, j = 0, 0 res = [0] * len(self.s) while i < len(self.s): while i - j >= 0 and i + j < len(self.s) and self.s[i - j] == self.s[i + j]: j += 1 res[i] = j k = 1 while i - k >= 0 ...
24.388889
79
0.485194
class Manacher(): def __init__(self, s: str) -> None: self.s = s def coustruct(self) -> list: i, j = 0, 0 res = [0] * len(self.s) while i < len(self.s): while i - j >= 0 and i + j < len(self.s) and self.s[i - j] == self.s[i + j]: j += 1 res[i] = j k = 1 while i - k >= 0 and i + k < len(self.s)...
true
true
f768ff10ab2e68a57d08bc48b1ebcc10c96047b0
3,309
py
Python
tensorflow_probability/python/internal/backend/numpy/nn.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/nn.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/internal/backend/numpy/nn.py
nxdao2000/probability
33d2bc1cb0e7b6284579ea7f3692b9d056e0d700
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability 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 o...
32.126214
94
0.739801
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from tensorflow_probability.python.internal.backend.numpy import numpy_array from tensorflow_probability.python.internal.backend.numpy.internal import utils from t...
true
true
f76900b23bdb5ed044003130ecd745b0c718248b
4,161
py
Python
modules/dbnd/src/dbnd/_core/task/tracking_task.py
kalebinn/dbnd
89b6ac3537f861784be73ffe8989bf63fca7401c
[ "Apache-2.0" ]
null
null
null
modules/dbnd/src/dbnd/_core/task/tracking_task.py
kalebinn/dbnd
89b6ac3537f861784be73ffe8989bf63fca7401c
[ "Apache-2.0" ]
null
null
null
modules/dbnd/src/dbnd/_core/task/tracking_task.py
kalebinn/dbnd
89b6ac3537f861784be73ffe8989bf63fca7401c
[ "Apache-2.0" ]
null
null
null
import logging import os import typing from dbnd._core.constants import TaskEssence, _TaskParamContainer from dbnd._core.current import get_databand_run from dbnd._core.parameter.parameter_builder import parameter from dbnd._core.parameter.parameter_definition import ( ParameterDefinition, ParameterScope, ) fr...
29.510638
104
0.676039
import logging import os import typing from dbnd._core.constants import TaskEssence, _TaskParamContainer from dbnd._core.current import get_databand_run from dbnd._core.parameter.parameter_builder import parameter from dbnd._core.parameter.parameter_definition import ( ParameterDefinition, ParameterScope, ) fr...
true
true
f76902e6a2dccdf764a2c7e67e76c52736e95764
3,051
py
Python
tests/test_cursors.py
noriokun4649/python-annict
72a4902dc2ef91527a0dc7aa6d19290595e16a00
[ "MIT" ]
8
2016-08-13T04:27:38.000Z
2021-05-03T11:53:34.000Z
tests/test_cursors.py
noriokun4649/python-annict
72a4902dc2ef91527a0dc7aa6d19290595e16a00
[ "MIT" ]
286
2016-08-18T01:25:39.000Z
2022-02-25T20:17:20.000Z
tests/test_cursors.py
noriokun4649/python-annict
72a4902dc2ef91527a0dc7aa6d19290595e16a00
[ "MIT" ]
2
2016-08-17T23:39:14.000Z
2021-02-05T16:45:39.000Z
# -*- coding: utf-8 -*- import pytest import responses @responses.activate def test_cursor_supported(api_factory): json = """ { "works": [ { "id": 4168, "title": "SHIROBAKO", "title_kana": "しろばこ", "media": "tv", "media_text": "TV", "sea...
32.806452
174
0.583743
import pytest import responses @responses.activate def test_cursor_supported(api_factory): json = """ { "works": [ { "id": 4168, "title": "SHIROBAKO", "title_kana": "しろばこ", "media": "tv", "media_text": "TV", "season_name": "2014-autumn"...
true
true
f76904d994a97e9f301745e68ab4a9b9cbb590aa
701
py
Python
tests/test_timeentry.py
giuliocalzolari/pse_timecard
5eb835ad88a8ee2eb8a97a5fcfe30dd83d6cbf7c
[ "WTFPL" ]
11
2019-08-21T09:21:53.000Z
2022-02-06T21:41:34.000Z
tests/test_timeentry.py
giuliocalzolari/pse_timecard
5eb835ad88a8ee2eb8a97a5fcfe30dd83d6cbf7c
[ "WTFPL" ]
22
2019-08-21T09:17:58.000Z
2022-03-14T20:04:10.000Z
tests/test_timeentry.py
giuliocalzolari/pse_timecard
5eb835ad88a8ee2eb8a97a5fcfe30dd83d6cbf7c
[ "WTFPL" ]
9
2019-08-21T11:43:34.000Z
2021-11-08T15:36:24.000Z
from freezegun import freeze_time from salesforce_timecard.core import TimecardEntry import pytest import json @freeze_time("2020-9-18") @pytest.mark.vcr() @pytest.mark.block_network def test_list_timecard(): te = TimecardEntry("tests/fixtures/cfg_user_password.json") rs = te.list_timecard(False, "2020-09-1...
26.961538
75
0.731812
from freezegun import freeze_time from salesforce_timecard.core import TimecardEntry import pytest import json @freeze_time("2020-9-18") @pytest.mark.vcr() @pytest.mark.block_network def test_list_timecard(): te = TimecardEntry("tests/fixtures/cfg_user_password.json") rs = te.list_timecard(False, "2020-09-1...
true
true
f76905257443b4e91fde890af9946778c22ff814
6,479
py
Python
twistit/test_mock.py
pydron/twistit
23ac43b830083fd32c400fcdfa5300e302769c74
[ "MIT" ]
1
2016-04-08T00:35:54.000Z
2016-04-08T00:35:54.000Z
twistit/test_mock.py
pydron/twistit
23ac43b830083fd32c400fcdfa5300e302769c74
[ "MIT" ]
null
null
null
twistit/test_mock.py
pydron/twistit
23ac43b830083fd32c400fcdfa5300e302769c74
[ "MIT" ]
null
null
null
# Copyright (C) 2015 Stefan C. Mueller import unittest import twistit from twisted.internet import error class TestTimeMock(unittest.TestCase): def setUp(self): self.target = twistit.TimeMock() def mock_f(): self.f_called_at = self.target.seconds() self....
33.056122
62
0.620775
import unittest import twistit from twisted.internet import error class TestTimeMock(unittest.TestCase): def setUp(self): self.target = twistit.TimeMock() def mock_f(): self.f_called_at = self.target.seconds() self.f = mock_f self.f_called_at = N...
true
true
f769059a5e4c874ab99a34d9eb3174b001b9a691
185
py
Python
readability/functions/__init__.py
russelljjarvis/readabilityinscience
353d79f11f2380fd4872242397a255a4b1da675c
[ "MIT" ]
null
null
null
readability/functions/__init__.py
russelljjarvis/readabilityinscience
353d79f11f2380fd4872242397a255a4b1da675c
[ "MIT" ]
null
null
null
readability/functions/__init__.py
russelljjarvis/readabilityinscience
353d79f11f2380fd4872242397a255a4b1da675c
[ "MIT" ]
null
null
null
import readability.functions.readabilityFunctions import readability.functions.abstract_cleanup import readability.functions.convert_id import readability.functions.dataminingfunctions
37
49
0.913514
import readability.functions.readabilityFunctions import readability.functions.abstract_cleanup import readability.functions.convert_id import readability.functions.dataminingfunctions
true
true
f76905add670a20655e022f96171add988ef5ad9
7,496
py
Python
tools/export_plugins/plugin.py
pchaigno/grr
69c81624c281216a45c4bb88a9d4e4b0613a3556
[ "Apache-2.0" ]
1
2015-01-07T05:29:57.000Z
2015-01-07T05:29:57.000Z
tools/export_plugins/plugin.py
pchaigno/grr
69c81624c281216a45c4bb88a9d4e4b0613a3556
[ "Apache-2.0" ]
null
null
null
tools/export_plugins/plugin.py
pchaigno/grr
69c81624c281216a45c4bb88a9d4e4b0613a3556
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Definition of grr_export plugin.""" import threading import logging from grr.lib import data_store from grr.lib import export from grr.lib import output_plugin as output_plugin_lib from grr.lib import registry from grr.lib import threadpool from grr.lib import utils class ExportPlugin(ob...
34.865116
79
0.71278
import threading import logging from grr.lib import data_store from grr.lib import export from grr.lib import output_plugin as output_plugin_lib from grr.lib import registry from grr.lib import threadpool from grr.lib import utils class ExportPlugin(object): __metaclass__ = registry.MetaclassRegistry name =...
true
true
f76906465102c2d2c61edf06a165c7e9907286b7
2,811
py
Python
fault/utils.py
makaimann/fault
8c805415f398e64971d18fbd3014bc0b59fb38b8
[ "BSD-3-Clause" ]
31
2018-07-16T15:03:14.000Z
2022-03-10T08:36:09.000Z
fault/utils.py
makaimann/fault
8c805415f398e64971d18fbd3014bc0b59fb38b8
[ "BSD-3-Clause" ]
216
2018-07-18T20:00:34.000Z
2021-10-05T17:40:47.000Z
fault/utils.py
makaimann/fault
8c805415f398e64971d18fbd3014bc0b59fb38b8
[ "BSD-3-Clause" ]
10
2019-02-17T00:56:58.000Z
2021-11-05T13:31:37.000Z
import ast import inspect import os # From https://gist.github.com/Xion/617c1496ff45f3673a5692c3b0e3f75a def get_short_lambda_body_text(lambda_func): """Return the source of a (short) lambda function. If it's impossible to obtain, returns None. """ try: source_lines, _ = inspect.getsourcelines...
41.338235
75
0.648524
import ast import inspect import os def get_short_lambda_body_text(lambda_func): try: source_lines, _ = inspect.getsourcelines(lambda_func) except (IOError, TypeError): return None if len(source_lines) != 1: return None source_text = os.linesep.join(source_lines).strip() ...
true
true
f7690667fc27141c687d7f065d9aa2fac834dc08
3,383
py
Python
azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/express_route_gateway.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/express_route_gateway.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2019_02_01/models/express_route_gateway.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "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 ...
42.2875
144
0.650606
from .resource import Resource class ExpressRouteGateway(Resource): _validation = { 'name': {'readonly': True}, 'type': {'readonly': True}, 'express_route_connections': {'readonly': True}, 'virtual_hub': {'required': True}, 'etag': {'readonly': True}, } _attribut...
true
true
f769077d74a83e6ec6272fb8ef89614954a4709c
197
py
Python
bcscanner/__init__.py
debmalyabiswas1/BusinessCardScanner
9350141bbe59387f8ded798601377f85f4f4dc19
[ "Apache-2.0" ]
3
2020-03-09T10:21:54.000Z
2020-12-09T13:55:46.000Z
bcscanner/__init__.py
debmalyabiswas1/BusinessCardScanner
9350141bbe59387f8ded798601377f85f4f4dc19
[ "Apache-2.0" ]
2
2021-10-12T22:52:25.000Z
2021-10-12T23:03:30.000Z
bcscanner/__init__.py
debmalyabiswas1/BusinessCardScanner
9350141bbe59387f8ded798601377f85f4f4dc19
[ "Apache-2.0" ]
1
2020-04-02T11:42:52.000Z
2020-04-02T11:42:52.000Z
# Copyright Philip Morris Products S.A. 2019 from .Config import Config, OCRConfig from .BCScanner import BCScanner from .CardSplitter import CardSplitter from .OCR import OCR from . import utils
24.625
44
0.807107
from .Config import Config, OCRConfig from .BCScanner import BCScanner from .CardSplitter import CardSplitter from .OCR import OCR from . import utils
true
true
f769088c0b688bd64402d17a4365329f9ae9e9da
4,003
py
Python
parser.py
wittrock/mta-turnstile-parser
cdb60dbeafb88b8deb9c6875aa316377996636a1
[ "Apache-2.0" ]
null
null
null
parser.py
wittrock/mta-turnstile-parser
cdb60dbeafb88b8deb9c6875aa316377996636a1
[ "Apache-2.0" ]
null
null
null
parser.py
wittrock/mta-turnstile-parser
cdb60dbeafb88b8deb9c6875aa316377996636a1
[ "Apache-2.0" ]
null
null
null
import collections import datetime import math import sys with open('combined.csv', 'r') as f: rows = f.readlines() combined_entries_per_turnstile = collections.defaultdict(lambda: collections.defaultdict(int)) # not grouping by subway line for now for row in rows: split = row.split(',') if len(split) !=...
35.114035
179
0.639021
import collections import datetime import math import sys with open('combined.csv', 'r') as f: rows = f.readlines() combined_entries_per_turnstile = collections.defaultdict(lambda: collections.defaultdict(int)) for row in rows: split = row.split(',') if len(split) != 11: continue ...
true
true
f7690e2c3b922bdd3ff28f68aef3a5f941472df3
4,878
py
Python
adv/tiki.py
buffelisanne/dl
61f036d5c131e2f3b17b47dc256e0387abe8f577
[ "Apache-2.0" ]
null
null
null
adv/tiki.py
buffelisanne/dl
61f036d5c131e2f3b17b47dc256e0387abe8f577
[ "Apache-2.0" ]
null
null
null
adv/tiki.py
buffelisanne/dl
61f036d5c131e2f3b17b47dc256e0387abe8f577
[ "Apache-2.0" ]
null
null
null
from core.advbase import * from slot.a import * from slot.d import * from module.x_alt import X_alt, Fs_alt def module(): return Tiki # divine dragon mods tiki_conf = { 'x1.dmg': 7 / 100.0, 'x1.sp': 88, 'x1.utp': 2, 'x1.startup': 12 / 60.0, 'x1.recovery': 0, 'x1.hit': 1, 'x2.dmg': 15 ...
29.035714
116
0.570521
from core.advbase import * from slot.a import * from slot.d import * from module.x_alt import X_alt, Fs_alt def module(): return Tiki tiki_conf = { 'x1.dmg': 7 / 100.0, 'x1.sp': 88, 'x1.utp': 2, 'x1.startup': 12 / 60.0, 'x1.recovery': 0, 'x1.hit': 1, 'x2.dmg': 15 / 100.0, 'x2.sp':...
true
true
f7690e7698bc4859a9d70794fe02b90af860ee55
364
py
Python
taobao_wechat_bot/top/api/rest/AlibabaBaichuanAppeventUploadRequest.py
zyphs21/myPythonPractise
7da984c98ee93e650ab2f9da4a2502340f1220b4
[ "MIT" ]
null
null
null
taobao_wechat_bot/top/api/rest/AlibabaBaichuanAppeventUploadRequest.py
zyphs21/myPythonPractise
7da984c98ee93e650ab2f9da4a2502340f1220b4
[ "MIT" ]
null
null
null
taobao_wechat_bot/top/api/rest/AlibabaBaichuanAppeventUploadRequest.py
zyphs21/myPythonPractise
7da984c98ee93e650ab2f9da4a2502340f1220b4
[ "MIT" ]
null
null
null
''' Created by auto_sdk on 2016.05.10 ''' from top.api.base import RestApi class AlibabaBaichuanAppeventUploadRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.appid = None self.bizid = None self.params = None def getapiname(self): ...
26
56
0.725275
from top.api.base import RestApi class AlibabaBaichuanAppeventUploadRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.appid = None self.bizid = None self.params = None def getapiname(self): return 'alibaba.baichuan.appevent.upload'
true
true
f7690eba77d28ead2431b0c0906bed11ce268a91
32,591
py
Python
myems-api/excelexporters/spaceincome.py
myems/myems-web
a6dd98ef2691d3fb9f78dfcd8bf1dff7d5dd6dcb
[ "MIT" ]
2
2020-06-10T08:42:35.000Z
2021-01-30T14:25:14.000Z
myems-api/excelexporters/spaceincome.py
myems/myems-web
a6dd98ef2691d3fb9f78dfcd8bf1dff7d5dd6dcb
[ "MIT" ]
3
2020-10-28T02:26:20.000Z
2021-02-18T09:07:52.000Z
myems-api/excelexporters/spaceincome.py
myems/myems-web
a6dd98ef2691d3fb9f78dfcd8bf1dff7d5dd6dcb
[ "MIT" ]
6
2020-09-14T16:43:06.000Z
2021-02-18T14:09:53.000Z
import base64 import uuid import os import re from decimal import Decimal from openpyxl.chart import PieChart, LineChart, Reference from openpyxl.styles import PatternFill, Border, Side, Alignment, Font from openpyxl.drawing.image import Image from openpyxl import Workbook from openpyxl.chart.label import DataLabelList...
41.306717
120
0.551349
import base64 import uuid import os import re from decimal import Decimal from openpyxl.chart import PieChart, LineChart, Reference from openpyxl.styles import PatternFill, Border, Side, Alignment, Font from openpyxl.drawing.image import Image from openpyxl import Workbook from openpyxl.chart.label import DataLabelList...
true
true
f7690fcf0d755b9047bd4a46466cd61550f6ba0b
926
py
Python
sdk/python/pulumi_azure_native/databoxedge/v20200501preview/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/databoxedge/v20200501preview/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/databoxedge/v20200501preview/__init__.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "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! *** from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .bandwidth_schedule import * from .cont...
28.9375
80
0.766739
from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .bandwidth_schedule import * from .container import * from .device import * from .get_bandwidth_schedule import * from .get_container import * from .get_device import * from .get_device_extended_information ...
true
true
f769117490c9bbf06094e35097e96819cbb24e4c
1,907
py
Python
jans-cli/setup.py
nikdavnik/jans
5e9abc74cca766a066512eab2aca6563ce480bff
[ "Apache-2.0" ]
18
2022-01-13T13:45:13.000Z
2022-03-30T04:41:18.000Z
jans-cli/setup.py
nikdavnik/jans
5e9abc74cca766a066512eab2aca6563ce480bff
[ "Apache-2.0" ]
604
2022-01-13T12:32:50.000Z
2022-03-31T20:27:36.000Z
jans-cli/setup.py
nikdavnik/jans
5e9abc74cca766a066512eab2aca6563ce480bff
[ "Apache-2.0" ]
8
2022-01-28T00:23:25.000Z
2022-03-16T05:12:12.000Z
""" License terms and conditions for Janssen: https://www.apache.org/licenses/LICENSE-2.0 """ import codecs import os import re from setuptools import setup from setuptools import find_packages def find_version(*file_paths): here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(he...
29.338462
101
0.614053
import codecs import os import re from setuptools import setup from setuptools import find_packages def find_version(*file_paths): here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, *file_paths), 'r') as f: version_file = f.read() version_match = re.search(r"^__...
true
true
f769130f2a1cfcab95806271ab119be29949e506
7,888
py
Python
encrypt/scrypt.py
inuitwallet/bippy
fc21da4cdbe02cd9d7e73ff6e57e957d033b235e
[ "MIT" ]
3
2015-03-05T08:24:04.000Z
2015-11-05T11:32:17.000Z
encrypt/scrypt.py
inuitwallet/bippy
fc21da4cdbe02cd9d7e73ff6e57e957d033b235e
[ "MIT" ]
2
2015-09-17T17:00:37.000Z
2021-04-15T11:19:58.000Z
encrypt/scrypt.py
inuitwallet/bippy
fc21da4cdbe02cd9d7e73ff6e57e957d033b235e
[ "MIT" ]
1
2015-09-17T15:47:13.000Z
2015-09-17T15:47:13.000Z
import imp import platform import sys from ctypes import (cdll, POINTER, pointer, c_char_p, c_size_t, c_double, c_int, c_uint64, c_uint32, create_string_buffer) # Linux if platform.system() == 'Linux': if platform.architecture()[0] == '6...
33.004184
102
0.586207
import imp import platform import sys from ctypes import (cdll, POINTER, pointer, c_char_p, c_size_t, c_double, c_int, c_uint64, c_uint32, create_string_buffer) if platform.system() == 'Linux': if platform.architecture()[0] == '64bit': ...
true
true
f76914c9bd4b5fbb383b97b912d8c89ddce3f5ac
15,811
py
Python
mezzanine/core/models.py
mminarick/mezzanine
840e776f5c88ba9529a0a9b1ffcd7ee35f356d1c
[ "BSD-2-Clause" ]
1
2020-09-03T02:31:38.000Z
2020-09-03T02:31:38.000Z
mezzanine/core/models.py
mminarick/mezzanine
840e776f5c88ba9529a0a9b1ffcd7ee35f356d1c
[ "BSD-2-Clause" ]
null
null
null
mezzanine/core/models.py
mminarick/mezzanine
840e776f5c88ba9529a0a9b1ffcd7ee35f356d1c
[ "BSD-2-Clause" ]
null
null
null
from django.contrib.contenttypes.generic import GenericForeignKey from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.db.models.base import ModelBase from django.db.models.signals import post_save from django.template.defaultfilters import truncatewords_html from django.utils....
35.450673
78
0.62621
from django.contrib.contenttypes.generic import GenericForeignKey from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.db.models.base import ModelBase from django.db.models.signals import post_save from django.template.defaultfilters import truncatewords_html from django.utils....
true
true
f76915ae8da8bd3ff622023c2bac5270311df075
9,314
py
Python
covid19_model.py
sanzgiri/covid19_india
3a530fb107446bdba54dc6581c45f15f590b0a1e
[ "Apache-2.0" ]
null
null
null
covid19_model.py
sanzgiri/covid19_india
3a530fb107446bdba54dc6581c45f15f590b0a1e
[ "Apache-2.0" ]
null
null
null
covid19_model.py
sanzgiri/covid19_india
3a530fb107446bdba54dc6581c45f15f590b0a1e
[ "Apache-2.0" ]
null
null
null
import pandas as pd import numpy as np from fbprophet import Prophet import pickle import math import scipy.optimize as optim import matplotlib.pyplot as plt from datetime import datetime, timedelta import covid19_prepare_data as prepare_data import logging logging.getLogger('fbprophet').setLevel(logging.WARNING) ...
39.466102
204
0.587073
import pandas as pd import numpy as np from fbprophet import Prophet import pickle import math import scipy.optimize as optim import matplotlib.pyplot as plt from datetime import datetime, timedelta import covid19_prepare_data as prepare_data import logging logging.getLogger('fbprophet').setLevel(logging.WARNING) ...
true
true
f769179aeb3b5f8ae8ba91a99772fa6f90437bd1
72,367
py
Python
src/sage/game_theory/normal_form_game.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/game_theory/normal_form_game.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/game_theory/normal_form_game.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
1
2020-07-24T12:20:37.000Z
2020-07-24T12:20:37.000Z
r""" Normal form games with N players. This module implements a class for normal form games (strategic form games) [NN2007]_. At present 3 algorithms are implemented to compute equilibria of these games (``'lrs'`` - interfaced with the 'lrslib' library, ``'LCP'`` interfaced with the 'gambit' library and support enumer...
39.783947
227
0.546658
from collections import MutableMapping from itertools import product from parser import Parser from sage.combinat.cartesian_product import CartesianProduct from sage.misc.latex import latex from sage.misc.misc import powerset from sage.rings.all import QQ from sage.structure.sage_object import SageObject from sage.ma...
true
true
f76917ddb1f223ab12e4f7ca41f1cecb31eb1dda
19,542
py
Python
daal4py/sklearn/decomposition/_pca_0_23.py
makart19/daal4py
8264fe81c772478c5530f38077a129f027f3677d
[ "Apache-2.0" ]
null
null
null
daal4py/sklearn/decomposition/_pca_0_23.py
makart19/daal4py
8264fe81c772478c5530f38077a129f027f3677d
[ "Apache-2.0" ]
null
null
null
daal4py/sklearn/decomposition/_pca_0_23.py
makart19/daal4py
8264fe81c772478c5530f38077a129f027f3677d
[ "Apache-2.0" ]
null
null
null
# #******************************************************************************* # Copyright 2014-2020 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.a...
38.544379
105
0.624501
import numpy as np import numbers from sklearn import decomposition from sklearn.utils import check_array from sklearn.decomposition._pca import PCA as PCA_original from sklearn.decomposition._pca import (_infer_dimension, svd_flip) from sklearn.utils.validation import check_is_fitted from sklearn.utils.extmath imp...
true
true
f76918e72b5e0877604d04144d78a8799743a5c4
1,273
py
Python
backup_finalize/healthcheck.py
hwwilliams/backup-tarfile-s3
666dcf0644a2dc9a5b98bed24ddd28b3a3d4d5f1
[ "MIT" ]
null
null
null
backup_finalize/healthcheck.py
hwwilliams/backup-tarfile-s3
666dcf0644a2dc9a5b98bed24ddd28b3a3d4d5f1
[ "MIT" ]
null
null
null
backup_finalize/healthcheck.py
hwwilliams/backup-tarfile-s3
666dcf0644a2dc9a5b98bed24ddd28b3a3d4d5f1
[ "MIT" ]
null
null
null
import json import logging import requests logger = logging.getLogger(__name__) class HealthCheck(): def __init__(self, backup_config): self.backup_name = backup_config['Name'] self.url = backup_config['HealthCheckUrl'] def push(self, initialize=None, failure=None): logger.debug( ...
30.309524
126
0.608013
import json import logging import requests logger = logging.getLogger(__name__) class HealthCheck(): def __init__(self, backup_config): self.backup_name = backup_config['Name'] self.url = backup_config['HealthCheckUrl'] def push(self, initialize=None, failure=None): logger.debug( ...
true
true
f769193b0fc2579481ad6d6eaf00c00a8e64e279
506
py
Python
LukeKong/setup.py
joaocabral6/Jogo_LukeKong-Donkey-Kong-
5cda7015bf5f797ffc5ade1e6f3814d8ed615273
[ "MIT" ]
null
null
null
LukeKong/setup.py
joaocabral6/Jogo_LukeKong-Donkey-Kong-
5cda7015bf5f797ffc5ade1e6f3814d8ed615273
[ "MIT" ]
null
null
null
LukeKong/setup.py
joaocabral6/Jogo_LukeKong-Donkey-Kong-
5cda7015bf5f797ffc5ade1e6f3814d8ed615273
[ "MIT" ]
null
null
null
import sys from cx_Freeze import setup, Executable base = None if sys.platform == "win32": base = "Win32GUI" executables = [ Executable("LukeKong.py", base=base) ] buildOptions = dict( packages = [], includes = [], include_files = [], excludes = [] ) ...
16.866667
46
0.557312
import sys from cx_Freeze import setup, Executable base = None if sys.platform == "win32": base = "Win32GUI" executables = [ Executable("LukeKong.py", base=base) ] buildOptions = dict( packages = [], includes = [], include_files = [], excludes = [] ) ...
true
true
f769193b3d009cf1ab6503c370c360a0da8446f2
1,470
py
Python
Server_3_0.py
Logan-Shy/MSU_CSCI_466_Programming_Assignments
9f711aeeccf8b27f00d861acaa1b2722bb12a941
[ "Apache-2.0" ]
null
null
null
Server_3_0.py
Logan-Shy/MSU_CSCI_466_Programming_Assignments
9f711aeeccf8b27f00d861acaa1b2722bb12a941
[ "Apache-2.0" ]
null
null
null
Server_3_0.py
Logan-Shy/MSU_CSCI_466_Programming_Assignments
9f711aeeccf8b27f00d861acaa1b2722bb12a941
[ "Apache-2.0" ]
null
null
null
import argparse import RDT_3_0 import time def makePigLatin(word): m = len(word) vowels = "a", "e", "i", "o", "u", "y" if m<3 or word=="the": return word else: for i in vowels: if word.find(i) < m and word.find(i) != -1: m = word.find(i) if m==0: ...
26.25
81
0.553061
import argparse import RDT_3_0 import time def makePigLatin(word): m = len(word) vowels = "a", "e", "i", "o", "u", "y" if m<3 or word=="the": return word else: for i in vowels: if word.find(i) < m and word.find(i) != -1: m = word.find(i) if m==0: ...
true
true
f7691aa4b02c42285c947e3a1cb0b4d2339a4dc1
684
py
Python
FeatureCollection/reverse_mask.py
cclauss/qgis-earthengine-examples
02a417f524875f5e6033b65cca8417ff2cfb03e6
[ "MIT" ]
3
2020-02-05T05:35:38.000Z
2021-07-10T04:09:22.000Z
FeatureCollection/reverse_mask.py
zexuanxu/qgis-earthengine-examples
7ae571fe4d5e7706b93cff702925307cfba3317b
[ "MIT" ]
null
null
null
FeatureCollection/reverse_mask.py
zexuanxu/qgis-earthengine-examples
7ae571fe4d5e7706b93cff702925307cfba3317b
[ "MIT" ]
1
2020-02-24T18:17:37.000Z
2020-02-24T18:17:37.000Z
#!/usr/bin/env python """Reverse mask a region. Create an image that masks everything except for the specified polygon. """ import ee from ee_plugin import Map Map.setCenter(-100, 40, 4) fc = (ee.FeatureCollection('ft:1Ec8IWsP8asxN-ywSqgXWMuBaxI6pPaeh6hC64lA') .filter(ee.Filter().eq('ECO_NAME', 'Great Basin s...
24.428571
73
0.700292
import ee from ee_plugin import Map Map.setCenter(-100, 40, 4) fc = (ee.FeatureCollection('ft:1Ec8IWsP8asxN-ywSqgXWMuBaxI6pPaeh6hC64lA') .filter(ee.Filter().eq('ECO_NAME', 'Great Basin shrub steppe'))) empty = ee.Image(0).toByte() filled = empty.paint(fc, 2) both = filled.paint(fc, 1, 5) result = both.mask(fi...
true
true
f7691b1a4bee11f7bcf9cb5721dca686095ec5bf
9,779
py
Python
tests/test_0056b-partitioned-array-numba.py
HenryDayHall/awkward-1.0
4a860e775502f9adb953524c35c5a2de8f7a3181
[ "BSD-3-Clause" ]
1
2021-04-01T09:31:27.000Z
2021-04-01T09:31:27.000Z
tests/test_0056b-partitioned-array-numba.py
HenryDayHall/awkward-1.0
4a860e775502f9adb953524c35c5a2de8f7a3181
[ "BSD-3-Clause" ]
null
null
null
tests/test_0056b-partitioned-array-numba.py
HenryDayHall/awkward-1.0
4a860e775502f9adb953524c35c5a2de8f7a3181
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE from __future__ import absolute_import import sys import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 numba = pytest.importorskip("numba") ak_numba = pytest.importorskip("awkward._con...
23.172986
87
0.497392
from __future__ import absolute_import import sys import pytest import numpy as np import awkward as ak numba = pytest.importorskip("numba") ak_numba = pytest.importorskip("awkward._connect._numba") ak_numba_arrayview = pytest.importorskip("awkward._connect._numba.arrayview") ak_numba.register_and_check() de...
true
true
f7691bcc9ed072eddae24fd51b5eb13cb89f1a59
862
py
Python
backend/users/urls.py
dcostat04/FACES-2021
95d69ef9094e9ff02b1fce4413036aa53bb30213
[ "MIT" ]
2
2021-09-08T14:58:28.000Z
2021-09-08T15:02:33.000Z
backend/users/urls.py
dcostat04/FACES-2021
95d69ef9094e9ff02b1fce4413036aa53bb30213
[ "MIT" ]
null
null
null
backend/users/urls.py
dcostat04/FACES-2021
95d69ef9094e9ff02b1fce4413036aa53bb30213
[ "MIT" ]
1
2021-09-09T03:51:24.000Z
2021-09-09T03:51:24.000Z
from django.urls import path from .views import MakeUsersView, OTPVerify, RegisterView, LoginView, LogoutView, TeamList, UserAvatarUpdate, UserCartUpdate, UserCheckout, UserCriteria, UserDetail, UserExistsView, UserUpdate urlpatterns = [ path('auth/register/', RegisterView.as_view()), path('auth/login/', Login...
45.368421
192
0.701856
from django.urls import path from .views import MakeUsersView, OTPVerify, RegisterView, LoginView, LogoutView, TeamList, UserAvatarUpdate, UserCartUpdate, UserCheckout, UserCriteria, UserDetail, UserExistsView, UserUpdate urlpatterns = [ path('auth/register/', RegisterView.as_view()), path('auth/login/', Login...
true
true
f7691c1800f9860dbbf169ac03acff75dfadc65b
558
py
Python
gnosis/eth/__init__.py
titandac/gnosis-py
cf0af4f25e64b22256eabb415d0f3fe3a6180b14
[ "MIT" ]
64
2018-09-26T19:56:50.000Z
2022-03-18T21:45:59.000Z
gnosis/eth/__init__.py
zhanghao-ic/gnosis-py
d2a5912547b7d1b576c826909f4c1d0155db536f
[ "MIT" ]
151
2018-09-10T21:42:05.000Z
2022-03-31T12:33:31.000Z
gnosis/eth/__init__.py
zhanghao-ic/gnosis-py
d2a5912547b7d1b576c826909f4c1d0155db536f
[ "MIT" ]
50
2018-12-13T20:43:46.000Z
2022-03-30T09:32:32.000Z
# flake8: noqa F401 from .ethereum_client import ( EthereumClient, EthereumClientProvider, FromAddressNotFound, GasLimitExceeded, InsufficientFunds, InvalidNonce, NonceTooHigh, NonceTooLow, ReplacementTransactionUnderpriced, SenderAccountNotFoundInNode, TransactionAlreadyImpo...
27.9
87
0.795699
from .ethereum_client import ( EthereumClient, EthereumClientProvider, FromAddressNotFound, GasLimitExceeded, InsufficientFunds, InvalidNonce, NonceTooHigh, NonceTooLow, ReplacementTransactionUnderpriced, SenderAccountNotFoundInNode, TransactionAlreadyImported, Transactio...
true
true
f7691c2fba0e9821e75156ae6ebf1319a6773ddf
22,751
py
Python
fact/controller_pb2.py
unicornunicode/FACT
fcdda7e7a2f6615d4b4cdb2afcdd230194bdc935
[ "MIT" ]
17
2021-11-24T14:20:02.000Z
2022-03-22T11:45:44.000Z
fact/controller_pb2.py
unicornunicode/FACT
fcdda7e7a2f6615d4b4cdb2afcdd230194bdc935
[ "MIT" ]
null
null
null
fact/controller_pb2.py
unicornunicode/FACT
fcdda7e7a2f6615d4b4cdb2afcdd230194bdc935
[ "MIT" ]
2
2022-01-26T02:14:18.000Z
2022-01-31T20:06:39.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: fact/controller.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google...
44.091085
1,826
0.779131
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from fact import tasks_pb2 as fact_dot_tasks__pb2 DESCRIPT...
true
true
f7691cccc165f8424543035b7c2738db7c8f07d3
1,533
py
Python
data_pipelines_w_airflow/03_production_data_pipelines/facts_calculator.py
MonNum5/udacity_data_engineer
9f63a395fe0b7f2a77e81931b2d39752797c0bdf
[ "MIT" ]
null
null
null
data_pipelines_w_airflow/03_production_data_pipelines/facts_calculator.py
MonNum5/udacity_data_engineer
9f63a395fe0b7f2a77e81931b2d39752797c0bdf
[ "MIT" ]
null
null
null
data_pipelines_w_airflow/03_production_data_pipelines/facts_calculator.py
MonNum5/udacity_data_engineer
9f63a395fe0b7f2a77e81931b2d39752797c0bdf
[ "MIT" ]
null
null
null
import logging from airflow.hooks.postgres_hook import PostgresHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class FactsCalculatorOperator(BaseOperator): facts_sql_template = """ DROP TABLE IF EXISTS {destination_table}; CREATE TABLE {destination_table} ...
34.066667
71
0.660796
import logging from airflow.hooks.postgres_hook import PostgresHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults class FactsCalculatorOperator(BaseOperator): facts_sql_template = """ DROP TABLE IF EXISTS {destination_table}; CREATE TABLE {destination_table} ...
true
true
f7691eca7f0772d9a9ff3e68b288f82476f1c821
2,620
py
Python
src/utils/logging.py
georgezywang/BFT-RLForensics
014be0b57f4edf44ed9d933d23df836cb46d8714
[ "Apache-2.0" ]
null
null
null
src/utils/logging.py
georgezywang/BFT-RLForensics
014be0b57f4edf44ed9d933d23df836cb46d8714
[ "Apache-2.0" ]
null
null
null
src/utils/logging.py
georgezywang/BFT-RLForensics
014be0b57f4edf44ed9d933d23df836cb46d8714
[ "Apache-2.0" ]
null
null
null
""" Code adapted from https://github.com/TonghanWang/ROMA """ from collections import defaultdict import logging import numpy as np import torch class Logger: def __init__(self, console_logger): self.console_logger = console_logger self.use_tb = False self.use_sacred = False self...
32.345679
125
0.596947
from collections import defaultdict import logging import numpy as np import torch class Logger: def __init__(self, console_logger): self.console_logger = console_logger self.use_tb = False self.use_sacred = False self.use_hdf = False self.stats = defaultdict(lambda: [])...
true
true
f7691f0f413f5b362c261bcfe31f6621cc6923cb
4,203
py
Python
oscar/lib/python3.6/site-packages/waitress/tests/test_utilities.py
bcruz97/django-oscar
df3dc1d99e70765a6c95a67f5b076644cd482852
[ "BSD-3-Clause" ]
1
2020-03-01T04:38:24.000Z
2020-03-01T04:38:24.000Z
oscar/lib/python3.6/site-packages/waitress/tests/test_utilities.py
bcruz97/django-oscar
df3dc1d99e70765a6c95a67f5b076644cd482852
[ "BSD-3-Clause" ]
10
2020-05-11T20:29:28.000Z
2022-01-13T01:41:27.000Z
oscar/lib/python3.6/site-packages/waitress/tests/test_utilities.py
bcruz97/django-oscar
df3dc1d99e70765a6c95a67f5b076644cd482852
[ "BSD-3-Clause" ]
17
2019-11-21T14:11:29.000Z
2019-11-21T15:26:23.000Z
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
31.133333
78
0.644302
import unittest class Test_parse_http_date(unittest.TestCase): def _callFUT(self, v): from waitress.utilities import parse_http_date return parse_http_date(v) def test_rfc850(self): val = 'Tuesday, 08-Feb-94 14:15:29 GMT' result = self._callFUT(val) self.assertEqual(r...
true
true
f7691f15e5e548006d80f3131d1c4200694c9d19
48,779
py
Python
python/paddle/distributed/fleet/meta_optimizers/sharding_optimizer.py
dingsiyu/paddle_adamw
868c0e44d7d43d83fd062bfe4536f13b8bf4517f
[ "Apache-2.0" ]
null
null
null
python/paddle/distributed/fleet/meta_optimizers/sharding_optimizer.py
dingsiyu/paddle_adamw
868c0e44d7d43d83fd062bfe4536f13b8bf4517f
[ "Apache-2.0" ]
null
null
null
python/paddle/distributed/fleet/meta_optimizers/sharding_optimizer.py
dingsiyu/paddle_adamw
868c0e44d7d43d83fd062bfe4536f13b8bf4517f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle 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 appli...
43.905491
219
0.569425
import paddle from paddle.fluid import unique_name, core import paddle.fluid as fluid from paddle.distributed.fleet.meta_optimizers.common import OpRole, OP_ROLE_VAR_KEY, CollectiveHelper from paddle.distributed.fleet.meta_optimizers.common import is_backward_op from paddle.distributed.fleet.meta_optimizers.meta_optim...
true
true
f769206abfc140f7be3ed7b27d0be65528e0c492
950
py
Python
options.py
MikaBob/trumpf-spiel-web2py
5b3b9f89ba7b700903e650e0866262f0a6ff5adb
[ "BSD-3-Clause" ]
null
null
null
options.py
MikaBob/trumpf-spiel-web2py
5b3b9f89ba7b700903e650e0866262f0a6ff5adb
[ "BSD-3-Clause" ]
null
null
null
options.py
MikaBob/trumpf-spiel-web2py
5b3b9f89ba7b700903e650e0866262f0a6ff5adb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # when web2py is run as a windows service (web2py.py -W) # it does not load the command line options but it # expects to find configuration settings in a file called # # web2py/options.py # # this file is an example for options.py import socket import os #ip = '0.0.0.0' port = 8000 interfac...
27.941176
77
0.7
import socket import os port = 8000 interfaces = [('0.0.0.0', 8000)] password = 'bob' pid_filename = 'httpserver.pid' log_filename = 'httpserver.log' profiler_filename = None ssl_certificate = '' ssl_private_key = '' minthreads = None maxthreads = None server_name = socket.gethostname() request_que...
true
true
f769208e7e8f217d24e2311343b1945fe195de74
12,801
py
Python
haas_lib_bundles/python/libraries/spl06/spl06.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/spl06/spl06.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/spl06/spl06.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
""" Copyright (C) 2015-2021 Alibaba Group Holding Limited MicroPython's drive for SPL06 Author: HaaS Date: 2021/09/09 """ from driver import I2C from utime import sleep_ms import math EEPROM_CHIP_ADDRESS = 0x77 spl06_dict = {'Ctemp': 0.0, 'Ftemp': 0.0,'pressure': 0.0, 'altitude': 0.0} class SPL06(obj...
30.771635
110
0.558706
from driver import I2C from utime import sleep_ms import math EEPROM_CHIP_ADDRESS = 0x77 spl06_dict = {'Ctemp': 0.0, 'Ftemp': 0.0,'pressure': 0.0, 'altitude': 0.0} class SPL06(object): def __init__(self, i2cDev): self._i2cDev = None if not isinstance(i2cDev, I2C): raise ValueError("pa...
true
true
f769211cf67dce908f4d05b433aa7e396240fb41
1,558
py
Python
flask_sso_ui/utils.py
DhanarSantika/flask-sso-ui
32d2a914ec8cd24cef2600af0066c211666cadf2
[ "MIT" ]
null
null
null
flask_sso_ui/utils.py
DhanarSantika/flask-sso-ui
32d2a914ec8cd24cef2600af0066c211666cadf2
[ "MIT" ]
null
null
null
flask_sso_ui/utils.py
DhanarSantika/flask-sso-ui
32d2a914ec8cd24cef2600af0066c211666cadf2
[ "MIT" ]
null
null
null
import os import json from cas import CASClient from urllib.parse import urlunparse SSO_UI_URL = "https://sso.ui.ac.id/cas2/" SSO_UI_FORCE_SERVICE_HTTPS = False def normalize_username(username): return username.lower() def get_protocol(request): if request.is_secure or SSO_UI_FORCE_SERVICE_HTTPS: re...
25.966667
79
0.699615
import os import json from cas import CASClient from urllib.parse import urlunparse SSO_UI_URL = "https://sso.ui.ac.id/cas2/" SSO_UI_FORCE_SERVICE_HTTPS = False def normalize_username(username): return username.lower() def get_protocol(request): if request.is_secure or SSO_UI_FORCE_SERVICE_HTTPS: re...
true
true
f769216c9b0063d4b17d26f4d49ee1c5d655ffd0
3,552
py
Python
ra-gym/ra_gym/envs/ra_env.py
RickyMexx/DeepRL-LTLf
24cb3ac49e5bb9e07c37644d7226201ccb2b59a4
[ "Apache-2.0" ]
6
2020-12-07T23:47:44.000Z
2022-02-14T13:27:45.000Z
ra-gym/ra_gym/envs/ra_env.py
RickyMexx/DeepRL-LTLf
24cb3ac49e5bb9e07c37644d7226201ccb2b59a4
[ "Apache-2.0" ]
1
2021-05-06T11:38:33.000Z
2021-05-10T18:06:33.000Z
ra-gym/ra_gym/envs/ra_env.py
RickyMexx/DeepRL-LTLf
24cb3ac49e5bb9e07c37644d7226201ccb2b59a4
[ "Apache-2.0" ]
1
2021-01-09T02:32:10.000Z
2021-01-09T02:32:10.000Z
import numpy as np import gym from gym import spaces import time class RAEnv(gym.Env): metadata = { 'render.modes': ['rgb_array'], 'video.frames_per_second': 50 } def __init__(self): self.action_space = spaces.Box(low=np.array([-1., -1.]), high=np.array([1., 1.]), dtype=np.float32) self.observation_space = s...
29.6
154
0.659628
import numpy as np import gym from gym import spaces import time class RAEnv(gym.Env): metadata = { 'render.modes': ['rgb_array'], 'video.frames_per_second': 50 } def __init__(self): self.action_space = spaces.Box(low=np.array([-1., -1.]), high=np.array([1., 1.]), dtype=np.float32) self.observation_space = s...
true
true
f76921a62360904eb52b4c452d2115f47593b36a
16,324
py
Python
plugins/Note/plugin.py
atr000/Limnoria
1f60a9487ca4114f040135fb14cabc155a041918
[ "BSD-3-Clause" ]
null
null
null
plugins/Note/plugin.py
atr000/Limnoria
1f60a9487ca4114f040135fb14cabc155a041918
[ "BSD-3-Clause" ]
null
null
null
plugins/Note/plugin.py
atr000/Limnoria
1f60a9487ca4114f040135fb14cabc155a041918
[ "BSD-3-Clause" ]
1
2021-01-23T21:20:57.000Z
2021-01-23T21:20:57.000Z
### # Copyright (c) 2004, Brett Kelly # Copyright (c) 2010, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice...
36.115044
85
0.549559
import re import time import operator import supybot.dbi as dbi import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.ircdb as ircdb from supybot.commands import * import supybot.ircmsgs as ircmsgs import supybot.plugins as plugins import supybot.ircutils as ircutils impor...
true
true
f76921b09cc5b8f3074a2c1583e0b02cc663632b
945
py
Python
tests/test_kernel.py
fallenpegasus/reconbf
bfd15bef549f011a3de885c3267d4f718223b798
[ "Apache-2.0" ]
45
2016-08-12T21:37:25.000Z
2022-03-29T00:21:29.000Z
tests/test_kernel.py
fallenpegasus/reconbf
bfd15bef549f011a3de885c3267d4f718223b798
[ "Apache-2.0" ]
20
2016-08-11T07:42:28.000Z
2016-09-09T13:33:47.000Z
tests/test_kernel.py
fallenpegasus/reconbf
bfd15bef549f011a3de885c3267d4f718223b798
[ "Apache-2.0" ]
6
2016-08-25T06:31:38.000Z
2019-09-11T04:29:36.000Z
from reconbf.modules import test_kernel from reconbf.lib.result import Result from reconbf.lib import utils import unittest from mock import patch class PtraceScope(unittest.TestCase): def test_no_yama(self): with patch.object(utils, 'kconfig_option', return_value=None): res = test_kernel.tes...
36.346154
75
0.688889
from reconbf.modules import test_kernel from reconbf.lib.result import Result from reconbf.lib import utils import unittest from mock import patch class PtraceScope(unittest.TestCase): def test_no_yama(self): with patch.object(utils, 'kconfig_option', return_value=None): res = test_kernel.tes...
true
true
f76922e9eb5c402ff2233b2f7d861e6fe1effa22
11,152
py
Python
ModelRegistration/ModelRegistration.py
ezgimercan/SlicerIGT
22cf9e01c5e8e6663ab4948d3fd2cf7d1f7a0b21
[ "BSD-3-Clause" ]
1
2021-04-02T00:22:40.000Z
2021-04-02T00:22:40.000Z
ModelRegistration/ModelRegistration.py
ezgimercan/SlicerIGT
22cf9e01c5e8e6663ab4948d3fd2cf7d1f7a0b21
[ "BSD-3-Clause" ]
null
null
null
ModelRegistration/ModelRegistration.py
ezgimercan/SlicerIGT
22cf9e01c5e8e6663ab4948d3fd2cf7d1f7a0b21
[ "BSD-3-Clause" ]
null
null
null
import os import unittest import math from __main__ import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * # # ModelRegistration # class ModelRegistration(ScriptedLoadableModule): def __init__(self, parent): ScriptedLoadableModule.__init__(self, parent) self.parent.title = "Model Registrati...
41.61194
183
0.766858
import os import unittest import math from __main__ import vtk, qt, ctk, slicer from slicer.ScriptedLoadableModule import * class ModelRegistration(ScriptedLoadableModule): def __init__(self, parent): ScriptedLoadableModule.__init__(self, parent) self.parent.title = "Model Registration" self.parent.cate...
true
true
f769233bf5c5cb4aa62a9ae0b982cd6aa0294ebb
9,813
py
Python
common/OpTestMambo.py
apopple/op-test-framework
94687c73bbc09d897350e9e799ea51703050befd
[ "Apache-2.0" ]
null
null
null
common/OpTestMambo.py
apopple/op-test-framework
94687c73bbc09d897350e9e799ea51703050befd
[ "Apache-2.0" ]
null
null
null
common/OpTestMambo.py
apopple/op-test-framework
94687c73bbc09d897350e9e799ea51703050befd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2 # # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2018 # [+] International Business Machines Corp. # # # 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 L...
32.92953
138
0.641394
import sys import time import pexpect import subprocess import os from common.Exceptions import CommandFailed, ParameterCheck import OPexpect from OpTestUtil import OpTestUtil import logging import OpTestLogger log = OpTestLogger.optest_logger_glob.get_logger(__name__) class ConsoleState(): DISCONNECTED = 0 ...
true
true
f7692344d8dfbce795d9d53a8241e36e70f8bc5c
746
py
Python
contratospr/contracts/tests/test_utils.py
jycordero/contratospr-api
6778b02b42305aa7ce65c956a0d89029ddd857a4
[ "Apache-2.0" ]
15
2019-02-26T12:40:18.000Z
2020-01-24T00:58:00.000Z
contratospr/contracts/tests/test_utils.py
jycordero/contratospr-api
6778b02b42305aa7ce65c956a0d89029ddd857a4
[ "Apache-2.0" ]
52
2019-02-13T03:54:34.000Z
2020-01-20T16:39:56.000Z
contratospr/contracts/tests/test_utils.py
jycordero/contratospr-api
6778b02b42305aa7ce65c956a0d89029ddd857a4
[ "Apache-2.0" ]
6
2019-02-18T13:59:55.000Z
2019-11-30T23:36:43.000Z
import datetime from django.utils import timezone from ..utils import get_current_fiscal_year, get_fiscal_year_range class TestUtils: def test_get_current_fiscal_year(self): now = timezone.now() fiscal_year_end = timezone.make_aware(datetime.datetime(now.year, 6, 30)) current_fiscal_yea...
31.083333
81
0.699732
import datetime from django.utils import timezone from ..utils import get_current_fiscal_year, get_fiscal_year_range class TestUtils: def test_get_current_fiscal_year(self): now = timezone.now() fiscal_year_end = timezone.make_aware(datetime.datetime(now.year, 6, 30)) current_fiscal_yea...
true
true
f76924dd4e549cfeb83c4ac13f166fd2cc41d9ba
614
py
Python
sunburn/test_hst_observation.py
ladsantos/blastoise
30458f41c5432c97f71a54a73a89fa1193e28b38
[ "MIT" ]
null
null
null
sunburn/test_hst_observation.py
ladsantos/blastoise
30458f41c5432c97f71a54a73a89fa1193e28b38
[ "MIT" ]
3
2018-01-18T15:51:11.000Z
2018-01-19T08:08:07.000Z
sunburn/test_hst_observation.py
ladsantos/sunburn
30458f41c5432c97f71a54a73a89fa1193e28b38
[ "MIT" ]
null
null
null
import numpy as np from . import hst_observation, spectroscopy datasets = ['ld9m10ujq', 'ld9m10uyq'] visit1 = hst_observation.Visit(datasets, 'cos', prefix='data/') line_list = spectroscopy.COSFUVLineList(wavelength_shift=.0, range_factor=1.0).lines tr = 'Si III' line = 0 ref_...
32.315789
78
0.705212
import numpy as np from . import hst_observation, spectroscopy datasets = ['ld9m10ujq', 'ld9m10uyq'] visit1 = hst_observation.Visit(datasets, 'cos', prefix='data/') line_list = spectroscopy.COSFUVLineList(wavelength_shift=.0, range_factor=1.0).lines tr = 'Si III' line = 0 ref_...
true
true
f76925d0d7d23320086ca21ef523270aaa0f32e6
2,638
py
Python
coniii/ising_eqn/ising_eqn_2_sym.py
eltrompetero/coniii
d698696c11e12a62fe3340eb2f4d3344145a96dd
[ "MIT" ]
14
2019-04-29T16:51:05.000Z
2022-02-05T06:33:15.000Z
coniii/ising_eqn/ising_eqn_2_sym.py
eltrompetero/coniii
d698696c11e12a62fe3340eb2f4d3344145a96dd
[ "MIT" ]
28
2018-10-30T03:43:11.000Z
2021-10-12T11:56:56.000Z
coniii/ising_eqn/ising_eqn_2_sym.py
eltrompetero/coniii
d698696c11e12a62fe3340eb2f4d3344145a96dd
[ "MIT" ]
7
2019-04-29T16:34:41.000Z
2021-08-23T00:42:42.000Z
# MIT License # # Copyright (c) 2019 Edward D. Lee, Bryan C. Daniels # # 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,...
38.794118
106
0.64746
from numpy import zeros, exp, array, prod, isnan from ..enumerate import fast_logsumexp def calc_observables(params): Cout = zeros((3)) H = params[0:2] J = params[2:3] energyTerms = array([ +H[0]+H[1]+J[0], +H[0]-H[1]-J[0], -H[0]+H[1]-J[0], -H[0]-H[1]+J[0],]) logZ = fast_logsumexp(ener...
true
true
f7692761186c6f2470a95210450801999e9ee7b5
5,932
py
Python
src/pip/_internal/utils/outdated.py
NinjaIntheBronx/pip
f46550831d46fd66879d7d8a2a0eb6060efdeb67
[ "MIT" ]
null
null
null
src/pip/_internal/utils/outdated.py
NinjaIntheBronx/pip
f46550831d46fd66879d7d8a2a0eb6060efdeb67
[ "MIT" ]
null
null
null
src/pip/_internal/utils/outdated.py
NinjaIntheBronx/pip
f46550831d46fd66879d7d8a2a0eb6060efdeb67
[ "MIT" ]
null
null
null
from __future__ import absolute_import import datetime import json import logging import os.path import sys from pip._vendor import lockfile, pkg_resources from pip._vendor.packaging import version as packaging_version from pip._internal.index import PackageFinder from pip._internal.utils.compat import WINDOWS from ...
35.951515
78
0.62323
from __future__ import absolute_import import datetime import json import logging import os.path import sys from pip._vendor import lockfile, pkg_resources from pip._vendor.packaging import version as packaging_version from pip._internal.index import PackageFinder from pip._internal.utils.compat import WINDOWS from ...
true
true
f7692776340ae6807e4b190b2a3d46a703a41a55
6,863
py
Python
tf_agents/train/utils/replay_buffer_utils.py
johnamcleod/agents
5ab7026e47503f14ef02918acfae340f4128dcd4
[ "Apache-2.0" ]
2
2021-07-25T11:06:56.000Z
2021-07-25T11:07:02.000Z
tf_agents/train/utils/replay_buffer_utils.py
johnamcleod/agents
5ab7026e47503f14ef02918acfae340f4128dcd4
[ "Apache-2.0" ]
1
2021-01-31T08:17:47.000Z
2021-01-31T08:17:47.000Z
tf_agents/train/utils/replay_buffer_utils.py
johnamcleod/agents
5ab7026e47503f14ef02918acfae340f4128dcd4
[ "Apache-2.0" ]
1
2021-01-31T08:13:34.000Z
2021-01-31T08:13:34.000Z
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
40.134503
80
0.680023
from tf_agents.replay_buffers import reverb_replay_buffer from tf_agents.replay_buffers import reverb_utils from tf_agents.utils import lazy_loader reverb = lazy_loader.LazyLoader('reverb', globals(), 'reverb') def _create_uniform_table(table_name, data_spec, table_capacity=1000, min_size...
true
true
f7692934fc535a1eacc12a54ecccf8e3e8e0843c
1,941
py
Python
fetchers/XiaoShuFetcher.py
iridesc/ProxyPoolWithUI
593139b519533ca61f8a32455b4bf465b9c7a3ed
[ "MIT" ]
null
null
null
fetchers/XiaoShuFetcher.py
iridesc/ProxyPoolWithUI
593139b519533ca61f8a32455b4bf465b9c7a3ed
[ "MIT" ]
null
null
null
fetchers/XiaoShuFetcher.py
iridesc/ProxyPoolWithUI
593139b519533ca61f8a32455b4bf465b9c7a3ed
[ "MIT" ]
null
null
null
from operator import index import re import time import random import requests from pyquery import PyQuery as pq from fetchers.BaseFetcher import BaseFetcher class XiaoShuFetcher(BaseFetcher): """ http://www.xsdaili.cn/ 代码由 [Zealot666](https://github.com/Zealot666) 提供 """ index = 0 def fetch...
32.35
142
0.530654
from operator import index import re import time import random import requests from pyquery import PyQuery as pq from fetchers.BaseFetcher import BaseFetcher class XiaoShuFetcher(BaseFetcher): index = 0 def fetch(self): self.index += 1 new_index = self.index % 10 urls = set() ...
true
true
f76929c8e5a1f5615135bf5367b52523de85aefa
7,032
py
Python
precompiler/_impl/pc_file_manager.py
raxvan/precompiler
a2fc39b992dc377c9f4d9edfc0a255d13b94014b
[ "Apache-2.0" ]
6
2018-07-26T07:42:33.000Z
2020-04-22T13:39:00.000Z
precompiler/_impl/pc_file_manager.py
raxvan/precompiler
a2fc39b992dc377c9f4d9edfc0a255d13b94014b
[ "Apache-2.0" ]
6
2019-01-21T15:11:55.000Z
2020-07-01T20:15:26.000Z
precompiler/_impl/pc_file_manager.py
raxvan/precompiler
a2fc39b992dc377c9f4d9edfc0a255d13b94014b
[ "Apache-2.0" ]
1
2019-02-21T08:14:42.000Z
2019-02-21T08:14:42.000Z
import os import re import time import hashlib import precompiler import precompiler._impl.pc_output as _impl_pc_output import precompiler._utils.pc_utils as _pc_utils import precompiler._utils.pc_file_utils as _pc_file_utils class FileDataAdapter(object): def __init__(self,_name,_file_interface): self.name = _n...
29.178423
157
0.743032
import os import re import time import hashlib import precompiler import precompiler._impl.pc_output as _impl_pc_output import precompiler._utils.pc_utils as _pc_utils import precompiler._utils.pc_file_utils as _pc_file_utils class FileDataAdapter(object): def __init__(self,_name,_file_interface): self.name = _n...
true
true
f7692c9edb05d9512a6e51913014d6ce469acb11
26
py
Python
research/object_detection/config_checkpoint.py
jgaz/models
4028d2dbe9e4422e7a137d6004da1aaed475eea0
[ "Apache-2.0" ]
null
null
null
research/object_detection/config_checkpoint.py
jgaz/models
4028d2dbe9e4422e7a137d6004da1aaed475eea0
[ "Apache-2.0" ]
null
null
null
research/object_detection/config_checkpoint.py
jgaz/models
4028d2dbe9e4422e7a137d6004da1aaed475eea0
[ "Apache-2.0" ]
null
null
null
FINE_TUNE_CHECKPOINT = ""
13
25
0.769231
FINE_TUNE_CHECKPOINT = ""
true
true
f7692cbf51190940dcfcba774472d81b6b2e7ff2
8,998
py
Python
Octopus/dataframe/core/abstractDataFrame.py
PasaLab/Octopus-DF
fded59e089bf7c5ed42767f4661f7b22d78c4719
[ "Apache-2.0" ]
3
2021-04-16T07:49:21.000Z
2022-01-04T06:02:19.000Z
Octopus/dataframe/core/abstractDataFrame.py
PasaLab/Octopus-DF
fded59e089bf7c5ed42767f4661f7b22d78c4719
[ "Apache-2.0" ]
null
null
null
Octopus/dataframe/core/abstractDataFrame.py
PasaLab/Octopus-DF
fded59e089bf7c5ed42767f4661f7b22d78c4719
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import pandas as pd from Octopus.dataframe.core.utils import derived_from __all__ = ["AbstractDataFrame"] class AbstractDataFrame(object): def __init__(self, data=None, index=None, columns=None, dtype=None, copy=False): self.dataframe = da...
43.468599
128
0.605023
import pandas as pd from Octopus.dataframe.core.utils import derived_from __all__ = ["AbstractDataFrame"] class AbstractDataFrame(object): def __init__(self, data=None, index=None, columns=None, dtype=None, copy=False): self.dataframe = data def __str__(self): return self...
true
true
f7692ce50ec66b710bc6ede575cd64d7be5cf25d
870
py
Python
app/__init__.py
GeorgeVasiliadis/confidant
7650f53c68b153c80c8c7e10f8916551699b54c6
[ "Apache-2.0" ]
2
2021-07-10T13:00:26.000Z
2021-07-11T10:56:55.000Z
app/__init__.py
GeorgeVasiliadis/confidant
7650f53c68b153c80c8c7e10f8916551699b54c6
[ "Apache-2.0" ]
null
null
null
app/__init__.py
GeorgeVasiliadis/confidant
7650f53c68b153c80c8c7e10f8916551699b54c6
[ "Apache-2.0" ]
null
null
null
from flask import Flask, render_template from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_migrate import Migrate from config import Config db = SQLAlchemy() login_manager = LoginManager() migrate = Migrate() def create_app(): app = Flask(__name__) app.config.from_object...
23.513514
49
0.754023
from flask import Flask, render_template from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_migrate import Migrate from config import Config db = SQLAlchemy() login_manager = LoginManager() migrate = Migrate() def create_app(): app = Flask(__name__) app.config.from_object...
true
true
f7692cf6f9775681a9afdb6c13d82c60bb874044
4,282
py
Python
tools/release/auto_roll.py
sarvex/v8
4f53c5b7f6e1bedf4bf6dc42d86c070edee3122f
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
239
2016-04-01T14:49:28.000Z
2022-01-19T21:15:11.000Z
tools/release/auto_roll.py
sarvex/v8
4f53c5b7f6e1bedf4bf6dc42d86c070edee3122f
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
8
2016-03-30T11:06:29.000Z
2020-06-29T01:18:51.000Z
tools/release/auto_roll.py
sarvex/v8
4f53c5b7f6e1bedf4bf6dc42d86c070edee3122f
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
11
2016-09-08T01:05:45.000Z
2021-09-28T07:45:05.000Z
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys import urllib from common_includes import * import chromium_roll class CheckActiv...
31.485294
77
0.652732
import argparse import json import os import sys import urllib from common_includes import * import chromium_roll class CheckActiveRoll(Step): MESSAGE = "Check active roll." @staticmethod def ContainsChromiumRoll(changes): for change in changes: if change["subject"].startswith("Update V8 to"): ...
false
true
f7692d603bd9297bc2e47fabac253b03fa341830
418
py
Python
src/kill_nodes.py
srikanteswartalluri/container-orchestrator
3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9
[ "Apache-2.0" ]
null
null
null
src/kill_nodes.py
srikanteswartalluri/container-orchestrator
3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9
[ "Apache-2.0" ]
null
null
null
src/kill_nodes.py
srikanteswartalluri/container-orchestrator
3cd07989e28ece0038cb0b7c6bbdc83c1c0ba7a9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from log_utils import logger from cli_utils import CLIUtils from constants import * (out, err) = CLIUtils.run(LIST_NODES_CMD) logger.debug('list of containers: {}'.format(out)) lines = out.strip().split("\n") for i in range(1, len(lines)): container_id = lines[i].split()[0] (out, err) = CLIU...
24.588235
65
0.705742
from log_utils import logger from cli_utils import CLIUtils from constants import * (out, err) = CLIUtils.run(LIST_NODES_CMD) logger.debug('list of containers: {}'.format(out)) lines = out.strip().split("\n") for i in range(1, len(lines)): container_id = lines[i].split()[0] (out, err) = CLIUtils.run(KILL_NODE...
true
true
f7692d668e6c7907b6383ebf1c3ad304cfc69b2f
3,810
py
Python
tests/test_flask_soocii_auth.py
jonascheng/services-lib
5345be2ddeab8bbdbeccbc2bcbecf3202163d0bc
[ "Apache-2.0" ]
null
null
null
tests/test_flask_soocii_auth.py
jonascheng/services-lib
5345be2ddeab8bbdbeccbc2bcbecf3202163d0bc
[ "Apache-2.0" ]
5
2017-11-23T08:24:09.000Z
2018-12-25T04:42:48.000Z
tests/test_flask_soocii_auth.py
jonascheng/services-lib
5345be2ddeab8bbdbeccbc2bcbecf3202163d0bc
[ "Apache-2.0" ]
3
2017-06-28T07:54:40.000Z
2018-12-25T04:44:42.000Z
import os import uuid import pytest from flask import Flask, Response, g from flask_soocii_auth import SoociiAuthenticator, users, exceptions from soocii_services_lib import auth class TestFlaskSoociiAuth: app = None client = None def setup_method(self, _): self.app = Flask(__name__) se...
34.954128
119
0.618635
import os import uuid import pytest from flask import Flask, Response, g from flask_soocii_auth import SoociiAuthenticator, users, exceptions from soocii_services_lib import auth class TestFlaskSoociiAuth: app = None client = None def setup_method(self, _): self.app = Flask(__name__) se...
true
true
f7692d8ad64c33e122ff0133cac39e0f0f87e6da
34,503
py
Python
utils/get_data_hbag/pb/radar_sta775_pb2.py
NovemberChopin/GuideLine
d49b3b527a5e54f3ee734c8d5245efb89150d594
[ "MIT" ]
null
null
null
utils/get_data_hbag/pb/radar_sta775_pb2.py
NovemberChopin/GuideLine
d49b3b527a5e54f3ee734c8d5245efb89150d594
[ "MIT" ]
null
null
null
utils/get_data_hbag/pb/radar_sta775_pb2.py
NovemberChopin/GuideLine
d49b3b527a5e54f3ee734c8d5245efb89150d594
[ "MIT" ]
1
2022-02-28T11:58:47.000Z
2022-02-28T11:58:47.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: radar_sta775.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _sym...
49.29
3,378
0.741182
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() import header_pb2 as header__pb2 import common_pb2 as commo...
true
true
f7692d9e6d1d2f70e881c36867960bb38be77490
19,356
py
Python
carmcmc/samplers.py
metegenez/WAVEPAL
fa2bb91e2c7e63681ae4592929215c96bc523597
[ "MIT" ]
22
2017-03-09T20:46:31.000Z
2022-02-16T08:18:30.000Z
carmcmc/samplers.py
metegenez/WAVEPAL
fa2bb91e2c7e63681ae4592929215c96bc523597
[ "MIT" ]
6
2017-03-19T20:22:33.000Z
2021-01-05T11:41:31.000Z
carmcmc/samplers.py
metegenez/WAVEPAL
fa2bb91e2c7e63681ae4592929215c96bc523597
[ "MIT" ]
9
2017-11-06T18:00:31.000Z
2021-07-21T19:20:09.000Z
""" This file contains the class definition for the sampler MCMCSample classes. """ __author__ = 'Brandon C. Kelly' import numpy as np from matplotlib import pyplot as plt import scipy.stats import acor class MCMCSample(object): """ Class for parameter samples generated by a yamcmc++ sampler. This class con...
44.909513
120
0.604774
""" This file contains the class definition for the sampler MCMCSample classes. """ __author__ = 'Brandon C. Kelly' import numpy as np from matplotlib import pyplot as plt import scipy.stats import acor class MCMCSample(object): """ Class for parameter samples generated by a yamcmc++ sampler. This class con...
false
true
f7692dafd2d569a321b776a66b70bc967261e01e
6,901
py
Python
graviti/paging/page.py
linjiX/graviti-python-sdk
37ce9a016449f67d21fa4b29b0da61f12f12acc4
[ "MIT" ]
12
2022-01-26T06:51:02.000Z
2022-03-22T21:28:35.000Z
graviti/paging/page.py
linjiX/graviti-python-sdk
37ce9a016449f67d21fa4b29b0da61f12f12acc4
[ "MIT" ]
51
2022-02-22T07:19:34.000Z
2022-03-31T11:39:51.000Z
graviti/paging/page.py
linjiX/graviti-python-sdk
37ce9a016449f67d21fa4b29b0da61f12f12acc4
[ "MIT" ]
5
2022-01-26T06:51:49.000Z
2022-03-08T03:41:11.000Z
#!/usr/bin/env python3 # # Copyright 2022 Graviti. Licensed under MIT License. # """Page related class.""" from typing import Callable, Iterator, Optional, Sequence, TypeVar, Union, overload _T = TypeVar("_T") class PageBase(Sequence[_T]): """PageBase is the base class of array wrapper and represents a page in...
27.826613
97
0.600493
from typing import Callable, Iterator, Optional, Sequence, TypeVar, Union, overload _T = TypeVar("_T") class PageBase(Sequence[_T]): _ranging: range def __repr__(self) -> str: return f"{self.__class__.__name__}({self._ranging})" def __len__(self) -> int: return len(self._ranging) ...
true
true
f7692ebeaebb791c6c15945379bd4e3d2dea3219
3,358
py
Python
scripts/upgrade_ks_app.py
NunoEdgarGFlowHub/kubeflow
a31dbbf823a0e67299e32596f93556743f851748
[ "Apache-2.0" ]
8
2018-04-03T11:02:59.000Z
2019-07-27T08:51:35.000Z
scripts/upgrade_ks_app.py
NunoEdgarGFlowHub/kubeflow
a31dbbf823a0e67299e32596f93556743f851748
[ "Apache-2.0" ]
12
2020-09-26T01:21:07.000Z
2022-02-26T03:19:38.000Z
scripts/upgrade_ks_app.py
NunoEdgarGFlowHub/kubeflow
a31dbbf823a0e67299e32596f93556743f851748
[ "Apache-2.0" ]
3
2019-09-03T04:25:50.000Z
2020-12-14T18:35:40.000Z
#!/usr/bin/env python import argparse import logging import os.path import shutil import subprocess import yaml # The path used by the bootstrapper BOOTSTRAPPER_REGISTRY = "/opt/registries/kubeflow/kubeflow" # The current release of Kubeflow. This should be upgraded on every release. CURRENT_RELEASE = "github.com/kub...
32.288462
77
0.684336
import argparse import logging import os.path import shutil import subprocess import yaml BOOTSTRAPPER_REGISTRY = "/opt/registries/kubeflow/kubeflow" CURRENT_RELEASE = "github.com/kubeflow/kubeflow/tree/v0.2.0-rc.1/kubeflow" DEFAULT_REGISTRY_NAME = "kubeflow" def main(): logging.basicConfig( level=logging.INF...
true
true
f7693123a2d1d1a97aca34ab9d0b2f3d15d4700e
365
py
Python
tbc/comedians/migrations/0006_remove_registercomedian_test_multi_field.py
bharathnr1/TBC
8aa98dd5509db31610ef1fc6826b32d5e8d8dbcb
[ "MIT" ]
null
null
null
tbc/comedians/migrations/0006_remove_registercomedian_test_multi_field.py
bharathnr1/TBC
8aa98dd5509db31610ef1fc6826b32d5e8d8dbcb
[ "MIT" ]
null
null
null
tbc/comedians/migrations/0006_remove_registercomedian_test_multi_field.py
bharathnr1/TBC
8aa98dd5509db31610ef1fc6826b32d5e8d8dbcb
[ "MIT" ]
null
null
null
# Generated by Django 2.2.1 on 2019-10-27 08:55 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comedians', '0005_registercomedian_test_multi_field'), ] operations = [ migrations.RemoveField( model_name='registercomedian', ...
20.277778
64
0.632877
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('comedians', '0005_registercomedian_test_multi_field'), ] operations = [ migrations.RemoveField( model_name='registercomedian', name='test_multi_field', ), ]
true
true
f7693184f3a554d21a9db53ab45aaa54369a7995
4,077
py
Python
src/robot_control/nodes/goto_xy.py
cedricpradalier/vrep_ros_ws
ebb4019f458954d4f524019c4ec7a60043557b13
[ "BSD-3-Clause" ]
null
null
null
src/robot_control/nodes/goto_xy.py
cedricpradalier/vrep_ros_ws
ebb4019f458954d4f524019c4ec7a60043557b13
[ "BSD-3-Clause" ]
null
null
null
src/robot_control/nodes/goto_xy.py
cedricpradalier/vrep_ros_ws
ebb4019f458954d4f524019c4ec7a60043557b13
[ "BSD-3-Clause" ]
1
2016-08-08T23:48:36.000Z
2016-08-08T23:48:36.000Z
#!/usr/bin/env ipython import roslib roslib.load_manifest('robot_control') import rospy import tf from geometry_msgs.msg import Twist, PoseStamped, PointStamped from visualization_msgs.msg import Marker import message_filters from math import atan2, hypot, pi, cos, sin, pi, fmod, exp from tf.transformations import eul...
38.102804
111
0.61663
import roslib roslib.load_manifest('robot_control') import rospy import tf from geometry_msgs.msg import Twist, PoseStamped, PointStamped from visualization_msgs.msg import Marker import message_filters from math import atan2, hypot, pi, cos, sin, pi, fmod, exp from tf.transformations import euler_from_quaternion from...
false
true
f769320a2396642c8170373c093b173ba1e29f6d
3,711
py
Python
tests/test_encode.py
yashtailor/preprocessy
015b4653ef064e3c4db5884aa1b6d1b098383055
[ "MIT" ]
30
2020-10-05T05:39:27.000Z
2022-03-30T04:17:55.000Z
tests/test_encode.py
yashtailor/preprocessy
015b4653ef064e3c4db5884aa1b6d1b098383055
[ "MIT" ]
38
2020-12-05T14:50:47.000Z
2022-03-30T09:58:11.000Z
tests/test_encode.py
yashtailor/preprocessy
015b4653ef064e3c4db5884aa1b6d1b098383055
[ "MIT" ]
16
2020-10-05T18:42:33.000Z
2022-03-28T07:08:48.000Z
from collections import Counter import pandas as pd import pytest from preprocessy.encoding import Encoder ord_dict = {"Profession": {"Student": 1, "Teacher": 2, "HOD": 3}} # test for empty input def test_empty_df(): params = {"target_label": "Price", "ord_dict": ord_dict} with pytest.raises(ValueError): ...
28.328244
73
0.627055
from collections import Counter import pandas as pd import pytest from preprocessy.encoding import Encoder ord_dict = {"Profession": {"Student": 1, "Teacher": 2, "HOD": 3}} def test_empty_df(): params = {"target_label": "Price", "ord_dict": ord_dict} with pytest.raises(ValueError): encoder = Encoder...
true
true
f76933467c9a8561bf3448aebd23bcc0adb4a336
1,040
py
Python
classifier/migrations/0001_initial.py
cahya-wirawan/opentc_web
fa74c49f3f2b1a74624deca912f7da87afdc7e1b
[ "MIT" ]
1
2017-05-23T18:48:52.000Z
2017-05-23T18:48:52.000Z
classifier/migrations/0001_initial.py
cahya-wirawan/opentc-web
fa74c49f3f2b1a74624deca912f7da87afdc7e1b
[ "MIT" ]
null
null
null
classifier/migrations/0001_initial.py
cahya-wirawan/opentc-web
fa74c49f3f2b1a74624deca912f7da87afdc7e1b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-16 11:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Classes'...
30.588235
114
0.573077
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Classes', fields=[ ('id', models.AutoField(auto_cre...
true
true
f76933a2bd309d7dc37d6cab11ab0504450635a3
20,971
py
Python
lib-src/lv2/lv2/waflib/Build.py
Marcusz97/CILP_Facilitatore_Audacity
fe7f59365317ce425abbaa79c973e931232c8680
[ "CC-BY-3.0" ]
24
2015-01-22T13:55:17.000Z
2021-06-25T09:41:19.000Z
lib-src/lv2/lv2/waflib/Build.py
Marcusz97/CILP_Facilitatore_Audacity
fe7f59365317ce425abbaa79c973e931232c8680
[ "CC-BY-3.0" ]
2
2019-01-13T23:12:26.000Z
2019-02-03T08:07:29.000Z
lib-src/lv2/lv2/waflib/Build.py
Marcusz97/CILP_Facilitatore_Audacity
fe7f59365317ce425abbaa79c973e931232c8680
[ "CC-BY-3.0" ]
14
2015-01-12T23:13:35.000Z
2021-01-16T09:02:41.000Z
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,errno,re,shutil try: import cPickle except ImportError: import pickle as cPickle from waflib import Runner,TaskGen,Utils,ConfigSet,Task,Logs,Options,Context,Er...
27.629776
115
0.69124
import os,sys,errno,re,shutil try: import cPickle except ImportError: import pickle as cPickle from waflib import Runner,TaskGen,Utils,ConfigSet,Task,Logs,Options,Context,Errors import waflib.Node CACHE_DIR='c4che' CACHE_SUFFIX='_cache.py' INSTALL=1337 UNINSTALL=-1337 SAVED_ATTRS='root node_deps raw_deps task_sigs'....
false
true
f76933c5447bb8e9d2c0a56a5aedeef00dfaf4eb
16,935
py
Python
mars/tensor/arithmetic/tests/test_arithmetic.py
hxri/mars
f7864f00911883b94800b63856f0e57648d3d9b4
[ "Apache-2.0" ]
1
2021-09-03T18:52:06.000Z
2021-09-03T18:52:06.000Z
mars/tensor/arithmetic/tests/test_arithmetic.py
hxri/mars
f7864f00911883b94800b63856f0e57648d3d9b4
[ "Apache-2.0" ]
null
null
null
mars/tensor/arithmetic/tests/test_arithmetic.py
hxri/mars
f7864f00911883b94800b63856f0e57648d3d9b4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
28.80102
132
0.615589
import numpy as np import pytest import scipy.sparse as sps from mars.core import enter_mode, tile from mars.tensor.datasource import array, ones, tensor, empty from mars.tensor.fetch import TensorFetch from mars.tensor.arithmetic import add, subtract, truediv, log, frexp, \ around, isclose, isfinite, negative, c...
true
true
f76933d772b8753e04d7acf8d3f92264b533dd62
2,232
py
Python
workloads/redis/redis.py
egernst/workload-collocation-agent
95f3d0de4cc4f67a98679daad8cebb18cb7c09f2
[ "Apache-2.0" ]
null
null
null
workloads/redis/redis.py
egernst/workload-collocation-agent
95f3d0de4cc4f67a98679daad8cebb18cb7c09f2
[ "Apache-2.0" ]
null
null
null
workloads/redis/redis.py
egernst/workload-collocation-agent
95f3d0de4cc4f67a98679daad8cebb18cb7c09f2
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
33.818182
102
0.575717
import os from common import application_host_ip, command, image_name, \ initContainers, json, securityContext, pod, volumeMounts, cpu_list communication_port = os.environ.get('communication_port', 11211) cmdline_config = ["sh", "-c", ("set -x && " "cd /prep_config && " ...
true
true
f76934699e82c6f55947196ff14f63b198faa333
867
py
Python
tools/c7n_azure/tests_azure/tests_resources/test_logic_app.py
vkubyshko/cloud-custodian
e5e3a0f8b5c85adcbec212d780b453047fb6f4d1
[ "Apache-2.0" ]
2,415
2018-12-04T00:37:58.000Z
2022-03-31T12:28:56.000Z
tools/c7n_azure/tests_azure/tests_resources/test_logic_app.py
vkubyshko/cloud-custodian
e5e3a0f8b5c85adcbec212d780b453047fb6f4d1
[ "Apache-2.0" ]
3,272
2018-12-03T23:58:17.000Z
2022-03-31T21:15:32.000Z
tools/c7n_azure/tests_azure/tests_resources/test_logic_app.py
vkubyshko/cloud-custodian
e5e3a0f8b5c85adcbec212d780b453047fb6f4d1
[ "Apache-2.0" ]
773
2018-12-06T09:43:23.000Z
2022-03-30T20:44:43.000Z
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from ..azure_common import BaseTest class LogicAppTest(BaseTest): def test_azure_logic_app_workflow_schema_validate(self): p = self.load_policy({ 'name': 'test-azure-logic-app-workflow', 'resource': 'azu...
32.111111
60
0.554787
from ..azure_common import BaseTest class LogicAppTest(BaseTest): def test_azure_logic_app_workflow_schema_validate(self): p = self.load_policy({ 'name': 'test-azure-logic-app-workflow', 'resource': 'azure.logic-app-workflow' }, validate=True) self.assertTrue(p) ...
true
true
f769349136cc1c0b3dc5be9e44d4a5e186f2a39f
7,253
py
Python
fluid/PaddleCV/video/metrics/metrics_util.py
kuke/models
b610d1654fa1d728fe2171fb02ee47497942fe24
[ "Apache-2.0" ]
1
2019-04-03T06:57:06.000Z
2019-04-03T06:57:06.000Z
fluid/PaddleCV/video/metrics/metrics_util.py
ThinkPeace/models
5d25e00c94943e50e64780a244136f88f13c0a88
[ "Apache-2.0" ]
null
null
null
fluid/PaddleCV/video/metrics/metrics_util.py
ThinkPeace/models
5d25e00c94943e50e64780a244136f88f13c0a88
[ "Apache-2.0" ]
1
2018-12-13T02:46:05.000Z
2018-12-13T02:46:05.000Z
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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...
36.817259
106
0.614504
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import print_function from __future__ import division import logging import numpy as np from metrics.youtube8m import eval_util as youtube8m_metrics from metrics.kinetics import accuracy_metrics as kinetics_metrics from me...
true
true
f76934aa09e0ed997481fb07ef88858007313357
10,983
py
Python
security/security_test.py
adp162/alexa-vera-bridge
35d2d6a4058e2b165303fff19258e9e5dc3e9c87
[ "MIT" ]
13
2016-03-04T00:17:23.000Z
2020-04-23T12:46:04.000Z
security/security_test.py
adp162/alexa-vera-bridge
35d2d6a4058e2b165303fff19258e9e5dc3e9c87
[ "MIT" ]
5
2016-01-06T00:56:10.000Z
2017-03-21T06:45:55.000Z
security/security_test.py
adp162/alexa-vera-bridge
35d2d6a4058e2b165303fff19258e9e5dc3e9c87
[ "MIT" ]
4
2016-01-06T20:09:40.000Z
2019-01-16T20:41:21.000Z
#!/usr/bin/python import base64 import time import socket import ssl import threading import pprint import sys import pkgutil import os # Global variables BASE_PATH='./sample' CA_PATH = BASE_PATH + '/rootCA.pem' PORT = 3000 HOST = 'localhost' # Function that configures and starts the server def start_server(securit...
34.003096
97
0.611308
import base64 import time import socket import ssl import threading import pprint import sys import pkgutil import os BASE_PATH='./sample' CA_PATH = BASE_PATH + '/rootCA.pem' PORT = 3000 HOST = 'localhost' def start_server(security, lock): SERVER_CERT_PATH = BASE_PATH + '/server.crt' SERVER_KEY_PATH = ...
false
true
f7693508901edb839b08168db5d503d4740ccdf3
16,127
py
Python
experiments/GIB_node_exp.py
snap-stanford/GIB
a5b625c38f65feda0413eba81b2ccf5dac8f1a98
[ "MIT" ]
81
2020-10-28T01:58:56.000Z
2022-03-26T16:47:36.000Z
experiments/GIB_node_exp.py
holywaters/GIB
a5b625c38f65feda0413eba81b2ccf5dac8f1a98
[ "MIT" ]
2
2020-12-09T12:50:39.000Z
2021-12-07T23:30:28.000Z
experiments/GIB_node_exp.py
holywaters/GIB
a5b625c38f65feda0413eba81b2ccf5dac8f1a98
[ "MIT" ]
20
2020-10-22T21:51:18.000Z
2022-03-13T06:18:50.000Z
#!/usr/bin/env python # coding: utf-8 # In[1]: """Script for experiments with standard learning with GNNs (including GIB-GAT, GAT, GCN and other baselines.)""" import argparse from copy import deepcopy import datetime import matplotlib.pylab as plt import numpy as np import pickle import torch import torch.nn as nn ...
52.702614
214
0.672165
import argparse from copy import deepcopy import datetime import matplotlib.pylab as plt import numpy as np import pickle import torch import torch.nn as nn import torch.nn.functional as F import sys, os sys.path.append(os.path.join(os.path.dirname("__file__"), '..')) sys.path.append(os.path.join(os.path.dirname("_...
true
true
f76935cde1ff06fde799939718813e96a9cf5717
6,691
py
Python
nitro/resource/config/ica/icapolicy_icaglobal_binding.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
2
2020-08-24T18:04:22.000Z
2020-08-24T18:04:47.000Z
nitro/resource/config/ica/icapolicy_icaglobal_binding.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
null
null
null
nitro/resource/config/ica/icapolicy_icaglobal_binding.py
HanseMerkur/nitro-python
d03eb11f492a35a2a8b2a140322fbce22d25a8f7
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
30.552511
138
0.593932
from nitro.resource.base.base_resource import base_resource from nitro.resource.base.base_resource import base_response from nitro.service.options import options from nitro.exception.nitro_exception import nitro_exception from nitro.util.nitro_util import nitro_util class icapolicy_icaglobal_binding(base_resource) :...
true
true
f769378aa07511bc0368860f65778184036362fc
3,735
py
Python
tests/utils/test_headers.py
goodboy/pulsar
e4b42d94b7e262a165782747d65f8b39fb8d3ba9
[ "BSD-3-Clause" ]
1
2020-11-30T07:36:57.000Z
2020-11-30T07:36:57.000Z
tests/utils/test_headers.py
goodboy/pulsar
e4b42d94b7e262a165782747d65f8b39fb8d3ba9
[ "BSD-3-Clause" ]
null
null
null
tests/utils/test_headers.py
goodboy/pulsar
e4b42d94b7e262a165782747d65f8b39fb8d3ba9
[ "BSD-3-Clause" ]
null
null
null
import unittest from pulsar.utils.httpurl import Headers, SimpleCookie class TestHeaders(unittest.TestCase): def testServerHeader(self): h = Headers() self.assertEqual(len(h), 0) h['content-type'] = 'text/html' self.assertEqual(len(h), 1) def testHeaderBytes(self): h...
38.112245
76
0.538153
import unittest from pulsar.utils.httpurl import Headers, SimpleCookie class TestHeaders(unittest.TestCase): def testServerHeader(self): h = Headers() self.assertEqual(len(h), 0) h['content-type'] = 'text/html' self.assertEqual(len(h), 1) def testHeaderBytes(self): h...
true
true
f769386e0e47f88ed47a3240087bed14ae6f7036
93,333
py
Python
ouroboros/urllib/request.py
mewbak/ouroboros
a29123c6fab6a807caffbb7587cf548e0c370296
[ "PSF-2.0" ]
205
2016-01-23T12:26:37.000Z
2019-03-29T16:13:46.000Z
ouroboros/urllib/request.py
mewbak/ouroboros
a29123c6fab6a807caffbb7587cf548e0c370296
[ "PSF-2.0" ]
38
2017-01-20T15:08:55.000Z
2020-01-27T09:17:07.000Z
ouroboros/urllib/request.py
mewbak/ouroboros
a29123c6fab6a807caffbb7587cf548e0c370296
[ "PSF-2.0" ]
50
2016-01-23T11:58:16.000Z
2019-03-01T18:13:21.000Z
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
36.175581
107
0.575638
# that hash algo that requested in the challenge, it would be good to # pass that information along to the client, too. # ftp errors aren't handled cleanly import base64 import bisect import email import hashlib import http.client import io import os import posixpath import re import socket import sys import time im...
true
true
f769394708798af469040b12ab84e623dd7abbfb
765,442
py
Python
pcat/main.py
tdaylan/pcat
b5ed1b88cd87baf8af8ab0f4f75d93dfe28cdbb9
[ "MIT" ]
4
2017-05-15T23:49:56.000Z
2021-05-12T15:51:01.000Z
pcat/main.py
tdaylan/pcat
b5ed1b88cd87baf8af8ab0f4f75d93dfe28cdbb9
[ "MIT" ]
1
2017-09-10T12:11:58.000Z
2017-10-01T04:36:32.000Z
pcat/main.py
tdaylan/pcat
b5ed1b88cd87baf8af8ab0f4f75d93dfe28cdbb9
[ "MIT" ]
4
2016-12-21T18:37:38.000Z
2020-03-05T00:36:46.000Z
# plotting import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import seaborn as sns # numpy import numpy as np # scipy import scipy as sp import scipy.interpolate from scipy.special import erfinv, erf from scipy.stats import poisson as pss import scipy.fftpack import scipy.sparse # jit from numb...
47.243674
218
0.54315
import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt import seaborn as sns import numpy as np import scipy as sp import scipy.interpolate from scipy.special import erfinv, erf from scipy.stats import poisson as pss import scipy.fftpack import scipy.sparse from numba import jit import ctypes impo...
true
true
f769398e7f27e1661b41a215fb9c6746c31e5159
771
py
Python
streamlit_app.py
dataprofessor/st-write
5cbd8608824a9c16560c8746393292c17ce6a792
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
streamlit_app.py
dataprofessor/st-write
5cbd8608824a9c16560c8746393292c17ce6a792
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
streamlit_app.py
dataprofessor/st-write
5cbd8608824a9c16560c8746393292c17ce6a792
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import numpy as np import altair as alt import pandas as pd import streamlit as st st.header('st.write') # Example 1 st.subheader('Display text') st.write('Hello, *World!* :sunglasses:') # Example 2 st.subheader('Display numbers') st.write(1234) # Example 3 st.subheader('Display DataFrame') df = pd.DataFrame({ ...
21.416667
64
0.642023
import numpy as np import altair as alt import pandas as pd import streamlit as st st.header('st.write') st.subheader('Display text') st.write('Hello, *World!* :sunglasses:') st.subheader('Display numbers') st.write(1234) st.subheader('Display DataFrame') df = pd.DataFrame({ 'first column': [1, 2, 3, 4], ...
true
true
f76939a440555a3dc654f5665f94263815cfb575
9,474
py
Python
isi_sdk/models/cluster_version_node.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
isi_sdk/models/cluster_version_node.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
isi_sdk/models/cluster_version_node.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
27.381503
113
0.558898
from pprint import pformat from six import iteritems import re class ClusterVersionNode(object): def __init__(self): self.swagger_types = { 'build': 'str', 'error': 'str', 'id': 'int', 'lnn': 'int', 'release': 'str', 'revision': 'st...
true
true
f7693a120650f9cf2eca5abc358166ff81421a30
1,032
py
Python
actions/nodes_node_replication_id_schedule_now.py
nzlosh/stackstorm-proxmox
fc4388f0b62dd1d4a360e9542eb55dea387149f4
[ "Apache-2.0" ]
null
null
null
actions/nodes_node_replication_id_schedule_now.py
nzlosh/stackstorm-proxmox
fc4388f0b62dd1d4a360e9542eb55dea387149f4
[ "Apache-2.0" ]
null
null
null
actions/nodes_node_replication_id_schedule_now.py
nzlosh/stackstorm-proxmox
fc4388f0b62dd1d4a360e9542eb55dea387149f4
[ "Apache-2.0" ]
null
null
null
import json from packlib.base import ProxmoxAction class NodesNodeReplicationIdSchedule_nowAction(ProxmoxAction): """ Schedule replication job to start as soon as possible. """ def run(self, prox_id, node, profile_name=None): super().run(profile_name) # Only include non None argument...
33.290323
97
0.556202
import json from packlib.base import ProxmoxAction class NodesNodeReplicationIdSchedule_nowAction(ProxmoxAction): def run(self, prox_id, node, profile_name=None): super().run(profile_name) proxmox_kwargs = {} for api_arg in [ ["id", prox_id, "string"], ["n...
true
true
f7693b41918b6a6d58a86e0e7e8716cdf70de7df
428
py
Python
messenger/messenger.py
hferentschik/balena-sense
10a620cc76b573515b2628e0ad6dfce97363760e
[ "MIT" ]
null
null
null
messenger/messenger.py
hferentschik/balena-sense
10a620cc76b573515b2628e0ad6dfce97363760e
[ "MIT" ]
2
2022-01-14T22:05:17.000Z
2022-01-15T09:33:02.000Z
messenger/messenger.py
hferentschik/balena-sense-hat
10a620cc76b573515b2628e0ad6dfce97363760e
[ "MIT" ]
1
2022-01-14T18:18:52.000Z
2022-01-14T18:18:52.000Z
from flask import Flask from flask import request from sense_hat import SenseHat sense = SenseHat() sense.set_rotation(180) sense.clear() app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/display', methods=['POST']) def display(): data = request.get_json() message = ...
17.12
42
0.721963
from flask import Flask from flask import request from sense_hat import SenseHat sense = SenseHat() sense.set_rotation(180) sense.clear() app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/display', methods=['POST']) def display(): data = request.get_json() message = ...
true
true
f7693b9246e1e23cd5608160704563274acbac88
3,767
py
Python
RestApi/Python/RestApi_v2/SampleScripts/createSuperFlowStrikeList.py
yongzhou71/BreakingPoint
455e93dfb57db4fbb022fc6df3132c3f6f457379
[ "MIT" ]
null
null
null
RestApi/Python/RestApi_v2/SampleScripts/createSuperFlowStrikeList.py
yongzhou71/BreakingPoint
455e93dfb57db4fbb022fc6df3132c3f6f457379
[ "MIT" ]
null
null
null
RestApi/Python/RestApi_v2/SampleScripts/createSuperFlowStrikeList.py
yongzhou71/BreakingPoint
455e93dfb57db4fbb022fc6df3132c3f6f457379
[ "MIT" ]
null
null
null
""" createSuperFlowStrikeList.py Description: Create a Test Model from scratch. What this script does: - Login to BPS box - Create a new superflow from scratch - Add flow and actions to the new created superflow - Save the superflow - Edit parameters inside an action - Remove action ...
31.923729
179
0.683037
import time, sys, os sys.path.insert(0, (os.path.dirname(os.path.abspath(__file__)).replace('SampleScripts', 'Modules'))) from bpsRestPy import BPS, pp new_superflow_name = "CreatedSuperFlow" new_strikeList_name = "CreatedStrikeList" chassis_ip = "10.36.18.44" bps_session = BPS(chassis_ip, 'admin', 'adm...
true
true
f7693ba086cd72797366a5e5e74a4b6838f56c38
11,565
py
Python
sahara/plugins/mapr/base/base_cluster_context.py
mapr/sahara
e08fce3c7e1833b44a47838bbe8de26bb21bff16
[ "Apache-2.0" ]
1
2022-02-25T19:14:33.000Z
2022-02-25T19:14:33.000Z
sahara/plugins/mapr/base/base_cluster_context.py
mapr/sahara
e08fce3c7e1833b44a47838bbe8de26bb21bff16
[ "Apache-2.0" ]
null
null
null
sahara/plugins/mapr/base/base_cluster_context.py
mapr/sahara
e08fce3c7e1833b44a47838bbe8de26bb21bff16
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015, MapR Technologies # # 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...
35.151976
79
0.665716
import collections import logging from oslo.config import cfg import sahara.plugins.general.utils as u import sahara.plugins.mapr.abstract.cluster_context as cc import sahara.plugins.mapr.domain.distro as distro import sahara.plugins.mapr.domain.node_process as np import sahara.plugins.mapr.services.management.mana...
true
true
f7693d24605ae341ccf7658dfae8dce928ea0e5d
281
py
Python
direzione/urls/conventions.py
andywar65/rp_repo
726c1426d738b962cabeabd8995aa35767df0c41
[ "BSD-2-Clause" ]
null
null
null
direzione/urls/conventions.py
andywar65/rp_repo
726c1426d738b962cabeabd8995aa35767df0c41
[ "BSD-2-Clause" ]
null
null
null
direzione/urls/conventions.py
andywar65/rp_repo
726c1426d738b962cabeabd8995aa35767df0c41
[ "BSD-2-Clause" ]
null
null
null
from django.urls import path from direzione.views import (ConventionListView, ConventionDetailView, ) app_name = 'conventions' urlpatterns = [ path('', ConventionListView.as_view(), name = 'index'), path('<slug>/', ConventionDetailView.as_view(), name = 'detail'), ]
28.1
72
0.708185
from django.urls import path from direzione.views import (ConventionListView, ConventionDetailView, ) app_name = 'conventions' urlpatterns = [ path('', ConventionListView.as_view(), name = 'index'), path('<slug>/', ConventionDetailView.as_view(), name = 'detail'), ]
true
true
f7693dae1705c285fb2302112760f7a8e17eb091
1,246
py
Python
setup.py
bakugo1234/PyPasser
a7bae881b1bd92923edf343ab5bfcc1af88ec4b8
[ "MIT" ]
null
null
null
setup.py
bakugo1234/PyPasser
a7bae881b1bd92923edf343ab5bfcc1af88ec4b8
[ "MIT" ]
null
null
null
setup.py
bakugo1234/PyPasser
a7bae881b1bd92923edf343ab5bfcc1af88ec4b8
[ "MIT" ]
null
null
null
import pathlib from setuptools import find_packages, setup HERE = pathlib.Path(__file__).parent README = (HERE / "README.md").read_text(encoding='utf-8') requirements = [ 'requests<3.0,>=2.25.1', 'PySocks==1.7.1' ] setup( name='PyPasser', version='0.0.5', author='xHossein', license='MIT', ...
31.948718
111
0.656501
import pathlib from setuptools import find_packages, setup HERE = pathlib.Path(__file__).parent README = (HERE / "README.md").read_text(encoding='utf-8') requirements = [ 'requests<3.0,>=2.25.1', 'PySocks==1.7.1' ] setup( name='PyPasser', version='0.0.5', author='xHossein', license='MIT', ...
true
true
f7693e5f4ff2919940fcb02569a35190d09d8d55
106
py
Python
server/app.py
algoholics-ntua/Twister
1ee2a5fedeaa9a9a943a5a852beb03fcce237289
[ "MIT" ]
5
2020-09-13T14:00:43.000Z
2020-12-16T12:32:43.000Z
server/app.py
algoholics-ntua/Twister
1ee2a5fedeaa9a9a943a5a852beb03fcce237289
[ "MIT" ]
null
null
null
server/app.py
algoholics-ntua/Twister
1ee2a5fedeaa9a9a943a5a852beb03fcce237289
[ "MIT" ]
null
null
null
from flask import Flask app = Flask(__name__) if __name__ == "__main__": app.run( debug = True )
17.666667
27
0.650943
from flask import Flask app = Flask(__name__) if __name__ == "__main__": app.run( debug = True )
true
true
f7693e869f8d03d1cf7e2e2a51c2ddab16b107e4
1,473
py
Python
cmsplugin_cascade/migrations/0024_page_icon_font.py
aDENTinTIME/djangocms-cascade
c38c1c5ad052dbe233b50fb833ad8e9a919014f2
[ "MIT" ]
null
null
null
cmsplugin_cascade/migrations/0024_page_icon_font.py
aDENTinTIME/djangocms-cascade
c38c1c5ad052dbe233b50fb833ad8e9a919014f2
[ "MIT" ]
null
null
null
cmsplugin_cascade/migrations/0024_page_icon_font.py
aDENTinTIME/djangocms-cascade
c38c1c5ad052dbe233b50fb833ad8e9a919014f2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-09 19:52 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from cmsplugin_cascade.models import CascadeElement, CascadePage, IconFont def forwards(apps, schema_editor): for cascade_ele...
33.477273
188
0.679566
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from cmsplugin_cascade.models import CascadeElement, CascadePage, IconFont def forwards(apps, schema_editor): for cascade_element in CascadeElement.objects.all(): if cascade_element.plugin_ty...
true
true
f769404eddfcbbbe617029d922c00041e1c97b24
286
py
Python
src/main/python/main.py
kingofdevs/rn-lbry-wallet-video-app
f6a0d319d4ed45eefd6f3d068de2fcce811b9dba
[ "MIT" ]
4
2019-07-09T17:50:46.000Z
2019-12-07T08:37:58.000Z
src/main/python/main.py
funnyjerry/react-native-lbry-wallet-video-app
f6a0d319d4ed45eefd6f3d068de2fcce811b9dba
[ "MIT" ]
4
2020-07-17T01:37:37.000Z
2020-07-21T14:21:08.000Z
src/main/python/main.py
funnyjerry/react-native-lbry-wallet-video-app
f6a0d319d4ed45eefd6f3d068de2fcce811b9dba
[ "MIT" ]
null
null
null
__version__ = "0.7.0" class ServiceApp(App): def build(self): from jnius import autoclass Intent = autoclass('android.content.Intent') LbrynetService = autoclass('io.lbry.browser.LbrynetService') if __name__ == '__main__': ServiceApp().run()
22
68
0.643357
__version__ = "0.7.0" class ServiceApp(App): def build(self): from jnius import autoclass Intent = autoclass('android.content.Intent') LbrynetService = autoclass('io.lbry.browser.LbrynetService') if __name__ == '__main__': ServiceApp().run()
true
true
f76940807a337265a8b8de1270146abdeb79cee8
203
py
Python
site/test_api.py
Lednik7/neuroeneft
48a3930948a2ff25b2a30dea7f3ffbdec684cac6
[ "MIT" ]
2
2021-03-21T18:07:28.000Z
2022-01-23T10:18:21.000Z
site/test_api.py
Lednik7/neuroeneft
48a3930948a2ff25b2a30dea7f3ffbdec684cac6
[ "MIT" ]
null
null
null
site/test_api.py
Lednik7/neuroeneft
48a3930948a2ff25b2a30dea7f3ffbdec684cac6
[ "MIT" ]
1
2020-09-19T14:14:03.000Z
2020-09-19T14:14:03.000Z
from api_client import NeuroeneftAPI api = NeuroeneftAPI(API_URL='http://127.0.0.1:10000') print(api.get_predprice_for_date("2020-10-10")) print(api.get_predprice_for_period("2020-10-10", "2020-11-10"))
40.6
63
0.773399
from api_client import NeuroeneftAPI api = NeuroeneftAPI(API_URL='http://127.0.0.1:10000') print(api.get_predprice_for_date("2020-10-10")) print(api.get_predprice_for_period("2020-10-10", "2020-11-10"))
true
true
f76940f0c8109ec423b70b0b61ae5e5db249753c
694
py
Python
njunmt/inference/reranking_model.py
zhengzx-nlp/NJUNMT-tf-server
d931021a39ebcd9b036fa612d69cf3876378e198
[ "Apache-2.0" ]
111
2017-12-29T12:48:02.000Z
2022-03-15T00:47:13.000Z
njunmt/inference/reranking_model.py
zhengzx-nlp/NJUNMT-tf-server
d931021a39ebcd9b036fa612d69cf3876378e198
[ "Apache-2.0" ]
3
2018-01-27T13:54:42.000Z
2020-03-02T03:07:19.000Z
njunmt/inference/reranking_model.py
zhaocq-nlp/NJUNMT-tf
f1440726b3c007bcf19126fc4dee43a91dccc718
[ "Apache-2.0" ]
44
2017-12-29T12:49:57.000Z
2022-02-02T13:25:28.000Z
# Copyright 2017 Natural Language Processing Group, Nanjing University, zhaocq.nlp@gmail.com. # # 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...
46.266667
93
0.76513
true
true
f769422d616b9fa6bc56fb663d98f11e6dd5fb56
465
py
Python
bin/translate_modules.py
Durburz/eMonitor
56f3b1fe39b9da3a12b49bdd60d0cfca51c23351
[ "BSD-3-Clause" ]
21
2015-03-04T11:36:47.000Z
2021-04-20T07:51:53.000Z
bin/translate_modules.py
Durburz/eMonitor
56f3b1fe39b9da3a12b49bdd60d0cfca51c23351
[ "BSD-3-Clause" ]
79
2015-01-04T21:35:49.000Z
2020-03-05T07:22:10.000Z
bin/translate_modules.py
Durburz/eMonitor
56f3b1fe39b9da3a12b49bdd60d0cfca51c23351
[ "BSD-3-Clause" ]
27
2015-03-04T11:36:48.000Z
2021-09-20T08:15:17.000Z
import os import sys if sys.platform == 'win32': pybabel = 'pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F bin/babel.cfg -k gettext -o emonitor\\modules\\translations\\modules.pot emonitor\\modules'...
38.75
142
0.696774
import os import sys if sys.platform == 'win32': pybabel = 'pybabel' else: pybabel = 'flask/bin/pybabel' if len(sys.argv) != 2: print "usage: tr_init <language-code>" sys.exit(1) os.system(pybabel + ' extract -F bin/babel.cfg -k gettext -o emonitor\\modules\\translations\\modules.pot emonitor\\modules'...
false
true
f76943625cbc5c6c90c1802364d45d69b9381869
3,546
py
Python
django/contrib/gis/gdal/libgdal.py
timgraham/django
22aab8662f0368b63f91f2526bdd0532524bc0fe
[ "PSF-2.0", "BSD-3-Clause" ]
19
2015-07-07T02:08:59.000Z
2021-11-08T11:05:40.000Z
django/contrib/gis/gdal/libgdal.py
timgraham/django
22aab8662f0368b63f91f2526bdd0532524bc0fe
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/gis/gdal/libgdal.py
timgraham/django
22aab8662f0368b63f91f2526bdd0532524bc0fe
[ "PSF-2.0", "BSD-3-Clause" ]
1
2015-07-31T17:05:33.000Z
2015-07-31T17:05:33.000Z
import logging import os import re from ctypes import CDLL, CFUNCTYPE, c_char_p, c_int from ctypes.util import find_library from django.contrib.gis.gdal.error import GDALException from django.core.exceptions import ImproperlyConfigured logger = logging.getLogger('django.contrib.gis') # Custom library path set? try: ...
28.596774
86
0.712352
import logging import os import re from ctypes import CDLL, CFUNCTYPE, c_char_p, c_int from ctypes.util import find_library from django.contrib.gis.gdal.error import GDALException from django.core.exceptions import ImproperlyConfigured logger = logging.getLogger('django.contrib.gis') try: from django.conf import...
true
true
f7694383dd7e90dd52da0f5b79f8b4335ba80078
84
py
Python
examples/switch_demo/switch_demo/__main__.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
1,261
2019-03-31T16:28:47.000Z
2022-03-31T09:01:23.000Z
examples/switch_demo/switch_demo/__main__.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
597
2019-04-02T20:02:42.000Z
2022-03-30T10:28:47.000Z
examples/switch_demo/switch_demo/__main__.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
318
2019-03-31T18:32:00.000Z
2022-03-30T18:07:13.000Z
from switch_demo.app import main if __name__ == '__main__': main().main_loop()
16.8
32
0.702381
from switch_demo.app import main if __name__ == '__main__': main().main_loop()
true
true
f76944ad61c418371ea218e4cf5af9b1220b4ab8
8,569
py
Python
villares_arcs_and_bars_pyp5js/target/villares_arcs_and_bars_pyp5js.py
villares/arc_tangents_and_bezier_studies
c7c8978c25286fdf20765e51c5f5cce1df62e410
[ "BSD-2-Clause" ]
11
2019-05-05T04:46:55.000Z
2022-03-20T02:36:04.000Z
villares_arcs_and_bars_pyp5js/target/villares_arcs_and_bars_pyp5js.py
villares/arc_tangents_and_bezier_studies
c7c8978c25286fdf20765e51c5f5cce1df62e410
[ "BSD-2-Clause" ]
null
null
null
villares_arcs_and_bars_pyp5js/target/villares_arcs_and_bars_pyp5js.py
villares/arc_tangents_and_bezier_studies
c7c8978c25286fdf20765e51c5f5cce1df62e410
[ "BSD-2-Clause" ]
null
null
null
from pyp5js import * """ Demo for bar and var_bar """ def setup(): size(400, 400) def draw(): background(200) fill(0) text("press any key to see p_arc polygonal aproximantion used", 20, 20) fill(0, 0, 200, 100) line(50, 50, 350, 250) if not keyIsPressed: # By def...
36.004202
94
0.545221
from pyp5js import * def setup(): size(400, 400) def draw(): background(200) fill(0) text("press any key to see p_arc polygonal aproximantion used", 20, 20) fill(0, 0, 200, 100) line(50, 50, 350, 250) if not keyIsPressed: bar(50, 50, 350, 250, 60, shorter=mo...
true
true
f76944c4c629ade5b1af8602fefc368586ccaa00
417
py
Python
MillerArrays/computeAllMillerIndicesASU.py
MooersLab/jupyterlabcctbxsnips
c5f0947b4e8c4e5839b9b6b15c81c62915103155
[ "MIT" ]
null
null
null
MillerArrays/computeAllMillerIndicesASU.py
MooersLab/jupyterlabcctbxsnips
c5f0947b4e8c4e5839b9b6b15c81c62915103155
[ "MIT" ]
null
null
null
MillerArrays/computeAllMillerIndicesASU.py
MooersLab/jupyterlabcctbxsnips
c5f0947b4e8c4e5839b9b6b15c81c62915103155
[ "MIT" ]
null
null
null
from cctbx import miller import cctbx from cctbx import crystal ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol="Fd-3m", unit_cell=("5.4307,5.4307,5.4307,90.00,90.0,90.00") ), anomalous_flag=False, d_min=0.4) for hkl in ms.indices(): print(hkl) # map the r...
21.947368
62
0.685851
from cctbx import miller import cctbx from cctbx import crystal ms = miller.build_set( crystal_symmetry=crystal.symmetry( space_group_symbol="Fd-3m", unit_cell=("5.4307,5.4307,5.4307,90.00,90.0,90.00") ), anomalous_flag=False, d_min=0.4) for hkl in ms.indices(): print(hkl) msu = ms...
true
true
f76944f5e656561ff0d249becacfecc7b54c6c46
132
py
Python
catalog/admin.py
mentatij/otus_catalog_dj
46bb1fc148bb436743d170176e5103282dfb6cc3
[ "MIT" ]
null
null
null
catalog/admin.py
mentatij/otus_catalog_dj
46bb1fc148bb436743d170176e5103282dfb6cc3
[ "MIT" ]
null
null
null
catalog/admin.py
mentatij/otus_catalog_dj
46bb1fc148bb436743d170176e5103282dfb6cc3
[ "MIT" ]
1
2022-02-23T15:18:17.000Z
2022-02-23T15:18:17.000Z
from django.contrib import admin from .models import Category, Product admin.site.register(Category) admin.site.register(Product)
18.857143
37
0.818182
from django.contrib import admin from .models import Category, Product admin.site.register(Category) admin.site.register(Product)
true
true
f76945b9c2fbe1af3f59d016dcaddc6fe55dc108
6,365
py
Python
pb_crawler.py
raskitoma/crawler_bot
5376904f1c92997b7284fbf44fc2e020f275ed61
[ "MIT" ]
null
null
null
pb_crawler.py
raskitoma/crawler_bot
5376904f1c92997b7284fbf44fc2e020f275ed61
[ "MIT" ]
null
null
null
pb_crawler.py
raskitoma/crawler_bot
5376904f1c92997b7284fbf44fc2e020f275ed61
[ "MIT" ]
null
null
null
############################################# # Plazabot - pb_crawler.py # (c)2021, Doubtfull Productions #-------------------------------------------- # Site crawler #-------------------------------------------- # TODO This script should round alongisde the API #-------------------------------------------- # Inclu...
45.141844
151
0.525687
import logging import time from pb_config import WAIT_TRY, WAIT_BETWEEN, LOG_URI, DEFAULT_URL, reload_config from pb_utl import stock_check, notifier, log_store, requests, str_to_bool from pb_string import * logging.getLogger().setLevel(logging.INFO) if __name__ == '__main__': found_something = False bo...
true
true
f76946044e36c57a8f33127e2b7dffb2b1b1feb9
6,791
py
Python
recipes/windnoise/model/CRN.py
wangwei2009/speechbrain
ebbac4561a9c9101786e0ab0b1105017eb655fc8
[ "Apache-2.0" ]
null
null
null
recipes/windnoise/model/CRN.py
wangwei2009/speechbrain
ebbac4561a9c9101786e0ab0b1105017eb655fc8
[ "Apache-2.0" ]
null
null
null
recipes/windnoise/model/CRN.py
wangwei2009/speechbrain
ebbac4561a9c9101786e0ab0b1105017eb655fc8
[ "Apache-2.0" ]
null
null
null
""" single channel speech enhancement for wind noise reduction. refer to "A Convolutional Recurrent Neural Network for Real-Time Speech Enhancement" . Authors * Wang Wei 2021 """ import torch import torch.nn as nn class CNN_Block(torch.nn.Module): def __init__(self, in_channels, out_channels...
31.009132
130
0.581799
import torch import torch.nn as nn class CNN_Block(torch.nn.Module): def __init__(self, in_channels, out_channels, kernel_size=[3, 3], stride=(1,2), padding=(1,0)) -> None: super().__init__() self.layers = torch.nn.ModuleList() self.layers.append(nn....
true
true