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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c4456f331c5f34771a86f26632a47558e095202
3,198
py
Python
systran_storages/bin/storages_cli.py
nguyendc-systran/storages
d31a18953ce9ce3d9b791f94b02837bfa156cb1a
[ "MIT" ]
null
null
null
systran_storages/bin/storages_cli.py
nguyendc-systran/storages
d31a18953ce9ce3d9b791f94b02837bfa156cb1a
[ "MIT" ]
1
2019-12-11T15:44:34.000Z
2019-12-11T15:44:34.000Z
systran_storages/bin/storages_cli.py
nguyenhn-systran/storages
d0f2a3b2b217313cca0980a43865811135e3f6a3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 from systran_storages import StorageClient import argparse import json import six import os import logging from datetime import datetime def resolvedpath(path): fields = path.split(':') if not len(fields) == 2 or not fields[1].startswith('/'): raise argparse.Arg...
38.071429
101
0.642276
from systran_storages import StorageClient import argparse import json import six import os import logging from datetime import datetime def resolvedpath(path): fields = path.split(':') if not len(fields) == 2 or not fields[1].startswith('/'): raise argparse.ArgumentError("incorrect storage path: %s...
true
true
1c44575a4ea6fbb81f6c44d4ca1a80d7726a22b8
3,002
py
Python
research/rebar/download_data.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
82,518
2016-02-05T12:07:23.000Z
2022-03-31T23:09:47.000Z
research/rebar/download_data.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
9,021
2016-03-08T01:02:05.000Z
2022-03-31T08:06:35.000Z
research/rebar/download_data.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
54,341
2016-02-06T17:19:55.000Z
2022-03-31T10:27:44.000Z
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
33.355556
116
0.70453
from __future__ import absolute_import from __future__ import division from __future__ import print_function import urllib import gzip import os import config import struct import numpy as np import cPickle as pickle import datasets MNIST_URL = 'see README' MNIST_BINARIZED_URL = 'see README' OMNIGLOT_URL = 'see REA...
true
true
1c44589d3c730e035ab6ff91365665923d59240b
241
py
Python
gc.py
rundekugel/micropythonemu
d135f7389f1f13fe33dda58778958ea74680fdbc
[ "MIT" ]
null
null
null
gc.py
rundekugel/micropythonemu
d135f7389f1f13fe33dda58778958ea74680fdbc
[ "MIT" ]
null
null
null
gc.py
rundekugel/micropythonemu
d135f7389f1f13fe33dda58778958ea74680fdbc
[ "MIT" ]
null
null
null
# dummy lib """ dummy library gc to emulate esp8266 micropython on a PC with python3 uncomplete 2022 by lifesim.de """ from gc import * def mem_alloc(): return 1000 def mem_free(): return -1 def threshold(a): return -1 #eof
12.05
68
0.684647
from gc import * def mem_alloc(): return 1000 def mem_free(): return -1 def threshold(a): return -1
true
true
1c4459fbff634a63bf3eb4a631d67077bb257f72
5,415
py
Python
zerver/tests/test_realm_filters.py
kenclary/zulip
0267ba54b286a783dbde9a31d8ee2a0971671f73
[ "Apache-2.0" ]
2
2021-09-01T17:44:28.000Z
2021-09-01T18:09:51.000Z
zerver/tests/test_realm_filters.py
kenclary/zulip
0267ba54b286a783dbde9a31d8ee2a0971671f73
[ "Apache-2.0" ]
1
2021-03-24T12:50:52.000Z
2021-03-24T13:11:42.000Z
zerver/tests/test_realm_filters.py
kenclary/zulip
0267ba54b286a783dbde9a31d8ee2a0971671f73
[ "Apache-2.0" ]
null
null
null
import re from zerver.lib.actions import do_add_realm_filter from zerver.lib.test_classes import ZulipTestCase from zerver.models import RealmFilter, get_realm class RealmFilterTest(ZulipTestCase): def test_list(self) -> None: self.login("iago") realm = get_realm("zulip") do_add_realm_fil...
46.282051
98
0.628994
import re from zerver.lib.actions import do_add_realm_filter from zerver.lib.test_classes import ZulipTestCase from zerver.models import RealmFilter, get_realm class RealmFilterTest(ZulipTestCase): def test_list(self) -> None: self.login("iago") realm = get_realm("zulip") do_add_realm_fil...
true
true
1c445a8d09e9a4ab77e1462718f5caec6da3dc69
1,404
py
Python
provy/more/centos/utils/hostname.py
timgates42/provy
ca3d5e96a2210daf3c1fd4b96e047efff152db14
[ "MIT" ]
15
2015-01-28T15:49:28.000Z
2021-09-02T18:49:46.000Z
provy/more/centos/utils/hostname.py
timgates42/provy
ca3d5e96a2210daf3c1fd4b96e047efff152db14
[ "MIT" ]
null
null
null
provy/more/centos/utils/hostname.py
timgates42/provy
ca3d5e96a2210daf3c1fd4b96e047efff152db14
[ "MIT" ]
3
2016-12-05T07:08:11.000Z
2021-12-26T04:31:05.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Roles in this namespace are meant to provide hostname utilities methods within CentOS distributions. ''' from fabric.contrib.files import sed from fabric.api import settings, hide from provy.core import Role class HostNameRole(Role): def ensure_hostname(self, hostna...
27
100
0.590456
from fabric.contrib.files import sed from fabric.api import settings, hide from provy.core import Role class HostNameRole(Role): def ensure_hostname(self, hostname): if hostname == self.execute('hostname'): return False path = '/etc/sysconfig/network' file = self.read_rem...
true
true
1c445ac0474100a6d6ada83425a4ce570d51ea83
17,999
py
Python
csdmpy/helper_functions.py
DeepanshS/csdmpy
ae8d20dd09f217bb462af67a3145bb6fcb025def
[ "BSD-3-Clause" ]
7
2020-01-04T20:46:08.000Z
2021-05-26T21:09:25.000Z
csdmpy/helper_functions.py
deepanshs/csdmpy
bd4e138b10694491113b10177a89305697f1752c
[ "BSD-3-Clause" ]
16
2021-06-09T06:28:27.000Z
2022-03-01T18:12:33.000Z
csdmpy/helper_functions.py
deepanshs/csdmpy
bd4e138b10694491113b10177a89305697f1752c
[ "BSD-3-Clause" ]
1
2020-01-03T17:04:16.000Z
2020-01-03T17:04:16.000Z
# -*- coding: utf-8 -*- """Helper functions.""" from copy import deepcopy from warnings import warn import matplotlib.projections as proj import matplotlib.pyplot as plt import numpy as np from matplotlib.image import NonUniformImage __author__ = "Deepansh J. Srivastava" __email__ = "srivastava.89@osu.edu" scalar =...
32.198569
88
0.583755
from copy import deepcopy from warnings import warn import matplotlib.projections as proj import matplotlib.pyplot as plt import numpy as np from matplotlib.image import NonUniformImage __author__ = "Deepansh J. Srivastava" __email__ = "srivastava.89@osu.edu" scalar = ["scalar", "vector_1", "pixel_1", "matrix_1_1",...
true
true
1c445c09aba76bb2eb69badc9bf601edb0a0fe02
6,321
py
Python
build/PureCloudPlatformClientV2/models/dialer_contactlist_config_change_contact_phone_number_column.py
cjohnson-ctl/platform-client-sdk-python
38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100
[ "MIT" ]
10
2019-02-22T00:27:08.000Z
2021-09-12T23:23:44.000Z
libs/PureCloudPlatformClientV2/models/dialer_contactlist_config_change_contact_phone_number_column.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
5
2018-06-07T08:32:00.000Z
2021-07-28T17:37:26.000Z
libs/PureCloudPlatformClientV2/models/dialer_contactlist_config_change_contact_phone_number_column.py
rocketbot-cl/genesysCloud
dd9d9b5ebb90a82bab98c0d88b9585c22c91f333
[ "MIT" ]
6
2020-04-09T17:43:07.000Z
2022-02-17T08:48:05.000Z
# 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...
30.244019
126
0.63376
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class DialerContactlistConfigChangeContactPhoneNumberColumn(object): def __init__(self): self.swagger_types = { 'column_name': 'str', 'type': 'str', ...
true
true
1c445c41e477e8613eedb82276ff8ae651e83f36
2,123
py
Python
stanCode_projects/boggle game solver/sierpinski.py
KevinCheng713/stanCode_project
0b2ba48be20c1737426d40eb941e8640b15acfe8
[ "MIT" ]
null
null
null
stanCode_projects/boggle game solver/sierpinski.py
KevinCheng713/stanCode_project
0b2ba48be20c1737426d40eb941e8640b15acfe8
[ "MIT" ]
null
null
null
stanCode_projects/boggle game solver/sierpinski.py
KevinCheng713/stanCode_project
0b2ba48be20c1737426d40eb941e8640b15acfe8
[ "MIT" ]
null
null
null
""" File: sierpinski.py Name: 鄭凱元 --------------------------- This file recursively prints the Sierpinski triangle on GWindow. The Sierpinski triangle is a fractal described in 1915 by Waclaw Sierpinski. It is a self similar structure that occurs at different levels of iterations. """ from campy.graphics.gwindow impor...
37.245614
104
0.747527
from campy.graphics.gwindow import GWindow from campy.graphics.gobjects import GLine from campy.gui.events.timer import pause ORDER = 6 LENGTH = 600 UPPER_LEFT_X = 150 UPPER_LEFT_Y = 100 WINDOW_WIDTH = 950 WINDOW_HEIGHT = 700 window = GWindow(width=WINDOW_WID...
true
true
1c445c8ccc4933db31ddfcff4f2af668f7348e6b
12,255
py
Python
pyscf/pbc/cc/eom_kccsd_rhf_ip.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
2
2019-05-28T05:25:56.000Z
2019-11-09T02:16:43.000Z
pyscf/pbc/cc/eom_kccsd_rhf_ip.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
2
2019-09-16T17:58:31.000Z
2019-09-22T17:26:01.000Z
pyscf/pbc/cc/eom_kccsd_rhf_ip.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
1
2019-11-09T02:13:16.000Z
2019-11-09T02:13:16.000Z
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
38.416928
115
0.548919
from pyscf.lib import logger, linalg_helper, einsum from pyscf.lib.parameters import LARGE_DENOM from pyscf.pbc.lib.kpts_helper import VectorSplitter, VectorComposer from pyscf.pbc.mp.kmp2 import padding_k_idx import numpy as np import time def iter_12(cc, k): o, v = padding_k_idx(cc, kind="split") kconse...
true
true
1c445cab1f264bc0cde511b0887a73c7ef7e0b55
2,571
py
Python
dizoo/smac/config/smac_10m11m_masac_config.py
davide97l/DI-engine
d48c93bcd5c07c29f2ce4ac1b7756b8bc255c423
[ "Apache-2.0" ]
1
2022-03-21T16:15:39.000Z
2022-03-21T16:15:39.000Z
dizoo/smac/config/smac_10m11m_masac_config.py
jiaruonan/DI-engine
268d77db3cb54401b2cfc83e2bc3ec87c31e7b83
[ "Apache-2.0" ]
null
null
null
dizoo/smac/config/smac_10m11m_masac_config.py
jiaruonan/DI-engine
268d77db3cb54401b2cfc83e2bc3ec87c31e7b83
[ "Apache-2.0" ]
null
null
null
from easydict import EasyDict agent_num = 10 collector_env_num = 8 evaluator_env_num = 8 special_global_state = True SMAC_10m11m_masac_default_config = dict( exp_name='smac_10m11m_masac_seed0', env=dict( map_name='10m_vs_11m', difficulty=7, reward_only_positive=True, mirror_opp...
27.063158
91
0.597044
from easydict import EasyDict agent_num = 10 collector_env_num = 8 evaluator_env_num = 8 special_global_state = True SMAC_10m11m_masac_default_config = dict( exp_name='smac_10m11m_masac_seed0', env=dict( map_name='10m_vs_11m', difficulty=7, reward_only_positive=True, mirror_opp...
true
true
1c445d0779c6f3b76f6736904e9cf3bc52dc1ec8
906
py
Python
paddleseg/models/layers/__init__.py
JamesLim-sy/PaddleSeg
f8cfb80f543a52599d1588026e71f069b702b781
[ "Apache-2.0" ]
4,708
2019-08-26T13:54:39.000Z
2022-03-31T16:01:53.000Z
paddleseg/models/layers/__init__.py
JamesLim-sy/PaddleSeg
f8cfb80f543a52599d1588026e71f069b702b781
[ "Apache-2.0" ]
1,083
2019-09-12T02:57:24.000Z
2022-03-31T13:30:30.000Z
paddleseg/models/layers/__init__.py
JamesLim-sy/PaddleSeg
f8cfb80f543a52599d1588026e71f069b702b781
[ "Apache-2.0" ]
1,046
2019-08-26T22:05:01.000Z
2022-03-30T14:09:28.000Z
# 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 applic...
43.142857
110
0.791391
from .layer_libs import ConvBNReLU, ConvBN, SeparableConvBNReLU, DepthwiseConvBN, AuxLayer, SyncBatchNorm, JPU from .activation import Activation from .pyramid_pool import ASPPModule, PPModule from .attention import AttentionBlock from .nonlocal2d import NonLocal2D from .wrap_functions import *
true
true
1c445ea6c0a52c6c28514c9caff9783dfe75ea10
18,183
py
Python
tests/sc/test_scans.py
allenmichael/pyTenable
8372cfdf3ced99de50227f6fbb37d6db2b26291e
[ "MIT" ]
null
null
null
tests/sc/test_scans.py
allenmichael/pyTenable
8372cfdf3ced99de50227f6fbb37d6db2b26291e
[ "MIT" ]
null
null
null
tests/sc/test_scans.py
allenmichael/pyTenable
8372cfdf3ced99de50227f6fbb37d6db2b26291e
[ "MIT" ]
null
null
null
import pytest from tenable.errors import APIError, UnexpectedValueError from ..checker import check def test_schedule_constructor_type_typeerror(sc): with pytest.raises(TypeError): sc.scans._schedule_constructor({'type': 1}) def test_schedule_constructor_type_unexpected_value(sc): with pytest.raise...
32.644524
105
0.665512
import pytest from tenable.errors import APIError, UnexpectedValueError from ..checker import check def test_schedule_constructor_type_typeerror(sc): with pytest.raises(TypeError): sc.scans._schedule_constructor({'type': 1}) def test_schedule_constructor_type_unexpected_value(sc): with pytest.raise...
true
true
1c445eaf4b2ea2fc8a00bd7b0b9e80eef01719f8
1,179
py
Python
pytglib/api/functions/set_sticker_set_thumbnail.py
iTeam-co/pytglib
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
6
2019-10-30T08:57:27.000Z
2021-02-08T14:17:43.000Z
pytglib/api/functions/set_sticker_set_thumbnail.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
1
2021-08-19T05:44:10.000Z
2021-08-19T07:14:56.000Z
pytglib/api/functions/set_sticker_set_thumbnail.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
5
2019-12-04T05:30:39.000Z
2021-05-21T18:23:32.000Z
from ..utils import Object class SetStickerSetThumbnail(Object): """ Sets a sticker set thumbnail; for bots only. Returns the sticker set Attributes: ID (:obj:`str`): ``SetStickerSetThumbnail`` Args: user_id (:obj:`int`): Sticker set owner name (:obj:`str`): ...
28.756098
177
0.625106
from ..utils import Object class SetStickerSetThumbnail(Object): ID = "setStickerSetThumbnail" def __init__(self, user_id, name, thumbnail, extra=None, **kwargs): self.extra = extra self.user_id = user_id self.name = name self.thumbnail = thumbnail @staticmethod ...
true
true
1c445eb15f606a0339ceffedf26e0ebbcac914b2
1,036
py
Python
sagemaker-debugger/model_specific_realtime_analysis/cnn_class_activation_maps/entry_point/custom_hook.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,610
2020-10-01T14:14:53.000Z
2022-03-31T18:02:31.000Z
sagemaker-debugger/model_specific_realtime_analysis/cnn_class_activation_maps/entry_point/custom_hook.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
1,959
2020-09-30T20:22:42.000Z
2022-03-31T23:58:37.000Z
sagemaker-debugger/model_specific_realtime_analysis/cnn_class_activation_maps/entry_point/custom_hook.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,052
2020-09-30T22:11:46.000Z
2022-03-31T23:02:51.000Z
import smdebug.pytorch as smd import torch from smdebug.core.modes import ModeKeys class CustomHook(smd.Hook): # register input image for backward pass, to get image gradients def image_gradients(self, image): image.register_hook(self.backward_hook("image")) def forward_hook(self, module, inputs...
38.37037
103
0.696911
import smdebug.pytorch as smd import torch from smdebug.core.modes import ModeKeys class CustomHook(smd.Hook): def image_gradients(self, image): image.register_hook(self.backward_hook("image")) def forward_hook(self, module, inputs, outputs): module_name = self.module_maps[module] ...
true
true
1c445f46b78f84e0666b4e389bddb6811327d7dd
14,259
py
Python
doc/conf.py
sunilkrdeep/LearningApacheSpark
2aed1d06630eb17a5b6515658f15e29955a208bd
[ "MIT" ]
213
2017-09-25T05:49:50.000Z
2022-03-01T15:26:26.000Z
doc/conf.py
sunilkrdeep/LearningApacheSpark
2aed1d06630eb17a5b6515658f15e29955a208bd
[ "MIT" ]
4
2019-05-06T09:15:34.000Z
2021-10-15T07:47:40.000Z
doc/conf.py
sunilkrdeep/LearningApacheSpark
2aed1d06630eb17a5b6515658f15e29955a208bd
[ "MIT" ]
92
2019-03-03T23:17:24.000Z
2022-03-23T22:25:14.000Z
# -*- coding: utf-8 -*- ############################################################################# # I heavily borrowed, modified and used the configuration in conf.py of Theano # package project. I will keep all the comments from Theano team and the # coryright of this file belongs to Theano team. # reference: #...
37.822281
96
0.580125
# that aren't pickleable (module imports are okay, they're removed # automatically). # # All configuration values have a default value; values that are commented out # serve to show the default value. # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, ...
true
true
1c445f905b74048639cccb3e88f2f31191f6f596
151
py
Python
print_quotient.py
gsandoval49/stp
b56e778101d29732adc4629e101cccf290dcb9e9
[ "Apache-2.0" ]
null
null
null
print_quotient.py
gsandoval49/stp
b56e778101d29732adc4629e101cccf290dcb9e9
[ "Apache-2.0" ]
null
null
null
print_quotient.py
gsandoval49/stp
b56e778101d29732adc4629e101cccf290dcb9e9
[ "Apache-2.0" ]
null
null
null
# Create a program that takes two variables, divides them, # and prints the quotient. x = 42 y = 2 if x == 42: if y == 2: print (x // y)
15.1
58
0.576159
x = 42 y = 2 if x == 42: if y == 2: print (x // y)
true
true
1c4460629d5ab0bb165c86640050ec517f98b099
645
py
Python
.venv/bin/rst2pseudoxml.py
WealtHawk-prod/WH_Utils
713b464a4a0971c8d5bc9bebc2e68f129ec65a4c
[ "Apache-2.0" ]
null
null
null
.venv/bin/rst2pseudoxml.py
WealtHawk-prod/WH_Utils
713b464a4a0971c8d5bc9bebc2e68f129ec65a4c
[ "Apache-2.0" ]
null
null
null
.venv/bin/rst2pseudoxml.py
WealtHawk-prod/WH_Utils
713b464a4a0971c8d5bc9bebc2e68f129ec65a4c
[ "Apache-2.0" ]
null
null
null
#!/Users/mcclainthiel/Desktop/WH/WH_Utils2/.venv/bin/python3.9 # $Id: rst2pseudoxml.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing pseudo-XML. """ try: ...
26.875
73
0.744186
try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline, default_description description = ('Generates pseudo-XML from standalone reStructuredText ' 'sources (for testing purposes). ' + default_description) publish_cmdline(descript...
true
true
1c4460c9572f72b3583be0b06bb5fb540edd3e8f
6,720
py
Python
std/pytorch/02-mid/05.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
std/pytorch/02-mid/05.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
std/pytorch/02-mid/05.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
import gym import math import random import numpy as np import matplotlib import matplotlib.pyplot as plt from collections import namedtuple, deque from itertools import count from PIL import Image import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torchvision.transfo...
29.217391
94
0.67381
import gym import math import random import numpy as np import matplotlib import matplotlib.pyplot as plt from collections import namedtuple, deque from itertools import count from PIL import Image import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torchvision.transfo...
true
true
1c44615358567d6477f3746171bffef3935d9cc3
36,393
py
Python
tools/serve/serve.py
karlcow/wpt
e48be6d08b272744fe6d1d28e91a5808cf92fb68
[ "BSD-3-Clause" ]
null
null
null
tools/serve/serve.py
karlcow/wpt
e48be6d08b272744fe6d1d28e91a5808cf92fb68
[ "BSD-3-Clause" ]
null
null
null
tools/serve/serve.py
karlcow/wpt
e48be6d08b272744fe6d1d28e91a5808cf92fb68
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function import abc import argparse import json import logging import os import platform import signal import socket import subprocess import sys import threading import time import traceback from six.moves import urllib import uuid from collections import defaultd...
35.890533
141
0.577666
from __future__ import print_function import abc import argparse import json import logging import os import platform import signal import socket import subprocess import sys import threading import time import traceback from six.moves import urllib import uuid from collections import defaultdict, OrderedDict from it...
true
true
1c44615cab2746c171e94d3955b5d0b53fc86e1b
1,605
py
Python
Vision/oneflow_face/utils/losses.py
mls1999725/models
77b3a9d727cb7cf3a14a75d8fdb0d17bb411bd02
[ "Apache-2.0" ]
43
2021-06-03T09:07:08.000Z
2022-03-31T15:21:48.000Z
Vision/oneflow_face/utils/losses.py
mls1999725/models
77b3a9d727cb7cf3a14a75d8fdb0d17bb411bd02
[ "Apache-2.0" ]
64
2021-05-31T10:34:06.000Z
2022-01-17T03:44:58.000Z
Vision/oneflow_face/utils/losses.py
mls1999725/models
77b3a9d727cb7cf3a14a75d8fdb0d17bb411bd02
[ "Apache-2.0" ]
37
2021-07-04T03:13:18.000Z
2022-03-25T07:30:47.000Z
import oneflow as flow from oneflow import nn def get_loss(name): if name == "cosface": return CosFace() elif name == "arcface": return ArcFace() else: raise ValueError() class CrossEntropyLoss_sbp(nn.Module): def __init__(self): super(CrossEntropyLoss_sbp, self).__in...
25.078125
83
0.586293
import oneflow as flow from oneflow import nn def get_loss(name): if name == "cosface": return CosFace() elif name == "arcface": return ArcFace() else: raise ValueError() class CrossEntropyLoss_sbp(nn.Module): def __init__(self): super(CrossEntropyLoss_sbp, self).__in...
true
true
1c44621189b941c48d02923714b5af63f0aad611
9,678
py
Python
info/modules/news/views.py
wangjinyu124419/xinjing
205dd890b5d0baeae5935dfe24bd0208808e7e2b
[ "MIT" ]
null
null
null
info/modules/news/views.py
wangjinyu124419/xinjing
205dd890b5d0baeae5935dfe24bd0208808e7e2b
[ "MIT" ]
null
null
null
info/modules/news/views.py
wangjinyu124419/xinjing
205dd890b5d0baeae5935dfe24bd0208808e7e2b
[ "MIT" ]
null
null
null
import logging from flask import abort from flask import g from flask import request from flask import session, jsonify from info import constants, db from info import response_code from info.models import User, News,Comment, CommentLike from info.utils.comment import user_login_data from . import blue_news from flask...
29.238671
106
0.656851
import logging from flask import abort from flask import g from flask import request from flask import session, jsonify from info import constants, db from info import response_code from info.models import User, News,Comment, CommentLike from info.utils.comment import user_login_data from . import blue_news from flask...
true
true
1c44627afca4e7d3f07b38ceb7c7b9103a678669
1,590
py
Python
FluentPython/pythonic_object/vector2d.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
FluentPython/pythonic_object/vector2d.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
FluentPython/pythonic_object/vector2d.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- from array import array import math class Vector2d: __slots__ = ('__x', '__y') typecode = 'd' def __init__(self, x, y): self.__x = x self.__y = y def __repr__(self): class_name = type(self).__name__ return '{}({!r}, {...
22.714286
78
0.561635
from array import array import math class Vector2d: __slots__ = ('__x', '__y') typecode = 'd' def __init__(self, x, y): self.__x = x self.__y = y def __repr__(self): class_name = type(self).__name__ return '{}({!r}, {!r})'.format(class_name, *self) def __str__(...
true
true
1c4462df77242b80107f725e68f97cb39f16c436
1,408
py
Python
setup.py
penguinstampede/shippo-python-client
d21366d959d22ff301947072346479c287bf0f51
[ "MIT" ]
101
2015-10-10T18:44:36.000Z
2022-01-26T03:54:27.000Z
setup.py
penguinstampede/shippo-python-client
d21366d959d22ff301947072346479c287bf0f51
[ "MIT" ]
47
2015-08-07T21:13:50.000Z
2022-03-08T18:48:16.000Z
setup.py
penguinstampede/shippo-python-client
d21366d959d22ff301947072346479c287bf0f51
[ "MIT" ]
71
2015-10-31T01:54:09.000Z
2022-02-17T22:43:30.000Z
import os import sys import warnings from setuptools import setup version_contents = {} here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "shippo", "version.py"), encoding="utf-8") as f: exec(f.read(), version_contents) setup( name='shippo', version=version_contents['VERSION...
33.52381
77
0.620028
import os import sys import warnings from setuptools import setup version_contents = {} here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "shippo", "version.py"), encoding="utf-8") as f: exec(f.read(), version_contents) setup( name='shippo', version=version_contents['VERSION...
true
true
1c4462e887341137a81c3efd2fa98f4ce8952bfa
2,882
py
Python
tensorpack/models/layer_norm.py
myelintek/tensorpack
fcbf5869d78cf7f3b59c46318b6c883a7ea12056
[ "Apache-2.0" ]
3
2017-12-02T16:49:42.000Z
2018-11-04T16:53:44.000Z
tensorpack/models/layer_norm.py
dongzhuoyao/tensorpack
78bcf6053172075a761eac90ab22f0b631b272a0
[ "Apache-2.0" ]
6
2020-01-28T23:03:24.000Z
2022-02-10T01:21:18.000Z
tensorpack/models/layer_norm.py
wdings/Mask-RCNN
8d5ae5cc2cfcf2e4e53b4d1064ac9e727f736d09
[ "Apache-2.0" ]
5
2017-11-15T14:46:27.000Z
2018-11-04T16:54:06.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: layer_norm.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import tensorflow as tf from .common import layer_register __all__ = ['LayerNorm', 'InstanceNorm'] @layer_register() def LayerNorm(x, epsilon=1e-5, use_bias=True, use_scale=True, data_format='NHWC'): """...
33.126437
90
0.630812
import tensorflow as tf from .common import layer_register __all__ = ['LayerNorm', 'InstanceNorm'] @layer_register() def LayerNorm(x, epsilon=1e-5, use_bias=True, use_scale=True, data_format='NHWC'): shape = x.get_shape().as_list() ndims = len(shape) assert ndims in [2, 4] mean, var = tf.nn.moments...
true
true
1c4462e988a95308633ced6d419f8d86daa04317
6,331
py
Python
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py
santosh02iiit/azure-cli-extensions
24247cfa19e2a5894937f19e17fbdc8308b28ef6
[ "MIT" ]
1
2021-08-03T18:32:54.000Z
2021-08-03T18:32:54.000Z
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py
santosh02iiit/azure-cli-extensions
24247cfa19e2a5894937f19e17fbdc8308b28ef6
[ "MIT" ]
4
2020-09-07T12:56:24.000Z
2021-02-04T12:19:20.000Z
src/cosmosdb-preview/azext_cosmosdb_preview/vendored_sdks/azure_mgmt_cosmosdb/operations/_percentile_operations.py
santosh02iiit/azure-cli-extensions
24247cfa19e2a5894937f19e17fbdc8308b28ef6
[ "MIT" ]
2
2021-09-22T08:25:32.000Z
2021-09-24T06:55:31.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.077519
202
0.660559
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
1c44634315c59aaee3c879a33d1c2528c3e083a0
2,915
py
Python
twentysecond.py
MSQFuersti/aoc2020
f5e163c426a6c481d645ace2cc8af7c493306291
[ "MIT" ]
null
null
null
twentysecond.py
MSQFuersti/aoc2020
f5e163c426a6c481d645ace2cc8af7c493306291
[ "MIT" ]
null
null
null
twentysecond.py
MSQFuersti/aoc2020
f5e163c426a6c481d645ace2cc8af7c493306291
[ "MIT" ]
null
null
null
import csv import copy def getCsv(txtFileName='twentysecond.txt'): with open(txtFileName) as csv_file: csv_reader = csv.reader(csv_file, delimiter=' ') return list(csv_reader) def parseCardDecks(csvFile): playerOne = [] playerTwo = [] isFirst = True for row in csvFile: i...
28.861386
100
0.633276
import csv import copy def getCsv(txtFileName='twentysecond.txt'): with open(txtFileName) as csv_file: csv_reader = csv.reader(csv_file, delimiter=' ') return list(csv_reader) def parseCardDecks(csvFile): playerOne = [] playerTwo = [] isFirst = True for row in csvFile: i...
true
true
1c44638e5289159fd6642dbde2d28bf744b91d3c
72
py
Python
apriori_python/__init__.py
ablarry/apriori_python
c460d6bf87848a2823923dca720df6183bd334cc
[ "MIT" ]
41
2020-10-25T15:03:58.000Z
2022-03-18T02:43:27.000Z
apriori_python/__init__.py
ablarry/apriori_python
c460d6bf87848a2823923dca720df6183bd334cc
[ "MIT" ]
1
2021-05-18T07:53:05.000Z
2021-05-21T19:09:42.000Z
apriori_python/__init__.py
ablarry/apriori_python
c460d6bf87848a2823923dca720df6183bd334cc
[ "MIT" ]
22
2020-12-13T13:34:21.000Z
2022-02-05T19:36:57.000Z
from apriori_python.apriori import * from apriori_python.utils import *
36
37
0.833333
from apriori_python.apriori import * from apriori_python.utils import *
true
true
1c44646f843cea9fb6ce2b8eab0852efc6aca10c
299
py
Python
ex003.py
rezende-marcus/PythonExercicios
82deed6e10c1bb47ac63a3a8889d56582ab7a718
[ "MIT" ]
null
null
null
ex003.py
rezende-marcus/PythonExercicios
82deed6e10c1bb47ac63a3a8889d56582ab7a718
[ "MIT" ]
null
null
null
ex003.py
rezende-marcus/PythonExercicios
82deed6e10c1bb47ac63a3a8889d56582ab7a718
[ "MIT" ]
null
null
null
# n1 = input('Digite um valor: ') # n2 = input('Digite outro valor: ') # s = n1 + n2 # print('A soma entre {} e {} é igual a {}!'.format(n1, n2, s)) n1 = int(input('Digite um valor: ')) n2 = int(input('Digite outro valor: ')) s = n1 + n2 print('A soma entre {} e {} é igual a {}!'.format(n1, n2, s))
37.375
63
0.568562
n1 = int(input('Digite um valor: ')) n2 = int(input('Digite outro valor: ')) s = n1 + n2 print('A soma entre {} e {} é igual a {}!'.format(n1, n2, s))
true
true
1c446470ca7bdbc10b3f8ec6dcaba559b291e735
4,849
py
Python
twext/internet/fswatch.py
troglodyne/ccs-twistedextensions
1b43cb081ba68ae310140a9e853e041cd6362625
[ "Apache-2.0" ]
23
2016-08-14T07:20:27.000Z
2021-11-08T09:47:45.000Z
twext/internet/fswatch.py
DalavanCloud/ccs-twistedextensions
2c4046df88873dcf33fba7840ed90e4238dcbec7
[ "Apache-2.0" ]
2
2016-12-15T17:51:49.000Z
2019-05-12T15:59:03.000Z
twext/internet/fswatch.py
DalavanCloud/ccs-twistedextensions
2c4046df88873dcf33fba7840ed90e4238dcbec7
[ "Apache-2.0" ]
20
2016-08-17T06:51:00.000Z
2022-03-26T11:55:56.000Z
## # Copyright (c) 2013-2017 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
29.932099
76
0.622603
import os from zope.interface import Interface from twisted.internet import reactor from twisted.python.log import Logger try: from select import ( kevent, KQ_FILTER_VNODE, KQ_EV_ADD, KQ_EV_ENABLE, KQ_EV_CLEAR, KQ_NOTE_DELETE, KQ_NOTE_RENAME, KQ_EV_EOF ) kqueueSupported = True except Impo...
true
true
1c44647222191c391e494faa2f304c10eae6fbf7
9,471
py
Python
bluesky_browser/viewer/viewer.py
EliotGann/bluesky-browser
e86e259c21d6dbeb781f32de8485f706b3b17bdc
[ "BSD-3-Clause" ]
null
null
null
bluesky_browser/viewer/viewer.py
EliotGann/bluesky-browser
e86e259c21d6dbeb781f32de8485f706b3b17bdc
[ "BSD-3-Clause" ]
null
null
null
bluesky_browser/viewer/viewer.py
EliotGann/bluesky-browser
e86e259c21d6dbeb781f32de8485f706b3b17bdc
[ "BSD-3-Clause" ]
null
null
null
import collections import enum from functools import partial import itertools import logging from event_model import RunRouter, Filler from intake_bluesky.core import parse_handler_registry from qtpy.QtCore import Signal, QThread from qtpy.QtWidgets import ( QAction, QActionGroup, QInputDialog, QVBoxLa...
35.339552
109
0.629606
import collections import enum from functools import partial import itertools import logging from event_model import RunRouter, Filler from intake_bluesky.core import parse_handler_registry from qtpy.QtCore import Signal, QThread from qtpy.QtWidgets import ( QAction, QActionGroup, QInputDialog, QVBoxLa...
true
true
1c44648c4b45e9fcff2f7d4448d645a78980e555
261
py
Python
apps/splash/api/serializers.py
Kpaubert/onlineweb4
9ac79f163bc3a816db57ffa8477ea88770d97807
[ "MIT" ]
32
2017-02-22T13:38:38.000Z
2022-03-31T23:29:54.000Z
apps/splash/api/serializers.py
Kpaubert/onlineweb4
9ac79f163bc3a816db57ffa8477ea88770d97807
[ "MIT" ]
694
2017-02-15T23:09:52.000Z
2022-03-31T23:16:07.000Z
apps/splash/api/serializers.py
Kpaubert/onlineweb4
9ac79f163bc3a816db57ffa8477ea88770d97807
[ "MIT" ]
35
2017-09-02T21:13:09.000Z
2022-02-21T11:30:30.000Z
from rest_framework.serializers import ModelSerializer from apps.splash.models import SplashEvent class SplashEventSerializer(ModelSerializer): class Meta: model = SplashEvent fields = ("id", "title", "content", "start_time", "end_time")
26.1
69
0.731801
from rest_framework.serializers import ModelSerializer from apps.splash.models import SplashEvent class SplashEventSerializer(ModelSerializer): class Meta: model = SplashEvent fields = ("id", "title", "content", "start_time", "end_time")
true
true
1c4465651a88a27dd1226447cce30e3be39112c4
687
py
Python
src/cms/utils/translation_utils.py
mckinly/cms-django
c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca
[ "Apache-2.0" ]
null
null
null
src/cms/utils/translation_utils.py
mckinly/cms-django
c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca
[ "Apache-2.0" ]
5
2021-02-10T02:41:20.000Z
2022-03-12T00:56:56.000Z
src/cms/utils/translation_utils.py
mckinly/cms-django
c9995a3bfab6ee2d02f2406a7f83cf91b7ccfcca
[ "Apache-2.0" ]
null
null
null
""" This module contains helpers for the translation process. """ from django.utils.text import format_lazy def ugettext_many_lazy(*strings): """ This function is a wrapper for :func:`django.utils.text.format_lazy` for the special case that the given strings should be concatenated with a space in between....
32.714286
117
0.726346
from django.utils.text import format_lazy def ugettext_many_lazy(*strings): fstring = ("{} " * len(strings)).strip() return format_lazy(fstring, *strings)
true
true
1c4465c58914ba00924c3db332f745c7350c02b5
5,321
py
Python
sandbox/mixed_poisson_hypre_2d.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
10
2017-06-22T21:05:17.000Z
2020-09-25T08:36:59.000Z
sandbox/mixed_poisson_hypre_2d.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
2
2018-04-14T08:43:59.000Z
2018-09-19T14:51:46.000Z
sandbox/mixed_poisson_hypre_2d.py
MiroK/fenics_ii
58c41f0e8dba720962830395851e081b057269cc
[ "MIT" ]
6
2018-04-13T20:33:53.000Z
2020-09-25T08:37:01.000Z
from dolfin import * from petsc4py import PETSc from mpi4py import MPI as pyMPI from sympy.printing import ccode import sympy as sp import numpy as np from block import block_assemble, block_mat from block.iterative import MinRes from block.algebraic.petsc import LU, LumpedInvDiag from block.block_base import block_ba...
28.454545
85
0.577147
from dolfin import * from petsc4py import PETSc from mpi4py import MPI as pyMPI from sympy.printing import ccode import sympy as sp import numpy as np from block import block_assemble, block_mat from block.iterative import MinRes from block.algebraic.petsc import LU, LumpedInvDiag from block.block_base import block_ba...
true
true
1c4465f3d1f0ed123bf563d4a6cfd6d59515b5f0
25,549
py
Python
1115201800312_project3/main.py
TollisK/AI-Berkley-CS188-Solutions
61de22110afdee9c60d00a0c6f612a50db5997d4
[ "MIT" ]
1
2022-01-09T17:33:26.000Z
2022-01-09T17:33:26.000Z
1115201800312_project3/main.py
TollisK/AI-Berkley-CS188-Solutions
61de22110afdee9c60d00a0c6f612a50db5997d4
[ "MIT" ]
null
null
null
1115201800312_project3/main.py
TollisK/AI-Berkley-CS188-Solutions
61de22110afdee9c60d00a0c6f612a50db5997d4
[ "MIT" ]
null
null
null
import itertools import random import re import string from collections import defaultdict, Counter from functools import reduce from operator import eq, neg import time # from sortedcontainers import SortedSet import search from utils import argmin_random_tie, count, first, extend variables = [] doma...
37.682891
137
0.594309
import itertools import random import re import string from collections import defaultdict, Counter from functools import reduce from operator import eq, neg import time import search from utils import argmin_random_tie, count, first, extend variables = [] domains = {} domtemp = {} template = [] con...
true
true
1c4466253e969a18fb0c6d7010f4d599e9cba409
598
py
Python
aulas/aula34/pessoa.py
Biguelini/Curso-Python-3
0b5df350f5901262927b11b6f2b9b215176808ff
[ "MIT" ]
null
null
null
aulas/aula34/pessoa.py
Biguelini/Curso-Python-3
0b5df350f5901262927b11b6f2b9b215176808ff
[ "MIT" ]
null
null
null
aulas/aula34/pessoa.py
Biguelini/Curso-Python-3
0b5df350f5901262927b11b6f2b9b215176808ff
[ "MIT" ]
null
null
null
from random import randint class Pessoa: ano_atual = 2021 def __init__(self, nome,idade): self.nome = nome self.idade = idade def get_ano_nascimento(self): print(self.ano_atual - self.idade) @classmethod def por_ano_nascimento(cls, nome, ano_nascimento): id...
26
54
0.645485
from random import randint class Pessoa: ano_atual = 2021 def __init__(self, nome,idade): self.nome = nome self.idade = idade def get_ano_nascimento(self): print(self.ano_atual - self.idade) @classmethod def por_ano_nascimento(cls, nome, ano_nascimento): id...
true
true
1c4466dc29d29af161d0a6e91e4f0ea8538ec7f8
649
py
Python
tests/Test_Deque.py
p-christ/Deep-Reinforcement-Learning-PyTorch-Algorithms
135d3e2e06bbde2868047d738e3fc2d73fd8cc93
[ "MIT" ]
4,461
2019-01-13T02:06:25.000Z
2022-03-31T11:50:11.000Z
tests/Test_Deque.py
p-christ/Deep-Reinforcement-Learning-PyTorch-Algorithms
135d3e2e06bbde2868047d738e3fc2d73fd8cc93
[ "MIT" ]
66
2019-01-17T10:36:21.000Z
2022-02-22T21:29:30.000Z
tests/Test_Deque.py
p-christ/Deep-Reinforcement-Learning-PyTorch-Algorithms
135d3e2e06bbde2868047d738e3fc2d73fd8cc93
[ "MIT" ]
1,051
2019-01-13T17:30:49.000Z
2022-03-31T03:33:00.000Z
from utilities.data_structures.Deque import Deque from utilities.data_structures.Node import Node def test_Deque_initialisation(): deque = Deque(2, 1) assert all(deque.deque == [Node(0, (None,)), Node(0, (None,))]) def test_Deque_adding_elements(): deque = Deque(2, 1) deque.add_element_to_deque(3, ...
25.96
67
0.671803
from utilities.data_structures.Deque import Deque from utilities.data_structures.Node import Node def test_Deque_initialisation(): deque = Deque(2, 1) assert all(deque.deque == [Node(0, (None,)), Node(0, (None,))]) def test_Deque_adding_elements(): deque = Deque(2, 1) deque.add_element_to_deque(3, ...
true
true
1c4467414998af56816a2597349b7bc99489b16f
899
py
Python
tests/virtualenv_test.py
lsst-sqre/neophile
0923bd5b58851af13c09f73a05b1a2882434b437
[ "MIT" ]
null
null
null
tests/virtualenv_test.py
lsst-sqre/neophile
0923bd5b58851af13c09f73a05b1a2882434b437
[ "MIT" ]
23
2020-07-17T23:27:44.000Z
2022-03-21T19:39:19.000Z
tests/virtualenv_test.py
lsst-sqre/neophile
0923bd5b58851af13c09f73a05b1a2882434b437
[ "MIT" ]
null
null
null
"""Tests for the VirtualEnv class.""" from __future__ import annotations from typing import TYPE_CHECKING from neophile.virtualenv import VirtualEnv if TYPE_CHECKING: from pathlib import Path def test_provided_env(tmp_path: Path) -> None: """Test virtualenv execution with an env parameter.""" venv_pat...
26.441176
69
0.657397
from __future__ import annotations from typing import TYPE_CHECKING from neophile.virtualenv import VirtualEnv if TYPE_CHECKING: from pathlib import Path def test_provided_env(tmp_path: Path) -> None: venv_path = tmp_path / "venv" venv = VirtualEnv(venv_path) result = venv.run( ["/bin/sh",...
true
true
1c4468ba33418923dca05c70f0096dda2c4a0a8d
1,953
py
Python
src/SlowSort.py
LC-John/Sorting
c34ab338a910a12def0db426495a97b5170b971b
[ "MIT" ]
6
2018-12-19T02:33:10.000Z
2020-10-31T07:59:37.000Z
src/SlowSort.py
LC-John/Sorting
c34ab338a910a12def0db426495a97b5170b971b
[ "MIT" ]
null
null
null
src/SlowSort.py
LC-John/Sorting
c34ab338a910a12def0db426495a97b5170b971b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 23 13:55:02 2018 @author: zhanghuangzhao """ import numpy import copy import os, shutil import imageio import matplotlib.pyplot as plt size = 8 arr = None def SlowSort(a, idx_begin, idx_end, reverse=False): a = copy.deepcopy(a) ...
27.125
98
0.578597
import numpy import copy import os, shutil import imageio import matplotlib.pyplot as plt size = 8 arr = None def SlowSort(a, idx_begin, idx_end, reverse=False): a = copy.deepcopy(a) proc = [] if idx_begin >= idx_end: return a, proc idx_mid = int(numpy.floor((idx_begin+id...
true
true
1c44692d32c53253146a108f2c5bcf7a2cb3f282
1,112
py
Python
website/backend/webserver/api/views/templates.py
ModelFlow/modelflow
c2b720b2da8bb17462baff5c00bbe942644474b0
[ "MIT" ]
6
2020-07-28T19:58:28.000Z
2021-05-01T18:51:37.000Z
website/backend/webserver/api/views/templates.py
ModelFlow/modelflow
c2b720b2da8bb17462baff5c00bbe942644474b0
[ "MIT" ]
81
2020-07-30T07:08:10.000Z
2021-07-28T02:17:43.000Z
website/backend/webserver/api/views/templates.py
ModelFlow/modelflow
c2b720b2da8bb17462baff5c00bbe942644474b0
[ "MIT" ]
null
null
null
from django.http import JsonResponse from ..models import Template, Scenario # NOTE: I think this can be deleted and be replaced by django rest framework def get_templates_metadata(request): """ Get the templates for a project from a lookup on the scenario id. This is because we only have access to the s...
39.714286
88
0.705935
from django.http import JsonResponse from ..models import Template, Scenario def get_templates_metadata(request): scenario_id = request.GET.get('scenario_id', None) if not scenario_id: return JsonResponse({'error': 'Need to provide scenario_id'}) scenario = Scenario.objects.filter(id=int(scenario...
true
true
1c44698c1a36059851b7d59d1a9db5fef3c470ba
294
py
Python
body/testbody.py
sherry0429/TornadoLayer
c58f3bbd9f409fd8506f30d3002499b294ff7303
[ "Apache-2.0" ]
null
null
null
body/testbody.py
sherry0429/TornadoLayer
c58f3bbd9f409fd8506f30d3002499b294ff7303
[ "Apache-2.0" ]
null
null
null
body/testbody.py
sherry0429/TornadoLayer
c58f3bbd9f409fd8506f30d3002499b294ff7303
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2017 tianyou pan <sherry0429 at SOAPython> """ from tornado_layer import BaseHttpBody class TestMessageBody(BaseHttpBody): data = "i am test data" def __init__(self, url, method): super(TestMessageBody, self).__init__(url, method)
19.6
58
0.687075
from tornado_layer import BaseHttpBody class TestMessageBody(BaseHttpBody): data = "i am test data" def __init__(self, url, method): super(TestMessageBody, self).__init__(url, method)
true
true
1c446a89bba32565bdf40122d1a561b1a162328f
438
py
Python
molsysmt/tools/mdanalysis_Universe/to_molsysmt_Trajectory.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/tools/mdanalysis_Universe/to_molsysmt_Trajectory.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/tools/mdanalysis_Universe/to_molsysmt_Trajectory.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
def to_molsysmt_Trajectory(item, selection='all', frame_indices='all', syntaxis='MolSysMT'): from molsysmt.tools.mdanalysis_Universe import is_mdanalysis_Universe from molsysmt.basic import convert if not is_mdanalysis_Universe(item): raise ValueError tmp_item = convert(item, to_form='molsysm...
31.285714
92
0.755708
def to_molsysmt_Trajectory(item, selection='all', frame_indices='all', syntaxis='MolSysMT'): from molsysmt.tools.mdanalysis_Universe import is_mdanalysis_Universe from molsysmt.basic import convert if not is_mdanalysis_Universe(item): raise ValueError tmp_item = convert(item, to_form='molsysm...
true
true
1c446b141031895ba08007681fefd9346f8b0dac
999
py
Python
deployment/util_code/doc2vec_vectorizer.py
XC-Li/FiscalNote_Project
a8343f22156f619f2c8fe9102e6df684d1b4c97f
[ "MIT" ]
1
2019-08-26T01:48:02.000Z
2019-08-26T01:48:02.000Z
deployment/util_code/doc2vec_vectorizer.py
XC-Li/FiscalNote_Project
a8343f22156f619f2c8fe9102e6df684d1b4c97f
[ "MIT" ]
null
null
null
deployment/util_code/doc2vec_vectorizer.py
XC-Li/FiscalNote_Project
a8343f22156f619f2c8fe9102e6df684d1b4c97f
[ "MIT" ]
1
2021-02-12T14:57:41.000Z
2021-02-12T14:57:41.000Z
"""By: Xiaochi (George) Li: github.com/XC-Li""" from gensim.models.doc2vec import Doc2Vec import numpy as np from scipy.sparse import hstack as sparse_hstack class D2V(object): def __init__(self, file): self.model = Doc2Vec.load(file) def fit(self, X): pass def transform(self, X): ...
24.975
56
0.620621
from gensim.models.doc2vec import Doc2Vec import numpy as np from scipy.sparse import hstack as sparse_hstack class D2V(object): def __init__(self, file): self.model = Doc2Vec.load(file) def fit(self, X): pass def transform(self, X): temp = [] for speech in X: ...
true
true
1c446ba5c4b308ca1c5d968bc183ff8711ec453b
323
py
Python
appengine/predator/frontend/handlers/fracas_result_feedback.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
1
2018-01-02T05:47:07.000Z
2018-01-02T05:47:07.000Z
appengine/predator/frontend/handlers/fracas_result_feedback.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
null
null
null
appengine/predator/frontend/handlers/fracas_result_feedback.py
mcgreevy/chromium-infra
09064105713603f7bf75c772e8354800a1bfa256
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from frontend.handlers.result_feedback import ResultFeedback class FracasResultFeedback(ResultFeedback): @property def client(self): return 'fraca...
24.846154
72
0.780186
from frontend.handlers.result_feedback import ResultFeedback class FracasResultFeedback(ResultFeedback): @property def client(self): return 'fracas'
true
true
1c446c08fda3e987130a4789309ad6cc490f6da8
3,132
py
Python
modeling/net.py
cpratim/DALI-Data-Challenge
ad0d6d048abb240dd2316ff70590606bd2d8c44f
[ "MIT" ]
null
null
null
modeling/net.py
cpratim/DALI-Data-Challenge
ad0d6d048abb240dd2316ff70590606bd2d8c44f
[ "MIT" ]
null
null
null
modeling/net.py
cpratim/DALI-Data-Challenge
ad0d6d048abb240dd2316ff70590606bd2d8c44f
[ "MIT" ]
null
null
null
import os import torch from torch import nn from torch import optim import torch.nn.functional as F from tqdm import tqdm import numpy as np from sklearn.preprocessing import ( StandardScaler, MinMaxScaler, ) from sklearn.pipeline import Pipeline from gplearn.genetic import SymbolicTransformer import pickle ...
25.884298
104
0.590996
import os import torch from torch import nn from torch import optim import torch.nn.functional as F from tqdm import tqdm import numpy as np from sklearn.preprocessing import ( StandardScaler, MinMaxScaler, ) from sklearn.pipeline import Pipeline from gplearn.genetic import SymbolicTransformer import pickle ...
true
true
1c446c1a6bc3489b11c669948577e7a3ca162f01
222
py
Python
crispy_shifty/__init__.py
proleu/crispy_shifty
87393581a67cbeda287f858a8860145b6ccb5768
[ "MIT" ]
4
2022-01-11T23:40:12.000Z
2022-03-03T00:42:57.000Z
crispy_shifty/__init__.py
proleu/crispy_shifty
87393581a67cbeda287f858a8860145b6ccb5768
[ "MIT" ]
null
null
null
crispy_shifty/__init__.py
proleu/crispy_shifty
87393581a67cbeda287f858a8860145b6ccb5768
[ "MIT" ]
null
null
null
# TODO smart sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) type thing? # import sys # from pathlib import Path # # # As PosixPath # sys.path.append(Path(__file__).parent ) #.parent.parent) might be better
31.714286
87
0.734234
true
true
1c446c2f5aac664a71d64849454ca09648c92f8f
776
py
Python
test/dao/test_userInfoDao.py
clarkchen/tiflask
7dee6d2de85b9b15eb233d2e4dfcda218ab4c65b
[ "Apache-2.0" ]
null
null
null
test/dao/test_userInfoDao.py
clarkchen/tiflask
7dee6d2de85b9b15eb233d2e4dfcda218ab4c65b
[ "Apache-2.0" ]
null
null
null
test/dao/test_userInfoDao.py
clarkchen/tiflask
7dee6d2de85b9b15eb233d2e4dfcda218ab4c65b
[ "Apache-2.0" ]
null
null
null
from unittest import TestCase from tiflask.dao import UserInfoDao class TestUserInfoDao(TestCase): def test_get_user_article_relation(self): dao = UserInfoDao() phone = "18500195632" user_info = dao.get_user_base_info(phone) # print (user_info.phone) self.assertIsNotNone(u...
31.04
67
0.679124
from unittest import TestCase from tiflask.dao import UserInfoDao class TestUserInfoDao(TestCase): def test_get_user_article_relation(self): dao = UserInfoDao() phone = "18500195632" user_info = dao.get_user_base_info(phone) self.assertIsNotNone(user_info.phone) us...
true
true
1c446ceb8906235f5651b60a7e78a640259e6170
300
py
Python
problems/remove-duplicates-from-sorted-array/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
2
2021-03-25T01:58:55.000Z
2021-08-06T12:47:13.000Z
problems/remove-duplicates-from-sorted-array/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
3
2019-08-27T13:25:42.000Z
2021-08-28T17:49:34.000Z
problems/remove-duplicates-from-sorted-array/solution-1.py
MleMoe/LeetCode-1
14f275ba3c8079b820808da17c4952fcf9c8253c
[ "MIT" ]
1
2021-08-14T08:49:39.000Z
2021-08-14T08:49:39.000Z
class Solution: def removeDuplicates(self, nums: [int]) -> int: if len(nums) == 0: return 0 order = 0 for i in range(1, len(nums)): if nums[order] != nums[i]: order += 1 nums[order] = nums[i] return order + 1
30
51
0.453333
class Solution: def removeDuplicates(self, nums: [int]) -> int: if len(nums) == 0: return 0 order = 0 for i in range(1, len(nums)): if nums[order] != nums[i]: order += 1 nums[order] = nums[i] return order + 1
true
true
1c446cffc3bb328dbe5a01254b5550c010eec188
686
py
Python
lists.py
emersonnobre/python-basics
e4e4f17b83661e210e5379005d85364b09587593
[ "MIT" ]
null
null
null
lists.py
emersonnobre/python-basics
e4e4f17b83661e210e5379005d85364b09587593
[ "MIT" ]
null
null
null
lists.py
emersonnobre/python-basics
e4e4f17b83661e210e5379005d85364b09587593
[ "MIT" ]
null
null
null
friends = ["Murilo", "Duda", "Rebecca"] polymorfism = [1, False, "some text"] numbers = [1, 34, 2, 1, 0, 34, 4, 100, 98] #Funções para listas friends.extend(polymorfism) # adiciona um array no final do array friends.append("Carlinhos") # adiciona um valor na última posição do array friends.insert(1, "Doja") # adicion...
40.352941
106
0.739067
friends = ["Murilo", "Duda", "Rebecca"] polymorfism = [1, False, "some text"] numbers = [1, 34, 2, 1, 0, 34, 4, 100, 98] friends.extend(polymorfism) friends.append("Carlinhos") friends.insert(1, "Doja") friends.remove("Carlinhos") friends.pop() friends.extend( [1, 1] ) numbers.sort() print(friends.count(1)) print(fr...
true
true
1c446d71885ae3d23a95f291c3dfb10fe99cb957
53,754
py
Python
astropy/coordinates/transformations.py
REMeyer/astropy
28c49fb618538a01812e586cd07bccdf0591a6c6
[ "BSD-3-Clause" ]
null
null
null
astropy/coordinates/transformations.py
REMeyer/astropy
28c49fb618538a01812e586cd07bccdf0591a6c6
[ "BSD-3-Clause" ]
null
null
null
astropy/coordinates/transformations.py
REMeyer/astropy
28c49fb618538a01812e586cd07bccdf0591a6c6
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains a general framework for defining graphs of transformations between coordinates, suitable for either spatial coordinates or more generalized coordinate systems. The fundamental idea is that each class is a node in the transformati...
40.47741
109
0.602392
from __future__ import (absolute_import, division, print_function, unicode_literals) import heapq import inspect import subprocess from warnings import warn from abc import ABCMeta, abstractmethod from collections import defaultdict, OrderedDict import numpy as np from .. import units as u...
true
true
1c446d85e9321da7a48cf104ae990269b5592a7d
1,266
py
Python
sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/relay/azure-mgmt-relay/azure/mgmt/relay/models/operation_py3.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
31.65
76
0.584518
from msrest.serialization import Model class Operation(Model): _validation = { 'name': {'readonly': True}, } _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, } def __init__(self, *, display=None, **kwa...
true
true
1c446daa36eb0e4b3800e1664e4e66ac001cceea
72,230
py
Python
pybind/slxos/v17r_2_00/mpls_config/router/mpls/mpls_cmds_holder/lsp/secondary_path/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/mpls_config/router/mpls/mpls_cmds_holder/lsp/secondary_path/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/mpls_config/router/mpls/mpls_cmds_holder/lsp/secondary_path/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
94.914586
756
0.734944
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
1c446db459b8ff21bcf05a909d7da4d5e1444764
2,724
py
Python
panzoto/portal.py
yangliu2/panzoto
86fb0e6ab26a682b360dd45394f894fa03b5d433
[ "MIT" ]
null
null
null
panzoto/portal.py
yangliu2/panzoto
86fb0e6ab26a682b360dd45394f894fa03b5d433
[ "MIT" ]
null
null
null
panzoto/portal.py
yangliu2/panzoto
86fb0e6ab26a682b360dd45394f894fa03b5d433
[ "MIT" ]
null
null
null
from pathlib import Path import pickle from rich.table import Table from rich import box from rich.console import Console from typing import Callable, Dict import panzoto.config as CFG from panzoto.matrix import Matrix from panzoto.utils import load_matrix, log_output, timer class Portal(): def __init__(self): ...
30.954545
69
0.579295
from pathlib import Path import pickle from rich.table import Table from rich import box from rich.console import Console from typing import Callable, Dict import panzoto.config as CFG from panzoto.matrix import Matrix from panzoto.utils import load_matrix, log_output, timer class Portal(): def __init__(self): ...
true
true
1c446e092f59a795f8241b05d24a122a84ab3529
100
py
Python
app/domain/exceptions.py
globocom/enforcement
004ff545d6d61b95b555d9981525510496862b3e
[ "BSD-3-Clause" ]
7
2020-11-08T18:02:26.000Z
2021-10-15T21:40:35.000Z
app/domain/exceptions.py
globocom/enforcement
004ff545d6d61b95b555d9981525510496862b3e
[ "BSD-3-Clause" ]
19
2020-11-19T20:57:20.000Z
2021-09-03T14:53:34.000Z
app/domain/exceptions.py
globocom/enforcement-service
004ff545d6d61b95b555d9981525510496862b3e
[ "BSD-3-Clause" ]
3
2020-10-03T02:40:34.000Z
2020-10-19T10:17:06.000Z
class EnforcementInvalidException(Exception): pass class SecretNotFound(Exception): pass
12.5
45
0.77
class EnforcementInvalidException(Exception): pass class SecretNotFound(Exception): pass
true
true
1c446e1ef19c9f608c436ef3bdb84329213f98ad
1,496
py
Python
tests/json/test_jsonexportfile.py
aaronater10/sfconfig
f1ebd0a4dc5e6ec235d30b0ef1540fb65422729a
[ "MIT" ]
null
null
null
tests/json/test_jsonexportfile.py
aaronater10/sfconfig
f1ebd0a4dc5e6ec235d30b0ef1540fb65422729a
[ "MIT" ]
null
null
null
tests/json/test_jsonexportfile.py
aaronater10/sfconfig
f1ebd0a4dc5e6ec235d30b0ef1540fb65422729a
[ "MIT" ]
null
null
null
# jsonexportfile - Tests from src import sfcparse from os import remove, path import time test_file_path = './tests/test_files/json/' file_delay_timer = 0.5 ################################################################ # TESTS # 1. JSON Data Export - Exporting json file data and test attributes def test1_json_f...
32.521739
100
0.661096
from src import sfcparse from os import remove, path import time test_file_path = './tests/test_files/json/' file_delay_timer = 0.5 def test1_json_file_export(): filename = '1_export_data.json' filepath = test_file_path + filename json_data = { 'string_data': 'data', 'int_data': 256, 'array...
true
true
1c446eff4ecb46549266af14ca2384810a90480b
29,182
py
Python
tempest/api/network/test_networks.py
xavpaice/tempest
958bd694df27511e0346d799876fe49331b8145c
[ "Apache-2.0" ]
null
null
null
tempest/api/network/test_networks.py
xavpaice/tempest
958bd694df27511e0346d799876fe49331b8145c
[ "Apache-2.0" ]
null
null
null
tempest/api/network/test_networks.py
xavpaice/tempest
958bd694df27511e0346d799876fe49331b8145c
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # 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 requ...
44.964561
79
0.628675
import itertools import netaddr import six from tempest_lib import exceptions as lib_exc from tempest.api.network import base from tempest.common import custom_matchers from tempest.common.utils import data_utils from tempest import config from tempest import test CONF = config.CONF class NetworksTest(base.BaseNet...
true
true
1c446f764905e7f9cd9f67b56684fdeee3bc714c
5,348
py
Python
crossover_finder.py
nbergam2021/ICESat_data_analysis_tools
46f4132d2b34efe9a21470cdbaddf195301cfcd3
[ "MIT" ]
1
2019-11-27T20:41:31.000Z
2019-11-27T20:41:31.000Z
crossover_finder.py
nbergam2021/ICESat_data_analysis_tools
46f4132d2b34efe9a21470cdbaddf195301cfcd3
[ "MIT" ]
null
null
null
crossover_finder.py
nbergam2021/ICESat_data_analysis_tools
46f4132d2b34efe9a21470cdbaddf195301cfcd3
[ "MIT" ]
null
null
null
#crossover_finder.py import numpy as np import pandas as pd import scipy.stats as stats import glob import os import sys def solve(line_list, box): # input: [slope, intersect, other_stuff] # output: [ [], [], [], [] ] # Group slopes, compare lines within each group # box is list of top bottom left rig...
40.515152
150
0.619484
import numpy as np import pandas as pd import scipy.stats as stats import glob import os import sys def solve(line_list, box): intersects = [] for i in line_list: for j in line_list: if i != j and i[0]*j[0] < 0: intersects.append(get_...
true
true
1c446fd421650543e773be63c70c4dc902f1eb7a
78,556
py
Python
Lib/logging/__init__.py
KrishnaSai2020/cpython
07923f32b16ba39165a58a5f47e807ca04ae17aa
[ "CNRI-Python-GPL-Compatible" ]
2
2020-06-22T07:22:12.000Z
2020-09-29T06:33:22.000Z
Lib/logging/__init__.py
jugmac00/cpython
2c2a4f3d8545784c6e4ca8128bfc706916080712
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
Lib/logging/__init__.py
jugmac00/cpython
2c2a4f3d8545784c6e4ca8128bfc706916080712
[ "CNRI-Python-GPL-Compatible" ]
null
null
null
# Copyright 2001-2019 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
35.433469
106
0.588637
import sys, os, time, io, re, traceback, warnings, weakref, collections.abc from string import Template from string import Formatter as StrFormatter __all__ = ['BASIC_FORMAT', 'BufferingFormatter', 'CRITICAL', 'DEBUG', 'ERROR', 'FATAL', 'FileHandler', 'Filter', 'Formatter', 'Handler', 'INFO', ...
true
true
1c446fe63b5d182b69d71768d1bb0b75c5c60426
3,049
py
Python
scripts/util.py
TheCharlatan/vialectrum
c54cd9aa08835db985d77ead9d91a00d66afa4b0
[ "MIT" ]
null
null
null
scripts/util.py
TheCharlatan/vialectrum
c54cd9aa08835db985d77ead9d91a00d66afa4b0
[ "MIT" ]
null
null
null
scripts/util.py
TheCharlatan/vialectrum
c54cd9aa08835db985d77ead9d91a00d66afa4b0
[ "MIT" ]
null
null
null
import select, time, queue # import vialectrum as electrum from vialectrum import Connection, Interface, SimpleConfig from vialectrum.network import parse_servers from collections import defaultdict # electrum.util.set_verbosity(1) def get_interfaces(servers, timeout=10): '''Returns a map of servers to connected ...
36.297619
94
0.653329
import select, time, queue from vialectrum import Connection, Interface, SimpleConfig from vialectrum.network import parse_servers from collections import defaultdict def get_interfaces(servers, timeout=10): socket_queue = queue.Queue() config = SimpleConfig() connecting = {} for server in servers: ...
true
true
1c447221d6f4f975dfff9f8ae842a6682412100a
8,187
py
Python
cuegui/tests/FrameMonitorTree_tests.py
srbhss/OpenCue
c0b8aeab0ea324c3c46541d98b4a968230c668eb
[ "Apache-2.0" ]
null
null
null
cuegui/tests/FrameMonitorTree_tests.py
srbhss/OpenCue
c0b8aeab0ea324c3c46541d98b4a968230c668eb
[ "Apache-2.0" ]
2
2019-10-02T23:58:20.000Z
2020-03-30T19:18:48.000Z
cuegui/tests/FrameMonitorTree_tests.py
srbhss/OpenCue
c0b8aeab0ea324c3c46541d98b4a968230c668eb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 Sony Pictures Imageworks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
39.360577
113
0.702333
import mock import unittest import PySide2.QtCore import PySide2.QtGui import PySide2.QtTest import PySide2.QtWidgets import cuegui.Constants import cuegui.FrameMonitor import cuegui.FrameMonitorTree import cuegui.Main import cuegui.plugins.MonitorJobDetailsPlugin import cuegui.Style import opencue.compiled_proto.j...
true
true
1c4472d59ef9d2f4b7feaa9217800ab5af98d094
54,950
py
Python
lib/spack/llnl/util/filesystem.py
BenCasses/spack
912dcd320a1ec624cc12986a4c0dd881276c925b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
lib/spack/llnl/util/filesystem.py
BenCasses/spack
912dcd320a1ec624cc12986a4c0dd881276c925b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
lib/spack/llnl/util/filesystem.py
BenCasses/spack
912dcd320a1ec624cc12986a4c0dd881276c925b
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import collections import errno import hashlib import glob import grp import itertools import numbers import os import pwd ...
31.836616
79
0.60091
import collections import errno import hashlib import glob import grp import itertools import numbers import os import pwd import re import shutil import stat import sys import tempfile from contextlib import contextmanager import six from llnl.util import tty from llnl.util.lang import dedupe, memoized from spack.uti...
true
true
1c44735ee29ae80ebb1e9d736322620b52449d80
3,087
py
Python
pkg/suggestion/v1alpha1/NAS_Reinforcement_Learning/Operation.py
terrytangyuan/katib
5a7a144a1b33e05466174edd721803349622aabc
[ "Apache-2.0" ]
6
2019-04-26T05:24:45.000Z
2020-03-16T15:54:23.000Z
pkg/suggestion/v1alpha1/NAS_Reinforcement_Learning/Operation.py
terrytangyuan/katib
5a7a144a1b33e05466174edd721803349622aabc
[ "Apache-2.0" ]
30
2019-04-27T01:49:00.000Z
2021-02-01T08:52:32.000Z
pkg/suggestion/v1alpha1/NAS_Reinforcement_Learning/Operation.py
terrytangyuan/katib
5a7a144a1b33e05466174edd721803349622aabc
[ "Apache-2.0" ]
4
2019-05-07T04:53:07.000Z
2020-10-21T09:10:26.000Z
import itertools import numpy as np from pkg.api.v1alpha1.python import api_pb2 class Operation(object): def __init__(self, opt_id, opt_type, opt_params): self.opt_id = opt_id self.opt_type = opt_type self.opt_params = opt_params def get_dict(self): opt_dict = dict() ...
40.090909
86
0.597344
import itertools import numpy as np from pkg.api.v1alpha1.python import api_pb2 class Operation(object): def __init__(self, opt_id, opt_type, opt_params): self.opt_id = opt_id self.opt_type = opt_type self.opt_params = opt_params def get_dict(self): opt_dict = dict() ...
true
true
1c4473c0e901afb9b524c273d6a5357d7d60c679
2,825
py
Python
src/nspyre/gui/widgets/views.py
AlexBourassa/nspyre
d254af09c7c8377552e85dba6f60b150fbb8da2e
[ "MIT" ]
8
2019-12-06T14:49:34.000Z
2020-07-03T18:46:45.000Z
src/nspyre/gui/widgets/views.py
nspyre-org/nspyre
d254af09c7c8377552e85dba6f60b150fbb8da2e
[ "BSD-3-Clause" ]
31
2020-09-21T21:01:06.000Z
2021-12-10T03:27:26.000Z
src/nspyre/gui/widgets/views.py
NSpyre-Dev/nspyre
d254af09c7c8377552e85dba6f60b150fbb8da2e
[ "BSD-3-Clause" ]
4
2020-10-07T23:58:13.000Z
2022-03-01T15:22:34.000Z
class View: """Some Views for plotting.""" def __init__(self, f, plot_type): self.update_fun = f self.type = plot_type self.init_formatters = dict() self.update_formatters = dict() def add_formatter(self, formatter): if formatter.type == 'init': self.ini...
41.544118
138
0.692389
class View: def __init__(self, f, plot_type): self.update_fun = f self.type = plot_type self.init_formatters = dict() self.update_formatters = dict() def add_formatter(self, formatter): if formatter.type == 'init': self.init_formatters[formatter.handled_clas...
true
true
1c4473f0c25ec1b733d34e3f0547784dd273bf3a
38,712
py
Python
python/ccxt/coinmate.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
python/ccxt/coinmate.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
python/ccxt/coinmate.py
Dan-krm/ccxt
2ed8b7b8598e2934559822d81a8d14885b4d4ad3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from cc...
41.850811
155
0.517901
from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound from cc...
true
true
1c447420694ed8036a9668092025459314e6c7cc
51,718
py
Python
cardinal_pythonlib/extract_text.py
bopopescu/pythonlib
9c2187d6092ba133342ca3374eb7c86f9d296c30
[ "Apache-2.0" ]
null
null
null
cardinal_pythonlib/extract_text.py
bopopescu/pythonlib
9c2187d6092ba133342ca3374eb7c86f9d296c30
[ "Apache-2.0" ]
null
null
null
cardinal_pythonlib/extract_text.py
bopopescu/pythonlib
9c2187d6092ba133342ca3374eb7c86f9d296c30
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # cardinal_pythonlib/extract_text.py """ =============================================================================== Original code copyright (C) 2009-2020 Rudolf Cardinal (rudolf@pobox.com). This file is part of cardinal_pythonlib. Licensed under the Apache License, Version 2.0...
32.857687
118
0.56899
import argparse from io import StringIO import io import logging import os import re import shutil import subprocess import sys import textwrap from typing import ( BinaryIO, Dict, Generator, Iterable, Iterator, List, Optional, Union, ) from xml.etree import ElementTree as ElementTree import zipfile import bs...
true
true
1c447439820c7450726bb3a1955016d4b5b8390e
7,579
py
Python
homeassistant/components/scrape/sensor.py
mib1185/core
b17d4ac65cde9a27ff6032d70b148792e5eba8df
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/scrape/sensor.py
mib1185/core
b17d4ac65cde9a27ff6032d70b148792e5eba8df
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/scrape/sensor.py
mib1185/core
b17d4ac65cde9a27ff6032d70b148792e5eba8df
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for getting data from websites with scraping.""" from __future__ import annotations import logging from typing import Any from bs4 import BeautifulSoup import voluptuous as vol from homeassistant.components.rest.data import RestData from homeassistant.components.sensor import ( CONF_STATE_CLASS, D...
33.535398
89
0.65312
from __future__ import annotations import logging from typing import Any from bs4 import BeautifulSoup import voluptuous as vol from homeassistant.components.rest.data import RestData from homeassistant.components.sensor import ( CONF_STATE_CLASS, DEVICE_CLASSES_SCHEMA, PLATFORM_SCHEMA as PARENT_PLATFORM...
true
true
1c44747e85ccb4efd346c533db7efda9c279aaae
142
py
Python
python-pyqt/Section02/finplot_mod/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
9
2020-10-25T15:13:32.000Z
2022-03-26T11:27:21.000Z
python-pyqt/Section02/finplot_mod/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
null
null
null
python-pyqt/Section02/finplot_mod/01.py
sharebook-kr/learningspoons-bootcamp-finance
0288f3f3b39f54420e4e9987f1de12892dc680ea
[ "MIT" ]
7
2021-03-01T11:06:45.000Z
2022-03-14T07:06:04.000Z
import finplot as fplt import yfinance df = yfinance.download('AAPL') fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']]) fplt.show()
23.666667
59
0.711268
import finplot as fplt import yfinance df = yfinance.download('AAPL') fplt.candlestick_ochl(df[['Open', 'Close', 'High', 'Low']]) fplt.show()
true
true
1c44752cff7dde1bc65d8065a410394ce0f2c6ff
3,306
py
Python
code/spatial_embedding.py
guangyizhangbci/EEG_Riemannian
2d301bf3d06a192da2829c1c54b24d388ddea1dd
[ "MIT" ]
12
2022-02-22T17:15:04.000Z
2022-03-19T11:41:15.000Z
code/spatial_embedding.py
guangyizhangbci/RFNet
2d301bf3d06a192da2829c1c54b24d388ddea1dd
[ "MIT" ]
null
null
null
code/spatial_embedding.py
guangyizhangbci/RFNet
2d301bf3d06a192da2829c1c54b24d388ddea1dd
[ "MIT" ]
null
null
null
from __future__ import print_function, division import numpy as np from sklearn.preprocessing import StandardScaler import pyriemann from pyriemann.estimation import Covariances from library.spfiltering import ProjCommonSpace from library.featuring import Riemann class spatial_features(): def __init__(self, conf...
34.8
158
0.645796
from __future__ import print_function, division import numpy as np from sklearn.preprocessing import StandardScaler import pyriemann from pyriemann.estimation import Covariances from library.spfiltering import ProjCommonSpace from library.featuring import Riemann class spatial_features(): def __init__(self, conf...
true
true
1c4475e321d4980d398c6000935266e034bebe6a
18,502
py
Python
data/ntu/get_raw_denoised_data.py
mhrah7495/View-Adaptive-Neural-Networks-for-Skeleton-based-Human-Action-Recognition
4b91b79dff7363010300ef5fb1564a57a65ea7cf
[ "MIT" ]
111
2019-09-19T08:07:17.000Z
2022-03-09T07:19:07.000Z
data/ntu/get_raw_denoised_data.py
Jagadish-Kumaran/View-Adaptive-Neural-Networks-for-Skeleton-based-Human-Action-Recognition
b2113aa6295d7292516d5a74582b619d775a5b3d
[ "MIT" ]
14
2019-10-18T08:45:42.000Z
2021-11-04T06:38:40.000Z
data/ntu/get_raw_denoised_data.py
Jagadish-Kumaran/View-Adaptive-Neural-Networks-for-Skeleton-based-Human-Action-Recognition
b2113aa6295d7292516d5a74582b619d775a5b3d
[ "MIT" ]
52
2019-09-18T11:54:47.000Z
2022-01-17T09:12:19.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os import os.path as osp import numpy as np import pickle import logging root_path = './' raw_data_file = osp.join(root_path, 'raw_data', 'raw_skes_data.pkl') save_path = osp.join(root_path, 'denoised_data') if not os...
42.242009
101
0.649822
import os import os.path as osp import numpy as np import pickle import logging root_path = './' raw_data_file = osp.join(root_path, 'raw_data', 'raw_skes_data.pkl') save_path = osp.join(root_path, 'denoised_data') if not osp.exists(save_path): os.mkdir(save_path) rgb_ske_path = osp.join(save_path, 'rgb+ske') if...
true
true
1c4475fc251df59a1ea19899348e75bfc2eaad85
2,340
py
Python
pythonclubproject/club/tests.py
elb-dev/ITC-172
df7acdad309c44cfd3b7580132d28d2d7b9713c4
[ "Apache-2.0" ]
null
null
null
pythonclubproject/club/tests.py
elb-dev/ITC-172
df7acdad309c44cfd3b7580132d28d2d7b9713c4
[ "Apache-2.0" ]
null
null
null
pythonclubproject/club/tests.py
elb-dev/ITC-172
df7acdad309c44cfd3b7580132d28d2d7b9713c4
[ "Apache-2.0" ]
null
null
null
from django.test import TestCase from .models import Meeting, MeetingMinutes, Resource, Event from django.urls import reverse # Create your tests here. class MeetingTest(TestCase): def test_stringOutput(self): meeting = Meeting(meetingtitle = 'Test Meeting Title') self.assertEqual(str(meeting), mee...
41.052632
71
0.723077
from django.test import TestCase from .models import Meeting, MeetingMinutes, Resource, Event from django.urls import reverse class MeetingTest(TestCase): def test_stringOutput(self): meeting = Meeting(meetingtitle = 'Test Meeting Title') self.assertEqual(str(meeting), meeting.meetingtitle) def...
true
true
1c44766d9a91f957d9c525b9dbed78e8c36349e9
4,029
py
Python
skactiveml/pool/tests/test_discriminative_al.py
LukasLuehrs/scikit-activeml
04d7107272ef0438070808475599131d8726f547
[ "BSD-3-Clause" ]
null
null
null
skactiveml/pool/tests/test_discriminative_al.py
LukasLuehrs/scikit-activeml
04d7107272ef0438070808475599131d8726f547
[ "BSD-3-Clause" ]
null
null
null
skactiveml/pool/tests/test_discriminative_al.py
LukasLuehrs/scikit-activeml
04d7107272ef0438070808475599131d8726f547
[ "BSD-3-Clause" ]
null
null
null
import unittest import numpy as np from sklearn.datasets import load_breast_cancer from sklearn.gaussian_process import GaussianProcessClassifier from sklearn.preprocessing import StandardScaler from skactiveml.classifier import ParzenWindowClassifier from skactiveml.pool import DiscriminativeAL class TestDiscrimin...
39.116505
77
0.518739
import unittest import numpy as np from sklearn.datasets import load_breast_cancer from sklearn.gaussian_process import GaussianProcessClassifier from sklearn.preprocessing import StandardScaler from skactiveml.classifier import ParzenWindowClassifier from skactiveml.pool import DiscriminativeAL class TestDiscrimin...
true
true
1c4476a7a8651046cc68c24e7902545fbb45d44e
9,207
py
Python
src/ea/libs/FileModels/TestResult.py
dmachard/extensivetesting
a5c3d2648aebcfaf1d0352a7aff8728ab843b73f
[ "MIT" ]
9
2019-09-01T04:56:28.000Z
2021-04-08T19:45:52.000Z
src/ea/libs/FileModels/TestResult.py
dmachard/extensivetesting
a5c3d2648aebcfaf1d0352a7aff8728ab843b73f
[ "MIT" ]
5
2020-10-27T15:05:12.000Z
2021-12-13T13:48:11.000Z
src/ea/libs/FileModels/TestResult.py
dmachard/extensivetesting
a5c3d2648aebcfaf1d0352a7aff8728ab843b73f
[ "MIT" ]
2
2019-10-01T06:12:06.000Z
2020-04-29T13:28:20.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------- # Copyright (c) 2010-2021 Denis Machard # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
31.530822
84
0.528185
import sys import zlib import base64 import re from ea.libs import Logger from ea.libs.PyXmlDict import Dict2Xml as PyDictXml from ea.libs.PyXmlDict import Xml2Dict as PyXmlDict if sys.version_info > (3,): unicode = str r = re.compile( u"[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\xFF\u0100-\uD7FF\uE000-\uFDCF\uFDE...
true
true
1c4477483962ec1dcb79e2cdf6424d5181cb6433
5,514
py
Python
contrib/seeds/makeseeds.py
masternodecoin/Masternodecoin-NEW
2c1e745dc371268af8b21a9b1b1ef99f1e31f059
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
masternodecoin/Masternodecoin-NEW
2c1e745dc371268af8b21a9b1b1ef99f1e31f059
[ "MIT" ]
null
null
null
contrib/seeds/makeseeds.py
masternodecoin/Masternodecoin-NEW
2c1e745dc371268af8b21a9b1b1ef99f1e31f059
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 #...
32.05814
186
0.566921
# NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 615801 # These are hosts that have been observed to be behaving strangely (e.g. # aggressively connecting to every node). SUSPICIOUS_HOSTS = { "" } import re import sys import dns.resolver import collections PATTERN_IPV4 = re.compile(r"^((\d{1,3})\.(\d{1,3})\.(\d{...
true
true
1c447808e077aaa4205e3b4d55649bde5820daca
1,533
py
Python
venv/Lib/site-packages/statsmodels/emplike/tests/test_aft.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
76
2019-12-28T08:37:10.000Z
2022-03-29T02:19:41.000Z
venv/Lib/site-packages/statsmodels/emplike/tests/test_aft.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
7
2020-12-04T04:10:42.000Z
2021-03-16T00:53:09.000Z
venv/Lib/site-packages/statsmodels/emplike/tests/test_aft.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
35
2020-02-04T14:46:25.000Z
2022-03-24T03:56:17.000Z
import numpy as np from numpy.testing import assert_almost_equal import pytest from statsmodels.datasets import heart from statsmodels.tools import add_constant from statsmodels.emplike.aft_el import emplikeAFT from .results.el_results import AFTRes class GenRes(object): @classmethod def setup_class(cls): ...
31.285714
70
0.622309
import numpy as np from numpy.testing import assert_almost_equal import pytest from statsmodels.datasets import heart from statsmodels.tools import add_constant from statsmodels.emplike.aft_el import emplikeAFT from .results.el_results import AFTRes class GenRes(object): @classmethod def setup_class(cls): ...
true
true
1c44780d3720b0a7ebaf9faf8a7f24a94a06d947
37,598
py
Python
tests/backends/aiida_django/migrations/test_migrations_many.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
tests/backends/aiida_django/migrations/test_migrations_many.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
1
2021-07-14T07:59:44.000Z
2021-08-01T10:31:09.000Z
tests/backends/aiida_django/migrations/test_migrations_many.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
44.653207
120
0.655088
import numpy from aiida.backends.testbase import AiidaTestCase from aiida.backends.djsite.db.migrations import ModelModifierV0025 from aiida.backends.general.migrations import utils from aiida.common.exceptions import IntegrityError from .test_migrations_common import TestMigrations class TestMigrationsModelModifier...
true
true
1c4478138375cda3bf6bd2ae41a6f112bb318389
3,278
py
Python
email_auth/models.py
vaibhavantil2/django-shop
10d82a0ae9096f501b90ad9fd585a378c789ee51
[ "BSD-3-Clause" ]
null
null
null
email_auth/models.py
vaibhavantil2/django-shop
10d82a0ae9096f501b90ad9fd585a378c789ee51
[ "BSD-3-Clause" ]
null
null
null
email_auth/models.py
vaibhavantil2/django-shop
10d82a0ae9096f501b90ad9fd585a378c789ee51
[ "BSD-3-Clause" ]
3
2021-11-16T12:28:49.000Z
2021-12-22T06:55:30.000Z
""" Alternative implementation of Django's authentication User model, which allows to authenticate against the email field in addition to the username fields. This alternative implementation is activated by setting ``AUTH_USER_MODEL = 'shop.User'`` in settings.py, otherwise the default Django or another customized impl...
40.469136
112
0.672971
from django.contrib.auth import get_user_model from django.contrib.auth.models import AbstractUser, UserManager as BaseUserManager from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ class UserManager(BaseUserManager): def get_by_natural_key(self, username): ...
true
true
1c4478cf27279c1b3b6d9d53a0f12f63325505c6
711
py
Python
stubs/micropython-v1_12-esp32/urandom.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_12-esp32/urandom.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_12-esp32/urandom.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'urandom' on micropython-v1.12-esp32 """ # MCU: {'ver': 'v1.12', 'port': 'esp32', 'arch': 'xtensawin', 'sysname': 'esp32', 'release': '1.12.0', 'name': 'micropython', 'mpy': 10757, 'version': '1.12.0', 'machine': 'ESP32 module (spiram) with ESP32', 'build': '', 'nodename': 'esp32', 'platform': 'esp32', 'fam...
20.314286
287
0.556962
from typing import Any def choice(*args, **kwargs) -> Any: ... def getrandbits(*args, **kwargs) -> Any: ... def randint(*args, **kwargs) -> Any: ... def random(*args, **kwargs) -> Any: ... def randrange(*args, **kwargs) -> Any: ... def seed(*args, **kwargs) -> Any: ... def uniform(...
true
true
1c4478e8f37c4dcc3ce6658c1bbadfe574f5833e
597
py
Python
Ch_7_Mangle Data Like a Pro/demo_of_re_findall.py
brianchiang-tw/Introducing_Python
557fcddb6329741a177d6ee1d24122b36e106235
[ "MIT" ]
1
2020-07-21T08:34:08.000Z
2020-07-21T08:34:08.000Z
Ch_7_Mangle Data Like a Pro/demo_of_re_findall.py
brianchiang-tw/Introducing_Python
557fcddb6329741a177d6ee1d24122b36e106235
[ "MIT" ]
null
null
null
Ch_7_Mangle Data Like a Pro/demo_of_re_findall.py
brianchiang-tw/Introducing_Python
557fcddb6329741a177d6ee1d24122b36e106235
[ "MIT" ]
null
null
null
import re source = 'Young Frankenstein' m = re.findall('n', source) if m: # Found 4 matches # ['n', 'n', 'n', 'n'] print(f'Found {len(m)} matches') print( m ) # --------------------------------- source = 'Young Frankenstein' m = re.findall('n.', source) if m: # Found 3 matches # ['ng', 'nk'...
18.65625
36
0.463987
import re source = 'Young Frankenstein' m = re.findall('n', source) if m: print(f'Found {len(m)} matches') print( m ) source = 'Young Frankenstein' m = re.findall('n.', source) if m: print(f'Found {len(m)} matches') print( m ) source = 'Young Frankenstein' m = re.findall('n.?', so...
true
true
1c4479a1081509e9c8cd3fe5ea7ce84bc8532189
6,919
py
Python
test/drivers/gaussiand/test_driver_gaussian_log.py
divshacker/qiskit-nature
08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb
[ "Apache-2.0" ]
1
2021-06-20T15:31:01.000Z
2021-06-20T15:31:01.000Z
test/drivers/gaussiand/test_driver_gaussian_log.py
divshacker/qiskit-nature
08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb
[ "Apache-2.0" ]
1
2021-08-25T13:31:41.000Z
2021-08-25T13:31:41.000Z
test/drivers/gaussiand/test_driver_gaussian_log.py
divshacker/qiskit-nature
08f6dcec5e4ac8c08f5b84e764ee78cc3d12facb
[ "Apache-2.0" ]
3
2021-07-02T06:57:58.000Z
2021-07-06T12:32:38.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2020, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
39.3125
95
0.533459
import unittest from test import QiskitNatureTestCase from qiskit_nature.drivers import GaussianLogDriver, GaussianLogResult from qiskit_nature import QiskitNatureError class TestDriverGaussianLog(QiskitNatureTestCase): def setUp(self): super().setUp() self.logfile = self.get_resource_path( ...
true
true
1c447a30344894966ddbd67d7e8299c130481086
391
py
Python
mediaman/services/drive/experiments/serviceaccounttest.py
MattCCS/MediaMan
388c0d16da437b0ede4f0903a01e41dc8e927ae6
[ "BSD-3-Clause-Clear" ]
1
2019-05-06T19:51:08.000Z
2019-05-06T19:51:08.000Z
mediaman/services/drive/experiments/serviceaccounttest.py
MattCCS/MediaMan
388c0d16da437b0ede4f0903a01e41dc8e927ae6
[ "BSD-3-Clause-Clear" ]
1
2021-02-08T20:22:34.000Z
2021-02-08T20:22:34.000Z
mediaman/services/drive/experiments/serviceaccounttest.py
MattCCS/MediaMan
388c0d16da437b0ede4f0903a01e41dc8e927ae6
[ "BSD-3-Clause-Clear" ]
null
null
null
# service account basic example import googleapiclient from apiclient.discovery import build drive = build("drive", "v3") drive.files().list().execute() file_metadata = {'name': 'test.txt'} media = googleapiclient.http.MediaFileUpload("test.txt") file_receipt = drive.files().create(body=file_metadata, media_body=medi...
27.928571
96
0.757033
import googleapiclient from apiclient.discovery import build drive = build("drive", "v3") drive.files().list().execute() file_metadata = {'name': 'test.txt'} media = googleapiclient.http.MediaFileUpload("test.txt") file_receipt = drive.files().create(body=file_metadata, media_body=media, fields="id").execute() file_r...
true
true
1c447aa8d452648be1850d869567b6b283f8f840
681
py
Python
tests_integration/helpers/archive_order_by_name.py
kmjennison/dfp-prebid-setup
d965f9a70e56a8444ecd80566028f09964b51d04
[ "MIT" ]
111
2017-03-09T02:05:25.000Z
2022-03-14T21:03:00.000Z
tests_integration/helpers/archive_order_by_name.py
kmjennison/dfp-prebid-setup
d965f9a70e56a8444ecd80566028f09964b51d04
[ "MIT" ]
81
2017-03-10T08:07:02.000Z
2022-03-02T04:44:06.000Z
tests_integration/helpers/archive_order_by_name.py
kmjennison/dfp-prebid-setup
d965f9a70e56a8444ecd80566028f09964b51d04
[ "MIT" ]
87
2017-03-16T21:38:53.000Z
2022-02-04T11:48:29.000Z
#!/usr/bin/env python import logging from googleads import ad_manager from dfp.client import get_client # from tests_integration.helpers.get_order_by_name import get_order_by_name def archive_order_by_name(order_name): """ Archives an order by name in DFP. Args: order_name (str): the name of the DFP orde...
24.321429
75
0.734214
import logging from googleads import ad_manager from dfp.client import get_client def archive_order_by_name(order_name): client = get_client() order_service = client.GetService('OrderService', version='v202108') statement = (ad_manager.StatementBuilder() .Where('name = :name') .WithBindVariable('name...
true
true
1c447be720a241ddbbc7be776decca7269ad922b
3,708
py
Python
scripts/classifier.py
michaelhalim168/GiftFinder
7fda99be827a06e5ef2d112174ded93ad1d3b7b1
[ "MIT" ]
null
null
null
scripts/classifier.py
michaelhalim168/GiftFinder
7fda99be827a06e5ef2d112174ded93ad1d3b7b1
[ "MIT" ]
null
null
null
scripts/classifier.py
michaelhalim168/GiftFinder
7fda99be827a06e5ef2d112174ded93ad1d3b7b1
[ "MIT" ]
1
2021-08-02T07:49:01.000Z
2021-08-02T07:49:01.000Z
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from sklearn.preprocessing import LabelEncoder from vaderSentiment...
41.2
132
0.677994
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from sklearn.preprocessing import LabelEncoder from vaderSentiment...
true
true
1c447ccae06de96876bb5c45dbe5c87ce36a611e
11,319
py
Python
RPLCD/i2c.py
sphh/RPLCD
c4dc451623da5e02292046388be5201cbc25321e
[ "MIT" ]
2
2020-09-06T17:05:06.000Z
2021-03-04T14:41:37.000Z
RPLCD/i2c.py
sphh/RPLCD
c4dc451623da5e02292046388be5201cbc25321e
[ "MIT" ]
6
2018-03-13T18:41:29.000Z
2020-08-29T11:41:52.000Z
RPLCD/i2c.py
sphh/RPLCD
c4dc451623da5e02292046388be5201cbc25321e
[ "MIT" ]
2
2020-08-05T04:01:34.000Z
2020-08-09T15:12:23.000Z
# -*- coding: utf-8 -*- """ Copyright (C) 2013-2017 Danilo Bargen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,...
42.235075
99
0.616044
from __future__ import print_function, division, absolute_import, unicode_literals from smbus import SMBus from . import common as c from .lcd import BaseCharLCD PCF8574_BACKLIGHT = 0x08 PCF8574_NOBACKLIGHT = 0x00 PCF8574_E = 0x4 PIN_READ_WRITE = 0x2 PIN_REGISTER_SELECT = 0x1 MCP230XX_BACKLIGHT = 0x80 MCP230XX_N...
true
true
1c447cd652110e5c98f244fcb259d5250072d56d
10,423
py
Python
Agenda Pessoal/src/views/views_classes/view_principal/classeTelaPrincipal.py
jao-victor/Agenda-Pessoal
39c9d1a61ff36c93daf49b799d45c665330b7155
[ "MIT" ]
1
2022-01-29T16:27:50.000Z
2022-01-29T16:27:50.000Z
Agenda Pessoal/src/views/views_classes/view_principal/classeTelaPrincipal.py
jao-victor/Agenda-Pessoal
39c9d1a61ff36c93daf49b799d45c665330b7155
[ "MIT" ]
null
null
null
Agenda Pessoal/src/views/views_classes/view_principal/classeTelaPrincipal.py
jao-victor/Agenda-Pessoal
39c9d1a61ff36c93daf49b799d45c665330b7155
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'telaPrincipal.ui' # # Created by: PyQt5 UI code generator 5.14.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): ...
43.610879
87
0.694905
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(950, 650) MainWindow.setMinimumSize(QtCore.QSize(950, 650)) MainWindow.setMaximumSize(QtCore.QSize(16777215, 16777215))...
true
true
1c447e118ee71765a18a3343c88e0fc0fd12ee27
555
py
Python
service-workers/service-worker/resources/update-missing-import-scripts-main-worker.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
service-workers/service-worker/resources/update-missing-import-scripts-main-worker.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
7,642
2018-05-28T09:38:03.000Z
2022-03-31T20:55:48.000Z
service-workers/service-worker/resources/update-missing-import-scripts-main-worker.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
from wptserve.utils import isomorphic_decode def main(request, response): key = request.GET[b'key'] already_requested = request.server.stash.take(key) header = [(b'Content-Type', b'application/javascript')] initial_script = u'importScripts("./update-missing-import-scripts-imported-worker.py?key={0}")'...
34.6875
130
0.722523
from wptserve.utils import isomorphic_decode def main(request, response): key = request.GET[b'key'] already_requested = request.server.stash.take(key) header = [(b'Content-Type', b'application/javascript')] initial_script = u'importScripts("./update-missing-import-scripts-imported-worker.py?key={0}")'...
true
true
1c447e3673bf441602a3991a418258f9af63b818
1,055
py
Python
manage.py
Zamy97/Algorithms_Explained
048022903da4199b3d245997e95c172cfbea508f
[ "MIT" ]
1
2020-09-22T14:29:46.000Z
2020-09-22T14:29:46.000Z
manage.py
Zamy97/Algorithms_Explained
048022903da4199b3d245997e95c172cfbea508f
[ "MIT" ]
null
null
null
manage.py
Zamy97/Algorithms_Explained
048022903da4199b3d245997e95c172cfbea508f
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure tha...
34.032258
77
0.664455
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError:...
true
true
1c447e6400e709ae86806edfead5fe49bd6a8135
1,374
py
Python
examples/async/exchange_client/spot_exchange_rpc/5_Orders.py
InjectiveLabs/sdk-python
d98382d450f4e6043d8fc34b621215fb14f958f2
[ "Apache-2.0" ]
10
2021-09-07T08:03:52.000Z
2022-03-08T08:39:30.000Z
examples/async/exchange_client/spot_exchange_rpc/5_Orders.py
InjectiveLabs/sdk-python
d98382d450f4e6043d8fc34b621215fb14f958f2
[ "Apache-2.0" ]
39
2021-08-19T20:09:35.000Z
2022-03-22T19:51:59.000Z
examples/async/exchange_client/spot_exchange_rpc/5_Orders.py
InjectiveLabs/sdk-python
d98382d450f4e6043d8fc34b621215fb14f958f2
[ "Apache-2.0" ]
5
2021-11-02T16:23:48.000Z
2022-01-20T22:30:05.000Z
# Copyright 2021 Injective Labs # # 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 writin...
36.157895
88
0.762009
import asyncio import logging from pyinjective.async_client import AsyncClient from pyinjective.constant import Network async def main() -> None: network = Network.testnet() client = AsyncClient(network, insecure=False) market_id = "0xa508cb32923323679f29a032c70342c147c17d0145625922b0ef22e955c844c0" ...
true
true
1c447eb7147743f31a6feffd42b5ffac2e5fe09c
24,457
py
Python
language/google/cloud/language_v1/gapic/language_service_client.py
nielm/google-cloud-python
fd126fdea34206109eb00d675374ff7dc4dcc5ef
[ "Apache-2.0" ]
1
2019-01-23T21:54:51.000Z
2019-01-23T21:54:51.000Z
language/google/cloud/language_v1/gapic/language_service_client.py
nielm/google-cloud-python
fd126fdea34206109eb00d675374ff7dc4dcc5ef
[ "Apache-2.0" ]
1
2018-04-06T19:51:23.000Z
2018-04-06T19:51:23.000Z
language/google/cloud/language_v1/gapic/language_service_client.py
nielm/google-cloud-python
fd126fdea34206109eb00d675374ff7dc4dcc5ef
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # 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 law...
43.517794
138
0.623339
import pkg_resources import warnings from google.oauth2 import service_account import google.api_core.gapic_v1.client_info import google.api_core.gapic_v1.config import google.api_core.gapic_v1.method import google.api_core.grpc_helpers import grpc from google.cloud.language_v1.gapic import enums from google.cloud.l...
true
true
1c447f987b088894b1ea955c47d379681276d285
935
py
Python
h2o-py/tests/testdir_munging/pyunit_insert_missing.py
kyoren/https-github.com-h2oai-h2o-3
77b27109c84c4739f9f1b7a3078f8992beefc813
[ "Apache-2.0" ]
1
2016-09-30T05:58:18.000Z
2016-09-30T05:58:18.000Z
h2o-py/tests/testdir_munging/pyunit_insert_missing.py
kyoren/https-github.com-h2oai-h2o-3
77b27109c84c4739f9f1b7a3078f8992beefc813
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_munging/pyunit_insert_missing.py
kyoren/https-github.com-h2oai-h2o-3
77b27109c84c4739f9f1b7a3078f8992beefc813
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(1, "../../") import h2o, tests def insert_missing(): # Connect to a pre-existing cluster data = [[1, 2, 3, 1, 'a', 1, 9], [1, 6, 4, 2, 'a', 1, 9], [2, 3, 8, 6, 'b', 1, 9], [3, 4, 3, 2, 'b', 3, 8], [4, 5, 9, 5, 'c', 2, 8], ...
33.392857
118
0.581818
import sys sys.path.insert(1, "../../") import h2o, tests def insert_missing(): data = [[1, 2, 3, 1, 'a', 1, 9], [1, 6, 4, 2, 'a', 1, 9], [2, 3, 8, 6, 'b', 1, 9], [3, 4, 3, 2, 'b', 3, 8], [4, 5, 9, 5, 'c', 2, 8], [5, 7, 10,7, 'b', 8, 8]] h2o...
true
true
1c447fa72332939a5d75336dc1a60c443e14a033
29,734
py
Python
pacu/modules/detection__disruption/main.py
damienjburks/pacu
5853f9668a7d78945c40d403bf88a47101ba2b3d
[ "BSD-3-Clause" ]
1
2021-12-22T22:39:49.000Z
2021-12-22T22:39:49.000Z
pacu/modules/detection__disruption/main.py
damienjburks/pacu
5853f9668a7d78945c40d403bf88a47101ba2b3d
[ "BSD-3-Clause" ]
null
null
null
pacu/modules/detection__disruption/main.py
damienjburks/pacu
5853f9668a7d78945c40d403bf88a47101ba2b3d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import argparse from copy import deepcopy module_info = { # Name of the module (should be the same as the filename) "name": "detection__disruption", # Name and any other notes about the author "author": "Spencer Gietzen of Rhino Security Labs", # Category of the module. Make...
41.997175
760
0.438723
import argparse from copy import deepcopy module_info = { "name": "detection__disruption", "author": "Spencer Gietzen of Rhino Security Labs", "category": "EVADE", "one_liner": "Disables, deletes, or minimizes various logging/monitoring services.", "description": "This module w...
true
true
1c4481625ea42757e76faf57067bad00031d262c
6,458
py
Python
src/qt/gui_tabRewards.py
Fuzzbawls/PIVX-SPMT
4d5157e452dc43894805c7149b897849dc900029
[ "MIT" ]
null
null
null
src/qt/gui_tabRewards.py
Fuzzbawls/PIVX-SPMT
4d5157e452dc43894805c7149b897849dc900029
[ "MIT" ]
null
null
null
src/qt/gui_tabRewards.py
Fuzzbawls/PIVX-SPMT
4d5157e452dc43894805c7149b897849dc900029
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import os.path sys.path.append(os.path.join(os.path.dirname(__file__), 'src')) from PyQt5.QtCore import Qt from PyQt5.Qt import QLabel, QFormLayout, QDoubleSpinBox, QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView,\ QCheckBox from PyQt5...
45.478873
123
0.658873
import sys import os.path sys.path.append(os.path.join(os.path.dirname(__file__), 'src')) from PyQt5.QtCore import Qt from PyQt5.Qt import QLabel, QFormLayout, QDoubleSpinBox, QTableWidget, QTableWidgetItem, QAbstractItemView, QHeaderView,\ QCheckBox from PyQt5.QtWidgets import QWidget, QPushButton, QHBoxLayo...
true
true
1c44828ab8ac3c3d9d148eb2ff2de1a5e2d9b4cb
611
py
Python
fastrunner/management/commands/cli.py
wss1029681084/FasterRunner
79f0c9ec00a6aa020c1fc48c5a257775412cd570
[ "MIT" ]
1
2018-12-18T06:07:39.000Z
2018-12-18T06:07:39.000Z
fastrunner/management/commands/cli.py
wss1029681084/FasterRunner
79f0c9ec00a6aa020c1fc48c5a257775412cd570
[ "MIT" ]
null
null
null
fastrunner/management/commands/cli.py
wss1029681084/FasterRunner
79f0c9ec00a6aa020c1fc48c5a257775412cd570
[ "MIT" ]
null
null
null
# encoding: utf-8 # -*- coding:utf-8 -*- from django.core.management.base import BaseCommand from httprunner import logger from FasterRunner.__about__ import __version__ class Command(BaseCommand): def add_arguments(self, parser): """ API test: parse command line options and run commands. "...
26.565217
67
0.621931
from django.core.management.base import BaseCommand from httprunner import logger from FasterRunner.__about__ import __version__ class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument( '-V', '--Version', dest='version', action='store_true', help="show v...
true
true
1c4482d3efed66b2dcba6ba7a251c16ecf685d36
1,606
py
Python
twilio/rest/resources/recordings.py
ProGamerCode/workshop
a45a7e9a0982e1b0d183ce2787d6cbb069acf03d
[ "MIT" ]
3
2015-07-04T07:23:32.000Z
2016-04-06T21:51:37.000Z
twilio/rest/resources/recordings.py
ProGamerCode/workshop
a45a7e9a0982e1b0d183ce2787d6cbb069acf03d
[ "MIT" ]
null
null
null
twilio/rest/resources/recordings.py
ProGamerCode/workshop
a45a7e9a0982e1b0d183ce2787d6cbb069acf03d
[ "MIT" ]
8
2015-07-04T07:24:08.000Z
2020-04-27T02:23:49.000Z
from twilio.rest.resources.util import normalize_dates from twilio.rest.resources import InstanceResource, ListResource class Transcription(InstanceResource): pass class Transcriptions(ListResource): name = "Transcriptions" instance = Transcription def list(self, **kwargs): """ Re...
25.09375
76
0.625156
from twilio.rest.resources.util import normalize_dates from twilio.rest.resources import InstanceResource, ListResource class Transcription(InstanceResource): pass class Transcriptions(ListResource): name = "Transcriptions" instance = Transcription def list(self, **kwargs): return self.ge...
true
true
1c44840024dc6589b681daa749547890a83a74f1
72,269
py
Python
core/controllers/suggestion_test.py
prayutsu/oppia
e82da7653f7bbfb9ded0e1ba16cd9f481ff5a786
[ "Apache-2.0" ]
2
2020-03-28T18:32:45.000Z
2021-02-07T18:29:31.000Z
core/controllers/suggestion_test.py
prayutsu/oppia
e82da7653f7bbfb9ded0e1ba16cd9f481ff5a786
[ "Apache-2.0" ]
35
2019-02-23T20:31:21.000Z
2019-08-19T12:32:13.000Z
core/controllers/suggestion_test.py
prayutsu/oppia
e82da7653f7bbfb9ded0e1ba16cd9f481ff5a786
[ "Apache-2.0" ]
1
2021-01-28T05:20:56.000Z
2021-01-28T05:20:56.000Z
# coding: utf-8 # # Copyright 2018 The Oppia 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 requi...
41.249429
111
0.602195
from __future__ import absolute_import from __future__ import unicode_literals import os from constants import constants from core.domain import exp_domain from core.domain import exp_fetchers from core.domain import exp_services from core.domain import feedback_services from core.domain import fs_domain from cor...
true
true
1c4484ec00c3b5a988f8610e8065d78bbfbd8918
5,672
py
Python
test/functional/wallet_dump.py
Nugetzrul3/dogecash
f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1
[ "MIT" ]
52
2018-10-08T07:17:35.000Z
2021-11-29T22:53:08.000Z
test/functional/wallet_dump.py
Nugetzrul3/dogecash
f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1
[ "MIT" ]
50
2018-10-20T10:42:54.000Z
2021-02-15T21:53:51.000Z
test/functional/wallet_dump.py
Nugetzrul3/dogecash
f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1
[ "MIT" ]
53
2018-11-03T16:42:43.000Z
2021-12-11T03:55:21.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the dumpwallet RPC.""" import os from test_framework.test_framework import DogeCashTestFramework...
42.646617
192
0.603491
import os from test_framework.test_framework import DogeCashTestFramework from test_framework.util import (assert_equal, assert_raises_rpc_error) def read_dump(file_name, addrs, hd_master_addr_old): with open(file_name, encoding='utf8') as inputfile: found_addr = 0 found_addr_chg = 0 fou...
true
true
1c4485f443652f42f9ae85bde81f45cc658539e0
16,941
py
Python
python/GafferTest/CompoundDataPlugTest.py
sebaDesmet/gaffer
47b2d093c40452bd77947e3b5bd0722a366c8d59
[ "BSD-3-Clause" ]
null
null
null
python/GafferTest/CompoundDataPlugTest.py
sebaDesmet/gaffer
47b2d093c40452bd77947e3b5bd0722a366c8d59
[ "BSD-3-Clause" ]
null
null
null
python/GafferTest/CompoundDataPlugTest.py
sebaDesmet/gaffer
47b2d093c40452bd77947e3b5bd0722a366c8d59
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
34.432927
143
0.648309
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import unittest import imath import IECore import Gaffer import GafferTest class CompoundDataPlugTest( GafferTest.TestCase ) : def test( self ) : p = Gaffer.CompoundDataPlug() m1 = Gaffer.NameValuePlug( "a", IECore.IntData( 10 ), "...
true
true
1c4487923cc10926d95b12ba8c29699382d7d631
68,540
py
Python
src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
dcoudert/sage
c349c87d0dea805c92d589a259c4ed1a20407ca5
[ "BSL-1.0" ]
null
null
null
src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
dcoudert/sage
c349c87d0dea805c92d589a259c4ed1a20407ca5
[ "BSL-1.0" ]
null
null
null
src/sage/algebras/hecke_algebras/ariki_koike_algebra.py
dcoudert/sage
c349c87d0dea805c92d589a259c4ed1a20407ca5
[ "BSL-1.0" ]
null
null
null
# -*- coding: utf-8 -*- r""" Ariki-Koike Algebras The *Ariki-Koike algebras* were introduced by Ariki and Koike [AK1994]_ as a natural generalization of the Iwahori-Hecke algebras of types `A` and `B` (see :class:`~sage.algebras.iwahori_hecke_algebra.IwahoriHeckeAlgebra`). Soon afterwards, Broué and Malle defined ana...
38.876914
115
0.442048
from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.misc.misc_c import prod from sage.misc.bindable_class import BindableClass from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation from sage.categories.al...
true
true
1c4488741e7017b609ea544ddd3f3c1aae65f69f
3,703
py
Python
src/sima/simo/wasimresultexport.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/simo/wasimresultexport.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/simo/wasimresultexport.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# This an autogenerated file # # Generated with WasimResultExport from __future__ import annotations from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.wasimresultexport import WasimResultExportBlueprint from typing import Dict from sima.sima.moao i...
29.15748
96
0.649473
from __future__ import annotations from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.wasimresultexport import WasimResultExportBlueprint from typing import Dict from sima.sima.moao import MOAO from sima.sima.scriptablevalue import ScriptableValue fr...
true
true
1c4488e1a483c60aa43bdc2ef73a7cb25713757e
7,609
py
Python
tf_agents/environments/atari_preprocessing.py
wookayin/tensorflow-agents
ae3751dfeed52422a350227047648dd82297960b
[ "Apache-2.0" ]
2
2018-12-20T01:49:33.000Z
2019-12-09T13:17:05.000Z
tf_agents/environments/atari_preprocessing.py
Akshay22121995/agents
1455410dffed3cfdede793b87c179965cdd27d22
[ "Apache-2.0" ]
null
null
null
tf_agents/environments/atari_preprocessing.py
Akshay22121995/agents
1455410dffed3cfdede793b87c179965cdd27d22
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
32.939394
80
0.697858
from __future__ import absolute_import from __future__ import division from __future__ import print_function from gym.spaces.box import Box import numpy as np import gin.tf import cv2 @gin.configurable class AtariPreprocessing(object): def __init__(self, environment, frame_skip=4, ...
true
true
1c448ad0afaccfbc61915a4250834d2e0132d2f5
38
py
Python
complute.py
liukuan127/HelloGitHub
54802e44e3feae5d292d9b68817ce4d9107d214a
[ "Apache-2.0" ]
null
null
null
complute.py
liukuan127/HelloGitHub
54802e44e3feae5d292d9b68817ce4d9107d214a
[ "Apache-2.0" ]
null
null
null
complute.py
liukuan127/HelloGitHub
54802e44e3feae5d292d9b68817ce4d9107d214a
[ "Apache-2.0" ]
null
null
null
add = lambda a,b:a+b print(add(2,5))
9.5
20
0.605263
add = lambda a,b:a+b print(add(2,5))
true
true
1c448b851bdb5f9d335383f735e2b275471ee8fb
521
py
Python
aptly_api/parts/db.py
masselstine/aptly-api-client
dc8034a2b624b42f54d2e55ce2ad90e2fe165a33
[ "BSD-3-Clause" ]
null
null
null
aptly_api/parts/db.py
masselstine/aptly-api-client
dc8034a2b624b42f54d2e55ce2ad90e2fe165a33
[ "BSD-3-Clause" ]
null
null
null
aptly_api/parts/db.py
masselstine/aptly-api-client
dc8034a2b624b42f54d2e55ce2ad90e2fe165a33
[ "BSD-3-Clause" ]
null
null
null
# -* encoding: utf-8 *- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from typing import cast from aptly_api.base import BaseAPIClient from aptly_api.parts.tasks imp...
32.5625
69
0.731286
from typing import cast from aptly_api.base import BaseAPIClient from aptly_api.parts.tasks import TaskAPISection, Task class DbAPISection(BaseAPIClient): def cleanup(self) -> Task: resp = self.do_post("api/db/cleanup") return TaskAPISection.task_from_response(resp.json())
true
true