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
f722e9cc17f1f3bc8a478de8d0aeecf08798d105
572
py
Python
sdk/python/pulumi_azure_native/notificationhubs/v20140901/__init__.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/notificationhubs/v20140901/__init__.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/notificationhubs/v20140901/__init__.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .get_namespace import * from .get_notif...
31.777778
80
0.769231
from ... import _utilities import typing # Export this package's modules as members: from ._enums import * from .get_namespace import * from .get_notification_hub import * from .get_notification_hub_pns_credentials import * from .list_namespace_keys import * from .list_notification_hub_keys import * from .namespace...
true
true
f722ea35e9284460af48ce2dd1bc2535916a6cb0
3,704
py
Python
kws_streaming/layers/stream_test.py
baajur/google-research
fd74519da7a0976b9b372f1ad8e091d1b3ee2212
[ "Apache-2.0" ]
3
2020-08-17T01:50:27.000Z
2020-10-29T01:51:16.000Z
kws_streaming/layers/stream_test.py
JustinDurham/google-research
9049acf9246c1b75170f0c6757e62a8f619a9db6
[ "Apache-2.0" ]
25
2020-07-25T08:53:09.000Z
2022-03-12T00:43:02.000Z
kws_streaming/layers/stream_test.py
JustinDurham/google-research
9049acf9246c1b75170f0c6757e62a8f619a9db6
[ "Apache-2.0" ]
2
2020-08-29T08:58:30.000Z
2021-08-29T09:59:34.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.981651
78
0.702214
import numpy as np from kws_streaming.layers import stream from kws_streaming.layers.compat import tf from kws_streaming.layers.compat import tf1 from kws_streaming.layers.modes import Modes from kws_streaming.models import utils tf1.disable_eager_execution() class Sum(tf.keras.layers.Layer): def ...
true
true
f722eb594e8e73ff236ef7f232c800cd1fe2c0bd
2,865
py
Python
www/page.py
linhyee/py-blog
c6ed92ebe93d6ec7cb7eff1e2690e97e5074b310
[ "Apache-2.0" ]
null
null
null
www/page.py
linhyee/py-blog
c6ed92ebe93d6ec7cb7eff1e2690e97e5074b310
[ "Apache-2.0" ]
null
null
null
www/page.py
linhyee/py-blog
c6ed92ebe93d6ec7cb7eff1e2690e97e5074b310
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ JSON API definition. """ import math from urllib import parse class Page(object): ''' Page object for display pages. ''' def __init__(self, item_count, page_index=1,page_size=10): ''' Init Pagination by item count, page_index and page_size >>> p1 =...
29.84375
117
0.543106
import math from urllib import parse class Page(object): def __init__(self, item_count, page_index=1,page_size=10): self.item_count = item_count self.page_size = page_size self.page_count = item_count // page_size + (1 if item_count % page_size > 0 else 0) if (item_count == 0) o...
true
true
f722eb5f39b52b59d529aed21853ccfff82baebb
4,845
py
Python
skbio/stats/distance/tests/test_anosim.py
michaelsilverstein/scikit-bio
876efcf688a8f15e89bb70fa835a2f2a84b534c1
[ "BSD-3-Clause" ]
1
2020-03-26T00:23:16.000Z
2020-03-26T00:23:16.000Z
skbio/stats/distance/tests/test_anosim.py
michaelsilverstein/scikit-bio
876efcf688a8f15e89bb70fa835a2f2a84b534c1
[ "BSD-3-Clause" ]
1
2020-05-03T15:13:07.000Z
2020-05-04T03:01:59.000Z
skbio/stats/distance/tests/test_anosim.py
michaelsilverstein/scikit-bio
876efcf688a8f15e89bb70fa835a2f2a84b534c1
[ "BSD-3-Clause" ]
3
2020-02-22T12:31:59.000Z
2020-09-20T19:21:44.000Z
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
40.375
78
0.519711
import io from functools import partial from unittest import TestCase, main import numpy as np import pandas as pd from pandas.util.testing import assert_series_equal from skbio import DistanceMatrix from skbio.stats.distance import anosim class TestANOSIM(TestCase): def setUp(self): ...
true
true
f722ebb724af4503948aba102fe25a6ba9af7df5
11,171
py
Python
acsm/benchmark/pck_eval.py
eldar/acsm
04069e8bb4c12185473dc10c3355e5367fa98968
[ "Apache-2.0" ]
52
2020-04-02T12:35:55.000Z
2022-03-11T07:47:30.000Z
acsm/benchmark/pck_eval.py
eldar/acsm
04069e8bb4c12185473dc10c3355e5367fa98968
[ "Apache-2.0" ]
8
2020-06-04T07:34:34.000Z
2021-09-18T21:17:26.000Z
acsm/benchmark/pck_eval.py
eldar/acsm
04069e8bb4c12185473dc10c3355e5367fa98968
[ "Apache-2.0" ]
6
2020-07-12T02:12:18.000Z
2021-03-06T05:03:33.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os.path as osp import numpy as np import pprint import pdb from . import evaluate_pr import scipy.io as sio ''' intervals : Define thresholds to evaluate pck score kpnames : Keypoint names be...
35.919614
94
0.598872
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import os.path as osp import numpy as np import pprint import pdb from . import evaluate_pr import scipy.io as sio def remove_nans(x): return x[~np.isnan(x)] def pck_at_intervals(intervals, e...
true
true
f722ec22feb4a0e855ee2c090316f8719c6ae702
713
py
Python
src/fastx/target.py
sjin09/fastx
2a4717eb64eff6655b716862b45b6b50f6bb0bc7
[ "MIT" ]
null
null
null
src/fastx/target.py
sjin09/fastx
2a4717eb64eff6655b716862b45b6b50f6bb0bc7
[ "MIT" ]
null
null
null
src/fastx/target.py
sjin09/fastx
2a4717eb64eff6655b716862b45b6b50f6bb0bc7
[ "MIT" ]
null
null
null
import gzip import natsort from Bio import SeqIO def get_target(infile: str, outfile) -> None: contig_hsh = {} SEX_CHROMOSOME = ("W", "X", "Y", "Z") sequences = SeqIO.parse(infile, "fasta") if infile.endswith(".fasta") else SeqIO.parse(gzip.open(infile, "rt"), "fasta") for i in sequences: cont...
37.526316
164
0.663394
import gzip import natsort from Bio import SeqIO def get_target(infile: str, outfile) -> None: contig_hsh = {} SEX_CHROMOSOME = ("W", "X", "Y", "Z") sequences = SeqIO.parse(infile, "fasta") if infile.endswith(".fasta") else SeqIO.parse(gzip.open(infile, "rt"), "fasta") for i in sequences: cont...
true
true
f722ec49b89c5a27a174dc656de3e484cbe78278
39,113
py
Python
mindspore/ops/_grad/grad_nn_ops.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
4
2021-01-26T09:14:01.000Z
2021-01-26T09:17:24.000Z
mindspore/ops/_grad/grad_nn_ops.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
null
null
null
mindspore/ops/_grad/grad_nn_ops.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
31.165737
119
0.635109
import os import numpy as np from mindspore.ops import _selected_grad_ops as SG from mindspore.ops.primitive import constexpr from mindspore.common.tensor import Tensor from mindspore.ops.operations import nn_ops as nps from .grad_base import bprop_getters from .. import functional as F from .. import op...
true
true
f722ed27fc2d0b1605d157e7f5caaaf6ffadd8cf
5,039
py
Python
example/evalutate_wav2vec2/evaluate_wav2vec2_librispeech.py
mthrok/ctcdecode
b1a30d7a65342012e0d2524d9bae1c5412b24a23
[ "MIT" ]
8
2021-06-17T19:43:36.000Z
2021-10-12T04:49:36.000Z
example/evalutate_wav2vec2/evaluate_wav2vec2_librispeech.py
mthrok/ctcdecode
b1a30d7a65342012e0d2524d9bae1c5412b24a23
[ "MIT" ]
null
null
null
example/evalutate_wav2vec2/evaluate_wav2vec2_librispeech.py
mthrok/ctcdecode
b1a30d7a65342012e0d2524d9bae1c5412b24a23
[ "MIT" ]
2
2021-07-14T06:15:55.000Z
2021-08-01T14:00:22.000Z
#!/usr/bin/env python3 """Generate `trn` files for Librispeech Given a Librispeech directory, parse transcript files, transcribe the corresponding audio, and generate hypothesis files. """ import os import time import logging import argparse from pathlib import Path import torch import torchaudio import fairseq impor...
29.127168
82
0.60647
import os import time import logging import argparse from pathlib import Path import torch import torchaudio import fairseq import simple_ctc _LG = logging.getLogger(__name__) def _parse_args(): def _path(path): return Path(os.path.normpath(path)) parser = argparse.ArgumentParser( descrip...
true
true
f722ed2d78ffd31704a3828c381652fbd174ab85
1,115
py
Python
curso_em_video/mundo_1/exs_python/ExPy002.py
LuiZamberlan/Ex.-Python
f5b6e4782e0ce0e3fead82b126b52588e1bc21b0
[ "MIT" ]
1
2020-09-19T21:39:12.000Z
2020-09-19T21:39:12.000Z
curso_em_video/mundo_1/exs_python/ExPy002.py
LuiZamberlan/Ex.-Python
f5b6e4782e0ce0e3fead82b126b52588e1bc21b0
[ "MIT" ]
null
null
null
curso_em_video/mundo_1/exs_python/ExPy002.py
LuiZamberlan/Ex.-Python
f5b6e4782e0ce0e3fead82b126b52588e1bc21b0
[ "MIT" ]
null
null
null
n = str(input('Digite o nome: ')) #Função input(): tem por objetivo de escrever a String passada como parâmetro e em seguida, ativar o modo de digitação, isto é, colocar o Console de uma determinada forma em que seja possível a digitação (entrada de dados). #faz uma pausa no programa e espera uma entrada do usuário pel...
92.916667
360
0.765022
n = str(input('Digite o nome: ')) print(f'É um prazer te conhecer, {n}') print('É um prazer te conhecer, ', n) print('Olá {0}, é um prazer te conhecer.'.format(n))
true
true
f722ed95d6a5994ae42bdd8b4cd697faea3865f3
1,415
py
Python
tools/eupath/Tools/lib/python/eupath/ReferenceGenome.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
tools/eupath/Tools/lib/python/eupath/ReferenceGenome.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
tools/eupath/Tools/lib/python/eupath/ReferenceGenome.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/python import EupathExporter import re class Genome: def __init__(self, reference_genome): """ Teases out from the user's parameter, the reference genome information used in the construction of dependency data. The reference genome parameter should be of the form: ProjectId-E...
33.690476
117
0.684099
import EupathExporter import re class Genome: def __init__(self, reference_genome): if not reference_genome and not re.match(r'^.+-\d+_.+_Genome$', reference_genome, flags=0): raise EupathExporter.ValidationException( "A syntactically correct reference genome is re...
true
true
f722ed960abdb9688a7e575da1d14c2e74549e98
385
py
Python
wsgi.py
mustafa-kamel/pytextmatch
8a9d178b9dffa69e7be29c98c7f94cf4c5018cdd
[ "MIT" ]
null
null
null
wsgi.py
mustafa-kamel/pytextmatch
8a9d178b9dffa69e7be29c98c7f94cf4c5018cdd
[ "MIT" ]
null
null
null
wsgi.py
mustafa-kamel/pytextmatch
8a9d178b9dffa69e7be29c98c7f94cf4c5018cdd
[ "MIT" ]
null
null
null
""" WSGI config for textmatch project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SET...
22.647059
78
0.784416
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings') application = get_wsgi_application()
true
true
f722ee31358c95a53a0ac7b0f86edf625ad85670
3,490
py
Python
cli/create.py
sysdiglabs/syscli
f72f476f7b555ce8be4d1b6d6ce21c53400aeb08
[ "Apache-2.0" ]
null
null
null
cli/create.py
sysdiglabs/syscli
f72f476f7b555ce8be4d1b6d6ce21c53400aeb08
[ "Apache-2.0" ]
3
2019-01-30T12:32:13.000Z
2019-01-30T12:37:38.000Z
cli/create.py
sysdiglabs/syscli
f72f476f7b555ce8be4d1b6d6ce21c53400aeb08
[ "Apache-2.0" ]
2
2019-01-21T11:05:09.000Z
2021-04-19T21:57:57.000Z
# Copyright 2018 Sysdig # # 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 writ...
43.625
119
0.704298
from sdc.sdc_config import load_config_env from sdc.sdc_enums import EXIT_CODES from sdc.sdc_extend import SdMonitorClient from sdc.sdc_method_create import create_user, create_dashboards_from_file from . import subparser import os.path def create(args): _create_parser.print_help() exit(1) def...
true
true
f722ef46ee79e182bd48be96631c6cc9b7d93c9c
11,666
py
Python
tests/pytorch_tests/layer_tests/base_pytorch_layer_test.py
reuvenperetz/model_optimization
40de02d56750ee4cc20e693da63bc2e70b4d20e6
[ "Apache-2.0" ]
null
null
null
tests/pytorch_tests/layer_tests/base_pytorch_layer_test.py
reuvenperetz/model_optimization
40de02d56750ee4cc20e693da63bc2e70b4d20e6
[ "Apache-2.0" ]
null
null
null
tests/pytorch_tests/layer_tests/base_pytorch_layer_test.py
reuvenperetz/model_optimization
40de02d56750ee4cc20e693da63bc2e70b4d20e6
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Sony Semiconductors Israel, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
47.616327
114
0.661924
import operator from typing import List, Any, Tuple import numpy as np import torch from torch.nn import Hardswish, Hardsigmoid, ReLU, Hardtanh, ReLU6, LeakyReLU, PReLU, SiLU, Softmax, \ Sigmoid, Softplus, Softsign, Tanh from torch.nn.functional import hardswish, hardsigmoid, relu, hardtanh, relu6, le...
true
true
f722ef5194b3bd55287cc22de9904dd969534850
1,056
py
Python
zoo_app/serializers.py
sh4rpy/zoo_api
77c2788141fb6f25f8e5d1de7137653a153d7c3d
[ "BSD-3-Clause" ]
null
null
null
zoo_app/serializers.py
sh4rpy/zoo_api
77c2788141fb6f25f8e5d1de7137653a153d7c3d
[ "BSD-3-Clause" ]
null
null
null
zoo_app/serializers.py
sh4rpy/zoo_api
77c2788141fb6f25f8e5d1de7137653a153d7c3d
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from .models import Employee, ZooPlace, AnimalType, Animal class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = '__all__' class ZooPlaceSerializer(serializers.ModelSerializer): animal_count = serializers.ReadOnly...
30.171429
116
0.744318
from rest_framework import serializers from .models import Employee, ZooPlace, AnimalType, Animal class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = '__all__' class ZooPlaceSerializer(serializers.ModelSerializer): animal_count = serializers.ReadOnly...
true
true
f722f040f81bc0fb6a9bae04a6e256d003b49696
1,509
py
Python
test/python/testpipeline/testentity.py
malywonsz/txtai
ace1b04161062430887eb2153961abcd819a5afb
[ "Apache-2.0" ]
1
2020-09-18T14:11:34.000Z
2020-09-18T14:11:34.000Z
test/python/testpipeline/testentity.py
aria1991/txtai
fa342a4f6a69fb1e2cea0e85e39915f055ee8503
[ "Apache-2.0" ]
47
2021-10-02T22:48:03.000Z
2021-12-29T02:36:20.000Z
test/python/testpipeline/testentity.py
aria1991/txtai
fa342a4f6a69fb1e2cea0e85e39915f055ee8503
[ "Apache-2.0" ]
null
null
null
""" Entity module tests """ import unittest from txtai.pipeline import Entity class TestEntity(unittest.TestCase): """ Entity tests. """ @classmethod def setUpClass(cls): """ Create entity instance. """ cls.entity = Entity("dslim/bert-base-NER") def testEnt...
27.436364
144
0.626243
import unittest from txtai.pipeline import Entity class TestEntity(unittest.TestCase): @classmethod def setUpClass(cls): cls.entity = Entity("dslim/bert-base-NER") def testEntity(self): entities = self.entity("Canada's last fully intact ice shelf has suddenly collapsed, form...
true
true
f722f0934122b5e398fdeb44779b23cdbd091cd8
564
py
Python
steps/migrations/0006_auto_20170827_2213.py
arusyonok/speakup
8094ce1d6c7e122ec0de82b3a4daeda7ac2a4f41
[ "Apache-2.0" ]
null
null
null
steps/migrations/0006_auto_20170827_2213.py
arusyonok/speakup
8094ce1d6c7e122ec0de82b3a4daeda7ac2a4f41
[ "Apache-2.0" ]
null
null
null
steps/migrations/0006_auto_20170827_2213.py
arusyonok/speakup
8094ce1d6c7e122ec0de82b3a4daeda7ac2a4f41
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-27 19:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('steps', '0005_auto_20170827_1925'), ] operations =...
25.636364
125
0.656028
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('steps', '0005_auto_20170827_1925'), ] operations = [ migrations.AlterField( model_name='exercise', ...
true
true
f722f0fc36b243187aa8d44062fc7d80514e6c8e
1,892
py
Python
src/command_modules/azure-cli-keyvault/setup.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-keyvault/setup.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-keyvault/setup.py
enterstudio/azure-cli
b0504c3b634e17f1afc944a9572864a40da6bc18
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
30.516129
94
0.592495
from codecs import open from setuptools import setup VERSION = '0.1.1b3+dev' CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Pr...
true
true
f722f183360b21031a113892752701feb5e37dee
2,189
py
Python
src/protocol/on_chain_info_request.py
hvuhsg/yoyocoin
aad0f413479728dc4e0842447cf1910e5dff1418
[ "MIT" ]
11
2021-05-25T07:42:27.000Z
2022-01-03T07:46:38.000Z
src/protocol/on_chain_info_request.py
hvuhsg/yoyocoin
aad0f413479728dc4e0842447cf1910e5dff1418
[ "MIT" ]
18
2021-05-25T17:42:46.000Z
2021-09-13T15:14:38.000Z
src/protocol/on_chain_info_request.py
hvuhsg/yoyocoin
aad0f413479728dc4e0842447cf1910e5dff1418
[ "MIT" ]
5
2021-06-23T17:38:51.000Z
2022-03-03T12:40:53.000Z
""" Handle chain info request if chain info request is initiated the handler will execute those steps: 1. validate message 2. get chain info and summery 3. publish chain info and get cid 4. send the cid and summery """ from typing import Tuple from blockchain import Blockchain from network.ipfs import Node, Message f...
33.676923
94
0.664687
from typing import Tuple from blockchain import Blockchain from network.ipfs import Node, Message from .handler import Handler class ChainInfoRequestHandler(Handler): topic = "chain-request" topic_response = "chain-response" def __init__(self): self.node = Node.get_instance() def validate(...
true
true
f722f1fd3b4d30624e6d89fa16d82222e5c6995c
2,500
py
Python
whatsapp_alex.py
Tycho-02/studentmotivator-inator
6c50d79127cca1a88bf2f2df58a0f451f41abe9d
[ "MIT" ]
1
2021-03-17T13:09:15.000Z
2021-03-17T13:09:15.000Z
whatsapp_alex.py
Tycho-02/studentmotivator-inator
6c50d79127cca1a88bf2f2df58a0f451f41abe9d
[ "MIT" ]
null
null
null
whatsapp_alex.py
Tycho-02/studentmotivator-inator
6c50d79127cca1a88bf2f2df58a0f451f41abe9d
[ "MIT" ]
null
null
null
#ontwikkeld door S1118551 #We sturen in deze file een whatsapp bericht naar gebruiker wanner die wakker is geworden met de taken die hem te wachten staan op deze dag. #mocht de gebruiker geen taak hebben op die dag, dan krijgt die een melding dat die goed bezig was de afgelopen dag #Dit is een koppeling met subsyste...
37.878788
210
0.7568
import os from twilio.rest import Client import mysql.connector mydb = mysql.connector.connect( host="vserver385.axc.nl", user="tychogp385_ipmedt5", passwd="ipmedt5", database="tychogp385_ipmedt5" ) taken = [] mycursor = mydb.cursor() sql_select_Query = "select title, omschrijving from tak...
true
true
f722f3e0a4d7b7f162d149e2b77f4d6ca1bb7d1c
347
py
Python
pythonFiles/tests/run_all.py
alexvy86/vscode-python
de625369b59ff3928859cd6beec0cb296eab493c
[ "MIT" ]
null
null
null
pythonFiles/tests/run_all.py
alexvy86/vscode-python
de625369b59ff3928859cd6beec0cb296eab493c
[ "MIT" ]
null
null
null
pythonFiles/tests/run_all.py
alexvy86/vscode-python
de625369b59ff3928859cd6beec0cb296eab493c
[ "MIT" ]
null
null
null
import os.path import sys import pytest TEST_ROOT = os.path.dirname(__file__) SRC_ROOT = os.path.dirname(TEST_ROOT) DATASCIENCE_ROOT = os.path.join(SRC_ROOT, 'datascience') if __name__ == '__main__': sys.path.insert(1, DATASCIENCE_ROOT) ec = pytest.main([ '--rootdir', SRC_ROOT, TEST_ROOT, ...
18.263158
56
0.665706
import os.path import sys import pytest TEST_ROOT = os.path.dirname(__file__) SRC_ROOT = os.path.dirname(TEST_ROOT) DATASCIENCE_ROOT = os.path.join(SRC_ROOT, 'datascience') if __name__ == '__main__': sys.path.insert(1, DATASCIENCE_ROOT) ec = pytest.main([ '--rootdir', SRC_ROOT, TEST_ROOT, ...
true
true
f722f45b5c1cb9a003331a5fca823ab307245999
456
py
Python
data/scripts/templates/object/static/space/debris/shared_cargo_destroyed_large_a.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/static/space/debris/shared_cargo_destroyed_large_a.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/static/space/debris/shared_cargo_destroyed_large_a.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/space/debris/shared_cargo_destroyed_large_a.iff" result.attribute_templ...
26.823529
82
0.730263
true
true
f722f6308a91977c4089757947509ab92b935a5f
138
py
Python
trace.py
jvicu2001/GGeoTrace
7796daaa505586cf7b867e321aa528f5dd64a8c6
[ "MIT" ]
null
null
null
trace.py
jvicu2001/GGeoTrace
7796daaa505586cf7b867e321aa528f5dd64a8c6
[ "MIT" ]
null
null
null
trace.py
jvicu2001/GGeoTrace
7796daaa505586cf7b867e321aa528f5dd64a8c6
[ "MIT" ]
null
null
null
import socket """ TODO Custom implementation of traceroute It will only return data needed for the rest of the program (ip and time) """
17.25
73
0.76087
import socket
true
true
f722f672f7f943a9cc28fff66f5c11bb56a0d78c
4,146
py
Python
benchmark/startQiskit_Class2285.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class2285.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class2285.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=39 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
34.264463
140
0.646165
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: l...
true
true
f722f68671210fad50d8f791d2f07c23952265c7
3,483
py
Python
coveragecalc/fields.py
myu-wp/coveragecalc
e2fac3baba3f240c8d776f7d28331899333a05c2
[ "MIT" ]
null
null
null
coveragecalc/fields.py
myu-wp/coveragecalc
e2fac3baba3f240c8d776f7d28331899333a05c2
[ "MIT" ]
2
2017-12-01T22:28:15.000Z
2017-12-11T17:10:31.000Z
coveragecalc/fields.py
myu-wp/coveragecalc
e2fac3baba3f240c8d776f7d28331899333a05c2
[ "MIT" ]
null
null
null
import numpy as np OUTPUTS = [ 'primary phone is valid', 'primary phone to name', 'primary phone to address', 'primary phone line type', 'primary phone is prepaid', 'primary phone is commercial', 'primary address is valid', 'primary address diagnostic', 'primary address to name', ...
27.864
89
0.588286
import numpy as np OUTPUTS = [ 'primary phone is valid', 'primary phone to name', 'primary phone to address', 'primary phone line type', 'primary phone is prepaid', 'primary phone is commercial', 'primary address is valid', 'primary address diagnostic', 'primary address to name', ...
true
true
f722f728e24b6a6184391e65e7e980e2d7ffd119
566
py
Python
torch_glow/tests/nodes/floor_test.py
aksingh-fb/glow
c50603a1885c9bffd935fbd1c7c10766b062cef9
[ "Apache-2.0" ]
1
2021-04-10T09:05:08.000Z
2021-04-10T09:05:08.000Z
torch_glow/tests/nodes/floor_test.py
aksingh-fb/glow
c50603a1885c9bffd935fbd1c7c10766b062cef9
[ "Apache-2.0" ]
null
null
null
torch_glow/tests/nodes/floor_test.py
aksingh-fb/glow
c50603a1885c9bffd935fbd1c7c10766b062cef9
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import torch from tests import utils class SimpleFloorModule(torch.nn.Module): def forward(self, a, b): c = a + b return torch.floor(c) class TestFloor(unittest.TestCase): def test_floor(self...
23.583333
82
0.64841
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import torch from tests import utils class SimpleFloorModule(torch.nn.Module): def forward(self, a, b): c = a + b return torch.floor(c) class TestFloor(unittest.TestCase): def test_floor(self...
true
true
f722f91702759297291a44f2edab97ddb2be4884
3,957
py
Python
src/rest.py
thibaultyou/grid-bot
9c360c00ec3e87eb639fb5e2ee755d2dec77bcc9
[ "MIT" ]
4
2022-03-06T03:51:03.000Z
2022-03-08T14:19:31.000Z
src/rest.py
thibaultyou/grid-bot
9c360c00ec3e87eb639fb5e2ee755d2dec77bcc9
[ "MIT" ]
null
null
null
src/rest.py
thibaultyou/grid-bot
9c360c00ec3e87eb639fb5e2ee755d2dec77bcc9
[ "MIT" ]
null
null
null
import logging import time from threading import Thread from src.events import CREATE_LIMIT_ORDER, CREATE_MARKET_ORDER, GRID_INIT, GRID_RESET, ORDERS, POSITION, REMOVE_ALL_LIMIT_ORDERS, REMOVE_LIMIT_ORDER, REMOVE_MARKET_ORDER from src.sessions import SESSIONS, get_session class RestWorker: def start(sel...
57.347826
188
0.468789
import logging import time from threading import Thread from src.events import CREATE_LIMIT_ORDER, CREATE_MARKET_ORDER, GRID_INIT, GRID_RESET, ORDERS, POSITION, REMOVE_ALL_LIMIT_ORDERS, REMOVE_LIMIT_ORDER, REMOVE_MARKET_ORDER from src.sessions import SESSIONS, get_session class RestWorker: def start(sel...
true
true
f722f9d0617429fd42b883604d1c256fe2b1edf7
52,903
py
Python
src/commands.py
hyper-neutrino/bots-reforged
cbb4d34f2e40d460301077c8d58d3619e71f4406
[ "MIT" ]
null
null
null
src/commands.py
hyper-neutrino/bots-reforged
cbb4d34f2e40d460301077c8d58d3619e71f4406
[ "MIT" ]
null
null
null
src/commands.py
hyper-neutrino/bots-reforged
cbb4d34f2e40d460301077c8d58d3619e71f4406
[ "MIT" ]
null
null
null
import asyncio, datetime, discord, json, pycountry, random, re, requests, time, traceback from aioconsole import ainput from word2number import w2n from client import * from datamanager import config, del_data, get_data, has_data, mod_data, set_data, batch_set_data from discordutils import * from league import * as...
49.029657
331
0.638508
import asyncio, datetime, discord, json, pycountry, random, re, requests, time, traceback from aioconsole import ainput from word2number import w2n from client import * from datamanager import config, del_data, get_data, has_data, mod_data, set_data, batch_set_data from discordutils import * from league import * as...
true
true
f722fb3d7cbf83a809ebb0d0351a924f41916c3e
3,491
py
Python
src/cfehome/settings.py
kuntalbanik/channels-rapid
797939f3dc62d8b9424517ce6e4d3ea946330669
[ "MIT" ]
null
null
null
src/cfehome/settings.py
kuntalbanik/channels-rapid
797939f3dc62d8b9424517ce6e4d3ea946330669
[ "MIT" ]
null
null
null
src/cfehome/settings.py
kuntalbanik/channels-rapid
797939f3dc62d8b9424517ce6e4d3ea946330669
[ "MIT" ]
null
null
null
""" Django settings for cfehome project. Generated by 'django-admin startproject' using Django 2.0.7. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os #...
26.052239
91
0.679461
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'em-9$ln6^a0z!s2pbo=mu*l$cgnqgsyd_z21f-%2d(_h7*wu^0' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.cont...
true
true
f722fbdc8a2912619c3582d0d56c9652a27d6fb1
7,839
py
Python
addition-subtractor.py
rapirent/DSAI-HW3
ee83990f511049b8d53be5765040ab2068af6c3f
[ "MIT" ]
1
2020-06-12T17:24:26.000Z
2020-06-12T17:24:26.000Z
addition-subtractor.py
kuoteng/Arithmetic-Operation-Seq2Seq
ee83990f511049b8d53be5765040ab2068af6c3f
[ "MIT" ]
null
null
null
addition-subtractor.py
kuoteng/Arithmetic-Operation-Seq2Seq
ee83990f511049b8d53be5765040ab2068af6c3f
[ "MIT" ]
null
null
null
# coding: utf-8 from keras.models import Sequential from keras import layers import numpy as np import matplotlib.pyplot as plt from six.moves import range import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--data_size', default='45000') parser.add_argument('--train_size', default='400...
31.231076
115
0.638985
from keras.models import Sequential from keras import layers import numpy as np import matplotlib.pyplot as plt from six.moves import range import os import argparse parser = argparse.ArgumentParser() parser.add_argument('--data_size', default='45000') parser.add_argument('--train_size', default='40000') parser.add...
true
true
f722fd5eb426dd588840264e173ac746d19da740
782
py
Python
examples/Graph_Neural_Networks/PyTorch/TrimmedGCN.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
300
2020-08-09T04:27:41.000Z
2022-03-30T07:43:41.000Z
examples/Graph_Neural_Networks/PyTorch/TrimmedGCN.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
5
2020-11-05T06:16:50.000Z
2021-12-11T05:05:22.000Z
examples/Graph_Neural_Networks/PyTorch/TrimmedGCN.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
51
2020-09-23T15:37:12.000Z
2022-03-05T01:28:56.000Z
#!/usr/bin/env python # coding: utf-8 import torch import graphgallery print("GraphGallery version: ", graphgallery.__version__) print("Torch version: ", torch.__version__) ''' Load Datasets - cora/citeseer/pubmed ''' from graphgallery.datasets import NPZDataset data = NPZDataset('cora', root="~/GraphData/datasets/"...
30.076923
95
0.774936
import torch import graphgallery print("GraphGallery version: ", graphgallery.__version__) print("Torch version: ", torch.__version__) from graphgallery.datasets import NPZDataset data = NPZDataset('cora', root="~/GraphData/datasets/", verbose=False, transform='standardize') graph = data.graph splits = data.split_...
true
true
f722fdd93e7acefd5b4367b293047080207962d1
1,255
py
Python
tmtrader/exchange_for_backtest/order_manager.py
reouno/tomatorader
b781206051129fa59439a0f314f4f1ed647a6852
[ "MIT" ]
null
null
null
tmtrader/exchange_for_backtest/order_manager.py
reouno/tomatorader
b781206051129fa59439a0f314f4f1ed647a6852
[ "MIT" ]
null
null
null
tmtrader/exchange_for_backtest/order_manager.py
reouno/tomatorader
b781206051129fa59439a0f314f4f1ed647a6852
[ "MIT" ]
null
null
null
from typing import List from tmtrader.entity.order import BasicOrder, FilledBasicOrder from tmtrader.entity.trade import Trade class OrderManager: def __init__(self): self.__open_orders: List[BasicOrder] = list() self.__filled_orders: List[FilledBasicOrder] = list() # TODO: refactor and ...
29.186047
66
0.700398
from typing import List from tmtrader.entity.order import BasicOrder, FilledBasicOrder from tmtrader.entity.trade import Trade class OrderManager: def __init__(self): self.__open_orders: List[BasicOrder] = list() self.__filled_orders: List[FilledBasicOrder] = list() self.__cance...
true
true
f722fdf903135f2143fb5c022bd33aa1336afbd0
2,464
py
Python
_Tkinter/Tkinter_Count.py
meigrafd/Sample-Code
7065950dfd0728cfad66db08327f0efa4c26999c
[ "MIT" ]
10
2017-02-08T18:36:09.000Z
2021-03-31T04:22:25.000Z
_Tkinter/Tkinter_Count.py
meigrafd/Sample-Code
7065950dfd0728cfad66db08327f0efa4c26999c
[ "MIT" ]
2
2017-01-30T22:15:43.000Z
2017-09-01T21:49:29.000Z
_Tkinter/Tkinter_Count.py
meigrafd/Sample-Code
7065950dfd0728cfad66db08327f0efa4c26999c
[ "MIT" ]
8
2017-02-09T12:33:47.000Z
2021-04-03T13:34:33.000Z
#!/usr/bin/python3 # coding: utf-8 from tkinter import * BGCOLOR="#229" def Hochzaehlen(event=None): sollwert.set(sollwert.get() + 1) def Runterzaehlen(event=None): sollwert.set(sollwert.get() - 1) def Bestaetigen(): bestaetigen = "Eingestellter Sollwert " + str(sollwert.get()) confirm_label.config(...
32.421053
116
0.719968
from tkinter import * BGCOLOR="#229" def Hochzaehlen(event=None): sollwert.set(sollwert.get() + 1) def Runterzaehlen(event=None): sollwert.set(sollwert.get() - 1) def Bestaetigen(): bestaetigen = "Eingestellter Sollwert " + str(sollwert.get()) confirm_label.config(text=bestaetigen) confirmed.s...
true
true
f722fe1c14cd8415ba73037f18d4be1f4ad2e409
26,156
py
Python
core/tests/test_utils_test.py
WebFlakyTest/oppia
520e35490eae8171beb035fbafc2948983abec75
[ "Apache-2.0" ]
1
2021-08-17T20:33:12.000Z
2021-08-17T20:33:12.000Z
core/tests/test_utils_test.py
WebFlakyTest/oppia
520e35490eae8171beb035fbafc2948983abec75
[ "Apache-2.0" ]
null
null
null
core/tests/test_utils_test.py
WebFlakyTest/oppia
520e35490eae8171beb035fbafc2948983abec75
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 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...
37.365714
80
0.639586
from __future__ import absolute_import from __future__ import unicode_literals import logging import os import re from constants import constants from core import jobs from core.domain import auth_domain from core.domain import param_domain from core.domain import taskqueue_services from core.pla...
true
true
f722ff12e66d16156c8166bda9a96d2df4ee4890
1,298
py
Python
nuqql/main.py
hwipl/nuqql
410ea5bd42e455d656b1b34612c3b0d5a0b433ef
[ "MIT" ]
3
2019-04-15T18:33:36.000Z
2019-04-21T19:18:10.000Z
nuqql/main.py
hwipl/nuqql
410ea5bd42e455d656b1b34612c3b0d5a0b433ef
[ "MIT" ]
15
2019-04-15T18:35:56.000Z
2019-09-14T08:24:32.000Z
nuqql/main.py
hwipl/nuqql
410ea5bd42e455d656b1b34612c3b0d5a0b433ef
[ "MIT" ]
1
2019-06-16T12:00:30.000Z
2019-06-16T12:00:30.000Z
""" Main part of nuqql. """ import logging import os import signal import nuqql.backend import nuqql.config import nuqql.ui logger = logging.getLogger(__name__) # main loop of nuqql def main_loop() -> str: """ Main loop of nuqql. """ logger.debug("entering main loop") try: # init and s...
18.542857
67
0.62943
import logging import os import signal import nuqql.backend import nuqql.config import nuqql.ui logger = logging.getLogger(__name__) def main_loop() -> str: logger.debug("entering main loop") try: nuqql.backend.start_backends() while nuqql.ui.handle_input(): ...
true
true
f722ff3452399253037f413b93a7d0b032a1be3d
672
py
Python
tests/test_main.py
jleclanche/filetime
4e3f7925e04713a507adcfe7e8a3ef20601ef5e4
[ "CC0-1.0" ]
3
2019-05-27T07:19:11.000Z
2021-12-13T10:43:19.000Z
tests/test_main.py
jleclanche/filetime
4e3f7925e04713a507adcfe7e8a3ef20601ef5e4
[ "CC0-1.0" ]
null
null
null
tests/test_main.py
jleclanche/filetime
4e3f7925e04713a507adcfe7e8a3ef20601ef5e4
[ "CC0-1.0" ]
null
null
null
from datetime import datetime from filetime import from_datetime, to_datetime, utc def test_from_datetime(): assert from_datetime(datetime(2009, 7, 25, 23, 0)) == 128930364000000000 assert from_datetime(datetime(1970, 1, 1, 0, 0, tzinfo=utc)) == 116444736000000000 assert from_datetime(datetime(1970, 1, 1, 0, 0)) ...
39.529412
83
0.745536
from datetime import datetime from filetime import from_datetime, to_datetime, utc def test_from_datetime(): assert from_datetime(datetime(2009, 7, 25, 23, 0)) == 128930364000000000 assert from_datetime(datetime(1970, 1, 1, 0, 0, tzinfo=utc)) == 116444736000000000 assert from_datetime(datetime(1970, 1, 1, 0, 0)) ...
true
true
f722ffb63bb529cdb1455c71ea254e0a5d9284e9
1,988
py
Python
day3/solution.py
hejnal/advent-of-code
bc16ea8f34914a5c384705cf41784e85ba145e78
[ "Apache-2.0" ]
null
null
null
day3/solution.py
hejnal/advent-of-code
bc16ea8f34914a5c384705cf41784e85ba145e78
[ "Apache-2.0" ]
null
null
null
day3/solution.py
hejnal/advent-of-code
bc16ea8f34914a5c384705cf41784e85ba145e78
[ "Apache-2.0" ]
null
null
null
#!/bin/python def is_valid_triangle(edges): assert len(edges) == 3, "input should have 3 edges" if edges[0] + edges[1] > edges[2] and edges[0] + edges[2] > edges[1] and edges[1] + edges[2] > edges[0]: return True else: return False def main(): response = is_valid_triangle([5, 10, 25])...
32.064516
108
0.572938
def is_valid_triangle(edges): assert len(edges) == 3, "input should have 3 edges" if edges[0] + edges[1] > edges[2] and edges[0] + edges[2] > edges[1] and edges[1] + edges[2] > edges[0]: return True else: return False def main(): response = is_valid_triangle([5, 10, 25]) assert r...
true
true
f7230013f9c80b482251c11ef79e9fb011a259bc
973
py
Python
pretalx_youtube/migrations/0001_initial.py
pretalx/pretalx-youtube
f5a5ae9c9c2d9e3e1e2bb4a6d3e18e970449a96b
[ "Apache-2.0" ]
1
2022-02-09T21:47:34.000Z
2022-02-09T21:47:34.000Z
pretalx_youtube/migrations/0001_initial.py
pretalx/pretalx-youtube
f5a5ae9c9c2d9e3e1e2bb4a6d3e18e970449a96b
[ "Apache-2.0" ]
1
2022-03-09T18:32:10.000Z
2022-03-09T18:32:10.000Z
pretalx_youtube/migrations/0001_initial.py
pretalx/pretalx-youtube
f5a5ae9c9c2d9e3e1e2bb4a6d3e18e970449a96b
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.4 on 2021-12-15 01:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ("submission", "0062_cfp_settings_data"), ] operations = [ migrations.CreateModel( ...
26.297297
76
0.458376
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ("submission", "0062_cfp_settings_data"), ] operations = [ migrations.CreateModel( name="YouTubeLink", fields=[ ...
true
true
f723014eabd8d19ad1683343d7ed261670ddb067
545
py
Python
papery/site/views.py
radonlab/papery
1ec8d844adb8cc76cd9ca86a7e5b13a2d1f8967a
[ "MIT" ]
null
null
null
papery/site/views.py
radonlab/papery
1ec8d844adb8cc76cd9ca86a7e5b13a2d1f8967a
[ "MIT" ]
null
null
null
papery/site/views.py
radonlab/papery
1ec8d844adb8cc76cd9ca86a7e5b13a2d1f8967a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Copyright (C) 2015, Radmon. Use of this source code is governed by the MIT license that can be found in the LICENSE file. """ from flask import render_template from ..auth import auth from ..blog import blog def index(): return render_template('site/index.html') def about(): ret...
20.961538
66
0.699083
from flask import render_template from ..auth import auth from ..blog import blog def index(): return render_template('site/index.html') def about(): return render_template('site/about.html') def init_app(app): app.add_url_rule('/', 'site.index', index) app.add_url_rule('/about', 'site.about', a...
true
true
f72301b2c63fbdc40c6edfa65c2949f6ab6b9a05
1,352
py
Python
prover.py
hv10/reverseengineering1819
caf9d9f3d5fc685c062378ebd1a92a8cdd4032e6
[ "MIT" ]
1
2019-12-01T18:22:20.000Z
2019-12-01T18:22:20.000Z
prover.py
hv10/reverseengineering1819
caf9d9f3d5fc685c062378ebd1a92a8cdd4032e6
[ "MIT" ]
null
null
null
prover.py
hv10/reverseengineering1819
caf9d9f3d5fc685c062378ebd1a92a8cdd4032e6
[ "MIT" ]
1
2019-03-14T09:52:16.000Z
2019-03-14T09:52:16.000Z
import unittest from functools import wraps def score_with(score): def decorator(fn): def decorated(*args,**kwargs): ret = fn(*args,**kwargs) if ret: args[0].__class__._increase_score(score) return ret return decorated return dec...
28.166667
68
0.588757
import unittest from functools import wraps def score_with(score): def decorator(fn): def decorated(*args,**kwargs): ret = fn(*args,**kwargs) if ret: args[0].__class__._increase_score(score) return ret return decorated return dec...
true
true
f72301c71bd7efaf6b7a84fe61d922d45b74dd15
551
py
Python
mapping/model/jeffreys.py
syanga/model-augmented-mutual-information
a7c0ccb3b32320e9c45c266d668a879e240d39e3
[ "MIT" ]
2
2021-06-10T05:45:16.000Z
2021-11-06T11:44:42.000Z
mapping/model/jeffreys.py
syanga/model-augmented-mutual-information
a7c0ccb3b32320e9c45c266d668a879e240d39e3
[ "MIT" ]
null
null
null
mapping/model/jeffreys.py
syanga/model-augmented-mutual-information
a7c0ccb3b32320e9c45c266d668a879e240d39e3
[ "MIT" ]
null
null
null
""" Jeffreys divergences """ import torch def jeffreys_normal(mu1, lv1, mu2, lv2): mu1, lv1 = mu1.view(mu1.shape[0], -1), lv1.view(lv1.shape[0], -1) mu2, lv2 = mu2.view(mu2.shape[0], -1), lv2.view(lv2.shape[0], -1) return (0.25*((-lv1).exp() + (-lv2).exp())*(mu1-mu2)**2 + 0.25*((lv1-lv2).exp() + (lv2-lv1)...
36.733333
120
0.54265
import torch def jeffreys_normal(mu1, lv1, mu2, lv2): mu1, lv1 = mu1.view(mu1.shape[0], -1), lv1.view(lv1.shape[0], -1) mu2, lv2 = mu2.view(mu2.shape[0], -1), lv2.view(lv2.shape[0], -1) return (0.25*((-lv1).exp() + (-lv2).exp())*(mu1-mu2)**2 + 0.25*((lv1-lv2).exp() + (lv2-lv1).exp()) - 0.5).sum(dim=1) d...
true
true
f723022a8a5c862ecf4cb3104f070a25c4cbcdc8
2,101
py
Python
tests/models/v2/rule_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/v2/rule_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/v2/rule_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
55.289474
845
0.764874
import unittest from netapp.santricity.models.v2.rule import Rule class RuleTest(unittest.TestCase): def test_rule(self): rule_obj = Rule() self.assertNotEqual(rule_obj, None)
true
true
f72302a14d482273d46aa7948834d33039045a14
3,594
py
Python
app/main/views/verify.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
null
null
null
app/main/views/verify.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
null
null
null
app/main/views/verify.py
alphagov/notify-admin-frontend
70f2a6a97aefe2432d7a3b54dc1555c030dd3693
[ "MIT" ]
null
null
null
import json from flask import ( abort, current_app, flash, redirect, render_template, session, url_for, ) from itsdangerous import SignatureExpired from notifications_utils.url_safe_token import check_token from app import user_api_client from app.main import main from app.main.forms impor...
32.378378
109
0.698943
import json from flask import ( abort, current_app, flash, redirect, render_template, session, url_for, ) from itsdangerous import SignatureExpired from notifications_utils.url_safe_token import check_token from app import user_api_client from app.main import main from app.main.forms impor...
true
true
f723039db00b27262888fac5433c80f9b006121c
858
py
Python
setup.py
Ricyteach/dxf2shapely
fc6de4e05cbb77e77a5866afdb69cc817bb67027
[ "MIT" ]
null
null
null
setup.py
Ricyteach/dxf2shapely
fc6de4e05cbb77e77a5866afdb69cc817bb67027
[ "MIT" ]
null
null
null
setup.py
Ricyteach/dxf2shapely
fc6de4e05cbb77e77a5866afdb69cc817bb67027
[ "MIT" ]
null
null
null
from setuptools import setup requirements = ['ezdxf', 'shapely'] setup_requirements = ['pytest-runner', ] test_requirements = ['pytest'] setup( classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', ...
29.586207
131
0.664336
from setuptools import setup requirements = ['ezdxf', 'shapely'] setup_requirements = ['pytest-runner', ] test_requirements = ['pytest'] setup( classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', ...
true
true
f723040bf6d789d7bdbfc25e4410c4d49ac627b7
20,859
py
Python
datasets/openslr/openslr.py
PierreColombo/datasets
c22ec7e64edb6596a6ff5894712dea4dc5441de8
[ "Apache-2.0" ]
1
2021-07-29T06:28:28.000Z
2021-07-29T06:28:28.000Z
datasets/openslr/openslr.py
norabelrose/datasets
b0511c65b32d1103d34cb5ac9ffb50e9cf387843
[ "Apache-2.0" ]
null
null
null
datasets/openslr/openslr.py
norabelrose/datasets
b0511c65b32d1103d34cb5ac9ffb50e9cf387843
[ "Apache-2.0" ]
1
2021-05-04T16:54:23.000Z
2021-05-04T16:54:23.000Z
# coding=utf-8 # Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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/lice...
42.569388
234
0.608706
from __future__ import absolute_import, division, print_function import os import re from pathlib import Path import datasets _DATA_URL = "https://openslr.org/resources/{}" _CITATION = """\ SLR35, SLR36: @inproceedings{kjartansson-etal-sltu2018, title = {{Crowd-Sourced Speech Corpora for Javanes...
true
true
f72304d340d02f0fda30bcdf157dff94ff2f8baa
1,752
py
Python
openstack_dashboard/test/jasmine/jasmine.py
timpricecatalyst/horizon
8279ae0ed464e62e1c91e78341342160f8a07172
[ "Apache-2.0" ]
930
2015-01-04T08:06:03.000Z
2022-03-13T18:47:13.000Z
openstack_dashboard/test/jasmine/jasmine.py
timpricecatalyst/horizon
8279ae0ed464e62e1c91e78341342160f8a07172
[ "Apache-2.0" ]
106
2019-01-18T03:06:55.000Z
2019-11-29T05:06:18.000Z
openstack_dashboard/test/jasmine/jasmine.py
timpricecatalyst/horizon
8279ae0ed464e62e1c91e78341342160f8a07172
[ "Apache-2.0" ]
1,040
2015-01-01T18:48:28.000Z
2022-03-19T08:35:18.000Z
# # (c) Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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 ...
34.352941
75
0.651256
import inspect import sys import django.shortcuts import django.views.defaults def dispatcher(request, test_name): from openstack_dashboard.test.jasmine import jasmine_tests as tests classes = inspect.getmembers(sys.modules[tests.__name__], inspect.is...
true
true
f72305c4b33988bbf84766ce64ecc1d5889f907b
10,006
py
Python
train/pytorch-train/crnn_main.py
yyong119/EE208-Teamproject
4cfecbf83981d89a98e811fcc7eefa9134036c43
[ "MIT" ]
null
null
null
train/pytorch-train/crnn_main.py
yyong119/EE208-Teamproject
4cfecbf83981d89a98e811fcc7eefa9134036c43
[ "MIT" ]
null
null
null
train/pytorch-train/crnn_main.py
yyong119/EE208-Teamproject
4cfecbf83981d89a98e811fcc7eefa9134036c43
[ "MIT" ]
5
2018-06-25T10:48:56.000Z
2021-01-12T06:12:38.000Z
# -*- coding: utf-8 -*- from __future__ import print_function import argparse import random import torch import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data from torch.autograd import Variable import numpy as np from warpctc_pytorch import CTCLoss import os import utils ...
36.385455
128
0.646112
from __future__ import print_function import argparse import random import torch import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data from torch.autograd import Variable import numpy as np from warpctc_pytorch import CTCLoss import os import utils import dataset from ke...
true
true
f72306b88c537cc8bdfae44f211f93ef1cbe9d3a
475
py
Python
vedadet/misc/bbox/assigners/__init__.py
jie311/vedadet
aaf3b3bc3c7944aba1cc28138165d403023a9152
[ "Apache-2.0" ]
549
2020-01-02T05:14:57.000Z
2022-03-29T18:34:12.000Z
vedadet/misc/bbox/assigners/__init__.py
jie311/vedadet
aaf3b3bc3c7944aba1cc28138165d403023a9152
[ "Apache-2.0" ]
98
2020-01-21T09:41:30.000Z
2022-03-12T00:53:06.000Z
vedadet/misc/bbox/assigners/__init__.py
jie311/vedadet
aaf3b3bc3c7944aba1cc28138165d403023a9152
[ "Apache-2.0" ]
233
2020-01-18T03:46:27.000Z
2022-03-19T03:17:47.000Z
from .approx_max_iou_assigner import ApproxMaxIoUAssigner from .assign_result import AssignResult from .atss_assigner import ATSSAssigner from .base_assigner import BaseAssigner from .center_region_assigner import CenterRegionAssigner from .max_iou_assigner import MaxIoUAssigner from .point_assigner import PointAssigne...
36.538462
77
0.835789
from .approx_max_iou_assigner import ApproxMaxIoUAssigner from .assign_result import AssignResult from .atss_assigner import ATSSAssigner from .base_assigner import BaseAssigner from .center_region_assigner import CenterRegionAssigner from .max_iou_assigner import MaxIoUAssigner from .point_assigner import PointAssigne...
true
true
f72307576e0edce787b49d3a64c9a3b339e49912
4,644
py
Python
source_extraction.py
cebarbosa/summer_project_hydra
386a01253d92075ff00396229e83caf44eed07a3
[ "MIT" ]
null
null
null
source_extraction.py
cebarbosa/summer_project_hydra
386a01253d92075ff00396229e83caf44eed07a3
[ "MIT" ]
null
null
null
source_extraction.py
cebarbosa/summer_project_hydra
386a01253d92075ff00396229e83caf44eed07a3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on 28/10/2017 @author: Carlos Eduardo Barbosa Detection of sources in data and separation of bins prior to Voronoi tesselation """ from __future__ import division, print_function import os import pyregion import numpy as np from astropy.io import fits from astropy.convolution im...
35.181818
78
0.639104
from __future__ import division, print_function import os import pyregion import numpy as np from astropy.io import fits from astropy.convolution import Gaussian2DKernel, convolve from astropy.table import Table import matplotlib.pyplot as plt from astropy.stats import SigmaClip from photutils.background import Backg...
true
true
f7230872635c2b1a194e34f4a501f57c0621b597
4,793
py
Python
chapt03/listing310.py
ohlogic/PythonOpenGLSuperBible7Glut
6100359da13f8ef94070cf4d8818de31fc72cf65
[ "MIT" ]
1
2021-12-22T11:45:38.000Z
2021-12-22T11:45:38.000Z
chapt03/listing310.py
ohlogic/PythonOpenGLSuperBible7Glut
6100359da13f8ef94070cf4d8818de31fc72cf65
[ "MIT" ]
1
2020-02-01T03:50:20.000Z
2020-02-01T03:52:03.000Z
chapt03/listing310.py
ohlogic/PythonOpenGLSuperBible7Glut
6100359da13f8ef94070cf4d8818de31fc72cf65
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Copyright © 2012-2015 Graham Sellers # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify...
25.094241
83
0.638431
import sys import time fullscreen = True try: from OpenGL.GLUT import * from OpenGL.GL import * from OpenGL.GLU import * except: print (''' ERROR: PyOpenGL not installed properly. ''') sys.exit() from math import cos, sin vertex_shader_source = ''' #versi...
true
true
f72308dbe1714573180f73ead6dbb0749b0d73a2
1,913
py
Python
tests/functional/libraries/test_lua.py
carlbrown/needy
5a70726c9846f86a88be896ec39740296d503835
[ "MIT" ]
65
2015-07-21T01:40:17.000Z
2019-06-10T10:46:28.000Z
tests/functional/libraries/test_lua.py
bittorrent/needy
31e57ad09d5fc22126e10b735c586262a50139d7
[ "MIT" ]
110
2015-07-21T01:41:40.000Z
2017-01-18T23:13:30.000Z
tests/functional/libraries/test_lua.py
bittorrent/needy
31e57ad09d5fc22126e10b735c586262a50139d7
[ "MIT" ]
4
2015-07-20T02:45:43.000Z
2016-07-31T21:48:39.000Z
import json import os import sys from ..functional_test import TestCase class LuaTest(TestCase): def test_satisfy_from_source(self): with open(os.path.join(self.path(), 'needs.json'), 'w') as needs_file: needs_file.write(json.dumps({ 'libraries': { 'lua': {...
43.477273
143
0.48092
import json import os import sys from ..functional_test import TestCase class LuaTest(TestCase): def test_satisfy_from_source(self): with open(os.path.join(self.path(), 'needs.json'), 'w') as needs_file: needs_file.write(json.dumps({ 'libraries': { 'lua': {...
true
true
f7230a0700ec0f71e3df6dba98dec207b83c834b
876
py
Python
lib/googlecloudsdk/api_lib/datastore/constants.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/googlecloudsdk/api_lib/datastore/constants.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/googlecloudsdk/api_lib/datastore/constants.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2017 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 requir...
38.086957
74
0.768265
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals DEFAULT_NAMESPACE = '(default)'
true
true
f7230b0b25991ce2d65383489baf50b9ebc9effb
5,416
py
Python
src/programy/config/file/json_file.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
null
null
null
src/programy/config/file/json_file.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
null
null
null
src/programy/config/file/json_file.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
4
2019-04-01T15:42:23.000Z
2020-11-05T08:14:27.000Z
""" Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, m...
40.721805
122
0.693501
import json from programy.utils.logging.ylogger import YLogger from programy.config.file.file import BaseConfigurationFile from programy.config.programy import ProgramyConfiguration from programy.utils.substitutions.substitues import Substitutions class JSONConfigurationFile(BaseConfigurationFile): def __init_...
true
true
f7230c6242e45502a884e52bfeedc92cf49212a1
2,362
py
Python
core/storage/audit/gae_models.py
aman-roy/oppia
0e7066829b59bf6ce4b15c4723fe0398721cfd1a
[ "Apache-2.0" ]
2
2019-12-02T18:56:49.000Z
2020-03-14T17:14:15.000Z
core/storage/audit/gae_models.py
aman-roy/oppia
0e7066829b59bf6ce4b15c4723fe0398721cfd1a
[ "Apache-2.0" ]
2
2019-09-11T23:11:48.000Z
2019-11-29T06:04:52.000Z
core/storage/audit/gae_models.py
aman-roy/oppia
0e7066829b59bf6ce4b15c4723fe0398721cfd1a
[ "Apache-2.0" ]
2
2019-12-02T18:56:56.000Z
2020-03-16T08:03:45.000Z
# coding: utf-8 # # Copyright 2017 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...
35.787879
78
0.720576
from __future__ import absolute_import from __future__ import unicode_literals from core.platform import models import feconf from google.appengine.ext import ndb (base_models,) = models.Registry.import_models([models.NAMES.base_model]) class RoleQueryAuditModel(base_models.BaseModel): ...
true
true
f7230caf121b3c4569353e8905f16b1c0196377f
545
py
Python
Modules/my_list/__init__.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
Modules/my_list/__init__.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
Modules/my_list/__init__.py
guilhermebaos/Curso-em-Video-Python
0e67f6f59fa3216889bd2dde4a26b532c7c545fd
[ "MIT" ]
null
null
null
# Manter Ordem Alfabética def join_list(lst, string=', '): """ :param lst: List to be joined :param string: String that will be used to join the items in the list :return: List after being converted into a string """ lst = str(string).join(str(x) for x in lst) return lst def unique_list(...
23.695652
73
0.616514
def join_list(lst, string=', '): lst = str(string).join(str(x) for x in lst) return lst def unique_list(lst): to_eliminate = [] for c, item in enumerate(lst): if lst.index(item) != c: to_eliminate += [c] to_eliminate.sort(reverse=True) for c in to_eliminate: lst....
true
true
f7230cb93d1f301c186795e3936835d13ed751db
2,856
py
Python
examples/common/async_twisted_client_serial.py
sumpfralle/pymodbus
fbdc470ae3e138c50e3659ec4ec8ebf39df58936
[ "BSD-3-Clause" ]
1
2021-01-07T01:04:55.000Z
2021-01-07T01:04:55.000Z
examples/common/async_twisted_client_serial.py
sumpfralle/pymodbus
fbdc470ae3e138c50e3659ec4ec8ebf39df58936
[ "BSD-3-Clause" ]
null
null
null
examples/common/async_twisted_client_serial.py
sumpfralle/pymodbus
fbdc470ae3e138c50e3659ec4ec8ebf39df58936
[ "BSD-3-Clause" ]
2
2020-12-11T19:44:35.000Z
2022-03-29T02:24:32.000Z
#!/usr/bin/env python """ Pymodbus Asynchronous Client Examples -------------------------------------------------------------------------- The following is an example of how to use the asynchronous serial modbus client implementation from pymodbus with twisted. """ from twisted.internet import reactor from pymodbus.c...
32.827586
78
0.602941
from twisted.internet import reactor from pymodbus.client.asynchronous import schedulers from pymodbus.client.asynchronous.serial import AsyncModbusSerialClient from pymodbus.client.asynchronous.twisted import ModbusClientProtocol import logging logging.basicConfig() log = logging.getLogger("pymodbus") log.setLevel(...
true
true
f7230d49bc264b22acf7895aca19ce722423ce65
1,495
py
Python
website/addons/osfstorage/logs.py
lbanner/osf.io
1898ef0ff8bd91713e94c60e7463b5f81ac62caa
[ "Apache-2.0" ]
null
null
null
website/addons/osfstorage/logs.py
lbanner/osf.io
1898ef0ff8bd91713e94c60e7463b5f81ac62caa
[ "Apache-2.0" ]
1
2019-08-16T13:45:12.000Z
2019-08-16T13:45:12.000Z
website/addons/osfstorage/logs.py
lbanner/osf.io
1898ef0ff8bd91713e94c60e7463b5f81ac62caa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 def build_log_urls(node, path): url = node.web_url_for( 'addon_view_or_download_file', path=path, provider='osfstorage' ) return { 'view': url, 'download': url + '?action=download' } class OsfStorageNodeLogger(object): ...
28.75
81
0.564548
def build_log_urls(node, path): url = node.web_url_for( 'addon_view_or_download_file', path=path, provider='osfstorage' ) return { 'view': url, 'download': url + '?action=download' } class OsfStorageNodeLogger(object): def __init__(self, node, auth, pat...
true
true
f7230d57dbfb6edde771c92b8109ff68260dfdc4
2,412
py
Python
DVWA/bsqli/medium.py
cwinfosec/practice
c0010258799aa5c9f9e5cccec2ba8515b8424771
[ "MIT" ]
1
2020-10-03T07:57:42.000Z
2020-10-03T07:57:42.000Z
DVWA/bsqli/medium.py
cwinfosec/practice
c0010258799aa5c9f9e5cccec2ba8515b8424771
[ "MIT" ]
null
null
null
DVWA/bsqli/medium.py
cwinfosec/practice
c0010258799aa5c9f9e5cccec2ba8515b8424771
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import requests import string import sys import urllib """ POST /vulnerabilities/sqli_blind/ HTTP/1.1 Host: lab User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Accept-Language: en...
29.414634
115
0.63267
import requests import string import sys import urllib urlencode = urllib.parse.quote def loop_inject(original_inject): letters = ''.join(string.ascii_letters + string.digits + string.punctuation) for char in letters: edit_inject = original_inject.replace("CHAR", str(ord(char))) burp_ur...
true
true
f7230d9cc74110fcd7eacb880b7388d767c4d9d2
13,781
py
Python
veros/setups/north_atlantic/north_atlantic.py
AkasDutta/veros
9f530596a0148a398829050017de3e01a71261a0
[ "MIT" ]
115
2019-11-23T02:31:30.000Z
2022-03-29T12:58:30.000Z
veros/setups/north_atlantic/north_atlantic.py
AkasDutta/veros
9f530596a0148a398829050017de3e01a71261a0
[ "MIT" ]
207
2019-11-21T13:21:22.000Z
2022-03-31T23:36:09.000Z
veros/setups/north_atlantic/north_atlantic.py
AkasDutta/veros
9f530596a0148a398829050017de3e01a71261a0
[ "MIT" ]
21
2020-01-28T13:13:39.000Z
2022-02-02T13:46:33.000Z
#!/usr/bin/env python import os import h5netcdf from PIL import Image import scipy.spatial import scipy.ndimage from veros import VerosSetup, veros_routine, veros_kernel, KernelOutput from veros.variables import Variable from veros.core.operators import numpy as npx, update, at import veros.tools BASE_PATH = os.pat...
38.387187
118
0.550468
import os import h5netcdf from PIL import Image import scipy.spatial import scipy.ndimage from veros import VerosSetup, veros_routine, veros_kernel, KernelOutput from veros.variables import Variable from veros.core.operators import numpy as npx, update, at import veros.tools BASE_PATH = os.path.dirname(os.path.rea...
true
true
f7230dd63cf79e81165f8294c83a6dba0d2b76c3
4,380
py
Python
init2winit/mt_eval/main.py
google/init2winit
62ec9fd31bd7b38bb7c220f15d4187bf0706506d
[ "Apache-2.0" ]
32
2021-05-15T01:03:44.000Z
2022-03-31T10:54:48.000Z
init2winit/mt_eval/main.py
google/init2winit
62ec9fd31bd7b38bb7c220f15d4187bf0706506d
[ "Apache-2.0" ]
31
2021-05-20T08:03:40.000Z
2022-03-31T10:27:42.000Z
init2winit/mt_eval/main.py
google/init2winit
62ec9fd31bd7b38bb7c220f15d4187bf0706506d
[ "Apache-2.0" ]
6
2021-05-20T06:10:04.000Z
2022-03-31T18:55:04.000Z
# coding=utf-8 # Copyright 2021 The init2winit Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
35.322581
80
0.712557
import json import os import sys from absl import app from absl import flags from absl import logging from init2winit import hyperparameters from init2winit.dataset_lib import datasets from init2winit.model_lib import models from init2winit.mt_eval import bleu_evaluator import jax import tensorflow.com...
true
true
f7230ef54d1dddee1a53f3db76cced7857db9283
1,316
py
Python
coldtype/tool.py
goodhertz/coldtype
2460b66abb28e9532f9e2b55167ae565f95366e7
[ "Apache-2.0" ]
142
2020-06-12T17:01:58.000Z
2022-03-16T23:21:37.000Z
coldtype/tool.py
goodhertz/coldtype
2460b66abb28e9532f9e2b55167ae565f95366e7
[ "Apache-2.0" ]
35
2020-04-15T15:34:54.000Z
2022-03-19T20:26:47.000Z
coldtype/tool.py
goodhertz/coldtype
2460b66abb28e9532f9e2b55167ae565f95366e7
[ "Apache-2.0" ]
14
2020-06-23T18:56:46.000Z
2022-03-31T15:54:56.000Z
from coldtype.geometry.rect import Rect def parse_inputs(inputs, defaults): defaults["rect"] = [ Rect(1080, 1080), lambda xs: Rect([int(x) for x in xs.split(",")])] defaults["preview_only"] = [False, bool] defaults["log"] = [False, bool] parsed = {} if not isinstance(inputs, dict...
27.416667
57
0.410334
from coldtype.geometry.rect import Rect def parse_inputs(inputs, defaults): defaults["rect"] = [ Rect(1080, 1080), lambda xs: Rect([int(x) for x in xs.split(",")])] defaults["preview_only"] = [False, bool] defaults["log"] = [False, bool] parsed = {} if not isinstance(inputs, dict...
true
true
f7230f80da0d79443d06cfb13653f105a7f36777
9,565
py
Python
pyfpt/numerics/is_simulation.py
Jacks0nJ/Importance-Sampling-Code
f41fac451e9f78ab2130600ca83e1a6406ee43a5
[ "Apache-2.0" ]
null
null
null
pyfpt/numerics/is_simulation.py
Jacks0nJ/Importance-Sampling-Code
f41fac451e9f78ab2130600ca83e1a6406ee43a5
[ "Apache-2.0" ]
null
null
null
pyfpt/numerics/is_simulation.py
Jacks0nJ/Importance-Sampling-Code
f41fac451e9f78ab2130600ca83e1a6406ee43a5
[ "Apache-2.0" ]
null
null
null
''' Importance Sampling Simulation ------------------------------ This is the main module of the PyFPT code, as it runs the simulations, post processes and exports the data ready for plotting. ''' from timeit import default_timer as timer import multiprocessing as mp from multiprocessing import Process, Queue import ...
40.876068
79
0.634919
from timeit import default_timer as timer import multiprocessing as mp from multiprocessing import Process, Queue import numpy as np from .multi_processing_error import multi_processing_error from .histogram_data_truncation import histogram_data_truncation from .save_data_to_file import save_data_to_file from .data_...
true
true
f72310316e69d5f9f95c4cfbe7fc3e21754a4391
1,029
py
Python
ledger.py
HaeckelK/bookkeeping
6f8b62f1322fe1c409f397222653382d302d9754
[ "MIT" ]
null
null
null
ledger.py
HaeckelK/bookkeeping
6f8b62f1322fe1c409f397222653382d302d9754
[ "MIT" ]
7
2021-06-30T12:05:47.000Z
2021-07-14T07:50:27.000Z
ledger.py
HaeckelK/bookkeeping
6f8b62f1322fe1c409f397222653382d302d9754
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import List import numpy as np class Ledger(ABC): @abstractmethod def get_next_batch_id(self) -> int: """Return next available batch id.""" @abstractmethod def get_next_transaction_id(self) -> int: """Return next available transaction i...
27.078947
81
0.616132
from abc import ABC, abstractmethod from typing import List import numpy as np class Ledger(ABC): @abstractmethod def get_next_batch_id(self) -> int: @abstractmethod def get_next_transaction_id(self) -> int: class PandasLedger(Ledger): def get_next_batch_id(self) -> int: try: ...
true
true
f72310a1ea315b6aa985cf62ca1415bc2658bfc2
1,843
py
Python
mne/datasets/kiloword/kiloword.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2021-01-04T08:45:56.000Z
2021-05-19T12:25:59.000Z
mne/datasets/kiloword/kiloword.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
28
2020-05-07T00:58:34.000Z
2020-08-29T23:02:17.000Z
mne/datasets/kiloword/kiloword.py
fmamashli/mne-python
52f064415e7c9fa8fe243d22108dcdf3d86505b9
[ "BSD-3-Clause" ]
3
2019-01-28T13:48:00.000Z
2019-07-10T16:02:11.000Z
# License: BSD Style. from ...utils import verbose from ..utils import _data_path, _get_version, _version_doc @verbose def data_path(path=None, force_update=False, update_path=True, download=True, verbose=None): """ Get path to local copy of the kiloword dataset. This is the dataset from [...
33.509091
79
0.661964
from ...utils import verbose from ..utils import _data_path, _get_version, _version_doc @verbose def data_path(path=None, force_update=False, update_path=True, download=True, verbose=None): return _data_path(path=path, force_update=force_update, update_path=update_path, name=...
true
true
f723117022eb914a0585fd58463edf8df6b3fddf
653
py
Python
utils/src/utils/service_area.py
RoboHubEindhoven/suii_control
312114ca878d8659e04a1ae8f1cfe7454dd9d060
[ "BSD-3-Clause" ]
null
null
null
utils/src/utils/service_area.py
RoboHubEindhoven/suii_control
312114ca878d8659e04a1ae8f1cfe7454dd9d060
[ "BSD-3-Clause" ]
null
null
null
utils/src/utils/service_area.py
RoboHubEindhoven/suii_control
312114ca878d8659e04a1ae8f1cfe7454dd9d060
[ "BSD-3-Clause" ]
null
null
null
import yaml class ServiceArea(yaml.YAMLObject): yaml_loader = yaml.SafeLoader yaml_tag = u'!ServiceArea' def __init__(self, area_type, area_name, instance_id, description, orientation_id = None, orientation_name = None, position = None, orientation = None): self.area_type = area_type ...
40.8125
156
0.635528
import yaml class ServiceArea(yaml.YAMLObject): yaml_loader = yaml.SafeLoader yaml_tag = u'!ServiceArea' def __init__(self, area_type, area_name, instance_id, description, orientation_id = None, orientation_name = None, position = None, orientation = None): self.area_type = area_type ...
true
true
f723119ca64212a227a145c49f797065bce9bf36
379
py
Python
examples/fast_api/app.py
e-kor/yappa
1ea3c4e6a5ffb7a3fbd02d810a62f73a13b9d649
[ "MIT" ]
41
2021-07-15T14:54:16.000Z
2022-03-26T10:59:40.000Z
examples/fast_api/app.py
e-kor/yappa
1ea3c4e6a5ffb7a3fbd02d810a62f73a13b9d649
[ "MIT" ]
29
2021-08-04T08:04:26.000Z
2021-08-19T09:50:30.000Z
examples/fast_api/app.py
e-kor/yappa
1ea3c4e6a5ffb7a3fbd02d810a62f73a13b9d649
[ "MIT" ]
3
2021-07-23T14:56:40.000Z
2022-03-24T16:09:55.000Z
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() @app.get('/') def main(): return 'root url' @app.get('/json') def json(): return { "result": "json", "sub_result": {"sub": "json"} } class Request(BaseModel): id: int body: str @app.po...
13.535714
41
0.567282
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() @app.get('/') def main(): return 'root url' @app.get('/json') def json(): return { "result": "json", "sub_result": {"sub": "json"} } class Request(BaseModel): id: int body: str @app.po...
true
true
f72311e46251fe6bd12e2879f883751994698f50
6,895
py
Python
app/adminpanel/urls.py
prapeller/chinesebreak_django_drf
48679bd67027a29eefc3c2e408d08fe2dff3ce0a
[ "MIT" ]
null
null
null
app/adminpanel/urls.py
prapeller/chinesebreak_django_drf
48679bd67027a29eefc3c2e408d08fe2dff3ce0a
[ "MIT" ]
null
null
null
app/adminpanel/urls.py
prapeller/chinesebreak_django_drf
48679bd67027a29eefc3c2e408d08fe2dff3ce0a
[ "MIT" ]
null
null
null
from django.urls import path from adminpanel.views import (index, WordCreateView, WordListView, WordUpdateView, WordDeleteView, GrammarCreateView, GrammarListView, GrammarUpdateView, GrammarDeleteView, LangCreateView, LangListVi...
68.95
115
0.658013
from django.urls import path from adminpanel.views import (index, WordCreateView, WordListView, WordUpdateView, WordDeleteView, GrammarCreateView, GrammarListView, GrammarUpdateView, GrammarDeleteView, LangCreateView, LangListVi...
true
true
f723120659cd05c6e7b6ba54ecc282693e50d44a
4,157
py
Python
object_detection/pytorch/tools/test_net.py
lamyiowce/training
da4c959b5a7b65091b850872cdd4014d768c087c
[ "Apache-2.0" ]
567
2018-09-13T05:07:49.000Z
2020-11-23T11:52:11.000Z
object_detection/pytorch/tools/test_net.py
lamyiowce/training
da4c959b5a7b65091b850872cdd4014d768c087c
[ "Apache-2.0" ]
222
2018-09-14T10:15:39.000Z
2020-11-20T22:21:09.000Z
object_detection/pytorch/tools/test_net.py
ltechkorea/mlperf-training
498b945dd914573bdbf7a871eaeebd9388b60b76
[ "Apache-2.0" ]
279
2018-09-16T12:40:29.000Z
2020-11-17T14:22:52.000Z
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
37.45045
114
0.718547
from maskrcnn_benchmark.utils.env import setup_environment import argparse import os import torch from maskrcnn_benchmark.config import cfg from maskrcnn_benchmark.data import make_data_loader from maskrcnn_benchmark.engine.inference import inference from maskrcnn_benchmark.modeling.detector import ...
true
true
f72312f03eb453b8f96cce81038cab6260ed892a
3,125
py
Python
backend/task/models.py
crowdbotics-apps/mediku-29462
d8940002577bc39984ea5ed4367d0aaa68238ae0
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/task/models.py
crowdbotics-apps/mediku-29462
d8940002577bc39984ea5ed4367d0aaa68238ae0
[ "FTL", "AML", "RSA-MD" ]
27
2021-08-08T20:40:05.000Z
2021-10-06T01:54:51.000Z
backend/task/models.py
crowdbotics-apps/mediku-29462
d8940002577bc39984ea5ed4367d0aaa68238ae0
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.conf import settings from django.db import models class TaskTransaction(models.Model): "Generated Model" status = models.CharField( max_length=10, ) timestamp_completed = models.DateTimeField( null=True, blank=True, ) task = models.ForeignKey( "task....
24.038462
47
0.61984
from django.conf import settings from django.db import models class TaskTransaction(models.Model): status = models.CharField( max_length=10, ) timestamp_completed = models.DateTimeField( null=True, blank=True, ) task = models.ForeignKey( "task.Task", null=Tr...
true
true
f7231384b31af5980487157a907ab2c53e33945b
35,093
py
Python
pytorch_transformers/tokenization_xlm.py
clinia/K-Adapter
7f46ae48d7941e519fb40ae62ac46e62115faaf5
[ "MIT" ]
98
2020-12-26T04:47:03.000Z
2022-03-31T06:06:53.000Z
all_exp/kadapter/examples/pytorch_transformers/tokenization_xlm.py
yifan-h/GCS_KI
5d5c68832aa37cefb1d01723c35fc3d74482c8c2
[ "MIT" ]
15
2020-11-30T09:57:09.000Z
2022-03-30T13:56:43.000Z
all_exp/kadapter/examples/pytorch_transformers/tokenization_xlm.py
yifan-h/GCS_KI
5d5c68832aa37cefb1d01723c35fc3d74482c8c2
[ "MIT" ]
23
2020-10-30T06:07:24.000Z
2022-03-30T22:26:33.000Z
# coding=utf-8 # Copyright 2019 The Open AI Team Authors and The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
44.142138
185
0.413558
from __future__ import (absolute_import, division, print_function, unicode_literals) import json import logging import os import re import sys import unicodedata from io import open import sacremoses as sm from .tokenization_utils import PreTrainedTokenizer from .tokenization_be...
true
true
f72314b5ed81d84350466ae17742bdd5ed9d6af1
115,105
py
Python
AutoScaleALL.py
TheDosah/AutoScale
8975513d770fdff06c376ad17297cd7bcc63030c
[ "UPL-1.0" ]
null
null
null
AutoScaleALL.py
TheDosah/AutoScale
8975513d770fdff06c376ad17297cd7bcc63030c
[ "UPL-1.0" ]
null
null
null
AutoScaleALL.py
TheDosah/AutoScale
8975513d770fdff06c376ad17297cd7bcc63030c
[ "UPL-1.0" ]
null
null
null
#!/home/opc/py36env/bin/python ################################################################################################################# # OCI - Scheduled Auto Scaling Script # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is licensed to you under the Universal Pe...
66.960442
338
0.468694
try: response = analytics.scale_analytics_instance(analytics_instance_id=resource.identifier, scale_analytics_instance_details=details) Retry = False success.append(" - Initiat...
true
true
f72314bffd466950af85d5cfd1e7aca8dcb3c114
2,130
py
Python
nintendeals/noa/api/algolia.py
Pooroomoo/nintendeals
993f4d159ff405ed82cd2bb023c7b75d921d0acb
[ "MIT" ]
37
2020-04-30T13:48:02.000Z
2022-03-09T04:55:54.000Z
nintendeals/noa/api/algolia.py
Pooroomoo/nintendeals
993f4d159ff405ed82cd2bb023c7b75d921d0acb
[ "MIT" ]
4
2020-05-09T03:17:44.000Z
2021-04-28T00:53:55.000Z
nintendeals/noa/api/algolia.py
Pooroomoo/nintendeals
993f4d159ff405ed82cd2bb023c7b75d921d0acb
[ "MIT" ]
5
2020-07-22T06:42:27.000Z
2022-02-07T22:35:57.000Z
from typing import Iterator, Optional from algoliasearch.search_client import SearchClient from nintendeals.commons.enumerates import Platforms APP_ID = "U3B6GR4UA3" API_KEY = "c4da8be7fd29f0f5bfa42920b0a99dc7" INDEX_NAME = "ncom_game_en_us" INDEX = None PLATFORMS = { Platforms.NINTENDO_3DS: "Nintendo 3DS", ...
21.734694
78
0.631455
from typing import Iterator, Optional from algoliasearch.search_client import SearchClient from nintendeals.commons.enumerates import Platforms APP_ID = "U3B6GR4UA3" API_KEY = "c4da8be7fd29f0f5bfa42920b0a99dc7" INDEX_NAME = "ncom_game_en_us" INDEX = None PLATFORMS = { Platforms.NINTENDO_3DS: "Nintendo 3DS", ...
true
true
f72314c8dbffd0d7e7aa5f6a9597732183754bb7
3,262
py
Python
yatube/yatube/settings.py
TopcuoH/Yatube
8f970863cac9a380d37918a80ccc80e7d3e3bb8f
[ "BSD-3-Clause" ]
null
null
null
yatube/yatube/settings.py
TopcuoH/Yatube
8f970863cac9a380d37918a80ccc80e7d3e3bb8f
[ "BSD-3-Clause" ]
null
null
null
yatube/yatube/settings.py
TopcuoH/Yatube
8f970863cac9a380d37918a80ccc80e7d3e3bb8f
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for yatube project. Generated by 'django-admin startproject' using Django 2.2.19. 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 #...
25.888889
91
0.696812
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'hueqoy8@&b21ty0-(w_!@%*&##8%rn6!=e+0h)nyi$&*rbcopd' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'posts.apps.PostsConfig', # Добавленная запись 'django.contrib.admin', ...
true
true
f72315a3756903ad9bc3a96587225537f9bf97cd
603
py
Python
tests/agents/test_gpc.py
vvanirudh/deluca
673e66038547db90a7b23335cfe7508728076a4d
[ "Apache-2.0" ]
25
2020-10-27T19:10:36.000Z
2022-01-04T14:34:29.000Z
tests/agents/test_gpc.py
vvanirudh/deluca
673e66038547db90a7b23335cfe7508728076a4d
[ "Apache-2.0" ]
5
2020-10-15T00:52:30.000Z
2021-01-18T18:42:40.000Z
tests/agents/test_gpc.py
vvanirudh/deluca
673e66038547db90a7b23335cfe7508728076a4d
[ "Apache-2.0" ]
5
2020-12-04T23:12:13.000Z
2021-06-26T12:38:06.000Z
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
40.2
74
0.759536
true
true
f723165ba6a75461f7b45d6169d0437a41afef33
3,094
py
Python
analytics/settings.py
moemosaad/DjYamosaWebsite
79b5528b0f5cb617231aca50eefcb4a2837086ac
[ "MIT" ]
null
null
null
analytics/settings.py
moemosaad/DjYamosaWebsite
79b5528b0f5cb617231aca50eefcb4a2837086ac
[ "MIT" ]
null
null
null
analytics/settings.py
moemosaad/DjYamosaWebsite
79b5528b0f5cb617231aca50eefcb4a2837086ac
[ "MIT" ]
null
null
null
""" Django settings for DjYamosa project. Generated by 'django-admin startproject' using Django 2.1.7. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os ...
25.570248
91
0.694893
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '449k7&ayn!ds)p#=c_+v4p%48ca&og=n8+ocex=p&q$fg$b+=#' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.content...
true
true
f723169d1f5bcd6c14f9e7dcb7f292f96f8606c2
3,314
py
Python
views.py
cartologic/cartoview_esri_app_starter
dca4649fe0200e9b9b709293697a5807a405f6d1
[ "Apache-2.0" ]
null
null
null
views.py
cartologic/cartoview_esri_app_starter
dca4649fe0200e9b9b709293697a5807a405f6d1
[ "Apache-2.0" ]
null
null
null
views.py
cartologic/cartoview_esri_app_starter
dca4649fe0200e9b9b709293697a5807a405f6d1
[ "Apache-2.0" ]
null
null
null
import json import re from string import rstrip from urlparse import urljoin from django.http import HttpResponseRedirect from django.shortcuts import render from cartoview.app_manager.models import * from forms import BasicAppForm from geonode import settings from .models import * APP_NAME = 'cartoview_esri_app_sta...
31.264151
106
0.673808
import json import re from string import rstrip from urlparse import urljoin from django.http import HttpResponseRedirect from django.shortcuts import render from cartoview.app_manager.models import * from forms import BasicAppForm from geonode import settings from .models import * APP_NAME = 'cartoview_esri_app_sta...
true
true
f72316a939081794a0a3bc72714dad3bdabb1b10
2,878
py
Python
tc_gan/networks/tests/test_tuning_curve.py
ahmadianlab/tc-gan
06c549e8ae74bc6af62fddeed698565ea1f548c5
[ "MIT" ]
4
2019-06-04T08:15:43.000Z
2020-10-03T13:59:15.000Z
tc_gan/networks/tests/test_tuning_curve.py
ahmadianlab/tc-gan
06c549e8ae74bc6af62fddeed698565ea1f548c5
[ "MIT" ]
null
null
null
tc_gan/networks/tests/test_tuning_curve.py
ahmadianlab/tc-gan
06c549e8ae74bc6af62fddeed698565ea1f548c5
[ "MIT" ]
null
null
null
import numpy as np import pytest from ...core import consume_config from ..cwgan import ConditionalTuningCurveGenerator from ..ssn import emit_tuning_curve_generator, ssn_type_choices from ..wgan import DEFAULT_PARAMS from .test_euler_ssn import JDS TEST_PARAMS = dict( DEFAULT_PARAMS, # Stimulator: num_tc...
27.409524
75
0.652884
import numpy as np import pytest from ...core import consume_config from ..cwgan import ConditionalTuningCurveGenerator from ..ssn import emit_tuning_curve_generator, ssn_type_choices from ..wgan import DEFAULT_PARAMS from .test_euler_ssn import JDS TEST_PARAMS = dict( DEFAULT_PARAMS, num_tcdom=10, n...
true
true
f7231a116ed9f09ae68969561b1b23aa5374e682
14,609
py
Python
tensorboard/plugins/core/core_plugin_test.py
manivaradarajan/tensorboard
c1c7cbd665b1da025f9b23adae8ba41d2890d424
[ "Apache-2.0" ]
1
2017-08-28T08:12:14.000Z
2017-08-28T08:12:14.000Z
tensorboard/plugins/core/core_plugin_test.py
lanpa/tensorboard
6ba7155a614cf1cfab97f8ec7c561adb0a609b0d
[ "Apache-2.0" ]
16
2017-08-31T05:13:08.000Z
2020-07-09T03:22:14.000Z
tensorboard/plugins/core/core_plugin_test.py
lanpa/tensorboard
6ba7155a614cf1cfab97f8ec7c561adb0a609b0d
[ "Apache-2.0" ]
1
2020-08-03T20:21:35.000Z
2020-08-03T20:21:35.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
37.945455
88
0.628517
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections.abc import contextlib import json import os import six import zipfile try: from unittest import mock except ImportError: import mock import tensorflow as tf f...
true
true
f7231aa7882c5a7b70caf14173f985b835db854c
6,685
py
Python
RestApi/Python/SampleScripts/LoadSavedConfigFile/LoadConfigFileEvalStats_5G.py
karmoham/IxLoad
f8076796fee04b13fc672fb58ad4ed956db5d0d6
[ "MIT" ]
10
2018-03-01T11:41:01.000Z
2022-02-22T18:05:34.000Z
RestApi/Python/SampleScripts/LoadSavedConfigFile/LoadConfigFileEvalStats_5G.py
karmoham/IxLoad
f8076796fee04b13fc672fb58ad4ed956db5d0d6
[ "MIT" ]
5
2018-11-02T07:46:51.000Z
2021-05-24T16:30:29.000Z
RestApi/Python/SampleScripts/LoadSavedConfigFile/LoadConfigFileEvalStats_5G.py
karmoham/IxLoad
f8076796fee04b13fc672fb58ad4ed956db5d0d6
[ "MIT" ]
12
2018-05-08T19:38:57.000Z
2022-02-01T19:14:51.000Z
# Description # A sample Python REST API script to: # - Load a saved configuration file # - Run traffic # - Get stats and evaluate for user defined expected stat values. # - Get test result # # - For IxLoad Gateway running in Windows only. Linux Gateway is not supported at this time. # - This...
36.530055
116
0.706058
import os, sys, time, signal, traceback, platform currentDir = os.path.abspath(os.path.dirname(__file__)) if platform.system() == 'Windows': sys.path.insert(0, (currentDir.replace('SampleScripts\\LoadSavedConfigFile', 'Modules'))) else: sys.path.insert(0, (currentDir.replace('SampleScript...
true
true
f7231bd8d0e0d5858827428b813f77eb1621f255
24,092
py
Python
django_mongoengine/mongo_admin/options.py
Betalos/django-mongoengine
99a7a2cfc142bfb74f7bed23161e97cffc2c0205
[ "BSD-3-Clause" ]
null
null
null
django_mongoengine/mongo_admin/options.py
Betalos/django-mongoengine
99a7a2cfc142bfb74f7bed23161e97cffc2c0205
[ "BSD-3-Clause" ]
null
null
null
django_mongoengine/mongo_admin/options.py
Betalos/django-mongoengine
99a7a2cfc142bfb74f7bed23161e97cffc2c0205
[ "BSD-3-Clause" ]
null
null
null
import operator from functools import reduce, partial from django import forms from django.forms.formsets import all_valid from django.urls import reverse from django.contrib.admin.exceptions import DisallowedModelAdminToField from django.contrib.admin import widgets, helpers from django.contrib.admin.utils import ( ...
40.972789
156
0.638677
import operator from functools import reduce, partial from django import forms from django.forms.formsets import all_valid from django.urls import reverse from django.contrib.admin.exceptions import DisallowedModelAdminToField from django.contrib.admin import widgets, helpers from django.contrib.admin.utils import ( ...
true
true
f7231cca10950bdf68f2ae42faed1754e83b258a
652
py
Python
bravepatcher/patcher/MemorySearch.py
maxisoft/BravePatcher
b745567297460eb6a7d8567eb3707cc14cc9d66f
[ "MIT" ]
3
2021-11-11T23:10:59.000Z
2022-02-05T09:14:15.000Z
bravepatcher/patcher/MemorySearch.py
maxisoft/BravePatcher
b745567297460eb6a7d8567eb3707cc14cc9d66f
[ "MIT" ]
3
2021-01-12T21:31:18.000Z
2021-11-11T23:12:02.000Z
bravepatcher/patcher/MemorySearch.py
maxisoft/BravePatcher
b745567297460eb6a7d8567eb3707cc14cc9d66f
[ "MIT" ]
null
null
null
import re from ..pattern.Pattern import Pattern from .exceptions import (MemorySearchNotFoundException, MemorySearchTooManyMatchException) class MemorySearch: def __init__(self, memory: bytes): self.memory = memory def find_pattern(self, pattern: Pattern) -> re.Match: ...
29.636364
78
0.630368
import re from ..pattern.Pattern import Pattern from .exceptions import (MemorySearchNotFoundException, MemorySearchTooManyMatchException) class MemorySearch: def __init__(self, memory: bytes): self.memory = memory def find_pattern(self, pattern: Pattern) -> re.Match: ...
true
true
f7231ee03b215c0cb929c791fa2e3255ae82ab06
1,810
py
Python
models/PCA.py
madcpt/MachineWontLie
992156f3916bafeaa01a3685eae285550391132e
[ "MIT" ]
null
null
null
models/PCA.py
madcpt/MachineWontLie
992156f3916bafeaa01a3685eae285550391132e
[ "MIT" ]
null
null
null
models/PCA.py
madcpt/MachineWontLie
992156f3916bafeaa01a3685eae285550391132e
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.nn import init from torch.utils.data import DataLoader from overrides import overrides import numpy as np import time from models.BaseModel import BaseModel class PCAModel(BaseModel): def __init__(self, configs: object): super().__init__(configs.model.model_na...
35.490196
89
0.670166
import torch from torch import nn from torch.nn import init from torch.utils.data import DataLoader from overrides import overrides import numpy as np import time from models.BaseModel import BaseModel class PCAModel(BaseModel): def __init__(self, configs: object): super().__init__(configs.model.model_na...
true
true
f7231f236ea0911cdecd1c3501b6bbc5111e564b
11,176
py
Python
ptf/tests/bridging.py
daniele-moro/ngsdn-tutorial
c95f6933f0a26a8b5732bdee71d8f5a1d80dcbda
[ "Apache-2.0" ]
null
null
null
ptf/tests/bridging.py
daniele-moro/ngsdn-tutorial
c95f6933f0a26a8b5732bdee71d8f5a1d80dcbda
[ "Apache-2.0" ]
null
null
null
ptf/tests/bridging.py
daniele-moro/ngsdn-tutorial
c95f6933f0a26a8b5732bdee71d8f5a1d80dcbda
[ "Apache-2.0" ]
null
null
null
# Copyright 2013-present Barefoot Networks, Inc. # Copyright 2018-present Open Networking Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
35.479365
80
0.576503
from ptf.testutils import group from base_test import * CPU_CLONE_SESSION_ID = 99 @group("bridging") class ArpNdpRequestWithCloneTest(P4RuntimeTest): def runTest(self): print_inline("ARP request ... ") arp_pkt = testutils.simple_arp_packet() ...
true
true
f7231f3c31bbf1b8dd50af718421432779336757
2,551
py
Python
doctr/models/recognition/predictor/pytorch.py
thentgesMindee/doctr
f97e92ba1b7bcb785a60f2cf549f13f88e510609
[ "Apache-2.0" ]
null
null
null
doctr/models/recognition/predictor/pytorch.py
thentgesMindee/doctr
f97e92ba1b7bcb785a60f2cf549f13f88e510609
[ "Apache-2.0" ]
null
null
null
doctr/models/recognition/predictor/pytorch.py
thentgesMindee/doctr
f97e92ba1b7bcb785a60f2cf549f13f88e510609
[ "Apache-2.0" ]
1
2022-01-27T09:25:05.000Z
2022-01-27T09:25:05.000Z
# Copyright (C) 2021, Mindee. # This program is licensed under the Apache License version 2. # See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details. from typing import Any, List, Tuple, Union import numpy as np import torch from torch import nn from doctr.models.preprocess...
29.662791
108
0.618189
from typing import Any, List, Tuple, Union import numpy as np import torch from torch import nn from doctr.models.preprocessor import PreProcessor from ._utils import remap_preds, split_crops __all__ = ['RecognitionPredictor'] class RecognitionPredictor(nn.Module): def __init__( self, pr...
true
true
f7232002e9161baa044ee70c9064979f5ef015f3
1,562
py
Python
Parsers/mysql/connector/version.py
bopopescu/py-try
2e5638fad47dd4a2ab1f872d76063e405b3cadda
[ "MIT" ]
null
null
null
Parsers/mysql/connector/version.py
bopopescu/py-try
2e5638fad47dd4a2ab1f872d76063e405b3cadda
[ "MIT" ]
null
null
null
Parsers/mysql/connector/version.py
bopopescu/py-try
2e5638fad47dd4a2ab1f872d76063e405b3cadda
[ "MIT" ]
1
2020-07-23T17:44:13.000Z
2020-07-23T17:44:13.000Z
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
41.105263
78
0.744558
VERSION = (2, 0, 4, '', 0) if VERSION[3] and VERSION[4]: VERSION_TEXT = '{0}.{1}.{2}{3}{4}'.format(*VERSION) else: VERSION_TEXT = '{0}.{1}.{2}'.format(*VERSION[0:3]) LICENSE = 'GPLv2 with FOSS License Exception' EDITION = ''
true
true
f72320646603967b7d2c54156d4ac3cb57b612b6
50,455
py
Python
python/ccxt/bitz.py
Huangyi5458/ccxt
1e01d03dac18633eb73998d7cb279535395368e9
[ "MIT" ]
13
2020-11-24T12:15:42.000Z
2022-03-11T00:46:39.000Z
python/ccxt/bitz.py
Huangyi5458/ccxt
1e01d03dac18633eb73998d7cb279535395368e9
[ "MIT" ]
null
null
null
python/ccxt/bitz.py
Huangyi5458/ccxt
1e01d03dac18633eb73998d7cb279535395368e9
[ "MIT" ]
1
2022-01-01T15:54:52.000Z
2022-01-01T15:54:52.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
41.424466
182
0.414012
ge import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.ba...
true
true
f72321b2ef93ed9a3701ed57a938c91891a936c2
117
py
Python
events/admin.py
iosoftworks/locale-backend-v2
bc162ca2ccdf1454c9d25c51a477abe3f4dce665
[ "MIT" ]
null
null
null
events/admin.py
iosoftworks/locale-backend-v2
bc162ca2ccdf1454c9d25c51a477abe3f4dce665
[ "MIT" ]
4
2021-03-19T01:37:07.000Z
2021-06-10T18:55:35.000Z
events/admin.py
iosoftworks/locale-backend-v2
bc162ca2ccdf1454c9d25c51a477abe3f4dce665
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Event # Register your models here. admin.site.register(Event)
16.714286
32
0.794872
from django.contrib import admin from .models import Event admin.site.register(Event)
true
true
f723238c03a819b00d08d86a7b7c1d5463e89447
1,238
py
Python
O(n) on array/change_min.py
boristown/leetcode
2e510b7913653da75cd9d10f1adce4c466e74768
[ "MIT" ]
1
2021-10-04T03:09:51.000Z
2021-10-04T03:09:51.000Z
O(n) on array/change_min.py
boristown/leetcode
2e510b7913653da75cd9d10f1adce4c466e74768
[ "MIT" ]
null
null
null
O(n) on array/change_min.py
boristown/leetcode
2e510b7913653da75cd9d10f1adce4c466e74768
[ "MIT" ]
null
null
null
def change_min_palindrome(s,que): ''' # 在区间内更改最少的元素,使得它不包含长度2以上的回文 # 输入包括一系列区间查询,输出变更区间的最小成本 # 字符串只含有a,b,c #https://codeforces.com/problemset/problem/1555/D #*1600 #输入: s:字符串 que:查询序列,每个查询为(l,r)表示区间范围,坐标从1开始 #返回: ans:每个查询的答案 ''' #分析 #由于不能包含长度2以上的回文,且只有三种字符 #推...
25.265306
54
0.518578
def change_min_palindrome(s,que): pat = ['abc', 'acb', 'bac', 'bca', 'cab', 'cba'] n = len(s) pre = [[0]*(n+1) for _ in range(6)] for k in range(6): for i in range(n): pre[k][i+1]...
true
true
f723267e938751b84d6d2db92446189b8c043af8
2,178
py
Python
0e01.py
ZirconiumX/corsair-re
9487fec931b262a013fb7fee3eaf90d6e67967ad
[ "MIT" ]
7
2017-11-25T19:16:01.000Z
2019-07-24T01:29:39.000Z
0e01.py
Ravenslofty/corsair-re
9487fec931b262a013fb7fee3eaf90d6e67967ad
[ "MIT" ]
3
2018-02-07T07:13:21.000Z
2019-06-25T20:35:45.000Z
0e01.py
Ravenslofty/corsair-re
9487fec931b262a013fb7fee3eaf90d6e67967ad
[ "MIT" ]
2
2018-01-02T10:46:48.000Z
2018-02-07T04:27:30.000Z
#!/usr/bin/python3 devices = {0x40: "K63", 0x17: "K65 RGB", 0x07: "K65", 0x37: "K65 LUX RGB", 0x39: "K65 RAPIDFIRE", 0x3f: "K68 RGB", 0x13: "K70 RGB", 0x09: "K70", 0x33: "K70 LUX RGB", 0x36: "K70 LUX", ...
26.560976
85
0.470615
devices = {0x40: "K63", 0x17: "K65 RGB", 0x07: "K65", 0x37: "K65 LUX RGB", 0x39: "K65 RAPIDFIRE", 0x3f: "K68 RGB", 0x13: "K70 RGB", 0x09: "K70", 0x33: "K70 LUX RGB", 0x36: "K70 LUX", 0x48: "K70 RGB ...
true
true
f72328b4c20a9cd0d89dcd30e484ba7da76bb603
2,643
py
Python
cogs/statistics.py
Tesshin/CS-Pound
8e40f3a144aa6578e87d30aba0d43cb51756ecdf
[ "MIT" ]
null
null
null
cogs/statistics.py
Tesshin/CS-Pound
8e40f3a144aa6578e87d30aba0d43cb51756ecdf
[ "MIT" ]
null
null
null
cogs/statistics.py
Tesshin/CS-Pound
8e40f3a144aa6578e87d30aba0d43cb51756ecdf
[ "MIT" ]
null
null
null
from datetime import datetime import os import platform import sys import time import discord from discord.ext import commands import psutil from constants import Constants from library import resolver start_time = datetime.now() # The time the script started running class Statistics(commands.Cog): def __init...
31.843373
106
0.611805
from datetime import datetime import os import platform import sys import time import discord from discord.ext import commands import psutil from constants import Constants from library import resolver start_time = datetime.now() class Statistics(commands.Cog): def __init__(self, bot): self.bot = bot...
true
true
f7232a5787dd822b8c3d68e006678d905ccc32d0
703
py
Python
Configuration/influx.py
marcosmarcon/Oracle-and-Grafana-integration
0a7f47a940a72b281a9ff04285c222be99516829
[ "MIT", "Unlicense" ]
1
2020-10-09T18:02:11.000Z
2020-10-09T18:02:11.000Z
Configuration/influx.py
marcosmarcon/Oracle-and-Grafana-integration
0a7f47a940a72b281a9ff04285c222be99516829
[ "MIT", "Unlicense" ]
null
null
null
Configuration/influx.py
marcosmarcon/Oracle-and-Grafana-integration
0a7f47a940a72b281a9ff04285c222be99516829
[ "MIT", "Unlicense" ]
null
null
null
from influxdb import InfluxDBClient class InfluxConnection: points = [] def __init__(self): self.points = [] self.host = "host" self.port = "port" self.username = "user" self.password = "pass" self.database = "base" self.client = InfluxDBClient(self.hos...
27.038462
103
0.625889
from influxdb import InfluxDBClient class InfluxConnection: points = [] def __init__(self): self.points = [] self.host = "host" self.port = "port" self.username = "user" self.password = "pass" self.database = "base" self.client = InfluxDBClient(self.hos...
true
true
f7232b19d0c443e84587644f5b373ca332373ac3
10,409
py
Python
tests/test_testbench_object_special.py
noahdietz/storage-testbench
b122e47b69cabcdf981969068df0e9d805f129a3
[ "Apache-2.0" ]
4
2021-08-20T12:27:11.000Z
2022-01-24T12:20:19.000Z
tests/test_testbench_object_special.py
noahdietz/storage-testbench
b122e47b69cabcdf981969068df0e9d805f129a3
[ "Apache-2.0" ]
260
2021-06-29T00:50:44.000Z
2022-03-30T12:25:26.000Z
tests/test_testbench_object_special.py
noahdietz/storage-testbench
b122e47b69cabcdf981969068df0e9d805f129a3
[ "Apache-2.0" ]
11
2021-06-14T16:25:31.000Z
2022-03-22T19:42:49.000Z
#!/usr/bin/env python3 # # Copyright 2021 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 o...
37.713768
92
0.607647
import json import os import unittest from testbench import rest_server class TestTestbenchObjectSpecial(unittest.TestCase): def setUp(self): rest_server.db.clear() self.client = rest_server.server.test_client() os.environ.pop("GOOGLE_CLOUD_CPP_STORAGE_TEST_BUCKE...
true
true
f7232b4e748440a700c512c24ddd5528c3763424
14,263
py
Python
pmdarima/arima/_doc.py
chivalry/pmdarima
83aaa8249fc93b8bc2311431af53d2d10d312eea
[ "MIT" ]
null
null
null
pmdarima/arima/_doc.py
chivalry/pmdarima
83aaa8249fc93b8bc2311431af53d2d10d312eea
[ "MIT" ]
null
null
null
pmdarima/arima/_doc.py
chivalry/pmdarima
83aaa8249fc93b8bc2311431af53d2d10d312eea
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This is used (with minor differences) in both the class and the function _AUTO_ARIMA_DOCSTR = \ """Automatically discover the optimal order for an ARIMA model. The auto-ARIMA process seeks to identify the most optimal parameters for an ``ARIMA`` model, settling on a single fitted...
46.459283
79
0.665077
_AUTO_ARIMA_DOCSTR = \ """Automatically discover the optimal order for an ARIMA model. The auto-ARIMA process seeks to identify the most optimal parameters for an ``ARIMA`` model, settling on a single fitted ARIMA model. This process is based on the commonly-used R function, ``forecast::auto.ari...
true
true
f7232b9b6e151dc03922e891f067fde890f8592d
397
py
Python
djangochat/wsgi.py
muondu/Django-chat-app
9474733779402cdb2c4764a9d77b8c0e4f0842fe
[ "MIT" ]
null
null
null
djangochat/wsgi.py
muondu/Django-chat-app
9474733779402cdb2c4764a9d77b8c0e4f0842fe
[ "MIT" ]
null
null
null
djangochat/wsgi.py
muondu/Django-chat-app
9474733779402cdb2c4764a9d77b8c0e4f0842fe
[ "MIT" ]
null
null
null
""" WSGI config for djangochat project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangochat.settings') application = get_wsgi_application()
true
true
f7232ca5356a3bbb385a26982a7f9d1e936bb891
2,888
py
Python
teuthology/task/clock.py
grapheo12/teuthology
f69547410d113fea9811e5a002cc7a4689cffdbb
[ "MIT" ]
null
null
null
teuthology/task/clock.py
grapheo12/teuthology
f69547410d113fea9811e5a002cc7a4689cffdbb
[ "MIT" ]
null
null
null
teuthology/task/clock.py
grapheo12/teuthology
f69547410d113fea9811e5a002cc7a4689cffdbb
[ "MIT" ]
null
null
null
""" Clock synchronizer """ import logging import contextlib from teuthology.orchestra import run log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): """ Sync or skew clock This will initially sync the clocks. Eventually it should let us also skew by some number of se...
27.769231
76
0.447715
import logging import contextlib from teuthology.orchestra import run log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): log.info('Syncing clocks and checking initial clock skew...') for rem in ctx.cluster.remotes.keys(): rem.run( args = [ ...
true
true
f7232f67eee7300d2e40c43492af00da60a37663
164,419
py
Python
Lib/test/test_logging.py
jribbens/cpython
2c5c0a367c6ca648178072240fe0a32848636da6
[ "PSF-2.0" ]
1
2019-09-04T02:06:21.000Z
2019-09-04T02:06:21.000Z
Lib/test/test_logging.py
jribbens/cpython
2c5c0a367c6ca648178072240fe0a32848636da6
[ "PSF-2.0" ]
1
2020-05-26T12:29:28.000Z
2020-05-26T12:29:43.000Z
Lib/test/test_logging.py
jribbens/cpython
2c5c0a367c6ca648178072240fe0a32848636da6
[ "PSF-2.0" ]
2
2018-05-03T01:08:13.000Z
2019-12-02T03:03:43.000Z
# Copyright 2001-2017 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
34.908493
99
0.566498
import logging import logging.handlers import logging.config import codecs import configparser import datetime import pathlib import pickle import io import gc import json import os import queue import random import re import socket import struct import sys import tempfile from test.support.script_hel...
true
true
f723301c992529f6902bb52d24c8d1d5b8a2c80b
23,884
py
Python
github/Branch.py
aantr/WindowsHostManager
75d248fc8991d471c6802fa79e7dee44a5708c65
[ "CNRI-Python-GPL-Compatible" ]
1
2021-06-25T09:13:12.000Z
2021-06-25T09:13:12.000Z
venv/lib/python3.6/site-packages/github/Branch.py
rongshaoshuai/blogs
dafeb789428436c1ec8069e605400612b776b8f2
[ "MIT" ]
3
2021-03-30T23:03:03.000Z
2021-03-30T23:06:57.000Z
lib/github/Branch.py
Corionis/Knobs-And-Scripts
81a954fd0ed697e5759359ec0383a3f16a841143
[ "MIT" ]
null
null
null
############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
45.064151
152
0.624058
not github.GithubObject.NotSet: post_parameters["required_pull_request_reviews"][ "required_approving_review_count" ] = required_approving_review_count if dismissal_users is not github.GithubObject.NotSet: post_parameters["required_pull_re...
true
true
f72330d9504ba308986c3e2411b493ad3990f2b7
4,451
py
Python
test/test.py
thautwarm/RBNF.hs
c95838e68d5121b9e9661cc726cd1752345b3f53
[ "BSD-3-Clause" ]
7
2019-03-01T16:02:05.000Z
2022-01-18T09:56:23.000Z
test/test.py
thautwarm/RBNF.hs
c95838e68d5121b9e9661cc726cd1752345b3f53
[ "BSD-3-Clause" ]
5
2019-07-12T08:59:46.000Z
2020-01-08T14:50:01.000Z
test/test.py
thautwarm/RBNF.hs
c95838e68d5121b9e9661cc726cd1752345b3f53
[ "BSD-3-Clause" ]
null
null
null
import sys import operator from dataclasses import dataclass from collections import OrderedDict from typing import Generic, TypeVar T = TypeVar('T') nil = None class Nil: def __init__(self): global nil if nil is None: nil = self return raise ValueError("Nil canno...
18.316872
62
0.571332
import sys import operator from dataclasses import dataclass from collections import OrderedDict from typing import Generic, TypeVar T = TypeVar('T') nil = None class Nil: def __init__(self): global nil if nil is None: nil = self return raise ValueError("Nil canno...
true
true
f72331a544aca9c9ac8a9380791189cd9025588f
4,349
py
Python
src/bitpay/models/invoice/miner_fees.py
ppatidar2021/python-bitpay-client
b0bd6ef6f2ce2950fb42e6583113e225639a4340
[ "MIT" ]
3
2022-01-24T17:02:22.000Z
2022-03-10T00:57:20.000Z
src/bitpay/models/invoice/miner_fees.py
ppatidar2021/python-bitpay-client
b0bd6ef6f2ce2950fb42e6583113e225639a4340
[ "MIT" ]
1
2022-03-08T03:11:09.000Z
2022-03-09T12:51:13.000Z
src/bitpay/models/invoice/miner_fees.py
ppatidar2021/python-bitpay-client
b0bd6ef6f2ce2950fb42e6583113e225639a4340
[ "MIT" ]
3
2021-12-24T05:57:33.000Z
2022-03-14T09:17:40.000Z
""" MinerFees """ from .miner_fees_item import MinerFeesItem class MinerFees: """ The total amount of fees that the purchaser will pay to cover BitPay's UTXO sweep cost for an invoice. The key is the currency and the value is an amount in satoshis. This is referenced as "Network Cost" on an inv...
22.417526
86
0.496896
from .miner_fees_item import MinerFeesItem class MinerFees: __btc = MinerFeesItem() __bch = MinerFeesItem() __eth = MinerFeesItem() __usdc = MinerFeesItem() __gusd = MinerFeesItem() __pax = MinerFeesItem() __doge = MinerFeesItem() __ltc = MinerFeesItem() __busd = MinerFeesItem() ...
true
true
f72331ce7e5021c4af4e2217fc8fa2d1b6c67d72
22,215
py
Python
commpy/tests/test_channels.py
goodcq/CommPy
af3a9acba32d2f9c6b723705f709fee2cb9352e2
[ "BSD-3-Clause" ]
2
2018-11-18T22:10:49.000Z
2019-07-12T08:35:24.000Z
commpy/tests/test_channels.py
goodcq/CommPy
af3a9acba32d2f9c6b723705f709fee2cb9352e2
[ "BSD-3-Clause" ]
null
null
null
commpy/tests/test_channels.py
goodcq/CommPy
af3a9acba32d2f9c6b723705f709fee2cb9352e2
[ "BSD-3-Clause" ]
1
2020-10-13T10:33:23.000Z
2020-10-13T10:33:23.000Z
# Authors: CommPy contributors # License: BSD 3-Clause from __future__ import division, print_function # Python 2 compatibility from math import cos from numpy import ones, inf, sqrt, array, identity, zeros, dot, trace, einsum, absolute, exp, pi, fromiter, kron, \ zeros_like, empty from numpy.random import seed...
40.244565
115
0.577358
from __future__ import division, print_function from math import cos from numpy import ones, inf, sqrt, array, identity, zeros, dot, trace, einsum, absolute, exp, pi, fromiter, kron, \ zeros_like, empty from numpy.random import seed, choice, randn from numpy.testing import run_module_suite, assert_raises, as...
true
true
f72332b713eea64f27d550219316fa52fa69d638
2,397
py
Python
movieapp/application.py
Ketank21/Movie_recommendation
444e85669689cc0d86c0aa11d708eaad17e6115b
[ "MIT" ]
null
null
null
movieapp/application.py
Ketank21/Movie_recommendation
444e85669689cc0d86c0aa11d708eaad17e6115b
[ "MIT" ]
null
null
null
movieapp/application.py
Ketank21/Movie_recommendation
444e85669689cc0d86c0aa11d708eaad17e6115b
[ "MIT" ]
null
null
null
''' root module of the recommender app ''' from flask import Flask, request, render_template from recommender import recommend_nmf, recommend_random,recommend_neighbors,recommend_popular from utils import movies,ratings,df_mov_avg_cnt, search_title,movie_to_id,id_to_movie,get_movieId #where we define our Flask object...
34.242857
102
0.71506
from flask import Flask, request, render_template from recommender import recommend_nmf, recommend_random,recommend_neighbors,recommend_popular from utils import movies,ratings,df_mov_avg_cnt, search_title,movie_to_id,id_to_movie,get_movieId app = Flask(__name__) @app.route('/') def landing_page(): return ren...
true
true