hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f730a9b7a1db7a1618efa71421a99e18b273e3d6
2,861
py
Python
flask_app.py
mnksingh94/Flipkart-Review-Scraper
63ab0d4e9c640d3f88e81dc520b66dcb9931b5dc
[ "MIT" ]
null
null
null
flask_app.py
mnksingh94/Flipkart-Review-Scraper
63ab0d4e9c640d3f88e81dc520b66dcb9931b5dc
[ "MIT" ]
null
null
null
flask_app.py
mnksingh94/Flipkart-Review-Scraper
63ab0d4e9c640d3f88e81dc520b66dcb9931b5dc
[ "MIT" ]
null
null
null
from flask import Flask, render_template, request, jsonify from flask_cors import CORS, cross_origin import requests from bs4 import BeautifulSoup as bs from urllib.request import urlopen as uReq import pymongo app = Flask(__name__) @app.route('/', methods=['POST', 'GET']) def index(): if request.method == 'POST...
40.871429
112
0.51136
from flask import Flask, render_template, request, jsonify from flask_cors import CORS, cross_origin import requests from bs4 import BeautifulSoup as bs from urllib.request import urlopen as uReq import pymongo app = Flask(__name__) @app.route('/', methods=['POST', 'GET']) def index(): if request.method == 'POST...
true
true
f730a9e2fce406cfb29f69a52f9dfdd07eb5199b
96
py
Python
Python Pattern Programs/Alphabetic Patterns/Pattern 5.py
trial1user/Printing-Pattern-Programs
dde29e056b8e067fb3a824edb7ecb7dd9c9a776a
[ "MIT" ]
61
2021-01-07T03:56:25.000Z
2022-02-26T14:39:52.000Z
PythonPatternPrograms/AlphabeticPatterns/Pattern 5.py
Ankur-586/Printing-Pattern-Programs
33e534ed66a02705e6cd6bc1992d4818a44d1b6b
[ "MIT" ]
51
2020-12-25T17:06:26.000Z
2021-05-07T12:52:56.000Z
PythonPatternPrograms/AlphabeticPatterns/Pattern 5.py
Ankur-586/Printing-Pattern-Programs
33e534ed66a02705e6cd6bc1992d4818a44d1b6b
[ "MIT" ]
13
2021-01-07T09:50:21.000Z
2021-12-17T11:03:57.000Z
for x in range(65, 70): for y in range(65, x + 1): print(chr(x), end="") print()
24
30
0.489583
for x in range(65, 70): for y in range(65, x + 1): print(chr(x), end="") print()
true
true
f730a9e647e5d1432afdb7a94d9a14a04264fc9b
5,738
py
Python
platform.py
arhi/platform-nordicnrf51
267cd3fe97a6dd694c7c8b5fbae0919caeef5304
[ "Apache-2.0" ]
null
null
null
platform.py
arhi/platform-nordicnrf51
267cd3fe97a6dd694c7c8b5fbae0919caeef5304
[ "Apache-2.0" ]
null
null
null
platform.py
arhi/platform-nordicnrf51
267cd3fe97a6dd694c7c8b5fbae0919caeef5304
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
39.30137
84
0.518822
import copy import platform from platformio.managers.platform import PlatformBase from platformio.util import get_systype class Nordicnrf51Platform(PlatformBase): def is_embedded(self): return True def configure_default_packages(self, variables, targets): if "erase" in targets: ...
true
true
f730a9f146914b909d2007a03b578d74b8950165
248
py
Python
setup.py
decisionscients/Cancer
cdf86ed654881a1d113b9623d5e21f76dc9d36d2
[ "BSD-3-Clause" ]
null
null
null
setup.py
decisionscients/Cancer
cdf86ed654881a1d113b9623d5e21f76dc9d36d2
[ "BSD-3-Clause" ]
null
null
null
setup.py
decisionscients/Cancer
cdf86ed654881a1d113b9623d5e21f76dc9d36d2
[ "BSD-3-Clause" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Learning Eligibility in Clinical Trials Using Neural Networks', author='John James', license='BSD-3', )
22.545455
80
0.693548
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Learning Eligibility in Clinical Trials Using Neural Networks', author='John James', license='BSD-3', )
true
true
f730aa6163e999ba3e3dedeced39133e1bbdaa3b
4,662
py
Python
src/aoikprojectstarter/mediator.py
AoiKuiyuyou/AoikProjectStarter-Python
448789ad012be8774d4a3792639b155394b16048
[ "MIT" ]
3
2016-09-15T12:49:08.000Z
2016-10-22T11:47:11.000Z
src/aoikprojectstarter/mediator.py
AoiKuiyuyou/AoikProjectStarter-Python
448789ad012be8774d4a3792639b155394b16048
[ "MIT" ]
null
null
null
src/aoikprojectstarter/mediator.py
AoiKuiyuyou/AoikProjectStarter-Python
448789ad012be8774d4a3792639b155394b16048
[ "MIT" ]
null
null
null
# coding: utf-8 # """ Mediator module. This module puts together other modules to implement the program logic. """ from __future__ import absolute_import # Standard-library imports from argparse import ArgumentParser from argparse import ArgumentTypeError import sys import traceback # Local imports from .func import...
22.631068
77
0.611111
from __future__ import absolute_import from argparse import ArgumentParser from argparse import ArgumentTypeError import sys import traceback from .func import factorial def int_ge0(text): try: int_value = int(text) assert int_value >= 0 except Exception: rai...
true
true
f730abdde75909808210df1f3886c99110f87f72
11,682
py
Python
poetry/repositories/legacy_repository.py
jancespivo/poetry
4aee3fb9c2e99c189d2723a81fce2356c3589047
[ "MIT" ]
null
null
null
poetry/repositories/legacy_repository.py
jancespivo/poetry
4aee3fb9c2e99c189d2723a81fce2356c3589047
[ "MIT" ]
null
null
null
poetry/repositories/legacy_repository.py
jancespivo/poetry
4aee3fb9c2e99c189d2723a81fce2356c3589047
[ "MIT" ]
null
null
null
import cgi import re try: import urllib.parse as urlparse except ImportError: import urlparse try: from html import unescape except ImportError: try: from html.parser import HTMLParser except ImportError: from HTMLParser import HTMLParser unescape = HTMLParser().unescape from...
31.069149
91
0.54982
import cgi import re try: import urllib.parse as urlparse except ImportError: import urlparse try: from html import unescape except ImportError: try: from html.parser import HTMLParser except ImportError: from HTMLParser import HTMLParser unescape = HTMLParser().unescape from...
true
true
f730abe304c37698a7a929d72c33c9de240a15f7
9,543
py
Python
config/settings/base.py
szymanskirafal/tryread
f7e395c318e33de84992c79eaa5844028c378a2d
[ "MIT" ]
null
null
null
config/settings/base.py
szymanskirafal/tryread
f7e395c318e33de84992c79eaa5844028c378a2d
[ "MIT" ]
null
null
null
config/settings/base.py
szymanskirafal/tryread
f7e395c318e33de84992c79eaa5844028c378a2d
[ "MIT" ]
null
null
null
""" Base settings to build other settings files upon. """ import environ ROOT_DIR = environ.Path(__file__) - 3 # (tryread/config/settings/base.py - 3 = tryread/) APPS_DIR = ROOT_DIR.path('tryread') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: ...
38.635628
98
0.625799
import environ ROOT_DIR = environ.Path(__file__) - 3 APPS_DIR = ROOT_DIR.path('tryread') env = environ.Env() READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False) if READ_DOT_ENV_FILE: env.read_env(str(ROOT_DIR.path('.env'))) DEBUG = env.bool('DJANGO_DEBUG', False) TIME_ZONE = 'UTC' LANG...
true
true
f730acfe327038eafb73c8469ea9eb060bf5ea02
4,297
py
Python
inference.py
trainOwn/yolov3-Inference
5695469292b82ca54209b99b75115c1aabad0b9e
[ "MIT" ]
null
null
null
inference.py
trainOwn/yolov3-Inference
5695469292b82ca54209b99b75115c1aabad0b9e
[ "MIT" ]
null
null
null
inference.py
trainOwn/yolov3-Inference
5695469292b82ca54209b99b75115c1aabad0b9e
[ "MIT" ]
null
null
null
import numpy as np import argparse import cv2 as cv import subprocess import time import os from support import infer_image, show_image FLAGS = [] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-m', '--model-path', type=str, default='./model/', help='The directory where th...
26.20122
105
0.658366
import numpy as np import argparse import cv2 as cv import subprocess import time import os from support import infer_image, show_image FLAGS = [] if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-m', '--model-path', type=str, default='./model/', help='The directory where th...
true
true
f730ad586dc64abb0dc959278121e0408d62bbe2
1,041
py
Python
src/Python/12_Napisy_anagramy_palindromy/Zad6.py
djeada/Nauka-programowania
b1eb6840c15b830acf552f0a0fc5cc692759152f
[ "MIT" ]
3
2020-09-19T21:38:30.000Z
2022-03-30T11:02:26.000Z
src/Python/12_Napisy_anagramy_palindromy/Zad6.py
djeada/Nauka-programowania
b1eb6840c15b830acf552f0a0fc5cc692759152f
[ "MIT" ]
null
null
null
src/Python/12_Napisy_anagramy_palindromy/Zad6.py
djeada/Nauka-programowania
b1eb6840c15b830acf552f0a0fc5cc692759152f
[ "MIT" ]
1
2022-02-04T09:13:20.000Z
2022-02-04T09:13:20.000Z
""" Sprawdz czy istnieje permutacja danego slowa bedaca palindromem. """ # Wersja 1 def znajdz_permutacje(napis, start, koniec, wynik=[]): if start >= koniec: if "".join(napis) not in wynik: wynik.append("".join(napis)) else: for i in range(start, koniec): napis[start...
20.82
84
0.621518
def znajdz_permutacje(napis, start, koniec, wynik=[]): if start >= koniec: if "".join(napis) not in wynik: wynik.append("".join(napis)) else: for i in range(start, koniec): napis[start], napis[i] = napis[i], napis[start] znajdz_permutacje(napis, start + 1...
true
true
f730adbf9c1f3a579711a5941736814a6d65e98c
7,139
py
Python
Tiny-ImageNet/SSKD/cifar.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
1
2021-08-21T09:19:17.000Z
2021-08-21T09:19:17.000Z
CIFAR/CIFAR_50K/SSKD/cifar.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
null
null
null
CIFAR/CIFAR_50K/SSKD/cifar.py
UBCDingXin/cGAN-KD
c32a4b014fe024222101ff11d63de518448f7f8d
[ "MIT" ]
2
2021-04-15T08:23:49.000Z
2021-09-15T06:52:25.000Z
from __future__ import print_function from PIL import Image import os import os.path import numpy as np import sys import pickle import torch import torch.utils.data as data from itertools import permutations class VisionDataset(data.Dataset): _repr_indent = 4 def __init__(self, root, transforms=None, trans...
32.747706
86
0.595321
from __future__ import print_function from PIL import Image import os import os.path import numpy as np import sys import pickle import torch import torch.utils.data as data from itertools import permutations class VisionDataset(data.Dataset): _repr_indent = 4 def __init__(self, root, transforms=None, trans...
true
true
f730ae6a31dcc419b37475dbdeeafb8f61dff61c
3,593
py
Python
src/diffwave/inference.py
egaebel/diffwave
c5d7d8d90b662f208ecdfba616782559146dc116
[ "Apache-2.0" ]
null
null
null
src/diffwave/inference.py
egaebel/diffwave
c5d7d8d90b662f208ecdfba616782559146dc116
[ "Apache-2.0" ]
null
null
null
src/diffwave/inference.py
egaebel/diffwave
c5d7d8d90b662f208ecdfba616782559146dc116
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 LMNT, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
33.579439
91
0.618981
import numpy as np import os import torch import torchaudio from argparse import ArgumentParser from diffwave.params import AttrDict, params as base_params from diffwave.model import DiffWave models = {} def load_model(model_dir, device): global models if os.path.exists(f"{model_dir}/weights.pt"): ...
true
true
f730ae92f94c6a1c98bcbfd1b9c656dbf9f0d677
576
py
Python
emr_mine_python_scipts/pq_tree/Queue.py
debprakash/emr-view
6b5690c2335482e97b8dabbdec616c8a1d7df898
[ "MIT" ]
null
null
null
emr_mine_python_scipts/pq_tree/Queue.py
debprakash/emr-view
6b5690c2335482e97b8dabbdec616c8a1d7df898
[ "MIT" ]
null
null
null
emr_mine_python_scipts/pq_tree/Queue.py
debprakash/emr-view
6b5690c2335482e97b8dabbdec616c8a1d7df898
[ "MIT" ]
1
2018-10-24T02:54:40.000Z
2018-10-24T02:54:40.000Z
''' Created on Dec 30, 2010 @author: patnaik ''' from collections import deque class Queue(object): def __init__(self, data = None): if data: self.internal_queue = deque(data) else: self.internal_queue = deque() def enqueue(self, value): self...
20.571429
49
0.578125
from collections import deque class Queue(object): def __init__(self, data = None): if data: self.internal_queue = deque(data) else: self.internal_queue = deque() def enqueue(self, value): self.internal_queue.append(value) def deq...
true
true
f730af67a6528163daebb523295431d1e6c54c82
16,885
py
Python
intersight/model/storage_base_host.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/storage_base_host.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/storage_base_host.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
52.601246
1,678
0.640687
import re import sys from intersight.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, ) def lazy_...
true
true
f730af851f20a268b6a0f44fd441c1856d5e489a
8,362
py
Python
transformers/modeling_tf_transfo_xl_utilities.py
wietsedv/transformers
8efc6dd544bf1a30d99d4b5abfc5e214699eab2b
[ "Apache-2.0" ]
4
2020-02-18T22:33:35.000Z
2021-06-24T20:34:50.000Z
transformers/modeling_tf_transfo_xl_utilities.py
eangelica2014/transformers
5e289f69bc564c94132f77c89a34e5f1dd69a592
[ "Apache-2.0" ]
null
null
null
transformers/modeling_tf_transfo_xl_utilities.py
eangelica2014/transformers
5e289f69bc564c94132f77c89a34e5f1dd69a592
[ "Apache-2.0" ]
1
2020-07-01T01:16:11.000Z
2020-07-01T01:16:11.000Z
# coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
47.511364
110
0.527864
from collections import defaultdict import numpy as np import tensorflow as tf from .modeling_tf_utils import shape_list class TFAdaptiveSoftmaxMask(tf.keras.layers.Layer): def __init__(self, vocab_size, d_embed, d_proj, cutoffs, div_val=1, keep_order=False, **kwargs): super(TFAdaptive...
true
true
f730b057549fb7fa3a7ab3af3435630749ad857a
131
py
Python
program1.py
saenzzzup/criptografia-UNAM-2020
05a19e076ea19218753fdc6aa8525e297cbb0b12
[ "MIT" ]
null
null
null
program1.py
saenzzzup/criptografia-UNAM-2020
05a19e076ea19218753fdc6aa8525e297cbb0b12
[ "MIT" ]
null
null
null
program1.py
saenzzzup/criptografia-UNAM-2020
05a19e076ea19218753fdc6aa8525e297cbb0b12
[ "MIT" ]
null
null
null
import fileinput suma = sum(float(num) for num in fileinput.input()) if (suma).is_integer(): print(int(suma)) else: print(suma)
16.375
51
0.709924
import fileinput suma = sum(float(num) for num in fileinput.input()) if (suma).is_integer(): print(int(suma)) else: print(suma)
true
true
f730b0aa8d6d0ccc56c5c91946429f4bb15d48a4
218
py
Python
src/redistool/basic.py
vinthony/racpider
56cea984b69ed4faf0f1c5d264ce38690d4b449e
[ "MIT" ]
4
2015-05-27T04:07:59.000Z
2016-03-08T15:13:35.000Z
src/redistool/basic.py
vinthony/racpider
56cea984b69ed4faf0f1c5d264ce38690d4b449e
[ "MIT" ]
null
null
null
src/redistool/basic.py
vinthony/racpider
56cea984b69ed4faf0f1c5d264ce38690d4b449e
[ "MIT" ]
null
null
null
from redis import Redis from config.getconfig import getconfig def conn(): config = config() rec = getconfig()["redis"] self.conn = Redis(host=rec["host"],port=int(rec["port"]),db=int(rec['db'])) return self.conn
27.25
77
0.697248
from redis import Redis from config.getconfig import getconfig def conn(): config = config() rec = getconfig()["redis"] self.conn = Redis(host=rec["host"],port=int(rec["port"]),db=int(rec['db'])) return self.conn
true
true
f730b168fcf7dec7355c788c5f9285fee330b4ac
325
py
Python
1876.py
romanvelichkin/acm.timus.ru
ff2e946b04fec857be142dca18e1ac3c49b14cf5
[ "Apache-2.0" ]
null
null
null
1876.py
romanvelichkin/acm.timus.ru
ff2e946b04fec857be142dca18e1ac3c49b14cf5
[ "Apache-2.0" ]
null
null
null
1876.py
romanvelichkin/acm.timus.ru
ff2e946b04fec857be142dca18e1ac3c49b14cf5
[ "Apache-2.0" ]
null
null
null
# 1876. Утро сороконожки # solved boots = input().split(' ') left_boots = int(boots[0]) right_boots = int(boots[1]) left_legs = 40 right_legs = 40 result = 0 if right_boots >= left_boots: result = right_boots*2 + left_legs else: result = (right_legs - 1)*2 + left_legs + (left_boots - left_legs)*2 + 1 print(re...
21.666667
76
0.683077
boots = input().split(' ') left_boots = int(boots[0]) right_boots = int(boots[1]) left_legs = 40 right_legs = 40 result = 0 if right_boots >= left_boots: result = right_boots*2 + left_legs else: result = (right_legs - 1)*2 + left_legs + (left_boots - left_legs)*2 + 1 print(result)
true
true
f730b1d1edd280ab8da6c0db314c7a6d740157a1
12,189
py
Python
fastai/callback.py
fish5421/fastai_update
c3dbdfba59512b5004093119f7676f224eb1d15c
[ "Apache-2.0" ]
null
null
null
fastai/callback.py
fish5421/fastai_update
c3dbdfba59512b5004093119f7676f224eb1d15c
[ "Apache-2.0" ]
null
null
null
fastai/callback.py
fish5421/fastai_update
c3dbdfba59512b5004093119f7676f224eb1d15c
[ "Apache-2.0" ]
1
2018-08-26T02:48:51.000Z
2018-08-26T02:48:51.000Z
"Callbacks provides extensibility to the `basic_train` loop. See `train` for examples of custom callbacks." from .data import * from .torch_core import * __all__ = ['Callback', 'CallbackHandler', 'OptimWrapper', 'SmoothenValue', 'Stepper', 'annealing_cos', 'CallbackList', 'annealing_exp', 'annealing_linear'...
42.618881
124
0.644844
from .data import * from .torch_core import * __all__ = ['Callback', 'CallbackHandler', 'OptimWrapper', 'SmoothenValue', 'Stepper', 'annealing_cos', 'CallbackList', 'annealing_exp', 'annealing_linear', 'annealing_no', 'annealing_poly', 'do_annealing_poly'] class OptimWrapper(): def __init__(self, opt:o...
true
true
f730b2ef46405f107ae301a6a6737279f08c4c9d
2,465
py
Python
main.py
wiseleywu/Conference-Central-API
dedb765097c3f0378352c54def575d5ce598cd84
[ "Apache-2.0" ]
null
null
null
main.py
wiseleywu/Conference-Central-API
dedb765097c3f0378352c54def575d5ce598cd84
[ "Apache-2.0" ]
null
null
null
main.py
wiseleywu/Conference-Central-API
dedb765097c3f0378352c54def575d5ce598cd84
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access """ import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from google.appengine.api import memcache from google.appengine.ext ...
33.767123
76
0.636917
import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail from google.appengine.api import memcache from google.appengine.ext import ndb from conference import ConferenceApi from settings import MEMCACHE_SPEAKER_KEY from models import Conference, Session, Speaker __author__...
true
true
f730b4147de5dae0eab5ed3e717e1a146221dfe5
972
py
Python
src/sage/combinat/posets/forest.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/combinat/posets/forest.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/combinat/posets/forest.py
hsm207/sage
020bd59ec28717bfab9af44d2231c53da1ff99f1
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Forest Posets AUTHORS: - Stefan Grosser (06-2020): initial implementation """ # **************************************************************************** # Copyright (C) 2020 Stefan Grosser <stefan.grosser1@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under t...
32.4
78
0.616255
from sage.combinat.posets.posets import FinitePoset from sage.combinat.posets.linear_extensions import LinearExtensionsOfForest class ForestPoset(FinitePoset): _lin_ext_type = LinearExtensionsOfForest _desc = 'Finite forest poset'
true
true
f730b4360fcf30609dec2be0e7dc23ff7f04436d
190
py
Python
torch_inception_resnet_v2/utils/convolution_config.py
mhconradt/inception-resnet-v2
0816e9885eb7034d99a67519efa0642578526a3e
[ "MIT" ]
9
2019-11-28T01:33:43.000Z
2021-09-06T06:51:47.000Z
torch_inception_resnet_v2/utils/convolution_config.py
mhconradt/inception-resnet-v2
0816e9885eb7034d99a67519efa0642578526a3e
[ "MIT" ]
1
2022-02-06T12:03:00.000Z
2022-02-07T02:30:47.000Z
torch_inception_resnet_v2/utils/convolution_config.py
mhconradt/inception-resnet-v2
0816e9885eb7034d99a67519efa0642578526a3e
[ "MIT" ]
4
2019-12-12T05:35:28.000Z
2021-04-30T18:41:41.000Z
from collections import namedtuple ConvolutionConfig = namedtuple('ConvolutionConfig', ['n_filters', 'kernel_size', 'stride', 'padding']) PadConfig = namedtuple('PadConfig', ['padding'])
27.142857
102
0.752632
from collections import namedtuple ConvolutionConfig = namedtuple('ConvolutionConfig', ['n_filters', 'kernel_size', 'stride', 'padding']) PadConfig = namedtuple('PadConfig', ['padding'])
true
true
f730b62321ee0ae029cfec6153d97c708713be29
37,777
py
Python
web2py/gluon/packages/dal/pydal/base.py
aduckworth1969/smc
b1771d9ed68f0e35f46271aab5b1e1fab363e3d9
[ "MIT" ]
1
2018-04-19T05:09:06.000Z
2018-04-19T05:09:06.000Z
web2py/gluon/packages/dal/pydal/base.py
aduckworth1969/smc
b1771d9ed68f0e35f46271aab5b1e1fab363e3d9
[ "MIT" ]
14
2018-03-04T22:56:41.000Z
2020-12-10T19:49:43.000Z
web2py/gluon/packages/dal/pydal/base.py
aduckworth1969/smc
b1771d9ed68f0e35f46271aab5b1e1fab363e3d9
[ "MIT" ]
2
2020-09-18T15:12:26.000Z
2020-11-10T22:09:59.000Z
# -*- coding: utf-8 -*- # pylint: disable=no-member """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: BSD | This file contains the DAL support for many relational databases, including: - SQLite & SpatiaLite - MySQL - Postgres - Firebird...
36.819688
169
0.556953
import glob import logging import socket import threading import time import traceback import urllib from ._compat import ( PY2, pickle, hashlib_md5, pjoin, copyreg, integer_types, with_metaclass, long, unquote, iteritems, ) from ._globals import GLOBAL_LOCKER, THREAD_LOCAL, DE...
true
true
f730b66e7a44d8029420d31e049ca3f917f8e10f
10,128
py
Python
billforward/models/data_synchronization_job_paged_metadata.py
billforward/bf-python
d2b812329ca3ed1fd94364d7f46f69ad74665596
[ "Apache-2.0" ]
2
2016-11-23T17:32:37.000Z
2022-02-24T05:13:20.000Z
billforward/models/data_synchronization_job_paged_metadata.py
billforward/bf-python
d2b812329ca3ed1fd94364d7f46f69ad74665596
[ "Apache-2.0" ]
null
null
null
billforward/models/data_synchronization_job_paged_metadata.py
billforward/bf-python
d2b812329ca3ed1fd94364d7f46f69ad74665596
[ "Apache-2.0" ]
1
2016-12-30T20:02:48.000Z
2016-12-30T20:02:48.000Z
# coding: utf-8 """ BillForward REST API OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git 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...
36.042705
193
0.626086
from pprint import pformat from six import iteritems import re class DataSynchronizationJobPagedMetadata(object): def __init__(self, next_page=None, current_page=None, current_offset=None, records_requested=None, records_returned=None, execution_time=None, results=None): self.swagger_types = { ...
true
true
f730b975efb7291bf0ef3c3242905078b950a0fa
45
py
Python
packages/pyolite-kernel/py/nbformat/nbformat/__init__.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
1,392
2021-03-28T01:11:50.000Z
2022-03-23T21:46:27.000Z
packages/pyolite-kernel/py/nbformat/nbformat/__init__.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
195
2021-03-27T20:38:54.000Z
2021-10-01T12:43:17.000Z
packages/pyolite-kernel/py/nbformat/nbformat/__init__.py
marimeireles/jupyterlite
65c9304cf89d311b8a48f227a0cbb2b7f50cf4bd
[ "BSD-3-Clause" ]
50
2021-04-16T07:08:03.000Z
2022-02-21T05:06:47.000Z
"""A nbformat mock""" __version__ = "4.2.0"
11.25
21
0.6
__version__ = "4.2.0"
true
true
f730ba393656175bda415e196e26904e2b289597
1,606
py
Python
release/xgboost_tests/workloads/train_gpu.py
manishnish138/ray
790dca28cf6972edebc44826c8aa3d62cbee1a5e
[ "Apache-2.0" ]
3
2021-08-29T20:41:21.000Z
2022-01-31T18:47:51.000Z
release/xgboost_tests/workloads/train_gpu.py
QPC-database/amazon-ray
55aa4cac02a412b96252aea4e8c3f177a28324a1
[ "Apache-2.0" ]
59
2021-01-14T14:59:36.000Z
2022-03-25T23:07:05.000Z
release/xgboost_tests/workloads/train_gpu.py
majacQ/ray
bc08c6cdcc7ddf4da751ca2a972defd3db509061
[ "Apache-2.0" ]
null
null
null
"""Training on a GPU cluster. This will train a small dataset on a distributed GPU cluster. Test owner: krfricke Acceptance criteria: Should run through and report final results. Notes: The test will report output such as this: ``` [05:14:49] WARNING: ../src/gbm/gbtree.cc:350: Loading from a raw memory buffer on CP...
25.492063
78
0.663138
import json import os import time import ray from xgboost_ray import RayParams from _train import train_ray if __name__ == "__main__": ray.init(address="auto") ray_params = RayParams( elastic_training=False, max_actor_restarts=2, num_actors=4, cpus_per_actor=4, gpus_p...
true
true
f730bb742a33abcb801bbbb522892e6ea4f4e546
2,152
py
Python
DeepJanus-BNG/self_driving/road_storage.py
zohdit/DeepJanus
c32022bdff2994e91df7af8af64a022d3e7e6a75
[ "MIT" ]
7
2020-10-12T10:46:30.000Z
2021-06-23T10:42:30.000Z
DeepJanus-BNG/self_driving/road_storage.py
zohdit/DeepJanus
c32022bdff2994e91df7af8af64a022d3e7e6a75
[ "MIT" ]
null
null
null
DeepJanus-BNG/self_driving/road_storage.py
zohdit/DeepJanus
c32022bdff2994e91df7af8af64a022d3e7e6a75
[ "MIT" ]
2
2021-04-26T12:46:44.000Z
2021-09-16T08:27:53.000Z
import json import os from typing import Tuple, List, Callable from core.folders import folders class RoadStorage: def __init__(self, path: str = None): if path is None: path='test_driving' self.folder = str(folders.member_seeds.joinpath(path)) os.makedirs(self.folder, exist_...
34.15873
101
0.608271
import json import os from typing import Tuple, List, Callable from core.folders import folders class RoadStorage: def __init__(self, path: str = None): if path is None: path='test_driving' self.folder = str(folders.member_seeds.joinpath(path)) os.makedirs(self.folder, exist_...
true
true
f730bbfbb24db521361e11a81c81fd782b3e533d
10,665
py
Python
inbreast.py
wentaozhu/deep-mil-for-whole-mammogram-classification
8c046bbd77d268499849319cf57254015778549c
[ "MIT" ]
106
2017-03-12T17:26:49.000Z
2022-02-12T01:37:17.000Z
inbreast.py
huhansan666666/deep-mil-for-whole-mammogram-classification
8c046bbd77d268499849319cf57254015778549c
[ "MIT" ]
17
2017-04-11T14:49:34.000Z
2022-03-19T07:57:37.000Z
inbreast.py
huhansan666666/deep-mil-for-whole-mammogram-classification
8c046bbd77d268499849319cf57254015778549c
[ "MIT" ]
41
2017-03-21T09:48:39.000Z
2021-11-29T06:51:16.000Z
#import dicom # some machines not install pydicom import scipy.misc import numpy as np from sklearn.model_selection import StratifiedKFold import cPickle #import matplotlib #import matplotlib.pyplot as plt from skimage.filters import threshold_otsu import os from os.path import join as join import csv impo...
35.909091
112
0.634974
import scipy.misc import numpy as np from sklearn.model_selection import StratifiedKFold import cPickle from skimage.filters import threshold_otsu import os from os.path import join as join import csv import scipy.ndimage import dicom path = '../AllDICOMs/' preprocesspath = '../preprocesspath/' labelfile =...
true
true
f730bcb2483c07c6b27c50e0f64f975de88ddef7
1,707
py
Python
sdks/python/apache_beam/io/__init__.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
2
2019-12-14T04:24:33.000Z
2020-02-21T07:17:40.000Z
sdks/python/apache_beam/io/__init__.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
14
2020-02-12T22:20:41.000Z
2021-11-09T19:41:23.000Z
sdks/python/apache_beam/io/__init__.py
charithe/beam
f085cb500730cf0c67c467ac55f92b3c59f52b39
[ "Apache-2.0" ]
2
2020-06-22T11:17:44.000Z
2020-11-04T04:11:59.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
39.697674
74
0.794376
from __future__ import absolute_import from apache_beam.io.avroio import * from apache_beam.io.filebasedsink import * from apache_beam.io.iobase import Read from apache_beam.io.iobase import Sink from apache_beam.io.iobase import Write from apache_beam.io.iobase import Writer from apache_beam.io.mongodbio import * fr...
true
true
f730bd8c30f682808cde1355d3c15659e66ef93c
582
py
Python
src/tests/spider_test.py
volvet/spider
c374de5ad299423eb47b662e8c2f1d16ead58a9f
[ "MIT" ]
null
null
null
src/tests/spider_test.py
volvet/spider
c374de5ad299423eb47b662e8c2f1d16ead58a9f
[ "MIT" ]
null
null
null
src/tests/spider_test.py
volvet/spider
c374de5ad299423eb47b662e8c2f1d16ead58a9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon May 10 21:23:13 2021 @author: Administrator """ import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../') from utils import SpiderFormat # noqa: E402 from spider_factory import SpiderFactory # noqa: E402 def test_onnxspider(): spider = S...
20.068966
68
0.725086
import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../') from utils import SpiderFormat from spider_factory import SpiderFactory def test_onnxspider(): spider = SpiderFactory.create(SpiderFormat.ONNX) assert spider is not None def test_torchspider(): spider = SpiderFactory....
true
true
f730bdfa184e875f2155e79716a3aed6b404a24c
1,861
py
Python
tests/config.py
armandomeeuwenoord/freight
31ae2fa9252ab0b25385abd04742475e6671e3b1
[ "Apache-2.0" ]
562
2015-02-20T08:25:24.000Z
2021-11-12T19:58:44.000Z
tests/config.py
armandomeeuwenoord/freight
31ae2fa9252ab0b25385abd04742475e6671e3b1
[ "Apache-2.0" ]
129
2015-02-20T07:41:14.000Z
2022-02-17T21:14:40.000Z
tests/config.py
armandomeeuwenoord/freight
31ae2fa9252ab0b25385abd04742475e6671e3b1
[ "Apache-2.0" ]
54
2015-02-28T01:12:23.000Z
2021-03-02T11:14:52.000Z
SQLALCHEMY_DATABASE_URI = "postgresql:///test_freight" LOG_LEVEL = "INFO" WORKSPACE_ROOT = "/tmp/freight-tests" SSH_PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEArvyc+vZVxUjC5ZcFg1VN3jQOCOjO94gwQKFxlz0zOCrCz+Sq\nnWk28YdUpOU016Zinlh4ZZk2136nCKKTMnNMjd6cTTCn5fWomjR+F2CSdaYYpYfO\nNtVnq0SIDUgGmjyPncOGr...
186.1
1,720
0.922085
SQLALCHEMY_DATABASE_URI = "postgresql:///test_freight" LOG_LEVEL = "INFO" WORKSPACE_ROOT = "/tmp/freight-tests" SSH_PRIVATE_KEY = "-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEArvyc+vZVxUjC5ZcFg1VN3jQOCOjO94gwQKFxlz0zOCrCz+Sq\nnWk28YdUpOU016Zinlh4ZZk2136nCKKTMnNMjd6cTTCn5fWomjR+F2CSdaYYpYfO\nNtVnq0SIDUgGmjyPncOGr...
true
true
f730be982c887d5e48842dce53d62d19a740a19a
8,899
py
Python
tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py
mv1388/AIToolbox
c64ac4810a02d230ce471d86b758e82ea232a7e7
[ "MIT" ]
3
2019-10-12T12:24:09.000Z
2020-08-02T02:42:43.000Z
tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py
mv1388/aitoolbox
1060435e6cbdfd19abcb726c4080b663536b7467
[ "MIT" ]
3
2020-04-10T14:07:07.000Z
2020-04-22T19:04:38.000Z
tests_gpu/test_multi_gpu/test_core_pytorch_compare/test_ddp/test_mnist_cnn.py
mv1388/aitoolbox
1060435e6cbdfd19abcb726c4080b663536b7467
[ "MIT" ]
null
null
null
import unittest import os import shutil import random import pickle import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import DataLoader import torch.multiprocessing as mp import torch.dis...
37.23431
118
0.60681
import unittest import os import shutil import random import pickle import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.utils.data import DataLoader import torch.multiprocessing as mp import torch.dis...
true
true
f730bee814b7a46573d0b55a5eaf76c8bd13efe5
1,913
py
Python
2021/day03.py
sree-cfa/adventOfCode
0dffcf2b6668a37505afeedd0869f7ae2b5b93cf
[ "BSD-3-Clause" ]
null
null
null
2021/day03.py
sree-cfa/adventOfCode
0dffcf2b6668a37505afeedd0869f7ae2b5b93cf
[ "BSD-3-Clause" ]
null
null
null
2021/day03.py
sree-cfa/adventOfCode
0dffcf2b6668a37505afeedd0869f7ae2b5b93cf
[ "BSD-3-Clause" ]
null
null
null
from util.inputReader import read_as_strings LENGTH = 12 def part1(list_of_strings): one_count = [0] * LENGTH zero_count = [0] * LENGTH for string in list_of_strings: for i, val in enumerate(string): if val == '0': zero_count[i] += 1 else: ...
27.328571
76
0.543126
from util.inputReader import read_as_strings LENGTH = 12 def part1(list_of_strings): one_count = [0] * LENGTH zero_count = [0] * LENGTH for string in list_of_strings: for i, val in enumerate(string): if val == '0': zero_count[i] += 1 else: ...
true
true
f730bf6ba9f601b648b12146b752965863bf095b
7,902
py
Python
benchmarks/benchmarks/bench_function_base.py
sankalpdayal5/numpy
9713e86cc65ebed96464f4d81bb2637857b84f44
[ "BSD-3-Clause" ]
1
2019-11-15T16:44:36.000Z
2019-11-15T16:44:36.000Z
benchmarks/benchmarks/bench_function_base.py
sankalpdayal5/numpy
9713e86cc65ebed96464f4d81bb2637857b84f44
[ "BSD-3-Clause" ]
null
null
null
benchmarks/benchmarks/bench_function_base.py
sankalpdayal5/numpy
9713e86cc65ebed96464f4d81bb2637857b84f44
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division, print_function from .common import Benchmark import numpy as np class Histogram1D(Benchmark): def setup(self): self.d = np.linspace(0, 100, 100000) def time_full_coverage(self): np.histogram(self.d, 200, (0, 100)) def time_small_coverag...
27.248276
95
0.578208
from __future__ import absolute_import, division, print_function from .common import Benchmark import numpy as np class Histogram1D(Benchmark): def setup(self): self.d = np.linspace(0, 100, 100000) def time_full_coverage(self): np.histogram(self.d, 200, (0, 100)) def time_small_coverag...
true
true
f730c073a0c4b6559a2cfcc7ed69427ce1242339
836
py
Python
tests/test_exception.py
Clayful/clayful-python
ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1
[ "MIT" ]
null
null
null
tests/test_exception.py
Clayful/clayful-python
ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1
[ "MIT" ]
3
2020-04-17T05:24:06.000Z
2022-02-10T09:00:22.000Z
tests/test_exception.py
Clayful/clayful-python
ddd5f1f986fb0079d5128e17f4b0fdce83b4cec1
[ "MIT" ]
null
null
null
import unittest from clayful.exception import ClayfulException class ClayfulExceptionTest(unittest.TestCase): def test_clayful_error_constructor(self): error = ClayfulException( 'Brand', 'get', 400, {}, 'g-no-model', 'my message', {} ) self.assertEqual(error.is_clayful, True) self.asse...
19.44186
47
0.679426
import unittest from clayful.exception import ClayfulException class ClayfulExceptionTest(unittest.TestCase): def test_clayful_error_constructor(self): error = ClayfulException( 'Brand', 'get', 400, {}, 'g-no-model', 'my message', {} ) self.assertEqual(error.is_clayful, True) self.asse...
true
true
f730c0c1c337facbe3bca9654deb29a5694579fe
618
py
Python
models/recommendation/tensorflow/wide_deep_large_ds/inference/__init__.py
yangw1234/models-1
7e7f484f4f22c760f9a5af836f57a3602b4fa7a6
[ "Apache-2.0" ]
357
2019-01-23T23:54:30.000Z
2022-03-31T05:32:25.000Z
models/recommendation/tensorflow/wide_deep_large_ds/inference/__init__.py
yangw1234/models-1
7e7f484f4f22c760f9a5af836f57a3602b4fa7a6
[ "Apache-2.0" ]
65
2019-02-06T15:35:35.000Z
2022-03-25T09:56:48.000Z
models/recommendation/tensorflow/wide_deep_large_ds/inference/__init__.py
yangw1234/models-1
7e7f484f4f22c760f9a5af836f57a3602b4fa7a6
[ "Apache-2.0" ]
164
2019-02-06T15:05:57.000Z
2022-03-31T11:48:14.000Z
# # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
29.428571
74
0.737864
true
true
f730c12f66e371e778dfd8bfc1d9044399d1afe0
74,951
py
Python
src/azure-cli/azure/cli/command_modules/acs/decorator.py
charliedmcb/azure-cli
6bc9519c91e3c241d476d1351b6e9b7543190f47
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/acs/decorator.py
charliedmcb/azure-cli
6bc9519c91e3c241d476d1351b6e9b7543190f47
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/acs/decorator.py
charliedmcb/azure-cli
6bc9519c91e3c241d476d1351b6e9b7543190f47
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
42.878146
119
0.649611
from knack.prompting import NoTTYException, prompt, prompt_pass from knack.log import get_logger from typing import Any, List, Dict, Tuple, Union from azure.cli.core import AzCommandsLoader from azure.cli.core.azclierror import ( CLIInternalError, MutuallyExclusiveArgumentError, RequiredArgumentMissingErr...
true
true
f730c134a28f77e3c847ee825ab9c72a1458d0e4
3,102
py
Python
src/stk/molecular/topology_graphs/topology_graph/optimizers/collapser.py
andrewtarzia/stk
1ac2ecbb5c9940fe49ce04cbf5603fd7538c475a
[ "MIT" ]
21
2018-04-12T16:25:24.000Z
2022-02-14T23:05:43.000Z
src/stk/molecular/topology_graphs/topology_graph/optimizers/collapser.py
JelfsMaterialsGroup/stk
0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2
[ "MIT" ]
8
2019-03-19T12:36:36.000Z
2020-11-11T12:46:00.000Z
src/stk/molecular/topology_graphs/topology_graph/optimizers/collapser.py
supramolecular-toolkit/stk
0d3e1b0207aa6fa4d4d5ee8dfe3a29561abb08a2
[ "MIT" ]
5
2018-08-07T13:00:16.000Z
2021-11-01T00:55:10.000Z
""" Collapser ========= """ from .optimizer import Optimizer from .utilities import get_mch_bonds, get_long_bond_ids, get_subunits import mchammer as mch class Collapser(Optimizer): """ Performs rigid-body collapse of molecules [1]_. Examples -------- *Structure Optimization* Using :class...
28.722222
69
0.604449
from .optimizer import Optimizer from .utilities import get_mch_bonds, get_long_bond_ids, get_subunits import mchammer as mch class Collapser(Optimizer): def __init__( self, step_size=0.1, distance_threshold=1.5, scale_steps=True, ): self._optimizer = mch.Collapser(...
true
true
f730c1eb989c9c84f7652a96a8ab7e841c0ef149
339
py
Python
BERKE/OPENCV/OpenCv4cam.py
vektorelpython24proje/temelbilgiler
bced2723d247dbb8b10cf86e25ee209635f82921
[ "MIT" ]
null
null
null
BERKE/OPENCV/OpenCv4cam.py
vektorelpython24proje/temelbilgiler
bced2723d247dbb8b10cf86e25ee209635f82921
[ "MIT" ]
null
null
null
BERKE/OPENCV/OpenCv4cam.py
vektorelpython24proje/temelbilgiler
bced2723d247dbb8b10cf86e25ee209635f82921
[ "MIT" ]
3
2020-10-24T14:36:14.000Z
2020-10-24T14:41:13.000Z
import cv2 # frame per second cap = cv2.VideoCapture(0,cv2.CAP_DSHOW) while True: ret,frame = cap.read() frame[200:250,200:250] = frame[100:150,100:150] frame[100:150,100:150] = [255,255,255] cv2.imshow("ilkresim",frame) if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2....
18.833333
51
0.637168
import cv2 cap = cv2.VideoCapture(0,cv2.CAP_DSHOW) while True: ret,frame = cap.read() frame[200:250,200:250] = frame[100:150,100:150] frame[100:150,100:150] = [255,255,255] cv2.imshow("ilkresim",frame) if cv2.waitKey(1) & 0xFF == ord("q"): break cap.release() cv2.destroyAllWindows()
true
true
f730c2199ac56dcd1e8d9c7c1237e1e4ccc3fe0f
6,446
py
Python
faker/providers/lorem/ru_RU/__init__.py
bdclauser/Faker
b676668214f5f4cf2849eea16d50c835ffba5be9
[ "MIT" ]
1
2021-01-21T03:44:59.000Z
2021-01-21T03:44:59.000Z
faker/providers/lorem/ru_RU/__init__.py
bdclauser/Faker
b676668214f5f4cf2849eea16d50c835ffba5be9
[ "MIT" ]
null
null
null
faker/providers/lorem/ru_RU/__init__.py
bdclauser/Faker
b676668214f5f4cf2849eea16d50c835ffba5be9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import Provider as LoremProvider class Provider(LoremProvider): word_list = ( 'войти', 'монета', 'вскинуть', 'желание', 'экзамен', 'налоговый', 'вытаскивать', 'приятель', 'вздрагивать', 'куча', 'порт', 'точно', 'заплак...
70.835165
80
0.579429
from __future__ import unicode_literals from .. import Provider as LoremProvider class Provider(LoremProvider): word_list = ( 'войти', 'монета', 'вскинуть', 'желание', 'экзамен', 'налоговый', 'вытаскивать', 'приятель', 'вздрагивать', 'куча', 'порт', 'точно', 'заплакать', 'изба', 'правление...
true
true
f730c23f0da51300b98e1b1ee705c0aa5cefff70
1,034
py
Python
tiki/tiki/spiders/tiki.py
Necrophote/telecrawl
8512e0ae9f6b44bb64cba29a13c382024f265ca5
[ "MIT" ]
null
null
null
tiki/tiki/spiders/tiki.py
Necrophote/telecrawl
8512e0ae9f6b44bb64cba29a13c382024f265ca5
[ "MIT" ]
null
null
null
tiki/tiki/spiders/tiki.py
Necrophote/telecrawl
8512e0ae9f6b44bb64cba29a13c382024f265ca5
[ "MIT" ]
null
null
null
import scrapy from scrapy.loader import ItemLoader from tiki.items import TiviItem class TikiSpider(scrapy.Spider): # crawl from tiki name = "tiki" allowed_domains = ["tiki.vn"] start_urls = {"https://tiki.vn/tivi/c5015"} def parse(self, response): tks = response.css('div.product-item') for tk in tks: l...
27.210526
53
0.679884
import scrapy from scrapy.loader import ItemLoader from tiki.items import TiviItem class TikiSpider(scrapy.Spider): name = "tiki" allowed_domains = ["tiki.vn"] start_urls = {"https://tiki.vn/tivi/c5015"} def parse(self, response): tks = response.css('div.product-item') for tk in tks: loader = ItemLoader...
true
true
f730c43933f5c965f1163cbe92ea2e00c357ef48
115
py
Python
glance/contrib/plugins/artifacts_sample/__init__.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
3
2015-12-22T09:04:44.000Z
2017-10-18T15:26:03.000Z
glance/contrib/plugins/artifacts_sample/__init__.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
glance/contrib/plugins/artifacts_sample/__init__.py
wkoathp/glance
eb0c47047ddc28371f546437118986ed904f41d3
[ "Apache-2.0" ]
null
null
null
from v1 import artifact as art1 from v2 import artifact as art2 MY_ARTIFACT = [art1.MyArtifact, art2.MyArtifact]
19.166667
48
0.791304
from v1 import artifact as art1 from v2 import artifact as art2 MY_ARTIFACT = [art1.MyArtifact, art2.MyArtifact]
true
true
f730c5d7592773f3e022c3b161473f2b1d4a7b40
9,591
py
Python
v6.0.6/system/fortios_system_arp_table.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
14
2018-09-25T20:35:25.000Z
2021-07-14T04:30:54.000Z
v6.0.6/system/fortios_system_arp_table.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
32
2018-10-09T04:13:42.000Z
2020-05-11T07:20:28.000Z
v6.0.6/system/fortios_system_arp_table.py
fortinet-solutions-cse/ansible_fgt_modules
c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719
[ "Apache-2.0" ]
11
2018-10-09T00:14:53.000Z
2021-11-03T10:54:09.000Z
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
29.151976
97
0.607966
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_system_arp_table short_description: Configure ARP ...
true
true
f730c69d6e5ae3c5d5a6129b26bdaf4232dd5224
161
py
Python
coffee_small.py
meik99/CoffeeMakerApp
aa6a3785812f41138f66e58c195ed021ef2d4cc3
[ "CC0-1.0" ]
null
null
null
coffee_small.py
meik99/CoffeeMakerApp
aa6a3785812f41138f66e58c195ed021ef2d4cc3
[ "CC0-1.0" ]
null
null
null
coffee_small.py
meik99/CoffeeMakerApp
aa6a3785812f41138f66e58c195ed021ef2d4cc3
[ "CC0-1.0" ]
null
null
null
import time import RPi.GPIO as IO PIN = 4 IO.setmode(IO.BCM) IO.setup(PIN, IO.OUT) IO.output(PIN, IO.HIGH) time.sleep(15) IO.output(PIN, IO.LOW) IO.cleanup()
12.384615
23
0.701863
import time import RPi.GPIO as IO PIN = 4 IO.setmode(IO.BCM) IO.setup(PIN, IO.OUT) IO.output(PIN, IO.HIGH) time.sleep(15) IO.output(PIN, IO.LOW) IO.cleanup()
true
true
f730c70d8ffa1539142454cd5cf5157d8a5a5d00
226
py
Python
historia/utils/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
6
2016-04-26T18:39:36.000Z
2021-09-01T09:13:38.000Z
historia/utils/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
null
null
null
historia/utils/__init__.py
eranimo/historia
5e0b047d4bcdd534f48f8b9bf19d425b0b31a3fd
[ "MIT" ]
4
2016-04-10T23:47:23.000Z
2021-08-15T11:40:28.000Z
from historia.utils.id import unique_id from historia.utils.color import random_country_colors from historia.utils.store import Store from historia.utils.timer import Timer from historia.utils.trading import position_in_range
37.666667
54
0.867257
from historia.utils.id import unique_id from historia.utils.color import random_country_colors from historia.utils.store import Store from historia.utils.timer import Timer from historia.utils.trading import position_in_range
true
true
f730c75227bfe93ee337638f1e0109a02d1051eb
5,810
py
Python
examples/python/01-list-properties.py
lkucalaba/tiscamera
e1fa7b21bb4dd777ae8039dfa072cfa2daa88244
[ "Apache-2.0" ]
241
2015-02-20T09:10:41.000Z
2022-03-18T08:53:26.000Z
examples/python/01-list-properties.py
lkucalaba/tiscamera
e1fa7b21bb4dd777ae8039dfa072cfa2daa88244
[ "Apache-2.0" ]
435
2015-01-19T10:18:01.000Z
2022-03-28T08:03:08.000Z
examples/python/01-list-properties.py
lkucalaba/tiscamera
e1fa7b21bb4dd777ae8039dfa072cfa2daa88244
[ "Apache-2.0" ]
141
2015-01-03T17:54:08.000Z
2022-02-09T09:55:15.000Z
#!/usr/bin/env python3 # Copyright 2017 The Imaging Source Europe GmbH # # 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 a...
39.52381
111
0.492083
import sys import gi gi.require_version("Tcam", "0.1") gi.require_version("Gst", "1.0") from gi.repository import Tcam, Gst def list_properties(camera): property_names = camera.get_tcam_property_names() for name in property_names: (ret, value, min_value, max_value, default_va...
true
true
f730c798c4b285ab0b5e4e74ccc09a60d81e0f7c
999
py
Python
xknx/io/__init__.py
Trance-Paradox/xknx
d5603361080f96aafd19c14d17fb1ff391064b3f
[ "MIT" ]
null
null
null
xknx/io/__init__.py
Trance-Paradox/xknx
d5603361080f96aafd19c14d17fb1ff391064b3f
[ "MIT" ]
null
null
null
xknx/io/__init__.py
Trance-Paradox/xknx
d5603361080f96aafd19c14d17fb1ff391064b3f
[ "MIT" ]
null
null
null
""" This package contains all objects managing Tunneling and Routing Connections.. - KNXIPInterface is the overall managing class. - GatewayScanner searches for available KNX/IP devices in the local network. - Routing uses UDP/Multicast to communicate with KNX/IP device. - Tunnel uses UDP packets and builds a static t...
32.225806
81
0.778779
from .connection import ConnectionConfig, ConnectionType from .const import DEFAULT_MCAST_GRP, DEFAULT_MCAST_PORT from .gateway_scanner import GatewayDescriptor, GatewayScanFilter, GatewayScanner from .knxip_interface import KNXIPInterface, knx_interface_factory from .routing import Routing from .self_description impor...
true
true
f730c7e66e7b5401646dde6b3811d9692fd237b4
19,430
py
Python
aiida/common/utils.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
180
2019-07-12T07:45:26.000Z
2022-03-22T13:16:57.000Z
aiida/common/utils.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
2,325
2019-07-04T13:41:44.000Z
2022-03-31T12:17:10.000Z
aiida/common/utils.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
88
2019-07-06T01:42:39.000Z
2022-03-18T14:20:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
31.491086
119
0.616212
from datetime import datetime import filecmp import inspect import io import os import re import sys from typing import Any, Dict from uuid import UUID from .lang import classproperty def get_new_uuid(): import uuid return str(uuid.uuid4()) def validate_uuid(given_uuid: str) -> bool: try: parse...
true
true
f730c80708b6ee28cd92b114db169a45bb83104e
119
py
Python
upload/urls.py
caggri/FOFviz
776ab387d832a86eea1a1b9064040d9b012494a7
[ "MIT" ]
2
2020-05-24T22:28:53.000Z
2020-05-25T21:58:24.000Z
upload/urls.py
caggri/FOFviz
776ab387d832a86eea1a1b9064040d9b012494a7
[ "MIT" ]
null
null
null
upload/urls.py
caggri/FOFviz
776ab387d832a86eea1a1b9064040d9b012494a7
[ "MIT" ]
1
2021-10-16T12:26:29.000Z
2021-10-16T12:26:29.000Z
from django.urls import path from . import views urlpatterns = [ path('', views.upload_page, name='upload_page') ]
19.833333
51
0.714286
from django.urls import path from . import views urlpatterns = [ path('', views.upload_page, name='upload_page') ]
true
true
f730c8765556ac16d2af1dc5795cdc3cd2145c3c
1,321
py
Python
test/test_settings_mapping_extended.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_settings_mapping_extended.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
test/test_settings_mapping_extended.py
Atomicology/isilon_sdk_python
91039da803ae37ed4abf8d2a3f59c333f3ef1866
[ "MIT" ]
null
null
null
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable l...
26.959184
89
0.74489
from __future__ import absolute_import import os import sys import unittest import swagger_client from swagger_client.rest import ApiException from swagger_client.models.settings_mapping_extended import SettingsMappingExtended class TestSettingsMappingExtended(unittest.TestCase): def setUp(self): pas...
true
true
f730c98fb8903a540d71dd9033f8551f5e81af7c
1,316
py
Python
garden_scorer/src/tracing.py
emilybache/BeeFriendly
7582d8f7140f2d0088404d9cb1d47b6231606c49
[ "MIT" ]
4
2020-06-14T13:42:39.000Z
2022-01-29T14:36:53.000Z
garden_scorer/src/tracing.py
emilybache/BeeFriendly
7582d8f7140f2d0088404d9cb1d47b6231606c49
[ "MIT" ]
2
2022-02-13T15:19:44.000Z
2022-02-25T12:32:16.000Z
garden_scorer/src/tracing.py
emilybache/BeeFriendly
7582d8f7140f2d0088404d9cb1d47b6231606c49
[ "MIT" ]
4
2020-06-11T09:31:45.000Z
2021-08-17T14:00:41.000Z
import logging import opentracing from jaeger_client import Config def init_tracer(service): logging.getLogger('').handlers = [] logging.basicConfig(format='%(message)s', level=logging.DEBUG) config = Config( config={ 'sampler': { 'type': 'const', 'para...
26.857143
71
0.617781
import logging import opentracing from jaeger_client import Config def init_tracer(service): logging.getLogger('').handlers = [] logging.basicConfig(format='%(message)s', level=logging.DEBUG) config = Config( config={ 'sampler': { 'type': 'const', 'para...
true
true
f730c9ef609a4b060b7dbaf45e19609d9f71c5b5
2,359
py
Python
nei/physics/shocks.py
EigenDev/NEI-Research
5d6f110426f57668156665a69fcf9c83575ccdb8
[ "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
3
2018-02-09T00:19:06.000Z
2019-03-11T12:32:25.000Z
nei/physics/shocks.py
EigenDev/NEI-Research
5d6f110426f57668156665a69fcf9c83575ccdb8
[ "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
34
2018-02-07T19:15:27.000Z
2018-08-09T19:01:40.000Z
nei/physics/shocks.py
EigenDev/NEI-Research
5d6f110426f57668156665a69fcf9c83575ccdb8
[ "BSD-2-Clause-Patent", "BSD-2-Clause", "BSD-3-Clause" ]
3
2018-02-07T19:19:27.000Z
2018-06-04T19:49:44.000Z
""" Shocks is a module that consists of canonical hydrodynamical equations used for modeling astrophysical plasmas Classes: Shocks -- A class that emcompasses a multitude of hydrodynamical shock equations relevant for plasma calculations. Functions: rh_density -- Returns the density jump relation deri...
27.430233
84
0.576939
class MHD: def __init__(self): pass def rh_density(self, init_dens, gamma, mach): dens_ratio = ((gamma+1)*mach**2)/(2+(gamma-1)*mach**2) final_dens = dens_ratio*init_dens return final_dens def rh_temp(self, init_temp, gamma, mach): temp_ratio = ( ( ( (gamma...
true
true
f730ca0f79f5f46c3e0c9a27ff65e95253be08cd
2,053
py
Python
smsgateway/south_migrations/0001_initial.py
vikingco/django-smsgateway
91675e599a147f4d7e64ff4c4455dbf75ed753d3
[ "BSD-3-Clause" ]
13
2015-03-11T06:55:50.000Z
2022-02-08T16:50:16.000Z
smsgateway/south_migrations/0001_initial.py
vikingco/django-smsgateway
91675e599a147f4d7e64ff4c4455dbf75ed753d3
[ "BSD-3-Clause" ]
17
2015-03-19T12:27:41.000Z
2019-12-09T14:21:21.000Z
smsgateway/south_migrations/0001_initial.py
vikingco/django-smsgateway
91675e599a147f4d7e64ff4c4455dbf75ed753d3
[ "BSD-3-Clause" ]
7
2015-05-15T00:14:49.000Z
2019-06-27T02:46:09.000Z
from __future__ import absolute_import from south.db import db from django.db import models from smsgateway.models import * class Migration: def forwards(self, orm): # Adding model 'SMS' db.create_table('smsgateway_sms', ( ('id', orm['smsgateway.SMS:id']), ('s...
40.254902
131
0.543595
from __future__ import absolute_import from south.db import db from django.db import models from smsgateway.models import * class Migration: def forwards(self, orm): db.create_table('smsgateway_sms', ( ('id', orm['smsgateway.SMS:id']), ('sent', orm['smsgateway...
true
true
f730ca8c7c983ea347a4f2157407b637efc8c630
1,495
py
Python
scripts/archive_gs.py
wsjeon/softlearning
8ceba916e5b3b2df66a1aa51bed3ff703e394a56
[ "MIT" ]
1
2019-04-02T03:07:03.000Z
2019-04-02T03:07:03.000Z
scripts/archive_gs.py
wsjeon/softlearning
8ceba916e5b3b2df66a1aa51bed3ff703e394a56
[ "MIT" ]
11
2020-01-28T22:32:20.000Z
2022-03-11T23:37:57.000Z
scripts/archive_gs.py
wsjeon/softlearning
8ceba916e5b3b2df66a1aa51bed3ff703e394a56
[ "MIT" ]
1
2019-12-27T19:00:57.000Z
2019-12-27T19:00:57.000Z
#!/usr/bin/python import argparse import os import subprocess def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( 'archive_path', type=str, default=None, nargs='?') parser.add_argument( '--dry', action='store_true', default=False) args = parser.parse_args() ...
24.508197
78
0.660201
import argparse import os import subprocess def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( 'archive_path', type=str, default=None, nargs='?') parser.add_argument( '--dry', action='store_true', default=False) args = parser.parse_args() return args def...
true
true
f730cc80fc1c397a68a520a6bdf3278598eb7a4b
1,100
py
Python
opennem/spiders/nem/price.py
tourdownunder/opennem
deec3e2079db9d9d84171010fd0c239170d1e7ce
[ "MIT" ]
null
null
null
opennem/spiders/nem/price.py
tourdownunder/opennem
deec3e2079db9d9d84171010fd0c239170d1e7ce
[ "MIT" ]
1
2020-09-06T04:17:59.000Z
2020-09-06T04:17:59.000Z
opennem/spiders/nem/price.py
tourdownunder/opennem
deec3e2079db9d9d84171010fd0c239170d1e7ce
[ "MIT" ]
null
null
null
from opennem.pipelines.nem.opennem import NemwebUnitScadaOpenNEMStorePipeline from opennem.spiders.nemweb import NemwebSpider class NemwebLatestPriceSpider(NemwebSpider): name = "au.nem.latest.price" start_url = ( "http://www.nemweb.com.au/Reports/CURRENT/Dispatchprices_PRE_AP/" ) limit = 1 ...
27.5
77
0.710909
from opennem.pipelines.nem.opennem import NemwebUnitScadaOpenNEMStorePipeline from opennem.spiders.nemweb import NemwebSpider class NemwebLatestPriceSpider(NemwebSpider): name = "au.nem.latest.price" start_url = ( "http://www.nemweb.com.au/Reports/CURRENT/Dispatchprices_PRE_AP/" ) limit = 1 ...
true
true
f730cd205556860fc0fce04a73efaf2df2cf84e7
11,087
py
Python
h1st/tests/core/test_schemas_validator.py
Mou-Ikkai/h1st
da47a8f1ad6af532c549e075fba19e3b3692de89
[ "Apache-2.0" ]
2
2020-08-21T07:49:08.000Z
2020-08-21T07:49:13.000Z
h1st/tests/core/test_schemas_validator.py
Mou-Ikkai/h1st
da47a8f1ad6af532c549e075fba19e3b3692de89
[ "Apache-2.0" ]
3
2020-11-13T19:06:07.000Z
2022-02-10T02:06:03.000Z
h1st/tests/core/test_schemas_validator.py
Mou-Ikkai/h1st
da47a8f1ad6af532c549e075fba19e3b3692de89
[ "Apache-2.0" ]
null
null
null
from typing import Union, Optional, List from unittest import TestCase import pyarrow as pa import pandas as pd import numpy as np from h1st.schema.schema_validator import SchemaValidator dummy = lambda: None class SchemaTestCase(TestCase): def test_validate_schema(self): # empty schema self.ass...
32.89911
105
0.495355
from typing import Union, Optional, List from unittest import TestCase import pyarrow as pa import pandas as pd import numpy as np from h1st.schema.schema_validator import SchemaValidator dummy = lambda: None class SchemaTestCase(TestCase): def test_validate_schema(self): self.assertTrue(SchemaV...
true
true
f730cdbd78f4b2942915fd52265954f7c4985bfb
20,098
py
Python
synapse/app/generic_worker.py
jklippel/synapse
451f25172afc0ce46e416c73fa703c5edf279d54
[ "Apache-2.0" ]
null
null
null
synapse/app/generic_worker.py
jklippel/synapse
451f25172afc0ce46e416c73fa703c5edf279d54
[ "Apache-2.0" ]
null
null
null
synapse/app/generic_worker.py
jklippel/synapse
451f25172afc0ce46e416c73fa703c5edf279d54
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 OpenMarket Ltd # Copyright 2020 The Matrix.org Foundation C.I.C. # # 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/...
41.524793
90
0.661359
import logging import sys from typing import Dict, Optional from twisted.internet import address from twisted.web.resource import IResource from twisted.web.server import Request import synapse import synapse.events from synapse.api.errors import HttpResponseException, RequestSendFailed, SynapseError from synapse.api...
true
true
f730cf032970e255c2e4811c7121b858b9e1fb44
35,119
py
Python
mrcnn/utils.py
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation
49d8a07d600c538e3b706a531af4029823b70236
[ "MIT" ]
null
null
null
mrcnn/utils.py
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation
49d8a07d600c538e3b706a531af4029823b70236
[ "MIT" ]
null
null
null
mrcnn/utils.py
mohamedelbeih/Hairloss-Areas-Semantic-Segmentation
49d8a07d600c538e3b706a531af4029823b70236
[ "MIT" ]
1
2021-04-22T01:39:25.000Z
2021-04-22T01:39:25.000Z
""" Mask R-CNN Common utility functions and classes. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla """ import sys import os import logging import math import random import numpy as np import tensorflow as tf import scipy import sk...
39.953356
105
0.599248
import sys import os import logging import math import random import numpy as np import tensorflow as tf import scipy import skimage.color import skimage.io import skimage.transform import urllib.request import shutil import warnings from distutils.version import LooseVersion COCO_MODEL_URL = "https:...
true
true
f730cf4ecdd22af444f24b4e7185bfbd91d7f33c
1,937
py
Python
PyUE4Builder/actions/copy.py
rfsheffer/PyUE4Builder
2b2a978431ba5426238a03ecaae5a73836a0598c
[ "MIT" ]
12
2018-04-15T01:46:01.000Z
2022-01-06T01:34:34.000Z
PyUE4Builder/actions/copy.py
rfsheffer/PyUE4Builder
2b2a978431ba5426238a03ecaae5a73836a0598c
[ "MIT" ]
null
null
null
PyUE4Builder/actions/copy.py
rfsheffer/PyUE4Builder
2b2a978431ba5426238a03ecaae5a73836a0598c
[ "MIT" ]
2
2017-12-04T18:30:12.000Z
2018-04-15T01:46:02.000Z
#!/usr/bin/env python from actions.action import Action import os import contextlib import re import shutil __author__ = "Ryan Sheffer" __copyright__ = "Copyright 2020, Sheffer Online Services" __credits__ = ["Ryan Sheffer", "VREAL"] class Copy(Action): """ Copy Action An action designed to copy file/s ...
34.589286
112
0.621064
from actions.action import Action import os import contextlib import re import shutil __author__ = "Ryan Sheffer" __copyright__ = "Copyright 2020, Sheffer Online Services" __credits__ = ["Ryan Sheffer", "VREAL"] class Copy(Action): def __init__(self, config, **kwargs): super().__init__(config, **kwargs)...
true
true
f730cf881812347d409f1942f37890aa47f0c756
493
py
Python
objectModel/Python/cdm/enums/__init__.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/cdm/enums/__init__.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
3
2021-05-11T23:57:12.000Z
2021-08-04T05:03:05.000Z
objectModel/Python/cdm/enums/__init__.py
aaron-emde/CDM
9472e9c7694821ac4a9bbe608557d2e65aabc73e
[ "CC-BY-4.0", "MIT" ]
null
null
null
from .cdm_attribute_context_type import CdmAttributeContextType from .cdm_data_format import CdmDataFormat from .cdm_object_type import CdmObjectType from .cdm_relationship_discovery_style import CdmRelationshipDiscoveryStyle from .cdm_status_level import CdmStatusLevel from .cdm_validation_step import CdmValidationSte...
30.8125
75
0.827586
from .cdm_attribute_context_type import CdmAttributeContextType from .cdm_data_format import CdmDataFormat from .cdm_object_type import CdmObjectType from .cdm_relationship_discovery_style import CdmRelationshipDiscoveryStyle from .cdm_status_level import CdmStatusLevel from .cdm_validation_step import CdmValidationSte...
true
true
f730cf98d59bd05918ee808444ad2fd2d6821f0d
577
py
Python
app/user/migrations/0026_auto_20170819_0854.py
Sovol2018/sovolo
54250e42b4af3391d2f99690f45b93ab240563c2
[ "MIT" ]
2
2017-06-06T11:34:49.000Z
2017-10-24T13:09:50.000Z
app/user/migrations/0026_auto_20170819_0854.py
Sovol2018/sovolo
54250e42b4af3391d2f99690f45b93ab240563c2
[ "MIT" ]
346
2016-08-09T20:50:57.000Z
2018-08-28T06:52:17.000Z
app/user/migrations/0026_auto_20170819_0854.py
hejob/sovolo
8b73253d7bf0427c7ae0ebb6d8e3d70e118e8427
[ "MIT" ]
3
2017-11-27T14:07:57.000Z
2018-08-13T15:51:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-18 23:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0025_remove_user_user_todo'), ] operations = [ migrations.RenameField( ...
22.192308
48
0.580589
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user', '0025_remove_user_user_todo'), ] operations = [ migrations.RenameField( model_name='skill', old_name='user_todo', ...
true
true
f730cfc2579f214ca1f28d1781de2677a358113d
2,377
py
Python
queue_util/serializers.py
EDITD/queue_util
383267388bcfeb1c8bc0cf749f28d5073b067c1b
[ "MIT" ]
null
null
null
queue_util/serializers.py
EDITD/queue_util
383267388bcfeb1c8bc0cf749f28d5073b067c1b
[ "MIT" ]
21
2015-11-20T14:37:38.000Z
2020-10-05T11:09:22.000Z
queue_util/serializers.py
EDITD/queue_util
383267388bcfeb1c8bc0cf749f28d5073b067c1b
[ "MIT" ]
null
null
null
# kombu v4 will come out with the following commit in: # https://github.com/celery/kombu/commit/010aae8ccf16ad2fa5a9c3d6f3b84b21e1c1677a # which does the same thing, but this also allows us to not have to enable # insecure serializers from datetime import datetime import msgpack import six from kombu.serialization im...
27.964706
94
0.671435
from datetime import datetime import msgpack import six from kombu.serialization import register DATE_FORMAT = '%Y%m%dT%H:%M:%S.%f' MESSAGE_CONTENT_TYPE = 'application/x-unicode-msgpack-with-dates' MESSAGE_CONTENT_ENCODING = 'binary' def decode_datetime(obj): if b'__datetime__' in obj: obj = d...
true
true
f730cffb583fb3b775af4106c24d4268b0e55606
3,050
py
Python
scripts/logs_analyzer.py
onzehub/onzecurrency
08f82126be349a639a6421463a3d9038761b661f
[ "MIT" ]
null
null
null
scripts/logs_analyzer.py
onzehub/onzecurrency
08f82126be349a639a6421463a3d9038761b661f
[ "MIT" ]
null
null
null
scripts/logs_analyzer.py
onzehub/onzecurrency
08f82126be349a639a6421463a3d9038761b661f
[ "MIT" ]
null
null
null
# Follow every step every server's log has gone through # Formulate a conclusion # Also count blocks # a search function, a 1 file assembler of all log files import os, glob, sys import argparse from datetime import datetime def main(): # Initialize parser parser = argparse.ArgumentParser() # Addi...
32.105263
107
0.612131
# Formulate a conclusion # Also count blocks # a search function, a 1 file assembler of all log files import os, glob, sys import argparse from datetime import datetime def main(): # Initialize parser parser = argparse.ArgumentParser() # Adding optional arguments parser.add_argument("-a", "--a...
true
true
f730d0ca0994a465860202a1c7adb5a31237673d
894
py
Python
sentry_sdk/integrations/argv.py
Siecje/sentry-python
d8405491c60c5b7c3d2ec3ed97ab4bea104f4e51
[ "BSD-2-Clause" ]
1
2020-11-02T11:31:01.000Z
2020-11-02T11:31:01.000Z
sentry_sdk/integrations/argv.py
Siecje/sentry-python
d8405491c60c5b7c3d2ec3ed97ab4bea104f4e51
[ "BSD-2-Clause" ]
null
null
null
sentry_sdk/integrations/argv.py
Siecje/sentry-python
d8405491c60c5b7c3d2ec3ed97ab4bea104f4e51
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import import sys from sentry_sdk.hub import Hub from sentry_sdk.integrations import Integration from sentry_sdk.scope import add_global_event_processor if False: from typing import Any from typing import Dict class ArgvIntegration(Integration): identifier = "argv" ...
28.83871
73
0.624161
from __future__ import absolute_import import sys from sentry_sdk.hub import Hub from sentry_sdk.integrations import Integration from sentry_sdk.scope import add_global_event_processor if False: from typing import Any from typing import Dict class ArgvIntegration(Integration): identifier = "argv" ...
true
true
f730d1918786544a8b85c5af03acfaf23f6d5b25
13,005
py
Python
packit/specfile.py
FilipSchad/packit
d57da48c649ed9e0212b6a7ca5fc6428c217bc71
[ "MIT" ]
23
2020-09-03T01:21:57.000Z
2022-03-16T17:06:28.000Z
packit/specfile.py
FilipSchad/packit
d57da48c649ed9e0212b6a7ca5fc6428c217bc71
[ "MIT" ]
642
2020-08-03T06:52:35.000Z
2022-03-31T19:35:38.000Z
packit/specfile.py
FilipSchad/packit
d57da48c649ed9e0212b6a7ca5fc6428c217bc71
[ "MIT" ]
19
2020-08-13T09:55:42.000Z
2022-01-19T20:53:53.000Z
# Copyright Contributors to the Packit project. # SPDX-License-Identifier: MIT import inspect import re from logging import getLogger from pathlib import Path from typing import Union, List, Optional, Dict from packit.patches import PatchMetadata from rebasehelper.helpers.macro_helper import MacroHelper from rebasehe...
38.026316
128
0.596463
import inspect import re from logging import getLogger from pathlib import Path from typing import Union, List, Optional, Dict from packit.patches import PatchMetadata from rebasehelper.helpers.macro_helper import MacroHelper from rebasehelper.specfile import SpecFile, RebaseHelperError, saves, PatchObject from rebas...
true
true
f730d1cc76d0f5de69d6d7933ece019dfff3c3cf
598
py
Python
setup.py
guate/division-politica
98ecd566dfc5a0417240756e0b085b423f23181b
[ "MIT" ]
null
null
null
setup.py
guate/division-politica
98ecd566dfc5a0417240756e0b085b423f23181b
[ "MIT" ]
2
2015-12-14T20:21:05.000Z
2015-12-16T23:01:21.000Z
setup.py
guate/division-politica
98ecd566dfc5a0417240756e0b085b423f23181b
[ "MIT" ]
2
2015-12-14T20:31:47.000Z
2020-06-03T16:50:28.000Z
from setuptools import setup with open('README.md', 'r') as ld: long_description = ld.read() setup_args = dict( name='guate.division-politica', use_scm_version=True, packages=['guate.division_politica'], include_package_data=True, author='Darwin Monroy', author_email='contact@darwinmonroy....
22.148148
49
0.66388
from setuptools import setup with open('README.md', 'r') as ld: long_description = ld.read() setup_args = dict( name='guate.division-politica', use_scm_version=True, packages=['guate.division_politica'], include_package_data=True, author='Darwin Monroy', author_email='contact@darwinmonroy....
true
true
f730d1d7c471e58cd2224140890fda9894003216
4,612
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/inbound_nat_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.130435
282
0.686904
from .sub_resource_py3 import SubResource class InboundNatRule(SubResource): _validation = { 'backend_ip_configuration': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type'...
true
true
f730d290273fed913ab812d544850db1a348c0e6
8,101
py
Python
python/pyspark/accumulators.py
yqtaowhu/Spark
a381bce7285ec30f58f28f523dfcfe0c13221bbf
[ "Apache-2.0" ]
25
2020-02-21T20:53:38.000Z
2022-03-03T03:16:31.000Z
python/pyspark/accumulators.py
yqtaowhu/Spark
a381bce7285ec30f58f28f523dfcfe0c13221bbf
[ "Apache-2.0" ]
7
2021-01-21T01:36:00.000Z
2021-04-26T21:01:16.000Z
python/pyspark/accumulators.py
yqtaowhu/Spark
a381bce7285ec30f58f28f523dfcfe0c13221bbf
[ "Apache-2.0" ]
5
2020-03-25T15:55:10.000Z
2021-06-22T01:20:15.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
30.115242
94
0.670658
import sys import select import struct if sys.version < '3': import SocketServer else: import socketserver as SocketServer import threading from pyspark.serializers import read_int, PickleSerializer __all__ = ['Accumulator', 'AccumulatorParam'] pickleSer = PickleSerializer() _accumulatorRegistry = {} d...
true
true
f730d557ff0c45b46669b134b1aeeb556ec7ffa6
2,556
py
Python
src/main.py
WillGITCode/raspberry-robot
b81814be34837f12074774df40cf86b9111be0a6
[ "MIT" ]
null
null
null
src/main.py
WillGITCode/raspberry-robot
b81814be34837f12074774df40cf86b9111be0a6
[ "MIT" ]
null
null
null
src/main.py
WillGITCode/raspberry-robot
b81814be34837f12074774df40cf86b9111be0a6
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO from time import sleep from modules import ping_sensor from modules import motor_board from modules import control_surfaces # create controller gamePad = control_surfaces.XboxController() # Motor board pins motor_board.init_motor_pins([7, 11, 13, 15]) # Ping sensor ping1 = ping_sensor.PingSensor...
35.5
86
0.527387
import RPi.GPIO as GPIO from time import sleep from modules import ping_sensor from modules import motor_board from modules import control_surfaces gamePad = control_surfaces.XboxController() motor_board.init_motor_pins([7, 11, 13, 15]) ping1 = ping_sensor.PingSensor(16) servo1 = 18 def avoid_obstacles(): if ping...
true
true
f730d5a0e8a7dfd1b3a7e4a2eaba92d308f2bc8f
625
py
Python
test/data/outofdate/Makefile.py
ActiveState/mk
2d0afd81ce4e8a3f39885cae5a50ded7bece7f76
[ "MIT" ]
2
2015-12-21T22:35:16.000Z
2017-08-29T14:47:38.000Z
test/data/outofdate/Makefile.py
ActiveState/mk
2d0afd81ce4e8a3f39885cae5a50ded7bece7f76
[ "MIT" ]
1
2020-05-14T12:59:01.000Z
2020-12-11T18:34:07.000Z
test/data/outofdate/Makefile.py
ActiveState/mk
2d0afd81ce4e8a3f39885cae5a50ded7bece7f76
[ "MIT" ]
null
null
null
import os import shutil import time from mklib import Task from mklib.common import relpath class foo(Task): default = True results = ["foo.txt"] deps = ["bar.txt"] def make(self): src = self.deps[0].path dst = self.results[0].path self.log.info("cp %s %s", relpath(src), relpat...
21.551724
61
0.552
import os import shutil import time from mklib import Task from mklib.common import relpath class foo(Task): default = True results = ["foo.txt"] deps = ["bar.txt"] def make(self): src = self.deps[0].path dst = self.results[0].path self.log.info("cp %s %s", relpath(src), relpat...
true
true
f730d5bf2e956011187143d53e9143c85a16e283
72
py
Python
QPublic/__init__.py
Quantamatics/QPublic
4591125626755ae3f0b6d71c8e275adb79c21d10
[ "MIT" ]
null
null
null
QPublic/__init__.py
Quantamatics/QPublic
4591125626755ae3f0b6d71c8e275adb79c21d10
[ "MIT" ]
null
null
null
QPublic/__init__.py
Quantamatics/QPublic
4591125626755ae3f0b6d71c8e275adb79c21d10
[ "MIT" ]
null
null
null
from __future__ import absolute_import from QPublic import (MarketData)
24
38
0.861111
from __future__ import absolute_import from QPublic import (MarketData)
true
true
f730d81cd96a012f361da653f7b9e5d5f24304f6
1,281
py
Python
mlearning2.py
tobiasaditya/datascience_beginner
fa6868073951259e0a5f8a702de0bcc17c13d295
[ "MIT" ]
null
null
null
mlearning2.py
tobiasaditya/datascience_beginner
fa6868073951259e0a5f8a702de0bcc17c13d295
[ "MIT" ]
null
null
null
mlearning2.py
tobiasaditya/datascience_beginner
fa6868073951259e0a5f8a702de0bcc17c13d295
[ "MIT" ]
null
null
null
import seaborn as sb import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn import metrics person = {'finances':[1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,7,4,1,8,5,2,9,6,3,9,8,7,6,5,4,3,2,1,1,9,7,3,8,2,7], ...
34.621622
106
0.673692
import seaborn as sb import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split from sklearn.linear_model import LogisticRegression from sklearn import metrics person = {'finances':[1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,7,4,1,8,5,2,9,6,3,9,8,7,6,5,4,3,2,1,1,9,7,3,8,2,7], ...
true
true
f730d894d50aaa291f54e9162a0aec5485653323
5,761
py
Python
main.py
evlko/ICTonBot
f0bd4436c11f8907281671aa15969f13781c3d33
[ "MIT" ]
1
2020-11-22T09:41:20.000Z
2020-11-22T09:41:20.000Z
main.py
evlko/ICTonBot
f0bd4436c11f8907281671aa15969f13781c3d33
[ "MIT" ]
null
null
null
main.py
evlko/ICTonBot
f0bd4436c11f8907281671aa15969f13781c3d33
[ "MIT" ]
1
2020-11-24T17:44:59.000Z
2020-11-24T17:44:59.000Z
import time import telebot import components.config as config import components.dialogs as dialogs from components.config import UserState from components.core import bot, logger from components.database.dbworker import DatabaseWorker from components.dialogs import DialogEvent from data.subject_list import subject_lis...
41.746377
115
0.720361
import time import telebot import components.config as config import components.dialogs as dialogs from components.config import UserState from components.core import bot, logger from components.database.dbworker import DatabaseWorker from components.dialogs import DialogEvent from data.subject_list import subject_lis...
true
true
f730d915401357d800d6479065f4d905aeb50b81
1,048
py
Python
examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
51
2018-11-11T12:47:38.000Z
2022-03-06T08:39:43.000Z
examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
2
2019-11-15T03:21:45.000Z
2020-09-10T11:53:58.000Z
examples/pybullet/gym/pybullet_envs/baselines/train_pybullet_cartpole.py
frk2/bullet3
225d823e4dc3f952c6c39920c3f87390383e0602
[ "Zlib" ]
14
2018-12-12T09:12:14.000Z
2021-10-17T14:30:25.000Z
#add parent dir to find package. Only needed for source code build, pip install doesn't need it. import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0,parentdir) import gym from pybullet_en...
26.2
96
0.68416
import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0,parentdir) import gym from pybullet_envs.bullet.cartpole_bullet import CartPoleBulletEnv from baselines import deepq def callback(lc...
true
true
f730d987678190ed5d27c075040ca4013481b942
7,805
py
Python
dev/enas/search_space/enas_search_space.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
null
null
null
dev/enas/search_space/enas_search_space.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
null
null
null
dev/enas/search_space/enas_search_space.py
dapatil211/deep_architect
feadfb545d166216e27532ea47e8efa178e0d142
[ "MIT" ]
null
null
null
""" Search space from Efficient Neural Architecture Search (Pham'17) """ from __future__ import print_function from builtins import str from builtins import range from builtins import object from collections import OrderedDict import tensorflow as tf import numpy as np from deep_architect.helpers import tensorflow_ea...
36.471963
80
0.556054
from __future__ import print_function from builtins import str from builtins import range from builtins import object from collections import OrderedDict import tensorflow as tf import numpy as np from deep_architect.helpers import tensorflow_eager_support as htfe from deep_architect.hyperparameters import D from dev...
true
true
f730da02becc00411ae503923f2d15f5e8664061
15,428
py
Python
api/models/taco_models/fatchord_version.py
elainevoice/backend
9b5fef59001fd6c2040affc80cd5cb9690c73795
[ "Apache-2.0" ]
3
2020-12-28T16:45:56.000Z
2021-12-18T08:38:29.000Z
api/models/taco_models/fatchord_version.py
elainevoice/backend
9b5fef59001fd6c2040affc80cd5cb9690c73795
[ "Apache-2.0" ]
1
2020-12-14T13:09:42.000Z
2020-12-14T13:09:42.000Z
api/models/taco_models/fatchord_version.py
elainevoice/backend
9b5fef59001fd6c2040affc80cd5cb9690c73795
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from api.models.utils.distribution import sample_from_discretized_mix_logistic from api.models.utils.display import * from api.models.utils.dsp import * import os import numpy as np from pathlib import Path from typing import Union class ResBlock(nn.M...
35.143508
113
0.565401
import torch import torch.nn as nn import torch.nn.functional as F from api.models.utils.distribution import sample_from_discretized_mix_logistic from api.models.utils.display import * from api.models.utils.dsp import * import os import numpy as np from pathlib import Path from typing import Union class ResBlock(nn.M...
true
true
f730daa97bd0bc4461d40eeb73adb796aceb822a
6,036
py
Python
micropython/neolamp/neolamp/api.py
hydronics2/esp8266
cdd72145ce94bdcbbabb52429c5c160f73ce4207
[ "BSD-2-Clause" ]
68
2016-11-27T18:10:35.000Z
2021-12-19T16:41:43.000Z
micropython/neolamp/neolamp/api.py
hydronics2/esp8266
cdd72145ce94bdcbbabb52429c5c160f73ce4207
[ "BSD-2-Clause" ]
21
2017-01-03T12:23:22.000Z
2022-01-06T16:19:25.000Z
micropython/neolamp/neolamp/api.py
hydronics2/esp8266
cdd72145ce94bdcbbabb52429c5c160f73ce4207
[ "BSD-2-Clause" ]
34
2017-01-06T16:54:45.000Z
2021-12-17T10:11:13.000Z
# # Copyright (c) dushin.net All Rights Reserved # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the foll...
45.383459
133
0.610007
import logging import uhttpd class Handler : def __init__(self, controller, verbose=False): self.controller = controller self.verbose = verbose def get(self, api_request): context = api_request['context'] if len(context) > 0 : if context[0] == 'config' : ...
true
true
f730dae3cf13445bce8f10c0034724f7175109a5
32,617
py
Python
tests/components/automation/test_sun.py
squirrel289/core
6c5bcbfc3ee40927458e9188d6b79bf63933d3f9
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
tests/components/sun/test_trigger.py
SicAriuSx83/core
162c39258e68ae42fe4e1560ae91ed54f5662409
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
tests/components/sun/test_trigger.py
SicAriuSx83/core
162c39258e68ae42fe4e1560ae91ed54f5662409
[ "Apache-2.0" ]
3
2020-10-18T07:08:40.000Z
2021-06-21T02:26:00.000Z
"""The tests for the sun automation.""" from datetime import datetime import pytest from homeassistant.components import sun import homeassistant.components.automation as automation from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.setup import async_setup_component import homeass...
38.645735
86
0.616366
from datetime import datetime import pytest from homeassistant.components import sun import homeassistant.components.automation as automation from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.setup import async_setup_component import homeassistant.util.dt as dt_util from tests.as...
true
true
f730db018b5a100d3b9690cd2c3518425836dcfb
2,353
py
Python
setup.py
wdv4758h/rsglob
342f950c240b5d84c629ecf4fec348401975d2ba
[ "BSD-2-Clause" ]
null
null
null
setup.py
wdv4758h/rsglob
342f950c240b5d84c629ecf4fec348401975d2ba
[ "BSD-2-Clause" ]
null
null
null
setup.py
wdv4758h/rsglob
342f950c240b5d84c629ecf4fec348401975d2ba
[ "BSD-2-Clause" ]
null
null
null
import os import sys from setuptools import find_packages, setup, Extension try: # for pip >= 10 from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements try: from setuptools_rust import RustExtension except ImportError: import subprocess errno...
30.960526
83
0.677008
import os import sys from setuptools import find_packages, setup, Extension try: from pip._internal.req import parse_requirements except ImportError: from pip.req import parse_requirements try: from setuptools_rust import RustExtension except ImportError: import subprocess errno = subprocess.ca...
true
true
f730db449a2b60d8fb643fdf8902b444b885c8dd
8,163
py
Python
tests/sentry/models/test_group.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
tests/sentry/models/test_group.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
tests/sentry/models/test_group.py
pierredup/sentry
0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from datetime import timedelta import pytest from django.db.models import ProtectedError from django.utils import timezone from sentry.models import ( Group, GroupRedirect, GroupSnooze, GroupStatus, Release, get_group_with_redirect, ) from sentry.testuti...
36.119469
99
0.665932
from __future__ import absolute_import from datetime import timedelta import pytest from django.db.models import ProtectedError from django.utils import timezone from sentry.models import ( Group, GroupRedirect, GroupSnooze, GroupStatus, Release, get_group_with_redirect, ) from sentry.testuti...
true
true
f730dc094d5bd9f4ac6d2d6e6904d61429656ce2
944
py
Python
fuzzer/handling_module.py
junorouse/dynamic-fuzzer
7cb82c56da776211458338771854ecf7071ca1e7
[ "MIT" ]
17
2017-02-20T02:06:05.000Z
2022-02-23T03:07:22.000Z
fuzzer/handling_module.py
junorouse/dynamic-fuzzer
7cb82c56da776211458338771854ecf7071ca1e7
[ "MIT" ]
6
2017-02-09T06:15:34.000Z
2020-10-02T05:42:25.000Z
fuzzer/handling_module.py
junorouse/dynamic-fuzzer
7cb82c56da776211458338771854ecf7071ca1e7
[ "MIT" ]
2
2019-09-22T01:19:32.000Z
2020-05-20T01:56:53.000Z
import importlib from json import loads from base64 import b64decode import sys import gevent.monkey gevent.monkey.patch_all() import gevent import config from os import getpid from requests import post def fetch(module): global message m = importlib.import_module('modules.'+module) m.go(message) def ...
20.085106
117
0.616525
import importlib from json import loads from base64 import b64decode import sys import gevent.monkey gevent.monkey.patch_all() import gevent import config from os import getpid from requests import post def fetch(module): global message m = importlib.import_module('modules.'+module) m.go(message) def ...
true
true
f730dded7d098ef55bd8cd83fe02c10e14f1e36a
16,100
py
Python
dynamic_selection/trainer/archive/svd_classifier.py
Kthyeon/FINE
ae8a24a4a2514feafd9a9ed394af87f397708ccf
[ "MIT" ]
2
2021-12-22T02:25:00.000Z
2022-01-06T09:33:11.000Z
dynamic_selection/trainer/archive/svd_classifier.py
Kthyeon/FINE
ae8a24a4a2514feafd9a9ed394af87f397708ccf
[ "MIT" ]
null
null
null
dynamic_selection/trainer/archive/svd_classifier.py
Kthyeon/FINE
ae8a24a4a2514feafd9a9ed394af87f397708ccf
[ "MIT" ]
2
2021-10-01T14:39:06.000Z
2022-01-06T09:33:12.000Z
import torch import numpy as np from tqdm import tqdm from sklearn import cluster #bol_norm True -> Divide by norm of feature def same_score(v_ortho_dict, features, labels, bol_norm=False): features = torch.from_numpy(features).cuda() scores = torch.zeros(features.shape[0]) for indx, feat in enumerate...
39.655172
126
0.646149
import torch import numpy as np from tqdm import tqdm from sklearn import cluster def same_score(v_ortho_dict, features, labels, bol_norm=False): features = torch.from_numpy(features).cuda() scores = torch.zeros(features.shape[0]) for indx, feat in enumerate(features): tmp_scores = torch.dot(v...
true
true
f730de9b8bc194c6a46cc963b869fd564ac8a7d0
752
py
Python
doc_finder/urls.py
sandipan1/document_finder
e867868e8d2ec96c8034e0a23bf28d75b38eca6e
[ "Apache-2.0" ]
null
null
null
doc_finder/urls.py
sandipan1/document_finder
e867868e8d2ec96c8034e0a23bf28d75b38eca6e
[ "Apache-2.0" ]
null
null
null
doc_finder/urls.py
sandipan1/document_finder
e867868e8d2ec96c8034e0a23bf28d75b38eca6e
[ "Apache-2.0" ]
null
null
null
"""doc_finder URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
34.181818
77
0.710106
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f730ded6c31e174a53ff3335e49d999b7bc074f2
718
py
Python
src/commands/__init__.py
darklab8/darklab_darkbot
2a6bb2f1a423989f3fce18371eb07f56c9e98bcd
[ "MIT" ]
1
2022-03-17T05:55:56.000Z
2022-03-17T05:55:56.000Z
src/commands/__init__.py
darklab8/darklab_darkbot
2a6bb2f1a423989f3fce18371eb07f56c9e98bcd
[ "MIT" ]
1
2022-02-23T11:31:43.000Z
2022-02-23T11:31:43.000Z
src/commands/__init__.py
darklab8/darklab_darkbot
2a6bb2f1a423989f3fce18371eb07f56c9e98bcd
[ "MIT" ]
null
null
null
from discord.ext import commands from .root import attach_root from .base import attach_base from .system import attach_system from .region import attach_region from .friend import attach_friend from .enemy import attach_enemy from .unrecognized import attach_unrecognized from .forum import attach_forum def attach_co...
31.217391
70
0.768802
from discord.ext import commands from .root import attach_root from .base import attach_base from .system import attach_system from .region import attach_region from .friend import attach_friend from .enemy import attach_enemy from .unrecognized import attach_unrecognized from .forum import attach_forum def attach_co...
true
true
f730def843346a0a824d97dd5d8478aa29af6a02
114
py
Python
OnlySnarf/src/elements/__init__.py
sec-js/onlysnarf
c8c32abb5d6b22c08fc7e29b41211530fb583b85
[ "MIT" ]
null
null
null
OnlySnarf/src/elements/__init__.py
sec-js/onlysnarf
c8c32abb5d6b22c08fc7e29b41211530fb583b85
[ "MIT" ]
null
null
null
OnlySnarf/src/elements/__init__.py
sec-js/onlysnarf
c8c32abb5d6b22c08fc7e29b41211530fb583b85
[ "MIT" ]
null
null
null
from .driver import ELEMENTS as driverElements from .profile import ELEMENTS as profileElements # from . import *
28.5
48
0.807018
from .driver import ELEMENTS as driverElements from .profile import ELEMENTS as profileElements
true
true
f730df351880e20d36330b8671d36979568d9b3b
1,894
py
Python
src/cicd/utils/config.py
szn/snowflake-cicd
63350c2e0a3dda77969371c07189cc00073799a8
[ "MIT" ]
1
2022-01-17T20:31:40.000Z
2022-01-17T20:31:40.000Z
src/cicd/utils/config.py
szn/snowflake-cicd
63350c2e0a3dda77969371c07189cc00073799a8
[ "MIT" ]
null
null
null
src/cicd/utils/config.py
szn/snowflake-cicd
63350c2e0a3dda77969371c07189cc00073799a8
[ "MIT" ]
null
null
null
import configparser import functools from os import path from pathlib import Path class Config(): """Config wrapper that reads global config and user config.""" PROJECT_ROOT = path.join(path.dirname(path.realpath(__file__)), '..') CONFIG_INI = path.join(PROJECT_ROOT, 'config.ini') HOME_DIR = Path.hom...
35.735849
114
0.6283
import configparser import functools from os import path from pathlib import Path class Config(): PROJECT_ROOT = path.join(path.dirname(path.realpath(__file__)), '..') CONFIG_INI = path.join(PROJECT_ROOT, 'config.ini') HOME_DIR = Path.home() CONN_INI = path.join(HOME_DIR, '.snowflake-cicd.ini') ...
true
true
f730dfaef937c0ed1212f93f8a13aa36e4deb679
2,312
py
Python
app/views/users/messages/views.py
dandye/DjanGoat
72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d
[ "MIT" ]
65
2017-08-18T15:12:03.000Z
2021-08-14T16:50:07.000Z
app/views/users/messages/views.py
dandye/DjanGoat
72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d
[ "MIT" ]
83
2017-11-28T21:45:20.000Z
2021-11-02T18:52:52.000Z
app/views/users/messages/views.py
dandye/DjanGoat
72beb30afe3ddd5b31ce74a5d3b9da61d2c5df1d
[ "MIT" ]
71
2017-08-17T14:58:01.000Z
2022-02-02T17:09:49.000Z
from __future__ import unicode_literals from django.http import HttpResponse from django.contrib import messages from django.views.decorators.http import require_http_methods from django.shortcuts import render, redirect from django.utils import timezone from app.decorators import user_is_authenticated from app.model...
37.290323
75
0.62846
from __future__ import unicode_literals from django.http import HttpResponse from django.contrib import messages from django.views.decorators.http import require_http_methods from django.shortcuts import render, redirect from django.utils import timezone from app.decorators import user_is_authenticated from app.model...
true
true
f730e068ae999111bb773778e3014d2a1af34e42
5,643
py
Python
stats_csv_latency.py
maria-kuruvilla/temp_collective_new
c45b72cee7c17072507eb67790d1699f5684098a
[ "MIT" ]
null
null
null
stats_csv_latency.py
maria-kuruvilla/temp_collective_new
c45b72cee7c17072507eb67790d1699f5684098a
[ "MIT" ]
null
null
null
stats_csv_latency.py
maria-kuruvilla/temp_collective_new
c45b72cee7c17072507eb67790d1699f5684098a
[ "MIT" ]
null
null
null
""" Goal - to produce a csv file with temp, gs rep, loom and latency """ import os import pathlib from pprint import pprint import numpy as np from scipy import stats from scipy.spatial import distance import matplotlib.pyplot as plt from matplotlib.pyplot import figure import trajectorytools as tt import trajector...
32.618497
181
0.606238
import os import pathlib from pprint import pprint import numpy as np from scipy import stats from scipy.spatial import distance import matplotlib.pyplot as plt from matplotlib.pyplot import figure import trajectorytools as tt import trajectorytools.plot as ttplot import trajectorytools.socialcontext as ttsocial fro...
true
true
f730e06a010416203fc8fedf3c5013230e453033
300
py
Python
0-notes/job-search/Cracking_the_Coding_Interview/C03StacksQueues/questions/3.5-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C03StacksQueues/questions/3.5-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking_the_Coding_Interview/C03StacksQueues/questions/3.5-question.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# 3.5 Sort Stack # Write a program to sort a stack such that the smallest items are on top. # You can use an additional temporary stack, but you may not copy the elements into # any other data structure such as an array. # The stack supports the following operations: push, pop, peek, and isEmpty.
42.857143
83
0.756667
true
true
f730e09591819247a3e35ea00055913be97dcb22
44,059
py
Python
prometheus_client/core.py
canonical-ols/client_python
3088bc14d419d4f54efd2a4ea12469eedbfa0a37
[ "Apache-2.0" ]
null
null
null
prometheus_client/core.py
canonical-ols/client_python
3088bc14d419d4f54efd2a4ea12469eedbfa0a37
[ "Apache-2.0" ]
null
null
null
prometheus_client/core.py
canonical-ols/client_python
3088bc14d419d4f54efd2a4ea12469eedbfa0a37
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from __future__ import unicode_literals from collections import namedtuple import copy import json import math import mmap import os import re import struct import sys from threading import Lock import time from timeit import default_timer import types from .decorator import decorate if sys.versio...
33.302343
142
0.599582
from __future__ import unicode_literals from collections import namedtuple import copy import json import math import mmap import os import re import struct import sys from threading import Lock import time from timeit import default_timer import types from .decorator import decorate if sys.version_info > (3,): ...
true
true
f730e0c9b1f31a3eee78a5557358da4420318669
4,761
py
Python
sauronlab/model/audio.py
dmyersturnbull/sauronlab
c458b622efd3cb70c2547ec64ea9d11c293ab8f6
[ "Apache-2.0" ]
null
null
null
sauronlab/model/audio.py
dmyersturnbull/sauronlab
c458b622efd3cb70c2547ec64ea9d11c293ab8f6
[ "Apache-2.0" ]
73
2021-02-03T21:32:44.000Z
2022-03-28T05:14:24.000Z
sauronlab/model/audio.py
dmyersturnbull/sauronlab
c458b622efd3cb70c2547ec64ea9d11c293ab8f6
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations from dataclasses import dataclass import pydub from sauronlab.core.core_imports import * class AudioTools: """ """ @classmethod def save( cls, audio_segment: pydub.AudioSegment, path: PathLike, audio_format: str = "flac" ) -> None: path = Tools.pr...
28.508982
99
0.568788
from __future__ import annotations from dataclasses import dataclass import pydub from sauronlab.core.core_imports import * class AudioTools: @classmethod def save( cls, audio_segment: pydub.AudioSegment, path: PathLike, audio_format: str = "flac" ) -> None: path = Tools.prepped_file(p...
true
true
f730e1135c8fea9159d94e87c994c3afdad3a26d
961
py
Python
neurokit2/ecg/__init__.py
kassyray/NeuroKit
b84d110a71d5d17c0d1efde0d60d00446fda16cb
[ "MIT" ]
null
null
null
neurokit2/ecg/__init__.py
kassyray/NeuroKit
b84d110a71d5d17c0d1efde0d60d00446fda16cb
[ "MIT" ]
null
null
null
neurokit2/ecg/__init__.py
kassyray/NeuroKit
b84d110a71d5d17c0d1efde0d60d00446fda16cb
[ "MIT" ]
null
null
null
"""Submodule for NeuroKit.""" # Aliases from ..signal import signal_rate as ecg_rate from .ecg_analyze import ecg_analyze from .ecg_clean import ecg_clean from .ecg_delineate import ecg_delineate from .ecg_eventrelated import ecg_eventrelated from .ecg_findpeaks import ecg_findpeaks from .ecg_intervalrelated import ec...
24.025
52
0.756504
from ..signal import signal_rate as ecg_rate from .ecg_analyze import ecg_analyze from .ecg_clean import ecg_clean from .ecg_delineate import ecg_delineate from .ecg_eventrelated import ecg_eventrelated from .ecg_findpeaks import ecg_findpeaks from .ecg_intervalrelated import ecg_intervalrelated from .ecg_peaks import...
true
true
f730e11872186a9944e9e1f5e54f6d220b4f6018
889
py
Python
user/admin.py
cxq1/c
52507017f676b4ebed561581ced0d4edf15cdc70
[ "MIT" ]
1
2019-03-22T05:54:24.000Z
2019-03-22T05:54:24.000Z
user/admin.py
cxq1/c
52507017f676b4ebed561581ced0d4edf15cdc70
[ "MIT" ]
4
2021-04-08T18:40:39.000Z
2021-06-10T17:40:34.000Z
user/admin.py
cxq1/c
52507017f676b4ebed561581ced0d4edf15cdc70
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import Profile,OAuthRelationship class ProfileInline(admin.StackedInline): model = Profile can_delete = False class UserAdmin(BaseUserAdmin): ...
31.75
94
0.735658
from django.contrib import admin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.models import User from .models import Profile,OAuthRelationship class ProfileInline(admin.StackedInline): model = Profile can_delete = False class UserAdmin(BaseUserAdmin): ...
true
true
f730e24212521f633f0af8ecc5da5663ec75c84c
215
py
Python
setup.py
patrickwest/mgx-sim
f1457540dedf72076478f1af8765bb4d1ab197e9
[ "BSD-3-Clause" ]
null
null
null
setup.py
patrickwest/mgx-sim
f1457540dedf72076478f1af8765bb4d1ab197e9
[ "BSD-3-Clause" ]
null
null
null
setup.py
patrickwest/mgx-sim
f1457540dedf72076478f1af8765bb4d1ab197e9
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup setup( name="mgxsim", version="0.0.1", description="metagenomics utils.", packages=["mgxsim"], install_requires = [ "biopython", "pandas", ], )
15.357143
38
0.572093
from setuptools import setup setup( name="mgxsim", version="0.0.1", description="metagenomics utils.", packages=["mgxsim"], install_requires = [ "biopython", "pandas", ], )
true
true
f730e2ab3a729344733257366e77e28fa9f64056
321
py
Python
goetia/__init__.py
camillescott/goetia
677e3ef028be6b70a2dacbcf7a4e83f4bb9fdf9a
[ "MIT" ]
3
2020-02-27T00:53:02.000Z
2021-03-09T06:26:48.000Z
goetia/__init__.py
camillescott/goetia
677e3ef028be6b70a2dacbcf7a4e83f4bb9fdf9a
[ "MIT" ]
1
2022-03-24T22:47:49.000Z
2022-03-24T22:47:49.000Z
goetia/__init__.py
camillescott/goetia
677e3ef028be6b70a2dacbcf7a4e83f4bb9fdf9a
[ "MIT" ]
null
null
null
import os import cppyy from .initializor import initialize with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'VERSION')) as fp: __version__ = fp.read().strip() initialize('goetia', 'libgoetiaCppyy.so', 'goetia.map') del initialize from goetia import goetia as libgoetia from cppyy import nullptr...
22.928571
85
0.760125
import os import cppyy from .initializor import initialize with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'VERSION')) as fp: __version__ = fp.read().strip() initialize('goetia', 'libgoetiaCppyy.so', 'goetia.map') del initialize from goetia import goetia as libgoetia from cppyy import nullptr...
true
true
f730e2bdc6d22911b0eead0f336abb6bd7a95a50
6,476
py
Python
app/lib/hydrofunctions/typing.py
edgewize/django-dashboard-dattaable
1d8d02425ea77c248d2987f29e545bd97c62da77
[ "MIT" ]
null
null
null
app/lib/hydrofunctions/typing.py
edgewize/django-dashboard-dattaable
1d8d02425ea77c248d2987f29e545bd97c62da77
[ "MIT" ]
4
2020-04-11T16:34:58.000Z
2021-06-02T01:26:35.000Z
app/lib/hydrofunctions/typing.py
edgewize/django-dashboard-dattaable
1d8d02425ea77c248d2987f29e545bd97c62da77
[ "MIT" ]
null
null
null
""" hydrofunctions.typing ~~~~~~~~~~~~~~~~~~~~~ This module contains functions for testing that user input is valid. Why 'pre-check' user imputs, instead of using standard python duck typing? These functions are meant to enhance an interactive session for the user, and will check a user's parameters before r...
40.987342
114
0.61782
from __future__ import absolute_import, print_function, division, unicode_literals import re def check_parameter_string(candidate, param): parameters = { "site": "NWIS station id(s) should be a string or list of strings," + "often in the form of an eight digit number enclosed in quotes.", ...
true
true
f730e4028c13ff210cb1005b2bee0aebae3b584f
592
py
Python
scripts/create_model_vs_data_txt.py
phenix-project/phenix_html
a56f221c450590abfd2f0d03737c582c8ac5e563
[ "BSD-3-Clause" ]
null
null
null
scripts/create_model_vs_data_txt.py
phenix-project/phenix_html
a56f221c450590abfd2f0d03737c582c8ac5e563
[ "BSD-3-Clause" ]
null
null
null
scripts/create_model_vs_data_txt.py
phenix-project/phenix_html
a56f221c450590abfd2f0d03737c582c8ac5e563
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import mmtbx.model_vs_data import libtbx.load_env from six.moves import cStringIO as StringIO import os.path as op import os import sys def run(): html_dir = libtbx.env.find_in_repositories(relative_path="phenix_html") dest_dir = op.join(html_dir, "rst_files", "reference") l...
28.190476
74
0.738176
from __future__ import print_function import mmtbx.model_vs_data import libtbx.load_env from six.moves import cStringIO as StringIO import os.path as op import os import sys def run(): html_dir = libtbx.env.find_in_repositories(relative_path="phenix_html") dest_dir = op.join(html_dir, "rst_files", "reference") l...
true
true
f730e40e6191fecbd2be8442259456de0521ad96
2,298
py
Python
tests/ui/test_home.py
adele-angel/selenium-test-automation
23aac2e195883ea72cf0f2668cdb7cedd885ec24
[ "MIT" ]
null
null
null
tests/ui/test_home.py
adele-angel/selenium-test-automation
23aac2e195883ea72cf0f2668cdb7cedd885ec24
[ "MIT" ]
null
null
null
tests/ui/test_home.py
adele-angel/selenium-test-automation
23aac2e195883ea72cf0f2668cdb7cedd885ec24
[ "MIT" ]
null
null
null
import pytest import allure from config.credentials import Credentials from framework.pages.HomePage import HomePage from infra.screenshot_generator import get_screenshot from infra.shared_steps import SharedSteps from infra.string_util import identifier_generator @allure.title('Test navigation into "New Project" pag...
38.949153
147
0.755004
import pytest import allure from config.credentials import Credentials from framework.pages.HomePage import HomePage from infra.screenshot_generator import get_screenshot from infra.shared_steps import SharedSteps from infra.string_util import identifier_generator @allure.title('Test navigation into "New Project" pag...
true
true
f730e509a5cb334c83d0d7e50b92c0635bdffed4
782
py
Python
dataset/wrapped_dataloader.py
Aquarium1222/Electricity-Forecasting
9f945d3fd8006e5d77da08ff7861577965109ec8
[ "MIT" ]
null
null
null
dataset/wrapped_dataloader.py
Aquarium1222/Electricity-Forecasting
9f945d3fd8006e5d77da08ff7861577965109ec8
[ "MIT" ]
null
null
null
dataset/wrapped_dataloader.py
Aquarium1222/Electricity-Forecasting
9f945d3fd8006e5d77da08ff7861577965109ec8
[ "MIT" ]
null
null
null
from dataset.electric_dataloader import ElectricDataloader from dataset.preprocessor import Preprocessor class WrappedDataloader: def __init__(self, dataloader, func): self.dataloader = dataloader self.func = func def __len__(self): return len(self.dataloader) def __iter__(self):...
26.066667
58
0.742967
from dataset.electric_dataloader import ElectricDataloader from dataset.preprocessor import Preprocessor class WrappedDataloader: def __init__(self, dataloader, func): self.dataloader = dataloader self.func = func def __len__(self): return len(self.dataloader) def __iter__(self):...
true
true
f730e637b6cdd9ca1951b596c2df73147bceb07c
13,442
py
Python
mlir/test/python/integration/dialects/linalg/opsrun.py
mgehre-xlx/sycl
2086745509ef4bc298d7bbec402a123dae68f25e
[ "Apache-2.0" ]
61
2019-04-12T18:49:57.000Z
2022-03-19T22:23:16.000Z
mlir/test/python/integration/dialects/linalg/opsrun.py
mgehre-xlx/sycl
2086745509ef4bc298d7bbec402a123dae68f25e
[ "Apache-2.0" ]
127
2019-04-09T00:55:50.000Z
2022-03-21T15:35:41.000Z
mlir/test/python/integration/dialects/linalg/opsrun.py
mgehre-xlx/sycl
2086745509ef4bc298d7bbec402a123dae68f25e
[ "Apache-2.0" ]
10
2019-04-02T18:25:40.000Z
2022-02-15T07:11:37.000Z
# RUN: %PYTHON %s 2>&1 | FileCheck %s import ctypes import sys from mlir.ir import * from mlir.dialects import builtin from mlir.dialects import linalg from mlir.dialects import std from mlir.passmanager import * from mlir.execution_engine import * # Log everything to stderr and flush so that we have a unified strea...
30.411765
79
0.651912
import ctypes import sys from mlir.ir import * from mlir.dialects import builtin from mlir.dialects import linalg from mlir.dialects import std from mlir.passmanager import * from mlir.execution_engine import * def log(*args): print(*args, file=sys.stderr) sys.stderr.flush() matmul_boiler = """ func @main() ->...
true
true
f730e7211dcf7013c3950efeeb1f7cb0ef3dae31
316
py
Python
webdemo/api/controllers/root.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
webdemo/api/controllers/root.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
webdemo/api/controllers/root.py
HandingHu/webdemo
b9fdb67b66da8e59097c962971b32a8d7a3fc471
[ "Apache-2.0" ]
null
null
null
from pecan import rest from wsme import types as wtypes from webdemo.api.controllers.v1 import controller as v1_controller from webdemo.api import expose class RootController(rest.RestController): v1 = v1_controller.V1Controller() @expose.expose(wtypes.text) def get(self): return "webdemo"
21.066667
66
0.756329
from pecan import rest from wsme import types as wtypes from webdemo.api.controllers.v1 import controller as v1_controller from webdemo.api import expose class RootController(rest.RestController): v1 = v1_controller.V1Controller() @expose.expose(wtypes.text) def get(self): return "webdemo"
true
true