hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f731902b159345554e51c2ec9585cd8075fabbd5
846
py
Python
setup.py
kenlowrie/avscript
7e3550adc46a01785ea89cdcd9ddaa5ac35bdbdd
[ "Apache-2.0" ]
1
2021-09-30T19:29:30.000Z
2021-09-30T19:29:30.000Z
setup.py
kenlowrie/avscript
7e3550adc46a01785ea89cdcd9ddaa5ac35bdbdd
[ "Apache-2.0" ]
7
2018-07-16T22:52:55.000Z
2020-05-20T23:48:36.000Z
setup.py
kenlowrie/avscript
7e3550adc46a01785ea89cdcd9ddaa5ac35bdbdd
[ "Apache-2.0" ]
1
2018-05-24T22:58:44.000Z
2018-05-24T22:58:44.000Z
from setuptools import setup from sys import version_info setup(name='avscript', version='0.3.8', description='Audio/Visual Script Parser', url='https://github.com/kenlowrie/avscript', author='Ken Lowrie', author_email='ken@kenlowrie.com', license='Apache', packages=['avscript...
38.454545
107
0.630024
from setuptools import setup from sys import version_info setup(name='avscript', version='0.3.8', description='Audio/Visual Script Parser', url='https://github.com/kenlowrie/avscript', author='Ken Lowrie', author_email='ken@kenlowrie.com', license='Apache', packages=['avscript...
true
true
f73190671897a2b17be262536826df2b282c304f
24,050
py
Python
test/galaxy_selenium/navigates_galaxy.py
Galaxyinternship/Galaxy
204be086a8c16d6684584cefa9053ed7c86a1784
[ "CC-BY-3.0" ]
null
null
null
test/galaxy_selenium/navigates_galaxy.py
Galaxyinternship/Galaxy
204be086a8c16d6684584cefa9053ed7c86a1784
[ "CC-BY-3.0" ]
null
null
null
test/galaxy_selenium/navigates_galaxy.py
Galaxyinternship/Galaxy
204be086a8c16d6684584cefa9053ed7c86a1784
[ "CC-BY-3.0" ]
null
null
null
"""A mixing that extends a HasDriver class with Galaxy-specific utilities. Implementer must provide a self.build_url method to target Galaxy. """ from __future__ import print_function import contextlib import random import string import time from functools import partial, wraps import requests import yaml from .da...
40.083333
156
0.669023
from __future__ import print_function import contextlib import random import string import time from functools import partial, wraps import requests import yaml from .data import NAVIGATION_DATA from .has_driver import exception_indicates_stale_element, HasDriver from . import sizzle DEFAULT_PASSWORD = '123456' ...
true
true
f7319258f8ed765fde12cec23303820fd0ad703d
14,348
py
Python
Lib/warnings.py
adamwen829/cpython
0f1c7c760c6b2804f5d05cae9ca045d1fdf3d667
[ "PSF-2.0" ]
2
2017-05-05T02:07:59.000Z
2017-08-18T09:24:48.000Z
Lib/warnings.py
adamwen829/cpython
0f1c7c760c6b2804f5d05cae9ca045d1fdf3d667
[ "PSF-2.0" ]
null
null
null
Lib/warnings.py
adamwen829/cpython
0f1c7c760c6b2804f5d05cae9ca045d1fdf3d667
[ "PSF-2.0" ]
3
2016-04-21T07:58:27.000Z
2016-05-06T21:34:44.000Z
"""Python part of the warnings subsystem.""" import sys __all__ = ["warn", "warn_explicit", "showwarning", "formatwarning", "filterwarnings", "simplefilter", "resetwarnings", "catch_warnings"] def showwarning(message, category, filename, lineno, file=None, line=None): """Hook to write a wa...
34.995122
79
0.617299
import sys __all__ = ["warn", "warn_explicit", "showwarning", "formatwarning", "filterwarnings", "simplefilter", "resetwarnings", "catch_warnings"] def showwarning(message, category, filename, lineno, file=None, line=None): if file is None: file = sys.stderr try: file.w...
true
true
f731926d323d02ff6850d4318c6001330ae3775c
737
py
Python
benchmarks/__init__.py
cedric05/dothttp
ae68f2c3dbb8f1053a0feeab0ac829aa5d3a2a6e
[ "Apache-2.0" ]
10
2021-02-09T17:21:49.000Z
2021-12-05T19:10:53.000Z
benchmarks/__init__.py
cedric05/dothttp
ae68f2c3dbb8f1053a0feeab0ac829aa5d3a2a6e
[ "Apache-2.0" ]
60
2021-02-07T17:20:47.000Z
2022-03-12T06:26:23.000Z
benchmarks/__init__.py
cedric05/dothttp
ae68f2c3dbb8f1053a0feeab0ac829aa5d3a2a6e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os from dothttp import Config from dothttp.request_base import RequestCompiler def run_model(): """ main use case is to check benchmarks for loading from file to textx model modifying http.tx would increase or lower performance. """ filename = os.path.join(os...
28.346154
110
0.671642
import os from dothttp import Config from dothttp.request_base import RequestCompiler def run_model(): filename = os.path.join(os.path.dirname(__file__), "../examples/example.http") envs = [] target = "1" nocookie = False curl = False properties = [] config = Config(file=filename, env=env...
true
true
f73192bc3cb337f8236fb50957755b303a00785e
6,757
py
Python
cheating/client.py
totu/challenge-fi-2021
7e41581e3dd5a61b838ecb7aadfde501b94802c5
[ "Unlicense" ]
null
null
null
cheating/client.py
totu/challenge-fi-2021
7e41581e3dd5a61b838ecb7aadfde501b94802c5
[ "Unlicense" ]
null
null
null
cheating/client.py
totu/challenge-fi-2021
7e41581e3dd5a61b838ecb7aadfde501b94802c5
[ "Unlicense" ]
null
null
null
import pygame from pygame.locals import * from _thread import * import os import random import socket import json import math from gamelogic import objects, world, common SOCK_COUNT = 2 pygame.init() W, H = 800, 437 win = pygame.display.set_mode((W, H)) pygame.display.set_caption("Projekt Kyyber 2021 Client") bg_o...
31.282407
113
0.547432
import pygame from pygame.locals import * from _thread import * import os import random import socket import json import math from gamelogic import objects, world, common SOCK_COUNT = 2 pygame.init() W, H = 800, 437 win = pygame.display.set_mode((W, H)) pygame.display.set_caption("Projekt Kyyber 2021 Client") bg_o...
true
true
f73192e61c63b58e1cc57017f11c01d7531dc764
3,051
py
Python
pyaz/pyaz_utils.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/pyaz_utils.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
null
null
null
pyaz/pyaz_utils.py
py-az-cli/py-az-cli
9a7dc44e360c096a5a2f15595353e9dad88a9792
[ "MIT" ]
1
2022-02-03T09:12:01.000Z
2022-02-03T09:12:01.000Z
"""Utility functions for the pyaz generated code to use.""" import json import logging import shlex import shutil import subprocess from typing import Dict def _call_az(command: str, parameters: Dict) -> object: """ Call an az command (supplied as a string, and parameters as dictionary). Calls az cli vi...
28.514019
87
0.621763
import json import logging import shlex import shutil import subprocess from typing import Dict def _call_az(command: str, parameters: Dict) -> object: params = _get_params(parameters) commands = command.split() commands.extend(params) full_command = " ".join(commands) print(f"Exec...
true
true
f731932dfc82782e68c3b57938cdc030d69e56ef
53,591
py
Python
electrum/wallet_db.py
L-47/qtum-electrum
dd1b0a8b6ef6e96015a6210de36b23949eaad359
[ "MIT" ]
1
2020-07-21T18:37:59.000Z
2020-07-21T18:37:59.000Z
electrum/wallet_db.py
L-47/qtum-electrum
dd1b0a8b6ef6e96015a6210de36b23949eaad359
[ "MIT" ]
null
null
null
electrum/wallet_db.py
L-47/qtum-electrum
dd1b0a8b6ef6e96015a6210de36b23949eaad359
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
39.088986
153
0.582038
import os import ast import json import copy import threading from collections import defaultdict from functools import reduce from typing import Dict, Optional, List, Tuple, Set, Iterable, NamedTuple, Sequence, TYPE_CHECKING, Union import binascii from . import util, bitcoin from .util import profiler, WalletFileExce...
true
true
f7319439ecbf5ae98691f76abcedaa8bb60c23b1
4,513
py
Python
lib/bindings/samples/server/API/social_api.py
tlalexander/stitchEm
cdff821ad2c500703e6cb237ec61139fce7bf11c
[ "MIT" ]
182
2019-04-19T12:38:30.000Z
2022-03-20T16:48:20.000Z
lib/bindings/samples/server/API/social_api.py
doymcc/stitchEm
20693a55fa522d7a196b92635e7a82df9917c2e2
[ "MIT" ]
107
2019-04-23T10:49:35.000Z
2022-03-02T18:12:28.000Z
lib/bindings/samples/server/API/social_api.py
doymcc/stitchEm
20693a55fa522d7a196b92635e7a82df9917c2e2
[ "MIT" ]
59
2019-06-04T11:27:25.000Z
2022-03-17T23:49:49.000Z
from concurrent.futures import ThreadPoolExecutor from tornado.concurrent import run_on_executor from API.handlers import APIHandler from API.schema import api import errors from social.social_factory import SOCIAL_NETWORKS class SocialAPI(APIHandler): """REST interface related to social networks """ execu...
39.587719
114
0.561489
from concurrent.futures import ThreadPoolExecutor from tornado.concurrent import run_on_executor from API.handlers import APIHandler from API.schema import api import errors from social.social_factory import SOCIAL_NETWORKS class SocialAPI(APIHandler): executor = ThreadPoolExecutor(1) def __init__(self, extra...
true
true
f7319447be1c583c56c689293955c02433bab7f1
4,941
py
Python
docs/source/conf.py
Geofroy/meerkat_dev
ebff9d16b3edc6efdc580f940ca8d60e733d9da1
[ "MIT" ]
null
null
null
docs/source/conf.py
Geofroy/meerkat_dev
ebff9d16b3edc6efdc580f940ca8d60e733d9da1
[ "MIT" ]
4
2017-11-06T13:11:03.000Z
2018-05-04T14:57:18.000Z
docs/source/conf.py
meerkat-code/meerkat_dev
c3f4bef39a72aa99a460ed1a0022c7ea594e037c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config import os import sys # -- Path setup --------------------------------------...
30.5
79
0.65088
import os import sys project = 'meerkat_dev' copyright = '2018, Meerkat Developers' author = 'Jonathan Berry' version = '' release = '' extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.autohttp.flask', 'sphinxcontrib.napoleon' ] templates_path = ['_templates'] source_suffix = '.rst' master_...
true
true
f731958aa03e65b62779fd052badafaa8d11eb1d
8,117
py
Python
07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/membership_inference_attack.py
ichen20/oreilly_book
8098d8096d9decca6aa5afbb267b9f05ce0570f2
[ "Apache-2.0" ]
2,327
2020-03-01T09:47:34.000Z
2021-11-25T12:38:42.000Z
07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/membership_inference_attack.py
ichen20/oreilly_book
8098d8096d9decca6aa5afbb267b9f05ce0570f2
[ "Apache-2.0" ]
209
2020-03-01T17:14:12.000Z
2021-11-08T20:35:42.000Z
07_train/privacy/tensorflow_privacy/privacy/membership_inference_attack/membership_inference_attack.py
ichen20/oreilly_book
8098d8096d9decca6aa5afbb267b9f05ce0570f2
[ "Apache-2.0" ]
686
2020-03-03T17:24:51.000Z
2021-11-25T23:39:12.000Z
# Copyright 2020, The TensorFlow Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
41.203046
105
0.756684
from typing import Iterable import numpy as np from sklearn import metrics from tensorflow_privacy.privacy.membership_inference_attack import models from tensorflow_privacy.privacy.membership_inference_attack.data_structures import AttackInputData from tensorflow_privacy.privacy.membership_inference_attack.data_stru...
true
true
f73196366aa14046b85680925a5d5d15177b1086
1,779
py
Python
chainer/snap2model.py
fujibo/poseHG
e582a6ca1badc9a894b8b7e2a5e0acf9eb348c5c
[ "BSD-3-Clause" ]
null
null
null
chainer/snap2model.py
fujibo/poseHG
e582a6ca1badc9a894b8b7e2a5e0acf9eb348c5c
[ "BSD-3-Clause" ]
null
null
null
chainer/snap2model.py
fujibo/poseHG
e582a6ca1badc9a894b8b7e2a5e0acf9eb348c5c
[ "BSD-3-Clause" ]
1
2018-06-30T07:07:25.000Z
2018-06-30T07:07:25.000Z
import numpy as np import tempfile def snap2model_parser(path_snapshot, path_model=None): """convert snapshot to model :param path_snapshot: str :param path_model: str, default None :return: file descriptor (path_model is None) or None (otherwise) """ snapshot = np.load(path_snapshot) mo...
29.65
91
0.658797
import numpy as np import tempfile def snap2model_parser(path_snapshot, path_model=None): snapshot = np.load(path_snapshot) model = dict() for key in snapshot.keys(): parse = key.split('/') if parse[0] == 'updater' and parse[1] == 'optimizer:main': if parse[2] == 'model': ...
true
true
f73196906eb86fee01bdd6f96402a0ac464b613b
1,524
py
Python
symengine/__init__.py
Meldanya/symengine.py
ec3ce7aef387878abd10a3991e4c3610c98cc70d
[ "MIT" ]
null
null
null
symengine/__init__.py
Meldanya/symengine.py
ec3ce7aef387878abd10a3991e4c3610c98cc70d
[ "MIT" ]
1
2015-10-17T13:22:48.000Z
2015-10-18T11:43:13.000Z
symengine/__init__.py
Meldanya/symengine.py
ec3ce7aef387878abd10a3991e4c3610c98cc70d
[ "MIT" ]
null
null
null
from .lib.symengine_wrapper import ( have_mpfr, have_mpc, have_flint, have_piranha, have_llvm, I, E, pi, oo, zoo, nan, Symbol, Dummy, S, sympify, SympifyError, Integer, Rational, Float, Number, RealNumber, RealDouble, ComplexDouble, add, Add, Mul, Pow, function_symbol, Max, Min, DenseMatrix, Matrix,...
33.866667
93
0.723097
from .lib.symengine_wrapper import ( have_mpfr, have_mpc, have_flint, have_piranha, have_llvm, I, E, pi, oo, zoo, nan, Symbol, Dummy, S, sympify, SympifyError, Integer, Rational, Float, Number, RealNumber, RealDouble, ComplexDouble, add, Add, Mul, Pow, function_symbol, Max, Min, DenseMatrix, Matrix,...
true
true
f731975854283587ddab9488f9c9c75d42aa8ed2
7,107
py
Python
databricks/koalas/missing/series.py
dennyglee/koalas
9781c1ece43b1fa2dce78a0813602e03db0b1fa3
[ "Apache-2.0" ]
1
2019-05-29T05:46:19.000Z
2019-05-29T05:46:19.000Z
databricks/koalas/missing/series.py
dennyglee/koalas
9781c1ece43b1fa2dce78a0813602e03db0b1fa3
[ "Apache-2.0" ]
null
null
null
databricks/koalas/missing/series.py
dennyglee/koalas
9781c1ece43b1fa2dce78a0813602e03db0b1fa3
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2019 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
47.066225
95
0.74307
from databricks.koalas.missing import _unsupported_function, _unsupported_property, common def unsupported_function(method_name, deprecated=False, reason=""): return _unsupported_function(class_name='pd.Series', method_name=method_name, deprecated=deprecated, reason=reason) def...
true
true
f73197e08ced9d0164ad4b85df778656c785b84a
3,279
py
Python
cube_root.py
scottwedge/CSC110
8d1e39de183e3ea477dac993d0fa9b721feca1ca
[ "MIT" ]
null
null
null
cube_root.py
scottwedge/CSC110
8d1e39de183e3ea477dac993d0fa9b721feca1ca
[ "MIT" ]
1
2020-09-04T02:04:33.000Z
2020-09-04T02:04:33.000Z
cube_root.py
scottwedge/CSC110
8d1e39de183e3ea477dac993d0fa9b721feca1ca
[ "MIT" ]
1
2020-09-04T01:51:55.000Z
2020-09-04T01:51:55.000Z
# Sample program illustrating programmer-defined functions # along with code that calls the functions # # The 'cube_root' function uses a 'return' statement. Its # only job is to calculate and "return" the cube root of a # number. It does not print anything. Notice that statements # that "call" the 'cube_root' func...
35.641304
79
0.643489
# used in different ways. # # CSC 110 # Winter 2013 # The cube_root function calculates and RETURNS the cube root # of a number. If the value of 'x' is negative, a negative # real number is returned. def cube_root(x): if x < 0: result = -( (-x)**(1.0/3.0) ) else: result = x ** (1.0/3.0) ...
true
true
f73198cc95d621ef4641d770730e34b065a75e7a
1,470
py
Python
MultiMediaAnalyse/Task2/main.py
wsh-nie/Assignments
e1f800ca9abe54218f9b695dce843ec96a99710c
[ "MIT" ]
null
null
null
MultiMediaAnalyse/Task2/main.py
wsh-nie/Assignments
e1f800ca9abe54218f9b695dce843ec96a99710c
[ "MIT" ]
null
null
null
MultiMediaAnalyse/Task2/main.py
wsh-nie/Assignments
e1f800ca9abe54218f9b695dce843ec96a99710c
[ "MIT" ]
null
null
null
import cv2 def SIFT(imgname1, imgname2): sift = cv2.xfeatures2d.SIFT_create() img1 = cv2.imread(imgname1) img2 = cv2.imread(imgname2) kp1, des1 = sift.detectAndCompute(img1, None) kp2, des2 = sift.detectAndCompute(img2, None) FLANN_INDEX_KDTREE = 0 index_params = dict(algorithm=FLANN_IND...
25.344828
66
0.646259
import cv2 def SIFT(imgname1, imgname2): sift = cv2.xfeatures2d.SIFT_create() img1 = cv2.imread(imgname1) img2 = cv2.imread(imgname2) kp1, des1 = sift.detectAndCompute(img1, None) kp2, des2 = sift.detectAndCompute(img2, None) FLANN_INDEX_KDTREE = 0 index_params = dict(algorithm=FLANN_IND...
true
true
f73198d4417ffcba32dc97836964e3ca95693c56
3,900
py
Python
romp/lib/loss_funcs/params_loss.py
vltmedia/ROMP
1d2d96bd39f67a0a86ce7e397e3af856b3c5ee00
[ "MIT" ]
385
2021-03-30T15:40:31.000Z
2022-03-31T21:52:52.000Z
romp/lib/loss_funcs/params_loss.py
vltmedia/ROMP
1d2d96bd39f67a0a86ce7e397e3af856b3c5ee00
[ "MIT" ]
154
2021-03-31T11:28:27.000Z
2022-03-31T08:00:45.000Z
romp/lib/loss_funcs/params_loss.py
vltmedia/ROMP
1d2d96bd39f67a0a86ce7e397e3af856b3c5ee00
[ "MIT" ]
102
2021-04-15T06:43:00.000Z
2022-03-31T12:40:08.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch import torch.nn as nn import time import pickle import numpy as np import config import constants from config import args from utils import batch_rodrigues, rotation_matrix_to_angle_axis def ba...
42.857143
120
0.691538
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch import torch.nn as nn import time import pickle import numpy as np import config import constants from config import args from utils import batch_rodrigues, rotation_matrix_to_angle_axis def ba...
true
true
f7319a140d0f0b8ef8a302e45f0ea738b572ba7a
63,805
py
Python
ironic/drivers/modules/drac/raid.py
inmotionhosting/ironic
1c7b5f82592e23ab66dddca56e0b059d3cb0710b
[ "Apache-2.0" ]
1
2021-02-27T02:48:59.000Z
2021-02-27T02:48:59.000Z
ironic/drivers/modules/drac/raid.py
inmotionhosting/ironic
1c7b5f82592e23ab66dddca56e0b059d3cb0710b
[ "Apache-2.0" ]
null
null
null
ironic/drivers/modules/drac/raid.py
inmotionhosting/ironic
1c7b5f82592e23ab66dddca56e0b059d3cb0710b
[ "Apache-2.0" ]
null
null
null
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under...
40.926876
79
0.635797
from collections import defaultdict import math from futurist import periodics from ironic_lib import metrics_utils from oslo_log import log as logging from oslo_utils import importutils from oslo_utils import units from ironic.common import exception from ironic.common.i18n import _ from ironic.common import raid ...
true
true
f7319a3273ea4a13ac90d44d92e546e36cb45026
20,249
py
Python
Decompiler/BattleActionScript.py
AGraber/EDDecompiler
6e00c7c6ba8a12cea7722fcef34ed8ff4ac6bc66
[ "MIT" ]
5
2021-05-23T19:34:38.000Z
2021-12-05T05:57:36.000Z
Decompiler/BattleActionScript.py
AGraber/EDDecompiler
6e00c7c6ba8a12cea7722fcef34ed8ff4ac6bc66
[ "MIT" ]
null
null
null
Decompiler/BattleActionScript.py
AGraber/EDDecompiler
6e00c7c6ba8a12cea7722fcef34ed8ff4ac6bc66
[ "MIT" ]
1
2021-05-06T05:50:14.000Z
2021-05-06T05:50:14.000Z
from Assembler.Assembler2s import * from Base.EDAOBase import * import Instruction.ActionOpTableEDAO as edao import BattleMonsterStatus as MSFile INVALID_ACTION_OFFSET = 0xFFFF EMPTY_ACTION = INVALID_ACTION_OFFSET class CharacterPositionFactor: def __init__(self, fs = None): if fs == None: ...
31.056748
125
0.521754
from Assembler.Assembler2s import * from Base.EDAOBase import * import Instruction.ActionOpTableEDAO as edao import BattleMonsterStatus as MSFile INVALID_ACTION_OFFSET = 0xFFFF EMPTY_ACTION = INVALID_ACTION_OFFSET class CharacterPositionFactor: def __init__(self, fs = None): if fs == None: ...
true
true
f7319b025a15cca212a3758b38a253304ad2ede4
2,382
py
Python
src/streamlink/plugins/huya.py
melmorabity/streamlink
24c59a23103922977991acc28741a323d8efa7a1
[ "BSD-2-Clause" ]
null
null
null
src/streamlink/plugins/huya.py
melmorabity/streamlink
24c59a23103922977991acc28741a323d8efa7a1
[ "BSD-2-Clause" ]
null
null
null
src/streamlink/plugins/huya.py
melmorabity/streamlink
24c59a23103922977991acc28741a323d8efa7a1
[ "BSD-2-Clause" ]
null
null
null
import base64 import logging import re from html import unescape as html_unescape from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream import HTTPStream from streamlink.utils.parse import parse_json log = logging.getLogger(__name__) @pluginmatcher(re....
31.76
111
0.554156
import base64 import logging import re from html import unescape as html_unescape from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream import HTTPStream from streamlink.utils.parse import parse_json log = logging.getLogger(__name__) @pluginmatcher(re....
true
true
f7319b3ce9b7c689f47a1cdeca8dd710ca242644
6,175
py
Python
salt/netapi/rest_cherrypy/event_processor.py
styro/salt
d087d94dca02ca8bf53a6c21b94944bc7957522c
[ "Apache-2.0" ]
3
2016-09-03T06:26:42.000Z
2019-06-30T13:04:53.000Z
salt/netapi/rest_cherrypy/event_processor.py
styro/salt
d087d94dca02ca8bf53a6c21b94944bc7957522c
[ "Apache-2.0" ]
null
null
null
salt/netapi/rest_cherrypy/event_processor.py
styro/salt
d087d94dca02ca8bf53a6c21b94944bc7957522c
[ "Apache-2.0" ]
1
2021-12-02T15:30:00.000Z
2021-12-02T15:30:00.000Z
# encoding: utf-8 from __future__ import absolute_import import json import logging import salt.ext.six as six import salt.netapi logger = logging.getLogger(__name__) class SaltInfo(object): ''' Class to handle processing and publishing of "real time" Salt upates. ''' def __init__(self, handler): ...
29.830918
78
0.545263
from __future__ import absolute_import import json import logging import salt.ext.six as six import salt.netapi logger = logging.getLogger(__name__) class SaltInfo(object): def __init__(self, handler): self.handler = handler self.jobs = {} # This represents a "real time" view ...
true
true
f7319b609eb62f710cfd393ed8f31297d6216369
2,636
py
Python
equality/wallet/puzzles/prefarm/spend_prefarm.py
grayfallstown/equality-blockchain
019425b703f6b013e441481ac43389a80415f2f1
[ "Apache-2.0" ]
10
2021-07-04T15:14:12.000Z
2021-10-17T14:52:56.000Z
equality/wallet/puzzles/prefarm/spend_prefarm.py
grayfallstown/equality-blockchain
019425b703f6b013e441481ac43389a80415f2f1
[ "Apache-2.0" ]
11
2021-07-04T19:31:36.000Z
2022-01-11T02:46:23.000Z
equality/wallet/puzzles/prefarm/spend_prefarm.py
grayfallstown/equality-blockchain
019425b703f6b013e441481ac43389a80415f2f1
[ "Apache-2.0" ]
11
2021-07-04T21:49:17.000Z
2021-10-04T17:45:38.000Z
import asyncio from blspy import G2Element from clvm_tools import binutils from equality.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from equality.rpc.full_node_rpc_client import FullNodeRpcClient from equality.types.blockchain_format.program import Program from equality.types.c...
41.1875
113
0.725721
import asyncio from blspy import G2Element from clvm_tools import binutils from equality.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward from equality.rpc.full_node_rpc_client import FullNodeRpcClient from equality.types.blockchain_format.program import Program from equality.types.c...
true
true
f7319cdf9d302bcce6db295df0177ccd74b1ba86
457
py
Python
server/src/views/tests/test_delete.py
budtmo/GIoT
4cfdeacbe53b2bee10613519d86fa1bb0d9057b4
[ "Apache-2.0" ]
null
null
null
server/src/views/tests/test_delete.py
budtmo/GIoT
4cfdeacbe53b2bee10613519d86fa1bb0d9057b4
[ "Apache-2.0" ]
null
null
null
server/src/views/tests/test_delete.py
budtmo/GIoT
4cfdeacbe53b2bee10613519d86fa1bb0d9057b4
[ "Apache-2.0" ]
null
null
null
from src.views.tests import BaseTest class TestDeleteDevice(BaseTest): """Tests to delete device from the list.""" def test_delete_device(self): self.register_device() res = self.test_app.delete('/device/{id}'.format(id=1)) self.assertEqual(res.status_code, 204) def test_delete_n...
30.466667
63
0.682713
from src.views.tests import BaseTest class TestDeleteDevice(BaseTest): def test_delete_device(self): self.register_device() res = self.test_app.delete('/device/{id}'.format(id=1)) self.assertEqual(res.status_code, 204) def test_delete_non_existing_device(self): res = self.tes...
true
true
f7319ce68a4eb20de0f2eff9b0d27c720c5108bd
596
py
Python
sherlockpipe/search_zones/SearchZone.py
LuisCerdenoMota/SHERLOCK
5fb52795d3ab44e27bc7dbc6f2c2e6c214995ba1
[ "MIT" ]
1
2021-01-14T16:44:48.000Z
2021-01-14T16:44:48.000Z
sherlockpipe/search_zones/SearchZone.py
martindevora/SHERLOCK
5e7492552cbce29e960684a44fd6ad875c8cf60e
[ "MIT" ]
null
null
null
sherlockpipe/search_zones/SearchZone.py
martindevora/SHERLOCK
5e7492552cbce29e960684a44fd6ad875c8cf60e
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from sherlockpipe.star.starinfo import StarInfo class SearchZone(ABC): """ Abstract class to be implemented for calculating minimum and maximum search periods for an input star. """ def __init__(self): pass @abstractmethod def calculate_period_rang...
28.380952
106
0.692953
from abc import ABC, abstractmethod from sherlockpipe.star.starinfo import StarInfo class SearchZone(ABC): def __init__(self): pass @abstractmethod def calculate_period_range(self, star_info: StarInfo): pass
true
true
f7319d88946b78f26293dd74a23f8a820010f76c
4,775
py
Python
.environment/lib/python3.8/site-packages/docplex/mp/engine_factory.py
LuisMi1245/QPath-and-Snakes
48f784da67d9720c955890a28543c9863e02a455
[ "MIT" ]
null
null
null
.environment/lib/python3.8/site-packages/docplex/mp/engine_factory.py
LuisMi1245/QPath-and-Snakes
48f784da67d9720c955890a28543c9863e02a455
[ "MIT" ]
null
null
null
.environment/lib/python3.8/site-packages/docplex/mp/engine_factory.py
LuisMi1245/QPath-and-Snakes
48f784da67d9720c955890a28543c9863e02a455
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016 # -------------------------------------------------------------------------- # gendoc: ignore...
39.46281
115
0.553927
from docplex.mp.engine import NoSolveEngine, ZeroSolveEngine from docplex.mp.utils import is_string from docplex.mp.error_handler import docplex_fatal class EngineFactory(object): _default_engine_map = {"nosolve": NoSolveEngine, "zero": ZeroSolveEngine ...
true
true
f7319da39f77cefd4e939a349a31747373e82aa7
4,711
py
Python
simple_api/django_object/django_object.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
2
2020-11-13T14:00:06.000Z
2020-12-19T11:50:22.000Z
simple_api/django_object/django_object.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
5
2021-02-04T14:27:43.000Z
2021-06-04T23:22:24.000Z
simple_api/django_object/django_object.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
1
2021-01-06T13:54:38.000Z
2021-01-06T13:54:38.000Z
from copy import deepcopy from simple_api.django_object.actions import DetailAction, ListAction, CreateAction, UpdateAction, DeleteAction from simple_api.django_object.datatypes import create_associated_list_type from simple_api.django_object.filters import generate_filters from simple_api.django_object.converter impo...
39.923729
115
0.68478
from copy import deepcopy from simple_api.django_object.actions import DetailAction, ListAction, CreateAction, UpdateAction, DeleteAction from simple_api.django_object.datatypes import create_associated_list_type from simple_api.django_object.filters import generate_filters from simple_api.django_object.converter impo...
true
true
f7319df270d89691854f3a1b9a62c1231d3c7bfe
8,177
py
Python
python/paddle/fluid/tests/unittests/xpu/test_expand_v2_op_xpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
11
2016-08-29T07:43:26.000Z
2016-08-29T07:51:24.000Z
python/paddle/fluid/tests/unittests/xpu/test_expand_v2_op_xpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/xpu/test_expand_v2_op_xpu.py
L-Net-1992/Paddle
4d0ca02ba56760b456f3d4b42a538555b9b6c307
[ "Apache-2.0" ]
1
2021-12-09T08:59:17.000Z
2021-12-09T08:59:17.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
33.239837
97
0.559863
from __future__ import print_function import unittest import sys import numpy as np sys.path.append("..") from op_test import OpTest from op_test_xpu import XPUOpTest import paddle.fluid as fluid from paddle.fluid import Program, program_guard import paddle from xpu.get_test_cover_info import create_test_class, get_x...
true
true
f7319df5d2cfd54a36d3021fcea5ac6d789dee56
7,191
py
Python
mapillary_tools/commands/process.py
kudarisenmon/mapillary_tools
ef3201847ece95a0bbeb95187e38a0a84309a2b7
[ "BSD-2-Clause" ]
null
null
null
mapillary_tools/commands/process.py
kudarisenmon/mapillary_tools
ef3201847ece95a0bbeb95187e38a0a84309a2b7
[ "BSD-2-Clause" ]
null
null
null
mapillary_tools/commands/process.py
kudarisenmon/mapillary_tools
ef3201847ece95a0bbeb95187e38a0a84309a2b7
[ "BSD-2-Clause" ]
null
null
null
import inspect from mapillary_tools.process_user_properties import process_user_properties from mapillary_tools.process_import_meta_properties import process_import_meta_properties from mapillary_tools.process_geotag_properties import process_geotag_properties from mapillary_tools.process_sequence_properties import pro...
67.205607
216
0.667779
import inspect from mapillary_tools.process_user_properties import process_user_properties from mapillary_tools.process_import_meta_properties import process_import_meta_properties from mapillary_tools.process_geotag_properties import process_geotag_properties from mapillary_tools.process_sequence_properties import pro...
true
true
f7319e3e7b4ea41930c29754506d03bd52eac137
1,166
py
Python
envs/cell_place_gym/native/acp_state.py
Yvette1993/spinningup
5094cf291fa24cf93d58b4507dab56dafe73dac1
[ "MIT" ]
null
null
null
envs/cell_place_gym/native/acp_state.py
Yvette1993/spinningup
5094cf291fa24cf93d58b4507dab56dafe73dac1
[ "MIT" ]
null
null
null
envs/cell_place_gym/native/acp_state.py
Yvette1993/spinningup
5094cf291fa24cf93d58b4507dab56dafe73dac1
[ "MIT" ]
null
null
null
import numpy as np from cell_place_gym.native.acp_placement import * class acp_placement_state (object): def __init__ (self, place): self.place = place self.design = place.design l_inst_count = len (self.design.instances) # Non-Placed Nets Matrix self.c_matrix = np.z...
34.294118
71
0.542882
import numpy as np from cell_place_gym.native.acp_placement import * class acp_placement_state (object): def __init__ (self, place): self.place = place self.design = place.design l_inst_count = len (self.design.instances) self.c_matrix = np.zeros (shape = (l_inst_cou...
true
true
f7319e3e83dd42729fdb8ee14c594cab83ad45a6
873
py
Python
reddit_scraper.py
ZER-0-NE/Real-Time-Sentiment-Analysis-from-Memes
7d95ca63f0643e85f49c8b3bc37e6362ae51c76b
[ "MIT" ]
3
2021-05-24T11:23:44.000Z
2022-03-19T14:01:47.000Z
reddit_scraper.py
ZER-0-NE/Real-Time-Sentiment-Analysis-from-Memes
7d95ca63f0643e85f49c8b3bc37e6362ae51c76b
[ "MIT" ]
null
null
null
reddit_scraper.py
ZER-0-NE/Real-Time-Sentiment-Analysis-from-Memes
7d95ca63f0643e85f49c8b3bc37e6362ae51c76b
[ "MIT" ]
3
2020-04-05T22:06:50.000Z
2020-06-25T18:59:06.000Z
import urllib import re import subprocess import time import sys urls="https://old.reddit.com/r/dankmemes/" i=0 num = input("How many pages would you like to download(25 memes per page)?") if num<1: sys.exit("Number of pages should be > 0") else : while i<num: these_regex="data-url=\"(.+?)\"" ...
28.16129
76
0.57732
import urllib import re import subprocess import time import sys urls="https://old.reddit.com/r/dankmemes/" i=0 num = input("How many pages would you like to download(25 memes per page)?") if num<1: sys.exit("Number of pages should be > 0") else : while i<num: these_regex="data-url=\"(.+?)\"" ...
false
true
f7319e483d3b8d072192a8a4e21ee30c26c57e8a
2,638
py
Python
homeassistant/components/sonos/entity.py
DavidDeSloovere/core
909a20b36d4df6724c955c2ae28cb82fe6d50c2e
[ "Apache-2.0" ]
1
2019-08-19T18:18:50.000Z
2019-08-19T18:18:50.000Z
homeassistant/components/sonos/entity.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
70
2020-08-05T07:20:00.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/sonos/entity.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
1
2021-10-29T22:10:26.000Z
2021-10-29T22:10:26.000Z
"""Entity representing a Sonos player.""" from __future__ import annotations import logging from pysonos.core import SoCo import homeassistant.helpers.device_registry as dr from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, async_dispatcher_send, ) from homeassistant.helpers.entity impo...
29.311111
86
0.628886
from __future__ import annotations import logging from pysonos.core import SoCo import homeassistant.helpers.device_registry as dr from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, async_dispatcher_send, ) from homeassistant.helpers.entity import DeviceInfo, Entity from .const import ...
true
true
f7319eef72e8d23633c8d8b5b9c928a276dda952
912
py
Python
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/n/not_in_loop.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
463
2015-01-15T08:17:42.000Z
2022-03-28T15:10:20.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/n/not_in_loop.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
52
2015-01-06T02:43:59.000Z
2022-03-14T11:15:21.000Z
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/n/not_in_loop.py
ciskoinch8/vimrc
5bf77a7e7bc70fac5173ab2e9ea05d7dda3e52b8
[ "MIT" ]
249
2015-01-07T22:49:49.000Z
2022-03-18T02:32:06.000Z
"""Test that not-in-loop is detected properly.""" # pylint: disable=missing-docstring, invalid-name, too-few-public-methods # pylint: disable=useless-else-on-loop, using-constant-test, useless-object-inheritance # pylint: disable=no-else-continue while True: def ala(): continue # [not-in-loop] while True:...
16.285714
87
0.612939
while True: def ala(): continue while True: pass else: continue def lala(): continue while True: class A(object): continue for _ in range(10): pass else: continue for _ in range(42): pass else: break if True: continue else: break for _ in range(10): ...
true
true
f7319f7dedc4d4bfa733e08b15bd1217c7611f0d
860
py
Python
wagtail_localize/migrations/0004_one_source_per_objectlocale.py
KalobTaulien/wagtail-localize
e513d18dea5f76f6941f1acf55f945150de767eb
[ "BSD-3-Clause" ]
123
2019-11-21T12:55:04.000Z
2022-03-23T08:08:47.000Z
wagtail_localize/migrations/0004_one_source_per_objectlocale.py
KalobTaulien/wagtail-localize
e513d18dea5f76f6941f1acf55f945150de767eb
[ "BSD-3-Clause" ]
334
2019-11-20T10:40:08.000Z
2022-03-27T17:33:01.000Z
wagtail_localize/migrations/0004_one_source_per_objectlocale.py
KalobTaulien/wagtail-localize
e513d18dea5f76f6941f1acf55f945150de767eb
[ "BSD-3-Clause" ]
41
2020-01-16T17:24:52.000Z
2022-03-28T13:09:59.000Z
# Generated by Django 3.0.8 on 2020-08-05 09:33 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('wagtail_localize', '0003_delete_translation_sources'), ] operations = [ migrat...
27.741935
74
0.626744
from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('wagtail_localize', '0003_delete_translation_sources'), ] operations = [ migrations.AddField( model_name='translati...
true
true
f731a03ce0e6675d8bd15187040163106262826b
23,980
py
Python
awx/main/models/notifications.py
sganesh999/awx
783a6dc5111e1757982bf7f5e1bb4bb197d4f199
[ "Apache-2.0" ]
null
null
null
awx/main/models/notifications.py
sganesh999/awx
783a6dc5111e1757982bf7f5e1bb4bb197d4f199
[ "Apache-2.0" ]
null
null
null
awx/main/models/notifications.py
sganesh999/awx
783a6dc5111e1757982bf7f5e1bb4bb197d4f199
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. from copy import deepcopy import datetime import logging import json from django.db import models from django.conf import settings from django.core.mail.message import EmailMessage from django.db import connection from django.utils.translation import ugettext_...
49.240246
160
0.544287
from copy import deepcopy import datetime import logging import json from django.db import models from django.conf import settings from django.core.mail.message import EmailMessage from django.db import connection from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_str, for...
true
true
f731a055821f656efbcb5c83ad2f7ff8e59dd572
818
py
Python
manage.py
neosergio/WisdomBox
f41bd828f5e264c7ad05262b29c8f02cf904b54a
[ "MIT" ]
null
null
null
manage.py
neosergio/WisdomBox
f41bd828f5e264c7ad05262b29c8f02cf904b54a
[ "MIT" ]
2
2017-02-09T14:52:43.000Z
2017-02-10T19:31:38.000Z
manage.py
neosergio/WisdomBox
f41bd828f5e264c7ad05262b29c8f02cf904b54a
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wisdom.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that the ...
35.565217
77
0.640587
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wisdom.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportError: ...
true
true
f731a0e7d3248ef87117117d791e52aa967f0a12
2,465
py
Python
forecaster.py
Adri1bo/HEMS_API
dca26e55696f9f2e36f29968a8c3a90871d6bc16
[ "MIT" ]
1
2021-02-17T08:47:47.000Z
2021-02-17T08:47:47.000Z
forecaster.py
Adri1bo/HEMS_API
dca26e55696f9f2e36f29968a8c3a90871d6bc16
[ "MIT" ]
null
null
null
forecaster.py
Adri1bo/HEMS_API
dca26e55696f9f2e36f29968a8c3a90871d6bc16
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Jun 7 17:58:57 2020 @author: adria.bove """ from BBDD import BBDD import analytics import pandas as pd import matplotlib.pyplot as plt import numpy as np import datetime as dt class consumption: def __init__(self, nom): self.nom_BBDD=nom ...
30.8125
111
0.577688
from BBDD import BBDD import analytics import pandas as pd import matplotlib.pyplot as plt import numpy as np import datetime as dt class consumption: def __init__(self, nom): self.nom_BBDD=nom def forecaster(self,timestamp): self.timestamp=str(timestamp) thi...
true
true
f731a16e0fc215d4c3817488810ef1839361e054
49,894
py
Python
cogs/TwitchAlert.py
SnowyJaguar1034/KoalaBot
840a5e30476492c60157687804a2445903279207
[ "MIT" ]
null
null
null
cogs/TwitchAlert.py
SnowyJaguar1034/KoalaBot
840a5e30476492c60157687804a2445903279207
[ "MIT" ]
13
2021-07-02T04:11:14.000Z
2022-03-25T04:08:55.000Z
cogs/TwitchAlert.py
SnowyJaguar1034/KoalaBot
840a5e30476492c60157687804a2445903279207
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Koala Bot Base Cog code and additional base cog functions Commented using reStructuredText (reST) """ # Futures # Built-in/Generic Imports import os import time import re import aiohttp import logging from concurrent.futures import ThreadPoolExecutor logging.basicConfig(filename='TwitchAle...
44.94955
120
0.615445
import os import time import re import aiohttp import logging from concurrent.futures import ThreadPoolExecutor logging.basicConfig(filename='TwitchAlert.log') import KoalaBot from utils.KoalaColours import * from utils.KoalaUtils import error_embed, is_channel_in_guild, extract_id from utils import KoalaDBManager ...
true
true
f731a1ae7561e1b6b771c407eeb69465e2d4177b
3,929
py
Python
openstack/tests/unit/cloud/test_limits.py
NeCTAR-RC/openstacksdk
60a24f6c4717a1f9a0e545c9a07e68afaedc5a27
[ "Apache-2.0" ]
99
2018-03-28T15:41:45.000Z
2022-01-23T17:22:13.000Z
openstack/tests/unit/cloud/test_limits.py
NeCTAR-RC/openstacksdk
60a24f6c4717a1f9a0e545c9a07e68afaedc5a27
[ "Apache-2.0" ]
5
2018-05-25T16:54:23.000Z
2021-11-21T02:27:16.000Z
openstack/tests/unit/cloud/test_limits.py
NeCTAR-RC/openstacksdk
60a24f6c4717a1f9a0e545c9a07e68afaedc5a27
[ "Apache-2.0" ]
104
2018-04-06T14:33:54.000Z
2022-03-01T01:58:09.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
40.927083
75
0.423772
from openstack.tests.unit import base class TestLimits(base.TestCase): def test_get_compute_limits(self): self.register_uris([ dict(method='GET', uri=self.get_mock_url( 'compute', 'public', append=['limits']), json={ ...
true
true
f731a2121c3590ca3b044f3b321708cb81eb5991
9,878
py
Python
GlutWrapper.py
kosystem/PythonGlutWrapper
e619b62927d6875f1bd3d2da8b5f2291487c8920
[ "MIT" ]
null
null
null
GlutWrapper.py
kosystem/PythonGlutWrapper
e619b62927d6875f1bd3d2da8b5f2291487c8920
[ "MIT" ]
null
null
null
GlutWrapper.py
kosystem/PythonGlutWrapper
e619b62927d6875f1bd3d2da8b5f2291487c8920
[ "MIT" ]
null
null
null
from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * import sys from math import * import time ESCAPE = '\033' class Camera(object): """docstring for Camera""" def __init__(self): self.lock_x = 0 self.lock_y = 0 self.lock_z = 0 self.distance = 300 ...
27.983003
74
0.571877
from OpenGL.GL import * from OpenGL.GLUT import * from OpenGL.GLU import * import sys from math import * import time ESCAPE = '\033' class Camera(object): def __init__(self): self.lock_x = 0 self.lock_y = 0 self.lock_z = 0 self.distance = 300 self.pan = 0.0 self.ti...
true
true
f731a2862378f2a67c66b8effa16a59cf7ae26f1
867
py
Python
py/pe/pe8.py
kittttttan/pe
6f87e4527793198c393700fedbdd52274fec5b44
[ "MIT" ]
null
null
null
py/pe/pe8.py
kittttttan/pe
6f87e4527793198c393700fedbdd52274fec5b44
[ "MIT" ]
null
null
null
py/pe/pe8.py
kittttttan/pe
6f87e4527793198c393700fedbdd52274fec5b44
[ "MIT" ]
1
2016-09-01T22:47:28.000Z
2016-09-01T22:47:28.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Discover the largest product of five consecutive digits in the 1000-digit number. """ def pe8(fname="../../res/pe8.txt", n=5): """ Discover the largest product of five consecutive digits in the 1000-digit number. >>> pe8() 40824 """ with op...
20.642857
65
0.500577
def pe8(fname="../../res/pe8.txt", n=5): with open(fname, 'r') as f: s = f.read() s = s.replace('\n', '') ls = len(s) if ls < n: raise ValueError m = 0 for x in range(ls - n + 1): t = 1 for y in range(n): t *= int(s[x + y]) if m < t: ...
true
true
f731a3593f56de78afad7e6ff95b896326f0909e
2,885
py
Python
ExcelPixelator.py
nibble-4bits/excel-pixel-art
793c04c69f5035034dc42e26948b3e6390c81668
[ "MIT" ]
2
2021-01-02T02:46:30.000Z
2021-06-30T00:37:06.000Z
ExcelPixelator.py
nibble-4bits/excel-pixel-art
793c04c69f5035034dc42e26948b3e6390c81668
[ "MIT" ]
null
null
null
ExcelPixelator.py
nibble-4bits/excel-pixel-art
793c04c69f5035034dc42e26948b3e6390c81668
[ "MIT" ]
1
2021-06-30T00:37:13.000Z
2021-06-30T00:37:13.000Z
from openpyxl import Workbook from openpyxl.utils import get_column_letter from openpyxl.styles import PatternFill from PIL import Image class ExcelPixelator: def __init__(self, input_path, output_path, file_name, cell_size, pixel_size): self.image = Image.open(input_path).convert('RGB') self.outp...
38.986486
126
0.586828
from openpyxl import Workbook from openpyxl.utils import get_column_letter from openpyxl.styles import PatternFill from PIL import Image class ExcelPixelator: def __init__(self, input_path, output_path, file_name, cell_size, pixel_size): self.image = Image.open(input_path).convert('RGB') self.outp...
true
true
f731a40b7f102fd430b7e6b6d58a594d1b5f7c7b
3,806
py
Python
scripts/spectral_clustering_demo.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
4,895
2016-08-17T22:28:34.000Z
2022-03-31T17:07:15.000Z
scripts/spectral_clustering_demo.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
446
2016-09-17T14:35:29.000Z
2022-03-31T19:59:33.000Z
scripts/spectral_clustering_demo.py
vipavlovic/pyprobml
59a2edc682d0163955db5e2f27491ad772b60141
[ "MIT" ]
1,160
2016-08-18T23:19:27.000Z
2022-03-31T12:44:07.000Z
import superimport import itertools import matplotlib.pyplot as plt import numpy as np from scipy.linalg import eigh from sklearn.cluster import KMeans from sklearn.metrics.pairwise import rbf_kernel import pyprobml_utils as pml plt.style.use('classic') def spectral_clustering_demo(): np.random.seed(0) num_c...
35.90566
99
0.633211
import superimport import itertools import matplotlib.pyplot as plt import numpy as np from scipy.linalg import eigh from sklearn.cluster import KMeans from sklearn.metrics.pairwise import rbf_kernel import pyprobml_utils as pml plt.style.use('classic') def spectral_clustering_demo(): np.random.seed(0) num_c...
true
true
f731a4104b7ef8d6f39fe8aa8ecf2aad84c9136c
5,770
py
Python
run_fits.py
ruizca/pseudoXspec
a8ad2ca3744fe73e5ace78aedbabc49e32e2202a
[ "MIT" ]
null
null
null
run_fits.py
ruizca/pseudoXspec
a8ad2ca3744fe73e5ace78aedbabc49e32e2202a
[ "MIT" ]
null
null
null
run_fits.py
ruizca/pseudoXspec
a8ad2ca3744fe73e5ace78aedbabc49e32e2202a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Created on Fri Jun 19 10:46:32 2015 @author: ruizca """ import argparse import logging import subprocess from itertools import count from pathlib import Path from astropy.coordinates.sky_coordinate import SkyCoord from astropy.table import Table from astropy.units import UnitTypeError from ...
25.874439
90
0.629116
import argparse import logging import subprocess from itertools import count from pathlib import Path from astropy.coordinates.sky_coordinate import SkyCoord from astropy.table import Table from astropy.units import UnitTypeError from gdpyc import GasMap from tqdm.contrib import tzip logging.basicConfig(level=loggin...
true
true
f731a426c81b0dc8e44312a6025cd8a35b8138fd
1,329
py
Python
week9/tests/test_calc_class.py
zzsza/kyle-school
8cf6cffd3d86a25c29f914a9d4802cdb8e6dd478
[ "MIT" ]
189
2019-11-15T11:33:50.000Z
2022-03-27T08:23:35.000Z
week9/tests/test_calc_class.py
zzsza/kyle-school
8cf6cffd3d86a25c29f914a9d4802cdb8e6dd478
[ "MIT" ]
3
2020-05-29T03:26:32.000Z
2021-07-11T15:46:07.000Z
week9/tests/test_calc_class.py
zzsza/kyle-school
8cf6cffd3d86a25c29f914a9d4802cdb8e6dd478
[ "MIT" ]
39
2019-11-16T04:02:06.000Z
2022-03-21T04:18:14.000Z
import pytest from calc_class import Calculator # 상수 NUMBER_1 = 3.0 NUMBER_2 = 2.0 # Fixtures @pytest.fixture def calculator(): return Calculator() def verify_answer(expected, answer, last_answer): assert expected == answer assert expected == last_answer # ======Test Cases 시작====== def test_last_answer...
19.26087
49
0.705794
import pytest from calc_class import Calculator NUMBER_1 = 3.0 NUMBER_2 = 2.0 @pytest.fixture def calculator(): return Calculator() def verify_answer(expected, answer, last_answer): assert expected == answer assert expected == last_answer def test_last_answer_init(calculator): def test_add(calcul...
false
true
f731a56cb0c8590006223c1be11722be665011fc
1,998
py
Python
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnssoarec_args.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnssoarec_args.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
nitro-python/nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnssoarec_args.py
culbertm/NSttyPython
ff9f6aedae3fb8495342cd0fc4247c819cf47397
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2008-2016 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
27.75
101
0.698699
class dnssoarec_args : def __init__(self) : self._type = None self._nodeid = None @property def type(self) : try : return self._type except Exception as e: raise e @type.setter def type(self, type) : try : self._type = type except Exception as e: raise e @property def nodeid(self) : ...
true
true
f731a5771e4fe79a045785785375a014bc97a2e2
717
py
Python
bot_v_bot.py
garybake/man_alphagb
e69c954e3f42dd556f9b5b7b9edcbf2856389d2f
[ "MIT" ]
null
null
null
bot_v_bot.py
garybake/man_alphagb
e69c954e3f42dd556f9b5b7b9edcbf2856389d2f
[ "MIT" ]
null
null
null
bot_v_bot.py
garybake/man_alphagb
e69c954e3f42dd556f9b5b7b9edcbf2856389d2f
[ "MIT" ]
null
null
null
import time # from dlgo.agent import naive from dlgo.agent import naive from dlgo import gotypes from dlgo import goboard_slow as goboard from dlgo.utils import print_board, print_move def main(): board_size = 9 game = goboard.GameState.new_game(board_size) bots = { gotypes.Player.black: naive.Ra...
25.607143
59
0.666667
import time from dlgo.agent import naive from dlgo import gotypes from dlgo import goboard_slow as goboard from dlgo.utils import print_board, print_move def main(): board_size = 9 game = goboard.GameState.new_game(board_size) bots = { gotypes.Player.black: naive.RandomBot(), gotypes.Play...
true
true
f731a5baeb0a5f98871e45535782937905736879
187,564
bzl
Python
go_third_party.bzl
enp0s3/project-infra
a53795f5df0dbb22c94ba04da47e9ba2fdfe60ed
[ "Apache-2.0" ]
16
2017-07-30T10:51:51.000Z
2021-09-02T17:58:03.000Z
go_third_party.bzl
enp0s3/project-infra
a53795f5df0dbb22c94ba04da47e9ba2fdfe60ed
[ "Apache-2.0" ]
1,946
2017-07-03T13:00:30.000Z
2022-03-31T18:55:19.000Z
go_third_party.bzl
enp0s3/project-infra
a53795f5df0dbb22c94ba04da47e9ba2fdfe60ed
[ "Apache-2.0" ]
103
2017-07-03T09:53:36.000Z
2022-03-22T20:12:00.000Z
load("@bazel_gazelle//:deps.bzl", "go_repository") def go_deps(): go_repository( name = "ag_pack_amqp", build_file_proto_mode = "disable", importpath = "pack.ag/amqp", sum = "h1:cuNDWLUTbKRtEZwhB0WQBXf9pGbm87pUBXQhvcFxBWg=", version = "v0.11.2", ) go_repository( ...
38.474667
81
0.641536
load("@bazel_gazelle//:deps.bzl", "go_repository") def go_deps(): go_repository( name = "ag_pack_amqp", build_file_proto_mode = "disable", importpath = "pack.ag/amqp", sum = "h1:cuNDWLUTbKRtEZwhB0WQBXf9pGbm87pUBXQhvcFxBWg=", version = "v0.11.2", ) go_repository( ...
true
true
f731a62bb6c4d06bd43c8c0f54f539302a734f73
539
py
Python
regexlib/python_re2_test_file/regexlib_7018.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/python_re2_test_file/regexlib_7018.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/python_re2_test_file/regexlib_7018.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 7018 # ^([a-zA-Z](?:(?:(?:\w[\.\_]?)*)\w)+)([a-zA-Z0-9])$ # EXPONENT # nums:5 # EXPONENT AttackString:"a"+"_"*32+"!1 __EOA(iii)" import re2 as re from time import perf_counter regex = """^([a-zA-Z](?:(?:(?:\w[\.\_]?)*)\w)+)([a-zA-Z0-9])$""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "a" + "_"...
28.368421
64
0.541744
import re2 as re from time import perf_counter regex = """^([a-zA-Z](?:(?:(?:\w[\.\_]?)*)\w)+)([a-zA-Z0-9])$""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "a" + "_" * i * 1 + "!1 __EOA(iii)" LEN = len(ATTACK) BEGIN = perf_counter() m = REGEX.search(ATTACK) DURATION = perf_co...
true
true
f731a7aa0c3b474639722781f113b0d34999a1c2
1,011
py
Python
nova/api/openstack/compute/legacy_v2/contrib/used_limits_for_admin.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
7
2015-09-22T11:27:16.000Z
2015-11-02T12:33:46.000Z
nova/api/openstack/compute/legacy_v2/contrib/used_limits_for_admin.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
9
2015-05-20T11:20:17.000Z
2017-07-27T08:21:33.000Z
nova/api/openstack/compute/legacy_v2/contrib/used_limits_for_admin.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
13
2015-05-05T09:34:04.000Z
2017-11-08T02:03:46.000Z
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
38.884615
78
0.721068
from nova.api.openstack import extensions class Used_limits_for_admin(extensions.ExtensionDescriptor): name = "UsedLimitsForAdmin" alias = "os-used-limits-for-admin" namespace = ("http://docs.openstack.org/compute/ext/used_limits_for_admin" "/api/v1.1") updated = "2013-05-02T00:00:00...
true
true
f731a834130281feea54b8acb4fe90404145a770
1,064
py
Python
checkov/terraform/checks/resource/aws/PasswordPolicyExpiration.py
gustavotabares/checkov
79250dba0fc5227ef3027b3c1300739f063b0d05
[ "Apache-2.0" ]
null
null
null
checkov/terraform/checks/resource/aws/PasswordPolicyExpiration.py
gustavotabares/checkov
79250dba0fc5227ef3027b3c1300739f063b0d05
[ "Apache-2.0" ]
null
null
null
checkov/terraform/checks/resource/aws/PasswordPolicyExpiration.py
gustavotabares/checkov
79250dba0fc5227ef3027b3c1300739f063b0d05
[ "Apache-2.0" ]
null
null
null
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck class PasswordPolicyExpiration(BaseResourceCheck): def __init__(self): name = "Ensure IAM password policy expires passwords within 90 days or less" ...
38
106
0.698308
from checkov.common.models.enums import CheckResult, CheckCategories from checkov.terraform.checks.resource.base_resource_check import BaseResourceCheck class PasswordPolicyExpiration(BaseResourceCheck): def __init__(self): name = "Ensure IAM password policy expires passwords within 90 days or less" ...
true
true
f731aa3598934a92decae817cbccea150452d087
1,898
py
Python
python_modules/dagster/dagster_tests/api_tests/test_api_snapshot_execution_plan.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
1
2020-09-19T16:35:59.000Z
2020-09-19T16:35:59.000Z
python_modules/dagster/dagster_tests/api_tests/test_api_snapshot_execution_plan.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster_tests/api_tests/test_api_snapshot_execution_plan.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
from dagster.api.snapshot_execution_plan import sync_get_external_execution_plan from dagster.core.snap.execution_plan_snapshot import ExecutionPlanSnapshot from .utils import get_foo_pipeline_handle def test_execution_plan_snapshot_api(): pipeline_handle = get_foo_pipeline_handle() execution_plan_snapshot ...
33.892857
95
0.74236
from dagster.api.snapshot_execution_plan import sync_get_external_execution_plan from dagster.core.snap.execution_plan_snapshot import ExecutionPlanSnapshot from .utils import get_foo_pipeline_handle def test_execution_plan_snapshot_api(): pipeline_handle = get_foo_pipeline_handle() execution_plan_snapshot ...
true
true
f731aa9055ffb5d097e1f239a5baee16564f7fec
1,564
py
Python
improved-ver1/6.Real_Estate_Own_Data_Prediction_improved1.py
ARAN1218/RealEstateRentPrediction_AI
da537f3204fa1bc80a499a03b2fd015926ccc755
[ "MIT" ]
1
2021-06-26T04:44:14.000Z
2021-06-26T04:44:14.000Z
improved-ver1/6.Real_Estate_Own_Data_Prediction_improved1.py
ARAN1218/RealEstateRentPrediction_AI
da537f3204fa1bc80a499a03b2fd015926ccc755
[ "MIT" ]
1
2021-08-06T15:58:27.000Z
2021-11-27T14:59:00.000Z
improved-ver1/6.Real_Estate_Own_Data_Prediction_improved1.py
ARAN1218/RealEstateRentPrediction_AI
da537f3204fa1bc80a499a03b2fd015926ccc755
[ "MIT" ]
null
null
null
#必要なライブラリをインポート import numpy as np import pandas as pd import xgboost as xgb from sklearn.preprocessing import LabelEncoder #numpyのリスト表示制限を解除しておく np.set_printoptions(threshold=np.inf) #既に学習データとREDP関数を用いてAIが作成されているものとする #model = RERL(df_l) #住所と路線と間取りはラベルエンコーディングの都合により学習データ/テストデータにあったものしか使えない為、予め確保しておいた使える要素を表示させる ...
22.342857
74
0.671995
import numpy as np import pandas as pd import xgboost as xgb from sklearn.preprocessing import LabelEncoder np.set_printoptions(threshold=np.inf) print(adressC,'\n','\n',stationC,'\n','\n',layoutC) def REODP(address,station,access,mc_fees,k_fees,s_fees,area,layout,age): d_try = { '住所':address, ...
true
true
f731aaf8a13f76df61485cd65cdaf166bf910a5e
7,617
py
Python
modules/filter_bed.py
hillerlab/TOGA
c4bce48c760d51739a8a63132316f49de77e0c71
[ "MIT" ]
32
2020-07-20T03:18:28.000Z
2022-03-28T09:04:48.000Z
modules/filter_bed.py
hillerlab/TOGA
c4bce48c760d51739a8a63132316f49de77e0c71
[ "MIT" ]
28
2020-07-20T14:03:55.000Z
2022-02-28T08:08:39.000Z
modules/filter_bed.py
hillerlab/TOGA
c4bce48c760d51739a8a63132316f49de77e0c71
[ "MIT" ]
5
2020-07-23T13:03:32.000Z
2021-09-16T15:39:23.000Z
#!/usr/bin/env python3 """Filter bed-12 file. Remove: - incomplete annotations - genes without CDS """ import argparse import sys import re from collections import Counter try: from modules.common import die from modules.common import eprint except ImportError: from common import die from commom impor...
37.895522
97
0.616516
import argparse import sys import re from collections import Counter try: from modules.common import die from modules.common import eprint except ImportError: from common import die from commom import eprint __author__ = "Bogdan Kirilenko, 2020." __version__ = "1.0" __email__ = "bogdan.kirilenko@senck...
true
true
f731abd403e3a3f072d4bde30a655735bb7f1420
8,680
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.222222
236
0.673272
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from a...
true
true
f731ac74f48315280995265c0525ff9726f39e0d
1,156
py
Python
02_ukb/src/01_data_preparation/02_qdec_table/01_creat_qdec_table.py
Lifebrain/p025_education_brain
507cca3514b8ddbf65df7a047dba5bae1295badf
[ "MIT" ]
null
null
null
02_ukb/src/01_data_preparation/02_qdec_table/01_creat_qdec_table.py
Lifebrain/p025_education_brain
507cca3514b8ddbf65df7a047dba5bae1295badf
[ "MIT" ]
null
null
null
02_ukb/src/01_data_preparation/02_qdec_table/01_creat_qdec_table.py
Lifebrain/p025_education_brain
507cca3514b8ddbf65df7a047dba5bae1295badf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Purpose: Create qdec table import pandas as pd import numpy as np import glob import os.path as op import os data_csv = op.join(os.environ['TABULAR_DATA_DIR'],'data.csv') output_file = op.join(os.environ['QDEC_DATA_DIR'],'qdec.table.dat') fs_dir = "/cluster/projects/p23/data/open_datasets/u...
31.243243
113
0.675606
import pandas as pd import numpy as np import glob import os.path as op import os data_csv = op.join(os.environ['TABULAR_DATA_DIR'],'data.csv') output_file = op.join(os.environ['QDEC_DATA_DIR'],'qdec.table.dat') fs_dir = "/cluster/projects/p23/data/open_datasets/ukb_long/bids/derivatives/freesurfer.7.1.0/recon" df...
true
true
f731ad39fbfd6798ad047b1f2307e945dfddf5eb
14,114
py
Python
utime/callbacks/callbacks.py
amiyapatanaik/U-Time
a9ed4892da77d165a71dbfef1d069d782c909757
[ "MIT" ]
1
2022-03-15T12:31:30.000Z
2022-03-15T12:31:30.000Z
utime/callbacks/callbacks.py
amiyapatanaik/U-Time
a9ed4892da77d165a71dbfef1d069d782c909757
[ "MIT" ]
null
null
null
utime/callbacks/callbacks.py
amiyapatanaik/U-Time
a9ed4892da77d165a71dbfef1d069d782c909757
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from carbontracker.tracker import CarbonTracker from tensorflow.keras.callbacks import Callback from utime.utils import get_memory_usage from mpunet.utils import highlighted from mpunet.logging import ScreenLogger from collections import defaultdict from datetime import timedelta ...
41.511765
102
0.568372
import numpy as np import pandas as pd from carbontracker.tracker import CarbonTracker from tensorflow.keras.callbacks import Callback from utime.utils import get_memory_usage from mpunet.utils import highlighted from mpunet.logging import ScreenLogger from collections import defaultdict from datetime import timedelta ...
true
true
f731ad77a89b21efe9c339549c926df276f7e654
3,152
py
Python
stackalytics/processor/config.py
duongmn89/stackalytics
7b2412cddf5f48f42f92bc3400754a6c21742f0c
[ "Apache-2.0" ]
null
null
null
stackalytics/processor/config.py
duongmn89/stackalytics
7b2412cddf5f48f42f92bc3400754a6c21742f0c
[ "Apache-2.0" ]
null
null
null
stackalytics/processor/config.py
duongmn89/stackalytics
7b2412cddf5f48f42f92bc3400754a6c21742f0c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
44.394366
78
0.63769
import copy from oslo_config import cfg CONNECTION_OPTS = [ cfg.StrOpt('runtime-storage-uri', default='memcached://127.0.0.1:11211', help='Storage URI'), ] PROCESSOR_OPTS = [ cfg.StrOpt('default-data-uri', default='https://raw.githubusercontent.com/stackalytics/' ...
true
true
f731ad9e1174078405c48bb42fee69eb69fa5af1
1,103
py
Python
piqa/model/tokenizers.py
AndrzejGretkowski/masters-piqa
5924cb5261bbcc2bb9970622c12c29f49bdea6e7
[ "MIT" ]
null
null
null
piqa/model/tokenizers.py
AndrzejGretkowski/masters-piqa
5924cb5261bbcc2bb9970622c12c29f49bdea6e7
[ "MIT" ]
null
null
null
piqa/model/tokenizers.py
AndrzejGretkowski/masters-piqa
5924cb5261bbcc2bb9970622c12c29f49bdea6e7
[ "MIT" ]
null
null
null
from transformers import AlbertTokenizerFast, RobertaTokenizerFast, DistilBertTokenizerFast from piqa.model.tokenizers_base import BaseTokenizerPIQA class PIQATokenizer(object): tokenizer_mapping = dict() @classmethod def register(cls, *args): def decorator(fn): for arg in args: ...
27.575
101
0.724388
from transformers import AlbertTokenizerFast, RobertaTokenizerFast, DistilBertTokenizerFast from piqa.model.tokenizers_base import BaseTokenizerPIQA class PIQATokenizer(object): tokenizer_mapping = dict() @classmethod def register(cls, *args): def decorator(fn): for arg in args: ...
true
true
f731ae5909a825418b54595ca18abd70d6832fb9
1,895
py
Python
home/urls.py
Paphra/recruitment-cms
2894d5285a6da4ff47c114377968c8fda95c24b6
[ "MIT" ]
2
2021-02-07T12:08:47.000Z
2021-02-22T07:12:53.000Z
home/urls.py
Paphra/recruitment-cms
2894d5285a6da4ff47c114377968c8fda95c24b6
[ "MIT" ]
null
null
null
home/urls.py
Paphra/recruitment-cms
2894d5285a6da4ff47c114377968c8fda95c24b6
[ "MIT" ]
null
null
null
from django.urls import path from . import views from files import views as files from finances import views as finances from others import views as others from operations import views as operations urlpatterns = [ path('clients/<int:client_id>/pay-reg-fee', views.pay_reg_fee, name='pay-reg-fee'), path('clie...
39.479167
87
0.692876
from django.urls import path from . import views from files import views as files from finances import views as finances from others import views as others from operations import views as operations urlpatterns = [ path('clients/<int:client_id>/pay-reg-fee', views.pay_reg_fee, name='pay-reg-fee'), path('clie...
true
true
f731afae0e47cb38488bcaa0764e4ae4aadbc6ac
6,801
py
Python
kerberos.py
bbhunter/kerberoast
e983ba1d5290e94c71e04fc15dc2cee482873f18
[ "Apache-2.0" ]
1,011
2015-03-17T21:52:07.000Z
2022-03-31T09:25:41.000Z
kerberos.py
bbhunter/kerberoast
e983ba1d5290e94c71e04fc15dc2cee482873f18
[ "Apache-2.0" ]
16
2015-07-08T09:12:27.000Z
2022-03-05T19:04:26.000Z
kerberos.py
bbhunter/kerberoast
e983ba1d5290e94c71e04fc15dc2cee482873f18
[ "Apache-2.0" ]
274
2015-04-28T21:24:23.000Z
2022-03-29T18:37:27.000Z
#!/usr/bin/env python3 -tt import hashlib import hmac from pyasn1.type import univ, char, useful, tag from pyasn1.codec.ber import encoder, decoder import datetime import base64 import sys #REF: http://tools.ietf.org/id/draft-brezak-win2k-krb-rc4-hmac-03.txt #T = 1 for TS-ENC-TS in the AS-Request #T = 8 for the AS-...
34.522843
97
0.551242
import hashlib import hmac from pyasn1.type import univ, char, useful, tag from pyasn1.codec.ber import encoder, decoder import datetime import base64 import sys def ntlmhash(s): hash = hashlib.new('md4', s.encode('utf-16le')).digest() return hash def rc4crypt(key, data): x = 0 box = list(rang...
true
true
f731b06c3942398040ef6910dde20647365a1923
992
py
Python
IPAddressPool/IPAddressPool/ip/IpAcquire.py
ruxuezhuimeng/spider
badf61a66e99cf1936b5c404ad85f1b00838943e
[ "MIT" ]
1
2020-06-17T05:56:19.000Z
2020-06-17T05:56:19.000Z
IPAddressPool/IPAddressPool/ip/IpAcquire.py
ruxuezhuimeng/spider
badf61a66e99cf1936b5c404ad85f1b00838943e
[ "MIT" ]
null
null
null
IPAddressPool/IPAddressPool/ip/IpAcquire.py
ruxuezhuimeng/spider
badf61a66e99cf1936b5c404ad85f1b00838943e
[ "MIT" ]
null
null
null
from config.SourceUrl import getUrl from ip.Ip2Db import insert import threading import requests from Log import log header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' } def acquireIp(): aUrl = getUrl() log.info('获...
26.810811
134
0.566532
from config.SourceUrl import getUrl from ip.Ip2Db import insert import threading import requests from Log import log header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36' } def acquireIp(): aUrl = getUrl() log.info('获...
true
true
f731b08e6a086de9df0318dd73e3fdb7854f1ed6
1,413
py
Python
models/diabetes/train.py
aditya9126/pipelines-azureml
0c747f12e02ee3d3976746663bd1da0ab5935887
[ "CC-BY-4.0", "MIT" ]
null
null
null
models/diabetes/train.py
aditya9126/pipelines-azureml
0c747f12e02ee3d3976746663bd1da0ab5935887
[ "CC-BY-4.0", "MIT" ]
null
null
null
models/diabetes/train.py
aditya9126/pipelines-azureml
0c747f12e02ee3d3976746663bd1da0ab5935887
[ "CC-BY-4.0", "MIT" ]
null
null
null
# new update import pickle import os import numpy as np from sklearn.datasets import load_diabetes from sklearn.linear_model import Ridge from sklearn.metrics import mean_squared_error from sklearn.model_selection import train_test_split from azureml.core.run import Run from utils import mylib os.makedirs('./outputs...
31.4
99
0.643312
import pickle import os import numpy as np from sklearn.datasets import load_diabetes from sklearn.linear_model import Ridge from sklearn.metrics import mean_squared_error from sklearn.model_selection import train_test_split from azureml.core.run import Run from utils import mylib os.makedirs('./outputs', exist_ok=T...
true
true
f731b0a7f4cf43d68c7253dd502f524c7bafe510
1,522
py
Python
src/ewaluacja2021/management/commands/raport_3n_to_xlsx.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
src/ewaluacja2021/management/commands/raport_3n_to_xlsx.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
41
2019-11-07T00:07:02.000Z
2022-02-27T22:09:39.000Z
src/ewaluacja2021/management/commands/raport_3n_to_xlsx.py
iplweb/bpp
f027415cc3faf1ca79082bf7bacd4be35b1a6fdf
[ "BSD-3-Clause" ]
null
null
null
# -*- encoding: utf-8 -*- import os from argparse import FileType from django.core.management import BaseCommand from ewaluacja2021.reports import load_data, rekordy from ewaluacja2021.util import autor2fn from ewaluacja2021.xlsy import AutorskiXLSX, CalosciowyXLSX from bpp.models import Autor from bpp.util import p...
30.44
82
0.635348
import os from argparse import FileType from django.core.management import BaseCommand from ewaluacja2021.reports import load_data, rekordy from ewaluacja2021.util import autor2fn from ewaluacja2021.xlsy import AutorskiXLSX, CalosciowyXLSX from bpp.models import Autor from bpp.util import pbar class Command(BaseCo...
true
true
f731b0e7750a7bea8517170165c3c68c3dc22cf8
844
py
Python
setup.py
jbarbadillo/pycoinmon
035e64652c533a569c6b236f54e12aff35ad82b1
[ "MIT" ]
null
null
null
setup.py
jbarbadillo/pycoinmon
035e64652c533a569c6b236f54e12aff35ad82b1
[ "MIT" ]
null
null
null
setup.py
jbarbadillo/pycoinmon
035e64652c533a569c6b236f54e12aff35ad82b1
[ "MIT" ]
null
null
null
from setuptools import setup from pycoinmon.metadata import Metadata metadata = Metadata() setup( name = 'pycoinmon', packages = ['pycoinmon'], version = metadata.get_version(), license = 'MIT', description = 'Python Port Based on COINMON', url = 'https://github.com/RDCH106/pycoinmon', key...
40.190476
115
0.575829
from setuptools import setup from pycoinmon.metadata import Metadata metadata = Metadata() setup( name = 'pycoinmon', packages = ['pycoinmon'], version = metadata.get_version(), license = 'MIT', description = 'Python Port Based on COINMON', url = 'https://github.com/RDCH106/pycoinmon', key...
true
true
f731b187b5cb80cd697134e200a8839565bad37f
453
py
Python
card.py
yehudareisler/risky-game
ea919bd07a2acf75dfd184b5c59ad80d41f47428
[ "MIT" ]
3
2021-01-21T02:06:12.000Z
2022-03-14T10:26:43.000Z
card.py
yehudareisler/risky-game
ea919bd07a2acf75dfd184b5c59ad80d41f47428
[ "MIT" ]
null
null
null
card.py
yehudareisler/risky-game
ea919bd07a2acf75dfd184b5c59ad80d41f47428
[ "MIT" ]
1
2021-08-29T07:47:12.000Z
2021-08-29T07:47:12.000Z
from enum import Enum class Card: card_type = None territory_name = '' def __init__(self, territory_name, card_type): self.territory_name = territory_name self.card_type = card_type def __str__(self): return f'Card of {self.territory_name} with {self.card_type} type' class ...
18.875
74
0.646799
from enum import Enum class Card: card_type = None territory_name = '' def __init__(self, territory_name, card_type): self.territory_name = territory_name self.card_type = card_type def __str__(self): return f'Card of {self.territory_name} with {self.card_type} type' class ...
true
true
f731b1ea9b5a643b7fe01d0c7b531d8169710a1a
401
py
Python
mmtbx/command_line/ntc_validation.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
mmtbx/command_line/ntc_validation.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
mmtbx/command_line/ntc_validation.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function # LIBTBX_SET_DISPATCHER_NAME cctbx.development.ntc_validation from iotbx.cli_parser import run_program from mmtbx.programs.ntc_validation import Program # ==========================================================================...
33.416667
79
0.645885
from __future__ import absolute_import, division, print_function from iotbx.cli_parser import run_program from mmtbx.programs.ntc_validation import Program if (__name__ == '__main__'): results = run_program(program_class=Program)
true
true
f731b29f030996794fb1c57d9250faa45d387432
811
py
Python
1 Scripto/07.py
peterszerzo/rhino-pythonscript-tutorials
880861eecc4e7dd5897695aae532e81c9bcacf94
[ "MIT" ]
2
2019-10-26T17:25:57.000Z
2020-12-29T14:52:45.000Z
1 Scripto/07.py
peterszerzo/rhino-pythonscript-tutorials
880861eecc4e7dd5897695aae532e81c9bcacf94
[ "MIT" ]
1
2019-04-23T02:17:35.000Z
2019-04-23T10:24:51.000Z
1 Scripto/07.py
peterszerzo/rhino-pythonscript-tutorials
880861eecc4e7dd5897695aae532e81c9bcacf94
[ "MIT" ]
null
null
null
""" Rhino Python Script Tutorial Exercise 07 Let's reorganize the previous code to store the coordinates of our points in a list. This list is called an array. The following lesson explains why this is useful. """ import rhinoscriptsyntax as rs import math def Main(): n = 50 radius_0 = 3 poin...
19.309524
84
0.574599
""" Rhino Python Script Tutorial Exercise 07 Let's reorganize the previous code to store the coordinates of our points in a list. This list is called an array. The following lesson explains why this is useful. """ import rhinoscriptsyntax as rs import math def Main(): n = 50 radius_0 = 3 poin...
false
true
f731b41b93060edbb8a60d852567a8c02dfe18c9
19,457
py
Python
hive/indexer/cached_post.py
RailCoin/hivemind
cd78b952b55911b63a59c762d1d4530a25d7d8f5
[ "MIT" ]
null
null
null
hive/indexer/cached_post.py
RailCoin/hivemind
cd78b952b55911b63a59c762d1d4530a25d7d8f5
[ "MIT" ]
null
null
null
hive/indexer/cached_post.py
RailCoin/hivemind
cd78b952b55911b63a59c762d1d4530a25d7d8f5
[ "MIT" ]
1
2020-03-24T12:26:08.000Z
2020-03-24T12:26:08.000Z
"""Manages cached post data.""" import math import collections import logging import ujson as json from toolz import partition_all from hive.db.adapter import Db from hive.utils.post import post_basic, post_legacy, post_payout, post_stats from hive.utils.timer import Timer from hive.indexer.accounts import Accounts ...
38.991984
83
0.582412
import math import collections import logging import ujson as json from toolz import partition_all from hive.db.adapter import Db from hive.utils.post import post_basic, post_legacy, post_payout, post_stats from hive.utils.timer import Timer from hive.indexer.accounts import Accounts log = logging.getLogger(__name_...
true
true
f731b44538e1b9c630d1af353fa35d3677a745d9
1,210
py
Python
BotClean_Large.py
Aditya148/Hackerrank-Artificial-Intelligence
5abbe561115b75cb28397661b7b0d7d53486ffee
[ "MIT" ]
null
null
null
BotClean_Large.py
Aditya148/Hackerrank-Artificial-Intelligence
5abbe561115b75cb28397661b7b0d7d53486ffee
[ "MIT" ]
null
null
null
BotClean_Large.py
Aditya148/Hackerrank-Artificial-Intelligence
5abbe561115b75cb28397661b7b0d7d53486ffee
[ "MIT" ]
null
null
null
import math def update_position(posr, posc, dirties): nearest_dirt = [] for i in range(len(dirties)): # Euclidean distance result = math.sqrt(((dirties[i][0] - posr) ** 2) + ((dirties[i][1] - posc) ** 2)) nearest_dirt.append(result) return [x for (y,x) in sorted(zip(nearest_dirt,dir...
22.407407
89
0.539669
import math def update_position(posr, posc, dirties): nearest_dirt = [] for i in range(len(dirties)): result = math.sqrt(((dirties[i][0] - posr) ** 2) + ((dirties[i][1] - posc) ** 2)) nearest_dirt.append(result) return [x for (y,x) in sorted(zip(nearest_dirt,dirties))] def next...
true
true
f731b4a38a9bc8969c194157663764cf285ad1bc
4,079
py
Python
AC_Network.py
pasindubawantha/just-copy
919b1723c87cadc5946f891da53f4abc7d50ff6e
[ "Apache-2.0" ]
1
2020-07-30T19:29:06.000Z
2020-07-30T19:29:06.000Z
AC_Network.py
pasindubawantha/just-copy
919b1723c87cadc5946f891da53f4abc7d50ff6e
[ "Apache-2.0" ]
null
null
null
AC_Network.py
pasindubawantha/just-copy
919b1723c87cadc5946f891da53f4abc7d50ff6e
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import tensorflow.contrib.slim as slim #import tensorflow.nn as slim import numpy as np from helpers import * class AC_Network(): def __init__(self,s_size,a_size,scope,trainer,s_shape): with tf.variable_scope(scope): #Input and visual encoding layers self.inp...
53.671053
109
0.617308
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np from helpers import * class AC_Network(): def __init__(self,s_size,a_size,scope,trainer,s_shape): with tf.variable_scope(scope): self.inputs = tf.placeholder(shape=[None,s_size],dtype=tf.float32) ...
true
true
f731b554fa6750e8f70b9ce4eeb1ca9577514c53
7,291
py
Python
tests/pipeline/test_node_run.py
andmikey/kedro
9b4e4135720609d44ffdf5248246fe805f0b5469
[ "Apache-2.0" ]
1
2021-11-19T05:36:47.000Z
2021-11-19T05:36:47.000Z
tests/pipeline/test_node_run.py
andmikey/kedro
9b4e4135720609d44ffdf5248246fe805f0b5469
[ "Apache-2.0" ]
null
null
null
tests/pipeline/test_node_run.py
andmikey/kedro
9b4e4135720609d44ffdf5248246fe805f0b5469
[ "Apache-2.0" ]
1
2021-11-19T05:36:49.000Z
2021-11-19T05:36:49.000Z
# Copyright 2018-2019 QuantumBlack Visual Analytics Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THE SOFTWARE IS PROVIDED "AS IS"...
42.888235
86
0.665478
import pytest from kedro.io import LambdaDataSet from kedro.pipeline import node @pytest.fixture def mocked_dataset(mocker): load = mocker.Mock(return_value=42) save = mocker.Mock() return LambdaDataSet(load, save) def one_in_one_out(arg): return arg def one_in_dict_out(arg): return dict(re...
true
true
f731b5fbc7cc5db0a0a57a78bcbce234f1e07f3c
2,103
py
Python
beta_rec/recommenders/userKNN.py
mengzaiqiao/TVBR
cdac86a753c41f8f3c55a025be8d88dd305325f5
[ "MIT" ]
126
2020-03-19T02:30:23.000Z
2022-03-15T11:10:46.000Z
beta_rec/recommenders/userKNN.py
mengzaiqiao/TVBR
cdac86a753c41f8f3c55a025be8d88dd305325f5
[ "MIT" ]
174
2020-03-15T17:28:10.000Z
2022-03-15T22:38:51.000Z
beta_rec/recommenders/userKNN.py
mengzaiqiao/TVBR
cdac86a753c41f8f3c55a025be8d88dd305325f5
[ "MIT" ]
38
2020-03-19T00:38:47.000Z
2022-02-24T11:03:12.000Z
import os import time from munch import munchify from ray import tune from ..core.recommender import Recommender from ..models.userKNN import UserKNNEngine from ..utils.monitor import Monitor def tune_train(config): """Train the model with a hyper-parameter tuner (ray). Args: config (dict): All the...
27.311688
86
0.611032
import os import time from munch import munchify from ray import tune from ..core.recommender import Recommender from ..models.userKNN import UserKNNEngine from ..utils.monitor import Monitor def tune_train(config): data = config["data"] train_engine = UserKNN(munchify(config)) result = train_engine.tra...
true
true
f731b60bb39975a9d09169527228d3f67c163104
2,647
py
Python
sdk/python/tests/integration/feature_repos/universal/data_sources/redshift.py
yrbahn/feast
b5648f0cb6109594fcc8881237ddd583960d244f
[ "Apache-2.0" ]
null
null
null
sdk/python/tests/integration/feature_repos/universal/data_sources/redshift.py
yrbahn/feast
b5648f0cb6109594fcc8881237ddd583960d244f
[ "Apache-2.0" ]
null
null
null
sdk/python/tests/integration/feature_repos/universal/data_sources/redshift.py
yrbahn/feast
b5648f0cb6109594fcc8881237ddd583960d244f
[ "Apache-2.0" ]
null
null
null
from typing import Dict import pandas as pd from feast import RedshiftSource from feast.data_source import DataSource from feast.infra.offline_stores.redshift import RedshiftOfflineStoreConfig from feast.infra.utils import aws_utils from feast.repo_config import FeastConfigBaseModel from tests.integration.feature_rep...
33.0875
90
0.656215
from typing import Dict import pandas as pd from feast import RedshiftSource from feast.data_source import DataSource from feast.infra.offline_stores.redshift import RedshiftOfflineStoreConfig from feast.infra.utils import aws_utils from feast.repo_config import FeastConfigBaseModel from tests.integration.feature_rep...
true
true
f731b61e890831d1cd4fbf37958278bb584384cb
2,988
py
Python
setup.py
NeilBotelho/pip
d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f
[ "MIT" ]
null
null
null
setup.py
NeilBotelho/pip
d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f
[ "MIT" ]
1
2021-10-04T12:25:25.000Z
2021-10-05T07:30:54.000Z
setup.py
NeilBotelho/pip
d01bfcfaa13a4f06fa0ce61fa18cf06012f2e78f
[ "MIT" ]
1
2020-06-01T19:13:16.000Z
2020-06-01T19:13:16.000Z
# The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import codecs import os import sys from setuptools import find_packages, setup def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) # intentionally *not* adding an encoding option to o...
33.2
76
0.598728
import codecs import os import sys from setuptools import find_packages, setup def read(rel_path): here = os.path.abspath(os.path.dirname(__file__)) with codecs.open(os.path.join(here, rel_path), 'r') as fp: return fp.read() def get_version(rel_path): for line in read(rel_path).splitli...
true
true
f731b631d25327869866e36afed8e0d2ed3b20d4
184
py
Python
domain/message.py
wazatoki/IotLoggerClientSample
e69f0f5f4caa3714041f4d5e8a16cde03bbbd912
[ "MIT" ]
null
null
null
domain/message.py
wazatoki/IotLoggerClientSample
e69f0f5f4caa3714041f4d5e8a16cde03bbbd912
[ "MIT" ]
2
2021-04-06T18:18:36.000Z
2021-06-02T02:26:19.000Z
domain/message.py
wazatoki/IotLoggerClientSample
e69f0f5f4caa3714041f4d5e8a16cde03bbbd912
[ "MIT" ]
null
null
null
class message_data: device_id = "" message = "" def get_Data(self): return { "deviceID": self.device_id, "message": self.message }
18.4
39
0.505435
class message_data: device_id = "" message = "" def get_Data(self): return { "deviceID": self.device_id, "message": self.message }
true
true
f731b70415e7f66bf51834ee97e333db6e5dc6c6
52,857
py
Python
Lib/test/test_array.py
chexca/cpython
cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa
[ "CNRI-Python-GPL-Compatible" ]
1,318
2019-07-11T10:34:39.000Z
2022-03-29T15:05:19.000Z
Lib/test/test_array.py
chexca/cpython
cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa
[ "CNRI-Python-GPL-Compatible" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
Lib/test/test_array.py
chexca/cpython
cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa
[ "CNRI-Python-GPL-Compatible" ]
66
2019-11-11T15:33:12.000Z
2022-03-01T07:55:55.000Z
"""Test the arraymodule. Roger E. Masse """ import unittest from test import support from test.support import _2G import weakref import pickle import operator import struct import sys import array from array import _array_reconstructor as array_reconstructor sizeof_wchar = array.array('u').itemsize class ArrayS...
34.751479
92
0.572999
import unittest from test import support from test.support import _2G import weakref import pickle import operator import struct import sys import array from array import _array_reconstructor as array_reconstructor sizeof_wchar = array.array('u').itemsize class ArraySubclass(array.array): pass class ArraySubc...
true
true
f731b7992515f911392bdff02585fa6debdfa83b
1,504
py
Python
apps/contrib/models/mixins.py
vicobits/django-wise
3fdc01eabdff459b31e016f9f6d1cafc19c5a292
[ "MIT" ]
5
2020-04-11T20:11:48.000Z
2021-03-16T23:58:01.000Z
apps/contrib/models/mixins.py
victoraguilarc/django-wise
3fdc01eabdff459b31e016f9f6d1cafc19c5a292
[ "MIT" ]
5
2020-04-11T20:17:56.000Z
2021-06-16T19:18:29.000Z
apps/contrib/models/mixins.py
victoraguilarc/django-wise
3fdc01eabdff459b31e016f9f6d1cafc19c5a292
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import uuid from django.db import models class TimeStampedModelMixin(models.Model): """Timestamp extra field. An abstract base class model that provides self updating 'created' and 'modified' fields https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.DateFie...
25.491525
100
0.691489
import uuid from django.db import models class TimeStampedModelMixin(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True ordering = ['-created_at', '-updated_at'] class UUIDModelMixin(models.M...
true
true
f731b7d1d6104774ffc3c228a51322e1885b01cf
18,640
py
Python
meta_dataset/analysis/select_best_model.py
jishnujayakumar/meta-dataset
fac43975e7e8931bd9c9a9171268758e26469646
[ "Apache-2.0" ]
643
2019-03-05T18:42:45.000Z
2022-03-27T21:20:46.000Z
meta_dataset/analysis/select_best_model.py
jishnujayakumar/meta-dataset
fac43975e7e8931bd9c9a9171268758e26469646
[ "Apache-2.0" ]
80
2019-03-16T15:42:49.000Z
2022-03-30T22:22:31.000Z
meta_dataset/analysis/select_best_model.py
jishnujayakumar/meta-dataset
fac43975e7e8931bd9c9a9171268758e26469646
[ "Apache-2.0" ]
126
2019-03-14T01:36:32.000Z
2022-03-26T17:33:11.000Z
# coding=utf-8 # Copyright 2021 The Meta-Dataset Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
39.82906
110
0.712554
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os from absl import logging import numpy as np from six.moves import range from six.moves import zip import six.moves.cPickle as pkl import tensorflow.compat.v1 as tf FLAGS = tf.flags.FLA...
true
true
f731b83aa10a8eac18891fcac6e5c14b63d9aa57
355
py
Python
nikebot/__version__.py
olegaobini/NikeBot
fec0943c9dd215d05403bedfc69ef8a8ac0b228c
[ "MIT" ]
null
null
null
nikebot/__version__.py
olegaobini/NikeBot
fec0943c9dd215d05403bedfc69ef8a8ac0b228c
[ "MIT" ]
null
null
null
nikebot/__version__.py
olegaobini/NikeBot
fec0943c9dd215d05403bedfc69ef8a8ac0b228c
[ "MIT" ]
null
null
null
__logo__ = """ NikeBot """ __title__ = 'nikebotandroid' __description__ = 'A retail automation bot for the Nike mobile app' __url__ = 'https: // github.com/olegaobini/NikeBot' __version__ = '0.0.1' __debug_mode__ = False __author__ = 'Olega Obini' __author_email__ = 'obiniolega@gmail.com' __license__ = 'MIT' __copyrigh...
27.307692
67
0.752113
__logo__ = """ NikeBot """ __title__ = 'nikebotandroid' __description__ = 'A retail automation bot for the Nike mobile app' __url__ = 'https: // github.com/olegaobini/NikeBot' __version__ = '0.0.1' __debug_mode__ = False __author__ = 'Olega Obini' __author_email__ = 'obiniolega@gmail.com' __license__ = 'MIT' __copyrigh...
true
true
f731b843168340ad5c3d5f4674b0c14240c39751
5,587
py
Python
gremlin-python/src/main/python/tests/process/test_traversal.py
helpspace-co/tinkerpop
a31e8f402237de3491397d4f8bbd6a9761cd9068
[ "Apache-2.0" ]
1,425
2016-06-13T06:08:39.000Z
2022-03-28T09:02:43.000Z
gremlin-python/src/main/python/tests/process/test_traversal.py
helpspace-co/tinkerpop
a31e8f402237de3491397d4f8bbd6a9761cd9068
[ "Apache-2.0" ]
1,049
2016-06-10T10:25:59.000Z
2022-03-30T11:25:44.000Z
gremlin-python/src/main/python/tests/process/test_traversal.py
helpspace-co/tinkerpop
a31e8f402237de3491397d4f8bbd6a9761cd9068
[ "Apache-2.0" ]
732
2016-06-13T20:53:51.000Z
2022-03-30T06:49:29.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...
42.325758
151
0.642742
__author__ = 'Marko A. Rodriguez (http://markorodriguez.com)' from pytest import fail from gremlin_python.structure.graph import Graph from gremlin_python.process.anonymous_traversal import traversal from gremlin_python.process.traversal import P from gremlin_python.process.traversal import Binding, Bindings from gr...
true
true
f731b86cd45adfb32aa7de95f369a6218bdbc653
42,404
py
Python
tests/test_data.py
sdrobert/pydrobert-pytorch
7abad0dbb2e80b4267aebcee492aa9fd7d83ea3f
[ "Apache-2.0" ]
14
2019-01-04T21:19:55.000Z
2021-01-06T16:01:03.000Z
tests/test_data.py
sdrobert/pydrobert-pytorch
7abad0dbb2e80b4267aebcee492aa9fd7d83ea3f
[ "Apache-2.0" ]
6
2021-04-17T23:34:57.000Z
2022-02-11T00:49:41.000Z
tests/test_data.py
sdrobert/pydrobert-pytorch
7abad0dbb2e80b4267aebcee492aa9fd7d83ea3f
[ "Apache-2.0" ]
1
2020-05-19T08:03:43.000Z
2020-05-19T08:03:43.000Z
# Copyright 2021 Sean Robertson # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
36.027188
88
0.603905
import os from itertools import repeat from io import StringIO import pytest import torch import torch.utils.data import pydrobert.torch.data as data from pydrobert.torch import INDEX_PAD_VALUE @pytest.mark.cpu @pytest.mark.parametrize("left", [0, 1, 100]) @pytest.mark.parametrize("right", [0, 1, 100]) @pytest.m...
true
true
f731b8a53d9c151e77995f19a47fbebe678c89cd
769
py
Python
create.py
keatonkraiger/pysot-mot
b1447dc9569339592a09b25b097b363cff9f6de4
[ "Apache-2.0" ]
null
null
null
create.py
keatonkraiger/pysot-mot
b1447dc9569339592a09b25b097b363cff9f6de4
[ "Apache-2.0" ]
null
null
null
create.py
keatonkraiger/pysot-mot
b1447dc9569339592a09b25b097b363cff9f6de4
[ "Apache-2.0" ]
null
null
null
import os import re import imageio from glob import glob from PIL import Image SAVE_FORMAT = 'gif' video_name = 'ants1' image_folder = os.path.join(os.getcwd(), 'demo/demo_images/') #images = [img for img in os.listdir(image_folder) if img.endswith(".jpg")] #images.sort(key=lambda var:[int(x) if x.isdigit() else ...
24.03125
90
0.638492
import os import re import imageio from glob import glob from PIL import Image SAVE_FORMAT = 'gif' video_name = 'ants1' image_folder = os.path.join(os.getcwd(), 'demo/demo_images/') if SAVE_FORMAT == 'gif': images = [] images = glob("demo/demo_images/*.jpg") images.sort(key=lambda var:[int(x) if x.i...
true
true
f731b9052df0f2dc9c9b090455306ea466ce939c
253
py
Python
cmdline_provenance/__init__.py
znicholls/cmdline_provenance
c9df55a9e4b0e7435499993c39eb9ff7e360b1c6
[ "MIT" ]
null
null
null
cmdline_provenance/__init__.py
znicholls/cmdline_provenance
c9df55a9e4b0e7435499993c39eb9ff7e360b1c6
[ "MIT" ]
null
null
null
cmdline_provenance/__init__.py
znicholls/cmdline_provenance
c9df55a9e4b0e7435499993c39eb9ff7e360b1c6
[ "MIT" ]
null
null
null
"""Utilities for capturing the history of commands used to produce a given output""" from .cmdline_provenance import new_log from .cmdline_provenance import read_log from .cmdline_provenance import write_log __all__ = [new_log, read_log, write_log]
25.3
84
0.810277
from .cmdline_provenance import new_log from .cmdline_provenance import read_log from .cmdline_provenance import write_log __all__ = [new_log, read_log, write_log]
true
true
f731b912d65c6127ea588331a16ed36a53def65b
3,387
py
Python
homeassistant/components/tmb/sensor.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
homeassistant/components/tmb/sensor.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
58
2020-08-03T07:33:02.000Z
2022-03-31T06:02:05.000Z
homeassistant/components/tmb/sensor.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Support for TMB (Transports Metropolitans de Barcelona) Barcelona public transport.""" from datetime import timedelta import logging from requests import HTTPError from tmb import IBus import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUT...
27.991736
89
0.660171
from datetime import timedelta import logging from requests import HTTPError from tmb import IBus import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME, TIME_MINUTES import homeassistant.helpers.config_validation as cv from hom...
true
true
f731b91eec02eb0ee49fd3752978d19259b17ce2
5,140
py
Python
my_memory_card.py
all0ws/memorecard
ba90d4fd0663f11c963907290c19ad1305ba67cb
[ "CC0-1.0" ]
null
null
null
my_memory_card.py
all0ws/memorecard
ba90d4fd0663f11c963907290c19ad1305ba67cb
[ "CC0-1.0" ]
null
null
null
my_memory_card.py
all0ws/memorecard
ba90d4fd0663f11c963907290c19ad1305ba67cb
[ "CC0-1.0" ]
null
null
null
from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QApplication, QWidget, QHBoxLayout, QVBoxLayout, QGroupBox, QButtonGroup, QRadioButton, QPushButton, QLabel) from random import shuffle,randint class Question(): def __init__(self,question,right_answer,wrong1,wrong2 ,wrong3): self...
31.533742
138
0.706809
from PyQt5.QtCore import Qt from PyQt5.QtWidgets import (QApplication, QWidget, QHBoxLayout, QVBoxLayout, QGroupBox, QButtonGroup, QRadioButton, QPushButton, QLabel) from random import shuffle,randint class Question(): def __init__(self,question,right_answer,wrong1,wrong2 ,wrong3): self...
true
true
f731baf2c2d2eefe7ec99e5e55ef74d57635e126
1,624
py
Python
tools/mo/unit_tests/mo/ops/dft_signal_size_canonicalization_test.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/unit_tests/mo/ops/dft_signal_size_canonicalization_test.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/unit_tests/mo/ops/dft_signal_size_canonicalization_test.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest import numpy as np from generator import generator, generate from openvino.tools.mo.ops.dft import FFTBase from openvino.tools.mo.front.common.partial_infer.utils import int64_array @generator class DFTSignalSizeCanon...
38.666667
109
0.606527
import unittest import numpy as np from generator import generator, generate from openvino.tools.mo.ops.dft import FFTBase from openvino.tools.mo.front.common.partial_infer.utils import int64_array @generator class DFTSignalSizeCanonicalizationTest(unittest.TestCase): @generate(*[ (int64_array([-1, 77]...
true
true
f731bcca089c5e02b3aa0fbb5699fe5db61f89d1
30,419
py
Python
back of code/RSCFN/rsden/models/rsn_cluster # without 0 fuse cluster.py
lidongyv/Monocular-depth-esitimation-with-region-support-cvpr
7715c91b9c9f88de5c0233923c3a073edf9b2ca8
[ "Apache-2.0" ]
null
null
null
back of code/RSCFN/rsden/models/rsn_cluster # without 0 fuse cluster.py
lidongyv/Monocular-depth-esitimation-with-region-support-cvpr
7715c91b9c9f88de5c0233923c3a073edf9b2ca8
[ "Apache-2.0" ]
null
null
null
back of code/RSCFN/rsden/models/rsn_cluster # without 0 fuse cluster.py
lidongyv/Monocular-depth-esitimation-with-region-support-cvpr
7715c91b9c9f88de5c0233923c3a073edf9b2ca8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: lidong # @Date: 2018-03-20 18:01:52 # @Last Modified by: yulidong # @Last Modified time: 2018-11-06 20:45:11 import torch import numpy as np import torch.nn as nn import math from math import ceil from torch.autograd import Variable from rsden.cluster_loss import * from rsden imp...
49.704248
180
0.571715
import torch import numpy as np import torch.nn as nn import math from math import ceil from torch.autograd import Variable from rsden.cluster_loss import * from rsden import caffe_pb2 from rsden.models.utils import * import time cuda_id=3 group_dim=1 def mean_shift(feature,mean,bandwidth): for t in range(10):...
true
true
f731bcccc4e6d8aaa6addf7cc5d2ba13d7d25f7c
907
py
Python
feed_generator.py
chand1012/static-rss-generator
931ae40b156232d783202520c34bd175f615d4a4
[ "MIT" ]
1
2021-07-31T14:55:05.000Z
2021-07-31T14:55:05.000Z
feed_generator.py
chand1012/static-rss-generator
931ae40b156232d783202520c34bd175f615d4a4
[ "MIT" ]
null
null
null
feed_generator.py
chand1012/static-rss-generator
931ae40b156232d783202520c34bd175f615d4a4
[ "MIT" ]
null
null
null
from datetime import datetime import random import json import arrow import feedparser from rfeed import Feed, Item # returns the feed string given the JSON object def generate_feed(link_data: list[dict], rss_link: str) -> str: data = [] for link in link_data: feed = feedparser.parse(list(link.keys(...
25.914286
79
0.594267
from datetime import datetime import random import json import arrow import feedparser from rfeed import Feed, Item def generate_feed(link_data: list[dict], rss_link: str) -> str: data = [] for link in link_data: feed = feedparser.parse(list(link.keys())[0]) for i in range(list(link.values()...
true
true
f731bd9216657521387add8186e360b1be8b9acc
20,089
py
Python
tests/unit/containers/test_declarative_py2_py3.py
whysage/python-dependency-injector
cef6d35cfdf5f39438a89f000d11a21860bc8c5f
[ "BSD-3-Clause" ]
1,997
2016-04-26T13:41:45.000Z
2022-03-31T16:17:53.000Z
tests/unit/containers/test_declarative_py2_py3.py
whysage/python-dependency-injector
cef6d35cfdf5f39438a89f000d11a21860bc8c5f
[ "BSD-3-Clause" ]
399
2016-05-16T07:20:07.000Z
2022-03-31T18:23:49.000Z
tests/unit/containers/test_declarative_py2_py3.py
whysage/python-dependency-injector
cef6d35cfdf5f39438a89f000d11a21860bc8c5f
[ "BSD-3-Clause" ]
162
2016-05-16T09:21:43.000Z
2022-03-30T23:00:26.000Z
"""Dependency injector declarative container unit tests.""" import collections import unittest from dependency_injector import ( containers, providers, errors, ) class ContainerA(containers.DeclarativeContainer): p11 = providers.Provider() p12 = providers.Provider() class ContainerB(ContainerA...
37.201852
86
0.603116
import collections import unittest from dependency_injector import ( containers, providers, errors, ) class ContainerA(containers.DeclarativeContainer): p11 = providers.Provider() p12 = providers.Provider() class ContainerB(ContainerA): p21 = providers.Provider() p22 = providers.Provid...
true
true
f731bddc26f0944e091eb4201d1fed5699a2d7df
359
py
Python
sdk/python/pulumi_azure/notificationhub/__init__.py
kenny-wealth/pulumi-azure
e57e3a81f95bf622e7429c53f0bff93e33372aa1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/notificationhub/__init__.py
kenny-wealth/pulumi-azure
e57e3a81f95bf622e7429c53f0bff93e33372aa1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/notificationhub/__init__.py
kenny-wealth/pulumi-azure
e57e3a81f95bf622e7429c53f0bff93e33372aa1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .hub import * from .authorization_rule import * from .namespace import * from .get_hub...
32.636364
87
0.727019
# Export this package's modules as members: from .hub import * from .authorization_rule import * from .namespace import * from .get_hub import * from .get_namespace import *
true
true
f731be3829420df3473b875de15a7e7c4ab77ba2
653
py
Python
synlib/descriptions/ADDFXL.py
vhnatyk/vlsistuff
0981097bd19a0c482728dcc5048a3615ac9a9a90
[ "MIT" ]
26
2018-03-17T18:14:22.000Z
2022-03-14T07:23:13.000Z
synlib/descriptions/ADDFXL.py
psumesh/vlsistuff
1fe64b093d0581d99c7d826b74c31b8655fa0b31
[ "MIT" ]
1
2019-10-16T10:31:11.000Z
2019-10-17T04:14:53.000Z
synlib/descriptions/ADDFXL.py
psumesh/vlsistuff
1fe64b093d0581d99c7d826b74c31b8655fa0b31
[ "MIT" ]
7
2018-07-16T07:51:25.000Z
2022-02-15T14:22:54.000Z
Desc = cellDescClass("ADDFXL") Desc.properties["cell_footprint"] = "addf" Desc.properties["area"] = "69.854400" Desc.properties["cell_leakage_power"] = "3632.360760" Desc.pinOrder = ['A', 'B', 'CI', 'CO', 'S'] Desc.add_arc("A","S","combi") Desc.add_arc("B","S","combi") Desc.add_arc("CI","S","combi") Desc.add_arc("A","C...
31.095238
53
0.666156
Desc = cellDescClass("ADDFXL") Desc.properties["cell_footprint"] = "addf" Desc.properties["area"] = "69.854400" Desc.properties["cell_leakage_power"] = "3632.360760" Desc.pinOrder = ['A', 'B', 'CI', 'CO', 'S'] Desc.add_arc("A","S","combi") Desc.add_arc("B","S","combi") Desc.add_arc("CI","S","combi") Desc.add_arc("A","C...
true
true
f731beda637d2a5569a79ee173f7c5968ddc0fe2
1,688
py
Python
base/log.py
testtuantuan/appTest
2717b30b2cc63080cb0c68d72f4a772daf49e5c3
[ "BSD-3-Clause" ]
null
null
null
base/log.py
testtuantuan/appTest
2717b30b2cc63080cb0c68d72f4a772daf49e5c3
[ "BSD-3-Clause" ]
null
null
null
base/log.py
testtuantuan/appTest
2717b30b2cc63080cb0c68d72f4a772daf49e5c3
[ "BSD-3-Clause" ]
null
null
null
# !/uer/bin/env python3 # coding=utf-8 import datetime import logging import functools import os import traceback import inspect if "logs" in os.listdir('../'): pass else: os.mkdir('../logs') now = datetime.datetime.now().strftime('%Y-%m-%d_%H_%M_%S') _log_fp = "../logs/" + now + ".log" logging.basicConfig(lev...
28.133333
97
0.584716
import datetime import logging import functools import os import traceback import inspect if "logs" in os.listdir('../'): pass else: os.mkdir('../logs') now = datetime.datetime.now().strftime('%Y-%m-%d_%H_%M_%S') _log_fp = "../logs/" + now + ".log" logging.basicConfig(level=logging.DEBUG, f...
true
true
f731bfab7f7356124c08783189c0a2d6c9d964d1
4,425
py
Python
test/functional/wallet_part_segwit_scripts.py
bleach86/ghost-core
59824a5e00fbc500eeec28950999a05967bad608
[ "MIT" ]
null
null
null
test/functional/wallet_part_segwit_scripts.py
bleach86/ghost-core
59824a5e00fbc500eeec28950999a05967bad608
[ "MIT" ]
null
null
null
test/functional/wallet_part_segwit_scripts.py
bleach86/ghost-core
59824a5e00fbc500eeec28950999a05967bad608
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The Particl Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_particl import GhostTestFramework class SegwitScriptsTest(GhostTestFramework): ...
40.59633
118
0.654011
from test_framework.test_particl import GhostTestFramework class SegwitScriptsTest(GhostTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 3 self.extra_args = [ ['-debug','-noacceptnonstdtxn','-reservebalance=10000000'] for i in range(self.num_nodes)...
true
true
f731c0b87e19e1774f95606b9d89e1dd2dc40b0a
15,296
py
Python
venv/lib/python3.6/site-packages/feedgen/ext/dc.py
jannahuang/blog
e1d8cfa9d79ac06097a0e55531bba9421fcbf283
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/feedgen/ext/dc.py
jannahuang/blog
e1d8cfa9d79ac06097a0e55531bba9421fcbf283
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/feedgen/ext/dc.py
jannahuang/blog
e1d8cfa9d79ac06097a0e55531bba9421fcbf283
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' feedgen.ext.dc ~~~~~~~~~~~~~~~~~~~ Extends the FeedGenerator to add Dubline Core Elements to the feeds. Descriptions partly taken from http://dublincore.org/documents/dcmi-terms/#elements-coverage :copyright: 2013-2017, Lars Kiesow <lkiesow@uos.de> :license: F...
37.490196
79
0.622973
from feedgen.ext.base import BaseExtension from feedgen.util import xml_elem class DcBaseExtension(BaseExtension): def __init__(self): self._dcelem_contributor = None self._dcelem_coverage = None self._dcelem_creator = None self._dcelem_date = None ...
true
true
f731c242461116c49eda6d5115c4af06fc3b920c
602
py
Python
var/spack/repos/builtin/packages/opendx/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/opendx/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/opendx/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class Opendx(AutotoolsPackage): """Open Visualization Data Explorer.""" homepage = "https://github.com/Mwoolsey/...
28.666667
73
0.697674
class Opendx(AutotoolsPackage): homepage = "https://github.com/Mwoolsey/OpenDX" git = "https://github.com/Mwoolsey/OpenDX.git" version('master', branch='master') depends_on('motif') depends_on('gl') @run_before('autoreconf') def distclean(self): make('distclean')
true
true
f731c2a3b3050eec2782a2b33492c47117028a37
2,974
py
Python
hatanaka/test/test_general_compression.py
valgur/hatanaka
2f2f413050a922a507841546ba9ac5610a0dd882
[ "MIT" ]
5
2021-04-14T15:37:48.000Z
2022-02-11T08:59:34.000Z
hatanaka/test/test_general_compression.py
valgur/hatanaka
2f2f413050a922a507841546ba9ac5610a0dd882
[ "MIT" ]
null
null
null
hatanaka/test/test_general_compression.py
valgur/hatanaka
2f2f413050a922a507841546ba9ac5610a0dd882
[ "MIT" ]
1
2021-11-10T22:28:50.000Z
2021-11-10T22:28:50.000Z
import gzip import io import shutil import pytest from hatanaka import compress, compress_on_disk, decompress, decompress_on_disk from .conftest import clean, compress_pairs, decompress_pairs, get_data_path @pytest.mark.parametrize( 'input_suffix, expected_suffix', decompress_pairs ) def test_decompress(tmp...
30.659794
95
0.718225
import gzip import io import shutil import pytest from hatanaka import compress, compress_on_disk, decompress, decompress_on_disk from .conftest import clean, compress_pairs, decompress_pairs, get_data_path @pytest.mark.parametrize( 'input_suffix, expected_suffix', decompress_pairs ) def test_decompress(tmp...
true
true
f731c31f75ea7cd476db15705457c015ff3032c0
17,905
py
Python
python/apogee/aspcap/teff.py
sdss/apogee
e134409dc14b20f69e68a0d4d34b2c1b5056a901
[ "BSD-3-Clause" ]
5
2019-04-11T13:35:24.000Z
2019-11-14T06:12:51.000Z
python/apogee/aspcap/teff.py
sdss/apogee
e134409dc14b20f69e68a0d4d34b2c1b5056a901
[ "BSD-3-Clause" ]
null
null
null
python/apogee/aspcap/teff.py
sdss/apogee
e134409dc14b20f69e68a0d4d34b2c1b5056a901
[ "BSD-3-Clause" ]
5
2018-09-20T22:07:43.000Z
2021-01-15T07:13:38.000Z
# routines for calibrating/comparing effective temperatures with photometric sample from apogee.utils import apload from apogee.utils import apselect from astropy.io import fits, ascii from tools import match from tools import plots from tools import fit from apogee.utils import bitmask from apogee.aspcap import err i...
46.26615
225
0.628093
from apogee.utils import apload from apogee.utils import apselect from astropy.io import fits, ascii from tools import match from tools import plots from tools import fit from apogee.utils import bitmask from apogee.aspcap import err import pdb import matplotlib.pyplot as plt import numpy as np import os import matplo...
true
true
f731c428457d805737a8bac6b920e623e8b9e75c
34,668
py
Python
superset/security/manager.py
Visortech-Solutions/incubator-superset
4b33597e521e07d1ec74cdbda761e103814f60a2
[ "Apache-2.0" ]
1
2020-08-31T17:22:25.000Z
2020-08-31T17:22:25.000Z
superset/security/manager.py
Visortech-Solutions/incubator-superset
4b33597e521e07d1ec74cdbda761e103814f60a2
[ "Apache-2.0" ]
1
2020-08-02T04:42:57.000Z
2020-08-02T04:42:57.000Z
superset/security/manager.py
Visortech-Solutions/incubator-superset
4b33597e521e07d1ec74cdbda761e103814f60a2
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.089069
88
0.625937
import logging from typing import Any, Callable, cast, List, Optional, Set, Tuple, TYPE_CHECKING, Union from flask import current_app, g from flask_appbuilder import Model from flask_appbuilder.security.sqla.manager import SecurityManager from flask_appbuilder.security.sqla.models import ( assoc_permissionview_rol...
true
true
f731c50ed0f870cecde73f61bbdb8ad20a18c647
7,795
py
Python
api_tests/users/views/test_user_preprints_list.py
listinc/osf.io
b9a0357f3e9b6e905b732e750a16e9452c459d78
[ "Apache-2.0" ]
1
2019-12-23T04:30:20.000Z
2019-12-23T04:30:20.000Z
api_tests/users/views/test_user_preprints_list.py
listinc/osf.io
b9a0357f3e9b6e905b732e750a16e9452c459d78
[ "Apache-2.0" ]
20
2020-03-24T16:48:03.000Z
2022-03-08T22:38:38.000Z
api_tests/users/views/test_user_preprints_list.py
listinc/osf.io
b9a0357f3e9b6e905b732e750a16e9452c459d78
[ "Apache-2.0" ]
null
null
null
import pytest from api.base.settings.defaults import API_BASE from api_tests.preprints.filters.test_filters import PreprintsListFilteringMixin from api_tests.preprints.views.test_preprint_list_mixin import PreprintIsPublishedListMixin, PreprintIsValidListMixin from osf_tests.factories import ( ProjectFactory, ...
32.615063
117
0.655805
import pytest from api.base.settings.defaults import API_BASE from api_tests.preprints.filters.test_filters import PreprintsListFilteringMixin from api_tests.preprints.views.test_preprint_list_mixin import PreprintIsPublishedListMixin, PreprintIsValidListMixin from osf_tests.factories import ( ProjectFactory, ...
true
true
f731c668ffccf5b4cbde0be62847a563f4f61341
14,260
py
Python
packages/syft/src/syft/grid/duet/webrtc_duet.py
pculliton/PySyft
23a0d1442d3d901b1139aeabe079ccf4177ebc0d
[ "Apache-2.0" ]
null
null
null
packages/syft/src/syft/grid/duet/webrtc_duet.py
pculliton/PySyft
23a0d1442d3d901b1139aeabe079ccf4177ebc0d
[ "Apache-2.0" ]
null
null
null
packages/syft/src/syft/grid/duet/webrtc_duet.py
pculliton/PySyft
23a0d1442d3d901b1139aeabe079ccf4177ebc0d
[ "Apache-2.0" ]
null
null
null
""" PySyft Duet (WebRTC) This class aims to implement the PySyft Duet concept by using WebRTC protocol as a connection channel in order to allow two different users to establish a direct connection with high-quality Real-time Communication using private addresses. The most common example showing how it can be used is...
42.822823
117
0.629523
import asyncio from typing import Optional from nacl.signing import SigningKey from ... import serialize from ...core.io.route import SoloRoute from ...core.node.common.metadata import Metadata from ...core.node.domain.client import DomainClient from ...core.node.domain.domain import Domain from ...logger import err...
true
true
f731c670570a5ddaf363e2a308eba6f30d1c3ed7
4,328
py
Python
model-optimizer/extensions/middle/GatherNdNormalizer.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/middle/GatherNdNormalizer.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
19
2021-03-26T08:11:00.000Z
2022-02-21T13:06:26.000Z
model-optimizer/extensions/middle/GatherNdNormalizer.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
1
2021-07-28T17:30:46.000Z
2021-07-28T17:30:46.000Z
""" Copyright (C) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
39.706422
113
0.661738
import logging as log import numpy as np from extensions.ops.gather import Gather from mo.front.common.partial_infer.utils import int64_array from mo.front.tf.graph_utils import create_op_node_with_second_input, create_op_with_const_inputs from mo.graph.graph import Graph, rename_node from mo.middle.replacement impor...
true
true