hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f738411a68cc8ef6d14e124650f740b9b7d12b3a
116
py
Python
Automate boring stuff with Python/8. Input validation/test_pyinputplus.py
aKn8194/python_training_camp
8ab781ba0dc23e71a52dba323e015b002e660249
[ "MIT" ]
null
null
null
Automate boring stuff with Python/8. Input validation/test_pyinputplus.py
aKn8194/python_training_camp
8ab781ba0dc23e71a52dba323e015b002e660249
[ "MIT" ]
null
null
null
Automate boring stuff with Python/8. Input validation/test_pyinputplus.py
aKn8194/python_training_camp
8ab781ba0dc23e71a52dba323e015b002e660249
[ "MIT" ]
null
null
null
import pyinputplus as pyip response = pyip.inputNum(blockRegexes=[r'[02468]$']) print(f"Your number is {response}")
29
52
0.75
import pyinputplus as pyip response = pyip.inputNum(blockRegexes=[r'[02468]$']) print(f"Your number is {response}")
true
true
f7384294fe88d65c0cbd19f3f2b7e46ed1246e59
165
py
Python
problem/10000~19999/10813/10813.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/10000~19999/10813/10813.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/10000~19999/10813/10813.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
n,m=map(int,input().split()) x=[i for i in range(1,n+1)] for i in range(m): a,b=map(int,input().split()) x[a-1],x[b-1]=x[b-1],x[a-1] for i in x: print(i,end=' ')
27.5
30
0.557576
n,m=map(int,input().split()) x=[i for i in range(1,n+1)] for i in range(m): a,b=map(int,input().split()) x[a-1],x[b-1]=x[b-1],x[a-1] for i in x: print(i,end=' ')
true
true
f73842990d3c34bb39b1979920ca99697d282613
413
py
Python
agent/indy_catalyst_agent/storage/tests/test__record.py
TelegramSam/indy-catalyst
476f5a773d90d8b50960b49e63b823bd13325d4a
[ "Apache-2.0" ]
null
null
null
agent/indy_catalyst_agent/storage/tests/test__record.py
TelegramSam/indy-catalyst
476f5a773d90d8b50960b49e63b823bd13325d4a
[ "Apache-2.0" ]
null
null
null
agent/indy_catalyst_agent/storage/tests/test__record.py
TelegramSam/indy-catalyst
476f5a773d90d8b50960b49e63b823bd13325d4a
[ "Apache-2.0" ]
null
null
null
import pytest from indy_catalyst_agent.storage import StorageRecord class TestStorageRecord: def test_create(self): record_type = "TYPE" record_value = "VALUE" record = StorageRecord(record_type, record_value) assert record.type == record_type assert record.value == recor...
25.8125
57
0.680387
import pytest from indy_catalyst_agent.storage import StorageRecord class TestStorageRecord: def test_create(self): record_type = "TYPE" record_value = "VALUE" record = StorageRecord(record_type, record_value) assert record.type == record_type assert record.value == recor...
true
true
f73842e362385d9650d01c6fcf670ad28a90bcf1
762
py
Python
analyzer/google_search.py
Gr1ph00n/staticwebanalyzer
8bf6337a77192b85913d75778830ccbb9006081f
[ "MIT" ]
null
null
null
analyzer/google_search.py
Gr1ph00n/staticwebanalyzer
8bf6337a77192b85913d75778830ccbb9006081f
[ "MIT" ]
null
null
null
analyzer/google_search.py
Gr1ph00n/staticwebanalyzer
8bf6337a77192b85913d75778830ccbb9006081f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # file name: google_search.py # created by: Ventura Del Monte # purpose: Google Search Implementation # last edited by: Ventura Del Monte 04-10-2014 from internal_browser import * from bs4 import BeautifulSoup import urlparse import re class GoogleSearch(InternalBrowser): # base_url = "https:/...
26.275862
68
0.695538
from internal_browser import * from bs4 import BeautifulSoup import urlparse import re class GoogleSearch(InternalBrowser): def __init__(self): InternalBrowser.__init__(self, usrAgent = ['windows7', 'firefox']) self.open("www.google.com") def search(self, query): data = self.queryForm('gbqf', 'q', que...
true
true
f7384402c68c14f45531569af971135425fc04bb
3,178
py
Python
api/tests/integration/tests/basic/query_instrumentation.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
204
2015-11-06T21:34:34.000Z
2022-03-30T16:17:01.000Z
api/tests/integration/tests/basic/query_instrumentation.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
509
2015-11-05T13:54:43.000Z
2022-03-30T22:15:30.000Z
api/tests/integration/tests/basic/query_instrumentation.py
tsingdao-Tp/Indigo
b2d73faebb6a450e9b3d34fed553fad4f9d0012f
[ "Apache-2.0" ]
89
2015-11-17T08:22:54.000Z
2022-03-17T04:26:28.000Z
import sys import errno sys.path.append('../../common') from env_indigo import * indigo = Indigo() indigo.setOption("molfile-saving-skip-date", "1"); if not os.path.exists(joinPathPy("out", __file__)): try: os.makedirs(joinPathPy("out", __file__)) except OSError as e: if e.errno != errno.EEXI...
22.539007
67
0.630271
import sys import errno sys.path.append('../../common') from env_indigo import * indigo = Indigo() indigo.setOption("molfile-saving-skip-date", "1"); if not os.path.exists(joinPathPy("out", __file__)): try: os.makedirs(joinPathPy("out", __file__)) except OSError as e: if e.errno != errno.EEXI...
true
true
f7384618cd9b30b12408b6f7beb9b29aa7c23345
857
py
Python
icetea_lib/main.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
6
2018-08-10T17:11:10.000Z
2020-04-29T07:05:36.000Z
icetea_lib/main.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
58
2018-08-13T08:36:08.000Z
2021-07-07T08:32:52.000Z
icetea_lib/main.py
noralsydmp/icetea
b486cdc8e0d2211e118f1f8211aa4d284ca02422
[ "Apache-2.0" ]
7
2018-08-10T12:53:18.000Z
2021-11-08T05:15:42.000Z
""" Copyright 2017 ARM Limited 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, software dis...
29.551724
82
0.750292
import sys def icetea_main(): from icetea_lib import IceteaManager manager = IceteaManager.IceteaManager() return_code = manager.run() sys.exit(return_code)
true
true
f738462af05b013d8e8f5c3127d265b2e1e9e3b8
444
py
Python
aoc_12b.py
georgwille/aoc2020
899146e52c42b7c7c6781c872b3afc3c1cd90154
[ "MIT" ]
null
null
null
aoc_12b.py
georgwille/aoc2020
899146e52c42b7c7c6781c872b3afc3c1cd90154
[ "MIT" ]
null
null
null
aoc_12b.py
georgwille/aoc2020
899146e52c42b7c7c6781c872b3afc3c1cd90154
[ "MIT" ]
null
null
null
fin = open('input_12.txt') p = 0+0j w = 10+1j offset = {'E':1+0j,'N':0+1j,'W':-1+0j,'S':0-1j} rot = {'L':0+1j,'R':0-1j} for line in fin: letter = line[0] number = int(line[1:-1]) d = w-p if letter in "ENWS": w += number*offset[letter] elif letter == "F": p += number*d w +=...
19.304348
47
0.490991
fin = open('input_12.txt') p = 0+0j w = 10+1j offset = {'E':1+0j,'N':0+1j,'W':-1+0j,'S':0-1j} rot = {'L':0+1j,'R':0-1j} for line in fin: letter = line[0] number = int(line[1:-1]) d = w-p if letter in "ENWS": w += number*offset[letter] elif letter == "F": p += number*d w +=...
true
true
f7384683bf0b82f9eecf4f22f1d0d2cb2b33a7c2
1,219
py
Python
mvn/models/pose_hrnet.py
kristijanbartol/learnable-triangulation-pytorch
a8475847f9c71119fa557aad4328b326be09c136
[ "MIT" ]
null
null
null
mvn/models/pose_hrnet.py
kristijanbartol/learnable-triangulation-pytorch
a8475847f9c71119fa557aad4328b326be09c136
[ "MIT" ]
null
null
null
mvn/models/pose_hrnet.py
kristijanbartol/learnable-triangulation-pytorch
a8475847f9c71119fa557aad4328b326be09c136
[ "MIT" ]
null
null
null
from mmpose.core import wrap_fp16_model from mmpose.models.detectors.top_down import TopDown class HRNet(TopDown): def __init__(self, backbone, neck=None, keypoint_head=None, train_cfg=None, test_cfg=None, pretr...
26.5
75
0.621001
from mmpose.core import wrap_fp16_model from mmpose.models.detectors.top_down import TopDown class HRNet(TopDown): def __init__(self, backbone, neck=None, keypoint_head=None, train_cfg=None, test_cfg=None, pretr...
true
true
f73846e155724f14e2a3005b07b360cd830f0335
628
py
Python
src/custom_io.py
RostanTabet/Refery
acc66487e5ae9d28ad91cb8c874b61b4e6c66182
[ "MIT" ]
3
2021-11-30T20:13:24.000Z
2021-12-17T20:38:48.000Z
src/custom_io.py
RostanTabet/Refery
acc66487e5ae9d28ad91cb8c874b61b4e6c66182
[ "MIT" ]
1
2021-12-10T01:19:02.000Z
2022-03-30T11:31:33.000Z
src/custom_io.py
RostanTabet/Refery
acc66487e5ae9d28ad91cb8c874b61b4e6c66182
[ "MIT" ]
null
null
null
import sys from typing import IO STDOUT = sys.stdout class BufferedStream: def __init__(self, stream: IO): self.stream = stream self.data = [] def write(self, data): self.data.append(data) def writelines(self, datas): self.data += datas def read(self) -> str: ...
17.942857
43
0.61465
import sys from typing import IO STDOUT = sys.stdout class BufferedStream: def __init__(self, stream: IO): self.stream = stream self.data = [] def write(self, data): self.data.append(data) def writelines(self, datas): self.data += datas def read(self) -> str: ...
true
true
f73846f67e75336c8ee1a552ad811bc87a4ccc25
489
py
Python
models/__init__.py
ckodser/a_robust_subnetwork_hiddes
171b43dc7b4446ba722a4c51c52bf561f77e5c55
[ "Apache-2.0" ]
null
null
null
models/__init__.py
ckodser/a_robust_subnetwork_hiddes
171b43dc7b4446ba722a4c51c52bf561f77e5c55
[ "Apache-2.0" ]
null
null
null
models/__init__.py
ckodser/a_robust_subnetwork_hiddes
171b43dc7b4446ba722a4c51c52bf561f77e5c55
[ "Apache-2.0" ]
null
null
null
from models.resnet import ResNet18, ResNet50, ResNet101, WideResNet50_2, WideResNet101_2 from models.resnet_cifar import cResNet18, cResNet50, cResNet101 from models.frankle import FC, Conv2, Conv4, Conv6, Conv4Wide, Conv8, Conv6Wide, Net __all__ = [ "ResNet18", "ResNet50", "ResNet101", "cResNet18", ...
22.227273
88
0.654397
from models.resnet import ResNet18, ResNet50, ResNet101, WideResNet50_2, WideResNet101_2 from models.resnet_cifar import cResNet18, cResNet50, cResNet101 from models.frankle import FC, Conv2, Conv4, Conv6, Conv4Wide, Conv8, Conv6Wide, Net __all__ = [ "ResNet18", "ResNet50", "ResNet101", "cResNet18", ...
true
true
f738471f9adc869e2536effabc4685d7024bb0a0
1,037
py
Python
nur/__init__.py
dezgeg/NUR
915179be752c3f38573b5f35c3542077a92486c5
[ "MIT" ]
null
null
null
nur/__init__.py
dezgeg/NUR
915179be752c3f38573b5f35c3542077a92486c5
[ "MIT" ]
null
null
null
nur/__init__.py
dezgeg/NUR
915179be752c3f38573b5f35c3542077a92486c5
[ "MIT" ]
null
null
null
import argparse import sys from typing import List from .format_manifest import format_manifest_command from .index import index_command from .update import update_command from .channel import build_channel_command def parse_arguments(argv: List[str]) -> argparse.Namespace: parser = argparse.ArgumentParser( ...
27.289474
65
0.76567
import argparse import sys from typing import List from .format_manifest import format_manifest_command from .index import index_command from .update import update_command from .channel import build_channel_command def parse_arguments(argv: List[str]) -> argparse.Namespace: parser = argparse.ArgumentParser( ...
true
true
f73847c35487f6262213c3c57ed9a115f4198a5e
627
py
Python
setup.py
lscholten/vakkenranking
2991699aae6a92a0f835e67ab9cc38e8dab71d89
[ "MIT" ]
1
2016-06-06T14:22:28.000Z
2016-06-06T14:22:28.000Z
setup.py
lscholten/vakkenranking
2991699aae6a92a0f835e67ab9cc38e8dab71d89
[ "MIT" ]
2
2016-05-15T09:47:38.000Z
2016-05-15T09:48:53.000Z
setup.py
lscholten/vakkenranking
2991699aae6a92a0f835e67ab9cc38e8dab71d89
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup reqs = ['pandas>=0.18.0', 'numpy>=1.11.0', 'docopt>=0.6.0', 'Jinja2>=2.8', 'xlrd>=0.9.4'] setup( name='vakkenranking', version='0.2.0', packages=['vakkenranking'], install_requires=reqs, entry_points={ "console_sc...
26.125
89
0.658692
from setuptools import setup reqs = ['pandas>=0.18.0', 'numpy>=1.11.0', 'docopt>=0.6.0', 'Jinja2>=2.8', 'xlrd>=0.9.4'] setup( name='vakkenranking', version='0.2.0', packages=['vakkenranking'], install_requires=reqs, entry_points={ "console_scripts": ['vakkenranking=vakkenranking:run'] ...
true
true
f73847e92d844202433fabe74d74e49d734802e0
312
py
Python
buildscripts/resmokelib/hang_analyzer/__init__.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
buildscripts/resmokelib/hang_analyzer/__init__.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
buildscripts/resmokelib/hang_analyzer/__init__.py
benety/mongo
203430ac9559f82ca01e3cbb3b0e09149fec0835
[ "Apache-2.0" ]
null
null
null
"""Utilities for the hang analyzer subcommand.""" from buildscripts.resmokelib.hang_analyzer import dumper from buildscripts.resmokelib.hang_analyzer import process from buildscripts.resmokelib.hang_analyzer import process_list from buildscripts.resmokelib.hang_analyzer.hang_analyzer import HangAnalyzerPlugin
44.571429
82
0.875
from buildscripts.resmokelib.hang_analyzer import dumper from buildscripts.resmokelib.hang_analyzer import process from buildscripts.resmokelib.hang_analyzer import process_list from buildscripts.resmokelib.hang_analyzer.hang_analyzer import HangAnalyzerPlugin
true
true
f73847fddb4c13b94c330cbf1934e8e3fd5cd67c
1,035
py
Python
mdi/migrations/0043_auto_20200325_1800.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
1
2020-01-28T16:16:49.000Z
2020-01-28T16:16:49.000Z
mdi/migrations/0043_auto_20200325_1800.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
114
2020-02-12T20:22:07.000Z
2021-09-22T18:29:50.000Z
mdi/migrations/0043_auto_20200325_1800.py
inclusive-design/coop-map-directory-index
b215ea95677dc90fafe60eaa494a4fd6af0431fb
[ "BSD-3-Clause" ]
4
2020-04-21T21:09:25.000Z
2021-01-08T14:18:58.000Z
# Generated by Django 3.0.3 on 2020-03-25 18:00 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mdi', '0042_auto_20200325_0121'), ] operations = [ migrations.CreateModel( name='LegalStatus', fields=[ ...
32.34375
114
0.564251
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mdi', '0042_auto_20200325_0121'), ] operations = [ migrations.CreateModel( name='LegalStatus', fields=[ ('id', models.AutoField(auto_created=True, ...
true
true
f73849b8ce6c4c3aa3409c265f73e08be85ba0d6
3,048
py
Python
venv/lib/python3.7/site-packages/ibapi/utils.py
CatTiger/vnpy
7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b
[ "MIT" ]
null
null
null
venv/lib/python3.7/site-packages/ibapi/utils.py
CatTiger/vnpy
7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b
[ "MIT" ]
1
2020-04-21T02:42:32.000Z
2020-04-21T02:42:32.000Z
venv/lib/python3.7/site-packages/ibapi/utils.py
CatTiger/vnpy
7901a0fb80a5b44d6fc752bd4b2b64ec62c8f84b
[ "MIT" ]
null
null
null
""" Copyright (C) 2019 Interactive Brokers LLC. All rights reserved. This code is subject to the terms and conditions of the IB API Non-Commercial License or the IB API Commercial License, as applicable. """ """ Collection of misc tools """ import sys import logging import inspect from ibapi.common import UNSET_I...
26.275862
111
0.614501
import sys import logging import inspect from ibapi.common import UNSET_INTEGER, UNSET_DOUBLE logger = logging.getLogger(__name__) def iswrapper(fn): return fn class BadMessage(Exception): def __init__(self, text): self.text = text class LogFunction(object): def __init__(self, text, lo...
true
true
f7384b37c3c619eaa811d24266a532c53f2db649
1,772
py
Python
uniformConfig/UCStructure/DSModel.py
apointea/config-normalizer
096219a57ec706cb4d6f81eedf9bc8797cd8c302
[ "MIT" ]
null
null
null
uniformConfig/UCStructure/DSModel.py
apointea/config-normalizer
096219a57ec706cb4d6f81eedf9bc8797cd8c302
[ "MIT" ]
null
null
null
uniformConfig/UCStructure/DSModel.py
apointea/config-normalizer
096219a57ec706cb4d6f81eedf9bc8797cd8c302
[ "MIT" ]
null
null
null
# @Author: Antoine Pointeau <kalif> # @Date: 2017-03-27T01:24:24+02:00 # @Email: web.pointeau@gmail.com # @Filename: UCSModel.py # @Last modified by: kalif # @Last modified time: 2017-04-04T00:50:08+02:00 import os import yaml import copy from ..UCException import * from ..UCChain import * from .Interface impor...
29.533333
91
0.579571
import os import yaml import copy from ..UCException import * from ..UCChain import * from .Interface import * class DSModel(Interface): def initDS(self, cnt): directory = os.path.dirname(self.ctx.path) self.file = os.path.join(directory, cnt['path']) with open(self.file, 'r') as ...
true
true
f7384c91243f5385b89830ab941990e3735e971f
2,942
py
Python
tests/cupy_tests/core_tests/test_carray.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
6,180
2016-11-01T14:22:30.000Z
2022-03-31T08:39:20.000Z
tests/cupy_tests/core_tests/test_carray.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
6,281
2016-12-22T07:42:31.000Z
2022-03-31T19:57:02.000Z
tests/cupy_tests/core_tests/test_carray.py
prkhrsrvstv1/cupy
ea86c8225b575af9d2855fb77a306cf86fd098ea
[ "MIT" ]
829
2017-02-23T05:46:12.000Z
2022-03-27T17:40:03.000Z
import unittest import cupy from cupy import testing class TestCArray(unittest.TestCase): def test_size(self): x = cupy.arange(3).astype('i') y = cupy.ElementwiseKernel( 'raw int32 x', 'int32 y', 'y = x.size()', 'test_carray_size', )(x, size=1) assert int(y[0]) == 3 ...
34.209302
78
0.582597
import unittest import cupy from cupy import testing class TestCArray(unittest.TestCase): def test_size(self): x = cupy.arange(3).astype('i') y = cupy.ElementwiseKernel( 'raw int32 x', 'int32 y', 'y = x.size()', 'test_carray_size', )(x, size=1) assert int(y[0]) == 3 ...
true
true
f7384cc523af4c088a2e41431cf6866a39975e38
3,462
py
Python
eureka/S3_data_reduction/nirspec.py
evamariaa/Eureka
a3e739a528fbe85ec588bca996188765649b7778
[ "MIT" ]
15
2020-08-07T12:12:17.000Z
2022-03-29T10:20:38.000Z
eureka/S3_data_reduction/nirspec.py
evamariaa/Eureka
a3e739a528fbe85ec588bca996188765649b7778
[ "MIT" ]
159
2020-08-05T14:34:59.000Z
2022-03-31T21:02:10.000Z
eureka/S3_data_reduction/nirspec.py
evamariaa/Eureka
a3e739a528fbe85ec588bca996188765649b7778
[ "MIT" ]
17
2021-06-16T09:40:41.000Z
2022-03-22T18:28:07.000Z
# NIRSpec specific rountines go here import os import numpy as np from astropy.io import fits from . import sigrej, background, nircam from . import bright2flux as b2f def read(filename, data, meta): '''Reads single FITS file from JWST's NIRCam instrument. Parameters ---------- filename: str ...
33.288462
204
0.676488
import os import numpy as np from astropy.io import fits from . import sigrej, background, nircam from . import bright2flux as b2f def read(filename, data, meta): assert isinstance(filename, str) CI',1].header data.intstart = 1 print(' WARNING: Manually setting INTSTART to 1 for NIRSpec...
true
true
f7384e88b8670ac80d80ea0d97fdf24dae447df2
10,762
py
Python
robot-server/robot_server/robot/calibration/tip_length/user_flow.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
robot-server/robot_server/robot/calibration/tip_length/user_flow.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
robot-server/robot_server/robot/calibration/tip_length/user_flow.py
mrakitin/opentrons
d9c7ed23d13cdb62bd1bc397dc2871d4bd5b77e9
[ "Apache-2.0" ]
null
null
null
import logging from typing import ( Dict, Awaitable, Callable, Any, Set, List, Optional, TYPE_CHECKING) from opentrons.types import Mount, Point, Location from opentrons.config import feature_flags as ff from opentrons.hardware_control import ThreadManager, CriticalPoint, Pipette from opentrons.protocol_api imp...
37.761404
99
0.661959
import logging from typing import ( Dict, Awaitable, Callable, Any, Set, List, Optional, TYPE_CHECKING) from opentrons.types import Mount, Point, Location from opentrons.config import feature_flags as ff from opentrons.hardware_control import ThreadManager, CriticalPoint, Pipette from opentrons.protocol_api imp...
true
true
f738504dc134d834217b481ff2a9b0089049012c
18,369
py
Python
gen.py
nunoplopes/alive
d32f848ef2117be301a3a3f17cf0bf1cbc056e1c
[ "Apache-2.0" ]
203
2015-01-06T19:19:05.000Z
2022-03-14T18:30:52.000Z
gen.py
nunoplopes/alive
d32f848ef2117be301a3a3f17cf0bf1cbc056e1c
[ "Apache-2.0" ]
34
2015-01-28T08:42:36.000Z
2020-10-01T06:08:59.000Z
gen.py
nunoplopes/alive
d32f848ef2117be301a3a3f17cf0bf1cbc056e1c
[ "Apache-2.0" ]
19
2015-06-27T01:14:31.000Z
2020-09-30T10:03:58.000Z
# Copyright 2014-2015 The Alive authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
27.213333
94
0.647885
import argparse, glob, re, sys from language import * from precondition import * from parser import parse_opt_file from codegen import * from itertools import combinations, count from collections import defaultdict DO_STATS = True SIMPLIFY = True LIMITER = False def get_most_specific_type(t1, t2): ...
true
true
f7385125e0c89d3aa3efe65e8544dc4779f14338
6,178
py
Python
nautobot/dcim/models/power.py
susanhooks/nautobot
bc3ef5958f0d5decb0be763342c790f26ff1e20e
[ "Apache-2.0" ]
null
null
null
nautobot/dcim/models/power.py
susanhooks/nautobot
bc3ef5958f0d5decb0be763342c790f26ff1e20e
[ "Apache-2.0" ]
null
null
null
nautobot/dcim/models/power.py
susanhooks/nautobot
bc3ef5958f0d5decb0be763342c790f26ff1e20e
[ "Apache-2.0" ]
null
null
null
from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.urls import reverse from nautobot.dcim.choices import PowerFeedPhaseChoices, PowerFeedSupplyChoices, PowerFeedTypeChoices from nautobot.dcim.constants impo...
29.559809
118
0.636776
from django.core.exceptions import ValidationError from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.urls import reverse from nautobot.dcim.choices import PowerFeedPhaseChoices, PowerFeedSupplyChoices, PowerFeedTypeChoices from nautobot.dcim.constants impo...
true
true
f738514a02f82472f10408014a8aaeba5b56b37f
4,991
py
Python
yoapi/services/scheduler.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
1
2021-12-17T03:25:34.000Z
2021-12-17T03:25:34.000Z
yoapi/services/scheduler.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
null
null
null
yoapi/services/scheduler.py
YoApp/yo-api
a162e51804ab91724cc7ad3e7608410329da6789
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Implementation of the Scheduler interface. This implementation only supports sending yos""" # Pylint rules regarding variable names that are not in PEP8. # https://www.python.org/dev/peps/pep-0008/#global-variable-names # pylint: disable=invalid-name # Scheduled task manager import sys fr...
32.409091
96
0.708275
lask import current_app from ..extensions.scheduler import Scheduler from yoapi.contacts import get_contact_usernames, get_subscriptions from ..yos.helpers import construct_auto_follow_yo, construct_first_yo, construct_yo from ..yos.queries import clear_get_yo_cache from ..helpers import get_usec_timestamp, make_js...
true
true
f738514e5780cc5217408324ffeadc5aa83681fe
56,376
py
Python
tests/providers/amazon/aws/hooks/test_eks.py
jpsalado92/airflow
6776586904ab2a15727dcfc1c8d03c7a32a78444
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
4
2021-06-26T13:37:35.000Z
2022-01-11T15:49:44.000Z
tests/providers/amazon/aws/hooks/test_eks.py
jpsalado92/airflow
6776586904ab2a15727dcfc1c8d03c7a32a78444
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2022-02-24T10:33:08.000Z
2022-02-24T10:33:08.000Z
tests/providers/amazon/aws/hooks/test_eks.py
jpsalado92/airflow
6776586904ab2a15727dcfc1c8d03c7a32a78444
[ "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
42.644478
110
0.686037
import sys from copy import deepcopy from datetime import datetime from pathlib import Path from typing import Dict, List, Optional, Tuple, Type from unittest import mock from urllib.parse import ParseResult, urlparse import pytest import yaml from _pytest._code import ExceptionInfo from botocore.exc...
true
true
f738524e7899ace9495025d02870fec7f19c9ec0
23,335
py
Python
src/sage/interfaces/mupad.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
2
2018-06-30T01:37:35.000Z
2018-06-30T01:37:39.000Z
src/sage/interfaces/mupad.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
src/sage/interfaces/mupad.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
r""" Interface to MuPAD AUTHOR: - Mike Hansen - William Stein You must have the optional commercial MuPAD interpreter installed and available as the command \code{mupkern} in your PATH in order to use this interface. You do not have to install any optional \sage packages. TESTS:: sage: mupad.package('"MuPAD-C...
32.866197
174
0.45511
t(ExtraTabCompletion, FunctionElement): def _sage_doc_(self): return self._obj.parent().help(self._name) def __getattr__(self, attrname): P = self._obj.parent() if attrname[:1] == "_": if attrname not in self.__dict__: raise AttributeError else: ...
true
true
f738534b95beb8a83d02a512e3a6e7cffef147e8
2,561
py
Python
pprnet/utils/visualize_util.py
lvwj19/PPR-Net-
e5d305b39a1fa453fb3f58ed51468008e7bfa5a3
[ "Apache-2.0" ]
15
2021-07-06T02:28:38.000Z
2022-02-25T02:44:06.000Z
pprnet/utils/visualize_util.py
lvwj19/PPR-Net-
e5d305b39a1fa453fb3f58ed51468008e7bfa5a3
[ "Apache-2.0" ]
8
2021-11-19T06:53:37.000Z
2022-03-15T15:38:30.000Z
pprnet/utils/visualize_util.py
lvwj19/PPR-Net-
e5d305b39a1fa453fb3f58ed51468008e7bfa5a3
[ "Apache-2.0" ]
3
2021-10-13T21:27:36.000Z
2021-12-14T01:21:51.000Z
import os import numpy as np import random import h5py import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = BASE_DIR sys.path.append(BASE_DIR) sys.path.append(os.path.join(ROOT_DIR, '..')) import show3d_balls def show_points(point_array, color_array=None, radius=3): assert isinstance(point_...
44.155172
143
0.648575
import os import numpy as np import random import h5py import sys BASE_DIR = os.path.dirname(os.path.abspath(__file__)) ROOT_DIR = BASE_DIR sys.path.append(BASE_DIR) sys.path.append(os.path.join(ROOT_DIR, '..')) import show3d_balls def show_points(point_array, color_array=None, radius=3): assert isinstance(point_...
true
true
f73856871e52cc3cfefc20347d3676a8793f8dcf
1,228
py
Python
appengine/token-vendor/datastore_utils.py
Avishri99/IoT-Icebreaker
2e1b97b0ef76f2ab6fd6ff44fe0382cb8a32a96e
[ "Apache-2.0" ]
24
2016-10-30T18:43:55.000Z
2021-07-09T05:09:40.000Z
appengine/token-vendor/datastore_utils.py
Avishri99/IoT-Icebreaker
2e1b97b0ef76f2ab6fd6ff44fe0382cb8a32a96e
[ "Apache-2.0" ]
6
2016-09-30T14:38:08.000Z
2020-10-02T03:56:50.000Z
appengine/token-vendor/datastore_utils.py
Avishri99/IoT-Icebreaker
2e1b97b0ef76f2ab6fd6ff44fe0382cb8a32a96e
[ "Apache-2.0" ]
9
2017-03-03T05:16:19.000Z
2021-03-18T12:22:11.000Z
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
34.111111
96
0.769544
import os import time import logging import json import datetime import time from google.appengine.ext import ndb class SensorData(ndb.Model): message_id = ndb.StringProperty(required=True) session_id = ndb.StringProperty(required=True) received_date = ndb.IntegerProperty(required=True) ...
true
true
f738571734454ff2ab899c651a359010935950dc
529
py
Python
algorithms/Python/implementation/find digits.py
Kumbong/hackerrank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
8
2019-09-19T19:38:09.000Z
2022-02-14T13:59:37.000Z
algorithms/Python/implementation/find digits.py
Kumbong/hacker-rank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
null
null
null
algorithms/Python/implementation/find digits.py
Kumbong/hacker-rank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
7
2019-09-23T13:17:27.000Z
2022-01-27T18:02:16.000Z
#!/bin/python3 import math import os import random import re import sys # Complete the findDigits function below. def findDigits(n): num = n count = 0 n = str(n) for i in n: d = int(i) if d!=0 and num%d==0: count+=1 return count if __name__ == '__main__': ...
14.694444
47
0.542533
import math import os import random import re import sys def findDigits(n): num = n count = 0 n = str(n) for i in n: d = int(i) if d!=0 and num%d==0: count+=1 return count if __name__ == '__main__': fptr = open(os.environ['OUTPUT_PATH'], 'w') t = in...
true
true
f73857f39f63f787c934c790dfe402e750bde2da
373
py
Python
apj2/sudeep/A.py
apurvjain9999/Python-Lab
a6518ea5c932e90f665ec57121f28d333739d2c4
[ "Apache-2.0" ]
null
null
null
apj2/sudeep/A.py
apurvjain9999/Python-Lab
a6518ea5c932e90f665ec57121f28d333739d2c4
[ "Apache-2.0" ]
null
null
null
apj2/sudeep/A.py
apurvjain9999/Python-Lab
a6518ea5c932e90f665ec57121f28d333739d2c4
[ "Apache-2.0" ]
null
null
null
rows = int(input("Enter the no. of rows in A")) for i in range(rows): space = rows - i - 1 while space>0: space = space -1 print(" ",end='') for j in range(i): if j == 0 or j == i-1: print("*",end=' ') elif i==rows/2: print("*",end=' ') else: ...
20.722222
47
0.404826
rows = int(input("Enter the no. of rows in A")) for i in range(rows): space = rows - i - 1 while space>0: space = space -1 print(" ",end='') for j in range(i): if j == 0 or j == i-1: print("*",end=' ') elif i==rows/2: print("*",end=' ') else: ...
true
true
f738580de703877a9a82a29b024bac13108fbfd7
18,766
py
Python
tests/stdlib/test_datetime.py
falapen/voc
babdde798165d28aef3073dac4b909e73f828a67
[ "BSD-3-Clause" ]
null
null
null
tests/stdlib/test_datetime.py
falapen/voc
babdde798165d28aef3073dac4b909e73f828a67
[ "BSD-3-Clause" ]
2
2018-09-26T12:52:52.000Z
2018-09-27T13:51:29.000Z
tests/stdlib/test_datetime.py
falapen/voc
babdde798165d28aef3073dac4b909e73f828a67
[ "BSD-3-Clause" ]
null
null
null
from unittest import expectedFailure from ..utils import TranspileTestCase class DatetimeModuleTests(TranspileTestCase): def test_date_constructor_sanity(self): self.assertCodeExecution(""" import datetime print(datetime.date(2018, 10, 10)) """) def test_date_cons...
29.599369
115
0.503144
from unittest import expectedFailure from ..utils import TranspileTestCase class DatetimeModuleTests(TranspileTestCase): def test_date_constructor_sanity(self): self.assertCodeExecution(""" import datetime print(datetime.date(2018, 10, 10)) """) def test_date_cons...
true
true
f73858c8abfca4f0b4a88432321b6f6cc11dbf9c
3,305
py
Python
frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py
vinhnguyent090/frappe
636d9442e2ccf0cfac2d5aace427d8de05f63bd9
[ "MIT" ]
1
2019-06-19T07:56:26.000Z
2019-06-19T07:56:26.000Z
frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py
alexbow2008/frappe
ce592a40b4c5e80a9c6cbdc541105218bf98c966
[ "MIT" ]
5
2020-03-24T17:31:32.000Z
2022-02-10T19:17:29.000Z
frappe/contacts/report/addresses_and_contacts/addresses_and_contacts.py
alexbow2008/frappe
ce592a40b4c5e80a9c6cbdc541105218bf98c966
[ "MIT" ]
2
2021-01-15T12:19:52.000Z
2021-01-15T13:12:36.000Z
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals from six import iteritems import frappe from frappe import _ field_map = { "Contact": [ "first_name", "last_name", "phone", "mobile_no", "email_id", "is_prima...
31.47619
116
0.740393
from __future__ import unicode_literals from six import iteritems import frappe from frappe import _ field_map = { "Contact": [ "first_name", "last_name", "phone", "mobile_no", "email_id", "is_primary_contact" ], "Address": [ "address_line1", "address_line2", "city", "state", "pincode", "country", "is_primary_add...
true
true
f7385aa07c3c7d81fde1b5dfc50fbfa269872dc7
1,213
py
Python
plugins/playbook/add_mon/decapod_plugin_playbook_add_mon/exceptions.py
angry-tony/ceph-lcm-decapod
535944d3ee384c3a7c4af82f74041b0a7792433f
[ "Apache-2.0" ]
41
2016-11-03T16:40:17.000Z
2019-05-23T08:39:17.000Z
plugins/playbook/add_mon/decapod_plugin_playbook_add_mon/exceptions.py
Mirantis/ceph-lcm
fad9bad0b94f2ef608362953583b10a54a841d24
[ "Apache-2.0" ]
30
2016-10-14T10:54:46.000Z
2017-10-20T15:58:01.000Z
plugins/playbook/add_mon/decapod_plugin_playbook_add_mon/exceptions.py
angry-tony/ceph-lcm-decapod
535944d3ee384c3a7c4af82f74041b0a7792433f
[ "Apache-2.0" ]
28
2016-09-17T01:17:36.000Z
2019-07-05T03:32:54.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2016 Mirantis 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 ...
32.783784
78
0.74526
from decapod_common import exceptions as base_exceptions class ClusterDeployError(base_exceptions.DecapodError): class SecretWasNotFound(ClusterDeployError): def __init__(self, cluster_id): super().__init__( "No monitor secret is defined for cluster {0}".format(cluster_id))...
true
true
f7385ab74f3201bfa3c66b131cec0d2fc3768cba
842
py
Python
tests/run/test_hostname.py
vincent99/rio
018dac19be47ee20ae47bcd8eea71c8c4f07a1af
[ "Apache-2.0" ]
2
2019-10-14T18:47:23.000Z
2019-10-26T18:54:56.000Z
tests/run/test_hostname.py
jjasghar/rio
b686eddc3a639b5920cf186f9cb887871d632140
[ "Apache-2.0" ]
null
null
null
tests/run/test_hostname.py
jjasghar/rio
b686eddc3a639b5920cf186f9cb887871d632140
[ "Apache-2.0" ]
null
null
null
import util def run_hostname(stack, value, value2): name = util.rioRun(stack, value, value2, 'nginx') return name def rio_chk(stack, sname): fullName = (f"{stack}/{sname}") inspect = util.rioInspect(fullName) return inspect['hostname'] def kube_chk(stack, service): fullName = "%s/%s" % ...
20.536585
56
0.644893
import util def run_hostname(stack, value, value2): name = util.rioRun(stack, value, value2, 'nginx') return name def rio_chk(stack, sname): fullName = (f"{stack}/{sname}") inspect = util.rioInspect(fullName) return inspect['hostname'] def kube_chk(stack, service): fullName = "%s/%s" % ...
true
true
f7385b401f3a1c891d9df9873ba7de685e29981a
1,464
py
Python
aliyun-python-sdk-oos/aliyunsdkoos/request/v20190601/DescribeRegionsRequest.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
1
2021-03-08T02:59:17.000Z
2021-03-08T02:59:17.000Z
aliyun-python-sdk-oos/aliyunsdkoos/request/v20190601/DescribeRegionsRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
1
2020-05-31T14:51:47.000Z
2020-05-31T14:51:47.000Z
aliyun-python-sdk-oos/aliyunsdkoos/request/v20190601/DescribeRegionsRequest.py
bricklayer-Liu/aliyun-openapi-python-sdk
20da2554de22679fc7c5462c483663e4d79512aa
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.526316
74
0.771858
from aliyunsdkcore.request import RpcRequest from aliyunsdkoos.endpoint import endpoint_data class DescribeRegionsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'oos', '2019-06-01', 'DescribeRegions','oos') self.set_method('POST') if hasattr(self, "endpoint_map"): set...
true
true
f7385b41e5c48c3ed69f989eee95f5155fad87a6
893
py
Python
booking/api/tests.py
nightwarriorftw/bookTicket
e0c4e7d4b535fed0f4039a9cb8268145cfa07130
[ "MIT" ]
null
null
null
booking/api/tests.py
nightwarriorftw/bookTicket
e0c4e7d4b535fed0f4039a9cb8268145cfa07130
[ "MIT" ]
null
null
null
booking/api/tests.py
nightwarriorftw/bookTicket
e0c4e7d4b535fed0f4039a9cb8268145cfa07130
[ "MIT" ]
null
null
null
from django.urls import include, path, reverse from rest_framework.test import APITestCase, URLPatternsTestCase, APIRequestFactory from rest_framework import status from knox.models import AuthToken from django.contrib.auth.models import User class BookTicketsTest(APITestCase): def setUp(self): self.userna...
40.590909
89
0.699888
from django.urls import include, path, reverse from rest_framework.test import APITestCase, URLPatternsTestCase, APIRequestFactory from rest_framework import status from knox.models import AuthToken from django.contrib.auth.models import User class BookTicketsTest(APITestCase): def setUp(self): self.userna...
true
true
f7385b52e7630076272a25bf7116aa383f135df4
2,125
py
Python
test/new_tests/test_log.py
mcoberly2/aerospike-client-python
d405891f0d6d8b2fc14f78841370bc6a1d302494
[ "Apache-2.0" ]
null
null
null
test/new_tests/test_log.py
mcoberly2/aerospike-client-python
d405891f0d6d8b2fc14f78841370bc6a1d302494
[ "Apache-2.0" ]
null
null
null
test/new_tests/test_log.py
mcoberly2/aerospike-client-python
d405891f0d6d8b2fc14f78841370bc6a1d302494
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import pytest import sys from .test_base_class import TestBaseClass from aerospike import exception as e aerospike = pytest.importorskip("aerospike") try: import aerospike except: print("Please install aerospike python client.") sys.exit(1) class TestLog(object): def teardown...
27.597403
73
0.636706
import pytest import sys from .test_base_class import TestBaseClass from aerospike import exception as e aerospike = pytest.importorskip("aerospike") try: import aerospike except: print("Please install aerospike python client.") sys.exit(1) class TestLog(object): def teardown_class(cls): ae...
true
true
f7385c7e823141e712c4e7bb3e2cfbead7195f66
737
py
Python
utils.py
aturX/yolo3-keras-start
f473e9f2ad32745e19509b738f2651119aee449b
[ "MIT" ]
null
null
null
utils.py
aturX/yolo3-keras-start
f473e9f2ad32745e19509b738f2651119aee449b
[ "MIT" ]
null
null
null
utils.py
aturX/yolo3-keras-start
f473e9f2ad32745e19509b738f2651119aee449b
[ "MIT" ]
null
null
null
def getFileName(JPEGImagesPath,MainTrainPath,MainValPath): import os source_folder = JPEGImagesPath dest = MainTrainPath dest2 = MainValPath file_list = os.listdir(source_folder) train_file = open(dest, 'a') val_file = open(dest2, 'a') for file_obj in file_list: file_path = os.pa...
35.095238
64
0.723202
def getFileName(JPEGImagesPath,MainTrainPath,MainValPath): import os source_folder = JPEGImagesPath dest = MainTrainPath dest2 = MainValPath file_list = os.listdir(source_folder) train_file = open(dest, 'a') val_file = open(dest2, 'a') for file_obj in file_list: file_path = os.pa...
true
true
f7386104aee1ac8e40db0bed9a1cb496b35b1742
790
py
Python
brambling/payment/stripe/core.py
Shivanjain023/django-brambling
17539b82df37f22bd2b4293e73142b887c916344
[ "BSD-3-Clause" ]
8
2015-05-06T18:26:15.000Z
2018-02-07T22:18:32.000Z
brambling/payment/stripe/core.py
Shivanjain023/django-brambling
17539b82df37f22bd2b4293e73142b887c916344
[ "BSD-3-Clause" ]
578
2015-01-05T21:37:17.000Z
2018-02-14T16:43:50.000Z
brambling/payment/stripe/core.py
Shivanjain023/django-brambling
17539b82df37f22bd2b4293e73142b887c916344
[ "BSD-3-Clause" ]
1
2015-08-20T16:59:32.000Z
2015-08-20T16:59:32.000Z
from django.conf import settings import stripe from brambling.payment.core import LIVE def stripe_prep(api_type): stripe.api_version = '2016-03-07' if api_type == LIVE: stripe.api_key = settings.STRIPE_SECRET_KEY else: stripe.api_key = settings.STRIPE_TEST_SECRET_KEY def stripe_test_set...
27.241379
66
0.71519
from django.conf import settings import stripe from brambling.payment.core import LIVE def stripe_prep(api_type): stripe.api_version = '2016-03-07' if api_type == LIVE: stripe.api_key = settings.STRIPE_SECRET_KEY else: stripe.api_key = settings.STRIPE_TEST_SECRET_KEY def stripe_test_set...
true
true
f738626a8ade41cf95138160fed6da51c246cf88
1,585
py
Python
rllib/models/tf/layers/gru_gate.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
78
2022-02-02T00:23:02.000Z
2022-03-15T11:44:02.000Z
rllib/models/tf/layers/gru_gate.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
2
2022-01-13T04:15:38.000Z
2022-03-12T01:03:35.000Z
rllib/models/tf/layers/gru_gate.py
acmore/ray
9f0f54266064e203b0bdcc9d3fa947cb4518ebc0
[ "Apache-2.0" ]
3
2022-01-30T05:10:14.000Z
2022-03-04T21:18:44.000Z
from ray.rllib.utils.framework import try_import_tf tf = try_import_tf() class GRUGate(tf.keras.layers.Layer): def __init__(self, init_bias=0., **kwargs): super().__init__(**kwargs) self._init_bias = init_bias def build(self, input_shape): h_shape, x_shape = input_shape if x_...
32.346939
76
0.583596
from ray.rllib.utils.framework import try_import_tf tf = try_import_tf() class GRUGate(tf.keras.layers.Layer): def __init__(self, init_bias=0., **kwargs): super().__init__(**kwargs) self._init_bias = init_bias def build(self, input_shape): h_shape, x_shape = input_shape if x_...
true
true
f7386289364e6518c0b212b58be5460b42ca82c5
172
py
Python
networkanalysis/views.py
keithwongg/social_network_analysis_csv_upload
a37ec322a583e0109e17d45185d8e3a5d0a0c6ea
[ "MIT" ]
null
null
null
networkanalysis/views.py
keithwongg/social_network_analysis_csv_upload
a37ec322a583e0109e17d45185d8e3a5d0a0c6ea
[ "MIT" ]
5
2021-03-30T14:12:31.000Z
2021-09-22T19:31:49.000Z
networkanalysis/views.py
keithwongg/Social_Network_Analysis_Via_CSV_Upload
a37ec322a583e0109e17d45185d8e3a5d0a0c6ea
[ "MIT" ]
null
null
null
from django.http import HttpResponse from django.shortcuts import render def homepage(request): # return HttpResponse('home') return render(request, 'graph.html')
24.571429
40
0.761628
from django.http import HttpResponse from django.shortcuts import render def homepage(request): return render(request, 'graph.html')
true
true
f738636807f3d175987faa339fe97eab8c43bf1c
63
py
Python
excript/aulas/aula40_breakpointCondicional.py
victorers1/anotacoes_curso_python
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
[ "MIT" ]
null
null
null
excript/aulas/aula40_breakpointCondicional.py
victorers1/anotacoes_curso_python
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
[ "MIT" ]
null
null
null
excript/aulas/aula40_breakpointCondicional.py
victorers1/anotacoes_curso_python
c4ef56bcfc7e3baa3944fc2962e8217c6d720b0e
[ "MIT" ]
null
null
null
print("1") n=0 while n<100: n+=1 print(n) print("2")
7
12
0.492063
print("1") n=0 while n<100: n+=1 print(n) print("2")
true
true
f738641f372e3bd7e9f1136dad842831b3ff5dbd
3,507
py
Python
app/core/filters/sorting.py
fndmiranda/saas-api
50d9bc896345406ad3bd4f4ac70af3185e3188ac
[ "MIT" ]
5
2021-11-11T23:00:09.000Z
2021-12-02T11:31:39.000Z
app/core/filters/sorting.py
fndmiranda/saas-api
50d9bc896345406ad3bd4f4ac70af3185e3188ac
[ "MIT" ]
null
null
null
app/core/filters/sorting.py
fndmiranda/saas-api
50d9bc896345406ad3bd4f4ac70af3185e3188ac
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .exceptions import BadSortFormat from .models import Field, auto_join, get_default_model, get_model_from_spec SORT_ASCENDING = "asc" SORT_DESCENDING = "desc" class Sort(object): def __init__(self, sort_spec): self.sort_spec = sort_spec try: field_name = ...
29.225
78
0.579983
from .exceptions import BadSortFormat from .models import Field, auto_join, get_default_model, get_model_from_spec SORT_ASCENDING = "asc" SORT_DESCENDING = "desc" class Sort(object): def __init__(self, sort_spec): self.sort_spec = sort_spec try: field_name = sort_spec["field"] ...
true
true
f7386421faf61e5b82d147d76bba2db099b33752
1,767
py
Python
forcecopilot/forcecopilot_reading.py
roymart1/RQBasicDevTest
891061de9fa6b29c7ecfaa6ac4e55aba28856ce4
[ "MIT" ]
null
null
null
forcecopilot/forcecopilot_reading.py
roymart1/RQBasicDevTest
891061de9fa6b29c7ecfaa6ac4e55aba28856ce4
[ "MIT" ]
1
2021-06-02T00:41:14.000Z
2021-06-02T00:41:14.000Z
forcecopilot/forcecopilot_reading.py
roymart1/RQBasicDevTest
891061de9fa6b29c7ecfaa6ac4e55aba28856ce4
[ "MIT" ]
null
null
null
import socket import time class TestIO: def __init__(self): # self.ipAddress = "10.20.8.136" self.ipAddress = "10.20.0.194" self.port = 63350 def queryServer(self, query): """ Private method that sends a command and returns the server's response in a readable ...
26.373134
89
0.588002
import socket import time class TestIO: def __init__(self): self.ipAddress = "10.20.0.194" self.port = 63350 def queryServer(self, query): tcpSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) tcpSocket.connect((self.ipAddress, self.port)) ...
true
true
f73864ad431963c6c8282114c982e71c2d289910
411
py
Python
experiments/fdtd-2d/tmp_files/3199.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/fdtd-2d/tmp_files/3199.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
experiments/fdtd-2d/tmp_files/3199.py
LoopTilingBenchmark/benchmark
52a3d2e70216552a498fd91de02a2fa9cb62122c
[ "BSD-2-Clause" ]
null
null
null
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/3199.c') procedure('kernel_fdtd_2d') loop(0) known(' nx > 1 ') known(' ny > 1 ') ti...
22.833333
116
0.720195
from chill import * source('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c') destination('/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/experiments/fdtd-2d/tmp_files/3199.c') procedure('kernel_fdtd_2d') loop(0) known(' nx > 1 ') known(' ny > 1 ') ti...
true
true
f73864f561c9ad210848bfcbd16584db94aa0234
3,111
py
Python
pyngrok/conf.py
JennaSys/pyngrok
45a133a2b55a86156d612b95f75e6cd2d6ddefef
[ "MIT" ]
1
2021-07-18T08:50:17.000Z
2021-07-18T08:50:17.000Z
pyngrok/conf.py
JennaSys/pyngrok
45a133a2b55a86156d612b95f75e6cd2d6ddefef
[ "MIT" ]
null
null
null
pyngrok/conf.py
JennaSys/pyngrok
45a133a2b55a86156d612b95f75e6cd2d6ddefef
[ "MIT" ]
null
null
null
__author__ = "Alex Laird" __copyright__ = "Copyright 2020, Alex Laird" __version__ = "4.1.6" import os from pyngrok.installer import get_ngrok_bin BIN_DIR = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "bin")) DEFAULT_NGROK_PATH = os.path.join(BIN_DIR, get_ngrok_bin()) DEFAULT_CONFIG_PAT...
46.432836
122
0.694311
__author__ = "Alex Laird" __copyright__ = "Copyright 2020, Alex Laird" __version__ = "4.1.6" import os from pyngrok.installer import get_ngrok_bin BIN_DIR = os.path.normpath(os.path.join(os.path.abspath(os.path.dirname(__file__)), "bin")) DEFAULT_NGROK_PATH = os.path.join(BIN_DIR, get_ngrok_bin()) DEFAULT_CONFIG_PAT...
true
true
f738658d9108c15b1aa5ba3bef1d2c954b6d52ea
11,167
py
Python
openstack_dashboard/dashboards/project/loadbalancers/tables.py
gabrielhurley/horizon
59d3ff49f805f7ce77b279c9a0d38a90239f65f9
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/loadbalancers/tables.py
gabrielhurley/horizon
59d3ff49f805f7ce77b279c9a0d38a90239f65f9
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/loadbalancers/tables.py
gabrielhurley/horizon
59d3ff49f805f7ce77b279c9a0d38a90239f65f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2013, Big Switch Networks, 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 applic...
32.462209
79
0.622996
from django.core.urlresolvers import reverse from django.template import defaultfilters as filters from django.utils import http from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import exceptions from horizon import tables from ope...
true
true
f73865d26ab108985f960ee0c7e00ca4a7634182
124,722
py
Python
atomsci/ddm/pipeline/model_wrapper.py
vgutta/AMPL
46759aa84fd6acfc14facad0e14cb05a43d2e309
[ "MIT" ]
77
2019-11-17T01:15:36.000Z
2021-10-19T07:51:03.000Z
atomsci/ddm/pipeline/model_wrapper.py
vgutta/AMPL
46759aa84fd6acfc14facad0e14cb05a43d2e309
[ "MIT" ]
39
2019-12-16T22:21:54.000Z
2021-09-30T16:31:12.000Z
atomsci/ddm/pipeline/model_wrapper.py
vgutta/AMPL
46759aa84fd6acfc14facad0e14cb05a43d2e309
[ "MIT" ]
41
2019-11-24T03:40:32.000Z
2021-08-17T22:06:07.000Z
#!/usr/bin/env python """ Contains class ModelWrapper and its subclasses, which are wrappers for DeepChem and scikit-learn model classes. """ import logging import os import shutil import joblib import pdb import deepchem as dc import numpy as np import tensorflow as tf if dc.__version__.startswith('2.1'): from ...
49.238847
301
0.597353
import logging import os import shutil import joblib import pdb import deepchem as dc import numpy as np import tensorflow as tf if dc.__version__.startswith('2.1'): from deepchem.models.tensorgraph.fcnet import MultitaskRegressor, MultitaskClassifier else: from deepchem.models.fcnet import MultitaskRegress...
true
true
f738660821c6c2a07f0b3f98b5840034ad0d4548
2,919
py
Python
reinvent/unittest_reinvent/scoring_tests/physchem/test_hbd_lipinski.py
tblaschke/reinvent-multi-target
a555431da0de038b7e643c508a7d2501e83c087f
[ "MIT" ]
4
2021-05-11T05:34:01.000Z
2022-03-30T10:04:21.000Z
reinvent/unittest_reinvent/scoring_tests/physchem/test_hbd_lipinski.py
tblaschke/reinvent-multi-target
a555431da0de038b7e643c508a7d2501e83c087f
[ "MIT" ]
null
null
null
reinvent/unittest_reinvent/scoring_tests/physchem/test_hbd_lipinski.py
tblaschke/reinvent-multi-target
a555431da0de038b7e643c508a7d2501e83c087f
[ "MIT" ]
2
2021-06-01T11:56:10.000Z
2021-10-05T04:33:56.000Z
import unittest import numpy as np import numpy.testing as npt from scoring.component_parameters import ComponentParameters from scoring.function import CustomSum from utils.enums.component_specific_parameters_enum import ComponentSpecificParametersEnum from utils.enums.scoring_function_component_enum import ScoringF...
40.541667
90
0.531346
import unittest import numpy as np import numpy.testing as npt from scoring.component_parameters import ComponentParameters from scoring.function import CustomSum from utils.enums.component_specific_parameters_enum import ComponentSpecificParametersEnum from utils.enums.scoring_function_component_enum import ScoringF...
true
true
f73866be11cb3f69b26607bc458e1d7c96b78cd9
803
py
Python
utils/outlier.py
yongleex/SBCC
40f8e67e446fc14fc82ea87f82ee841d62520c71
[ "MIT" ]
4
2021-09-04T04:02:57.000Z
2021-12-27T13:27:26.000Z
utils/outlier.py
yongleex/SBCC
40f8e67e446fc14fc82ea87f82ee841d62520c71
[ "MIT" ]
1
2021-09-10T07:40:36.000Z
2022-01-02T06:23:12.000Z
utils/outlier.py
yongleex/SBCC
40f8e67e446fc14fc82ea87f82ee841d62520c71
[ "MIT" ]
1
2021-09-10T07:36:29.000Z
2021-09-10T07:36:29.000Z
import numpy as np import cv2 def NMT(u,v, eps=0.2, thr=5.0, smooth_flag=True): """ Normalised Median Test, from 'Universal outlier detection for PIV data' """ u, v = np.float32(u), np.float32(v) criterion = 0 for c in [u,v]: c_median = cv2.medianBlur(c, 5) residual = np....
24.333333
75
0.592777
import numpy as np import cv2 def NMT(u,v, eps=0.2, thr=5.0, smooth_flag=True): u, v = np.float32(u), np.float32(v) criterion = 0 for c in [u,v]: c_median = cv2.medianBlur(c, 5) residual = np.abs(c - c_median) r_median = cv2.medianBlur(residual, 5) cri = residual/(r_me...
true
true
f73866f4e664a0c9a390cc7113720b56c58ccb15
66,521
py
Python
neutron/tests/unit/openvswitch/test_agent_scheduler.py
venkataanil/juno_neutron
2e62e150c264ccae2dd75fb78caae453eaa77e9f
[ "Apache-2.0" ]
1
2021-02-19T05:54:04.000Z
2021-02-19T05:54:04.000Z
neutron/tests/unit/openvswitch/test_agent_scheduler.py
venkataanil/juno_neutron
2e62e150c264ccae2dd75fb78caae453eaa77e9f
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/openvswitch/test_agent_scheduler.py
venkataanil/juno_neutron
2e62e150c264ccae2dd75fb78caae453eaa77e9f
[ "Apache-2.0" ]
2
2016-11-29T11:22:58.000Z
2016-11-29T11:54:41.000Z
# Copyright (c) 2013 OpenStack Foundation. # # 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...
48.520058
79
0.578975
import contextlib import copy import datetime import mock from oslo.config import cfg from webob import exc from neutron.api import extensions from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api from neutron.api.rpc.handlers import dhcp_rpc from neutron.api.rpc.handlers import l3_rpc from neu...
true
true
f73867772e34af7d39b90340e7f5751add6e84aa
1,073
py
Python
djangoBlog/djangoBlog/RSS.py
blackmonkey121/blog
938f104d3360c5f7562a2fd5a7d2f2e77c4695c0
[ "BSD-3-Clause" ]
4
2019-07-20T02:04:11.000Z
2020-05-02T06:15:22.000Z
djangoBlog/djangoBlog/RSS.py
blackmonkey121/blog
938f104d3360c5f7562a2fd5a7d2f2e77c4695c0
[ "BSD-3-Clause" ]
8
2020-05-03T09:01:14.000Z
2022-01-13T02:13:14.000Z
djangoBlog/djangoBlog/RSS.py
blackmonkey121/blog
938f104d3360c5f7562a2fd5a7d2f2e77c4695c0
[ "BSD-3-Clause" ]
null
null
null
#!usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "Monkey" from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils.feedgenerator import Rss201rev2Feed from apps.blog.models import Post class ExtendedRSSFeed(Rss201rev2Feed): def add_item_elements(self, handler,...
26.170732
68
0.702703
__author__ = "Monkey" from django.contrib.syndication.views import Feed from django.urls import reverse from django.utils.feedgenerator import Rss201rev2Feed from apps.blog.models import Post class ExtendedRSSFeed(Rss201rev2Feed): def add_item_elements(self, handler, item): super().add_item_elements(ha...
true
true
f73869148adde1aaeb9989a82c5e5b5254b255a2
24,753
py
Python
legacy/vcf_run.py
duceppemo/COWSNPhR
da850bb68ee5afab813a2c7e7992f5f34e25550b
[ "MIT" ]
null
null
null
legacy/vcf_run.py
duceppemo/COWSNPhR
da850bb68ee5afab813a2c7e7992f5f34e25550b
[ "MIT" ]
5
2021-04-26T15:10:43.000Z
2021-08-19T19:13:18.000Z
legacy/vcf_run.py
duceppemo/COWSNPhR
da850bb68ee5afab813a2c7e7992f5f34e25550b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from olctools.accessoryFunctions.accessoryFunctions import SetupLogging from cowsnphr_src.install_dependencies import install_deps from cowsnphr_src.vcf_methods import VCFMethods from datetime import datetime from pathlib import Path import subprocess import logging import os __author__ = 'adamk...
63.145408
120
0.616531
from olctools.accessoryFunctions.accessoryFunctions import SetupLogging from cowsnphr_src.install_dependencies import install_deps from cowsnphr_src.vcf_methods import VCFMethods from datetime import datetime from pathlib import Path import subprocess import logging import os __author__ = 'adamkoziol' class VCF(obj...
true
true
f7386af0958feed3bcd22a7c01336afbc12b60b3
14,042
py
Python
.ci/gitlab/template.ci.py
mikeljordan/pymor
415b7aeab905c35ef76d7ba9b69af5d0b3af1939
[ "Unlicense" ]
182
2015-01-06T16:12:45.000Z
2022-03-22T09:24:45.000Z
.ci/gitlab/template.ci.py
mikeljordan/pymor
415b7aeab905c35ef76d7ba9b69af5d0b3af1939
[ "Unlicense" ]
1,305
2015-01-06T15:02:31.000Z
2022-03-29T14:58:28.000Z
.ci/gitlab/template.ci.py
mikeljordan/pymor
415b7aeab905c35ef76d7ba9b69af5d0b3af1939
[ "Unlicense" ]
68
2015-01-06T11:13:20.000Z
2022-03-21T18:07:42.000Z
#!/usr/bin/env python3 import os import jinja2 from pathlib import Path # python3 only from dotenv import dotenv_values import sys import gitlab from itertools import product tpl = r'''# THIS FILE IS AUTOGENERATED -- DO NOT EDIT # # Edit and Re-run .ci/gitlab/template.ci.py instead # stages: - sanity - ...
29.687104
120
0.60611
import os import jinja2 from pathlib import Path from dotenv import dotenv_values import sys import gitlab from itertools import product tpl = r'''# THIS FILE IS AUTOGENERATED -- DO NOT EDIT # # Edit and Re-run .ci/gitlab/template.ci.py instead # stages: - sanity - test - build - install_checks ...
true
true
f7386b20168cdcdf541d471d559d48a4450e52ea
1,804
py
Python
Configuration-Utility-DesktopApp/DesktopApp/main.py
dinethjay/Capstone-USB-Video-Editing-Shuttle
558851a90e474a4b4bd9f04b569a4fed6ab6b0af
[ "MIT" ]
null
null
null
Configuration-Utility-DesktopApp/DesktopApp/main.py
dinethjay/Capstone-USB-Video-Editing-Shuttle
558851a90e474a4b4bd9f04b569a4fed6ab6b0af
[ "MIT" ]
null
null
null
Configuration-Utility-DesktopApp/DesktopApp/main.py
dinethjay/Capstone-USB-Video-Editing-Shuttle
558851a90e474a4b4bd9f04b569a4fed6ab6b0af
[ "MIT" ]
null
null
null
import tkinter as tk # Create GUI object app = tk.Tk() def submit_changes(): print(Submitted) # Button 1 btn1_text = tk.StringVar() btn1_label = tk.Label(app, text='Button Name 1', font=('bold', 14), pady=15) btn1_label.grid(row=0, column=0, sticky=tk.W) btn1_entry = tk.Entry(app, textvariable=btn1_text) btn...
30.066667
84
0.726164
import tkinter as tk app = tk.Tk() def submit_changes(): print(Submitted) btn1_text = tk.StringVar() btn1_label = tk.Label(app, text='Button Name 1', font=('bold', 14), pady=15) btn1_label.grid(row=0, column=0, sticky=tk.W) btn1_entry = tk.Entry(app, textvariable=btn1_text) btn1_entry.grid(row=0, column=1)...
true
true
f7386b902de63df2eade0b15daf5244d7c47c3d5
18,507
py
Python
year_2017/day_21.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
1
2020-04-12T16:14:29.000Z
2020-04-12T16:14:29.000Z
year_2017/day_21.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
year_2017/day_21.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
import unittest from aoc_utils.data import data_lines def hash_pattern(pattern): return "".join(pattern) def cache_result(func): cache = {} def inner(pattern): h = hash_pattern(pattern) if h not in cache: cache[h] = func(pattern) return cache[h] return inner @...
36.431102
99
0.564381
import unittest from aoc_utils.data import data_lines def hash_pattern(pattern): return "".join(pattern) def cache_result(func): cache = {} def inner(pattern): h = hash_pattern(pattern) if h not in cache: cache[h] = func(pattern) return cache[h] return inner @...
true
true
f7386d76bb7589a3bab59c168ed6bfad3bfea993
902
py
Python
creds.py
shovon668/KnowhoBot
e581d349e22bcd3a91b22632d4748d8f0502455d
[ "MIT" ]
1
2021-03-22T05:58:15.000Z
2021-03-22T05:58:15.000Z
creds.py
shovon668/KnowhoBot
e581d349e22bcd3a91b22632d4748d8f0502455d
[ "MIT" ]
null
null
null
creds.py
shovon668/KnowhoBot
e581d349e22bcd3a91b22632d4748d8f0502455d
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) class cred(): BOT_TOKEN = os.getenv("BOT_TOKEN") #From botfather API_ID = os.getenv("API_ID") #"Get this value from my.telegram.org! Please do not steal" API_HASH = os.getenv("API_HASH") #"Get this value from my.tele...
39.217391
98
0.675166
import os from dotenv import load_dotenv, find_dotenv load_dotenv(find_dotenv()) class cred(): BOT_TOKEN = os.getenv("BOT_TOKEN") API_ID = os.getenv("API_ID") API_HASH = os.getenv("API_HASH") OWNER_ID = os.getenv("OWNER_ID") DB_URL = os.getenv("DB_URL") DB_SECRET= os.gete...
true
true
f7386d7eae4e422bb9c5dd8eea9096b3518c0e62
1,679
py
Python
pyqt-env/lib/python3.8/site-packages/qt5_applications/_applications.py
rawheel/Tvshows-Listing-Desktop-App
9a47f866c8861990ae2d8355efd6cce8ce51fae3
[ "MIT" ]
null
null
null
pyqt-env/lib/python3.8/site-packages/qt5_applications/_applications.py
rawheel/Tvshows-Listing-Desktop-App
9a47f866c8861990ae2d8355efd6cce8ce51fae3
[ "MIT" ]
null
null
null
pyqt-env/lib/python3.8/site-packages/qt5_applications/_applications.py
rawheel/Tvshows-Listing-Desktop-App
9a47f866c8861990ae2d8355efd6cce8ce51fae3
[ "MIT" ]
null
null
null
# to be generated a package build time application_paths = { 'assistant': 'Assistant.app', 'designer': 'Designer.app', 'linguist': 'Linguist.app', 'canbusutil': 'canbusutil', 'lconvert': 'lconvert', 'licheck_mac': 'licheck_mac', 'lprodump': 'lprodump', 'lrelease': 'lrelease', 'lrelea...
30.527273
57
0.620012
application_paths = { 'assistant': 'Assistant.app', 'designer': 'Designer.app', 'linguist': 'Linguist.app', 'canbusutil': 'canbusutil', 'lconvert': 'lconvert', 'licheck_mac': 'licheck_mac', 'lprodump': 'lprodump', 'lrelease': 'lrelease', 'lrelease-pro': 'lrelease-pro', 'lupdate'...
true
true
f7386db97e3d762c3c0a1af6a82863b605b0fc85
2,870
py
Python
apps/users/migrations/0001_initial.py
Glicher-wp/backend_django_template
429e3da372a631c104072413449494df341d1e0e
[ "MIT" ]
null
null
null
apps/users/migrations/0001_initial.py
Glicher-wp/backend_django_template
429e3da372a631c104072413449494df341d1e0e
[ "MIT" ]
null
null
null
apps/users/migrations/0001_initial.py
Glicher-wp/backend_django_template
429e3da372a631c104072413449494df341d1e0e
[ "MIT" ]
1
2021-11-12T13:50:55.000Z
2021-11-12T13:50:55.000Z
# Generated by Django 3.2.9 on 2021-11-03 13:00 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_m...
63.777778
329
0.663415
import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ ...
true
true
f7386eaa520e571770df0ba97184b772b9649d5d
6,915
py
Python
backend/rushee_30170/settings.py
crowdbotics-apps/rushee-30170
e769d358415df8158dc536b98f7313b5c6fb8529
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/rushee_30170/settings.py
crowdbotics-apps/rushee-30170
e769d358415df8158dc536b98f7313b5c6fb8529
[ "FTL", "AML", "RSA-MD" ]
10
2021-09-13T15:37:20.000Z
2021-10-04T09:36:10.000Z
backend/rushee_30170/settings.py
crowdbotics-apps/rushee-30170
e769d358415df8158dc536b98f7313b5c6fb8529
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for rushee_30170 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import ...
29.551282
112
0.730441
import os import environ import logging from modules.manifest import get_modules env = environ.Env() DEBUG = env.bool("DEBUG", default=False) # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development se...
true
true
f7386faca91675e58e6e49e078a2a76c174ae82a
5,275
py
Python
ambari-server/src/test/python/custom_actions/TestUpdateRepo.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/custom_actions/TestUpdateRepo.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/custom_actions/TestUpdateRepo.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); yo...
45.474138
146
0.483223
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this...
false
true
f7386fbbc186c32b038f99dc4c068a8b71e5f2c6
46,112
py
Python
electrum/tests/test_lnpeer.py
parazyd/electrum
3e3cfd91a66e4dfa8f584607830e4296c550a4da
[ "MIT" ]
null
null
null
electrum/tests/test_lnpeer.py
parazyd/electrum
3e3cfd91a66e4dfa8f584607830e4296c550a4da
[ "MIT" ]
2
2021-04-06T18:38:40.000Z
2021-06-02T04:14:52.000Z
electrum/tests/test_lnpeer.py
parazyd/electrum
3e3cfd91a66e4dfa8f584607830e4296c550a4da
[ "MIT" ]
2
2021-03-13T00:13:15.000Z
2021-06-21T00:00:04.000Z
import asyncio import tempfile from decimal import Decimal import os from contextlib import contextmanager from collections import defaultdict import logging import concurrent from concurrent import futures import unittest from typing import Iterable, NamedTuple, Tuple, List from aiorpcx import TaskGroup, timeout_afte...
44.812439
137
0.65304
import asyncio import tempfile from decimal import Decimal import os from contextlib import contextmanager from collections import defaultdict import logging import concurrent from concurrent import futures import unittest from typing import Iterable, NamedTuple, Tuple, List from aiorpcx import TaskGroup, timeout_afte...
true
true
f7386febb466b87d34dd5d20a83366c9f1d15a89
1,070
py
Python
amf_check_writer/create_yaml_checks.py
gapintheclouds/amf-check-writer
cb4a092960d15d59f8e78936b2d8c4d8564d482d
[ "BSD-3-Clause" ]
null
null
null
amf_check_writer/create_yaml_checks.py
gapintheclouds/amf-check-writer
cb4a092960d15d59f8e78936b2d8c4d8564d482d
[ "BSD-3-Clause" ]
null
null
null
amf_check_writer/create_yaml_checks.py
gapintheclouds/amf-check-writer
cb4a092960d15d59f8e78936b2d8c4d8564d482d
[ "BSD-3-Clause" ]
null
null
null
""" Read AMF spreadsheet TSV files and produce YAML checks that can be used with IOOS compliance-checker via the cc-yaml plugin and compliance-check-lib """ import sys import os import argparse from amf_check_writer.spreadsheet_handler import SpreadsheetHandler def main(): parser = argparse.ArgumentParser(descri...
29.722222
86
0.713084
import sys import os import argparse from amf_check_writer.spreadsheet_handler import SpreadsheetHandler def main(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument( "spreadsheets_dir", help="Directory containing spreadsheet data, as produced by " "downl...
true
true
f738709564d61abfba5fd50a3daa50559a3e85ce
1,566
py
Python
source-code/Populating Next Right Pointers in Each Node 116.py
ttungl/Coding-Interview-Challenge
d80c3e15468d50b42ee53fcc73e9326c6c816495
[ "MIT" ]
null
null
null
source-code/Populating Next Right Pointers in Each Node 116.py
ttungl/Coding-Interview-Challenge
d80c3e15468d50b42ee53fcc73e9326c6c816495
[ "MIT" ]
null
null
null
source-code/Populating Next Right Pointers in Each Node 116.py
ttungl/Coding-Interview-Challenge
d80c3e15468d50b42ee53fcc73e9326c6c816495
[ "MIT" ]
null
null
null
# 116. Populating Next Right Pointers in Each Node # 117. Populating Next Right Pointers in Each Node II # ttungl@gmail.com # Given a binary tree # struct TreeLinkNode { # TreeLinkNode *left; # TreeLinkNode *right; # TreeLinkNode *next; # } # Populate each next pointer to point to its next r...
27.964286
133
0.55364
class Solution: def connect(self, root): while root: node = tem = TreeLinkNode(0) while root: if root.left: node.next = node = root.left if root.right: node.next...
true
true
f73870e20daf441eef07d2449760e9d163066039
1,766
py
Python
test/functional/feature_abortnode.py
wilofice/dahomey
5cbc2406a27e68bbe30f85a7162b86f4741effab
[ "MIT" ]
1
2022-03-19T13:35:37.000Z
2022-03-19T13:35:37.000Z
test/functional/feature_abortnode.py
wilofice/danxome
5cbc2406a27e68bbe30f85a7162b86f4741effab
[ "MIT" ]
null
null
null
test/functional/feature_abortnode.py
wilofice/danxome
5cbc2406a27e68bbe30f85a7162b86f4741effab
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019-2021 The Danxome Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test danxomed aborts if can't disconnect a block. - Start a single node and generate 3 blocks. - Delet...
34.627451
78
0.69026
from test_framework.test_framework import DanxomeTestFramework from test_framework.util import get_datadir_path import os class AbortNodeTest(DanxomeTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 self.rpc_timeout = 240 def setup_networ...
true
true
f738712f469add330757770341d3063548039276
74,974
py
Python
ConvPoint.py
eglrp/ConvPoint_Keras
66c94479ff8dc8ad174ed4da8e6bb1d641a8a8c0
[ "MIT" ]
null
null
null
ConvPoint.py
eglrp/ConvPoint_Keras
66c94479ff8dc8ad174ed4da8e6bb1d641a8a8c0
[ "MIT" ]
null
null
null
ConvPoint.py
eglrp/ConvPoint_Keras
66c94479ff8dc8ad174ed4da8e6bb1d641a8a8c0
[ "MIT" ]
1
2021-11-15T13:52:13.000Z
2021-11-15T13:52:13.000Z
from dataTool import ReadLabels, ReadXYZ, VisualizePointCloudClassesAsync, modelPath, DataTool from imports import * import math import numpy as np from time import time import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras.utils import Sequence from tensorflow.keras.layers impor...
39.480779
205
0.608598
from dataTool import ReadLabels, ReadXYZ, VisualizePointCloudClassesAsync, modelPath, DataTool from imports import * import math import numpy as np from time import time import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras.utils import Sequence from tensorflow.keras.layers impor...
true
true
f73873b063e04eb82873281b226e24f033aa12c2
14,403
py
Python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py
RAY-316/azure-sdk-for-python
4f7790deaf46c6f4e965f099f36eb73a7954ad5b
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py
RSidea/azure-sdk-for-python
8f691b2c95ee0fc53b12d08bd83e3f134d9cf0ef
[ "MIT" ]
null
null
null
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_data_masking_rules_operations.py
RSidea/azure-sdk-for-python
8f691b2c95ee0fc53b12d08bd83e3f134d9cf0ef
[ "MIT" ]
1
2021-12-18T20:01:22.000Z
2021-12-18T20:01:22.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
51.256228
275
0.669722
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f73873b57780f9ec341ecc8c4455f034f3c74936
1,115
py
Python
discountpy/motif.py
Umesh-JNU/DiscountPy
b21c403b9239c0f2f6e7493e62d1a8fd1e7c6f61
[ "MIT" ]
1
2021-07-03T05:59:08.000Z
2021-07-03T05:59:08.000Z
discountpy/motif.py
Umesh-JNU/Discount-In-Python
b21c403b9239c0f2f6e7493e62d1a8fd1e7c6f61
[ "MIT" ]
1
2021-07-03T05:55:00.000Z
2021-07-03T05:57:28.000Z
discountpy/motif.py
Umesh-JNU/DiscountPy
b21c403b9239c0f2f6e7493e62d1a8fd1e7c6f61
[ "MIT" ]
null
null
null
__all__ = [ 'Features', 'Motif', '__Empty__' ] class Features: """ Features: features of the motif - pattern - sequence rank - rank/priority/id (must be unique) valid - valid motif or not (only for universal frequency) """ __slots__ = ('pattern', 'rank', 'valid') p...
23.723404
86
0.591928
__all__ = [ 'Features', 'Motif', '__Empty__' ] class Features: __slots__ = ('pattern', 'rank', 'valid') pattern: str rank: int valid: bool def __init__(self, pat: str, rank: int, valid: bool): self.pattern = pat self.rank = rank self.valid = valid def __r...
true
true
f73873fc2a59d918549462c62895e3ec921fba19
1,976
py
Python
test/test_conv1dt_6.py
neblar/numpynn
b33c5f671c8e835b55ed775ababa358e14c987bc
[ "MIT" ]
null
null
null
test/test_conv1dt_6.py
neblar/numpynn
b33c5f671c8e835b55ed775ababa358e14c987bc
[ "MIT" ]
null
null
null
test/test_conv1dt_6.py
neblar/numpynn
b33c5f671c8e835b55ed775ababa358e14c987bc
[ "MIT" ]
null
null
null
import torch import numpy as np import torch.nn.functional as F from ..src.Conv1DT_6 import Conv1DT as NumpyConv1DT class Tester: conv1dt_numpy = NumpyConv1DT() def y_torch(self, x, weight, bias, stride, padding): x = torch.tensor(x) weight = torch.tensor(weight) bias = torch.tensor(b...
29.939394
75
0.524798
import torch import numpy as np import torch.nn.functional as F from ..src.Conv1DT_6 import Conv1DT as NumpyConv1DT class Tester: conv1dt_numpy = NumpyConv1DT() def y_torch(self, x, weight, bias, stride, padding): x = torch.tensor(x) weight = torch.tensor(weight) bias = torch.tensor(b...
true
true
f73874a33e2a597454e9b14a9892f4043fe5ba8a
6,033
py
Python
userbot/__init__.py
shubham-king/Trusted_Cat
a595d158454e1baf7e9e088e4997092593c02b5d
[ "MIT" ]
null
null
null
userbot/__init__.py
shubham-king/Trusted_Cat
a595d158454e1baf7e9e088e4997092593c02b5d
[ "MIT" ]
null
null
null
userbot/__init__.py
shubham-king/Trusted_Cat
a595d158454e1baf7e9e088e4997092593c02b5d
[ "MIT" ]
2
2020-06-25T11:14:50.000Z
2021-04-04T13:49:13.000Z
import os import sys from telethon.sessions import StringSession from telethon import TelegramClient from var import Var from pylast import LastFMNetwork, md5 from logging import basicConfig, getLogger, INFO, DEBUG from distutils.util import strtobool as sb from pySmartDL import SmartDL from dotenv import load_dotenv i...
33.148352
92
0.687552
import os import sys from telethon.sessions import StringSession from telethon import TelegramClient from var import Var from pylast import LastFMNetwork, md5 from logging import basicConfig, getLogger, INFO, DEBUG from distutils.util import strtobool as sb from pySmartDL import SmartDL from dotenv import load_dotenv i...
true
true
f738755be53b5002f0c7a0a8d111db7e7a51f7d0
26,889
py
Python
lib/sk_count_contigs/sk_count_contigsServer.py
r2sunita/sk_count_contigs
07f780b4d33867381bb264e3afa9644f3b4d66cd
[ "MIT" ]
null
null
null
lib/sk_count_contigs/sk_count_contigsServer.py
r2sunita/sk_count_contigs
07f780b4d33867381bb264e3afa9644f3b4d66cd
[ "MIT" ]
null
null
null
lib/sk_count_contigs/sk_count_contigsServer.py
r2sunita/sk_count_contigs
07f780b4d33867381bb264e3afa9644f3b4d66cd
[ "MIT" ]
null
null
null
#!/usr/bin/env python from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\ JSONRPCError, ServerError, InvalidRequestE...
40.434586
134
0.550708
from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, InvalidParamsError, KeywordError,\ JSONRPCError, ServerError, InvalidRequestError from os import e...
false
true
f7387583e5517857b8c24c92294ff74e4a8c1833
5,058
py
Python
tests/unit/test_configure.py
yuryfirebolt/firebolt-cli
cf0b1837ec1463440486f69ee817e38a522356da
[ "Apache-2.0" ]
null
null
null
tests/unit/test_configure.py
yuryfirebolt/firebolt-cli
cf0b1837ec1463440486f69ee817e38a522356da
[ "Apache-2.0" ]
null
null
null
tests/unit/test_configure.py
yuryfirebolt/firebolt-cli
cf0b1837ec1463440486f69ee817e38a522356da
[ "Apache-2.0" ]
null
null
null
from configparser import ConfigParser from appdirs import user_config_dir from click.testing import CliRunner from pyfakefs.fake_filesystem import FakeFilesystem from firebolt_cli.configure import configure from firebolt_cli.main import main from firebolt_cli.utils import config_file, config_section, read_config de...
27.48913
84
0.582048
from configparser import ConfigParser from appdirs import user_config_dir from click.testing import CliRunner from pyfakefs.fake_filesystem import FakeFilesystem from firebolt_cli.configure import configure from firebolt_cli.main import main from firebolt_cli.utils import config_file, config_section, read_config de...
true
true
f738758e7c0b43af8a792cf9d9f0806b09518647
345
py
Python
1252-cells-with-odd-values-in-a-matrix/1252-cells-with-odd-values-in-a-matrix.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
1252-cells-with-odd-values-in-a-matrix/1252-cells-with-odd-values-in-a-matrix.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
1252-cells-with-odd-values-in-a-matrix/1252-cells-with-odd-values-in-a-matrix.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def oddCells(self, m: int, n: int, indices: List[List[int]]) -> int: row=[0]*m col=[0]*n for r, c in indices: row[r]+=1 col[c]+=1 result=0 for r in row: for c in col: if (r+c)%2==1: result...
26.538462
72
0.408696
class Solution: def oddCells(self, m: int, n: int, indices: List[List[int]]) -> int: row=[0]*m col=[0]*n for r, c in indices: row[r]+=1 col[c]+=1 result=0 for r in row: for c in col: if (r+c)%2==1: result...
true
true
f73875ce3bc23974e30f1a9045660d10c42604fc
821
py
Python
theano_scan_learning/scan_1.py
jxwb088047/my_crf_test
0bc216b13b244a68df79b5459ec4ad10c3a0aabd
[ "MIT" ]
null
null
null
theano_scan_learning/scan_1.py
jxwb088047/my_crf_test
0bc216b13b244a68df79b5459ec4ad10c3a0aabd
[ "MIT" ]
null
null
null
theano_scan_learning/scan_1.py
jxwb088047/my_crf_test
0bc216b13b244a68df79b5459ec4ad10c3a0aabd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Apr 07 17:58:09 2017 @author: B907-LGH """ import theano import theano.tensor as T import numpy as np # defining the tensor variables X = T.matrix("X") W = T.matrix("W") b_sym = T.vector("b_sym") results, updates = theano.scan(lambda v:T.tanh( T.dot(v, W) + b_s...
20.02439
76
0.643118
""" Created on Fri Apr 07 17:58:09 2017 @author: B907-LGH """ import theano import theano.tensor as T import numpy as np X = T.matrix("X") W = T.matrix("W") b_sym = T.vector("b_sym") results, updates = theano.scan(lambda v:T.tanh( T.dot(v, W) + b_sym ) , sequences=X) compute_el...
false
true
f73878821bbd7f6e32ef60e5765026d857264953
1,373
py
Python
testproject/testapp/tests/test_token_destroy.py
mark-slepkov/djoser
8760907db129a41f6204f32d50622c838fa414a1
[ "MIT" ]
null
null
null
testproject/testapp/tests/test_token_destroy.py
mark-slepkov/djoser
8760907db129a41f6204f32d50622c838fa414a1
[ "MIT" ]
null
null
null
testproject/testapp/tests/test_token_destroy.py
mark-slepkov/djoser
8760907db129a41f6204f32d50622c838fa414a1
[ "MIT" ]
null
null
null
from django.contrib.auth import user_logged_out from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views from .common import create_user class TokenDestroyViewTest(restframework.APIViewTestCase, assertions....
29.212766
72
0.717407
from django.contrib.auth import user_logged_out from djet import assertions, restframework from rest_framework import status import djoser.constants import djoser.utils import djoser.views from .common import create_user class TokenDestroyViewTest(restframework.APIViewTestCase, assertions....
true
true
f7387981f2321a661374846e96ae3fd1fd57d1d3
3,337
py
Python
httproxy.py
Iorpim/HTTProxy
ec42947048c5c3264c52a9d3fe3c431c98e3b123
[ "MIT" ]
null
null
null
httproxy.py
Iorpim/HTTProxy
ec42947048c5c3264c52a9d3fe3c431c98e3b123
[ "MIT" ]
null
null
null
httproxy.py
Iorpim/HTTProxy
ec42947048c5c3264c52a9d3fe3c431c98e3b123
[ "MIT" ]
1
2020-03-11T22:28:46.000Z
2020-03-11T22:28:46.000Z
#!/usr/bin/env python3 import sys import ssl import socket import select import threading def connect(addr): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) s.connect((addr, 443)) s = ssl.wrap_socket(s) return s def pconnect(addr): addr = addr.split(":") s = socket.sock...
28.279661
148
0.534312
import sys import ssl import socket import select import threading def connect(addr): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) s.connect((addr, 443)) s = ssl.wrap_socket(s) return s def pconnect(addr): addr = addr.split(":") s = socket.socket(socket.AF_INET, sock...
true
true
f7387a3db16cca4a9071b3b4123beda1c6031746
8,319
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbmonitor_servicegroup_binding.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbmonitor_servicegroup_binding.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/lb/lbmonitor_servicegroup_binding.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2016 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
32.496094
295
0.735906
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_excepti...
true
true
f7387a97e2bf9fab94dce3d45572a24f2d6401d0
1,434
py
Python
locust/exception.py
masonCaminer/locust
8fa8b722ccd429a060d6873ffe9f37f1d35d2e32
[ "MIT" ]
null
null
null
locust/exception.py
masonCaminer/locust
8fa8b722ccd429a060d6873ffe9f37f1d35d2e32
[ "MIT" ]
null
null
null
locust/exception.py
masonCaminer/locust
8fa8b722ccd429a060d6873ffe9f37f1d35d2e32
[ "MIT" ]
null
null
null
class LocustError(Exception): pass class ResponseError(Exception): pass class CatchResponseError(Exception): pass class MissingWaitTimeError(LocustError): pass class InterruptTaskSet(Exception): """ Exception that will interrupt a User when thrown inside a task """ def __init__(...
21.402985
115
0.702232
class LocustError(Exception): pass class ResponseError(Exception): pass class CatchResponseError(Exception): pass class MissingWaitTimeError(LocustError): pass class InterruptTaskSet(Exception): def __init__(self, reschedule=True): self.reschedule = reschedule class StopUser(Excep...
true
true
f7387ad377be84ea1267b77a48ba7ba99b4b716d
4,609
py
Python
Smith_Ben/Assignments/RegEx/regex copy.py
webguru001/Python-Django-Web
6264bc4c90ef1432ba0902c76b567cf3caaae221
[ "MIT" ]
5
2019-05-17T01:30:02.000Z
2021-06-17T21:02:58.000Z
Smith_Ben/Assignments/RegEx/regex copy.py
curest0x1021/Python-Django-Web
6264bc4c90ef1432ba0902c76b567cf3caaae221
[ "MIT" ]
null
null
null
Smith_Ben/Assignments/RegEx/regex copy.py
curest0x1021/Python-Django-Web
6264bc4c90ef1432ba0902c76b567cf3caaae221
[ "MIT" ]
null
null
null
import re # PART 1 def get_matching_words(): words = ["aimlessness", "assassin", "baby", "beekeeper", "belladonna", "cannonball", "crybaby", "denver", "embraceable", "facetious", "flashbulb", "gaslight", "hobgoblin", "iconoclast", "issue", "kebab", "kilo", "laundered", "mattress", "millennia", "natural", "obsessive"...
61.453333
403
0.661966
import re def get_matching_words(): words = ["aimlessness", "assassin", "baby", "beekeeper", "belladonna", "cannonball", "crybaby", "denver", "embraceable", "facetious", "flashbulb", "gaslight", "hobgoblin", "iconoclast", "issue", "kebab", "kilo", "laundered", "mattress", "millennia", "natural", "obsessive", "paran...
false
true
f7387ae9a9a7f58c3749489a080bb1a0fe1242b5
3,377
py
Python
checkov/common/bridgecrew/image_scanning/image_scanner.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
4,013
2019-12-09T13:16:54.000Z
2022-03-31T14:31:01.000Z
checkov/common/bridgecrew/image_scanning/image_scanner.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
1,258
2019-12-17T09:55:51.000Z
2022-03-31T19:17:17.000Z
checkov/common/bridgecrew/image_scanning/image_scanner.py
graybrandonpfg/checkov
3081a8560f6369465314ee8f4ac8a8ec01649d68
[ "Apache-2.0" ]
638
2019-12-19T08:57:38.000Z
2022-03-30T21:38:37.000Z
import logging import subprocess # nosec import docker import json import os import time from checkov.common.bridgecrew.image_scanning.docker_image_scanning_integration import docker_image_scanning_integration TWISTCLI_FILE_NAME = 'twistcli' DOCKER_IMAGE_SCAN_RESULT_FILE_NAME = 'docker-image-scan-results.json' def...
40.686747
274
0.687296
import logging import subprocess import docker import json import os import time from checkov.common.bridgecrew.image_scanning.docker_image_scanning_integration import docker_image_scanning_integration TWISTCLI_FILE_NAME = 'twistcli' DOCKER_IMAGE_SCAN_RESULT_FILE_NAME = 'docker-image-scan-results.json' def _get_d...
true
true
f7387b7a0fda396aca3fe13d2312bd4427223bec
1,317
py
Python
nasbench/scripts/generate-all-graphs.py
bkj/nasbench
a238cf26d843aaffbe037569528ef96d3e37eb04
[ "Apache-2.0" ]
null
null
null
nasbench/scripts/generate-all-graphs.py
bkj/nasbench
a238cf26d843aaffbe037569528ef96d3e37eb04
[ "Apache-2.0" ]
null
null
null
nasbench/scripts/generate-all-graphs.py
bkj/nasbench
a238cf26d843aaffbe037569528ef96d3e37eb04
[ "Apache-2.0" ]
1
2021-07-25T16:36:34.000Z
2021-07-25T16:36:34.000Z
#!/usr/bin/env python """ generate-all-graphs.py python generate-all-graphs.py | gzip -c > all-graphs.gz """ import sys import json import itertools import numpy as np from tqdm import tqdm from nasbench.lib import graph_util from joblib import delayed, Parallel max_vertices = 7 num_ops = 3 max_edges ...
24.388889
98
0.642369
import sys import json import itertools import numpy as np from tqdm import tqdm from nasbench.lib import graph_util from joblib import delayed, Parallel max_vertices = 7 num_ops = 3 max_edges = 9 def make_graphs(vertices, bits): matrix = np.fromfunction(graph_util.gen_is_edge_fn(bits), (vertices, vert...
true
true
f7387bae09cc2b0526f7f86aabfaeb7054320eba
1,707
py
Python
app/core/migrations/0001_initial.py
ivandrosilva12/recipe-app-api
22ad188fe9326bfe833d11c86ba3a605dd7df017
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
ivandrosilva12/recipe-app-api
22ad188fe9326bfe833d11c86ba3a605dd7df017
[ "MIT" ]
null
null
null
app/core/migrations/0001_initial.py
ivandrosilva12/recipe-app-api
22ad188fe9326bfe833d11c86ba3a605dd7df017
[ "MIT" ]
null
null
null
# Generated by Django 3.1 on 2020-08-06 19:34 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='User', ...
50.205882
266
0.639133
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='User', fields=[ ('id', models.A...
true
true
f7387c165b67b24dd8cd4411dc7deccd3248a8c1
2,321
py
Python
genes/migrations/0001_initial.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
13
2016-01-14T02:43:10.000Z
2020-11-25T20:43:05.000Z
genes/migrations/0001_initial.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
84
2015-11-20T02:03:33.000Z
2021-10-14T19:24:24.000Z
genes/migrations/0001_initial.py
isb-cgc/ISB-CGC-Webapp
52ed5366ee295e938108a4687bad551a8dee6b34
[ "Apache-2.0" ]
5
2015-11-25T19:29:53.000Z
2019-09-04T17:37:52.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
34.641791
114
0.5433
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name...
true
true
f7387cb52adb9b74ac684ed1bfab5498cb3f2ca8
7,348
py
Python
Plugins/Configs/Pages/Apps.py
CHHOrganization/BlackDoc
7931f7d659344b44b6bdedfc0f1157910366bf64
[ "Unlicense" ]
3
2022-03-17T23:19:52.000Z
2022-03-18T10:36:52.000Z
Plugins/Configs/Pages/Apps.py
CHHOrganization/BlackDoc
7931f7d659344b44b6bdedfc0f1157910366bf64
[ "Unlicense" ]
1
2022-03-18T04:51:44.000Z
2022-03-21T02:16:13.000Z
Plugins/Configs/Pages/Apps.py
CHHOrganization/BlackDoc
7931f7d659344b44b6bdedfc0f1157910366bf64
[ "Unlicense" ]
null
null
null
import os, time, sys from Plugins.Configs.Settings import * def Apps(): clearConsole() #Banner Index_Banner() print(Bright_Red +"Cryptic Hats Hackers Organizations") print("Use This Apps To Change Members Phone, To") print("Keep Members Busy With Cool Games, To learn") print("Programming O...
60.229508
108
0.694066
import os, time, sys from Plugins.Configs.Settings import * def Apps(): clearConsole() Index_Banner() print(Bright_Red +"Cryptic Hats Hackers Organizations") print("Use This Apps To Change Members Phone, To") print("Keep Members Busy With Cool Games, To learn") print("Programming Offline ...
true
true
f7387d36346b7390462cbfbd5e3c6dfb63d8cbf1
19,610
py
Python
tests/test_stanza_element.py
aristanetworks/SleekXMPP
91f53bf1964a564f6f12477a31884e9ec38cef75
[ "MIT" ]
null
null
null
tests/test_stanza_element.py
aristanetworks/SleekXMPP
91f53bf1964a564f6f12477a31884e9ec38cef75
[ "MIT" ]
1
2020-04-10T22:09:06.000Z
2020-04-10T22:09:06.000Z
tests/test_stanza_element.py
aristanetworks/SleekXMPP
91f53bf1964a564f6f12477a31884e9ec38cef75
[ "MIT" ]
1
2019-12-05T12:10:16.000Z
2019-12-05T12:10:16.000Z
from sleekxmpp.test import * from sleekxmpp.xmlstream.stanzabase import ElementBase class TestElementBase(SleekTest): def testFixNs(self): """Test fixing namespaces in an XPath expression.""" e = ElementBase() ns = "http://jabber.org/protocol/disco#items" result = e._fix_ns("{%s}...
29.667171
79
0.491943
from sleekxmpp.test import * from sleekxmpp.xmlstream.stanzabase import ElementBase class TestElementBase(SleekTest): def testFixNs(self): e = ElementBase() ns = "http://jabber.org/protocol/disco#items" result = e._fix_ns("{%s}foo/bar/{abc}baz/{%s}more" % (ns, ns)) expected = "/...
true
true
f7387d69e2f65d60c1b83d48b2cd6a8bdf5fd4a8
1,130
py
Python
e2e/Tests/Consensus/Families/LowerHashTieBreakTest.py
kayabaNerve/Currency
260ebc20f1704f42ad6183fee39ad58ec6d07961
[ "CC0-1.0" ]
66
2019-01-14T08:39:52.000Z
2022-01-06T11:39:15.000Z
e2e/Tests/Consensus/Families/LowerHashTieBreakTest.py
kayabaNerve/Currency
260ebc20f1704f42ad6183fee39ad58ec6d07961
[ "CC0-1.0" ]
228
2019-01-16T15:42:44.000Z
2022-02-05T07:48:07.000Z
e2e/Tests/Consensus/Families/LowerHashTieBreakTest.py
kayabaNerve/Currency
260ebc20f1704f42ad6183fee39ad58ec6d07961
[ "CC0-1.0" ]
19
2019-01-14T08:53:04.000Z
2021-11-03T20:19:28.000Z
from typing import Dict, List, Any import json from e2e.Classes.Transactions.Data import Data from e2e.Meros.RPC import RPC from e2e.Meros.Liver import Liver from e2e.Tests.Errors import TestError def LowerHashTieBreakTest( rpc: RPC ) -> None: vectors: Dict[str, Any] with open("e2e/Vectors/Consensus/Families/...
28.974359
85
0.673451
from typing import Dict, List, Any import json from e2e.Classes.Transactions.Data import Data from e2e.Meros.RPC import RPC from e2e.Meros.Liver import Liver from e2e.Tests.Errors import TestError def LowerHashTieBreakTest( rpc: RPC ) -> None: vectors: Dict[str, Any] with open("e2e/Vectors/Consensus/Families/...
true
true
f7387d930bdd97e3958f65e51d15d7f34375a30d
154
py
Python
dataservices/utils/config_funcs.py
jmaddocks-microstrategy/dataservices
b6a0ea4a7096f492a0e39f80668c9aa243ff5310
[ "MIT" ]
null
null
null
dataservices/utils/config_funcs.py
jmaddocks-microstrategy/dataservices
b6a0ea4a7096f492a0e39f80668c9aa243ff5310
[ "MIT" ]
null
null
null
dataservices/utils/config_funcs.py
jmaddocks-microstrategy/dataservices
b6a0ea4a7096f492a0e39f80668c9aa243ff5310
[ "MIT" ]
null
null
null
def read_config_value(section, key): from dataservices.utils.file_funcs import get_config config = get_config() return config[section][key]
22
56
0.746753
def read_config_value(section, key): from dataservices.utils.file_funcs import get_config config = get_config() return config[section][key]
true
true
f7387dc9caa52559a32da037877509ca915ba0d9
13,216
py
Python
tricircle/tricircle/tests/functional/api/controllers/test_pod.py
ztcloud/tricircle
32751417165d2d0818720111c056d57493ed527f
[ "Apache-2.0" ]
1
2021-03-19T16:48:54.000Z
2021-03-19T16:48:54.000Z
tricircle/tricircle/tests/functional/api/controllers/test_pod.py
ztcloud/tricircle
32751417165d2d0818720111c056d57493ed527f
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
tricircle/tricircle/tests/functional/api/controllers/test_pod.py
ztcloud/tricircle
32751417165d2d0818720111c056d57493ed527f
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright (c) 2015 Huawei Technologies Co., Ltd. # 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 # # ...
27.476091
79
0.445142
from mock import patch import pecan from pecan.configuration import set_config from pecan.testing import load_test_app from oslo_config import cfg from oslo_config import fixture as fixture_config import oslo_db.exception as db_exc from tricircle.api import app from tricircle.common import context from ...
true
true
f7387df61f9f157b1511dc164eac204c0ebcdfbf
3,168
py
Python
vulnerabilities/importers/__init__.py
bhuvi11/vulnerablecode
8044a9826568b24397d143e17624299f8008b0e0
[ "Apache-2.0" ]
257
2017-06-09T09:54:55.000Z
2022-03-30T19:25:55.000Z
vulnerabilities/importers/__init__.py
bhuvi11/vulnerablecode
8044a9826568b24397d143e17624299f8008b0e0
[ "Apache-2.0" ]
526
2017-06-06T21:54:44.000Z
2022-03-31T19:11:33.000Z
vulnerabilities/importers/__init__.py
bhuvi11/vulnerablecode
8044a9826568b24397d143e17624299f8008b0e0
[ "Apache-2.0" ]
105
2017-06-27T20:35:29.000Z
2022-03-30T06:07:04.000Z
# Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/vulnerablecode/ # The VulnerableCode software is licensed under the Apache License version 2.0. # Data generated with VulnerableCode require an acknowledgment. # # You may not use this software except in compli...
60.923077
93
0.856692
from vulnerabilities.importers.alpine_linux import AlpineDataSource from vulnerabilities.importers.apache_httpd import ApacheHTTPDDataSource from vulnerabilities.importers.apache_kafka import ApacheKafkaDataSource from vulnerabilities.importers.apache_tomcat import ApacheTomcatDataSource from vul...
true
true
f7387e2d9cf7db9b7ae1d785ce90a294e37c319b
9,874
py
Python
src/crawl/filter.py
fashandge/deja
91feb26d5bee5f4ace1fcdcc9d690d68b3f7afe9
[ "MIT" ]
null
null
null
src/crawl/filter.py
fashandge/deja
91feb26d5bee5f4ace1fcdcc9d690d68b3f7afe9
[ "MIT" ]
null
null
null
src/crawl/filter.py
fashandge/deja
91feb26d5bee5f4ace1fcdcc9d690d68b3f7afe9
[ "MIT" ]
null
null
null
import re #from IPython.core.debugger import Tracer import src.experiment.utilities as util # the maximum number of words in a sentence MAX_SENTENCE_WORDS = 18 MAX_TOTAL_WORDS = 30 MAX_TOTAL_CHARS = 150 UPPERCASE_AS_NAMEENTITY = True paren_patt = re.compile(r'\([^\)]*\)') paren_patt2 = re.compile(r'\([^\)]{0,7}\)') ...
33.931271
274
0.617784
import re import src.experiment.utilities as util MAX_SENTENCE_WORDS = 18 MAX_TOTAL_WORDS = 30 MAX_TOTAL_CHARS = 150 UPPERCASE_AS_NAMEENTITY = True paren_patt = re.compile(r'\([^\)]*\)') paren_patt2 = re.compile(r'\([^\)]{0,7}\)') ''' (1) Clean title and descriptions and get individual sentences. Each flickr photo...
false
true
f7387fe8ee6931d74933841b81b8a80377bc5fdf
29,563
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancers_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancers_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancers_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.107973
195
0.666746
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f738810982ae528e57ee7f3caf15eebe5ad891c5
1,467
py
Python
ninja/compatibility/request.py
kmlee78/django-ninja
ae543f2d43ff4fbc0aa22713942be77d25e1bca3
[ "MIT" ]
2,809
2020-06-21T08:48:40.000Z
2022-03-30T16:42:11.000Z
ninja/compatibility/request.py
kmlee78/django-ninja
ae543f2d43ff4fbc0aa22713942be77d25e1bca3
[ "MIT" ]
311
2020-06-22T07:59:27.000Z
2022-03-31T18:01:23.000Z
ninja/compatibility/request.py
kmlee78/django-ninja
ae543f2d43ff4fbc0aa22713942be77d25e1bca3
[ "MIT" ]
178
2020-07-08T00:40:43.000Z
2022-03-29T02:05:20.000Z
from typing import Callable import django from django.http import HttpRequest try: from django.utils.datastructures import CaseInsensitiveMapping except ImportError: from .datastructures import CaseInsensitiveMapping # HttpHeaders copypasted from django 3.0 codebase class HttpHeaders(CaseInsensitiveMapping)...
27.166667
72
0.683708
from typing import Callable import django from django.http import HttpRequest try: from django.utils.datastructures import CaseInsensitiveMapping except ImportError: from .datastructures import CaseInsensitiveMapping class HttpHeaders(CaseInsensitiveMapping): HTTP_PREFIX = "HTTP_" UNPREFIXED_H...
true
true
f73882396283137fefa94120bdcfa33bbc48a1a3
743
py
Python
util/make-gnuplot.py
LudwikJaniuk/cut-match-game
15ea67bcd927d4b3ab88fd916b290df2fc8eb8f2
[ "MIT" ]
1
2020-08-03T20:50:54.000Z
2020-08-03T20:50:54.000Z
util/make-gnuplot.py
LudwikJaniuk/cut-match-game
15ea67bcd927d4b3ab88fd916b290df2fc8eb8f2
[ "MIT" ]
null
null
null
util/make-gnuplot.py
LudwikJaniuk/cut-match-game
15ea67bcd927d4b3ab88fd916b290df2fc8eb8f2
[ "MIT" ]
null
null
null
#!python3 import sys # Used to generate output that my gnuplot will accept lines = iter(sys.stdin) next(lines) lines = map(lambda s: s.split(), lines) #0 Graph_name vertices edges g_phi h_phi timed_out #6 spent_time allowed_time read_as_multi CASE best_cut_conductance #11 best_cut_expansion edges_crossing size1 si...
30.958333
108
0.724092
import sys lines = iter(sys.stdin) next(lines) lines = map(lambda s: s.split(), lines) print("#vertices conductance our_cut_conductance name colors imbalance") for line in lines: line[0] = f'"{line[0].replace("_", " ")}"' print(f"{line[1]}\t{line[21]}\t{line[10]}\t{line[0]}\t{line[23]}\t{line...
true
true
f73883019d68ad2a4ca581af94fd4b24fd31fa7b
865
py
Python
examples/java-demo/feature_repo/test.py
danilopeixoto/feast
57d134355364654a2275b477b3b82b149f0779ca
[ "Apache-2.0" ]
810
2018-12-25T15:16:11.000Z
2020-05-14T09:49:40.000Z
examples/java-demo/feature_repo/test.py
danilopeixoto/feast
57d134355364654a2275b477b3b82b149f0779ca
[ "Apache-2.0" ]
701
2018-12-21T05:18:43.000Z
2020-05-16T01:30:21.000Z
examples/java-demo/feature_repo/test.py
danilopeixoto/feast
57d134355364654a2275b477b3b82b149f0779ca
[ "Apache-2.0" ]
155
2018-12-22T11:05:04.000Z
2020-05-14T07:33:41.000Z
import grpc from feast.protos.feast.serving.ServingService_pb2 import ( FeatureList, GetOnlineFeaturesRequest, ) from feast.protos.feast.serving.ServingService_pb2_grpc import ServingServiceStub from feast.protos.feast.types.Value_pb2 import RepeatedValue, Value # Sample logic to fetch from a local gRPC java ...
29.827586
82
0.720231
import grpc from feast.protos.feast.serving.ServingService_pb2 import ( FeatureList, GetOnlineFeaturesRequest, ) from feast.protos.feast.serving.ServingService_pb2_grpc import ServingServiceStub from feast.protos.feast.types.Value_pb2 import RepeatedValue, Value def fetch_java(): channel = grpc.insecure_...
true
true
f7388315128796e4fbe48a6627da9234f8e1ad0f
2,624
py
Python
state-of-the-art/bmvc18/psnr_ssim_mabd.py
wangby511/Extreme-Dark-Video-Enhancement
e0de50428d74a7cec2ee87b63e9fce9860dfd590
[ "MIT" ]
6
2020-05-21T01:57:54.000Z
2022-03-05T14:01:13.000Z
state-of-the-art/bmvc18/psnr_ssim_mabd.py
wangby511/Extreme-Dark-Video-Enhancement
e0de50428d74a7cec2ee87b63e9fce9860dfd590
[ "MIT" ]
3
2020-07-22T12:01:39.000Z
2021-06-23T09:37:01.000Z
state-of-the-art/bmvc18/psnr_ssim_mabd.py
wangby511/Extreme-Dark-Video-Enhancement
e0de50428d74a7cec2ee87b63e9fce9860dfd590
[ "MIT" ]
2
2020-12-02T15:24:06.000Z
2021-06-07T11:30:16.000Z
import os, glob, time import tensorflow as tf import numpy as np from skvideo.io import vread, vwrite directory = 'test_set_results/' TEST_RESULT_DIR = './result_MBLLVEN_raw_he2he/test/' MAX_VAL = 255 sess = tf.Session() t_vid1 = tf.placeholder(tf.uint8, [None, None, None, None]) t_vid2 = tf.placeholder(tf.uint8,...
34.526316
223
0.620808
import os, glob, time import tensorflow as tf import numpy as np from skvideo.io import vread, vwrite directory = 'test_set_results/' TEST_RESULT_DIR = './result_MBLLVEN_raw_he2he/test/' MAX_VAL = 255 sess = tf.Session() t_vid1 = tf.placeholder(tf.uint8, [None, None, None, None]) t_vid2 = tf.placeholder(tf.uint8,...
true
true
f7388447e83df906c4845fbd4a13e2d1d42dfc0b
14,305
py
Python
src/data_loaders.py
huyhoang17/DB_text_minimal
0d1466889b21cb74a0571a0fb3856902739ea523
[ "MIT" ]
30
2020-07-20T12:13:27.000Z
2022-03-08T06:30:31.000Z
src/data_loaders.py
huyhoang17/DB_text_minimal
0d1466889b21cb74a0571a0fb3856902739ea523
[ "MIT" ]
10
2020-08-11T10:21:11.000Z
2022-03-07T15:27:49.000Z
src/data_loaders.py
huyhoang17/DB_text_minimal
0d1466889b21cb74a0571a0fb3856902739ea523
[ "MIT" ]
6
2020-09-02T10:58:00.000Z
2021-08-13T01:43:47.000Z
import os import glob import math import hydra import cv2 import numpy as np from shapely.geometry import Polygon import torch from torch.utils.data import Dataset, DataLoader import imgaug.augmenters as iaa import pyclipper import db_transforms from utils import dict_to_device, minmax_scaler_img class BaseDatasetI...
36.307107
90
0.516113
import os import glob import math import hydra import cv2 import numpy as np from shapely.geometry import Polygon import torch from torch.utils.data import Dataset, DataLoader import imgaug.augmenters as iaa import pyclipper import db_transforms from utils import dict_to_device, minmax_scaler_img class BaseDatasetI...
true
true
f738860b3e28a27636b2652680a1b1dc3a574f3b
1,802
py
Python
test/functional/net/test_interface.py
yuanfm/f5-common-python
7d6588d56323e7065fec929ff00020081f9d6ade
[ "Apache-2.0" ]
null
null
null
test/functional/net/test_interface.py
yuanfm/f5-common-python
7d6588d56323e7065fec929ff00020081f9d6ade
[ "Apache-2.0" ]
null
null
null
test/functional/net/test_interface.py
yuanfm/f5-common-python
7d6588d56323e7065fec929ff00020081f9d6ade
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 F5 Networks 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 agreed to in writi...
33.37037
76
0.677026
def cleanup_test(request, bigip): def teardown(): for ifc in bigip.net.interfaces.get_collection(): ifc.enabled = True ifc.update() request.addfinalizer(teardown) class TestInterfaces(object): def test_interfaces_list(self, bigip): ifcs = bigip.net.i...
true
true
f73887c36202209bf712552e26bf269db52faa6c
7,823
py
Python
run/deployment-previews/check_status.py
hpmr73/hari
238dbf2c88a0fdf7b6ff17de0b8b2c125891bbbd
[ "Apache-2.0" ]
1
2020-12-01T15:32:46.000Z
2020-12-01T15:32:46.000Z
run/deployment-previews/check_status.py
hpmr73/hari
238dbf2c88a0fdf7b6ff17de0b8b2c125891bbbd
[ "Apache-2.0" ]
9
2021-07-06T20:57:46.000Z
2021-11-05T22:58:24.000Z
run/deployment-previews/check_status.py
FFHixio/python-docs-samples
b39441b3ca0a7b27e9c141e9b43e78e729105573
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
30.204633
121
0.63863
import os import re import sys from typing import Callable, List import click import github from github.GithubException import GithubException from googleapiclient import discovery from googleapiclient.errors import HttpError TAG_PREFIX = "pr-" def make_tag(pr: str) -> str: return f"{TAG_PREFI...
true
true
f73887cf38b8a004a5521053503629b294eed3b2
900
py
Python
mpa/__init__.py
openvinotoolkit/model_preparation_algorithm
8d36bf5944837b7a3d22fc2c3a4cb93423619fc2
[ "Apache-2.0" ]
null
null
null
mpa/__init__.py
openvinotoolkit/model_preparation_algorithm
8d36bf5944837b7a3d22fc2c3a4cb93423619fc2
[ "Apache-2.0" ]
null
null
null
mpa/__init__.py
openvinotoolkit/model_preparation_algorithm
8d36bf5944837b7a3d22fc2c3a4cb93423619fc2
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 # # flake8: noqa import os from pathlib import Path from . import modules from . import cls from . import det from . import seg from .version import __version__, get_version from .builder import build, build_workflow_hook from .stage import...
25.714286
81
0.737778
import os from pathlib import Path from . import modules from . import cls from . import det from . import seg from .version import __version__, get_version from .builder import build, build_workflow_hook from .stage import Stage, get_available_types from .workflow import Workflow class MPAConstants: PACKA...
true
true
f7388829eb20428dddfdddd9f0089a6be4e7072b
243
py
Python
scripts/_dir.py
TianyiShi2001/rmarkdown-vscode
e0fb9cd6d0f783313679546c866757fc1bb71ab9
[ "MIT" ]
29
2020-04-13T07:06:55.000Z
2021-12-11T13:52:54.000Z
scripts/_dir.py
TianyiShi2001/rmarkdown-vscode
e0fb9cd6d0f783313679546c866757fc1bb71ab9
[ "MIT" ]
14
2020-04-17T07:13:52.000Z
2022-02-23T18:20:12.000Z
scripts/_dir.py
TianyiShi2001/rmarkdown-vscode
e0fb9cd6d0f783313679546c866757fc1bb71ab9
[ "MIT" ]
5
2020-08-13T12:33:16.000Z
2022-01-19T12:50:51.000Z
import os from pathlib import Path project_dir = os.path.split(os.path.dirname(__file__))[0] project_dir_path = Path(project_dir) src_dir = os.path.join(project_dir, "src") src_dir_path = Path(src_dir) ch_src_dir = lambda: os.chdir(src_dir)
24.3
57
0.773663
import os from pathlib import Path project_dir = os.path.split(os.path.dirname(__file__))[0] project_dir_path = Path(project_dir) src_dir = os.path.join(project_dir, "src") src_dir_path = Path(src_dir) ch_src_dir = lambda: os.chdir(src_dir)
true
true
f73889404b1f3c76175bd1549c1754c81875f813
2,190
py
Python
tests/conftest.py
edge-minato/pypj
c928cf9ba29017ed6c0756b24f91d75ae16473e4
[ "MIT" ]
13
2021-09-29T03:16:42.000Z
2022-02-28T19:23:28.000Z
tests/conftest.py
edge-minato/pypj
c928cf9ba29017ed6c0756b24f91d75ae16473e4
[ "MIT" ]
41
2021-09-03T09:49:49.000Z
2022-03-20T20:46:02.000Z
tests/conftest.py
edge-minato/pypj
c928cf9ba29017ed6c0756b24f91d75ae16473e4
[ "MIT" ]
null
null
null
import json import re from pathlib import Path from shutil import rmtree from subprocess import PIPE, run from typing import Generator import pytest import toml # type: ignore import yaml # type: ignore from pypj.exception import Emsg, PypjError def prepare_tmp_dir(tmp: Path) -> None: if tmp.exists(): ...
21.470588
69
0.632877
import json import re from pathlib import Path from shutil import rmtree from subprocess import PIPE, run from typing import Generator import pytest import toml import yaml from pypj.exception import Emsg, PypjError def prepare_tmp_dir(tmp: Path) -> None: if tmp.exists(): rmtree(tmp) tmp.mkdir()...
true
true
f738896be1d84123833439159d7e056cc67a9738
1,547
py
Python
experimentator/wandb_experiment.py
gabriel-vanzandycke/experimentator
e733e03930fc45ad62dfbf3f85cb9babfd078585
[ "BSD-3-Clause" ]
1
2020-09-25T13:10:59.000Z
2020-09-25T13:10:59.000Z
experimentator/wandb_experiment.py
gabriel-vanzandycke/experimentator
e733e03930fc45ad62dfbf3f85cb9babfd078585
[ "BSD-3-Clause" ]
null
null
null
experimentator/wandb_experiment.py
gabriel-vanzandycke/experimentator
e733e03930fc45ad62dfbf3f85cb9babfd078585
[ "BSD-3-Clause" ]
null
null
null
import os import pandas from functools import cached_property from experimentator import StateLogger import wandb os.environ["WANDB_SILENT"] = "true" os.environ["WANDB_START_METHOD"] = "thread" class LogStateWandB(StateLogger): best_report = {} def __init__(self, criterion_metric=None, mode="online"): ...
33.630435
111
0.624434
import os import pandas from functools import cached_property from experimentator import StateLogger import wandb os.environ["WANDB_SILENT"] = "true" os.environ["WANDB_START_METHOD"] = "thread" class LogStateWandB(StateLogger): best_report = {} def __init__(self, criterion_metric=None, mode="online"): ...
true
true