hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f758f8bc4db7de0827f9ebcee736b38f0d05dcca
28,174
py
Python
pytorch_toolkit/nncf/tests/modules/test_rnn.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
3
2020-12-29T02:47:32.000Z
2021-11-12T08:12:51.000Z
pytorch_toolkit/nncf/tests/modules/test_rnn.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
23
2020-09-25T22:41:48.000Z
2021-12-13T20:43:37.000Z
pytorch_toolkit/nncf/tests/modules/test_rnn.py
morkovka1337/openvino_training_extensions
846db45c264d6b061505213f51763520b9432ba9
[ "Apache-2.0" ]
1
2021-03-12T10:08:44.000Z
2021-03-12T10:08:44.000Z
""" Copyright (c) 2019-2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
42.303303
120
0.599844
import logging import sys from collections import namedtuple from typing import List, Tuple import copy import onnx import os import pytest import torch import torch.nn.functional as F from functools import partial from torch import nn from torch.autograd import Variable from torch.nn.utils.rnn import PackedSequence ...
true
true
f758fa4eceda74da992e006bdec82dd5aa4c618f
976
py
Python
HDMI_splitter_mod/hdmi_funcs.py
LiamHowell/SmartCube
c782e5fd99caaca4ae32a66b1648eee9e3a3e4b3
[ "MIT" ]
null
null
null
HDMI_splitter_mod/hdmi_funcs.py
LiamHowell/SmartCube
c782e5fd99caaca4ae32a66b1648eee9e3a3e4b3
[ "MIT" ]
null
null
null
HDMI_splitter_mod/hdmi_funcs.py
LiamHowell/SmartCube
c782e5fd99caaca4ae32a66b1648eee9e3a3e4b3
[ "MIT" ]
null
null
null
from machine import Pin from time import sleep analog_switch = Pin(16,Pin.OUT, Pin.PULL_DOWN) led_status1 = Pin(15,Pin.IN,Pin.PULL_UP) led_status2 = Pin(14,Pin.IN,Pin.PULL_UP) led_status3 = Pin(13,Pin.IN,Pin.PULL_UP) def button_sim(): analog_switch.value(1) sleep(0.1) analog_switch.value(0) ...
24.4
80
0.535861
from machine import Pin from time import sleep analog_switch = Pin(16,Pin.OUT, Pin.PULL_DOWN) led_status1 = Pin(15,Pin.IN,Pin.PULL_UP) led_status2 = Pin(14,Pin.IN,Pin.PULL_UP) led_status3 = Pin(13,Pin.IN,Pin.PULL_UP) def button_sim(): analog_switch.value(1) sleep(0.1) analog_switch.value(0) ...
true
true
f758fb0f9c55439085f88f344f4a140e64de6cfd
2,154
py
Python
tests/test_working_set.py
Netflix-Skunkworks/service-capacity-modeling
563ed66e62c84f387a4c710e008a0d82479a6718
[ "Apache-2.0" ]
6
2021-06-24T21:32:35.000Z
2021-12-20T21:03:46.000Z
tests/test_working_set.py
Netflix-Skunkworks/service-capacity-modeling
563ed66e62c84f387a4c710e008a0d82479a6718
[ "Apache-2.0" ]
6
2021-06-30T23:05:04.000Z
2022-03-09T16:29:29.000Z
tests/test_working_set.py
Netflix-Skunkworks/service-capacity-modeling
563ed66e62c84f387a4c710e008a0d82479a6718
[ "Apache-2.0" ]
4
2021-06-26T19:27:16.000Z
2021-09-23T09:39:40.000Z
from service_capacity_modeling.hardware import shapes from service_capacity_modeling.interface import FixedInterval from service_capacity_modeling.models.common import WorkingSetEstimator from service_capacity_modeling.stats import dist_for_interval def test_working_set(): gp2_interval = shapes.region("us-east-1"...
33.65625
88
0.74559
from service_capacity_modeling.hardware import shapes from service_capacity_modeling.interface import FixedInterval from service_capacity_modeling.models.common import WorkingSetEstimator from service_capacity_modeling.stats import dist_for_interval def test_working_set(): gp2_interval = shapes.region("us-east-1"...
true
true
f758fb59ef350da8a22389ce6a7bc128caca591e
6,072
py
Python
bamboo/unit_tests/test_unit_layer_squared_difference.py
naoyam/lbann
d30e053b6f86d1cf8cca1d61c94bbbdbfc4945c4
[ "Apache-2.0" ]
null
null
null
bamboo/unit_tests/test_unit_layer_squared_difference.py
naoyam/lbann
d30e053b6f86d1cf8cca1d61c94bbbdbfc4945c4
[ "Apache-2.0" ]
66
2018-04-04T22:24:42.000Z
2020-10-23T01:50:34.000Z
bamboo/unit_tests/test_unit_layer_squared_difference.py
naoyam/lbann
d30e053b6f86d1cf8cca1d61c94bbbdbfc4945c4
[ "Apache-2.0" ]
null
null
null
import functools import operator import os import os.path import sys import numpy as np # Bamboo utilities current_file = os.path.realpath(__file__) current_dir = os.path.dirname(current_file) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python')) import tools # ==============================...
29.91133
85
0.554842
import functools import operator import os import os.path import sys import numpy as np current_file = os.path.realpath(__file__) current_dir = os.path.dirname(current_file) sys.path.insert(0, os.path.join(os.path.dirname(current_dir), 'common_python')) import tools np.random.seed(2019102415) _samples = np.random.no...
true
true
f758fb9ed2aeff189cd9b05a51af5cc32afddfa9
12,159
py
Python
mnemocards/builders/autogenerate_builder.py
Otter-man/mnemocards-for-play-books
421afadb6749ad590cc83aa81967b2f2ca1c0be8
[ "MIT" ]
1
2022-02-09T05:52:34.000Z
2022-02-09T05:52:34.000Z
mnemocards/builders/autogenerate_builder.py
Otter-man/mnemocards-for-play-books
421afadb6749ad590cc83aa81967b2f2ca1c0be8
[ "MIT" ]
null
null
null
mnemocards/builders/autogenerate_builder.py
Otter-man/mnemocards-for-play-books
421afadb6749ad590cc83aa81967b2f2ca1c0be8
[ "MIT" ]
null
null
null
import os import csv import genanki from gtts import gTTS from mnemocards import ASSETS_DIR from mnemocards.utils import get_hash_id, NoteID, generate_furigana from mnemocards.builders.vocabulary_builder import VocabularyBuilder from mnemocards.builders.vocabulary_builder import remove_parentheses, remove_spaces fr...
36.845455
88
0.484826
import os import csv import genanki from gtts import gTTS from mnemocards import ASSETS_DIR from mnemocards.utils import get_hash_id, NoteID, generate_furigana from mnemocards.builders.vocabulary_builder import VocabularyBuilder from mnemocards.builders.vocabulary_builder import remove_parentheses, remove_spaces fr...
true
true
f758fbcfa46ea83ba3598cf3af32bd5ea46d9d2d
3,477
py
Python
weasyl/test/web/test_characters.py
greysteil/wzl-test
0f863b9e7c58e5861437618bd590126ca323140c
[ "Apache-2.0" ]
null
null
null
weasyl/test/web/test_characters.py
greysteil/wzl-test
0f863b9e7c58e5861437618bd590126ca323140c
[ "Apache-2.0" ]
19
2018-01-02T07:27:22.000Z
2019-01-23T05:20:06.000Z
weasyl/test/web/test_characters.py
greysteil/wzl-test
0f863b9e7c58e5861437618bd590126ca323140c
[ "Apache-2.0" ]
null
null
null
# encoding: utf-8 from __future__ import absolute_import import os import pytest import webtest from io import BytesIO from PIL import Image from weasyl.macro import MACRO_APP_ROOT, MACRO_STORAGE_ROOT from weasyl.test import db_utils from weasyl.test.web.wsgi import app _BASE_FORM = { 'title': u'Test name', ...
30.769912
133
0.687662
from __future__ import absolute_import import os import pytest import webtest from io import BytesIO from PIL import Image from weasyl.macro import MACRO_APP_ROOT, MACRO_STORAGE_ROOT from weasyl.test import db_utils from weasyl.test.web.wsgi import app _BASE_FORM = { 'title': u'Test name', 'age': u'64021610...
true
true
f758fbcfcf9e44896ff47fb03d0a837814365758
8,057
py
Python
afqueue/source/manager_worker_manager.py
appfirst/distributed_queue_manager
733fd18a7c178e1163bac8ee6359156789641f7f
[ "MIT" ]
1
2021-05-24T17:09:50.000Z
2021-05-24T17:09:50.000Z
afqueue/source/manager_worker_manager.py
appfirst/distributed_queue_manager
733fd18a7c178e1163bac8ee6359156789641f7f
[ "MIT" ]
null
null
null
afqueue/source/manager_worker_manager.py
appfirst/distributed_queue_manager
733fd18a7c178e1163bac8ee6359156789641f7f
[ "MIT" ]
null
null
null
from afqueue.source.manager_worker import ManagerWorker #@UnresolvedImport from multiprocessing import Process, Queue #@UnresolvedImport from afqueue.common.exception_formatter import ExceptionFormatter #@UnresolvedImport from afqueue.messages import system_messages #@UnresolvedImport from afqueue.threads.data_worker_t...
40.898477
150
0.624302
from afqueue.source.manager_worker import ManagerWorker from multiprocessing import Process, Queue from afqueue.common.exception_formatter import ExceptionFormatter from afqueue.messages import system_messages from afqueue.threads.data_worker_thread import DataWorkerThread class ManagerWorkerManager(): def _...
true
true
f758fe14f7050858822719f28f847bf9568e6bca
5,026
py
Python
projects/adnet/mains/ADNet2.py
hizb-resume/LTD-local-track-to-detect-for-VID
7147ac7c6cd4b22a956aaaabaa151e5ed5410c68
[ "Apache-2.0" ]
1
2021-03-30T07:25:42.000Z
2021-03-30T07:25:42.000Z
projects/adnet/mains/ADNet2.py
hizb-resume/LTD-local-track-to-detect-for-VID
7147ac7c6cd4b22a956aaaabaa151e5ed5410c68
[ "Apache-2.0" ]
null
null
null
projects/adnet/mains/ADNet2.py
hizb-resume/LTD-local-track-to-detect-for-VID
7147ac7c6cd4b22a956aaaabaa151e5ed5410c68
[ "Apache-2.0" ]
null
null
null
import _init_paths import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) from trainers.adnet_train_sl import adnet_train_sl import argparse from options.general2 import opts from models.ADNet import adnet from utils.get_train_videos import get_train_videos from trainers.adnet_train_rl i...
52.905263
178
0.731397
import _init_paths import tensorflow as tf tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) from trainers.adnet_train_sl import adnet_train_sl import argparse from options.general2 import opts from models.ADNet import adnet from utils.get_train_videos import get_train_videos from trainers.adnet_train_rl i...
true
true
f758fe8965411e398cb138b4e9198f6c0c85dd73
25,924
py
Python
tacotron/models/tacotron.py
ruclion/Fantasy_Mix-Lingual_Tacotron_Version_7_NOVAE-Phoneme-HCSI-NOLID_DBMIX
baa4c8c3f3ba80acf68cec88aed53084a97c8aa1
[ "MIT" ]
null
null
null
tacotron/models/tacotron.py
ruclion/Fantasy_Mix-Lingual_Tacotron_Version_7_NOVAE-Phoneme-HCSI-NOLID_DBMIX
baa4c8c3f3ba80acf68cec88aed53084a97c8aa1
[ "MIT" ]
null
null
null
tacotron/models/tacotron.py
ruclion/Fantasy_Mix-Lingual_Tacotron_Version_7_NOVAE-Phoneme-HCSI-NOLID_DBMIX
baa4c8c3f3ba80acf68cec88aed53084a97c8aa1
[ "MIT" ]
null
null
null
import tensorflow as tf from tacotron.utils.symbols import symbols from tacotron.utils.symbols import tone_stress_symbols_max_no from tacotron.utils.symbols import symbols_tag from infolog import log from tacotron.models.helpers import TacoTrainingHelper, TacoTestHelper from tacotron.models.modules import * from tenso...
48.456075
194
0.740935
import tensorflow as tf from tacotron.utils.symbols import symbols from tacotron.utils.symbols import tone_stress_symbols_max_no from tacotron.utils.symbols import symbols_tag from infolog import log from tacotron.models.helpers import TacoTrainingHelper, TacoTestHelper from tacotron.models.modules import * from tenso...
true
true
f758ff1ed8465a30c33e686bc7316ad2bce2e837
3,309
py
Python
hw6.py
blthayer/ecen-667
cf609fa230b94e5b98af7afe554250a0824c2e11
[ "Apache-2.0" ]
null
null
null
hw6.py
blthayer/ecen-667
cf609fa230b94e5b98af7afe554250a0824c2e11
[ "Apache-2.0" ]
null
null
null
hw6.py
blthayer/ecen-667
cf609fa230b94e5b98af7afe554250a0824c2e11
[ "Apache-2.0" ]
null
null
null
import numpy as np def main(): p1() p2() p6() def p1(): # Do part 1. print('*' * 80) print('Problem 8.8, Part 1') a1 = np.array([ [3, 8], [2, 3] ]) _get_participation(a1) # Now part 2. print('*' * 80) print('Problem 8.8, Part 2') a2 = np.array([ ...
20.943038
79
0.515866
import numpy as np def main(): p1() p2() p6() def p1(): print('*' * 80) print('Problem 8.8, Part 1') a1 = np.array([ [3, 8], [2, 3] ]) _get_participation(a1) print('*' * 80) print('Problem 8.8, Part 2') a2 = np.array([ [1, 2, 1], ...
true
true
f758ff5c509a2d67554fb65700b48e70f3dd4b15
1,205
py
Python
python/ray/experimental/serve/examples/test.py
RehanSD/ray
48c801f1680bc9de5f80e7b86bc357669a8915d4
[ "Apache-2.0" ]
null
null
null
python/ray/experimental/serve/examples/test.py
RehanSD/ray
48c801f1680bc9de5f80e7b86bc357669a8915d4
[ "Apache-2.0" ]
null
null
null
python/ray/experimental/serve/examples/test.py
RehanSD/ray
48c801f1680bc9de5f80e7b86bc357669a8915d4
[ "Apache-2.0" ]
1
2019-03-26T01:57:26.000Z
2019-03-26T01:57:26.000Z
import ray import socket ray.init() import pickle import docker from contextlib import closing @ray.remote class Predictor(object): """Actor that adds deploys specified container. result = "Recieved " + input_batch. """ def __init__(self, container): with closing(socket.socket(socket.AF_INET, ...
29.390244
87
0.623237
import ray import socket ray.init() import pickle import docker from contextlib import closing @ray.remote class Predictor(object): def __init__(self, container): with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: s.bind(('', 0)) s.setsockopt(socket.SOL_SOCKET, so...
true
true
f758ff907acdcbe644ddb774e53b692314eff3bd
2,482
py
Python
kolibri/plugins/oidc_provider_plugin/management/commands/oidccreateclient.py
MikiasEphrem/kolibri
3a2356883278f79b4a7655a47c7fa6db70acc184
[ "MIT" ]
null
null
null
kolibri/plugins/oidc_provider_plugin/management/commands/oidccreateclient.py
MikiasEphrem/kolibri
3a2356883278f79b4a7655a47c7fa6db70acc184
[ "MIT" ]
null
null
null
kolibri/plugins/oidc_provider_plugin/management/commands/oidccreateclient.py
MikiasEphrem/kolibri
3a2356883278f79b4a7655a47c7fa6db70acc184
[ "MIT" ]
null
null
null
import binascii import logging import os from django.core.management.base import BaseCommand from oidc_provider.models import Client from oidc_provider.models import ResponseType logger = logging.getLogger(__name__) """ Usage example: kolibri manage oidccreateclient --name="hooooo" --redirect-uri="http://otro/callb...
32.657895
109
0.570105
import binascii import logging import os from django.core.management.base import BaseCommand from oidc_provider.models import Client from oidc_provider.models import ResponseType logger = logging.getLogger(__name__) class Command(BaseCommand): help = "Command to add new clients applications that will use kolib...
true
true
f758ffaa8b87ead02a9c8690331473ebf4bcd0a4
5,695
py
Python
tests/hazmat/primitives/test_block.py
glyph/cryptography
43cf688e885668198bc966b1cf3a4a425a60f1a6
[ "Apache-2.0" ]
1
2015-04-27T09:28:26.000Z
2015-04-27T09:28:26.000Z
tests/hazmat/primitives/test_block.py
glyph/cryptography
43cf688e885668198bc966b1cf3a4a425a60f1a6
[ "Apache-2.0" ]
4
2021-03-22T02:00:19.000Z
2021-04-07T07:40:19.000Z
tests/hazmat/primitives/test_block.py
majacQ/cryptography
add8bec357f09aba6609af16577111addec07ef7
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
29.661458
71
0.612116
from __future__ import absolute_import, division, print_function import binascii import pytest from cryptography import utils from cryptography.exceptions import ( UnsupportedAlgorithm, AlreadyFinalized, ) from cryptography.hazmat.primitives import interfaces from cryptography.hazmat.primitives.ciphers import (...
true
true
f758ffdbb0f0f8eece75cff9a26bf1a08e2ed18f
611
py
Python
examples/metric_logging.py
vishwanath1306/mltrace
73301e90e413f6d40beac6ef449f547c687cbb55
[ "Apache-2.0" ]
328
2021-04-26T17:22:12.000Z
2022-03-30T08:52:33.000Z
examples/metric_logging.py
vishwanath1306/mltrace
73301e90e413f6d40beac6ef449f547c687cbb55
[ "Apache-2.0" ]
94
2021-04-14T19:39:51.000Z
2022-03-26T00:43:46.000Z
examples/metric_logging.py
vishwanath1306/mltrace
73301e90e413f6d40beac6ef449f547c687cbb55
[ "Apache-2.0" ]
20
2021-05-10T15:24:27.000Z
2022-03-30T00:14:27.000Z
from mltrace import Task from sklearn.metrics import mean_squared_error import random import string task = Task("testing") def inference_component(output_id): task.logOutput(random.randint(0, 1), output_id) def feedback_component(output_id): task.logFeedback(random.randint(0, 1), output_id) if __name__ ...
20.366667
68
0.700491
from mltrace import Task from sklearn.metrics import mean_squared_error import random import string task = Task("testing") def inference_component(output_id): task.logOutput(random.randint(0, 1), output_id) def feedback_component(output_id): task.logFeedback(random.randint(0, 1), output_id) if __name__ ...
true
true
f7590034b86abfb57c17625666a551bb4c5d0c99
104
py
Python
paperbroker/adapters/quotes/__init__.py
yutiansut/paperbroker
3b4124ee79532d4b56b5fd5e864ed2ca1f4f857e
[ "MIT" ]
227
2017-07-14T19:10:04.000Z
2022-03-23T01:29:46.000Z
paperbroker/adapters/quotes/__init__.py
ajmal017/paperbroker
3b4124ee79532d4b56b5fd5e864ed2ca1f4f857e
[ "MIT" ]
7
2017-07-14T01:59:49.000Z
2021-05-19T06:10:55.000Z
paperbroker/adapters/quotes/__init__.py
ajmal017/paperbroker
3b4124ee79532d4b56b5fd5e864ed2ca1f4f857e
[ "MIT" ]
59
2017-07-15T06:55:56.000Z
2022-03-22T21:20:22.000Z
from .QuoteAdapter import QuoteAdapter from .GoogleFinanceQuoteAdapter import GoogleFinanceQuoteAdapter
34.666667
64
0.903846
from .QuoteAdapter import QuoteAdapter from .GoogleFinanceQuoteAdapter import GoogleFinanceQuoteAdapter
true
true
f759011e4a1139c1b1c561ab6c1f9687f4cf4833
5,193
py
Python
tests/sequence_labelling/utils/checkpoints_test.py
elifesciences/sciencebeam-trainer-delft
0f7da96cdf32acf1538a5fded192255158883ba0
[ "MIT" ]
5
2019-10-19T13:00:34.000Z
2022-01-16T17:31:42.000Z
tests/sequence_labelling/utils/checkpoints_test.py
elifesciences/sciencebeam-trainer-delft
0f7da96cdf32acf1538a5fded192255158883ba0
[ "MIT" ]
162
2019-08-22T10:28:46.000Z
2022-03-28T17:33:16.000Z
tests/sequence_labelling/utils/checkpoints_test.py
elifesciences/sciencebeam-trainer-delft
0f7da96cdf32acf1538a5fded192255158883ba0
[ "MIT" ]
null
null
null
import json from pathlib import Path import pytest from sciencebeam_trainer_delft.sequence_labelling.utils.checkpoints import ( CheckPoints, get_resume_train_model_params ) class TestCheckPoints: def test_should_raise_exception_without_log_dir(self): with pytest.raises(AssertionError): ...
34.390728
97
0.625265
import json from pathlib import Path import pytest from sciencebeam_trainer_delft.sequence_labelling.utils.checkpoints import ( CheckPoints, get_resume_train_model_params ) class TestCheckPoints: def test_should_raise_exception_without_log_dir(self): with pytest.raises(AssertionError): ...
true
true
f75903b6df28ebe8095e2069a5d0b14823768f8e
1,002
py
Python
toWebHtml/toWebHtmlMacro.py
p--q/toWebHtml
7baffaf62abc6319d0f315a523c9d1c2ba862b3d
[ "MIT" ]
null
null
null
toWebHtml/toWebHtmlMacro.py
p--q/toWebHtml
7baffaf62abc6319d0f315a523c9d1c2ba862b3d
[ "MIT" ]
null
null
null
toWebHtml/toWebHtmlMacro.py
p--q/toWebHtml
7baffaf62abc6319d0f315a523c9d1c2ba862b3d
[ "MIT" ]
null
null
null
# toWebHtmlMacro.py # -*- coding: utf-8 -*- # LibreOfficeのディスパッチコマンドでウェブブラウザに出力するマクロ。 from com.sun.star.beans import PropertyValue def toWebHtml(): desktop = XSCRIPTCONTEXT.getDesktop() # デスクトップを取得。 prop = PropertyValue(Name="Hidden",Value=True) # バックグラウンドで開く設定。 doc = desktop.loadComponentFromURL("privat...
55.666667
137
0.753493
from com.sun.star.beans import PropertyValue def toWebHtml(): desktop = XSCRIPTCONTEXT.getDesktop() prop = PropertyValue(Name="Hidden",Value=True) doc = desktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, (prop,)) doc.getText().setString("toWebHTML拡張機能から出力") frame = doc.getCurr...
true
true
f759046f47d67428a2a9785cee3b9c2ee68e963c
575
py
Python
newmu/data_utils.py
laputian/dml
d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff
[ "MIT" ]
null
null
null
newmu/data_utils.py
laputian/dml
d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff
[ "MIT" ]
null
null
null
newmu/data_utils.py
laputian/dml
d106f89567fa3dcdc304b5c6570fe1a69dd3c3ff
[ "MIT" ]
3
2016-10-25T23:09:40.000Z
2020-10-17T23:08:14.000Z
import cPickle as pickle def save_model(params, epoch = 0, annotation='', namestub = '', savepath = '../data/models/', test_score=0.0): savedFileName = namestub + '_' + str(epoch) + '_pars_' + annotation +'.pkl' gg = open(savepath + savedFileName, 'wb') pickle.dump(params, gg, protocol=pickle.HIGHEST_PRO...
38.333333
110
0.634783
import cPickle as pickle def save_model(params, epoch = 0, annotation='', namestub = '', savepath = '../data/models/', test_score=0.0): savedFileName = namestub + '_' + str(epoch) + '_pars_' + annotation +'.pkl' gg = open(savepath + savedFileName, 'wb') pickle.dump(params, gg, protocol=pickle.HIGHEST_PRO...
true
true
f759056ecd68c4ce98c31d4062e9ad3543a0db14
629
py
Python
introduction-to-data-visualization-in-python/4. Analyzing time series and images/script_1.py
nhutnamhcmus/datacamp-playground
25457e813b1145e1d335562286715eeddd1c1a7b
[ "MIT" ]
1
2021-05-08T11:09:27.000Z
2021-05-08T11:09:27.000Z
introduction-to-data-visualization-in-python/4. Analyzing time series and images/script_1.py
nhutnamhcmus/datacamp-playground
25457e813b1145e1d335562286715eeddd1c1a7b
[ "MIT" ]
1
2022-03-12T15:42:14.000Z
2022-03-12T15:42:14.000Z
introduction-to-data-visualization-in-python/4. Analyzing time series and images/script_1.py
nhutnamhcmus/datacamp-playground
25457e813b1145e1d335562286715eeddd1c1a7b
[ "MIT" ]
1
2021-04-30T18:24:19.000Z
2021-04-30T18:24:19.000Z
# Multiple time series on common axes # Import matplotlib.pyplot as plt import matplotlib.pyplot as plt # Plot the aapl time series in blue plt.plot(aapl, color='blue', label='AAPL') # Plot the ibm time series in green plt.plot(ibm, color='green', label='IBM') # Plot the csco time series in red plt.plot...
24.192308
50
0.701113
import matplotlib.pyplot as plt plt.plot(aapl, color='blue', label='AAPL') plt.plot(ibm, color='green', label='IBM') plt.plot(csco, color='red', label='CSCO') plt.plot(msft, color='magenta', label='MSFT') plt.legend(loc='upper left') plt.xticks(rotation=60) plt.show()
true
true
f75905e5832a118ff603dd400d86c2dcbe03a74b
888
py
Python
paas-ce/paas/esb/components/generic/templates/qcloud_sms/toolkit/configs.py
renmcc/bk-PaaS
1c9e4e9cfb40fc3375cd6b5f08af8c84203de246
[ "Apache-2.0" ]
767
2019-03-25T06:35:43.000Z
2022-03-30T08:57:51.000Z
paas-ce/paas/esb/components/generic/templates/qcloud_sms/toolkit/configs.py
renmcc/bk-PaaS
1c9e4e9cfb40fc3375cd6b5f08af8c84203de246
[ "Apache-2.0" ]
194
2019-03-29T07:16:41.000Z
2022-03-30T06:17:49.000Z
paas-ce/paas/esb/components/generic/templates/qcloud_sms/toolkit/configs.py
renmcc/bk-PaaS
1c9e4e9cfb40fc3375cd6b5f08af8c84203de246
[ "Apache-2.0" ]
381
2019-03-25T07:19:54.000Z
2022-03-29T03:22:42.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
46.736842
305
0.774775
from esb.utils import SmartHost SYSTEM_NAME = 'QCLOUD_SMS' host = SmartHost( host_prod='https://yun.tim.qq.com' ) default_nation_code = '86'
true
true
f759071c0f22a55808078a5530bb400e6beac4de
313
py
Python
python/divide_and_conquer/0241_different_ways_to_add_parentheses.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
6
2019-07-15T13:23:57.000Z
2020-01-22T03:12:01.000Z
python/divide_and_conquer/0241_different_ways_to_add_parentheses.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
null
null
null
python/divide_and_conquer/0241_different_ways_to_add_parentheses.py
linshaoyong/leetcode
ea052fad68a2fe0cbfa5469398508ec2b776654f
[ "MIT" ]
1
2019-07-24T02:15:31.000Z
2019-07-24T02:15:31.000Z
class Solution(object): def diffWaysToCompute(self, input): """ :type input: str :rtype: List[int] """ def test_diff_ways_to_compute(): s = Solution() assert [0, 2] == s.diffWaysToCompute("2-1-1") assert [-34, -14, -10, -10, 10] == s.diffWaysToCompute("2*3-4*5")
24.076923
69
0.5623
class Solution(object): def diffWaysToCompute(self, input): def test_diff_ways_to_compute(): s = Solution() assert [0, 2] == s.diffWaysToCompute("2-1-1") assert [-34, -14, -10, -10, 10] == s.diffWaysToCompute("2*3-4*5")
true
true
f7590a27c0e0eaa7b162a951cbf5e999c63c623a
12,897
py
Python
nsupdate/main/models.py
cyroxx/nsupdate.info
f963672c4284d958255518f2ef6a44820e9109b9
[ "BSD-3-Clause" ]
1
2020-09-06T09:29:57.000Z
2020-09-06T09:29:57.000Z
nsupdate/main/models.py
cyroxx/nsupdate.info
f963672c4284d958255518f2ef6a44820e9109b9
[ "BSD-3-Clause" ]
null
null
null
nsupdate/main/models.py
cyroxx/nsupdate.info
f963672c4284d958255518f2ef6a44820e9109b9
[ "BSD-3-Clause" ]
null
null
null
""" models for hosts, domains, service updaters, ... """ import re import base64 import dns.resolver from django.db import models from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.conf import settings from d...
39.683077
111
0.675894
import re import base64 import dns.resolver from django.db import models from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.conf import settings from django.db.models.signals import pre_delete from django.con...
true
true
f7590b2ba32bd8630ed1a49d47bac508dc27142c
2,205
py
Python
bind9/datadog_checks/bind9/bind9.py
gzussa/integrations-extras
cc93a01997befebc521fa1d3bc868efa80a793bd
[ "BSD-3-Clause" ]
null
null
null
bind9/datadog_checks/bind9/bind9.py
gzussa/integrations-extras
cc93a01997befebc521fa1d3bc868efa80a793bd
[ "BSD-3-Clause" ]
null
null
null
bind9/datadog_checks/bind9/bind9.py
gzussa/integrations-extras
cc93a01997befebc521fa1d3bc868efa80a793bd
[ "BSD-3-Clause" ]
1
2019-06-19T11:33:45.000Z
2019-06-19T11:33:45.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import xml.etree.ElementTree as ET from datetime import datetime import requests from datadog_checks.base import AgentCheck, ConfigurationError EPOCH = datetime(1970, 1, 1) class Bind9Check(AgentCheck): B...
35.564516
119
0.66712
import xml.etree.ElementTree as ET from datetime import datetime import requests from datadog_checks.base import AgentCheck, ConfigurationError EPOCH = datetime(1970, 1, 1) class Bind9Check(AgentCheck): BIND_SERVICE_CHECK = "bind9.can_connect" QUERY_ARRAY = ["opcode", "qtype", "nsstat", "zonestat", "ressta...
true
true
f7590b3ae66ed324b41bc7ab5468a73b5d157c4f
2,509
py
Python
api/licenses/views.py
DanielSBrown/osf.io
98dda2ac237377197acacce78274bc0a4ce8f303
[ "Apache-2.0" ]
1
2015-10-02T18:35:53.000Z
2015-10-02T18:35:53.000Z
api/licenses/views.py
DanielSBrown/osf.io
98dda2ac237377197acacce78274bc0a4ce8f303
[ "Apache-2.0" ]
4
2016-05-13T14:24:16.000Z
2017-03-30T15:28:31.000Z
api/licenses/views.py
DanielSBrown/osf.io
98dda2ac237377197acacce78274bc0a4ce8f303
[ "Apache-2.0" ]
null
null
null
from rest_framework import generics, permissions as drf_permissions from framework.auth.oauth_scopes import CoreScopes from api.base.filters import ODMFilterMixin from api.base import permissions as base_permissions from api.base.utils import get_object_or_error from api.licenses.serializers import LicenseSerializer f...
27.877778
101
0.671582
from rest_framework import generics, permissions as drf_permissions from framework.auth.oauth_scopes import CoreScopes from api.base.filters import ODMFilterMixin from api.base import permissions as base_permissions from api.base.utils import get_object_or_error from api.licenses.serializers import LicenseSerializer f...
true
true
f7590fe84aab60176d57630fe73cf260fd4c709d
11,773
py
Python
django/contrib/gis/tests/geo3d/tests.py
WoLpH/django
eabb44417ce1842007719b4b9378acca0e668b45
[ "BSD-3-Clause" ]
null
null
null
django/contrib/gis/tests/geo3d/tests.py
WoLpH/django
eabb44417ce1842007719b4b9378acca0e668b45
[ "BSD-3-Clause" ]
1
2016-02-19T00:22:18.000Z
2016-02-19T00:22:18.000Z
django/contrib/gis/tests/geo3d/tests.py
WoLpH/django
eabb44417ce1842007719b4b9378acca0e668b45
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, unicode_literals import os import re from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from django.test import TestCase from .mo...
43.765799
676
0.632379
from __future__ import absolute_import, unicode_literals import os import re from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from django.test import TestCase from .mo...
true
true
f75910ad124390e05f1bacb310de99a1e717f125
30
py
Python
scripts/dbseeder/tests/__init__.py
inkenbrandt/ugs-chemistry
50f45f9634e3b1ca55f7c128008ecaa6b4ee5abf
[ "MIT" ]
null
null
null
scripts/dbseeder/tests/__init__.py
inkenbrandt/ugs-chemistry
50f45f9634e3b1ca55f7c128008ecaa6b4ee5abf
[ "MIT" ]
null
null
null
scripts/dbseeder/tests/__init__.py
inkenbrandt/ugs-chemistry
50f45f9634e3b1ca55f7c128008ecaa6b4ee5abf
[ "MIT" ]
null
null
null
"""Test module for dbseeder"""
30
30
0.7
true
true
f75910eaf2108d78d8e46ab20746c6eba4f11449
1,694
py
Python
tools/html5lib/setup.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
4
2020-09-09T15:28:01.000Z
2021-12-01T00:59:56.000Z
tools/html5lib/setup.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2021-03-31T20:23:55.000Z
2021-03-31T20:23:55.000Z
tools/html5lib/setup.py
shs96c/web-platform-tests
61acad6dd9bb99d32340eb41f5146de64f542359
[ "BSD-3-Clause" ]
1
2021-04-06T20:06:58.000Z
2021-04-06T20:06:58.000Z
from distutils.core import setup import os import codecs classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Pyt...
37.644444
92
0.624557
from distutils.core import setup import os import codecs classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Pyt...
true
true
f759117f8a40fdb5db3d6b4ebcbc0b7287417960
7,232
py
Python
ohmysportsfeedspy/v1_0.py
alecglen/mysportsfeeds-python
b409ab4f565794e44304705003e21e3c4fdca1d2
[ "MIT" ]
null
null
null
ohmysportsfeedspy/v1_0.py
alecglen/mysportsfeeds-python
b409ab4f565794e44304705003e21e3c4fdca1d2
[ "MIT" ]
null
null
null
ohmysportsfeedspy/v1_0.py
alecglen/mysportsfeeds-python
b409ab4f565794e44304705003e21e3c4fdca1d2
[ "MIT" ]
null
null
null
import os import csv import requests from datetime import datetime import simplejson as json import platform import base64 import ohmysportsfeedspy # API class for dealing with v1.0 of the API class API_v1_0(object): # Constructor def __init__(self, verbose, store_type=None, store_location=None): se...
34.274882
159
0.569137
import os import csv import requests from datetime import datetime import simplejson as json import platform import base64 import ohmysportsfeedspy class API_v1_0(object): def __init__(self, verbose, store_type=None, store_location=None): self.base_url = "https://api.mysportsfeeds.com/v1.0/pull" ...
true
true
f75911f7cf9df446c348a36419d62fde9565d45c
32,063
py
Python
test_shaders.py
GoogleDepends/spirv-cross
01cee74b0200b5c3b4f886939a54012e51cb8d45
[ "Apache-2.0" ]
null
null
null
test_shaders.py
GoogleDepends/spirv-cross
01cee74b0200b5c3b4f886939a54012e51cb8d45
[ "Apache-2.0" ]
null
null
null
test_shaders.py
GoogleDepends/spirv-cross
01cee74b0200b5c3b4f886939a54012e51cb8d45
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2015-2020 Arm Limited # # 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 ...
38.817191
237
0.631631
import sys import os import os.path import subprocess import tempfile import re import itertools import hashlib import shutil import argparse import codecs import json import multiprocessing import errno from functools import partial class Paths(): def __init__(self, spirv_cross, glslang, spirv_as, spirv_val, sp...
true
true
f759126bf57c40e7d860d97165787f5f75ea77f5
1,113
py
Python
src/miptlabs/interpolators/interpolators.py
dimon58/miptlabs
538f6c410210a6e3405ca5b61dc7bc41d251cdf8
[ "MIT" ]
null
null
null
src/miptlabs/interpolators/interpolators.py
dimon58/miptlabs
538f6c410210a6e3405ca5b61dc7bc41d251cdf8
[ "MIT" ]
null
null
null
src/miptlabs/interpolators/interpolators.py
dimon58/miptlabs
538f6c410210a6e3405ca5b61dc7bc41d251cdf8
[ "MIT" ]
null
null
null
from numpy import linspace from scipy.interpolate import interp1d class Interpolator: """ Базовый класс интерполятора """ def __init__(self, points=100): self.points = points def interpolate(self, x, y): pass class Quadratic(Interpolator): """ Квдратичный интерполятор ...
23.680851
118
0.609164
from numpy import linspace from scipy.interpolate import interp1d class Interpolator: def __init__(self, points=100): self.points = points def interpolate(self, x, y): pass class Quadratic(Interpolator): def gen_x_axis(self, start, end): return linspace(start, end, self.points...
true
true
f75912a012e219b6ebd86772ed5a14e707ae5498
3,125
py
Python
source/Userdocs/NML2_examples/izhikevich-single-neuron.py
NeuroML/Documentation
06e355a8268c848b872b4e4c44d990b77b1fcb37
[ "CC-BY-4.0" ]
5
2020-09-28T20:47:04.000Z
2021-08-23T16:46:30.000Z
source/Userdocs/NML2_examples/izhikevich-single-neuron.py
NeuroML/Documentation
06e355a8268c848b872b4e4c44d990b77b1fcb37
[ "CC-BY-4.0" ]
86
2020-11-05T12:32:01.000Z
2022-03-30T22:45:00.000Z
source/Userdocs/NML2_examples/izhikevich-single-neuron.py
NeuroML/Documentation
06e355a8268c848b872b4e4c44d990b77b1fcb37
[ "CC-BY-4.0" ]
2
2021-08-23T16:46:34.000Z
2022-03-25T00:43:11.000Z
#!/usr/bin/env python3 """ Simulating a regular spiking Izhikevich neuron with NeuroML. File: izhikevich-single-neuron.py """ from neuroml import NeuroMLDocument from neuroml import Izhikevich2007Cell from neuroml import Population from neuroml import Network from neuroml import PulseGenerator from neuroml import Exp...
34.340659
80
0.74112
from neuroml import NeuroMLDocument from neuroml import Izhikevich2007Cell from neuroml import Population from neuroml import Network from neuroml import PulseGenerator from neuroml import ExplicitInput import neuroml.writers as writers from neuroml.utils import validate_neuroml2 from pyneuroml import pynml from pyneu...
true
true
f75912a0495a997cd2dec939ef5f75c91bee9d29
4,791
py
Python
src/fklearn/metrics/pd_extractors.py
WesleyBatista/fklearn
8e5b5e4575965c51c1416241a4ae2dc1d6679219
[ "Apache-2.0" ]
1
2021-02-25T19:31:31.000Z
2021-02-25T19:31:31.000Z
src/fklearn/metrics/pd_extractors.py
beblueapp/fklearn
7a606d246545de5ab68b2d9f38d0fdbeec6ca630
[ "Apache-2.0" ]
null
null
null
src/fklearn/metrics/pd_extractors.py
beblueapp/fklearn
7a606d246545de5ab68b2d9f38d0fdbeec6ca630
[ "Apache-2.0" ]
null
null
null
import collections from datetime import datetime from itertools import chain, repeat import pandas as pd from toolz import curry from numpy import nan @curry def evaluator_extractor(result, evaluator_name): metric_value = result[evaluator_name] if result else nan return pd.DataFrame({evaluator_name: [metric_...
34.970803
120
0.740764
import collections from datetime import datetime from itertools import chain, repeat import pandas as pd from toolz import curry from numpy import nan @curry def evaluator_extractor(result, evaluator_name): metric_value = result[evaluator_name] if result else nan return pd.DataFrame({evaluator_name: [metric_...
true
true
f7591434a92bd175d14ea639aa98b11124825217
35,389
py
Python
venv/lib/python3.9/site-packages/google/cloud/spanner_v1/proto/spanner_pb2_grpc.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.9/site-packages/google/cloud/spanner_v1/proto/spanner_pb2_grpc.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.9/site-packages/google/cloud/spanner_v1/proto/spanner_pb2_grpc.py
qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3
630dcef73e6a258b6e9a52f934e2dd912ce741f8
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from google.cloud.spanner_v1.proto import ( result_set_pb2 as google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2, ) from google.cloud.spanner_v1...
43.157317
138
0.694453
import grpc from google.cloud.spanner_v1.proto import ( result_set_pb2 as google_dot_cloud_dot_spanner__v1_dot_proto_dot_result__set__pb2, ) from google.cloud.spanner_v1.proto import ( spanner_pb2 as google_dot_cloud_dot_spanner__v1_dot_proto_dot_spanner__pb2, ) from google.cloud.spanner_v1.proto import ( ...
true
true
f7591457b101fc0db7e74e6440400554dd44cae4
10,245
py
Python
src/spaceone/inventory/manager/instance_group_manager.py
spaceone-dev/plugin-google-cloud-cloudservices
4566bfc54f4930801c47764eb7cfb1850038e9eb
[ "Apache-2.0" ]
2
2021-09-09T06:10:30.000Z
2021-09-09T06:44:02.000Z
src/spaceone/inventory/manager/instance_group_manager.py
spaceone-dev/plugin-google-cloud-cloudservices
4566bfc54f4930801c47764eb7cfb1850038e9eb
[ "Apache-2.0" ]
1
2021-12-10T03:39:19.000Z
2021-12-10T03:39:19.000Z
src/spaceone/inventory/manager/instance_group_manager.py
spaceone-dev/plugin-google-cloud-service-inven-collector
f193278f887518bf49003045a1c702ba4b871e40
[ "Apache-2.0" ]
4
2020-10-19T02:35:11.000Z
2021-07-15T08:00:36.000Z
import time import logging from spaceone.inventory.libs.manager import GoogleCloudManager from spaceone.inventory.libs.schema.base import ReferenceModel from spaceone.inventory.connector.instance_group import InstanceGroupConnector from spaceone.inventory.model.instance_group.data import * from spaceone.inventory.mode...
41.987705
216
0.623621
import time import logging from spaceone.inventory.libs.manager import GoogleCloudManager from spaceone.inventory.libs.schema.base import ReferenceModel from spaceone.inventory.connector.instance_group import InstanceGroupConnector from spaceone.inventory.model.instance_group.data import * from spaceone.inventory.mode...
true
true
f7591748168f4b1662ff8b3c68b73dca1a4914e9
1,791
py
Python
app/config/setting.py
zcxyun/snack-api-lin
7b728c583f5467fcfffaf30ccf75c3e5ffefb7e5
[ "MIT" ]
1
2020-02-03T18:39:33.000Z
2020-02-03T18:39:33.000Z
app/config/setting.py
zcxyun/snack-api-lin
7b728c583f5467fcfffaf30ccf75c3e5ffefb7e5
[ "MIT" ]
null
null
null
app/config/setting.py
zcxyun/snack-api-lin
7b728c583f5467fcfffaf30ccf75c3e5ffefb7e5
[ "MIT" ]
null
null
null
""" :copyright: © 2019 by the Lin team. :license: MIT, see LICENSE for more details. """ from datetime import timedelta class BaseConfig(object): """ 基础配置 """ # 分页配置 COUNT_DEFAULT = 10 PAGE_DEFAULT = 0 PAY_COUNTDOWN = 1800 # 单位秒 # 屏蔽 sql alchemy 的 FSADeprecationWarning ...
28.887097
111
0.586265
from datetime import timedelta class BaseConfig(object): COUNT_DEFAULT = 10 PAGE_DEFAULT = 0 PAY_COUNTDOWN = 1800 SQLALCHEMY_TRACK_MODIFICATIONS = False class DevelopmentConfig(BaseConfig): DEBUG = True SITE_DOMAIN = 'http://localhost:5000' JWT_ACCESS_TOKEN_EXPIRES = t...
true
true
f7591761523dc38f4a2946663b1ecfe9a56b02aa
3,382
py
Python
tests/system/reserves/balance/test_regulation_up.py
souissim/gridpath
4eeca2be24b485edc56026e38cfda83f4a6b27ea
[ "Apache-2.0" ]
null
null
null
tests/system/reserves/balance/test_regulation_up.py
souissim/gridpath
4eeca2be24b485edc56026e38cfda83f4a6b27ea
[ "Apache-2.0" ]
null
null
null
tests/system/reserves/balance/test_regulation_up.py
souissim/gridpath
4eeca2be24b485edc56026e38cfda83f4a6b27ea
[ "Apache-2.0" ]
1
2021-12-21T20:44:21.000Z
2021-12-21T20:44:21.000Z
# Copyright 2016-2020 Blue Marble Analytics 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 ag...
31.027523
87
0.683619
from __future__ import print_function from builtins import str from collections import OrderedDict from importlib import import_module import os.path import sys import unittest from tests.common_functions import create_abstract_model, add_components_and_load_data TEST_DATA_DIRECTORY = os.path.join( os.path.dirn...
true
true
f75917eb5da6ea1b4bbb402d9b0d01e49c3438bd
41,858
py
Python
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/contrib/timeseries/python/timeseries/input_pipeline.py
JustinACoder/H22-GR3-UnrealAI
361eb9ef1147f8a2991e5f98c4118cd823184adf
[ "MIT" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/contrib/timeseries/python/timeseries/input_pipeline.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/contrib/timeseries/python/timeseries/input_pipeline.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
48.279123
81
0.703904
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import numpy from tensorflow.contrib.timeseries.python.timeseries import feature_keys from tensorflow.contrib.timeseries.python.timeseries import model_utils from tensorflow.python.es...
true
true
f7591892a21c17f2024fa7e993cd4a2d0221fef7
4,016
py
Python
tests/test_manage.py
james-portman/openstack-ansible
882d98c94b6e429dec9d66d26722ed457e3b18b9
[ "Apache-2.0" ]
null
null
null
tests/test_manage.py
james-portman/openstack-ansible
882d98c94b6e429dec9d66d26722ed457e3b18b9
[ "Apache-2.0" ]
null
null
null
tests/test_manage.py
james-portman/openstack-ansible
882d98c94b6e429dec9d66d26722ed457e3b18b9
[ "Apache-2.0" ]
1
2018-05-21T18:41:51.000Z
2018-05-21T18:41:51.000Z
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
31.622047
75
0.668327
import os from os import path import test_inventory import unittest TARGET_DIR = path.join(os.getcwd(), 'tests', 'inventory') from osa_toolkit import manage as mi def setUpModule(): test_inventory.make_config() def tearDownModule(): os.remove(test_inventory.USER_CONFIG_FILE) class TestExportFunction(u...
true
true
f7591953c4ef243e50c8ba0b0d8821b5d4bf15d7
1,501
py
Python
lib/sqlalchemy_json_querybuilder/commons/error_handlers/errors/errors.py
suyash248/sqlalchemy-json-querybuilder
3deefd8935ce49c484a4936a751e9ccb5eb574a6
[ "MIT" ]
32
2018-06-21T17:07:57.000Z
2021-11-29T14:04:40.000Z
lib/sqlalchemy_json_querybuilder/commons/error_handlers/errors/errors.py
suyash248/sqlalchemy-json-querybuilder
3deefd8935ce49c484a4936a751e9ccb5eb574a6
[ "MIT" ]
null
null
null
lib/sqlalchemy_json_querybuilder/commons/error_handlers/errors/errors.py
suyash248/sqlalchemy-json-querybuilder
3deefd8935ce49c484a4936a751e9ccb5eb574a6
[ "MIT" ]
10
2018-12-11T10:00:16.000Z
2022-02-12T14:07:31.000Z
__author__ = "Suyash Soni" __email__ = "suyash.soni248@gmail.com" import itertools from ....constants.error_codes import DBErrorCode class Error(object): """ Every time error needs to thrown, instance of this class must be used to represent an error. """ def __init__(self, error_constant, *fields, mes...
35.738095
114
0.666889
__author__ = "Suyash Soni" __email__ = "suyash.soni248@gmail.com" import itertools from ....constants.error_codes import DBErrorCode class Error(object): def __init__(self, error_constant, *fields, message=None): self.error_constant = error_constant or DBErrorCode.NON_STANDARD_ERROR self.fields = ...
true
true
f7591962c5ffd27143d1940fa0da54879476773d
269
py
Python
accountifie/celery/views.py
imcallister/accountifie
094834c9d632e0353e3baf8d924eeb10cba0add4
[ "MIT", "Unlicense" ]
4
2017-06-02T08:48:48.000Z
2021-11-21T23:57:15.000Z
accountifie/celery/views.py
imcallister/accountifie
094834c9d632e0353e3baf8d924eeb10cba0add4
[ "MIT", "Unlicense" ]
3
2020-06-05T16:55:42.000Z
2021-06-10T17:43:12.000Z
accountifie/celery/views.py
imcallister/accountifie
094834c9d632e0353e3baf8d924eeb10cba0add4
[ "MIT", "Unlicense" ]
4
2015-12-15T14:27:51.000Z
2017-04-21T21:42:27.000Z
from django.shortcuts import render from django.contrib.auth.decorators import login_required from .apiv1 import tasks_in_progress from django.http import JsonResponse @login_required def tasks_list(request): return JsonResponse(tasks_in_progress(), safe=False)
24.454545
57
0.832714
from django.shortcuts import render from django.contrib.auth.decorators import login_required from .apiv1 import tasks_in_progress from django.http import JsonResponse @login_required def tasks_list(request): return JsonResponse(tasks_in_progress(), safe=False)
true
true
f75919958c10b872944d86660502ba1311a32886
282
py
Python
formidable/json_migrations/0004_add_conditions.py
jayvdb/django-formidable
df8bcd0c882990d72d302be47aeb4fb11915b1fa
[ "MIT" ]
11
2018-02-14T08:15:23.000Z
2021-09-10T02:16:38.000Z
formidable/json_migrations/0004_add_conditions.py
jayvdb/django-formidable
df8bcd0c882990d72d302be47aeb4fb11915b1fa
[ "MIT" ]
61
2017-11-27T10:15:43.000Z
2021-06-28T14:17:25.000Z
formidable/json_migrations/0004_add_conditions.py
jayvdb/django-formidable
df8bcd0c882990d72d302be47aeb4fb11915b1fa
[ "MIT" ]
2
2019-04-06T11:17:05.000Z
2020-10-10T08:36:27.000Z
""" Add conditions as an empty list if it doesn't exist in the form. This JSON migration is related to: * 0004_formidable_conditions * 0005_conditions_default """ def migrate(data): if 'conditions' not in data: data.setdefault('conditions', []) return data
17.625
64
0.695035
def migrate(data): if 'conditions' not in data: data.setdefault('conditions', []) return data
true
true
f7591abbaf171162c6d33b5a18b59a643bc0bff3
1,002
py
Python
monitoring_system/drivers/sensors/SwitchSensor.py
NesterukSergey/Rpi_monitoring_study
a2e9431232ea59757b53dcbfdccf998178ed6264
[ "MIT" ]
null
null
null
monitoring_system/drivers/sensors/SwitchSensor.py
NesterukSergey/Rpi_monitoring_study
a2e9431232ea59757b53dcbfdccf998178ed6264
[ "MIT" ]
null
null
null
monitoring_system/drivers/sensors/SwitchSensor.py
NesterukSergey/Rpi_monitoring_study
a2e9431232ea59757b53dcbfdccf998178ed6264
[ "MIT" ]
null
null
null
import time from monitoring_system.drivers.sensors.Sensor import Sensor class SwitchSensor(Sensor): def __init__(self, **kwargs): super().__init__(**kwargs) self.__dict__.update(kwargs) self.pin = self._get_wpi_pin(self.pin) self._register_pins([], [self.pin]) if kwargs['...
22.772727
59
0.547904
import time from monitoring_system.drivers.sensors.Sensor import Sensor class SwitchSensor(Sensor): def __init__(self, **kwargs): super().__init__(**kwargs) self.__dict__.update(kwargs) self.pin = self._get_wpi_pin(self.pin) self._register_pins([], [self.pin]) if kwargs['...
true
true
f7591cb48ad0f5e32261c5167d7739b9af5bdf14
392
py
Python
services/admin.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
null
null
null
services/admin.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
8
2021-03-30T13:03:11.000Z
2022-03-12T00:20:13.000Z
services/admin.py
shakyasaijal/businessAnalytics
9312bae79709387c6eadd50f87f6be85bd52c396
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from django.contrib.admin import AdminSite from . import models class SuperAdmin(AdminSite): site_header = "Saijal Shakya" site_title = "Super Admin" index_title = "Super Admin - Saijal Shakya" super_admin_site = SuperAdmin(name='super_admin') super_admin_site.register(...
26.133333
51
0.790816
from django.contrib import admin from django.contrib.admin import AdminSite from . import models class SuperAdmin(AdminSite): site_header = "Saijal Shakya" site_title = "Super Admin" index_title = "Super Admin - Saijal Shakya" super_admin_site = SuperAdmin(name='super_admin') super_admin_site.register(...
true
true
f7591cfe92c943c187f5bced7c5e186a9bf85943
1,446
py
Python
tools/mo/openvino/tools/mo/ops/constant_fill.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
1,127
2018-10-15T14:36:58.000Z
2020-04-20T09:29:44.000Z
tools/mo/openvino/tools/mo/ops/constant_fill.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
439
2018-10-20T04:40:35.000Z
2020-04-19T05:56:25.000Z
tools/mo/openvino/tools/mo/ops/constant_fill.py
ryanloney/openvino-1
4e0a740eb3ee31062ba0df88fcf438564f67edb7
[ "Apache-2.0" ]
414
2018-10-17T05:53:46.000Z
2020-04-16T17:29:53.000Z
# Copyright (C) 2018-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import numpy as np from openvino.tools.mo.front.common.partial_infer.utils import is_fully_defined from openvino.tools.mo.graph.graph import Node, Graph from openvino.tools.mo.ops.op import Op class ConstantFill(Op): """ Constant ...
28.92
88
0.62379
import numpy as np from openvino.tools.mo.front.common.partial_infer.utils import is_fully_defined from openvino.tools.mo.graph.graph import Node, Graph from openvino.tools.mo.ops.op import Op class ConstantFill(Op): op = 'ConstantFill' enabled = False def __init__(self, graph: Graph, attrs: dict): ...
true
true
f7591d0afa92a19e84cc879517b1332811bc0776
639
py
Python
leetcode/[cutz][2darray.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
3
2019-11-26T14:31:01.000Z
2020-01-10T18:19:46.000Z
leetcode/[cutz][2darray.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
null
null
null
leetcode/[cutz][2darray.py
cutz-j/AlgorithmStudy
de0f81220e29bd5e109d174800f507b12a3bee36
[ "MIT" ]
null
null
null
class Solution: def searchMatrix(self, matrix, target) -> bool: """ :type matrix: List[List[int]] :type target: int :rtype: bool """ if not matrix: return False row = 0 col = len(matrix[0]) - 1 while row <= len(matrix) - 1 and col...
23.666667
52
0.471049
class Solution: def searchMatrix(self, matrix, target) -> bool: if not matrix: return False row = 0 col = len(matrix[0]) - 1 while row <= len(matrix) - 1 and col >= 0: if target == matrix[row][col]: return True elif target < matr...
true
true
f7591d2dd1ab1d40e364386d56a8e899396c6cfa
7,787
py
Python
src/data.py
ebrunet28/MultiDecoder-DPRNN
36fd6c35e730379e4f676a25eac451409a01f068
[ "MIT" ]
8
2021-01-22T07:33:55.000Z
2022-01-14T03:11:55.000Z
src/data.py
ebrunet28/MultiDecoder-DPRNN
36fd6c35e730379e4f676a25eac451409a01f068
[ "MIT" ]
null
null
null
src/data.py
ebrunet28/MultiDecoder-DPRNN
36fd6c35e730379e4f676a25eac451409a01f068
[ "MIT" ]
4
2021-02-28T13:30:21.000Z
2022-03-28T12:47:08.000Z
""" Dataset classes for variable number of speakers Author: Junzhe Zhu """ import numpy as np import torch import torch.utils.data as data from librosa import load from time import time import glob import os import random import json from tqdm import tqdm def load_json(filename): with open(filename) as f: d...
44.752874
160
0.608835
import numpy as np import torch import torch.utils.data as data from librosa import load from time import time import glob import os import random import json from tqdm import tqdm def load_json(filename): with open(filename) as f: data = json.load(f) return data def pad_audio(audio, len_samples=4*8000...
true
true
f7591dc4084c8670976a18a99a469cf80c44bd41
7,143
py
Python
kikimr/public/api/grpc/ydb_rate_limiter_v1_pb2_grpc.py
MihanixA/ydb-python-sdk
d1b93c6d2409a87c350acd604915576891d1e4f3
[ "Apache-2.0" ]
19
2019-07-01T08:25:29.000Z
2022-01-26T14:46:51.000Z
kikimr/public/api/grpc/ydb_rate_limiter_v1_pb2_grpc.py
MihanixA/ydb-python-sdk
d1b93c6d2409a87c350acd604915576891d1e4f3
[ "Apache-2.0" ]
5
2019-07-02T13:36:42.000Z
2021-09-14T06:46:48.000Z
kikimr/public/api/grpc/ydb_rate_limiter_v1_pb2_grpc.py
MihanixA/ydb-python-sdk
d1b93c6d2409a87c350acd604915576891d1e4f3
[ "Apache-2.0" ]
10
2019-06-07T10:36:19.000Z
2021-10-15T08:58:11.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from kikimr.public.api.protos import ydb_rate_limiter_pb2 as kikimr_dot_public_dot_api_dot_protos_dot_ydb__rate__limiter__pb2 class RateLimiterServiceStub(object): """Service that implements distributed rate limiting. To use rate l...
51.76087
138
0.801764
import grpc from kikimr.public.api.protos import ydb_rate_limiter_pb2 as kikimr_dot_public_dot_api_dot_protos_dot_ydb__rate__limiter__pb2 class RateLimiterServiceStub(object): def __init__(self, channel): self.CreateResource = channel.unary_unary( '/Ydb.RateLimiter.V1.RateLimiterService/CreateResource...
true
true
f7591e2bcfc6581618fc921d0934663aa46466ea
782
py
Python
table_test.py
strickyak/aphid
12469858facdc9d7f110bf6c895e58eae9fb728f
[ "MIT" ]
2
2015-05-25T10:47:30.000Z
2017-12-12T18:15:00.000Z
table_test.py
strickyak/aphid
12469858facdc9d7f110bf6c895e58eae9fb728f
[ "MIT" ]
null
null
null
table_test.py
strickyak/aphid
12469858facdc9d7f110bf6c895e58eae9fb728f
[ "MIT" ]
null
null
null
from go import os from go import path.filepath as F import table D ='/tmp/_aphid_test_skiplist_' try: os.RemoveAll(D) except: pass os.Mkdir(D, 0777) fd = os.Create(F.Join(D, 't.001')) print >>fd, ''' # comment +0012345.0{tab}color{tab}red +0012345.0{tab}flavor{tab}lime +0012345.0{tab}size{tab}XL ; # overrides +...
17.377778
34
0.64578
from go import os from go import path.filepath as F import table D ='/tmp/_aphid_test_skiplist_' try: os.RemoveAll(D) except: pass os.Mkdir(D, 0777) fd = os.Create(F.Join(D, 't.001')) print >>fd, ''' # comment +0012345.0{tab}color{tab}red +0012345.0{tab}flavor{tab}lime +0012345.0{tab}size{tab}XL ; # overrides +...
false
true
f7591f3007635998eb3363d2f9950511d4f005a6
79
py
Python
ipydatawidgets/_version.py
consideRatio/ipydatawidgets
69eebeb5647d58dec6bf459d424727cb23cce8ab
[ "BSD-3-Clause" ]
null
null
null
ipydatawidgets/_version.py
consideRatio/ipydatawidgets
69eebeb5647d58dec6bf459d424727cb23cce8ab
[ "BSD-3-Clause" ]
null
null
null
ipydatawidgets/_version.py
consideRatio/ipydatawidgets
69eebeb5647d58dec6bf459d424727cb23cce8ab
[ "BSD-3-Clause" ]
null
null
null
version_info = (4, 0, 2, 'dev') __version__ = ".".join(map(str, version_info))
26.333333
46
0.64557
version_info = (4, 0, 2, 'dev') __version__ = ".".join(map(str, version_info))
true
true
f7591fd0d94d81b88f6d864222d4cf7328876f62
2,277
py
Python
SimpleCV/examples/temp_feature_redux.py
shackenberg/SimpleCV
1abca589757dd643bb4f3628246f4f01e5b649d3
[ "BSD-3-Clause" ]
2
2016-04-30T12:23:05.000Z
2022-03-02T00:01:10.000Z
SimpleCV/examples/temp_feature_redux.py
shackenberg/SimpleCV
1abca589757dd643bb4f3628246f4f01e5b649d3
[ "BSD-3-Clause" ]
null
null
null
SimpleCV/examples/temp_feature_redux.py
shackenberg/SimpleCV
1abca589757dd643bb4f3628246f4f01e5b649d3
[ "BSD-3-Clause" ]
null
null
null
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. img = Image("./SimpleCV/sampleimages/containment_test.png") b = img.findBlobs() l = img.findLines() c = img.findCorners() cr = img...
28.4625
76
0.697409
;; This buffer is for notes you don't want to save, and for Lisp evaluation. ;; If you want to create a file, visit that file with C-x C-f, ;; then enter the text in that file's own buffer. img = Image("./SimpleCV/sampleimages/containment_test.png") b = img.findBlobs() l = img.findLines() c = img.findCorners() cr = img...
false
true
f75920b0cb1a9cfe40c792b2b99724d0a01761a7
1,834
py
Python
src/homework4/q6/get_state.py
skymarshal/cs229-machine-learning-stanford-fall-2016
3f9e0f4ea7d4fe73a50dc12c84fe47131bb0622a
[ "Apache-2.0", "MIT" ]
13
2019-08-22T03:15:36.000Z
2021-06-29T15:50:34.000Z
src/homework4/q6/get_state.py
skymarshal/cs229-machine-learning-stanford-fall-2016
3f9e0f4ea7d4fe73a50dc12c84fe47131bb0622a
[ "Apache-2.0", "MIT" ]
null
null
null
src/homework4/q6/get_state.py
skymarshal/cs229-machine-learning-stanford-fall-2016
3f9e0f4ea7d4fe73a50dc12c84fe47131bb0622a
[ "Apache-2.0", "MIT" ]
8
2019-09-29T13:12:20.000Z
2020-10-21T14:15:31.000Z
import numpy as np def get_state(x, x_dot, theta, theta_dot): """ This function returns a discretized value (a number) for a continuous state vector. Currently x is divided into 3 "boxes", x_dot into 3, theta into 6 and theta_dot into 3. A finer discretization produces a larger state space, but al...
27.787879
88
0.533261
import numpy as np def get_state(x, x_dot, theta, theta_dot): one_degree = 0.0174532 six_degrees = 0.1047192 twelve_degrees = 0.2094384 fifty_degrees = 0.87266 total_states = 163 state = 0 if (x < -2.4) or (x > 2.4) or (theta < -twelve_degrees) or (theta > twelve_degrees): ...
true
true
f75920cf6c67e18ab9c30ef2ef86987b3db9a0e4
1,654
py
Python
huaweicloud-sdk-eip/setup.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-eip/setup.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-eip/setup.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkeip" VERSION = "3.0.67" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" DESCRIPTION = "EIP" this_directory = path.abspath(path.dirna...
29.535714
78
0.646917
from os import path from setuptools import setup, find_packages NAME = "huaweicloudsdkeip" VERSION = "3.0.67" AUTHOR = "HuaweiCloud SDK" AUTHOR_EMAIL = "hwcloudsdk@huawei.com" URL = "https://github.com/huaweicloud/huaweicloud-sdk-python-v3" DESCRIPTION = "EIP" this_directory = path.abspath(path.dirname(__file__)) wi...
true
true
f759237b10317231c65c1210a95783df20e04568
4,997
py
Python
numba/cuda/libdevice.py
ludaavics/numba
d630c1cc7f261365aa92f6e3437abaaa185d8482
[ "BSD-2-Clause" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
numba/cuda/libdevice.py
ludaavics/numba
d630c1cc7f261365aa92f6e3437abaaa185d8482
[ "BSD-2-Clause" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
numba/cuda/libdevice.py
ludaavics/numba
d630c1cc7f261365aa92f6e3437abaaa185d8482
[ "BSD-2-Clause" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import sys import math from llvmlite.llvmpy.core import Type from numba.core import types, cgutils from numba.core.imputils import Registry registry = Registry() lower = registry.lower float_set = types.float32, types.float64 def bool_implement(nvname, ty): def core(context, builder, sig, args): assert ...
34.701389
73
0.656994
import sys import math from llvmlite.llvmpy.core import Type from numba.core import types, cgutils from numba.core.imputils import Registry registry = Registry() lower = registry.lower float_set = types.float32, types.float64 def bool_implement(nvname, ty): def core(context, builder, sig, args): assert ...
true
true
f75923f19b8cd05235693c207cf8041571630b6e
609
py
Python
tests/integration/util.py
jaipradeesh/plaid-python
fbd9d980c05caa1c852781ddfa5f46a102868262
[ "MIT" ]
null
null
null
tests/integration/util.py
jaipradeesh/plaid-python
fbd9d980c05caa1c852781ddfa5f46a102868262
[ "MIT" ]
null
null
null
tests/integration/util.py
jaipradeesh/plaid-python
fbd9d980c05caa1c852781ddfa5f46a102868262
[ "MIT" ]
null
null
null
'''Shared objects for integration testing.''' import os from plaid import Client def create_client(): '''Create a new client for testing.''' return Client(os.environ['CLIENT_ID'], os.environ['SECRET'], os.environ['PUBLIC_KEY'], 'sandbox', ...
21.75
55
0.599343
import os from plaid import Client def create_client(): return Client(os.environ['CLIENT_ID'], os.environ['SECRET'], os.environ['PUBLIC_KEY'], 'sandbox', api_version="2019-05-29", client_app="plaid-python-unit-tests") SA...
true
true
f75924674e680dcd9f953cc9b579afb4c07b6a8c
5,892
py
Python
path_prediction/utils/process_file_trajnetplusplus.py
cimat-ris/OF-PathPred
85ca275707e5988491d0a510b9d31883824411db
[ "Apache-2.0" ]
1
2020-02-20T16:24:28.000Z
2020-02-20T16:24:28.000Z
path_prediction/utils/process_file_trajnetplusplus.py
cimat-ris/OF-PathPred
85ca275707e5988491d0a510b9d31883824411db
[ "Apache-2.0" ]
2
2020-04-11T16:27:22.000Z
2020-10-18T18:56:53.000Z
path_prediction/utils/process_file_trajnetplusplus.py
cimat-ris/OF-PathPred
85ca275707e5988491d0a510b9d31883824411db
[ "Apache-2.0" ]
null
null
null
import os, glob, sys, logging, math from tqdm import tqdm import numpy as np from .interaction_optical_flow import OpticalFlowSimulator from .obstacles import load_world_obstacle_polygons # Since it is used as a submodule, the trajnetplusplustools directory should be there sys.path.append("../../trajnetplusplustools") ...
51.684211
152
0.674134
import os, glob, sys, logging, math from tqdm import tqdm import numpy as np from .interaction_optical_flow import OpticalFlowSimulator from .obstacles import load_world_obstacle_polygons sys.path.append("../../trajnetplusplustools") from trajnetplusplustools import Reader def prepare_data_trajnetplusplus(datasets_pat...
true
true
f75925a4f86606e7e5d628ab6f2f4c5eb8c139b5
4,160
py
Python
openpnm/io/Pandas.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
1
2020-06-08T19:48:00.000Z
2020-06-08T19:48:00.000Z
openpnm/io/Pandas.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
openpnm/io/Pandas.py
Jimmy-INL/OpenPNM
1546fa1ac2204443bde916f2037fac383c5069ae
[ "MIT" ]
null
null
null
import numpy as np import scipy as sp from flatdict import FlatDict from collections import namedtuple from openpnm.io import Dict, GenericIO from openpnm.utils import sanitize_dict, logging logger = logging.getLogger(__name__) class Pandas(GenericIO): r""" Combines all data arrays into a Pandas DataFrame obj...
39.245283
79
0.59976
import numpy as np import scipy as sp from flatdict import FlatDict from collections import namedtuple from openpnm.io import Dict, GenericIO from openpnm.utils import sanitize_dict, logging logger = logging.getLogger(__name__) class Pandas(GenericIO): @classmethod def to_dataframe(cls, network=None, phases=[...
true
true
f7592610596be2206314014a248d230d99e9df83
35,286
py
Python
tests/integration/local/invoke/test_integrations_cli.py
ramosbugs/aws-sam-cli
98be672418f76bf1cc54db7528988b8a1c6a6b52
[ "Apache-2.0" ]
null
null
null
tests/integration/local/invoke/test_integrations_cli.py
ramosbugs/aws-sam-cli
98be672418f76bf1cc54db7528988b8a1c6a6b52
[ "Apache-2.0" ]
null
null
null
tests/integration/local/invoke/test_integrations_cli.py
ramosbugs/aws-sam-cli
98be672418f76bf1cc54db7528988b8a1c6a6b52
[ "Apache-2.0" ]
1
2021-11-29T19:10:17.000Z
2021-11-29T19:10:17.000Z
import json import shutil import os import copy import tempfile from unittest import skipIf from parameterized import parameterized from subprocess import Popen, PIPE, TimeoutExpired from timeit import default_timer as timer import pytest import docker from tests.integration.local.invoke.layer_utils import LayerUtils...
36.794578
143
0.659213
import json import shutil import os import copy import tempfile from unittest import skipIf from parameterized import parameterized from subprocess import Popen, PIPE, TimeoutExpired from timeit import default_timer as timer import pytest import docker from tests.integration.local.invoke.layer_utils import LayerUtils...
true
true
f7592656a565808c832c5c275ed76b3d13157350
1,476
py
Python
zerver/webhooks/buildbot/tests.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
2
2020-11-12T12:28:46.000Z
2020-11-16T11:17:46.000Z
zerver/webhooks/buildbot/tests.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
1
2021-08-05T14:46:02.000Z
2021-08-05T14:46:02.000Z
zerver/webhooks/buildbot/tests.py
TylerPham2000/zulip
2e7aaba0dde5517b4a55cb0bd782f009be45e3ba
[ "Apache-2.0" ]
1
2021-08-05T14:27:13.000Z
2021-08-05T14:27:13.000Z
from zerver.lib.test_classes import WebhookTestCase class BuildbotHookTests(WebhookTestCase): STREAM_NAME = "buildbot" URL_TEMPLATE = "/api/v1/external/buildbot?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = "buildbot" def test_build_started(self) -> None: expected_topic = "buildbot-he...
49.2
157
0.699864
from zerver.lib.test_classes import WebhookTestCase class BuildbotHookTests(WebhookTestCase): STREAM_NAME = "buildbot" URL_TEMPLATE = "/api/v1/external/buildbot?api_key={api_key}&stream={stream}" FIXTURE_DIR_NAME = "buildbot" def test_build_started(self) -> None: expected_topic = "buildbot-he...
true
true
f75926b621d7bd5458d3e89385204c86711ae819
1,676
py
Python
scripts/init.py
liangsun/firstblog
e7b0bd3e42746b91f31cec6142fec28796426256
[ "BSD-3-Clause" ]
null
null
null
scripts/init.py
liangsun/firstblog
e7b0bd3e42746b91f31cec6142fec28796426256
[ "BSD-3-Clause" ]
null
null
null
scripts/init.py
liangsun/firstblog
e7b0bd3e42746b91f31cec6142fec28796426256
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #fileencoding=utf-8 import time import logging import hashlib from scaff import Scaffold def hash_pwd(pwd, salt): return hashlib.sha1(pwd+'|'+salt).hexdigest()[:16] class Runner(Scaffold): def main(self): logging.info('Start to build index...') self.db.user.ensure_index...
31.622642
110
0.522673
import time import logging import hashlib from scaff import Scaffold def hash_pwd(pwd, salt): return hashlib.sha1(pwd+'|'+salt).hexdigest()[:16] class Runner(Scaffold): def main(self): logging.info('Start to build index...') self.db.user.ensure_index([('mail', 1)], unique=True) self....
true
true
f75926c5185daeefd0b628166a9801a5875b45fb
16,325
py
Python
fw_heudiconv/backend_funcs/convert.py
krmurtha/fw-heudiconv
cf41f7e6eb770317ab7c0aec051b4567ab634d01
[ "BSD-3-Clause" ]
null
null
null
fw_heudiconv/backend_funcs/convert.py
krmurtha/fw-heudiconv
cf41f7e6eb770317ab7c0aec051b4567ab634d01
[ "BSD-3-Clause" ]
null
null
null
fw_heudiconv/backend_funcs/convert.py
krmurtha/fw-heudiconv
cf41f7e6eb770317ab7c0aec051b4567ab634d01
[ "BSD-3-Clause" ]
null
null
null
import logging import re import pdb import operator import pprint import mimetypes import flywheel import json import pandas as pd from os import path from pathvalidate import is_valid_filename from pathlib import Path from fw_heudiconv.cli.export import get_nested logger = logging.getLogger('fw-heudiconv-curator') ...
33.729339
117
0.526799
import logging import re import pdb import operator import pprint import mimetypes import flywheel import json import pandas as pd from os import path from pathvalidate import is_valid_filename from pathlib import Path from fw_heudiconv.cli.export import get_nested logger = logging.getLogger('fw-heudiconv-curator') ...
true
true
f7592898a6060fa4986bb4d99efadd7f7bda97c3
3,061
py
Python
tests/test_utils_get_static_file.py
loonghao/dayu_widgets
42758872993197880f68d141ee1ce314f9b2cfea
[ "MIT" ]
null
null
null
tests/test_utils_get_static_file.py
loonghao/dayu_widgets
42758872993197880f68d141ee1ce314f9b2cfea
[ "MIT" ]
null
null
null
tests/test_utils_get_static_file.py
loonghao/dayu_widgets
42758872993197880f68d141ee1ce314f9b2cfea
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test get_static_file function. """ # Import future modules from __future__ import absolute_import from __future__ import division from __future__ import print_function # Import built-in modules import os # Import third-party modules from dayu_widgets import CUSTOM_STA...
31.885417
78
0.653055
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from dayu_widgets import CUSTOM_STATIC_FOLDERS from dayu_widgets import DEFAULT_STATIC_FOLDER from dayu_widgets import utils import pytest @pytest.fixture(scope="module", name="custom_folder") def ...
true
true
f75928cfbbb913435e6ee3c60a3be8811842e445
13,503
py
Python
tools/train_net.py
StadlerMaximilian/Detectron.pytorch
b7a7c053b15da21418f53d9e97f4652d0d139523
[ "MIT" ]
null
null
null
tools/train_net.py
StadlerMaximilian/Detectron.pytorch
b7a7c053b15da21418f53d9e97f4652d0d139523
[ "MIT" ]
null
null
null
tools/train_net.py
StadlerMaximilian/Detectron.pytorch
b7a7c053b15da21418f53d9e97f4652d0d139523
[ "MIT" ]
null
null
null
""" Training Script """ import argparse import distutils.util import os import sys import pickle import resource import traceback import logging from collections import defaultdict import numpy as np import yaml import torch from torch.autograd import Variable import torch.nn as nn import cv2 cv2.setNumThreads(0) # ...
36.201072
103
0.648004
import argparse import distutils.util import os import sys import pickle import resource import traceback import logging from collections import defaultdict import numpy as np import yaml import torch from torch.autograd import Variable import torch.nn as nn import cv2 cv2.setNumThreads(0) import _init_paths impor...
true
true
f75928e53175aa09a47075cf723776211c28cb1c
242
py
Python
setup.py
dosisod/vimonous
3e2bd74decfe922702d944a6a5ddbb25aeca2d51
[ "MIT" ]
null
null
null
setup.py
dosisod/vimonous
3e2bd74decfe922702d944a6a5ddbb25aeca2d51
[ "MIT" ]
null
null
null
setup.py
dosisod/vimonous
3e2bd74decfe922702d944a6a5ddbb25aeca2d51
[ "MIT" ]
null
null
null
from setuptools import setup setup( name="vimonous", version="0.0.0", description="Venomous file parser powered with Python and Vim", license="MIT", packages=["vimonous"], author="dosisod", url="https://github.com/dosisod/vimonous" )
20.166667
64
0.72314
from setuptools import setup setup( name="vimonous", version="0.0.0", description="Venomous file parser powered with Python and Vim", license="MIT", packages=["vimonous"], author="dosisod", url="https://github.com/dosisod/vimonous" )
true
true
f759291a9b889532433b133745164006cd72e6b6
28,950
py
Python
sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.347826
205
0.656304
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
f7592a30e067030f3c6433bc2419db06c0db8da8
833
py
Python
webdriver/tests/get_window_rect/get.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
webdriver/tests/get_window_rect/get.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
7,642
2018-05-28T09:38:03.000Z
2022-03-31T20:55:48.000Z
webdriver/tests/get_window_rect/get.py
meyerweb/wpt
f04261533819893c71289614c03434c06856c13e
[ "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
from tests.support.asserts import assert_error, assert_success def get_window_rect(session): return session.transport.send( "GET", "session/{session_id}/window/rect".format(**vars(session))) def test_no_top_browsing_context(session, closed_window): response = get_window_rect(session) assert_erro...
26.03125
74
0.713085
from tests.support.asserts import assert_error, assert_success def get_window_rect(session): return session.transport.send( "GET", "session/{session_id}/window/rect".format(**vars(session))) def test_no_top_browsing_context(session, closed_window): response = get_window_rect(session) assert_erro...
true
true
f7592d389a1fe5a541b5c1ddbad64c82968a36d9
681
py
Python
api/src/repository/UserRepository.py
thalesgelinger/truco-alpha
93ef8a7479a1b6e5e9f79d03f9d8b46b28d143c1
[ "MIT" ]
null
null
null
api/src/repository/UserRepository.py
thalesgelinger/truco-alpha
93ef8a7479a1b6e5e9f79d03f9d8b46b28d143c1
[ "MIT" ]
3
2022-02-13T19:31:36.000Z
2022-02-27T09:44:42.000Z
api/src/repository/UserRepository.py
thalesgelinger/truco-alpha
93ef8a7479a1b6e5e9f79d03f9d8b46b28d143c1
[ "MIT" ]
null
null
null
from python_framework import Repository import User @Repository(model = User.User) class UserRepository: def findAll(self) : return self.repository.findAllAndCommit(self.model) def existsByKey(self,key) : return self.repository.existsByKeyAndCommit(key, self.model) def findByKey(self,key...
27.24
70
0.706314
from python_framework import Repository import User @Repository(model = User.User) class UserRepository: def findAll(self) : return self.repository.findAllAndCommit(self.model) def existsByKey(self,key) : return self.repository.existsByKeyAndCommit(key, self.model) def findByKey(self,key...
true
true
f7592dcddece4aefc0acb356b32eef6d5d9017ef
4,058
py
Python
pyXSteam/IAPWS_R4.py
drunsinn/pyXSteam
8d1f178fa59ee99b269fd1d3b88d5cf4b8ad74af
[ "BSD-3-Clause" ]
27
2015-03-14T09:24:41.000Z
2022-03-19T16:39:48.000Z
pyXSteam/IAPWS_R4.py
drunsinn/pyXSteam
8d1f178fa59ee99b269fd1d3b88d5cf4b8ad74af
[ "BSD-3-Clause" ]
6
2017-10-11T15:13:02.000Z
2021-03-24T08:05:51.000Z
pyXSteam/IAPWS_R4.py
drunsinn/pyXSteam
8d1f178fa59ee99b269fd1d3b88d5cf4b8ad74af
[ "BSD-3-Clause" ]
13
2017-10-11T08:07:06.000Z
2021-07-25T01:28:46.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math import logging logger = logging.getLogger(__name__) """ IAPWS R4-84(2007) Revised Release on Viscosity and Thermal Conductivity of Heavy Water Substance http://www.iapws.org/relguide/TransD2O-2007.pdf """ def myHW_rhoT_R4(rho, T): """Viscosity as a funct...
30.283582
106
0.555446
import math import logging logger = logging.getLogger(__name__) def myHW_rhoT_R4(rho, T): logger.debug("myHW_rhoT_R4 input: ρ {} kg/m^3, T {} K".format(rho, T)) T_star = 643.847 rho_star = 358 my_star = 55.2651 T_dash = T / T_star rho_dash = rho / rho_star A = [1.0, 0.940695, 0.5783...
true
true
f7592e4f96998fe68d5d0980f14dece98a3c71e2
5,738
py
Python
cm/app/api_v1/transactions.py
HotMaps/dh_economic_assessment
28393250b8f7a68552b90f7d8612fef216cc69e0
[ "Apache-2.0" ]
null
null
null
cm/app/api_v1/transactions.py
HotMaps/dh_economic_assessment
28393250b8f7a68552b90f7d8612fef216cc69e0
[ "Apache-2.0" ]
1
2022-03-08T21:10:00.000Z
2022-03-08T21:10:00.000Z
cm/app/api_v1/transactions.py
HotMaps/dh_economic_assessment
28393250b8f7a68552b90f7d8612fef216cc69e0
[ "Apache-2.0" ]
null
null
null
from flask import request, abort, jsonify ,url_for, g,flash from . import api from .. import SIGNATURE,CM_NAME import json import requests import logging import os from flask import send_from_directory from app import helper from app import constant from app.api_v1 import errors import socket from . import calculati...
36.547771
634
0.664169
from flask import request, abort, jsonify ,url_for, g,flash from . import api from .. import SIGNATURE,CM_NAME import json import requests import logging import os from flask import send_from_directory from app import helper from app import constant from app.api_v1 import errors import socket from . import calculati...
true
true
f7592f2fcdd39590c1159f62405d208086d683ce
984
py
Python
tests/test_pitch.py
ian-otieno/pitches-app
8ea5e9cc77ee66261cc85a71c669b3ef0b391027
[ "MIT" ]
null
null
null
tests/test_pitch.py
ian-otieno/pitches-app
8ea5e9cc77ee66261cc85a71c669b3ef0b391027
[ "MIT" ]
null
null
null
tests/test_pitch.py
ian-otieno/pitches-app
8ea5e9cc77ee66261cc85a71c669b3ef0b391027
[ "MIT" ]
null
null
null
import unittest from app.models import Pitch, User class PitchTest(unittest.TestCase): def setUp(self): self.user_iano=User(username='ian', password='', email='joseph@gmail.com') self.new_pitch=Pitch(title='iano', description='time is money', category='business', user=self.user_iano) def tearD...
37.846154
113
0.689024
import unittest from app.models import Pitch, User class PitchTest(unittest.TestCase): def setUp(self): self.user_iano=User(username='ian', password='', email='joseph@gmail.com') self.new_pitch=Pitch(title='iano', description='time is money', category='business', user=self.user_iano) def tearD...
true
true
f7592f6688a48a8b5ba98fefa813c69c18151b09
4,332
py
Python
scripts/algorithm_evaluation_fixtures.py
comic/comic-django
4f534fae2c7d2102e94991667398aef12394e32e
[ "Apache-2.0" ]
7
2016-11-05T07:16:30.000Z
2017-11-23T03:38:03.000Z
scripts/algorithm_evaluation_fixtures.py
comic/comic-django
4f534fae2c7d2102e94991667398aef12394e32e
[ "Apache-2.0" ]
113
2015-05-26T09:27:59.000Z
2018-03-21T10:45:56.000Z
scripts/algorithm_evaluation_fixtures.py
comic/comic-django
4f534fae2c7d2102e94991667398aef12394e32e
[ "Apache-2.0" ]
7
2015-07-16T20:11:22.000Z
2017-06-06T02:41:24.000Z
import os from contextlib import contextmanager from django.conf import settings from django.contrib.auth import get_user_model from django.core.files.base import ContentFile from grandchallenge.algorithms.models import Algorithm, AlgorithmImage from grandchallenge.archives.models import Archive, ArchiveItem from gra...
28.12987
77
0.691367
import os from contextlib import contextmanager from django.conf import settings from django.contrib.auth import get_user_model from django.core.files.base import ContentFile from grandchallenge.algorithms.models import Algorithm, AlgorithmImage from grandchallenge.archives.models import Archive, ArchiveItem from gra...
true
true
f7592f75c8056d3e1656aa67abb73c92bd84aa2b
1,669
py
Python
scholars/courses/migrations/0017_auto_20170812_0545.py
shirishgoyal/scholars
c89a87b0f8338e75cb5da0d0d20a4a340deb694e
[ "MIT" ]
null
null
null
scholars/courses/migrations/0017_auto_20170812_0545.py
shirishgoyal/scholars
c89a87b0f8338e75cb5da0d0d20a4a340deb694e
[ "MIT" ]
14
2017-05-16T21:05:40.000Z
2021-06-10T20:38:00.000Z
scholars/courses/migrations/0017_auto_20170812_0545.py
shirishgoyal/scholars
c89a87b0f8338e75cb5da0d0d20a4a340deb694e
[ "MIT" ]
3
2016-10-04T21:33:11.000Z
2019-02-03T01:04:39.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-12 05:45 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('courses', '0016_coursemember_...
34.770833
150
0.629718
from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('courses', '0016_coursemember_dri'), ] operations = [ migrations.AddField( ...
true
true
f75931f0e7bfde06089a1d50e064f567f77c7b55
1,519
py
Python
test/unittests/study/mri/test_coregistered.py
szho42/banana
131804803e6293716e9d11cbb6f3ca244b2931f9
[ "Apache-2.0" ]
null
null
null
test/unittests/study/mri/test_coregistered.py
szho42/banana
131804803e6293716e9d11cbb6f3ca244b2931f9
[ "Apache-2.0" ]
null
null
null
test/unittests/study/mri/test_coregistered.py
szho42/banana
131804803e6293716e9d11cbb6f3ca244b2931f9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from nipype import config config.enable_debug_mode() from arcana.data import InputFilesets # @IgnorePep8 from banana.file_format import nifti_gz_format, text_matrix_format # @IgnorePep8 from banana.study.mri.coregistered import ( # @IgnorePep8 CoregisteredStudy, CoregisteredToMatrixStudy) f...
46.030303
81
0.705727
from nipype import config config.enable_debug_mode() from arcana.data import InputFilesets from banana.file_format import nifti_gz_format, text_matrix_format from banana.study.mri.coregistered import ( CoregisteredStudy, CoregisteredToMatrixStudy) from banana.testing import BaseTestCase as TestCase class Test...
true
true
f759325999f4f96c9c86a7b7e1b89633c480b9fb
308
py
Python
grl/envs/valid_actions_multi_agent_env.py
indylab/xdo
1ddd92aa56ba10fa468396de8f8824c83ba9d0ba
[ "MIT" ]
12
2021-03-12T07:18:52.000Z
2022-03-15T22:30:44.000Z
grl/envs/valid_actions_multi_agent_env.py
indylab/xdo
1ddd92aa56ba10fa468396de8f8824c83ba9d0ba
[ "MIT" ]
1
2021-11-22T16:39:46.000Z
2022-02-02T22:13:03.000Z
grl/envs/valid_actions_multi_agent_env.py
indylab/xdo
1ddd92aa56ba10fa468396de8f8824c83ba9d0ba
[ "MIT" ]
4
2021-06-21T03:54:45.000Z
2022-01-13T10:28:26.000Z
from abc import abstractmethod from ray.rllib.env import MultiAgentEnv class ValidActionsMultiAgentEnv(MultiAgentEnv): @abstractmethod def __init__(self): super(ValidActionsMultiAgentEnv, self).__init__() self.observation_length = None self.orig_observation_length = None
23.692308
57
0.753247
from abc import abstractmethod from ray.rllib.env import MultiAgentEnv class ValidActionsMultiAgentEnv(MultiAgentEnv): @abstractmethod def __init__(self): super(ValidActionsMultiAgentEnv, self).__init__() self.observation_length = None self.orig_observation_length = None
true
true
f75932eb992b566e7d07e4767d9068c74a653c1d
4,891
py
Python
codes/3_1.py
inspurer/ImageProcess
f826c36f3ae17bee5694c3f1748f9e5319a46fd9
[ "MIT" ]
1
2020-11-10T11:35:30.000Z
2020-11-10T11:35:30.000Z
codes/3_1.py
inspurer/ImageProcess
f826c36f3ae17bee5694c3f1748f9e5319a46fd9
[ "MIT" ]
null
null
null
codes/3_1.py
inspurer/ImageProcess
f826c36f3ae17bee5694c3f1748f9e5319a46fd9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # pc_type lenovo # create_time: 2019/11/9 15:15 # file_name: 3_1.py import cv2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns import random # 设置中文字体和负号正常显示 plt.rcParams['font.sans-serif'] = ['SimHei'] # 指定默认字体 plt.rcParams['axes.unicode_minus'] =...
28.436047
127
0.618074
import cv2 import numpy as np import matplotlib.pyplot as plt import seaborn as sns import random plt.rcParams['font.sans-serif'] = ['SimHei'] plt.rcParams['axes.unicode_minus'] = False sns.set_context("paper") sns.set_style('whitegrid') sns.set(font='SimHei') def sp_noise(image,prob): output = np.zeros(image....
true
true
f75934d75f04c5fa25a4d0e67328088585bcc8bc
101
py
Python
app/config.py
chauvoluuhuong/developer_review
1ca6d2436b3f2e643d38b7427eaf6a1a490895f5
[ "MIT" ]
null
null
null
app/config.py
chauvoluuhuong/developer_review
1ca6d2436b3f2e643d38b7427eaf6a1a490895f5
[ "MIT" ]
null
null
null
app/config.py
chauvoluuhuong/developer_review
1ca6d2436b3f2e643d38b7427eaf6a1a490895f5
[ "MIT" ]
null
null
null
import os # DEBUG has to be to False in a production enrironment for security reasons DEBUG = True
16.833333
75
0.772277
import os DEBUG = True
true
true
f7593684124bd78864a4383783dd93bc415dfa48
5,593
py
Python
src/pretalx/orga/forms/mails.py
chriswolfdesign/pretalx
fb6bcf090a5c92e55a79851d60dfc716309da557
[ "Apache-2.0" ]
null
null
null
src/pretalx/orga/forms/mails.py
chriswolfdesign/pretalx
fb6bcf090a5c92e55a79851d60dfc716309da557
[ "Apache-2.0" ]
null
null
null
src/pretalx/orga/forms/mails.py
chriswolfdesign/pretalx
fb6bcf090a5c92e55a79851d60dfc716309da557
[ "Apache-2.0" ]
null
null
null
from django import forms from django.utils.translation import gettext_lazy as _ from i18nfield.forms import I18nModelForm from pretalx.common.mixins.forms import ReadOnlyFlag from pretalx.mail.context import get_context_explanation from pretalx.mail.models import MailTemplate, QueuedMail from pretalx.person.models imp...
38.308219
94
0.569104
from django import forms from django.utils.translation import gettext_lazy as _ from i18nfield.forms import I18nModelForm from pretalx.common.mixins.forms import ReadOnlyFlag from pretalx.mail.context import get_context_explanation from pretalx.mail.models import MailTemplate, QueuedMail from pretalx.person.models imp...
true
true
f75938d11392a925f4ed11a3cf688b25180988a5
1,279
py
Python
solutions/0036_ValidSudoku.py
alexwawl/leetcode-solutions-javascript-python
d9da4c7ed9418070092b6f6eaf513ff54eecbb61
[ "MIT" ]
11
2019-08-05T21:44:53.000Z
2021-04-07T17:05:33.000Z
solutions/0036_ValidSudoku.py
alexwawl/leetcode-solutions-javascript-python
d9da4c7ed9418070092b6f6eaf513ff54eecbb61
[ "MIT" ]
null
null
null
solutions/0036_ValidSudoku.py
alexwawl/leetcode-solutions-javascript-python
d9da4c7ed9418070092b6f6eaf513ff54eecbb61
[ "MIT" ]
6
2019-09-18T22:29:32.000Z
2021-04-12T19:03:33.000Z
class Solution(object): def isValidSudoku(self, board): """ :type board: List[List[str]] :rtype: bool """ def is_valid(arr): dict = {} tmp = [] for el in arr: if el != '.': tmp.append(el) ...
31.975
87
0.42846
class Solution(object): def isValidSudoku(self, board): def is_valid(arr): dict = {} tmp = [] for el in arr: if el != '.': tmp.append(el) dict[el] = True return len(dict.keys()) == len(tmp) ...
true
true
f75938e964105709b813fba093280b03145b953e
3,450
py
Python
UML2ER/contracts/HContract02_CompleteLHS.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
3
2017-06-02T19:26:27.000Z
2021-06-14T04:25:45.000Z
UML2ER/contracts/HContract02_CompleteLHS.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
8
2016-08-24T07:04:07.000Z
2017-05-26T16:22:47.000Z
UML2ER/contracts/HContract02_CompleteLHS.py
levilucio/SyVOLT
7526ec794d21565e3efcc925a7b08ae8db27d46a
[ "MIT" ]
1
2019-10-31T06:00:23.000Z
2019-10-31T06:00:23.000Z
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HContract02_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HContract02_CompleteLHS """ # Flag this instance as compiled now self.is_compiled = True ...
32.242991
102
0.681739
from core.himesis import Himesis, HimesisPreConditionPatternLHS import uuid class HContract02_CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): self.is_compiled = True super(HContract02_CompleteLHS, self).__init__(name='HContract02_CompleteLHS', num_nodes=0, edges=[]) self.add_edges([]) ...
true
true
f759399d75d777a9404c8b2cdc860629512132ce
59
py
Python
assembler/pyas/__main__.py
gaborpelesz/from-the-transistors
089a642928f17343ff1ccb297317017c58b6a018
[ "MIT" ]
null
null
null
assembler/pyas/__main__.py
gaborpelesz/from-the-transistors
089a642928f17343ff1ccb297317017c58b6a018
[ "MIT" ]
null
null
null
assembler/pyas/__main__.py
gaborpelesz/from-the-transistors
089a642928f17343ff1ccb297317017c58b6a018
[ "MIT" ]
null
null
null
from . import entry if __name__ == '__main__': entry()
14.75
26
0.644068
from . import entry if __name__ == '__main__': entry()
true
true
f7593ad6c110b389ec9ba7ac2a18a6f4120ed1c5
3,279
py
Python
pyais/util.py
mjakob/pyais
7c4e71fe59dbfc082e13c8946c2ba24cd657e55a
[ "MIT" ]
1
2021-04-10T02:15:41.000Z
2021-04-10T02:15:41.000Z
pyais/util.py
mjakob/pyais
7c4e71fe59dbfc082e13c8946c2ba24cd657e55a
[ "MIT" ]
null
null
null
pyais/util.py
mjakob/pyais
7c4e71fe59dbfc082e13c8946c2ba24cd657e55a
[ "MIT" ]
null
null
null
from collections import OrderedDict from functools import partial, reduce from operator import xor from typing import Generator, Sequence, Any from bitarray import bitarray # type: ignore from_bytes = partial(int.from_bytes, byteorder="big") from_bytes_signed = partial(int.from_bytes, byteorder="big", signed=True) ...
28.763158
106
0.618176
from collections import OrderedDict from functools import partial, reduce from operator import xor from typing import Generator, Sequence, Any from bitarray import bitarray from_bytes = partial(int.from_bytes, byteorder="big") from_bytes_signed = partial(int.from_bytes, byteorder="big", signed=True) def decode_int...
true
true
f7593af4eeca08f2e9001895e487bd08ba12abce
729
py
Python
vsutillib/vsutillib-pyqt6/vsutillib/pyqt6/__init__.py
akai10tsuki/vsutillib
6d623171cc2a5c66a94fb508bfc312abeab49ff2
[ "MIT" ]
null
null
null
vsutillib/vsutillib-pyqt6/vsutillib/pyqt6/__init__.py
akai10tsuki/vsutillib
6d623171cc2a5c66a94fb508bfc312abeab49ff2
[ "MIT" ]
null
null
null
vsutillib/vsutillib-pyqt6/vsutillib/pyqt6/__init__.py
akai10tsuki/vsutillib
6d623171cc2a5c66a94fb508bfc312abeab49ff2
[ "MIT" ]
null
null
null
""" PySide2 related classes and functions """ # classes from .classes import ( checkColor, DualProgressBar, HorizontalLine, LineOutput, QActionWidget, QComboLineEdit, QFileListWidget, QFormatLabel, QGroupSignal, QMenuWidget, QOutputTextWidget, QProgressIndicator, QP...
16.953488
51
0.702332
from .classes import ( checkColor, DualProgressBar, HorizontalLine, LineOutput, QActionWidget, QComboLineEdit, QFileListWidget, QFormatLabel, QGroupSignal, QMenuWidget, QOutputTextWidget, QProgressIndicator, QPushButtonWidget, QRunInThread, QSignalLogHandler...
true
true
f7593b939f3f5f0f0c30716c26397b7cb4816a62
2,236
py
Python
uasyncio_iostream/v3/primitives/delay_ms.py
petrkr/micropython-samples
7429834c6967579f7de8dd2fe0cd9515a3ff3d09
[ "MIT" ]
1
2020-11-06T20:26:18.000Z
2020-11-06T20:26:18.000Z
uasyncio_iostream/v3/primitives/delay_ms.py
aivarannamaa/micropython-samples
7004aa7370d847e6de179b84f9accb1c917ca1b0
[ "MIT" ]
null
null
null
uasyncio_iostream/v3/primitives/delay_ms.py
aivarannamaa/micropython-samples
7004aa7370d847e6de179b84f9accb1c917ca1b0
[ "MIT" ]
null
null
null
import uasyncio as asyncio import utime as time from . import launch # Usage: # from primitives.delay_ms import Delay_ms class Delay_ms: verbose = False def __init__(self, func=None, args=(), can_alloc=True, duration=1000): self.func = func self.args = args self.can_alloc = can_alloc ...
36.655738
74
0.616726
import uasyncio as asyncio import utime as time from . import launch class Delay_ms: verbose = False def __init__(self, func=None, args=(), can_alloc=True, duration=1000): self.func = func self.args = args self.can_alloc = can_alloc self.duration = duration self._tstop ...
true
true
f7593c1b6ba3e453bd0653328e4f1a9c17b8f432
2,724
py
Python
userbot/plugins/corona_virus.py
githubMaster1-ux/PhoeniX
a5c1867f408de1fba3ce2fa045de37615796d941
[ "MIT" ]
1
2020-08-02T17:20:14.000Z
2020-08-02T17:20:14.000Z
userbot/plugins/corona_virus.py
githubMaster1-ux/PhoeniX
a5c1867f408de1fba3ce2fa045de37615796d941
[ "MIT" ]
null
null
null
userbot/plugins/corona_virus.py
githubMaster1-ux/PhoeniX
a5c1867f408de1fba3ce2fa045de37615796d941
[ "MIT" ]
null
null
null
"""CoronaVirus LookUp """ from covid import Covid from userbot.utils import admin_cmd import datetime from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.account import UpdateNotifySettingsRequest from sql.global_variables_sql import SYNTAX, MODU...
36.810811
110
0.650147
from covid import Covid from userbot.utils import admin_cmd import datetime from telethon import events from telethon.errors.rpcerrorlist import YouBlockedUserError from telethon.tl.functions.account import UpdateNotifySettingsRequest from sql.global_variables_sql import SYNTAX, MODULE_LIST @borg.on(admin_cm...
true
true
f7593ce349b98119e16bc8ec0371db3bfbe90745
1,025
py
Python
script/wall_stop.py
ei0410/pimouse_run_corridor
e93985c47271c529876c8ffdfff395ca3a809a56
[ "BSD-3-Clause" ]
null
null
null
script/wall_stop.py
ei0410/pimouse_run_corridor
e93985c47271c529876c8ffdfff395ca3a809a56
[ "BSD-3-Clause" ]
null
null
null
script/wall_stop.py
ei0410/pimouse_run_corridor
e93985c47271c529876c8ffdfff395ca3a809a56
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import rospy, copy from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse from pimouse_ros.msg import LightSensorValues class WallStop(): def __init__(self): self.cmd_vel = rospy.Publisher('/cmd_vel', Twist, queue_size=1) self.sensor_values = Li...
31.060606
76
0.679024
import rospy, copy from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse from pimouse_ros.msg import LightSensorValues class WallStop(): def __init__(self): self.cmd_vel = rospy.Publisher('/cmd_vel', Twist, queue_size=1) self.sensor_values = LightSensorValues() ...
true
true
f7593d20c747e2a784cb4090ffa73695d89512f8
951
py
Python
pyzoo/zoo/pipeline/api/torch/zoo_pickle_module.py
limn2o4/analytics-zoo
78d6ce10976a7e1320ff5ebdf431db93a439ec56
[ "Apache-2.0" ]
2,970
2017-06-08T00:24:43.000Z
2022-03-30T12:14:55.000Z
pyzoo/zoo/pipeline/api/torch/zoo_pickle_module.py
limn2o4/analytics-zoo
78d6ce10976a7e1320ff5ebdf431db93a439ec56
[ "Apache-2.0" ]
3,530
2017-05-09T08:29:10.000Z
2022-03-21T02:11:45.000Z
pyzoo/zoo/pipeline/api/torch/zoo_pickle_module.py
limn2o4/analytics-zoo
78d6ce10976a7e1320ff5ebdf431db93a439ec56
[ "Apache-2.0" ]
972
2017-05-09T07:03:50.000Z
2022-03-23T07:48:48.000Z
# # Copyright 2018 Analytics Zoo 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 or agreed to...
36.576923
83
0.770768
from cloudpickle import * from cloudpickle import CloudPickler as Pickler from pickle import Unpickler
true
true
f7593f0d4088dcc1c8e534d39b63446ab09e43ea
343
py
Python
tests/test_ray.py
Maik93/NURBS-Python
44d87a972c694371462378672429f2acc24249b2
[ "MIT" ]
382
2016-09-22T16:21:47.000Z
2022-03-27T18:23:16.000Z
tests/test_ray.py
Maik93/NURBS-Python
44d87a972c694371462378672429f2acc24249b2
[ "MIT" ]
143
2017-02-10T03:45:09.000Z
2022-03-31T05:24:05.000Z
tests/test_ray.py
Maik93/NURBS-Python
44d87a972c694371462378672429f2acc24249b2
[ "MIT" ]
123
2016-06-10T14:11:37.000Z
2022-03-28T11:39:00.000Z
import pytest from geomdl import ray from geomdl.ray import Ray, RayIntersection def test_ray_intersect(): r2 = Ray((5.0, 181.34), (13.659999999999997, 176.34)) r3 = Ray((19.999779996773235, 189.9998729810778), (19.999652977851035, 180.00009298430456)) t0, t1, res = ray.intersect(r2, r3) assert res !=...
28.583333
95
0.717201
import pytest from geomdl import ray from geomdl.ray import Ray, RayIntersection def test_ray_intersect(): r2 = Ray((5.0, 181.34), (13.659999999999997, 176.34)) r3 = Ray((19.999779996773235, 189.9998729810778), (19.999652977851035, 180.00009298430456)) t0, t1, res = ray.intersect(r2, r3) assert res !=...
true
true
f759405eae3f0972d492d671bf41c7e59cc6fc60
1,965
py
Python
ch01_arrays_and_strings/1.5_one-away.py
appletreeisyellow/cracking-the-coding-interview
dc04c1c1e75a58bd543a298520f4595425f38104
[ "MIT" ]
null
null
null
ch01_arrays_and_strings/1.5_one-away.py
appletreeisyellow/cracking-the-coding-interview
dc04c1c1e75a58bd543a298520f4595425f38104
[ "MIT" ]
null
null
null
ch01_arrays_and_strings/1.5_one-away.py
appletreeisyellow/cracking-the-coding-interview
dc04c1c1e75a58bd543a298520f4595425f38104
[ "MIT" ]
null
null
null
import unittest """ 1.5 One Away There are three types of edits that can be performed on strings: insert a character, remove a character, or replace a character. Given two strings, write a function to check if they are one edit (or zero edits) away. EXAMPLE pale, ple -> true pales, pale -> true pa...
23.392857
84
0.619338
import unittest def is_one_away(str1, str2): len1 = len(str1) len2 = len(str2) if len1 == len2: return is_one_char_replaceable(str1, str2) elif len1 + 1 == len2: return is_one_char_insertable(str1, str2) elif len2 + 1 == len1: return is_one_char_insertable(str2, str1) else: return False d...
true
true
f7594226145e6e4d06699331ef3feb14b77158ee
11,270
py
Python
twindb_backup/cli.py
RyanCPeters/backup
4dc19602989fe7dc49ca409d786fc833d1fcabf9
[ "Apache-2.0" ]
null
null
null
twindb_backup/cli.py
RyanCPeters/backup
4dc19602989fe7dc49ca409d786fc833d1fcabf9
[ "Apache-2.0" ]
null
null
null
twindb_backup/cli.py
RyanCPeters/backup
4dc19602989fe7dc49ca409d786fc833d1fcabf9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Entry points for twindb-backup tool """ from __future__ import print_function import shutil import socket import sys import tempfile import traceback import os # from typing import Union, List, Tuple, AnyStr import click from twindb_backup import ( # setup_logging, LOG, __vers...
27.026379
80
0.659184
from __future__ import print_function import shutil import socket import sys import tempfile import traceback import os import click from twindb_backup import ( LOG, __version__, LOCK_FILE, INTERVALS, MEDIA_TYPES, ) from twindb_backup.backup import run_backup_job from twindb_backup.cache.cach...
true
true
f75942f62b8bdf2c62c2580e61b08f2c4f2c83c8
931
py
Python
webserver/routers.py
AutumnSky/smart-drone
d48ea8a7c6da5e0970f3e387ab7c0e6a152f9e5d
[ "MIT" ]
11
2021-05-20T18:16:41.000Z
2022-03-21T02:50:37.000Z
webserver/routers.py
AutumnSky/smart-drone
d48ea8a7c6da5e0970f3e387ab7c0e6a152f9e5d
[ "MIT" ]
null
null
null
webserver/routers.py
AutumnSky/smart-drone
d48ea8a7c6da5e0970f3e387ab7c0e6a152f9e5d
[ "MIT" ]
3
2021-07-08T10:24:16.000Z
2022-03-30T16:02:24.000Z
from typing import ( Any, ) from aiohttp import web import inspect class ClassRouteTableDef(web.RouteTableDef): def __repr__(self) -> str: return "<ClassRouteTableDef count={}>".format(len(self._items)) def route(self, method: str, path: str, **kwargs: Any): def inner(handler: Any) -> Any: #...
26.6
83
0.709989
from typing import ( Any, ) from aiohttp import web import inspect class ClassRouteTableDef(web.RouteTableDef): def __repr__(self) -> str: return "<ClassRouteTableDef count={}>".format(len(self._items)) def route(self, method: str, path: str, **kwargs: Any): def inner(handler: Any) -> Any: ...
true
true
f75943019b40153e93902f623214d5c646b71842
2,310
py
Python
research/object_detection_inference_test1.py
koheikawata/objectdetectiontest
a4cb01911fa3d0e10bd2c9aa3fd985113af10b1b
[ "MIT" ]
null
null
null
research/object_detection_inference_test1.py
koheikawata/objectdetectiontest
a4cb01911fa3d0e10bd2c9aa3fd985113af10b1b
[ "MIT" ]
null
null
null
research/object_detection_inference_test1.py
koheikawata/objectdetectiontest
a4cb01911fa3d0e10bd2c9aa3fd985113af10b1b
[ "MIT" ]
null
null
null
import numpy as np import os import tensorflow as tf import time import json from PIL import Image from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util THRESHOLD = 0.6 LABEL_PATH = 'object_detection/test1/pascal_label_map.pbtxt' MODEL_PATH = 'object_detection/test1/out...
39.827586
102
0.752814
import numpy as np import os import tensorflow as tf import time import json from PIL import Image from object_detection.utils import ops as utils_ops from object_detection.utils import label_map_util THRESHOLD = 0.6 LABEL_PATH = 'object_detection/test1/pascal_label_map.pbtxt' MODEL_PATH = 'object_detection/test1/out...
true
true
f759437ada91a66b6fb489d96b3bf88ad2d186f2
1,856
py
Python
config.py
jfernan2/PRInspector
c09aad3b49263d3c679fd6cfd307de404425f924
[ "MIT" ]
null
null
null
config.py
jfernan2/PRInspector
c09aad3b49263d3c679fd6cfd307de404425f924
[ "MIT" ]
null
null
null
config.py
jfernan2/PRInspector
c09aad3b49263d3c679fd6cfd307de404425f924
[ "MIT" ]
null
null
null
IS_TEST = True REPOSITORY = 'cms-sw/cmssw' def get_repo_url(): return 'https://github.com/' + REPOSITORY + '/' CERN_SSO_CERT_FILE = 'private/cert.pem' CERN_SSO_KEY_FILE = 'private/cert.key' CERN_SSO_COOKIES_LOCATION = 'private/' TWIKI_CONTACTS_URL = 'https://ppdcontacts.web.cern.ch/PPDContacts/ppd_contacts' TWI...
27.294118
98
0.581358
IS_TEST = True REPOSITORY = 'cms-sw/cmssw' def get_repo_url(): return 'https://github.com/' + REPOSITORY + '/' CERN_SSO_CERT_FILE = 'private/cert.pem' CERN_SSO_KEY_FILE = 'private/cert.key' CERN_SSO_COOKIES_LOCATION = 'private/' TWIKI_CONTACTS_URL = 'https://ppdcontacts.web.cern.ch/PPDContacts/ppd_contacts' TWI...
true
true
f75943fc43311dedc50e029b538f333df27b4cd0
23,348
py
Python
api/tests/opentrons/hardware_control/test_instruments.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/hardware_control/test_instruments.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
api/tests/opentrons/hardware_control/test_instruments.py
Opentrons/protocol_framework
ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f
[ "Apache-2.0" ]
null
null
null
import asyncio import mock import pytest try: import aionotify except (OSError, ModuleNotFoundError): aionotify = None # type: ignore import typeguard from opentrons import types from opentrons.hardware_control import API from opentrons.hardware_control.types import Axis, OT3Mount from opentrons.hardware_c...
34.284875
88
0.700403
import asyncio import mock import pytest try: import aionotify except (OSError, ModuleNotFoundError): aionotify = None import typeguard from opentrons import types from opentrons.hardware_control import API from opentrons.hardware_control.types import Axis, OT3Mount from opentrons.hardware_control.dev_type...
true
true
f7594532e8349ac95811076bacdf0b6e5fbbfa8f
1,128
py
Python
create_jwt.py
soerface/django_pyjwt_example
ab1459e3ad2e3e8fc080e4759b6146bcf41b0561
[ "MIT" ]
null
null
null
create_jwt.py
soerface/django_pyjwt_example
ab1459e3ad2e3e8fc080e4759b6146bcf41b0561
[ "MIT" ]
null
null
null
create_jwt.py
soerface/django_pyjwt_example
ab1459e3ad2e3e8fc080e4759b6146bcf41b0561
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from datetime import datetime, timedelta import jwt from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.serialization import load_pem_private_key # Obviously, in a production setting, you would not have checked in the private key or the passw...
34.181818
117
0.748227
import sys from datetime import datetime, timedelta import jwt from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.serialization import load_pem_private_key with open('private.pem') as f: private_key_encrypted = f.read().encode() private_key = load_pem_private_key(priva...
true
true
f75946835957a8acf98ace050c01ca03382cc071
3,283
py
Python
run_combinations.py
ManeeshaPerera/forecast-framework
60a22af4a97aec10c8bbea7f3f833061283382cb
[ "BSD-3-Clause" ]
null
null
null
run_combinations.py
ManeeshaPerera/forecast-framework
60a22af4a97aec10c8bbea7f3f833061283382cb
[ "BSD-3-Clause" ]
null
null
null
run_combinations.py
ManeeshaPerera/forecast-framework
60a22af4a97aec10c8bbea7f3f833061283382cb
[ "BSD-3-Clause" ]
2
2022-03-20T10:30:38.000Z
2022-03-22T06:39:14.000Z
from combinations.equal_weight import EqualWeight from combinations.pso_model import PSO from combinations.recursive_method import RecursiveEnsemble import constants as const import pandas as pd import numpy as np def run_combinations(horizon, forecast, forecast_test, data_train, data_out_sample): weights = {'wei...
39.554217
120
0.672251
from combinations.equal_weight import EqualWeight from combinations.pso_model import PSO from combinations.recursive_method import RecursiveEnsemble import constants as const import pandas as pd import numpy as np def run_combinations(horizon, forecast, forecast_test, data_train, data_out_sample): weights = {'wei...
true
true
f75946cb51298f058e6b9fd25c8f0b2bc040339f
953
py
Python
Old/baike_spider/html_outputer.py
exchris/Pythonlearn
174f38a86cf1c85d6fc099005aab3568e7549cd0
[ "MIT" ]
null
null
null
Old/baike_spider/html_outputer.py
exchris/Pythonlearn
174f38a86cf1c85d6fc099005aab3568e7549cd0
[ "MIT" ]
1
2018-11-27T09:58:54.000Z
2018-11-27T09:58:54.000Z
Old/baike_spider/html_outputer.py
exchris/pythonlearn
174f38a86cf1c85d6fc099005aab3568e7549cd0
[ "MIT" ]
null
null
null
# -*- coding:UTF-8 -*- class HtmlOutputer(object): def __init__(self): self.datas = [] def collect_data(self, data): if data is None: return self.datas.append(data) def output_html(self): fout = open('output.html', 'w') fout...
19.44898
71
0.428122
class HtmlOutputer(object): def __init__(self): self.datas = [] def collect_data(self, data): if data is None: return self.datas.append(data) def output_html(self): fout = open('output.html', 'w') fout.write("<html>") ...
true
true
f7594719287d9c5b2831d490f40684313b2595a1
289
py
Python
Leetcode/2001-3000/2211. Count Collisions on a Road/2211.py
Next-Gen-UI/Code-Dynamics
a9b9d5e3f27e870b3e030c75a1060d88292de01c
[ "MIT" ]
null
null
null
Leetcode/2001-3000/2211. Count Collisions on a Road/2211.py
Next-Gen-UI/Code-Dynamics
a9b9d5e3f27e870b3e030c75a1060d88292de01c
[ "MIT" ]
null
null
null
Leetcode/2001-3000/2211. Count Collisions on a Road/2211.py
Next-Gen-UI/Code-Dynamics
a9b9d5e3f27e870b3e030c75a1060d88292de01c
[ "MIT" ]
null
null
null
class Solution: def countCollisions(self, directions: str) -> int: l = 0 r = len(directions) - 1 while l < len(directions) and directions[l] == 'L': l += 1 while r >= 0 and directions[r] == 'R': r -= 1 return sum(c != 'S' for c in directions[l:r + 1])
22.230769
55
0.546713
class Solution: def countCollisions(self, directions: str) -> int: l = 0 r = len(directions) - 1 while l < len(directions) and directions[l] == 'L': l += 1 while r >= 0 and directions[r] == 'R': r -= 1 return sum(c != 'S' for c in directions[l:r + 1])
true
true
f75947525c2c7deecb56c0a0feb945088ba42af1
1,237
py
Python
backoffice/urls.py
rcarmo/android-signage-server
fcac8046e98d3fa171cde02eeb3778ad0acdc178
[ "MIT" ]
4
2016-10-31T03:55:24.000Z
2021-07-11T11:00:55.000Z
backoffice/urls.py
rcarmo/android-signage-server
fcac8046e98d3fa171cde02eeb3778ad0acdc178
[ "MIT" ]
null
null
null
backoffice/urls.py
rcarmo/android-signage-server
fcac8046e98d3fa171cde02eeb3778ad0acdc178
[ "MIT" ]
1
2018-04-02T12:47:29.000Z
2018-04-02T12:47:29.000Z
"""backoffice URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
44.178571
233
0.683104
from django.conf.urls import url from django.contrib import admin from django.views.generic import RedirectView from signage import views from os import environ admin.site.site_header = environ.get('SITE_NAME', 'Signage Administration') urlpatterns = [ url(r'^$', RedirectView.as_view(url='https://pixels.camp')), ...
true
true
f75947573b278c58e3ea8f5eba91e8949a776602
1,610
py
Python
art/defences/spatial_smoothing_unittest.py
Sunshine352/adversarial-robustness-toolbox
070bf751aee40eb1b723fa5e24cde55d17978f62
[ "MIT" ]
1
2018-10-08T06:03:53.000Z
2018-10-08T06:03:53.000Z
art/defences/spatial_smoothing_unittest.py
Sunshine352/adversarial-robustness-toolbox
070bf751aee40eb1b723fa5e24cde55d17978f62
[ "MIT" ]
null
null
null
art/defences/spatial_smoothing_unittest.py
Sunshine352/adversarial-robustness-toolbox
070bf751aee40eb1b723fa5e24cde55d17978f62
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import logging import unittest import numpy as np from art.defences.spatial_smoothing import SpatialSmoothing logger = logging.getLogger('testLogger') class TestLocalSpatialSmoothing(unittest.TestCase): def test_ones(self): ...
29.814815
82
0.570807
from __future__ import absolute_import, division, print_function, unicode_literals import logging import unittest import numpy as np from art.defences.spatial_smoothing import SpatialSmoothing logger = logging.getLogger('testLogger') class TestLocalSpatialSmoothing(unittest.TestCase): def test_ones(self): ...
true
true
f75947faf55f15a36baf745ce666d78c72fa9b25
4,277
py
Python
test/functional/feature_includeconf.py
kryvel/bitcoin-abc
6330d8ccc8b1b720c42c8c9239dadc8240ca5025
[ "MIT" ]
null
null
null
test/functional/feature_includeconf.py
kryvel/bitcoin-abc
6330d8ccc8b1b720c42c8c9239dadc8240ca5025
[ "MIT" ]
null
null
null
test/functional/feature_includeconf.py
kryvel/bitcoin-abc
6330d8ccc8b1b720c42c8c9239dadc8240ca5025
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests the includeconf argument Verify that: 1. adding includeconf to the configuration file causes the inc...
45.989247
180
0.671733
import os from test_framework.test_framework import BitcoinTestFramework class IncludeConfTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = False self.num_nodes = 1 def setup_chain(self): super().setup_chain() with open(os.path.jo...
true
true
f7594830362e9b958ecdef3135b4f6d58d0962db
14,324
py
Python
B2G/gecko/testing/mochitest/pywebsocket/mod_pywebsocket/handshake/hybi.py
wilebeast/FireFox-OS
43067f28711d78c429a1d6d58c77130f6899135f
[ "Apache-2.0" ]
3
2015-08-31T15:24:31.000Z
2020-04-24T20:31:29.000Z
B2G/gecko/testing/mochitest/pywebsocket/mod_pywebsocket/handshake/hybi.py
wilebeast/FireFox-OS
43067f28711d78c429a1d6d58c77130f6899135f
[ "Apache-2.0" ]
null
null
null
B2G/gecko/testing/mochitest/pywebsocket/mod_pywebsocket/handshake/hybi.py
wilebeast/FireFox-OS
43067f28711d78c429a1d6d58c77130f6899135f
[ "Apache-2.0" ]
3
2015-07-29T07:17:15.000Z
2020-11-04T06:55:37.000Z
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
37.794195
79
0.650656
"""This file provides the opening handshake processor for the WebSocket protocol (RFC 6455). Specification: http://tools.ietf.org/html/rfc6455 """ import base64 import logging import os import re from mod_pywebsocket import common from mod_pywebsocket.extensions import get_extension_processor from mod_pywebsock...
false
true