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
f748403b430561ec9eecb804fb40cba314a037e3
1,214
py
Python
google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py
ysde/python-logging
3ac637a76f6ee6800947de2508ec2c3193413bf0
[ "Apache-2.0" ]
null
null
null
google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py
ysde/python-logging
3ac637a76f6ee6800947de2508ec2c3193413bf0
[ "Apache-2.0" ]
null
null
null
google/cloud/logging_v2/services/metrics_service_v2/transports/__init__.py
ysde/python-logging
3ac637a76f6ee6800947de2508ec2c3193413bf0
[ "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...
33.722222
87
0.789127
from collections import OrderedDict from typing import Dict, Type from .base import MetricsServiceV2Transport from .grpc import MetricsServiceV2GrpcTransport from .grpc_asyncio import MetricsServiceV2GrpcAsyncIOTransport _transport_registry = OrderedDict() _transport_registry["grpc"] = MetricsSer...
true
true
f74840ca551e10a4d564079bc327f8700d554773
3,013
py
Python
vit_jax/configs.py
wangbingo/vision_transformer
2ebff8b73cbc0f34b7af2d5045dfcb5c5bacfd6a
[ "Apache-2.0" ]
null
null
null
vit_jax/configs.py
wangbingo/vision_transformer
2ebff8b73cbc0f34b7af2d5045dfcb5c5bacfd6a
[ "Apache-2.0" ]
null
null
null
vit_jax/configs.py
wangbingo/vision_transformer
2ebff8b73cbc0f34b7af2d5045dfcb5c5bacfd6a
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.053191
74
0.750415
import ml_collections def get_testing(): config = ml_collections.ConfigDict() config.patches = ml_collections.ConfigDict({'size': (16, 16)}) config.hidden_size = 1 config.transformer = ml_collections.ConfigDict() config.transformer.mlp_dim = 1 config.transformer.num_heads = 1 config.transf...
true
true
f7484139c078f151635d0e93cd3f9e13f6980ab0
4,798
py
Python
alipay/aop/api/request/AlipayMobileMovieActivityNotifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayMobileMovieActivityNotifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AlipayMobileMovieActivityNotifyRequest.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayMobileMovieActivityNotifyRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._...
28.730539
174
0.633597
import simplejson as json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * class AlipayMobileMovieActivityNotifyRequest(object): def __init__(self, biz_model=None): self._biz_model = biz_model self._activity_detail = None self._activit...
true
true
f74841d0daee5ff18f56390b2e4071bbc2dec634
3,425
py
Python
calculator.py
c910335/vface-server
874765a2034a69998916c4c3d625f9cfaf8abe5d
[ "MIT" ]
7
2020-09-10T14:00:16.000Z
2021-12-02T08:33:23.000Z
calculator.py
c910335/vface-server
874765a2034a69998916c4c3d625f9cfaf8abe5d
[ "MIT" ]
null
null
null
calculator.py
c910335/vface-server
874765a2034a69998916c4c3d625f9cfaf8abe5d
[ "MIT" ]
1
2021-08-31T01:20:25.000Z
2021-08-31T01:20:25.000Z
import math class Calculator: def __init__(self, width): self.width = width self.params = { 'angle_x': [0], 'angle_y': [0], 'angle_z': [0], 'eye_l_open': [1], 'eye_r_open': [1], 'eye_ball_x': [0], 'eye_ball_y': [0],...
42.283951
147
0.568175
import math class Calculator: def __init__(self, width): self.width = width self.params = { 'angle_x': [0], 'angle_y': [0], 'angle_z': [0], 'eye_l_open': [1], 'eye_r_open': [1], 'eye_ball_x': [0], 'eye_ball_y': [0],...
true
true
f748420399f87027778e16599514feafd9370aa7
2,450
py
Python
optional-container-engine/tests/test_end_to_end.py
spannerk/googleCloudPlatformExample
6a8bd7f94b01c3e2e256dc28702c2019831b94da
[ "Apache-2.0" ]
null
null
null
optional-container-engine/tests/test_end_to_end.py
spannerk/googleCloudPlatformExample
6a8bd7f94b01c3e2e256dc28702c2019831b94da
[ "Apache-2.0" ]
null
null
null
optional-container-engine/tests/test_end_to_end.py
spannerk/googleCloudPlatformExample
6a8bd7f94b01c3e2e256dc28702c2019831b94da
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.818182
74
0.686939
import os import time from bs4 import BeautifulSoup import pytest import requests @pytest.mark.e2e def test_end_to_end(): base_url = os.environ.get('E2E_URL', 'http://localhost:8080') book_data = { 'title': 'a confederacy of dunces', } response = requests.post(base_url + '/bo...
true
true
f748436dffebae835a3df101621ac0eedc738532
2,274
py
Python
explanations.py
vickyyu90/maxnet
38c49c39dbe77b2984d8cdb2f4087310b2220593
[ "Apache-2.0" ]
null
null
null
explanations.py
vickyyu90/maxnet
38c49c39dbe77b2984d8cdb2f4087310b2220593
[ "Apache-2.0" ]
null
null
null
explanations.py
vickyyu90/maxnet
38c49c39dbe77b2984d8cdb2f4087310b2220593
[ "Apache-2.0" ]
null
null
null
import numpy as np import torch import torch.nn as nn from skimage.transform import resize from tqdm import tqdm class RISE(nn.Module): """A RISE class that computes saliency maps with RISE. """ def __init__(self, model, input_size, N, p1, gpu_batch=100): super(RISE, self).__init__() self...
34.454545
184
0.574758
import numpy as np import torch import torch.nn as nn from skimage.transform import resize from tqdm import tqdm class RISE(nn.Module): def __init__(self, model, input_size, N, p1, gpu_batch=100): super(RISE, self).__init__() self.model = model self.input_size = input_size self.gpu...
true
true
f7484596cc92fbc7a9f115048e14ac5f473fff5c
1,700
py
Python
billing/models.py
constellation-project/constellation
7208ffe9b8a40e98100ebbd2f173cf99f39b5c1e
[ "BSD-3-Clause" ]
1
2019-12-21T17:52:28.000Z
2019-12-21T17:52:28.000Z
billing/models.py
constellation-project/constellation
7208ffe9b8a40e98100ebbd2f173cf99f39b5c1e
[ "BSD-3-Clause" ]
null
null
null
billing/models.py
constellation-project/constellation
7208ffe9b8a40e98100ebbd2f173cf99f39b5c1e
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from polymorphic.models import PolymorphicModel class Product(models.Model): PAYER_TYPES = [ ('all', 'All'), ('mem', 'Member'), ('org', 'Organization'), ('cus', 'Custom') ] name = models.CharField(max_length=255) #currency = models.CharFie...
33.333333
108
0.714706
from django.db import models from polymorphic.models import PolymorphicModel class Product(models.Model): PAYER_TYPES = [ ('all', 'All'), ('mem', 'Member'), ('org', 'Organization'), ('cus', 'Custom') ] name = models.CharField(max_length=255) price = models.BigInt...
true
true
f74846660cdfbf003a1625a0f9ec6352fa8fc1c2
5,608
py
Python
git_hashes.py
shakthimaan/ocaml_bench_scripts
2aff9f721ee07b331ba8e1f56e5a35d00ab541e3
[ "ISC" ]
5
2019-04-19T05:15:08.000Z
2022-03-15T07:18:18.000Z
git_hashes.py
shakthimaan/ocaml_bench_scripts
2aff9f721ee07b331ba8e1f56e5a35d00ab541e3
[ "ISC" ]
5
2020-03-26T15:39:36.000Z
2020-09-09T08:06:12.000Z
git_hashes.py
shakthimaan/ocaml_bench_scripts
2aff9f721ee07b331ba8e1f56e5a35d00ab541e3
[ "ISC" ]
3
2020-02-18T10:44:51.000Z
2020-05-20T10:42:37.000Z
# Python module for getting git commits from the command line args import datetime import os import subprocess import sys def parseISO8601Likedatetime(s): return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S %z") def get_git_hashes(args): def shell_exec(cmd, verbose=args.verbose, check=False, stdout=None, stder...
39.77305
166
0.697753
import datetime import os import subprocess import sys def parseISO8601Likedatetime(s): return datetime.datetime.strptime(s, "%Y-%m-%d %H:%M:%S %z") def get_git_hashes(args): def shell_exec(cmd, verbose=args.verbose, check=False, stdout=None, stderr=None): if verbose: print('+ %s'%cmd) return subprocess.ru...
true
true
f74846e53d3858bee12120b286f804602a94047b
10,026
py
Python
src/ansible_navigator/ui_framework/colorize.py
ekmixon/ansible-navigator
9903d82ac76a4aee61a64c2e5f19f5ccca3cf136
[ "Apache-2.0", "MIT" ]
134
2021-03-26T17:44:49.000Z
2022-03-31T13:15:52.000Z
src/ansible_navigator/ui_framework/colorize.py
cidrblock/ansible-navigator
674e5edce4d4181e6f79b6f24b590a347156665d
[ "Apache-2.0", "MIT" ]
631
2021-03-26T19:38:32.000Z
2022-03-31T22:57:36.000Z
src/ansible_navigator/ui_framework/colorize.py
cidrblock/ansible-navigator
674e5edce4d4181e6f79b6f24b590a347156665d
[ "Apache-2.0", "MIT" ]
48
2021-03-26T17:44:29.000Z
2022-03-08T21:12:26.000Z
"""Tokenize and color text """ import json import logging import os import re import colorsys import curses import functools from itertools import chain from .curses_defs import CursesLine from .curses_defs import CursesLinePart from ..tm_tokenize.grammars import Grammars from ..tm_tokenize.tokenize import tokeniz...
31.828571
100
0.524835
import json import logging import os import re import colorsys import curses import functools from itertools import chain from .curses_defs import CursesLine from .curses_defs import CursesLinePart from ..tm_tokenize.grammars import Grammars from ..tm_tokenize.tokenize import tokenize CURSES_STYLES = { 0: No...
true
true
f748479f93b5b3d0f3f4478d325c28392464ed7e
4,255
py
Python
services/pipeline/emission/tests/analysisTests/configTests/TestSaveAllConfigs.py
e-mission/e-mission-ng-aggregator
0ce43b93192459ac1864b8e88e96b83ea0929aa2
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
21
2015-02-09T00:35:17.000Z
2021-12-14T16:41:05.000Z
services/pipeline/emission/tests/analysisTests/configTests/TestSaveAllConfigs.py
e-mission/e-mission-ng-aggregator
0ce43b93192459ac1864b8e88e96b83ea0929aa2
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
672
2015-01-29T18:10:56.000Z
2022-03-24T13:04:51.000Z
services/pipeline/emission/tests/analysisTests/configTests/TestSaveAllConfigs.py
e-mission/e-mission-ng-aggregator
0ce43b93192459ac1864b8e88e96b83ea0929aa2
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
110
2015-01-29T18:11:10.000Z
2022-03-29T17:58:14.000Z
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import # Standard imports from future import standard_library standard_library.install_aliases() from builtins import * import unittest import datetime as pydt import logging imp...
42.55
128
0.678496
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * import unittest import datetime as pydt import logging import json import co...
true
true
f74848023acc6c37c2ff7c5db0c53a7377777d9b
15,258
py
Python
google/cloud/gaming/v1beta/gaming-v1beta-py/google/cloud/gaming_v1beta/types/common.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/gaming/v1beta/gaming-v1beta-py/google/cloud/gaming_v1beta/types/common.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/gaming/v1beta/gaming-v1beta-py/google/cloud/gaming_v1beta/types/common.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
30.824242
114
0.589068
import proto from google.protobuf import duration_pb2 from google.protobuf import timestamp_pb2 __protobuf__ = proto.module( package='google.cloud.gaming.v1beta', manifest={ 'OperationMetadata', 'OperationStatus', 'LabelSelector', 'RealmSelector', ...
true
true
f7484a209c004713d68e7062c4d57d75e32af0d8
858
py
Python
infer_resnet_action_recognition.py
Ikomia-dev/infer_resnet_action_recognition
ddd5b4758bc3a1276fe9ef25237b1811801b80aa
[ "MIT" ]
null
null
null
infer_resnet_action_recognition.py
Ikomia-dev/infer_resnet_action_recognition
ddd5b4758bc3a1276fe9ef25237b1811801b80aa
[ "MIT" ]
null
null
null
infer_resnet_action_recognition.py
Ikomia-dev/infer_resnet_action_recognition
ddd5b4758bc3a1276fe9ef25237b1811801b80aa
[ "MIT" ]
null
null
null
from ikomia import dataprocess # -------------------- # - Interface class to integrate the process with Ikomia application # - Inherits dataprocess.CPluginProcessInterface from Ikomia API # -------------------- class IkomiaPlugin(dataprocess.CPluginProcessInterface): def __init__(self): dataprocess.CPlug...
39
127
0.765734
from ikomia import dataprocess class IkomiaPlugin(dataprocess.CPluginProcessInterface): def __init__(self): dataprocess.CPluginProcessInterface.__init__(self) def getProcessFactory(self): from infer_resnet_action_recognition.infer_resnet_action_recognition_process import ResNetActionReco...
true
true
f7484a5d9e67a1bd07eaefc9f0887138c2e914db
379
py
Python
final/src/problem1_b2/__init__2.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
final/src/problem1_b2/__init__2.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
final/src/problem1_b2/__init__2.py
jmnel/combinatorial-optimization
c921dee6cb0febc47a8a791f8220b02b35caf0cf
[ "MIT" ]
null
null
null
import settings from . import model_params from .task import Task from pprint import pprint from .adj_graph import draw_adj_graph pprint(Task.all()[-1].predecessors) arcs = [[1 if p in t.predecessors else 0 for p in range(len(Task.all()))] for t in Task.all()] draw_adj_graph(arcs, filename='fi...
25.266667
73
0.688654
import settings from . import model_params from .task import Task from pprint import pprint from .adj_graph import draw_adj_graph pprint(Task.all()[-1].predecessors) arcs = [[1 if p in t.predecessors else 0 for p in range(len(Task.all()))] for t in Task.all()] draw_adj_graph(arcs, filename='fi...
true
true
f7484ac712084022603734057759933aaebf0ce6
783
py
Python
tests/test_mpi_adam.py
757670303037/stable-baselines
91ac2e82dca3961ecd9d239427a095a21ba85674
[ "MIT" ]
3,681
2018-07-02T16:07:58.000Z
2022-03-31T12:29:00.000Z
tests/test_mpi_adam.py
757670303037/stable-baselines
91ac2e82dca3961ecd9d239427a095a21ba85674
[ "MIT" ]
1,088
2018-07-09T11:36:45.000Z
2022-03-31T23:50:35.000Z
tests/test_mpi_adam.py
757670303037/stable-baselines
91ac2e82dca3961ecd9d239427a095a21ba85674
[ "MIT" ]
910
2018-07-23T12:16:47.000Z
2022-03-28T09:39:06.000Z
import subprocess import pytest from .test_common import _assert_eq def test_mpi_adam(): """Test RunningMeanStd object for MPI""" # Test will be run in CI before pytest is run pytest.skip() return_code = subprocess.call(['mpirun', '--allow-run-as-root', '-np', '2', ...
31.32
87
0.588761
import subprocess import pytest from .test_common import _assert_eq def test_mpi_adam(): pytest.skip() return_code = subprocess.call(['mpirun', '--allow-run-as-root', '-np', '2', 'python', '-m', 'stable_baselines.common.mpi_adam']) _assert_eq(return_code, 0) def...
true
true
f7484b0e20f53dc98fb22cc5b72e7f00d58ab1ed
60
py
Python
pizza/test/__init__.py
cjerdonek/groome-python-expected
33c8963fc295045554b3a6f7afa9010957b2fd23
[ "Unlicense" ]
1
2015-05-05T19:17:19.000Z
2015-05-05T19:17:19.000Z
pizza/test/__init__.py
cjerdonek/groome-python-expected
33c8963fc295045554b3a6f7afa9010957b2fd23
[ "Unlicense" ]
null
null
null
pizza/test/__init__.py
cjerdonek/groome-python-expected
33c8963fc295045554b3a6f7afa9010957b2fd23
[ "Unlicense" ]
null
null
null
""" This package contains tests and test-support code. """
12
50
0.7
true
true
f7484ba056993b5fbbed1bd484f57c3394676068
4,973
py
Python
python/modules/approximateField.py
KolCrooks/bisweb
2ec0abb1ceafc3d63ca2c82222d546386319e29a
[ "Apache-2.0" ]
null
null
null
python/modules/approximateField.py
KolCrooks/bisweb
2ec0abb1ceafc3d63ca2c82222d546386319e29a
[ "Apache-2.0" ]
null
null
null
python/modules/approximateField.py
KolCrooks/bisweb
2ec0abb1ceafc3d63ca2c82222d546386319e29a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # LICENSE # # _This file is Copyright 2018 by the Image Processing and Analysis Group (BioImage Suite Team). Dept. of Radiology & Biomedical Imaging, Yale School of Medicine._ # # BioImage Suite Web is licensed under the Apache License, Version 2.0 (the "License"); # # - you may not u...
35.021127
164
0.634828
import bis_path import sys import math import numpy as np import argparse import bis_basemodule import bis_objects import modules_desc; import biswrapper as libbis; class approximateField(bis_basemodule.baseModule): def __init__(self): super().__init__(); sel...
true
true
f7484bf91456c27d29a18360fd7c53f39ea9e660
14,545
py
Python
glance_store/tests/unit/test_cinder_store.py
qweraqq/glance_store
8099db255da607b8dd46990a8c1971849fde5f3a
[ "Apache-2.0" ]
null
null
null
glance_store/tests/unit/test_cinder_store.py
qweraqq/glance_store
8099db255da607b8dd46990a8c1971849fde5f3a
[ "Apache-2.0" ]
null
null
null
glance_store/tests/unit/test_cinder_store.py
qweraqq/glance_store
8099db255da607b8dd46990a8c1971849fde5f3a
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 OpenStack Foundation # 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 requ...
44.480122
78
0.604606
import contextlib import errno import hashlib import mock import os import six import socket import tempfile import time import uuid from os_brick.initiator import connector from oslo_concurrency import processutils from oslo_utils import units from glance_store._drivers import cinder from glance_store...
true
true
f7484bf979c8391ee9b3a935fa160c405969d3a3
3,364
py
Python
airflow/migrations/versions/03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
airflow/migrations/versions/03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
airflow/migrations/versions/03afc6b6f902_increase_length_of_fab_ab_view_menu_.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
35.041667
106
0.63912
import sqlalchemy as sa from alembic import op from sqlalchemy.engine.reflection import Inspector from airflow.models.base import COLLATION_ARGS revision = '03afc6b6f902' down_revision = '92c57b58940d' branch_labels = None depends_on = None def upgrade(): conn = op.get_bind() inspector =...
true
true
f7484cde516086184a56582ac4153e0f225cef86
8,070
py
Python
non_semantic_speech_benchmark/export_model/tflite_conversion.py
xjdrlabs/google-research
77228d842da67759f9b42b696ec43d5165cfd297
[ "Apache-2.0" ]
1
2021-07-24T06:54:21.000Z
2021-07-24T06:54:21.000Z
non_semantic_speech_benchmark/export_model/tflite_conversion.py
Pragalbhmandaokar/google-research
f753c392312d4ca1437f80dc9592b6c1461e63a0
[ "Apache-2.0" ]
null
null
null
non_semantic_speech_benchmark/export_model/tflite_conversion.py
Pragalbhmandaokar/google-research
f753c392312d4ca1437f80dc9592b6c1461e63a0
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021 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...
38.798077
100
0.735564
import os from absl import app from absl import flags from absl import logging import numpy as np import tensorflow as tf from non_semantic_speech_benchmark.data_prep import audio_to_embeddings_beam_utils from non_semantic_speech_benchmark.distillation import models from non_semantic_speech_benchma...
true
true
f7484d8833af2947098c8dcabd0be3544300f6f7
5,755
py
Python
pysnmp/TIMETRA-SAS-IEEE8021-CFM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/TIMETRA-SAS-IEEE8021-CFM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/TIMETRA-SAS-IEEE8021-CFM-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module TIMETRA-SAS-IEEE8021-CFM-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/TIMETRA-SAS-IEEE8021-CFM-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 21:14:14 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python vers...
119.895833
952
0.783493
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint = mibBuild...
true
true
f7484dd700656db64a7b3a390dc950a942461ab0
4,328
py
Python
library/f5bigip_sys_snmp_community.py
erjac77/ansible-role-f5
c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056
[ "Apache-2.0" ]
1
2020-02-21T06:48:14.000Z
2020-02-21T06:48:14.000Z
library/f5bigip_sys_snmp_community.py
erjac77/ansible-role-f5
c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056
[ "Apache-2.0" ]
null
null
null
library/f5bigip_sys_snmp_community.py
erjac77/ansible-role-f5
c45b5d9d5f34a8ac6d19ded836d0a6b7ee7f8056
[ "Apache-2.0" ]
1
2021-03-29T03:55:34.000Z
2021-03-29T03:55:34.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2016 Eric Jacob <erjac77@gmail.com> # # 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 #...
31.362319
120
0.67329
ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = """ --- module: f5bigip_sys_snmp_community short_description: BIG-IP sys snmp community module description: - Configures the simple network management protocol (SNMP) c...
true
true
f7484e3a48bc5080da1fd91a242392eed6d5821f
7,444
py
Python
src/model.py
byorxyz/san_mrc
09ef4e5a88e5b468afad78934157a9d11448b6f9
[ "BSD-3-Clause" ]
null
null
null
src/model.py
byorxyz/san_mrc
09ef4e5a88e5b468afad78934157a9d11448b6f9
[ "BSD-3-Clause" ]
null
null
null
src/model.py
byorxyz/san_mrc
09ef4e5a88e5b468afad78934157a9d11448b6f9
[ "BSD-3-Clause" ]
1
2018-08-31T05:31:37.000Z
2018-08-31T05:31:37.000Z
''' High level of model for training and prediction Created October, 2017 Author: xiaodl@microsoft.com ''' import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np import logging import math from collections import defaultdict from torch.optim.lr_scheduler imp...
42.295455
114
0.581005
''' High level of model for training and prediction Created October, 2017 Author: xiaodl@microsoft.com ''' import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np import logging import math from collections import defaultdict from torch.optim.lr_scheduler imp...
false
true
f7484e3b33d7e6a31225509338ccb6fabead2989
160
py
Python
pyaww/__init__.py
ammarsys/pyanywhere-wrapper
d8cde2d29900c25fc7ab3cd8103923f727b5dade
[ "MIT" ]
5
2021-06-25T14:34:52.000Z
2021-07-04T14:15:13.000Z
pyaww/__init__.py
ammarsys/pyanywhere-wrapper
d8cde2d29900c25fc7ab3cd8103923f727b5dade
[ "MIT" ]
1
2021-12-12T00:47:25.000Z
2022-01-24T17:19:43.000Z
pyaww/__init__.py
ammarsys/pyanywhere-wrapper
d8cde2d29900c25fc7ab3cd8103923f727b5dade
[ "MIT" ]
1
2021-12-14T15:44:52.000Z
2021-12-14T15:44:52.000Z
from pyaww import ( always_on_task, console, file, sched_task, static_header, static_file, user, webapp ) __version__ = '0.0.3'
13.333333
21
0.6125
from pyaww import ( always_on_task, console, file, sched_task, static_header, static_file, user, webapp ) __version__ = '0.0.3'
true
true
f748503c664aae55110b81923f6b0443f9ec71e7
69
py
Python
EKV_Adjustment.py
aitordelrivero/MScThesisAdRC_AnnexI
28f2c59592adb336d1f400403d67253a86ba4c1a
[ "Unlicense" ]
null
null
null
EKV_Adjustment.py
aitordelrivero/MScThesisAdRC_AnnexI
28f2c59592adb336d1f400403d67253a86ba4c1a
[ "Unlicense" ]
null
null
null
EKV_Adjustment.py
aitordelrivero/MScThesisAdRC_AnnexI
28f2c59592adb336d1f400403d67253a86ba4c1a
[ "Unlicense" ]
null
null
null
#This file is only available to the lab members in the internal Wiki
34.5
68
0.797101
true
true
f74851875e16f4915513ece2bc4c9f99af1154d5
2,728
py
Python
metrics/sum_uniformity_primer.py
alces-flight/qiaseq-dna
16e01500b9e12f63d8e82dd4a7ab02129c17e860
[ "MIT" ]
null
null
null
metrics/sum_uniformity_primer.py
alces-flight/qiaseq-dna
16e01500b9e12f63d8e82dd4a7ab02129c17e860
[ "MIT" ]
null
null
null
metrics/sum_uniformity_primer.py
alces-flight/qiaseq-dna
16e01500b9e12f63d8e82dd4a7ab02129c17e860
[ "MIT" ]
null
null
null
#------------------------------------------------------------------------------------------ def getUniformityMetrics(depths): # get total cumulative depth depthTotal = sum(depths) # if zero depth at all primers/sites, return zeros if depthTotal == 0: outvec = [0] * 5 retur...
35.428571
157
0.530059
def getUniformityMetrics(depths): depthTotal = sum(depths) if depthTotal == 0: outvec = [0] * 5 return tuple(outvec) depths.sort() depthMean = 1.00 * depthTotal / len(depths) pctGtVec = [] for pct in (5.0, 10.0, 20.0...
true
true
f74851b5c2a27dc1f4d428d621699d1ded208da2
46,863
py
Python
2198/494/__init__.py
bdbaddog/dummy-for-migration-attachments
ad3b46d50b4c4b5e79363ae2fdcab3f15e1435de
[ "MIT" ]
null
null
null
2198/494/__init__.py
bdbaddog/dummy-for-migration-attachments
ad3b46d50b4c4b5e79363ae2fdcab3f15e1435de
[ "MIT" ]
null
null
null
2198/494/__init__.py
bdbaddog/dummy-for-migration-attachments
ad3b46d50b4c4b5e79363ae2fdcab3f15e1435de
[ "MIT" ]
null
null
null
"""SCons.Node The Node package for the SCons software construction utility. This is, in many ways, the heart of SCons. A Node is where we encapsulate all of the dependency information about any thing that SCons can build, or about any thing which SCons can use to build some other thing. The canonical "thing," of co...
35.637262
110
0.609969
"""SCons.Node The Node package for the SCons software construction utility. This is, in many ways, the heart of SCons. A Node is where we encapsulate all of the dependency information about any thing that SCons can build, or about any thing which SCons can use to build some other thing. The canonical "thing," of co...
false
true
f74851bd0e6c64bdc59e2f4db1b02b6d1ad3b6b8
125,665
py
Python
test/orm/test_joins.py
gujun4990/sqlalchemy
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
[ "MIT" ]
1
2018-11-15T16:02:17.000Z
2018-11-15T16:02:17.000Z
test/orm/test_joins.py
gujun4990/sqlalchemy
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
[ "MIT" ]
null
null
null
test/orm/test_joins.py
gujun4990/sqlalchemy
057bae2295feb86529a04f09cd2f3d4c2c6d88a8
[ "MIT" ]
null
null
null
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util from sqlalchemy.sql import compiler, table, column from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes from s...
38.35928
81
0.563188
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message import operator from sqlalchemy import * from sqlalchemy import exc as sa_exc, util from sqlalchemy.sql import compiler, table, column from sqlalchemy.engine import default from sqlalchemy.orm import * from sqlalchemy.orm import attributes from s...
true
true
f74851e10772b160a568381ee238b6ed99634783
10,079
py
Python
Project_2/bricka/breakout.py
ElchinValiyev/GameAI
bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e
[ "MIT" ]
null
null
null
Project_2/bricka/breakout.py
ElchinValiyev/GameAI
bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e
[ "MIT" ]
null
null
null
Project_2/bricka/breakout.py
ElchinValiyev/GameAI
bae8fcdeeb9b1362179ec0d9d9e12a64d68f0a5e
[ "MIT" ]
null
null
null
# Add mouse controls # add half size paddle after hitting back wall import math, pygame, sys, shutil, getpass from pygame.locals import * pygame.init() fpsClock = pygame.time.Clock() screen = pygame.display.set_mode((640, 480)) # create screen - 640 pix by 480 pix pygame.display.set_caption('Breakout') # set title ...
34.282313
109
0.481595
import math, pygame, sys, shutil, getpass from pygame.locals import * pygame.init() fpsClock = pygame.time.Clock() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption('Breakout') try: fontObj = pygame.font.Font('PressStart2P.ttf', 36) except: fontObj = pygame.font.Font('freesansbol...
true
true
f748537543380c15854b84b7a82bbb60bb20dd66
257
py
Python
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711165644.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711165644.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
.history/my_classes/ScopesClosuresAndDecorators/Closures_20210711165644.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Closuers Free variables and closures Remember: Functions defined inside another function can access the outer (nonLocal) variables """ def outer(): x = 'python' def inner(): print("{0} rocks!".format(x))
18.357143
93
0.59144
def outer(): x = 'python' def inner(): print("{0} rocks!".format(x))
true
true
f74853fbea4c1606929b10df6a0c750543284611
4,039
py
Python
temp/src/TF_publisher.py
wvu-irl/smart-2
b39b6d477b5259b3bf0d96180a154ee1dafae0ac
[ "MIT" ]
null
null
null
temp/src/TF_publisher.py
wvu-irl/smart-2
b39b6d477b5259b3bf0d96180a154ee1dafae0ac
[ "MIT" ]
null
null
null
temp/src/TF_publisher.py
wvu-irl/smart-2
b39b6d477b5259b3bf0d96180a154ee1dafae0ac
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy import numpy as np from sensor_msgs.msg import Image from std_msgs.msg import String import math import tf import sys from localization.msg import Marker from tf import transformations as t class TF_marker_publisher(): def __init__(self): rospy.init_node("TF_marker_publ...
48.662651
146
0.643971
import rospy import numpy as np from sensor_msgs.msg import Image from std_msgs.msg import String import math import tf import sys from localization.msg import Marker from tf import transformations as t class TF_marker_publisher(): def __init__(self): rospy.init_node("TF_marker_publisher",anonymous=True...
true
true
f74854a9fcfa236fe6d03a42714cfbe75f51c89c
1,999
py
Python
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Options/BoolOption.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
30
2015-01-29T14:06:05.000Z
2022-01-10T07:47:29.000Z
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Options/BoolOption.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
1
2017-02-20T20:57:48.000Z
2018-12-19T23:44:38.000Z
cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Options/BoolOption.py
nawien-sharma/keyczar
c55563bbd70f4b6fefc7444e296aab9894475f9a
[ "Apache-2.0" ]
15
2015-04-23T02:38:36.000Z
2021-03-01T20:09:39.000Z
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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 limitati...
39.196078
97
0.757379
__revision__ = "src/engine/SCons/Options/BoolOption.py 4043 2009/02/23 09:06:45 scons" __doc__ = """Place-holder for the old SCons.Options module hierarchy This is for backwards compatibility. The new equivalent is the Variables/ class hierarchy. These will have deprecation warnings added (so...
true
true
f74854e2e2b58f45cf1f882bd37fb6d18c51a447
2,510
py
Python
src/layers.py
edmundwsy/IEEE-RAS-slam-winter-school-project-9
da94c5e08acd4efc90b4061871f6afe31e6268b3
[ "MIT" ]
2
2021-07-14T13:17:45.000Z
2021-07-27T10:58:37.000Z
src/layers.py
edmundwsy/IEEE-RAS-slam-winter-school-project-9
da94c5e08acd4efc90b4061871f6afe31e6268b3
[ "MIT" ]
null
null
null
src/layers.py
edmundwsy/IEEE-RAS-slam-winter-school-project-9
da94c5e08acd4efc90b4061871f6afe31e6268b3
[ "MIT" ]
3
2021-06-07T09:59:43.000Z
2021-07-22T18:38:57.000Z
from keras.engine.topology import Layer, InputSpec import keras.utils.conv_utils as conv_utils import tensorflow as tf import keras.backend as K def normalize_data_format(value): if value is None: value = K.image_data_format() data_format = value.lower() if data_format not in {'channels_first', 'ch...
45.636364
94
0.623108
from keras.engine.topology import Layer, InputSpec import keras.utils.conv_utils as conv_utils import tensorflow as tf import keras.backend as K def normalize_data_format(value): if value is None: value = K.image_data_format() data_format = value.lower() if data_format not in {'channels_first', 'ch...
true
true
f74856d540616156095d4c36b22fb0528ea5e8dd
1,233
py
Python
Data Scientist Career Path/8. Hypothesis Testing/3. Experimental Design/2. Simulation/4. estimate.py
myarist/Codecademy
2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb
[ "MIT" ]
23
2021-06-06T15:35:55.000Z
2022-03-21T06:53:42.000Z
Data Scientist Career Path/8. Hypothesis Testing/3. Experimental Design/2. Simulation/4. estimate.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
null
null
null
Data Scientist Career Path/8. Hypothesis Testing/3. Experimental Design/2. Simulation/4. estimate.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
9
2021-06-08T01:32:04.000Z
2022-03-18T15:38:09.000Z
import numpy as np import pandas as pd from scipy.stats import chi2_contingency # preset values significance_threshold = 0.05 sample_size = 100 lift = .3 control_rate = .5 name_rate = (1 + lift) * control_rate # initialize an empty list of results results = [] # start the loop for i in range(100): # simulate data:...
33.324324
110
0.729116
import numpy as np import pandas as pd from scipy.stats import chi2_contingency significance_threshold = 0.05 sample_size = 100 lift = .3 control_rate = .5 name_rate = (1 + lift) * control_rate results = [] for i in range(100): sample_control = np.random.choice(['yes', 'no'], size=int(sample_size/2), p=[con...
true
true
f74856f19a10a7bc9954dce3eade4b180a5e5ab1
10,348
py
Python
django_project/virtualornithology/timelines/filtering.py
carnby/aurora
f31e3de28694fd5763643d90ee91e99a55d4ec97
[ "MIT" ]
8
2016-02-25T13:48:10.000Z
2020-06-06T07:23:30.000Z
django_project/virtualornithology/timelines/filtering.py
carnby/aurora
f31e3de28694fd5763643d90ee91e99a55d4ec97
[ "MIT" ]
null
null
null
django_project/virtualornithology/timelines/filtering.py
carnby/aurora
f31e3de28694fd5763643d90ee91e99a55d4ec97
[ "MIT" ]
2
2016-03-07T11:54:59.000Z
2020-06-06T07:23:31.000Z
from collections import Counter import numpy as np import random import math import difflib class TimelineFilter(object): def __init__(self, characterizer, skip_fields=None, max_entropy_percentile=100.0, time_bucket_size=10, start_strategy=None, pick_strategy=None, approve_tweet_fn=None, ...
36.055749
161
0.589486
from collections import Counter import numpy as np import random import math import difflib class TimelineFilter(object): def __init__(self, characterizer, skip_fields=None, max_entropy_percentile=100.0, time_bucket_size=10, start_strategy=None, pick_strategy=None, approve_tweet_fn=None, ...
true
true
f748579d799b9ebf30c6be0a557f71c631409362
21,858
py
Python
swift/common/memcached.py
kalrey/swift
8d02147d04a41477383de8e13bea6ac3fd2cade0
[ "Apache-2.0" ]
1
2015-09-12T08:05:49.000Z
2015-09-12T08:05:49.000Z
swift/common/memcached.py
kalrey/swift
8d02147d04a41477383de8e13bea6ac3fd2cade0
[ "Apache-2.0" ]
null
null
null
swift/common/memcached.py
kalrey/swift
8d02147d04a41477383de8e13bea6ac3fd2cade0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
41.71374
79
0.559658
import cPickle as pickle import logging import time from bisect import bisect from swift import gettext_ as _ from hashlib import md5 from distutils.version import StrictVersion from eventlet.green import socket from eventlet.pools import Pool from eventlet import Timeout, __version__ as eventlet_versi...
true
true
f748588ce59c6a1fede78b78fce17d391ddd2581
3,264
py
Python
Crickits/mag_neat_o/magneato.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
665
2017-09-27T21:20:14.000Z
2022-03-31T09:09:25.000Z
Crickits/mag_neat_o/magneato.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
641
2017-10-03T19:46:37.000Z
2022-03-30T18:28:46.000Z
Crickits/mag_neat_o/magneato.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
734
2017-10-02T22:47:38.000Z
2022-03-30T14:03:51.000Z
import time from busio import I2C from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import motor, servo from digitalio import DigitalInOut, Direction, Pull import board print("Mag Neat-o!") # Create seesaw object i2c = I2C(board.SCL, board.SDA) seesaw = Seesaw(i2c...
28.137931
73
0.621936
import time from busio import I2C from adafruit_seesaw.seesaw import Seesaw from adafruit_seesaw.pwmout import PWMOut from adafruit_motor import motor, servo from digitalio import DigitalInOut, Direction, Pull import board print("Mag Neat-o!") i2c = I2C(board.SCL, board.SDA) seesaw = Seesaw(i2c) motor_a = motor.DC...
true
true
f748596e3fc15bf03680a861f94c3f0e8e083983
4,491
py
Python
application/views.py
Iurii-Dziuban/django-sandbox
b1c014ce0f70a3d98b5e2532bd751d6964ee5bd5
[ "MIT" ]
null
null
null
application/views.py
Iurii-Dziuban/django-sandbox
b1c014ce0f70a3d98b5e2532bd751d6964ee5bd5
[ "MIT" ]
null
null
null
application/views.py
Iurii-Dziuban/django-sandbox
b1c014ce0f70a3d98b5e2532bd751d6964ee5bd5
[ "MIT" ]
null
null
null
import json import threading from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.utils import timezone from django.db.models import F from application.app_constants import EVENT_CATEGORIES from application.models import LikedEvent, User, Journey, Category, UserRank ...
30.344595
99
0.720107
import json import threading from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from django.utils import timezone from django.db.models import F from application.app_constants import EVENT_CATEGORIES from application.models import LikedEvent, User, Journey, Category, UserRank ...
true
true
f7485aa3356f5ee3c81facd849d2e64de16db1f1
3,097
py
Python
plugins/polio/preparedness/client.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
29
2020-12-26T07:22:19.000Z
2022-03-07T13:40:09.000Z
plugins/polio/preparedness/client.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
150
2020-11-09T15:03:27.000Z
2022-03-07T15:36:07.000Z
plugins/polio/preparedness/client.py
BLSQ/iaso
95c8087c0182bdd576598eb8cd39c440e58e15d7
[ "MIT" ]
4
2020-11-09T10:38:13.000Z
2021-10-04T09:42:47.000Z
import base64 import json import os import time from datetime import datetime, timedelta from logging import getLogger import gspread from gspread import Client from gspread.exceptions import APIError from oauth2client.service_account import ServiceAccountCredentials logger = getLogger(__name__) DIRNAME = os.path.d...
32.6
115
0.661608
import base64 import json import os import time from datetime import datetime, timedelta from logging import getLogger import gspread from gspread import Client from gspread.exceptions import APIError from oauth2client.service_account import ServiceAccountCredentials logger = getLogger(__name__) DIRNAME = os.path.d...
true
true
f7485adc0a68b82262184ee2151691b5a2ee01ac
3,753
py
Python
FullSubmission/Task #2/Source Code/Method II/TL/TransportLayer.py
KrishnKher/CS3543-Project-I
2854e14c85e083cc786a82bacd301962c1fa96bc
[ "MIT" ]
null
null
null
FullSubmission/Task #2/Source Code/Method II/TL/TransportLayer.py
KrishnKher/CS3543-Project-I
2854e14c85e083cc786a82bacd301962c1fa96bc
[ "MIT" ]
null
null
null
FullSubmission/Task #2/Source Code/Method II/TL/TransportLayer.py
KrishnKher/CS3543-Project-I
2854e14c85e083cc786a82bacd301962c1fa96bc
[ "MIT" ]
null
null
null
import socket import logging import time import threading import sys class RDT: CONGESTION_AVOIDANCE = -1 SLOW_START = 0 FAST_RECOVERY = 1 def __init__(self): self.MSS = 2048 self.N = 100 # Window size. self.RTO = 0.75 # Timeout (secs). self.connection = False ...
29.785714
83
0.51239
import socket import logging import time import threading import sys class RDT: CONGESTION_AVOIDANCE = -1 SLOW_START = 0 FAST_RECOVERY = 1 def __init__(self): self.MSS = 2048 self.N = 100 self.RTO = 0.75 self.connection = False self.ACK = {} self.lo...
true
true
f7485bcb3c35dac73c15cb1d1cea343b0c7c461c
135
py
Python
tests/conftest.py
stfl/backtestd.py
cc776abfaa2f403d2897e14f3486c3976baafb80
[ "MIT" ]
null
null
null
tests/conftest.py
stfl/backtestd.py
cc776abfaa2f403d2897e14f3486c3976baafb80
[ "MIT" ]
null
null
null
tests/conftest.py
stfl/backtestd.py
cc776abfaa2f403d2897e14f3486c3976baafb80
[ "MIT" ]
null
null
null
"""Integration tests configuration file.""" # pylint: disable=unused-import from backtestd.py.tests.conftest import pytest_configure
22.5
56
0.8
from backtestd.py.tests.conftest import pytest_configure
true
true
f7485bf12e13dfc689f6d8fd9b7c359d91e3203d
3,140
py
Python
tools/wifi_connection_check.py
fito-jaeuklee/ESP32_LOCAL_OTA_SERVER
8e0d7832e300893ed227b04044991d21f9a9faea
[ "Apache-2.0" ]
null
null
null
tools/wifi_connection_check.py
fito-jaeuklee/ESP32_LOCAL_OTA_SERVER
8e0d7832e300893ed227b04044991d21f9a9faea
[ "Apache-2.0" ]
null
null
null
tools/wifi_connection_check.py
fito-jaeuklee/ESP32_LOCAL_OTA_SERVER
8e0d7832e300893ed227b04044991d21f9a9faea
[ "Apache-2.0" ]
null
null
null
import os import platform import getpass # from core import * # import pyping import subprocess import time def createNewConnection(name, SSID, key): config = """<?xml version=\"1.0\"?> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> <name>"""+name+"""</name> <SSIDConfig> ...
34.505495
97
0.57293
import os import platform import getpass import subprocess import time def createNewConnection(name, SSID, key): config = """<?xml version=\"1.0\"?> <WLANProfile xmlns="http://www.microsoft.com/networking/WLAN/profile/v1"> <name>"""+name+"""</name> <SSIDConfig> <SSID> <name>"""+SSID+"...
true
true
f7485c3f7c9e1065f163d2b8827b167e7fc9eadc
51,002
py
Python
venv/Lib/site-packages/numpy/core/tests/test_indexing.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
venv/Lib/site-packages/numpy/core/tests/test_indexing.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
venv/Lib/site-packages/numpy/core/tests/test_indexing.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
from __future__ import division, absolute_import, print_function import sys import warnings import functools import operator import pytest import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, asse...
38.203745
79
0.549096
from __future__ import division, absolute_import, print_function import sys import warnings import functools import operator import pytest import numpy as np from numpy.core._multiarray_tests import array_indexing from itertools import product from numpy.testing import ( assert_, assert_equal, assert_raises, asse...
true
true
f7485ce00b13b16d1c367a1d9061a97aab9c8190
1,239
py
Python
IntroProPython/IntroProPython - exercicios/capitulo 11/exercicio-11-05.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/IntroProPython - exercicios/capitulo 11/exercicio-11-05.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/IntroProPython - exercicios/capitulo 11/exercicio-11-05.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2017 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Primeira reimpressão - Outubro/2011 # Segunda reimpressão - ...
39.967742
78
0.606134
true
true
f7485cef2a7d6e7c391ae99f56c83f8ddce2f3c5
1,494
py
Python
src/appengine/handlers/testcase_detail/mark_fixed.py
urbanenomad/clusterfuzz
b6ed4bf088f24868b8a7c9c1aa568bfadca379b9
[ "Apache-2.0" ]
null
null
null
src/appengine/handlers/testcase_detail/mark_fixed.py
urbanenomad/clusterfuzz
b6ed4bf088f24868b8a7c9c1aa568bfadca379b9
[ "Apache-2.0" ]
null
null
null
src/appengine/handlers/testcase_detail/mark_fixed.py
urbanenomad/clusterfuzz
b6ed4bf088f24868b8a7c9c1aa568bfadca379b9
[ "Apache-2.0" ]
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, ...
33.2
74
0.753012
from flask import request from handlers import base_handler_flask from handlers.testcase_detail import show from libs import handler_flask from libs import helpers def mark(testcase): testcase.fixed = 'Yes' testcase.open = False testcase.put() helpers.log('Marked testcase %s as fixed' % testcase...
true
true
f7485d27f464973768d05ddf30f86274afce31af
2,392
py
Python
src/Data/2. AddBridges-SA2.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
3
2019-03-02T01:24:04.000Z
2022-02-18T01:45:57.000Z
src/Data/2. AddBridges-SA2.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
null
null
null
src/Data/2. AddBridges-SA2.py
mili7522/GGCNN
c0a4cec6dd4d4f8836d2cffd98f5d97d96bea418
[ "MIT" ]
1
2019-02-28T08:32:10.000Z
2019-02-28T08:32:10.000Z
import pandas as pd import os os.chdir('Data') # Bridges identified using http://stat.abs.gov.au/itt/r.jsp?ABSMaps neighbours = [(117031337,121041417, 'Sydney - Haymarket - The Rocks', 'North Sydney - Lavender Bay'), (121041415, 122011418, 'Mosman', 'Balgowlah - Clontarf - Seaforth'), ...
64.648649
154
0.649666
import pandas as pd import os os.chdir('Data') neighbours = [(117031337,121041417, 'Sydney - Haymarket - The Rocks', 'North Sydney - Lavender Bay'), (121041415, 122011418, 'Mosman', 'Balgowlah - Clontarf - Seaforth'), (121031408, 122031427, 'Lindfield - Roseville', 'Forestville -...
true
true
f7485fd066424ede4f563d0a793586ac6a5a6a02
3,368
py
Python
tests/aquisition/test_measure.py
jvdoorn/SpectrumAnalyzer
264afaa795bd7246da2967d49b176361c454746e
[ "MIT" ]
1
2020-12-29T18:02:04.000Z
2020-12-29T18:02:04.000Z
tests/aquisition/test_measure.py
jvdoorn/SpectrumAnalyzer
264afaa795bd7246da2967d49b176361c454746e
[ "MIT" ]
5
2021-02-07T16:01:48.000Z
2022-03-12T00:51:26.000Z
tests/aquisition/test_measure.py
jvdoorn/SpectrumAnalyzer
264afaa795bd7246da2967d49b176361c454746e
[ "MIT" ]
null
null
null
import unittest import numpy as np from specc.analysis.analyzer import CircuitTester from specc.aquisition.daq import DataAcquisitionInterface from specc.data.results import SignalResponse from tests.utils import ACCEPTABLE_ERROR, TEST_AMPLITUDE, TEST_DF, TEST_FREQUENCY, TEST_SAMPLES, TEST_SAMPLE_RATE class TestDAQ...
38.712644
115
0.684976
import unittest import numpy as np from specc.analysis.analyzer import CircuitTester from specc.aquisition.daq import DataAcquisitionInterface from specc.data.results import SignalResponse from tests.utils import ACCEPTABLE_ERROR, TEST_AMPLITUDE, TEST_DF, TEST_FREQUENCY, TEST_SAMPLES, TEST_SAMPLE_RATE class TestDAQ...
true
true
f74861432bed72662e178ce3757027cdae9ded9b
1,357
py
Python
nseta/common/multithreadedScanner.py
pkjmesra/nseta
28cd8cede465efe9f506a38c5933602c463e5185
[ "MIT" ]
8
2020-10-12T02:59:03.000Z
2022-03-20T15:06:50.000Z
nseta/common/multithreadedScanner.py
webclinic017/nseta
e718c4cf05937456ea10fdd7a911d76ffbc51a2e
[ "MIT" ]
3
2020-10-13T16:30:09.000Z
2021-01-07T23:57:05.000Z
nseta/common/multithreadedScanner.py
webclinic017/nseta
e718c4cf05937456ea10fdd7a911d76ffbc51a2e
[ "MIT" ]
5
2020-10-12T14:57:41.000Z
2021-12-30T11:52:34.000Z
# -*- coding: utf-8 -*- import inspect from nseta.common.commons import * from nseta.common.log import tracelog @tracelog def multithreaded_scan(**args): frame = inspect.currentframe() args, _, _, kwargs_main = inspect.getargvalues(frame) del(kwargs_main['frame']) kwargs = kwargs_main['args'] items_segment =...
32.309524
111
0.67944
import inspect from nseta.common.commons import * from nseta.common.log import tracelog @tracelog def multithreaded_scan(**args): frame = inspect.currentframe() args, _, _, kwargs_main = inspect.getargvalues(frame) del(kwargs_main['frame']) kwargs = kwargs_main['args'] items_segment = kwargs['items'] n...
true
true
f74861a226272e45f15412a9c60ef4336196e688
1,251
py
Python
stomp/__init__.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
stomp/__init__.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
stomp/__init__.py
AaronDMarasco/stomp.py
22f26087baf6206e531f0418125618bf553b3139
[ "Apache-2.0" ]
null
null
null
"""stomp.py provides connectivity to a message broker supporting the STOMP protocol. Protocol versions 1.0, 1.1 and 1.2 are supported. See the GITHUB project page for more information. Author: Jason R Briggs License: http://www.apache.org/licenses/LICENSE-2.0 Project Page: https://github.com/jasonrbriggs/stomp.py ""...
21.20339
84
0.781775
import stomp.adapter as adapter import stomp.connect as connect import stomp.listener as listener import stomp.logging as logging __version__ = (5, 0, 2) Connection10 = connect.StompConnection10 StompConnection10 = Connection10 Connection11 = connect.StompConnection11 StompConnection11 = Connection11 Connect...
true
true
f74861f8df58a7f0c4de559a24c0e7bc14ddfce2
443
py
Python
group_lectures/01_intro/05_plotting.py
mpambasange/MachineLearning
8b813345264513a57934317b01e1311628dc5b01
[ "MIT" ]
16
2016-09-01T08:50:59.000Z
2022-02-15T20:56:07.000Z
group_lectures/01_intro/05_plotting.py
olehermanse/INF3490-PythonAI
8b813345264513a57934317b01e1311628dc5b01
[ "MIT" ]
2
2016-10-20T09:36:19.000Z
2017-08-29T00:28:54.000Z
group_lectures/01_intro/05_plotting.py
olehermanse/INF3490-PythonAI
8b813345264513a57934317b01e1311628dc5b01
[ "MIT" ]
15
2016-10-31T12:30:37.000Z
2021-03-15T12:12:50.000Z
#!/usr/bin/env python3 # author: github.com/olehermanse # import libraries used for plotting and mathematical operations: import numpy as np import matplotlib.pyplot as plt # Define a mathematical expression as a function: def f(x): return x**3 x = np.linspace(-3, 3, 100) # Make array of 100 values between -2 an...
29.533333
80
0.68623
import numpy as np import matplotlib.pyplot as plt def f(x): return x**3 x = np.linspace(-3, 3, 100) plt.plot(x,f(x)) plt.show()
true
true
f7486216cf4671080dce6c5c46c5e41469439d71
1,898
py
Python
src/pyclts/commands/make_pkg.py
XachaB/pyclts
c7420d9c59122210422ae249f00a37284cda98c8
[ "Apache-2.0" ]
6
2020-09-07T20:49:04.000Z
2022-01-23T15:14:26.000Z
src/pyclts/commands/make_pkg.py
XachaB/pyclts
c7420d9c59122210422ae249f00a37284cda98c8
[ "Apache-2.0" ]
43
2019-10-22T06:53:58.000Z
2021-11-18T15:50:18.000Z
src/pyclts/commands/make_pkg.py
XachaB/pyclts
c7420d9c59122210422ae249f00a37284cda98c8
[ "Apache-2.0" ]
2
2019-11-22T10:37:40.000Z
2021-11-01T18:40:07.000Z
""" Prepare transcriptiondata from the transcription sources. """ from uritemplate import URITemplate from clldutils.clilib import ParserError from csvw.dsv import UnicodeWriter from pyclts.commands.make_dataset import process_transcription_data try: from lingpy.sequence.sound_classes import token2class from l...
36.5
88
0.640148
from uritemplate import URITemplate from clldutils.clilib import ParserError from csvw.dsv import UnicodeWriter from pyclts.commands.make_dataset import process_transcription_data try: from lingpy.sequence.sound_classes import token2class from lingpy.data import Model LINGPY = True except ImportError: ...
true
true
f748621e52b61a6b274acb7d6ac75e23cefa65fa
79
py
Python
ptp/components/mixins/__init__.py
tkornut/ptp
50c78c8f03024a71fc3d7959bfed9f238634141e
[ "Apache-2.0" ]
2
2019-04-08T21:49:15.000Z
2019-04-13T20:15:31.000Z
ptp/components/mixins/__init__.py
tkornut/ptp
50c78c8f03024a71fc3d7959bfed9f238634141e
[ "Apache-2.0" ]
11
2019-02-23T16:58:27.000Z
2019-04-10T03:40:04.000Z
ptp/components/mixins/__init__.py
tkornut/ptp
50c78c8f03024a71fc3d7959bfed9f238634141e
[ "Apache-2.0" ]
null
null
null
from .word_mappings import WordMappings __all__ = [ 'WordMappings', ]
13.166667
39
0.683544
from .word_mappings import WordMappings __all__ = [ 'WordMappings', ]
true
true
f748625f0af98010b446db53d1350fc2cce70b6c
1,220
py
Python
setup.py
kingemma0430/jet-bridge
7cb68a0232850c28ebf9c474b031db507845feb5
[ "MIT" ]
2
2020-07-27T22:18:42.000Z
2021-11-15T10:03:14.000Z
setup.py
kingemma0430/jet-bridge
7cb68a0232850c28ebf9c474b031db507845feb5
[ "MIT" ]
null
null
null
setup.py
kingemma0430/jet-bridge
7cb68a0232850c28ebf9c474b031db507845feb5
[ "MIT" ]
null
null
null
import os from setuptools import setup, find_packages def read(fname): path = os.path.join(os.path.dirname(__file__), fname) try: file = open(path, encoding='utf-8') except TypeError: file = open(path) return file.read() def get_install_requires(): install_requires = [ 't...
22.181818
57
0.62541
import os from setuptools import setup, find_packages def read(fname): path = os.path.join(os.path.dirname(__file__), fname) try: file = open(path, encoding='utf-8') except TypeError: file = open(path) return file.read() def get_install_requires(): install_requires = [ 't...
true
true
f748629c8b4e96183df10cc90241c7b6ec55f2a9
511
py
Python
harness/fuzzware_harness/user_hooks/fuzz.py
fuzzware-fuzzer/fuzzware-emulator
4ee11957c32c02826577aef4c470505a4e359303
[ "Apache-2.0" ]
null
null
null
harness/fuzzware_harness/user_hooks/fuzz.py
fuzzware-fuzzer/fuzzware-emulator
4ee11957c32c02826577aef4c470505a4e359303
[ "Apache-2.0" ]
null
null
null
harness/fuzzware_harness/user_hooks/fuzz.py
fuzzware-fuzzer/fuzzware-emulator
4ee11957c32c02826577aef4c470505a4e359303
[ "Apache-2.0" ]
2
2022-03-27T12:23:09.000Z
2022-03-30T12:08:07.000Z
from unicorn.arm_const import UC_ARM_REG_R0 from .. import native def get_fuzz(uc, size): """ Gets at most 'size' bytes from the fuzz pool. If we run out of fuzz, something will happen (e.g., exit) :param size: :return: """ return native.get_fuzz(uc, size) def fuzz_remaining(): return...
21.291667
61
0.679061
from unicorn.arm_const import UC_ARM_REG_R0 from .. import native def get_fuzz(uc, size): return native.get_fuzz(uc, size) def fuzz_remaining(): return native.fuzz_remaining() def load_fuzz(file_path): native.load_fuzz(file_path) def return_fuzz_byte(uc): global fuzz c = get_fuzz(uc, 1) uc.r...
true
true
f74862d83f960bae8b2e0a721a0857e081cca9cf
2,730
py
Python
match_log.py
HannesHaglund/Swiss
b1449734ad1d7d609fdd40a7736a4b84ba7885e0
[ "MIT" ]
8
2016-11-24T15:42:52.000Z
2022-03-29T08:12:41.000Z
match_log.py
HannesHaglund/Swiss
b1449734ad1d7d609fdd40a7736a4b84ba7885e0
[ "MIT" ]
null
null
null
match_log.py
HannesHaglund/Swiss
b1449734ad1d7d609fdd40a7736a4b84ba7885e0
[ "MIT" ]
null
null
null
from match_result import MatchResult from shared_functions import bye_dummy_player_name import networkx as nx import random class MatchLog: def __init__(self): self._entries = [] self._explicit_players = [] self._player_active_map = {} # Ensures we don't error if the user tries to l...
27.575758
87
0.608791
from match_result import MatchResult from shared_functions import bye_dummy_player_name import networkx as nx import random class MatchLog: def __init__(self): self._entries = [] self._explicit_players = [] self._player_active_map = {} self.set_player_active(bye_dummy_playe...
true
true
f74862fc57af4ddc68eb0678e0559ef5850639cd
7,215
py
Python
IsThisAValidTeamName/stats/agent_copy.py
ksajan/iis-ms-del
6339f639d674fedb88454b43dcd64493be2a4558
[ "MIT" ]
2
2019-12-24T13:32:22.000Z
2019-12-26T11:26:08.000Z
IsThisAValidTeamName/stats/agent_copy.py
ksajan/iis-ms-del
6339f639d674fedb88454b43dcd64493be2a4558
[ "MIT" ]
1
2019-12-26T07:53:34.000Z
2019-12-26T07:53:34.000Z
IsThisAValidTeamName/stats/agent_copy.py
ksajan/iis-ms-del
6339f639d674fedb88454b43dcd64493be2a4558
[ "MIT" ]
35
2019-12-22T05:05:43.000Z
2019-12-22T07:16:56.000Z
import pkg_resources import types import pkg_resources import types import time import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() from pandas_datareader import data as pdr import yfinance as yf yf.pdr_override() company = input("Enter Company Name : ") df_full = pd...
34.357143
109
0.584338
import pkg_resources import types import pkg_resources import types import time import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns sns.set() from pandas_datareader import data as pdr import yfinance as yf yf.pdr_override() company = input("Enter Company Name : ") df_full = pd...
true
true
f74863d4f5bd68b19e177e2d78103607d7f36047
1,475
py
Python
app/core/tests/test_admin.py
LuisMota93/recipe-app-api
6e17880bf874f583c37c25551b3eb116ea7d2d12
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
LuisMota93/recipe-app-api
6e17880bf874f583c37c25551b3eb116ea7d2d12
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
LuisMota93/recipe-app-api
6e17880bf874f583c37c25551b3eb116ea7d2d12
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email = 'admin@mail.com', ...
33.522727
101
0.64
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email = 'admin@mail.com', ...
true
true
f74863e9d1ec374c366eaac7b47409c5a6a01eb8
516
py
Python
setup.py
neocrk21/jefferson3
c196fc31a8a415b3ab31294052ae59d9ffc95cb7
[ "MIT" ]
null
null
null
setup.py
neocrk21/jefferson3
c196fc31a8a415b3ab31294052ae59d9ffc95cb7
[ "MIT" ]
null
null
null
setup.py
neocrk21/jefferson3
c196fc31a8a415b3ab31294052ae59d9ffc95cb7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 from distutils.core import setup version = '0.3' setup( name='jefferson', version=version, description='JFFS2 filesystem extraction tool originally released by Stefan Viehböck. Python3 update by Jaan Klouman', author='Stefan Viehböck & Jaan Klouman', url='http...
25.8
122
0.69186
from distutils.core import setup version = '0.3' setup( name='jefferson', version=version, description='JFFS2 filesystem extraction tool originally released by Stefan Viehböck. Python3 update by Jaan Klouman', author='Stefan Viehböck & Jaan Klouman', url='https://github.com/sviehb/jefferson', ...
true
true
f7486473166589d1446909259e7709fb68e2a5df
3,373
py
Python
src/structure/process_pdb.py
igordub/enm-research-project
c5c52f2a6b415bd871800bcf725fda23cb3fd542
[ "MIT" ]
null
null
null
src/structure/process_pdb.py
igordub/enm-research-project
c5c52f2a6b415bd871800bcf725fda23cb3fd542
[ "MIT" ]
null
null
null
src/structure/process_pdb.py
igordub/enm-research-project
c5c52f2a6b415bd871800bcf725fda23cb3fd542
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import os import pandas as pd from biopandas.pdb import PandasPdb from copy import deepcopy import src.utilities as utils @click.command() @click.argument('input_dir', type=click.Path(exists=True))...
34.070707
100
0.673881
import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import os import pandas as pd from biopandas.pdb import PandasPdb from copy import deepcopy import src.utilities as utils @click.command() @click.argument('input_dir', type=click.Path(exists=True)) @click.argument('outpu...
true
true
f7486571a49ac12a6623aa6536ad0b18ae0e49bc
7,694
py
Python
allennlp_models/lm/models/masked_language_model.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
1
2021-03-03T20:03:24.000Z
2021-03-03T20:03:24.000Z
allennlp_models/lm/models/masked_language_model.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
29
2020-10-29T20:28:47.000Z
2022-03-28T13:05:18.000Z
allennlp_models/lm/models/masked_language_model.py
matt-peters/allennlp-models
cdd505ed539fdc2b82e4cc0a23eae4bfd3368e7e
[ "Apache-2.0" ]
null
null
null
from typing import Dict from overrides import overrides import torch from allennlp.common.checks import check_dimensions_match from allennlp.data import TextFieldTensors, Vocabulary from allennlp.models.model import Model from allennlp.modules import Seq2SeqEncoder, TextFieldEmbedder from allennlp.nn import util, Ini...
41.815217
99
0.646868
from typing import Dict from overrides import overrides import torch from allennlp.common.checks import check_dimensions_match from allennlp.data import TextFieldTensors, Vocabulary from allennlp.models.model import Model from allennlp.modules import Seq2SeqEncoder, TextFieldEmbedder from allennlp.nn import util, Ini...
true
true
f74865b56f4b1d7205a79fa7c0282396b519d460
22,310
py
Python
docs/documentation_generator.py
remihacker5/ursina
d32a74ff4069279c95ab978c81db2e55f933e24a
[ "MIT" ]
null
null
null
docs/documentation_generator.py
remihacker5/ursina
d32a74ff4069279c95ab978c81db2e55f933e24a
[ "MIT" ]
null
null
null
docs/documentation_generator.py
remihacker5/ursina
d32a74ff4069279c95ab978c81db2e55f933e24a
[ "MIT" ]
null
null
null
from pathlib import Path from pprint import pprint import keyword import builtins import textwrap from ursina import color, lerp, application def indentation(line): return len(line) - len(line.lstrip()) def get_module_attributes(str): attrs = list() for l in str.split('\n'): if len(l) == 0: ...
35.983871
142
0.540923
from pathlib import Path from pprint import pprint import keyword import builtins import textwrap from ursina import color, lerp, application def indentation(line): return len(line) - len(line.lstrip()) def get_module_attributes(str): attrs = list() for l in str.split('\n'): if len(l) == 0: ...
true
true
f74866f7d2c35ff00963583bee6720c53a9ff553
8,247
py
Python
src/clincoded/audit/biosample.py
ClinGen/clincoded
5624c74546ce2a44eda00ee632a8de8c2099da10
[ "MIT" ]
30
2015-09-23T20:38:57.000Z
2021-03-10T03:12:46.000Z
src/clincoded/audit/biosample.py
ClinGen/clincoded
5624c74546ce2a44eda00ee632a8de8c2099da10
[ "MIT" ]
2,132
2015-06-08T21:50:35.000Z
2022-02-15T22:44:18.000Z
src/clincoded/audit/biosample.py
ClinGen/clincoded
5624c74546ce2a44eda00ee632a8de8c2099da10
[ "MIT" ]
10
2015-09-25T20:11:25.000Z
2020-12-09T02:58:44.000Z
from contentbase.auditor import ( AuditFailure, audit_checker, ) term_mapping = { "head": "UBERON:0000033", "limb": "UBERON:0002101", "salivary gland": "UBERON:0001044", "male accessory sex gland": "UBERON:0010147", "testis": "UBERON:0000473", "female gonad": "UBERON:0000992", "dig...
39.45933
171
0.652843
from contentbase.auditor import ( AuditFailure, audit_checker, ) term_mapping = { "head": "UBERON:0000033", "limb": "UBERON:0002101", "salivary gland": "UBERON:0001044", "male accessory sex gland": "UBERON:0010147", "testis": "UBERON:0000473", "female gonad": "UBERON:0000992", "dig...
true
true
f74867a56a14a465141079cee5e89751ec5733c8
9,363
py
Python
experiments/hafner_comparison.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
3
2021-10-04T11:42:34.000Z
2022-01-24T11:26:42.000Z
experiments/hafner_comparison.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
1
2022-01-24T11:15:54.000Z
2022-01-24T11:20:23.000Z
experiments/hafner_comparison.py
mossjacob/alfi-paper
9c5650db852d6a0ff97a5c4292d647c300274082
[ "MIT" ]
1
2022-01-24T11:23:27.000Z
2022-01-24T11:23:27.000Z
import torch import numpy as np from torch.nn import Parameter from gpytorch.optim import NGD from torch.optim import Adam from matplotlib import pyplot as plt from gpytorch.constraints import Positive, Interval from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal from alfi.c...
38.690083
113
0.645306
import torch import numpy as np from torch.nn import Parameter from gpytorch.optim import NGD from torch.optim import Adam from matplotlib import pyplot as plt from gpytorch.constraints import Positive, Interval from gpytorch.distributions import MultitaskMultivariateNormal, MultivariateNormal from alfi.c...
true
true
f74867e6e943621b2ca968bb770f91046f73c40c
1,976
py
Python
scraping_2/com-4/reviewsprofiles/reviewsprofiles/spiders/lgbt4scraper.py
hvarS/AmazonPrivacy
d3c975e428d8ac80dbe4b4e7a2e33082eec89524
[ "MIT" ]
null
null
null
scraping_2/com-4/reviewsprofiles/reviewsprofiles/spiders/lgbt4scraper.py
hvarS/AmazonPrivacy
d3c975e428d8ac80dbe4b4e7a2e33082eec89524
[ "MIT" ]
null
null
null
scraping_2/com-4/reviewsprofiles/reviewsprofiles/spiders/lgbt4scraper.py
hvarS/AmazonPrivacy
d3c975e428d8ac80dbe4b4e7a2e33082eec89524
[ "MIT" ]
null
null
null
import scrapy import pandas as pd import time import os category_name = "LGBT" category_num = 4 class QuotesSpider(scrapy.Spider): name = category_name.lower() + str(category_num) + "spider" def start_requests(self): list_of_urls = [] parent_dir = "./reviewpages" link_file = parent_di...
30.875
93
0.565283
import scrapy import pandas as pd import time import os category_name = "LGBT" category_num = 4 class QuotesSpider(scrapy.Spider): name = category_name.lower() + str(category_num) + "spider" def start_requests(self): list_of_urls = [] parent_dir = "./reviewpages" link_file = parent_di...
true
true
f74868487fe9dbc32c22be09fcd99d71fc3aa856
15,050
py
Python
examples/cgle_periodic/run.py
fkemeth/emergent_pdes
d0501f21c9eb569543a19d4d95d6c91a9ccb11fe
[ "MIT" ]
null
null
null
examples/cgle_periodic/run.py
fkemeth/emergent_pdes
d0501f21c9eb569543a19d4d95d6c91a9ccb11fe
[ "MIT" ]
null
null
null
examples/cgle_periodic/run.py
fkemeth/emergent_pdes
d0501f21c9eb569543a19d4d95d6c91a9ccb11fe
[ "MIT" ]
null
null
null
""" Run CGLE example using specified config file. """ import int.cgle as cint import tests import lpde import os import pickle import shutil import configparser import numpy as np import matplotlib.pyplot as plt import tqdm import torch from torch.utils.tensorboard import SummaryWriter import utils_cgle from scipy.s...
45.606061
99
0.57289
import int.cgle as cint import tests import lpde import os import pickle import shutil import configparser import numpy as np import matplotlib.pyplot as plt import tqdm import torch from torch.utils.tensorboard import SummaryWriter import utils_cgle from scipy.spatial.distance import cdist torch.set_default_dtype...
true
true
f7486919d94253b029e1bdc18a98387e040a1b29
1,384
py
Python
bluebottle/events/migrations/0004_add_permissions.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/events/migrations/0004_add_permissions.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/events/migrations/0004_add_permissions.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-05-15 10:40 from __future__ import unicode_literals from django.db import migrations, connection from bluebottle.utils.utils import update_group_permissions from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebo...
27.68
83
0.592486
from __future__ import unicode_literals from django.db import migrations, connection from bluebottle.utils.utils import update_group_permissions from bluebottle.clients import properties from bluebottle.clients.models import Client from bluebottle.clients.utils import LocalTenant def add_group_permissions(apps, ...
true
true
f748694532787cb58f71cd9a97508c105fe3181e
6,899
py
Python
_run.py
ThomasVieth/geodeconstructor
934ab7c0a0f0b728111d33ac90812272c85310f2
[ "MIT" ]
null
null
null
_run.py
ThomasVieth/geodeconstructor
934ab7c0a0f0b728111d33ac90812272c85310f2
[ "MIT" ]
null
null
null
_run.py
ThomasVieth/geodeconstructor
934ab7c0a0f0b728111d33ac90812272c85310f2
[ "MIT" ]
null
null
null
""" """ ## python imports from argparse import ArgumentParser from datetime import datetime, timedelta from enum import IntEnum from os.path import abspath, dirname, join ## internal imports from geodeconstructor.history.json import generate_location_history_json from geodeconstructor.history.locations import iter...
35.561856
92
0.628352
import ArgumentParser from datetime import datetime, timedelta from enum import IntEnum from os.path import abspath, dirname, join uctor.history.json import generate_location_history_json from geodeconstructor.history.locations import iter_unique_path_by_attribute = ArgumentParser() argument_parser.add_argument( ...
true
true
f7486a7eafd213db18651d28ab1c2807af42e74e
802
py
Python
neotest/bases.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
1
2020-10-05T11:01:31.000Z
2020-10-05T11:01:31.000Z
neotest/bases.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
null
null
null
neotest/bases.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
null
null
null
# This file is part of Neotest. # See http://www.neotest.io for more information. # This program is published under the MIT license. import multiprocessing import threading import neotest class ProcessBase(multiprocessing.Process, neotest.logging.LogClientBase): def __init__(self, name=None): multiproce...
34.869565
104
0.746883
import multiprocessing import threading import neotest class ProcessBase(multiprocessing.Process, neotest.logging.LogClientBase): def __init__(self, name=None): multiprocessing.Process.__init__(self, name=name) neotest.logging.LogClientBase.__init__(self, logger="process", queue=neot...
true
true
f7486b27f033c7a14fbdd38996694a1378beece9
21,835
py
Python
djangosaml2/views.py
CBitLabs/djangosaml2
6fc8f2dc50d8a58dca142c9577d6bffa9ff8d7c8
[ "Apache-2.0" ]
null
null
null
djangosaml2/views.py
CBitLabs/djangosaml2
6fc8f2dc50d8a58dca142c9577d6bffa9ff8d7c8
[ "Apache-2.0" ]
1
2018-11-26T17:02:54.000Z
2018-11-26T17:02:54.000Z
djangosaml2/views.py
CBitLabs/djangosaml2
6fc8f2dc50d8a58dca142c9577d6bffa9ff8d7c8
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2010-2013 Yaco Sistemas (http://www.yaco.es) # Copyright (C) 2009 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # 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 # # ...
42.315891
123
0.686329
import base64 import logging from django.conf import settings from django.contrib import auth from django.contrib.auth.decorators import login_required try: from django.contrib.auth.views import LogoutView django_logout = LogoutView.as_view() except ImportError: from django.contrib.auth.view...
true
true
f7486b764d0578227632b6b6e4b6b62ba7560618
1,307
py
Python
0_Strings/backward_slice.py
ChristopherDaigle/udemy_python
8bc6335251c2da4f621d506f5ac580c7c8311fcc
[ "Unlicense" ]
null
null
null
0_Strings/backward_slice.py
ChristopherDaigle/udemy_python
8bc6335251c2da4f621d506f5ac580c7c8311fcc
[ "Unlicense" ]
null
null
null
0_Strings/backward_slice.py
ChristopherDaigle/udemy_python
8bc6335251c2da4f621d506f5ac580c7c8311fcc
[ "Unlicense" ]
null
null
null
# Backward slicing #-65432109876543210987654321 # 01234567890123456789012345 letters = "".join(sorted('qwertyuiopasdfghjklzxcvbnm')) # abcdefghijklmnopqrstuvwxyz # print(letters) # for i, a in enumerate(sorte...
30.395349
91
0.65723
letters = "".join(sorted('qwertyuiopasdfghjklzxcvbnm')) backwards = letters[25:0:-1] print(backwards) backwards = letters[25:-1:-1] print(backwards) backwards = letters[25::-1] print(b...
true
true
f7486b8d7cf9fc63f219a3613605b51efa361e29
432
py
Python
evap/evaluation/migrations/0052_add_course_is_private.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
29
2020-02-28T23:03:41.000Z
2022-02-19T09:29:36.000Z
evap/evaluation/migrations/0052_add_course_is_private.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
737
2015-01-02T17:43:25.000Z
2018-12-10T20:45:10.000Z
evap/evaluation/migrations/0052_add_course_is_private.py
felixrindt/EvaP
fe65fcc511cc942695ce1edbaab170894f0d37b1
[ "MIT" ]
83
2015-01-14T12:39:41.000Z
2018-10-29T16:36:43.000Z
# Generated by Django 1.9.2 on 2016-05-22 14:45 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evaluation', '0051_change_question_order_verbose'), ] operations = [ migrations.AddField( model_name='course', name=...
22.736842
80
0.627315
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('evaluation', '0051_change_question_order_verbose'), ] operations = [ migrations.AddField( model_name='course', name='is_private', field=models.BooleanF...
true
true
f7486b905e9f76e705f824626c61ea7b0fff7e07
2,973
py
Python
dataset/iam_handwriting_word_database.py
belosthomas/socr-text
6aa143abbc62ca1f8f582eecb3b6e0b055c1aadb
[ "MIT" ]
1
2018-08-22T06:59:21.000Z
2018-08-22T06:59:21.000Z
dataset/iam_handwriting_word_database.py
belosthomas/socr-text
6aa143abbc62ca1f8f582eecb3b6e0b055c1aadb
[ "MIT" ]
null
null
null
dataset/iam_handwriting_word_database.py
belosthomas/socr-text
6aa143abbc62ca1f8f582eecb3b6e0b055c1aadb
[ "MIT" ]
null
null
null
import os from os.path import isfile from lxml import etree import torch from PIL import Image from torch.utils.data.dataset import Dataset from utils.image import image_pillow_to_numpy class IAMHandwritingWordDatabase(Dataset): def __init__(self, path, height=32, loss=None): self.height = height ...
31.967742
158
0.536831
import os from os.path import isfile from lxml import etree import torch from PIL import Image from torch.utils.data.dataset import Dataset from utils.image import image_pillow_to_numpy class IAMHandwritingWordDatabase(Dataset): def __init__(self, path, height=32, loss=None): self.height = height ...
true
true
f7486d4460a98a3067c26ffffd168e9badc41f57
991
py
Python
twitoff/predict.py
DanielMartinAlarcon/TwitOff
b3686714d28756b3abdb537b86b79ada6ce43aa5
[ "MIT" ]
null
null
null
twitoff/predict.py
DanielMartinAlarcon/TwitOff
b3686714d28756b3abdb537b86b79ada6ce43aa5
[ "MIT" ]
3
2021-03-18T22:51:44.000Z
2021-09-08T00:59:24.000Z
twitoff/predict.py
DanielMartinAlarcon/TwitOff
b3686714d28756b3abdb537b86b79ada6ce43aa5
[ "MIT" ]
null
null
null
"""Prediction of Users based on Tweet embeddings.""" import numpy as np from sklearn.linear_model import LogisticRegression from .models import User from .twitter import BASILICA def predict_user(user1_name, user2_name, tweet_text, cache=None): """Determine and return which user is more likely to say a given Twee...
52.157895
78
0.729566
import numpy as np from sklearn.linear_model import LogisticRegression from .models import User from .twitter import BASILICA def predict_user(user1_name, user2_name, tweet_text, cache=None): user1 = User.query.filter(User.name == user1_name).one() user2 = User.query.filter(User.name == user2_name).one() ...
true
true
f7486df80150c6969f1fee1e4596bf55e2515321
256
py
Python
src/SRM-147/ccipher.py
mikefeneley/topcoder
175a7a05367c0458a900a3fea16af68ae5ee53ec
[ "MIT" ]
null
null
null
src/SRM-147/ccipher.py
mikefeneley/topcoder
175a7a05367c0458a900a3fea16af68ae5ee53ec
[ "MIT" ]
null
null
null
src/SRM-147/ccipher.py
mikefeneley/topcoder
175a7a05367c0458a900a3fea16af68ae5ee53ec
[ "MIT" ]
null
null
null
class CCipher: def decode(self, cipherText, shift): decode_txt = "" for char in cipherText: new = chr(ord(char) - shift) if(new < 'A'): new = chr(ord(new) + ord('Z') - ord('A') + 1) decode_txt = decode_txt + new return decode_txt
19.692308
49
0.597656
class CCipher: def decode(self, cipherText, shift): decode_txt = "" for char in cipherText: new = chr(ord(char) - shift) if(new < 'A'): new = chr(ord(new) + ord('Z') - ord('A') + 1) decode_txt = decode_txt + new return decode_txt
true
true
f7486e04c7d51b691516e79885ad3aa192e49f5e
3,588
py
Python
lib/python3.8/site-packages/ansible_collections/f5networks/f5_modules/plugins/doc_fragments/f5_rest_cli.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/f5networks/f5_modules/plugins/doc_fragments/f5_rest_cli.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/f5networks/f5_modules/plugins/doc_fragments/f5_rest_cli.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
# -*- coding: utf-8 -*- # 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 class ModuleDocFragment(object): # Standard F5 documentation fragment DOCUMENTATION = r''' options: pro...
40.314607
128
0.659699
from __future__ import absolute_import, division, print_function __metaclass__ = type class ModuleDocFragment(object): DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. type: dict version_added: "1.0.0" suboptions: password: ...
true
true
f7486feddae2d322314e7631a1a3f281a6574198
11,178
py
Python
perms_test.py
klokan/googlecrisismap
e31b68706f7a4921037b0e513703483f2ac3b830
[ "Apache-2.0" ]
40
2015-06-24T12:31:14.000Z
2021-01-30T23:33:54.000Z
perms_test.py
klokan/googlecrisismap
e31b68706f7a4921037b0e513703483f2ac3b830
[ "Apache-2.0" ]
16
2015-07-30T14:24:42.000Z
2021-02-24T22:30:56.000Z
perms_test.py
klokan/googlecrisismap
e31b68706f7a4921037b0e513703483f2ac3b830
[ "Apache-2.0" ]
27
2015-06-21T07:31:58.000Z
2021-02-12T08:47:42.000Z
#!/usr/bin/python # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at: http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
43.494163
80
0.703614
import domains import model import perms import test_utils def GetRolesForMap(map_object): return {r for r in perms.MAP_ROLES if perms.CheckAccess(r, target=map_object)} class PermsTests(test_utils.BaseTest): def testUserRoles(self): m = test_utils.CreateMap( owners=['owner'], editor...
true
true
f7487065caf042f5b03d32b24df4256e45274b3e
1,517
py
Python
tests/trade_utilities_tests/simulator_test.py
bkarjoo/pysim
5d4e6ae337cac5b588a98ed33807e97677e36922
[ "MIT" ]
null
null
null
tests/trade_utilities_tests/simulator_test.py
bkarjoo/pysim
5d4e6ae337cac5b588a98ed33807e97677e36922
[ "MIT" ]
null
null
null
tests/trade_utilities_tests/simulator_test.py
bkarjoo/pysim
5d4e6ae337cac5b588a98ed33807e97677e36922
[ "MIT" ]
null
null
null
from trade_utilities.simulator import * from kibot.kibot_downloader import * from trade_utilities.order import Order log_on() df = request_history_as_data_frame('AAPL', 1, None, '2018-10-30', '2018-10-30') # 2018-10-30 09:30:00 211.15 211.2 209.27 209.6824 771859 AAPL df = df['2018-10-30 9:30:00':'2018-10-30 9:...
26.155172
79
0.649308
from trade_utilities.simulator import * from kibot.kibot_downloader import * from trade_utilities.order import Order log_on() df = request_history_as_data_frame('AAPL', 1, None, '2018-10-30', '2018-10-30') df = df['2018-10-30 9:30:00':'2018-10-30 9:30:00'] row = df.iloc[0] o1 = Order(100, 'AAPL', 0) o2 = Order(-100,...
false
true
f74873f707cbd05155e01008b4b20c2856b96d7a
12,707
py
Python
Lib/site-packages/wx/lib/throbber.py
15008477526/-
e58e4879bd9001b4b27eafcbddce9daeadd5aa51
[ "bzip2-1.0.6" ]
3
2019-10-06T15:39:39.000Z
2020-09-29T23:51:50.000Z
Venv-IDE/Lib/site-packages/wx/lib/throbber.py
myhumankit/Blind_IDE
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
9
2021-03-18T23:10:27.000Z
2022-03-11T23:43:55.000Z
Venv-IDE/Lib/site-packages/wx/lib/throbber.py
myhumankit/Blind_IDE
5262a5dd106f3f52a374a6c1ef68ff53d8847001
[ "MIT" ]
2
2019-03-11T05:06:49.000Z
2019-03-22T21:48:49.000Z
""" A throbber displays an animated image that can be started, stopped, reversed, etc. Useful for showing an ongoing process (like most web browsers use) or simply for adding eye-candy to an application. Throbbers utilize a wxTimer so that normal processing can continue unencumbered. """ # # throbber.py - Cliff Well...
29.898824
93
0.564964
import os import wx THROBBER_EVENT = wx.NewEventType() EVT_UPDATE_THROBBER = wx.PyEventBinder(THROBBER_EVENT, 0) class UpdateThrobberEvent(wx.PyEvent): def __init__(self): wx.PyEvent.__init__(self) self.SetEventType(THROBBER_EVENT) class Throbber(wx.Panel): def __init__(sel...
true
true
f74875edc002a1e03f2b2745eeb98c1b119e6e61
4,482
py
Python
tweets/api/views.py
nelsondude/tweetmymouth
b7614850189c21c18dc291b9167cc5afedacf386
[ "MIT" ]
null
null
null
tweets/api/views.py
nelsondude/tweetmymouth
b7614850189c21c18dc291b9167cc5afedacf386
[ "MIT" ]
null
null
null
tweets/api/views.py
nelsondude/tweetmymouth
b7614850189c21c18dc291b9167cc5afedacf386
[ "MIT" ]
null
null
null
from rest_framework import generics from django.db.models import Q from rest_framework import permissions from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import authentication, permissions from .serializers import TweetModelSerializer from .pagination import St...
36.145161
91
0.673583
from rest_framework import generics from django.db.models import Q from rest_framework import permissions from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import authentication, permissions from .serializers import TweetModelSerializer from .pagination import St...
true
true
f74875f48c7a3c575e6324b175d4b10fe8d0a101
2,826
py
Python
alipay/aop/api/domain/Principal.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/Principal.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/Principal.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class Principal(object): def __init__(self): self._cert_no = None self._cert_type = None self._signer_type = None self._user_name = None self._verify_type = None...
27.980198
73
0.577495
import json from alipay.aop.api.constant.ParamConstants import * class Principal(object): def __init__(self): self._cert_no = None self._cert_type = None self._signer_type = None self._user_name = None self._verify_type = None @property def cert_no(self): ...
true
true
f748777e615e4c57ce88fcf0cd17ccc89725b961
131
py
Python
subaligner/__init__.py
baxtree/subaligner
0a72a54d5271c6ce86b556860992584ef4a51012
[ "MIT" ]
227
2020-01-05T18:47:15.000Z
2022-03-19T20:19:33.000Z
subaligner/__init__.py
baxtree/subaligner
0a72a54d5271c6ce86b556860992584ef4a51012
[ "MIT" ]
43
2019-12-16T09:15:38.000Z
2022-03-21T10:39:40.000Z
subaligner/__init__.py
baxtree/subaligner
0a72a54d5271c6ce86b556860992584ef4a51012
[ "MIT" ]
9
2020-11-16T03:33:11.000Z
2022-03-11T22:12:38.000Z
import multiprocessing as mp from ._version import __version__ __all__ = ["__version__"] mp.set_start_method("spawn", force=True)
21.833333
40
0.793893
import multiprocessing as mp from ._version import __version__ __all__ = ["__version__"] mp.set_start_method("spawn", force=True)
true
true
f74877d45e0f9cc0ee28ac4e85f77b18123fd1bf
2,504
py
Python
script/DoggoBot.py
ruslanalas/BurgerTranslate
01275483a87dedf216ed994e380253cbe74dcc2c
[ "MIT" ]
null
null
null
script/DoggoBot.py
ruslanalas/BurgerTranslate
01275483a87dedf216ed994e380253cbe74dcc2c
[ "MIT" ]
null
null
null
script/DoggoBot.py
ruslanalas/BurgerTranslate
01275483a87dedf216ed994e380253cbe74dcc2c
[ "MIT" ]
null
null
null
import logging import re import requests from telegram.ext import Updater, Filters, CommandHandler, MessageHandler logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.NOTSET) def get_url(): contents = requests.get('https://random.dog/woof.json').j...
41.733333
203
0.696486
import logging import re import requests from telegram.ext import Updater, Filters, CommandHandler, MessageHandler logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.NOTSET) def get_url(): contents = requests.get('https://random.dog/woof.json').j...
true
true
f74880fb5bb0c9751a07a7983f2e9145905a210e
8,220
py
Python
train.py
AdamWang00/yolov3-tf2
956ebe38d3a90de585444b33fa1c01259434f701
[ "MIT" ]
null
null
null
train.py
AdamWang00/yolov3-tf2
956ebe38d3a90de585444b33fa1c01259434f701
[ "MIT" ]
5
2021-08-25T15:14:21.000Z
2022-02-10T06:10:26.000Z
train.py
AdamWang00/yolov3-tf2
956ebe38d3a90de585444b33fa1c01259434f701
[ "MIT" ]
null
null
null
from absl import app, flags, logging from absl.flags import FLAGS import tensorflow as tf import numpy as np import cv2 from tensorflow.keras.callbacks import ( ReduceLROnPlateau, EarlyStopping, ModelCheckpoint, TensorBoard ) from yolov3_tf2.models import ( YoloV3, YoloV3Tiny, YoloLoss, yolo_an...
41.515152
103
0.61764
from absl import app, flags, logging from absl.flags import FLAGS import tensorflow as tf import numpy as np import cv2 from tensorflow.keras.callbacks import ( ReduceLROnPlateau, EarlyStopping, ModelCheckpoint, TensorBoard ) from yolov3_tf2.models import ( YoloV3, YoloV3Tiny, YoloLoss, yolo_an...
true
true
f74881ebbf1f3fffe0c32cb688d7f30359439fb9
9,151
py
Python
monai/transforms/croppad/array.py
xidchen/MONAI
4eae383f1abbbb62a69e054c016a3b4e53af3ea7
[ "Apache-2.0" ]
null
null
null
monai/transforms/croppad/array.py
xidchen/MONAI
4eae383f1abbbb62a69e054c016a3b4e53af3ea7
[ "Apache-2.0" ]
null
null
null
monai/transforms/croppad/array.py
xidchen/MONAI
4eae383f1abbbb62a69e054c016a3b4e53af3ea7
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 MONAI Consortium # 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, s...
46.217172
119
0.664627
from typing import Optional, Callable import numpy as np from monai.data.utils import get_random_patch, get_valid_patch_size from monai.transforms.compose import Transform, Randomizable from monai.transforms.utils import generate_spatial_bounding_box from monai.utils.misc import ensure_tuple, ensure_tuple_...
true
true
f748826ea1f47b539eda529456ffc3475991ace2
2,989
py
Python
ground/core/boxed.py
lycantropos/ground
ef6f54b8cb555af8d9202d621cac57a892ecb78d
[ "MIT" ]
4
2021-05-15T19:15:56.000Z
2021-11-30T06:19:47.000Z
ground/core/boxed.py
lycantropos/ground
ef6f54b8cb555af8d9202d621cac57a892ecb78d
[ "MIT" ]
null
null
null
ground/core/boxed.py
lycantropos/ground
ef6f54b8cb555af8d9202d621cac57a892ecb78d
[ "MIT" ]
null
null
null
from typing import (Iterable, Tuple, Type) from .hints import (Box, Contour, Point, Polygon, Scalar, Segment) def from_contour(contour: Contour, box_cls: Type[Box]) -> Box: ...
32.48913
77
0.61994
from typing import (Iterable, Tuple, Type) from .hints import (Box, Contour, Point, Polygon, Scalar, Segment) def from_contour(contour: Contour, box_cls: Type[Box]) -> Box: ...
true
true
f7488354934b2a58344c43d9b24cc83e8f441d74
485
py
Python
tests/test_my_module.py
sverhoeven/justatest2
4fd45a4d962dc638f68cf27e594071e3e5213aa2
[ "Apache-2.0" ]
null
null
null
tests/test_my_module.py
sverhoeven/justatest2
4fd45a4d962dc638f68cf27e594071e3e5213aa2
[ "Apache-2.0" ]
11
2021-05-04T07:21:53.000Z
2021-05-10T11:12:56.000Z
tests/test_my_module.py
sverhoeven/justatest2
4fd45a4d962dc638f68cf27e594071e3e5213aa2
[ "Apache-2.0" ]
null
null
null
"""Tests for the justatest2.my_module module. """ import pytest from justatest2.my_module import hello def test_hello(): assert hello('nlesc') == 'Hello nlesc!' def test_hello_with_error(): with pytest.raises(ValueError) as excinfo: hello('nobody') assert 'Can not say hello to nobody' in str(ex...
19.4
62
0.71134
import pytest from justatest2.my_module import hello def test_hello(): assert hello('nlesc') == 'Hello nlesc!' def test_hello_with_error(): with pytest.raises(ValueError) as excinfo: hello('nobody') assert 'Can not say hello to nobody' in str(excinfo.value) @pytest.fixture def some_name(): ...
true
true
f7488524c58ac1adff3b13b2a7b7d351a845d649
144
py
Python
malcolm/modules/scanning/parts/__init__.py
MattTaylorDLS/pymalcolm
995a8e4729bd745f8f617969111cc5a34ce1ac14
[ "Apache-2.0" ]
null
null
null
malcolm/modules/scanning/parts/__init__.py
MattTaylorDLS/pymalcolm
995a8e4729bd745f8f617969111cc5a34ce1ac14
[ "Apache-2.0" ]
null
null
null
malcolm/modules/scanning/parts/__init__.py
MattTaylorDLS/pymalcolm
995a8e4729bd745f8f617969111cc5a34ce1ac14
[ "Apache-2.0" ]
null
null
null
from .runnablechildpart import RunnableChildPart # Expose all the classes __all__ = sorted(k for k, v in globals().items() if type(v) == type)
28.8
68
0.743056
from .runnablechildpart import RunnableChildPart __all__ = sorted(k for k, v in globals().items() if type(v) == type)
true
true
f74885337c7f15803d266fbc7c3579cc458e2f8f
1,663
py
Python
Autoupdate/scatterinfluxtemp.py
Yuri-Njathi/Dash_Temperature_Plot
d911755fdf179a592df3e1683af91f60e68f5f65
[ "MIT" ]
null
null
null
Autoupdate/scatterinfluxtemp.py
Yuri-Njathi/Dash_Temperature_Plot
d911755fdf179a592df3e1683af91f60e68f5f65
[ "MIT" ]
null
null
null
Autoupdate/scatterinfluxtemp.py
Yuri-Njathi/Dash_Temperature_Plot
d911755fdf179a592df3e1683af91f60e68f5f65
[ "MIT" ]
null
null
null
import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd from influxdb import InfluxDBClient from pandas import DataFrame, Series from pandas.io.json import json_normalize from influxdb import InfluxDBClient from datetime import datetime, timedelta import plotly.graph_obj...
25.984375
155
0.669272
import dash import dash_core_components as dcc import dash_html_components as html import pandas as pd from influxdb import InfluxDBClient from pandas import DataFrame, Series from pandas.io.json import json_normalize from influxdb import InfluxDBClient from datetime import datetime, timedelta import plotly.graph_obj...
true
true
f748856d3a833d5a3d3ac8ba1ff4071f38f24123
372
py
Python
slide_06/exercicios/q06.py
lordjack/aula_python_slides
38ad45ac1843fc83c3349addb9d49f7d182a574f
[ "MIT" ]
null
null
null
slide_06/exercicios/q06.py
lordjack/aula_python_slides
38ad45ac1843fc83c3349addb9d49f7d182a574f
[ "MIT" ]
null
null
null
slide_06/exercicios/q06.py
lordjack/aula_python_slides
38ad45ac1843fc83c3349addb9d49f7d182a574f
[ "MIT" ]
null
null
null
''' 6. Faça um programa em Python utilizando a biblioteca fractions, para determinar o resultado da multiplicação entre as frações: 1/2 x 3/2 x 6/7 x 9/3 = ? - Resultado deve ser: 27/14 ''' import fractions a = fractions.Fraction(1, 2) b = fractions.Fraction(3, 2) c = fractions.Fraction(6, 7) d = fractions.Fraction(9,...
21.882353
64
0.682796
import fractions a = fractions.Fraction(1, 2) b = fractions.Fraction(3, 2) c = fractions.Fraction(6, 7) d = fractions.Fraction(9, 3) r = a * b * c * d print("O resultado é: ", r)
true
true
f74885d08dac2d8e0c5e9356e2058d80a842af1e
7,363
py
Python
cirq-google/cirq_google/engine/abstract_local_program.py
Zshan0/Cirq
93bbaa853305faa65117bcbdc2063f741cb2977c
[ "Apache-2.0" ]
1
2022-02-02T07:13:54.000Z
2022-02-02T07:13:54.000Z
cirq-google/cirq_google/engine/abstract_local_program.py
bradyb/Cirq
610b0d4ea3a7862169610797266734c844ddcc1f
[ "Apache-2.0" ]
null
null
null
cirq-google/cirq_google/engine/abstract_local_program.py
bradyb/Cirq
610b0d4ea3a7862169610797266734c844ddcc1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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 ...
35.570048
84
0.627462
import copy import datetime from typing import Dict, List, Optional, Sequence, Set, TYPE_CHECKING, Union import cirq from cirq_google.engine.client import quantum from cirq_google.engine.abstract_program import AbstractProgram if TYPE_CHECKING: from cirq_google.engine.abstract_local_job import Abstrac...
true
true
f7488654de586cc84331626f353a4e8556191870
398
py
Python
posts/migrations/0003_auto_20200530_1519.py
Brenda-M/instagram-clone
4f30d7168db6c6cc36c1ebf012771f6df1ce4975
[ "MIT" ]
null
null
null
posts/migrations/0003_auto_20200530_1519.py
Brenda-M/instagram-clone
4f30d7168db6c6cc36c1ebf012771f6df1ce4975
[ "MIT" ]
6
2021-03-30T13:40:47.000Z
2022-01-13T02:48:38.000Z
posts/migrations/0003_auto_20200530_1519.py
Brenda-M/instagram-clone
4f30d7168db6c6cc36c1ebf012771f6df1ce4975
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-30 12:19 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0002_auto_20200529_1448'), ] operations = [ migrations.AlterField( model_name='image', name='img_name', ...
20.947368
63
0.603015
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('posts', '0002_auto_20200529_1448'), ] operations = [ migrations.AlterField( model_name='image', name='img_name', field=models.CharField(blank=True, max...
true
true
f7488714bd7b47e39d3a7d87ed1b1b792ff8fc8d
6,539
py
Python
app/pulzarcore/core_jobs.py
cleve/varidb
fc1b10aa4d708cee1c83909f10773948cee0c539
[ "Apache-2.0" ]
null
null
null
app/pulzarcore/core_jobs.py
cleve/varidb
fc1b10aa4d708cee1c83909f10773948cee0c539
[ "Apache-2.0" ]
6
2020-11-05T02:18:15.000Z
2022-03-12T00:50:09.000Z
app/pulzarcore/core_jobs.py
cleve/pulzar
fc1b10aa4d708cee1c83909f10773948cee0c539
[ "Apache-2.0" ]
null
null
null
from abc import abstractmethod from abc import ABCMeta from pulzarutils.utils import Utils from pulzarutils.utils import Constants from pulzarutils.file_utils import FileUtils from pulzarutils.constants import ReqType from pulzarutils.stream import Config from pulzarcore.core_rdb import RDB from pulzarcore.core_request...
33.362245
89
0.606209
from abc import abstractmethod from abc import ABCMeta from pulzarutils.utils import Utils from pulzarutils.utils import Constants from pulzarutils.file_utils import FileUtils from pulzarutils.constants import ReqType from pulzarutils.stream import Config from pulzarcore.core_rdb import RDB from pulzarcore.core_request...
true
true
f748880ba72b144cd2a47ad45f9d14205dbccb46
1,033
py
Python
alipay/aop/api/domain/MybankCreditUserRoleQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/MybankCreditUserRoleQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/MybankCreditUserRoleQueryModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.Member import Member class MybankCreditUserRoleQueryModel(object): def __init__(self): self._member = None @property def member(self): ...
22.955556
63
0.592449
import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.Member import Member class MybankCreditUserRoleQueryModel(object): def __init__(self): self._member = None @property def member(self): return self._member @member.setter ...
true
true
f7488a56d2960275c585d5153dbecf40c83081b4
8,854
py
Python
napalm_yang/models/openconfig/interfaces/interface/ethernet/switched_vlan/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
64
2016-10-20T15:47:18.000Z
2021-11-11T11:57:32.000Z
napalm_yang/models/openconfig/interfaces/interface/ethernet/switched_vlan/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
126
2016-10-05T10:36:14.000Z
2019-05-15T08:43:23.000Z
napalm_yang/models/openconfig/interfaces/interface/ethernet/switched_vlan/__init__.py
ckishimo/napalm-yang
8f2bd907bd3afcde3c2f8e985192de74748baf6c
[ "Apache-2.0" ]
63
2016-11-07T15:23:08.000Z
2021-09-22T14:41:16.000Z
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
36.891667
353
0.603682
from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListType from pyangbind.lib.y...
true
true
f7488b4ab7511b54fd9793320413862364d2a611
8,870
py
Python
augur/housekeeper/housekeeper.py
parthsharma2/augur
6d59c8c80f3c21eb97bfa4ea4817908ea9a7d10b
[ "MIT" ]
null
null
null
augur/housekeeper/housekeeper.py
parthsharma2/augur
6d59c8c80f3c21eb97bfa4ea4817908ea9a7d10b
[ "MIT" ]
null
null
null
augur/housekeeper/housekeeper.py
parthsharma2/augur
6d59c8c80f3c21eb97bfa4ea4817908ea9a7d10b
[ "MIT" ]
null
null
null
import logging import requests from multiprocessing import Process, Queue import time import sqlalchemy as s import pandas as pd import os import zmq logging.basicConfig(filename='housekeeper.log') class Housekeeper: def __init__(self, jobs, broker, broker_port, user, password, host, port, dbname): self....
40.135747
155
0.495265
import logging import requests from multiprocessing import Process, Queue import time import sqlalchemy as s import pandas as pd import os import zmq logging.basicConfig(filename='housekeeper.log') class Housekeeper: def __init__(self, jobs, broker, broker_port, user, password, host, port, dbname): self....
true
true
f7488bb055279adf219064b358ed7a46cbaeef33
1,480
py
Python
python/ray/data/tests/test_mars.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
1
2022-03-07T06:40:06.000Z
2022-03-07T06:40:06.000Z
python/ray/data/tests/test_mars.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
73
2021-09-25T07:11:39.000Z
2022-03-26T07:10:59.000Z
python/ray/data/tests/test_mars.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
1
2019-09-24T16:24:49.000Z
2019-09-24T16:24:49.000Z
import pytest import ray import mars import mars.dataframe as md import pyarrow as pa @pytest.fixture(scope="module") def ray_start_regular(request): # pragma: no cover try: yield ray.init(num_cpus=16) finally: ray.shutdown() def test_mars(ray_start_regular): import pandas as pd cl...
25.964912
83
0.623649
import pytest import ray import mars import mars.dataframe as md import pyarrow as pa @pytest.fixture(scope="module") def ray_start_regular(request): try: yield ray.init(num_cpus=16) finally: ray.shutdown() def test_mars(ray_start_regular): import pandas as pd cluster = mars.new_c...
true
true
f7488c2d30bb79ca0eba3c8e4b60c55c3c42c3ed
12,172
py
Python
pythonpy/pyeval.py
scauligi/pythonpy-fork
76d643465fde751ed7818242d80d7fbbde6dcd52
[ "BSD-3-Clause" ]
null
null
null
pythonpy/pyeval.py
scauligi/pythonpy-fork
76d643465fde751ed7818242d80d7fbbde6dcd52
[ "BSD-3-Clause" ]
null
null
null
pythonpy/pyeval.py
scauligi/pythonpy-fork
76d643465fde751ed7818242d80d7fbbde6dcd52
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 from __future__ import (unicode_literals, absolute_import, print_function, division) from functools import lru_cache from itertools import count, islice from signal import signal, SIGPIPE, SIG_DFL signal(SIGPIPE, SIG_DFL) import argparse import collections import collec...
33.256831
111
0.538942
from __future__ import (unicode_literals, absolute_import, print_function, division) from functools import lru_cache from itertools import count, islice from signal import signal, SIGPIPE, SIG_DFL signal(SIGPIPE, SIG_DFL) import argparse import collections import collections.abc import conte...
true
true
f7488c6511b7aa1837ec983104d11586dd32e326
7,290
py
Python
src/text_corpus/util.py
issa-project/knowledge-graph
e3f70de3248534672a32fbdc7d3768db1a0122e5
[ "Apache-2.0" ]
null
null
null
src/text_corpus/util.py
issa-project/knowledge-graph
e3f70de3248534672a32fbdc7d3768db1a0122e5
[ "Apache-2.0" ]
null
null
null
src/text_corpus/util.py
issa-project/knowledge-graph
e3f70de3248534672a32fbdc7d3768db1a0122e5
[ "Apache-2.0" ]
1
2021-06-10T08:21:03.000Z
2021-06-10T08:21:03.000Z
# -*- coding: utf-8 -*- """ Created on Thu Apr 8 16:35:35 2021 @author: abobashe """ import os import datetime import logging import sys #%% def always_log_exceptions(exctype, value, tb): #read last element in hope that this is the one we need #TODO:refactor logger=[logging.getLogger(name) for name...
27.100372
147
0.611385
import os import datetime import logging import sys def always_log_exceptions(exctype, value, tb): logger=[logging.getLogger(name) for name in logging.root.manager.loggerDict][-1] logger.exception('Uncaught exception', exc_info=(exctype, value, tb)) def open_timestamp_logger(l...
true
true
f7488cb9c35433dbe8c185ae5443d2e97f6c91f6
1,154
py
Python
test/programytest/config/file/test_load_files.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
2
2018-06-16T09:32:22.000Z
2019-07-21T13:16:00.000Z
test/programytest/config/file/test_load_files.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
3
2020-07-16T04:00:42.000Z
2021-03-31T18:52:22.000Z
test/programytest/config/file/test_load_files.py
whackur/chatbot
bb4b4dace89f1f8aae2b6377bf7d2601e66af7a7
[ "MIT" ]
4
2018-06-29T23:50:44.000Z
2020-11-05T08:13:47.000Z
import os from programy.config.file.factory import ConfigurationFactory from programy.clients.events.console.config import ConsoleConfiguration from programytest.config.file.base_file_tests import ConfigurationBaseFileTests # Hint # Created the appropriate yaml file, then convert to json and xml using the following ...
44.384615
149
0.80156
import os from programy.config.file.factory import ConfigurationFactory from programy.clients.events.console.config import ConsoleConfiguration from programytest.config.file.base_file_tests import ConfigurationBaseFileTests class LoadConfigurationDataTests(ConfigurationBaseFileTests): def test_load_config_d...
true
true
f7488e6ec93852f4e8599b1f6b8d23b39c0f7403
648
py
Python
setup.py
juzb/torchsupport
30c3f6987e28aefdc90d6a6be6aa21e6714df366
[ "MIT" ]
null
null
null
setup.py
juzb/torchsupport
30c3f6987e28aefdc90d6a6be6aa21e6714df366
[ "MIT" ]
null
null
null
setup.py
juzb/torchsupport
30c3f6987e28aefdc90d6a6be6aa21e6714df366
[ "MIT" ]
1
2020-04-24T10:32:22.000Z
2020-04-24T10:32:22.000Z
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="torchsupport", version="0.0.1", author="Michael Jendrusch", author_email="jendrusch@stud.uni-heidelberg.de", description="Support for advanced pytorch usage.", long_description=long_de...
29.454545
54
0.677469
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="torchsupport", version="0.0.1", author="Michael Jendrusch", author_email="jendrusch@stud.uni-heidelberg.de", description="Support for advanced pytorch usage.", long_description=long_de...
true
true
f7488e701ca8f6986dc71fb3c64ce4dd5db03954
647
py
Python
examples/prompts/validate-input.py
gerrishons/quo
58a1c54105e3663d62e473f8dad57a2cf1b8cc20
[ "MIT" ]
5
2021-06-17T21:06:39.000Z
2022-03-11T06:45:51.000Z
examples/prompts/validate-input.py
gerrishons/quo
58a1c54105e3663d62e473f8dad57a2cf1b8cc20
[ "MIT" ]
39
2021-07-19T19:36:18.000Z
2022-02-23T14:55:08.000Z
examples/prompts/validate-input.py
gerrishons/quo
58a1c54105e3663d62e473f8dad57a2cf1b8cc20
[ "MIT" ]
1
2021-05-31T17:19:15.000Z
2021-05-31T17:19:15.000Z
import quo session = quo.Prompt() class NumberValidator(quo.types.Validator): def validate(self, document): text = document.text if text and not text.isdigit(): i = 0 # Get index of first non numeric character. # We want to move the cursor here. ...
24.884615
110
0.601236
import quo session = quo.Prompt() class NumberValidator(quo.types.Validator): def validate(self, document): text = document.text if text and not text.isdigit(): i = 0 for i, cursor in enumerate(text): if not cursor.isdigit(): ...
true
true