hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c31f0165563b2c602dfa5708fec677735dd636a
5,527
py
Python
coogger/cooggerapp/views/home.py
ewuoso/coogger
11df6f8487b59bd06f9a496efde3fec998a64217
[ "MIT" ]
null
null
null
coogger/cooggerapp/views/home.py
ewuoso/coogger
11df6f8487b59bd06f9a496efde3fec998a64217
[ "MIT" ]
null
null
null
coogger/cooggerapp/views/home.py
ewuoso/coogger
11df6f8487b59bd06f9a496efde3fec998a64217
[ "MIT" ]
null
null
null
#django from django.http import * from django.shortcuts import render from django.contrib.auth import * from django.db.models import Q from django.contrib import messages as ms from django.contrib.auth.models import User #django class based from django.views.generic.base import TemplateView from django.views import Vi...
36.361842
129
0.671974
from django.http import * from django.shortcuts import render from django.contrib.auth import * from django.db.models import Q from django.contrib import messages as ms from django.contrib.auth.models import User from django.views.generic.base import TemplateView from django.views import View from django.contrib.auth....
true
true
1c31f0b1f24381e5502feacf82f5d0b19649b603
69
py
Python
optimized_transducer/python/optimized_transducer/__init__.py
luomingshuang/optimized_transducer
80883bb2910d7d9619adb88bfde4034207b7f79a
[ "Apache-2.0" ]
40
2021-12-23T09:25:01.000Z
2022-03-31T07:29:16.000Z
optimized_transducer/python/optimized_transducer/__init__.py
thangdepzai/optimized_transducer
4b9c97f37749b2507dfc5aed02d404b235cebc56
[ "Apache-2.0" ]
9
2021-12-28T12:54:20.000Z
2022-03-21T10:35:06.000Z
optimized_transducer/python/optimized_transducer/__init__.py
thangdepzai/optimized_transducer
4b9c97f37749b2507dfc5aed02d404b235cebc56
[ "Apache-2.0" ]
8
2021-12-28T12:29:38.000Z
2022-03-23T02:33:17.000Z
from .transducer_loss import TransducerLoss, transducer_loss # noqa
34.5
68
0.84058
from .transducer_loss import TransducerLoss, transducer_loss
true
true
1c31f0db5a4ffa44fe3ea5398ec5b665b4f6c693
573
py
Python
rng/test_rng.py
brahamirabah94/teo-project-rabah
55dceec8a19124a12cb50c3eac90138b5002be67
[ "Apache-2.0" ]
null
null
null
rng/test_rng.py
brahamirabah94/teo-project-rabah
55dceec8a19124a12cb50c3eac90138b5002be67
[ "Apache-2.0" ]
null
null
null
rng/test_rng.py
brahamirabah94/teo-project-rabah
55dceec8a19124a12cb50c3eac90138b5002be67
[ "Apache-2.0" ]
1
2021-04-11T23:53:01.000Z
2021-04-11T23:53:01.000Z
import rng import socket import pytest hostname = socket.gethostname() @pytest.fixture def tester(): tester = rng.index() return tester def test_index_type(tester): assert type(tester) is str def test_index_content(tester): assert "RNG running on {}\n".format(hostname) in tester @pytest.fixture ...
19.1
61
0.712042
import rng import socket import pytest hostname = socket.gethostname() @pytest.fixture def tester(): tester = rng.index() return tester def test_index_type(tester): assert type(tester) is str def test_index_content(tester): assert "RNG running on {}\n".format(hostname) in tester @pytest.fixture ...
true
true
1c31f0e249e863c2aaf5c8ca2c12a20dbc48509b
524
py
Python
test/unit/api/test_configuration.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
1
2021-05-18T02:20:43.000Z
2021-05-18T02:20:43.000Z
test/unit/api/test_configuration.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
null
null
null
test/unit/api/test_configuration.py
rhpvorderman/galaxy
178015f8eff0b0c7a59c0d6756658f6428222837
[ "CC-BY-3.0" ]
null
null
null
from galaxy.webapps.galaxy.api.configuration import parse_serialization_params def test_parse_serialization_params(): view, default_view = 'a', 'b' keys = 'foo' serialized = parse_serialization_params(view, keys, default_view) assert serialized['view'] == view assert serialized['default_view'] == ...
34.933333
78
0.709924
from galaxy.webapps.galaxy.api.configuration import parse_serialization_params def test_parse_serialization_params(): view, default_view = 'a', 'b' keys = 'foo' serialized = parse_serialization_params(view, keys, default_view) assert serialized['view'] == view assert serialized['default_view'] == ...
true
true
1c31f16bbdcd758726438a6e84c843cc19fe9ff0
8,936
py
Python
orttraining/orttraining/test/python/orttraining_test_ortmodule_poc.py
mrshu/onnxruntime
335edaa2c485ba0dec877bf4cdbd652e2d5d105c
[ "MIT" ]
1
2021-03-23T16:25:11.000Z
2021-03-23T16:25:11.000Z
orttraining/orttraining/test/python/orttraining_test_ortmodule_poc.py
zener90818/onnxruntime
a7a2a16edddc283b53d7737f897b4bbda5e86209
[ "MIT" ]
null
null
null
orttraining/orttraining/test/python/orttraining_test_ortmodule_poc.py
zener90818/onnxruntime
a7a2a16edddc283b53d7737f897b4bbda5e86209
[ "MIT" ]
null
null
null
import argparse import logging import os import torch import time from torchvision import datasets, transforms import onnxruntime from onnxruntime.training import ORTModule class NeuralNet(torch.nn.Module): def __init__(self, input_size, hidden_size, num_classes): super(NeuralNet, self).__init__() ...
41.953052
120
0.614593
import argparse import logging import os import torch import time from torchvision import datasets, transforms import onnxruntime from onnxruntime.training import ORTModule class NeuralNet(torch.nn.Module): def __init__(self, input_size, hidden_size, num_classes): super(NeuralNet, self).__init__() ...
true
true
1c31f26c118cd7f40e870719edf96e1745687330
3,482
py
Python
server/web/src/app/settings.py
jphacks/D_2002
6f97fa23d7512bad9b04bec81a2668cf43dfa1bc
[ "MIT" ]
4
2020-11-01T07:28:02.000Z
2022-02-05T04:31:03.000Z
server/web/src/app/settings.py
jphacks/D_2002
6f97fa23d7512bad9b04bec81a2668cf43dfa1bc
[ "MIT" ]
33
2020-10-31T05:12:12.000Z
2020-11-06T03:57:22.000Z
server/web/src/app/settings.py
jphacks/D_2002
6f97fa23d7512bad9b04bec81a2668cf43dfa1bc
[ "MIT" ]
2
2020-11-22T01:43:32.000Z
2021-01-23T07:43:37.000Z
""" Django settings for app project. Generated by 'django-admin startproject' using Django 2.2.4. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # Bui...
25.602941
91
0.691557
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'yzlz!c6gwp4gs#_51=wxzc2%a%c&%(4y38w7eqsb(l#qc87t&$' DEBUG = True ALLOWED_HOSTS = ["*"] # Application definition INSTALLED_APPS = [ 'accounts.apps.AccountsConfig', 'django.contrib.admin', 'django.contrib....
true
true
1c31f3c27afc537cf565ec4d4405ca174b0b6db4
430
py
Python
tools/emmakenxx.py
diclophis/emscripten
1e6009144e50f9a920208868003b6b93ea972732
[ "MIT" ]
8
2015-04-15T16:23:11.000Z
2020-04-07T13:38:25.000Z
tools/emmakenxx.py
comforx/emscripten
f842201acec3c1edafb2916a76a8eb8d75474c2b
[ "MIT" ]
null
null
null
tools/emmakenxx.py
comforx/emscripten
f842201acec3c1edafb2916a76a8eb8d75474c2b
[ "MIT" ]
null
null
null
#!/usr/bin/env python ''' see emmaken.py ''' import os, subprocess, sys __rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def path_from_root(*pathelems): return os.path.join(__rootpath__, *pathelems) sys.path += [path_from_root('')] from tools.shared import * emmaken = path_from_root('too...
22.631579
74
0.713953
import os, subprocess, sys __rootpath__ = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def path_from_root(*pathelems): return os.path.join(__rootpath__, *pathelems) sys.path += [path_from_root('')] from tools.shared import * emmaken = path_from_root('tools', 'emmaken.py') os.environ['EMMAKEN_CXX'] ...
true
true
1c31f48b540da46313b4bee4b84efc5fd97a0e71
11,718
py
Python
src/app/mongodb.py
smlng/lbv
b8a584eac413ac85bd363154c69036cddc328477
[ "MIT" ]
1
2016-03-09T14:40:40.000Z
2016-03-09T14:40:40.000Z
src/app/mongodb.py
smlng/lbv
b8a584eac413ac85bd363154c69036cddc328477
[ "MIT" ]
2
2016-03-23T07:46:03.000Z
2016-04-19T15:05:55.000Z
src/app/mongodb.py
smlng/lbv
b8a584eac413ac85bd363154c69036cddc328477
[ "MIT" ]
null
null
null
""" """ import logging from datetime import datetime from pymongo import MongoClient, DESCENDING from netaddr import IPNetwork def get_ipversion_stats(dbconnstr): """ generate ip version specific stats from database """ client = MongoClient(dbconnstr) database = client.get_default_database() if "valid...
42
98
0.540963
import logging from datetime import datetime from pymongo import MongoClient, DESCENDING from netaddr import IPNetwork def get_ipversion_stats(dbconnstr): client = MongoClient(dbconnstr) database = client.get_default_database() if "validity_latest" not in database.collection_names() or \ datab...
true
true
1c31f49fe0392d66c30abd8428803d2c2bbee716
46,197
py
Python
tests/core/test_model.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
null
null
null
tests/core/test_model.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
null
null
null
tests/core/test_model.py
jld23/sasoptpy
f96911f04d6c0c01fce902f1f995935583df69a8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # # Copyright SAS Institute # # 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 b...
39.620069
125
0.453514
from collections import OrderedDict from difflib import SequenceMatcher import inspect import os import unittest import warnings from inspect import cleandoc import sasoptpy as so from tests.swat_config import create_cas_connection class MockSASconfig: def __init__(self, name): self.name = name class...
true
true
1c31f535a8cc4c7d63da95d2f6c8c48bb23f12c0
7,157
py
Python
ungroupedCommands.py
atnguye2/HerosHavenBot
6d82d79e0c0d22bd0ffb7d9f3b9f070f0d3d1103
[ "MIT" ]
null
null
null
ungroupedCommands.py
atnguye2/HerosHavenBot
6d82d79e0c0d22bd0ffb7d9f3b9f070f0d3d1103
[ "MIT" ]
null
null
null
ungroupedCommands.py
atnguye2/HerosHavenBot
6d82d79e0c0d22bd0ffb7d9f3b9f070f0d3d1103
[ "MIT" ]
1
2018-11-30T02:11:15.000Z
2018-11-30T02:11:15.000Z
import discord import commandHelpers import string import unicodedata import random from discord.ext import commands import googleSheets # Read the Oz Config Google Sheets dmxpRows = googleSheets.getDmXpRows() flavorTextRows = googleSheets.getFlavorTextRows() judgeTextRows = googleSheets.getJudgeTextRows() resRows = g...
45.878205
149
0.667458
import discord import commandHelpers import string import unicodedata import random from discord.ext import commands import googleSheets dmxpRows = googleSheets.getDmXpRows() flavorTextRows = googleSheets.getFlavorTextRows() judgeTextRows = googleSheets.getJudgeTextRows() resRows = googleSheets.getResRows() pfxpRows =...
true
true
1c31f5eda1f264abdaca5c1a26c381a3dde81e5f
6,829
py
Python
scripts/rpc/lvol.py
michalwy/spdk
2389caa4f51583425efd993d7066021b17e97ff3
[ "BSD-3-Clause" ]
2,107
2015-09-23T01:53:51.000Z
2022-03-29T09:55:13.000Z
scripts/rpc/lvol.py
michalwy/spdk
2389caa4f51583425efd993d7066021b17e97ff3
[ "BSD-3-Clause" ]
2,382
2015-09-24T02:36:59.000Z
2022-03-31T22:53:45.000Z
scripts/rpc/lvol.py
michalwy/spdk
2389caa4f51583425efd993d7066021b17e97ff3
[ "BSD-3-Clause" ]
916
2015-09-23T03:04:41.000Z
2022-03-31T05:45:04.000Z
from .helpers import deprecated_alias @deprecated_alias('construct_lvol_store') def bdev_lvol_create_lvstore(client, bdev_name, lvs_name, cluster_sz=None, clear_method=None): """Construct a logical volume store. Args: bdev_name: bdev on which to construct logical volume store lvs_name: name o...
29.820961
113
0.679602
from .helpers import deprecated_alias @deprecated_alias('construct_lvol_store') def bdev_lvol_create_lvstore(client, bdev_name, lvs_name, cluster_sz=None, clear_method=None): params = {'bdev_name': bdev_name, 'lvs_name': lvs_name} if cluster_sz: params['cluster_sz'] = cluster_sz if clear_method: ...
true
true
1c31f67fc9203c9333792670dfa9525e9a6a035e
3,050
py
Python
numpyro/distributions/__init__.py
hessammehr/numpyro
d0f9a46e81d4dae79a49cb4f5d18354a6587c961
[ "Apache-2.0" ]
null
null
null
numpyro/distributions/__init__.py
hessammehr/numpyro
d0f9a46e81d4dae79a49cb4f5d18354a6587c961
[ "Apache-2.0" ]
null
null
null
numpyro/distributions/__init__.py
hessammehr/numpyro
d0f9a46e81d4dae79a49cb4f5d18354a6587c961
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from numpyro.distributions.conjugate import ( BetaBinomial, DirichletMultinomial, GammaPoisson, ) from numpyro.distributions.continuous import ( LKJ, Beta, Cauchy, Chi2, Dirichlet, Exponential, G...
20.608108
71
0.676066
from numpyro.distributions.conjugate import ( BetaBinomial, DirichletMultinomial, GammaPoisson, ) from numpyro.distributions.continuous import ( LKJ, Beta, Cauchy, Chi2, Dirichlet, Exponential, Gamma, GaussianRandomWalk, Gumbel, HalfCauchy, HalfNormal, Invers...
true
true
1c31f688fb9919f97f9783ddc962d1788f56d98c
1,222
py
Python
tools/project-creator/Python2.6.6/Lib/test/test_undocumented_details.py
gohopo/nineck.ca
9601f5ae4c20f8a3ea27b06551556fa5e1eecce3
[ "MIT" ]
81
2017-03-13T08:24:01.000Z
2021-04-02T09:48:38.000Z
tools/project-creator/Python2.6.6/Lib/test/test_undocumented_details.py
gohopo/nineck.ca
9601f5ae4c20f8a3ea27b06551556fa5e1eecce3
[ "MIT" ]
6
2017-04-30T08:36:55.000Z
2017-09-22T01:37:28.000Z
tools/project-creator/Python2.6.6/Lib/test/test_undocumented_details.py
gohopo/nineck.ca
9601f5ae4c20f8a3ea27b06551556fa5e1eecce3
[ "MIT" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
from test.test_support import run_unittest, _check_py3k_warnings import unittest import sys class TestImplementationComparisons(unittest.TestCase): def test_type_comparisons(self): self.assertTrue(str < int or str > int) self.assertTrue(int <= str or int >= str) self.assertTrue(cm...
29.804878
65
0.576105
from test.test_support import run_unittest, _check_py3k_warnings import unittest import sys class TestImplementationComparisons(unittest.TestCase): def test_type_comparisons(self): self.assertTrue(str < int or str > int) self.assertTrue(int <= str or int >= str) self.assertTrue(cm...
true
true
1c31f6ea35b6973d6c217223464a76192228dec4
2,983
py
Python
blaze/thirdparty/onnx/onnx-1.2.2/onnx/backend/test/case/node/pool_op_common.py
Ru-Xiang/x-deeplearning
04cc0497150920c64b06bb8c314ef89977a3427a
[ "Apache-2.0" ]
4,071
2018-12-13T04:17:38.000Z
2022-03-30T03:29:35.000Z
blaze/thirdparty/onnx/onnx-1.2.2/onnx/backend/test/case/node/pool_op_common.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
359
2018-12-21T01:14:57.000Z
2022-02-15T07:18:02.000Z
blaze/thirdparty/onnx/onnx-1.2.2/onnx/backend/test/case/node/pool_op_common.py
laozhuang727/x-deeplearning
781545783a4e2bbbda48fc64318fb2c6d8bbb3cc
[ "Apache-2.0" ]
1,054
2018-12-20T09:57:42.000Z
2022-03-29T07:16:53.000Z
import numpy as np # type: ignore import itertools from typing import Text, Sequence def get_pad_shape(auto_pad, # type: Text input_spatial_shape, # type: np.ndarray kernel_spatial_shape, # type: np.ndarray strides_spatial, # type: Sequence[int] ...
43.867647
117
0.555816
import numpy as np import itertools from typing import Text, Sequence def get_pad_shape(auto_pad, input_spatial_shape, kernel_spatial_shape, strides_spatial, output_spatial_shape ): pad_shape = [0] * len(input_spatial...
true
true
1c31f80878529767fd649ae96736f4dc633dc1cd
678
py
Python
Exercicios/exercicio23.py
Juanszf/CursoEmVideo
9ea6e7ef24b89c921cf6eb6b647e3ef5f467385e
[ "MIT" ]
null
null
null
Exercicios/exercicio23.py
Juanszf/CursoEmVideo
9ea6e7ef24b89c921cf6eb6b647e3ef5f467385e
[ "MIT" ]
null
null
null
Exercicios/exercicio23.py
Juanszf/CursoEmVideo
9ea6e7ef24b89c921cf6eb6b647e3ef5f467385e
[ "MIT" ]
null
null
null
'''Faça um programa que leia do número 0 ao 9999 e mostre cada número na tela separado: Unidade: Dezena: Centana: Milhar: ''' num = (input('Digite um número de 0 até 9999\n')) y=-1 if num.isnumeric(): if (int(num)>= 0 and int(num) <= 9999): for x in num: if y == -1: print(f'\nUn...
27.12
87
0.501475
num = (input('Digite um número de 0 até 9999\n')) y=-1 if num.isnumeric(): if (int(num)>= 0 and int(num) <= 9999): for x in num: if y == -1: print(f'\nUnidade: {num[y]}') elif y == -2: print(f'Dezena: {num[y]}') elif y == -3: ...
true
true
1c31f85d6f23045413e37773754560d0392717bf
1,513
py
Python
applications/physics/ICF/train_jag_wae.py
vishalbelsare/lbann
c41421b177d8cdd4a0a780d7bb4a35a5a73a2ca2
[ "Apache-2.0" ]
null
null
null
applications/physics/ICF/train_jag_wae.py
vishalbelsare/lbann
c41421b177d8cdd4a0a780d7bb4a35a5a73a2ca2
[ "Apache-2.0" ]
null
null
null
applications/physics/ICF/train_jag_wae.py
vishalbelsare/lbann
c41421b177d8cdd4a0a780d7bb4a35a5a73a2ca2
[ "Apache-2.0" ]
null
null
null
import jag_models from os.path import abspath, dirname, join import google.protobuf.text_format as txtf # ============================================== # Setup and launch experiment # ============================================== # Default data reader model_zoo_dir = dirname(dirname(abspath(__file__))) data_reader_...
36.02381
69
0.554527
import jag_models from os.path import abspath, dirname, join import google.protobuf.text_format as txtf model_zoo_dir = dirname(dirname(abspath(__file__))) data_reader_prototext = join(model_zoo_dir, 'data', 'jag_100Kdata.prototext') if __name__ == '__main__'...
true
true
1c31f9649f50f6ffae3c29c127cb8e14883bb8fd
258
py
Python
bayes_race/models/__init__.py
DaniMarts/bayesrace
3d0d2b26dac2e33ad7e38513304cfb259abe351c
[ "MIT" ]
23
2020-03-27T03:28:04.000Z
2022-02-24T11:21:18.000Z
bayes_race/models/__init__.py
DaniMarts/bayesrace
3d0d2b26dac2e33ad7e38513304cfb259abe351c
[ "MIT" ]
1
2021-07-08T22:02:15.000Z
2021-07-08T22:02:15.000Z
bayes_race/models/__init__.py
DaniMarts/bayesrace
3d0d2b26dac2e33ad7e38513304cfb259abe351c
[ "MIT" ]
17
2020-10-27T06:09:34.000Z
2022-03-23T05:28:23.000Z
from bayes_race.models.kinematic import Kinematic from bayes_race.models.kinematic6 import Kinematic6 from bayes_race.models.dynamic import Dynamic from bayes_race.models.dynamicst import DynamicsST from bayes_race.models.frictioncircle import FrictionCircle
51.6
59
0.887597
from bayes_race.models.kinematic import Kinematic from bayes_race.models.kinematic6 import Kinematic6 from bayes_race.models.dynamic import Dynamic from bayes_race.models.dynamicst import DynamicsST from bayes_race.models.frictioncircle import FrictionCircle
true
true
1c31fa312978d713a42ff2753694165e3abc29be
5,186
py
Python
scdiff2/prerun.py
haochenucr/scdiff2
ebc4149851399b2f15ed5b5874d44764b5f130fb
[ "MIT" ]
6
2020-08-02T23:13:43.000Z
2021-12-12T03:53:57.000Z
scdiff2/prerun.py
haochenucr/scdiff2
ebc4149851399b2f15ed5b5874d44764b5f130fb
[ "MIT" ]
8
2020-07-11T12:24:45.000Z
2021-07-31T04:25:35.000Z
scdiff2/prerun.py
haochenucr/scdiff2
ebc4149851399b2f15ed5b5874d44764b5f130fb
[ "MIT" ]
2
2020-10-07T22:39:00.000Z
2022-01-17T20:07:53.000Z
#!/usr/bin/env python # coding: utf-8 # Author: Jun Ding # Email: junding (at) cs (dot) cmu (dot) edu # Date: June. 29th, 2020 # # This scdiff software suite is desinged to infer the clusters, trajectories, and regulatory # networks underlying dynamic biological process (e.g., cell differntiation, disease progression)...
42.162602
179
0.688199
import pdb,sys,os import anndata import scanpy as sc from File import * import pandas as pd import argparse import matplotlib matplotlib.use('Agg') def prerun(exFn,outdir,iformat,mindisp,cluRes,skipGeneFilter): if os.path.exists(outdir)==False: os.mkdir(outdir) TabFile(exFn).toH5("\t","%s/%s"%...
true
true
1c31fa3d8622c8b1cdd04a8dc4e6ff913cb0eb43
16,761
py
Python
CompuRacer_Core/src/batch_sender_async.py
computestdev/CompuRacer
c212c4b582ae0b6316a73ecd6868b6b69de224a6
[ "MIT" ]
1
2021-12-16T16:22:28.000Z
2021-12-16T16:22:28.000Z
CompuRacer_Core/src/batch_sender_async.py
computestdev/CompuRacer
c212c4b582ae0b6316a73ecd6868b6b69de224a6
[ "MIT" ]
null
null
null
CompuRacer_Core/src/batch_sender_async.py
computestdev/CompuRacer
c212c4b582ae0b6316a73ecd6868b6b69de224a6
[ "MIT" ]
2
2019-05-23T09:06:25.000Z
2021-07-07T10:33:58.000Z
#!/usr/bin/env python3 """ The batch async sender file contains functions for sending a Batch asynchronously and very quickly. It will encode the requests that are send and also read and decode the results. """ # --- All imports --- # import asyncio import base64 import binascii import copy import datetime import json...
42.325758
156
0.601873
import asyncio import base64 import binascii import copy import datetime import json import pprint import random import sys import time import urllib from collections import defaultdict from async_timeout import timeout as async_timeout import src.aiohttp as aiohttp import chardet import uvloop from src.aiohttp impo...
true
true
1c31fb315f7247d4966153dbfaa07683628c0828
8,247
py
Python
e2cnn/nn/modules/nonlinearities/norm.py
ziatdinovmax/e2cnn
e486a0d2cec71f2bde2d61f2f1315922f2883cee
[ "BSD-3-Clause" ]
null
null
null
e2cnn/nn/modules/nonlinearities/norm.py
ziatdinovmax/e2cnn
e486a0d2cec71f2bde2d61f2f1315922f2883cee
[ "BSD-3-Clause" ]
null
null
null
e2cnn/nn/modules/nonlinearities/norm.py
ziatdinovmax/e2cnn
e486a0d2cec71f2bde2d61f2f1315922f2883cee
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict from torch.nn import Parameter from e2cnn.gspaces import * from e2cnn.nn import FieldType from e2cnn.nn import GeometricTensor from ..equivariant_module import EquivariantModule import torch from typing import List, Tuple, Any import numpy as np __all__ = ["NormNonLinearity"] ...
33.79918
116
0.56178
from collections import defaultdict from torch.nn import Parameter from e2cnn.gspaces import * from e2cnn.nn import FieldType from e2cnn.nn import GeometricTensor from ..equivariant_module import EquivariantModule import torch from typing import List, Tuple, Any import numpy as np __all__ = ["NormNonLinearity"] ...
true
true
1c31fd9617e834df542ea98eca33b0edac8531de
2,550
py
Python
data_cleaner.py
PhilippMaxx/semeval2019_task3
0093fbffeb0dc0500b9c59ab7517ed89fa8edd8e
[ "Apache-2.0" ]
2
2020-05-07T08:33:43.000Z
2021-05-24T14:35:26.000Z
data_cleaner.py
PhilippMaxx/semeval2019_task3
0093fbffeb0dc0500b9c59ab7517ed89fa8edd8e
[ "Apache-2.0" ]
1
2021-09-28T00:23:41.000Z
2021-09-28T00:23:41.000Z
data_cleaner.py
PhilippMaxx/semeval2019_task3
0093fbffeb0dc0500b9c59ab7517ed89fa8edd8e
[ "Apache-2.0" ]
1
2021-02-04T12:39:29.000Z
2021-02-04T12:39:29.000Z
# coding=utf-8 """ Cleaning pipeline and data loader for SemEval 2019 task 3.""" from typing import List import csv from ekphrasis.classes.preprocessor import TextPreProcessor from ekphrasis.classes.tokenizer import SocialTokenizer from ekphrasis.dicts.emoticons import emoticons import emoji from emot import EMOTIC...
31.875
80
0.702353
from typing import List import csv from ekphrasis.classes.preprocessor import TextPreProcessor from ekphrasis.classes.tokenizer import SocialTokenizer from ekphrasis.dicts.emoticons import emoticons import emoji from emot import EMOTICONS from utils import * EMOTICONS = {expr: emo_transf(emo) for expr, emo in EMO...
true
true
1c31fe3e5c862bed78d4be14380cc1753d44d6b6
1,254
py
Python
tests/testapp/test_test_utils.py
Incopro/django-mysql
60df164ab21cd7c08ab3c734111bedda8efc113a
[ "BSD-3-Clause" ]
null
null
null
tests/testapp/test_test_utils.py
Incopro/django-mysql
60df164ab21cd7c08ab3c734111bedda8efc113a
[ "BSD-3-Clause" ]
null
null
null
tests/testapp/test_test_utils.py
Incopro/django-mysql
60df164ab21cd7c08ab3c734111bedda8efc113a
[ "BSD-3-Clause" ]
1
2020-06-14T01:01:51.000Z
2020-06-14T01:01:51.000Z
import django import pytest from django.db import connections from django.test import TestCase from django_mysql.test.utils import override_mysql_variables class OverrideVarsMethodTest(TestCase): @override_mysql_variables(SQL_MODE="MSSQL") def test_method_sets_mssql(self): self.check_sql_mode("MSSQL"...
27.866667
62
0.681021
import django import pytest from django.db import connections from django.test import TestCase from django_mysql.test.utils import override_mysql_variables class OverrideVarsMethodTest(TestCase): @override_mysql_variables(SQL_MODE="MSSQL") def test_method_sets_mssql(self): self.check_sql_mode("MSSQL"...
true
true
1c31fe536e02d32fab4c8f36834d18288af37cc2
2,563
py
Python
google/cloud/spanner_admin_database_v1/types/__init__.py
asthamohta/python-spanner
321bc7faf364ad423da08ae4e2c0d6f76834dc09
[ "Apache-2.0" ]
49
2020-02-06T17:36:32.000Z
2022-03-31T05:32:29.000Z
google/cloud/spanner_admin_database_v1/types/__init__.py
asthamohta/python-spanner
321bc7faf364ad423da08ae4e2c0d6f76834dc09
[ "Apache-2.0" ]
417
2020-01-31T23:12:28.000Z
2022-03-30T22:42:11.000Z
google/cloud/spanner_admin_database_v1/types/__init__.py
asthamohta/python-spanner
321bc7faf364ad423da08ae4e2c0d6f76834dc09
[ "Apache-2.0" ]
46
2020-01-31T22:54:25.000Z
2022-03-29T12:04:55.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
27.55914
74
0.742489
from .backup import ( Backup, BackupInfo, CreateBackupEncryptionConfig, CreateBackupMetadata, CreateBackupRequest, DeleteBackupRequest, GetBackupRequest, ListBackupOperationsRequest, ListBackupOperationsResponse, ListBackupsRequest, ListBackupsResponse, UpdateBackupReques...
true
true
1c31feb3a0beed2b13b1024885dee420f9a90e4f
15,152
py
Python
src/sage/combinat/rigged_configurations/rc_crystal.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/rigged_configurations/rc_crystal.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/rigged_configurations/rc_crystal.py
Findstat/sage
d661c2c2bd18676014c151e9eec1e81ed12db9f6
[ "BSL-1.0" ]
null
null
null
r""" Crystal of Rigged Configurations AUTHORS: - Travis Scrimshaw (2010-09-26): Initial version We only consider the highest weight crystal structure, not the Kirillov-Reshetikhin structure, and we extend this to symmetrizable types. """ #*****************************************************************************...
36.07619
101
0.590285
from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.structure.unique_representation import UniqueRepresentation from sage.structure.parent import Parent from sage.categories.highest_weight_crystals import HighestWeightCrystals from sage.categories.regular_crysta...
true
true
1c31fee605abafb3e22c85cd2383cccfa60a89f8
2,597
py
Python
runtime/hetdesrun/runtime/logging.py
JulianGrote1904/hetida-designer
05350810eb3e0548c9d8a2a5a6afbf455635b5fd
[ "MIT" ]
null
null
null
runtime/hetdesrun/runtime/logging.py
JulianGrote1904/hetida-designer
05350810eb3e0548c9d8a2a5a6afbf455635b5fd
[ "MIT" ]
null
null
null
runtime/hetdesrun/runtime/logging.py
JulianGrote1904/hetida-designer
05350810eb3e0548c9d8a2a5a6afbf455635b5fd
[ "MIT" ]
null
null
null
from typing import Any, Literal import contextvars import datetime import json from uuid import UUID import logging import numpy as np _WF_EXEC_LOGGING_CONTEXT_VAR: contextvars.ContextVar[dict] = contextvars.ContextVar( "workflow_execution_logging_context" ) class MinimallyMoreCapableJsonEncoder(json.JSONEncode...
31.670732
89
0.683481
from typing import Any, Literal import contextvars import datetime import json from uuid import UUID import logging import numpy as np _WF_EXEC_LOGGING_CONTEXT_VAR: contextvars.ContextVar[dict] = contextvars.ContextVar( "workflow_execution_logging_context" ) class MinimallyMoreCapableJsonEncoder(json.JSONEncode...
true
true
1c31ffc0e49197fad9fcd6de0fe0caeed253e8ea
15,436
py
Python
galpopfm/dust_infer.py
IQcollaboratory/galpopFM
1b30abc1cc2fd1119d0f34a237b0c1112d7afc9d
[ "MIT" ]
1
2020-02-08T17:36:06.000Z
2020-02-08T17:36:06.000Z
galpopfm/dust_infer.py
IQcollaboratory/galpopFM
1b30abc1cc2fd1119d0f34a237b0c1112d7afc9d
[ "MIT" ]
35
2020-02-07T19:02:27.000Z
2021-02-04T14:28:05.000Z
galpopfm/dust_infer.py
IQcollaboratory/galpopFM
1b30abc1cc2fd1119d0f34a237b0c1112d7afc9d
[ "MIT" ]
null
null
null
''' ''' import os import sys import h5py import numpy as np from scipy.stats import chi2 np.seterr(divide='ignore', invalid='ignore') # -- abcpmc -- import abcpmc from abcpmc import mpi_util # -- galpopfm -- from . import dustfm as dustFM from . import measure_obs as measureObs dat_dir = os.environ['GALPOPFM_...
36.752381
109
0.561415
import os import sys import h5py import numpy as np from scipy.stats import chi2 np.seterr(divide='ignore', invalid='ignore') import abcpmc from abcpmc import mpi_util from . import dustfm as dustFM from . import measure_obs as measureObs dat_dir = os.environ['GALPOPFM_DIR'] def distance_metric(x_obs, x_model, ...
true
true
1c31ffdd2b45111c693651f89499b6e4ef53720a
403
py
Python
src/master.py
guavadata/peru_sinadef_eda
4e57f08cf4496d124e5297d4d30a1a0736efc37d
[ "MIT" ]
null
null
null
src/master.py
guavadata/peru_sinadef_eda
4e57f08cf4496d124e5297d4d30a1a0736efc37d
[ "MIT" ]
null
null
null
src/master.py
guavadata/peru_sinadef_eda
4e57f08cf4496d124e5297d4d30a1a0736efc37d
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ This is the master script for recreating the results It imports each of the key other scripts and runs them one by one. Run the whole thing from the root directory to replicate all of the python analysis """ import src.download_raw_data as dwl_raw import src.clean_data as cln_data import ...
20.15
52
0.784119
import src.download_raw_data as dwl_raw import src.clean_data as cln_data import src.transform_data as ts_data dwl_raw.main() cln_data.clean_data() ts_data.main()
true
true
1c320081365f5d4e0c730b1b9a1090eb3d5e77e0
1,144
py
Python
src/public/src/FM7/util/python/txt2cpp.py
rothberg-cmu/rothberg-run
a42df5ca9fae97de77753864f60d05295d77b59f
[ "MIT" ]
1
2019-08-10T00:24:09.000Z
2019-08-10T00:24:09.000Z
src/public/src/FM7/util/python/txt2cpp.py
rothberg-cmu/rothberg-run
a42df5ca9fae97de77753864f60d05295d77b59f
[ "MIT" ]
null
null
null
src/public/src/FM7/util/python/txt2cpp.py
rothberg-cmu/rothberg-run
a42df5ca9fae97de77753864f60d05295d77b59f
[ "MIT" ]
2
2019-05-01T03:11:10.000Z
2019-05-01T03:30:35.000Z
import sys import os # Limitation: header and cpp needs to be in the same directory. def TextFileToCpp(cppFName,hFName,varName,binFName): strArray=[] fp=open(binFName,"r") for str in fp: str=str.replace('\n','') str=str.replace('\r','') strArray.append(str) fp.close() TextToCpp(cppFName,hFName,varName,st...
20.070175
63
0.652972
import sys import os def TextFileToCpp(cppFName,hFName,varName,binFName): strArray=[] fp=open(binFName,"r") for str in fp: str=str.replace('\n','') str=str.replace('\r','') strArray.append(str) fp.close() TextToCpp(cppFName,hFName,varName,strArray) def TextToCpp(cppFName,hFName,varName,strArray): HFN...
true
true
1c32009e48bfe3934197a2d23c0e6d0a42c586f9
5,578
py
Python
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
1,931
2018-03-17T13:52:45.000Z
2022-03-27T09:39:17.000Z
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
2,231
2018-03-09T21:19:05.000Z
2022-03-31T08:35:37.000Z
tests/test_visitors/test_ast/test_conditions/test_implicit_complex_compare.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
492
2018-05-18T21:20:28.000Z
2022-03-20T14:11:50.000Z
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) # Won't match our rule with any values: less_or_less = '{0} < {1} or {2} < {3}' less_or_more = '{0} < {1...
23.939914
69
0.576371
import pytest from wemake_python_styleguide.violations.consistency import ( ImplicitComplexCompareViolation, ) from wemake_python_styleguide.visitors.ast.conditions import ( ImplicitBoolPatternsVisitor, ) less_or_less = '{0} < {1} or {2} < {3}' less_or_more = '{0} < {1} or {2} > {3}' more_or_more = '{0} > {1...
true
true
1c3201552e943a88d2210587978744feca81cc31
1,520
py
Python
.history/classes/Menu_20171107132254.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/classes/Menu_20171107132254.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/classes/Menu_20171107132254.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
# DADSA - Assignment 1 # Reece Benson class Menu(): # Define the variables we will be using _app = None _menu = None _current_menu = "main" def __init__(self, app): # Set our Application self._app = app def load(self): # Define our Menu self._menu = { ...
24.126984
55
0.465789
class Menu(): _app = None _menu = None _current_menu = "main" def __init__(self, app): self._app = app def load(self): self._menu = { 'main': { 'New Season': 'new_season', 'Load Season': 'load_...
true
true
1c32015a3c35228c38c5bac706f794e1cdc33050
7,376
py
Python
validation/utils/m1.py
PedrV/stfX
017436cd4ade7f0ea95185d82408697c43ac6ce6
[ "MIT" ]
null
null
null
validation/utils/m1.py
PedrV/stfX
017436cd4ade7f0ea95185d82408697c43ac6ce6
[ "MIT" ]
null
null
null
validation/utils/m1.py
PedrV/stfX
017436cd4ade7f0ea95185d82408697c43ac6ce6
[ "MIT" ]
null
null
null
import unittest import os from matplotlib import pyplot as plt from shapely import geometry, affinity X_COORDINATE = 0 Y_COORDINATE = 1 def extract_x_y(polygon: list) -> (list, list): """Extract the x and y coordinates as two separate lists""" x_list = [] y_list = [] for vertex in polygon: x...
33.990783
102
0.590564
import unittest import os from matplotlib import pyplot as plt from shapely import geometry, affinity X_COORDINATE = 0 Y_COORDINATE = 1 def extract_x_y(polygon: list) -> (list, list): x_list = [] y_list = [] for vertex in polygon: x_list.append(vertex[X_COORDINATE]) y_list.append(vertex[...
true
true
1c32021dbc6606cac205c70d2190b3573b2a43c5
132
py
Python
major_leagues/__init__.py
jvolden/major_leagues
1245baab2c4af92285fe3a026391e429cec5af57
[ "MIT" ]
null
null
null
major_leagues/__init__.py
jvolden/major_leagues
1245baab2c4af92285fe3a026391e429cec5af57
[ "MIT" ]
null
null
null
major_leagues/__init__.py
jvolden/major_leagues
1245baab2c4af92285fe3a026391e429cec5af57
[ "MIT" ]
null
null
null
"""Top-level package for Major Leagues.""" __author__ = """Jon Patrick Volden""" __email__ = 'volden@ku.edu' __version__ = '0.1.0'
22
42
0.681818
__author__ = """Jon Patrick Volden""" __email__ = 'volden@ku.edu' __version__ = '0.1.0'
true
true
1c3202268e3ed7be78e98ac5031be316427fe925
4,488
py
Python
exp.py
tenagusami-ms/exp
9b439a768d5788baf3f882282643aa72b9ffd314
[ "MIT" ]
null
null
null
exp.py
tenagusami-ms/exp
9b439a768d5788baf3f882282643aa72b9ffd314
[ "MIT" ]
null
null
null
exp.py
tenagusami-ms/exp
9b439a768d5788baf3f882282643aa72b9ffd314
[ "MIT" ]
null
null
null
#! /usr/bin/env python """Overview: exp.py : open a directory or a file looked from WSL2 with Windows Explorer if it is in the Windows filesystem. If no path is specified, current directory is opened. Usage: exp.py [<path>] exp.py -h | --help Options: -h --help ...
26.093023
93
0.623217
from __future__ import annotations import dataclasses import os from subprocess import run import re import pathlib as p import sys from functools import reduce from typing import Optional, MutableMapping from docopt import docopt from schema import Schema, SchemaError, Use, And def main() -> None: if os.name =...
true
true
1c320305e20833fd746725118724dbff700e7fbd
22,271
py
Python
cvxpy/tests/test_examples.py
rostyboost/cvxpy
0eb2b20dab92407e4b45f13b6cc124ce96859515
[ "ECL-2.0", "Apache-2.0" ]
1
2020-10-21T22:15:55.000Z
2020-10-21T22:15:55.000Z
cvxpy/tests/test_examples.py
yfzheng11/cvxpy
95e728b01b6bb442c924812c7eac631019c5cbc6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/tests/test_examples.py
yfzheng11/cvxpy
95e728b01b6bb442c924812c7eac631019c5cbc6
[ "ECL-2.0", "Apache-2.0" ]
1
2019-04-12T22:40:22.000Z
2019-04-12T22:40:22.000Z
""" Copyright 2013 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
32.137085
84
0.532217
from __future__ import print_function import cvxpy as cvx import cvxpy.interface as intf from cvxpy.tests.base_test import BaseTest from cvxpy.reductions.solvers.conic_solvers import ecos_conif import numpy as np import unittest class TestExamples(BaseTest): def test_chebyshev_center(self): ...
true
true
1c32035411faf1edc3412842970183b236a6dbfa
20,364
py
Python
lib/galaxy/visualization/plugins/config_parser.py
mmiladi/galaxy
7857b152cd10d9490ac2433ff2905ca1a47ee32c
[ "CC-BY-3.0" ]
4
2018-10-29T18:34:38.000Z
2021-09-29T23:30:42.000Z
lib/galaxy/visualization/plugins/config_parser.py
mmiladi/galaxy
7857b152cd10d9490ac2433ff2905ca1a47ee32c
[ "CC-BY-3.0" ]
1
2019-02-04T16:21:27.000Z
2019-02-04T16:45:17.000Z
lib/galaxy/visualization/plugins/config_parser.py
mmiladi/galaxy
7857b152cd10d9490ac2433ff2905ca1a47ee32c
[ "CC-BY-3.0" ]
3
2020-02-12T15:22:24.000Z
2021-08-19T10:27:39.000Z
from six import string_types import galaxy.model from galaxy import util import logging log = logging.getLogger(__name__) class ParsingException(ValueError): """ An exception class for errors that occur during parsing of the visualizations framework configuration XML file. """ pass class Visua...
43.982721
117
0.638283
from six import string_types import galaxy.model from galaxy import util import logging log = logging.getLogger(__name__) class ParsingException(ValueError): pass class VisualizationsConfigParser(object): ALLOWED_ENTRY_POINT_TYPES = ['mako', 'html', 'script'] VALID_RENDER_TARGETS = ['galaxy_ma...
true
true
1c320402f1fb2dfd1546245fc84da34912074997
798
py
Python
interactive/mechanism/urls.py
mattldawson/music-box-interactive
6b2610b4f0f255f0e78e23628dc7ba6cc844d0f4
[ "Apache-2.0" ]
null
null
null
interactive/mechanism/urls.py
mattldawson/music-box-interactive
6b2610b4f0f255f0e78e23628dc7ba6cc844d0f4
[ "Apache-2.0" ]
null
null
null
interactive/mechanism/urls.py
mattldawson/music-box-interactive
6b2610b4f0f255f0e78e23628dc7ba6cc844d0f4
[ "Apache-2.0" ]
null
null
null
from django.urls import path, include from . import views urlpatterns = [ path('', views.species_home_handler), path('conditions-species-list', views.conditions_species_list_handler), path('reactions', views.reactions_home_handler), path('reaction-detail', views.reaction_detail_handler), path('reac...
44.333333
81
0.759398
from django.urls import path, include from . import views urlpatterns = [ path('', views.species_home_handler), path('conditions-species-list', views.conditions_species_list_handler), path('reactions', views.reactions_home_handler), path('reaction-detail', views.reaction_detail_handler), path('reac...
true
true
1c3204778ce9d06783a0992f4a8fc8455b948397
8,955
py
Python
espnet/nets/pytorch_backend/transducer/rnn_decoder.py
roshansh-cmu/espnet
5fa6dcc4e649dc66397c629d0030d09ecef36b80
[ "Apache-2.0" ]
null
null
null
espnet/nets/pytorch_backend/transducer/rnn_decoder.py
roshansh-cmu/espnet
5fa6dcc4e649dc66397c629d0030d09ecef36b80
[ "Apache-2.0" ]
null
null
null
espnet/nets/pytorch_backend/transducer/rnn_decoder.py
roshansh-cmu/espnet
5fa6dcc4e649dc66397c629d0030d09ecef36b80
[ "Apache-2.0" ]
null
null
null
"""RNN decoder definition for Transducer model.""" from typing import Any, Dict, List, Optional, Tuple, Union import torch from espnet.nets.transducer_decoder_interface import ( ExtendedHypothesis, Hypothesis, TransducerDecoderInterface, ) class RNNDecoder(TransducerDecoderInterface, torch.nn.Module): ...
30.56314
88
0.552205
from typing import Any, Dict, List, Optional, Tuple, Union import torch from espnet.nets.transducer_decoder_interface import ( ExtendedHypothesis, Hypothesis, TransducerDecoderInterface, ) class RNNDecoder(TransducerDecoderInterface, torch.nn.Module): def __init__( self, odim: int,...
true
true
1c3204b5c753a39ab2806a24f625af7ab5c53c3e
2,520
py
Python
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/datetime_extractor_config.py
ahmedabuamra/Recognizers-Text
31193d89d3532839742992a2755c1d8539c68116
[ "MIT" ]
10
2019-05-11T18:07:14.000Z
2021-08-20T03:02:47.000Z
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/datetime_extractor_config.py
ahmedabuamra/Recognizers-Text
31193d89d3532839742992a2755c1d8539c68116
[ "MIT" ]
1
2020-07-10T08:25:36.000Z
2020-07-10T08:25:36.000Z
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/chinese/datetime_extractor_config.py
ahmedabuamra/Recognizers-Text
31193d89d3532839742992a2755c1d8539c68116
[ "MIT" ]
18
2019-08-19T12:11:00.000Z
2021-10-12T09:36:27.000Z
from typing import Pattern import regex from recognizers_text import RegExpUtility from ...resources.chinese_date_time import ChineseDateTime from ..extractors import DateTimeExtractor from ..base_datetime import DateTimeExtractorConfiguration from .date_extractor import ChineseDateExtractor from .time_extractor impo...
28.636364
98
0.717063
from typing import Pattern import regex from recognizers_text import RegExpUtility from ...resources.chinese_date_time import ChineseDateTime from ..extractors import DateTimeExtractor from ..base_datetime import DateTimeExtractorConfiguration from .date_extractor import ChineseDateExtractor from .time_extractor impo...
true
true
1c320652313fc5533b8b6a4c7546f83353505333
2,858
py
Python
Pricing/Binomial_Tree/streamlit_binomial_tree.py
jingshenghua/QuantTopics
20e64710f9a4f22b626fa0ac0a7b062baccdc62a
[ "MIT" ]
null
null
null
Pricing/Binomial_Tree/streamlit_binomial_tree.py
jingshenghua/QuantTopics
20e64710f9a4f22b626fa0ac0a7b062baccdc62a
[ "MIT" ]
null
null
null
Pricing/Binomial_Tree/streamlit_binomial_tree.py
jingshenghua/QuantTopics
20e64710f9a4f22b626fa0ac0a7b062baccdc62a
[ "MIT" ]
null
null
null
import streamlit as st from datetime import datetime import matplotlib.pyplot as plt from tree_generator import BinomialTree import numpy as np st.set_option('deprecation.showPyplotGlobalUse', False) # headings month = datetime.now().month title = "Binomial Tree Option Pricing" st.title(title + "🌲🎄") st.sidebar.title...
43.30303
114
0.730581
import streamlit as st from datetime import datetime import matplotlib.pyplot as plt from tree_generator import BinomialTree import numpy as np st.set_option('deprecation.showPyplotGlobalUse', False) month = datetime.now().month title = "Binomial Tree Option Pricing" st.title(title + "🌲🎄") st.sidebar.title("Parameter...
true
true
1c3206ca231af4cca09ce5d975865a86ce75b5f5
2,305
py
Python
sqlalchemy_i18n/__init__.py
matthias-k/sqlalchemy-i18n
d168aa61658ae1f1e01150d0fb086781ab101832
[ "BSD-3-Clause" ]
null
null
null
sqlalchemy_i18n/__init__.py
matthias-k/sqlalchemy-i18n
d168aa61658ae1f1e01150d0fb086781ab101832
[ "BSD-3-Clause" ]
null
null
null
sqlalchemy_i18n/__init__.py
matthias-k/sqlalchemy-i18n
d168aa61658ae1f1e01150d0fb086781ab101832
[ "BSD-3-Clause" ]
null
null
null
import sqlalchemy as sa from .builders import ImproperlyConfigured from .manager import translation_base, translation_manager, TranslationManager from .translatable import Translatable, UnknownLocaleError __all__ = ( translation_base, ImproperlyConfigured, Translatable, TranslationManager, transla...
25.054348
78
0.646421
import sqlalchemy as sa from .builders import ImproperlyConfigured from .manager import translation_base, translation_manager, TranslationManager from .translatable import Translatable, UnknownLocaleError __all__ = ( translation_base, ImproperlyConfigured, Translatable, TranslationManager, transla...
true
true
1c32074128ded1c5400004bf892b57033fd0659d
9,824
py
Python
plugins/trezor/clientbase.py
electrummoneroclassic/electrummoneroclassic
5a0d22ae52a73b41788112c3ff75799c6b45a701
[ "MIT" ]
1
2018-04-14T19:02:36.000Z
2018-04-14T19:02:36.000Z
plugins/trezor/clientbase.py
electrummoneroclassic/electrummoneroclassic
5a0d22ae52a73b41788112c3ff75799c6b45a701
[ "MIT" ]
2
2021-06-02T02:54:27.000Z
2021-11-15T17:52:11.000Z
plugins/trezor/clientbase.py
electrummoneroclassic/electrummoneroclassic
5a0d22ae52a73b41788112c3ff75799c6b45a701
[ "MIT" ]
null
null
null
import time from struct import pack from electrum.i18n import _ from electrum.util import PrintError, UserCancelled from electrum.keystore import bip39_normalize_passphrase from electrum.bitcoin import serialize_xpub class GuiMixin(object): # Requires: self.proto, self.device messages = { 3: _("Conf...
38.225681
136
0.613599
import time from struct import pack from electrum.i18n import _ from electrum.util import PrintError, UserCancelled from electrum.keystore import bip39_normalize_passphrase from electrum.bitcoin import serialize_xpub class GuiMixin(object): messages = { 3: _("Confirm the transaction output on your {...
true
true
1c320786f51b632b86c2f6c0d8837796e78e198e
3,767
py
Python
cryptodome.py
dougalhatesrabbits/cryptodome
71d0c40146aec0b5538989c203946ba685c327a7
[ "MIT" ]
null
null
null
cryptodome.py
dougalhatesrabbits/cryptodome
71d0c40146aec0b5538989c203946ba685c327a7
[ "MIT" ]
null
null
null
cryptodome.py
dougalhatesrabbits/cryptodome
71d0c40146aec0b5538989c203946ba685c327a7
[ "MIT" ]
null
null
null
from Crypto import Random # use to generate a random byte string of a length we decide from Cryptodome.Cipher import AES from Cryptodome.Hash import SHA256 from Cryptodome import Random from Cryptodome.Random import get_random_bytes # Builtins import base64 import hashlib ''' https://tutorialsoverflow.com/python-enc...
35.87619
116
0.692328
from Crypto import Random from Cryptodome.Cipher import AES from Cryptodome.Hash import SHA256 from Cryptodome import Random from Cryptodome.Random import get_random_bytes import base64 import hashlib BS = 16 def pad(s): return s + (BS - len(s) % BS) * chr(BS - len(s) % BS) def unpad(s): return s[0:-s[...
true
true
1c3209001d306c11f2a53706283e9bff8107721b
4,496
py
Python
src/sentry/runner/commands/devserver.py
mitsuhiko/sentry
cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90
[ "BSD-3-Clause" ]
4
2016-03-16T07:21:36.000Z
2017-09-04T07:29:56.000Z
src/sentry/runner/commands/devserver.py
mitsuhiko/sentry
cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90
[ "BSD-3-Clause" ]
null
null
null
src/sentry/runner/commands/devserver.py
mitsuhiko/sentry
cddc3b643a13b52ac6d07ff22e4bd5d69ecbad90
[ "BSD-3-Clause" ]
null
null
null
""" sentry.runner.commands.devserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import click from sentry.runner.decorators import configuration, log_opti...
33.058824
109
0.623888
from __future__ import absolute_import, print_function import click from sentry.runner.decorators import configuration, log_options @click.command() @click.option('--reload/--no-reload', default=True, help='Autoreloading of python files.') @click.option('--watchers/--no-watchers', default=True, help='Watch static fi...
true
true
1c320ae3be5e3bae0e53964b1f5a4e7025074013
1,927
py
Python
demos/anisotropic_distribution.py
nids2001/UncertainSCI
b3105bddc064575477589d7a930c71fa3149ef36
[ "MIT" ]
1
2021-07-25T17:02:36.000Z
2021-07-25T17:02:36.000Z
demos/anisotropic_distribution.py
nids2001/UncertainSCI
b3105bddc064575477589d7a930c71fa3149ef36
[ "MIT" ]
70
2020-04-09T17:38:12.000Z
2022-03-18T17:06:09.000Z
demos/anisotropic_distribution.py
nids2001/UncertainSCI
b3105bddc064575477589d7a930c71fa3149ef36
[ "MIT" ]
7
2020-05-28T17:26:05.000Z
2021-08-13T21:41:10.000Z
# Demonstrates generation of anisotropic distributions. Example is similar to # quantiles.py demo. import numpy as np from matplotlib import pyplot as plt from UncertainSCI.distributions import BetaDistribution from UncertainSCI.model_examples import sine_modulation from UncertainSCI.indexing import TotalDegreeSet fr...
27.140845
121
0.709912
import numpy as np from matplotlib import pyplot as plt from UncertainSCI.distributions import BetaDistribution from UncertainSCI.model_examples import sine_modulation from UncertainSCI.indexing import TotalDegreeSet from UncertainSCI.pce import PolynomialChaosExpansion alpha = [1., 2., 3.] beta = [3., 2., 1.] dist...
true
true
1c320b1e440389a8b19643a86cd2a8d9b42b3eae
1,486
py
Python
src/components/game-server/lib/data/model/tictactoe/tictactoe_factory.py
rorik/UBU-DMS
7c3fc38823478054499e233dd36b8b4430d3f3d3
[ "MIT" ]
null
null
null
src/components/game-server/lib/data/model/tictactoe/tictactoe_factory.py
rorik/UBU-DMS
7c3fc38823478054499e233dd36b8b4430d3f3d3
[ "MIT" ]
null
null
null
src/components/game-server/lib/data/model/tictactoe/tictactoe_factory.py
rorik/UBU-DMS
7c3fc38823478054499e233dd36b8b4430d3f3d3
[ "MIT" ]
1
2020-02-07T11:36:04.000Z
2020-02-07T11:36:04.000Z
from lib.data.model.shared.abstract_factory import AbstractFactory from lib.data.model.tictactoe.tictactoe_gamemaster import TicTacToeGameMaster from lib.data.model.tictactoe.tictactoe_board import TicTacToeBoard class TicTacToeFactory(AbstractFactory): def __init__(self): super().__init__() def _bu...
37.15
130
0.600942
from lib.data.model.shared.abstract_factory import AbstractFactory from lib.data.model.tictactoe.tictactoe_gamemaster import TicTacToeGameMaster from lib.data.model.tictactoe.tictactoe_board import TicTacToeBoard class TicTacToeFactory(AbstractFactory): def __init__(self): super().__init__() def _bu...
true
true
1c320b6b9517633e2d1bc6c012f0d1a7f77e9a2b
2,734
py
Python
infra/bots/recipes/g3_compile.py
umberto-sonnino/skia
7ecc54217889025b3e0c512f92fb84d20a26b9f7
[ "BSD-3-Clause" ]
1
2021-04-09T23:24:57.000Z
2021-04-09T23:24:57.000Z
infra/bots/recipes/g3_compile.py
umberto-sonnino/skia
7ecc54217889025b3e0c512f92fb84d20a26b9f7
[ "BSD-3-Clause" ]
1
2019-11-22T15:25:32.000Z
2019-11-22T15:25:32.000Z
infra/bots/recipes/g3_compile.py
promoter/skia
bc5ed776134c60ae13d22cabc8e0f6aca0fdd422
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'recipe_engine/file', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/raw_io', 'recipe_engine/st...
30.719101
78
0.64338
DEPS = [ 'recipe_engine/file', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/raw_io', 'recipe_engine/step', 'vars', ] def RunSteps(api): api.vars.setup() if not api.vars.is_trybot: raise Exception('%s can only be run as a trybot.' % api.vars.builder_nam...
true
true
1c320be6ba63c28d56b3362c3d113f00860e4ccb
2,221
py
Python
learn/prog/01/01.py
git001/milq
d4ca676a72e5d09842bbbc592e54f9b73a05894a
[ "MIT" ]
2
2020-05-20T22:26:34.000Z
2021-04-24T20:23:32.000Z
learn/prog/01/01.py
VirgoCoachman/milq
ee794087759d4a0cbd8f830bc42976fdf44b5483
[ "MIT" ]
null
null
null
learn/prog/01/01.py
VirgoCoachman/milq
ee794087759d4a0cbd8f830bc42976fdf44b5483
[ "MIT" ]
1
2017-09-15T01:52:52.000Z
2017-09-15T01:52:52.000Z
# This is a comment ''' This is a comment on multiple lines ''' # VARIABLES # # A variable is a symbol that represents a quantity that may vary. # # $identifier = value; age = 25 # The value 25 is assigned to variable age # BASIC DATA TYPES age = 25 # Integer te...
27.7625
89
0.481765
age = 25 age = 25 temperature = -3.82 name = 'Nacho López' has_car = True x = 5 y = 2 z = x + y z = x - y z = x * y z = x / y z = x % y z = z + 1 z =...
true
true
1c320bfc84a9615be392b8014ec39ae39c885a21
31,893
py
Python
conference.py
xuemeiwei/Conference-Central_Udacity
e1e7d94f9c18d772cb12da8e943b4e39feeda7c4
[ "Apache-2.0" ]
null
null
null
conference.py
xuemeiwei/Conference-Central_Udacity
e1e7d94f9c18d772cb12da8e943b4e39feeda7c4
[ "Apache-2.0" ]
null
null
null
conference.py
xuemeiwei/Conference-Central_Udacity
e1e7d94f9c18d772cb12da8e943b4e39feeda7c4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import ...
40.268939
106
0.612924
__author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import endpoints from protorpc import messages from protorpc import message_types from protorpc import remote from google.appengine.api import urlfetch from google.appengine.api import memcache from google.appengine.api import taskqueu...
true
true
1c320c87b3d8770c338cf4316ed1452f8194399a
27
py
Python
src/access/access_exam.py
monkeychen/python-tutorial
a24785da6b4d857200b819ad4d960885b1ef7a20
[ "Apache-2.0" ]
null
null
null
src/access/access_exam.py
monkeychen/python-tutorial
a24785da6b4d857200b819ad4d960885b1ef7a20
[ "Apache-2.0" ]
null
null
null
src/access/access_exam.py
monkeychen/python-tutorial
a24785da6b4d857200b819ad4d960885b1ef7a20
[ "Apache-2.0" ]
null
null
null
print("hello") a = "test"
6.75
14
0.555556
print("hello") a = "test"
true
true
1c320c941caf00a0a7504d386a9d4dfb1ff705f3
8,153
py
Python
code/src/functionality_helpers.py
ZohrehShams/IntegrativeRuleExtractionMethodology
fd7b569d11de540ffe94e0cc588e78305e45689e
[ "MIT" ]
1
2022-03-20T12:33:16.000Z
2022-03-20T12:33:16.000Z
code/src/functionality_helpers.py
ZohrehShams/IntegrativeRuleExtractionMethodology
fd7b569d11de540ffe94e0cc588e78305e45689e
[ "MIT" ]
null
null
null
code/src/functionality_helpers.py
ZohrehShams/IntegrativeRuleExtractionMethodology
fd7b569d11de540ffe94e0cc588e78305e45689e
[ "MIT" ]
1
2022-03-20T12:33:58.000Z
2022-03-20T12:33:58.000Z
import numpy as np import pickle import dnn_re from evaluate_rules.predict_explain import predict_explain, print_explanation from evaluate_rules.overlapping_features import features_recurrence_in_explanation from src import * from evaluate_rules.predict_explain import predict_explain, print_explanation from evaluate_ru...
40.562189
182
0.707592
import numpy as np import pickle import dnn_re from evaluate_rules.predict_explain import predict_explain, print_explanation from evaluate_rules.overlapping_features import features_recurrence_in_explanation from src import * from evaluate_rules.predict_explain import predict_explain, print_explanation from evaluate_ru...
true
true
1c320cc60c9746c59bab9a2b8976d83777960563
13,423
py
Python
intermediate_source/pruning_tutorial.py
Justin-A/PyTorch-tutorials-kr
0d8e407523e5e75de0081becf800b82b37eb912f
[ "BSD-3-Clause" ]
1
2021-11-16T05:29:28.000Z
2021-11-16T05:29:28.000Z
intermediate_source/pruning_tutorial.py
Justin-A/PyTorch-tutorials-kr
0d8e407523e5e75de0081becf800b82b37eb912f
[ "BSD-3-Clause" ]
null
null
null
intermediate_source/pruning_tutorial.py
Justin-A/PyTorch-tutorials-kr
0d8e407523e5e75de0081becf800b82b37eb912f
[ "BSD-3-Clause" ]
1
2022-02-27T10:47:39.000Z
2022-02-27T10:47:39.000Z
# -*- coding: utf-8 -*- """ 가지치기 기법(Pruning) 튜토리얼 ===================================== **저자**: `Michela Paganini <https://github.com/mickypaganini>`_ **번역** : `안상준 <https://github.com/Justin-A>`_ 최첨단 딥러닝 모델들은 굉장히 많은 수의 파라미터값들로 구성되기 때문에, 쉽게 배포되기 어렵습니다. 이와 반대로, 생물학적 신경망들은 효율적으로 희소하게 연결된 것으로 알려져 있습니다. 모델의 정확도가 손상되지 않는 범...
37.494413
99
0.53088
import torch from torch import nn import torch.nn.utils.prune as prune import torch.nn.functional as F device = torch.device("cuda" if torch.cuda.is_available() else "cpu") class LeNet(nn.Module): def __init__(self): super(LeNet, self).__init__() self.conv1 = nn.Conv2d(1, 6, 3) ...
true
true
1c320dffcec86724926d3d7d3a725d71e7aef05a
1,141
py
Python
hata/ext/slash/menus/closer.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
null
null
null
hata/ext/slash/menus/closer.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
null
null
null
hata/ext/slash/menus/closer.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
1
2020-09-17T20:10:15.000Z
2020-09-17T20:10:15.000Z
__all__ = ('Closer', ) from scarletio import CancelledError from ....discord.interaction import ComponentButton, ComponentRow from .menu import Menu from .helpers import EMOJI_CANCEL, top_level_check, top_level_get_timeout, CUSTOM_ID_CANCEL, get_auto_check class Closer(Menu): BUTTON_CANCEL = ComponentButto...
27.829268
107
0.655565
__all__ = ('Closer', ) from scarletio import CancelledError from ....discord.interaction import ComponentButton, ComponentRow from .menu import Menu from .helpers import EMOJI_CANCEL, top_level_check, top_level_get_timeout, CUSTOM_ID_CANCEL, get_auto_check class Closer(Menu): BUTTON_CANCEL = ComponentButto...
true
true
1c321021a8d46291c5590afb59264fb3d1935edc
956
py
Python
expert_python/src/socket_http.py
MaiXiaochai/Droplet
6d7fed9ca76678768a3752fa8df86a021acc3509
[ "MIT" ]
null
null
null
expert_python/src/socket_http.py
MaiXiaochai/Droplet
6d7fed9ca76678768a3752fa8df86a021acc3509
[ "MIT" ]
null
null
null
expert_python/src/socket_http.py
MaiXiaochai/Droplet
6d7fed9ca76678768a3752fa8df86a021acc3509
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # @File : socket_http.py # @Time : 2019/3/4 23:26 # @Author : MaiXiaochai # @Site : https://github.com/MaiXiaochai import socket from urllib.parse import urlparse def get_url(url): # 通过socket请求html url = urlparse(url) host = url.netloc path = url.p...
19.916667
107
0.574268
import socket from urllib.parse import urlparse def get_url(url): url = urlparse(url) host = url.netloc path = url.path if path == "": path = '/' client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) client.connect((host, 80)) client.send("GET {} HT...
true
true
1c321066b129f999453f696b189573231cce56ca
601
py
Python
AGONS/AGONS/test.py
CWSmith022/yigit-lab
8ec1f7d0242d36351ef92bc6698358c9431f4c34
[ "MIT" ]
null
null
null
AGONS/AGONS/test.py
CWSmith022/yigit-lab
8ec1f7d0242d36351ef92bc6698358c9431f4c34
[ "MIT" ]
null
null
null
AGONS/AGONS/test.py
CWSmith022/yigit-lab
8ec1f7d0242d36351ef92bc6698358c9431f4c34
[ "MIT" ]
null
null
null
# %% """Test how custom functions work with sklearn package.""" import numpy as np from sklearn.preprocessing import FunctionTransformer from sklearn.preprocessing import StandardScaler, MinMaxScaler x = np.array([[1,2,3], [6,5,4], [8,7,9]]) print(x) def SSRow(X): X_ = X.copy() X_t = StandardScaler().fit_transf...
25.041667
62
0.698835
import numpy as np from sklearn.preprocessing import FunctionTransformer from sklearn.preprocessing import StandardScaler, MinMaxScaler x = np.array([[1,2,3], [6,5,4], [8,7,9]]) print(x) def SSRow(X): X_ = X.copy() X_t = StandardScaler().fit_transform(X_.T).T return X_t def MMRow(X): X_ = X.copy() ...
true
true
1c32122e73533e7f7ceb0fa50188f83c9951b7fd
2,283
py
Python
prepare-data.py
waytrue17/dynamic-training-with-apache-mxnet-on-aws
d6289f4002e4a3886f97a799a68bb653fea12672
[ "Apache-2.0" ]
54
2018-11-27T06:00:52.000Z
2022-03-24T09:41:01.000Z
prepare-data.py
waytrue17/dynamic-training-with-apache-mxnet-on-aws
d6289f4002e4a3886f97a799a68bb653fea12672
[ "Apache-2.0" ]
3
2018-11-27T16:45:44.000Z
2020-10-21T00:15:02.000Z
prepare-data.py
waytrue17/dynamic-training-with-apache-mxnet-on-aws
d6289f4002e4a3886f97a799a68bb653fea12672
[ "Apache-2.0" ]
18
2018-11-29T21:18:38.000Z
2022-03-17T22:18:43.000Z
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
40.052632
87
0.697766
import subprocess import os import errno def download_file(url, local_fname=None, force_write=False): import requests if local_fname is None: local_fname = url.split('/')[-1] if not force_write and os.path.exists(local_fname): return local_fname dir_name = os.path.dirname(local_...
true
true
1c3213af9141a47d8c41a7dc75aec7b0dc6fc928
6,351
py
Python
test/unit/module/config/test_config_mixin.py
Adam-sHub/cfn-lint
4c501d01f87ec0ef9432dc407c5a9ac0025f00b6
[ "MIT-0" ]
1,134
2019-03-02T14:58:34.000Z
2021-05-15T00:57:16.000Z
test/unit/module/config/test_config_mixin.py
Adam-sHub/cfn-lint
4c501d01f87ec0ef9432dc407c5a9ac0025f00b6
[ "MIT-0" ]
1,122
2019-03-03T04:27:15.000Z
2021-05-14T20:51:16.000Z
test/unit/module/config/test_config_mixin.py
Adam-sHub/cfn-lint
4c501d01f87ec0ef9432dc407c5a9ac0025f00b6
[ "MIT-0" ]
297
2019-03-11T09:56:57.000Z
2021-05-14T16:41:19.000Z
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: MIT-0 """ import logging import os from test.testlib.testcase import BaseTestCase from mock import patch import cfnlint.config # pylint: disable=E0401 from cfnlint.helpers import REGIONS LOGGER = logging.getLogger('cfnlin...
33.781915
102
0.572981
import logging import os from test.testlib.testcase import BaseTestCase from mock import patch import cfnlint.config from cfnlint.helpers import REGIONS LOGGER = logging.getLogger('cfnlint') class TestConfigMixIn(BaseTestCase): def tearDown(self): for handler in LOGGER.handlers: LOGGER.rem...
true
true
1c32142d0236311c8aff644fbcf2d183aa3841e8
1,544
py
Python
pip_services3_messaging/test/TestMessageReceiver.py
pip-services-python/pip-services-messaging-python
edaca5cd620a51e9d9f713811e64bb0f532851ce
[ "MIT" ]
null
null
null
pip_services3_messaging/test/TestMessageReceiver.py
pip-services-python/pip-services-messaging-python
edaca5cd620a51e9d9f713811e64bb0f532851ce
[ "MIT" ]
null
null
null
pip_services3_messaging/test/TestMessageReceiver.py
pip-services-python/pip-services-messaging-python
edaca5cd620a51e9d9f713811e64bb0f532851ce
[ "MIT" ]
1
2020-03-19T22:19:30.000Z
2020-03-19T22:19:30.000Z
# -*- coding: utf-8 -*- import threading from typing import List, Optional from pip_services3_commons.run import ICleanable from pip_services3_messaging.queues import IMessageReceiver, MessageEnvelope, IMessageQueue class TestMessageReceiver(IMessageReceiver, ICleanable): """ TODO add description """ ...
29.132075
102
0.658031
import threading from typing import List, Optional from pip_services3_commons.run import ICleanable from pip_services3_messaging.queues import IMessageReceiver, MessageEnvelope, IMessageQueue class TestMessageReceiver(IMessageReceiver, ICleanable): def __init__(self): self.__messages: List[MessageEnvel...
true
true
1c32155b38f939a3e5358977f470abd59cc365fb
2,354
py
Python
tflite_handtrack/handtrack.py
slothkong/handtrack
e4825535f858f83c15dc611fd80953313177f835
[ "Apache-2.0" ]
null
null
null
tflite_handtrack/handtrack.py
slothkong/handtrack
e4825535f858f83c15dc611fd80953313177f835
[ "Apache-2.0" ]
5
2020-02-07T20:38:13.000Z
2022-02-10T00:38:26.000Z
tflite_handtrack/handtrack.py
slothkong/handtrack
e4825535f858f83c15dc611fd80953313177f835
[ "Apache-2.0" ]
null
null
null
""" Custom script to perform hand tracking and optionally cropping and saving the bounding boxes content. I created it using the following libraries/resources: 1. Video capture uses Opencv to stream from a webcam. 2. The detection utilizes a pre-trained Palm Detector model developed by Google AI Research, which was...
32.694444
120
0.657604
import os import time import argparse import numpy as np import cv2 from utils import preprocess_image, rescale_bbox from detector import Detector def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument("--modeldir", help="Folder the .tflite file is located...
true
true
1c3215928d8c8c04642d33f7563762d1827f09b1
2,711
py
Python
theano/scan_module/tests/test_scan_checkpoints.py
gundun/theano
09d17fff10487dca7149e34601b8c6efdc572a19
[ "BSD-3-Clause" ]
null
null
null
theano/scan_module/tests/test_scan_checkpoints.py
gundun/theano
09d17fff10487dca7149e34601b8c6efdc572a19
[ "BSD-3-Clause" ]
null
null
null
theano/scan_module/tests/test_scan_checkpoints.py
gundun/theano
09d17fff10487dca7149e34601b8c6efdc572a19
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, print_function, division import numpy import unittest import theano import theano.tensor as T try: from pygpu.gpuarray import GpuArrayException PYGPU_AVAILABLE = True except ImportError: PYGPU_AVAILABLE = False class TestScanCheckpoint(unittest.TestCase): de...
38.183099
78
0.61564
from __future__ import absolute_import, print_function, division import numpy import unittest import theano import theano.tensor as T try: from pygpu.gpuarray import GpuArrayException PYGPU_AVAILABLE = True except ImportError: PYGPU_AVAILABLE = False class TestScanCheckpoint(unittest.TestCase): de...
true
true
1c32165cf5ae8a05b1774be9a26bf5f4f47899aa
64
py
Python
network/__init__.py
laerreal/librfunc
5f46e75d52966481c19ca19081892ff9b2c17990
[ "BSD-3-Clause" ]
null
null
null
network/__init__.py
laerreal/librfunc
5f46e75d52966481c19ca19081892ff9b2c17990
[ "BSD-3-Clause" ]
null
null
null
network/__init__.py
laerreal/librfunc
5f46e75d52966481c19ca19081892ff9b2c17990
[ "BSD-3-Clause" ]
null
null
null
from ..importall import gen_this gen_this() from .this import *
16
32
0.765625
from ..importall import gen_this gen_this() from .this import *
true
true
1c3216d667f35002ba73f3edc96d6e94321b667a
20,079
py
Python
python/services/bigquery/beta/routine.py
trodge/declarative-resource-client-library
2cb7718a5074776b3113cc18a7483b54022238f3
[ "Apache-2.0" ]
null
null
null
python/services/bigquery/beta/routine.py
trodge/declarative-resource-client-library
2cb7718a5074776b3113cc18a7483b54022238f3
[ "Apache-2.0" ]
null
null
null
python/services/bigquery/beta/routine.py
trodge/declarative-resource-client-library
2cb7718a5074776b3113cc18a7483b54022238f3
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.243682
88
0.675581
from connector import channel from google3.cloud.graphite.mmv2.services.google.bigquery import routine_pb2 from google3.cloud.graphite.mmv2.services.google.bigquery import routine_pb2_grpc from typing import List class Routine(object): def __init__( self, etag: str = None, name: str = Non...
true
true
1c3218445516a8e8e61d1a56cba390d2063fdbb0
7,575
py
Python
Network.py
qingqinl/Movie_recommendation_system
8896813b56a02e80c30dec845cc9ffb9d946426a
[ "MIT" ]
4
2019-05-07T13:57:44.000Z
2021-05-04T10:00:20.000Z
Network.py
qingqinl/Movie_recommendation_system
8896813b56a02e80c30dec845cc9ffb9d946426a
[ "MIT" ]
null
null
null
Network.py
qingqinl/Movie_recommendation_system
8896813b56a02e80c30dec845cc9ffb9d946426a
[ "MIT" ]
5
2018-04-21T08:02:11.000Z
2019-05-07T13:58:44.000Z
from model_Init import * ## 定义User的嵌入矩阵 def get_user_embedding(uid, user_gender, user_age, user_job): with tf.name_scope("user_embedding"): uid_embed_matrix = tf.Variable(tf.random_uniform([uid_max, embed_dim], -1, 1), name = "uid_embed_matrix") uid_embed_layer = tf.nn.embedding_lookup(uid_embed_matrix, uid, name...
45.63253
146
0.777954
from model_Init import * def get_user_embedding(uid, user_gender, user_age, user_job): with tf.name_scope("user_embedding"): uid_embed_matrix = tf.Variable(tf.random_uniform([uid_max, embed_dim], -1, 1), name = "uid_embed_matrix") uid_embed_layer = tf.nn.embedding_lookup(uid_embed_matrix, uid, name = "uid_embed_l...
true
true
1c3218e98425eccd4ffcd85d939ce07c12783071
4,990
py
Python
xpython/byteop/byteop26.py
rocky/xpython
ce4ed4329cee2af0aab94254276f5a5687dd25f9
[ "MIT" ]
1
2020-04-28T13:18:13.000Z
2020-04-28T13:18:13.000Z
xpython/byteop/byteop26.py
rocky/xbyterun
fde8f8a31ffd3e3c4545d76b4b1edf4b7e0191d9
[ "MIT" ]
null
null
null
xpython/byteop/byteop26.py
rocky/xbyterun
fde8f8a31ffd3e3c4545d76b4b1edf4b7e0191d9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Bytecode Interpreter operations for Python 2.6 Note: this is subclassed so later versions may use operations from here. """ import os import sys import xpython.stdlib from xdis.version_info import PYTHON_VERSION_TRIPLE try: import importlib except ImportError: importlib = None fr...
38.091603
126
0.597996
import os import sys import xpython.stdlib from xdis.version_info import PYTHON_VERSION_TRIPLE try: import importlib except ImportError: importlib = None from xpython.byteop.byteop import fmt_binary_op from xpython.byteop.byteop24 import fmt_make_function, Version_info from xpython.byteop.byteop25 import By...
true
true
1c32191e5989ca9ffe4e2cced12fb25f432a9b47
45
py
Python
CodingBat/Warmup-2/string_times.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
CodingBat/Warmup-2/string_times.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
CodingBat/Warmup-2/string_times.py
arthxvr/coding--python
1e91707be6cb8fef816dad0c1a65f2cc3327357e
[ "MIT" ]
null
null
null
def string_times(str, n): return str * n
15
25
0.644444
def string_times(str, n): return str * n
true
true
1c3219f35ecf247590dfae96ca5c7f08de0a65c4
563
py
Python
locust_demo/example2.py
jmkhael/locust_demo
d5c82bc56cd3c5d30a8944d796f88f093e058182
[ "MIT" ]
null
null
null
locust_demo/example2.py
jmkhael/locust_demo
d5c82bc56cd3c5d30a8944d796f88f093e058182
[ "MIT" ]
1
2021-03-24T21:44:45.000Z
2021-03-24T21:44:45.000Z
locust_demo/example2.py
jmkhael/locust_demo
d5c82bc56cd3c5d30a8944d796f88f093e058182
[ "MIT" ]
null
null
null
import random from locust import HttpUser, task, between class MyTaskSet(HttpUser): wait_time = between(5, 9) def on_start(self): res = self.client.post('login', { "username": 'admin', "password": 'default' ...
21.653846
56
0.48135
import random from locust import HttpUser, task, between class MyTaskSet(HttpUser): wait_time = between(5, 9) def on_start(self): res = self.client.post('login', { "username": 'admin', "password": 'default' ...
true
true
1c321c8b04ced57168a44d64a949a88e3dc7091a
623
py
Python
test.py
bitscuit/Text-Deduplication
7f9921ea7ca01a56557b4145daede7f59258f02e
[ "MIT" ]
null
null
null
test.py
bitscuit/Text-Deduplication
7f9921ea7ca01a56557b4145daede7f59258f02e
[ "MIT" ]
null
null
null
test.py
bitscuit/Text-Deduplication
7f9921ea7ca01a56557b4145daede7f59258f02e
[ "MIT" ]
null
null
null
import keras from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences string1 = 'this is a sample sentence to test similarity' string2 = 'this is a sample sentence to test similarity too' t = Tokenizer() t.fit_on_texts([string1]) t.fit_on_texts([string2]) sequence1 = t.te...
31.15
93
0.784912
import keras from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences string1 = 'this is a sample sentence to test similarity' string2 = 'this is a sample sentence to test similarity too' t = Tokenizer() t.fit_on_texts([string1]) t.fit_on_texts([string2]) sequence1 = t.te...
true
true
1c321d2118d7f632e4969aca96520b34012f982a
3,427
py
Python
imperative/python/megengine/optimizer/adadelta.py
chenls/MegEngine
3f783aba4b81ab628ad911d0c66a49d163a8aaf6
[ "Apache-2.0" ]
3
2021-08-08T12:55:53.000Z
2021-12-10T06:01:04.000Z
imperative/python/megengine/optimizer/adadelta.py
MediosZ/MegEngine
5c775d02dd0b8f20b5acc6b400cf722e92f2e86b
[ "Apache-2.0" ]
6
2020-04-24T08:52:06.000Z
2021-08-16T06:38:23.000Z
imperative/python/megengine/optimizer/adadelta.py
MediosZ/MegEngine
5c775d02dd0b8f20b5acc6b400cf722e92f2e86b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
34.969388
110
0.610155
from typing import Iterable, Union import numpy as np from ..tensor import Parameter, tensor from .optimizer import Optimizer class Adadelta(Optimizer): def __init__( self, params: Union[Iterable[Parameter], dict], lr: float = 1.0, rho: float = 0.9, eps: float = 1e-6, ...
true
true
1c321e0d1e6c72eea8bae445367a295f62188a6b
4,613
py
Python
projects_oss/detr/detr/d2/dataset_mapper.py
Pandinosaurus/d2go
fd79c680749184509efb2017d478d8c00656bbe2
[ "Apache-2.0" ]
null
null
null
projects_oss/detr/detr/d2/dataset_mapper.py
Pandinosaurus/d2go
fd79c680749184509efb2017d478d8c00656bbe2
[ "Apache-2.0" ]
null
null
null
projects_oss/detr/detr/d2/dataset_mapper.py
Pandinosaurus/d2go
fd79c680749184509efb2017d478d8c00656bbe2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import copy import logging import numpy as np import torch from detectron2.data import detection_utils as utils from detectron2.data import transforms as...
36.904
111
0.638413
import copy import logging import numpy as np import torch from detectron2.data import detection_utils as utils from detectron2.data import transforms as T __all__ = ["DetrDatasetMapper"] def build_transform_gen(cfg, is_train): if is_train: min_size = cfg.INPUT.MIN_SIZE_TRAIN max_size = cfg.INP...
true
true
1c321e9f6ae93086f8db8edb4eaff14d6eb11ecc
523
py
Python
odoo-13.0/addons/website_event_sale/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/website_event_sale/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/website_event_sale/__manifest__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- { 'name': "Online Event Ticketing", 'category': 'Website/Website', 'summary': "Sell event tickets online", 'description': """ Sell event tickets through eCommerce app. """, 'depends': ['website_event', 'event_sale', 'website_sale'], 'data': [ 'data/event_data...
26.15
63
0.600382
{ 'name': "Online Event Ticketing", 'category': 'Website/Website', 'summary': "Sell event tickets online", 'description': """ Sell event tickets through eCommerce app. """, 'depends': ['website_event', 'event_sale', 'website_sale'], 'data': [ 'data/event_data.xml', 'views/ev...
true
true
1c321f14440a1f1ca4249e457c5620d7f377ce0f
13,615
py
Python
cvat/apps/tf_annotation/views.py
lravindr/cvat
b025acea43fbb55c7ea7eac7b12007f0eb6d3f45
[ "MIT" ]
1
2020-07-19T08:15:20.000Z
2020-07-19T08:15:20.000Z
cvat/apps/tf_annotation/views.py
lravindr/cvat
b025acea43fbb55c7ea7eac7b12007f0eb6d3f45
[ "MIT" ]
17
2020-11-13T18:58:43.000Z
2022-02-27T08:06:04.000Z
cvat/apps/tf_annotation/views.py
lravindr/cvat
b025acea43fbb55c7ea7eac7b12007f0eb6d3f45
[ "MIT" ]
4
2021-09-03T13:13:40.000Z
2022-03-04T18:19:38.000Z
# Copyright (C) 2018-2020 Intel Corporation # # SPDX-License-Identifier: MIT from django.http import HttpResponse, JsonResponse, HttpResponseBadRequest from rest_framework.decorators import api_view from rules.contrib.views import permission_required, objectgetter from cvat.apps.authentication.decorators import login...
39.236311
154
0.593537
from django.http import HttpResponse, JsonResponse, HttpResponseBadRequest from rest_framework.decorators import api_view from rules.contrib.views import permission_required, objectgetter from cvat.apps.authentication.decorators import login_required from cvat.apps.dataset_manager.task import put_task_data from cvat....
true
true
1c321f1f4f98f8c5bb24f8b5a4a96a2bb27fd616
10,137
py
Python
hammers/scripts/maintenance_reservation.py
ChameleonCloud/bag-o-hammers
0faaf9b21aceb155dc7da2ea92cf77af815c11e7
[ "Apache-2.0" ]
null
null
null
hammers/scripts/maintenance_reservation.py
ChameleonCloud/bag-o-hammers
0faaf9b21aceb155dc7da2ea92cf77af815c11e7
[ "Apache-2.0" ]
8
2018-05-24T01:07:27.000Z
2021-09-01T18:02:29.000Z
hammers/scripts/maintenance_reservation.py
ChameleonCloud/bag-o-hammers
0faaf9b21aceb155dc7da2ea92cf77af815c11e7
[ "Apache-2.0" ]
2
2016-12-07T01:12:41.000Z
2018-08-17T16:57:54.000Z
import datetime import logging import os import sys import traceback from dateutil import tz from blazarclient import client as blazar_client from ironicclient import client as ironic_client from keystoneauth1 import adapter, loading, session from keystoneauth1.identity import v3 from hammers import MySqlArgs from h...
38.988462
125
0.61606
import datetime import logging import os import sys import traceback from dateutil import tz from blazarclient import client as blazar_client from ironicclient import client as ironic_client from keystoneauth1 import adapter, loading, session from keystoneauth1.identity import v3 from hammers import MySqlArgs from h...
true
true
1c321f551a7a9daf6e1a0849a0b6f9fcf2550348
25,940
py
Python
core/platform/auth/firebase_auth_services.py
TheoLipeles/oppia
cd0bb873e08fa716014f3d1480fbbfee95b89121
[ "Apache-2.0" ]
null
null
null
core/platform/auth/firebase_auth_services.py
TheoLipeles/oppia
cd0bb873e08fa716014f3d1480fbbfee95b89121
[ "Apache-2.0" ]
null
null
null
core/platform/auth/firebase_auth_services.py
TheoLipeles/oppia
cd0bb873e08fa716014f3d1480fbbfee95b89121
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
40.404984
80
0.712452
from __future__ import absolute_import from __future__ import unicode_literals import logging from constants import constants from core.domain import auth_domain from core.platform import models import feconf import python_utils import firebase_admin from firebase_admin import auth as firebase_auth from firebase...
true
true
1c321f97ee430e4a3ee9e112f6ace089525c4b15
1,187
py
Python
django_kmatch/fields.py
wesleykendall/django-kmatch
0ca5d8465461210aa98fd3fb9afd2ec3838a4f9b
[ "MIT" ]
null
null
null
django_kmatch/fields.py
wesleykendall/django-kmatch
0ca5d8465461210aa98fd3fb9afd2ec3838a4f9b
[ "MIT" ]
2
2015-03-27T18:10:34.000Z
2015-03-30T17:39:44.000Z
django_kmatch/fields.py
wesleykendall/django-kmatch
0ca5d8465461210aa98fd3fb9afd2ec3838a4f9b
[ "MIT" ]
5
2015-03-27T17:49:20.000Z
2016-11-28T22:29:54.000Z
from jsonfield import JSONField from kmatch import K class KField(JSONField): """Stores a kmatch pattern and returns a compiled K object. The KField field stores a kmatch pattern in a JSONField. The pattern is compiled and returned as a K object when accessing the field. Invalid kmatch patterns cannot be...
39.566667
103
0.680708
from jsonfield import JSONField from kmatch import K class KField(JSONField): description = 'A kmatch pattern' def pre_init(self, value, obj): value = super(KField, self).pre_init(value, obj) return K(value) if not isinstance(value, K) and value is not None else value def get_db_prep_val...
true
true
1c322128e9fb297f1e65f06a7d4a1823b754ab52
9,854
py
Python
tests/python/contrib/test_hexagon/test_launcher.py
HeRCLab/tvm
bd14a4d36e0d364ef9bd34b2ee96cc09ce64d4b3
[ "Apache-2.0" ]
null
null
null
tests/python/contrib/test_hexagon/test_launcher.py
HeRCLab/tvm
bd14a4d36e0d364ef9bd34b2ee96cc09ce64d4b3
[ "Apache-2.0" ]
null
null
null
tests/python/contrib/test_hexagon/test_launcher.py
HeRCLab/tvm
bd14a4d36e0d364ef9bd34b2ee96cc09ce64d4b3
[ "Apache-2.0" ]
1
2022-03-02T16:24:54.000Z
2022-03-02T16:24:54.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.496296
98
0.667242
import sys import pytest import numpy as np import logging import tvm.testing from tvm import te from tvm import relay from tvm.relay.backend import Executor, Runtime from tvm.contrib import utils, ndk from tvm.contrib.hexagon.build import HexagonLauncher import tvm.contrib.hexagon.hexagon as hexagon from .conftest ...
true
true
1c32213da081ce5136d5611d545b3075a72813fe
358
py
Python
abc/abc130/abc130d.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc130/abc130d.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc130/abc130d.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
# しゃくとり法 N, K = map(int, input().split()) a = list(map(int, input().split())) result = 0 i = 0 j = 0 v = 0 while True: v += a[j] if v < K: j += 1 else: result += N - j v -= a[i] if j > i: v -= a[j] i += 1 if j < i: j += 1 if j == N...
14.916667
35
0.351955
N, K = map(int, input().split()) a = list(map(int, input().split())) result = 0 i = 0 j = 0 v = 0 while True: v += a[j] if v < K: j += 1 else: result += N - j v -= a[i] if j > i: v -= a[j] i += 1 if j < i: j += 1 if j == N: ...
true
true
1c3221aae6ede31defc7380c964dc41d657f7f66
15,720
py
Python
sdk/python/lib/pulumi/output.py
geekflyer/pulumi
ea8ababc87fba54c86cf378b45531b34bdbcf488
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/output.py
geekflyer/pulumi
ea8ababc87fba54c86cf378b45531b34bdbcf488
[ "Apache-2.0" ]
null
null
null
sdk/python/lib/pulumi/output.py
geekflyer/pulumi
ea8ababc87fba54c86cf378b45531b34bdbcf488
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2018, Pulumi Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
42.833787
120
0.6493
import asyncio from functools import reduce from inspect import isawaitable from typing import ( TypeVar, Generic, Set, Callable, Awaitable, Union, cast, Mapping, Any, List, Optional, TYPE_CHECKING ) from . import runtime from .runtime import known_types from .runtime im...
true
true
1c3221b1423884c0752522c0a00db79476896656
305
py
Python
Testprogramm1.py
bogdanevropin/euler_project_tasks
0a5470ce125112e54d15eddb580f201d13ead8af
[ "MIT" ]
null
null
null
Testprogramm1.py
bogdanevropin/euler_project_tasks
0a5470ce125112e54d15eddb580f201d13ead8af
[ "MIT" ]
null
null
null
Testprogramm1.py
bogdanevropin/euler_project_tasks
0a5470ce125112e54d15eddb580f201d13ead8af
[ "MIT" ]
null
null
null
from collections import namedtuple class Point: def __init__(self, x, y): self.x = x self.y = y def __eq__(self, other): return self.x == other.x and self.y == other.y namedtuple("Point", ["x", "y"]) p1 = Point(x=1, y=2) p2 = Point(x=1, y=2) print(p1 == p2)
21.785714
55
0.547541
from collections import namedtuple class Point: def __init__(self, x, y): self.x = x self.y = y def __eq__(self, other): return self.x == other.x and self.y == other.y namedtuple("Point", ["x", "y"]) p1 = Point(x=1, y=2) p2 = Point(x=1, y=2) print(p1 == p2)
true
true
1c32229d98353ca496267864784a5724cba819aa
2,620
py
Python
python/isomorphicGraph.py
quasarbright/quasarbright.github.io
942710adf4a2531d033023a6f750efeddf3e9050
[ "MIT" ]
1
2021-01-23T13:50:34.000Z
2021-01-23T13:50:34.000Z
python/isomorphicGraph.py
quasarbright/quasarbright.github.io
942710adf4a2531d033023a6f750efeddf3e9050
[ "MIT" ]
40
2018-02-19T19:37:24.000Z
2022-03-25T18:34:22.000Z
python/isomorphicGraph.py
quasarbright/quasarbright.github.io
942710adf4a2531d033023a6f750efeddf3e9050
[ "MIT" ]
1
2018-12-07T03:07:21.000Z
2018-12-07T03:07:21.000Z
from mylib.graph import * from mylib.lexicographic import allPerms import unittest # black widow shape isometric to square, not isometric to complete-ish graph # 1 2 # 3 4 # black widow cycle G1 = DiGraph() G1.add_node(1, 2, 3, 4) G1.set_edge(1, 2) G1.set_edge(2, 3) G1.set_edge(3, 4) G1.set_edge(4, 1) # square cycle G...
28.791209
114
0.632824
from mylib.graph import * from mylib.lexicographic import allPerms import unittest G1 = DiGraph() G1.add_node(1, 2, 3, 4) G1.set_edge(1, 2) G1.set_edge(2, 3) G1.set_edge(3, 4) G1.set_edge(4, 1) G2 = DiGraph() G2.add_node(1, 2, 3, 4) G2.set_edge(1, 2) G2.set_edge(2, 4) G2.set_edge(4, 3) G2.set_edge(3, 1) G3 = DiGraph()...
true
true
1c3223d8a0512ae4da1b50c7e86aec30f1708775
30,072
py
Python
airflow/providers/google/cloud/hooks/tasks.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
79
2021-10-15T07:32:27.000Z
2022-03-28T04:10:19.000Z
airflow/providers/google/cloud/hooks/tasks.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
153
2021-10-15T05:23:46.000Z
2022-02-23T06:07:10.000Z
airflow/providers/google/cloud/hooks/tasks.py
gtossou/airflow
0314a3a218f864f78ec260cc66134e7acae34bc5
[ "Apache-2.0" ]
23
2021-10-15T02:36:37.000Z
2022-03-17T02:59:27.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
44.485207
110
0.649874
from typing import Dict, List, Optional, Sequence, Tuple, Union from google.api_core.retry import Retry from google.cloud.tasks_v2 import CloudTasksClient, enums from google.cloud.tasks_v2.types import FieldMask, Queue, Task from airflow.exceptions import AirflowException from airflow.providers.google.common.hooks.b...
true
true
1c322545bc207fa9edba4b2993b4a25a2b58c14c
1,515
py
Python
app/utils/redis.py
edementyev/wakeupbot
975b95efe6845589046cf185da241a4aa255caf7
[ "MIT" ]
1
2020-10-07T12:09:21.000Z
2020-10-07T12:09:21.000Z
app/utils/redis.py
edementyev/wakeupbot
975b95efe6845589046cf185da241a4aa255caf7
[ "MIT" ]
7
2020-12-07T09:11:01.000Z
2022-03-02T18:15:01.000Z
app/utils/redis.py
edementyev/wakeupbot
975b95efe6845589046cf185da241a4aa255caf7
[ "MIT" ]
null
null
null
from typing import Optional import aioredis from aiogram import Dispatcher from aiogram.contrib.fsm_storage.redis import RedisStorage2 from aiogram.utils.executor import Executor from loguru import logger from app import config class BaseRedis: def __init__(self, host: str, port: int = 6379, db: int = 0): ...
24.836066
70
0.679208
from typing import Optional import aioredis from aiogram import Dispatcher from aiogram.contrib.fsm_storage.redis import RedisStorage2 from aiogram.utils.executor import Executor from loguru import logger from app import config class BaseRedis: def __init__(self, host: str, port: int = 6379, db: int = 0): ...
true
true
1c3225b3313a077ec9edb0f0627a95ed553ca984
567
py
Python
saved_exp_results/FDST-VGG16/FDST.py
Linfeng-Lee/IIM
c63bf8b023ccc6750e178112662972f721dcabe1
[ "MIT" ]
81
2020-12-10T02:38:03.000Z
2022-03-23T04:27:39.000Z
saved_exp_results/FDST-VGG16/FDST.py
Linfeng-Lee/IIM
c63bf8b023ccc6750e178112662972f721dcabe1
[ "MIT" ]
29
2020-12-15T09:07:00.000Z
2022-03-22T10:00:28.000Z
saved_exp_results/FDST-VGG16/FDST.py
Linfeng-Lee/IIM
c63bf8b023ccc6750e178112662972f721dcabe1
[ "MIT" ]
24
2020-12-14T02:05:16.000Z
2022-03-10T01:26:54.000Z
from easydict import EasyDict as edict # init __C_FDST = edict() cfg_data = __C_FDST __C_FDST.TRAIN_SIZE = (512,1024) __C_FDST.DATA_PATH = '../ProcessedData/FDST/' __C_FDST.TRAIN_LST = 'train.txt' __C_FDST.VAL_LST = 'val.txt' __C_FDST.VAL4EVAL = 'val_gt_loc.txt' __C_FDST.MEAN_STD = ( [0.452016860247, 0.447249...
19.551724
53
0.738977
from easydict import EasyDict as edict __C_FDST = edict() cfg_data = __C_FDST __C_FDST.TRAIN_SIZE = (512,1024) __C_FDST.DATA_PATH = '../ProcessedData/FDST/' __C_FDST.TRAIN_LST = 'train.txt' __C_FDST.VAL_LST = 'val.txt' __C_FDST.VAL4EVAL = 'val_gt_loc.txt' __C_FDST.MEAN_STD = ( [0.452016860247, 0.447249650955,...
true
true
1c3225f23e9c55d2dfc2a0e985897c13e7e998d6
7,486
py
Python
venv/Lib/site-packages/pandas/core/array_algos/putmask.py
arnoyu-hub/COMP0016miemie
59af664dcf190eab4f93cefb8471908717415fea
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/core/array_algos/putmask.py
arnoyu-hub/COMP0016miemie
59af664dcf190eab4f93cefb8471908717415fea
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/core/array_algos/putmask.py
arnoyu-hub/COMP0016miemie
59af664dcf190eab4f93cefb8471908717415fea
[ "MIT" ]
null
null
null
""" EA-compatible analogue to to np.putmask """ from __future__ import annotations from typing import Any import warnings import numpy as np from pandas._libs import lib from pandas._typing import ArrayLike from pandas.core.dtypes.cast import ( convert_scalar_for_putitemlike, find_common_type...
33.123894
89
0.608068
from __future__ import annotations from typing import Any import warnings import numpy as np from pandas._libs import lib from pandas._typing import ArrayLike from pandas.core.dtypes.cast import ( convert_scalar_for_putitemlike, find_common_type, infer_dtype_from, ) from pandas.core.dtype...
true
true
1c322636747515cc2ef81e9f89448dbce5406621
9,800
py
Python
snpit/core.py
thobalose/snpit
cbc649ae40104ac5ba482504503f6964f3adddbe
[ "MIT" ]
null
null
null
snpit/core.py
thobalose/snpit
cbc649ae40104ac5ba482504503f6964f3adddbe
[ "MIT" ]
null
null
null
snpit/core.py
thobalose/snpit
cbc649ae40104ac5ba482504503f6964f3adddbe
[ "MIT" ]
null
null
null
#! /usr/bin/env python import pkg_resources, codecs, csv import operator # PyVCF import vcf import gzip #BioPython from Bio import SeqIO class snpit(object): """ The snpit class is designed to take a VCF file and return the most likely lineage based on Sam Lipworth's SNP-IT. The methods have been separ...
38.431373
202
0.632041
import pkg_resources, codecs, csv import operator import vcf import gzip from Bio import SeqIO class snpit(object): def __init__(self,input_file=None,threshold=10): self.threshold=threshold resource_path = '/'.join(('..','lib', 'library.csv')) utf8_reader = codecs.ge...
true
true
1c32263ecd08ba9dac7a6b97477f8842ccbd58ca
1,122
py
Python
src/plot_perfomance.py
hoaaoh/Audio2Vec
96711c2300646ce10878113fa0d506d703db96d7
[ "Apache-2.0" ]
11
2018-02-16T03:52:17.000Z
2020-04-07T17:05:50.000Z
src/plot_perfomance.py
hoaaoh/Audio2Vec
96711c2300646ce10878113fa0d506d703db96d7
[ "Apache-2.0" ]
2
2018-05-26T16:27:59.000Z
2019-10-10T14:32:20.000Z
src/plot_perfomance.py
hoaaoh/Audio2Vec
96711c2300646ce10878113fa0d506d703db96d7
[ "Apache-2.0" ]
4
2017-11-16T17:54:38.000Z
2020-04-17T08:45:43.000Z
#!/usr/bin/env python3 import argparse import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import spline def main(): AE_small_list = [ 0.730, 0.685, 0.737, 0.693, 0.881, 0.713 ] AE_large_list = [ 0.234, 0.307, 0.400, 0.323, 0.317, 0.233 ] ### m = [ 3, 6, 10, 15, 21, 26 ] ### NE_sm...
33
67
0.628342
import argparse import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import spline def main(): AE_small_list = [ 0.730, 0.685, 0.737, 0.693, 0.881, 0.713 ] AE_large_list = [ 0.234, 0.307, 0.400, 0.323, 0.317, 0.233 ] NE_small_list = [ 0.390, 0.490, 0.484, 0.460, 0.351, ] NE_l...
true
true
1c3226c3f306914b538a7d1693092840ae2779b2
2,449
py
Python
huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/create_database_user_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/create_database_user_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/create_database_user_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CreateDatabaseUserResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
28.476744
79
0.553695
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class CreateDatabaseUserResponse(SdkResponse): sensitive_list = [] openapi_types = { } attribute_map = { } def __init__(self): ...
true
true
1c322804c158f7cadde9987b27a14b5122158323
129
py
Python
Messages/Error.py
BrinzaBezrukoff/Local-Chat
38eeb5d1226abde5662138c9f865005f47198767
[ "BSD-3-Clause" ]
2
2018-07-16T13:54:14.000Z
2021-12-23T17:42:19.000Z
Messages/Error.py
BrinzaBezrukoff/Local-Chat
38eeb5d1226abde5662138c9f865005f47198767
[ "BSD-3-Clause" ]
null
null
null
Messages/Error.py
BrinzaBezrukoff/Local-Chat
38eeb5d1226abde5662138c9f865005f47198767
[ "BSD-3-Clause" ]
null
null
null
from Messages.Message import Message class Error (Message): def get_text(self): return "ERROR: " + self.text
18.428571
37
0.643411
from Messages.Message import Message class Error (Message): def get_text(self): return "ERROR: " + self.text
true
true
1c32285bb36c63cc482fd1dec3c43e23ead76a16
272
py
Python
raiden/tests/unit/test_pending_locks.py
tirkarthi/raiden
dbd03ddda039332b54ec0c02d81cbe1100bc8028
[ "MIT" ]
2,101
2016-06-01T11:31:49.000Z
2022-03-27T20:13:19.000Z
raiden/tests/unit/test_pending_locks.py
tirkarthi/raiden
dbd03ddda039332b54ec0c02d81cbe1100bc8028
[ "MIT" ]
5,291
2016-06-01T18:14:04.000Z
2022-03-31T11:19:09.000Z
raiden/tests/unit/test_pending_locks.py
tirkarthi/raiden
dbd03ddda039332b54ec0c02d81cbe1100bc8028
[ "MIT" ]
484
2016-06-01T18:21:06.000Z
2022-03-22T10:29:45.000Z
from raiden.constants import LOCKSROOT_OF_NO_LOCKS from raiden.transfer.channel import compute_locksroot from raiden.transfer.state import PendingLocksState def test_empty(): locks = PendingLocksState([]) assert compute_locksroot(locks) == LOCKSROOT_OF_NO_LOCKS
30.222222
60
0.823529
from raiden.constants import LOCKSROOT_OF_NO_LOCKS from raiden.transfer.channel import compute_locksroot from raiden.transfer.state import PendingLocksState def test_empty(): locks = PendingLocksState([]) assert compute_locksroot(locks) == LOCKSROOT_OF_NO_LOCKS
true
true
1c32299f692ecef5a68d233b2b08cb4a2622bb34
3,817
py
Python
Yukki/YukkiUtilities/tgcallsrun/video.py
xsyn1100/YukkiMusic-Old
92400708b6d796f83fc6c59130176605b050e9ab
[ "MIT" ]
null
null
null
Yukki/YukkiUtilities/tgcallsrun/video.py
xsyn1100/YukkiMusic-Old
92400708b6d796f83fc6c59130176605b050e9ab
[ "MIT" ]
null
null
null
Yukki/YukkiUtilities/tgcallsrun/video.py
xsyn1100/YukkiMusic-Old
92400708b6d796f83fc6c59130176605b050e9ab
[ "MIT" ]
null
null
null
from pyrogram.raw.base import Update from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup from pytgcalls.types import Update from pytgcalls.types.input_stream import AudioPiped, AudioVideoPiped from pytgcalls.types.input_stream.quality import ( HighQualityAudio, HighQualityVideo, LowQuality...
29.137405
100
0.544931
from pyrogram.raw.base import Update from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup from pytgcalls.types import Update from pytgcalls.types.input_stream import AudioPiped, AudioVideoPiped from pytgcalls.types.input_stream.quality import ( HighQualityAudio, HighQualityVideo, LowQuality...
true
true
1c322a07c3235785aa972338b81421c0efb35565
5,290
py
Python
dsalgo/heap.py
dragonman164/dsalgo
7abcc03e59afeab20e4c5dfd72bb9216bce15a54
[ "MIT" ]
11
2020-09-20T12:27:33.000Z
2022-02-02T07:14:06.000Z
dsalgo/heap.py
nisheksharma/dsalgo
97cd3fd44fefc5321136e98eca4537c959e39285
[ "MIT" ]
67
2020-09-25T04:39:00.000Z
2021-10-15T05:58:31.000Z
dsalgo/heap.py
nisheksharma/dsalgo
97cd3fd44fefc5321136e98eca4537c959e39285
[ "MIT" ]
43
2020-09-25T05:57:49.000Z
2021-10-02T20:28:15.000Z
class Heap: def __init__(self, type='min'): """ Create a Heap object Args : type : type of Heap ('min' or 'max') default-'min' """ self.size = None self.Heap = [0] self.type = type __all__ = ['parent', 'leftChild', 'rightChild', 'display', ...
31.676647
78
0.465217
class Heap: def __init__(self, type='min'): self.size = None self.Heap = [0] self.type = type __all__ = ['parent', 'leftChild', 'rightChild', 'display', 'isLeaf', 'root', 'insert', 'delete', 'to_list'] def parent(self, pos): if((pos - 1) // 2) >= 0: ...
true
true
1c322a9fe35005b570619852ca2e5613452f96e4
1,251
py
Python
api/activities/migrations/0002_auto_20220305_1715.py
edmon1024/activities-api
e41ab6d5dbb7eba38effe353e88d75699a713f76
[ "MIT" ]
null
null
null
api/activities/migrations/0002_auto_20220305_1715.py
edmon1024/activities-api
e41ab6d5dbb7eba38effe353e88d75699a713f76
[ "MIT" ]
null
null
null
api/activities/migrations/0002_auto_20220305_1715.py
edmon1024/activities-api
e41ab6d5dbb7eba38effe353e88d75699a713f76
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2022-03-05 23:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('activities', '0001_initial'), ] operations = [ migrations.AlterField( ...
30.512195
85
0.597922
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('activities', '0001_initial'), ] operations = [ migrations.AlterField( model_name='activity', name='created_at', ...
true
true
1c322b3a952fb67fcf60a3fa4678b96e32e86725
8,886
py
Python
12_tf_obj_1/lib/calculate_map.py
Boltuzamaki/Monk_Object_Detection
baf113ef6db8b531d0ef6413538e49d422163a20
[ "Apache-2.0" ]
549
2020-01-02T05:14:57.000Z
2022-03-29T18:34:12.000Z
12_tf_obj_1/lib/calculate_map.py
Boltuzamaki/Monk_Object_Detection
baf113ef6db8b531d0ef6413538e49d422163a20
[ "Apache-2.0" ]
98
2020-01-21T09:41:30.000Z
2022-03-12T00:53:06.000Z
12_tf_obj_1/lib/calculate_map.py
Boltuzamaki/Monk_Object_Detection
baf113ef6db8b531d0ef6413538e49d422163a20
[ "Apache-2.0" ]
233
2020-01-18T03:46:27.000Z
2022-03-19T03:17:47.000Z
# Code from - https://github.com/Cartucho/mAP import glob import json import os import shutil import operator import sys import argparse import math import matplotlib.pyplot as plt import numpy as np def log_average_miss_rate(prec, rec, num_images): """ log-average miss rate: Calculated by ...
32.911111
123
0.603759
import glob import json import os import shutil import operator import sys import argparse import math import matplotlib.pyplot as plt import numpy as np def log_average_miss_rate(prec, rec, num_images): if prec.size == 0: lamr = 0 mr = 1 fppi = 0 return lamr, mr, fppi ...
true
true
1c322bb27857c36f63ac501a96730df8cd2d72c3
877
py
Python
alien_invasion/alien.py
MRNIU/PythonCrashCourse
c3aadf34a862d47fbe2dbf790b07a2439b225649
[ "MIT" ]
null
null
null
alien_invasion/alien.py
MRNIU/PythonCrashCourse
c3aadf34a862d47fbe2dbf790b07a2439b225649
[ "MIT" ]
null
null
null
alien_invasion/alien.py
MRNIU/PythonCrashCourse
c3aadf34a862d47fbe2dbf790b07a2439b225649
[ "MIT" ]
null
null
null
import pygame from pygame.sprite import Sprite class Alien(Sprite): def __init__(self, ai_settings, screen): super().__init__() self.screen = screen self.ai_settings=ai_settings self.image=pygame.image.load('images/alien.bmp') self.rect=self.image.get_rect() self.r...
27.40625
90
0.623717
import pygame from pygame.sprite import Sprite class Alien(Sprite): def __init__(self, ai_settings, screen): super().__init__() self.screen = screen self.ai_settings=ai_settings self.image=pygame.image.load('images/alien.bmp') self.rect=self.image.get_rect() self.r...
true
true
1c322d07c5fc9d23baf1e23a47c7e7a71abd791c
801
py
Python
src/paper/task_paper.py
maxxxbb/replication_ar2018
5c3da961664af0ff5a2d2b6f6a2baa3271cf2a57
[ "MIT" ]
null
null
null
src/paper/task_paper.py
maxxxbb/replication_ar2018
5c3da961664af0ff5a2d2b6f6a2baa3271cf2a57
[ "MIT" ]
null
null
null
src/paper/task_paper.py
maxxxbb/replication_ar2018
5c3da961664af0ff5a2d2b6f6a2baa3271cf2a57
[ "MIT" ]
null
null
null
import shutil import pytask from src.config import BLD from src.config import ROOT from src.config import SRC documents = ["replication_paper"] @pytask.mark.latex( [ "--pdf", "--interaction=nonstopmode", "--synctex=1", "--cd", "--quiet", "--shell-escape", ] ...
18.627907
78
0.594257
import shutil import pytask from src.config import BLD from src.config import ROOT from src.config import SRC documents = ["replication_paper"] @pytask.mark.latex( [ "--pdf", "--interaction=nonstopmode", "--synctex=1", "--cd", "--quiet", "--shell-escape", ] ...
true
true
1c322d7fa0ce60f6ed26d7df0b2f10a6f07d44e5
3,322
py
Python
features/steps/ps_platform_throttle_report_msg.py
PolySync/core-python-api
a753863eca820954f5b8f7502c38c5a7d8db5a15
[ "MIT" ]
null
null
null
features/steps/ps_platform_throttle_report_msg.py
PolySync/core-python-api
a753863eca820954f5b8f7502c38c5a7d8db5a15
[ "MIT" ]
null
null
null
features/steps/ps_platform_throttle_report_msg.py
PolySync/core-python-api
a753863eca820954f5b8f7502c38c5a7d8db5a15
[ "MIT" ]
2
2018-07-22T21:07:23.000Z
2019-03-09T14:31:09.000Z
# WARNING: Auto-generated file. Any changes are subject to being overwritten # by setup.py build script. #!/usr/bin/python import time from behave import given from behave import when from behave import then from hamcrest import assert_that, equal_to try: import polysync.node as ps_node from polysync.data_mod...
34.968421
161
0.792595
import time from behave import given from behave import when from behave import then from hamcrest import assert_that, equal_to try: import polysync.node as ps_node from polysync.data_model.types import Py_ps_platform_throttle_report_msg from polysync.data_model._internal.compare import ps_platform_thrott...
true
true
1c322d85258eb1b6d3e37e446ed35edfbd6a3ba7
24,617
py
Python
plugins/trezor/qt_generic.py
lionzeye/reddelectrum
e39497aee08b08bed89efa10072d17fb1e37920c
[ "MIT" ]
null
null
null
plugins/trezor/qt_generic.py
lionzeye/reddelectrum
e39497aee08b08bed89efa10072d17fb1e37920c
[ "MIT" ]
null
null
null
plugins/trezor/qt_generic.py
lionzeye/reddelectrum
e39497aee08b08bed89efa10072d17fb1e37920c
[ "MIT" ]
null
null
null
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from reddelectrum_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtP...
41.794567
81
0.613966
from functools import partial import threading from PyQt4.Qt import Qt from PyQt4.Qt import QGridLayout, QInputDialog, QPushButton from PyQt4.Qt import QVBoxLayout, QLabel, SIGNAL from reddelectrum_gui.qt.util import * from .plugin import TIM_NEW, TIM_RECOVER, TIM_MNEMONIC from ..hw_wallet.qt import QtHandlerBase, QtP...
true
true
1c322e67190af7fee7a252a4111c49a37fc343b6
1,301
py
Python
PythonSkripts/bisection.py
NMarkgraf/Quantitative-Methoden-der-W-Informatik
0b0be8d832eadce774a01047cd978f9599d29ca5
[ "CC0-1.0" ]
null
null
null
PythonSkripts/bisection.py
NMarkgraf/Quantitative-Methoden-der-W-Informatik
0b0be8d832eadce774a01047cd978f9599d29ca5
[ "CC0-1.0" ]
null
null
null
PythonSkripts/bisection.py
NMarkgraf/Quantitative-Methoden-der-W-Informatik
0b0be8d832eadce774a01047cd978f9599d29ca5
[ "CC0-1.0" ]
null
null
null
# ======================================================================== # Bisection-Verfahren in Python Rev. 2.0 (13. Apr. 2020) # =============================------------------------------------------- # (C)opyleft in 2020 by N. Markgraf (nmarkgraf@hotmail.com) # # ================================...
29.568182
74
0.420446
from math import exp, fabs def print_iter_info(i, a, b, c, f): print(f'Iter. {i}: a={a:.8F} f(a)={f(a):.8F} c=(a+b)/2={c:.8F} ' f'f(c)={f(c):.8F} b={b:.8F} f(b)={f(b):.8F}') def bisection(f, a, b, max_iter=1000, epsilon=0.0001): if f(a) * f(b) > 0: raise ArithmeticError("Das Produkt der I...
true
true
1c322e8d00d4637a3069f21b0e334e01caf84026
1,763
py
Python
reviews/admin.py
shockflash/reviews
f6cf2727e56f190e48f08d5da7932ff9d7b12936
[ "BSD-3-Clause" ]
1
2015-03-01T10:39:22.000Z
2015-03-01T10:39:22.000Z
reviews/admin.py
shockflash/reviews
f6cf2727e56f190e48f08d5da7932ff9d7b12936
[ "BSD-3-Clause" ]
null
null
null
reviews/admin.py
shockflash/reviews
f6cf2727e56f190e48f08d5da7932ff9d7b12936
[ "BSD-3-Clause" ]
null
null
null
from django.core import urlresolvers from django.utils.translation import ugettext as _ from django.contrib import admin from reviews.models import Review, ReviewSegment, Category, CategorySegment class ReviewSegmentInline(admin.TabularInline): model = ReviewSegment """ no manual alteration of the segments am...
32.648148
136
0.711855
from django.core import urlresolvers from django.utils.translation import ugettext as _ from django.contrib import admin from reviews.models import Review, ReviewSegment, Category, CategorySegment class ReviewSegmentInline(admin.TabularInline): model = ReviewSegment extra = 0 can_delete = False max_n...
true
true
1c322f42afa522705e697dc4fdb80e5c9139a56a
57,767
py
Python
sensortoolkit/evaluation_objs/_sensor_eval.py
USEPA/sensortoolkit
a9da32fd4df492154c6e4cc570011d14e933ee83
[ "MIT" ]
2
2022-02-25T21:59:04.000Z
2022-03-01T19:37:38.000Z
sensortoolkit/evaluation_objs/_sensor_eval.py
USEPA/sensortoolkit
a9da32fd4df492154c6e4cc570011d14e933ee83
[ "MIT" ]
null
null
null
sensortoolkit/evaluation_objs/_sensor_eval.py
USEPA/sensortoolkit
a9da32fd4df492154c6e4cc570011d14e933ee83
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Top-level analysis module for the ``sensortoolkit`` library. Contains the front-facing ``SensorEvaluation`` class for conducting analysis of sensor data. =============================================================================== @Author: | Samuel Frederick, NSSC Contractor (ORAU)...
45.846825
103
0.540741
import math import json import sys import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import sensortoolkit.calculate import sensortoolkit.datetime_utils import sensortoolkit.deploy import sensortoolkit.lib_utils import sensortoolkit.model import sensortoolkit.param import sensortoolkit.plo...
true
true
1c322f8ba391c2cbf93916a02b75024c2161394f
3,085
py
Python
maskrcnn_benchmark/data/transforms/transforms.py
zhilinghuang/maskrcnn-benchmark
1127bdd368613f320f7b113320e62994c0baa216
[ "MIT" ]
54
2020-06-14T15:45:01.000Z
2022-03-26T07:25:46.000Z
maskrcnn_benchmark/data/transforms/transforms.py
zhilinghuang/maskrcnn-benchmark
1127bdd368613f320f7b113320e62994c0baa216
[ "MIT" ]
25
2019-05-21T02:20:27.000Z
2019-09-13T14:56:17.000Z
maskrcnn_benchmark/data/transforms/transforms.py
zhilinghuang/maskrcnn-benchmark
1127bdd368613f320f7b113320e62994c0baa216
[ "MIT" ]
41
2019-09-03T06:51:59.000Z
2022-01-18T02:40:57.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import random import torch import torchvision from torchvision.transforms import functional as F class Compose(object): def __init__(self, transforms): self.transforms = transforms def __call__(self, image, target): for ...
28.302752
83
0.57893
import random import torch import torchvision from torchvision.transforms import functional as F class Compose(object): def __init__(self, transforms): self.transforms = transforms def __call__(self, image, target): for t in self.transforms: image, target = t(image, target) ...
true
true
1c322fe79d5d09617c72e056b0c23609d1c7f199
1,920
py
Python
thor/orbits/gibbs.py
KatKiker/thor
ffc8ab3fbaa8af046f531e8111907a891998d14b
[ "BSD-3-Clause" ]
11
2019-08-22T18:37:09.000Z
2022-02-28T22:49:25.000Z
thor/orbits/gibbs.py
KatKiker/thor
ffc8ab3fbaa8af046f531e8111907a891998d14b
[ "BSD-3-Clause" ]
57
2019-08-20T19:57:14.000Z
2021-09-16T20:54:59.000Z
thor/orbits/gibbs.py
KatKiker/thor
ffc8ab3fbaa8af046f531e8111907a891998d14b
[ "BSD-3-Clause" ]
7
2021-02-09T21:28:43.000Z
2022-02-01T08:55:29.000Z
import numpy as np from ..constants import Constants as c __all__ = ["calcGibbs"] MU = c.MU def calcGibbs(r1, r2, r3): """ Calculates the velocity vector at the location of the second position vector (r2) using the Gibbs method. .. math:: \vec{D} = \vec{r}_1 \times \vec{r}_2 + \vec{r}_2 \...
30.47619
120
0.585417
import numpy as np from ..constants import Constants as c __all__ = ["calcGibbs"] MU = c.MU def calcGibbs(r1, r2, r3): r1_mag = np.linalg.norm(r1) r2_mag = np.linalg.norm(r2) r3_mag = np.linalg.norm(r3) Z12 = np.cross(r1, r2) Z23 = np.cross(r2, r3) Z31 = np.cross(r3, r1) coplanarity = n...
true
true