hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7379bdf8616375e33b07efd79a1e25361bc9833
203
py
Python
swig-2.0.4/Examples/test-suite/python/li_std_wstream_runme.py
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
1
2016-04-09T02:58:13.000Z
2016-04-09T02:58:13.000Z
swig-2.0.4/Examples/test-suite/python/li_std_wstream_runme.py
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
swig-2.0.4/Examples/test-suite/python/li_std_wstream_runme.py
vidkidz/crossbridge
ba0bf94aee0ce6cf7eb5be882382e52bc57ba396
[ "MIT" ]
null
null
null
from li_std_wstream import * a = A() o = wostringstream() o << a << u" " << 2345 << u" " << 1.435 << wends if o.str() != "A class 2345 1.435\0": print "\"%s\"" % (o.str(),) raise RuntimeError
14.5
48
0.522167
from li_std_wstream import * a = A() o = wostringstream() o << a << u" " << 2345 << u" " << 1.435 << wends if o.str() != "A class 2345 1.435\0": print "\"%s\"" % (o.str(),) raise RuntimeError
false
true
f7379c4455be7a4cbb702bd6f60e6eca937b6a10
5,681
py
Python
run.py
gatran/DSC180B-Face-Mask-Detection
1ccce9b9a50d8e833ca3b7478045d9f1fb01c2fa
[ "BSD-2-Clause-FreeBSD", "MIT" ]
null
null
null
run.py
gatran/DSC180B-Face-Mask-Detection
1ccce9b9a50d8e833ca3b7478045d9f1fb01c2fa
[ "BSD-2-Clause-FreeBSD", "MIT" ]
null
null
null
run.py
gatran/DSC180B-Face-Mask-Detection
1ccce9b9a50d8e833ca3b7478045d9f1fb01c2fa
[ "BSD-2-Clause-FreeBSD", "MIT" ]
1
2021-06-02T19:42:11.000Z
2021-06-02T19:42:11.000Z
#!/usr/bin/env python import argparse import os import sys import json import shutil #from src.gradcam import * data_ingest_params = './config/data-params.json' fp_params = './config/file_path.json' gradcam_params = './config/gradcam_params.json' ig_params = './config/ig_params.json' train_params = './config/train_p...
48.974138
321
0.628939
import argparse import os import sys import json import shutil data_ingest_params = './config/data-params.json' fp_params = './config/file_path.json' gradcam_params = './config/gradcam_params.json' ig_params = './config/ig_params.json' train_params = './config/train_params.json' test_params = './config/test_params...
true
true
f7379e122a84b507b399b4dbc7b52402dd7e2908
214
py
Python
aergo/herapy/errors/__init__.py
aspiers/herapy
cf8a6ab0fd50c12b0f5f3ca85ff015eda5108863
[ "MIT" ]
4
2019-02-22T09:33:30.000Z
2021-03-26T14:22:04.000Z
aergo/herapy/errors/__init__.py
aspiers/herapy
cf8a6ab0fd50c12b0f5f3ca85ff015eda5108863
[ "MIT" ]
50
2019-03-10T02:45:55.000Z
2022-02-01T15:00:44.000Z
aergo/herapy/errors/__init__.py
aspiers/herapy
cf8a6ab0fd50c12b0f5f3ca85ff015eda5108863
[ "MIT" ]
4
2019-08-03T11:01:29.000Z
2021-03-31T08:31:23.000Z
# -*- coding: utf-8 -*- __all__ = ["exception"] from .exception import AergoException, CommunicationException from .conversion_exception import ConversionException from .general_exception import GeneralException
26.75
61
0.808411
__all__ = ["exception"] from .exception import AergoException, CommunicationException from .conversion_exception import ConversionException from .general_exception import GeneralException
true
true
f7379e15b31e68306102a1655b9c37779348eb8a
349
py
Python
cvrf/management/commands/import_rhsa.py
cyberxml/django-cyberxml
58722cd1ca5192851e894e60a063b6da84a14ed0
[ "MIT" ]
null
null
null
cvrf/management/commands/import_rhsa.py
cyberxml/django-cyberxml
58722cd1ca5192851e894e60a063b6da84a14ed0
[ "MIT" ]
null
null
null
cvrf/management/commands/import_rhsa.py
cyberxml/django-cyberxml
58722cd1ca5192851e894e60a063b6da84a14ed0
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand, CommandError from cvrf.imports import * class Command(BaseCommand): help = 'Imports Red Hat CVRF' def handle(self, *args, **options): try: import_redhat_cvrf() except: raise CommandError('import_redhat_cvrf failed') self.stdout.write('Success...
26.846154
65
0.74212
from django.core.management.base import BaseCommand, CommandError from cvrf.imports import * class Command(BaseCommand): help = 'Imports Red Hat CVRF' def handle(self, *args, **options): try: import_redhat_cvrf() except: raise CommandError('import_redhat_cvrf failed') self.stdout.write('Success...
false
true
f7379f0a932918d82994fe95749b56a6277fc071
13,020
py
Python
gans/experiments/emnist/preprocessing/filtered_emnist_data_utils.py
alshedivat/federated
100f0e0940282818c42c39156407ae419f26de50
[ "Apache-2.0" ]
2
2021-10-19T13:55:11.000Z
2021-11-11T11:26:05.000Z
federated/gans/experiments/emnist/preprocessing/filtered_emnist_data_utils.py
luke-who/TFF
fe9f44a504bc51b603a3ab9a181148da0aa9612f
[ "MIT" ]
null
null
null
federated/gans/experiments/emnist/preprocessing/filtered_emnist_data_utils.py
luke-who/TFF
fe9f44a504bc51b603a3ab9a181148da0aa9612f
[ "MIT" ]
null
null
null
# Copyright 2019, Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
45.365854
87
0.701613
import csv import functools import os.path import tensorflow as tf import tensorflow_federated as tff from gans.experiments.emnist import emnist_data_utils BASE_URL = 'https://storage.googleapis.com/tff-experiments-public/' CSVS_BASE_PATH = 'gans/csvs/' @functools.lru_cache(maxsize=1) def get_unfilte...
true
true
f7379f7c6b6ddd780c88ebd76500c40a01cae31c
2,892
py
Python
get_grok_repos.py
icecube-pixel/grok-auto-complete
747aab90f846410f444914713d238034fcf767a2
[ "MIT" ]
null
null
null
get_grok_repos.py
icecube-pixel/grok-auto-complete
747aab90f846410f444914713d238034fcf767a2
[ "MIT" ]
null
null
null
get_grok_repos.py
icecube-pixel/grok-auto-complete
747aab90f846410f444914713d238034fcf767a2
[ "MIT" ]
null
null
null
import logging from github import Github from typing import Dict, Tuple, List import os import argparse import traceback from collections import Counter from tenacity import retry, stop_after_attempt, wait_exponential from time import sleep import pandas as pd logging.basicConfig(format='%(asctime)s,%(msecs...
37.558442
175
0.662863
import logging from github import Github from typing import Dict, Tuple, List import os import argparse import traceback from collections import Counter from tenacity import retry, stop_after_attempt, wait_exponential from time import sleep import pandas as pd logging.basicConfig(format='%(asctime)s,%(msecs...
true
true
f737a0875ea46f345c5fb511aa7fbf04d063db12
7,473
py
Python
foiamachine/apps/government/models.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
9
2017-08-02T16:28:10.000Z
2021-07-19T09:51:46.000Z
foiamachine/apps/government/models.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
null
null
null
foiamachine/apps/government/models.py
dwillis/foiamachine
26d3b02870227696cdaab639c39d47b2a7a42ae5
[ "Unlicense", "MIT" ]
5
2017-10-10T23:15:02.000Z
2021-07-19T09:51:48.000Z
from django.db import models from django_extensions.db.fields import AutoSlugField from apps.core.models import BaseData from django.contrib.auth.models import User, Group from django.utils.html import escape import pytz import datetime import bleach from django.utils import timezone class Language(BaseData): nam...
33.066372
114
0.656631
from django.db import models from django_extensions.db.fields import AutoSlugField from apps.core.models import BaseData from django.contrib.auth.models import User, Group from django.utils.html import escape import pytz import datetime import bleach from django.utils import timezone class Language(BaseData): nam...
true
true
f737a0d88bd9fc37a128dea3b7b35bf6ff70fe73
660
py
Python
flambda_app/aws/__init__.py
madeiramadeirabr/template-serverless-service-python
17a57e19906f44978dad0c09cff3a16c299ff0c0
[ "MIT" ]
null
null
null
flambda_app/aws/__init__.py
madeiramadeirabr/template-serverless-service-python
17a57e19906f44978dad0c09cff3a16c299ff0c0
[ "MIT" ]
1
2022-03-31T17:55:16.000Z
2022-03-31T17:59:00.000Z
flambda_app/aws/__init__.py
madeiramadeirabr/template-serverless-service-python
17a57e19906f44978dad0c09cff3a16c299ff0c0
[ "MIT" ]
null
null
null
""" AWS module - Keep the aws services adpaters Version: 1.0.0 """ def change_endpoint(cls): endpoint_url = cls.config.get('LOCALSTACK_ENDPOINT', None) # Fix para tratar diff entre docker/local if endpoint_url == 'http://0.0.0.0:4566' or \ endpoint_url == 'http://localstack:4566': old_...
34.736842
82
0.654545
def change_endpoint(cls): endpoint_url = cls.config.get('LOCALSTACK_ENDPOINT', None) if endpoint_url == 'http://0.0.0.0:4566' or \ endpoint_url == 'http://localstack:4566': old_value = endpoint_url cls.config.set('LOCALSTACK_ENDPOINT', 'http://localhost:4566') endpoint...
true
true
f737a1e53afe9bb36a13cac2dfc94f261f176efd
5,080
py
Python
src/subscriber.py
gbroccolo/kafka-schema-registry-python
65b0b7bd00295f337eda7bb02c57d99bdf5641c0
[ "MIT" ]
null
null
null
src/subscriber.py
gbroccolo/kafka-schema-registry-python
65b0b7bd00295f337eda7bb02c57d99bdf5641c0
[ "MIT" ]
null
null
null
src/subscriber.py
gbroccolo/kafka-schema-registry-python
65b0b7bd00295f337eda7bb02c57d99bdf5641c0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # ============================================================================= # # Consume Avro messages to Kafka getting the schema from the Confluent registry # Using Confluent Python Client # # ============================================================================= from confluent_kafk...
30.97561
100
0.551575
from confluent_kafka import avro from confluent_kafka.avro import AvroConsumer from confluent_kafka.avro.serializer import SerializerError import os from requests import get from messages import Message class Subscriber: def __init__( self, topic, schema_registry_url, b...
true
true
f737a257be0d0f280b5946675a4371bfe4c4addb
683
py
Python
scripts/test_DDPG.py
PierreExeter/gym-reacher
d58edeb93b4b703101dc0505232c883fd012dbad
[ "MIT" ]
null
null
null
scripts/test_DDPG.py
PierreExeter/gym-reacher
d58edeb93b4b703101dc0505232c883fd012dbad
[ "MIT" ]
null
null
null
scripts/test_DDPG.py
PierreExeter/gym-reacher
d58edeb93b4b703101dc0505232c883fd012dbad
[ "MIT" ]
null
null
null
import gym import numpy as np import gym_reacher from stable_baselines.ddpg.policies import MlpPolicy from stable_baselines.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise, AdaptiveParamNoiseSpec from stable_baselines import DDPG # env = gym.make('MountainCarContinuous-v0') env = gym.make('Reacher...
34.15
113
0.818448
import gym import numpy as np import gym_reacher from stable_baselines.ddpg.policies import MlpPolicy from stable_baselines.common.noise import NormalActionNoise, OrnsteinUhlenbeckActionNoise, AdaptiveParamNoiseSpec from stable_baselines import DDPG env = gym.make('Reacher1Dof-v0') n_actions = env.action_space.sha...
true
true
f737a2f63fcf5adfe979994b320fbd4e88d77b6b
7,169
py
Python
pnnl/AirsideRCxAgent/airside/diagnostics/common.py
jklarson/volttron-applications
159e7ca12e3a7935c7882a29b4d9c720e1c8b689
[ "BSD-3-Clause" ]
null
null
null
pnnl/AirsideRCxAgent/airside/diagnostics/common.py
jklarson/volttron-applications
159e7ca12e3a7935c7882a29b4d9c720e1c8b689
[ "BSD-3-Clause" ]
null
null
null
pnnl/AirsideRCxAgent/airside/diagnostics/common.py
jklarson/volttron-applications
159e7ca12e3a7935c7882a29b4d9c720e1c8b689
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2017, Battelle Memorial Institute All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions a...
42.420118
118
0.719487
from datetime import timedelta as td from volttron.platform.agent.math_utils import mean DX = '/diagnostic message' def create_table_key(table_name, timestamp): return "&".join([table_name, timestamp.isoformat()]) def check_date(current_time, timestamp_array): if not timestamp_array: return False ...
true
true
f737a33e0dbf48ba1f1250e17fcee8894546d8d5
9,743
py
Python
lib/spack/spack/test/cmd_extensions.py
VladimirUspenskii/spack
18b83c3833c0e138a7153bbb14e68b1147b3f3d1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
lib/spack/spack/test/cmd_extensions.py
VladimirUspenskii/spack
18b83c3833c0e138a7153bbb14e68b1147b3f3d1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
6
2022-01-08T08:41:11.000Z
2022-03-14T19:28:07.000Z
lib/spack/spack/test/cmd_extensions.py
foeroyingur/spack
5300cbbb2e569190015c72d0970d25425ea38647
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import contextlib import os import sys import pytest import spack.cmd import spack.config import spack.extensions import...
35.429091
79
0.652366
import contextlib import os import sys import pytest import spack.cmd import spack.config import spack.extensions import spack.main class Extension: def __init__(self, name, root): self.name = name self.pname = spack.cmd.python_name(name) self.root = root self.main = self.ro...
true
true
f737a379bf000ac7570c9ee10198f30b4dc9e12a
6,924
py
Python
tests/gold_tests/tls/tls_verify_ca_override.test.py
a-canary/trafficserver
df01ace2b0bdffd3ddcc5b2c7587b6d6fed5234c
[ "Apache-2.0" ]
3
2019-10-11T06:19:16.000Z
2020-07-24T05:46:38.000Z
tests/gold_tests/tls/tls_verify_ca_override.test.py
a-canary/trafficserver
df01ace2b0bdffd3ddcc5b2c7587b6d6fed5234c
[ "Apache-2.0" ]
1
2021-02-23T12:43:22.000Z
2021-02-23T12:57:13.000Z
tests/gold_tests/tls/tls_verify_ca_override.test.py
isabella232/trafficserver
a52bd121080dd94f757e54ed65fae2188472b004
[ "Apache-2.0" ]
2
2020-07-24T05:46:43.000Z
2020-08-20T01:27:50.000Z
''' ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License");...
53.674419
332
0.718515
Test.Summary = ''' Test tls server certificate verification options. Exercise conf_remap for ca bundle ''' ts = Test.MakeATSProcess("ts", select_ports=True) server1 = Test.MakeOriginServer("server1", ssl=True, options={"--key": "{0}/sign...
true
true
f737a38abbb477dfeeaca4a0361f52ed8414956b
10,985
py
Python
python/ray/tune/tests/test_integration_wandb.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
python/ray/tune/tests/test_integration_wandb.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
41
2021-09-21T01:13:48.000Z
2022-03-19T07:12:22.000Z
python/ray/tune/tests/test_integration_wandb.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
import os import tempfile from collections import namedtuple from multiprocessing import Queue import unittest import numpy as np from ray.tune import Trainable from ray.tune.function_runner import wrap_function from ray.tune.integration.wandb import ( WandbLoggerCallback, _WandbLoggingProcess, WANDB_ENV_...
29.689189
88
0.602185
import os import tempfile from collections import namedtuple from multiprocessing import Queue import unittest import numpy as np from ray.tune import Trainable from ray.tune.function_runner import wrap_function from ray.tune.integration.wandb import ( WandbLoggerCallback, _WandbLoggingProcess, WANDB_ENV_...
true
true
f737a5565f48a1a891a9395c0e0a47cb226cce26
3,038
py
Python
differential-privacy-library-main/tests/tools/test_histogramdd.py
gonzalo-munillag/Exponential_Randomised_Response
1ae2c867d77c6e92f1df0bb7120862e4f9aa15e4
[ "MIT" ]
597
2019-06-19T11:26:50.000Z
2022-03-30T13:23:42.000Z
differential-privacy-library-main/tests/tools/test_histogramdd.py
gonzalo-munillag/Exponential_Randomised_Response
1ae2c867d77c6e92f1df0bb7120862e4f9aa15e4
[ "MIT" ]
45
2019-06-20T08:03:31.000Z
2022-03-30T14:02:02.000Z
differential-privacy-library-main/tests/tools/test_histogramdd.py
gonzalo-munillag/Exponential_Randomised_Response
1ae2c867d77c6e92f1df0bb7120862e4f9aa15e4
[ "MIT" ]
163
2019-06-19T23:56:19.000Z
2022-03-26T23:59:24.000Z
import numpy as np from unittest import TestCase from diffprivlib.accountant import BudgetAccountant from diffprivlib.tools.histograms import histogramdd from diffprivlib.utils import global_seed, PrivacyLeakWarning, BudgetError class TestHistogramdd(TestCase): def test_no_params(self): a = np.array([1, ...
35.741176
101
0.586241
import numpy as np from unittest import TestCase from diffprivlib.accountant import BudgetAccountant from diffprivlib.tools.histograms import histogramdd from diffprivlib.utils import global_seed, PrivacyLeakWarning, BudgetError class TestHistogramdd(TestCase): def test_no_params(self): a = np.array([1, ...
true
true
f737a6e277c0aa1ee8dec40500f79cdf601eb1f2
3,439
py
Python
dualbound/Lagrangian/spatialProjopt_Zops_numpy.py
PengningChao/emdb-sphere
d20ac81ab4fd744f87788bda46d3aa19598658ee
[ "MIT" ]
null
null
null
dualbound/Lagrangian/spatialProjopt_Zops_numpy.py
PengningChao/emdb-sphere
d20ac81ab4fd744f87788bda46d3aa19598658ee
[ "MIT" ]
null
null
null
dualbound/Lagrangian/spatialProjopt_Zops_numpy.py
PengningChao/emdb-sphere
d20ac81ab4fd744f87788bda46d3aa19598658ee
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 4 21:39:12 2020 @author: pengning This is part of the grad/Hess engine for spatial projection versions of the original global constraint <S|T>-<T|U|T>. The Lagrangian multipliers are distributed in the order alphaP0_1, alphaP0_2, alphaP1_1, alph...
30.705357
115
0.592033
import numpy as np def Z_TT(Lags, O, UPlist): ZTT = np.zeros_like(O, dtype=np.complex) ZTT[:,:] = O[:,:] for i in range(len(UPlist)): SymUP = (UPlist[i]+UPlist[i].conj().T)/2 AsymUP = (UPlist[i]-UPlist[i].conj().T)/(2j) ZTT += Lags[2*i]*SymUP + Lags[2*i+1]*AsymUP return...
true
true
f737a7e48890e5d48eacadf678b96723ca2c86ff
729
py
Python
sites/stacks/api.py
bluebirdio/improbable-sites
faeb00a37f3993c93ea9cf45d43258705d7afc22
[ "MIT" ]
null
null
null
sites/stacks/api.py
bluebirdio/improbable-sites
faeb00a37f3993c93ea9cf45d43258705d7afc22
[ "MIT" ]
1
2020-07-29T19:07:25.000Z
2020-07-29T19:07:25.000Z
sites/stacks/api.py
bluebirdio/samey-sites
faeb00a37f3993c93ea9cf45d43258705d7afc22
[ "MIT" ]
1
2020-03-25T22:36:48.000Z
2020-03-25T22:36:48.000Z
from typing import List from fastapi import APIRouter from samey.table_crud import * from .models import * router = APIRouter() @router.get("/", response_model=List[Stack]) def list_stacks(): return query(tables.Stack) @router.post("/", response_model=Stack, status_code=201) def create_stack(stack_in: Stack...
20.828571
60
0.721536
from typing import List from fastapi import APIRouter from samey.table_crud import * from .models import * router = APIRouter() @router.get("/", response_model=List[Stack]) def list_stacks(): return query(tables.Stack) @router.post("/", response_model=Stack, status_code=201) def create_stack(stack_in: Stack...
true
true
f737a8523724bab88d445e40877fd4727dede84d
6,084
py
Python
getin/management/commands/getin.py
confuzeus/django-getin
1954a546990e5e163d4dc040e4b9a6f705a7777f
[ "MIT" ]
null
null
null
getin/management/commands/getin.py
confuzeus/django-getin
1954a546990e5e163d4dc040e4b9a6f705a7777f
[ "MIT" ]
null
null
null
getin/management/commands/getin.py
confuzeus/django-getin
1954a546990e5e163d4dc040e4b9a6f705a7777f
[ "MIT" ]
null
null
null
from typing import Optional from django.core.exceptions import ValidationError from django.core.management import BaseCommand, CommandError from django.db import IntegrityError from django.utils.translation import gettext_lazy as _ from django_fsm import TransitionNotAllowed from getin.models import Invitation, Invit...
31.360825
87
0.559993
from typing import Optional from django.core.exceptions import ValidationError from django.core.management import BaseCommand, CommandError from django.db import IntegrityError from django.utils.translation import gettext_lazy as _ from django_fsm import TransitionNotAllowed from getin.models import Invitation, Invit...
true
true
f737a88d3c8e49174a66091151be27bb136528e1
3,592
py
Python
auxiliary.py
juniorcl/virtual-lockin-prototype
5f75897a65620f6180f37bcaa3b4291d605aaf9f
[ "MIT" ]
4
2021-03-24T20:43:18.000Z
2021-09-09T14:12:24.000Z
auxiliary.py
juniorcl/virtual-lockin-prototype
5f75897a65620f6180f37bcaa3b4291d605aaf9f
[ "MIT" ]
null
null
null
auxiliary.py
juniorcl/virtual-lockin-prototype
5f75897a65620f6180f37bcaa3b4291d605aaf9f
[ "MIT" ]
1
2021-05-21T04:38:04.000Z
2021-05-21T04:38:04.000Z
############################# Helper ################################# ## This file was created to support the lock-in program ## ###################################################################### ## These functions can be imported using: import lockin-auxiliary as aux ## and put aux.<name of the functi...
38.623656
86
0.673998
true
true
f737a8dc6d561a8a791109dbdd40a63238b10f36
2,578
py
Python
test_ntpx.py
devsysenv/tests
6aa7635b281f2e186daa6375abb8050e44c02d6a
[ "MIT" ]
null
null
null
test_ntpx.py
devsysenv/tests
6aa7635b281f2e186daa6375abb8050e44c02d6a
[ "MIT" ]
null
null
null
test_ntpx.py
devsysenv/tests
6aa7635b281f2e186daa6375abb8050e44c02d6a
[ "MIT" ]
1
2022-03-09T12:23:26.000Z
2022-03-09T12:23:26.000Z
import pytest import os import logging logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) from pathlib import Path from dselib.context import DSEContext from dselib.ntpx import NTPX def context(varfile=None): """returns the DSE context object for this script.""" try: ...
40.920635
120
0.590768
import pytest import os import logging logging.basicConfig() logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) from pathlib import Path from dselib.context import DSEContext from dselib.ntpx import NTPX def context(varfile=None): try: myself = __file__ except NameError: mys...
true
true
f737a99452fae6bff69ab801de12cfdae34aa357
388
py
Python
tests/unit/conftest.py
keang/dredis
520b3c10a1cee6de9d0f73cd2c43298ce3f9598a
[ "MIT" ]
53
2018-09-19T15:19:09.000Z
2022-03-06T17:05:32.000Z
tests/unit/conftest.py
keang/dredis
520b3c10a1cee6de9d0f73cd2c43298ce3f9598a
[ "MIT" ]
31
2018-09-19T16:45:46.000Z
2021-05-05T15:12:20.000Z
tests/unit/conftest.py
keang/dredis
520b3c10a1cee6de9d0f73cd2c43298ce3f9598a
[ "MIT" ]
5
2018-09-19T16:42:25.000Z
2022-03-07T11:36:57.000Z
import pytest from dredis import config from dredis.db import DB_MANAGER from dredis.keyspace import Keyspace @pytest.fixture def keyspace(): DB_MANAGER.setup_dbs('', backend='memory', backend_options={}) original_configs = config.get_all('*') yield Keyspace() for option, value in zip(original_config...
25.866667
77
0.726804
import pytest from dredis import config from dredis.db import DB_MANAGER from dredis.keyspace import Keyspace @pytest.fixture def keyspace(): DB_MANAGER.setup_dbs('', backend='memory', backend_options={}) original_configs = config.get_all('*') yield Keyspace() for option, value in zip(original_config...
true
true
f737ac68734a06a4c23d97260750274f29045fd2
2,310
py
Python
cosine_categorize.py
yuyunliuhen/automatic-text-categorization
6f8ca4f26d2ac684439cc265a4ec468ad9d30d20
[ "MIT" ]
null
null
null
cosine_categorize.py
yuyunliuhen/automatic-text-categorization
6f8ca4f26d2ac684439cc265a4ec468ad9d30d20
[ "MIT" ]
null
null
null
cosine_categorize.py
yuyunliuhen/automatic-text-categorization
6f8ca4f26d2ac684439cc265a4ec468ad9d30d20
[ "MIT" ]
null
null
null
# encoding=utf-8 import os import sys import math from util_tool import * import numpy def categorization_files(path): files = search_directory(path,'vec') for input_name in files: categorization_file(input_name) # compute only once, the same to them if using topic model for sample feather break def categori...
32.083333
138
0.698701
import os import sys import math from util_tool import * import numpy def categorization_files(path): files = search_directory(path,'vec') for input_name in files: categorization_file(input_name) break def categorization_file(vec_file): handle_froms = open(vec_file,'r') final_file = vec_file.replace('ve...
true
true
f737ac9bf0007cd0dd76c2426a0b677304646108
2,821
py
Python
EP2/tests.py
LucasHaug/MAP3121
90b69c5db20e6d56c0c3e3dd969d9e41d804e9be
[ "MIT" ]
null
null
null
EP2/tests.py
LucasHaug/MAP3121
90b69c5db20e6d56c0c3e3dd969d9e41d804e9be
[ "MIT" ]
null
null
null
EP2/tests.py
LucasHaug/MAP3121
90b69c5db20e6d56c0c3e3dd969d9e41d804e9be
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import numpy as np from random import random import crank_nicolson ################################################# ### Functions Definitions ################################################# def get_data(test_letter): if test_letter == "a": ut_array, uk_matrix, x_array, N = test...
24.318966
88
0.628501
import numpy as np from random import random import crank_nicolson
true
true
f737ad79cff0ce6f5e5975799c84ba766e23e3f3
845
py
Python
C3_Decorator_Pattern/StarBuzzWithSize/Condiments/Mocha.py
sarada92/Design_Pattern
f817206a6f995bc6f534d7cabb3a290955f37d33
[ "MIT" ]
1
2022-02-06T15:42:09.000Z
2022-02-06T15:42:09.000Z
C3_Decorator_Pattern/StarBuzzWithSize/Condiments/Mocha.py
sarada92/Design_Pattern
f817206a6f995bc6f534d7cabb3a290955f37d33
[ "MIT" ]
null
null
null
C3_Decorator_Pattern/StarBuzzWithSize/Condiments/Mocha.py
sarada92/Design_Pattern
f817206a6f995bc6f534d7cabb3a290955f37d33
[ "MIT" ]
null
null
null
from C3_Decorator_Pattern.StarBuzzWithSize.Beverages.Beverages import Beverages from C3_Decorator_Pattern.StarBuzzWithSize.Beverages.Size import Size from C3_Decorator_Pattern.StarBuzzWithSize.Condiments.Condiments import Condiments class Mocha(Condiments): def __init__(self, beverage: Beverages): self.b...
30.178571
82
0.631953
from C3_Decorator_Pattern.StarBuzzWithSize.Beverages.Beverages import Beverages from C3_Decorator_Pattern.StarBuzzWithSize.Beverages.Size import Size from C3_Decorator_Pattern.StarBuzzWithSize.Condiments.Condiments import Condiments class Mocha(Condiments): def __init__(self, beverage: Beverages): self.b...
true
true
f737ade0a9714933c4aad3a91a63848554ae09dd
1,851
py
Python
Fusion/modules/Fusion/KHR1/Brains/__init__.py
roadnarrows-robotics/rnr-sdk
aee20c65b49fb3eedf924c5c2ec9f19f4f1a1b29
[ "MIT" ]
null
null
null
Fusion/modules/Fusion/KHR1/Brains/__init__.py
roadnarrows-robotics/rnr-sdk
aee20c65b49fb3eedf924c5c2ec9f19f4f1a1b29
[ "MIT" ]
null
null
null
Fusion/modules/Fusion/KHR1/Brains/__init__.py
roadnarrows-robotics/rnr-sdk
aee20c65b49fb3eedf924c5c2ec9f19f4f1a1b29
[ "MIT" ]
null
null
null
################################################################################ # # __init__.py # """ KHR-1 Brains Subpackage Public Modules: Author: Robin D. Knight Email: robin.knight@roadnarrowsrobotics.com URL: http://www.roadnarrowsrobotics.com Date: 2007.11.28 Copyright (C) 2007. RoadNarrows LLC. """ ...
37.77551
80
0.709346
true
true
f737b0421678ce0526ad89662eaedf78229a1d21
7,911
py
Python
Submissions/Submission S3.py
tomeberle/Business-analytics
5051d5a5f096fa451cc5e201f08b4681335c68ae
[ "MIT" ]
null
null
null
Submissions/Submission S3.py
tomeberle/Business-analytics
5051d5a5f096fa451cc5e201f08b4681335c68ae
[ "MIT" ]
null
null
null
Submissions/Submission S3.py
tomeberle/Business-analytics
5051d5a5f096fa451cc5e201f08b4681335c68ae
[ "MIT" ]
null
null
null
''' Exercise 6: Scrap more information about TripAdvisor reviews url = "https://www.tripadvisor.com/Restaurant_Review-g227613-d3531819-Reviews-Le_Jardin_Napolitain-Jouy_en_Josas_Versailles_Yvelines_Ile_de_France.html" Please write a code that prints out review content, numeric ra...
35.635135
163
0.667046
import csv import requests from bs4 import BeautifulSoup def scrapecontent(url): scrape_response = requests.get(url) print(scrape_response.status_code) if scrape_response.status_code == 200: soup = BeautifulSoup(scrape_response.text) return soup else: print('Error accessing...
true
true
f737b1c85cd2bef4bff4f7967cf88e8033a6f031
541
py
Python
src/models/workspace.py
Mtortolani/slack-backend
11b1650c111eb163a8ef3bf75a33fb4aeeccf300
[ "MIT" ]
null
null
null
src/models/workspace.py
Mtortolani/slack-backend
11b1650c111eb163a8ef3bf75a33fb4aeeccf300
[ "MIT" ]
null
null
null
src/models/workspace.py
Mtortolani/slack-backend
11b1650c111eb163a8ef3bf75a33fb4aeeccf300
[ "MIT" ]
null
null
null
class Workspace: def __init__(self, name: str = None): #PK self.name = name self.members = [] self.member_ids= [] self.roles = {} #{owners:[user1], administrators:[user5, user8], etc} self.channels = [] #name def getName(self): return self.na...
23.521739
77
0.539741
class Workspace: def __init__(self, name: str = None): self.name = name self.members = [] self.member_ids= [] self.roles = {} self.channels = [] def getName(self): return self.name def setName(self, name: str): self.name = name...
true
true
f737b23216d8b6b6784f9aaad24bb8f9007c3315
11,315
py
Python
tests/core/test_fileio.py
madhukarkm/NeMo
648c97f076147684bee6aaada209f2f20adcaf5d
[ "Apache-2.0" ]
4,145
2019-09-13T08:29:43.000Z
2022-03-31T18:31:44.000Z
tests/core/test_fileio.py
madhukarkm/NeMo
648c97f076147684bee6aaada209f2f20adcaf5d
[ "Apache-2.0" ]
2,031
2019-09-17T16:51:39.000Z
2022-03-31T23:52:41.000Z
tests/core/test_fileio.py
madhukarkm/NeMo
648c97f076147684bee6aaada209f2f20adcaf5d
[ "Apache-2.0" ]
1,041
2019-09-13T10:08:21.000Z
2022-03-30T06:37:38.000Z
# Copyright (c) 2020, 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 appli...
37.716667
114
0.60601
import os import tempfile import numpy as np import pytest import torch from omegaconf import DictConfig, OmegaConf from nemo.collections.asr.models import EncDecCTCModel try: from eff.cookbooks import NeMoCookbook _EFF_PRESENT_ = True except ImportError: _EFF_PRESENT_ = False requires_e...
true
true
f737b3caeee0ca40e8c1f398ae9b0c41b9ee4c20
9,682
py
Python
google/cloud/bigquery/reservation_v1/services/reservation_service/pagers.py
shollyman/python-bigquery-reservation
f65f8c2d3f1e7a259f2a474e7b6895a27a25c22a
[ "Apache-2.0" ]
null
null
null
google/cloud/bigquery/reservation_v1/services/reservation_service/pagers.py
shollyman/python-bigquery-reservation
f65f8c2d3f1e7a259f2a474e7b6895a27a25c22a
[ "Apache-2.0" ]
null
null
null
google/cloud/bigquery/reservation_v1/services/reservation_service/pagers.py
shollyman/python-bigquery-reservation
f65f8c2d3f1e7a259f2a474e7b6895a27a25c22a
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.382239
87
0.679715
from typing import Any, Callable, Iterable from google.cloud.bigquery.reservation_v1.types import reservation class ListReservationsPager: def __init__( self, method: Callable[ [reservation.ListReservationsRequest], reservation.ListReservationsResponse ], ...
true
true
f737b7c98d2bcbb0c3045657d24aa21a13df6ece
2,194
py
Python
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/create_binding_device_response.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/create_binding_device_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/create_binding_device_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class CreateBindingDeviceResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_ma...
26.756098
78
0.536007
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class CreateBindingDeviceResponse(SdkResponse): sensitive_list = [] openapi_types = { } attribute_map = { } def __init__(self): super().__init__() self.discriminator =...
true
true
f737b8065f4c2bf05f757290c8a3988ddb4eac32
3,071
py
Python
sample-demo/venv/Lib/site-packages/rx/core/operators/merge_scan.py
rupc/bsp-protos
58833e7ab9ff53f3633708fb5f95edfdd152c5ea
[ "Apache-2.0" ]
null
null
null
sample-demo/venv/Lib/site-packages/rx/core/operators/merge_scan.py
rupc/bsp-protos
58833e7ab9ff53f3633708fb5f95edfdd152c5ea
[ "Apache-2.0" ]
null
null
null
sample-demo/venv/Lib/site-packages/rx/core/operators/merge_scan.py
rupc/bsp-protos
58833e7ab9ff53f3633708fb5f95edfdd152c5ea
[ "Apache-2.0" ]
null
null
null
from typing import Any, Callable from rx import defer, from_future, of from rx.core import Observable from rx.core.typing import Accumulator from rx.disposable import CompositeDisposable, SingleAssignmentDisposable from rx.internal.concurrency import synchronized from rx.internal.utils import NotSet, is_future def _...
36.559524
100
0.569196
from typing import Any, Callable from rx import defer, from_future, of from rx.core import Observable from rx.core.typing import Accumulator from rx.disposable import CompositeDisposable, SingleAssignmentDisposable from rx.internal.concurrency import synchronized from rx.internal.utils import NotSet, is_future def _...
true
true
f737b922eec4f99552561be1b833d37d352fcab3
10,080
py
Python
sentry/coreapi.py
tschellenbach/sentry
1d4c8aa59002bb1dd5ba67aa9d7277b2fa51e890
[ "BSD-3-Clause" ]
1
2018-07-15T00:12:53.000Z
2018-07-15T00:12:53.000Z
sentry/coreapi.py
tschellenbach/sentry
1d4c8aa59002bb1dd5ba67aa9d7277b2fa51e890
[ "BSD-3-Clause" ]
null
null
null
sentry/coreapi.py
tschellenbach/sentry
1d4c8aa59002bb1dd5ba67aa9d7277b2fa51e890
[ "BSD-3-Clause" ]
null
null
null
""" sentry.coreapi ~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ # TODO: We should make the API a class, and UDP/HTTP just inherit from it # This will make it so we can more easily control logging with various # m...
30.638298
95
0.648016
""" sentry.coreapi ~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from datetime import datetime import base64 import logging import time import uuid import zlib from django.utils.encoding import smart_str from sentry.con...
false
true
f737b98756fe61b6b9a43df10824c321be9da7d3
28,010
py
Python
discord/channel.py
Werseter/discord.py
00a659c6526b2445162b52eaf970adbd22c6d35d
[ "MIT" ]
null
null
null
discord/channel.py
Werseter/discord.py
00a659c6526b2445162b52eaf970adbd22c6d35d
[ "MIT" ]
null
null
null
discord/channel.py
Werseter/discord.py
00a659c6526b2445162b52eaf970adbd22c6d35d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2017 Rapptz 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 u...
30.478781
116
0.58804
from .permissions import Permissions from .enums import ChannelType, try_enum from .mixins import Hashable from . import utils from .errors import ClientException, NoMoreItems from .webhook import Webhook import discord.abc import time import asyncio __all__ = ['TextChannel', 'VoiceChannel', 'DMChannel', 'Categor...
true
true
f737b9a7130a9573def136ba81888a2c4a8f66e0
1,133
py
Python
main.py
adv1996/nba-historical-betting
a732cf5fcf5dcde7002dc40a88578935d96d8de8
[ "MIT" ]
null
null
null
main.py
adv1996/nba-historical-betting
a732cf5fcf5dcde7002dc40a88578935d96d8de8
[ "MIT" ]
null
null
null
main.py
adv1996/nba-historical-betting
a732cf5fcf5dcde7002dc40a88578935d96d8de8
[ "MIT" ]
null
null
null
from scrape_utils import retrieveWebpage from sportsreview_importer import retrieveLinks, bulkDownloadData, collateData def saveSportReviewWebpage(): baseURL = 'https://www.sportsbookreviewsonline.com/scoresoddsarchives/nba/nbaoddsarchives.htm' saveFile = 'data/sportsbookreview_nba_odds_archive.html' element = '...
36.548387
96
0.802295
from scrape_utils import retrieveWebpage from sportsreview_importer import retrieveLinks, bulkDownloadData, collateData def saveSportReviewWebpage(): baseURL = 'https://www.sportsbookreviewsonline.com/scoresoddsarchives/nba/nbaoddsarchives.htm' saveFile = 'data/sportsbookreview_nba_odds_archive.html' element = '...
true
true
f737ba2babbb7e43a3920947a653abf898d03b6b
5,901
py
Python
dodo.py
Johann150/forget
88760deb6f897a2a4ec1772d6dc93f0ebe7a8ac5
[ "ISC" ]
null
null
null
dodo.py
Johann150/forget
88760deb6f897a2a4ec1772d6dc93f0ebe7a8ac5
[ "ISC" ]
null
null
null
dodo.py
Johann150/forget
88760deb6f897a2a4ec1772d6dc93f0ebe7a8ac5
[ "ISC" ]
null
null
null
from doit import create_after from glob import glob from itertools import chain def reltouch(source_filename, dest_filename): from os import stat, utime stat_res = stat(source_filename) utime(dest_filename, ns=(stat_res.st_atime_ns, stat_res.st_mtime_ns)) def resize_image(basename, width, image_format):...
30.734375
78
0.497373
from doit import create_after from glob import glob from itertools import chain def reltouch(source_filename, dest_filename): from os import stat, utime stat_res = stat(source_filename) utime(dest_filename, ns=(stat_res.st_atime_ns, stat_res.st_mtime_ns)) def resize_image(basename, width, image_format):...
true
true
f737ba2f0bccbc310ba711faf8a0f36a0ce418ea
1,182
py
Python
tests/test_model_artifact.py
jmonsalverodilla/house_prices_regression_model
28fd24e777fcf838acffda6ea669e1339d92819d
[ "MIT" ]
null
null
null
tests/test_model_artifact.py
jmonsalverodilla/house_prices_regression_model
28fd24e777fcf838acffda6ea669e1339d92819d
[ "MIT" ]
null
null
null
tests/test_model_artifact.py
jmonsalverodilla/house_prices_regression_model
28fd24e777fcf838acffda6ea669e1339d92819d
[ "MIT" ]
null
null
null
#Imports from house_prices_regression_model.train_pipeline import run_training from house_prices_regression_model.processing.data_manager import load_pipeline from house_prices_regression_model.config.core import ROOT, TRAINED_MODEL_DIR,load_config_file,SETTINGS_PATH from house_prices_regression_model import __version_...
38.129032
108
0.747039
from house_prices_regression_model.train_pipeline import run_training from house_prices_regression_model.processing.data_manager import load_pipeline from house_prices_regression_model.config.core import ROOT, TRAINED_MODEL_DIR,load_config_file,SETTINGS_PATH from house_prices_regression_model import __version__ as VER...
true
true
f737bb8aeb211e1b90f393d6e19101cec3f831a3
5,413
py
Python
docs/conf.py
susmitpy/modin
c7d7b492e52fcc4aa36af2a210312101bbada06e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
docs/conf.py
susmitpy/modin
c7d7b492e52fcc4aa36af2a210312101bbada06e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
docs/conf.py
susmitpy/modin
c7d7b492e52fcc4aa36af2a210312101bbada06e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Project information ---------------------------------------------------...
30.581921
86
0.656752
import sys import os import types import ray def noop_decorator(*args, **kwargs): if len(args) == 1 and len(kwargs) == 0 and callable(args[0]): # This is the case where the decorator is just @ray.remote without parameters. return args[0] return lambda cls_or_func: cls_or_func ray.r...
true
true
f737bc1d64812e1d2042f738413b35599b3c150d
321
py
Python
python/pluralsight-python-fundamental/palindrome/setup.py
renweizhukov/learning-ml
0047d09ee2924f010dd868a454aedb7e098d6d74
[ "Apache-2.0" ]
null
null
null
python/pluralsight-python-fundamental/palindrome/setup.py
renweizhukov/learning-ml
0047d09ee2924f010dd868a454aedb7e098d6d74
[ "Apache-2.0" ]
null
null
null
python/pluralsight-python-fundamental/palindrome/setup.py
renweizhukov/learning-ml
0047d09ee2924f010dd868a454aedb7e098d6d74
[ "Apache-2.0" ]
null
null
null
from distutils.core import setup setup( name='palindrome', version='1.0', py_modules=['palindrome'], # metadata author='Austin Bingham', author_email='austin@sixty-north.com', description='A module for finding palindromic numbers', license='Public domain', keywords='example', )...
21.4
59
0.666667
from distutils.core import setup setup( name='palindrome', version='1.0', py_modules=['palindrome'], author='Austin Bingham', author_email='austin@sixty-north.com', description='A module for finding palindromic numbers', license='Public domain', keywords='example', )
true
true
f737bc61cb4d804038027420d7e398ec2bd3b8f3
8,097
py
Python
CloneHero/clone_hero_to_generic.py
Crazychicken563/RhythmGameCharterAI
d9647007010ecc9a7ecc93d998527e578d4b12c6
[ "MIT" ]
null
null
null
CloneHero/clone_hero_to_generic.py
Crazychicken563/RhythmGameCharterAI
d9647007010ecc9a7ecc93d998527e578d4b12c6
[ "MIT" ]
null
null
null
CloneHero/clone_hero_to_generic.py
Crazychicken563/RhythmGameCharterAI
d9647007010ecc9a7ecc93d998527e578d4b12c6
[ "MIT" ]
null
null
null
import os import re import pickle as pkl import soundfile as sf import numpy as np def safeAdd(src, key, val): if key in src: src[key].update(val) else: src[key] = val source_dir = "clone_hero_data/clonehero-win64/songs" def main(): for (dirpath, dirnames, filenames) in os.walk(source_dir)...
49.981481
132
0.395579
import os import re import pickle as pkl import soundfile as sf import numpy as np def safeAdd(src, key, val): if key in src: src[key].update(val) else: src[key] = val source_dir = "clone_hero_data/clonehero-win64/songs" def main(): for (dirpath, dirnames, filenames) in os.walk(source_dir)...
true
true
f737bc631fb6a75ccc6157f533c72fd643ddf548
2,622
py
Python
utils/siScore_utils.py
DonghyunAhn/sadvirus
cdcc98812d613962a7003ff0c6013d0805bde024
[ "MIT" ]
null
null
null
utils/siScore_utils.py
DonghyunAhn/sadvirus
cdcc98812d613962a7003ff0c6013d0805bde024
[ "MIT" ]
null
null
null
utils/siScore_utils.py
DonghyunAhn/sadvirus
cdcc98812d613962a7003ff0c6013d0805bde024
[ "MIT" ]
null
null
null
import glob import torch import numpy as np from skimage import io, transform from torchvision import transforms import torchvision.transforms.functional as F from torch.utils.data import Dataset from PIL import Image import random class ClusterDataset(Dataset): def __init__(self, cluster_list, dir_name, transfor...
28.5
99
0.580854
import glob import torch import numpy as np from skimage import io, transform from torchvision import transforms import torchvision.transforms.functional as F from torch.utils.data import Dataset from PIL import Image import random class ClusterDataset(Dataset): def __init__(self, cluster_list, dir_name, transfor...
true
true
f737bca3cf5991e819f9ca0c711d9f13118a3909
378
py
Python
tests/admin_client/test_get_server.py
constructpm/pysyncgateway
653db702b2f872e18fa15ab41920276ffc07aa45
[ "Apache-2.0" ]
2
2018-04-04T17:13:25.000Z
2018-07-21T13:30:42.000Z
tests/admin_client/test_get_server.py
constructpm/pysyncgateway
653db702b2f872e18fa15ab41920276ffc07aa45
[ "Apache-2.0" ]
14
2018-03-22T11:35:28.000Z
2021-11-12T17:46:54.000Z
tests/admin_client/test_get_server.py
constructpm/pysyncgateway
653db702b2f872e18fa15ab41920276ffc07aa45
[ "Apache-2.0" ]
1
2018-06-15T13:37:00.000Z
2018-06-15T13:37:00.000Z
def test(admin_client, syncgateway_version_str): result = admin_client.get_server() assert isinstance(result, dict) assert sorted(list(result)) == [ "ADMIN", "couchdb", "vendor", "version", ] assert result["ADMIN"] is True assert result["version"].startswith("Cou...
29.076923
101
0.645503
def test(admin_client, syncgateway_version_str): result = admin_client.get_server() assert isinstance(result, dict) assert sorted(list(result)) == [ "ADMIN", "couchdb", "vendor", "version", ] assert result["ADMIN"] is True assert result["version"].startswith("Cou...
true
true
f737bcb56b7ef2f3a6e20d6da0892e43a2c83a82
17,863
py
Python
env/Lib/site-packages/IPython/core/shellapp.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2
2022-02-26T11:19:40.000Z
2022-03-28T08:23:25.000Z
env/Lib/site-packages/IPython/core/shellapp.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
null
null
null
env/Lib/site-packages/IPython/core/shellapp.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
1
2022-03-28T09:19:34.000Z
2022-03-28T09:19:34.000Z
# encoding: utf-8 """ A mixin for :class:`~IPython.core.application.Application` classes that launch InteractiveShell instances, load extensions, etc. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import glob from itertools import chain import os import sys ...
39.432671
100
0.600459
import glob from itertools import chain import os import sys from traitlets.config.application import boolean_flag from traitlets.config.configurable import Configurable from traitlets.config.loader import Config from IPython.core.application import SYSTEM_CONFIG_DIRS, ENV_CONFIG_DIRS from IPython.core import pyl...
true
true
f737be41539176acb9dc0dc3f1d6dc4462e252f6
738
py
Python
setup.py
IgnacioGarrido/Gavl
453fa0e1da5f43696cb4f943e749a8bfd16c6f87
[ "MIT" ]
null
null
null
setup.py
IgnacioGarrido/Gavl
453fa0e1da5f43696cb4f943e749a8bfd16c6f87
[ "MIT" ]
null
null
null
setup.py
IgnacioGarrido/Gavl
453fa0e1da5f43696cb4f943e749a8bfd16c6f87
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="Gavl-Ignacio-Garrido-Botella", # Replace with your own username version="1.0.1", author="Ignacio Garrido Botella", author_email="ignaciogabo95@gmail.com", description="Framework to launch ...
35.142857
97
0.693767
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="Gavl-Ignacio-Garrido-Botella", version="1.0.1", author="Ignacio Garrido Botella", author_email="ignaciogabo95@gmail.com", description="Framework to launch a genetic algorithm with chromos...
true
true
f737bf2f8e1560b7e9d9155861d2bbfdb2f267f1
9,445
py
Python
vmraid/parallel_test_runner.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/parallel_test_runner.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/parallel_test_runner.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
import json import os import re import sys import time import unittest import click import vmraid import requests from .test_runner import (SLOW_TEST_THRESHOLD, make_test_records, set_test_email_config) click_ctx = click.get_current_context(True) if click_ctx: click_ctx.color = True class ParallelTestRunner(): def...
33.374558
93
0.730334
import json import os import re import sys import time import unittest import click import vmraid import requests from .test_runner import (SLOW_TEST_THRESHOLD, make_test_records, set_test_email_config) click_ctx = click.get_current_context(True) if click_ctx: click_ctx.color = True class ParallelTestRunner(): def...
true
true
f737bfbed384e68bf72ef3708819341f6519d1f2
11,841
py
Python
python/hsfs/connection.py
moritzmeister/feature-store-api-old
8d4733bb35627d25b6f877dff451e71467171f6e
[ "Apache-2.0" ]
null
null
null
python/hsfs/connection.py
moritzmeister/feature-store-api-old
8d4733bb35627d25b6f877dff451e71467171f6e
[ "Apache-2.0" ]
null
null
null
python/hsfs/connection.py
moritzmeister/feature-store-api-old
8d4733bb35627d25b6f877dff451e71467171f6e
[ "Apache-2.0" ]
null
null
null
# # Copyright 2020 Logical Clocks AB # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
32.089431
123
0.600034
import os from requests.exceptions import ConnectionError from hsfs.decorators import connected, not_connected from hsfs import engine, client from hsfs.core import feature_store_api, project_api, hosts_api, services_api class Connection: AWS_DEFAULT_REGION = "default" HOPSWORKS_PORT_DEFAULT ...
true
true
f737bfe9fadc96bc835acfc826c69421f47a980c
868
py
Python
oop-for-loop.py
syedmurad1/OOP-Python
d09627269c12ce901677ec1053bdf565861030d7
[ "MIT" ]
null
null
null
oop-for-loop.py
syedmurad1/OOP-Python
d09627269c12ce901677ec1053bdf565861030d7
[ "MIT" ]
null
null
null
oop-for-loop.py
syedmurad1/OOP-Python
d09627269c12ce901677ec1053bdf565861030d7
[ "MIT" ]
null
null
null
for letter in "Syed": print(letter) print("--------------------------------------------------------") friends=["Tom","Ali"] for fr in friends: print(fr) print("--------------------------------------------------------") for num in range(4): print(num) print("------------------------------------------------...
26.30303
65
0.345622
for letter in "Syed": print(letter) print("--------------------------------------------------------") friends=["Tom","Ali"] for fr in friends: print(fr) print("--------------------------------------------------------") for num in range(4): print(num) print("------------------------------------------------...
true
true
f737c27741b148ed85db27868dcdd835a85afc21
2,437
py
Python
sdk/python/pulumi_aws/waf/regex_pattern_set.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/waf/regex_pattern_set.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/waf/regex_pattern_set.py
Charliekenney23/pulumi-aws
55bd0390160d27350b297834026fee52114a2d41
[ "ECL-2.0", "Apache-2.0" ]
1
2021-03-08T15:05:29.000Z
2021-03-08T15:05:29.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class RegexPatternSet(pulumi.CustomRe...
39.95082
163
0.677472
import json import warnings import pulumi import pulumi.runtime from .. import utilities, tables class RegexPatternSet(pulumi.CustomResource): name: pulumi.Output[str] regex_pattern_strings: pulumi.Output[list] def __init__(__self__, resource_name, opts=None, name=None, regex_pattern_strings=None, __na...
true
true
f737c2c340b88424a22af1b44c6a868e18dc3868
10,086
py
Python
build/PureCloudPlatformClientV2/models/journey_outcome_events_notification_browser.py
MyPureCloud/platform-client-sdk-python
51249f4c655a1c8a67561c9eaa852ef95e25e57d
[ "MIT" ]
10
2019-02-22T00:27:08.000Z
2021-09-12T23:23:44.000Z
build/PureCloudPlatformClientV2/models/journey_outcome_events_notification_browser.py
MyPureCloud/platform-client-sdk-python
51249f4c655a1c8a67561c9eaa852ef95e25e57d
[ "MIT" ]
5
2018-06-07T08:32:00.000Z
2021-07-28T17:37:26.000Z
build/PureCloudPlatformClientV2/models/journey_outcome_events_notification_browser.py
MyPureCloud/platform-client-sdk-python
51249f4c655a1c8a67561c9eaa852ef95e25e57d
[ "MIT" ]
6
2020-04-09T17:43:07.000Z
2022-02-17T08:48:05.000Z
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
27.632877
100
0.614614
from pprint import pformat from six import iteritems import re import json from ..utils import sanitize_for_serialization class JourneyOutcomeEventsNotificationBrowser(object): def __init__(self): self.swagger_types = { 'family': 'str', 'version': 'str', 'lang': 'str...
true
true
f737c2d0235797af3042f44c846b9ab021f14721
3,142
py
Python
qutip/tests/test_tensor.py
kiuthed/qutip
b6fb8e5bbd9ffeae117b54e56313e8617038deab
[ "BSD-3-Clause" ]
null
null
null
qutip/tests/test_tensor.py
kiuthed/qutip
b6fb8e5bbd9ffeae117b54e56313e8617038deab
[ "BSD-3-Clause" ]
null
null
null
qutip/tests/test_tensor.py
kiuthed/qutip
b6fb8e5bbd9ffeae117b54e56313e8617038deab
[ "BSD-3-Clause" ]
null
null
null
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
37.404762
79
0.659134
true
true
f737c38e50e881ea56d893e423192259ae1551aa
26,436
py
Python
fpga/mqnic/fb2CG/fpga_25g/tb/fpga_core/test_fpga_core.py
Vic0428/corundum
aa0915d61dc0ca394183fa6e5e40b4883141f4e5
[ "BSD-2-Clause-FreeBSD" ]
1
2022-02-17T22:05:14.000Z
2022-02-17T22:05:14.000Z
fpga/mqnic/fb2CG/fpga_25g/tb/fpga_core/test_fpga_core.py
Vic0428/corundum
aa0915d61dc0ca394183fa6e5e40b4883141f4e5
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
fpga/mqnic/fb2CG/fpga_25g/tb/fpga_core/test_fpga_core.py
Vic0428/corundum
aa0915d61dc0ca394183fa6e5e40b4883141f4e5
[ "BSD-2-Clause-FreeBSD" ]
1
2021-07-27T10:20:24.000Z
2021-07-27T10:20:24.000Z
""" Copyright 2020, The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
41.17757
120
0.676388
import logging import os import sys import scapy.utils from scapy.layers.l2 import Ether from scapy.layers.inet import IP, UDP import cocotb_test.simulator import cocotb from cocotb.log import SimLog from cocotb.clock import Clock from cocotb.triggers import RisingEdge, FallingEdge, Timer from cocotbext.axi import...
true
true
f737c4729852b474fe5ede0528e9a5dfdb750a4c
2,331
py
Python
code/test/test.py
selinozdas/ObsCo
296c0fbac97612b50bca03ccb24b8851781952ac
[ "MIT" ]
1
2018-10-22T18:44:31.000Z
2018-10-22T18:44:31.000Z
code/test/test.py
selinozdas/epsikon
296c0fbac97612b50bca03ccb24b8851781952ac
[ "MIT" ]
null
null
null
code/test/test.py
selinozdas/epsikon
296c0fbac97612b50bca03ccb24b8851781952ac
[ "MIT" ]
null
null
null
from flask import Flask, jsonify from flask_pymongo import PyMongo app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/obsco" mongo = PyMongo(app) @app.route('/users/<int:userId>', methods=['GET']) def get_user(name = '', userId = -1): users = mongo.db.users results = [] #N...
33.782609
109
0.55384
from flask import Flask, jsonify from flask_pymongo import PyMongo app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/obsco" mongo = PyMongo(app) @app.route('/users/<int:userId>', methods=['GET']) def get_user(name = '', userId = -1): users = mongo.db.users results = [] ...
true
true
f737c50464d41648a3cb6c909e3a5fa4f084adea
2,351
py
Python
scripts/ipu/inference_gen_galaxy.py
BastienArcelin/IPU-GPU
dde946686478ce77a06821a1517b5b8206ab8de9
[ "BSD-3-Clause" ]
null
null
null
scripts/ipu/inference_gen_galaxy.py
BastienArcelin/IPU-GPU
dde946686478ce77a06821a1517b5b8206ab8de9
[ "BSD-3-Clause" ]
null
null
null
scripts/ipu/inference_gen_galaxy.py
BastienArcelin/IPU-GPU
dde946686478ce77a06821a1517b5b8206ab8de9
[ "BSD-3-Clause" ]
null
null
null
## Load necessary librairies import numpy as np import tensorflow as tf import tensorflow_probability as tfp tfk = tf.keras tfkl = tfk.layers tfd = tfp.distributions tfb = tfp.bijectors import time import sys sys.path.insert(0,'') from flow import * import utils_vae # IPU from tensorflow.compiler.plugin.poplar.ops ...
29.3875
164
0.68524
tensorflow as tf import tensorflow_probability as tfp tfk = tf.keras tfkl = tfk.layers tfd = tfp.distributions tfb = tfp.bijectors import time import sys sys.path.insert(0,'') from flow import * import utils_vae from tensorflow.compiler.plugin.poplar.ops import gen_ipu_ops from tensorflow.python import ipu from ten...
true
true
f737c5deb7e3adca1ac7a29b0ec85a81b591e9d0
11,520
py
Python
osbrain/tests/test_nameserver.py
RezaBehzadpour/osbrain
1b7061bfa6bcfa2176685081fd39c5c971107d51
[ "Apache-2.0" ]
176
2016-07-12T20:05:32.000Z
2022-01-18T10:12:07.000Z
osbrain/tests/test_nameserver.py
RezaBehzadpour/osbrain
1b7061bfa6bcfa2176685081fd39c5c971107d51
[ "Apache-2.0" ]
358
2016-08-04T09:21:35.000Z
2021-10-15T07:20:07.000Z
osbrain/tests/test_nameserver.py
RezaBehzadpour/osbrain
1b7061bfa6bcfa2176685081fd39c5c971107d51
[ "Apache-2.0" ]
50
2016-07-17T11:52:36.000Z
2021-05-10T14:48:45.000Z
""" Test file for nameserver. """ import multiprocessing import os import random import time from threading import Timer import pytest from osbrain import Agent from osbrain import AgentProcess from osbrain import NameServer from osbrain import NSProxy from osbrain import Proxy from osbrain import SocketAddress from ...
27.961165
79
0.67526
import multiprocessing import os import random import time from threading import Timer import pytest from osbrain import Agent from osbrain import AgentProcess from osbrain import NameServer from osbrain import NSProxy from osbrain import Proxy from osbrain import SocketAddress from osbrain import run_agent from osbr...
true
true
f737c664b454fe361ef537964ca226eec7e50c7a
12,998
py
Python
open/NVIDIA/scripts/update_results.py
wom-ai/inference_results_v1.0
af4bfffd5b6c4815f305a272cb42ae6de09f44e1
[ "Apache-2.0" ]
null
null
null
open/NVIDIA/scripts/update_results.py
wom-ai/inference_results_v1.0
af4bfffd5b6c4815f305a272cb42ae6de09f44e1
[ "Apache-2.0" ]
24
2021-07-19T01:09:35.000Z
2022-03-17T11:44:02.000Z
open/NVIDIA/scripts/update_results.py
wom-ai/inference_results_v1.0
af4bfffd5b6c4815f305a272cb42ae6de09f44e1
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python3 # 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 # # ...
43.039735
151
0.590783
import os import sys sys.path.insert(0, os.getcwd()) import re import sys import shutil import glob import argparse import datetime import json from scripts.utils import Tree, SortingCriteria, get_system_type SCENARIO_PERF_RES_METADATA = { "Offline": (r"Samples per second: (\d+\.?\d*e?[-+]?\d...
true
true
f737c7504b046270f8b55cc91eebf2c59dfcdb24
496
py
Python
aspc/coursesearch/management/commands/smart_update.py
DDKZ/mainsite
425a8e147a17b6bdd1af420460a9ea83462252fc
[ "MIT" ]
null
null
null
aspc/coursesearch/management/commands/smart_update.py
DDKZ/mainsite
425a8e147a17b6bdd1af420460a9ea83462252fc
[ "MIT" ]
null
null
null
aspc/coursesearch/management/commands/smart_update.py
DDKZ/mainsite
425a8e147a17b6bdd1af420460a9ea83462252fc
[ "MIT" ]
null
null
null
import logging import pyodbc from django.conf import settings from django.core.management.base import BaseCommand, CommandError from aspc.coursesearch.tasks import smart_update as update_task logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = """Performs a conditional update of ...
31
68
0.733871
import logging import pyodbc from django.conf import settings from django.core.management.base import BaseCommand, CommandError from aspc.coursesearch.tasks import smart_update as update_task logger = logging.getLogger(__name__) class Command(BaseCommand): args = '' help = """Performs a conditional update of ...
true
true
f737c809f04dd6e50834dc16dae05718533e95cb
1,532
py
Python
src/robot/version.py
sipke/robotframework
81e8251978d421227e784037c18d53777e6c248a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/version.py
sipke/robotframework
81e8251978d421227e784037c18d53777e6c248a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/version.py
sipke/robotframework
81e8251978d421227e784037c18d53777e6c248a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
32.595745
77
0.626632
import re import sys VERSION = '3.2.3.dev1' def get_version(naked=False): if naked: return re.split('(a|b|rc|.dev)', VERSION)[0] return VERSION def get_full_version(program=None, naked=False): version = '%s %s (%s %s on %s)' % (program or '', ...
true
true
f737ca83e3ca6c7f50e9c4149437ed42554fd0da
1,612
py
Python
aliyun-python-sdk-ccc/aliyunsdkccc/request/v20170705/GetUserByExtensionRequest.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ccc/aliyunsdkccc/request/v20170705/GetUserByExtensionRequest.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ccc/aliyunsdkccc/request/v20170705/GetUserByExtensionRequest.py
ankitdobhal/aliyun-openapi-python-sdk
991b1c2d91adc468480defc23ba790d4369cce7b
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.636364
77
0.766749
from aliyunsdkcore.request import RpcRequest from aliyunsdkccc.endpoint import endpoint_data class GetUserByExtensionRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'CCC', '2017-07-05', 'GetUserByExtension','CCC') self.set_method('POST') if hasattr(self, "endpoint_map"): ...
true
true
f737cc1f8fc969edb5787cb99f4efb813d708da0
5,194
py
Python
tests/test_genome_dataset.py
xduan7/dl-bio-seqs
72287509508ed50e16c5b26d6db0cf687bbfe94b
[ "MIT" ]
4
2020-10-03T08:57:01.000Z
2021-03-13T19:21:06.000Z
tests/test_genome_dataset.py
xduan7/dl-bio-seqs
72287509508ed50e16c5b26d6db0cf687bbfe94b
[ "MIT" ]
null
null
null
tests/test_genome_dataset.py
xduan7/dl-bio-seqs
72287509508ed50e16c5b26d6db0cf687bbfe94b
[ "MIT" ]
1
2020-10-03T08:57:03.000Z
2020-10-03T08:57:03.000Z
""" File Name: test_masked_genome_dataset.py Project: bioseq-learning File Description: """ import os import time import random import logging import unittest from typing import List from torch.utils.data import DataLoader from src import E_COLI_GENOME_PARENT_DIR_PATH from src.datasets.genome_da...
37.366906
79
0.669619
import os import time import random import logging import unittest from typing import List from torch.utils.data import DataLoader from src import E_COLI_GENOME_PARENT_DIR_PATH from src.datasets.genome_dataset import GenomeDataset, GenomeIterDataset from src.datasets.genome_dataset import \ PADDING_CHAR, NUCLEOTI...
true
true
f737cccc194654a1c722187f2a80a8228f3d53cc
5,229
py
Python
ECore_Copier_MM/transformation-Large/HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnotationEStringToStringMapEntry.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
ECore_Copier_MM/transformation-Large/HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnotationEStringToStringMapEntry.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
ECore_Copier_MM/transformation-Large/HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnotationEStringToStringMapEntry.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
from core.himesis import Himesis class HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnotationEStringToStringMapEntry(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnot...
50.278846
298
0.562631
from core.himesis import Himesis class HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnotationEStringToStringMapEntry(Himesis): def __init__(self): self.is_compiled = True super(HeannotationOUTdetailsSolveRefEAnnotationEStringToStringMapEntryEAnnotationEStrin...
true
true
f737cdc6b276f325296e721ec6026d32ab8eaed7
2,974
py
Python
server/authentication_service/app/tests/test_auth.py
vartanbeno/SOEN487-Project
dce582cc1c78bca6400411aa93de746f3c950061
[ "MIT" ]
null
null
null
server/authentication_service/app/tests/test_auth.py
vartanbeno/SOEN487-Project
dce582cc1c78bca6400411aa93de746f3c950061
[ "MIT" ]
null
null
null
server/authentication_service/app/tests/test_auth.py
vartanbeno/SOEN487-Project
dce582cc1c78bca6400411aa93de746f3c950061
[ "MIT" ]
null
null
null
import json from unittest import TestCase from app import create_app, db as test_db from app.config import TestConfig from app.models import User, Verification test_app = create_app(TestConfig) class TestAuth(TestCase): def setUp(self): context = test_app.app_context() context.push() s...
35.831325
103
0.665098
import json from unittest import TestCase from app import create_app, db as test_db from app.config import TestConfig from app.models import User, Verification test_app = create_app(TestConfig) class TestAuth(TestCase): def setUp(self): context = test_app.app_context() context.push() s...
true
true
f737cfc63e3de1d5c3969e01c6843e5da2a0cd68
1,676
py
Python
usb_test.py
SicariusNoctis/eagle-eye-tracker
31e160057f1d2fa2c5fbd94ba4f5e9d064481c77
[ "MIT" ]
5
2018-02-10T00:59:29.000Z
2018-08-18T06:38:45.000Z
usb_test.py
SicariusNoctis/eagle-eye-tracker
31e160057f1d2fa2c5fbd94ba4f5e9d064481c77
[ "MIT" ]
7
2018-05-11T21:48:00.000Z
2018-08-07T11:31:51.000Z
usb_test.py
SicariusNoctis/eagle-eye-tracker
31e160057f1d2fa2c5fbd94ba4f5e9d064481c77
[ "MIT" ]
1
2019-09-10T01:03:25.000Z
2019-09-10T01:03:25.000Z
#!/usr/bin/env python2 import time import nxt.usbsock import nxt.locator class CommunicatorNXT(object): def __init__(self): self.remote_inbox = 1 self.local_inbox = 2 self.mac_address = '00:16:53:01:B8:C3' # self.brick = nxt.usbsock.USBSock(self.mac_address).connect() self...
26.603175
79
0.576969
import time import nxt.usbsock import nxt.locator class CommunicatorNXT(object): def __init__(self): self.remote_inbox = 1 self.local_inbox = 2 self.mac_address = '00:16:53:01:B8:C3' self.brick = nxt.locator.find_one_brick() def send_test(self): for inbox in...
true
true
f737d1710e6966d7d6163431e2a298e0f833f286
9,309
py
Python
zigbee/packet_parser.py
chawasit/BackyardZigbee
522e10a73f7b5add6870de8e1e907f486de60cbd
[ "Unlicense" ]
null
null
null
zigbee/packet_parser.py
chawasit/BackyardZigbee
522e10a73f7b5add6870de8e1e907f486de60cbd
[ "Unlicense" ]
null
null
null
zigbee/packet_parser.py
chawasit/BackyardZigbee
522e10a73f7b5add6870de8e1e907f486de60cbd
[ "Unlicense" ]
null
null
null
# Copyright (c) 2015 Supakorn Yukonthong import logging import struct class Parser: def __init__(self, log_level=None): self.logger = logging self.logger.basicConfig(level=log_level) self.logger.debug("DEBUG MODE ON") def parse(self, bc): self.logger.debug("Input Byte code : ...
53.5
120
0.486196
import logging import struct class Parser: def __init__(self, log_level=None): self.logger = logging self.logger.basicConfig(level=log_level) self.logger.debug("DEBUG MODE ON") def parse(self, bc): self.logger.debug("Input Byte code : " + str(bc)) packet_temp = {} ...
true
true
f737d18b4f854215789d4068e868db9ac33e324e
1,001
py
Python
Algorithms/Medium/34. Find First and Last Position of Element in Sorted Array/answer.py
KenWoo/Algorithm
4012a2f0a099a502df1e5df2e39faa75fe6463e8
[ "Apache-2.0" ]
null
null
null
Algorithms/Medium/34. Find First and Last Position of Element in Sorted Array/answer.py
KenWoo/Algorithm
4012a2f0a099a502df1e5df2e39faa75fe6463e8
[ "Apache-2.0" ]
null
null
null
Algorithms/Medium/34. Find First and Last Position of Element in Sorted Array/answer.py
KenWoo/Algorithm
4012a2f0a099a502df1e5df2e39faa75fe6463e8
[ "Apache-2.0" ]
null
null
null
from typing import List class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: if not nums: return [-1, -1] N = len(nums) left = 0 right = N - 1 while left < right: mid = (left + right) // 2 if nums[mid] == targ...
26.342105
69
0.436563
from typing import List class Solution: def searchRange(self, nums: List[int], target: int) -> List[int]: if not nums: return [-1, -1] N = len(nums) left = 0 right = N - 1 while left < right: mid = (left + right) // 2 if nums[mid] == targ...
true
true
f737d1a7e71abc82e32858b924b4b9ad9c4dedd6
6,981
py
Python
src/toil/provisioners/abstractProvisioner.py
david4096/toil
491e3cceafc2462395bb83ce759da7b008bb27f3
[ "Apache-2.0" ]
null
null
null
src/toil/provisioners/abstractProvisioner.py
david4096/toil
491e3cceafc2462395bb83ce759da7b008bb27f3
[ "Apache-2.0" ]
1
2017-10-28T00:39:00.000Z
2017-10-28T00:39:00.000Z
src/toil/provisioners/abstractProvisioner.py
david4096/toil
491e3cceafc2462395bb83ce759da7b008bb27f3
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2015-2016 Regents of the University of California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
35.257576
107
0.67741
from builtins import object import logging from abc import ABCMeta, abstractmethod from collections import namedtuple from bd2k.util.retry import never from future.utils import with_metaclass log = logging.getLogger(__name__) Shape = namedtuple("_Shape", "wallTime memory cores disk preemptable") ...
true
true
f737d293946a880afe9fe48eb38305bc94ad3c9a
1,590
py
Python
recommender/movierecommender/management/commands/load_movies.py
ibm-developer-skills-network/oroir-Build-a-Personal-Movie-Recommender-with-Django
fbc681cdea067c0cee91c158c632f83cff9db936
[ "Apache-2.0" ]
null
null
null
recommender/movierecommender/management/commands/load_movies.py
ibm-developer-skills-network/oroir-Build-a-Personal-Movie-Recommender-with-Django
fbc681cdea067c0cee91c158c632f83cff9db936
[ "Apache-2.0" ]
null
null
null
recommender/movierecommender/management/commands/load_movies.py
ibm-developer-skills-network/oroir-Build-a-Personal-Movie-Recommender-with-Django
fbc681cdea067c0cee91c158c632f83cff9db936
[ "Apache-2.0" ]
null
null
null
import csv import pandas as pd from django.core.management import BaseCommand from ...models import Movie class Command(BaseCommand): help = 'Load a movie csv file into the database' def add_arguments(self, parser): parser.add_argument('--path', type=str) def handle(self, *args, **kwargs): ...
38.780488
98
0.557233
import csv import pandas as pd from django.core.management import BaseCommand from ...models import Movie class Command(BaseCommand): help = 'Load a movie csv file into the database' def add_arguments(self, parser): parser.add_argument('--path', type=str) def handle(self, *args, **kwargs): ...
true
true
f737d2c6fe7baa4f6ad13420d61f7654a55cb13b
587
py
Python
exercises/solution_01_11.py
tuomastik/spacy-course
bb7cba6aea221289cf078f36233813794c32f84c
[ "MIT" ]
4
2019-12-31T05:45:44.000Z
2021-04-20T23:20:03.000Z
exercises/solution_01_11.py
tuomastik/spacy-course
bb7cba6aea221289cf078f36233813794c32f84c
[ "MIT" ]
null
null
null
exercises/solution_01_11.py
tuomastik/spacy-course
bb7cba6aea221289cf078f36233813794c32f84c
[ "MIT" ]
2
2019-10-05T15:13:14.000Z
2021-06-23T18:36:39.000Z
import spacy # Import the Matcher from spacy.matcher import Matcher nlp = spacy.load("en_core_web_sm") doc = nlp("New iPhone X release date leaked as Apple reveals pre-orders by mistake") # Initialize the Matcher with the shared vocabulary matcher = Matcher(nlp.vocab) # Create a pattern matching two tokens: "iPhone...
27.952381
84
0.732538
import spacy from spacy.matcher import Matcher nlp = spacy.load("en_core_web_sm") doc = nlp("New iPhone X release date leaked as Apple reveals pre-orders by mistake") matcher = Matcher(nlp.vocab) pattern = [{"TEXT": "iPhone"}, {"TEXT": "X"}] matcher.add("IPHONE_X_PATTERN", None, pattern) matches = matcher(do...
true
true
f737d32efd3f2b5cdb50bf398eea7aa01fa1fd1d
39
py
Python
camera/__init__.py
projectweekend/Pi-Camera-Time-Lapse
bd91c682dbb1280c2f14c6f5a454d1dc10fc0fda
[ "MIT" ]
7
2015-02-25T08:23:57.000Z
2017-12-21T17:07:49.000Z
camera/__init__.py
projectweekend/Pi-Camera-Time-Lapse
bd91c682dbb1280c2f14c6f5a454d1dc10fc0fda
[ "MIT" ]
2
2015-06-04T15:14:11.000Z
2015-09-17T18:27:38.000Z
camera/__init__.py
projectweekend/Pi-Camera-Time-Lapse
bd91c682dbb1280c2f14c6f5a454d1dc10fc0fda
[ "MIT" ]
4
2015-04-04T08:14:54.000Z
2018-03-10T04:28:17.000Z
from .camera import ConfigurableCamera
19.5
38
0.871795
from .camera import ConfigurableCamera
true
true
f737d3c627db4142c5f5067a37535a346f3a9ec6
5,202
py
Python
src/sentry/integrations/slack/event_endpoint.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
2
2019-03-04T12:45:54.000Z
2019-03-04T12:45:55.000Z
src/sentry/integrations/slack/event_endpoint.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
1
2020-11-05T14:54:44.000Z
2020-11-19T21:54:19.000Z
src/sentry/integrations/slack/event_endpoint.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
1
2017-02-09T06:36:57.000Z
2017-02-09T06:36:57.000Z
from __future__ import absolute_import import json import re import six from collections import defaultdict from django.conf import settings from django.db.models import Q from sentry import http from sentry.api.base import Endpoint from sentry.incidents.models import Incident from sentry.models import Group, Projec...
31.337349
88
0.626682
from __future__ import absolute_import import json import re import six from collections import defaultdict from django.conf import settings from django.db.models import Q from sentry import http from sentry.api.base import Endpoint from sentry.incidents.models import Incident from sentry.models import Group, Projec...
true
true
f737d3cb983618e3006ff957d2807cfb24bc7631
4,484
py
Python
vendor/bundle/ruby/2.2.0/gems/amq-protocol-1.9.2/codegen/codegen.py
yoshiekiura/algopeatio
e97ae5f507a0567302dbece05fedeedc4b7b83c8
[ "MIT" ]
1
2021-08-28T00:07:05.000Z
2021-08-28T00:07:05.000Z
vendor/bundle/ruby/2.2.0/gems/amq-protocol-1.9.2/codegen/codegen.py
yoshiekiura/algopeatio
e97ae5f507a0567302dbece05fedeedc4b7b83c8
[ "MIT" ]
null
null
null
vendor/bundle/ruby/2.2.0/gems/amq-protocol-1.9.2/codegen/codegen.py
yoshiekiura/algopeatio
e97ae5f507a0567302dbece05fedeedc4b7b83c8
[ "MIT" ]
1
2020-11-04T03:27:25.000Z
2020-11-04T03:27:25.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Documentation for Mako templates: # http://www.makotemplates.org/docs/syntax.html import os, sys, re sys.path.append(os.path.join("codegen", "rabbitmq-codegen")) from amqp_codegen import * try: from mako.template import Template except ImportError: print "Mako...
29.5
165
0.656334
import os, sys, re sys.path.append(os.path.join("codegen", "rabbitmq-codegen")) from amqp_codegen import * try: from mako.template import Template except ImportError: print "Mako isn't installed. Please install mako via pip or similar." sys.exit(1) # main class class AmqpSpecObject(AmqpSpec): I...
false
true
f737d416ec73c95a39aa1b7f244b521f02e71b7b
2,890
py
Python
apps/network/src/app/workers/worker.py
next-fernandocerezal/PyGrid
b82793b0beecd26338c102573a9891c2e86707c8
[ "Apache-2.0" ]
1
2021-10-05T18:57:02.000Z
2021-10-05T18:57:02.000Z
apps/network/src/app/workers/worker.py
next-fernandocerezal/PyGrid
b82793b0beecd26338c102573a9891c2e86707c8
[ "Apache-2.0" ]
null
null
null
apps/network/src/app/workers/worker.py
next-fernandocerezal/PyGrid
b82793b0beecd26338c102573a9891c2e86707c8
[ "Apache-2.0" ]
null
null
null
import json import re import time import requests from ..codes import MSG_FIELD, NODE_EVENTS, WORKER_PROPERTIES from ..utils.wrappers import threaded class Worker(object): """Worker class for running PySyft models for training and inference.""" def __init__(self, id: str, socket): """ Args: ...
33.218391
84
0.589965
import json import re import time import requests from ..codes import MSG_FIELD, NODE_EVENTS, WORKER_PROPERTIES from ..utils.wrappers import threaded class Worker(object): def __init__(self, id: str, socket): self._id = id self._socket = socket self._ping = 0 self._status = WORK...
true
true
f737d47b1eddc283ce847210b522db2fcb465720
13,738
py
Python
coherence/backends/lolcats_storage.py
wd8rde/Coherence
792ee3ddf28e4748c116056915a2bb7155137e7f
[ "MIT" ]
null
null
null
coherence/backends/lolcats_storage.py
wd8rde/Coherence
792ee3ddf28e4748c116056915a2bb7155137e7f
[ "MIT" ]
null
null
null
coherence/backends/lolcats_storage.py
wd8rde/Coherence
792ee3ddf28e4748c116056915a2bb7155137e7f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright 2008, Benjamin Kampmann <ben.kampmann@googlemail.com> """ This is a Media Backend that allows you to access the cool and cute pictures from lolcats.com. This is mainly meant as a Sample Media Backend...
40.052478
146
0.657883
""" This is a Media Backend that allows you to access the cool and cute pictures from lolcats.com. This is mainly meant as a Sample Media Backend to learn how to write a Media Backend. So. You are still reading which allows me to assume that you want to learn how to write a Media Backend for Coherence. NICE :) ...
false
true
f737d559e8be3e1a63af2c0350c54df4358f479d
2,718
py
Python
helpers/Testing_augmented_Lagrangian.py
ContactEngineering/Adhesion
acc46ad9bfe49fec667cb9a116ebde426faa38c4
[ "MIT" ]
null
null
null
helpers/Testing_augmented_Lagrangian.py
ContactEngineering/Adhesion
acc46ad9bfe49fec667cb9a116ebde426faa38c4
[ "MIT" ]
4
2021-08-18T07:30:57.000Z
2022-03-05T11:05:09.000Z
helpers/Testing_augmented_Lagrangian.py
ContactEngineering/Adhesion
acc46ad9bfe49fec667cb9a116ebde426faa38c4
[ "MIT" ]
null
null
null
# # Copyright 2020 Antoine Sanner # 2020 Lars Pastewka # 2015-2016 Till Junge # # ### MIT license # # 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, in...
34.405063
189
0.682855
imize sys.path.append(os.path.join(os.getcwd(), "../PyCo/Tools/")) from AugmentedLagrangian import augmented_lagrangian : return (x[0]**2 + x[1]**2 - 1) - x[0] def constraint(x): return x[0]**2 + x[1]**2 - 1 tol = 1.e-2 result = scipy.optimize.minimize(fun, x0=np.array((-1, .1)), ...
true
true
f737d6d30c063155e7d6bce682455c215f1ea72d
45,415
py
Python
eth/abc.py
davesque/py-evm
d2ccc1e8a9be1cb92cb15a8bb117bb6a1972636e
[ "MIT" ]
null
null
null
eth/abc.py
davesque/py-evm
d2ccc1e8a9be1cb92cb15a8bb117bb6a1972636e
[ "MIT" ]
null
null
null
eth/abc.py
davesque/py-evm
d2ccc1e8a9be1cb92cb15a8bb117bb6a1972636e
[ "MIT" ]
null
null
null
from abc import ( ABC, abstractmethod ) from typing import ( Any, Callable, ContextManager, Dict, Iterable, Iterator, MutableMapping, Optional, Sequence, Tuple, Type, TypeVar, Union, ) from uuid import UUID import rlp from eth_bloom import BloomFilter from ...
23.839895
98
0.568777
from abc import ( ABC, abstractmethod ) from typing import ( Any, Callable, ContextManager, Dict, Iterable, Iterator, MutableMapping, Optional, Sequence, Tuple, Type, TypeVar, Union, ) from uuid import UUID import rlp from eth_bloom import BloomFilter from ...
true
true
f737d72abbe91157bf29e15c1466404568a312f2
1,415
py
Python
discord/__init__.py
multiii/nextcord
f59737da889c8e15f829f66eba9d6203f18036c2
[ "MIT" ]
1
2022-03-25T14:10:51.000Z
2022-03-25T14:10:51.000Z
discord/__init__.py
multiii/nextcord
f59737da889c8e15f829f66eba9d6203f18036c2
[ "MIT" ]
null
null
null
discord/__init__.py
multiii/nextcord
f59737da889c8e15f829f66eba9d6203f18036c2
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2021-present tag-epic 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, merg...
44.21875
76
0.792933
from nextcord import * __title__ = 'nextcord' __author__ = 'tag-epic & Rapptz' __license__ = 'MIT' __copyright__ = 'Copyright 2015-present Rapptz & tag-epic' __version__ = '2.0.0a3' __path__ = __import__('pkgutil').extend_path(__path__, __name__)
true
true
f737d7de8ac8142109ef6afc23040de2431836b6
3,038
py
Python
netdispatch/test/test_agraph.py
GiulioRossetti/netdispatch
abba2c8ac0cf11ab0e0c001ab36d0a065554167c
[ "BSD-2-Clause" ]
null
null
null
netdispatch/test/test_agraph.py
GiulioRossetti/netdispatch
abba2c8ac0cf11ab0e0c001ab36d0a065554167c
[ "BSD-2-Clause" ]
1
2020-05-12T10:17:32.000Z
2020-05-12T10:29:03.000Z
netdispatch/test/test_agraph.py
GiulioRossetti/netdispatch
abba2c8ac0cf11ab0e0c001ab36d0a065554167c
[ "BSD-2-Clause" ]
1
2021-05-05T13:44:09.000Z
2021-05-05T13:44:09.000Z
__author__ = 'Giulio Rossetti' __license__ = "BSD-Clause-2" __email__ = "giulio.rossetti@gmail.com" import unittest import networkx as nx try: import igraph as ig except ModuleNotFoundError: ig = None from netdispatch import AGraph def from_nx_to_igraph(g, directed=False): """ :param g: :param...
24.901639
52
0.561883
__author__ = 'Giulio Rossetti' __license__ = "BSD-Clause-2" __email__ = "giulio.rossetti@gmail.com" import unittest import networkx as nx try: import igraph as ig except ModuleNotFoundError: ig = None from netdispatch import AGraph def from_nx_to_igraph(g, directed=False): if ig is not None: gi...
true
true
f737d870bb634c0df0c37ad6afb21ef085933639
1,439
py
Python
src/python/pants/core/util_rules/distdir.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
1,806
2015-01-05T07:31:00.000Z
2022-03-31T11:35:41.000Z
src/python/pants/core/util_rules/distdir.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
9,565
2015-01-02T19:01:59.000Z
2022-03-31T23:25:16.000Z
src/python/pants/core/util_rules/distdir.py
ryanking/pants
e45b00d2eb467b599966bca262405a5d74d27bdd
[ "Apache-2.0" ]
443
2015-01-06T20:17:57.000Z
2022-03-31T05:28:17.000Z
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from dataclasses import dataclass from pathlib import Path from pants.base.build_root import BuildRoot from pants.engine.rules import collect_rules, rule from pants.option.global_options ...
31.282609
98
0.739402
from dataclasses import dataclass from pathlib import Path from pants.base.build_root import BuildRoot from pants.engine.rules import collect_rules, rule from pants.option.global_options import GlobalOptions def is_child_of(path: Path, directory: Path) -> bool: abs_path = path if path.is_absolute() else direc...
true
true
f737d8c91164f68db6e1e5eec9cb8c98f4a7a75b
5,091
py
Python
src/ipaddress.py
Stephixus/my-weather-indicator
1e1f1984e08ba8d710d1af420c2e68aa9011dcb0
[ "MIT" ]
72
2016-02-12T18:18:50.000Z
2022-02-11T12:37:53.000Z
src/ipaddress.py
Stephixus/my-weather-indicator
1e1f1984e08ba8d710d1af420c2e68aa9011dcb0
[ "MIT" ]
82
2016-03-28T13:26:02.000Z
2022-02-28T13:40:22.000Z
src/ipaddress.py
Stephixus/my-weather-indicator
1e1f1984e08ba8d710d1af420c2e68aa9011dcb0
[ "MIT" ]
21
2016-02-18T05:31:26.000Z
2022-03-03T03:15:31.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of my-weather-indicator # # Copyright (c) 2012 Lorenzo Carbonell Cerezo <a.k.a. atareao> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal #...
35.852113
79
0.66431
import dbus import comun import re import json from functools import partial from collections import namedtuple from geocodeapi import get_inv_direction def convert(dbus_obj): _isinstance = partial(isinstance, dbus_obj) ConvertType = namedtuple('ConvertType', 'pytype dbustypes') ...
true
true
f737dbad17fedcae0adcb0cc22750261edbf69cb
411
py
Python
gobi/urls.py
gowanpeter/gobi
1a237f64ba79ac5878a178baf6179953d4e7a9c9
[ "BSD-3-Clause" ]
null
null
null
gobi/urls.py
gowanpeter/gobi
1a237f64ba79ac5878a178baf6179953d4e7a9c9
[ "BSD-3-Clause" ]
null
null
null
gobi/urls.py
gowanpeter/gobi
1a237f64ba79ac5878a178baf6179953d4e7a9c9
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'tt.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', in...
31.615385
65
0.705596
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
true
true
f737dc677b981aac049756698710b380c1714b45
880
py
Python
config.py
retroxz/bilidm
aa3e2f55e3a283afa1d470901d360b637e6cc2a0
[ "MIT" ]
3
2021-01-11T10:00:08.000Z
2022-02-18T00:37:10.000Z
config.py
retroxz/bilidm
aa3e2f55e3a283afa1d470901d360b637e6cc2a0
[ "MIT" ]
null
null
null
config.py
retroxz/bilidm
aa3e2f55e3a283afa1d470901d360b637e6cc2a0
[ "MIT" ]
null
null
null
import yaml import os # 获取当前文件路径 filePath = os.path.dirname(__file__) # 获取当前文件的Realpath fileNamePath = os.path.split(os.path.realpath(__file__))[0] # 获取配置文件的路径 yamlPath = os.path.join(fileNamePath, 'config.yml') # 加上 ,encoding='utf-8',处理配置文件中含中文出现乱码的情况 yml_read = yaml.load(open(yamlPath, 'r', encoding='utf-8').read(),...
17.959184
90
0.663636
import yaml import os filePath = os.path.dirname(__file__) fileNamePath = os.path.split(os.path.realpath(__file__))[0] yamlPath = os.path.join(fileNamePath, 'config.yml') yml_read = yaml.load(open(yamlPath, 'r', encoding='utf-8').read(), Loader=yaml.FullLoader) def Blive(cls): Dict = yml_read['BLive'] f...
true
true
f737dcbee86581be3c24f9846eb581aeddc5166d
1,002
py
Python
cirq/value/type_alias.py
lilies/Cirq
519b8b70ba4d2d92d1c034c398161ebdbd23e2e7
[ "Apache-2.0" ]
1
2020-04-06T17:06:10.000Z
2020-04-06T17:06:10.000Z
cirq/value/type_alias.py
lilies/Cirq
519b8b70ba4d2d92d1c034c398161ebdbd23e2e7
[ "Apache-2.0" ]
null
null
null
cirq/value/type_alias.py
lilies/Cirq
519b8b70ba4d2d92d1c034c398161ebdbd23e2e7
[ "Apache-2.0" ]
1
2020-04-14T15:29:29.000Z
2020-04-14T15:29:29.000Z
# Copyright 2019 The Cirq Developers # # 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 ...
32.322581
74
0.742515
from typing import Union import sympy from cirq._doc import document TParamKey = Union[str, sympy.Basic] document( TParamKey, """A parameter that a parameter resolver may map to a value.""") TParamVal = Union[float, sympy.Basic] document( TParamVal, """A value that a parameter resol...
true
true
f737dce0a1abddb2fb4b7f3a12d1d24afb756f12
16,223
py
Python
venv/lib/python3.6/site-packages/ansible_collections/sensu/sensu_go/tests/unit/plugins/module_utils/test_utils.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/sensu/sensu_go/tests/unit/plugins/module_utils/test_utils.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/sensu/sensu_go/tests/unit/plugins/module_utils/test_utils.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright: (c) 2019, XLAB Steampunk <steampunk@xlab.si> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type import sys import pytest from ansible_collections.sen...
32.973577
92
0.588177
from __future__ import absolute_import, division, print_function __metaclass__ = type import sys import pytest from ansible_collections.sensu.sensu_go.plugins.module_utils import ( errors, http, utils, ) pytestmark = pytest.mark.skipif( sys.version_info < (2, 7), reason="requires python2.7 or higher" )...
true
true
f737dd83b98f688d966eab9144049062fdc319a7
3,338
py
Python
eth/_utils/rlp.py
dbfreem/py-evm
02a1f6f38884b1f7a89640c2095ea5b0f20687c3
[ "MIT" ]
1,641
2017-11-24T04:24:22.000Z
2022-03-31T14:59:30.000Z
eth/_utils/rlp.py
dbfreem/py-evm
02a1f6f38884b1f7a89640c2095ea5b0f20687c3
[ "MIT" ]
1,347
2017-11-23T10:37:36.000Z
2022-03-20T16:31:44.000Z
eth/_utils/rlp.py
dbfreem/py-evm
02a1f6f38884b1f7a89640c2095ea5b0f20687c3
[ "MIT" ]
567
2017-11-22T18:03:27.000Z
2022-03-28T17:49:08.000Z
import rlp from typing import ( Iterable, Optional, Tuple, ) from eth_utils.toolz import ( curry, ) from eth_utils import ( to_tuple, ValidationError, ) from eth.rlp.blocks import ( BaseBlock, ) @to_tuple def diff_rlp_object(left: BaseBlock, right: BaseBlock) -> Opti...
29.803571
94
0.549131
import rlp from typing import ( Iterable, Optional, Tuple, ) from eth_utils.toolz import ( curry, ) from eth_utils import ( to_tuple, ValidationError, ) from eth.rlp.blocks import ( BaseBlock, ) @to_tuple def diff_rlp_object(left: BaseBlock, right: BaseBlock) -> Opti...
true
true
f737df981cd0555e5579b6a739f205721d094d43
7,916
py
Python
bball_sim/app.py
ian-shepherd/bball_sim
119696eda8d1c1c96da4113c3a41659e1472ebc2
[ "MIT" ]
null
null
null
bball_sim/app.py
ian-shepherd/bball_sim
119696eda8d1c1c96da4113c3a41659e1472ebc2
[ "MIT" ]
null
null
null
bball_sim/app.py
ian-shepherd/bball_sim
119696eda8d1c1c96da4113c3a41659e1472ebc2
[ "MIT" ]
null
null
null
# Packages import streamlit as st import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.patches as mpatches import util # Configure page st.set_page_config(page_title='End of Game NBA Simulator', page_icon='https://raw.githubusercontent.com/papagorgio2...
47.119048
153
0.615589
import streamlit as st import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib.patches as mpatches import util st.set_page_config(page_title='End of Game NBA Simulator', page_icon='https://raw.githubusercontent.com/papagorgio23/Python101/master/newlogo.p...
true
true
f737df9a398aded3b4b036831bbc3efcec6afb8d
2,827
py
Python
docs/conf.py
jules-ch/wind-stats
e9b7cc1e5700ca092d6fd209bd75f83924ef2467
[ "MIT" ]
1
2022-03-18T01:48:31.000Z
2022-03-18T01:48:31.000Z
docs/conf.py
jules-ch/wind-stats
e9b7cc1e5700ca092d6fd209bd75f83924ef2467
[ "MIT" ]
2
2021-04-05T18:52:50.000Z
2021-11-12T11:36:41.000Z
docs/conf.py
jules-ch/wind-stats
e9b7cc1e5700ca092d6fd209bd75f83924ef2467
[ "MIT" ]
1
2022-03-18T02:30:09.000Z
2022-03-18T02:30:09.000Z
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
27.990099
79
0.684117
import os import sys import wind_stats sys.path.insert(0, os.path.abspath(".")) sys.path.insert(0, os.path.abspath(os.path.join("..", ".."))) project = "Wind Stats" copyright = "2020, Jules Chéron" author = "Jules Chéron" release = wind_stats.__version__ needs_sphinx = "3.0" extensions = [ ...
true
true
f737dfd5f803aa88aa6da44d301b6cfd14a79352
1,988
py
Python
test/test_events.py
mempoolco/aiodiskdb
8d162b637e7059d3d105716e1eba60851258101a
[ "MIT" ]
4
2021-06-04T06:03:06.000Z
2021-06-09T14:24:12.000Z
test/test_events.py
mempoolco/aiodiskdb
8d162b637e7059d3d105716e1eba60851258101a
[ "MIT" ]
9
2021-06-07T14:50:12.000Z
2021-06-13T12:24:00.000Z
test/test_events.py
mempoolco/aiodiskdb
8d162b637e7059d3d105716e1eba60851258101a
[ "MIT" ]
null
null
null
import asyncio from unittest import IsolatedAsyncioTestCase from aiodiskdb import exceptions from aiodiskdb.aiodiskdb import AioDiskDB from aiodiskdb.local_types import EventsHandlers class TestEventsHandlerStrictTyping(IsolatedAsyncioTestCase): def setUp(self) -> None: self.sut = EventsHandlers() ...
29.671642
81
0.635815
import asyncio from unittest import IsolatedAsyncioTestCase from aiodiskdb import exceptions from aiodiskdb.aiodiskdb import AioDiskDB from aiodiskdb.local_types import EventsHandlers class TestEventsHandlerStrictTyping(IsolatedAsyncioTestCase): def setUp(self) -> None: self.sut = EventsHandlers() ...
true
true
f737dff6b82939a2075e48ee932aed835b588014
2,453
py
Python
reap_admixture_pedmap.py
sensecollective/bioinformatics_scripts
3a23611f382b7f3dd60e5e2abe841b84408c0d44
[ "BSD-3-Clause" ]
7
2016-03-23T11:31:06.000Z
2021-05-20T19:07:38.000Z
reap_admixture_pedmap.py
raonyguimaraes/bioinformatics_scripts
3a23611f382b7f3dd60e5e2abe841b84408c0d44
[ "BSD-3-Clause" ]
null
null
null
reap_admixture_pedmap.py
raonyguimaraes/bioinformatics_scripts
3a23611f382b7f3dd60e5e2abe841b84408c0d44
[ "BSD-3-Clause" ]
8
2016-06-01T19:28:46.000Z
2022-01-09T01:26:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import OptionParser import os __author__ = "Raony Guimarães" __copyright__ = "Copyright 2012, Filter Analysis" __credits__ = ["Raony Guimarães"] __license__ = "GPL" __version__ = "1.0.1" __maintainer__ = "Raony Guimarães" __email__ = "raonyguimaraes@gmail.co...
33.148649
190
0.706074
from optparse import OptionParser import os __author__ = "Raony Guimarães" __copyright__ = "Copyright 2012, Filter Analysis" __credits__ = ["Raony Guimarães"] __license__ = "GPL" __version__ = "1.0.1" __maintainer__ = "Raony Guimarães" __email__ = "raonyguimaraes@gmail.com" __status__ = "Production" parse...
false
true
f737e2ad7d2371e24301eb47f502a76cdad850a2
30,205
py
Python
homeassistant/components/homematic/__init__.py
sara0871/laughing--barnacle-
70412fc0ba42ccfe446c0c62e327eceeda56a2ab
[ "Apache-2.0" ]
2
2020-12-06T23:15:21.000Z
2021-03-20T20:21:03.000Z
homeassistant/components/homematic/__init__.py
sara0871/https-wakatime.com-android-studio
5a15b2c036b332c17d5f6a06664378e9273d684f
[ "Apache-2.0" ]
3
2021-09-08T03:06:43.000Z
2022-03-12T00:56:04.000Z
homeassistant/components/homematic/__init__.py
sara0871/https-wakatime.com-android-studio
5a15b2c036b332c17d5f6a06664378e9273d684f
[ "Apache-2.0" ]
1
2019-04-26T12:59:54.000Z
2019-04-26T12:59:54.000Z
""" Support for HomeMatic devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homematic/ """ import asyncio from datetime import timedelta from functools import partial import logging import socket import voluptuous as vol from homeassistant.const...
33.523862
79
0.626916
import asyncio from datetime import timedelta from functools import partial import logging import socket import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, CONF_HOST, CONF_HOSTS, CONF_PASSWORD, CONF_PLATFORM, CONF_USERNAME, EVENT_HOMEASSISTANT_STOP, STATE_UNKNOWN) from homea...
true
true
f737e3f2a7e6327a9c99529ed6fb04fdef544dbd
943
py
Python
molecool/molecule.py
mmim2904/molecool
0c5c13cfec112e0d4af85044e6d8bec60f7d5b6a
[ "BSD-3-Clause" ]
null
null
null
molecool/molecule.py
mmim2904/molecool
0c5c13cfec112e0d4af85044e6d8bec60f7d5b6a
[ "BSD-3-Clause" ]
null
null
null
molecool/molecule.py
mmim2904/molecool
0c5c13cfec112e0d4af85044e6d8bec60f7d5b6a
[ "BSD-3-Clause" ]
null
null
null
""" function for analyzing molecules """ from .measure import calculate_distance from .atom_data import atomic_weights def build_bond_list(coordinates, max_bond=1.5, min_bond=0): # Find the bonds in a molecule (set of coordinates) based on distance criteria. bonds = {} num_atoms = len(coordinates) ...
23
83
0.639449
from .measure import calculate_distance from .atom_data import atomic_weights def build_bond_list(coordinates, max_bond=1.5, min_bond=0): bonds = {} num_atoms = len(coordinates) for atom1 in range(num_atoms): for atom2 in range(atom1, num_atoms): distance = calculate_distan...
true
true
f737e6378ae9a76bfc6516197d3b9c08336a77f9
8,643
py
Python
sympy/sets/handlers/functions.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/sets/handlers/functions.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/sets/handlers/functions.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
from sympy.core.singleton import S from sympy.sets.sets import Set from sympy.calculus.singularities import singularities from sympy.core import Expr, Add from sympy.core.function import Lambda, FunctionClass, diff, expand_mul from sympy.core.numbers import Float, oo from sympy.core.symbol import Dummy, symbols, ...
32.863118
77
0.569247
from sympy.core.singleton import S from sympy.sets.sets import Set from sympy.calculus.singularities import singularities from sympy.core import Expr, Add from sympy.core.function import Lambda, FunctionClass, diff, expand_mul from sympy.core.numbers import Float, oo from sympy.core.symbol import Dummy, symbols, ...
true
true
f737e882a690f66a006bd442966fc40e09ca108f
3,782
py
Python
contrib/macdeploy/custom_dsstore.py
HuntCoinDeveloper/huntcoin
99198152d21b58ce598f46783074b64113cc5e64
[ "MIT" ]
2
2019-05-13T02:10:08.000Z
2019-05-26T14:47:29.000Z
contrib/macdeploy/custom_dsstore.py
HuntCoinDeveloper/huntcoin
99198152d21b58ce598f46783074b64113cc5e64
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
HuntCoinDeveloper/huntcoin
99198152d21b58ce598f46783074b64113cc5e64
[ "MIT" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2013-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore...
62
1,818
0.727922
from __future__ import division,print_function,unicode_literals import biplist from ds_store import DSStore from mac_alias import Alias import sys output_file = sys.argv[1] package_name_ns = sys.argv[2] ds = DSStore.open(output_file, 'w+') ds['.']['bwsp'] = { 'ShowStatusBar': False, 'WindowBounds': b'{{30...
true
true
f737e9bc7fdf402c2b1765bf61ad3dca7aaae98c
49
py
Python
videoanalyst/utils/__init__.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
1
2021-05-24T10:08:51.000Z
2021-05-24T10:08:51.000Z
videoanalyst/utils/__init__.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
null
null
null
videoanalyst/utils/__init__.py
JIANG-CX/data_labeling
8d2470bbb537dfc09ed2f7027ed8ee7de6447248
[ "MIT" ]
null
null
null
from .misc import Registry, ensure_dir, load_cfg
24.5
48
0.816327
from .misc import Registry, ensure_dir, load_cfg
true
true
f737e9d6e6c3287d9a34834dc5853ecc25c53032
2,019
py
Python
scripts/librarian_assign_sessions.py
CutlerRU/librarian
45205d7fc75740e29f4a90a5d91d6a4a07b5a0f1
[ "BSD-2-Clause" ]
null
null
null
scripts/librarian_assign_sessions.py
CutlerRU/librarian
45205d7fc75740e29f4a90a5d91d6a4a07b5a0f1
[ "BSD-2-Clause" ]
null
null
null
scripts/librarian_assign_sessions.py
CutlerRU/librarian
45205d7fc75740e29f4a90a5d91d6a4a07b5a0f1
[ "BSD-2-Clause" ]
null
null
null
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2016 the HERA Team. # Licensed under the BSD License. """Tell the Librarian to assign any recent Observations to grouped "observing sessions". You should only do this if no data are currently being taken, because otherwise the currently-active se...
28.842857
103
0.683507
from __future__ import absolute_import, division, print_function import argparse import os.path import sys import hera_librarian p = argparse.ArgumentParser( description=__doc__, ) p.add_argument('--min-start-jd', dest='minimum_start_jd', metavar='JD', type=float, help='Only consider observa...
true
true
f737ea22ff2ba4acb8102d13caef6197f4c5f1ca
6,618
py
Python
dev/local/data/pipeline.py
vguerra/fastai_docs
95df902ef5cd08bcd58d5ca64bc8a6ea3f297531
[ "Apache-2.0" ]
null
null
null
dev/local/data/pipeline.py
vguerra/fastai_docs
95df902ef5cd08bcd58d5ca64bc8a6ea3f297531
[ "Apache-2.0" ]
null
null
null
dev/local/data/pipeline.py
vguerra/fastai_docs
95df902ef5cd08bcd58d5ca64bc8a6ea3f297531
[ "Apache-2.0" ]
null
null
null
#AUTOGENERATED! DO NOT EDIT! File to edit: dev/03_data_pipeline.ipynb (unless otherwise specified). __all__ = ['get_func', 'Func', 'Sig', 'compose_tfms', 'batch_to_samples', 'mk_transform', 'Pipeline', 'TfmdBase', 'TfmdList', 'TfmdDS'] #Cell from ..torch_basics import * from ..test import * from .transform...
39.392857
133
0.643246
__all__ = ['get_func', 'Func', 'Sig', 'compose_tfms', 'batch_to_samples', 'mk_transform', 'Pipeline', 'TfmdBase', 'TfmdList', 'TfmdDS'] from ..torch_basics import * from ..test import * from .transform import * from ..notebook.showdoc import show_doc def get_func(t, name, *args, **kwargs): f = geta...
true
true
f737eabe46d4f3bf805ab1749720629948465669
744
py
Python
peering/api/urls.py
maznu/peering-manager
d249fcf530f4cc48b39429badb79bc203e0148ba
[ "Apache-2.0" ]
127
2017-10-12T00:27:45.000Z
2020-08-07T11:13:55.000Z
peering/api/urls.py
maznu/peering-manager
d249fcf530f4cc48b39429badb79bc203e0148ba
[ "Apache-2.0" ]
247
2017-12-26T12:55:34.000Z
2020-08-08T11:57:35.000Z
peering/api/urls.py
maznu/peering-manager
d249fcf530f4cc48b39429badb79bc203e0148ba
[ "Apache-2.0" ]
63
2017-10-13T06:46:05.000Z
2020-08-08T00:41:57.000Z
from peering_manager.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.PeeringRootView router.register("autonomous-systems", views.AutonomousSystemViewSet) router.register("bgp-groups", views.BGPGroupViewSet) router.register("communities", views.CommunityV...
35.428571
85
0.831989
from peering_manager.api import OrderedDefaultRouter from . import views router = OrderedDefaultRouter() router.APIRootView = views.PeeringRootView router.register("autonomous-systems", views.AutonomousSystemViewSet) router.register("bgp-groups", views.BGPGroupViewSet) router.register("communities", views.CommunityV...
true
true
f737ead5619af5d5687eb2a45d4625f6ac1b2123
13,887
py
Python
slackmojicode/compiler.py
puhitaku/slackmojicode
0084aa0df029a0c34d47bcf63169872062d0eea3
[ "Unlicense" ]
6
2016-12-03T14:50:41.000Z
2020-11-04T16:03:32.000Z
slackmojicode/compiler.py
puhitaku/slackmojicode
0084aa0df029a0c34d47bcf63169872062d0eea3
[ "Unlicense" ]
null
null
null
slackmojicode/compiler.py
puhitaku/slackmojicode
0084aa0df029a0c34d47bcf63169872062d0eea3
[ "Unlicense" ]
null
null
null
import bytecode, objects, errors import ast as ast_objects class Context(object): """Shamelessly plundered from Cycy""" def __init__(self): self.instructions = [] self.constants = [] self.variables = {} #self.NULL = self.register_constant(objects.Null()) #s...
30.791574
95
0.686181
import bytecode, objects, errors import ast as ast_objects class Context(object): def __init__(self): self.instructions = [] self.constants = [] self.variables = {} def emit(self, byte_code, arg=bytecode.NO_ARG): assert(isinstanc...
true
true
f737ebad449e849bb4b5f32df937cb8c0e897f08
8,853
py
Python
scripts/stake_emu.py
pixelplex-dev/lotus
39a1e9041a748981dd2d085e350d97f9e8c51f40
[ "Apache-2.0", "MIT" ]
34
2020-10-30T07:01:44.000Z
2021-09-22T06:20:21.000Z
scripts/stake_emu.py
pixelplex-dev/lotus
39a1e9041a748981dd2d085e350d97f9e8c51f40
[ "Apache-2.0", "MIT" ]
20
2020-10-30T14:09:41.000Z
2021-09-22T08:24:12.000Z
scripts/stake_emu.py
pixelplex-dev/lotus
39a1e9041a748981dd2d085e350d97f9e8c51f40
[ "Apache-2.0", "MIT" ]
16
2020-10-30T11:16:10.000Z
2022-02-25T09:03:17.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from collections import defaultdict EpochsInHour = 120 EpochsInDay = 2880 FIL_PRECISION = 10**18 class RunTime(object): def __init__(self): self.epoch = 0 self.caller = "" self.amount = 0 class VestingSpec(object): def __init__(self, ve...
38.491304
147
0.636281
from collections import defaultdict EpochsInHour = 120 EpochsInDay = 2880 FIL_PRECISION = 10**18 class RunTime(object): def __init__(self): self.epoch = 0 self.caller = "" self.amount = 0 class VestingSpec(object): def __init__(self, vest_period, step_duration): self.step_...
true
true
f737ec2071e3d896cc9502a59fb7b4c4c1fc4562
20,598
py
Python
combiner/combiner/tf/approx_attention.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
combiner/combiner/tf/approx_attention.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
combiner/combiner/tf/approx_attention.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 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...
46.080537
120
0.635013
import tensorflow.compat.v1 as tf import math from combiner.tf import attention from combiner.tf import ops import functools def shift_right(x, axis): pad_widths = [(0, 0)] * len(x.shape) pad_widths[axis] = (1, 0) padded = tf.pad(x, pad_widths) return tf.slice(padded, begin=[0]*len(x.shape), s...
true
true
f737ecd6ea49249d14515c7f3e8a045c30507e84
7,250
py
Python
tools.py
slavatulaev/rsdb
85822db107953abd099ed296b6f3a88bb4e742c5
[ "Unlicense" ]
1
2019-04-01T09:41:09.000Z
2019-04-01T09:41:09.000Z
tools.py
slavatulaev/rsdb
85822db107953abd099ed296b6f3a88bb4e742c5
[ "Unlicense" ]
null
null
null
tools.py
slavatulaev/rsdb
85822db107953abd099ed296b6f3a88bb4e742c5
[ "Unlicense" ]
1
2019-11-18T16:33:49.000Z
2019-11-18T16:33:49.000Z
#!/usr/bin/env python import random import string import ftplib import zipfile import os import re import sys import socket def genRandomString(length): # генерирует и возвращает строку случайных символов заданой длины в нижнем регистре rS = ''.join(random.choices(string.ascii_lowercase + string.digits, k=length)...
34.855769
163
0.531172
import random import string import ftplib import zipfile import os import re import sys import socket def genRandomString(length): rS = ''.join(random.choices(string.ascii_lowercase + string.digits, k=length)) return rS def genRandomStringUp(length): rS = ''.join(random.choices(string.ascii_uppercase...
true
true
f737ede7d0db61bfa4fbe6917b44da4b93843274
13,078
py
Python
spark_cluster/04_5_HV_activeLearn/HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1/6100_ML2_HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1_round5.py
poltextlab/nyt_hybrid_classification_workflow
3f676938b08f4373be3a83e975ee51dfa5ce6bf5
[ "MIT" ]
null
null
null
spark_cluster/04_5_HV_activeLearn/HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1/6100_ML2_HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1_round5.py
poltextlab/nyt_hybrid_classification_workflow
3f676938b08f4373be3a83e975ee51dfa5ce6bf5
[ "MIT" ]
null
null
null
spark_cluster/04_5_HV_activeLearn/HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1/6100_ML2_HV_v4_activeLearn_NYT_sim2_and_sim3_to_sim1_round5.py
poltextlab/nyt_hybrid_classification_workflow
3f676938b08f4373be3a83e975ee51dfa5ce6bf5
[ "MIT" ]
null
null
null
# import libraries from pyspark.sql import SparkSession from pyspark import SparkConf from pyspark.sql.types import * from pyspark.sql.functions import col, count, when from pyspark.ml.classification import LinearSVC import pandas as pd ################################################# # spark config ##############...
38.807122
176
0.625631
from pyspark.sql import SparkSession from pyspark import SparkConf from pyspark.sql.types import * from pyspark.sql.functions import col, count, when from pyspark.ml.classification import LinearSVC import pandas as pd
true
true
f737ee0e24b035a1be31bccb6520852045423200
2,776
py
Python
qa/rpc-tests/mempool_spendcoinbase.py
L00119483/TechSquad.io
3ebafca95c5b125f3dbe52d9d4cde29c61a48975
[ "MIT" ]
4
2018-06-16T20:08:19.000Z
2018-08-22T15:44:58.000Z
qa/rpc-tests/mempool_spendcoinbase.py
L00119483/TechSquad.io
3ebafca95c5b125f3dbe52d9d4cde29c61a48975
[ "MIT" ]
null
null
null
qa/rpc-tests/mempool_spendcoinbase.py
L00119483/TechSquad.io
3ebafca95c5b125f3dbe52d9d4cde29c61a48975
[ "MIT" ]
7
2018-06-06T18:51:07.000Z
2018-09-08T15:17:04.000Z
#!/usr/bin/env python2 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test spending coinbase transactions. # The coinbase transaction in block N can appear in block # N+10...
39.657143
91
0.691643
from test_framework import BitcoinTestFramework from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from util import * import os import shutil class MempoolSpendCoinbaseTest(BitcoinTestFramework): def setup_network(self): args = ["-checkmempool", "-debug=mempool"] ...
true
true