hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f7537973a587bf01778b94911d5277d5deae2c80
1,165
py
Python
lfluxproject/lstory/urls.py
lutoma/lflux
5cb51d4dfda8caf7be3bb621bcb991bc175f5e38
[ "MIT" ]
null
null
null
lfluxproject/lstory/urls.py
lutoma/lflux
5cb51d4dfda8caf7be3bb621bcb991bc175f5e38
[ "MIT" ]
null
null
null
lfluxproject/lstory/urls.py
lutoma/lflux
5cb51d4dfda8caf7be3bb621bcb991bc175f5e38
[ "MIT" ]
null
null
null
from django.conf.urls.defaults import patterns, include, url from feeds import StoryFeed from models import Story from views import diff, version, mark_as_read, toggle_tracking, backgroundcontent from lsubscribe.views import subscribe urlpatterns = patterns( '', url(r'^track/yes/', toggle_tracking, {'set_track...
48.541667
139
0.621459
from django.conf.urls.defaults import patterns, include, url from feeds import StoryFeed from models import Story from views import diff, version, mark_as_read, toggle_tracking, backgroundcontent from lsubscribe.views import subscribe urlpatterns = patterns( '', url(r'^track/yes/', toggle_tracking, {'set_track...
true
true
f75379f9741f08ebcde08632af9d38410ad77c08
2,369
py
Python
packages/pyre/schemata/Time.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/schemata/Time.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
packages/pyre/schemata/Time.py
PyreFramework/pyre
345c7449a3416eea1c1affa74fb32faff30a6aaa
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # # externals import datetime # superclass from .Schema import Schema # my declaration class Time(Schema): """ A type declarator for timestamps """ # constants format = "%H:%M:%S" # the default fo...
25.202128
81
0.577037
import datetime from .Schema import Schema class Time(Schema): format = "%H:%M:%S" typename = 'time' complaint = 'could not coerce {0.value!r} into a time' def coerce(self, value, **kwds): if isinstance(value, datetime.time): return ...
true
true
f7537af03db5a999f20e6fa7d3483695ad604428
688
py
Python
qal/tools/__init__.py
OptimalBPM/qal
4d7a31c0d68042b4110e1fa3e733711e0fdd473e
[ "Unlicense" ]
3
2016-05-02T14:35:55.000Z
2021-08-31T14:19:15.000Z
qal/tools/__init__.py
OptimalBPM/qal
4d7a31c0d68042b4110e1fa3e733711e0fdd473e
[ "Unlicense" ]
null
null
null
qal/tools/__init__.py
OptimalBPM/qal
4d7a31c0d68042b4110e1fa3e733711e0fdd473e
[ "Unlicense" ]
1
2018-03-18T13:19:52.000Z
2018-03-18T13:19:52.000Z
""" ***************************************** The OptimalBPM tools package. ***************************************** Optimal BPM™ is a Business Process Management system (BPM) and surrounding tools Optimalbpm-tools are a collection of tools made to solve some of the common problems in BPM. htt...
38.222222
105
0.655523
__version__ = '0.9' __release__ = '0.9.0' __copyright__ = '2010-2013, Nicklas Boerjesson'
true
true
f7537b0d081db8d70d46d8a05290af902df5956d
74
py
Python
epltoolset/__init__.py
RobertPRanney/epltoolset
4d5f1838b3021f254901d98dd72642ed14f2b2f5
[ "MIT" ]
null
null
null
epltoolset/__init__.py
RobertPRanney/epltoolset
4d5f1838b3021f254901d98dd72642ed14f2b2f5
[ "MIT" ]
null
null
null
epltoolset/__init__.py
RobertPRanney/epltoolset
4d5f1838b3021f254901d98dd72642ed14f2b2f5
[ "MIT" ]
null
null
null
from .pdConnection import Credentials, PdConnection __version__ = "0.2.6"
24.666667
51
0.797297
from .pdConnection import Credentials, PdConnection __version__ = "0.2.6"
true
true
f7537b491f8aa9032d2a36ff9cfe852cd01429d9
2,792
py
Python
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
vis/plot_2d_neural_outputs.py
ajclaros/rl_legged_walker
26d0e124ef38045943449c2772b966571117683b
[ "MIT" ]
null
null
null
from jason.ctrnn import CTRNN import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import random import sys import json import os import math from util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match def main(): trial_seed=1 sol_seed=6 ...
28.783505
181
0.693768
from jason.ctrnn import CTRNN import matplotlib.pyplot as plt import matplotlib.patches as mpatches import numpy as np import random import sys import json import os import math from util.fitness_functions import fitness_maximize_output_change, fitness_frequency_match def main(): trial_seed=1 sol_seed=6 ...
true
true
f7537b5653a85a3afa054bd7b40e1fd18b8936cf
661
py
Python
shared.py
szilard079/pushfish-api
40119dac2f9c5f8d3ff33b2b269c368098e58b94
[ "BSD-2-Clause" ]
29
2018-10-20T13:55:56.000Z
2022-03-03T00:39:51.000Z
shared.py
szilard079/pushfish-api
40119dac2f9c5f8d3ff33b2b269c368098e58b94
[ "BSD-2-Clause" ]
3
2018-10-20T13:48:17.000Z
2021-11-13T20:37:33.000Z
shared.py
szilard079/pushfish-api
40119dac2f9c5f8d3ff33b2b269c368098e58b94
[ "BSD-2-Clause" ]
4
2018-10-24T18:54:14.000Z
2019-10-23T23:00:24.000Z
from flask_sqlalchemy import SQLAlchemy import zmq # TODO: a better way of doing this from config import Config, fatal_error_exit_or_backtrace db = SQLAlchemy() zmq_relay_socket = None zeromq_context = None cfg = Config.get_global_instance() if cfg.zeromq_relay_uri: zeromq_context = zmq.Context() zmq_relay_...
31.47619
98
0.760968
from flask_sqlalchemy import SQLAlchemy import zmq from config import Config, fatal_error_exit_or_backtrace db = SQLAlchemy() zmq_relay_socket = None zeromq_context = None cfg = Config.get_global_instance() if cfg.zeromq_relay_uri: zeromq_context = zmq.Context() zmq_relay_socket = zeromq_context.socket(zmq...
true
true
f7537bc73fd9b659c8234b9849f9f9b4717a9c4a
252
py
Python
qasr/car/doctype/maintenance/maintenance.py
ahmadRagheb/qasr
ab296fefb13cd0336616ba0b3838b6526e2c990c
[ "MIT" ]
null
null
null
qasr/car/doctype/maintenance/maintenance.py
ahmadRagheb/qasr
ab296fefb13cd0336616ba0b3838b6526e2c990c
[ "MIT" ]
null
null
null
qasr/car/doctype/maintenance/maintenance.py
ahmadRagheb/qasr
ab296fefb13cd0336616ba0b3838b6526e2c990c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, qasr and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Maintenance(Document): pass
22.909091
49
0.777778
from __future__ import unicode_literals import frappe from frappe.model.document import Document class Maintenance(Document): pass
true
true
f7537caa9883f54092eaeb42e4dd9b2a7a4cccb5
2,727
py
Python
examples/callbacks/mnist.py
RaphaelMeudec/tf-explain
1a75841762985e55abe19107d09279f68f5731c8
[ "MIT" ]
4
2019-11-05T06:54:11.000Z
2020-09-26T09:48:21.000Z
examples/callbacks/mnist.py
RaphaelMeudec/tf-explain
1a75841762985e55abe19107d09279f68f5731c8
[ "MIT" ]
null
null
null
examples/callbacks/mnist.py
RaphaelMeudec/tf-explain
1a75841762985e55abe19107d09279f68f5731c8
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import tf_explain INPUT_SHAPE = (28, 28, 1) NUM_CLASSES = 10 AVAILABLE_DATASETS = { 'mnist': tf.keras.datasets.mnist, 'fashion_mnist': tf.keras.datasets.fashion_mnist, } DATASET_NAME = 'fashion_mnist' # Choose between "mnist" and "fashion_mnist" # Load dataset data...
39.521739
111
0.733773
import numpy as np import tensorflow as tf import tf_explain INPUT_SHAPE = (28, 28, 1) NUM_CLASSES = 10 AVAILABLE_DATASETS = { 'mnist': tf.keras.datasets.mnist, 'fashion_mnist': tf.keras.datasets.fashion_mnist, } DATASET_NAME = 'fashion_mnist' dataset = AVAILABLE_DATASETS[DATASET_NAME] (train_images, trai...
true
true
f7537cb50edb662322b47da14975cdbb704a0f3a
1,237
py
Python
led.py
saulc/myth-math
5e278eb8fbaf16a01f5f021aca2142e5ce3131ec
[ "MIT" ]
null
null
null
led.py
saulc/myth-math
5e278eb8fbaf16a01f5f021aca2142e5ce3131ec
[ "MIT" ]
null
null
null
led.py
saulc/myth-math
5e278eb8fbaf16a01f5f021aca2142e5ce3131ec
[ "MIT" ]
null
null
null
import time from math import pi, cos, sin, tan #test program to visulaize led sequences. class leds: num = 16 mindelay = 3 modedelay = 333 def test(self, c): temp = '' for i in range(0, self.num): for n in c: if i == n: temp += '+' ...
17.180556
72
0.482619
import time from math import pi, cos, sin, tan class leds: num = 16 mindelay = 3 modedelay = 333 def test(self, c): temp = '' for i in range(0, self.num): for n in c: if i == n: temp += '+' else: temp +=' ' pri...
true
true
f7537d0b535327ca352282247388671b6a3dfa40
3,730
py
Python
Lemmatization/lib/trie.py
dpakpdl/NepaliLemmatizer
24fa94515415039bf27372f4bced0d262a0d0aa0
[ "MIT" ]
1
2020-10-29T19:47:27.000Z
2020-10-29T19:47:27.000Z
Lemmatization/lib/trie.py
dpakpdl/NepaliLemmatizer
24fa94515415039bf27372f4bced0d262a0d0aa0
[ "MIT" ]
null
null
null
Lemmatization/lib/trie.py
dpakpdl/NepaliLemmatizer
24fa94515415039bf27372f4bced0d262a0d0aa0
[ "MIT" ]
null
null
null
from Lemmatization.main import read_csv, check_for_prefix_chop from Lemmatization.utility.helper import get_root_pos_rule_csv_path class TrieNode: def __init__(self): # Initialising one node for trie self.children = {} self.last = False self.word = None self.char = None c...
33.603604
118
0.567292
from Lemmatization.main import read_csv, check_for_prefix_chop from Lemmatization.utility.helper import get_root_pos_rule_csv_path class TrieNode: def __init__(self): self.children = {} self.last = False self.word = None self.char = None class Trie: def __init__(self...
true
true
f7537d559abaad1f122d5820bc38e1047168df3a
169
py
Python
reviewlogic/reviewlogic/value_objects/proposal_id.py
ftnext/clean-review-practice
7c5a3cf972882cebb5a7cf50bae1775a92f8371b
[ "MIT" ]
null
null
null
reviewlogic/reviewlogic/value_objects/proposal_id.py
ftnext/clean-review-practice
7c5a3cf972882cebb5a7cf50bae1775a92f8371b
[ "MIT" ]
null
null
null
reviewlogic/reviewlogic/value_objects/proposal_id.py
ftnext/clean-review-practice
7c5a3cf972882cebb5a7cf50bae1775a92f8371b
[ "MIT" ]
null
null
null
from reviewlogic.value_objects.positive_integer_id import PositiveIntegerId class ProposalId(PositiveIntegerId): def __str__(self): return str(self.value)
24.142857
75
0.792899
from reviewlogic.value_objects.positive_integer_id import PositiveIntegerId class ProposalId(PositiveIntegerId): def __str__(self): return str(self.value)
true
true
f7537db18de0e8966635a938f357318f4c3bd315
13,566
py
Python
tests/components/google_assistant/__init__.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
7
2019-08-15T13:36:58.000Z
2020-03-18T10:46:29.000Z
tests/components/google_assistant/__init__.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
87
2020-07-15T13:43:35.000Z
2022-03-23T07:43:10.000Z
tests/components/google_assistant/__init__.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Tests for the Google Assistant integration.""" from unittest.mock import MagicMock from homeassistant.components.google_assistant import helpers def mock_google_config_store(agent_user_ids=None): """Fake a storage for google assistant.""" store = MagicMock(spec=helpers.GoogleConfigStore) if agent_user...
31.330254
86
0.542091
from unittest.mock import MagicMock from homeassistant.components.google_assistant import helpers def mock_google_config_store(agent_user_ids=None): store = MagicMock(spec=helpers.GoogleConfigStore) if agent_user_ids is not None: store.agent_user_ids = agent_user_ids else: store.agent_use...
true
true
f7537f3227ada46714c81b7644fd28e4e098edb5
22,836
py
Python
hms-artisan/src/hms_artisan/data_storage.py
PacktPublishing/Hands-On-Software-Engineering-with-Python
b1b57f8989d5e5a40ebcdebf5998324c501a15d9
[ "MIT" ]
40
2019-01-03T15:23:45.000Z
2022-03-07T10:15:42.000Z
hms-artisan/src/hms_artisan/data_storage.py
PacktPublishing/Hands-On-Software-Engineering-with-Python
b1b57f8989d5e5a40ebcdebf5998324c501a15d9
[ "MIT" ]
2
2020-04-15T16:40:08.000Z
2021-03-26T00:18:52.000Z
hms-artisan/src/hms_artisan/data_storage.py
PacktPublishing/Hands-On-Software-Engineering-with-Python
b1b57f8989d5e5a40ebcdebf5998324c501a15d9
[ "MIT" ]
35
2018-08-07T09:00:19.000Z
2022-03-19T22:10:37.000Z
#!/usr/bin/env python """ TODO: Document the module. Provides classes and functionality for SOME_PURPOSE """ ####################################### # Any needed from __future__ imports # # Create an "__all__" list to support # # "from module import member" use # ####################################### __all__ =...
39.645833
74
0.45656
true
true
f7537fa5a1e80b81cfb139ace8ab6d27cb7ccec5
1,662
py
Python
core/config.py
ruanxingbaozi/tensorflow-yolov4-tflite
14bc6f8dd27c17caff11675c256dd938cb48220b
[ "MIT" ]
1
2020-07-15T02:26:50.000Z
2020-07-15T02:26:50.000Z
core/config.py
ruanxingbaozi/tensorflow-yolov4-tflite
14bc6f8dd27c17caff11675c256dd938cb48220b
[ "MIT" ]
null
null
null
core/config.py
ruanxingbaozi/tensorflow-yolov4-tflite
14bc6f8dd27c17caff11675c256dd938cb48220b
[ "MIT" ]
null
null
null
#! /usr/bin/env python # coding=utf-8 from easydict import EasyDict as edict __C = edict() # Consumers can get config by: from config import cfg cfg = __C # YOLO options __C.YOLO = edict() # Set the class name __C.YOLO.CLASSES = ...
30.218182
86
0.575211
from easydict import EasyDict as edict __C = edict() cfg = __C __C.YOLO = edict() __C.YOLO.CLASSES = "./data/classes/coco.names" __C.YOLO.ANCHORS = "./data/anchors/yolov4_anchors.txt" __C.YOLO.ANCHORS_V3 ...
true
true
f7538085901f6d1fc4ad406829d0505b0fdc0183
9,027
py
Python
appleBot.py
savetz/AppleIIBot
7f4ab163507f220c36c1880dac9c4bd7322bf737
[ "MIT" ]
4
2021-02-12T03:08:31.000Z
2021-02-12T17:07:53.000Z
appleBot.py
savetz/AppleIIBot
7f4ab163507f220c36c1880dac9c4bd7322bf737
[ "MIT" ]
2
2021-02-12T06:44:31.000Z
2022-01-05T16:33:03.000Z
appleBot.py
savetz/AppleIIBot
7f4ab163507f220c36c1880dac9c4bd7322bf737
[ "MIT" ]
null
null
null
import tweepy import logging from botConfig import create_api import time from shutil import copyfile import os,sys import subprocess from datetime import datetime from unidecode import unidecode import re logging.basicConfig(level=logging.INFO) logger = logging.getLogger() def check_mentions(api, since_id): logg...
36.546559
293
0.575385
import tweepy import logging from botConfig import create_api import time from shutil import copyfile import os,sys import subprocess from datetime import datetime from unidecode import unidecode import re logging.basicConfig(level=logging.INFO) logger = logging.getLogger() def check_mentions(api, since_id): logg...
true
true
f75380f9b63168efa9a32a9f81dd0051d4716303
782
py
Python
tests/myapp/nose_tests.py
gbdlin/django-test-without-migrations
b665a0d203cb615a1a923caf06cff298bf73707e
[ "MIT" ]
144
2015-01-01T10:31:33.000Z
2022-03-31T17:05:24.000Z
tests/myapp/nose_tests.py
gbdlin/django-test-without-migrations
b665a0d203cb615a1a923caf06cff298bf73707e
[ "MIT" ]
20
2015-04-06T15:22:01.000Z
2022-01-10T21:15:07.000Z
tests/myapp/nose_tests.py
gbdlin/django-test-without-migrations
b665a0d203cb615a1a923caf06cff298bf73707e
[ "MIT" ]
19
2015-07-28T14:50:34.000Z
2019-08-20T14:07:26.000Z
# coding: utf-8 import os from .models import Person from nose.tools import with_setup from django.conf import settings from django.test.utils import get_runner class TestClassWithoutUnittest(object): """ Uses a model to ensure the table exist, even with no migrations available. """ def setUp(self): ...
26.965517
78
0.702046
import os from .models import Person from nose.tools import with_setup from django.conf import settings from django.test.utils import get_runner class TestClassWithoutUnittest(object): def setUp(self): self.person = Person.objects.create(name='Arthur', age=18) def test_instance(self): assert...
true
true
f7538208713064b1c142e2edc63c46336feda62b
1,356
py
Python
day-05/part-1/remi.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
8
2019-12-01T08:56:46.000Z
2019-12-05T21:21:12.000Z
day-05/part-1/remi.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
10
2019-11-25T09:56:20.000Z
2021-05-10T19:57:48.000Z
day-05/part-1/remi.py
TPXP/adventofcode-2019
ee653d6bfb510d14f2c2b3efc730d328c16b3f71
[ "MIT" ]
5
2019-12-01T08:19:57.000Z
2020-11-23T09:50:19.000Z
from tool.runners.python import SubmissionPy class RemiSubmission(SubmissionPy): def get_param(self, p, opcode, index, param): modes = opcode // 100 for _ in range(index): modes //= 10 mode = modes % 10 if mode == 0: return p[param] elif mode == 1: ...
26.076923
72
0.424779
from tool.runners.python import SubmissionPy class RemiSubmission(SubmissionPy): def get_param(self, p, opcode, index, param): modes = opcode // 100 for _ in range(index): modes //= 10 mode = modes % 10 if mode == 0: return p[param] elif mode == 1: ...
true
true
f75382ec7497e2c29261e3d93597edfd8a33784e
14,321
py
Python
compare.py
PeterJBurke/OverIrvine
499ca4d0ce1e3837176301102fb7b438d6d6d30b
[ "MIT" ]
1
2022-01-06T00:02:10.000Z
2022-01-06T00:02:10.000Z
compare.py
PeterJBurke/OverIrvine
499ca4d0ce1e3837176301102fb7b438d6d6d30b
[ "MIT" ]
null
null
null
compare.py
PeterJBurke/OverIrvine
499ca4d0ce1e3837176301102fb7b438d6d6d30b
[ "MIT" ]
null
null
null
# # tracker.py # # kevinabrandon@gmail.com # import sys import traceback import time from time import sleep from twitter import * from configparser import ConfigParser from string import Template import datasource import fa_api import flightdata import geomath import screenshot import aircraftdata # AWSIOT import fr...
39.021798
142
0.610293
import sys import traceback import time from time import sleep from twitter import * from configparser import ConfigParser from string import Template import datasource import fa_api import flightdata import geomath import screenshot import aircraftdata from AWSIoTPythonSDK.MQTTLib import AWSIoTMQTTClient impo...
true
true
f75383108898d5f52b7a078c9437679bca51fd54
3,708
py
Python
Web_App/GesturePredictor.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
11
2021-04-04T03:16:44.000Z
2021-11-15T11:22:51.000Z
Web_App/GesturePredictor.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
6
2021-03-31T17:18:16.000Z
2021-07-06T07:21:51.000Z
Web_App/GesturePredictor.py
SanjayMarreddi/GameInShape
64d64c2cb7bc472c3319b949f6f0b6b67ea15910
[ "MIT" ]
4
2021-03-31T17:03:20.000Z
2021-05-26T07:50:12.000Z
# Importing relevant libraries import cv2 import imutils import tflearn import numpy as np from PIL import Image import tensorflow as tf from tensorflow.python.framework import ops from tflearn.layers.estimator import regression from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.core i...
31.965517
126
0.670982
import cv2 import imutils import tflearn import numpy as np from PIL import Image import tensorflow as tf from tensorflow.python.framework import ops from tflearn.layers.estimator import regression from tflearn.layers.conv import conv_2d, max_pool_2d from tflearn.layers.core import input_data, dropout, full...
true
true
f753840976d12ee5ab46e44b06e593bf09e77e88
89
py
Python
keyfunctions/__init__.py
cugni/keyfunctions-python
7236ec69a3c03cc7f7d4e26ebd90118781de4379
[ "Apache-2.0" ]
null
null
null
keyfunctions/__init__.py
cugni/keyfunctions-python
7236ec69a3c03cc7f7d4e26ebd90118781de4379
[ "Apache-2.0" ]
null
null
null
keyfunctions/__init__.py
cugni/keyfunctions-python
7236ec69a3c03cc7f7d4e26ebd90118781de4379
[ "Apache-2.0" ]
null
null
null
from .core import create_key from .core import create_element_rand from . import globals
22.25
37
0.831461
from .core import create_key from .core import create_element_rand from . import globals
true
true
f75385538ed3357b98f19d7d208efa4e98e8bebc
34,012
py
Python
brainbox/plot.py
int-brain-lab/ibllib
93be6b98848758e05cdc9398caaf19e6a68f7386
[ "MIT" ]
38
2018-08-07T21:55:29.000Z
2022-03-21T14:49:03.000Z
brainbox/plot.py
int-brain-lab/ibllib
93be6b98848758e05cdc9398caaf19e6a68f7386
[ "MIT" ]
207
2018-07-25T15:10:48.000Z
2022-03-08T13:23:08.000Z
brainbox/plot.py
int-brain-lab/ibllib
93be6b98848758e05cdc9398caaf19e6a68f7386
[ "MIT" ]
35
2018-09-04T14:49:56.000Z
2022-01-06T21:17:51.000Z
""" Plots metrics that assess quality of single units. Some functions here generate plots for the output of functions in the brainbox `single_units.py` module. Run the following to set-up the workspace to run the docstring examples: >>> from brainbox import processing >>> import alf.io as aio >>> import numpy as np >>...
41.176755
99
0.635599
import time from warnings import warn import matplotlib.pyplot as plt import seaborn as sns import numpy as np from brainbox import singlecell from brainbox.metrics import single_units from brainbox.processing import bincount2D from brainbox.io.spikeglx import extract_waveforms from ibllib.io import spikeglx def ...
true
true
f753858563afea4e451c15dc812609a9a92d3a64
12,856
py
Python
converter.py
OKarason/venzl
c368a1c93e7c8c844209df342c5e34d0fe35ef96
[ "MIT" ]
null
null
null
converter.py
OKarason/venzl
c368a1c93e7c8c844209df342c5e34d0fe35ef96
[ "MIT" ]
null
null
null
converter.py
OKarason/venzl
c368a1c93e7c8c844209df342c5e34d0fe35ef96
[ "MIT" ]
null
null
null
# converter.py # Örvar Kárason (ohk2@hi.is) # 16. des. 2015 from nltk.tree import Tree from nltk.parse import DependencyGraph from collections import defaultdict, OrderedDict import re from sys import argv, stdin, stdout import getopt class UniversalDependencyGraph(DependencyGraph): def __init__(self, tree_str=N...
34.010582
158
0.491366
from nltk.tree import Tree from nltk.parse import DependencyGraph from collections import defaultdict, OrderedDict import re from sys import argv, stdin, stdout import getopt class UniversalDependencyGraph(DependencyGraph): def __init__(self, tree_str=None, cell_extractor=None, zero_based=False, cell_separato...
true
true
f753859c8cfca1417826f1d66377850d19ca5286
448
py
Python
changelogs/__init__.py
chris48s/changelogs
0cdb929ac4546c766cd7eef9ae4eb4baaa08f452
[ "MIT" ]
null
null
null
changelogs/__init__.py
chris48s/changelogs
0cdb929ac4546c766cd7eef9ae4eb4baaa08f452
[ "MIT" ]
null
null
null
changelogs/__init__.py
chris48s/changelogs
0cdb929ac4546c766cd7eef9ae4eb4baaa08f452
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import re from requests import Session from .changelogs import get, get_commit_log """ if os.environ.get("DEBUG", "") in ("TRUE", "True", "true"): DEBUG = True import logging logging.basicConfig(level=logging.DEBUG) else: DEBUG = False """ __author__ = """Jannis Gebau...
20.363636
70
0.642857
import os import re from requests import Session from .changelogs import get, get_commit_log __author__ = """Jannis Gebauer""" __email__ = 'jay@pyup.io' __version__ = '0.14.0' url_re = re.compile(r"(https?://[^\s<>\"'\x7f-\xff]+)", re.IGNORECASE)
true
true
f75385c7d5017ffd655481218e88cc35342be07b
1,959
py
Python
techminer/core/normalize_network.py
jdvelasq/techMiner
c611d96d2f812b0890513514d9d19787a1edfe2d
[ "MIT" ]
2
2020-09-25T02:42:34.000Z
2021-08-22T11:27:58.000Z
techminer/core/normalize_network.py
jdvelasq/techMiner
c611d96d2f812b0890513514d9d19787a1edfe2d
[ "MIT" ]
1
2020-10-17T14:38:45.000Z
2020-10-17T14:50:19.000Z
techminer/core/normalize_network.py
jdvelasq/techMiner
c611d96d2f812b0890513514d9d19787a1edfe2d
[ "MIT" ]
2
2019-10-14T18:05:25.000Z
2021-07-17T19:28:04.000Z
import numpy as np def normalize_network(X, normalization=None): """ """ X = X.copy() if isinstance(normalization, str) and normalization == "None": normalization = None if normalization is None: X = X.applymap(lambda w: int(w)) else: X = X.applymap(lambda w: float(w)...
29.238806
86
0.462991
import numpy as np def normalize_network(X, normalization=None): X = X.copy() if isinstance(normalization, str) and normalization == "None": normalization = None if normalization is None: X = X.applymap(lambda w: int(w)) else: X = X.applymap(lambda w: float(w)) M = X.cop...
true
true
f753860ec916cec0c701de517f95e810793c4e36
2,250
py
Python
parallel_wavenet_vocoder/tests/test_mixture.py
botmatic/tacotron2
c2dee4930f6bd1cf707e0565fd0675b8646a51a1
[ "BSD-3-Clause" ]
2
2018-10-03T14:51:28.000Z
2018-10-15T05:13:55.000Z
parallel_wavenet_vocoder/tests/test_mixture.py
botmatic/tacotron2
c2dee4930f6bd1cf707e0565fd0675b8646a51a1
[ "BSD-3-Clause" ]
null
null
null
parallel_wavenet_vocoder/tests/test_mixture.py
botmatic/tacotron2
c2dee4930f6bd1cf707e0565fd0675b8646a51a1
[ "BSD-3-Clause" ]
null
null
null
# coding: utf-8 from __future__ import with_statement, print_function, absolute_import import numpy as np import torch from torch import nn from torch.nn import functional as F import librosa import pysptk from wavenet_vocoder.mixture import discretized_mix_logistic_loss from wavenet_vocoder.mixture import sample_fr...
28.846154
96
0.683111
from __future__ import with_statement, print_function, absolute_import import numpy as np import torch from torch import nn from torch.nn import functional as F import librosa import pysptk from wavenet_vocoder.mixture import discretized_mix_logistic_loss from wavenet_vocoder.mixture import sample_from_discretized_...
true
true
f753872208a0b505dd5edb9fc4cebe64bdbaf109
1,039
py
Python
stubs.min/System/Windows/Forms/__init___parts/TreeViewDrawMode.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/Forms/__init___parts/TreeViewDrawMode.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Forms/__init___parts/TreeViewDrawMode.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class TreeViewDrawMode(Enum,IComparable,IFormattable,IConvertible): """ Defines constants that represent the ways a System.Windows.Forms.TreeView can be drawn. enum TreeViewDrawMode,values: Normal (0),OwnerDrawAll (2),OwnerDrawText (1) """ def __eq__(self,*args): """ x.__eq__(y) <==> x==yx.__eq__(y) <...
29.685714
215
0.678537
class TreeViewDrawMode(Enum,IComparable,IFormattable,IConvertible): pass """ __format__(formattable: IFormattable,format: str) -> str """ pass pass def __gt__(self,*args): pass def __init__(self,*args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initial...
true
true
f75388131fa695e73dcce72a06c6f08343135651
3,999
py
Python
great_expectations/datasource/data_connector/inferred_asset_filesystem_data_connector.py
victorcouste/great_expectations
9ee46d83feb87e13c769e2ae35b899b3f18d73a4
[ "Apache-2.0" ]
6,451
2017-09-11T16:32:53.000Z
2022-03-31T23:27:49.000Z
great_expectations/datasource/data_connector/inferred_asset_filesystem_data_connector.py
victorcouste/great_expectations
9ee46d83feb87e13c769e2ae35b899b3f18d73a4
[ "Apache-2.0" ]
3,892
2017-09-08T18:57:50.000Z
2022-03-31T23:15:20.000Z
great_expectations/datasource/data_connector/inferred_asset_filesystem_data_connector.py
victorcouste/great_expectations
9ee46d83feb87e13c769e2ae35b899b3f18d73a4
[ "Apache-2.0" ]
1,023
2017-09-08T15:22:05.000Z
2022-03-31T21:17:08.000Z
import logging from pathlib import Path from typing import List, Optional from great_expectations.datasource.data_connector.inferred_asset_file_path_data_connector import ( InferredAssetFilePathDataConnector, ) from great_expectations.datasource.data_connector.util import ( get_filesystem_one_level_directory_g...
40.806122
130
0.712428
import logging from pathlib import Path from typing import List, Optional from great_expectations.datasource.data_connector.inferred_asset_file_path_data_connector import ( InferredAssetFilePathDataConnector, ) from great_expectations.datasource.data_connector.util import ( get_filesystem_one_level_directory_g...
true
true
f753885b92de4eddaad45582b234c4ece33325f5
1,355
py
Python
plugins/minfraud/komand_minfraud/actions/account_lookup/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/minfraud/komand_minfraud/actions/account_lookup/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/minfraud/komand_minfraud/actions/account_lookup/schema.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Component: DESCRIPTION = "Query account info" class Input: ADDRESS = "address" USER_ID = "user_id" USERNAME_MD5 = "username_md5" class Output: RISK_SCORE = "risk_score" class AccountLookupInput(komand.Input): ...
18.561644
57
0.557196
import komand import json class Component: DESCRIPTION = "Query account info" class Input: ADDRESS = "address" USER_ID = "user_id" USERNAME_MD5 = "username_md5" class Output: RISK_SCORE = "risk_score" class AccountLookupInput(komand.Input): schema = json.loads(""" { "type":...
true
true
f75388be2ea3865122afa24fc8486c7a69eb79c5
23,480
py
Python
test/e2e2/spec/test_api_rr.py
nart1412/desec-stack
7519f13a624a14dc4a145cfd9441ff33677cc41a
[ "MIT" ]
null
null
null
test/e2e2/spec/test_api_rr.py
nart1412/desec-stack
7519f13a624a14dc4a145cfd9441ff33677cc41a
[ "MIT" ]
null
null
null
test/e2e2/spec/test_api_rr.py
nart1412/desec-stack
7519f13a624a14dc4a145cfd9441ff33677cc41a
[ "MIT" ]
null
null
null
from typing import List, Tuple import pytest from conftest import DeSECAPIV1Client, query_replication, NSLordClient, assert_eventually def generate_params(dict_value_lists_by_type: dict) -> List[Tuple[str, str]]: return [ (rr_type, value) for rr_type in dict_value_lists_by_type.keys() fo...
57.268293
769
0.705196
from typing import List, Tuple import pytest from conftest import DeSECAPIV1Client, query_replication, NSLordClient, assert_eventually def generate_params(dict_value_lists_by_type: dict) -> List[Tuple[str, str]]: return [ (rr_type, value) for rr_type in dict_value_lists_by_type.keys() fo...
true
true
f75388ed90a97a175c03c41f8e61ac83804a22f9
58,932
py
Python
buildscripts/idl/idl/generator.py
MartinNeupauer/mongo
6cc2dfe7edd312b8596355edef454e15988e350e
[ "Apache-2.0" ]
null
null
null
buildscripts/idl/idl/generator.py
MartinNeupauer/mongo
6cc2dfe7edd312b8596355edef454e15988e350e
[ "Apache-2.0" ]
2
2021-03-26T00:01:11.000Z
2021-03-26T00:02:19.000Z
buildscripts/idl/idl/generator.py
MartinNeupauer/mongo
6cc2dfe7edd312b8596355edef454e15988e350e
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2017 MongoDB Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License, version 3, # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARR...
41.944484
120
0.605749
from __future__ import absolute_import, print_function, unicode_literals from abc import ABCMeta, abstractmethod import io import os import string import sys import textwrap from typing import cast, List, Mapping, Union from . import ast from . import bson from . import common from . import cpp_types ...
true
true
f753891c6c91db42c36a2337c49d34d45b7e940a
8,479
py
Python
test/functional/wallet_import_rescan.py
Nomadic-Official/nomadic-nomd-coin
e9f758e5d43b9024c1ef876c2888934be08d4edd
[ "MIT" ]
null
null
null
test/functional/wallet_import_rescan.py
Nomadic-Official/nomadic-nomd-coin
e9f758e5d43b9024c1ef876c2888934be08d4edd
[ "MIT" ]
null
null
null
test/functional/wallet_import_rescan.py
Nomadic-Official/nomadic-nomd-coin
e9f758e5d43b9024c1ef876c2888934be08d4edd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test wallet import RPCs. Test rescan behavior of importaddress, importpubkey, importprivkey, and impor...
47.368715
116
0.666352
from test_framework.test_framework import NomadicTestFramework from test_framework.util import (assert_raises_rpc_error, connect_nodes, sync_blocks, assert_equal, set_node_times) import collections import enum import itertools Call = enum.Enum("Call", "single") Data = enum.Enum("Data", "address pub priv") Rescan...
true
true
f7538965798e8d969d170b517516787d2cb269bc
3,631
py
Python
verification/tests.py
sim00/checkio-mission-dna-split-sort
a3149c68cf3518c6184dbd0a356f5b7705b954f3
[ "MIT" ]
null
null
null
verification/tests.py
sim00/checkio-mission-dna-split-sort
a3149c68cf3518c6184dbd0a356f5b7705b954f3
[ "MIT" ]
null
null
null
verification/tests.py
sim00/checkio-mission-dna-split-sort
a3149c68cf3518c6184dbd0a356f5b7705b954f3
[ "MIT" ]
null
null
null
""" TESTS is a dict with all you tests. Keys for this will be categories' names. Each test is dict with "input" -- input data for user function "answer" -- your right answer "explanation" -- not necessary key, it's using for additional info in animation. """ TESTS = { "Basics": [ { ...
36.676768
119
0.619389
TESTS = { "Basics": [ { "input": ['ACGGCATAACCCTCGA', 3], "answer": "ACGCCCTAATCGGCA"}, { "input": ['ACGTTGCAACGTAGCT', 4], "answer": "ACGTACGTAGCTTGCA"}, { "input": ['CGTAGCA', 1], "answer": "CGTAGCA"}, { ...
true
true
f753899d8babe5fcd211276b346bbb6122a752fc
2,514
py
Python
vn_re/formats/tlg0.py
Forlos/vn_re
cce0798ad2771034cee74d1ea92d70efd2a4d27d
[ "MIT" ]
3
2020-12-14T08:12:36.000Z
2021-09-02T12:38:13.000Z
vn_re/formats/tlg0.py
Forlos/vn_re
cce0798ad2771034cee74d1ea92d70efd2a4d27d
[ "MIT" ]
null
null
null
vn_re/formats/tlg0.py
Forlos/vn_re
cce0798ad2771034cee74d1ea92d70efd2a4d27d
[ "MIT" ]
null
null
null
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO if parse_version(ks_version) < parse_version('0.7'): raise Exception("Incompatible Kai...
35.408451
118
0.651949
from pkg_resources import parse_version from kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO if parse_version(ks_version) < parse_version('0.7'): raise Exception("Incompatible Kaitai Struct Python API: 0.7 or later is required, but you have %s" % (ks_version)) class Tlg0(Kait...
true
true
f75389cb67d6953fa94f75ece564e3c4c58ed566
4,015
py
Python
graphite_beacon/core.py
Asana/graphite-beacon
9433e653ceb943f60502101ee18d347e16e3258e
[ "MIT" ]
null
null
null
graphite_beacon/core.py
Asana/graphite-beacon
9433e653ceb943f60502101ee18d347e16e3258e
[ "MIT" ]
1
2021-06-27T10:32:11.000Z
2021-06-27T10:32:11.000Z
graphite_beacon/core.py
isabella232/graphite-beacon
9433e653ceb943f60502101ee18d347e16e3258e
[ "MIT" ]
1
2021-06-27T10:26:06.000Z
2021-06-27T10:26:06.000Z
import os from re import compile as re, M import json from tornado import ioloop, log from .alerts import BaseAlert from .utils import parse_interval from .handlers import registry LOGGER = log.gen_log COMMENT_RE = re('//\s+.*$', M) class Reactor(object): """ Class description. """ defaults = { ...
31.614173
91
0.567123
import os from re import compile as re, M import json from tornado import ioloop, log from .alerts import BaseAlert from .utils import parse_interval from .handlers import registry LOGGER = log.gen_log COMMENT_RE = re('//\s+.*$', M) class Reactor(object): defaults = { 'auth_password': None, ...
true
true
f7538af683624f6039c003c4ab362454ee98952f
487
py
Python
exercises/zh/solution_01_11.py
dwinston/spacy-course
af72ded52d24dd28194f82935dbce663365f485f
[ "MIT" ]
null
null
null
exercises/zh/solution_01_11.py
dwinston/spacy-course
af72ded52d24dd28194f82935dbce663365f485f
[ "MIT" ]
null
null
null
exercises/zh/solution_01_11.py
dwinston/spacy-course
af72ded52d24dd28194f82935dbce663365f485f
[ "MIT" ]
null
null
null
import spacy # 导入Matcher from spacy.matcher import Matcher nlp = spacy.load("en_core_web_sm") doc = nlp("Upcoming iPhone X release date leaked as Apple reveals pre-orders") # 用模型分享的词汇表初始化Matcher matcher = Matcher(nlp.vocab) # 创建一个模板来匹配这两个词符:"iPhone"和"X" pattern = [{"TEXT": "iPhone"}, {"TEXT": "X"}] # 把模板加入到matcher...
23.190476
78
0.735113
import spacy from spacy.matcher import Matcher nlp = spacy.load("en_core_web_sm") doc = nlp("Upcoming iPhone X release date leaked as Apple reveals pre-orders") matcher = Matcher(nlp.vocab) pattern = [{"TEXT": "iPhone"}, {"TEXT": "X"}] matcher.add("IPHONE_X_PATTERN", None, pattern) matches = matcher(doc) pri...
true
true
f7538af9f4b00cc9068d0ea6dceca7d65c3859ee
7,819
py
Python
scripts/experiments/roar.py
jjbrophy47/tree_deletion
97041d129da335de3018b3243bc81943088abf24
[ "Apache-2.0" ]
1
2020-07-16T22:25:48.000Z
2020-07-16T22:25:48.000Z
scripts/experiments/roar.py
jjbrophy47/tree_deletion
97041d129da335de3018b3243bc81943088abf24
[ "Apache-2.0" ]
null
null
null
scripts/experiments/roar.py
jjbrophy47/tree_deletion
97041d129da335de3018b3243bc81943088abf24
[ "Apache-2.0" ]
null
null
null
""" Remove and Retrain (ROAR) experiment. """ import os import sys import time import argparse from datetime import datetime import numpy as np here = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, here + '/../../') sys.path.insert(0, here + '/../') import dare from utility import data_util from utilit...
36.032258
105
0.650083
import os import sys import time import argparse from datetime import datetime import numpy as np here = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, here + '/../../') sys.path.insert(0, here + '/../') import dare from utility import data_util from utility import exp_util from utility import print_ut...
true
true
f7538bf0cc6f7199ecbffee8be1e2d70a97b1524
3,717
py
Python
data/dataset_utils_test.py
iostermann/deeplab2
68822b0c76c2c757a11402ac597711f926990f04
[ "Apache-2.0" ]
587
2021-06-21T17:10:17.000Z
2022-03-30T11:51:38.000Z
data/dataset_utils_test.py
Niklas-AD/deeplab2
e0f7eecfac5d35c3e9e66f061098d5f5f15a7152
[ "Apache-2.0" ]
73
2021-06-23T08:42:22.000Z
2022-03-28T07:06:35.000Z
data/dataset_utils_test.py
Niklas-AD/deeplab2
e0f7eecfac5d35c3e9e66f061098d5f5f15a7152
[ "Apache-2.0" ]
89
2021-06-22T02:21:32.000Z
2022-03-29T17:51:21.000Z
# coding=utf-8 # Copyright 2021 The Deeplab2 Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
40.846154
80
0.692225
import numpy as np import tensorflow as tf from deeplab2.data import dataset_utils class DatasetUtilsTest(tf.test.TestCase): def _get_test_labels(self, num_classes, shape, label_divisor): num_ids_per_class = 35 semantic_labels = np.random.randint(num_classes, size=shape) panoptic_label...
true
true
f7538c1d17d2e28b5042d0597069a3b59599f0ae
5,538
py
Python
.last_tmp.py
Dikaeinstein/Abyteofpython_exercises
93d78a7d2e82c10092d7e149f0a9a1e804dfd601
[ "MIT" ]
null
null
null
.last_tmp.py
Dikaeinstein/Abyteofpython_exercises
93d78a7d2e82c10092d7e149f0a9a1e804dfd601
[ "MIT" ]
null
null
null
.last_tmp.py
Dikaeinstein/Abyteofpython_exercises
93d78a7d2e82c10092d7e149f0a9a1e804dfd601
[ "MIT" ]
null
null
null
import pickle, cwd class Contact: """Represents a persons contact. Attributes: name, phone_no, email. """ def __init__(self, name, number, email=None): """Initialize instance fields.""" self.__name = name self.__phone_no = number self.__email = email def __...
26.625
72
0.479957
import pickle, cwd class Contact: def __init__(self, name, number, email=None): self.__name = name self.__phone_no = number self.__email = email def __str__(self): return """\ Name: {0} Phone Number: {1} Email: {2} """.format(self.__name, self.__phone_no, self.__email) ...
true
true
f7538db127fc799df2b250a996be5e02d585ecb7
6,900
py
Python
Exercises/search_exercises/pacman/search.py
ymazari/artificial-intelligence
b55ca58e394b5ff979fb3b82f0e8a711b78acbbd
[ "MIT" ]
null
null
null
Exercises/search_exercises/pacman/search.py
ymazari/artificial-intelligence
b55ca58e394b5ff979fb3b82f0e8a711b78acbbd
[ "MIT" ]
null
null
null
Exercises/search_exercises/pacman/search.py
ymazari/artificial-intelligence
b55ca58e394b5ff979fb3b82f0e8a711b78acbbd
[ "MIT" ]
null
null
null
# search.py # --------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # A...
34.158416
104
0.66913
from collections import defaultdict import numpy as np import util class SearchProblem: def getStartState(self): util.raiseNotDefined() def isGoalState(self, state): util.raiseNotDefined() def getSuccessors(self, state): util.raiseNotDefined() def getCostOf...
true
true
f7538e3f798d17d39b9624244df1c0b119958cc1
3,076
py
Python
github_leaderboard/users/tests/test_views.py
f0lie/github-leaderboard
b632e55311d0920ca0d1d1768758667e0459310a
[ "Apache-2.0" ]
2
2021-03-01T18:28:59.000Z
2021-03-08T18:05:55.000Z
github_leaderboard/users/tests/test_views.py
f0lie/github-leaderboard
b632e55311d0920ca0d1d1768758667e0459310a
[ "Apache-2.0" ]
34
2021-02-17T18:03:56.000Z
2022-03-01T20:09:59.000Z
github_leaderboard/users/tests/test_views.py
f0lie/github-leaderboard
b632e55311d0920ca0d1d1768758667e0459310a
[ "Apache-2.0" ]
3
2021-02-17T19:52:06.000Z
2021-08-01T12:53:48.000Z
import pytest from django.conf import settings from django.contrib import messages from django.contrib.auth.models import AnonymousUser from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware from django.test import RequestFactory from django.url...
31.387755
75
0.689857
import pytest from django.conf import settings from django.contrib import messages from django.contrib.auth.models import AnonymousUser from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware from django.test import RequestFactory from django.url...
true
true
f7538f0837c678fec07f97acc5878e1c8153f5a3
148,692
py
Python
python/tvm/relay/frontend/pytorch.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
null
null
null
python/tvm/relay/frontend/pytorch.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
null
null
null
python/tvm/relay/frontend/pytorch.py
jwfromm/relax
f120282007778706199243ee88b50697c2b9550c
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.425623
120
0.578599
import functools import itertools import math import sys import logging import numpy as np import tvm from tvm.ir import IRModule from tvm.topi.utils import get_const_tuple from .. import analysis as _analysis from .. import expr as _expr from .. import function as _function from .. import op as _...
true
true
f753912202bce4bcbdf6842ca61debd3b0815ca7
2,893
py
Python
test/test_utils.py
rikroe/bimmer_connected
d77b081bc30fb6762421af49019dae876fba2b28
[ "Apache-2.0" ]
null
null
null
test/test_utils.py
rikroe/bimmer_connected
d77b081bc30fb6762421af49019dae876fba2b28
[ "Apache-2.0" ]
1
2021-11-25T03:13:24.000Z
2021-11-25T03:13:24.000Z
test/test_utils.py
rikroe/bimmer_connected
d77b081bc30fb6762421af49019dae876fba2b28
[ "Apache-2.0" ]
null
null
null
"""Tests for ConnectedDriveAccount.""" import datetime import logging import os import time import unittest from unittest.mock import Mock import time_machine from bimmer_connected.country_selector import get_region_from_name, valid_regions from bimmer_connected.utils import get_class_property_names, parse_datetime, ...
32.875
112
0.637401
import datetime import logging import os import time import unittest from unittest.mock import Mock import time_machine from bimmer_connected.country_selector import get_region_from_name, valid_regions from bimmer_connected.utils import get_class_property_names, parse_datetime, to_json from . import RESPONSE_DIR, VI...
true
true
f75393a21e190b1cab34abb65f87580582468fc0
451
bzl
Python
nullaway/workspace.bzl
prashantsharma04/bazel_java_rules
4f80fbe70e1778aa8e3e0ee8aa2f1efc3e44a462
[ "Apache-2.0" ]
1
2020-10-22T06:44:10.000Z
2020-10-22T06:44:10.000Z
nullaway/workspace.bzl
prashantsharma04/bazel_java_rules
4f80fbe70e1778aa8e3e0ee8aa2f1efc3e44a462
[ "Apache-2.0" ]
5
2020-06-01T22:33:59.000Z
2020-11-01T17:03:06.000Z
nullaway/workspace.bzl
prashantsharma04/bazel_java_rules
4f80fbe70e1778aa8e3e0ee8aa2f1efc3e44a462
[ "Apache-2.0" ]
1
2020-08-17T07:42:21.000Z
2020-08-17T07:42:21.000Z
load("@rules_jvm_external//:specs.bzl", "maven") def nullaway_workspace(): """Defines the Nullaway dependencies, to be loaded with maven_install""" return [ maven.artifact( group = "com.uber.nullaway", artifact = "nullaway", version = "0.7.10", ), mav...
28.1875
76
0.518847
load("@rules_jvm_external//:specs.bzl", "maven") def nullaway_workspace(): return [ maven.artifact( group = "com.uber.nullaway", artifact = "nullaway", version = "0.7.10", ), maven.artifact( group = "com.google.guava", artifact = "...
true
true
f75394099f20c020ca8d379fa26f9df484dca925
635
py
Python
missing-data-one-hot-encoding.py
alexandresalvatierra/python-data-preprocessing
48c3f465db0b5b5785d217d0f8c9524bb3980c48
[ "MIT" ]
null
null
null
missing-data-one-hot-encoding.py
alexandresalvatierra/python-data-preprocessing
48c3f465db0b5b5785d217d0f8c9524bb3980c48
[ "MIT" ]
null
null
null
missing-data-one-hot-encoding.py
alexandresalvatierra/python-data-preprocessing
48c3f465db0b5b5785d217d0f8c9524bb3980c48
[ "MIT" ]
null
null
null
import pandas as pd pd.set_option( 'display.max_columns', 24 ) file_path = 'C:/Users/profAlexandre/Desktop/inteligencia artificial/data-preprocessing/dataset/' file_name = 'traffic-collision-data-from-2010-to-present.csv' df = pd.read_csv( file_path + file_name ) # show head from dataset #print( df.head() ) # show ...
24.423077
96
0.72126
import pandas as pd pd.set_option( 'display.max_columns', 24 ) file_path = 'C:/Users/profAlexandre/Desktop/inteligencia artificial/data-preprocessing/dataset/' file_name = 'traffic-collision-data-from-2010-to-present.csv' df = pd.read_csv( file_path + file_name ) encoding = pd.get_dummies( df['Area Name'] ) ...
true
true
f75394efc0ca6f8c17e6a7253d88fa0b30a483f2
1,045
py
Python
binyard/plot_column.py
giprayogo/binyard
c1cfa880cb9907416da2363fa0e4ca2de920543e
[ "MIT" ]
null
null
null
binyard/plot_column.py
giprayogo/binyard
c1cfa880cb9907416da2363fa0e4ca2de920543e
[ "MIT" ]
null
null
null
binyard/plot_column.py
giprayogo/binyard
c1cfa880cb9907416da2363fa0e4ca2de920543e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # for all to often task: text data file, plot single column import matplotlib matplotlib.rc('axes.formatter', useoffset=False) import matplotlib.pyplot as plt import argparse from numpy import arange from numpy import loadtxt from numpy import transpose parser = argparse.ArgumentParser() parser....
26.794872
71
0.686124
import matplotlib matplotlib.rc('axes.formatter', useoffset=False) import matplotlib.pyplot as plt import argparse from numpy import arange from numpy import loadtxt from numpy import transpose parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', required=True, nargs='+') parser.add_argument('-d',...
true
true
f7539660ce76cc9e5b6065a116e7299e582834da
9,731
py
Python
tests/test_browsing_context.py
GoogleChromeLabs/bidiInChromeContext
b2a0b854bb8ac2647ad5acb6166c3fe3b7a05857
[ "Apache-2.0" ]
21
2021-06-16T10:28:02.000Z
2021-12-16T23:46:28.000Z
tests/test_browsing_context.py
GoogleChromeLabs/bidiInChromeContext
b2a0b854bb8ac2647ad5acb6166c3fe3b7a05857
[ "Apache-2.0" ]
65
2021-06-18T11:44:47.000Z
2022-03-28T21:22:26.000Z
tests/test_browsing_context.py
GoogleChromeLabs/bidiInChromeContext
b2a0b854bb8ac2647ad5acb6166c3fe3b7a05857
[ "Apache-2.0" ]
4
2021-06-16T11:24:58.000Z
2021-11-18T15:36:28.000Z
# Copyright 2021 Google LLC. # Copyright (c) Microsoft Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
31.390323
105
0.643408
from _helpers import * @pytest.mark.asyncio async def test_browsingContext_getTree_contextReturned(websocket): result = await execute_command(websocket, {"method": "browsingContext.getTree", "params": {}}) [context] = ...
true
true
f75398a63490b37d6f1046f385b5633059c0b293
189
py
Python
droptopus/config.py
ArtBIT/Droptopus
c7eb6c36ec66c88ef8c75823bfaa74f2cf53601a
[ "MIT" ]
2
2018-02-13T14:42:38.000Z
2018-02-15T12:24:24.000Z
droptopus/config.py
ArtBIT/Droptopus
c7eb6c36ec66c88ef8c75823bfaa74f2cf53601a
[ "MIT" ]
1
2021-06-01T23:37:13.000Z
2021-06-01T23:37:13.000Z
droptopus/config.py
ArtBIT/Droptopus
c7eb6c36ec66c88ef8c75823bfaa74f2cf53601a
[ "MIT" ]
null
null
null
import os ORG_NAME = "B1T" ORG_DOMAIN = "bit.co.rs" APP_NAME = "Droptopus" APP_DIR = os.path.dirname(os.path.realpath(os.path.join(__file__))) ASSETS_DIR = os.path.join(APP_DIR, "assets")
23.625
67
0.730159
import os ORG_NAME = "B1T" ORG_DOMAIN = "bit.co.rs" APP_NAME = "Droptopus" APP_DIR = os.path.dirname(os.path.realpath(os.path.join(__file__))) ASSETS_DIR = os.path.join(APP_DIR, "assets")
true
true
f753995281a24f16db84e7152c5605fecda0bb32
18,541
py
Python
google/cloud/language/v1beta2/language-v1beta2-py/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/cloud/language/v1beta2/language-v1beta2-py/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/cloud/language/v1beta2/language-v1beta2-py/google/cloud/language_v1beta2/services/language_service/transports/grpc_asyncio.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...
46.236908
98
0.64085
import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import gapic_v1 from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials from google.auth.transport.grpc import S...
true
true
f753998aa3158a241a0ceec23d78f154db2b082b
89
py
Python
cwKen/soloApp/apps.py
cs-fullstack-2019-spring/django-intro1-cw-rsalcido
e212a5a6504169e38beb8b6b082fc1f9080c587b
[ "Apache-2.0" ]
null
null
null
cwKen/soloApp/apps.py
cs-fullstack-2019-spring/django-intro1-cw-rsalcido
e212a5a6504169e38beb8b6b082fc1f9080c587b
[ "Apache-2.0" ]
null
null
null
cwKen/soloApp/apps.py
cs-fullstack-2019-spring/django-intro1-cw-rsalcido
e212a5a6504169e38beb8b6b082fc1f9080c587b
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class SoloappConfig(AppConfig): name = 'soloApp'
14.833333
33
0.752809
from django.apps import AppConfig class SoloappConfig(AppConfig): name = 'soloApp'
true
true
f7539a2d92f94454b04b60133424c71f33f591d7
46,953
py
Python
yandex/cloud/serverless/triggers/v1/trigger_service_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
36
2018-12-23T13:51:50.000Z
2022-03-25T07:48:24.000Z
yandex/cloud/serverless/triggers/v1/trigger_service_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
15
2019-02-28T04:55:09.000Z
2022-03-06T23:17:24.000Z
yandex/cloud/serverless/triggers/v1/trigger_service_pb2.py
korsar182/python-sdk
873bf2a9b136a8f2faae72e86fae1f5b5c3d896a
[ "MIT" ]
18
2019-02-23T07:10:57.000Z
2022-03-28T14:41:08.000Z
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/serverless/triggers/v1/trigger_service.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import r...
48.355304
5,462
0.779865
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from google.protobuf import field_mask_pb2 as google_dot...
true
true
f7539be820e61c661f30d5a70e101668e6921a52
1,535
py
Python
src/sentry/api/endpoints/organization_release_commits.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
2
2019-03-04T12:45:54.000Z
2019-03-04T12:45:55.000Z
src/sentry/api/endpoints/organization_release_commits.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
196
2019-06-10T08:34:10.000Z
2022-02-22T01:26:13.000Z
src/sentry/api/endpoints/organization_release_commits.py
uandco/sentry
5b8d45cb71c6617dac8e64265848623fbfce9c99
[ "BSD-3-Clause" ]
1
2017-02-09T06:36:57.000Z
2017-02-09T06:36:57.000Z
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serializers import serialize from sentry.models import Release, ReleaseCommit class Organizat...
34.886364
82
0.637785
from __future__ import absolute_import from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationReleasesBaseEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serializers import serialize from sentry.models import Release, ReleaseCommit class Organizat...
true
true
f7539c22b27e266faf1113b4620616237c51750a
8,343
py
Python
src/sentry/pipeline/__init__.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
1
2019-10-17T17:46:16.000Z
2019-10-17T17:46:16.000Z
src/sentry/pipeline/__init__.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
src/sentry/pipeline/__init__.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, print_function import logging from types import LambdaType from sentry.models import Organization from sentry.web.frontend.base import BaseView from sentry.utils.session_store import RedisSessionStore from sentry.utils.hashlib import md5_text from sentry.web.helpers import ren...
32.846457
99
0.659954
from __future__ import absolute_import, print_function import logging from types import LambdaType from sentry.models import Organization from sentry.web.frontend.base import BaseView from sentry.utils.session_store import RedisSessionStore from sentry.utils.hashlib import md5_text from sentry.web.helpers import ren...
true
true
f7539ce8cc496ed24dc9d6e80ff476a216603dca
2,229
py
Python
tools/processing_tool_ensemble_maker/lib_utils_time.py
c-hydro/hmc
66470234e126e4a727e1faf2fe64bd58547220ed
[ "MIT" ]
null
null
null
tools/processing_tool_ensemble_maker/lib_utils_time.py
c-hydro/hmc
66470234e126e4a727e1faf2fe64bd58547220ed
[ "MIT" ]
2
2021-07-08T13:10:33.000Z
2021-07-08T13:11:33.000Z
tools/processing_tool_ensemble_maker/lib_utils_time.py
c-hydro/hmc
66470234e126e4a727e1faf2fe64bd58547220ed
[ "MIT" ]
null
null
null
""" Library Features: Name: lib_utils_time Author(s): Fabio Delogu (fabio.delogu@cimafoundation.org) Date: '20211208' Version: '1.0.0' """ ####################################################################################### # Libraries import logging import pandas as pd from datetime im...
35.380952
104
0.551817
true
true
f7539d16f567f152b81833edbd586853ee1650dd
4,921
py
Python
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/mmcv_need/distributed.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/mmcv_need/distributed.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
1
2022-01-20T03:11:05.000Z
2022-01-20T06:53:39.000Z
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/mmcv_need/distributed.py
Ascend/modelzoo
f018cfed33dbb1cc2110b9ea2e233333f71cc509
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
41.70339
78
0.623654
import torch from torch.nn.parallel.distributed import (DistributedDataParallel, _find_tensors) from mmcv import print_log from mmcv.utils import TORCH_VERSION from .scatter_gather import scatter_kwargs class MMDistributedDataParallel(DistributedDataParallel):...
true
true
f7539df3220db631b4adebda8118a613e46fdb9e
7,524
py
Python
examples/contrib/message_parser.py
CS536-Modbus-QUIC/pymodbus
337d090f04922c9440913927593f26cd9388b141
[ "BSD-3-Clause" ]
null
null
null
examples/contrib/message_parser.py
CS536-Modbus-QUIC/pymodbus
337d090f04922c9440913927593f26cd9388b141
[ "BSD-3-Clause" ]
null
null
null
examples/contrib/message_parser.py
CS536-Modbus-QUIC/pymodbus
337d090f04922c9440913927593f26cd9388b141
[ "BSD-3-Clause" ]
1
2021-04-14T17:30:19.000Z
2021-04-14T17:30:19.000Z
#!/usr/bin/env python """ Modbus Message Parser -------------------------------------------------------------------------- The following is an example of how to parse modbus messages using the supplied framers for a number of protocols: * tcp * ascii * rtu * binary """ # ----------------------------------------------...
34.2
79
0.505715
from __future__ import print_function import collections import textwrap from optparse import OptionParser import codecs as c from pymodbus.factory import ClientDecoder, ServerDecoder from pymodbus.transaction import ModbusSocketFramer from pymodbus.transaction import ModbusBinaryFramer from pymodbus.transaction imp...
true
true
f7539f946be1d5565a9e1303867c337abf15ea33
1,306
py
Python
rlmolecule/tree_search/metrics.py
NREL/rlmolecule
7e98dca49ea82bf9d14164955d82adfa8bbc2d64
[ "BSD-3-Clause" ]
16
2020-12-28T21:45:09.000Z
2022-03-19T12:03:58.000Z
rlmolecule/tree_search/metrics.py
NREL/rlmolecule
7e98dca49ea82bf9d14164955d82adfa8bbc2d64
[ "BSD-3-Clause" ]
56
2020-12-30T16:12:33.000Z
2022-02-02T18:32:44.000Z
rlmolecule/tree_search/metrics.py
NREL/rlmolecule
7e98dca49ea82bf9d14164955d82adfa8bbc2d64
[ "BSD-3-Clause" ]
7
2021-01-05T01:34:04.000Z
2021-09-29T13:42:44.000Z
from collections import defaultdict from functools import wraps from time import time from typing import Callable class CallMetrics(object): def __init__(self): self.start_time = time() self.execution_time = defaultdict(lambda: 0.) self.execution_count = defaultdict(lambda: 0) def res...
29.022222
87
0.67075
from collections import defaultdict from functools import wraps from time import time from typing import Callable class CallMetrics(object): def __init__(self): self.start_time = time() self.execution_time = defaultdict(lambda: 0.) self.execution_count = defaultdict(lambda: 0) def res...
true
true
f753a00c3f474def7e7c18bd1f8015d0b028b695
1,256
py
Python
tests/procs/test_specs.py
hemna/xonsh
86c4dec1bb5df1905b65ef553b06fdb5c76b20a8
[ "BSD-2-Clause-FreeBSD" ]
3
2020-11-01T13:51:47.000Z
2021-03-21T03:40:18.000Z
tests/procs/test_specs.py
hemna/xonsh
86c4dec1bb5df1905b65ef553b06fdb5c76b20a8
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/procs/test_specs.py
hemna/xonsh
86c4dec1bb5df1905b65ef553b06fdb5c76b20a8
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
"""Tests the xonsh.procs.specs""" from subprocess import Popen import pytest from xonsh.procs.specs import cmds_to_specs from xonsh.environ import Env from xonsh.procs.posix import PopenThread from xonsh.procs.proxies import ProcProxy, ProcProxyThread from .tools import skip_if_on_windows @skip_if_on_windows def ...
33.052632
60
0.745223
from subprocess import Popen import pytest from xonsh.procs.specs import cmds_to_specs from xonsh.environ import Env from xonsh.procs.posix import PopenThread from xonsh.procs.proxies import ProcProxy, ProcProxyThread from .tools import skip_if_on_windows @skip_if_on_windows def test_cmds_to_specs_thread_subproc(...
true
true
f753a0321f5037312b92e8e8eece4c1cf3e6f223
32,941
py
Python
tests/unit/test_key.py
sandboxxapp/python-ndb
8d3ce5c6cce9055d21400aa9feebc99e66393667
[ "Apache-2.0" ]
null
null
null
tests/unit/test_key.py
sandboxxapp/python-ndb
8d3ce5c6cce9055d21400aa9feebc99e66393667
[ "Apache-2.0" ]
3
2020-01-09T15:47:26.000Z
2021-04-30T21:03:34.000Z
webhook/venv/lib/python3.7/site-packages/tests/unit/test_key.py
tlgevers/dialogflow-chatbot-python
da159cee4efee29e57a60bf8d6cf829cb2d828a6
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.139839
79
0.61343
import base64 import pickle try: from unittest import mock except ImportError: import mock from google.cloud.datastore import _app_engine_key_pb2 import google.cloud.datastore import pytest from google.cloud.ndb import exceptions from google.cloud.ndb import key as key_module from google.clou...
true
true
f753a1163a55fd080dc3cd68efc78c308c6e062e
5,648
py
Python
homeassistant/components/netatmo/media_source.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/netatmo/media_source.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/netatmo/media_source.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Netatmo Media Source Implementation.""" from __future__ import annotations import datetime as dt import logging import re from homeassistant.components.media_player.const import ( MEDIA_CLASS_DIRECTORY, MEDIA_CLASS_VIDEO, MEDIA_TYPE_VIDEO, ) from homeassistant.components.media_player.errors import Brow...
32.837209
87
0.615793
from __future__ import annotations import datetime as dt import logging import re from homeassistant.components.media_player.const import ( MEDIA_CLASS_DIRECTORY, MEDIA_CLASS_VIDEO, MEDIA_TYPE_VIDEO, ) from homeassistant.components.media_player.errors import BrowseError from homeassistant.components.media...
true
true
f753a206904e709e9723bcc297fdbf81fbde19e0
609
py
Python
app/auth/email.py
sateesh2020/microblog-flask
f2d1c684d740e4df4b92abb940b8aef5f060c849
[ "MIT" ]
null
null
null
app/auth/email.py
sateesh2020/microblog-flask
f2d1c684d740e4df4b92abb940b8aef5f060c849
[ "MIT" ]
1
2021-06-02T00:21:29.000Z
2021-06-02T00:21:29.000Z
app/auth/email.py
pointerboy/ModHub
5b2bdf31bdf409c677e1009f879794f91e636a7b
[ "MIT" ]
null
null
null
from flask import render_template, current_app from flask_babel import _ from app.email import send_email def send_password_reset_email(user): token = user.get_reset_password_token() send_email(_('[Microblog] Reset Your Password'), sender=current_app.config['ADMINS'][0], recipie...
38.0625
69
0.609195
from flask import render_template, current_app from flask_babel import _ from app.email import send_email def send_password_reset_email(user): token = user.get_reset_password_token() send_email(_('[Microblog] Reset Your Password'), sender=current_app.config['ADMINS'][0], recipie...
true
true
f753a2b126d2019568fa39ffd3f40ff472c4a259
3,268
py
Python
update_manifest.py
wfraser/dropbox-sdk-rust
9c844b42884bcb32ba51760b7d611087fccbabf2
[ "Apache-2.0" ]
46
2019-09-08T10:57:15.000Z
2022-01-05T09:57:46.000Z
update_manifest.py
dropbox/dropbox-sdk-rust
9c844b42884bcb32ba51760b7d611087fccbabf2
[ "Apache-2.0" ]
18
2020-01-13T21:00:16.000Z
2022-02-28T18:04:23.000Z
update_manifest.py
wfraser/dropbox-sdk-rust
9c844b42884bcb32ba51760b7d611087fccbabf2
[ "Apache-2.0" ]
12
2019-09-10T21:06:31.000Z
2022-02-17T13:02:36.000Z
#!/usr/bin/env python3 import argparse import os import sys from typing import Dict, Set from generate import spec_files def update_manifest(stone_root: str): stone_files = spec_files(stone_root) deps: Dict[str, Set[str]] = {} for filepath in stone_files: module = None with open(filepath...
33.346939
95
0.48623
import argparse import os import sys from typing import Dict, Set from generate import spec_files def update_manifest(stone_root: str): stone_files = spec_files(stone_root) deps: Dict[str, Set[str]] = {} for filepath in stone_files: module = None with open(filepath) as f: fo...
true
true
f753a5080fc68a40a6ef32fd98ddc29a3a9f83b6
2,339
py
Python
src/using_multiprocessing.py
ariannasg/optimizing-python
e6c307dc694bc98c776faea1dbd7f420c2928f64
[ "MIT" ]
null
null
null
src/using_multiprocessing.py
ariannasg/optimizing-python
e6c307dc694bc98c776faea1dbd7f420c2928f64
[ "MIT" ]
null
null
null
src/using_multiprocessing.py
ariannasg/optimizing-python
e6c307dc694bc98c776faea1dbd7f420c2928f64
[ "MIT" ]
null
null
null
#!usr/bin/env python3 import bz2 from concurrent.futures import ProcessPoolExecutor def unpack(requests): """Unpack a list of requests compressed in bz2""" return [bz2.decompress(request) for request in requests] def unpack_proc(requests): """Unpack a list of requests compressed in bz2 using a process p...
37.725806
103
0.637452
import bz2 from concurrent.futures import ProcessPoolExecutor def unpack(requests): return [bz2.decompress(request) for request in requests] def unpack_proc(requests): with ProcessPoolExecutor() as pool: return list(pool.map(bz2.decompress, requests)) if __name__ == '__main__': with open...
true
true
f753a60402220d2ed3d220c14c59c94c37f81726
2,134
py
Python
day11/flash.py
JurriaanBerger/AdventOfCode2021
666d9b36d87bfaec3da8b700832bf0a5791b840a
[ "MIT" ]
null
null
null
day11/flash.py
JurriaanBerger/AdventOfCode2021
666d9b36d87bfaec3da8b700832bf0a5791b840a
[ "MIT" ]
null
null
null
day11/flash.py
JurriaanBerger/AdventOfCode2021
666d9b36d87bfaec3da8b700832bf0a5791b840a
[ "MIT" ]
null
null
null
import numpy as np def read_octo(): octo_map = [] file = open('octo.txt', "r") f1 = file.read() file.close() f2 = f1.split("\n") for h in f2: list_h = [] list_h[:0] = h octo_map.append([int(l) for l in list_h]) return np.array(octo_map) def energy_increase(cur...
26.675
89
0.648079
import numpy as np def read_octo(): octo_map = [] file = open('octo.txt', "r") f1 = file.read() file.close() f2 = f1.split("\n") for h in f2: list_h = [] list_h[:0] = h octo_map.append([int(l) for l in list_h]) return np.array(octo_map) def energy_increase(cur...
true
true
f753a634a26348d7212a75affb23ef3d4a2e928c
3,405
py
Python
app/models/feedbackToProduct.py
YorkL123/516-DBMS-X-Jay
937b97752684dec46e08e67cacc0a25e57ff8662
[ "MIT" ]
null
null
null
app/models/feedbackToProduct.py
YorkL123/516-DBMS-X-Jay
937b97752684dec46e08e67cacc0a25e57ff8662
[ "MIT" ]
1
2022-03-14T20:49:32.000Z
2022-03-14T20:49:32.000Z
app/models/feedbackToProduct.py
YorkL123/516-DBMS-X-Jay
937b97752684dec46e08e67cacc0a25e57ff8662
[ "MIT" ]
3
2022-02-07T18:18:54.000Z
2022-03-11T22:09:01.000Z
from flask import current_app as app class feedbackToProduct(): def __init__(self, uid, pid, rate, review, time, vote): self.uid = uid self.pid = pid self.rate = rate self.review = review self.time = time self.vote = vote @staticmethod def AddFeedbackToProdu...
25.795455
65
0.527166
from flask import current_app as app class feedbackToProduct(): def __init__(self, uid, pid, rate, review, time, vote): self.uid = uid self.pid = pid self.rate = rate self.review = review self.time = time self.vote = vote @staticmethod def AddFeedbackToProdu...
true
true
f753a6685f030ef87cc7e65dae8c3e469f6ad3df
1,337
py
Python
src/python/is_msgs/utils/build.py
labviros/is-msgs
d06515176a3b969d4e62dfb882400e8e2b8583c5
[ "MIT" ]
3
2019-03-28T16:50:05.000Z
2022-03-26T20:36:03.000Z
src/python/is_msgs/utils/build.py
labviros/is-msgs
d06515176a3b969d4e62dfb882400e8e2b8583c5
[ "MIT" ]
6
2018-05-16T10:55:15.000Z
2020-04-27T15:40:54.000Z
src/python/is_msgs/utils/build.py
labviros/is-msgs
d06515176a3b969d4e62dfb882400e8e2b8583c5
[ "MIT" ]
12
2019-12-02T15:01:08.000Z
2021-08-30T22:16:39.000Z
from __future__ import print_function import os import re import sys import shutil import subprocess import is_msgs def get_include(): return os.path.split(os.path.dirname(is_msgs.__file__))[0] if __name__ == '__main__': if len(sys.argv) < 2: print('Nothing to do. No *.proto files passed on arguments....
34.282051
89
0.581152
from __future__ import print_function import os import re import sys import shutil import subprocess import is_msgs def get_include(): return os.path.split(os.path.dirname(is_msgs.__file__))[0] if __name__ == '__main__': if len(sys.argv) < 2: print('Nothing to do. No *.proto files passed on arguments....
true
true
f753a73a7738ceabc54d822bfbb2c244fe05f0e6
912
py
Python
diayn_seq_code_revised/networks/bi_rnn_stepwise_seqwise_obs_dimension_selection.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
null
null
null
diayn_seq_code_revised/networks/bi_rnn_stepwise_seqwise_obs_dimension_selection.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
6
2021-02-02T23:00:02.000Z
2022-01-13T03:13:51.000Z
diayn_seq_code_revised/networks/bi_rnn_stepwise_seqwise_obs_dimension_selection.py
fgitmichael/SelfSupevisedSkillDiscovery
60eee11cfd67046190dd2784bf40e97bdbed9d40
[ "MIT" ]
null
null
null
from typing import Union from diayn_rnn_seq_rnn_stepwise_classifier.networks.bi_rnn_stepwise_seqwise import \ BiRnnStepwiseSeqWiseClassifier class RnnStepwiseSeqwiseClassifierObsDimSelect(BiRnnStepwiseSeqWiseClassifier): def __init__(self, *args, input_size, ...
30.4
84
0.631579
from typing import Union from diayn_rnn_seq_rnn_stepwise_classifier.networks.bi_rnn_stepwise_seqwise import \ BiRnnStepwiseSeqWiseClassifier class RnnStepwiseSeqwiseClassifierObsDimSelect(BiRnnStepwiseSeqWiseClassifier): def __init__(self, *args, input_size, ...
true
true
f753a8000743cf6c5d252e3ed49dafbcc81bca33
4,582
py
Python
ops.py
7D24H/testGPU
d9341e1a60d51c895c7e5090990bc13920ba7257
[ "MIT" ]
null
null
null
ops.py
7D24H/testGPU
d9341e1a60d51c895c7e5090990bc13920ba7257
[ "MIT" ]
null
null
null
ops.py
7D24H/testGPU
d9341e1a60d51c895c7e5090990bc13920ba7257
[ "MIT" ]
null
null
null
from glob import glob import os import tensorflow as tf import numpy as np import cv2 def block_patch(input, patch_size=15, margin=5): shape = input.get_shape().as_list() #create patch in random size pad_size = tf.random_uniform([2], minval=int(patch_size*0.1), maxval=patch_size, dtype=tf.int32) patch = tf.zero...
33.202899
120
0.709297
from glob import glob import os import tensorflow as tf import numpy as np import cv2 def block_patch(input, patch_size=15, margin=5): shape = input.get_shape().as_list() pad_size = tf.random_uniform([2], minval=int(patch_size*0.1), maxval=patch_size, dtype=tf.int32) patch = tf.zeros([pad_size[0], pad_size[1],...
true
true
f753a9e2c76c975aed9c69396ce8b7736f5a3b21
1,584
py
Python
src/utilities.py
ucsc-cgp/sync_agile_boards
2f952b1d37cf301c1e4dc3d7d1240d420ca7ee5c
[ "Apache-2.0" ]
null
null
null
src/utilities.py
ucsc-cgp/sync_agile_boards
2f952b1d37cf301c1e4dc3d7d1240d420ca7ee5c
[ "Apache-2.0" ]
64
2019-02-13T19:49:33.000Z
2019-06-26T18:21:10.000Z
src/utilities.py
ucsc-cgp/sync_agile_boards
2f952b1d37cf301c1e4dc3d7d1240d420ca7ee5c
[ "Apache-2.0" ]
2
2019-02-07T20:53:52.000Z
2021-08-29T10:26:00.000Z
#!/usr/bin/env python3 import os import errno import logging from src.issue import Issue from settings import jira_to_zen_backlog_map, jira_to_zen_sprint_map, zen_to_jira_map, urls logger = logging.getLogger(__name__) def check_for_git_config(git_config_file): """ User must have ~/.gitconfig in home direct...
28.285714
100
0.717172
import os import errno import logging from src.issue import Issue from settings import jira_to_zen_backlog_map, jira_to_zen_sprint_map, zen_to_jira_map, urls logger = logging.getLogger(__name__) def check_for_git_config(git_config_file): logging.info('Checking whether .gitconfig exists on local system') u...
true
true
f753aa1f846e961ce28311bf770e0f514a83bf03
3,104
py
Python
gui/utils.py
Lakoc/SFC_project
00b98f0d9651138c30f567ae4775a624e511a392
[ "Apache-2.0" ]
null
null
null
gui/utils.py
Lakoc/SFC_project
00b98f0d9651138c30f567ae4775a624e511a392
[ "Apache-2.0" ]
null
null
null
gui/utils.py
Lakoc/SFC_project
00b98f0d9651138c30f567ae4775a624e511a392
[ "Apache-2.0" ]
null
null
null
import numpy as np def remove_values_from_list(the_list, val): return [value for value in the_list if value != val] def remove_values_from_list_to_float(the_list, val): return [float(value) for value in the_list if value != val] def load_3d_arr_from_string(arr): arr = arr.replace('[', '').replace(']',...
42.520548
120
0.626289
import numpy as np def remove_values_from_list(the_list, val): return [value for value in the_list if value != val] def remove_values_from_list_to_float(the_list, val): return [float(value) for value in the_list if value != val] def load_3d_arr_from_string(arr): arr = arr.replace('[', '').replace(']',...
true
true
f753ac56596df09669cb4768d27a8b3dd7aa2165
127
py
Python
scripts/build_plotutils.py
1byte2bytes/Sydney.framework
f2f390ba778397c04c168fe3072eceb8c04278a0
[ "MIT" ]
null
null
null
scripts/build_plotutils.py
1byte2bytes/Sydney.framework
f2f390ba778397c04c168fe3072eceb8c04278a0
[ "MIT" ]
null
null
null
scripts/build_plotutils.py
1byte2bytes/Sydney.framework
f2f390ba778397c04c168fe3072eceb8c04278a0
[ "MIT" ]
null
null
null
# Copyright (c) Sydney Erickson 2017 import buildlib import buildsettings buildlib.build_configure("plotutils-2.6.tar.gz", "")
25.4
52
0.787402
import buildlib import buildsettings buildlib.build_configure("plotutils-2.6.tar.gz", "")
true
true
f753acd5943a3c5943bf49e3c540ac3c622f64ae
7,207
py
Python
utils/Dataset.py
ASMDS/PATREC
091df6ec20e0736340a2b2ff9a25ac81bec48259
[ "MIT" ]
1
2021-12-09T12:31:52.000Z
2021-12-09T12:31:52.000Z
utils/Dataset.py
ASMDS/PATREC
091df6ec20e0736340a2b2ff9a25ac81bec48259
[ "MIT" ]
null
null
null
utils/Dataset.py
ASMDS/PATREC
091df6ec20e0736340a2b2ff9a25ac81bec48259
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from utils.DatasetFilter import DatasetFilter from utils.DatasetSplitter import DatasetSplitter class Dataset: def __init__(self, dataset_options): self.options = dataset_options; self.df = None; self.columns_df = None; self.data = None;...
34.156398
144
0.650617
import pandas as pd import numpy as np from utils.DatasetFilter import DatasetFilter from utils.DatasetSplitter import DatasetSplitter class Dataset: def __init__(self, dataset_options): self.options = dataset_options; self.df = None; self.columns_df = None; self.data = None;...
true
true
f753aeb80a8b673012eb7b862dcecc996c0c8371
6,792
py
Python
tests/nonrealtime/test_nonrealtime_misc.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
null
null
null
tests/nonrealtime/test_nonrealtime_misc.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
null
null
null
tests/nonrealtime/test_nonrealtime_misc.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
null
null
null
import pytest import uqbar.strings import supriya.assets.synthdefs import supriya.nonrealtime import supriya.patterns import supriya.synthdefs import supriya.ugens from supriya import AddAction with supriya.synthdefs.SynthDefBuilder(in_=0, out=0) as builder: source = supriya.ugens.In.ar(bus=builder["in_"]) so...
29.789474
77
0.404888
import pytest import uqbar.strings import supriya.assets.synthdefs import supriya.nonrealtime import supriya.patterns import supriya.synthdefs import supriya.ugens from supriya import AddAction with supriya.synthdefs.SynthDefBuilder(in_=0, out=0) as builder: source = supriya.ugens.In.ar(bus=builder["in_"]) so...
true
true
f753b056e521cc13fd26a8144a5a287e9aeffdf2
85,605
py
Python
sdk/python/pulumi_azure_nextgen/batch/v20181201/_inputs.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/batch/v20181201/_inputs.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/batch/v20181201/_inputs.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
53.670846
1,636
0.702844
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'ApplicationPackageReferenceArgs', 'AutoScaleSettingsArgs', 'AutoStorageBasePropertiesArgs', 'AutoUserSpecificationArgs', 'CertificateRe...
true
true
f753b0c9722985ffd8e27f567dde4ed39c398c77
8,280
py
Python
hackerrank/2017/w28/lucky8/lucky8_2.py
bicepjai/mypuzzles
1918700562b38320bc30f61ee2fdcf9b8f404b8d
[ "BSD-3-Clause" ]
null
null
null
hackerrank/2017/w28/lucky8/lucky8_2.py
bicepjai/mypuzzles
1918700562b38320bc30f61ee2fdcf9b8f404b8d
[ "BSD-3-Clause" ]
null
null
null
hackerrank/2017/w28/lucky8/lucky8_2.py
bicepjai/mypuzzles
1918700562b38320bc30f61ee2fdcf9b8f404b8d
[ "BSD-3-Clause" ]
null
null
null
from itertools import chain, combinations from time import time import collections from random import randint def powerset(iterable): "powerset([1,2,3]) --> () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)" s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) ...
36
165
0.525725
from itertools import chain, combinations from time import time import collections from random import randint def powerset(iterable): s = list(iterable) return chain.from_iterable(combinations(s, r) for r in range(len(s) + 1)) def lucky_8_naive(n_str): power_set = (list(map(''.join, powerset...
true
true
f753b0eb4aebc0ba7c5429354b5e178df404c0f6
71,918
py
Python
data_generator/object_detection_2d_data_generator_custom.py
shiningsunnyday/ssd_keras
3a2ea0ceaa676f59b1787ad5f5e8337520c7c056
[ "Apache-2.0" ]
null
null
null
data_generator/object_detection_2d_data_generator_custom.py
shiningsunnyday/ssd_keras
3a2ea0ceaa676f59b1787ad5f5e8337520c7c056
[ "Apache-2.0" ]
null
null
null
data_generator/object_detection_2d_data_generator_custom.py
shiningsunnyday/ssd_keras
3a2ea0ceaa676f59b1787ad5f5e8337520c7c056
[ "Apache-2.0" ]
null
null
null
''' A data generator for 2D object detection. Copyright (C) 2018 Pierluigi Ferrari 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...
57.858407
211
0.576629
from __future__ import division import numpy as np import inspect from collections import defaultdict import warnings import sklearn.utils from copy import deepcopy from PIL import Image import cv2 import csv import os import sys from tqdm import tqdm, trange try: import h5py except ImportError: warnings.warn(...
true
true
f753b2155ab8a16cd7bcf7399630ab8503588b86
728
py
Python
tests/operations_test.py
GerasimovRM/influxalchemy
c6527dc99f18f58da0d2f6602759be40f24d4b44
[ "MIT" ]
42
2016-08-16T11:36:10.000Z
2022-02-14T15:50:53.000Z
tests/operations_test.py
GerasimovRM/influxalchemy
c6527dc99f18f58da0d2f6602759be40f24d4b44
[ "MIT" ]
10
2017-02-01T16:16:06.000Z
2022-01-21T23:25:22.000Z
tests/operations_test.py
GerasimovRM/influxalchemy
c6527dc99f18f58da0d2f6602759be40f24d4b44
[ "MIT" ]
6
2016-10-26T13:10:21.000Z
2021-02-19T10:27:07.000Z
""" InfluxAlchemy Operations. """ from influxalchemy.operations import Operation def test_op_init(): op = Operation(" fizz ", " buzz ") assert op._op == " fizz " assert op._nop == " buzz " def test_op_str(): op = Operation(" fizz ", " buzz ") assert str(op) == " fizz " def test_op_repr(): ...
19.675676
46
0.56044
from influxalchemy.operations import Operation def test_op_init(): op = Operation(" fizz ", " buzz ") assert op._op == " fizz " assert op._nop == " buzz " def test_op_str(): op = Operation(" fizz ", " buzz ") assert str(op) == " fizz " def test_op_repr(): op = Operation(" fizz ", " buzz ")...
true
true
f753b2156a19046c3a177f3e633ffe6fd6b81f9f
691
py
Python
bigip_sdk/exceptions.py
Cloudify-PS/cloudify-bigip-plugin
2c95003eda24c1a5678021307e0bccb4a495abee
[ "Apache-2.0" ]
null
null
null
bigip_sdk/exceptions.py
Cloudify-PS/cloudify-bigip-plugin
2c95003eda24c1a5678021307e0bccb4a495abee
[ "Apache-2.0" ]
null
null
null
bigip_sdk/exceptions.py
Cloudify-PS/cloudify-bigip-plugin
2c95003eda24c1a5678021307e0bccb4a495abee
[ "Apache-2.0" ]
2
2018-12-03T18:58:47.000Z
2019-04-02T21:34:34.000Z
######## # Copyright (c) 2017 GigaSpaces Technologies Ltd. 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...
36.368421
79
0.735166
yncException(Exception): pass
true
true
f753b27c45f67944a7850c5f568f199bb2ad3651
173,977
py
Python
hao/places.py
orctom/tab
573bcaf39ad73c1ffc5532de10506ce243150f1d
[ "Apache-2.0" ]
null
null
null
hao/places.py
orctom/tab
573bcaf39ad73c1ffc5532de10506ce243150f1d
[ "Apache-2.0" ]
null
null
null
hao/places.py
orctom/tab
573bcaf39ad73c1ffc5532de10506ce243150f1d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import typing TYPE_PROVINCE = 'province' TYPE_CITY = 'city' TYPE_DIRECT = 'direct' TYPE_COUNTY = 'county' class Place(object): __slots__ = ['id', 'name', 'shorts', 'parent', 'children_type', 'children', 'enabled'] def __init__(self, _id: str, name: s...
39.352409
131
0.440892
import typing TYPE_PROVINCE = 'province' TYPE_CITY = 'city' TYPE_DIRECT = 'direct' TYPE_COUNTY = 'county' class Place(object): __slots__ = ['id', 'name', 'shorts', 'parent', 'children_type', 'children', 'enabled'] def __init__(self, _id: str, name: str, sh...
true
true
f753b2ee88eca648ba1ee7bcf6a8dfcd9d256538
804
py
Python
evaluate.py
stevexiaofei/Worm_seg_net
99114bb3f221baa4df4c93d6e282ae288aa63cfc
[ "MIT" ]
null
null
null
evaluate.py
stevexiaofei/Worm_seg_net
99114bb3f221baa4df4c93d6e282ae288aa63cfc
[ "MIT" ]
null
null
null
evaluate.py
stevexiaofei/Worm_seg_net
99114bb3f221baa4df4c93d6e282ae288aa63cfc
[ "MIT" ]
null
null
null
import cv2 import numpy as np import os def eval_metric(label_path,output_path): label = cv2.imread(label_path,0) output = cv2.imread(output_path,0) _, label = cv2.threshold(label,0,1,cv2.THRESH_BINARY) _, output = cv2.threshold(output,0,1,cv2.THRESH_BINARY) label_ = 1- label output_ = 1-output Dn = label_.sum(...
36.545455
72
0.738806
import cv2 import numpy as np import os def eval_metric(label_path,output_path): label = cv2.imread(label_path,0) output = cv2.imread(output_path,0) _, label = cv2.threshold(label,0,1,cv2.THRESH_BINARY) _, output = cv2.threshold(output,0,1,cv2.THRESH_BINARY) label_ = 1- label output_ = 1-output Dn = label_.sum(...
true
true
f753b44d2cc7efce76203fee9fbec9a698aa56d8
6,629
py
Python
agent/indy_catalyst_agent/holder/tests/test_indy.py
nairobi222/indy-catalyst
dcbd80524ace7747ecfecd716ff932e9b571d69a
[ "Apache-2.0" ]
1
2019-03-18T13:10:05.000Z
2019-03-18T13:10:05.000Z
agent/indy_catalyst_agent/holder/tests/test_indy.py
nairobi222/indy-catalyst
dcbd80524ace7747ecfecd716ff932e9b571d69a
[ "Apache-2.0" ]
null
null
null
agent/indy_catalyst_agent/holder/tests/test_indy.py
nairobi222/indy-catalyst
dcbd80524ace7747ecfecd716ff932e9b571d69a
[ "Apache-2.0" ]
null
null
null
import json from unittest import mock from asynctest import TestCase as AsyncTestCase from asynctest import mock as async_mock from indy_catalyst_agent.holder.indy import IndyHolder class TestIndyHolder(AsyncTestCase): def test_init(self): holder = IndyHolder("wallet") assert holder.wallet == "w...
36.423077
88
0.683059
import json from unittest import mock from asynctest import TestCase as AsyncTestCase from asynctest import mock as async_mock from indy_catalyst_agent.holder.indy import IndyHolder class TestIndyHolder(AsyncTestCase): def test_init(self): holder = IndyHolder("wallet") assert holder.wallet == "w...
true
true
f753b5fc75699b44596df732d429ee37dc740211
6,938
py
Python
rllib/agents/dqn/dqn_torch_model.py
Yeachan-Heo/ray
a73c488c74b1e01da3961db2eb538c43c29753f5
[ "Apache-2.0" ]
1
2020-11-14T19:25:41.000Z
2020-11-14T19:25:41.000Z
rllib/agents/dqn/dqn_torch_model.py
Yeachan-Heo/ray
a73c488c74b1e01da3961db2eb538c43c29753f5
[ "Apache-2.0" ]
2
2022-01-13T04:15:38.000Z
2022-03-12T01:03:35.000Z
rllib/agents/dqn/dqn_torch_model.py
Yeachan-Heo/ray
a73c488c74b1e01da3961db2eb538c43c29753f5
[ "Apache-2.0" ]
null
null
null
import numpy as np from ray.rllib.models.torch.torch_modelv2 import TorchModelV2 from ray.rllib.utils import try_import_torch torch, nn = try_import_torch() class DQNTorchModel(TorchModelV2): """Extension of standard TorchModelV2 to provide dueling-Q functionality. """ def __init__( self, ...
41.297619
79
0.556645
import numpy as np from ray.rllib.models.torch.torch_modelv2 import TorchModelV2 from ray.rllib.utils import try_import_torch torch, nn = try_import_torch() class DQNTorchModel(TorchModelV2): def __init__( self, obs_space, action_space, num_outputs, m...
true
true
f753b660a0e8200b30de97564fff99b1d9a3fa54
2,448
py
Python
launcher.py
BKleynhans-WIP/radiometer-raspberrypi
2b372916bdd25e5021f5ac8de34323dd58ede423
[ "Unlicense" ]
null
null
null
launcher.py
BKleynhans-WIP/radiometer-raspberrypi
2b372916bdd25e5021f5ac8de34323dd58ede423
[ "Unlicense" ]
null
null
null
launcher.py
BKleynhans-WIP/radiometer-raspberrypi
2b372916bdd25e5021f5ac8de34323dd58ede423
[ "Unlicense" ]
2
2021-01-01T19:56:21.000Z
2021-02-09T19:09:38.000Z
#!/usr/bin/env python3 ### # # # # Program Description : # Created By : Benjamin Kleynhans # Creation Date : January 25, 2020 # Authors : Benjamin Kleynhans # # Last Modified By : Benjamin Kleynhans # Last Modified Date : August 20, 2020 # Filename : launcher.py # ### # Syste...
24
94
0.593546
import sys, os, inspect import subprocess as sp import pdb from src import radiometer ERASE_LINE = '\x1b[2k' __PROJECT_ROOT = '' def get_module_path(): filename = inspect.getfile(inspect.currentframe()) path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfr...
true
true
f753b672926677649d60a11fcfabcae3b859e9d9
4,181
py
Python
pypureclient/pure1/Pure1_1_0/models/metric_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/pure1/Pure1_1_0/models/metric_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/pure1/Pure1_1_0/models/metric_get_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ Pure1 Public REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from...
33.717742
522
0.587898
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.pure1.Pure1_1_0 import models class MetricGetResponse(object): swagger_types = { 'continuation_token': 'str', 'total_item_count': 'int', 'items': 'list[M...
true
true
f753b704822c17ac5760c26fff7a055d4849a451
5,087
py
Python
onlinecourse/migrations/__init__.py
meanest13/eyebeem_django
dffd7e9b32f834122d756923f5d3e0083442747a
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/__init__.py
meanest13/eyebeem_django
dffd7e9b32f834122d756923f5d3e0083442747a
[ "Apache-2.0" ]
null
null
null
onlinecourse/migrations/__init__.py
meanest13/eyebeem_django
dffd7e9b32f834122d756923f5d3e0083442747a
[ "Apache-2.0" ]
null
null
null
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
47.990566
210
0.587576
from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ ...
true
true
f753b833abe8b2a323cf516a272a9b1dd5f7d783
43,414
py
Python
src/deoxys/experiment/postprocessor.py
huynhngoc/deoxys
b2e9936b723807e129fda36d8d6131ca00db558f
[ "MIT" ]
1
2021-12-28T15:48:45.000Z
2021-12-28T15:48:45.000Z
src/deoxys/experiment/postprocessor.py
huynhngoc/deoxys
b2e9936b723807e129fda36d8d6131ca00db558f
[ "MIT" ]
2
2020-06-26T11:03:53.000Z
2020-06-26T11:05:09.000Z
src/deoxys/experiment/postprocessor.py
huynhngoc/deoxys
b2e9936b723807e129fda36d8d6131ca00db558f
[ "MIT" ]
null
null
null
from ..loaders import load_data from ..utils import load_json_config from deoxys_image.patch_sliding import get_patch_indice from deoxys_vis import read_csv import numpy as np import h5py import pandas as pd import os from time import time import shutil import matplotlib.pyplot as plt import warnings class H5Metri...
39.041367
79
0.564518
from ..loaders import load_data from ..utils import load_json_config from deoxys_image.patch_sliding import get_patch_indice from deoxys_vis import read_csv import numpy as np import h5py import pandas as pd import os from time import time import shutil import matplotlib.pyplot as plt import warnings class H5Metri...
true
true
f753b844d20dee6aac1ef74f60536e4ea174625b
7,908
py
Python
backend/cb_ux_test_2_33170/settings.py
crowdbotics-apps/cb-ux-test-2-33170
3f06fb1e066ef7fc9406b12163c6c65c74bbbdde
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/cb_ux_test_2_33170/settings.py
crowdbotics-apps/cb-ux-test-2-33170
3f06fb1e066ef7fc9406b12163c6c65c74bbbdde
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/cb_ux_test_2_33170/settings.py
crowdbotics-apps/cb-ux-test-2-33170
3f06fb1e066ef7fc9406b12163c6c65c74bbbdde
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" Django settings for cb_ux_test_2_33170 project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ i...
30.415385
112
0.737102
import os import io import environ import logging import google.auth from google.cloud import secretmanager from google.auth.exceptions import DefaultCredentialsError from google.api_core.exceptions import PermissionDenied from modules.manifest import get_modules BASE_DIR = os.path.dirname(os.path.dirname(os.path.ab...
true
true
f753b8aae017e69acaad8b9ff66c5c717f126b43
405
py
Python
back-end/curso-em-video/python3/Mundo II/Desafios/46 - (Contagem Regressiva).py
gustavocamalionti/cursos-e-linguagens
615db91aff13db5678a783aac69df11231c925e8
[ "MIT" ]
null
null
null
back-end/curso-em-video/python3/Mundo II/Desafios/46 - (Contagem Regressiva).py
gustavocamalionti/cursos-e-linguagens
615db91aff13db5678a783aac69df11231c925e8
[ "MIT" ]
null
null
null
back-end/curso-em-video/python3/Mundo II/Desafios/46 - (Contagem Regressiva).py
gustavocamalionti/cursos-e-linguagens
615db91aff13db5678a783aac69df11231c925e8
[ "MIT" ]
null
null
null
#Desafio 046: Faça um programa que mostre na tela uma contagem regressiva para o estouro de fogos de artifício, indo de 10 até 0, com uma pausa de 1 segundo entre eles. from time import sleep import emoji print('10 SEGUNDO PARA A VIRADA DO ANO!!!') print('-=-'*20) for c in range(10, -1, -1): print(c) sleep(1)...
36.818182
168
0.716049
from time import sleep import emoji print('10 SEGUNDO PARA A VIRADA DO ANO!!!') print('-=-'*20) for c in range(10, -1, -1): print(c) sleep(1) print(emoji.emojize(':sparkles::sparkles::sparkles::sparkles:', use_aliases = True))
true
true
f753ba40c6e5ff06968e048b1109deeaf92a9d12
6,434
py
Python
send_to_pb/mail.py
ddobrinskiy/send-to-pb
bd3e1741691d7858224ff91fe44acc88142b47d6
[ "Apache-2.0" ]
null
null
null
send_to_pb/mail.py
ddobrinskiy/send-to-pb
bd3e1741691d7858224ff91fe44acc88142b47d6
[ "Apache-2.0" ]
null
null
null
send_to_pb/mail.py
ddobrinskiy/send-to-pb
bd3e1741691d7858224ff91fe44acc88142b47d6
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/01_mail.ipynb (unless otherwise specified). __all__ = ['MessageEncoded', 'SCOPES', 'Emailer'] # Cell from dataclasses import dataclass from typing import Optional import base64 import os import os.path import pathlib import pickle from email.mime.application import MIM...
33.863158
135
0.567299
__all__ = ['MessageEncoded', 'SCOPES', 'Emailer'] from dataclasses import dataclass from typing import Optional import base64 import os import os.path import pathlib import pickle from email.mime.application import MIMEApplication from email.mime.audio import MIMEAudio from email.mime.base import MIMEBase from ema...
true
true
f753ba564f59e0b49d1af4725c5f70be8c40eae2
3,398
py
Python
test/test_barstool.py
jorrinpollard/podcasts
d370ede187b99f5bc8bede8c77f3ebeb6581a909
[ "MIT" ]
1
2020-08-09T18:38:49.000Z
2020-08-09T18:38:49.000Z
test/test_barstool.py
jorrinpollard/podcasts
d370ede187b99f5bc8bede8c77f3ebeb6581a909
[ "MIT" ]
null
null
null
test/test_barstool.py
jorrinpollard/podcasts
d370ede187b99f5bc8bede8c77f3ebeb6581a909
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import os import sys import unittest cwd = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, cwd) from podcasts import Podcast source = os.path.join(cwd, "test", "fixtures", "barstool.xml") _copyrig...
52.276923
374
0.753973
from __future__ import division, absolute_import, print_function import os import sys import unittest cwd = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, cwd) from podcasts import Podcast source = os.path.join(cwd, "test", "fixtures", "barstool.xml") _copyright = "2019 Barstool S...
true
true
f753bc56b08cf8372adab1966f4ab4aea3373b35
2,366
py
Python
AS01/exercise3/sniffer.py
jakobudovic/NetworkSecurity2020
08e33a981493ad695a7c1a21f36cc37292253703
[ "MIT" ]
2
2020-05-02T21:02:40.000Z
2020-10-13T13:03:38.000Z
AS01/exercise3/sniffer.py
jakobudovic/NetworkSecurity2020
08e33a981493ad695a7c1a21f36cc37292253703
[ "MIT" ]
null
null
null
AS01/exercise3/sniffer.py
jakobudovic/NetworkSecurity2020
08e33a981493ad695a7c1a21f36cc37292253703
[ "MIT" ]
1
2020-10-13T13:03:42.000Z
2020-10-13T13:03:42.000Z
#!/usr/bin/env python3 import socket import struct import sys def parse_ip(packet): header_length_in_bytes = (packet[0] & 0x0F) * 4 # 0x0F == 00001111 header = packet[:header_length_in_bytes] # structs: https://docs.python.org/3.6/library/struct.html#module-struct _, totalLength, _, _, protocol, _, source, desti...
31.972973
110
0.653001
import socket import struct import sys def parse_ip(packet): header_length_in_bytes = (packet[0] & 0x0F) * 4 header = packet[:header_length_in_bytes] th, _, _, protocol, _, source, destination = struct.unpack_from("!HHLBBH4s4s", header, offset=0) sourceIP = socket.inet_ntoa(source) destIP = socket.inet_ntoa(...
true
true
f753bde1711e0265a477f9d97bd4c9e8739e7443
3,501
py
Python
bindings/python/ensmallen/datasets/string/nitrincolalacisaponensis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/nitrincolalacisaponensis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/nitrincolalacisaponensis.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Nitrincola lacisaponensis. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--prot...
33.342857
223
0.680377
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def NitrincolaLacisaponensis( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/...
true
true
f753bdf2556738be5caa339ea788b9c163fcd972
14,596
py
Python
ppocr/modeling/heads/det_sast_head.py
listofbanned/PaddleOCR
db923736855ff5288845b867d7bce5b46acc669c
[ "Apache-2.0" ]
null
null
null
ppocr/modeling/heads/det_sast_head.py
listofbanned/PaddleOCR
db923736855ff5288845b867d7bce5b46acc669c
[ "Apache-2.0" ]
null
null
null
ppocr/modeling/heads/det_sast_head.py
listofbanned/PaddleOCR
db923736855ff5288845b867d7bce5b46acc669c
[ "Apache-2.0" ]
null
null
null
#copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicable l...
33.248292
83
0.496369
from __future__ import absolute_import from __future__ import division from __future__ import print_function import paddle.fluid as fluid from ..common_functions import conv_bn_layer, deconv_bn_layer from collections import OrderedDict class SASTHead(object): def __init__(self, params): se...
true
true
f753be077f52292ae3b0e803edc360662e089c05
3,320
py
Python
summary_statistics/stat_tools.py
agladstein/SimPrily
ac1c77b61dbf003fb8e0331597ebdb3325769480
[ "MIT" ]
5
2017-09-12T21:33:45.000Z
2017-11-29T02:43:43.000Z
summary_statistics/stat_tools.py
agladstein/SimPrily_update
05caea299e2a48a7fe37be68e8b1619eaaa7ac5d
[ "MIT" ]
54
2017-09-06T18:19:01.000Z
2020-02-11T22:06:15.000Z
summary_statistics/stat_tools.py
agladstein/SimPrily_update
05caea299e2a48a7fe37be68e8b1619eaaa7ac5d
[ "MIT" ]
9
2017-09-12T19:55:08.000Z
2018-10-17T10:43:09.000Z
import sys if (sys.version_info > (3, 0)): import summary_statistics.afs_stats_bitarray as afs_stats_bitarray else: import afs_stats_bitarray def store_segregating_site_stats(seq_list, results, head_list): for seq in seq_list: if seq.type == 'discovery': current_res = afs_stats_bitarra...
43.116883
128
0.623795
import sys if (sys.version_info > (3, 0)): import summary_statistics.afs_stats_bitarray as afs_stats_bitarray else: import afs_stats_bitarray def store_segregating_site_stats(seq_list, results, head_list): for seq in seq_list: if seq.type == 'discovery': current_res = afs_stats_bitarra...
true
true
f753be65f098d096412cd859ef32ccd6ea35ac66
8,602
py
Python
main.py
PaulJulio/dna-pencil-holder
8de27bfa6274c9f82ccf8a94da99134418b97979
[ "CC0-1.0" ]
null
null
null
main.py
PaulJulio/dna-pencil-holder
8de27bfa6274c9f82ccf8a94da99134418b97979
[ "CC0-1.0" ]
null
null
null
main.py
PaulJulio/dna-pencil-holder
8de27bfa6274c9f82ccf8a94da99134418b97979
[ "CC0-1.0" ]
null
null
null
import math import os from solid import * """ The math for a helix comes from https://mathworld.wolfram.com/Helix.html x, y and z are coordinates in 3d space r is a constant and gives the radius of the helix t is where we are in a turn (in radians) and is thus a number from 0 to 2 * pi c is a constant defining the hei...
38.923077
119
0.699605
import math import os from solid import * HELIX_HEIGHT = 200 HELIX_PENCILS = 8 # rainbow colors HELIX_R = 50 # the pencils I'm using are ~180mm out of the box, so a 100mm diameter circle seems good to start with PENCIL_RADIUS = 5 SEGMENT_THICKNESS = 6 # how "thick" the helix should be TAB_THICKNESS = 2 # how t...
true
true
f753bfa1cd4203d25bdfbc8a4d04101d75e00e72
2,464
py
Python
fearquantlib/utils.py
jwlyn/fearquantlib
2701c3053096f9bc321d7224e00e58486cf979be
[ "Unlicense" ]
1
2020-02-16T23:58:00.000Z
2020-02-16T23:58:00.000Z
fearquantlib/utils.py
drunkpig/fearquantlib
5ed89176aec497bfa38b91fc4e7a316793ccb371
[ "Unlicense" ]
null
null
null
fearquantlib/utils.py
drunkpig/fearquantlib
5ed89176aec497bfa38b91fc4e7a316793ccb371
[ "Unlicense" ]
null
null
null
import hashlib from datetime import datetime, timedelta from tushare.util.dateu import trade_cal import talib ######################################################################################################################## # # # 无状态公共函数 # # # ##################################################################...
22
121
0.504058
import hashlib from datetime import datetime, timedelta from tushare.util.dateu import trade_cal import talib
true
true
f753c0699ca176986a73a60b3e467af2e45d2c75
34,012
py
Python
gdata/apps/emailsettings/data.py
gitdaniel228/realtor
4366d57b064be87b31c8a036b3ed7a99b2036461
[ "BSD-3-Clause" ]
null
null
null
gdata/apps/emailsettings/data.py
gitdaniel228/realtor
4366d57b064be87b31c8a036b3ed7a99b2036461
[ "BSD-3-Clause" ]
null
null
null
gdata/apps/emailsettings/data.py
gitdaniel228/realtor
4366d57b064be87b31c8a036b3ed7a99b2036461
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # # Copyright 2010 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 ...
30.072502
84
0.703193
__author__ = 'Claudio Cherubino <ccherubino@google.com>' import atom.data import gdata.apps import gdata.apps_property import gdata.data pyproperty = property # The apps:property label of the label property LABEL_NAME = 'label' # The apps:property from of the filter property FILTER_FROM_NAME ...
true
true
f753c10cc5b4c6ab7066719ad0503fd4b9fbbdd1
592
py
Python
misc_funcs.py
mak448a/discord-bot
f08fc9ac288df72d38cdfd45ce0469360da70975
[ "MIT" ]
null
null
null
misc_funcs.py
mak448a/discord-bot
f08fc9ac288df72d38cdfd45ce0469360da70975
[ "MIT" ]
null
null
null
misc_funcs.py
mak448a/discord-bot
f08fc9ac288df72d38cdfd45ce0469360da70975
[ "MIT" ]
null
null
null
import os import weather def help1(): """used to identify the intent help""" pass def hyperlink(): """ Used to identify the tag hyperlink""" pass async def ky_weather(message): url = os.environ['mistsupremacyspecialurl'] weather1 = weather.weather(url=url) await message.channel.send("Th...
23.68
101
0.697635
import os import weather def help1(): pass def hyperlink(): pass async def ky_weather(message): url = os.environ['mistsupremacyspecialurl'] weather1 = weather.weather(url=url) await message.channel.send("This weather is for the Mist Supremacy Special Members. " + weather1) return async de...
true
true
f753c141908cf0b318d35552d78046f7819ab7e6
1,555
py
Python
dvc/repo/checkout.py
GeorgeSabu-mec/dvc
1e22fabece0651278c652b8b9127a832a37341ca
[ "Apache-2.0" ]
1
2020-01-31T14:29:20.000Z
2020-01-31T14:29:20.000Z
dvc/repo/checkout.py
GeorgeSabu-mec/dvc
1e22fabece0651278c652b8b9127a832a37341ca
[ "Apache-2.0" ]
null
null
null
dvc/repo/checkout.py
GeorgeSabu-mec/dvc
1e22fabece0651278c652b8b9127a832a37341ca
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import logging from dvc.exceptions import CheckoutErrorSuggestGit, CheckoutError from dvc.progress import Tqdm logger = logging.getLogger(__name__) def _cleanup_unused_links(self, all_stages): used = [ out.fspath for stage in all_stages for out i...
26.810345
79
0.652733
from __future__ import unicode_literals import logging from dvc.exceptions import CheckoutErrorSuggestGit, CheckoutError from dvc.progress import Tqdm logger = logging.getLogger(__name__) def _cleanup_unused_links(self, all_stages): used = [ out.fspath for stage in all_stages for out i...
true
true
f753c1712a2f5c02b0006e3cbf79e23bac018a79
8,090
py
Python
test/functional/abc_wallet_standardness.py
ngocviet/lotusd
769802c5db7302aa1c23cf81cf42b2e861c45732
[ "MIT" ]
null
null
null
test/functional/abc_wallet_standardness.py
ngocviet/lotusd
769802c5db7302aa1c23cf81cf42b2e861c45732
[ "MIT" ]
null
null
null
test/functional/abc_wallet_standardness.py
ngocviet/lotusd
769802c5db7302aa1c23cf81cf42b2e861c45732
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the response of wallet to a variety of weird / nonstandard coins that it might try to spend.""" from decima...
41.06599
107
0.619654
from decimal import Decimal from test_framework.messages import ( CTransaction, CTxOut, FromHex, ToHex, ) from test_framework.script import ( CScript, OP_1, OP_5, OP_CHECKSIG, OP_CHECKMULTISIG, OP_DUP, OP_EQUALVERIFY, OP_HASH160, OP_PUSHDATA1, hash160, ) from...
true
true
f753c20a48aaf21455e5f3763f48d905f0f62816
135
py
Python
visuals/urls.py
mujeebishaque/visual-analytics
bbf5b34d336ca3498865cf357ca334b1fdd82879
[ "MIT" ]
null
null
null
visuals/urls.py
mujeebishaque/visual-analytics
bbf5b34d336ca3498865cf357ca334b1fdd82879
[ "MIT" ]
null
null
null
visuals/urls.py
mujeebishaque/visual-analytics
bbf5b34d336ca3498865cf357ca334b1fdd82879
[ "MIT" ]
null
null
null
from django.urls import path from visuals import views urlpatterns = [ path('index/', views.IndexView.as_view(), name='index'), ]
19.285714
60
0.711111
from django.urls import path from visuals import views urlpatterns = [ path('index/', views.IndexView.as_view(), name='index'), ]
true
true