hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f706b5f5a90f42d44c6c5f6ab4566166c341a960
1,985
py
Python
dectest/_decorators.py
srittau/python-dectest
c8e5ebc6cc99a4af0ea5ce9279b78b66dd188111
[ "MIT" ]
null
null
null
dectest/_decorators.py
srittau/python-dectest
c8e5ebc6cc99a4af0ea5ce9279b78b66dd188111
[ "MIT" ]
4
2020-08-17T09:07:49.000Z
2022-03-14T10:43:53.000Z
dectest/_decorators.py
srittau/python-dectest
c8e5ebc6cc99a4af0ea5ce9279b78b66dd188111
[ "MIT" ]
null
null
null
from typing import TypeVar, Callable import unittest from ._types import TestMethod _F = TypeVar("_F", bound=TestMethod) def test(method: _F) -> _F: """Decorator that flags a method as a test method.""" method._dectest_test = True # type: ignore return method def before(method: _F) -> _F: """Deco...
26.466667
76
0.685139
from typing import TypeVar, Callable import unittest from ._types import TestMethod _F = TypeVar("_F", bound=TestMethod) def test(method: _F) -> _F: method._dectest_test = True return method def before(method: _F) -> _F: method._dectest_before = True return method def after(method: _F) -> _F...
true
true
f706ba0e3fca5e7fdc623250c98bf2863b6dd7da
31,405
py
Python
code/02_study_population/CCU013_13_paper_subset_data_to_cohort.py
BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping
83afef23f96c7b31fef64c6f735737d1afa3082d
[ "Apache-2.0" ]
null
null
null
code/02_study_population/CCU013_13_paper_subset_data_to_cohort.py
BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping
83afef23f96c7b31fef64c6f735737d1afa3082d
[ "Apache-2.0" ]
null
null
null
code/02_study_population/CCU013_13_paper_subset_data_to_cohort.py
BHFDSC/CCU013_01_ENG-COVID-19_event_phenotyping
83afef23f96c7b31fef64c6f735737d1afa3082d
[ "Apache-2.0" ]
null
null
null
# Databricks notebook source # MAGIC %md # MAGIC # CCU013_08 Paper subset data to cohort # MAGIC # MAGIC **Description** # MAGIC # MAGIC This notebook subsets the covid trajectory, severity and events tables to the cohort used for the phenotype severity paper. # MAGIC # MAGIC **Project(s)** CCU0013 # MAGIC # MAG...
43.317241
263
0.771024
mport reduce from pyspark.sql import DataFrame from datetime import datetime from pyspark.sql.types import DateType th') AND date >= "2020-01-23" GROUP BY person_id_deid """) followup_time = spark.sql(""" SELECT person_id_deid, MIN(date) AS first_covid_event FROM dars_nic_391419_j3w9t_collab.ccu013_covid_tr...
true
true
f706bab5b1c52b48697c973ea389dd2ea772b0dc
1,238
py
Python
pstruct/validity.py
xkortex/pstruct
9540bc9c9de93b670707f92f204ef8ce01f00a1c
[ "Apache-2.0" ]
null
null
null
pstruct/validity.py
xkortex/pstruct
9540bc9c9de93b670707f92f204ef8ce01f00a1c
[ "Apache-2.0" ]
null
null
null
pstruct/validity.py
xkortex/pstruct
9540bc9c9de93b670707f92f204ef8ce01f00a1c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import re from keyword import kwlist from ._compat import isidentifier dict_list = [x for x in dict.__dict__] kwset = set(kwlist + dict_list) # this is faster than iskeyword() pat_identifier = re.compile(r"^[a-zA-Z_]\w*$") def is_invalid_key(s): # type: ...
22.509091
82
0.621971
import sys import re from keyword import kwlist from ._compat import isidentifier dict_list = [x for x in dict.__dict__] kwset = set(kwlist + dict_list) pat_identifier = re.compile(r"^[a-zA-Z_]\w*$") def is_invalid_key(s): if s in kwset: return True return not isidentifier(s) class Invali...
true
true
f706baba37ecae2fb8a0f5ce9d928e7b65f24344
1,690
py
Python
test/fx2trt/converters/acc_op/test_reshape.py
you74674/pytorch
06838ce8b16b2cc2f9e903f3ebdd46659a0e66bb
[ "Intel" ]
1
2022-01-20T03:49:23.000Z
2022-01-20T03:49:23.000Z
test/fx2trt/converters/acc_op/test_reshape.py
you74674/pytorch
06838ce8b16b2cc2f9e903f3ebdd46659a0e66bb
[ "Intel" ]
14
2021-10-14T06:58:50.000Z
2021-12-17T11:51:07.000Z
test/fx2trt/converters/acc_op/test_reshape.py
you74674/pytorch
06838ce8b16b2cc2f9e903f3ebdd46659a0e66bb
[ "Intel" ]
null
null
null
# Owner(s): ["oncall: fx"] import torch import torch.fx.experimental.fx_acc.acc_ops as acc_ops from torch.testing._internal.common_fx2trt import AccTestCase, InputTensorSpec from parameterized import parameterized from torch.testing._internal.common_utils import run_tests class TestReshapeConverter(AccTestCase): ...
29.649123
87
0.570414
import torch import torch.fx.experimental.fx_acc.acc_ops as acc_ops from torch.testing._internal.common_fx2trt import AccTestCase, InputTensorSpec from parameterized import parameterized from torch.testing._internal.common_utils import run_tests class TestReshapeConverter(AccTestCase): @parameterized.expand( ...
true
true
f706babadb6d70dddfb5113e70dfd5cd1fa7db89
30,812
py
Python
test/augmenters/test_blur.py
joybanerjee08/imgaug
b986ba8bf93b7847671e62b4636256e90245b340
[ "MIT" ]
1
2019-05-22T09:33:33.000Z
2019-05-22T09:33:33.000Z
test/augmenters/test_blur.py
HuuY/imgaug
e9d3515b52f2205cee1d3c9a913fcc638d15993b
[ "MIT" ]
null
null
null
test/augmenters/test_blur.py
HuuY/imgaug
e9d3515b52f2205cee1d3c9a913fcc638d15993b
[ "MIT" ]
1
2019-03-07T13:58:25.000Z
2019-03-07T13:58:25.000Z
from __future__ import print_function, division, absolute_import import time import matplotlib matplotlib.use('Agg') # fix execution of tests involving matplotlib on travis import numpy as np import six.moves as sm import cv2 from scipy import ndimage import imgaug as ia from imgaug import augmenters as iaa from im...
34.698198
115
0.576334
from __future__ import print_function, division, absolute_import import time import matplotlib matplotlib.use('Agg') import numpy as np import six.moves as sm import cv2 from scipy import ndimage import imgaug as ia from imgaug import augmenters as iaa from imgaug import parameters as iap from imgaug.testutils imp...
true
true
f706bb538adcb3a66a346045b0d996d2cd558d37
1,393
py
Python
setup.py
ZeXtras/gordon
b6e4e8d5998c2b2c4c4edb3a2ec7124290f46e8b
[ "BSD-3-Clause" ]
null
null
null
setup.py
ZeXtras/gordon
b6e4e8d5998c2b2c4c4edb3a2ec7124290f46e8b
[ "BSD-3-Clause" ]
null
null
null
setup.py
ZeXtras/gordon
b6e4e8d5998c2b2c4c4edb3a2ec7124290f46e8b
[ "BSD-3-Clause" ]
1
2021-04-26T08:54:20.000Z
2021-04-26T08:54:20.000Z
import sys from setuptools import setup, find_packages install_requires = [ 'boto3>=1.2.3,<2.0', 'clint>0.5,<1.0', 'PyYAML>=3,<4.0', 'troposphere==2.0', 'Jinja2>=2.8,<3.0', 'six>1.9,<2.0' ] # as of Python >= 2.7 argparse module is maintained within Python. if sys.version_info < (2, 7): in...
27.313725
95
0.623116
import sys from setuptools import setup, find_packages install_requires = [ 'boto3>=1.2.3,<2.0', 'clint>0.5,<1.0', 'PyYAML>=3,<4.0', 'troposphere==2.0', 'Jinja2>=2.8,<3.0', 'six>1.9,<2.0' ] if sys.version_info < (2, 7): install_requires.append('argparse>=1.1.0') setup( name='gordon...
true
true
f706bd74527bcd4a03b362c963712dedf5952c99
12,583
py
Python
3-Trojan_Results/Scripts/1kB_Evals.py
mdodici/trojan-WD-pollution
ec79a96f0d9517a53df4c82ca1be0d5d38f3346b
[ "MIT" ]
null
null
null
3-Trojan_Results/Scripts/1kB_Evals.py
mdodici/trojan-WD-pollution
ec79a96f0d9517a53df4c82ca1be0d5d38f3346b
[ "MIT" ]
null
null
null
3-Trojan_Results/Scripts/1kB_Evals.py
mdodici/trojan-WD-pollution
ec79a96f0d9517a53df4c82ca1be0d5d38f3346b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns target = '1kB' radeg = np.pi/180 def cart_to_pol(x,y): r = np.sqrt(x**2 + y**2) phi = np.arctan2(y,x) return r, phi def pol_to_cart(r,phi): x = r*np.cos(...
32.598446
107
0.597711
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns target = '1kB' radeg = np.pi/180 def cart_to_pol(x,y): r = np.sqrt(x**2 + y**2) phi = np.arctan2(y,x) return r, phi def pol_to_cart(r,phi): x = r*np.cos(phi) y = r*np.sin(phi) return x, y ...
true
true
f706bf0606da035609a09bde23a5f2bb569acf68
3,377
py
Python
setup.py
davidlibland/mutatest
4a50341b7131c9ff077512d4c17cac698d82e458
[ "MIT" ]
null
null
null
setup.py
davidlibland/mutatest
4a50341b7131c9ff077512d4c17cac698d82e458
[ "MIT" ]
null
null
null
setup.py
davidlibland/mutatest
4a50341b7131c9ff077512d4c17cac698d82e458
[ "MIT" ]
null
null
null
import codecs import os import re from setuptools import find_packages, setup ############################################################################### # Using setup.py from Attrs as a template for finding components, awesome config. # Original reference: https://github.com/python-attrs/attrs/blob/master/setup....
30.981651
99
0.621261
import codecs import os import re from setuptools import find_packages, setup
true
true
f706bf4389baaf169c85a2146bf6ce27e17c780d
1,332
py
Python
68-desafio.py
SweydAbdul/EstudosPythonCeV
5eb61d4e1d47b99d57de776c835aa9f3c2bcee3b
[ "MIT" ]
null
null
null
68-desafio.py
SweydAbdul/EstudosPythonCeV
5eb61d4e1d47b99d57de776c835aa9f3c2bcee3b
[ "MIT" ]
null
null
null
68-desafio.py
SweydAbdul/EstudosPythonCeV
5eb61d4e1d47b99d57de776c835aa9f3c2bcee3b
[ "MIT" ]
null
null
null
from random import randint from os import system c = 0 #Limpa tela system('cls') print('=-'*20) print('VAMOS JOGAR PAR OU IMPAR') print('=-'*20) #Loop do programa while True: n = int(input('Diga um valor: ')) computador = randint (0, 10) while True: decisao = str(input('Par ou impar [P/I] ')).u...
27.75
92
0.493243
from random import randint from os import system c = 0 system('cls') print('=-'*20) print('VAMOS JOGAR PAR OU IMPAR') print('=-'*20) while True: n = int(input('Diga um valor: ')) computador = randint (0, 10) while True: decisao = str(input('Par ou impar [P/I] ')).upper() if decisao in...
true
true
f706bf9451ec8bcf16b5acf352ea5319d6dec0bf
3,471
py
Python
tests/st/pynative/data_parallel/test_pynative_hccl_allreduce.py
PowerOlive/mindspore
bda20724a94113cedd12c3ed9083141012da1f15
[ "Apache-2.0" ]
3,200
2020-02-17T12:45:41.000Z
2022-03-31T20:21:16.000Z
tests/st/pynative/data_parallel/test_pynative_hccl_allreduce.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
176
2020-02-12T02:52:11.000Z
2022-03-28T22:15:55.000Z
tests/st/pynative/data_parallel/test_pynative_hccl_allreduce.py
zimo-geek/mindspore
665ec683d4af85c71b2a1f0d6829356f2bc0e1ff
[ "Apache-2.0" ]
621
2020-03-09T01:31:41.000Z
2022-03-30T03:43:19.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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...
34.366337
116
0.663209
import os from multiprocessing import Process, Queue import pytest import numpy as np import mindspore.nn as nn from mindspore import Tensor from mindspore import dtype as mstype from mindspore.ops import operations as P import mindspore.communication.management as D from mindspore import context from m...
true
true
f706bff0a857712c13c5e95d9e26d7bdc5820c9f
468
py
Python
jiant/scripts/download_data/constants.py
a7b23/jiant
b9e59fab42d71463fd23950d16abd8d828acaab9
[ "MIT" ]
1
2021-03-11T21:30:52.000Z
2021-03-11T21:30:52.000Z
jiant/scripts/download_data/constants.py
a7b23/jiant
b9e59fab42d71463fd23950d16abd8d828acaab9
[ "MIT" ]
null
null
null
jiant/scripts/download_data/constants.py
a7b23/jiant
b9e59fab42d71463fd23950d16abd8d828acaab9
[ "MIT" ]
null
null
null
# Directly download tasks when nlp format is different than original dataset SQUAD_TASKS = {"squad_v1", "squad_v2"} DIRECT_DOWNLOAD_TASKS_TO_DATA_URLS = { "wsc": f"https://dl.fbaipublicfiles.com/glue/superglue/data/v2/WSC.zip", "multirc": f"https://dl.fbaipublicfiles.com/glue/superglue/data/v2/MultiRC.zip", ...
52
84
0.769231
SQUAD_TASKS = {"squad_v1", "squad_v2"} DIRECT_DOWNLOAD_TASKS_TO_DATA_URLS = { "wsc": f"https://dl.fbaipublicfiles.com/glue/superglue/data/v2/WSC.zip", "multirc": f"https://dl.fbaipublicfiles.com/glue/superglue/data/v2/MultiRC.zip", "record": f"https://dl.fbaipublicfiles.com/glue/superglue/data/v2/ReCoRD.zi...
true
true
f706c012ba3969ffe2430c311187ce70266f635d
170
py
Python
config/config.py
z1mEk/CamPanel2
1474931f913e7137e228323061f058a612310e4a
[ "MIT" ]
null
null
null
config/config.py
z1mEk/CamPanel2
1474931f913e7137e228323061f058a612310e4a
[ "MIT" ]
null
null
null
config/config.py
z1mEk/CamPanel2
1474931f913e7137e228323061f058a612310e4a
[ "MIT" ]
null
null
null
import json from types import SimpleNamespace with open('./config/config.json') as json_file: data = json.load(json_file, object_hook=lambda d: SimpleNamespace(**d))
34
75
0.764706
import json from types import SimpleNamespace with open('./config/config.json') as json_file: data = json.load(json_file, object_hook=lambda d: SimpleNamespace(**d))
true
true
f706c027b36c06747bd58523cc4cea5b7aed8d9c
2,190
py
Python
task.py
sbalbinot/my-rsb-robot-python
86e62dec5b23ef68af2a1d3b59f3b71206844335
[ "Apache-2.0" ]
null
null
null
task.py
sbalbinot/my-rsb-robot-python
86e62dec5b23ef68af2a1d3b59f3b71206844335
[ "Apache-2.0" ]
null
null
null
task.py
sbalbinot/my-rsb-robot-python
86e62dec5b23ef68af2a1d3b59f3b71206844335
[ "Apache-2.0" ]
null
null
null
# Robot to enter weekly sales data into the RobotSpareBin Industries Intranet. import os from Browser import Browser from Browser.utils.data_types import SelectAttribute from RPA.Excel.Files import Files from RPA.HTTP import HTTP from RPA.PDF import PDF browser = Browser() def open_the_intranet_website(): bro...
25.764706
78
0.710046
import os from Browser import Browser from Browser.utils.data_types import SelectAttribute from RPA.Excel.Files import Files from RPA.HTTP import HTTP from RPA.PDF import PDF browser = Browser() def open_the_intranet_website(): browser.new_page("https://robotsparebinindustries.com/") def log_in(): brow...
true
true
f706c0c3e8cc27ca3edb6a7b17a579cd796d7cc7
6,962
py
Python
tests/test_integration.py
prototypefund/lazycluster
e6fbd69dbd73ec9bf101a502f25f7afdf0579f66
[ "Apache-2.0" ]
44
2019-08-07T12:01:07.000Z
2021-09-02T16:50:51.000Z
tests/test_integration.py
prototypefund/lazycluster
e6fbd69dbd73ec9bf101a502f25f7afdf0579f66
[ "Apache-2.0" ]
9
2020-10-26T13:08:32.000Z
2021-09-16T02:13:58.000Z
tests/test_integration.py
prototypefund/lazycluster
e6fbd69dbd73ec9bf101a502f25f7afdf0579f66
[ "Apache-2.0" ]
9
2019-09-18T07:52:09.000Z
2022-02-11T13:48:19.000Z
import os import re import sys import time from subprocess import PIPE, run from types import ModuleType from typing import Union import docker import requests import storm.__main__ as storm from lazycluster import Runtime, RuntimeGroup, RuntimeManager, RuntimeTask from .config import RUNTIME_DOCKER_IMAGE, RUNTIME_N...
32.685446
195
0.657282
import os import re import sys import time from subprocess import PIPE, run from types import ModuleType from typing import Union import docker import requests import storm.__main__ as storm from lazycluster import Runtime, RuntimeGroup, RuntimeManager, RuntimeTask from .config import RUNTIME_DOCKER_IMAGE, RUNTIME_N...
true
true
f706c14cb6a70db4e01b2efeaf9575e2dd66f0b9
6,579
py
Python
simbench/converter/voltLvl.py
navin3011/Seminar-Energy-economy
ddff1bf28f445d5a447fab119d7a6192f231d9c3
[ "BSD-3-Clause" ]
null
null
null
simbench/converter/voltLvl.py
navin3011/Seminar-Energy-economy
ddff1bf28f445d5a447fab119d7a6192f231d9c3
[ "BSD-3-Clause" ]
null
null
null
simbench/converter/voltLvl.py
navin3011/Seminar-Energy-economy
ddff1bf28f445d5a447fab119d7a6192f231d9c3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019 by University of Kassel, Tu Dortmund, RWTH Aachen University and Fraunhofer # Institute for Energy Economics and Energy System Technology (IEE) Kassel and individual # contributors (see AUTHORS file for details). All rights reserved. import numpy as np from pandas import S...
42.173077
100
0.628515
import numpy as np from pandas import Series from pandapower import element_bus_tuples __author__ = "smeinecke" def convert_voltlvl_to_int(voltage_level): if voltage_level in ["EHV", "ehv", "UHV", "uhv"]: return 1 elif voltage_level in ["EHV-HV", "ehv-hv", "UHV-HV", "uhv-hv", "EHVHV", "ehvhv", ...
true
true
f706c15e53a1ea770abe30f10724115964aa3f6c
3,678
py
Python
pysim/systems/python_systems.py
freol35241/pysim
36faf67d00ff644a593f20994c0f15053d600886
[ "BSD-3-Clause" ]
9
2018-01-15T07:43:57.000Z
2022-01-11T20:21:38.000Z
pysim/systems/python_systems.py
freol35241/pysim
36faf67d00ff644a593f20994c0f15053d600886
[ "BSD-3-Clause" ]
31
2016-05-06T23:21:53.000Z
2021-11-04T22:40:25.000Z
pysim/systems/python_systems.py
freol35241/pysim
36faf67d00ff644a593f20994c0f15053d600886
[ "BSD-3-Clause" ]
7
2017-03-02T14:55:48.000Z
2018-04-11T06:29:35.000Z
"""Example systems created in Python """ import numpy as np from pysim.cythonsystem import Sys class VanDerPol(Sys): """Simple example of a class representing a VanDerPol oscillator. """ def __init__(self): self.add_state_scalar("x", "dx") self.add_state_scalar("y", "dy") self.add_...
35.028571
77
0.642197
import numpy as np from pysim.cythonsystem import Sys class VanDerPol(Sys): def __init__(self): self.add_state_scalar("x", "dx") self.add_state_scalar("y", "dy") self.add_input_scalar("a") self.add_input_scalar("b") self.inputs.a = 1.0 self.inputs.b = 1.0 se...
true
true
f706c16fd19a1e496dda6b035aa4021c92576a51
8,016
py
Python
discovery-infra/test_infra/consts/consts.py
trewest/assisted-test-infra
b3a93f1ad85f2fbe35d1c691796b598dde2a82bc
[ "Apache-2.0" ]
2
2022-01-12T08:58:28.000Z
2022-01-19T12:19:46.000Z
discovery-infra/test_infra/consts/consts.py
trewest/assisted-test-infra
b3a93f1ad85f2fbe35d1c691796b598dde2a82bc
[ "Apache-2.0" ]
null
null
null
discovery-infra/test_infra/consts/consts.py
trewest/assisted-test-infra
b3a93f1ad85f2fbe35d1c691796b598dde2a82bc
[ "Apache-2.0" ]
null
null
null
from enum import Enum from .durations import MINUTE, HOUR class OpenshiftVersion(Enum): VERSION_4_6 = "4.6" VERSION_4_7 = "4.7" VERSION_4_8 = "4.8" VERSION_4_9 = "4.9" class NetworkType: OpenShiftSDN = "OpenShiftSDN" OVNKubernetes = "OVNKubernetes" WORKING_DIR = "build" TF_FOLDER = f"{WOR...
36.940092
108
0.753493
from enum import Enum from .durations import MINUTE, HOUR class OpenshiftVersion(Enum): VERSION_4_6 = "4.6" VERSION_4_7 = "4.7" VERSION_4_8 = "4.8" VERSION_4_9 = "4.9" class NetworkType: OpenShiftSDN = "OpenShiftSDN" OVNKubernetes = "OVNKubernetes" WORKING_DIR = "build" TF_FOLDER = f"{WOR...
true
true
f706c175ce9374eac08af908306915c436098b21
239
py
Python
gym_simpleflappy/__init__.py
jmathison/gym-simpleflappy
54acd54346f0ba4a611120a9ebba69acf0bae8b5
[ "MIT" ]
null
null
null
gym_simpleflappy/__init__.py
jmathison/gym-simpleflappy
54acd54346f0ba4a611120a9ebba69acf0bae8b5
[ "MIT" ]
null
null
null
gym_simpleflappy/__init__.py
jmathison/gym-simpleflappy
54acd54346f0ba4a611120a9ebba69acf0bae8b5
[ "MIT" ]
1
2019-09-19T05:26:02.000Z
2019-09-19T05:26:02.000Z
from gym.envs.registration import register register( id='SimpleFlappy-v0', entry_point='gym_simpleflappy.envs:FlappyEnv', ) register( id='SimpleFlappyDistance-v0', entry_point='gym_simpleflappy.envs:FlappyEnvDistance', )
19.916667
58
0.757322
from gym.envs.registration import register register( id='SimpleFlappy-v0', entry_point='gym_simpleflappy.envs:FlappyEnv', ) register( id='SimpleFlappyDistance-v0', entry_point='gym_simpleflappy.envs:FlappyEnvDistance', )
true
true
f706c18900acab1fc1718697041af9e1eaf500da
8,340
py
Python
peeldb/search_indexes.py
sanjay051099/try2-
2ee165320476184a7390898c7a873844fc79e77a
[ "MIT" ]
199
2019-12-14T02:25:05.000Z
2022-03-31T11:26:12.000Z
peeldb/search_indexes.py
sanjay051099/try2-
2ee165320476184a7390898c7a873844fc79e77a
[ "MIT" ]
91
2019-12-12T12:19:34.000Z
2022-03-25T05:52:04.000Z
peeldb/search_indexes.py
sanjay051099/try2-
2ee165320476184a7390898c7a873844fc79e77a
[ "MIT" ]
131
2019-12-13T06:26:06.000Z
2022-03-29T19:45:18.000Z
from haystack import indexes from peeldb.models import ( JobPost, Skill, City, FunctionalArea, Industry, Qualification, State, ) from datetime import datetime from django.core import serializers from mpcomp.views import get_absolute_url class jobIndex(indexes.SearchIndex, indexes.Indexable...
32.964427
115
0.67542
from haystack import indexes from peeldb.models import ( JobPost, Skill, City, FunctionalArea, Industry, Qualification, State, ) from datetime import datetime from django.core import serializers from mpcomp.views import get_absolute_url class jobIndex(indexes.SearchIndex, indexes.Indexable...
true
true
f706c3976a468ef15e77613b7e8a4805cbcab958
1,804
py
Python
tests/bugs/core_5097_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5097_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
tests/bugs/core_5097_test.py
reevespaul/firebird-qa
98f16f425aa9ab8ee63b86172f959d63a2d76f21
[ "MIT" ]
null
null
null
#coding:utf-8 # # id: bugs.core_5097 # title: COMPUTED-BY expressions are not converted to their field type inside the engine # decription: # # tracker_id: CORE-5097 # min_versions: ['3.0'] # versions: 3.0 # qmid: None import pytest from firebird.qa import db_factory, ...
26.925373
95
0.639135
import pytest from firebird.qa import db_factory, isql_act, Action substitutions_1 = [('^((?!sqltype|T2_CHECK|C1_CHECK).)*$', '')] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) test_script_1 = """ recreate table test1( t0 timestamp default 'now' ,t1 ti...
true
true
f706c3f4ee807d462885204b6476c790835e9903
5,788
py
Python
catconfig.py
dev-techmoe/python-catconfig
a78603d61a0ef24371c2d20638a12293da87cd4a
[ "MIT" ]
2
2020-10-19T12:15:16.000Z
2020-10-19T12:27:29.000Z
catconfig.py
dev-techmoe/python-catconfig
a78603d61a0ef24371c2d20638a12293da87cd4a
[ "MIT" ]
null
null
null
catconfig.py
dev-techmoe/python-catconfig
a78603d61a0ef24371c2d20638a12293da87cd4a
[ "MIT" ]
null
null
null
from enum import Enum from typing import Any from importlib import import_module class ValidationError(Exception): """ Error class for validation failed """ def __init__(self, payload: dict): """ :param message: error message """ self.payload = payload def generate...
30.951872
113
0.534036
from enum import Enum from typing import Any from importlib import import_module class ValidationError(Exception): def __init__(self, payload: dict): self.payload = payload def generate_err_msg(self, payload: dict, indent: int = 0) -> str: make_indent = ''.join([' ' for i in range(0, inden...
true
true
f706c4720bcc0d4eaae256fa9c9d84700a963626
687
py
Python
react/react_chess_to_IZII_state.py
ElliotVilhelm/Chess
2469657a23f15af79a723346839d6e6a6501f318
[ "MIT" ]
4
2019-01-31T00:04:33.000Z
2019-08-19T14:55:54.000Z
react/react_chess_to_IZII_state.py
ElliotVilhelm/Chess
2469657a23f15af79a723346839d6e6a6501f318
[ "MIT" ]
2
2017-11-25T09:25:02.000Z
2018-04-05T10:11:02.000Z
react/react_chess_to_IZII_state.py
ElliotVilhelm/Chess
2469657a23f15af79a723346839d6e6a6501f318
[ "MIT" ]
null
null
null
from engine.utils import RF_sq64, sq64_to_sq120, print_board def react_chess_board_to_IZII_board(board): if board is None: exit() izii_board = ["x"] * 120 pieces = board.split(',') for i in range(len(izii_board)): if i >= 20 and i < 100: if i % 10 != 0 and i % 10 != 9: ...
20.818182
60
0.544396
from engine.utils import RF_sq64, sq64_to_sq120, print_board def react_chess_board_to_IZII_board(board): if board is None: exit() izii_board = ["x"] * 120 pieces = board.split(',') for i in range(len(izii_board)): if i >= 20 and i < 100: if i % 10 != 0 and i % 10 != 9: ...
true
true
f706c4f2f97cb92e9d9c7618db51b4e125077b58
8,925
py
Python
ibis/tests/benchmarks/test_benchmarks.py
GrapeBaBa/ibis
507bb14efdcfd719a0487ee23fe1c85c177517f6
[ "Apache-2.0" ]
null
null
null
ibis/tests/benchmarks/test_benchmarks.py
GrapeBaBa/ibis
507bb14efdcfd719a0487ee23fe1c85c177517f6
[ "Apache-2.0" ]
null
null
null
ibis/tests/benchmarks/test_benchmarks.py
GrapeBaBa/ibis
507bb14efdcfd719a0487ee23fe1c85c177517f6
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd import pytest import ibis import ibis.expr.datatypes as dt from ibis.backends.pandas.udf import udf def make_t(): return ibis.table( [ ('_timestamp', 'int32'), ('dim1', 'int32'), ('dim2', 'int32'), ('valid_seconds', 'i...
26.5625
79
0.596303
import numpy as np import pandas as pd import pytest import ibis import ibis.expr.datatypes as dt from ibis.backends.pandas.udf import udf def make_t(): return ibis.table( [ ('_timestamp', 'int32'), ('dim1', 'int32'), ('dim2', 'int32'), ('valid_seconds', 'i...
true
true
f706c60c3b9aa51a3f0377ba741c6ae109a9fd0f
261
py
Python
pyterminator/util.py
tokenchain/fomo3d
beaf777030e17eb2f3b5ebc004df109d4840f222
[ "MIT" ]
null
null
null
pyterminator/util.py
tokenchain/fomo3d
beaf777030e17eb2f3b5ebc004df109d4840f222
[ "MIT" ]
null
null
null
pyterminator/util.py
tokenchain/fomo3d
beaf777030e17eb2f3b5ebc004df109d4840f222
[ "MIT" ]
null
null
null
import time from threading import Thread def timestamp_datetime(value): format = '%Y-%m-%d %H:%M:%S' value = time.localtime(value) dt = time.strftime(format, value) return dt def log(s): print("[",timestamp_datetime(time.time()),"]",s)
17.4
52
0.643678
import time from threading import Thread def timestamp_datetime(value): format = '%Y-%m-%d %H:%M:%S' value = time.localtime(value) dt = time.strftime(format, value) return dt def log(s): print("[",timestamp_datetime(time.time()),"]",s)
true
true
f706c60f667492bacab2b5e361a8f6f0a3f35566
3,253
py
Python
crypto/tasks.py
Shokr/Stocks-Screener
0b8da91da40b715beaf3a79163b1bdf6ea3be3b9
[ "MIT" ]
1
2021-06-28T23:08:51.000Z
2021-06-28T23:08:51.000Z
crypto/tasks.py
Shokr/Stocks-Screener
0b8da91da40b715beaf3a79163b1bdf6ea3be3b9
[ "MIT" ]
40
2020-03-06T10:24:55.000Z
2022-03-12T00:56:44.000Z
crypto/tasks.py
Shokr/Stocks-Screener
0b8da91da40b715beaf3a79163b1bdf6ea3be3b9
[ "MIT" ]
3
2020-01-19T07:27:24.000Z
2021-09-11T10:09:25.000Z
from time import sleep from urllib.request import urlopen, Request from bs4 import BeautifulSoup from celery.schedules import crontab from celery.task import periodic_task from crypto.models import Cryptocurrency # @shared_task @periodic_task( run_every=(crontab(minute="*/15")), name="create_cryptocurrency"...
29.572727
86
0.533354
from time import sleep from urllib.request import urlopen, Request from bs4 import BeautifulSoup from celery.schedules import crontab from celery.task import periodic_task from crypto.models import Cryptocurrency @periodic_task( run_every=(crontab(minute="*/15")), name="create_cryptocurrency", ) def c...
true
true
f706c8714e60d545a413bb85a7a8d0a078da4d81
1,719
py
Python
ingestion/src/metadata/generated/schema/entity/data/database.py
juliarvalenti/OpenMetadata
ed4508ab2cbc53e16127b5d091bdef2156d3c412
[ "Apache-2.0" ]
null
null
null
ingestion/src/metadata/generated/schema/entity/data/database.py
juliarvalenti/OpenMetadata
ed4508ab2cbc53e16127b5d091bdef2156d3c412
[ "Apache-2.0" ]
null
null
null
ingestion/src/metadata/generated/schema/entity/data/database.py
juliarvalenti/OpenMetadata
ed4508ab2cbc53e16127b5d091bdef2156d3c412
[ "Apache-2.0" ]
null
null
null
# generated by datamodel-codegen: # filename: schema/entity/data/database.json # timestamp: 2021-09-27T15:46:37+00:00 from __future__ import annotations from typing import Optional from pydantic import BaseModel, Field, constr from ...type import basic, entityReference, usageDetails class DatabaseName(BaseMo...
35.8125
105
0.703898
from __future__ import annotations from typing import Optional from pydantic import BaseModel, Field, constr from ...type import basic, entityReference, usageDetails class DatabaseName(BaseModel): __root__: constr(regex=r'^[^.]*$', min_length=1, max_length=64) = Field( ..., description='Name that i...
true
true
f706c89510f3778a9483e48032a05d307ae69b50
2,300
py
Python
app/core/models.py
Shivansh2407/recipe-app-api-
17a293035d689d057000eda3f81d81473b5c6ef0
[ "MIT" ]
1
2021-05-28T08:41:44.000Z
2021-05-28T08:41:44.000Z
app/core/models.py
Shivansh2407/recipe-app-api
17a293035d689d057000eda3f81d81473b5c6ef0
[ "MIT" ]
null
null
null
app/core/models.py
Shivansh2407/recipe-app-api
17a293035d689d057000eda3f81d81473b5c6ef0
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.conf import settings class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): """Creates and...
28.75
76
0.668261
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin from django.conf import settings class UserManager(BaseUserManager): def create_user(self, email, password=None, **extra_fields): if not email: ...
true
true
f706c8bcb3be527db88e9c0ffb034369ff04be7f
8,304
py
Python
pytest_fold/plugin.py
jeffwright13/pytest-fold
548eea92e976b2ec431322941bd8cc7d44e91e87
[ "MIT" ]
7
2022-02-02T07:32:24.000Z
2022-02-18T05:07:52.000Z
pytest_fold/plugin.py
jeffwright13/pytest-fold
548eea92e976b2ec431322941bd8cc7d44e91e87
[ "MIT" ]
38
2022-02-03T05:06:23.000Z
2022-03-30T11:00:59.000Z
pytest_fold/plugin.py
jeffwright13/pytest-fold
548eea92e976b2ec431322941bd8cc7d44e91e87
[ "MIT" ]
1
2022-02-04T16:18:04.000Z
2022-02-04T16:18:04.000Z
import re import pickle import tempfile import pytest from _pytest.config import Config from _pytest._io.terminalwriter import TerminalWriter from _pytest.reports import TestReport from pytest_fold.tui_pytermtk import main as tuitk from pytest_fold.tui_textual1 import main as tuitxt1 from pytest_fold.tui_textual2 impo...
38.091743
105
0.611633
import re import pickle import tempfile import pytest from _pytest.config import Config from _pytest._io.terminalwriter import TerminalWriter from _pytest.reports import TestReport from pytest_fold.tui_pytermtk import main as tuitk from pytest_fold.tui_textual1 import main as tuitxt1 from pytest_fold.tui_textual2 impo...
true
true
f706c8db1ba26460482d9e662c3cb15eba7c0000
6,393
py
Python
examples/cls_exp_user_defined_model.py
aman-gupta-1995/Machine-Learning-Mindware
8b3050720711730520683c89949e3dbdfb168961
[ "MIT" ]
27
2021-07-19T09:03:34.000Z
2022-03-31T06:19:23.000Z
examples/cls_exp_user_defined_model.py
aman-gupta-1995/Machine-Learning-Mindware
8b3050720711730520683c89949e3dbdfb168961
[ "MIT" ]
4
2021-07-15T12:17:10.000Z
2022-01-26T17:16:58.000Z
examples/cls_exp_user_defined_model.py
aman-gupta-1995/Machine-Learning-Mindware
8b3050720711730520683c89949e3dbdfb168961
[ "MIT" ]
17
2020-05-12T20:24:50.000Z
2021-07-11T03:31:38.000Z
import argparse import os import sys import time import numpy as np from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter, \ UnParametrizedHyperparameter, Constant from sklearn...
40.719745
94
0.684968
import argparse import os import sys import time import numpy as np from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter, \ UnParametrizedHyperparameter, Constant from sklearn...
true
true
f706c99c62fca0d957b1c536291009560bdbdd8f
107,127
py
Python
keras/preprocessing/image.py
maybeLee/keras
793620ae1bdda7e37edd485b034e8962fff57f3e
[ "Apache-2.0" ]
1
2022-03-21T02:42:58.000Z
2022-03-21T02:42:58.000Z
keras/preprocessing/image.py
maybeLee/keras
793620ae1bdda7e37edd485b034e8962fff57f3e
[ "Apache-2.0" ]
1
2022-03-31T16:40:51.000Z
2022-03-31T16:40:51.000Z
keras/preprocessing/image.py
maybeLee/keras
793620ae1bdda7e37edd485b034e8962fff57f3e
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.0134
104
0.639223
import collections import io import multiprocessing import os import pathlib import threading import warnings from keras import backend from keras.utils import data_utils import numpy as np from tensorflow.python.util.tf_export import keras_export try: import scipy from scipy import linalg ...
true
true
f706ca6cfcede9ea74a6198959375318555f8567
1,465
py
Python
applications/HDF5Application/python_scripts/core/operations/system.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
1
2019-08-01T09:01:08.000Z
2019-08-01T09:01:08.000Z
applications/HDF5Application/python_scripts/core/operations/system.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
null
null
null
applications/HDF5Application/python_scripts/core/operations/system.py
Jacklwln/Kratos
12ffe332622d7e8ea3e4a10bc061beb9d8e6e8de
[ "BSD-4-Clause" ]
null
null
null
'''HDF5 operating system operations. license: HDF5Application/license.txt Main authors: Philipp Bucher Michael Andre ''' import KratosMultiphysics import KratosMultiphysics.kratos_utilities as _utils import os class DeleteOldH5Files(object): '''Delete h5-files from previous simulations.''' def __ca...
34.069767
77
0.661433
import KratosMultiphysics import KratosMultiphysics.kratos_utilities as _utils import os class DeleteOldH5Files(object): def __call__(self, model_part, hdf5_file): file_path, file_name = os.path.split(hdf5_file.GetFileName()) time_prefix = file_name.replace(".h5", "") + "-" current_time =...
true
true
f706caf5c8680676f3daa3df42c2a3b4b0402a22
685
py
Python
app/main/forms.py
annaadhiambo/Blog
71e0db65dd879777fe6c6d1540c44824d3af1b9a
[ "MIT" ]
null
null
null
app/main/forms.py
annaadhiambo/Blog
71e0db65dd879777fe6c6d1540c44824d3af1b9a
[ "MIT" ]
null
null
null
app/main/forms.py
annaadhiambo/Blog
71e0db65dd879777fe6c6d1540c44824d3af1b9a
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField, SelectField from wtforms.validators import Required class CommentsForm(FlaskForm): comment = TextAreaField('Comment', validators=[Required()]) submit = SubmitField('SUBMIT') class UpdateProfile(FlaskForm): bio = Tex...
38.055556
71
0.741606
from flask_wtf import FlaskForm from wtforms import StringField,TextAreaField,SubmitField, SelectField from wtforms.validators import Required class CommentsForm(FlaskForm): comment = TextAreaField('Comment', validators=[Required()]) submit = SubmitField('SUBMIT') class UpdateProfile(FlaskForm): bio = Tex...
true
true
f706cc977639c419862b7dfbd968317f512d4756
1,113
py
Python
test/test_text_covid_symptom_annotation_response.py
Sage-Bionetworks/nlp-sandbox-client
e51720b35ca3413ccee71b9cdc223ce3578fe0fd
[ "Apache-2.0" ]
3
2021-06-15T16:36:10.000Z
2021-11-15T01:44:46.000Z
test/test_text_covid_symptom_annotation_response.py
nlpsandbox/nlpsandbox-client
8cba4f65ff2c06cbef7dc50f45b0aec9b8ee0476
[ "Apache-2.0" ]
165
2020-11-23T00:36:40.000Z
2022-03-24T00:53:59.000Z
test/test_text_covid_symptom_annotation_response.py
data2health/nlp-sandbox-evaluation
e51720b35ca3413ccee71b9cdc223ce3578fe0fd
[ "Apache-2.0" ]
3
2020-12-11T00:04:13.000Z
2022-01-03T16:59:10.000Z
""" NLP Sandbox Date Annotator API # Overview The OpenAPI specification implemented by NLP Sandbox Annotators. # noqa: E501 The version of the OpenAPI document: 1.1.1 Contact: thomas.schaffter@sagebionetworks.org Generated by: https://openapi-generator.tech """ import sys import unittest impo...
28.538462
102
0.761006
import sys import unittest import nlpsandbox from nlpsandbox.model.text_covid_symptom_annotation import TextCovidSymptomAnnotation globals()['TextCovidSymptomAnnotation'] = TextCovidSymptomAnnotation from nlpsandbox.model.text_covid_symptom_annotation_response import TextCovidSymptomAnnotationResponse class TestTe...
true
true
f706ce7f3463fa73ed2b56b42d3063d5b85287a0
13,823
py
Python
Packs/Humio/Integrations/Humio/Humio.py
matan-xmcyber/content
7f02301c140b35956af3cd20cb8dfc64f34afb3e
[ "MIT" ]
1
2021-08-07T00:21:58.000Z
2021-08-07T00:21:58.000Z
Packs/Humio/Integrations/Humio/Humio.py
matan-xmcyber/content
7f02301c140b35956af3cd20cb8dfc64f34afb3e
[ "MIT" ]
3
2019-12-13T13:27:20.000Z
2020-01-01T14:27:45.000Z
Packs/Humio/Integrations/Humio/Humio.py
matan-xmcyber/content
7f02301c140b35956af3cd20cb8dfc64f34afb3e
[ "MIT" ]
null
null
null
import json from datetime import datetime from typing import Dict import requests import demistomock as demisto from CommonServerPython import * """ IMPORTS """ # Disable insecure warnings from urllib3 # - this does not disable SSL checking, just the warnings logged from urllib3 requests.packages.urllib3.disable_w...
35.903896
88
0.604861
import json from datetime import datetime from typing import Dict import requests import demistomock as demisto from CommonServerPython import * requests.packages.urllib3.disable_warnings() class Client: def __init__(self, base_url, verify, proxies): self.base_url = base_url self.verify = ...
true
true
f706cf76b54cc4c098042b2f90166bb68c83d6a5
6,718
py
Python
isi_sdk_8_2_2/isi_sdk_8_2_2/models/drives_drive_firmware_update_node.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/drives_drive_firmware_update_node.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_2/isi_sdk_8_2_2/models/drives_drive_firmware_update_node.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 9 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_2.models.drives_...
31.539906
128
0.590652
import pprint import re import six from isi_sdk_8_2_2.models.drives_drive_firmware_update_node_status import DrivesDriveFirmwareUpdateNodeStatus class DrivesDriveFirmwareUpdateNode(object): swagger_types = { 'error': 'str', 'id': 'int', 'lnn': 'int', 'status': 'DrivesDri...
true
true
f706d14334bb08a8ccf435d9f9f2b9ab61932112
1,466
py
Python
branches/urls.py
flixgithub/adminset
e14f2c5c6b5f16ba1ebbbfb323d5373eb1fb1365
[ "Apache-2.0" ]
5
2019-01-23T02:12:41.000Z
2021-01-01T05:00:11.000Z
branches/urls.py
flixgithub/adminset
e14f2c5c6b5f16ba1ebbbfb323d5373eb1fb1365
[ "Apache-2.0" ]
null
null
null
branches/urls.py
flixgithub/adminset
e14f2c5c6b5f16ba1ebbbfb323d5373eb1fb1365
[ "Apache-2.0" ]
1
2021-12-10T15:44:11.000Z
2021-12-10T15:44:11.000Z
#! /usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import url, include from branches import region, branch, resource urlpatterns = [ url(r'^$', region.region_list, name='branches'), url(r'^region/add/$', region.region_add, name='region_add'), url(r'^region/list/$', region.region_list, nam...
61.083333
105
0.688267
from django.conf.urls import url, include from branches import region, branch, resource urlpatterns = [ url(r'^$', region.region_list, name='branches'), url(r'^region/add/$', region.region_add, name='region_add'), url(r'^region/list/$', region.region_list, name='region_list'), url(r'^region/branch_de...
true
true
f706d3fdab0be190c441e8b3396c9b2ee7bc4b85
1,086
py
Python
awards/urls.py
tonyguthiga/reviews
85f89107a036b0312b71463c70e88f7b9ecf8ac9
[ "Unlicense" ]
null
null
null
awards/urls.py
tonyguthiga/reviews
85f89107a036b0312b71463c70e88f7b9ecf8ac9
[ "Unlicense" ]
null
null
null
awards/urls.py
tonyguthiga/reviews
85f89107a036b0312b71463c70e88f7b9ecf8ac9
[ "Unlicense" ]
null
null
null
"""awards URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
38.785714
79
0.703499
from django.conf.urls import url, include from django.contrib import admin from django.contrib.auth import views from rest_framework.authtoken.views import obtain_auth_token urlpatterns = [ url(r'^admin/', admin.site.urls), url('', include('project.urls')), url(r'^accounts/', include('registration.backends...
true
true
f706d4b6557ec2a584fa1811681b72f4322ffd9d
1,625
py
Python
bigua/API/capture.py
AliferSales/bigua
1f51897603c12ce07a03d1a340854b96d0d1412b
[ "MIT" ]
null
null
null
bigua/API/capture.py
AliferSales/bigua
1f51897603c12ce07a03d1a340854b96d0d1412b
[ "MIT" ]
null
null
null
bigua/API/capture.py
AliferSales/bigua
1f51897603c12ce07a03d1a340854b96d0d1412b
[ "MIT" ]
null
null
null
import requests import sqlalchemy import xmltodict from sqlalchemy import create_engine, MetaData from collections import defaultdict import datetime from utils import * class Capture(object): def __init__(self, schema, database='projetocurio' ): ...
26.209677
102
0.600615
import requests import sqlalchemy import xmltodict from sqlalchemy import create_engine, MetaData from collections import defaultdict import datetime from utils import * class Capture(object): def __init__(self, schema, database='projetocurio' ): ...
true
true
f706d4ec66f0ac2e57158efdb52d3987857d98f3
10,269
py
Python
eucaconsole/views/keypairs.py
dmitrii/eucaconsole
6de222023adbdd9c643a39eeeeed10680a3fb1fa
[ "BSD-2-Clause" ]
null
null
null
eucaconsole/views/keypairs.py
dmitrii/eucaconsole
6de222023adbdd9c643a39eeeeed10680a3fb1fa
[ "BSD-2-Clause" ]
10
2018-03-28T17:25:16.000Z
2021-03-05T10:15:06.000Z
eucaconsole/views/keypairs.py
dmitrii/eucaconsole
6de222023adbdd9c643a39eeeeed10680a3fb1fa
[ "BSD-2-Clause" ]
1
2019-06-07T20:43:45.000Z
2019-06-07T20:43:45.000Z
# -*- coding: utf-8 -*- # Copyright 2013-2017 Ent. Services Development Corporation LP # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyrigh...
44.842795
117
0.657123
import simplejson as json from boto.exception import BotoServerError from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config from pyramid.response import Response from ..forms.keypairs import KeyPairForm, KeyPairImportForm, KeyPairDeleteForm from ..i18n import _ fro...
true
true
f706d5647d825b268edd317638d8fedc56c8528e
7,489
py
Python
tests/hooks/test_postgres_hook.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
1
2016-12-22T00:34:58.000Z
2016-12-22T00:34:58.000Z
tests/hooks/test_postgres_hook.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
21
2016-06-27T15:25:06.000Z
2017-11-23T17:41:04.000Z
tests/hooks/test_postgres_hook.py
BeeXiong/airflow
4aa272d15463ce9866dc2b2a3b83c34192f6f353
[ "Apache-2.0" ]
3
2021-02-23T07:52:47.000Z
2021-03-02T06:33:44.000Z
# -*- coding: utf-8 -*- # # 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 #...
40.263441
105
0.626385
import mock import unittest from tempfile import NamedTemporaryFile import psycopg2.extras import pytest from airflow.hooks.postgres_hook import PostgresHook from airflow.models import Connection class TestPostgresHookConn(unittest.TestCase): def setUp(self): super(TestPostgresHook...
true
true
f706d569e947e99ded2d422561f8f4c324658817
44
py
Python
pyinterpolate/idw/__init__.py
NarayanAdithya/pyinterpolate
3a8166ad0ca884f29be1afe789eff4ccfc891f71
[ "BSD-3-Clause" ]
61
2018-08-15T17:16:12.000Z
2021-09-06T09:25:49.000Z
pyinterpolate/idw/__init__.py
NarayanAdithya/pyinterpolate
3a8166ad0ca884f29be1afe789eff4ccfc891f71
[ "BSD-3-Clause" ]
70
2018-06-16T19:12:49.000Z
2021-09-16T16:28:48.000Z
pyinterpolate/idw/__init__.py
NarayanAdithya/pyinterpolate
3a8166ad0ca884f29be1afe789eff4ccfc891f71
[ "BSD-3-Clause" ]
7
2019-10-16T05:48:12.000Z
2021-07-06T14:09:29.000Z
from .idw import inverse_distance_weighting
22
43
0.886364
from .idw import inverse_distance_weighting
true
true
f706d5d9f9be570ff171a3ab7eb7bf4a20a7c1d6
9,633
py
Python
pysnmp-with-texts/IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/IPX-INTERFACE-MANAGEMENT-PRIVATE-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:56:57 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # U...
148.2
647
0.778158
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection, ValueRangeConstraint = mibBuild...
true
true
f706d7035651c9584f84acec4c10b93b456c5557
3,781
py
Python
homeassistant/components/transmission/switch.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/transmission/switch.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/transmission/switch.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Support for setting the Transmission BitTorrent client Turtle Mode.""" import logging from homeassistant.const import CONF_NAME, STATE_OFF, STATE_ON from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import ToggleEntity fr...
32.042373
81
0.64877
import logging from homeassistant.const import CONF_NAME, STATE_OFF, STATE_ON from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import ToggleEntity from .const import DOMAIN, SWITCH_TYPES _LOGGING = logging.getLogger(__name...
true
true
f706d7e6c866dc019f33a99596b9cb425f3eae63
1,695
py
Python
src/Step4(OldAndFast)-categories-permutations.py
YossiCohen/Cross-Domain-Transfer-Learning-RecSys
a4c980a1d1c32b18927fbe7288349cfc34ab9bab
[ "MIT" ]
3
2017-12-18T01:14:02.000Z
2019-07-10T02:38:05.000Z
src/Step4(OldAndFast)-categories-permutations.py
YossiCohen/Cross-Domain-Transfer-Learning-RecSys
a4c980a1d1c32b18927fbe7288349cfc34ab9bab
[ "MIT" ]
1
2019-08-07T04:40:58.000Z
2019-08-07T04:40:58.000Z
src/Step4(OldAndFast)-categories-permutations.py
YossiCohen/Cross-Domain-Transfer-Learning-RecSys
a4c980a1d1c32b18927fbe7288349cfc34ab9bab
[ "MIT" ]
null
null
null
import csv import time import os import pandas as pd DATA_ROOT = "C:\\RS\\Amazon\\All\\" MINIMUM_X_CATEGORIES_FILENAME = 'minimum_2_Categories.csv' timestamp = time.strftime('%y%m%d%H%M%S') out_filename = os.path.join(DATA_ROOT, timestamp + 'categories_permutations.csv') with open(out_filename, 'w', newline='', enc...
44.605263
113
0.653687
import csv import time import os import pandas as pd DATA_ROOT = "C:\\RS\\Amazon\\All\\" MINIMUM_X_CATEGORIES_FILENAME = 'minimum_2_Categories.csv' timestamp = time.strftime('%y%m%d%H%M%S') out_filename = os.path.join(DATA_ROOT, timestamp + 'categories_permutations.csv') with open(out_filename, 'w', newline='', enc...
true
true
f706d858286718758767ea4215b9cd24b720e587
4,484
py
Python
core/src/zeit/edit/tests/test_container.py
louika/vivi
3cc213b873d527127aa6f0dd3c79a542299a8a0e
[ "BSD-3-Clause" ]
null
null
null
core/src/zeit/edit/tests/test_container.py
louika/vivi
3cc213b873d527127aa6f0dd3c79a542299a8a0e
[ "BSD-3-Clause" ]
null
null
null
core/src/zeit/edit/tests/test_container.py
louika/vivi
3cc213b873d527127aa6f0dd3c79a542299a8a0e
[ "BSD-3-Clause" ]
null
null
null
from persistent.interfaces import IPersistent import lxml.objectify import mock import unittest import zeit.cms.workingcopy.interfaces import zeit.edit.container import zeit.edit.testing import zeit.edit.tests.fixture import zope.interface import zope.security.proxy class TestContainer(unittest.TestCase): def ge...
37.057851
77
0.672391
from persistent.interfaces import IPersistent import lxml.objectify import mock import unittest import zeit.cms.workingcopy.interfaces import zeit.edit.container import zeit.edit.testing import zeit.edit.tests.fixture import zope.interface import zope.security.proxy class TestContainer(unittest.TestCase): def ge...
true
true
f706d8d18049883b7837fe91be0a274c6ead6288
153
py
Python
backend/ReMu/music/admin.py
choihs2393/YourVoice_PJT
02f095b08b988276f3997ab9cb18632499ac6b2e
[ "MIT" ]
null
null
null
backend/ReMu/music/admin.py
choihs2393/YourVoice_PJT
02f095b08b988276f3997ab9cb18632499ac6b2e
[ "MIT" ]
null
null
null
backend/ReMu/music/admin.py
choihs2393/YourVoice_PJT
02f095b08b988276f3997ab9cb18632499ac6b2e
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Artists, Albums, Tracks # Register your models here. admin.site.register([Artists, Albums, Tracks])
30.6
46
0.79085
from django.contrib import admin from .models import Artists, Albums, Tracks admin.site.register([Artists, Albums, Tracks])
true
true
f706d93ace8a02bb1827c308f9c48cbd414fa2ae
3,921
py
Python
xrayvision/tests/test_clean.py
sunpy/xrayvision
905042be8227688c4088800423dfa8db79e56566
[ "BSD-3-Clause" ]
4
2018-04-06T15:32:25.000Z
2021-01-28T09:27:54.000Z
xrayvision/tests/test_clean.py
sunpy/xrayvision
905042be8227688c4088800423dfa8db79e56566
[ "BSD-3-Clause" ]
33
2017-06-29T22:52:46.000Z
2020-10-30T09:06:21.000Z
xrayvision/tests/test_clean.py
sunpy/xrayvision
905042be8227688c4088800423dfa8db79e56566
[ "BSD-3-Clause" ]
5
2017-07-07T06:18:24.000Z
2021-01-28T09:27:59.000Z
import numpy as np import astropy.units as u from astropy.convolution.kernels import Gaussian2DKernel from scipy import signal from ..clean import clean, ms_clean, component, radial_prolate_sphereoidal,\ vec_radial_prolate_sphereoidal from ..transform import dft_map, idft_map def test_clean_ideal(): n = m =...
29.931298
96
0.616169
import numpy as np import astropy.units as u from astropy.convolution.kernels import Gaussian2DKernel from scipy import signal from ..clean import clean, ms_clean, component, radial_prolate_sphereoidal,\ vec_radial_prolate_sphereoidal from ..transform import dft_map, idft_map def test_clean_ideal(): n = m =...
true
true
f706dc272c114b0f5868e62d1d68cbe7a0866c42
2,676
py
Python
mplotlab/graphics/Navigation.py
DedeKite/wxPlotLab
808d457aeb897ceb37535bcd11d15b65a0a14cd1
[ "MIT" ]
6
2016-03-21T18:44:23.000Z
2021-05-16T19:07:02.000Z
mplotlab/graphics/Navigation.py
DedeKite/wxPlotLab
808d457aeb897ceb37535bcd11d15b65a0a14cd1
[ "MIT" ]
1
2018-05-15T14:47:03.000Z
2018-05-15T14:47:03.000Z
mplotlab/graphics/Navigation.py
astyl/mplotlab
808d457aeb897ceb37535bcd11d15b65a0a14cd1
[ "MIT" ]
1
2016-01-29T12:38:20.000Z
2016-01-29T12:38:20.000Z
# -*-coding:Utf-8 -* from mplotlab import App from matplotlib.backend_bases import NavigationToolbar2 import wx class Cursors: # this class is only used as a simple namespace HAND, POINTER, SELECT_REGION, MOVE = list(range(4)) cursors = Cursors() cursord = { cursors.MOVE : wx.CURSOR_HAND, ...
28.774194
69
0.554933
from mplotlab import App from matplotlib.backend_bases import NavigationToolbar2 import wx class Cursors: HAND, POINTER, SELECT_REGION, MOVE = list(range(4)) cursors = Cursors() cursord = { cursors.MOVE : wx.CURSOR_HAND, cursors.HAND : wx.CURSOR_HAND, cursors.POINTER : wx.CURSOR_A...
true
true
f706dc2f4a8aec4c68a6be3ae0660ef6a3aa8106
8,232
py
Python
share/lib/python/neuron/tests/test_neuron.py
niltonlk/nrn
464541abbf72fe58de77b16bf0e1df425a280b89
[ "BSD-3-Clause" ]
203
2018-05-03T11:02:11.000Z
2022-03-31T14:18:31.000Z
share/lib/python/neuron/tests/test_neuron.py
niltonlk/nrn
464541abbf72fe58de77b16bf0e1df425a280b89
[ "BSD-3-Clause" ]
1,228
2018-04-25T09:00:48.000Z
2022-03-31T21:42:21.000Z
share/lib/python/neuron/tests/test_neuron.py
niltonlk/nrn
464541abbf72fe58de77b16bf0e1df425a280b89
[ "BSD-3-Clause" ]
134
2018-04-23T09:14:13.000Z
2022-03-16T08:57:11.000Z
""" UnitTests of the python interface to the neuron class. Items declared in neuron/__init__.py $Id$ """ import unittest import neuron from neuron import h class NeuronTestCase(unittest.TestCase): """Tests of neuron""" def testHClass(self): """Test subclass of hoc class.""" from ._subclass...
28.386207
91
0.541545
import unittest import neuron from neuron import h class NeuronTestCase(unittest.TestCase): def testHClass(self): from ._subclass import A1 a = A1(5) assert a.x == 5.0 assert a.p() == 6.0 b = A1(4) a.s = "one" b.s = "two" assert a.s == "one" ...
true
true
f706dcfc52e08a56d60aaa84bb2d1f6b87d7c877
6,383
py
Python
test/functional/bipdersig-p2p.py
ingenierobinario/IngenieroBinarioCoin
636381185fc31a4d0eeeec8d40b44b931c27aac2
[ "MIT" ]
2
2020-07-16T12:40:16.000Z
2021-03-04T20:50:48.000Z
test/functional/bipdersig-p2p.py
ingenierobinario/IngenieroBinarioCoin
636381185fc31a4d0eeeec8d40b44b931c27aac2
[ "MIT" ]
2
2020-09-11T22:04:53.000Z
2020-11-15T23:08:26.000Z
test/functional/bipdersig-p2p.py
ingenierobinario/IngenieroBinarioCoin
636381185fc31a4d0eeeec8d40b44b931c27aac2
[ "MIT" ]
4
2020-08-10T14:10:33.000Z
2021-03-21T16:33:17.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test BIP66 (DER SIG). Test that the DERSIG soft-fork activates at (regtest) height 1251. """ from tes...
41.718954
185
0.670061
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import * from test_framework.blocktools import create_coinbase, create_block from test_framework.script import CScript from io import BytesIO DERSIG_HEIGHT = 1251 REJECT_INVALID = 16 REJ...
true
true
f706dd0cd02b5ff8e32a840ea1003dd6fb0a5624
128
py
Python
estimation.py
cle-ment/joblearn
faa11851e62c0d26de1df3ca3a4fde15655920c3
[ "MIT" ]
null
null
null
estimation.py
cle-ment/joblearn
faa11851e62c0d26de1df3ca3a4fde15655920c3
[ "MIT" ]
null
null
null
estimation.py
cle-ment/joblearn
faa11851e62c0d26de1df3ca3a4fde15655920c3
[ "MIT" ]
null
null
null
import collections EstimatorSetting = collections.namedtuple( 'EstimatorSetting', ['title', 'estimator', 'parameter_space'])
25.6
64
0.773438
import collections EstimatorSetting = collections.namedtuple( 'EstimatorSetting', ['title', 'estimator', 'parameter_space'])
true
true
f706dd56a5986dc03f8a731f80113ce4588531fc
1,051
py
Python
src/OTLMOW/PostenMapping/Model/Post060339901.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/PostenMapping/Model/Post060339901.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/PostenMapping/Model/Post060339901.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
# coding=utf-8 from OTLMOW.PostenMapping.StandaardPost import StandaardPost from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping # Generated with PostenCreator. To modify: extend, do not edit class Post060339901(StandaardPost): def __init__(self): super().__init__( nummer...
40.423077
111
0.615604
from OTLMOW.PostenMapping.StandaardPost import StandaardPost from OTLMOW.PostenMapping.StandaardPostMapping import StandaardPostMapping class Post060339901(StandaardPost): def __init__(self): super().__init__( nummer='0603.39901', beschrijving='Heropvoegen van betonstraatstenen v...
true
true
f706dd7eccd9913ba9df456ae6a55e264269e76f
1,391
py
Python
fastai/gen_doc/doctest.py
heye0507/fastai
d9ffb07c4a8202f5cd88bc041ccc3ab6da669abb
[ "Apache-2.0" ]
null
null
null
fastai/gen_doc/doctest.py
heye0507/fastai
d9ffb07c4a8202f5cd88bc041ccc3ab6da669abb
[ "Apache-2.0" ]
null
null
null
fastai/gen_doc/doctest.py
heye0507/fastai
d9ffb07c4a8202f5cd88bc041ccc3ab6da669abb
[ "Apache-2.0" ]
1
2022-01-22T17:15:30.000Z
2022-01-22T17:15:30.000Z
import sys, inspect, re from os.path import basename, split __all__ = ['this_tests'] class RegisterTestsPerAPI: apiTestsMap = dict() @staticmethod def this_tests(testedapi): prev_frame = inspect.currentframe().f_back.f_back pathfilename, line_number, test_function_name, lines, index = ins...
36.605263
115
0.721064
import sys, inspect, re from os.path import basename, split __all__ = ['this_tests'] class RegisterTestsPerAPI: apiTestsMap = dict() @staticmethod def this_tests(testedapi): prev_frame = inspect.currentframe().f_back.f_back pathfilename, line_number, test_function_name, lines, index = ins...
true
true
f706de71defe2ffe8e4b1c974d63f5924603b55d
1,532
py
Python
samples/polybench/lu.py
Walon1998/dace
95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0
[ "BSD-3-Clause" ]
227
2019-03-15T23:39:06.000Z
2022-03-30T07:49:08.000Z
samples/polybench/lu.py
Walon1998/dace
95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0
[ "BSD-3-Clause" ]
834
2019-07-31T22:49:31.000Z
2022-03-28T14:01:32.000Z
samples/polybench/lu.py
Walon1998/dace
95ddfd3e9a5c654f0f0d66d026e0b64ec0f028a0
[ "BSD-3-Clause" ]
64
2019-03-19T05:40:37.000Z
2022-03-11T15:02:42.000Z
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. import math import numpy as np import dace import polybench N = dace.symbol('N') #datatypes = [dace.float64, dace.int32, dace.float32] datatype = dace.float64 # Dataset sizes sizes = [{N: 40}, {N: 120}, {N: 400}, {N: 2000}, {N: 4000}] args ...
24.31746
75
0.450392
import math import numpy as np import dace import polybench N = dace.symbol('N') datatype = dace.float64 sizes = [{N: 40}, {N: 120}, {N: 400}, {N: 2000}, {N: 4000}] args = [([N, N], datatype)] def init_array(A): n = N.get() for i in range(0, n, 1): for j in range(0, i + 1, 1): ...
true
true
f706dec8dfd390515aaceced841ff217ac36b6f2
4,497
py
Python
pseas/runnable/print_table_step1.py
Theomat/MPSEAS
91f9c991e2061a7d230e491210d2c93005fd2236
[ "MIT" ]
null
null
null
pseas/runnable/print_table_step1.py
Theomat/MPSEAS
91f9c991e2061a7d230e491210d2c93005fd2236
[ "MIT" ]
null
null
null
pseas/runnable/print_table_step1.py
Theomat/MPSEAS
91f9c991e2061a7d230e491210d2c93005fd2236
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np COLORS_QTY: int = 5 # ============================================================================= # Argument parsing. # ============================================================================= import argparse from scipy import integrate argument_parser: argparse.ArgumentP...
41.256881
144
0.537914
import pandas as pd import numpy as np COLORS_QTY: int = 5 import argparse from scipy import integrate argument_parser: argparse.ArgumentParser = argparse.ArgumentParser( description="Plot figures based on run data.") argument_default_values = { "suffix": 'kissat_ibm', "folder": "." } argument_parser.ad...
true
true
f706df8e4c616f9074c2619a34fceb6bc558ccfc
2,862
py
Python
burger_war_dev/scripts/waypoint.py
KoutaOhishi/burger_war_dev
9a7e21d631dc7e82f5341450ddafdc8ed32d2ac1
[ "BSD-3-Clause" ]
1
2021-11-30T00:45:03.000Z
2021-11-30T00:45:03.000Z
burger_war_dev/scripts/waypoint.py
KoutaOhishi/burger_war_dev
9a7e21d631dc7e82f5341450ddafdc8ed32d2ac1
[ "BSD-3-Clause" ]
null
null
null
burger_war_dev/scripts/waypoint.py
KoutaOhishi/burger_war_dev
9a7e21d631dc7e82f5341450ddafdc8ed32d2ac1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import math import numpy as np FIELD_SCORE_NUM_OFFSET=6 class Waypoints: def __init__(self, path, side): self.points = [] self.number = 0 self.Waypoints_Lap = 0 self.next_target_idx = -1 self.all_field_score = np.on...
30.446809
77
0.544375
import csv import math import numpy as np FIELD_SCORE_NUM_OFFSET=6 class Waypoints: def __init__(self, path, side): self.points = [] self.number = 0 self.Waypoints_Lap = 0 self.next_target_idx = -1 self.all_field_score = np.ones([18]) self._load_waypoints(path...
true
true
f706e140b328f2d475abcd959ed7cd700e802f93
5,979
py
Python
saccader/visual_attention/saccader_classnet.py
kiss2u/google-research
2cd66234656f9e2f4218ed90a2d8aa9cf3139093
[ "Apache-2.0" ]
7
2020-03-15T12:14:07.000Z
2021-12-01T07:01:09.000Z
saccader/visual_attention/saccader_classnet.py
iworkist/google-research
5b70d349a6af2f5ec1694bfd5341e6b3fb526947
[ "Apache-2.0" ]
12
2020-09-25T22:33:31.000Z
2022-02-10T01:32:21.000Z
saccader/visual_attention/saccader_classnet.py
iworkist/google-research
5b70d349a6af2f5ec1694bfd5341e6b3fb526947
[ "Apache-2.0" ]
4
2020-06-15T03:06:53.000Z
2021-08-06T16:38:33.000Z
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
40.952055
84
0.74561
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.compat.v1 as tf from saccader import utils from saccader.visual_attention import saccader from tensorflow.contrib import slim as contrib_slim from tensorflow_models.slim.nets...
true
true
f706e1646b0d0812da3a241420247eb999521f8e
424
py
Python
movie/model/page.py
Jaylee89/m3u8
4e09f083e2efb18cf0a1f296c558563a3280dae5
[ "Apache-2.0" ]
null
null
null
movie/model/page.py
Jaylee89/m3u8
4e09f083e2efb18cf0a1f296c558563a3280dae5
[ "Apache-2.0" ]
null
null
null
movie/model/page.py
Jaylee89/m3u8
4e09f083e2efb18cf0a1f296c558563a3280dae5
[ "Apache-2.0" ]
null
null
null
class Page(object): start: int end: int domain: str all_urls: Any m3u8_dict: dict __slots__ = ("start", "end", "domain", "all_urls", "m3u8_dict") def __init__(self, start, end, domain, all_urls = [], **m3u8_dict): # super().__init__() self.start = start self.end = e...
24.941176
71
0.573113
class Page(object): start: int end: int domain: str all_urls: Any m3u8_dict: dict __slots__ = ("start", "end", "domain", "all_urls", "m3u8_dict") def __init__(self, start, end, domain, all_urls = [], **m3u8_dict): self.start = start self.end = end self.doma...
true
true
f706e18741df654f96708dd4a63e0fba80d95f96
1,029
py
Python
examples/train_transd_FB15K237.py
dhruvdcoder/OpenKE
c11f0958f4d0a08046b57cd41d83cedee70c64ac
[ "MIT" ]
2
2019-08-05T16:00:44.000Z
2019-09-06T04:51:09.000Z
examples/train_transd_FB15K237.py
dhruvdcoder/OpenKE
c11f0958f4d0a08046b57cd41d83cedee70c64ac
[ "MIT" ]
1
2019-11-16T10:06:13.000Z
2019-11-16T10:06:13.000Z
examples/train_transd_FB15K237.py
dhruvdcoder/OpenKE
c11f0958f4d0a08046b57cd41d83cedee70c64ac
[ "MIT" ]
3
2019-09-09T13:14:05.000Z
2022-02-11T19:30:39.000Z
import config import models import tensorflow as tf import numpy as np import os from sys import argv os.environ['CUDA_VISIBLE_DEVICES']='0' #Input training files from benchmarks/FB15K/ folder. con = config.Config() #True: Input test files from the same folder. con.set_in_path("./benchmarks/FB15K237/") con.set_test_li...
27.078947
63
0.792031
import config import models import tensorflow as tf import numpy as np import os from sys import argv os.environ['CUDA_VISIBLE_DEVICES']='0' con = config.Config() con.set_in_path("./benchmarks/FB15K237/") con.set_test_link_prediction(True) con.set_work_threads(8) con.set_train_times(1000) con.set_nbatches(100) con....
true
true
f706e190a3a70ce260cedb9750fbc5b92402bc73
696
py
Python
Experiment Processing/skip_dataset.py
Austaon/GroupRecommendationThesis
4a4b8c2f230d7db3b6b36342ab06b02f146462ae
[ "MIT" ]
null
null
null
Experiment Processing/skip_dataset.py
Austaon/GroupRecommendationThesis
4a4b8c2f230d7db3b6b36342ab06b02f146462ae
[ "MIT" ]
null
null
null
Experiment Processing/skip_dataset.py
Austaon/GroupRecommendationThesis
4a4b8c2f230d7db3b6b36342ab06b02f146462ae
[ "MIT" ]
null
null
null
from database.database_util import connect_to_skip_database from skip_dataset.generate_histogram import generate_histogram from skip_dataset.generate_track_data import generate_track_data from skip_dataset.plot_track_sum import plot_track_sum # File used to execute different functions related to Spotify Sequential Ski...
36.631579
107
0.816092
from database.database_util import connect_to_skip_database from skip_dataset.generate_histogram import generate_histogram from skip_dataset.generate_track_data import generate_track_data from skip_dataset.plot_track_sum import plot_track_sum if __name__ == '__main__': connect_to_skip_database() ...
true
true
f706e1a4b4cb90dad5ed63066c3fbb9f23723f10
15,235
py
Python
tensorboard/plugins/interactive_inference/witwidget/notebook/base.py
qzhong0605/tensorboardplugins
92bfc7ca96b933cdbdf074a08f26f5c715d8421d
[ "Apache-2.0" ]
null
null
null
tensorboard/plugins/interactive_inference/witwidget/notebook/base.py
qzhong0605/tensorboardplugins
92bfc7ca96b933cdbdf074a08f26f5c715d8421d
[ "Apache-2.0" ]
null
null
null
tensorboard/plugins/interactive_inference/witwidget/notebook/base.py
qzhong0605/tensorboardplugins
92bfc7ca96b933cdbdf074a08f26f5c715d8421d
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
41.739726
80
0.700361
import base64 import json import googleapiclient.discovery import os import tensorflow as tf from IPython import display from google.protobuf import json_format from numbers import Number from six import ensure_str from tensorboard.plugins.interactive_inference.utils import inference_utils NUM_MUTANTS_T...
true
true
f706e20d97dc0312cf47c0e18d930d13b381ee90
12,868
py
Python
OttBands5minFixedOtt/jessepickerdata/dnafiles/AAVE-USDT 2021-09-11 2021-10-11.py
ysdede/jesse_strategies
ade9f4ba42cec11207c766d267b9d8feb8bce648
[ "CC0-1.0" ]
38
2021-09-18T15:33:28.000Z
2022-02-21T17:29:08.000Z
OttBands5minFixedOtt/jessepickerdata/dnafiles/AAVE-USDT 2021-09-11 2021-10-11.py
ysdede/jesse_strategies
ade9f4ba42cec11207c766d267b9d8feb8bce648
[ "CC0-1.0" ]
4
2022-01-02T14:46:12.000Z
2022-02-16T18:39:41.000Z
OttBands5minFixedOtt/jessepickerdata/dnafiles/AAVE-USDT 2021-09-11 2021-10-11.py
ysdede/jesse_strategies
ade9f4ba42cec11207c766d267b9d8feb8bce648
[ "CC0-1.0" ]
11
2021-10-19T06:21:43.000Z
2022-02-21T17:29:10.000Z
dnas = [ ['wVW*?', 48, 52, 15.52, 40, 10, -0.23, {'ott_len': 35, 'ott_percent': 209, 'ott_bw': 120, 'tps_qty_index': 3, 'max_risk': 30}], ['ftUQf', 46, 66, 10.18, 58, 12, 3.51, {'ott_len': 33, 'ott_percent': 246, 'ott_bw': 117, 'tps_qty_index': 65, 'max_risk': 54}], ['ui*5<', 44, 84, 12.12, 42, 14, 6.81, {'ott_len': 35...
124.932039
129
0.586027
dnas = [ ['wVW*?', 48, 52, 15.52, 40, 10, -0.23, {'ott_len': 35, 'ott_percent': 209, 'ott_bw': 120, 'tps_qty_index': 3, 'max_risk': 30}], ['ftUQf', 46, 66, 10.18, 58, 12, 3.51, {'ott_len': 33, 'ott_percent': 246, 'ott_bw': 117, 'tps_qty_index': 65, 'max_risk': 54}], ['ui*5<', 44, 84, 12.12, 42, 14, 6.81, {'ott_len': 35...
true
true
f706e23e0fb164a0deaa0277e2ce3f4ba53f5577
17,246
py
Python
eap.py
thomasbhatia/pyprotosim
4aa5db57a9963d72d2dc1f3a1378855b96805106
[ "Unlicense" ]
12
2015-04-23T14:23:29.000Z
2021-11-15T11:17:48.000Z
eap.py
thomasbhatia/pyprotosim
4aa5db57a9963d72d2dc1f3a1378855b96805106
[ "Unlicense" ]
null
null
null
eap.py
thomasbhatia/pyprotosim
4aa5db57a9963d72d2dc1f3a1378855b96805106
[ "Unlicense" ]
12
2015-01-26T21:11:22.000Z
2021-07-09T22:24:50.000Z
#!/usr/bin/env python ################################################################## # Copyright (c) 2012, Sergej Srepfler <sergej.srepfler@gmail.com> # February 2012 - May 2012 # Version 0.2.8, Last change on May 31, 2012 # This software is distributed under the terms of BSD license. ##########################...
32.849524
100
0.53166
TY: EAP.avps.append(("Identity",msg.decode("hex"))) return EAP if er!=ERROR: (ssub,msg)=e_chop_msg(msg,2) (sres,msg)=e_chop_msg(msg,4) EAP.stype=decodeU32("000000"+ssub) EAP.msg=msg EAP.avps=splitEAPAVPs(msg) return EAP def encode_EAP(E): if int(E.cmd)=...
true
true
f706e2d73fe596adca41ac0ad7301b350944b8fa
701
py
Python
algorithms/Python/strings/sherlock and the valid string.py
Kumbong/hackerrank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
8
2019-09-19T19:38:09.000Z
2022-02-14T13:59:37.000Z
algorithms/Python/strings/sherlock and the valid string.py
Kumbong/hacker-rank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
null
null
null
algorithms/Python/strings/sherlock and the valid string.py
Kumbong/hacker-rank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
7
2019-09-23T13:17:27.000Z
2022-01-27T18:02:16.000Z
#!/bin/python3 import math import os import random import re import sys # Complete the isValid function below. def isValid(s): ss = list(set(s)) fs = [] for c in ss: fs.append(s.count(c)) if (len(list(set(fs))))==1: return 'YES' elif len(list(set(fs)))==2: mx= max(fs)...
16.690476
66
0.512126
import math import os import random import re import sys def isValid(s): ss = list(set(s)) fs = [] for c in ss: fs.append(s.count(c)) if (len(list(set(fs))))==1: return 'YES' elif len(list(set(fs)))==2: mx= max(fs) mi= min(fs) if (fs.count(mx) ==1 o...
true
true
f706e305ba85f8db264c8a3077be383a22f5c449
3,750
py
Python
tests/test_pwdgrp_cgi.py
sgtio/axis
7d29125494b0a3121841f0388f68609008df45a9
[ "MIT" ]
null
null
null
tests/test_pwdgrp_cgi.py
sgtio/axis
7d29125494b0a3121841f0388f68609008df45a9
[ "MIT" ]
null
null
null
tests/test_pwdgrp_cgi.py
sgtio/axis
7d29125494b0a3121841f0388f68609008df45a9
[ "MIT" ]
null
null
null
"""Test Axis user management. pytest --cov-report term-missing --cov=axis.pwdgrp_cgi tests/test_pwdgrp_cgi.py """ import pytest from unittest.mock import Mock from axis.pwdgrp_cgi import SGRP_ADMIN, User, Users def test_users(): """Verify that you can list users.""" mock_request = Mock() users = Users(...
27.173913
79
0.589867
import pytest from unittest.mock import Mock from axis.pwdgrp_cgi import SGRP_ADMIN, User, Users def test_users(): mock_request = Mock() users = Users(fixture, mock_request) assert users['userv'] assert users['userv'].name == 'userv' assert users['userv'].viewer assert not users['userv'].op...
true
true
f706e3532cbf8aca8e1264c98423dbe019f2885c
1,805
py
Python
akshare/futures_derivative/nh_index_price.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
1
2022-01-23T13:55:24.000Z
2022-01-23T13:55:24.000Z
akshare/futures_derivative/nh_index_price.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
102
2021-09-30T20:54:38.000Z
2021-12-28T13:24:28.000Z
akshare/futures_derivative/nh_index_price.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Date: 2021/12/20 14:52 Desc: 南华期货-商品指数历史走势-价格指数-数值 http://www.nanhua.net/nhzc/varietytrend.html 1000 点开始, 用收益率累计 http://www.nanhua.net/ianalysis/varietyindex/price/A.json?t=1574932974280 """ import time import requests import pandas as pd def futures_nh_index_symbol_t...
31.12069
106
0.690305
import time import requests import pandas as pd def futures_nh_index_symbol_table() -> pd.DataFrame: url = "http://www.nanhua.net/ianalysis/plate-variety.json" r = requests.get(url) data_json = r.json() temp_df = pd.DataFrame(data_json) temp_df['firstday'] = pd.to_datetime(temp_df['firstday'])....
true
true
f706e3b3cf7c75fa3c82a7ed289bbb3950fb98de
3,871
py
Python
pyepidemics/models/examples/covid.py
ekimetrics/pyepidemics
c4be9e03113595f388db6e9a56aa2ab36b102a8e
[ "MIT" ]
1
2020-06-08T14:35:32.000Z
2020-06-08T14:35:32.000Z
pyepidemics/models/examples/covid.py
collectif-codata/pyepidemics
36ca85a58e1c991b8ada419f8b07eb9fcddedf59
[ "MIT" ]
1
2021-02-08T14:31:47.000Z
2021-02-08T14:31:47.000Z
pyepidemics/models/examples/covid.py
ekimetrics/pyepidemics
c4be9e03113595f388db6e9a56aa2ab36b102a8e
[ "MIT" ]
2
2021-02-08T14:34:25.000Z
2021-11-09T20:42:25.000Z
"""Custom COVID19 Compartmental model """ from ..model import CompartmentalModel class COVID19(CompartmentalModel): def __init__(self, N, beta, incubation_rate = 1/3.7, recovery_rate_asymptomatic = 1/4.7, recovery_rate_mild = 1/4.7, ...
37.582524
156
0.549212
from ..model import CompartmentalModel class COVID19(CompartmentalModel): def __init__(self, N, beta, incubation_rate = 1/3.7, recovery_rate_asymptomatic = 1/4.7, recovery_rate_mild = 1/4.7, symptoms_to_hospital_rate = 1/5.5, ...
true
true
f706e3b8327d8566509f17ca9052752603a555bf
9,947
py
Python
TraditionalRecommenderSystems/MatrixFactorization/MatrixFactorization.py
ZhangXiao96/RecommenderSystems4Python
f125536436f83696e133e6b98c22430a47df287d
[ "MIT" ]
1
2021-04-27T04:53:21.000Z
2021-04-27T04:53:21.000Z
TraditionalRecommenderSystems/MatrixFactorization/MatrixFactorization.py
ZhangXiao96/RecommenderSystems4Python
f125536436f83696e133e6b98c22430a47df287d
[ "MIT" ]
null
null
null
TraditionalRecommenderSystems/MatrixFactorization/MatrixFactorization.py
ZhangXiao96/RecommenderSystems4Python
f125536436f83696e133e6b98c22430a47df287d
[ "MIT" ]
null
null
null
from lib.utils import top_k from TraditionalRecommenderSystems.MatrixFactorization.Models import BaseMF import numpy as np import pandas as pd import torch from torch import nn import torch.utils.data as data from tqdm import tqdm class MatrixFactorization(object): def __init__(self, user_item_pairs, user_list, i...
45.213636
122
0.638886
from lib.utils import top_k from TraditionalRecommenderSystems.MatrixFactorization.Models import BaseMF import numpy as np import pandas as pd import torch from torch import nn import torch.utils.data as data from tqdm import tqdm class MatrixFactorization(object): def __init__(self, user_item_pairs, user_list, i...
true
true
f706e573e0a1e840907c0042369d04de7b522a82
7,807
py
Python
brain/mcts_alphaZero.py
cww97/Jordan
00234927d5c33e2dd301c5dae57eb89cd5e54c79
[ "MIT" ]
1
2018-06-11T18:05:11.000Z
2018-06-11T18:05:11.000Z
brain/mcts_alphaZero.py
cww97/ChessRobot
00234927d5c33e2dd301c5dae57eb89cd5e54c79
[ "MIT" ]
null
null
null
brain/mcts_alphaZero.py
cww97/ChessRobot
00234927d5c33e2dd301c5dae57eb89cd5e54c79
[ "MIT" ]
1
2018-04-29T03:52:26.000Z
2018-04-29T03:52:26.000Z
import numpy as np import copy def softmax(x): probs = np.exp(x - np.max(x)) probs /= np.sum(probs) return probs class TreeNode(object): """A node in the MCTS tree. Each node keeps track of its own value Q, prior probability P, and its visit-count-adjusted prior score u. """ def __init_...
40.242268
117
0.603433
import numpy as np import copy def softmax(x): probs = np.exp(x - np.max(x)) probs /= np.sum(probs) return probs class TreeNode(object): def __init__(self, parent, prior_p): self._parent = parent self._children = {} self._n_visits = 0 self._Q = 0 self._u = ...
true
true
f706e588a1d2925f8f437bbb4b3428cf74d0e034
911
py
Python
IMU/VTK-6.2.0/Examples/Infovis/Python/boost_bfs.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
4
2016-03-30T14:31:52.000Z
2019-02-02T05:01:32.000Z
IMU/VTK-6.2.0/Examples/Infovis/Python/boost_bfs.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
null
null
null
IMU/VTK-6.2.0/Examples/Infovis/Python/boost_bfs.py
timkrentz/SunTracker
9a189cc38f45e5fbc4e4c700d7295a871d022795
[ "MIT" ]
2
2019-08-30T23:36:13.000Z
2019-11-08T16:52:01.000Z
#!/usr/bin/env python from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(15) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) bfs = vtkBoostBreadthFirstSearch() bfs.AddInputConnection(source.GetOutputPort()) bfs.SetOriginVertex(0) view = vtkGraphLayoutView() vie...
24.621622
63
0.791438
from vtk import * source = vtkRandomGraphSource() source.SetNumberOfVertices(15) source.SetStartWithTree(True) source.SetIncludeEdgeWeights(True) bfs = vtkBoostBreadthFirstSearch() bfs.AddInputConnection(source.GetOutputPort()) bfs.SetOriginVertex(0) view = vtkGraphLayoutView() view.AddRepresentationFro...
true
true
f706e5f33346dbf3d138356830c3075f584853c2
38,416
py
Python
pytorch_lightning/plugins/training_type/deepspeed.py
ddrevicky/pytorch-lightning
5206e52786917b3c87cb012933bd138615d8543d
[ "Apache-2.0" ]
3
2020-04-11T01:39:41.000Z
2022-03-09T16:21:01.000Z
pytorch_lightning/plugins/training_type/deepspeed.py
ddrevicky/pytorch-lightning
5206e52786917b3c87cb012933bd138615d8543d
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/plugins/training_type/deepspeed.py
ddrevicky/pytorch-lightning
5206e52786917b3c87cb012933bd138615d8543d
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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...
46.06235
120
0.659595
import contextlib import json import logging import os import platform from collections import OrderedDict from pathlib import Path from typing import Any, Callable, Dict, Generator, List, Mapping, Optional, Tuple, Union import torch from torch.optim import Optimizer import pytorch_lightning as pl from p...
true
true
f706e64d9b7d20f624cc7be2e1f083db875735f6
790
py
Python
executions/geo/evaluate_sql.py
JasperGuo/MeaningRepresentationBenchmark
b61e8ed68fdbd934c195fa968445540bfa897f2f
[ "MIT" ]
9
2020-11-11T08:54:05.000Z
2022-03-22T11:16:03.000Z
executions/geo/evaluate_sql.py
JasperGuo/MeaningRepresentationBenchmark
b61e8ed68fdbd934c195fa968445540bfa897f2f
[ "MIT" ]
null
null
null
executions/geo/evaluate_sql.py
JasperGuo/MeaningRepresentationBenchmark
b61e8ed68fdbd934c195fa968445540bfa897f2f
[ "MIT" ]
2
2021-01-14T08:25:25.000Z
2021-06-08T21:41:32.000Z
# coding=utf8 import os import re import json import argparse from sql.evaluator import compare_sqls def evaluate(path, timeout=120): with open(path, 'r') as f: predictions = json.load(f) total = len(predictions) correct = 0 for pidx, p in enumerate(predictions): truth = p['truth...
25.483871
87
0.644304
import os import re import json import argparse from sql.evaluator import compare_sqls def evaluate(path, timeout=120): with open(path, 'r') as f: predictions = json.load(f) total = len(predictions) correct = 0 for pidx, p in enumerate(predictions): truth = p['truth_logical_form...
true
true
f706e88168c701f68446dfe4b8a2fed8e8df2f0d
3,405
py
Python
proj/archs/segmentation/baselines/net10a_doersch.py
zqma/IIC
9d4e30b51535c6ca381389d9c22ce45be4d11883
[ "MIT" ]
null
null
null
proj/archs/segmentation/baselines/net10a_doersch.py
zqma/IIC
9d4e30b51535c6ca381389d9c22ce45be4d11883
[ "MIT" ]
null
null
null
proj/archs/segmentation/baselines/net10a_doersch.py
zqma/IIC
9d4e30b51535c6ca381389d9c22ce45be4d11883
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from proj.archs.cluster.vgg import VGGNet from proj.archs.segmentation.net10a import SegmentationNet10aTrunk, \ SegmentationNet10a from proj.utils.segmentation.baselines.general import get_patches __all__ = ["SegmentationNet10aDoersch"] class Do...
34.744898
83
0.581498
import torch import torch.nn as nn import torch.nn.functional as F from proj.archs.cluster.vgg import VGGNet from proj.archs.segmentation.net10a import SegmentationNet10aTrunk, \ SegmentationNet10a from proj.utils.segmentation.baselines.general import get_patches __all__ = ["SegmentationNet10aDoersch"] class Do...
true
true
f706e91f8e9da716f744abc55db828980911760d
14,769
py
Python
tests/unit/bokeh/core/test_properties.py
sdc50/bokeh
4f0a77c96f0045d380e5e9edb606a9f3c7832d9f
[ "BSD-3-Clause" ]
null
null
null
tests/unit/bokeh/core/test_properties.py
sdc50/bokeh
4f0a77c96f0045d380e5e9edb606a9f3c7832d9f
[ "BSD-3-Clause" ]
null
null
null
tests/unit/bokeh/core/test_properties.py
sdc50/bokeh
4f0a77c96f0045d380e5e9edb606a9f3c7832d9f
[ "BSD-3-Clause" ]
null
null
null
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
29.130178
150
0.53531
from __future__ import annotations import pytest ; pytest import numpy as np from bokeh._testing.util.api import verify_all from bokeh.core.has_props import HasProps from bokeh.core.properties import ( Alias, Dict, Enum, Float, Instance, Int, List, Nullable, Numbe...
true
true
f706e93aebb119686c4ce80f11c0225ee83aa2ff
7,866
py
Python
boto/vpc/vpnconnection.py
dgaponov/boto
ce1d08f09d60b6c2effa36a1b774120e6f7913f0
[ "MIT" ]
null
null
null
boto/vpc/vpnconnection.py
dgaponov/boto
ce1d08f09d60b6c2effa36a1b774120e6f7913f0
[ "MIT" ]
null
null
null
boto/vpc/vpnconnection.py
dgaponov/boto
ce1d08f09d60b6c2effa36a1b774120e6f7913f0
[ "MIT" ]
null
null
null
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
37.817308
85
0.660819
import boto from datetime import datetime from boto.resultset import ResultSet from boto.ec2.ec2object import TaggedEC2Object class VpnConnectionOptions(object): def __init__(self, static_routes_only=None, tunnel_options=None): self.static_routes_only = static_routes_only self...
true
true
f706e9c87e79ef3e867b5a2e9e059813f64a4af6
132
py
Python
minidump/_version.py
eswartz/minidump
e96e1dd9ebda0b0103f49c2e481b08621f05a2bb
[ "MIT" ]
null
null
null
minidump/_version.py
eswartz/minidump
e96e1dd9ebda0b0103f49c2e481b08621f05a2bb
[ "MIT" ]
null
null
null
minidump/_version.py
eswartz/minidump
e96e1dd9ebda0b0103f49c2e481b08621f05a2bb
[ "MIT" ]
null
null
null
__version__ = "0.0.18" __banner__ = \ """ # minidump %s # Author: Tamas Jos @skelsec (skelsecprojects@gmail.com) """ % __version__
18.857143
56
0.674242
__version__ = "0.0.18" __banner__ = \ """ # minidump %s # Author: Tamas Jos @skelsec (skelsecprojects@gmail.com) """ % __version__
true
true
f706eb4a2efb622be4b532fd564cfa8cc58d1770
5,726
py
Python
tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/node.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/node.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
tools/onnx-graphsurgeon/onnx_graphsurgeon/ir/node.py
L-Net-1992/TensorRT
34b664d404001bd724cb56b52a6e0e05e1fd97f2
[ "Apache-2.0" ]
null
null
null
# # SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # 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...
37.92053
140
0.620154
from onnx_graphsurgeon.logger.logger import G_LOGGER from onnx_graphsurgeon.ir.tensor import Tensor from onnx_graphsurgeon.util import misc from collections import OrderedDict from typing import List, Dict class Node(object): def __init__( self, op: str, name: str = None,...
true
true
f706ebf0b4f93354db87f0cb3dc48995375ead83
17,369
py
Python
track2/icnet/memory_saving_gradients.py
omshinde/dfc2019
4210cee792d9f9c8fa13fe0c35ffb634539e9085
[ "MIT" ]
123
2019-01-10T15:19:15.000Z
2022-03-31T12:33:38.000Z
memory_saving_gradients.py
abrinkk/gradient-checkpointing
2e48cc8442c2c33aef7e1a0de27041709ef160e8
[ "MIT" ]
14
2019-01-12T05:49:36.000Z
2021-06-10T03:26:54.000Z
memory_saving_gradients.py
abrinkk/gradient-checkpointing
2e48cc8442c2c33aef7e1a0de27041709ef160e8
[ "MIT" ]
53
2019-01-11T09:44:45.000Z
2022-03-24T08:21:19.000Z
from toposort import toposort import contextlib import numpy as np import tensorflow as tf import tensorflow.contrib.graph_editor as ge import time import sys sys.setrecursionlimit(10000) # refers back to current module if we decide to split helpers out util = sys.modules[__name__] # getting rid of "WARNING:tensorflow...
44.765464
139
0.653924
from toposort import toposort import contextlib import numpy as np import tensorflow as tf import tensorflow.contrib.graph_editor as ge import time import sys sys.setrecursionlimit(10000) util = sys.modules[__name__] setattr(tf.GraphKeys, "VARIABLES", "variables") from tensorflow.python.ops import gradients as tf...
true
true
f706ec12bf7b54266d06b48a318bd1819cb9e3e6
7,988
py
Python
scripts/glew_pxd.py
pupil-labs/pyglui
e373fe8feff1c62c2e38f46c856d55089bac56c1
[ "MIT" ]
24
2015-01-31T14:25:35.000Z
2022-02-24T01:53:53.000Z
scripts/glew_pxd.py
pupil-labs/pyglui
e373fe8feff1c62c2e38f46c856d55089bac56c1
[ "MIT" ]
64
2015-02-12T12:04:04.000Z
2021-06-28T10:51:58.000Z
scripts/glew_pxd.py
pupil-labs/pyglui
e373fe8feff1c62c2e38f46c856d55089bac56c1
[ "MIT" ]
22
2015-07-07T23:29:00.000Z
2021-03-09T18:32:29.000Z
""" Script taken from: https://github.com/orlp/pygrafix Appropriate Licence applies! """ import argparse import os import pathlib import re def generate_pxd(glew_header_loc, dest="."): with open(glew_header_loc) as fin: data = fin.read() # cython doesn't support const data = re.sub(r"\bconst\b",...
29.585185
156
0.557962
import argparse import os import pathlib import re def generate_pxd(glew_header_loc, dest="."): with open(glew_header_loc) as fin: data = fin.read() data = re.sub(r"\bconst\b", "", data) lines = data.split("\n") handled_lines = set() function_types = {} export_functions = {} ...
true
true
f706ee08a469e9ddd3bc84fd179a60160a0d6c3d
1,884
py
Python
safe_transaction_service/tokens/clients/coingecko_client.py
vaporyorg/safe-transaction-service
b64b3f33fbf9eb979d26bdd5411844b6e5dc4aeb
[ "MIT" ]
null
null
null
safe_transaction_service/tokens/clients/coingecko_client.py
vaporyorg/safe-transaction-service
b64b3f33fbf9eb979d26bdd5411844b6e5dc4aeb
[ "MIT" ]
null
null
null
safe_transaction_service/tokens/clients/coingecko_client.py
vaporyorg/safe-transaction-service
b64b3f33fbf9eb979d26bdd5411844b6e5dc4aeb
[ "MIT" ]
null
null
null
import logging from urllib.parse import urljoin import requests from eth_typing import ChecksumAddress from safe_transaction_service.tokens.clients.exceptions import CannotGetPrice logger = logging.getLogger(__name__) class CoingeckoClient: base_url = 'https://api.coingecko.com/' def __init__(self): ...
34.254545
113
0.625265
import logging from urllib.parse import urljoin import requests from eth_typing import ChecksumAddress from safe_transaction_service.tokens.clients.exceptions import CannotGetPrice logger = logging.getLogger(__name__) class CoingeckoClient: base_url = 'https://api.coingecko.com/' def __init__(self): ...
true
true
f706ee19ceb0a006faa9358b19c276c04328c69f
419
py
Python
selenium_tests/test_hide_application.py
fossabot/simphony-remote
2f3c2d0b7e3b5b3b6a747c929ba6224f622bab33
[ "BSD-3-Clause" ]
6
2016-10-17T18:37:56.000Z
2021-12-16T09:38:08.000Z
selenium_tests/test_hide_application.py
fossabot/simphony-remote
2f3c2d0b7e3b5b3b6a747c929ba6224f622bab33
[ "BSD-3-Clause" ]
570
2016-06-23T12:09:31.000Z
2022-03-15T17:04:00.000Z
selenium_tests/test_hide_application.py
fossabot/simphony-remote
2f3c2d0b7e3b5b3b6a747c929ba6224f622bab33
[ "BSD-3-Clause" ]
8
2018-03-23T00:00:51.000Z
2021-08-30T18:54:40.000Z
# -*- coding: utf-8 -*- from selenium_tests.UserDriverTest import UserDriverTest from selenium.webdriver.common.by import By class TestHideApplication(UserDriverTest): def test_hide_application(self): self.wait_until_application_list_loaded() self.type_text_in_element_located(By.ID, "search-input...
32.230769
80
0.763723
from selenium_tests.UserDriverTest import UserDriverTest from selenium.webdriver.common.by import By class TestHideApplication(UserDriverTest): def test_hide_application(self): self.wait_until_application_list_loaded() self.type_text_in_element_located(By.ID, "search-input", "foobarheho") ...
true
true
f706ee66420b2648f68342ef44afbcff6a16e354
832
py
Python
e2e_test/tests/test_exception_resource.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
12
2018-03-19T20:57:44.000Z
2020-01-27T14:11:24.000Z
e2e_test/tests/test_exception_resource.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
73
2018-04-20T22:26:00.000Z
2021-12-01T14:17:37.000Z
e2e_test/tests/test_exception_resource.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
1
2019-02-28T13:33:45.000Z
2019-02-28T13:33:45.000Z
import anachronos from e2e_test.runner import http class ExceptionResourceTest(anachronos.TestCase): def setUp(self): self.http = http.with_path("/api/error") def test_got500OnInternalServerError(self): response = self.http.get("") self.assertEqual(500, response.status_code) d...
24.470588
78
0.706731
import anachronos from e2e_test.runner import http class ExceptionResourceTest(anachronos.TestCase): def setUp(self): self.http = http.with_path("/api/error") def test_got500OnInternalServerError(self): response = self.http.get("") self.assertEqual(500, response.status_code) d...
true
true
f706eea4b1e4ab40842690d5facbce2a3942aa3b
232
py
Python
samples/unstructured_data/download_file.py
shortesttrack/dataprovider-py
3ecbcb5e09da09614a708e4ef990acdd3443c6ed
[ "Apache-2.0" ]
null
null
null
samples/unstructured_data/download_file.py
shortesttrack/dataprovider-py
3ecbcb5e09da09614a708e4ef990acdd3443c6ed
[ "Apache-2.0" ]
2
2018-03-27T11:06:46.000Z
2020-10-27T20:48:51.000Z
samples/unstructured_data/download_file.py
shortesttrack/dataprovider-py
3ecbcb5e09da09614a708e4ef990acdd3443c6ed
[ "Apache-2.0" ]
4
2018-02-26T08:12:39.000Z
2018-05-18T06:01:01.000Z
from st_library import Library st_lib = Library() st_lib.set_token('token') st_lib.set_config_id('52db99d3-edfb-44c5-b97a-f09df4402081') print(st_lib.unstruct_data.download_file("19a29b9b-bea2-40fb-89c4-555bba829539","image.jpg"))
33.142857
93
0.810345
from st_library import Library st_lib = Library() st_lib.set_token('token') st_lib.set_config_id('52db99d3-edfb-44c5-b97a-f09df4402081') print(st_lib.unstruct_data.download_file("19a29b9b-bea2-40fb-89c4-555bba829539","image.jpg"))
true
true
f706ef3540a6f38ee46e1e28c501ba8bd36d1c6a
70,911
py
Python
cloudbaseinit/osutils/windows.py
noliaoliao/cloudbase-init
c5403553088bb6fadafb86d6879bfce7fc90bdb7
[ "Apache-2.0" ]
null
null
null
cloudbaseinit/osutils/windows.py
noliaoliao/cloudbase-init
c5403553088bb6fadafb86d6879bfce7fc90bdb7
[ "Apache-2.0" ]
null
null
null
cloudbaseinit/osutils/windows.py
noliaoliao/cloudbase-init
c5403553088bb6fadafb86d6879bfce7fc90bdb7
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 Cloudbase Solutions Srl # # 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...
39.177348
79
0.601783
import contextlib import ctypes from ctypes import wintypes import os import re import struct import subprocess import time import netaddr from oslo_log import log as oslo_logging import pywintypes import six from six.moves import winreg from tzlocal import windows_tz import win32api from win32com import...
true
true
f706f029490aa64d05949748829cb1a114d5d753
50
py
Python
snn/single/__init__.py
arnogranier/SNN
f916c97e36430719ff255963d9f7f7c46d55fa76
[ "MIT" ]
9
2019-02-20T07:15:20.000Z
2021-12-22T20:27:28.000Z
snn/single/__init__.py
arnogranier/SNN
f916c97e36430719ff255963d9f7f7c46d55fa76
[ "MIT" ]
1
2018-02-11T17:53:59.000Z
2018-02-11T17:53:59.000Z
snn/single/__init__.py
ArnoGranier/SNN
f916c97e36430719ff255963d9f7f7c46d55fa76
[ "MIT" ]
3
2019-04-11T15:02:18.000Z
2021-02-11T16:34:43.000Z
from .core import * from .usual_models import *
16.666667
28
0.72
from .core import * from .usual_models import *
true
true
f706f08188500fe34ff2360d63d73503a2e325fb
1,874
py
Python
server/db/Data/data_cleaner.py
katekaseth/Project_One
0eae5928b92ff99cc27815b73acc751d0348fca8
[ "MIT" ]
1
2021-06-07T19:29:12.000Z
2021-06-07T19:29:12.000Z
server/db/Data/data_cleaner.py
katekaseth/Project_One
0eae5928b92ff99cc27815b73acc751d0348fca8
[ "MIT" ]
null
null
null
server/db/Data/data_cleaner.py
katekaseth/Project_One
0eae5928b92ff99cc27815b73acc751d0348fca8
[ "MIT" ]
null
null
null
import pandas as pd import re data = pd.read_csv("BIPMetadata_current.csv") def format_date(date_column): # formatting the date data to display as yyyy-mm-dd new_dates = [] for date in date_column: month = date[0:date.find('/')] date = date[date.find('/')+1:] day = date[0:date.find...
26.771429
99
0.607257
import pandas as pd import re data = pd.read_csv("BIPMetadata_current.csv") def format_date(date_column): new_dates = [] for date in date_column: month = date[0:date.find('/')] date = date[date.find('/')+1:] day = date[0:date.find('/')] year = date[date.find('/')+1:] ...
true
true
f706f09d1f799bc9a908c5aded1f99fd90ca1ee2
1,089
py
Python
tests/test_clustering_visualisation.py
wellcometrust/WellcomeML
f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf
[ "MIT" ]
29
2020-01-31T17:05:38.000Z
2021-12-14T14:17:55.000Z
tests/test_clustering_visualisation.py
wellcometrust/WellcomeML
f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf
[ "MIT" ]
342
2020-02-05T10:40:43.000Z
2022-03-17T19:50:23.000Z
tests/test_clustering_visualisation.py
wellcometrust/WellcomeML
f7f5427f6dfdc6e5ee1342764263c6411e0f9bdf
[ "MIT" ]
9
2020-06-07T17:01:00.000Z
2021-11-24T16:03:38.000Z
import os from wellcomeml.ml.clustering import TextClustering from wellcomeml.viz.visualize_clusters import visualize_clusters def test_output_html(tmp_path): """Tests that the output html is generated correclty by the clustering function""" # This will be the file to temporary_file = os.path.join(tmp_p...
33
88
0.681359
import os from wellcomeml.ml.clustering import TextClustering from wellcomeml.viz.visualize_clusters import visualize_clusters def test_output_html(tmp_path): temporary_file = os.path.join(tmp_path, 'test-cluster.html') cluster = TextClustering(embedding_random_state=42, ...
true
true
f706f10928e09de98fc3e89b6d0e713a49aa2f23
4,339
py
Python
utils/utilities.py
kirtanp/MAMO-fair
fd0fc39383f11a9e1ec401233b89c2399860fb94
[ "Apache-2.0" ]
1
2021-08-16T12:42:32.000Z
2021-08-16T12:42:32.000Z
utils/utilities.py
kirtanp/MAMO-fair
fd0fc39383f11a9e1ec401233b89c2399860fb94
[ "Apache-2.0" ]
null
null
null
utils/utilities.py
kirtanp/MAMO-fair
fd0fc39383f11a9e1ec401233b89c2399860fb94
[ "Apache-2.0" ]
1
2022-02-23T01:09:25.000Z
2022-02-23T01:09:25.000Z
#!/usr/bin/env python import numpy as np from collections import defaultdict import itertools from sklearn.metrics import confusion_matrix def print_data_stats(sens_attr, class_labels): """Print a few numbers about the data: Total number of points, number of protected examples and unprotected examples, and num...
36.771186
123
0.68449
import numpy as np from collections import defaultdict import itertools from sklearn.metrics import confusion_matrix def print_data_stats(sens_attr, class_labels): non_prot_all = sum(sens_attr == 1.0) prot_all = len(sens_attr) - non_prot_all non_prot_pos = sum(class_labels[sens_attr == 1.0] == 1.0) ...
true
true
f706f2ef85674ccdf6b0d9669e4a19f504aa45a4
1,880
py
Python
gooddata-sdk/gooddata_sdk/catalog/user/declarative_model/user.py
hkad98/gooddata-python-sdk
64942080ecb44c2d8e914e57f7a591daa6cca205
[ "MIT" ]
7
2022-01-24T16:27:06.000Z
2022-02-25T10:18:49.000Z
gooddata-sdk/gooddata_sdk/catalog/user/declarative_model/user.py
hkad98/gooddata-python-sdk
64942080ecb44c2d8e914e57f7a591daa6cca205
[ "MIT" ]
29
2022-01-20T15:45:38.000Z
2022-03-31T09:39:25.000Z
gooddata-sdk/gooddata_sdk/catalog/user/declarative_model/user.py
hkad98/gooddata-python-sdk
64942080ecb44c2d8e914e57f7a591daa6cca205
[ "MIT" ]
7
2022-01-20T07:11:15.000Z
2022-03-09T14:50:17.000Z
# (C) 2022 GoodData Corporation from __future__ import annotations from pathlib import Path from typing import List, Optional, Type import attr from gooddata_metadata_client.model.declarative_user import DeclarativeUser from gooddata_metadata_client.model.declarative_users import DeclarativeUsers from gooddata_sdk.c...
34.814815
92
0.766489
from __future__ import annotations from pathlib import Path from typing import List, Optional, Type import attr from gooddata_metadata_client.model.declarative_user import DeclarativeUser from gooddata_metadata_client.model.declarative_users import DeclarativeUsers from gooddata_sdk.catalog.base import Base from go...
true
true
f706f4144d2007936aa70791acbc4c2c3264b60a
10,601
py
Python
cwltool/checker.py
fgeorgatos/cwltool
913fc685ab647a4ae6b61421c7bfe8f78a6c5e2d
[ "Apache-2.0" ]
null
null
null
cwltool/checker.py
fgeorgatos/cwltool
913fc685ab647a4ae6b61421c7bfe8f78a6c5e2d
[ "Apache-2.0" ]
null
null
null
cwltool/checker.py
fgeorgatos/cwltool
913fc685ab647a4ae6b61421c7bfe8f78a6c5e2d
[ "Apache-2.0" ]
null
null
null
import logging from collections import namedtuple from typing import (Any, Callable, Dict, # pylint: disable=unused-import Generator, Iterable, List, Optional, Text, Union, cast) import schema_salad.validate as validate from schema_salad.sourceline import SourceLine, bullets, strip_dup_lineno impo...
42.919028
160
0.593812
import logging from collections import namedtuple from typing import (Any, Callable, Dict, Generator, Iterable, List, Optional, Text, Union, cast) import schema_salad.validate as validate from schema_salad.sourceline import SourceLine, bullets, strip_dup_lineno import six from .errors import Wor...
true
true
f706f4bc351d8d36a57012fcc3216628b1eb9ec0
210
py
Python
isserviceup/services/loggly.py
EvgeshaGars/is-service-up
9df5ebb1fbb09102300518855aaa35c0a84bb2bf
[ "Apache-2.0" ]
182
2016-10-23T19:08:04.000Z
2021-03-23T07:01:17.000Z
isserviceup/services/loggly.py
EvgeshaGars/is-service-up
9df5ebb1fbb09102300518855aaa35c0a84bb2bf
[ "Apache-2.0" ]
22
2016-10-25T07:20:23.000Z
2017-05-18T19:53:11.000Z
isserviceup/services/loggly.py
EvgeshaGars/is-service-up
9df5ebb1fbb09102300518855aaa35c0a84bb2bf
[ "Apache-2.0" ]
37
2016-10-24T05:50:51.000Z
2021-12-09T18:41:08.000Z
from isserviceup.services.models.statuspage import StatusPagePlugin class Loggly(StatusPagePlugin): name = 'Loggly' status_url = 'http://status.loggly.com//' icon_url = '/images/icons/loggly.jpg'
26.25
67
0.738095
from isserviceup.services.models.statuspage import StatusPagePlugin class Loggly(StatusPagePlugin): name = 'Loggly' status_url = 'http://status.loggly.com//' icon_url = '/images/icons/loggly.jpg'
true
true
f706f713fd3ccee8420a252cb1b76e5744b1aa89
1,821
py
Python
util.py
changwoolee/gradient-rescaling-attention-model
2f1d819e8cee03a9d06312e700a5c474bed48c70
[ "Apache-2.0" ]
6
2019-11-28T13:46:55.000Z
2022-03-12T02:52:13.000Z
util.py
changwoolee/gradient-rescaling-attention-model
2f1d819e8cee03a9d06312e700a5c474bed48c70
[ "Apache-2.0" ]
null
null
null
util.py
changwoolee/gradient-rescaling-attention-model
2f1d819e8cee03a9d06312e700a5c474bed48c70
[ "Apache-2.0" ]
1
2020-10-13T18:23:56.000Z
2020-10-13T18:23:56.000Z
import tensorflow as tf from contextlib import contextmanager from PIL import Image from keras import backend as K from keras.utils.data_utils import OrderedEnqueuer def heteroscedastic_loss(attention=False, block_attention_gradient=False, mode='l2'): ''' Heteroscedastic loss.''' def h...
23.346154
96
0.742998
import tensorflow as tf from contextlib import contextmanager from PIL import Image from keras import backend as K from keras.utils.data_utils import OrderedEnqueuer def heteroscedastic_loss(attention=False, block_attention_gradient=False, mode='l2'): def het_loss(y_true, y_pred): y_m...
true
true
f706f72cffb43c5ce8e0d5d178d97d9548986bcc
3,872
py
Python
insTof5.py
kiraold/Brute-Force_Insta_V1
9c53aacff04f2c802a6428a74a32a29ba008e693
[ "MIT" ]
null
null
null
insTof5.py
kiraold/Brute-Force_Insta_V1
9c53aacff04f2c802a6428a74a32a29ba008e693
[ "MIT" ]
null
null
null
insTof5.py
kiraold/Brute-Force_Insta_V1
9c53aacff04f2c802a6428a74a32a29ba008e693
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import requests, sys, threading, time, os, random from random import randint from six.moves import input CheckVersion = str (sys.version) import re from datetime import datetime print (''' .... ...
38.72
147
0.361829
from __future__ import absolute_import from __future__ import print_function import requests, sys, threading, time, os, random from random import randint from six.moves import input CheckVersion = str (sys.version) import re from datetime import datetime print (''' .... ...
true
true
f706f77b0d6fa265e4fbefa758d350fb4082682b
1,041
py
Python
manage.py
Abhijit-06/Internet.nl
482a62cf0b1cf0fec2b40d7f2a460873f90f2379
[ "Apache-2.0", "CC-BY-4.0" ]
9
2021-07-19T09:34:35.000Z
2022-01-06T15:38:06.000Z
manage.py
Abhijit-06/Internet.nl
482a62cf0b1cf0fec2b40d7f2a460873f90f2379
[ "Apache-2.0", "CC-BY-4.0" ]
86
2021-07-16T12:56:15.000Z
2022-03-28T13:09:48.000Z
manage.py
Abhijit-06/Internet.nl
482a62cf0b1cf0fec2b40d7f2a460873f90f2379
[ "Apache-2.0", "CC-BY-4.0" ]
4
2021-08-20T13:47:03.000Z
2021-12-01T21:31:43.000Z
#!/usr/bin/env python #from gevent import monkey #monkey.patch_all(aggressive=True) #from psycogreen.gevent import patch_psycopg #patch_psycopg() #import eventlet #eventlet.monkey_patch() #from psycogreen.eventlet import patch_psycopg #patch_psycopg() import os import sys if __name__ == "__main__": os.environ.s...
30.617647
77
0.682997
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "internetnl.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except I...
true
true
f706f78145d12ecc2b8193f93c65c8642b4557a3
374
py
Python
autovivification.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
autovivification.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
autovivification.py
godontop/python-work
ea22e0df8b0b17605f5a434e556a388d1f75aa47
[ "MIT" ]
null
null
null
class AutoVivification(dict): """Implementation of perl's autovivification.""" def __missing__(self, key): value = self[key] = type(self)() return value weather = AutoVivification() weather['china']['guangdong']['shenzhen'] = 'sunny' weather['china']['hubei']['wuhan'] = 'sunny' weather['USA'][...
28.769231
53
0.65508
class AutoVivification(dict): def __missing__(self, key): value = self[key] = type(self)() return value weather = AutoVivification() weather['china']['guangdong']['shenzhen'] = 'sunny' weather['china']['hubei']['wuhan'] = 'sunny' weather['USA']['California']['Los Angeles'] = 'sunny' print(weather)...
true
true
f706f784e5189f69a517c42fe914a5bacbe5ac9c
22,253
py
Python
test/functional/test_framework/util.py
minblock/generalcoin
b3b51979823f77e54eb548df39e1b8037e480f50
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
minblock/generalcoin
b3b51979823f77e54eb548df39e1b8037e480f50
[ "MIT" ]
null
null
null
test/functional/test_framework/util.py
minblock/generalcoin
b3b51979823f77e54eb548df39e1b8037e480f50
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from base64 import b64encode from binascii import hexlify,...
38.903846
140
0.652496
from base64 import b64encode from binascii import hexlify, unhexlify from decimal import Decimal, ROUND_DOWN import hashlib import inspect import json import logging import os import random import re from subprocess import CalledProcessError import time from . import coverage from .authproxy import AuthServicePro...
true
true
f706f99ddd492f71c7f4a826475b11378779642e
1,006
py
Python
tests/test_utils.py
ausbitbank/piston
b571a44c71aec637df75bb012fd8d203ffbef18a
[ "MIT" ]
null
null
null
tests/test_utils.py
ausbitbank/piston
b571a44c71aec637df75bb012fd8d203ffbef18a
[ "MIT" ]
null
null
null
tests/test_utils.py
ausbitbank/piston
b571a44c71aec637df75bb012fd8d203ffbef18a
[ "MIT" ]
null
null
null
import unittest from steem.utils import ( constructIdentifier, sanitizePermlink, derivePermlink, resolveIdentifier, yaml_parse_file, formatTime, ) class Testcases(unittest.TestCase) : def test_constructIdentifier(self): self.assertEqual(constructIdentifier("A", "B"), "@A/B") ...
26.473684
70
0.666998
import unittest from steem.utils import ( constructIdentifier, sanitizePermlink, derivePermlink, resolveIdentifier, yaml_parse_file, formatTime, ) class Testcases(unittest.TestCase) : def test_constructIdentifier(self): self.assertEqual(constructIdentifier("A", "B"), "@A/B") ...
true
true
f706fa69a2100406ca391c0f2d86b424cac23b82
3,641
py
Python
sphinx/util/fileutil.py
daobook/sphinx
ef8daca1f9a82ede9b4b0b5cde93f3414cee3dfe
[ "BSD-2-Clause" ]
null
null
null
sphinx/util/fileutil.py
daobook/sphinx
ef8daca1f9a82ede9b4b0b5cde93f3414cee3dfe
[ "BSD-2-Clause" ]
1,662
2015-01-02T11:45:27.000Z
2015-01-03T12:21:29.000Z
sphinx/util/fileutil.py
daobook/sphinx
ef8daca1f9a82ede9b4b0b5cde93f3414cee3dfe
[ "BSD-2-Clause" ]
null
null
null
"""File utility functions for Sphinx.""" import os import posixpath from typing import TYPE_CHECKING, Callable, Dict from docutils.utils import relative_path from sphinx.util.osutil import copyfile, ensuredir from sphinx.util.typing import PathMatcher if TYPE_CHECKING: from sphinx.util.template import BaseRende...
38.326316
91
0.642955
import os import posixpath from typing import TYPE_CHECKING, Callable, Dict from docutils.utils import relative_path from sphinx.util.osutil import copyfile, ensuredir from sphinx.util.typing import PathMatcher if TYPE_CHECKING: from sphinx.util.template import BaseRenderer def copy_asset_file(source: str, de...
true
true
f706fb383c89cc4ef60651b5f9db8200ebc57400
213
py
Python
wela_analytics/student_grades/doctype/game/test_game.py
marcreyesph/wela-frappe-bench
23ec1a5cf387d2b79e6185f638127ee090833285
[ "MIT" ]
null
null
null
wela_analytics/student_grades/doctype/game/test_game.py
marcreyesph/wela-frappe-bench
23ec1a5cf387d2b79e6185f638127ee090833285
[ "MIT" ]
null
null
null
wela_analytics/student_grades/doctype/game/test_game.py
marcreyesph/wela-frappe-bench
23ec1a5cf387d2b79e6185f638127ee090833285
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, Marc Anthony Reyes and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestGame(unittest.TestCase): pass
19.363636
57
0.765258
from __future__ import unicode_literals import frappe import unittest class TestGame(unittest.TestCase): pass
true
true
f706fbd4060aea2aacf7005c0188793f2d9e0c4b
3,399
py
Python
day4/src/puzzle2.py
DirkdenHoedt/AdventOfCode2020
98e85a12ca3630dcf698f21124fb89b66418c263
[ "MIT" ]
null
null
null
day4/src/puzzle2.py
DirkdenHoedt/AdventOfCode2020
98e85a12ca3630dcf698f21124fb89b66418c263
[ "MIT" ]
null
null
null
day4/src/puzzle2.py
DirkdenHoedt/AdventOfCode2020
98e85a12ca3630dcf698f21124fb89b66418c263
[ "MIT" ]
null
null
null
#!/bin/env python3 def puzzle2(): entries = set() allowed1 = {"byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"} valid = 0 # Read in all the rules with open('input.txt', 'r') as input: l = 0 for line in input: l += 1 if line == "\n": # print(entr...
40.464286
121
0.265666
def puzzle2(): entries = set() allowed1 = {"byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"} valid = 0 with open('input.txt', 'r') as input: l = 0 for line in input: l += 1 if line == "\n": if len(allowed1 & entries) == 7: ...
true
true