hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72128c8178af94dd8a0a21b6e9bdb1ebcf3a076
2,575
py
Python
graphs/karger.py
jenia90/Python
696fb4a681ad9e4d84e0d2b894daf449a3e30b24
[ "MIT" ]
145,614
2016-07-21T05:40:05.000Z
2022-03-31T22:17:22.000Z
graphs/karger.py
Agha-Muqarib/Python
04f156a8973d6156a4357e0717d9eb0aa264d086
[ "MIT" ]
3,987
2016-07-28T17:31:25.000Z
2022-03-30T23:07:46.000Z
graphs/karger.py
Agha-Muqarib/Python
04f156a8973d6156a4357e0717d9eb0aa264d086
[ "MIT" ]
40,014
2016-07-26T15:14:41.000Z
2022-03-31T22:23:03.000Z
""" An implementation of Karger's Algorithm for partitioning a graph. """ from __future__ import annotations import random # Adjacency list representation of this graph: # https://en.wikipedia.org/wiki/File:Single_run_of_Karger%E2%80%99s_Mincut_algorithm.svg TEST_GRAPH = { "1": ["2", "3", "4", "5"], "2": ["1...
29.597701
88
0.572816
from __future__ import annotations import random TEST_GRAPH = { "1": ["2", "3", "4", "5"], "2": ["1", "3", "4", "5"], "3": ["1", "2", "4", "5", "10"], "4": ["1", "2", "3", "5", "6"], "5": ["1", "2", "3", "4", "7"], "6": ["7", "8", "9", "10", "4"], "7": ["6", "8", "9", "10", "5"], "8...
true
true
f721291ec9a303b02a2cdf00dbe42788ad4a0a98
1,661
py
Python
setup.py
chermed/assembly
4c993d19bc9d33c1641323e03231e9ecad711b38
[ "MIT" ]
176
2019-11-16T19:44:08.000Z
2021-09-10T22:16:04.000Z
setup.py
chermed/assembly
4c993d19bc9d33c1641323e03231e9ecad711b38
[ "MIT" ]
12
2019-11-21T02:02:07.000Z
2020-02-17T21:45:57.000Z
setup.py
chermed/assembly
4c993d19bc9d33c1641323e03231e9ecad711b38
[ "MIT" ]
12
2019-11-20T08:07:11.000Z
2021-02-27T09:52:06.000Z
""" Assembly """ import os from setuptools import setup, find_packages base_dir = os.path.dirname(__file__) __about__ = {} with open(os.path.join(base_dir, "assembly", "about.py")) as f: exec(f.read(), __about__) with open('requirements.txt') as f: install_requires = f.read().splitlines() with open("READM...
27.683333
81
0.615292
import os from setuptools import setup, find_packages base_dir = os.path.dirname(__file__) __about__ = {} with open(os.path.join(base_dir, "assembly", "about.py")) as f: exec(f.read(), __about__) with open('requirements.txt') as f: install_requires = f.read().splitlines() with open("README.md", "r") as f:...
true
true
f7212933bf16d8d621d170fadea4f1c611eeef47
2,438
py
Python
.history/postImages/index_20201006214330.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
2
2020-10-21T22:14:15.000Z
2020-10-21T22:14:16.000Z
.history/postImages/index_20201006214330.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
.history/postImages/index_20201006214330.py
Lambda-School-Labs/Labs27-C-Bridges-To-Prosperity-BE
9a8289d8550115362c46dea3ed8570b789c09a10
[ "MIT" ]
null
null
null
import csv import requests df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] # url = https://b2ptc.herokuapp.com/bridges finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_im...
30.475
97
0.454471
import csv import requests df = open("bridgeData3.csv",'r').readlines() fin = open('final.csv','r').readlines() finCsv = fin[1:] finalCsv = df[1:] obj = {} for i in finalCsv: x = i.split(',') obj[x[1]] = {'bridge_name':x[0],'proj_code':x[1],'before_img':x[2],'after_img':x[3][0:-1]} finalObj = {} for i in finC...
true
true
f7212939f549dcbfa9bf8b9ff6fb82924b643d38
1,241
py
Python
harnesses/dict_conv.py
ujjwalsh/oniguruma
604ea58f210b301d572b9fcf89d6e03fbb1df1f9
[ "BSD-2-Clause" ]
1,793
2015-07-20T14:14:18.000Z
2022-03-29T13:00:16.000Z
harnesses/dict_conv.py
ujjwalsh/oniguruma
604ea58f210b301d572b9fcf89d6e03fbb1df1f9
[ "BSD-2-Clause" ]
183
2015-09-04T14:00:57.000Z
2022-03-19T15:52:13.000Z
harnesses/dict_conv.py
ujjwalsh/oniguruma
604ea58f210b301d572b9fcf89d6e03fbb1df1f9
[ "BSD-2-Clause" ]
339
2015-09-03T11:13:46.000Z
2022-03-20T08:21:15.000Z
# -*- coding: utf-8 -*- # dict_conv.py (Python3 script) import sys ENC_UTF16_BE = 1 ENC_UTF16_LE = 2 def add_char(enc, s, c): if enc == ENC_UTF16_BE: s += "\\x00" s += c if enc == ENC_UTF16_LE: s += "\\x00" return s def conv(enc, s): n = len(s) r = "" i = 0 while i < n: c = s[i] i...
17
75
0.498791
import sys ENC_UTF16_BE = 1 ENC_UTF16_LE = 2 def add_char(enc, s, c): if enc == ENC_UTF16_BE: s += "\\x00" s += c if enc == ENC_UTF16_LE: s += "\\x00" return s def conv(enc, s): n = len(s) r = "" i = 0 while i < n: c = s[i] if c == '\\': c = s[i+1] if c == '\\' or c =...
true
true
f721296a022523474df762cfe7ddb9431b342931
1,300
py
Python
src/relaxed/infer/hypothesis_test.py
gradhep/smooth
9ed6f1d622fb5346c46f1b9f62aed886b73fe09a
[ "BSD-3-Clause" ]
4
2020-05-18T17:43:07.000Z
2020-07-13T12:05:10.000Z
src/relaxed/infer/hypothesis_test.py
gradhep/relaxed
9ed6f1d622fb5346c46f1b9f62aed886b73fe09a
[ "BSD-3-Clause" ]
13
2021-05-13T20:59:55.000Z
2022-03-25T12:04:44.000Z
src/relaxed/infer/hypothesis_test.py
gradhep/relaxed
9ed6f1d622fb5346c46f1b9f62aed886b73fe09a
[ "BSD-3-Clause" ]
3
2020-05-21T13:24:10.000Z
2021-04-22T12:36:33.000Z
"""Calculate expected CLs values with hypothesis tests.""" from __future__ import annotations __all__ = ("hypotest",) from functools import partial import jax.numpy as jnp import pyhf from chex import Array from jax import jit from ..mle import fit, fixed_poi_fit @partial(jit, static_argnames=["model", "return_ml...
30.232558
81
0.698462
from __future__ import annotations __all__ = ("hypotest",) from functools import partial import jax.numpy as jnp import pyhf from chex import Array from jax import jit from ..mle import fit, fixed_poi_fit @partial(jit, static_argnames=["model", "return_mle_pars"]) def hypotest( test_poi: float, data: Ar...
true
true
f7212c9ffcc95acbd3066fc3058f89d2b03ec98b
1,750
py
Python
cheeseprism/event.py
msabramo/CheesePrism
3880528fb5a83fc650860d41e77729853081d404
[ "BSD-2-Clause" ]
null
null
null
cheeseprism/event.py
msabramo/CheesePrism
3880528fb5a83fc650860d41e77729853081d404
[ "BSD-2-Clause" ]
null
null
null
cheeseprism/event.py
msabramo/CheesePrism
3880528fb5a83fc650860d41e77729853081d404
[ "BSD-2-Clause" ]
null
null
null
from zope.interface import Attribute from zope.interface import Interface from zope.interface import implements class IIndexEvent(Interface): """ An lower level event involving the index """ class IIndexUpdate(Interface): """ An low level event involving the index """ class IPackag...
22.727273
93
0.668571
from zope.interface import Attribute from zope.interface import Interface from zope.interface import implements class IIndexEvent(Interface): class IIndexUpdate(Interface): class IPackageEvent(IIndexEvent): path = Attribute('Path to package') class IPackageAdded(IPackageEvent): class IPackageRemov...
true
true
f7212d29fbadd9f4d8375d99f948230868b7821d
520
py
Python
tests/test_parallel.py
seznam/flexp
84043150a80474809d066a06db02cbbd858f349e
[ "BSD-3-Clause" ]
6
2018-05-30T10:41:56.000Z
2020-08-05T16:47:54.000Z
tests/test_parallel.py
seznam/flexp
84043150a80474809d066a06db02cbbd858f349e
[ "BSD-3-Clause" ]
39
2018-07-11T14:44:01.000Z
2019-08-06T12:27:43.000Z
tests/test_parallel.py
seznam/flexp
84043150a80474809d066a06db02cbbd858f349e
[ "BSD-3-Clause" ]
3
2018-07-11T14:54:39.000Z
2019-04-07T04:47:29.000Z
from __future__ import print_function import time import unittest from flexp.flow.parallel import parallelize def add_two(x): return x + 2 class TestParallel(unittest.TestCase): def test_parallel(self): count = 50 data = range(0, count) start = time.clock() res = list(par...
20.8
55
0.617308
from __future__ import print_function import time import unittest from flexp.flow.parallel import parallelize def add_two(x): return x + 2 class TestParallel(unittest.TestCase): def test_parallel(self): count = 50 data = range(0, count) start = time.clock() res = list(par...
true
true
f7212eed7b4fc035239879fd2bda4106c25fb513
2,399
py
Python
CNN/extract.py
skywolf829/CSE5559_Final_Project
c7b29e6fc0cbfd81252edbadaa0d733a0c24bee7
[ "MIT" ]
null
null
null
CNN/extract.py
skywolf829/CSE5559_Final_Project
c7b29e6fc0cbfd81252edbadaa0d733a0c24bee7
[ "MIT" ]
null
null
null
CNN/extract.py
skywolf829/CSE5559_Final_Project
c7b29e6fc0cbfd81252edbadaa0d733a0c24bee7
[ "MIT" ]
1
2020-05-02T05:58:55.000Z
2020-05-02T05:58:55.000Z
## Basic Python libraries import os from PIL import Image ## Deep learning and array processing libraries import numpy as np import torch import torch.nn.functional as F import torchvision import torchvision.transforms as transforms ## Inner-project imports from model import EncoderCNN, DecoderRNN ##### Code begi...
28.903614
132
0.709462
rt Image .nn.functional as F import torchvision import torchvision.transforms as transforms derCNN, DecoderRNN ork_directory}encoder-5-3000.pkl' if torch.cuda.is_available(): compute_device = torch.device('cuda:0') else: compute_device = torch.device('cpu') print(f'Using device: {compute_device}') tran...
true
true
f72130741418bf63d0a3ae4aa5d952c8d92a5ac0
72
py
Python
python/dcf-tools/dcf2dev/__init__.py
tshu/lely-core
fd0ceff2db726af6d2a766039a0b5a6d33d056e8
[ "Apache-2.0" ]
4
2020-12-27T11:31:57.000Z
2022-02-09T11:32:08.000Z
python/dcf-tools/dcf2dev/__init__.py
DroidDrive/lely-core
2ec4560f513264a53d2afaedecdae4a49a39023c
[ "Apache-2.0" ]
null
null
null
python/dcf-tools/dcf2dev/__init__.py
DroidDrive/lely-core
2ec4560f513264a53d2afaedecdae4a49a39023c
[ "Apache-2.0" ]
1
2022-01-03T01:41:59.000Z
2022-01-03T01:41:59.000Z
from .cdevice import CDevice, CObject, CSubObject, CValue # noqa: F401
36
71
0.763889
from .cdevice import CDevice, CObject, CSubObject, CValue
true
true
f72130c7c2fc80d8513e06cfe21833534c1bec7a
1,022
py
Python
tools/grafana/daemon/lib/parse/sen_bin_parse.py
Flowm/move-on-helium-sensors
3794d38671e1976c9801bcb8a9639465cdddb731
[ "Apache-2.0" ]
1
2021-11-11T01:49:28.000Z
2021-11-11T01:49:28.000Z
tools/grafana/daemon/lib/parse/sen_bin_parse.py
Flowm/move-on-helium-sensors
3794d38671e1976c9801bcb8a9639465cdddb731
[ "Apache-2.0" ]
null
null
null
tools/grafana/daemon/lib/parse/sen_bin_parse.py
Flowm/move-on-helium-sensors
3794d38671e1976c9801bcb8a9639465cdddb731
[ "Apache-2.0" ]
null
null
null
import logging from subprocess import Popen, PIPE, STDOUT from lib.parse.sen_ascii_parse import SenAsciiParse class SenBinParse: def __init__(self): self.ascii_parser = SenAsciiParse() def parse_packet(self, packet, with_header=True): if len(packet) < 10: return length = ...
28.388889
106
0.596869
import logging from subprocess import Popen, PIPE, STDOUT from lib.parse.sen_ascii_parse import SenAsciiParse class SenBinParse: def __init__(self): self.ascii_parser = SenAsciiParse() def parse_packet(self, packet, with_header=True): if len(packet) < 10: return length = ...
true
true
f72130ca917b168f52b2f7177e043fcb23096456
1,897
py
Python
tools/concatlibs.py
ZECTBynmo/tacnode
344d0a10b3766c47538e4917e0ef4d59e07f9b9e
[ "BSD-2-Clause" ]
28
2015-01-28T11:17:04.000Z
2022-02-07T12:48:22.000Z
tools/concatlibs.py
ZECTBynmo/tacnode
344d0a10b3766c47538e4917e0ef4d59e07f9b9e
[ "BSD-2-Clause" ]
null
null
null
tools/concatlibs.py
ZECTBynmo/tacnode
344d0a10b3766c47538e4917e0ef4d59e07f9b9e
[ "BSD-2-Clause" ]
5
2015-01-29T19:34:45.000Z
2019-03-17T11:15:26.000Z
import os import sys ############## # NOTE: You will need to build boost # On windows, use the following command from the visual studio command # prompt (after running boostrap.bat) # # bjam --build-dir=c:\boost --build-type=complete --toolset=msvc-9.0 address-model=64 architecture=x86 --with-system ############## cu...
30.596774
153
0.698471
import os import sys gd-1_52.lib"; inputLibs = [ currentPath+'/'+config+"/lib/node.lib", currentPath+'/build/'+config+"/lib/v8_base.lib", currentPath+'/build/'+config+"/lib/v8_nosnapshot.lib", currentPath+'/build/'+config+"/lib/v8_snapshot.lib", currentPath+'/'+config+"/lib/libuv.lib", curre...
true
true
f72130ecddae709848f93c0001cf6167db8fb692
3,950
py
Python
google/ads/google_ads/v4/proto/enums/mobile_app_vendor_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
1
2021-04-09T04:28:47.000Z
2021-04-09T04:28:47.000Z
google/ads/google_ads/v4/proto/enums/mobile_app_vendor_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v4/proto/enums/mobile_app_vendor_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v4/proto/enums/mobile_app_vendor.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf impor...
38.72549
649
0.786076
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db ...
true
true
f72131ada34d81d06455b0c8be1ca2dd4d1e24ee
5,159
py
Python
checkpoints/sum/train/hotel_mask/batch_size_16-notes_new_subword/code_snapshot/generate_from_lm.py
Saibo-creator/Text-Summrize-Project
d5ce54193110452a18cc0b223360c2bd004b4b28
[ "Apache-2.0" ]
null
null
null
checkpoints/sum/train/hotel_mask/batch_size_16-notes_new_subword/code_snapshot/generate_from_lm.py
Saibo-creator/Text-Summrize-Project
d5ce54193110452a18cc0b223360c2bd004b4b28
[ "Apache-2.0" ]
null
null
null
checkpoints/sum/train/hotel_mask/batch_size_16-notes_new_subword/code_snapshot/generate_from_lm.py
Saibo-creator/Text-Summrize-Project
d5ce54193110452a18cc0b223360c2bd004b4b28
[ "Apache-2.0" ]
null
null
null
# generate_from_lm.py """ Load a trained language model and generate text Example usage: PYTHONPATH=. python generate_from_lm.py \ --init="Although the food" --tau=0.5 \ --sample_method=gumbel --g_eps=1e-5 \ --load_model='checkpoints/lm/mlstm/hotel/batch_size_64/lm_e9_2.93.pt' \ --dataset='hotel' --cpu=1 --sample_met...
33.070513
104
0.629192
import pdb import torch import torch.nn as nn from models.custom_parallel import DataParallelModel from models.mlstm import StackedLSTMEncoderDecoder from models.nn_utils import move_to_cuda, setup_gpus, logits_to_prob, prob_to_vocab_id from project_settings import HParams, PAD_ID, DatasetConfig from utils import l...
true
true
f721321d98af2205ce169d3d88af0b431e7731ea
1,235
py
Python
sysinv/sysinv/sysinv/sysinv/objects/interface_base.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/objects/interface_base.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/objects/interface_base.py
etaivan/stx-config
281e1f110973f96e077645fb01f67b646fc253cc
[ "Apache-2.0" ]
1
2021-01-05T16:24:58.000Z
2021-01-05T16:24:58.000Z
# # Copyright (c) 2013-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # from sysinv.db import api as db_api from sysinv.objects import base from sysinv.objects import utils def _get_interface_name_list(field, db_object): ifnames...
25.204082
53
0.637247
from sysinv.db import api as db_api from sysinv.objects import base from sysinv.objects import utils def _get_interface_name_list(field, db_object): ifnames = [] for i in db_object[field]: ifnames.append(i['ifname']) return ifnames class InterfaceBase(base.SysinvObject): dbapi = d...
true
true
f72133aff214d90410fb19b8ccb50eafa1390f3b
12,732
py
Python
datalad/customremotes/tests/test_archives.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
1
2021-06-11T19:54:19.000Z
2021-06-11T19:54:19.000Z
datalad/customremotes/tests/test_archives.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
1
2019-08-30T14:45:33.000Z
2019-08-30T14:45:33.000Z
datalad/customremotes/tests/test_archives.py
christinerogers/datalad
8b91f3767b45371e213aa7ade146a290a13c00f2
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
37.011628
116
0.654807
"VERSION 1", re_=True, match=False) ok_file_has_content(protocol_file, "GETAVAILABILITY", re_=True, match=False) ok_file_has_content(protocol_file, "#!/bin/bash", re_=True, match=False) else: assert_false(isinstance(annex.cmd_call_wrapper.protocol, AnnexExchangeProtocol)) # verify th...
true
true
f7213680738375f96a2084c20c14a5024e5d194e
5,679
py
Python
salt/states/postgres_extension.py
trebuchet-deploy/salt
dcdf1148248912a4592f0f48d2303903588729cc
[ "Apache-2.0" ]
null
null
null
salt/states/postgres_extension.py
trebuchet-deploy/salt
dcdf1148248912a4592f0f48d2303903588729cc
[ "Apache-2.0" ]
null
null
null
salt/states/postgres_extension.py
trebuchet-deploy/salt
dcdf1148248912a4592f0f48d2303903588729cc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Management of PostgreSQL extensions (e.g.: postgis) =================================================== The postgres_extensions module is used to create and manage Postgres extensions. .. code-block:: yaml adminpack: postgres_extension.present ''' # Import Python libs import lo...
26.537383
80
0.559606
import logging from salt.modules import postgres log = logging.getLogger(__name__) def __virtual__(): return 'postgres.create_extension' in __salt__ def present(name, if_not_exists=None, schema=None, ext_version=None, from_version=None, user=None...
true
true
f72136d4758f64cffd134ac0eafb88595992711c
10,305
py
Python
fairseq/progress_bar.py
jxhe/fairseq
214e3fed5619733efa4f1f82c61db58e5ce08ad8
[ "MIT" ]
null
null
null
fairseq/progress_bar.py
jxhe/fairseq
214e3fed5619733efa4f1f82c61db58e5ce08ad8
[ "MIT" ]
null
null
null
fairseq/progress_bar.py
jxhe/fairseq
214e3fed5619733efa4f1f82c61db58e5ce08ad8
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Wrapper around various loggers and progress bars (e.g., tqdm). """ from collections import OrderedDict from contextlib import contextmana...
33.028846
104
0.612033
from collections import OrderedDict from contextlib import contextmanager import json import logging from numbers import Number import os import sys import torch from fairseq import distributed_utils from fairseq.meters import AverageMeter, StopwatchMeter, TimeMeter logger = logging.getLogger(__name__) def ...
true
true
f72137bf78f559bfe97edbab30e7988e13d94b58
327
py
Python
truck_microservice/truck_microservice/urls.py
getnosleep/VirtualUnjam
bae08eec9756c963dab409c6e4e7397ef019cc8a
[ "MIT" ]
null
null
null
truck_microservice/truck_microservice/urls.py
getnosleep/VirtualUnjam
bae08eec9756c963dab409c6e4e7397ef019cc8a
[ "MIT" ]
null
null
null
truck_microservice/truck_microservice/urls.py
getnosleep/VirtualUnjam
bae08eec9756c963dab409c6e4e7397ef019cc8a
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path, include from rest_framework import routers router = routers.DefaultRouter() urlpatterns = [ path('', include(router.urls)), path('api-auth/', include('rest_framework.urls')), path('admin/', admin.site.urls), path('api/', include('truck.urls...
27.25
54
0.700306
from django.contrib import admin from django.urls import path, include from rest_framework import routers router = routers.DefaultRouter() urlpatterns = [ path('', include(router.urls)), path('api-auth/', include('rest_framework.urls')), path('admin/', admin.site.urls), path('api/', include('truck.urls...
true
true
f72137f9085fd5053b6df852024426c114db9e8c
7,174
py
Python
cogdl/models/emb/netsmf.py
wsyCUHK/cogdl
7a0e36326fc653d85378e3845ec14ebd9425a9b6
[ "MIT" ]
1
2021-12-16T11:53:20.000Z
2021-12-16T11:53:20.000Z
cogdl/models/emb/netsmf.py
wsyCUHK/cogdl
7a0e36326fc653d85378e3845ec14ebd9425a9b6
[ "MIT" ]
null
null
null
cogdl/models/emb/netsmf.py
wsyCUHK/cogdl
7a0e36326fc653d85378e3845ec14ebd9425a9b6
[ "MIT" ]
null
null
null
import numpy as np import networkx as nx import scipy.sparse as sp from sklearn import preprocessing from sklearn.utils.extmath import randomized_svd from multiprocessing import Pool from tqdm import tqdm import time from cogdl.utils import alias_draw, alias_setup from .. import BaseModel class NetSMF(BaseModel): ...
41.229885
117
0.598411
import numpy as np import networkx as nx import scipy.sparse as sp from sklearn import preprocessing from sklearn.utils.extmath import randomized_svd from multiprocessing import Pool from tqdm import tqdm import time from cogdl.utils import alias_draw, alias_setup from .. import BaseModel class NetSMF(BaseModel): ...
true
true
f7213978ccd0f01659e3efbbcfb25973a4e526b4
877
py
Python
CTFd/forms/challenges.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
CTFd/forms/challenges.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
CTFd/forms/challenges.py
KaitoRyouga/CTFd
827a22e8ce9bdfd43ae0689e6cbcf2a6e253e920
[ "Apache-2.0" ]
null
null
null
from wtforms import MultipleFileField, SelectField, StringField from wtforms.validators import InputRequired from CTFd.forms import BaseForm from CTFd.forms.fields import SubmitField class ChallengeSearchForm(BaseForm): field = SelectField( "Search Field", choices=[ ("name"...
28.290323
79
0.608894
from wtforms import MultipleFileField, SelectField, StringField from wtforms.validators import InputRequired from CTFd.forms import BaseForm from CTFd.forms.fields import SubmitField class ChallengeSearchForm(BaseForm): field = SelectField( "Search Field", choices=[ ("name"...
true
true
f72139a7d81181702d6d08b0921ed75b1e2aa778
2,422
py
Python
staicoin/consensus/block_rewards.py
d00kSI/staicoin-blockchain
5783a48271c8145c8eea93169df13a9ed32817ad
[ "Apache-2.0" ]
1
2021-12-03T02:39:29.000Z
2021-12-03T02:39:29.000Z
staicoin/consensus/block_rewards.py
d00kSI/staicoin-blockchain
5783a48271c8145c8eea93169df13a9ed32817ad
[ "Apache-2.0" ]
null
null
null
staicoin/consensus/block_rewards.py
d00kSI/staicoin-blockchain
5783a48271c8145c8eea93169df13a9ed32817ad
[ "Apache-2.0" ]
null
null
null
from staicoin.util.ints import uint32, uint64 # 1 stai coin = 1,000,000,000 = 1 billion mojo. _mojo_per_staicoin = 1000000000 _blocks_per_year = 1681920 # 32 * 6 * 24 * 365 def calculate_pool_reward(height: uint32) -> uint64: """ Returns the pool reward at a certain block height. The pool earns 4/5 of the r...
42.491228
116
0.67052
from staicoin.util.ints import uint32, uint64 _mojo_per_staicoin = 1000000000 _blocks_per_year = 1681920 def calculate_pool_reward(height: uint32) -> uint64: if height == 0: return uint64(int((992 / 1000) * 55882000 * _mojo_per_staicoin)) elif height < 1 * _blocks_per_year: return uint64(...
true
true
f7213d02b27c785ef91695bcb230eaaa02989fb9
6,910
py
Python
nova/objects/migrate_data.py
JohnGarbutt/nova
21f6f7b63af920aa3a5501603c3debbcd5ec5bc5
[ "Apache-2.0" ]
null
null
null
nova/objects/migrate_data.py
JohnGarbutt/nova
21f6f7b63af920aa3a5501603c3debbcd5ec5bc5
[ "Apache-2.0" ]
null
null
null
nova/objects/migrate_data.py
JohnGarbutt/nova
21f6f7b63af920aa3a5501603c3debbcd5ec5bc5
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
38.603352
78
0.639363
from oslo_log import log from oslo_serialization import jsonutils from nova import objects from nova.objects import base as obj_base from nova.objects import fields LOG = log.getLogger(__name__) @obj_base.NovaObjectRegistry.register_if(False) class LiveMigrateData(obj_base.NovaObject): fields = {...
true
true
f72141757d175109c5dcb045ecabaf1763ea12c7
1,249
py
Python
backend/verify/migrations/0001_initial.py
dabonthatbih/kkr-rest-api
e469183a99bd650c2ab979c4e420c3673b9ec049
[ "Apache-2.0" ]
1
2019-10-07T11:14:33.000Z
2019-10-07T11:14:33.000Z
backend/verify/migrations/0001_initial.py
dabonthatbih/kkr-rest-api
e469183a99bd650c2ab979c4e420c3673b9ec049
[ "Apache-2.0" ]
15
2019-10-07T10:57:58.000Z
2019-10-13T12:35:19.000Z
backend/verify/migrations/0001_initial.py
dabonthatbih/kkr-rest-api
e469183a99bd650c2ab979c4e420c3673b9ec049
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-06 13:51 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependen...
37.848485
122
0.604484
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_countries.fields class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] oper...
true
true
f7214236590167f0e9c078503c47ef27d6da679f
19,636
py
Python
tests/models/dsettlement/test_acceptance.py
Deltares/GEOLib
73c3f325ba40a3e0c586e337541d491f4296f50c
[ "MIT" ]
4
2021-10-29T21:30:47.000Z
2022-03-18T13:15:17.000Z
tests/models/dsettlement/test_acceptance.py
Deltares/GEOLib
73c3f325ba40a3e0c586e337541d491f4296f50c
[ "MIT" ]
3
2021-11-05T07:56:16.000Z
2022-03-27T13:27:05.000Z
tests/models/dsettlement/test_acceptance.py
Deltares/GEOLib
73c3f325ba40a3e0c586e337541d491f4296f50c
[ "MIT" ]
4
2021-10-29T21:30:51.000Z
2022-01-17T13:20:40.000Z
import logging import os import pathlib from datetime import timedelta from pathlib import Path from typing import List from warnings import warn import pydantic import pytest from pydantic.color import Color from teamcity import is_running_under_teamcity import geolib.models.dsettlement.loads as loads import geolib....
30.443411
86
0.544052
import logging import os import pathlib from datetime import timedelta from pathlib import Path from typing import List from warnings import warn import pydantic import pytest from pydantic.color import Color from teamcity import is_running_under_teamcity import geolib.models.dsettlement.loads as loads import geolib....
true
true
f7214283b1a050b951ccaeb5b99108ab85e04e6d
48,023
py
Python
authortitle/views.py
MLGB3/mysite
433f245918cfc85f3d42b51e7405ae101160d3cd
[ "Apache-2.0" ]
null
null
null
authortitle/views.py
MLGB3/mysite
433f245918cfc85f3d42b51e7405ae101160d3cd
[ "Apache-2.0" ]
null
null
null
authortitle/views.py
MLGB3/mysite
433f245918cfc85f3d42b51e7405ae101160d3cd
[ "Apache-2.0" ]
null
null
null
""" # Setup script for index based on Richard Sharpe's List of Identifications """ #-------------------------------------------------------------------------------- import math from django.template import Context, loader from django.http import HttpResponse,Http404,HttpResponseRedirect from djan...
37.169505
106
0.596089
import math from django.template import Context, loader from django.http import HttpResponse,Http404,HttpResponseRedirect from django.shortcuts import get_object_or_404, render_to_response from django.core.urlresolvers import reverse from django.utils.html import escape from djan...
true
true
f72142840be762476a0be5e21baec4a6ef055bf3
939
py
Python
lists/models.py
danrneal/superlists
d8e956720429915eaee732020a2c51b884a3d143
[ "MIT" ]
null
null
null
lists/models.py
danrneal/superlists
d8e956720429915eaee732020a2c51b884a3d143
[ "MIT" ]
null
null
null
lists/models.py
danrneal/superlists
d8e956720429915eaee732020a2c51b884a3d143
[ "MIT" ]
null
null
null
from django.core.urlresolvers import reverse from django.conf import settings from django.db import models class List(models.Model): owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True) shared_with = models.ManyToManyField( settings.AUTH_USER_MODEL, related_name='shared_lists' ...
26.083333
78
0.681576
from django.core.urlresolvers import reverse from django.conf import settings from django.db import models class List(models.Model): owner = models.ForeignKey(settings.AUTH_USER_MODEL, blank=True, null=True) shared_with = models.ManyToManyField( settings.AUTH_USER_MODEL, related_name='shared_lists' ...
true
true
f721429b03aedf2a6362c8a4270184f7d7d464c4
4,555
py
Python
project/ionicv1/main.py
Bhanditz/JavaScriptEnhancements
f87ff0ae9dba99bab69bf4fe4e73ca29d198f81e
[ "MIT" ]
null
null
null
project/ionicv1/main.py
Bhanditz/JavaScriptEnhancements
f87ff0ae9dba99bab69bf4fe4e73ca29d198f81e
[ "MIT" ]
null
null
null
project/ionicv1/main.py
Bhanditz/JavaScriptEnhancements
f87ff0ae9dba99bab69bf4fe4e73ca29d198f81e
[ "MIT" ]
null
null
null
import sublime, sublime_plugin import os, webbrowser, shlex, json, collections def ionicv1_ask_custom_path(project_path, type): sublime.active_window().show_input_panel("Ionic v1 CLI custom path", "ionic", lambda ionicv1_custom_path: ionicv1_prepare_project(project_path, ionicv1_custom_path) if type == "create_new...
47.947368
304
0.730626
import sublime, sublime_plugin import os, webbrowser, shlex, json, collections def ionicv1_ask_custom_path(project_path, type): sublime.active_window().show_input_panel("Ionic v1 CLI custom path", "ionic", lambda ionicv1_custom_path: ionicv1_prepare_project(project_path, ionicv1_custom_path) if type == "create_new...
true
true
f72142e5ac00cf950ce98fbca8180f0dd514c5e9
1,671
py
Python
cn_proj/USocket.py
Carl-Rabbit/CS305-CN-Proj
d005c32674b7ce3f90e4099c536b3c914e133d7d
[ "Apache-2.0" ]
null
null
null
cn_proj/USocket.py
Carl-Rabbit/CS305-CN-Proj
d005c32674b7ce3f90e4099c536b3c914e133d7d
[ "Apache-2.0" ]
null
null
null
cn_proj/USocket.py
Carl-Rabbit/CS305-CN-Proj
d005c32674b7ce3f90e4099c536b3c914e133d7d
[ "Apache-2.0" ]
null
null
null
from socket import socket, AF_INET, SOCK_DGRAM, inet_aton, inet_ntoa import time sockets = {} network = ('127.0.0.1', 12345) def bytes_to_addr(bytes): return inet_ntoa(bytes[:4]), int.from_bytes(bytes[4:8], 'big') def addr_to_bytes(addr): return inet_aton(addr[0]) + addr[1].to_bytes(4, 'big') def get_sen...
26.109375
75
0.618791
from socket import socket, AF_INET, SOCK_DGRAM, inet_aton, inet_ntoa import time sockets = {} network = ('127.0.0.1', 12345) def bytes_to_addr(bytes): return inet_ntoa(bytes[:4]), int.from_bytes(bytes[4:8], 'big') def addr_to_bytes(addr): return inet_aton(addr[0]) + addr[1].to_bytes(4, 'big') def get_sen...
true
true
f721433a67499332ba6e8d52379605bedd3d870c
408
py
Python
evan/services/mailer.py
eillarra/evan
befe0f8daedd1b1f629097110d92e68534e43da1
[ "MIT" ]
null
null
null
evan/services/mailer.py
eillarra/evan
befe0f8daedd1b1f629097110d92e68534e43da1
[ "MIT" ]
20
2021-03-31T20:10:46.000Z
2022-02-15T09:58:13.000Z
evan/services/mailer.py
eillarra/evan
befe0f8daedd1b1f629097110d92e68534e43da1
[ "MIT" ]
null
null
null
from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string from typing import List def send_email( *, from_email: str = "Evan <evan@ugent.be>", to: List[str], subject: str, template: str, context_data: dict ): text_content = render_to_string(template, context_data)...
34
111
0.759804
from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string from typing import List def send_email( *, from_email: str = "Evan <evan@ugent.be>", to: List[str], subject: str, template: str, context_data: dict ): text_content = render_to_string(template, context_data)...
true
true
f721457bba4d592a55104c5e37b8693bb3fe93c6
857
py
Python
posts/migrations/0005_vote.py
MrRezoo/django-social-network
253afed6f12ed5cb2c22066961ea3fa33727be20
[ "MIT" ]
1
2021-05-18T08:42:18.000Z
2021-05-18T08:42:18.000Z
posts/migrations/0005_vote.py
MrRezoo/django-social-network
253afed6f12ed5cb2c22066961ea3fa33727be20
[ "MIT" ]
null
null
null
posts/migrations/0005_vote.py
MrRezoo/django-social-network
253afed6f12ed5cb2c22066961ea3fa33727be20
[ "MIT" ]
null
null
null
# Generated by Django 3.2.3 on 2021-05-19 19:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('posts', '0004_alter_comm...
34.28
140
0.654609
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('posts', '0004_alter_comment_reply'), ] operations = [ ...
true
true
f72145de142e44a5179e105ce79e68d8d169b232
7,927
py
Python
test/functional/qtum_block_header.py
tongshiguanzi/O2O
c11983c922c83cdc97bd754d9f8a0d5a094f004f
[ "MIT" ]
1
2020-07-22T08:45:28.000Z
2020-07-22T08:45:28.000Z
test/functional/qtum_block_header.py
tongshiguanzi/O2O
c11983c922c83cdc97bd754d9f8a0d5a094f004f
[ "MIT" ]
null
null
null
test/functional/qtum_block_header.py
tongshiguanzi/O2O
c11983c922c83cdc97bd754d9f8a0d5a094f004f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from tes...
44.284916
292
0.692444
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.blocktools import * from test_framework.mininode import * from test_framework.address import * from test_framework.qtum import * import time from test_framework.key import ECKey from test_framework....
true
true
f721490f7323d6f2e9dbcf3d61d3cb7972830a93
1,481
py
Python
addons/destinations/create_cas_destination.py
paataugrekhelidze/model-management-resources
e3cc8719f349f9755690a4cf87f7e75574966e9c
[ "Apache-2.0" ]
7
2020-02-21T02:43:07.000Z
2021-04-13T15:09:37.000Z
addons/destinations/create_cas_destination.py
paataugrekhelidze/model-management-resources
e3cc8719f349f9755690a4cf87f7e75574966e9c
[ "Apache-2.0" ]
11
2020-03-19T09:49:30.000Z
2021-05-04T15:32:24.000Z
addons/destinations/create_cas_destination.py
paataugrekhelidze/model-management-resources
e3cc8719f349f9755690a4cf87f7e75574966e9c
[ "Apache-2.0" ]
17
2020-02-17T23:42:37.000Z
2021-06-16T12:24:49.000Z
# Copyright (c) 2020, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import sys sys.path.append('..') import mmAuthorization import requests import json viya_host = "localhost" port = ":8080" host_url="http://" + viya_host + port destination_url = host_url + "/modelPubl...
27.943396
110
0.740041
import sys sys.path.append('..') import mmAuthorization import requests import json viya_host = "localhost" port = ":8080" host_url="http://" + viya_host + port destination_url = host_url + "/modelPublish/destinations/" mm_auth = mmAuthorization.mmAuthorization("myAuth") admin_userId = "<SAS_user_admin_ID>" user...
true
true
f7214984dd02b1bc0eae58d46c4bc02d9ce3fa79
4,206
py
Python
thimbles/charts/radar_chart.py
quidditymaster/thimbles
b122654a012f0eb4f043d1ee757f884707c97615
[ "MIT" ]
null
null
null
thimbles/charts/radar_chart.py
quidditymaster/thimbles
b122654a012f0eb4f043d1ee757f884707c97615
[ "MIT" ]
null
null
null
thimbles/charts/radar_chart.py
quidditymaster/thimbles
b122654a012f0eb4f043d1ee757f884707c97615
[ "MIT" ]
null
null
null
""" http://matplotlib.org/examples/api/radar_chart.html Example of creating a radar chart (a.k.a. a spider or star chart) [1]_. Although this example allows a frame of either 'circle' or 'polygon', polygon frames don't have proper gridlines (the lines are circles instead of polygons). It's possible to get a polygon g...
33.380952
79
0.622444
import numpy as np import matplotlib.pyplot as plt from matplotlib.path import Path from matplotlib.spines import Spine from matplotlib.projections.polar import PolarAxes from matplotlib.projections import register_projection def radar_factory(num_vars, frame='circle'): theta = 2*np.pi * np.linspace(0, 1-1....
true
true
f7214ba2fb5f78050521fcf3f80e3a68ce4d1155
1,826
py
Python
smlb/feature_selection/feature_selector_sklearn.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
6
2020-07-27T21:08:55.000Z
2021-05-04T07:00:29.000Z
smlb/feature_selection/feature_selector_sklearn.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
18
2020-09-01T00:47:04.000Z
2021-09-15T22:16:56.000Z
smlb/feature_selection/feature_selector_sklearn.py
CitrineInformatics/smlb
28a3689bd36aa8d51031b4faf7e2331bbd8148a9
[ "Apache-2.0" ]
2
2020-08-24T21:50:16.000Z
2020-12-06T05:18:57.000Z
from smlb import ( params, Data, Features, TabularData, ) from smlb.feature_selection.selector_protocol_sklearn import SelectorProtocolSklearn class FeatureSelectorSklearn(Features): """Base class for feature selection strategies that use one of scikit-learn's feature selection methods. This ...
28.984127
116
0.633078
from smlb import ( params, Data, Features, TabularData, ) from smlb.feature_selection.selector_protocol_sklearn import SelectorProtocolSklearn class FeatureSelectorSklearn(Features): def __init__(self, selector: SelectorProtocolSklearn, *args, **kwargs): super().__init__(*args, **kwargs) ...
true
true
f7214d90b8586fc89f0cc957a7cf81ccb7d45c94
10,292
py
Python
netket/sampler/metropolis_numpy.py
NetKet/netket
96758e814fc3128e6821564d6cc2852bac40ecf2
[ "Apache-2.0" ]
null
null
null
netket/sampler/metropolis_numpy.py
NetKet/netket
96758e814fc3128e6821564d6cc2852bac40ecf2
[ "Apache-2.0" ]
null
null
null
netket/sampler/metropolis_numpy.py
NetKet/netket
96758e814fc3128e6821564d6cc2852bac40ecf2
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The NetKet 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 applicable ...
33.744262
95
0.643412
import math from dataclasses import dataclass from functools import partial from typing import Any, Tuple, Callable import numpy as np from numba import jit from jax import numpy as jnp import jax from netket.hilbert import AbstractHilbert from netket.utils.mpi import mpi_sum, n_nodes from netket.utils...
true
true
f7214da5be355cbd7977e3d4b792fe2a9df91d2e
393
py
Python
LSTM/graphs/graph1.py
Anurag14/Inflow-prediction-Bhakra
d440ec552032084991878877ba5154ea2c452264
[ "MIT" ]
8
2019-05-29T09:07:25.000Z
2021-12-28T13:53:50.000Z
LSTM/graphs/graph1.py
Anurag14/Inflow-prediction-Bhakra
d440ec552032084991878877ba5154ea2c452264
[ "MIT" ]
null
null
null
LSTM/graphs/graph1.py
Anurag14/Inflow-prediction-Bhakra
d440ec552032084991878877ba5154ea2c452264
[ "MIT" ]
2
2019-06-02T17:48:48.000Z
2022-03-13T01:29:16.000Z
import os import seaborn as sns import pandas as pd import matplotlib.pyplot as plt df=pd.read_csv('../data1.csv') df=df.values #time series vs reservoir levels(ft) graph sns.set_style('darkgrid') plt.plot(df[:,0],df[:,1],label="") plt.plot(df[:,0],df[:,2]) plt.xlabel('Time Series') plt.ylabel('Reservoir Levels(ft)') ...
24.5625
61
0.725191
import os import seaborn as sns import pandas as pd import matplotlib.pyplot as plt df=pd.read_csv('../data1.csv') df=df.values sns.set_style('darkgrid') plt.plot(df[:,0],df[:,1],label="") plt.plot(df[:,0],df[:,2]) plt.xlabel('Time Series') plt.ylabel('Reservoir Levels(ft)') plt.title('Dialy Bhakhra Reservoir Levels ...
true
true
f7214e4b71ef6b1633236cc12a531f99e4afc41e
7,828
py
Python
Python_Discord_Bot_JE/venv/Lib/site-packages/discord/asset.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
Python_Discord_Bot_JE/venv/Lib/site-packages/discord/asset.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
Python_Discord_Bot_JE/venv/Lib/site-packages/discord/asset.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2020 Rapptz 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 r...
33.452991
99
0.605646
import io from .errors import DiscordException from .errors import InvalidArgument from . import utils VALID_STATIC_FORMATS = frozenset({"jpeg", "jpg", "webp", "png"}) VALID_AVATAR_FORMATS = VALID_STATIC_FORMATS | {"gif"} class Asset: __slots__ = ('_state', '_url') BASE = 'https://cdn.discord...
true
true
f7214e57978a52886d37352d317afc38f1a60349
3,932
py
Python
tests/unit/dataactvalidator/test_c23_award_financial_1.py
chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend
3de8cedf69d5a0c9fad8239734bd6291cf583936
[ "CC0-1.0" ]
null
null
null
tests/unit/dataactvalidator/test_c23_award_financial_1.py
chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend
3de8cedf69d5a0c9fad8239734bd6291cf583936
[ "CC0-1.0" ]
null
null
null
tests/unit/dataactvalidator/test_c23_award_financial_1.py
chambers-brian/SIG_Digital-Strategy_SI_ODP_Backend
3de8cedf69d5a0c9fad8239734bd6291cf583936
[ "CC0-1.0" ]
null
null
null
from random import choice from string import ascii_uppercase, ascii_lowercase, digits from tests.unit.dataactcore.factories.staging import AwardFinancialFactory, AwardProcurementFactory from tests.unit.dataactvalidator.utils import number_of_errors, query_columns _FILE = 'c23_award_financial_1' def test_column_head...
65.533333
164
0.739827
from random import choice from string import ascii_uppercase, ascii_lowercase, digits from tests.unit.dataactcore.factories.staging import AwardFinancialFactory, AwardProcurementFactory from tests.unit.dataactvalidator.utils import number_of_errors, query_columns _FILE = 'c23_award_financial_1' def test_column_head...
true
true
f7214fd6196b206a0fc7264a73b8e0fd22653169
1,766
py
Python
src/main-ja.py
junjihashimoto/wav2vec-2-nix
f104280586cf78d0fc5f280ea013f6bc676cd05e
[ "BSD-3-Clause" ]
null
null
null
src/main-ja.py
junjihashimoto/wav2vec-2-nix
f104280586cf78d0fc5f280ea013f6bc676cd05e
[ "BSD-3-Clause" ]
null
null
null
src/main-ja.py
junjihashimoto/wav2vec-2-nix
f104280586cf78d0fc5f280ea013f6bc676cd05e
[ "BSD-3-Clause" ]
null
null
null
# https://huggingface.co/vumichien/wav2vec2-large-xlsr-japanese import torch import torchaudio import librosa from datasets import load_dataset import MeCab from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor import re # config wakati = MeCab.Tagger("-Owakati") chars_to_ignore_regex = '[\\\\\\\\\\\\\\\\\\\\\\...
47.72973
325
0.64043
import torch import torchaudio import librosa from datasets import load_dataset import MeCab from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor import re wakati = MeCab.Tagger("-Owakati") chars_to_ignore_regex = '[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\、\\\\\\\\\\\\\\\\\\\\\\\\\\\...
true
true
f72150878c28e84523ea2167e57b4bc5ae34cb23
1,024
py
Python
educative/TreesBFS/zigzagTraversal.py
j-dags/Algos
8201171c983bf8464b1d25526a16493966eb426f
[ "MIT" ]
null
null
null
educative/TreesBFS/zigzagTraversal.py
j-dags/Algos
8201171c983bf8464b1d25526a16493966eb426f
[ "MIT" ]
null
null
null
educative/TreesBFS/zigzagTraversal.py
j-dags/Algos
8201171c983bf8464b1d25526a16493966eb426f
[ "MIT" ]
null
null
null
def zigzagTraversal(root): queue = [root] # initialize queue to root node result = [] while queue: # iterate through loop while queue is not empty arr = [] # levelSize prevents us from looping pasts current level in queue levelSize = len(queue) for _ in range(levelSize): # these two lines ...
20.897959
69
0.636719
def zigzagTraversal(root): queue = [root] result = [] while queue: arr = [] levelSize = len(queue) for _ in range(levelSize): curr = queue[0] queue = queue[1:] if len(result) % 2 == 0: arr.append(curr.val) else: arr = [curr.val] + arr if cu...
true
true
f7215088d8da5bd6c6c28282619051368571f5b9
1,260
py
Python
fix_size.py
Dai-z/label-converters
0da9bfa620c6ab222ed97b82c256401fcb5804cf
[ "MIT" ]
1
2020-11-16T17:11:43.000Z
2020-11-16T17:11:43.000Z
fix_size.py
Dai-z/label-converters
0da9bfa620c6ab222ed97b82c256401fcb5804cf
[ "MIT" ]
null
null
null
fix_size.py
Dai-z/label-converters
0da9bfa620c6ab222ed97b82c256401fcb5804cf
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET import os from os import listdir, getcwd from os.path import join import argparse import cv2 classes = [] def convert_annotation(image, args): if args.anno_dir: anno_file = join(args.anno_dir, image.split('.')[0]) + '.xml' if not os.path.isfile(anno_file): ...
28.636364
125
0.618254
import xml.etree.ElementTree as ET import os from os import listdir, getcwd from os.path import join import argparse import cv2 classes = [] def convert_annotation(image, args): if args.anno_dir: anno_file = join(args.anno_dir, image.split('.')[0]) + '.xml' if not os.path.isfile(anno_file): ...
true
true
f721509f3f35df7cb0d1888befa5bc53be9b4653
422
py
Python
tmm/apps/translation_management_tool/migrations/0006_auto_20211105_1444.py
2567910/tmm
c36bbb508ed8ea4fa8e814af817c5d4f4ae69d4c
[ "MIT" ]
3
2022-03-02T19:30:26.000Z
2022-03-04T10:55:10.000Z
tmm/apps/translation_management_tool/migrations/0006_auto_20211105_1444.py
2567910/tmm
c36bbb508ed8ea4fa8e814af817c5d4f4ae69d4c
[ "MIT" ]
3
2022-03-08T12:25:16.000Z
2022-03-16T22:30:55.000Z
tmm/apps/translation_management_tool/migrations/0006_auto_20211105_1444.py
2567910/tmm
c36bbb508ed8ea4fa8e814af817c5d4f4ae69d4c
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-11-05 14:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('translation_management_tool', '0005_auto_20211105_1418'), ] operations = [ migrations.AlterField( model_name='language', ...
22.210526
67
0.625592
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('translation_management_tool', '0005_auto_20211105_1418'), ] operations = [ migrations.AlterField( model_name='language', name='languages', field=models...
true
true
f7215171b2591e8446240124dc5466d1022604c1
631
py
Python
locations/items.py
wessport/allthecolleges
7741ed0bef7359d6d871963c527a3d9e31303c7c
[ "MIT" ]
null
null
null
locations/items.py
wessport/allthecolleges
7741ed0bef7359d6d871963c527a3d9e31303c7c
[ "MIT" ]
null
null
null
locations/items.py
wessport/allthecolleges
7741ed0bef7359d6d871963c527a3d9e31303c7c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy # class AddressItem(scrapy.Item): # # define the fields for your item here like: # # name = scrapy.Field() # pass class AddressItem(scrapy...
22.535714
52
0.652932
import scrapy eld() name = scrapy.Field() street_address = scrapy.Field() city = scrapy.Field() state = scrapy.Field() postcode = scrapy.Field() ref = scrapy.Field() website = scrapy.Field() extras = scrapy.Field()
true
true
f72152194d185954a947a244a1109ed7161112ed
26,894
py
Python
tensorflow_estimator/contrib/estimator/python/estimator/rnn.py
CheukNgai/estimator
673a50bd5ffa70d0672ce47e40f5075f1cbe0a62
[ "Apache-2.0" ]
null
null
null
tensorflow_estimator/contrib/estimator/python/estimator/rnn.py
CheukNgai/estimator
673a50bd5ffa70d0672ce47e40f5075f1cbe0a62
[ "Apache-2.0" ]
null
null
null
tensorflow_estimator/contrib/estimator/python/estimator/rnn.py
CheukNgai/estimator
673a50bd5ffa70d0672ce47e40f5075f1cbe0a62
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.696124
112
0.704618
from __future__ import absolute_import from __future__ import division from __future__ import print_function import six from tensorflow_estimator.contrib.estimator.python.estimator import extenders from tensorflow.contrib.feature_column.python.feature_column import sequence_feature_column as seq_fc fro...
true
true
f72153ee7a89b3a20eafa2cc82f8c626ef1eda68
688
py
Python
uniseg/graphemeclustertest.py
olivier-compilatio/uniseg-python
8513a59e9c701a173c8001655e592c18f8840b16
[ "MIT" ]
2
2019-12-28T09:28:43.000Z
2021-05-11T02:01:47.000Z
uniseg/graphemeclustertest.py
olivier-compilatio/uniseg-python
8513a59e9c701a173c8001655e592c18f8840b16
[ "MIT" ]
null
null
null
uniseg/graphemeclustertest.py
olivier-compilatio/uniseg-python
8513a59e9c701a173c8001655e592c18f8840b16
[ "MIT" ]
2
2019-07-23T09:11:55.000Z
2019-10-02T17:13:53.000Z
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function, unicode_literals) import doctest import unittest from . import graphemecluster from .db import iter_grapheme_cluster_break_tests from .test import implement...
22.933333
67
0.694767
from __future__ import (absolute_import, division, print_function, unicode_literals) import doctest import unittest from . import graphemecluster from .db import iter_grapheme_cluster_break_tests from .test import implement_break_tests @imple...
true
true
f721549c945034a707dcd61c8eb272e55a908d06
6,155
py
Python
tests/pytest_extension/meta/test_all.py
broglep-work/python-pytest-cases
4976c0073a2fad5fbe5de34a5d1199efda0b7da9
[ "BSD-3-Clause" ]
213
2018-07-05T21:21:21.000Z
2022-03-22T04:54:53.000Z
tests/pytest_extension/meta/test_all.py
broglep-work/python-pytest-cases
4976c0073a2fad5fbe5de34a5d1199efda0b7da9
[ "BSD-3-Clause" ]
259
2018-06-22T16:46:33.000Z
2022-03-23T19:39:15.000Z
tests/pytest_extension/meta/test_all.py
broglep-work/python-pytest-cases
4976c0073a2fad5fbe5de34a5d1199efda0b7da9
[ "BSD-3-Clause" ]
27
2019-03-26T12:46:49.000Z
2022-02-21T16:56:23.000Z
import ast import os import shlex import re from os.path import join, dirname, isdir, exists import pytest from pytest_cases.common_mini_six import string_types # Make the list of all tests that we will have to execute (each in an independent pytest runner) THIS_DIR = dirname(__file__) tests_raw_folder = join(THIS_D...
36.420118
108
0.605199
import ast import os import shlex import re from os.path import join, dirname, isdir, exists import pytest from pytest_cases.common_mini_six import string_types THIS_DIR = dirname(__file__) tests_raw_folder = join(THIS_DIR, 'raw') test_files = [f for f in os.listdir(tests_raw_folder) if not f.startswith('_')] MET...
true
true
f72155b9712b48098172994163d1909c6bd06e2b
959
py
Python
django_mc2p/__init__.py
mc2p/mc2p-django
a8a245d0a2783a0199e74d2d0396c397c056f0f6
[ "BSD-2-Clause" ]
null
null
null
django_mc2p/__init__.py
mc2p/mc2p-django
a8a245d0a2783a0199e74d2d0396c397c056f0f6
[ "BSD-2-Clause" ]
null
null
null
django_mc2p/__init__.py
mc2p/mc2p-django
a8a245d0a2783a0199e74d2d0396c397c056f0f6
[ "BSD-2-Clause" ]
null
null
null
from mc2p import MC2PClient as MC2PClientPython __title__ = 'MyChoice2Pay Django' __version__ = '0.1.3' __author__ = 'MyChoice2Pay' __license__ = 'BSD 2-Clause' __copyright__ = 'Copyright 2017 MyChoice2Pay' # Version synonym VERSION = __version__ # Header encoding (see RFC5987) HTTP_HEADER_ENCODING = 'iso-8859-1' ...
23.975
67
0.665276
from mc2p import MC2PClient as MC2PClientPython __title__ = 'MyChoice2Pay Django' __version__ = '0.1.3' __author__ = 'MyChoice2Pay' __license__ = 'BSD 2-Clause' __copyright__ = 'Copyright 2017 MyChoice2Pay' VERSION = __version__ HTTP_HEADER_ENCODING = 'iso-8859-1' ISO_8601 = 'iso-8601' default_app_config = 'dj...
true
true
f721568c58cfd884ff05085466a0d5440678835f
19,025
py
Python
nnunet/inference/pretrained_models/download_pretrained_model.py
Jiawei-Yang/TumorCP
6053c75642fcbc0fb0424320ab3d758f24883b0e
[ "Apache-2.0" ]
12
2021-07-22T15:08:13.000Z
2022-03-10T08:15:56.000Z
nnunet/inference/pretrained_models/download_pretrained_model.py
Jiawei-Yang/TumorCP
6053c75642fcbc0fb0424320ab3d758f24883b0e
[ "Apache-2.0" ]
1
2022-03-07T13:21:42.000Z
2022-03-07T13:21:42.000Z
nnunet/inference/pretrained_models/download_pretrained_model.py
Jiawei-Yang/TumorCP
6053c75642fcbc0fb0424320ab3d758f24883b0e
[ "Apache-2.0" ]
3
2021-11-26T06:26:24.000Z
2022-02-14T01:23:44.000Z
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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://w...
57.304217
191
0.595848
import zipfile from time import time import requests from batchgenerators.utilities.file_and_folder_operations import join, isfile from nnunet.paths import network_training_output_dir def get_available_models(): available_models = { "Task001_BrainTumour": { 'description': "Brain...
true
true
f72157380ef02e33e2ef0f6f19e81eebfeeb2a1a
5,318
py
Python
optimizers/bohb_one_shot/plots/util.py
Mirofil/nasbench-1shot1
46637e259691ea2b1ab3b2f1cbbd309068f02cde
[ "Apache-2.0" ]
65
2019-12-20T12:20:22.000Z
2022-03-12T07:34:08.000Z
optimizers/bohb_one_shot/plots/util.py
crwhite14/nasbench-1shot1
c34bf9c0222f07a30ba1518b3e52e120a3560aa4
[ "Apache-2.0" ]
8
2020-01-29T07:49:31.000Z
2021-10-20T08:58:29.000Z
optimizers/bohb_one_shot/plots/util.py
crwhite14/nasbench-1shot1
c34bf9c0222f07a30ba1518b3e52e120a3560aa4
[ "Apache-2.0" ]
18
2020-01-26T08:40:18.000Z
2021-09-20T15:13:00.000Z
import os import pickle import collections import numpy as np import pandas as pd import matplotlib.pyplot as plt from IPython import embed colors={ 'BOHB-PC-DARTS': 'darkorange', 'BOHB-DARTS': 'dodgerblue', 'BOHB-GDAS' : 'forestgreen', 'RE': 'crimson', 'RS': 'darkorchid', 'RL': ...
33.446541
95
0.531403
import os import pickle import collections import numpy as np import pandas as pd import matplotlib.pyplot as plt from IPython import embed colors={ 'BOHB-PC-DARTS': 'darkorange', 'BOHB-DARTS': 'dodgerblue', 'BOHB-GDAS' : 'forestgreen', 'RE': 'crimson', 'RS': 'darkorchid', 'RL': ...
true
true
f721587995d4a908abf3416954f163ffd9986c6f
5,391
py
Python
tools/PolicyAnalysis/Businesses.py
Randal1936/FinancialSupervision
3d78b1cc662a2c0675ace880a772cc38eaf7672f
[ "MIT" ]
1
2021-08-16T08:47:53.000Z
2021-08-16T08:47:53.000Z
tools/PolicyAnalysis/Businesses.py
Randal1936/FSML
3d78b1cc662a2c0675ace880a772cc38eaf7672f
[ "MIT" ]
16
2021-08-02T14:34:52.000Z
2021-08-04T12:48:06.000Z
tools/PolicyAnalysis/Businesses.py
Randal1936/FinancialSupervision
3d78b1cc662a2c0675ace880a772cc38eaf7672f
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import xlwings as xw from PolicyAnalysis import cptj as cj """ ———————————————————— 以下是使用 re 检索+ DFC 映射的数据处理写法 ———————————————————— """ class businesses_re: def __init__(self, Data, userdict): self.Data = Data self.userdict = userdict data = Data.co...
34.120253
101
0.584122
import pandas as pd import numpy as np import xlwings as xw from PolicyAnalysis import cptj as cj class businesses_re: def __init__(self, Data, userdict): self.Data = Data self.userdict = userdict data = Data.copy() n = cj.txt_to_list(self.userdict) ...
true
true
f7215945d58449184be2ce4c38342a88d9dfe3a5
1,847
py
Python
accounts/migrations/0002_auto_20200522_2023.py
codertimeless/StudentAssociation
3f6caf2b362623d4f8cf82bab9529951a375fe6a
[ "Apache-2.0" ]
null
null
null
accounts/migrations/0002_auto_20200522_2023.py
codertimeless/StudentAssociation
3f6caf2b362623d4f8cf82bab9529951a375fe6a
[ "Apache-2.0" ]
15
2020-03-09T11:56:13.000Z
2022-02-10T15:03:01.000Z
accounts/migrations/0002_auto_20200522_2023.py
codertimeless/StudentAssociation
3f6caf2b362623d4f8cf82bab9529951a375fe6a
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.8 on 2020-05-22 20:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('management', '0001_initial'), ('accounts', '0001_initial'), ('auth', '0011_update_proxy_...
41.977273
256
0.650785
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('management', '0001_initial'), ('accounts', '0001_initial'), ('auth', '0011_update_proxy_permissions'), ] operations = [ ...
true
true
f72159a07dd981d68fbdfa405294da73b86fbb56
593
py
Python
hashmaps/hash_map_tests.py
informramiz/data-structures-and-algorithms
7038c8becc4cbad82867c9c8bca42637ca27c8d7
[ "Apache-2.0" ]
null
null
null
hashmaps/hash_map_tests.py
informramiz/data-structures-and-algorithms
7038c8becc4cbad82867c9c8bca42637ca27c8d7
[ "Apache-2.0" ]
null
null
null
hashmaps/hash_map_tests.py
informramiz/data-structures-and-algorithms
7038c8becc4cbad82867c9c8bca42637ca27c8d7
[ "Apache-2.0" ]
1
2020-09-24T22:54:52.000Z
2020-09-24T22:54:52.000Z
from hash_map import HashMap from asserts.asserts import assert_ def test_hash_map(): hash_map = HashMap(2) # Test HashMap get and put key = "abcde" value = "ramiz" hash_map.put(key, value) output = hash_map.get(key) assert_(value, output) # Test size assert_(1, hash_map.size()) ...
19.129032
35
0.637437
from hash_map import HashMap from asserts.asserts import assert_ def test_hash_map(): hash_map = HashMap(2) key = "abcde" value = "ramiz" hash_map.put(key, value) output = hash_map.get(key) assert_(value, output) assert_(1, hash_map.size()) hash_map.delete("abcde") ...
true
true
f7215b16f3948f7d90fe03e4471250973c15ca0c
639
py
Python
davarocr/davarocr/davar_rcg/tools/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
387
2021-01-02T07:50:15.000Z
2022-03-31T04:30:03.000Z
davarocr/davarocr/davar_rcg/tools/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
70
2021-05-04T18:28:18.000Z
2022-03-31T14:14:52.000Z
davarocr/davarocr/davar_rcg/tools/__init__.py
icedream2/DAVAR-Lab-OCR
c8b82f45516850eeadcab2739fb2a4292f2fdca1
[ "Apache-2.0" ]
83
2021-01-05T08:28:26.000Z
2022-03-31T07:14:03.000Z
""" ################################################################################################## # Copyright Info : Copyright (c) Davar Lab @ Hikvision Research Institute. All rights reserved. # Filename : __init__.py # Abstract : # Current Version: 1.0.0 # Date : 2021-05-01 ###...
31.95
98
0.450704
from .test_utils import filter_punctuation, make_paths, show_result_table, results2json, eval_json __all__ = [ "filter_punctuation", "make_paths", "show_result_table", "results2json", "eval_json" ]
true
true
f7215baa85a5f4afcd2f4643ea78bfc425bfefa5
2,586
py
Python
app/back/settings/routes/api/__init__.py
jgphilpott/polyplot
c46861174ee5881dadffbfb2278d555462523547
[ "MIT" ]
5
2021-05-17T14:17:14.000Z
2021-12-14T12:54:32.000Z
app/back/settings/routes/api/__init__.py
jgphilpott/iGraph
2a91ba57e4950856a83d3a109753f8f2badee829
[ "MIT" ]
8
2020-02-09T02:48:41.000Z
2021-05-16T04:57:02.000Z
app/back/settings/routes/api/__init__.py
jgphilpott/iGraph
2a91ba57e4950856a83d3a109753f8f2badee829
[ "MIT" ]
2
2016-09-12T03:48:16.000Z
2019-05-04T14:15:19.000Z
from front.tree.home.api.route import register_api_route from front.tree.home.api.airports.route import register_api_airports_route from front.tree.home.api.airports.airport.route import register_api_airport_route from front.tree.home.api.cities.route import register_api_cities_route from front.tree.home.api.cities.c...
35.916667
87
0.842614
from front.tree.home.api.route import register_api_route from front.tree.home.api.airports.route import register_api_airports_route from front.tree.home.api.airports.airport.route import register_api_airport_route from front.tree.home.api.cities.route import register_api_cities_route from front.tree.home.api.cities.c...
true
true
f7215cea245000030d3205fd74b6800d175f2836
1,540
py
Python
app.py
panubo/sensu-result-proxy
e7b8ee72bfbfadaaa798020630af6f6c5ed36e37
[ "MIT" ]
null
null
null
app.py
panubo/sensu-result-proxy
e7b8ee72bfbfadaaa798020630af6f6c5ed36e37
[ "MIT" ]
null
null
null
app.py
panubo/sensu-result-proxy
e7b8ee72bfbfadaaa798020630af6f6c5ed36e37
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import web import requests import json from config import CONFIG_FILE, DEBUG, SENSU_API_URI, SENSU_API_USER, SENSU_API_PASS, load_config, validate_api_key # SHA2 urls = ( '/', 'Index', '/results/([A-Fa-f0-9]{64})', 'CheckCollector' ) api_config = load_config(CONFIG_FILE) c...
25.245902
115
0.619481
import os import web import requests import json from config import CONFIG_FILE, DEBUG, SENSU_API_URI, SENSU_API_USER, SENSU_API_PASS, load_config, validate_api_key urls = ( '/', 'Index', '/results/([A-Fa-f0-9]{64})', 'CheckCollector' ) api_config = load_config(CONFIG_FILE) class Index(object): de...
false
true
f7215cee8919dee9ba60b53f2fdaa5fd496bb91f
656
py
Python
testing.py
vuthalab/spectrum-awg
5edd7eb3b06f877bb6f77359773c9ba2d727c52d
[ "MIT" ]
1
2022-02-28T15:38:57.000Z
2022-02-28T15:38:57.000Z
testing.py
vuthalab/spectrum-awg
5edd7eb3b06f877bb6f77359773c9ba2d727c52d
[ "MIT" ]
null
null
null
testing.py
vuthalab/spectrum-awg
5edd7eb3b06f877bb6f77359773c9ba2d727c52d
[ "MIT" ]
null
null
null
import time from M4i6622 import * from Functions.functions import * #4 functions to be used def f0(x): return sin(x)#sin_for_time(60000000, 40000000, 20000,10000, x) def f1(x): return sin(x) def f2(x): return sin(x,f=1000) def f3(x): return x t0 = time.perf_counter() ...
15.255814
78
0.637195
import time from M4i6622 import * from Functions.functions import * def f0(x): return sin(x) def f1(x): return sin(x) def f2(x): return sin(x,f=1000) def f3(x): return x t0 = time.perf_counter() M4i = M4i6622(channelNum=3,sampleRate=625,clockOut=True,referenceClock=Fa...
true
true
f7215cf985916a431b4772d83a2ecae8b5f0c458
4,513
py
Python
experiments/exp_movie_5and7.py
Leaflowave/PrivCQ
8acc6ad0888793fb7fa190a1bd5b4f9eb1140514
[ "MIT" ]
null
null
null
experiments/exp_movie_5and7.py
Leaflowave/PrivCQ
8acc6ad0888793fb7fa190a1bd5b4f9eb1140514
[ "MIT" ]
null
null
null
experiments/exp_movie_5and7.py
Leaflowave/PrivCQ
8acc6ad0888793fb7fa190a1bd5b4f9eb1140514
[ "MIT" ]
null
null
null
import group_frequency_oracle as freq import linecache import random def query_on_adult_dim2(oraclePath,oracleInterval,queryPath,trueOraclePath,aggregation="count"): # adult_2 equal 5 and 7 queriesStr=linecache.getline(queryPath,1) queries=eval(queriesStr) answer=[0]*500 trueOracleStr=li...
48.010638
114
0.534899
import group_frequency_oracle as freq import linecache import random def query_on_adult_dim2(oraclePath,oracleInterval,queryPath,trueOraclePath,aggregation="count"): queriesStr=linecache.getline(queryPath,1) queries=eval(queriesStr) answer=[0]*500 trueOracleStr=linecache.getline(trueOrac...
true
true
f7215e1e2a0a47dea2178844ff22feb957540229
7,863
py
Python
v2ex/babel/ext/upyun.py
igeeker/v2ex
9fa81f7c82aa7d162a924d357494b241eb8a6207
[ "BSD-3-Clause" ]
161
2019-07-23T06:53:45.000Z
2022-03-24T01:07:19.000Z
v2ex/babel/ext/upyun.py
igeeker/v2ex
9fa81f7c82aa7d162a924d357494b241eb8a6207
[ "BSD-3-Clause" ]
1
2015-01-19T07:05:54.000Z
2015-06-02T05:01:38.000Z
v2ex/babel/ext/upyun.py
igeeker/v2ex
9fa81f7c82aa7d162a924d357494b241eb8a6207
[ "BSD-3-Clause" ]
26
2019-08-05T06:09:38.000Z
2021-07-08T02:05:13.000Z
# -*- coding: utf8 -*- import httplib import md5 as imd5 import base64 import time import re METADATA_PREFIX = 'x-upyun-meta-' DL = '/' def md5(src): m1 = imd5.new() m1.update(src) dest1 = m1.hexdigest() return dest1 def md5file(fobj): m = imd5.new() while True: d = fobj.read...
31.452
104
0.56645
import httplib import md5 as imd5 import base64 import time import re METADATA_PREFIX = 'x-upyun-meta-' DL = '/' def md5(src): m1 = imd5.new() m1.update(src) dest1 = m1.hexdigest() return dest1 def md5file(fobj): m = imd5.new() while True: d = fobj.read(8096) if not ...
false
true
f7215e55cf136f7e2d8b5021a9fd804c6a6a0820
42,837
py
Python
pytests/epengine/bucket_level_durability.py
cgghali/TAF
1de8dec77ad781c373e18d9c285befd534ac203a
[ "Apache-2.0" ]
null
null
null
pytests/epengine/bucket_level_durability.py
cgghali/TAF
1de8dec77ad781c373e18d9c285befd534ac203a
[ "Apache-2.0" ]
null
null
null
pytests/epengine/bucket_level_durability.py
cgghali/TAF
1de8dec77ad781c373e18d9c285befd534ac203a
[ "Apache-2.0" ]
null
null
null
from copy import deepcopy from random import sample, choice from BucketLib.bucket import Bucket from cb_tools.cb_cli import CbCli from couchbase_helper.documentgenerator import doc_generator from couchbase_helper.durability_helper import BucketDurability from epengine.durability_base import BucketDurabilityBase from e...
44.855497
82
0.572682
from copy import deepcopy from random import sample, choice from BucketLib.bucket import Bucket from cb_tools.cb_cli import CbCli from couchbase_helper.documentgenerator import doc_generator from couchbase_helper.durability_helper import BucketDurability from epengine.durability_base import BucketDurabilityBase from e...
true
true
f7215eaffbd11774be2c8286cbada91c47ac6b09
1,136
py
Python
tools/getTask.py
Sh4der/adventofcode
1823d7bac33778ef850e384d914843a0c0ded869
[ "MIT" ]
null
null
null
tools/getTask.py
Sh4der/adventofcode
1823d7bac33778ef850e384d914843a0c0ded869
[ "MIT" ]
null
null
null
tools/getTask.py
Sh4der/adventofcode
1823d7bac33778ef850e384d914843a0c0ded869
[ "MIT" ]
null
null
null
import html2markdown as h2m import urllib.request import re from sys import argv, exit if __name__ == '__main__': if len(argv) not in (2, 3): exit(1) day = argv[1] if int(day) not in range(1, 24): exit(1) destinationFilePath = argv[2] url = "https://adventofcode.com/2020/day/" + day r...
28.4
96
0.626761
import html2markdown as h2m import urllib.request import re from sys import argv, exit if __name__ == '__main__': if len(argv) not in (2, 3): exit(1) day = argv[1] if int(day) not in range(1, 24): exit(1) destinationFilePath = argv[2] url = "https://adventofcode.com/2020/day/" + day r...
true
true
f7215eeae590fcac6dd15874392f9bd3361b29e0
1,294
py
Python
wikum-env3/lib/python3.7/site-packages/sumy/models/dom/_sentence.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
wikum-env3/lib/python3.7/site-packages/sumy/models/dom/_sentence.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
wikum-env3/lib/python3.7/site-packages/sumy/models/dom/_sentence.py
xuericlin/wikum
f0171f1697efa91d6957f976f473c9201db85648
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from ...utils import cached_property from ..._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_text", "_ca...
28.755556
89
0.651468
from __future__ import absolute_import from __future__ import division, print_function, unicode_literals from ...utils import cached_property from ..._compat import to_unicode, to_string, unicode_compatible @unicode_compatible class Sentence(object): __slots__ = ("_text", "_cached_property_words", "_...
true
true
f7216012bdabcc6a4f76ac1521c5236c58f42c7a
393
py
Python
bookitoBackend/User/urls.py
mazdakdev/Bookito
38e18fee22aafea95429da01e9769acf2748f676
[ "MIT" ]
10
2021-12-09T04:39:03.000Z
2022-02-07T05:42:29.000Z
bookitoBackend/User/urls.py
mazdakdev/Bookito
38e18fee22aafea95429da01e9769acf2748f676
[ "MIT" ]
2
2022-02-07T18:12:54.000Z
2022-02-10T10:27:37.000Z
bookitoBackend/User/urls.py
mazdakdev/Bookito
38e18fee22aafea95429da01e9769acf2748f676
[ "MIT" ]
null
null
null
from django.urls import path from .api import * from knox import views as knox_views urlpatterns = [ #domain.dn/api/v1/register/ | POST path('register/' , SignUpAPI.as_view() , name='register'), #domain.dn/api/v1/register/ | POST path('login/' , SignInAPI.as_view() , name='login'), #domain.dn/ap...
21.833333
62
0.64631
from django.urls import path from .api import * from knox import views as knox_views urlpatterns = [ path('register/' , SignUpAPI.as_view() , name='register'), path('login/' , SignInAPI.as_view() , name='login'), path('user/', MainUser.as_view() , name='user'), ]
true
true
f7216046bb8fc44df661da3c65b4c665932b2bf6
1,845
py
Python
gdsfactory/simulation/simphony/components/ring_double_siepic.py
simbilod/gdsfactory
4d76db32674c3edb4d16260e3177ee29ef9ce11d
[ "MIT" ]
null
null
null
gdsfactory/simulation/simphony/components/ring_double_siepic.py
simbilod/gdsfactory
4d76db32674c3edb4d16260e3177ee29ef9ce11d
[ "MIT" ]
null
null
null
gdsfactory/simulation/simphony/components/ring_double_siepic.py
simbilod/gdsfactory
4d76db32674c3edb4d16260e3177ee29ef9ce11d
[ "MIT" ]
null
null
null
from simphony.library import siepic from simphony.netlist import Subcircuit def ring_double_siepic( wg_width=0.5, gap=0.2, length_x=4, bend_radius=5, length_y=2, coupler=siepic.ebeam_dc_halfring_straight, straight=siepic.ebeam_wg_integral_1550, terminator=siepic.ebeam_terminator_te1550...
25.273973
87
0.539837
from simphony.library import siepic from simphony.netlist import Subcircuit def ring_double_siepic( wg_width=0.5, gap=0.2, length_x=4, bend_radius=5, length_y=2, coupler=siepic.ebeam_dc_halfring_straight, straight=siepic.ebeam_wg_integral_1550, terminator=siepic.ebeam_terminator_te1550...
true
true
f72160586c3494b35606c754418a7f75fc368e1d
10,517
py
Python
pytorch/data.py
layumi/dgcnn
a7b58796ffe549f2d8bdb06a84f62aba03e1d3a1
[ "MIT" ]
null
null
null
pytorch/data.py
layumi/dgcnn
a7b58796ffe549f2d8bdb06a84f62aba03e1d3a1
[ "MIT" ]
null
null
null
pytorch/data.py
layumi/dgcnn
a7b58796ffe549f2d8bdb06a84f62aba03e1d3a1
[ "MIT" ]
1
2021-01-15T10:04:33.000Z
2021-01-15T10:04:33.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Author: Yue Wang @Contact: yuewangx@mit.edu @File: data.py @Time: 2018/10/13 6:21 PM Modified by @Author: An Tao @Contact: ta19@mails.tsinghua.edu.cn @Time: 2020/2/27 9:32 PM """ import os import sys import glob import h5py import numpy as np import torch from torc...
37.03169
105
0.629837
import os import sys import glob import h5py import numpy as np import torch from torch.utils.data import Dataset def download_modelnet40(): BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_DIR = os.path.join(BASE_DIR, 'data') if not os.path.exists(DATA_DIR): os.mkdir(DATA_DIR) i...
true
true
f721616e2e38048326fa72960040fcebc5347540
1,016
py
Python
packages/syft/tests/syft/lib/sklearn/model_serialize_test.py
wip-abramson/PySyft
c321b26ce1aa3c969793874e663a8a46b1228dd1
[ "Apache-1.1" ]
1
2021-08-31T11:37:19.000Z
2021-08-31T11:37:19.000Z
packages/syft/tests/syft/lib/sklearn/model_serialize_test.py
karapto/PySyft
2940bfebb3e0f37a1b7451cf9581c41917534ed6
[ "Apache-1.1" ]
null
null
null
packages/syft/tests/syft/lib/sklearn/model_serialize_test.py
karapto/PySyft
2940bfebb3e0f37a1b7451cf9581c41917534ed6
[ "Apache-1.1" ]
null
null
null
# third party import numpy as np import pytest from sklearn.linear_model import LogisticRegression # syft absolute import syft as sy from syft.experimental_flags import flags sy.load("sklearn") sy.load("numpy") @pytest.mark.vendor(lib="sklearn") @pytest.mark.parametrize("arrow_backend", [True, False]) def test_logi...
26.736842
61
0.649606
import numpy as np import pytest from sklearn.linear_model import LogisticRegression import syft as sy from syft.experimental_flags import flags sy.load("sklearn") sy.load("numpy") @pytest.mark.vendor(lib="sklearn") @pytest.mark.parametrize("arrow_backend", [True, False]) def test_logistic_model_serde( arrow_...
true
true
f72161c03ab784a2ce4d00015d797e74b8a25925
2,042
py
Python
SecuriTree/views.py
davymaish/django-SecuriTree
01cf925e591877ae2669ca8430845abe278832bf
[ "BSD-2-Clause" ]
null
null
null
SecuriTree/views.py
davymaish/django-SecuriTree
01cf925e591877ae2669ca8430845abe278832bf
[ "BSD-2-Clause" ]
null
null
null
SecuriTree/views.py
davymaish/django-SecuriTree
01cf925e591877ae2669ca8430845abe278832bf
[ "BSD-2-Clause" ]
null
null
null
from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.template import loader from django.contrib import messages from django.views import generic from django.views.generic.base import TemplateView from django.utils i...
27.972603
75
0.731636
from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.template import loader from django.contrib import messages from django.views import generic from django.views.generic.base import TemplateView from django.utils i...
true
true
f721628ea6b0b18873ff1f9593f52a8c6a6f14af
6,273
py
Python
thenewboston_node/business_logic/tests/test_file_blockchain/test_primary_validator.py
andbortnik/thenewboston-node
bd63c7def5f224286dba70f9560252a7da8ea712
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/tests/test_file_blockchain/test_primary_validator.py
andbortnik/thenewboston-node
bd63c7def5f224286dba70f9560252a7da8ea712
[ "MIT" ]
null
null
null
thenewboston_node/business_logic/tests/test_file_blockchain/test_primary_validator.py
andbortnik/thenewboston-node
bd63c7def5f224286dba70f9560252a7da8ea712
[ "MIT" ]
null
null
null
from thenewboston_node.business_logic.blockchain.file_blockchain import FileBlockchain from thenewboston_node.business_logic.models import ( AccountState, Block, Node, NodeDeclarationSignedChangeRequest, PrimaryValidatorSchedule, PrimaryValidatorScheduleSignedChangeRequest ) from thenewboston_node.business_logi...
46.466667
108
0.809501
from thenewboston_node.business_logic.blockchain.file_blockchain import FileBlockchain from thenewboston_node.business_logic.models import ( AccountState, Block, Node, NodeDeclarationSignedChangeRequest, PrimaryValidatorSchedule, PrimaryValidatorScheduleSignedChangeRequest ) from thenewboston_node.business_logi...
true
true
f7216293508f30856c09ec8f6cc0f0a4c59f840b
400
py
Python
test/distributed/test_ddp_under_dist_autograd.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
test/distributed/test_ddp_under_dist_autograd.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
test/distributed/test_ddp_under_dist_autograd.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
#!/usr/bin/env python3 from torch.testing._internal.distributed import ddp_under_dist_autograd_test from torch.testing._internal.common_utils import ( run_tests, ) class TestDdpUnderDistAutogradWrapper(ddp_under_dist_autograd_test.TestDdpUnderDistAutograd): pass class TestDdpComparison(ddp_under_dist_autogra...
25
93
0.82
from torch.testing._internal.distributed import ddp_under_dist_autograd_test from torch.testing._internal.common_utils import ( run_tests, ) class TestDdpUnderDistAutogradWrapper(ddp_under_dist_autograd_test.TestDdpUnderDistAutograd): pass class TestDdpComparison(ddp_under_dist_autograd_test.TestDdpComparis...
true
true
f7216360a3f39f268083811c68d247e2aa9fdaad
5,037
py
Python
models/pointnet_seg.py
3D-semantic-Sgmentation/pointnet
029c0217143e6b69e685ab57cf243e322d47860f
[ "MIT" ]
null
null
null
models/pointnet_seg.py
3D-semantic-Sgmentation/pointnet
029c0217143e6b69e685ab57cf243e322d47860f
[ "MIT" ]
null
null
null
models/pointnet_seg.py
3D-semantic-Sgmentation/pointnet
029c0217143e6b69e685ab57cf243e322d47860f
[ "MIT" ]
null
null
null
# import tensorflow as tf import numpy as np import math import sys import os import tensorflow.compat.v1 as tf import tensorflow as tf2 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(os.path.join(BASE_DIR, '../utils')) import tf_util from transform_nets import input_tr...
40.95122
84
0.592416
import numpy as np import math import sys import os import tensorflow.compat.v1 as tf import tensorflow as tf2 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) sys.path.append(BASE_DIR) sys.path.append(os.path.join(BASE_DIR, '../utils')) import tf_util from transform_nets import input_transform_net, feature_tran...
true
true
f721636de9ed88c4501fc4920a1f38058472b148
8,344
py
Python
tests/adapters/test_dataframe_input.py
vedashree29296/BentoML
79f94d543a0684e04551207d102a2d254b770ad3
[ "Apache-2.0" ]
null
null
null
tests/adapters/test_dataframe_input.py
vedashree29296/BentoML
79f94d543a0684e04551207d102a2d254b770ad3
[ "Apache-2.0" ]
null
null
null
tests/adapters/test_dataframe_input.py
vedashree29296/BentoML
79f94d543a0684e04551207d102a2d254b770ad3
[ "Apache-2.0" ]
null
null
null
# pylint: disable=redefined-outer-name import itertools import json import math import time import flask import numpy as np import pandas as pd import psutil # noqa # pylint: disable=unused-import import pytest from bentoml.adapters import DataframeInput from bentoml.adapters.dataframe_input import read_dataframes_...
32.341085
87
0.647651
import itertools import json import math import time import flask import numpy as np import pandas as pd import psutil apters import DataframeInput from bentoml.adapters.dataframe_input import read_dataframes_from_json_n_csv from bentoml.utils.csv import csv_splitlines from bentoml.utils.dataframe_util import guess...
true
true
f721649ced49c4e8a9613dfffcb798078e8b305e
383
py
Python
vespa-cloud/cord-19-search/scripts/convert-to-feed.py
kuipertan/sample-apps
d52b942ea228336435d29a7ed007e72113aec827
[ "Apache-2.0" ]
null
null
null
vespa-cloud/cord-19-search/scripts/convert-to-feed.py
kuipertan/sample-apps
d52b942ea228336435d29a7ed007e72113aec827
[ "Apache-2.0" ]
null
null
null
vespa-cloud/cord-19-search/scripts/convert-to-feed.py
kuipertan/sample-apps
d52b942ea228336435d29a7ed007e72113aec827
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. import sys import json json_file = sys.argv[1] with open(json_file, 'r') as f: data = json.load(f) for doc in data: vespa_doc = { 'put': 'id:covid-19:doc::%s' % doc['id'...
23.9375
111
0.64752
import sys import json json_file = sys.argv[1] with open(json_file, 'r') as f: data = json.load(f) for doc in data: vespa_doc = { 'put': 'id:covid-19:doc::%s' % doc['id'], 'fields': doc } print(json.dumps(vespa_doc))
true
true
f72164ba62f9af6d6912ac1fc695a0949c138d93
1,051
py
Python
webservice/search/zeroconf_factory.py
PedalController/PedalPiREST
aa9418d44f2f5dbec604753a03bf8a74057c627c
[ "Apache-2.0" ]
null
null
null
webservice/search/zeroconf_factory.py
PedalController/PedalPiREST
aa9418d44f2f5dbec604753a03bf8a74057c627c
[ "Apache-2.0" ]
42
2016-07-04T11:17:54.000Z
2018-03-18T18:36:09.000Z
webservice/search/zeroconf_factory.py
PedalController/PedalPiREST
aa9418d44f2f5dbec604753a03bf8a74057c627c
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 SrMouraSilva # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
33.903226
74
0.744053
from unittest.mock import MagicMock from webservice.search.pybonjour_service import PybonjourService from webservice.search.zeroconf_service import ZeroconfService class ZeroconfFactory(object): @staticmethod def generate(name, port): if PybonjourService.has_support(): retu...
true
true
f72164bc7374018f80baa8ffb8176085266dae60
397
py
Python
CodingTest_Study1/week11/ex9095.py
FridayAlgorithm/taesong_study
50c07ee6ead0fb5bb80e0decb03b801cbbbabf9c
[ "MIT" ]
null
null
null
CodingTest_Study1/week11/ex9095.py
FridayAlgorithm/taesong_study
50c07ee6ead0fb5bb80e0decb03b801cbbbabf9c
[ "MIT" ]
null
null
null
CodingTest_Study1/week11/ex9095.py
FridayAlgorithm/taesong_study
50c07ee6ead0fb5bb80e0decb03b801cbbbabf9c
[ "MIT" ]
2
2020-12-27T15:03:46.000Z
2021-03-06T14:13:34.000Z
# BOJ 1,2,3 더하기 9095 T = int(input()) # 테스트 케이스의 개수 T가 주어짐 sum_list = [] for i in range(T): n = int(input()) sum_list.append(n) def oneTwoThreeSum(n): if n == 1: return 1 if n == 2: return 2 if n == 3: return 4 else: return oneTwoThreeSum(n-3) + oneTwoThreeSum(...
18.045455
78
0.561713
T = int(input()) sum_list = [] for i in range(T): n = int(input()) sum_list.append(n) def oneTwoThreeSum(n): if n == 1: return 1 if n == 2: return 2 if n == 3: return 4 else: return oneTwoThreeSum(n-3) + oneTwoThreeSum(n-2) + oneTwoThreeSum(n-1) for k in su...
true
true
f7216512710c309d4a2ab0b0e09080660ee5e81b
1,794
py
Python
src/features/utils.py
iamhuy/rumour-veracity-verification
e7e7f0c100545c2758584719e9f20f20cb6d0a85
[ "MIT" ]
null
null
null
src/features/utils.py
iamhuy/rumour-veracity-verification
e7e7f0c100545c2758584719e9f20f20cb6d0a85
[ "MIT" ]
7
2020-03-24T15:24:51.000Z
2021-06-01T21:43:16.000Z
src/features/utils.py
iamhuy/rumour-veracity-verification
e7e7f0c100545c2758584719e9f20f20cb6d0a85
[ "MIT" ]
null
null
null
from dateutil import parser import preprocessor as p def timestamp_to_date(timestamp): """ Conver a twitter timestamp to a datetime object :param timestamp: a string represent the timestamp :return: a datetime object """ return parser.parse(timestamp) def day_diff(timestamp1, timestamp2)...
29.9
107
0.696767
from dateutil import parser import preprocessor as p def timestamp_to_date(timestamp): return parser.parse(timestamp) def day_diff(timestamp1, timestamp2): return (timestamp_to_date(timestamp1) - timestamp_to_date(timestamp2)).days def read_brown_cluster_file(brown_cluster_text_file): brown_cluster_...
true
true
f72165731dd934a6ef471e84e61e6bbeae4d50c9
2,651
py
Python
vtpl_api/models/destination_type.py
vtpl1/videonetics_api
bef179df12f449db0c50c3910daca50b7d40ac49
[ "RSA-MD" ]
null
null
null
vtpl_api/models/destination_type.py
vtpl1/videonetics_api
bef179df12f449db0c50c3910daca50b7d40ac49
[ "RSA-MD" ]
1
2021-02-26T07:31:37.000Z
2021-02-26T07:31:37.000Z
vtpl_api/models/destination_type.py
vtpl1/videonetics_api
bef179df12f449db0c50c3910daca50b7d40ac49
[ "RSA-MD" ]
2
2020-11-04T02:52:55.000Z
2020-11-05T08:09:50.000Z
# coding: utf-8 """ Engine api Engine APIs # noqa: E501 OpenAPI spec version: 1.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class DestinationType(object): """NOTE: This class is auto generated by the swagger co...
25.990196
80
0.536024
import pprint import re import six class DestinationType(object): NONE = "none" RTSP = "rtsp" HTTP = "http" FILE = "file" FTP = "ftp" VMS = "vms" MQTT = "mqtt" AMQP = "amqp" S3 = "S3" VS3 = "VS3" BASEURL = "BaseUrl" RELATIVEURL = "RelativeUrl" ZEROMQ = "ZeroMQ...
true
true
f721659832fd95400b106db9d00e562f8df54211
183
py
Python
shopee_crawler/toolkit/__init__.py
ptrkhh/shopee-crawler
6d85748daa802ad9bb2f42ba56695b31d692f4b4
[ "MIT" ]
5
2021-09-09T18:32:49.000Z
2022-01-10T10:31:17.000Z
shopee_crawler/toolkit/__init__.py
ptrkhh/shopee-crawler
6d85748daa802ad9bb2f42ba56695b31d692f4b4
[ "MIT" ]
2
2021-09-10T14:28:52.000Z
2021-09-12T14:57:41.000Z
shopee_crawler/toolkit/__init__.py
ptrkhh/shopee-crawler
6d85748daa802ad9bb2f42ba56695b31d692f4b4
[ "MIT" ]
6
2021-09-25T14:03:57.000Z
2022-03-19T14:44:04.000Z
from .crawl_by_cat_url import crawl_by_cat_url from .crawl_by_search import crawl_by_search from .crawl_by_shop_url import crawl_by_shop_url from .crawl_cat_list import crawl_cat_list
45.75
48
0.896175
from .crawl_by_cat_url import crawl_by_cat_url from .crawl_by_search import crawl_by_search from .crawl_by_shop_url import crawl_by_shop_url from .crawl_cat_list import crawl_cat_list
true
true
f72166b67f4730956f03af23668fb17b0bfb75ba
170
py
Python
old/dronekit-python/dronekit/util.py
sirmammingtonham/droneee
1c0e1921a902b26958d298f3a0204465bf3e960d
[ "Unlicense" ]
null
null
null
old/dronekit-python/dronekit/util.py
sirmammingtonham/droneee
1c0e1921a902b26958d298f3a0204465bf3e960d
[ "Unlicense" ]
null
null
null
old/dronekit-python/dronekit/util.py
sirmammingtonham/droneee
1c0e1921a902b26958d298f3a0204465bf3e960d
[ "Unlicense" ]
null
null
null
from __future__ import print_function import sys def errprinter(*args): logger(*args) def logger(*args): print(*args, file=sys.stderr) sys.stderr.flush()
14.166667
37
0.7
from __future__ import print_function import sys def errprinter(*args): logger(*args) def logger(*args): print(*args, file=sys.stderr) sys.stderr.flush()
true
true
f72168144f40c3dc94f255559a486ee91e85c71f
10,646
py
Python
userbot/plugins/chatinfo.py
meaall-com/Telebot
a08193ae6c3e5814b309d079e95c4951eafcbc19
[ "MIT" ]
3
2020-09-04T09:34:51.000Z
2020-09-04T09:39:26.000Z
userbot/plugins/chatinfo.py
meaall-com/Telebot
a08193ae6c3e5814b309d079e95c4951eafcbc19
[ "MIT" ]
null
null
null
userbot/plugins/chatinfo.py
meaall-com/Telebot
a08193ae6c3e5814b309d079e95c4951eafcbc19
[ "MIT" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # # Credits to Hitalo-Sama and FTG Modules from datetime import datetime from emoji import emojize from math import sqrt...
46.286957
138
0.656021
from datetime import datetime from emoji import emojize from math import sqrt from telethon.tl.functions.channels import GetFullChannelRequest, GetParticipantsRequest from telethon.tl.functions.messages import GetFullChatRequest, GetHistoryRequest from telethon.tl.types import MessageActionChannelMigrateFrom, Ch...
true
true
f72168324e6096dddf572876cab151217254f430
3,592
py
Python
examples/resume_train_segm.py
dani-lbnl/msdnet
20f503322524ceb340379448f1778a58bb1f9a18
[ "MIT" ]
24
2019-08-24T06:42:51.000Z
2021-10-09T14:27:51.000Z
examples/resume_train_segm.py
dani-lbnl/msdnet
20f503322524ceb340379448f1778a58bb1f9a18
[ "MIT" ]
12
2019-07-31T06:56:19.000Z
2020-12-05T18:08:54.000Z
examples/resume_train_segm.py
dani-lbnl/msdnet
20f503322524ceb340379448f1778a58bb1f9a18
[ "MIT" ]
11
2019-09-17T02:39:24.000Z
2022-03-30T21:28:35.000Z
#----------------------------------------------------------------------- #Copyright 2019 Centrum Wiskunde & Informatica, Amsterdam # #Author: Daniel M. Pelt #Contact: D.M.Pelt@cwi.nl #Website: http://dmpelt.github.io/msdnet/ #License: MIT # #This file is part of MSDNet, a Python implementation of the #Mixed-Scale Dense...
43.277108
178
0.700724
import msdnet from pathlib import Path flsin = sorted((Path('train') / 'noisy').glob('*.tiff')) flstg = sorted((Path('train') / 'label').glob('*.tiff')) dats = [] for i in range(len(flsin)): d = msdnet.data.ImageFileDataPoint(str(flsin[i]),str(flstg[i])) d_oh = msdnet.data.OneHo...
true
true
f721694c28a049e466ab20f52517ffcffb2f736f
1,578
py
Python
github.py
anoadragon453/msc-chatbot
ae8bc4b900df500e4f31b85041de2ebfbedd8dd9
[ "Apache-2.0" ]
2
2019-10-06T18:13:46.000Z
2019-12-07T22:02:40.000Z
github.py
anoadragon453/msc-chatbot
ae8bc4b900df500e4f31b85041de2ebfbedd8dd9
[ "Apache-2.0" ]
null
null
null
github.py
anoadragon453/msc-chatbot
ae8bc4b900df500e4f31b85041de2ebfbedd8dd9
[ "Apache-2.0" ]
null
null
null
import requests import json from errors import BotException import logging logger = logging.getLogger(__name__) class Github(object): def __init__(self, repo_slug: str): """ Args: repo_slug: The slug (user/repo_name) of the github repository """ # TODO: Add support fo...
30.941176
100
0.603295
import requests import json from errors import BotException import logging logger = logging.getLogger(__name__) class Github(object): def __init__(self, repo_slug: str): self.repo_slug = repo_slug self.api_base = "https://api.github.com" def get_info_for_issue_pr(self, num: int) ->...
true
true
f721696ba4b25105e5eb43dca6f3445e9352f0a4
265
py
Python
ctfweb/admin.py
pdogg/ctfmanager
d8f0ac7d7e12d7973b7eb39cd30a0bc81e4cb770
[ "BSD-3-Clause" ]
10
2015-01-27T23:01:03.000Z
2016-12-14T01:00:49.000Z
ctfweb/admin.py
pdogg/ctfmanager
d8f0ac7d7e12d7973b7eb39cd30a0bc81e4cb770
[ "BSD-3-Clause" ]
null
null
null
ctfweb/admin.py
pdogg/ctfmanager
d8f0ac7d7e12d7973b7eb39cd30a0bc81e4cb770
[ "BSD-3-Clause" ]
8
2015-03-01T16:57:05.000Z
2022-02-20T03:48:04.000Z
from django.contrib import admin from ctfweb.models import * admin.site.register(Game) admin.site.register(Category) admin.site.register(Challenge) admin.site.register(Hint) admin.site.register(Competitor) admin.site.register(Solved) admin.site.register(RegCodes)
24.090909
32
0.822642
from django.contrib import admin from ctfweb.models import * admin.site.register(Game) admin.site.register(Category) admin.site.register(Challenge) admin.site.register(Hint) admin.site.register(Competitor) admin.site.register(Solved) admin.site.register(RegCodes)
true
true
f7216b0dc1766301347181cd7059ad601ead0155
11,484
py
Python
components/app_update/otatool.py
thomasonw/esp-idf
abea9e4c02bb17e86298aec4e299780399e4789f
[ "Apache-2.0" ]
6
2018-12-28T04:00:22.000Z
2021-05-17T08:01:41.000Z
components/app_update/otatool.py
Wangrenai/esp-idf
abea9e4c02bb17e86298aec4e299780399e4789f
[ "Apache-2.0" ]
1
2019-02-15T06:43:13.000Z
2019-02-15T06:43:13.000Z
components/app_update/otatool.py
Wangrenai/esp-idf
abea9e4c02bb17e86298aec4e299780399e4789f
[ "Apache-2.0" ]
1
2019-05-01T14:00:23.000Z
2019-05-01T14:00:23.000Z
#!/usr/bin/env python # # otatool is used to perform ota-level operations - flashing ota partition # erasing ota partition and switching ota partition # # Copyright 2018 Espressif Systems (Shanghai) PTE LTD # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complia...
35.012195
154
0.698015
function, division import argparse import os import sys import binascii import subprocess import tempfile import collections import struct __version__ = '1.0' IDF_COMPONENTS_PATH = os.path.expandvars(os.path.join("$IDF_PATH", "components")) PARTTOOL_PY = os.path.join(IDF_COMPONENTS_PATH, "partition_table"...
true
true
f7216b59c00f5f5b82ec9c7b9bf5292699ace5fe
82
py
Python
akshare/fx/__init__.py
ghmole/akshare
eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6
[ "MIT" ]
12
2020-12-30T02:50:01.000Z
2021-11-08T11:32:51.000Z
akshare/fx/__init__.py
ghmole/akshare
eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6
[ "MIT" ]
3
2021-01-26T09:31:43.000Z
2021-12-08T08:31:54.000Z
akshare/fx/__init__.py
ghmole/akshare
eeeec96f90c6738bcd9ce92fcfa6b9c9176928a6
[ "MIT" ]
13
2020-07-08T08:48:33.000Z
2022-03-23T08:37:11.000Z
# -*- coding:utf-8 -*- # /usr/bin/env python """ Date: 2019/10/20 10:57 Desc: """
11.714286
22
0.54878
true
true
f7216c4cb45aea88f34bb4f84f11c15334366e5e
6,588
py
Python
tools/Polygraphy/tests/comparator/test_comparator.py
SsisyphusTao/TensorRT
69f5a5093a39184e137a55c908d5c4d1340b009a
[ "Apache-2.0" ]
5,249
2019-06-17T17:20:34.000Z
2022-03-31T17:56:05.000Z
tools/Polygraphy/tests/comparator/test_comparator.py
SsisyphusTao/TensorRT
69f5a5093a39184e137a55c908d5c4d1340b009a
[ "Apache-2.0" ]
1,721
2019-06-17T18:13:29.000Z
2022-03-31T16:09:53.000Z
tools/Polygraphy/tests/comparator/test_comparator.py
SsisyphusTao/TensorRT
69f5a5093a39184e137a55c908d5c4d1340b009a
[ "Apache-2.0" ]
1,414
2019-06-18T04:01:17.000Z
2022-03-31T09:16:53.000Z
# # Copyright (c) 2021, NVIDIA CORPORATION. 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 appl...
43.92
117
0.696266
import subprocess as sp import numpy as np import pytest import tensorrt as trt from polygraphy.backend.onnx import BytesFromOnnx, OnnxFromTfGraph, GsFromOnnx from polygraphy.backend.onnxrt import OnnxrtRunner, SessionFromOnnx from polygraphy.backend.pluginref import PluginRefRunner from polygraphy.back...
true
true
f7216d1ac89a7301575efb5070db47b073f062f7
1,614
py
Python
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/sub_protection_policy.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
39.365854
82
0.64746
from msrest.serialization import Model class SubProtectionPolicy(Model): _attribute_map = { 'policy_type': {'key': 'policyType', 'type': 'str'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'Reten...
true
true
f7216ef57361718e2a601232dbdfdcdcad313aad
640
py
Python
backend/colaboradores/schema.py
leonunesbs/medico
384796f346b001d028e1bec2676ae7242749a79a
[ "MIT" ]
1
2021-12-26T03:27:26.000Z
2021-12-26T03:27:26.000Z
backend/colaboradores/schema.py
leonunesbs/medico
384796f346b001d028e1bec2676ae7242749a79a
[ "MIT" ]
6
2021-09-01T19:52:46.000Z
2022-02-15T20:48:27.000Z
backend/colaboradores/schema.py
leonunesbs/medico
384796f346b001d028e1bec2676ae7242749a79a
[ "MIT" ]
null
null
null
from graphene import relay, ObjectType from graphene_django import DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from .models import Colaborador class ColaboradorNode(DjangoObjectType): class Meta: model = Colaborador filter_fields = '__all__' interfaces ...
22.068966
68
0.753125
from graphene import relay, ObjectType from graphene_django import DjangoObjectType from graphene_django.filter import DjangoFilterConnectionField from .models import Colaborador class ColaboradorNode(DjangoObjectType): class Meta: model = Colaborador filter_fields = '__all__' interfaces ...
true
true
f721704148332e77abcaafead1bc2fa7b96d4007
1,233
py
Python
src/server/services/mp/settings/save.py
jhchen3121/wechat_shop
c9d9ad009df1e5bb0eb23ca8d830dd5c15df5328
[ "Apache-2.0" ]
null
null
null
src/server/services/mp/settings/save.py
jhchen3121/wechat_shop
c9d9ad009df1e5bb0eb23ca8d830dd5c15df5328
[ "Apache-2.0" ]
5
2021-01-28T21:18:27.000Z
2022-03-25T19:10:01.000Z
src/server/services/mp/settings/save.py
jhchen3121/wechat_shop
c9d9ad009df1e5bb0eb23ca8d830dd5c15df5328
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from core_backend import context from core_backend.service import handler from core_backend.libs.exception import Error from server.domain.models import WechatshopUser import re import time im...
25.163265
87
0.633414
from __future__ import unicode_literals from __future__ import absolute_import from core_backend import context from core_backend.service import handler from core_backend.libs.exception import Error from server.domain.models import WechatshopUser import re import time import base64 import logging import settings ...
true
true
f72170a4485c1de01d00d965e672b8a4a3f275cd
3,311
py
Python
robotx/core/listener.py
ylbian/robot-d
4046d8ff1774399d2983c35bb4d4b6b51efc37cf
[ "MIT" ]
44
2015-01-10T12:09:53.000Z
2021-09-30T22:56:07.000Z
robotx/core/listener.py
ylbian/robot-d
4046d8ff1774399d2983c35bb4d4b6b51efc37cf
[ "MIT" ]
null
null
null
robotx/core/listener.py
ylbian/robot-d
4046d8ff1774399d2983c35bb4d4b6b51efc37cf
[ "MIT" ]
25
2015-05-25T05:26:19.000Z
2021-11-10T15:48:17.000Z
""" RobotX Listener. Integrate with Test Case Management System, such as, test-run creating. result re-write. Author: Xin Gao <fdumpling@gmail.com> """ import re from robotx.core.nitrateclient import TCMS class TCMSListener(object): """ integrate with Test Case Management System, such as, test-run cre...
32.460784
76
0.563878
""" RobotX Listener. Integrate with Test Case Management System, such as, test-run creating. result re-write. Author: Xin Gao <fdumpling@gmail.com> """ import re from robotx.core.nitrateclient import TCMS class TCMSListener(object): """ integrate with Test Case Management System, such as, test-run cre...
false
true
f7217194f4c19697a8e59fe9babfa90a23edf214
2,031
py
Python
tests/test_db_utils.py
larssl780/thin_wrappers
c0791d76a734303708892a25cce2e237caf9920a
[ "MIT" ]
null
null
null
tests/test_db_utils.py
larssl780/thin_wrappers
c0791d76a734303708892a25cce2e237caf9920a
[ "MIT" ]
4
2022-02-04T15:18:31.000Z
2022-02-07T15:07:43.000Z
tests/test_db_utils.py
larssl780/thin_wrappers
c0791d76a734303708892a25cce2e237caf9920a
[ "MIT" ]
null
null
null
import pytest import pathlib import sys import requests import io import zipfile import tempfile import pandas as pd import os HERE = pathlib.Path(__file__).resolve().parent # insert at 1, 0 is the script path (or '' in REPL) # temporary hack until package is published and we can inherit from there: sys.path.inser...
30.313433
148
0.65485
import pytest import pathlib import sys import requests import io import zipfile import tempfile import pandas as pd import os HERE = pathlib.Path(__file__).resolve().parent sys.path.insert(1, '%s/thin_wrappers' % HERE.parent) import db_utils as db def headers(): return {'Accept': 'application/json, tex...
true
true
f721726ac088dd61876dfef95afdd66374bad3ee
9,061
py
Python
cinder/tests/unit/image/fake.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/image/fake.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/image/fake.py
2020human/cinder
04528318848620e4ce2639ea2dd5323783dc7a1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 Justin Santa Barbara # 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/l...
36.833333
79
0.522238
import copy import datetime import mock import uuid from cinder import exception import cinder.image.glance class _FakeImageService(object): def __init__(self): self.images = {} # So, make sure we've got one.. timestamp = datetime.datetime(2011, 1, 1, 1, 2, 3) ...
true
true
f72173450168ae1e2087830e5c05a6eac53ab7d3
3,780
py
Python
uvAnalyser.py
bacheloruhh/uvAnalyser
b8962305831336fac10cc3b38b44777a28f517ff
[ "MIT" ]
null
null
null
uvAnalyser.py
bacheloruhh/uvAnalyser
b8962305831336fac10cc3b38b44777a28f517ff
[ "MIT" ]
null
null
null
uvAnalyser.py
bacheloruhh/uvAnalyser
b8962305831336fac10cc3b38b44777a28f517ff
[ "MIT" ]
null
null
null
import csv import os # ==================== # Default variables: default_avg_cnt = 10 default_exc_thr = 0.02 default_low_wvl = 300 default_hig_wvl = 1014 default_delimit = '\t' default_exc_fin = True # ==================== def welcome(): # Print a welcome screen and ask for user input. Check if input is valid. ...
30.483871
79
0.571958
import csv import os default_avg_cnt = 10 default_exc_thr = 0.02 default_low_wvl = 300 default_hig_wvl = 1014 default_delimit = '\t' default_exc_fin = True def welcome(): print("Welcome.\nThis script will merge all files in this directory, " + "normalize them\nand make suggestions for the...
false
true
f721754672bebac235baff6704cad30073fc6e3a
2,231
py
Python
recipes/python/template/template/trainingdataloader.py
tumulurik/acp-data-services-dsw-reference
4ec0a161203a1097069bb5c0044eb6df137c5f6d
[ "Apache-2.0" ]
null
null
null
recipes/python/template/template/trainingdataloader.py
tumulurik/acp-data-services-dsw-reference
4ec0a161203a1097069bb5c0044eb6df137c5f6d
[ "Apache-2.0" ]
null
null
null
recipes/python/template/template/trainingdataloader.py
tumulurik/acp-data-services-dsw-reference
4ec0a161203a1097069bb5c0044eb6df137c5f6d
[ "Apache-2.0" ]
1
2018-11-15T19:15:50.000Z
2018-11-15T19:15:50.000Z
##################################################################### # ADOBE CONFIDENTIAL # ___________________ # # Copyright 2017 Adobe # All Rights Reserved. # # NOTICE: All information contained herein is, and remains # the property of Adobe and its suppliers, if any. The intellectual # and technical concepts co...
34.859375
88
0.556253
true
true
f72175eba1256181da7f1dbcf593e18eb8a344a6
7,472
py
Python
neo/io/__init__.py
Warfley/python-neo
875e23a417e1a65d5cb45403e6e3261155e2741d
[ "BSD-3-Clause" ]
1
2020-06-08T14:00:03.000Z
2020-06-08T14:00:03.000Z
neo/io/__init__.py
Warfley/python-neo
875e23a417e1a65d5cb45403e6e3261155e2741d
[ "BSD-3-Clause" ]
22
2016-09-13T13:31:25.000Z
2019-05-14T17:07:16.000Z
neo/io/__init__.py
Warfley/python-neo
875e23a417e1a65d5cb45403e6e3261155e2741d
[ "BSD-3-Clause" ]
null
null
null
""" :mod:`neo.io` provides classes for reading and/or writing electrophysiological data files. Note that if the package dependency is not satisfied for one io, it does not raise an error but a warning. :attr:`neo.io.iolist` provides a list of successfully imported io classes. Functions: .. autofunction:: neo.io.get...
22.172107
79
0.720021
import os.path try: import neuroshare as ns except ImportError as err: from neo.io.neurosharectypesio import NeurosharectypesIO as NeuroshareIO else: from neo.io.neuroshareapiio import NeuroshareapiIO as NeuroshareIO from neo.io.alphaomegaio import AlphaOmegaIO from neo.io.as...
true
true
f721766457ab8501938015654594e370b906deb0
3,890
py
Python
workflow/scripts/combine_virsorter_virfinder.py
rdenise/virome_pipeline
3c629aef75b184bf39f2d14043f94e8787e3ea14
[ "MIT" ]
1
2022-03-29T21:18:53.000Z
2022-03-29T21:18:53.000Z
workflow/scripts/combine_virsorter_virfinder.py
rdenise/virome_pipeline
3c629aef75b184bf39f2d14043f94e8787e3ea14
[ "MIT" ]
null
null
null
workflow/scripts/combine_virsorter_virfinder.py
rdenise/virome_pipeline
3c629aef75b184bf39f2d14043f94e8787e3ea14
[ "MIT" ]
null
null
null
from Bio import SeqIO import pandas as pd import sys import os # Put error and out into the log file sys.stderr = sys.stdout = open(snakemake.log[0], "w") ########################################################### ########################################################### # List that will contains all the contigs ...
31.626016
81
0.648072
from Bio import SeqIO import pandas as pd import sys import os sys.stderr = sys.stdout = open(snakemake.log[0], "w")
true
true
f7217746e68b217cef673ded6405c62a5976ac18
5,365
py
Python
Benchmarking/CM_Benchmark/basic_benchmark/rde.py
CipiOrhei/eecvf
759fb2127c8d65a570ba2df536ff8429ccf5bdf2
[ "MIT" ]
1
2021-04-02T15:33:12.000Z
2021-04-02T15:33:12.000Z
Benchmarking/CM_Benchmark/basic_benchmark/rde.py
CipiOrhei/eecvf
759fb2127c8d65a570ba2df536ff8429ccf5bdf2
[ "MIT" ]
null
null
null
Benchmarking/CM_Benchmark/basic_benchmark/rde.py
CipiOrhei/eecvf
759fb2127c8d65a570ba2df536ff8429ccf5bdf2
[ "MIT" ]
1
2021-08-14T09:07:22.000Z
2021-08-14T09:07:22.000Z
import math import os from math import log10 # noinspection PyPackageRequirements import cv2 import numpy as np from scipy.ndimage import distance_transform_edt import config_main from Utils.log_handler import log_setup_info_to_console, log_error_to_console, log_benchmark_info_to_console from Benchmarking.Ut...
37.517483
146
0.608574
import math import os from math import log10 import cv2 import numpy as np from scipy.ndimage import distance_transform_edt import config_main from Utils.log_handler import log_setup_info_to_console, log_error_to_console, log_benchmark_info_to_console from Benchmarking.Util.image_parsing import find_img_exte...
true
true
f7217797ff9948fe15504b1554d32d09382f057d
3,899
py
Python
PaddleCV/tracking/ltr/data/loader.py
zhousanfu/paddle-demo
56860c5241874fe6111def46ea2f3f91e3ba80de
[ "Apache-2.0" ]
1
2021-07-07T11:04:11.000Z
2021-07-07T11:04:11.000Z
PaddleCV/tracking/ltr/data/loader.py
zhousanfu/paddle_demo
56860c5241874fe6111def46ea2f3f91e3ba80de
[ "Apache-2.0" ]
null
null
null
PaddleCV/tracking/ltr/data/loader.py
zhousanfu/paddle_demo
56860c5241874fe6111def46ea2f3f91e3ba80de
[ "Apache-2.0" ]
1
2021-05-18T06:36:32.000Z
2021-05-18T06:36:32.000Z
import os import sys import dataflow as df import numpy as np class LTRLoader(df.DataFlow): """ Data loader. Combines a dataset and a sampler, and provides single- or multi-process iterators over the dataset. Note: an additional option stack_dim is available to select along which dimensi...
39.383838
90
0.60118
import os import sys import dataflow as df import numpy as np class LTRLoader(df.DataFlow): __initialized = False def __init__(self, name, dataset, training=True, batch_size=1, shuffle=False, sampler=None,...
true
true
f72177dda3702aa0aa6df33982088a3eb433c9ba
13,260
py
Python
Lib/test/test_module.py
ErikBjare/cpython
b68431fadb3150134ac6ccbf501cdfeaf4c75678
[ "0BSD" ]
5
2021-12-03T23:11:53.000Z
2022-01-08T21:02:50.000Z
Lib/test/test_module.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
8
2022-01-07T11:31:11.000Z
2022-03-04T00:07:16.000Z
Lib/test/test_module.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
1
2022-03-27T18:34:54.000Z
2022-03-27T18:34:54.000Z
# Test the module type import unittest import weakref from test.support import gc_collect from test.support import import_helper from test.support.script_helper import assert_python_ok import sys ModuleType = type(sys) class FullLoader: @classmethod def module_repr(cls, m): return "<module '{}' (craft...
35.74124
80
0.597511
import unittest import weakref from test.support import gc_collect from test.support import import_helper from test.support.script_helper import assert_python_ok import sys ModuleType = type(sys) class FullLoader: @classmethod def module_repr(cls, m): return "<module '{}' (crafted)>".format(m.__name_...
true
true
f7217a596eab242de146ed6262830949ee89e841
3,214
py
Python
tsa/links/crawl.py
chbrown/topic-sentiment-authorship
e8cacf11b06583d9ed85ff790e1d5322e59f2fd6
[ "MIT" ]
null
null
null
tsa/links/crawl.py
chbrown/topic-sentiment-authorship
e8cacf11b06583d9ed85ff790e1d5322e59f2fd6
[ "MIT" ]
null
null
null
tsa/links/crawl.py
chbrown/topic-sentiment-authorship
e8cacf11b06583d9ed85ff790e1d5322e59f2fd6
[ "MIT" ]
null
null
null
#!/usr/bin/env python import socket import urllib.parse from datetime import datetime import requests import requests.exceptions as reqexc import sqlalchemy.exc as sqlexc from tsa import stdoutn from tsa.lib import html from tsa.models import Endpoint, create_session from tsa import logging logger = logging.getLogger...
32.14
90
0.641257
import socket import urllib.parse from datetime import datetime import requests import requests.exceptions as reqexc import sqlalchemy.exc as sqlexc from tsa import stdoutn from tsa.lib import html from tsa.models import Endpoint, create_session from tsa import logging logger = logging.getLogger(__name__) whitespac...
true
true
f7217b021c92c57203280273bd959699cf6039c7
46,777
py
Python
learningTolearn/backbone/common.py
ximingxing/Learning-To-Learn
0135cb41521a61d1f3248cf3fe409e51f824fe25
[ "MIT" ]
5
2019-12-01T02:52:39.000Z
2020-10-20T01:51:40.000Z
learningTolearn/backbone/common.py
ximingxing/DeepLearningWithPytorch
0135cb41521a61d1f3248cf3fe409e51f824fe25
[ "MIT" ]
1
2019-11-18T13:26:50.000Z
2019-11-18T13:26:50.000Z
learningTolearn/backbone/common.py
ximingxing/Learning-To-Learn
0135cb41521a61d1f3248cf3fe409e51f824fe25
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Description : Common routines for models in PyTorch. Author : xxm """ __all__ = ['round_channels', 'Identity', 'Swish', 'HSigmoid', 'HSwish', 'get_activation_layer', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x3_block', 'conv7x7...
31.122422
120
0.579195
__all__ = ['round_channels', 'Identity', 'Swish', 'HSigmoid', 'HSwish', 'get_activation_layer', 'conv1x1', 'conv3x3', 'depthwise_conv3x3', 'ConvBlock', 'conv1x1_block', 'conv3x3_block', 'conv7x7_block', 'dwconv_block', 'dwconv3x3_block', 'dwconv5x5_block', 'dwsconv3x3_block', 'PreConvBlock', 'pr...
true
true
f7217b1eb67a285016b2a98bb8fdd6162553f11b
1,418
py
Python
crds/jwst/__init__.py
nden/crds
b72f14cf07531ca70b61daa6b58e762e5899afa4
[ "BSD-3-Clause" ]
null
null
null
crds/jwst/__init__.py
nden/crds
b72f14cf07531ca70b61daa6b58e762e5899afa4
[ "BSD-3-Clause" ]
null
null
null
crds/jwst/__init__.py
nden/crds
b72f14cf07531ca70b61daa6b58e762e5899afa4
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function from __future__ import division from __future__ import absolute_import import os.path from crds import reftypes HERE = os.path.dirname(__file__) or "." TYPES = reftypes.from_package_file(__file__) INSTRUMENTS = TYPES.instruments EXTENSIONS = TYPES.extensions TEXT_DESCR = TYPES...
33.761905
146
0.738364
from __future__ import print_function from __future__ import division from __future__ import absolute_import import os.path from crds import reftypes HERE = os.path.dirname(__file__) or "." TYPES = reftypes.from_package_file(__file__) INSTRUMENTS = TYPES.instruments EXTENSIONS = TYPES.extensions TEXT_DESCR = TYPES...
true
true