hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72b0ab4b78ec9b7eb7deec2b8193a86ca41b48e
938
py
Python
year_2020/day13/test_day13.py
mjalkio/advent-of-code
54dbfcba3850e72d7b736ef1e7d2a3cb91e65d42
[ "MIT" ]
null
null
null
year_2020/day13/test_day13.py
mjalkio/advent-of-code
54dbfcba3850e72d7b736ef1e7d2a3cb91e65d42
[ "MIT" ]
null
null
null
year_2020/day13/test_day13.py
mjalkio/advent-of-code
54dbfcba3850e72d7b736ef1e7d2a3cb91e65d42
[ "MIT" ]
null
null
null
import pytest from year_2020.day13.shuttle_search import ( get_bus_id_times_wait_time, get_earliest_bus_and_wait_time_for_airport, get_shuttle_company_solution, ) TEST_INPUT = """ 939 7,13,x,x,59,x,31,19 """ TEST_INPUT_2 = """ 0 17,x,13,19 """ TEST_INPUT_3 = """ 0 67,7,59,61 """ TEST_INPUT_4 = """ 0 67...
16.172414
76
0.672708
import pytest from year_2020.day13.shuttle_search import ( get_bus_id_times_wait_time, get_earliest_bus_and_wait_time_for_airport, get_shuttle_company_solution, ) TEST_INPUT = """ 939 7,13,x,x,59,x,31,19 """ TEST_INPUT_2 = """ 0 17,x,13,19 """ TEST_INPUT_3 = """ 0 67,7,59,61 """ TEST_INPUT_4 = """ 0 67...
true
true
f72b0ad54d6dd35fc8e313c9014957d5d7c84c64
2,327
py
Python
TheoryValidation/CirculantGraphs.py
ctralie/GeometricBeatTracking
2c35183f638c4afb51808c09e46da0f74384cba6
[ "Apache-2.0" ]
2
2019-11-03T16:59:34.000Z
2021-04-17T05:41:01.000Z
TheoryValidation/CirculantGraphs.py
ctralie/GeometricBeatTracking
2c35183f638c4afb51808c09e46da0f74384cba6
[ "Apache-2.0" ]
null
null
null
TheoryValidation/CirculantGraphs.py
ctralie/GeometricBeatTracking
2c35183f638c4afb51808c09e46da0f74384cba6
[ "Apache-2.0" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import scipy.sparse as sparse import sys sys.path.append("..") from Laplacian import * def getCirculantAdj(N, lags): #Setup circular parts I = range(N)*(len(lags)+2) J = range(1, N+1) + range(-1, N-1) J[N-1] = 0 J[N] = N-1 for lag in lags: ...
26.146067
78
0.5578
import numpy as np import matplotlib.pyplot as plt import scipy.sparse as sparse import sys sys.path.append("..") from Laplacian import * def getCirculantAdj(N, lags): I = range(N)*(len(lags)+2) J = range(1, N+1) + range(-1, N-1) J[N-1] = 0 J[N] = N-1 for lag in lags: J = J + (np.mod(np...
true
true
f72b0b19c49d94d5feee3fd0a9c9902892c5cb86
28,656
py
Python
Lib/test/test_tempfile.py
deadsnakes/python3.1
88d77610a7873c5161bfc15cd69557fc7697b1a3
[ "PSF-2.0" ]
null
null
null
Lib/test/test_tempfile.py
deadsnakes/python3.1
88d77610a7873c5161bfc15cd69557fc7697b1a3
[ "PSF-2.0" ]
null
null
null
Lib/test/test_tempfile.py
deadsnakes/python3.1
88d77610a7873c5161bfc15cd69557fc7697b1a3
[ "PSF-2.0" ]
null
null
null
# tempfile.py unit tests. import tempfile import os import sys import re import errno import warnings import unittest from test import support warnings.filterwarnings("ignore", category=RuntimeWarning, message="mktemp", module=__name__) if hasattr(os, 'stat'): impo...
31.559471
100
0.576947
import tempfile import os import sys import re import errno import warnings import unittest from test import support warnings.filterwarnings("ignore", category=RuntimeWarning, message="mktemp", module=__name__) if hasattr(os, 'stat'): import stat has_stat = 1 e...
true
true
f72b0b29ec60b1e3fa0dcfba14c0246d70315797
1,173
py
Python
peamt/features/polyphony.py
adrienycart/PEAMT
d3ae41e86dedeb64fcf54e2454c9feee993574f9
[ "MIT" ]
5
2020-05-28T18:03:58.000Z
2021-11-01T13:14:26.000Z
peamt/features/polyphony.py
adrienycart/PEAMT
d3ae41e86dedeb64fcf54e2454c9feee993574f9
[ "MIT" ]
5
2020-09-26T01:12:41.000Z
2022-02-10T02:01:25.000Z
peamt/features/polyphony.py
adrienycart/PEAMT
d3ae41e86dedeb64fcf54e2454c9feee993574f9
[ "MIT" ]
null
null
null
import numpy as np ######################################## ### Polyphony --- discarded ######################################## def polyphony_level_diff(roll_output,roll_target): poly_output = np.sum(roll_output,axis=0) poly_target = np.sum(roll_target,axis=0) poly_diff = np.abs(poly_output-poly_target...
30.076923
87
0.656436
import numpy as np def polyphony_level_diff(roll_output,roll_target): poly_output = np.sum(roll_output,axis=0) poly_target = np.sum(roll_target,axis=0) poly_diff = np.abs(poly_output-poly_target) return np.mean(poly_diff),np.std(poly_diff),np.min(poly_diff),np.max(poly_diff) def false_negative_po...
true
true
f72b0bcdbe61d8b42e2ce9462ada3ba434fd8b03
2,078
py
Python
tests/common/test_run/round_run.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
tests/common/test_run/round_run.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
tests/common/test_run/round_run.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
39.961538
120
0.702117
import numpy as np import secrets from tests.common.tensorio import compare_tensor from akg.utils import kernel_exec as utils from tests.common.test_op import round from tests.common.gen_random import random_gaussian secretsGenerator = secrets.SystemRandom() def round_run(shape, dtype, attrs): in_shape = [shape] ...
true
true
f72b0bdf689c564a67a58c7ea477390e6e8c6c23
24,215
py
Python
homeassistant/components/mqtt/fan.py
wlcrs/core
cf27b82d2fdce406fda3b1b9cd52d42d7f7d00d6
[ "Apache-2.0" ]
null
null
null
homeassistant/components/mqtt/fan.py
wlcrs/core
cf27b82d2fdce406fda3b1b9cd52d42d7f7d00d6
[ "Apache-2.0" ]
7
2022-03-01T06:32:08.000Z
2022-03-31T07:20:49.000Z
homeassistant/components/mqtt/fan.py
fblondeau/home-assistant
a8da0eedd32ac8198f06d4e32622d0f8b40b4a41
[ "Apache-2.0" ]
null
null
null
"""Support for MQTT fans.""" from __future__ import annotations import asyncio import functools import logging import math import voluptuous as vol from homeassistant.components import fan from homeassistant.components.fan import ( ATTR_OSCILLATING, ATTR_PERCENTAGE, ATTR_PRESET_MODE, FanEntity, F...
36.800912
102
0.663556
from __future__ import annotations import asyncio import functools import logging import math import voluptuous as vol from homeassistant.components import fan from homeassistant.components.fan import ( ATTR_OSCILLATING, ATTR_PERCENTAGE, ATTR_PRESET_MODE, FanEntity, FanEntityFeature, ) from homea...
true
true
f72b0d77ba36f92d632793f510174fe192e614ec
390
py
Python
src/utils.py
CarlSchader/poker-api
446c036367fdb75f5b0fd7f93f347d839bbf71b6
[ "MIT" ]
null
null
null
src/utils.py
CarlSchader/poker-api
446c036367fdb75f5b0fd7f93f347d839bbf71b6
[ "MIT" ]
null
null
null
src/utils.py
CarlSchader/poker-api
446c036367fdb75f5b0fd7f93f347d839bbf71b6
[ "MIT" ]
null
null
null
import functools def dict_cmp(x, y, key): if str(x[key]) > str(y[key]): return 1 elif str(x[key]) < str(y[key]): return -1 else: return 0 def sort_dict(dictionary, cmp_func): arr = [] for key in dictionary: arr.append((key, dictionary[key])) arr.sort(key=fu...
22.941176
74
0.574359
import functools def dict_cmp(x, y, key): if str(x[key]) > str(y[key]): return 1 elif str(x[key]) < str(y[key]): return -1 else: return 0 def sort_dict(dictionary, cmp_func): arr = [] for key in dictionary: arr.append((key, dictionary[key])) arr.sort(key=fu...
true
true
f72b0e39b7ac8a2190ca5bc480dd257ebdc5b8a6
290
py
Python
generate/partial-header/dataclass/annotation.py
kurusugawa-computer/annofab-api-python-client
9920e0745f1ee8ea79c26e26a61013b415351982
[ "MIT" ]
17
2019-05-04T04:24:28.000Z
2021-12-14T02:43:24.000Z
generate/partial-header/dataclass/annotation.py
kurusugawa-computer/annofab-api-python-client
9920e0745f1ee8ea79c26e26a61013b415351982
[ "MIT" ]
214
2019-05-13T01:07:28.000Z
2022-03-28T20:02:34.000Z
generate/partial-header/dataclass/annotation.py
kurusugawa-computer/annofab-api-python-client
9920e0745f1ee8ea79c26e26a61013b415351982
[ "MIT" ]
2
2019-06-15T05:01:50.000Z
2019-07-04T02:29:55.000Z
from annofabapi.models import ( AdditionalDataDefinitionType, AnnotationDataHoldingType, AnnotationType, InternationalizationMessage, TaskPhase, TaskStatus, ) AnnotationData = Union[str, Dict[str, Any]] FullAnnotationData = Any AdditionalDataValue = Dict[str, Any]
22.307692
43
0.762069
from annofabapi.models import ( AdditionalDataDefinitionType, AnnotationDataHoldingType, AnnotationType, InternationalizationMessage, TaskPhase, TaskStatus, ) AnnotationData = Union[str, Dict[str, Any]] FullAnnotationData = Any AdditionalDataValue = Dict[str, Any]
true
true
f72b0f69d6927ac9a2071aaa3c495a33948a8289
7,677
py
Python
homeassistant/components/epson/media_player.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/epson/media_player.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/epson/media_player.py
mtarjoianu/core
44e9146463ac505eb3d1c0651ad126cb25c28a54
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for Epson projector.""" from __future__ import annotations import logging from epson_projector.const import ( BACK, BUSY, CMODE, CMODE_LIST, CMODE_LIST_SET, DEFAULT_SOURCES, EPSON_CODES, FAST, INV_SOURCES, MUTE, PAUSE, PLAY, POWER, SOURCE, SOURCE_...
31.592593
88
0.655464
from __future__ import annotations import logging from epson_projector.const import ( BACK, BUSY, CMODE, CMODE_LIST, CMODE_LIST_SET, DEFAULT_SOURCES, EPSON_CODES, FAST, INV_SOURCES, MUTE, PAUSE, PLAY, POWER, SOURCE, SOURCE_LIST, STATE_UNAVAILABLE as EPSO...
true
true
f72b112a2a1fc41633e4d17514fd8efbba957fc5
299
py
Python
World 02/Class 13/ex050.py
DanielRios549/PythonExcercises
acb44a7cc383e8534f47bc59235d9cc04fd83880
[ "MIT" ]
6
2021-05-04T22:09:16.000Z
2022-01-08T20:27:39.000Z
World 02/Class 13/ex050.py
DanielRios549/PythonExercises
acb44a7cc383e8534f47bc59235d9cc04fd83880
[ "MIT" ]
null
null
null
World 02/Class 13/ex050.py
DanielRios549/PythonExercises
acb44a7cc383e8534f47bc59235d9cc04fd83880
[ "MIT" ]
null
null
null
''' Get 6 integer numbers and show the sum of the even ones. Do not consider the odd ones. ''' sum_number = 0 for count in range(0, 6): number = int(input('Choose a number: ')) if number % 2 == 0: sum_number += number print(f'The sum of all even numbers equals {sum_number}')
23
90
0.64214
sum_number = 0 for count in range(0, 6): number = int(input('Choose a number: ')) if number % 2 == 0: sum_number += number print(f'The sum of all even numbers equals {sum_number}')
true
true
f72b11dd0aed4940421d5a68bccc46f47f43bad2
6,464
py
Python
integrations/tensorflow/e2e/conv_test.py
rise-lang/iree
46ad3fe392d38ce3df6eff7826cc1ab331a40b72
[ "Apache-2.0" ]
null
null
null
integrations/tensorflow/e2e/conv_test.py
rise-lang/iree
46ad3fe392d38ce3df6eff7826cc1ab331a40b72
[ "Apache-2.0" ]
null
null
null
integrations/tensorflow/e2e/conv_test.py
rise-lang/iree
46ad3fe392d38ce3df6eff7826cc1ab331a40b72
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
36.937143
79
0.642481
import numpy as np from pyiree.tf.support import tf_test_utils import tensorflow.compat.v2 as tf class Conv2dModule(tf.Module): @tf.function(input_signature=[ tf.TensorSpec([1, 4, 5, 1], tf.float32), tf.TensorSpec([1, 1, 1, 1], tf.float32), ]) def conv2d_1451x1111_valid(self, img, kernel): ret...
true
true
f72b11f17c30ee2bf5b08acdb6fe426742382acd
26,208
py
Python
lib/ansiblelint/utils.py
gdoucet/ansible-lint
07b5194b44f6979480f57b96ea3d196fb59c0e7c
[ "MIT" ]
1
2020-01-21T04:30:10.000Z
2020-01-21T04:30:10.000Z
lib/ansiblelint/utils.py
gdoucet/ansible-lint
07b5194b44f6979480f57b96ea3d196fb59c0e7c
[ "MIT" ]
null
null
null
lib/ansiblelint/utils.py
gdoucet/ansible-lint
07b5194b44f6979480f57b96ea3d196fb59c0e7c
[ "MIT" ]
null
null
null
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify...
35.657143
100
0.618781
import glob import imp import os from itertools import product import six from ansible import constants from ansible.errors import AnsibleError try: from ansible.parsing.splitter import split_args except ImportError: # Fallback on the Ansible 1.9 module from ansible.module_utils.splitter import spli...
true
true
f72b120e0e4865b2e5c26ca09713f83332de05bd
43,459
py
Python
kubernetes_state/datadog_checks/kubernetes_state/kubernetes_state.py
tanner-bruce/integrations-core
36337b84fefb73e94d4f1ee28aaeb669dc12fb59
[ "BSD-3-Clause" ]
null
null
null
kubernetes_state/datadog_checks/kubernetes_state/kubernetes_state.py
tanner-bruce/integrations-core
36337b84fefb73e94d4f1ee28aaeb669dc12fb59
[ "BSD-3-Clause" ]
null
null
null
kubernetes_state/datadog_checks/kubernetes_state/kubernetes_state.py
tanner-bruce/integrations-core
36337b84fefb73e94d4f1ee28aaeb669dc12fb59
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2016-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import re import time from collections import Counter, defaultdict from copy import deepcopy from six import iteritems from datadog_checks.checks.openmetrics import OpenMetricsBaseCheck from datadog_checks.co...
52.046707
145
0.625463
import re import time from collections import Counter, defaultdict from copy import deepcopy from six import iteritems from datadog_checks.checks.openmetrics import OpenMetricsBaseCheck from datadog_checks.config import is_affirmative from datadog_checks.errors import CheckException from datadog_checks.utils.common ...
true
true
f72b12c2828be5260fdd70ad443c19b16f2923f0
3,003
py
Python
bin/stock_price_scraper.py
Samanvay96/asx_scraper
4b80ff97bc3d1005aef005c82bd0a6c20d8733dc
[ "MIT" ]
null
null
null
bin/stock_price_scraper.py
Samanvay96/asx_scraper
4b80ff97bc3d1005aef005c82bd0a6c20d8733dc
[ "MIT" ]
null
null
null
bin/stock_price_scraper.py
Samanvay96/asx_scraper
4b80ff97bc3d1005aef005c82bd0a6c20d8733dc
[ "MIT" ]
null
null
null
import urllib.request from datetime import datetime import string from argparse import ArgumentParser import gspread from oauth2client.service_account import ServiceAccountCredentials from bs4 import BeautifulSoup from sortedcontainers import SortedDict class StockPriceScraper: def __init__(self, base_url, stoc...
48.435484
183
0.652681
import urllib.request from datetime import datetime import string from argparse import ArgumentParser import gspread from oauth2client.service_account import ServiceAccountCredentials from bs4 import BeautifulSoup from sortedcontainers import SortedDict class StockPriceScraper: def __init__(self, base_url, stoc...
true
true
f72b1364a37162fb740d304ac9506ad71a4279ec
17,209
py
Python
bitshares/asset.py
ianco/python-bitshares
f9fb23bc32f7bf6ebabb295df8f4056d84f0e859
[ "MIT" ]
null
null
null
bitshares/asset.py
ianco/python-bitshares
f9fb23bc32f7bf6ebabb295df8f4056d84f0e859
[ "MIT" ]
null
null
null
bitshares/asset.py
ianco/python-bitshares
f9fb23bc32f7bf6ebabb295df8f4056d84f0e859
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json from bitsharesbase import operations from bitsharesbase.asset_permissions import ( asset_permissions, force_flag, test_permissions, todict, ) from .blockchainobject import BlockchainObject from .exceptions import AssetDoesNotExistsException from .instance import Bloc...
35.192229
88
0.534895
import json from bitsharesbase import operations from bitsharesbase.asset_permissions import ( asset_permissions, force_flag, test_permissions, todict, ) from .blockchainobject import BlockchainObject from .exceptions import AssetDoesNotExistsException from .instance import BlockchainInstance from gra...
true
true
f72b17196b95f01f3e9c02c59d337099f3b510e2
18,401
py
Python
fedlearner/trainer/estimator.py
bruinxiong/fedlearner
9cdeaf44b279acedd5bc88bbffd4a390697b06aa
[ "Apache-2.0" ]
1
2020-12-02T09:51:29.000Z
2020-12-02T09:51:29.000Z
fedlearner/trainer/estimator.py
bruinxiong/fedlearner
9cdeaf44b279acedd5bc88bbffd4a390697b06aa
[ "Apache-2.0" ]
null
null
null
fedlearner/trainer/estimator.py
bruinxiong/fedlearner
9cdeaf44b279acedd5bc88bbffd4a390697b06aa
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The FedLearner Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.915401
80
0.577469
import os import logging import time import tensorflow.compat.v1 as tf from tensorflow.compat import as_str_any from tensorflow.compat.v1.train import Optimizer from tensorflow.compat.v1.estimator import ModeKeys from tensorflow_estimator.python.estimator import model_fn as model_fn_lib from fedlearner.common.mysql...
true
true
f72b173c37bf64ae1456501212bb02ffe852962a
2,398
py
Python
sdk/python/pulumi_azure_native/azurestack/v20200601preview/get_registration_activation_key.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/azurestack/v20200601preview/get_registration_activation_key.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/azurestack/v20200601preview/get_registration_activation_key.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __...
36.333333
175
0.710592
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities __all__ = [ 'GetRegistrationActivationKeyResult', 'AwaitableGetRegistrationActivationKeyResult', 'get_registration_activation_key', ] @pulumi.output_type cla...
true
true
f72b176a16e94f285b596a275b3c38e265d42aba
11,711
py
Python
onmt/model_builder.py
Nazukixv/OpenNMT-py
6265ddbbe9053b018714ac1fb4be9ec8adbaa128
[ "MIT" ]
11
2019-11-22T16:46:36.000Z
2021-07-17T04:06:14.000Z
onmt/model_builder.py
Nazukixv/OpenNMT-py
6265ddbbe9053b018714ac1fb4be9ec8adbaa128
[ "MIT" ]
3
2019-11-11T05:40:10.000Z
2020-03-05T14:04:38.000Z
onmt/model_builder.py
Nazukixv/OpenNMT-py
6265ddbbe9053b018714ac1fb4be9ec8adbaa128
[ "MIT" ]
3
2020-04-04T12:21:52.000Z
2022-02-27T13:29:45.000Z
""" This file is for models creation, which consults options and creates each encoder and decoder accordingly. """ import re import torch import torch.nn as nn from torch.nn.init import xavier_uniform_ import onmt.inputters as inputters import onmt.modules from onmt.encoders.rnn_encoder import RNNEncoder from onmt.enc...
40.663194
79
0.59252
import re import torch import torch.nn as nn from torch.nn.init import xavier_uniform_ import onmt.inputters as inputters import onmt.modules from onmt.encoders.rnn_encoder import RNNEncoder from onmt.encoders.transformer import TransformerEncoder from onmt.encoders.cnn_encoder import CNNEncoder from onmt.encoders.mea...
true
true
f72b18ac7bf95dbe78dbadf8c1485e348aca0705
870
py
Python
code/extractWAVdata.py
eepsmedia/ping-pong-bounce
8e06363032da88976f14146704af26d9312d195a
[ "MIT" ]
null
null
null
code/extractWAVdata.py
eepsmedia/ping-pong-bounce
8e06363032da88976f14146704af26d9312d195a
[ "MIT" ]
null
null
null
code/extractWAVdata.py
eepsmedia/ping-pong-bounce
8e06363032da88976f14146704af26d9312d195a
[ "MIT" ]
null
null
null
"""Convert a .wav file to .csv Uses the `wave` package to convert a .wav file to a .csv. Assumes that the file is monoaural (one channel). Be sure to edit the code to point to correct values of `inFileName` and `outFileName` """ import wave import numpy inFileName = "../data/pingpong.wav" outFileName = '../data/pi...
22.894737
85
0.658621
import wave import numpy inFileName = "../data/pingpong.wav" outFileName = '../data/pingpong raw redux.csv' f = wave.open(inFileName, 'rb') params = f.getparams() print("There are {} frames.".format(params.nframes)) bytesData = f.readframes(params.nframes) f.close() a = numpy.frombuffer(bytesData, dtype=numpy.dty...
true
true
f72b18b4de5b0fdf2cba2aac9ddd50531ba9f7c0
2,145
py
Python
setup.py
hindman/short-con
45242757ab50a3b8b8b9826704a58006f918955d
[ "MIT" ]
null
null
null
setup.py
hindman/short-con
45242757ab50a3b8b8b9826704a58006f918955d
[ "MIT" ]
null
null
null
setup.py
hindman/short-con
45242757ab50a3b8b8b9826704a58006f918955d
[ "MIT" ]
null
null
null
#! /usr/bin/env python from os.path import dirname, realpath, join from setuptools import setup, find_packages import sys #### # Basic project info. #### project_name = 'short-con' package_name = project_name.replace('-', '_') repo_name = project_name description = 'Constants collections without boilerplate' url...
21.029412
72
0.635897
from os.path import dirname, realpath, join from setuptools import setup, find_packages import sys project_name = 'short-con' package_name = project_name.replace('-', '_') repo_name = project_name description = 'Constants collections without boilerplate' url = 'https://github.com/hindman/' + repo_name a...
true
true
f72b19bcddea7c052af0ab512ac1b3f2f93a86bf
112,844
py
Python
tensorflow/python/ops/variables.py
m4rkl1u/tensorflow
90a8825c7ae9719e8969d45040b4155b0e7de130
[ "Apache-2.0" ]
1
2019-01-14T07:11:06.000Z
2019-01-14T07:11:06.000Z
tensorflow/python/ops/variables.py
m4rkl1u/tensorflow
90a8825c7ae9719e8969d45040b4155b0e7de130
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/variables.py
m4rkl1u/tensorflow
90a8825c7ae9719e8969d45040b4155b0e7de130
[ "Apache-2.0" ]
2
2019-02-26T16:21:15.000Z
2020-12-04T17:48:17.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.135857
134
0.682659
from __future__ import absolute_import from __future__ import division from __future__ import print_function import enum import functools import os import six from tensorflow.core.framework import attr_value_pb2 from tensorflow.core.framework import variable_pb2 from tensorflow.python.eager import context from tenso...
true
true
f72b1a1f689e870dc85c7c284ed9fdf8f206b085
4,540
py
Python
python/tests/serialization/test_deserializers.py
aji-geo/incubator-sedona
ed7a1badf58f0c7efedf79a0a21a9ef6ebd1d6b1
[ "Apache-2.0" ]
1
2021-10-19T07:57:29.000Z
2021-10-19T07:57:29.000Z
python/tests/serialization/test_deserializers.py
aji-geo/incubator-sedona
ed7a1badf58f0c7efedf79a0a21a9ef6ebd1d6b1
[ "Apache-2.0" ]
null
null
null
python/tests/serialization/test_deserializers.py
aji-geo/incubator-sedona
ed7a1badf58f0c7efedf79a0a21a9ef6ebd1d6b1
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
36.32
112
0.624009
import os from shapely.geometry import MultiPoint, Point, MultiLineString, LineString, Polygon, MultiPolygon import geopandas as gpd from tests.data import data_path from tests.test_base import TestBase class TestGeometryConvert(TestBase): def test_register_functions(self): df = self.spark.sql("""SELE...
true
true
f72b1cc1e0211ba34f94051f87bc32ad2cbf8b6f
60
py
Python
src/FLABasicTools/__main__.py
Fair-Lines-America/FLA_basic_tools
9aedc23ef4b9df2bd530c96fedd94e046eb545c8
[ "MIT" ]
17
2020-05-07T20:02:30.000Z
2022-03-02T10:59:28.000Z
src/FLABasicTools/__main__.py
Fair-Lines-America/FLA_basic_tools
9aedc23ef4b9df2bd530c96fedd94e046eb545c8
[ "MIT" ]
3
2021-05-06T17:44:23.000Z
2022-01-27T15:14:44.000Z
src/FLABasicTools/__main__.py
Fair-Lines-America/FLA_basic_tools
9aedc23ef4b9df2bd530c96fedd94e046eb545c8
[ "MIT" ]
null
null
null
from .cli import main if __name__ == '__main__': main()
15
26
0.65
from .cli import main if __name__ == '__main__': main()
true
true
f72b1d438ff6542f0231c5e19b54a4ca0fdfaef9
7,860
py
Python
agent/segmentation.py
johnnylord/trytry-segmentation
a88d75571ddba92bd10ac2d7303bee9426188b62
[ "MIT" ]
null
null
null
agent/segmentation.py
johnnylord/trytry-segmentation
a88d75571ddba92bd10ac2d7303bee9426188b62
[ "MIT" ]
null
null
null
agent/segmentation.py
johnnylord/trytry-segmentation
a88d75571ddba92bd10ac2d7303bee9426188b62
[ "MIT" ]
null
null
null
import os import os.path as osp import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision.transforms as T from torch.utils.data import DataLoader from tensorboardX import SummaryWriter from data.segmentation import SegmentDataset from model.segmentation.fcn import FCN32 from...
38.341463
91
0.549237
import os import os.path as osp import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision.transforms as T from torch.utils.data import DataLoader from tensorboardX import SummaryWriter from data.segmentation import SegmentDataset from model.segmentation.fcn import FCN32 from...
true
true
f72b1e7549524106a9f828129970b89627719521
51,593
py
Python
temporal/core.py
karttur/geoimagine02-grass
09c207707ddd0dae04a871e006e184409aa87d99
[ "BSD-3-Clause" ]
null
null
null
temporal/core.py
karttur/geoimagine02-grass
09c207707ddd0dae04a871e006e184409aa87d99
[ "BSD-3-Clause" ]
null
null
null
temporal/core.py
karttur/geoimagine02-grass
09c207707ddd0dae04a871e006e184409aa87d99
[ "BSD-3-Clause" ]
null
null
null
""" This module provides the functionality to create the temporal SQL database and to establish a connection to the database. Usage: .. code-block:: python >>> import grass.temporal as tgis >>> # Create the temporal database >>> tgis.init() >>> # Establish a database connection >>> dbif, connecte...
37.170749
100
0.589111
import os import sys import grass.script as gscript if sys.version_info.major == 3: long = int from .c_libraries_interface import * from grass.pygrass import messages from grass.script.utils import decode, encode try: import sqlite3 except ImportError: pass try: import psycopg2 import psycopg2.ext...
true
true
f72b21cb7cd90c4cedf514ee804f2b47f748ee67
4,395
py
Python
runner.py
Robinson04/mdscript
7a89a4453f0266a5ed318eceebc12b401e419ff4
[ "MIT" ]
null
null
null
runner.py
Robinson04/mdscript
7a89a4453f0266a5ed318eceebc12b401e419ff4
[ "MIT" ]
1
2021-07-27T21:03:40.000Z
2021-07-27T21:03:40.000Z
runner.py
Robinson04/mdscript
7a89a4453f0266a5ed318eceebc12b401e419ff4
[ "MIT" ]
null
null
null
import logging import os import re from pathlib import Path from typing import Any from mdscript.files_dependencies_manager import FilesDependenciesManager from mdscript.watcher import Watcher class Runner: def __init__(self, config: Any, base_dirpath: str): self.config = config self.base_dirpath...
49.943182
145
0.669852
import logging import os import re from pathlib import Path from typing import Any from mdscript.files_dependencies_manager import FilesDependenciesManager from mdscript.watcher import Watcher class Runner: def __init__(self, config: Any, base_dirpath: str): self.config = config self.base_dirpath...
true
true
f72b239857d42e26a3ecdb3d5902e5cf5b358e32
2,569
py
Python
verilator/dut_gen.py
mlulaj/fuzzing
81e17a3363490361475bfd9ae28a5ae495be27b8
[ "BSD-3-Clause" ]
48
2018-09-26T03:35:37.000Z
2022-03-20T05:05:56.000Z
verilator/dut_gen.py
mlulaj/fuzzing
81e17a3363490361475bfd9ae28a5ae495be27b8
[ "BSD-3-Clause" ]
10
2018-07-19T21:16:22.000Z
2021-09-06T22:21:01.000Z
verilator/dut_gen.py
mlulaj/fuzzing
81e17a3363490361475bfd9ae28a5ae495be27b8
[ "BSD-3-Clause" ]
6
2020-02-06T01:33:54.000Z
2021-08-29T21:20:47.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018, Kevin Laeufer <ekiwi@berkeley.edu> # Generates the `dut.hpp` file which contains dut specific interface code # from the TOML dut description file. import os, sys, argparse import toml template = """ // This file was generated from {conf_toml} using th...
30.583333
82
0.708836
import os, sys, argparse import toml template = """ // This file was generated from {conf_toml} using the dut_gen.py script. // It contains DUt specific interface code for the verilator C++ test harness. #ifndef DUT_CONF_HPP #define DUT_CONF_HPP #if defined(E2E) #include <V{toplevel}_E2EHarness.h> #define TOP_TYP...
true
true
f72b24aadd868431479c08d35f7980c4d40e563c
5,289
py
Python
deepctr/models/din.py
BradyBromley/DeepCTR
3d12ffc0e0a5e893dce8bd315824c180445b772e
[ "Apache-2.0" ]
2
2019-11-07T10:17:40.000Z
2020-04-13T14:25:14.000Z
deepctr/models/din.py
BradyBromley/DeepCTR
3d12ffc0e0a5e893dce8bd315824c180445b772e
[ "Apache-2.0" ]
7
2019-12-16T22:22:25.000Z
2022-02-10T00:37:34.000Z
deepctr/models/din.py
BradyBromley/DeepCTR
3d12ffc0e0a5e893dce8bd315824c180445b772e
[ "Apache-2.0" ]
1
2020-01-07T09:12:21.000Z
2020-01-07T09:12:21.000Z
# -*- coding:utf-8 -*- """ Author: Weichen Shen,wcshen1994@163.com Reference: [1] Zhou G, Zhu X, Song C, et al. Deep interest network for click-through rate prediction[C]//Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining. ACM, 2018: 1059-1068. (https://arxiv.org/...
52.366337
256
0.772169
from tensorflow.python.keras.layers import Dense,Concatenate, Flatten from tensorflow.python.keras.models import Model from ..inputs import build_input_features,create_embedding_matrix,SparseFeat,VarLenSparseFeat,DenseFeat,embedding_lookup,get_dense_input,varlen_embedding_lookup,get_varlen_pooling_list,combined_dnn...
true
true
f72b252e105b7da5db34c619077f0de2012fa5c7
301
py
Python
deeplab3/evaluators/__init__.py
crmauceri/pytorch-deeplab-xception
aec2cb7b0c09c346519c6bf22c2cbf419021fdc7
[ "MIT" ]
1
2021-12-11T08:21:19.000Z
2021-12-11T08:21:19.000Z
deeplab3/evaluators/__init__.py
crmauceri/rgbd_deeplab
aec2cb7b0c09c346519c6bf22c2cbf419021fdc7
[ "MIT" ]
null
null
null
deeplab3/evaluators/__init__.py
crmauceri/rgbd_deeplab
aec2cb7b0c09c346519c6bf22c2cbf419021fdc7
[ "MIT" ]
null
null
null
from deeplab3.evaluators.segmentation_evaluator import SegmentationEvaluator def make_evaluator(cfg, num_classes): if cfg.EVALUATOR.NAME == "segmentation": return SegmentationEvaluator(num_classes) else: raise ValueError("Model not implemented: {}".format(cfg.EVALUATOR.NAME))
43
80
0.76412
from deeplab3.evaluators.segmentation_evaluator import SegmentationEvaluator def make_evaluator(cfg, num_classes): if cfg.EVALUATOR.NAME == "segmentation": return SegmentationEvaluator(num_classes) else: raise ValueError("Model not implemented: {}".format(cfg.EVALUATOR.NAME))
true
true
f72b25859b28cd579a78605dc1ed921ca8af258c
3,159
py
Python
analytics/models.py
SmithJesko/volny-films
7c50713eb1d2c2d5984700a5de20a12e4045e1b9
[ "MIT" ]
1
2021-02-23T00:12:43.000Z
2021-02-23T00:12:43.000Z
analytics/models.py
SmithJesko/volny-films
7c50713eb1d2c2d5984700a5de20a12e4045e1b9
[ "MIT" ]
null
null
null
analytics/models.py
SmithJesko/volny-films
7c50713eb1d2c2d5984700a5de20a12e4045e1b9
[ "MIT" ]
1
2021-02-23T06:04:13.000Z
2021-02-23T06:04:13.000Z
from django.contrib.auth import get_user_model from django.db import models User = get_user_model() class ClientConnection(models.Model): ip = models.CharField(max_length=50, default="xxx", blank=True, null=True) url = models.CharField(max_length=512, default="xxx", blank=True, null=True) timestamp = mod...
41.565789
83
0.719848
from django.contrib.auth import get_user_model from django.db import models User = get_user_model() class ClientConnection(models.Model): ip = models.CharField(max_length=50, default="xxx", blank=True, null=True) url = models.CharField(max_length=512, default="xxx", blank=True, null=True) timestamp = mod...
true
true
f72b2611795c1b7d27319858d6c69d00eadf80ef
32,514
py
Python
old_projects/eola/chapter8p2.py
thevivekpandey/manim
483dbfc232fa684e7722969221bd416fde8bd55a
[ "MIT" ]
9
2019-12-17T04:59:53.000Z
2020-11-10T21:02:41.000Z
old_projects/eola/chapter8p2.py
Hammer7/manim
a19a6317ec187f65efb0c8f46bc613b4a978d22a
[ "MIT" ]
5
2021-03-19T03:01:04.000Z
2022-03-11T23:57:24.000Z
old_projects/eola/chapter8p2.py
Hammer7/manim
a19a6317ec187f65efb0c8f46bc613b4a978d22a
[ "MIT" ]
3
2020-04-12T16:50:57.000Z
2020-07-19T17:53:53.000Z
from manimlib.imports import * from old_projects.eola.chapter5 import get_det_text from old_projects.eola.chapter8 import * class OpeningQuote(Scene): def construct(self): words = TextMobject( "From [Grothendieck], I have also learned not", "to take glory in the ", "di...
32.975659
82
0.557637
from manimlib.imports import * from old_projects.eola.chapter5 import get_det_text from old_projects.eola.chapter8 import * class OpeningQuote(Scene): def construct(self): words = TextMobject( "From [Grothendieck], I have also learned not", "to take glory in the ", "di...
true
true
f72b264401ddefa4e28e25f16a1019753ba3292c
1,370
py
Python
python/coffer/coins/btc.py
Steve132/wallet_standard
09c909b24dc17cf6a0a433644d8f1912e886ab1c
[ "MIT" ]
null
null
null
python/coffer/coins/btc.py
Steve132/wallet_standard
09c909b24dc17cf6a0a433644d8f1912e886ab1c
[ "MIT" ]
null
null
null
python/coffer/coins/btc.py
Steve132/wallet_standard
09c909b24dc17cf6a0a433644d8f1912e886ab1c
[ "MIT" ]
null
null
null
from ..wallet import * from _coin import * from ..bip32 import Bip32 from blockchain._insight import InsightBlockchainInterface from blockchain._interface import MultiBlockchainInterface from impl._segwitcoin import * class BTC(SegwitCoin): def __init__(self,is_testnet=False): #self.supported=True if(not is_test...
26.346154
75
0.734307
from ..wallet import * from _coin import * from ..bip32 import Bip32 from blockchain._insight import InsightBlockchainInterface from blockchain._interface import MultiBlockchainInterface from impl._segwitcoin import * class BTC(SegwitCoin): def __init__(self,is_testnet=False): if(not is_testnet): pkh_prefix=0...
true
true
f72b27956bef78d99560b5b1289b72d9c87c03d4
1,672
py
Python
adminmgr/media/code/A3/task2/BD_151_987_1496_1503_KYP9LpV.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/A3/task2/BD_151_987_1496_1503_KYP9LpV.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/A3/task2/BD_151_987_1496_1503_KYP9LpV.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
from pyspark.sql import SparkSession from pyspark.sql.functions import explode,split,desc,max from pyspark.sql.types import * from pyspark.sql.types import StringType, StructType, StructField spark = SparkSession \ .builder \ .appName("StructuredStreaming") \ .getOrCreate() inputpath="hdfs://localhost:9000...
44
117
0.600478
from pyspark.sql import SparkSession from pyspark.sql.functions import explode,split,desc,max from pyspark.sql.types import * from pyspark.sql.types import StringType, StructType, StructField spark = SparkSession \ .builder \ .appName("StructuredStreaming") \ .getOrCreate() inputpath="hdfs://localhost:9000...
true
true
f72b2840162bfc1b4ca923abd4640365761a2d0e
19,645
py
Python
wagtail_wordpress_import/test/tests/test_wordpress_item.py
fabienheureux/wagtail-wordpress-import
3c27330258e24a6b52f3d580060f607706bbc9d0
[ "MIT" ]
null
null
null
wagtail_wordpress_import/test/tests/test_wordpress_item.py
fabienheureux/wagtail-wordpress-import
3c27330258e24a6b52f3d580060f607706bbc9d0
[ "MIT" ]
null
null
null
wagtail_wordpress_import/test/tests/test_wordpress_item.py
fabienheureux/wagtail-wordpress-import
3c27330258e24a6b52f3d580060f607706bbc9d0
[ "MIT" ]
null
null
null
import json import os import re import unittest from collections import Counter from datetime import datetime from unittest import mock from xml.dom import pulldom from django.test import TestCase, override_settings from wagtail.core.models import Page from example.models import Category from wagtail_wordpress_import...
40.256148
114
0.67269
import json import os import re import unittest from collections import Counter from datetime import datetime from unittest import mock from xml.dom import pulldom from django.test import TestCase, override_settings from wagtail.core.models import Page from example.models import Category from wagtail_wordpress_import...
true
true
f72b287c0755998110f1fa14c9a7bd080f42dee2
1,251
py
Python
azure/mgmt/network/v2016_09_01/models/express_route_circuits_routes_table_summary_list_result.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure/mgmt/network/v2016_09_01/models/express_route_circuits_routes_table_summary_list_result.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure/mgmt/network/v2016_09_01/models/express_route_circuits_routes_table_summary_list_result.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.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 ...
36.794118
85
0.631495
from msrest.serialization import Model class ExpressRouteCircuitsRoutesTableSummaryListResult(Model): _attribute_map = { 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__(self, value=None, next_l...
true
true
f72b28a897f88f7a2835dba9ffb1efe2af6ae2d4
4,626
py
Python
purity_fb/purity_fb_1dot8dot1/models/alert_watcher_test_response.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
5
2017-09-08T20:47:22.000Z
2021-06-29T02:11:05.000Z
purity_fb/purity_fb_1dot8dot1/models/alert_watcher_test_response.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
16
2017-11-27T20:57:48.000Z
2021-11-23T18:46:43.000Z
purity_fb/purity_fb_1dot8dot1/models/alert_watcher_test_response.py
tlewis-ps/purity_fb_python_client
652835cbd485c95a86da27f8b661679727ec6ea0
[ "Apache-2.0" ]
22
2017-10-13T15:33:05.000Z
2021-11-08T19:56:21.000Z
# coding: utf-8 """ Pure Storage FlashBlade REST 1.8.1 Python SDK Pure Storage FlashBlade REST 1.8.1 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). OpenAPI spec version: 1.8.1 Cont...
30.635762
206
0.607436
import pprint import re import six class AlertWatcherTestResponse(object): __test__ = False swagger_types = { 'pagination_info': 'PaginationInfo', 'items': 'list[AlertWatcherTest]' } attribute_map = { 'pagination_info': 'pagination_info', 'items': 'items' ...
true
true
f72b28d1d6a43d1771d51b5748f4617a33315439
7,739
py
Python
code/searchJeuxDeMots.py
AnthonySigogne/HackatonIWCS2017
d0683a1c8246b75d110984207ec1f1cee67accef
[ "MIT" ]
1
2017-11-20T17:30:31.000Z
2017-11-20T17:30:31.000Z
code/searchJeuxDeMots.py
AnthonySigogne/HackatonIWCS2017
d0683a1c8246b75d110984207ec1f1cee67accef
[ "MIT" ]
null
null
null
code/searchJeuxDeMots.py
AnthonySigogne/HackatonIWCS2017
d0683a1c8246b75d110984207ec1f1cee67accef
[ "MIT" ]
null
null
null
#!/usr/sfw/bin/python # -*- coding: utf-8 -*- #C:\python27\python.exe C:\Dropbox\Work\2012ExpressionsComposees\CreateGraph.py import sys, os, re, string, time from math import * #------------------------------ # Chargement des paramètres #------------------------------ args={} i=1; selectedRelations = {} selectedRel...
35.663594
124
0.505492
import sys, os, re, string, time from math import * args={} i=1; selectedRelations = {} selectedRelations[6] = "r_isa" selectedRelations[9] = "r_has_part" selectedRelations[16] = "r_instr" selectedRelations[17] = "r_carac" selectedRelations[23] = "r_carac-1" selectedRelations[15] = "r_lieu" selectedRelations[24] = "...
true
true
f72b28ec393014292fff2aac3ffa0f3a488e9bda
170
py
Python
handlers/sr.py
flaviopicci/xen-backup
306667f6ce3fd81d98b7a73312e37ad01f91c287
[ "Apache-2.0" ]
null
null
null
handlers/sr.py
flaviopicci/xen-backup
306667f6ce3fd81d98b7a73312e37ad01f91c287
[ "Apache-2.0" ]
null
null
null
handlers/sr.py
flaviopicci/xen-backup
306667f6ce3fd81d98b7a73312e37ad01f91c287
[ "Apache-2.0" ]
null
null
null
from handlers.common import Common class SR(Common): _type = "SR" def __init__(self, xapi, ref=None, params=None): super().__init__(xapi, ref, params)
18.888889
52
0.658824
from handlers.common import Common class SR(Common): _type = "SR" def __init__(self, xapi, ref=None, params=None): super().__init__(xapi, ref, params)
true
true
f72b296dc9ecbc509d9451f3cf12c463f5785fef
790
py
Python
junk/pull_photos.py
simplegeo/betashapes
25d964c6dc20281b8f4c0b9049cd417af3e21e35
[ "PostgreSQL", "Unlicense" ]
14
2015-02-13T16:35:28.000Z
2021-01-18T04:20:50.000Z
junk/pull_photos.py
simplegeo/betashapes
25d964c6dc20281b8f4c0b9049cd417af3e21e35
[ "PostgreSQL", "Unlicense" ]
null
null
null
junk/pull_photos.py
simplegeo/betashapes
25d964c6dc20281b8f4c0b9049cd417af3e21e35
[ "PostgreSQL", "Unlicense" ]
1
2017-03-23T22:09:36.000Z
2017-03-23T22:09:36.000Z
#!/usr/bin/python import sys import csv #first arg: input file, csv. column woe_id should be the list of woe_ids we want to pull out of photos.txt #second arg: output file, txt subset of photos.txt (also remove photoid. samplr not expecting it) def main(): infile = sys.argv[1] outfile = sys.argv[2] phot...
22.571429
106
0.605063
import sys import csv def main(): infile = sys.argv[1] outfile = sys.argv[2] photofile = "photos.txt" woes = [] ireader = csv.DictReader(open(infile, 'r')) for line in ireader: woes.append(line['woe_id']) pfh = open(photofile, 'r') ofh = open(outfile, 'w') outstr = "%...
true
true
f72b29d93a56efc5fafb086551352e0cba9256da
7,352
py
Python
electrum/plugins/labels/labels.py
hodlwave/electrum
52f8aafb604d05487a0612f65bacb966c0d0f569
[ "MIT" ]
4
2020-06-27T22:43:34.000Z
2021-04-12T02:29:30.000Z
electrum/plugins/labels/labels.py
hodlwave/electrum
52f8aafb604d05487a0612f65bacb966c0d0f569
[ "MIT" ]
21
2020-06-20T15:02:50.000Z
2021-04-07T10:14:59.000Z
electrum/plugins/labels/labels.py
hodlwave/electrum
52f8aafb604d05487a0612f65bacb966c0d0f569
[ "MIT" ]
13
2020-06-28T08:13:28.000Z
2021-12-28T00:11:56.000Z
import asyncio import hashlib import json import sys import traceback from typing import Union, TYPE_CHECKING import base64 from electrum.plugin import BasePlugin, hook from electrum.crypto import aes_encrypt_with_iv, aes_decrypt_with_iv from electrum.i18n import _ from electrum.util import log_exceptions, ignore_exc...
37.896907
118
0.616159
import asyncio import hashlib import json import sys import traceback from typing import Union, TYPE_CHECKING import base64 from electrum.plugin import BasePlugin, hook from electrum.crypto import aes_encrypt_with_iv, aes_decrypt_with_iv from electrum.i18n import _ from electrum.util import log_exceptions, ignore_exc...
true
true
f72b2ad2a58898693037001dda7e833ae44efbc4
682
py
Python
pyntcloud/structures/kdtree.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/structures/kdtree.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/structures/kdtree.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
from scipy.spatial import cKDTree from .base import Structure class KDTree(cKDTree, Structure): def __init__(self, *, points, leafsize=16, compact_nodes=False, balanced_tree=False): Structure.__init__(self, points=points) self._leafsize = leafsize self._compact_nodes = compact_nodes ...
31
96
0.66129
from scipy.spatial import cKDTree from .base import Structure class KDTree(cKDTree, Structure): def __init__(self, *, points, leafsize=16, compact_nodes=False, balanced_tree=False): Structure.__init__(self, points=points) self._leafsize = leafsize self._compact_nodes = compact_nodes ...
true
true
f72b2b40cbc83a0f7d47d5e52998f5659b19648e
1,216
py
Python
facemask.py
bhargavyagnik/FaceMaskDetection
990c41a921a2a8a7760492a8dd21e4ab51391e51
[ "MIT" ]
null
null
null
facemask.py
bhargavyagnik/FaceMaskDetection
990c41a921a2a8a7760492a8dd21e4ab51391e51
[ "MIT" ]
null
null
null
facemask.py
bhargavyagnik/FaceMaskDetection
990c41a921a2a8a7760492a8dd21e4ab51391e51
[ "MIT" ]
null
null
null
import tensorflow as tf import cv2 import numpy as np model = tf.keras.models.load_model('saved_model/model_3.h5') face_clsfr = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') source = cv2.VideoCapture(1) labels_dict = {0: 'with_mask', 1: 'without_mask'} color_dict = {0: (0, 255, 0), 1: (0, 0,...
30.4
75
0.578947
import tensorflow as tf import cv2 import numpy as np model = tf.keras.models.load_model('saved_model/model_3.h5') face_clsfr = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') source = cv2.VideoCapture(1) labels_dict = {0: 'with_mask', 1: 'without_mask'} color_dict = {0: (0, 255, 0), 1: (0, 0,...
true
true
f72b2cd039ad9416819b474d149c3f6fbea635ff
20,451
py
Python
archive/canvas_test_6.py
bperez7/moments_models
d83e67b5d85f611ebf8dc10bc0d7569c962a37c2
[ "BSD-2-Clause" ]
null
null
null
archive/canvas_test_6.py
bperez7/moments_models
d83e67b5d85f611ebf8dc10bc0d7569c962a37c2
[ "BSD-2-Clause" ]
null
null
null
archive/canvas_test_6.py
bperez7/moments_models
d83e67b5d85f611ebf8dc10bc0d7569c962a37c2
[ "BSD-2-Clause" ]
null
null
null
import cv2 import os import time import subprocess #from matplotlib import pyplot as plt import numpy as np #from test_video import get_predictions_results #cam_capture = cv2.VideoCapture(0) #cv2.destroyAllWindows() """ TODO: 1. Start video at specified time 2. Right click to indicate trimming points 3. Output file n...
33.691928
156
0.509413
import cv2 import os import time import subprocess import numpy as np frame_time = 10 frame_count = 0 global_trim_time = None crop_started = False class VideoCropTool: def __init__(self, video_path, output_file, output_folder, video_start_time, capture, output_label, time_window_on = F...
true
true
f72b2cffb7796783443939305fa1035e7ad944b2
13,043
py
Python
cltk/tests/test_nlp/test_tag.py
mcnorton05/cltk
80dbbd6ee378ed4a6dd1723e4405e314b25f1638
[ "MIT" ]
1
2020-05-01T08:21:22.000Z
2020-05-01T08:21:22.000Z
cltk/tests/test_nlp/test_tag.py
ecomp-shONgit/cltk
7bc3ffd1bbbfa5d036297395d7e51b99b25b81ea
[ "MIT" ]
null
null
null
cltk/tests/test_nlp/test_tag.py
ecomp-shONgit/cltk
7bc3ffd1bbbfa5d036297395d7e51b99b25b81ea
[ "MIT" ]
null
null
null
"""Test cltk.tag.""" import os import shutil import unittest from cltk.corpus.utils.importer import CorpusImporter from cltk.stem.latin.j_v import JVReplacer from cltk.tag import ner from cltk.tag.ner import NamedEntityReplacer from cltk.tag.pos import POSTag __license__ = 'MIT License. See LICENSE.' class TestSeq...
47.952206
230
0.662501
import os import shutil import unittest from cltk.corpus.utils.importer import CorpusImporter from cltk.stem.latin.j_v import JVReplacer from cltk.tag import ner from cltk.tag.ner import NamedEntityReplacer from cltk.tag.pos import POSTag __license__ = 'MIT License. See LICENSE.' class TestSequenceFunctions(unitte...
true
true
f72b2f24626e265d01ae282b3f14a253aa950b3b
307
py
Python
src/dataleach/__init__.py
janies/dataleach
cf8c8784f3fe44cf8f89b7174ba36cb6c56d49d7
[ "BSD-3-Clause" ]
1
2021-11-08T13:57:52.000Z
2021-11-08T13:57:52.000Z
src/dataleach/tests/dataleach/sources/__init__.py
janies/dataleach
cf8c8784f3fe44cf8f89b7174ba36cb6c56d49d7
[ "BSD-3-Clause" ]
null
null
null
src/dataleach/tests/dataleach/sources/__init__.py
janies/dataleach
cf8c8784f3fe44cf8f89b7174ba36cb6c56d49d7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # Copyright © 2010, RedJack, LLC. # All rights reserved. # # Please see the LICENSE.txt file in this distribution for license # details. # ----------------------------------------------------------------------
34.111111
72
0.361564
true
true
f72b2fafee0e530b65dccaf38409dffa74760181
3,545
py
Python
hddcoin/timelord/timelord_launcher.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
null
null
null
hddcoin/timelord/timelord_launcher.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
null
null
null
hddcoin/timelord/timelord_launcher.py
JakubSido/hddcoin-blockchain
7b9da03edee3512295c0f142c07c4759512ccbca
[ "Apache-2.0" ]
null
null
null
import asyncio import logging import pathlib import signal import socket import time from typing import Dict, List import pkg_resources from hddcoin.util.hddcoin_logging import initialize_logging from hddcoin.util.config import load_config from hddcoin.util.default_root import DEFAULT_ROOT_PATH from hddcoin.util.setp...
30.560345
87
0.655289
import asyncio import logging import pathlib import signal import socket import time from typing import Dict, List import pkg_resources from hddcoin.util.hddcoin_logging import initialize_logging from hddcoin.util.config import load_config from hddcoin.util.default_root import DEFAULT_ROOT_PATH from hddcoin.util.setp...
true
true
f72b3050bfccbe4c42d8488a0a707b9ddf77dbd2
485
py
Python
scripts/venv/Scripts/easy_install-3.7-script.py
michaelfaerber/Agnos
b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf
[ "MIT" ]
null
null
null
scripts/venv/Scripts/easy_install-3.7-script.py
michaelfaerber/Agnos
b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf
[ "MIT" ]
3
2021-12-10T01:22:05.000Z
2021-12-14T21:33:16.000Z
scripts/venv/Scripts/easy_install-3.7-script.py
michaelfaerber/Agnos
b4b6ff9cdca9090fb426f1fc2cead8e5ef4ad9bf
[ "MIT" ]
null
null
null
#!K:\2018_SS\BMW_Thesis\workspace_bmw\Thesis_KG_Agnostic_EL\scripts\venv\Scripts\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7' __requires__ = 'setuptools==39.1.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[...
37.307692
91
0.709278
__requires__ = 'setuptools==39.1.0' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit( load_entry_point('setuptools==39.1.0', 'console_scripts', 'easy_install-3.7')() )
true
true
f72b30581d8ef30df8d3b88fde755c65a6390087
15,737
py
Python
dssm/data_input.py
nlpming/tensorflow-DSMM
dc982cc49bf03f474da2895e4dd4fb37061c0271
[ "MIT" ]
null
null
null
dssm/data_input.py
nlpming/tensorflow-DSMM
dc982cc49bf03f474da2895e4dd4fb37061c0271
[ "MIT" ]
null
null
null
dssm/data_input.py
nlpming/tensorflow-DSMM
dc982cc49bf03f474da2895e4dd4fb37061c0271
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding=utf-8 from inspect import getblock import json import os from os import read from numpy.core.fromnumeric import mean import numpy as np import paddlehub as hub import six import math import random import sys from util import read_file from config import Config # 配置文件 conf = Config() c...
37.20331
129
0.599797
from inspect import getblock import json import os from os import read from numpy.core.fromnumeric import mean import numpy as np import paddlehub as hub import six import math import random import sys from util import read_file from config import Config conf = Config() class Vocabulary(object): def __init__(self...
true
true
f72b319c6f56785827dd2160e2b9d041dde23ada
5,281
py
Python
experiments/ashvin/icml2020/hand/brac/test_video1.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/ashvin/icml2020/hand/brac/test_video1.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/ashvin/icml2020/hand/brac/test_video1.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
""" AWR + SAC from demo experiment """ from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args import rlkit.misc.hyperparameter as hyp from rlkit.launchers.arglauncher import run_variants from rlkit.torch.sac.policies im...
30.883041
80
0.566938
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args import rlkit.misc.hyperparameter as hyp from rlkit.launchers.arglauncher import run_variants from rlkit.torch.sac.policies import GaussianPolicy from rlkit.torch.ne...
true
true
f72b32a4095f35d7bed6ab5e19378d3c4f4d06be
1,876
py
Python
tests/test_airconditioning.py
izumi-system-arai/builelib
ae7c36df1ef7477e9a0356559b2694aabff11bb3
[ "MIT" ]
5
2020-09-04T13:56:45.000Z
2022-03-06T05:46:55.000Z
tests/test_airconditioning.py
izumi-system-arai/builelib
ae7c36df1ef7477e9a0356559b2694aabff11bb3
[ "MIT" ]
1
2021-08-17T07:11:42.000Z
2021-08-17T07:11:42.000Z
tests/test_airconditioning.py
izumi-system-arai/builelib
ae7c36df1ef7477e9a0356559b2694aabff11bb3
[ "MIT" ]
2
2021-07-06T09:41:20.000Z
2021-08-02T08:47:13.000Z
import pandas as pd import csv from builelib import airconditioning import pytest import json import xlrd ### テストファイル名 ### # 辞書型 テスト名とファイル名 testcase_dict = { "AHU_basic": "./tests/airconditioning/★空調設備テストケース一覧.xlsx", } def convert2number(x, default): ''' 空欄にデフォルト値を代入する ''' if x == "": x ...
21.563218
92
0.647122
import pandas as pd import csv from builelib import airconditioning import pytest import json import xlrd testcase_dict = { "AHU_basic": "./tests/airconditioning/★空調設備テストケース一覧.xlsx", } def convert2number(x, default): if x == "": x = default else: x = float(x) return x def read_test...
true
true
f72b338ae3488cd29a445fe80006558b89a53eb0
3,209
py
Python
API/moviepiapi/utils.py
theoarmengou/MoviePi
b889ed1609e3db096b86452e3ca608822edcdb1a
[ "MIT" ]
1
2020-01-08T12:09:14.000Z
2020-01-08T12:09:14.000Z
API/moviepiapi/utils.py
theoarmengou/MoviePi
b889ed1609e3db096b86452e3ca608822edcdb1a
[ "MIT" ]
null
null
null
API/moviepiapi/utils.py
theoarmengou/MoviePi
b889ed1609e3db096b86452e3ca608822edcdb1a
[ "MIT" ]
1
2020-10-30T10:33:19.000Z
2020-10-30T10:33:19.000Z
## # EPITECH PROJECT, 2019 # MoviePi # File description: # utils.py ## import datetime import jwt from moviepiapi.dbHelper import dbHelper from moviepiapi.userHelper import userHelper ret_packet = {'responseStatus': 0, 'message': "", 'data': any} Key = 'MoviePiTheoAudreyHicham' LEN_MAX_USER = 255 db = dbHelper('movi...
30.561905
100
0.621377
import datetime import jwt from moviepiapi.dbHelper import dbHelper from moviepiapi.userHelper import userHelper ret_packet = {'responseStatus': 0, 'message': "", 'data': any} Key = 'MoviePiTheoAudreyHicham' LEN_MAX_USER = 255 db = dbHelper('moviepi_api', 'moviepi_api', 'moviepi', '51.75.141.254') userH = userHelper...
true
true
f72b33a87fd87b89f914f36a973b364e5a397d6d
471
py
Python
basics/src/simple_action_client.py
jescasany/rosbook
a79258e7fa80eb4f8745850125d6b2e462a62dee
[ "Apache-2.0" ]
null
null
null
basics/src/simple_action_client.py
jescasany/rosbook
a79258e7fa80eb4f8745850125d6b2e462a62dee
[ "Apache-2.0" ]
null
null
null
basics/src/simple_action_client.py
jescasany/rosbook
a79258e7fa80eb4f8745850125d6b2e462a62dee
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python import roslib; roslib.load_manifest('basics') import rospy import actionlib from basics.msg import TimerAction, TimerGoal, TimerResult rospy.init_node('timer_action_client') client = actionlib.SimpleActionClient('timer', TimerAction) client.wait_for_server() goal = TimerGoal() goal.time_to_wait...
27.705882
69
0.794055
import roslib; roslib.load_manifest('basics') import rospy import actionlib from basics.msg import TimerAction, TimerGoal, TimerResult rospy.init_node('timer_action_client') client = actionlib.SimpleActionClient('timer', TimerAction) client.wait_for_server() goal = TimerGoal() goal.time_to_wait = rospy.Duration.from_...
true
true
f72b34ac6ea7004cf31e6dccd1805b12ef0d95bf
2,106
py
Python
gmprocess/waveform_processing/clipping/clipping_check.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
null
null
null
gmprocess/waveform_processing/clipping/clipping_check.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
null
null
null
gmprocess/waveform_processing/clipping/clipping_check.py
baagaard-usgs/groundmotion-processing
6be2b4460d598bba0935135efa85af2655578565
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from obspy.geodetics.base import gps2dist_azimuth from gmprocess.waveform_processing.clipping.clipping_ann import clipNet from gmprocess.waveform_processing.clipping.max_amp import Max_Amp from gmprocess.waveform_processing.clipping.histogram import Hi...
26.658228
79
0.646724
import numpy as np from obspy.geodetics.base import gps2dist_azimuth from gmprocess.waveform_processing.clipping.clipping_ann import clipNet from gmprocess.waveform_processing.clipping.max_amp import Max_Amp from gmprocess.waveform_processing.clipping.histogram import Histogram from gmprocess.waveform_processing.cli...
true
true
f72b36d5fb0cf98eeb2d459b179cfde55b038f13
2,311
py
Python
model.py
bhardwajRahul/RestaurantAPI
28d7fcd3fbe0524750321102625d8475515f54ed
[ "MIT" ]
15
2018-06-03T16:35:16.000Z
2022-02-13T16:36:37.000Z
model.py
bhardwajRahul/RestaurantAPI
28d7fcd3fbe0524750321102625d8475515f54ed
[ "MIT" ]
2
2019-02-11T07:03:09.000Z
2021-02-25T09:16:15.000Z
model.py
navi25/RestaurantAPI
28d7fcd3fbe0524750321102625d8475515f54ed
[ "MIT" ]
9
2019-02-08T11:17:34.000Z
2022-01-29T00:27:14.000Z
from flask import Flask from marshmallow import Schema, fields, pre_load, validate from flask_marshmallow import Marshmallow from flask_sqlalchemy import SQLAlchemy from flask_redis import FlaskRedis ma = Marshmallow() db = SQLAlchemy() redis_cache = FlaskRedis() class FoodModel(db.Model): __tablename__ = 'foods'...
35.553846
110
0.719169
from flask import Flask from marshmallow import Schema, fields, pre_load, validate from flask_marshmallow import Marshmallow from flask_sqlalchemy import SQLAlchemy from flask_redis import FlaskRedis ma = Marshmallow() db = SQLAlchemy() redis_cache = FlaskRedis() class FoodModel(db.Model): __tablename__ = 'foods'...
true
true
f72b36f1c01c85d1f6f16819bc764c32780c7fb6
22,006
py
Python
sdk/python/pulumi_azure_native/databoxedge/v20200501preview/share.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/databoxedge/v20200501preview/share.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/databoxedge/v20200501preview/share.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
48.578366
1,294
0.668045
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . import outputs from ._enums import * from ._inputs import * __all__ = ['ShareArgs', 'Share'] @pulumi.input_type class ShareArgs: def __init__(__self__, *, ...
true
true
f72b36f52912edb8de8bb2207281239f45df89b6
2,134
py
Python
demo/orm.py
1987539447/start-python
06ee5eb30e7395cd8432e8e33d7209fa855f4ad9
[ "Apache-2.0" ]
null
null
null
demo/orm.py
1987539447/start-python
06ee5eb30e7395cd8432e8e33d7209fa855f4ad9
[ "Apache-2.0" ]
null
null
null
demo/orm.py
1987539447/start-python
06ee5eb30e7395cd8432e8e33d7209fa855f4ad9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # FileName:orm.py # -*- coding: utf-8 -*- """ 通过元类实现简单的ORM框剪 """ class Field(object): def __init__(self, name, column_type): self.name = name self.column_type = column_type def __str__(self): return '<%s:%s>' % (self.__class__.__name__, self.name) class Intege...
27.012658
101
0.56701
class Field(object): def __init__(self, name, column_type): self.name = name self.column_type = column_type def __str__(self): return '<%s:%s>' % (self.__class__.__name__, self.name) class IntegerField(Field): def __init__(self, name): super(IntegerField, self).__init__(...
true
true
f72b389f11090c3291e690acc9bf38811dce7cae
1,162
py
Python
src/tests/ftest/util/oclass_utils.py
cibervicho/daos
3868c758c696d0a7973ac2b93b56d986fabfc6e0
[ "BSD-2-Clause-Patent" ]
null
null
null
src/tests/ftest/util/oclass_utils.py
cibervicho/daos
3868c758c696d0a7973ac2b93b56d986fabfc6e0
[ "BSD-2-Clause-Patent" ]
null
null
null
src/tests/ftest/util/oclass_utils.py
cibervicho/daos
3868c758c696d0a7973ac2b93b56d986fabfc6e0
[ "BSD-2-Clause-Patent" ]
null
null
null
#!/usr/bin/env python3 """ (C) Copyright 2018-2022 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ import re def extract_redundancy_factor(oclass): """Extract the redundancy factor from an object class. Args: oclass (str): the object class. Returns: int: the redu...
23.714286
76
0.593804
import re def extract_redundancy_factor(oclass): match = re.search("EC_[0-9]+P([0-9])+", oclass) if match: return int(match.group(1)) match = re.search("RP_([0-9]+)", oclass) if match: return int(match.group(1)) - 1 return 0 def calculate_min_servers(oclass): patterns = [ ...
true
true
f72b3967e92f28affb77f904b54628581c7af2bf
7,799
py
Python
galaxy/api/v2/tests/test_collection_views.py
bmclaughlin/galaxy
3f57e3684c27cb88d45881eaec16dc3095ac4e6d
[ "Apache-2.0" ]
904
2016-10-11T13:35:19.000Z
2022-03-25T09:29:09.000Z
galaxy/api/v2/tests/test_collection_views.py
bmclaughlin/galaxy
3f57e3684c27cb88d45881eaec16dc3095ac4e6d
[ "Apache-2.0" ]
1,866
2016-10-15T21:28:09.000Z
2022-03-29T18:09:20.000Z
galaxy/api/v2/tests/test_collection_views.py
bmclaughlin/galaxy
3f57e3684c27cb88d45881eaec16dc3095ac4e6d
[ "Apache-2.0" ]
368
2016-10-11T13:44:08.000Z
2022-03-30T02:23:12.000Z
# (c) 2012-2019, Ansible by Red Hat # # This file is part of Ansible Galaxy # # Ansible Galaxy is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by # the Apache Software Foundation, either version 2 of the License, or # (at your option) any later version. # ...
36.443925
79
0.62149
import hashlib from unittest import mock import os import tempfile import shutil import tarfile from contextlib import contextmanager from django.contrib.auth import get_user_model from rest_framework.test import APITestCase from rest_framework import status as http_codes from galaxy.main import models UserModel = g...
true
true
f72b39da0ed6829e91b76ba1b8864ebef44e2299
1,043
py
Python
cortex/options.py
lembert1990/pycortex
f1cd6abb5e193d0b7ec120107268dbbbf3a002fc
[ "BSD-2-Clause" ]
null
null
null
cortex/options.py
lembert1990/pycortex
f1cd6abb5e193d0b7ec120107268dbbbf3a002fc
[ "BSD-2-Clause" ]
null
null
null
cortex/options.py
lembert1990/pycortex
f1cd6abb5e193d0b7ec120107268dbbbf3a002fc
[ "BSD-2-Clause" ]
1
2019-03-04T02:45:59.000Z
2019-03-04T02:45:59.000Z
import os try: import configparser except ImportError: import ConfigParser as configparser from . import appdirs cwd = os.path.split(os.path.abspath(__file__))[0] userdir = appdirs.user_data_dir("pycortex", "JamesGao") usercfg = os.path.join(userdir, "options.cfg") # Read defaults from pycortex repo config = ...
33.645161
89
0.731544
import os try: import configparser except ImportError: import ConfigParser as configparser from . import appdirs cwd = os.path.split(os.path.abspath(__file__))[0] userdir = appdirs.user_data_dir("pycortex", "JamesGao") usercfg = os.path.join(userdir, "options.cfg") config = configparser.ConfigParser() config....
true
true
f72b39f30657384a75e0bf6bea346fedfc2a5b53
784
py
Python
users/migrations/0002_auto_20200807_1424.py
Hogwarts250/lesson-discussion
42aa0d5d4e4a8cb10c99ff7558e9d7a5f2f3e470
[ "Apache-2.0" ]
null
null
null
users/migrations/0002_auto_20200807_1424.py
Hogwarts250/lesson-discussion
42aa0d5d4e4a8cb10c99ff7558e9d7a5f2f3e470
[ "Apache-2.0" ]
4
2021-04-08T19:49:25.000Z
2021-06-10T20:08:37.000Z
users/migrations/0002_auto_20200807_1424.py
Hogwarts250/lesson-discussion
42aa0d5d4e4a8cb10c99ff7558e9d7a5f2f3e470
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.9 on 2020-08-07 21:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( ...
30.153846
144
0.653061
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='transaction', name='buy...
true
true
f72b3a24ac71bb8d2a6c614a0679f5609ec4ff65
1,051
py
Python
fedex/services/tracking.py
jzempel/fedex
9c617767799217a80669c1ecca0c3a7667f82d71
[ "BSD-3-Clause" ]
19
2015-02-02T03:00:54.000Z
2021-09-06T02:22:22.000Z
fedex/services/tracking.py
hongzhou-liu/fedex
9c617767799217a80669c1ecca0c3a7667f82d71
[ "BSD-3-Clause" ]
2
2015-08-14T22:05:17.000Z
2017-03-01T18:54:40.000Z
fedex/services/tracking.py
hongzhou-liu/fedex
9c617767799217a80669c1ecca0c3a7667f82d71
[ "BSD-3-Clause" ]
53
2015-03-31T14:46:30.000Z
2022-01-02T15:06:38.000Z
# -*- coding: utf-8 -*- """ fedex.services.tracking ~~~~~~~~~~~~~~~~~~~~~~~ FedEx tracking web services. :copyright: 2014 by Jonathan Zempel. :license: BSD, see LICENSE for more details. """ from .commons import BaseService class TrackingService(BaseService): """Tracking service. :para...
26.275
73
0.636537
from .commons import BaseService class TrackingService(BaseService): def __init__(self, configuration, wsdl_version=10): super(TrackingService, self).__init__(configuration, "Track", wsdl_version, "trck") def create_selection_details(self): return self.create("TrackSelection...
true
true
f72b3aaaffce70e47700f8e60f660a0f8a235566
810
py
Python
utils/logger.py
tengfeixue-victor/One-Shot-Animal-Video-Segmentation
15f9011c1b10f1e0c068f90ed46e72b3bc343310
[ "MIT" ]
2
2021-09-26T07:03:54.000Z
2022-02-21T15:46:30.000Z
utils/logger.py
tengfeixue-victor/One-Shot-Animal-Video-Segmentation
15f9011c1b10f1e0c068f90ed46e72b3bc343310
[ "MIT" ]
null
null
null
utils/logger.py
tengfeixue-victor/One-Shot-Animal-Video-Segmentation
15f9011c1b10f1e0c068f90ed46e72b3bc343310
[ "MIT" ]
1
2021-04-16T06:11:41.000Z
2021-04-16T06:11:41.000Z
import logging import time import os import sys def create_logger(final_output_path, description=None): if description is None: log_file = '{}.log'.format(time.strftime('%Y-%m-%d-%H-%M')) else: log_file = '{}_{}.log'.format(time.strftime('%Y-%m-%d-%H-%M'), description) head = '%(asctime)-1...
33.75
89
0.653086
import logging import time import os import sys def create_logger(final_output_path, description=None): if description is None: log_file = '{}.log'.format(time.strftime('%Y-%m-%d-%H-%M')) else: log_file = '{}_{}.log'.format(time.strftime('%Y-%m-%d-%H-%M'), description) head = '%(asctime)-1...
true
true
f72b3aca2cee2eefced9efcef5337ee9bdadcbda
719
py
Python
arrays/height_checker.py
ChristianChiarulli/leetcode
6920cea51b61feae9038b185c0b1172a93f6316a
[ "MIT" ]
4
2020-12-09T03:53:21.000Z
2021-03-30T12:28:21.000Z
.old/arrays/height_checker.py
ChristianChiarulli/data_structures_and_algorithms
05c5c7c9db0cc0a15e83ba20d5bf4f6534b08fc1
[ "MIT" ]
null
null
null
.old/arrays/height_checker.py
ChristianChiarulli/data_structures_and_algorithms
05c5c7c9db0cc0a15e83ba20d5bf4f6534b08fc1
[ "MIT" ]
2
2020-06-12T17:00:07.000Z
2020-07-13T20:13:56.000Z
# Students are asked to stand in non-decreasing # order of heights for an annual photo. # Return the minimum number of students that must # move in order for all students to be standing in # non-decreasing order of height. # Notice that when a group of students is selected # they can reorder in any possible way betwe...
25.678571
57
0.707928
def heightchecker(heights): swap_count = 0 sorted_heights = sorted(heights) if heights == sorted_heights: return swap_count for i in range(len(heights)): if heights[i] != sorted_heights[i]: swap_count += 1 return swap_count heights = [1, 1, 4, 2, 1, 3] heightcheck...
true
true
f72b3ae733f2a861d7932c76a99b7695e4c0bcce
842
py
Python
lstmcpipe/scripts/script_merge_utils_move_dir.py
cta-observatory/lst-i-rf
7a634e0b3b07dda2b20df47875d97616eab65821
[ "MIT" ]
2
2021-02-01T17:30:46.000Z
2021-02-22T13:59:49.000Z
lstmcpipe/scripts/script_merge_utils_move_dir.py
cta-observatory/lst-i-rf
7a634e0b3b07dda2b20df47875d97616eab65821
[ "MIT" ]
106
2021-04-16T21:15:20.000Z
2022-03-31T23:02:50.000Z
lstmcpipe/scripts/script_merge_utils_move_dir.py
cta-observatory/lstmcpipe
7a634e0b3b07dda2b20df47875d97616eab65821
[ "MIT" ]
3
2022-03-02T09:23:09.000Z
2022-03-03T16:00:25.000Z
#!/usr/bin/env python import argparse from lstmcpipe.io.data_management import ( move_dir_content, check_and_make_dir_without_verification, ) parser = argparse.ArgumentParser( description="Script to move a directory and its content after creating the destination" " directory." ) parser.add_argument( ...
20.536585
91
0.704276
import argparse from lstmcpipe.io.data_management import ( move_dir_content, check_and_make_dir_without_verification, ) parser = argparse.ArgumentParser( description="Script to move a directory and its content after creating the destination" " directory." ) parser.add_argument( "--source", "-...
true
true
f72b3cc7e9db8fe13e7966a92394dc17106664c7
82,459
py
Python
fpn/symbols/resnet_v1_101_fpn_rcnn.py
YAMLONG/Deformable-ConvNets
ea937451e103ba1fbf4fdcbd08ef3ca1ca832ef4
[ "Apache-2.0" ]
2
2018-10-24T01:47:49.000Z
2020-05-30T15:23:02.000Z
fpn/symbols/resnet_v1_101_fpn_rcnn.py
YAMLONG/Deformable-ConvNets
ea937451e103ba1fbf4fdcbd08ef3ca1ca832ef4
[ "Apache-2.0" ]
null
null
null
fpn/symbols/resnet_v1_101_fpn_rcnn.py
YAMLONG/Deformable-ConvNets
ea937451e103ba1fbf4fdcbd08ef3ca1ca832ef4
[ "Apache-2.0" ]
1
2018-03-29T11:47:01.000Z
2018-03-29T11:47:01.000Z
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Written by Haozhi Qi # -------------------------------------------------------- import cPickle import mxnet as mx from utils....
85.009278
180
0.613323
import cPickle import mxnet as mx from utils.symbol import Symbol from operator_py.pyramid_proposal import * from operator_py.proposal_target import * from operator_py.fpn_roi_pooling import * from operator_py.box_annotator_ohem import * class resnet_v1_101_fpn_rcnn(Symbol): def __init__(self): self.shar...
true
true
f72b3fd1a230b5adaf1f4d92129a73ad00db5a0e
618
py
Python
spider/main.py
ly-520/cbec-toolbox
e60dac81bec0403cf2e7cfd3ae216a8fc9cad343
[ "Apache-2.0" ]
null
null
null
spider/main.py
ly-520/cbec-toolbox
e60dac81bec0403cf2e7cfd3ae216a8fc9cad343
[ "Apache-2.0" ]
null
null
null
spider/main.py
ly-520/cbec-toolbox
e60dac81bec0403cf2e7cfd3ae216a8fc9cad343
[ "Apache-2.0" ]
1
2021-04-26T08:20:43.000Z
2021-04-26T08:20:43.000Z
import logging import flask from controller.goods_controller import * from controller.order_controller import * from common.exception_advice import * app = flask.Flask(__name__) logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message...
25.75
102
0.708738
import logging import flask from controller.goods_controller import * from controller.order_controller import * from common.exception_advice import * app = flask.Flask(__name__) logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(message...
true
true
f72b4000190522de1de32f143323c9268b7fabb6
658
py
Python
test/test_add_contact.py
olesya-sharafislamova/python_training
10369f4988261005451f47d5f4242521a0de6b69
[ "Apache-2.0" ]
1
2019-06-03T15:24:53.000Z
2019-06-03T15:24:53.000Z
test/test_add_contact.py
olesya-sharafislamova/python_training
10369f4988261005451f47d5f4242521a0de6b69
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
olesya-sharafislamova/python_training
10369f4988261005451f47d5f4242521a0de6b69
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.contact import Contact import pytest def test_add_contact(app, db, json_contacts): contact = json_contacts with pytest.allure.step('Given a Contact list'): old_contacts = db.get_contact_list() with pytest.allure.step('When I add a contact %s to the list' % conta...
27.416667
105
0.702128
from model.contact import Contact import pytest def test_add_contact(app, db, json_contacts): contact = json_contacts with pytest.allure.step('Given a Contact list'): old_contacts = db.get_contact_list() with pytest.allure.step('When I add a contact %s to the list' % contact): app.contact...
true
true
f72b41cfb72a15d0999c4d3c54c0b25cae7907ac
1,379
py
Python
cnf/tests/conftest.py
nyck33/my_cnf
9ca2b169efec4e84fa63c3b8d68a78e4c3a27ea7
[ "Apache-2.0" ]
null
null
null
cnf/tests/conftest.py
nyck33/my_cnf
9ca2b169efec4e84fa63c3b8d68a78e4c3a27ea7
[ "Apache-2.0" ]
null
null
null
cnf/tests/conftest.py
nyck33/my_cnf
9ca2b169efec4e84fa63c3b8d68a78e4c3a27ea7
[ "Apache-2.0" ]
null
null
null
""" conftest.py pytest_fixtures can be accessed by multiple test files test function has fixture func name as param, then fixture func called and result passed to test func added localhost.localdomain to /etc/hosts """ import pytest from cnf.main import setup_app import pymongo config_name = 'testing' the_app = setup...
24.192982
81
0.648296
import pytest from cnf.main import setup_app import pymongo config_name = 'testing' the_app = setup_app(config_name, dict( TESTING=True, LOGIN_DISABLED=False, MAIL_SUPPRESS_SEND=True, SERVER_NAME='localhost.localdomain', ...
true
true
f72b41deca8203786bd3da834a3d9db8b40ffee7
14,866
py
Python
tensorflow_data_validation/statistics/stats_options.py
Mikehem/tfx
e803ea6778d8550ec77dcc92bc8172f1a3a90f38
[ "Apache-2.0" ]
null
null
null
tensorflow_data_validation/statistics/stats_options.py
Mikehem/tfx
e803ea6778d8550ec77dcc92bc8172f1a3a90f38
[ "Apache-2.0" ]
null
null
null
tensorflow_data_validation/statistics/stats_options.py
Mikehem/tfx
e803ea6778d8550ec77dcc92bc8172f1a3a90f38
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
43.852507
80
0.735907
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import json import types as python_types from typing import Dict, List, Optional, Text from tensorflow_data_validation import types from tensorflow_data_validation.statistics.generators import st...
true
true
f72b42d5c27b87418372e74671846c4f0f9ab98a
3,825
py
Python
tests/extension/thread_/stream_reduce_arg_max/thread_stream_reduce_arg_max.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
null
null
null
tests/extension/thread_/stream_reduce_arg_max/thread_stream_reduce_arg_max.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
null
null
null
tests/extension/thread_/stream_reduce_arg_max/thread_stream_reduce_arg_max.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import sys import os # the next line can be removed after installation sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import ve...
27.12766
87
0.602092
from __future__ import absolute_import from __future__ import print_function import sys import os sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname( os.path.dirname(os.path.dirname(os.path.abspath(__file__))))))) from veriloggen import * import veriloggen.thread as vthread import veriloggen.types...
true
true
f72b4311c1c935e36ff12b3275ecdd0411d9a83c
2,457
py
Python
solfasol/shop/migrations/0004_auto_20201004_2111.py
rekognize/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
null
null
null
solfasol/shop/migrations/0004_auto_20201004_2111.py
rekognize/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
1
2020-06-18T13:08:47.000Z
2020-06-18T13:08:47.000Z
solfasol/shop/migrations/0004_auto_20201004_2111.py
Solfasol/solfasol
c960c3364c753d75161242eccac4f085d800c843
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-10-04 18:11 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('issues', '0009_auto_20200918_0020'), ('shop', '0003_auto_20201004_2109'), ] operations = [ migratio...
40.95
142
0.580383
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('issues', '0009_auto_20200918_0020'), ('shop', '0003_auto_20201004_2109'), ] operations = [ migrations.CreateModel( name='Cart', ...
true
true
f72b433198e89063d5e6f1584dc14c04ef6a68fb
2,261
py
Python
tests/test_mixture_transitions.py
probcomp/cgpm2
280ab5bf3dd0d7c61196deaff7cb590692fc412a
[ "Apache-2.0" ]
3
2019-01-20T08:55:06.000Z
2019-12-02T05:59:26.000Z
tests/test_mixture_transitions.py
probcomp/cgpm2
280ab5bf3dd0d7c61196deaff7cb590692fc412a
[ "Apache-2.0" ]
null
null
null
tests/test_mixture_transitions.py
probcomp/cgpm2
280ab5bf3dd0d7c61196deaff7cb590692fc412a
[ "Apache-2.0" ]
3
2019-08-06T07:27:34.000Z
2019-09-28T23:26:57.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018 MIT Probabilistic Computing Project. # Released under Apache 2.0; refer to LICENSE.txt. from collections import Counter import numpy as np from cgpm.utils.general import get_prng from cgpm2.crp import CRP from cgpm2.normal import Normal from cgpm2.flexible_rowmix impor...
37.065574
80
0.689518
from collections import Counter import numpy as np from cgpm.utils.general import get_prng from cgpm2.crp import CRP from cgpm2.normal import Normal from cgpm2.flexible_rowmix import FlexibleRowMixture from cgpm2.transition_hypers import transition_hyper_grids from cgpm2.transition_hypers import transition_hyper...
true
true
f72b440bbd74e2d435413383ae7761a669cd513a
68,958
py
Python
arelle/plugin/xbrlDB/XbrlSemanticSqlDB.py
DataFinnovation/Arelle
d4bf45f56fc9249f75ab22e6217dbe55f0510841
[ "Apache-2.0" ]
1
2021-07-01T17:52:12.000Z
2021-07-01T17:52:12.000Z
arelle/plugin/xbrlDB/XbrlSemanticSqlDB.py
DataFinnovation/Arelle
d4bf45f56fc9249f75ab22e6217dbe55f0510841
[ "Apache-2.0" ]
3
2021-01-07T23:36:40.000Z
2021-12-13T20:43:27.000Z
arelle/plugin/xbrlDB/XbrlSemanticSqlDB.py
DataFinnovation/Arelle
d4bf45f56fc9249f75ab22e6217dbe55f0510841
[ "Apache-2.0" ]
2
2020-02-24T16:06:12.000Z
2021-02-24T00:21:32.000Z
''' XbrlSemanticSqlDB.py implements an SQL database interface for Arelle, based on a concrete realization of the Abstract Model PWD 2.0 layer. This is a semantic representation of XBRL information. This module may save directly to a Postgres, MySQL, SQLite, MSSQL, or Oracle server. This module provides the executi...
58.5382
144
0.517068
import os, time, datetime, logging from arelle.ModelDocument import Type from arelle.ModelDtsObject import ModelConcept, ModelType, ModelResource, ModelRelationship from arelle.ModelInstanceObject import ModelFact from arelle.ModelXbrl import ModelXbrl from arelle.ModelDocument import ModelDocument from arelle.ModelOb...
true
true
f72b45704b6b738dc155c0160abe96949099d9a7
13,758
py
Python
spacegraphcats/catlas/catlas.py
mogproject/spacegraphcats
e21015daa8e2968c3076bd250c553aa20e6d912b
[ "BSD-3-Clause" ]
null
null
null
spacegraphcats/catlas/catlas.py
mogproject/spacegraphcats
e21015daa8e2968c3076bd250c553aa20e6d912b
[ "BSD-3-Clause" ]
null
null
null
spacegraphcats/catlas/catlas.py
mogproject/spacegraphcats
e21015daa8e2968c3076bd250c553aa20e6d912b
[ "BSD-3-Clause" ]
null
null
null
"""Data structure for CAtlas.""" import argparse import cProfile import os import sys import tempfile import gzip import copy from .rdomset import rdomset, domination_graph from .graph_io import read_from_gxt, write_to_gxt from .graph import Graph from spacegraphcats.utils.logging import log_command from io import Tex...
36.590426
79
0.559674
import argparse import cProfile import os import sys import tempfile import gzip import copy from .rdomset import rdomset, domination_graph from .graph_io import read_from_gxt, write_to_gxt from .graph import Graph from spacegraphcats.utils.logging import log_command from io import TextIOWrapper from collections impor...
true
true
f72b457385a4ebe5715f4121fb45c8d4b9cc7073
4,175
py
Python
frontera/core/components.py
vy-labs/frontera
ba2c07470111270de090215dc4ebc051bbd8b7e0
[ "BSD-3-Clause" ]
1
2018-01-17T02:17:55.000Z
2018-01-17T02:17:55.000Z
frontera/core/components.py
vy-labs/frontera
ba2c07470111270de090215dc4ebc051bbd8b7e0
[ "BSD-3-Clause" ]
16
2017-02-03T06:31:39.000Z
2020-03-03T15:15:09.000Z
frontera/core/components.py
vy-labs/frontera
ba2c07470111270de090215dc4ebc051bbd8b7e0
[ "BSD-3-Clause" ]
null
null
null
from abc import ABCMeta, abstractmethod class Component(object): """ Interface definition for a frontier component The :class:`Component <frontera.core.components.Component>` object is the base class for frontier :class:`Middleware <frontera.core.components.Middleware>` and :class:`Backend <fronte...
31.390977
114
0.662275
from abc import ABCMeta, abstractmethod class Component(object): __metaclass__ = ABCMeta component_name = 'Base Component' @abstractmethod def frontier_start(self): pass @abstractmethod def frontier_stop(self): pass @abstractmethod def add_seeds(self, seeds): ...
true
true
f72b4575023d53c977d16e195686c5c67ffc5f9f
3,076
py
Python
src/hypergraph.py
HKUST-KnowComp/HPHG
48b704b28c217e4590edf4dd3c7825495dffb76e
[ "MIT" ]
5
2019-08-31T11:00:40.000Z
2021-04-15T10:05:35.000Z
src/hypergraph.py
HKUST-KnowComp/HPHG
48b704b28c217e4590edf4dd3c7825495dffb76e
[ "MIT" ]
null
null
null
src/hypergraph.py
HKUST-KnowComp/HPHG
48b704b28c217e4590edf4dd3c7825495dffb76e
[ "MIT" ]
1
2020-05-27T08:00:53.000Z
2020-05-27T08:00:53.000Z
import numpy as np from tqdm import tqdm class Hypergraph(object): def __init__(self,graph_type='0',nums_type=None): self._nodes = {} # node set self._edges = {} # edge set (hash index) self.graph_type = graph_type # graph type, homogeneous:0, heterogeneous:1 self.nums_type = nu...
28.747664
106
0.545189
import numpy as np from tqdm import tqdm class Hypergraph(object): def __init__(self,graph_type='0',nums_type=None): self._nodes = {} self._edges = {} self.graph_type = graph_type self.nums_type = nums_type self.cumsum = np.cumsum(self.nums_type) if self.graph_type=='1'...
true
true
f72b45b62702b41808f02cf163bf8b5b63de5b30
5,644
py
Python
Tests/Cube.py
joel-intito/tm1py
42e59dcdeb70357577c19e974995936b5dbb1131
[ "MIT" ]
null
null
null
Tests/Cube.py
joel-intito/tm1py
42e59dcdeb70357577c19e974995936b5dbb1131
[ "MIT" ]
null
null
null
Tests/Cube.py
joel-intito/tm1py
42e59dcdeb70357577c19e974995936b5dbb1131
[ "MIT" ]
null
null
null
import configparser from pathlib import Path import unittest import uuid from TM1py import Element, Hierarchy, Dimension from TM1py.Objects import Cube from TM1py.Objects import Rules from TM1py.Services import TM1Service config = configparser.ConfigParser() config.read(Path(__file__).parent.joinpath('config.ini')) ...
38.394558
108
0.677711
import configparser from pathlib import Path import unittest import uuid from TM1py import Element, Hierarchy, Dimension from TM1py.Objects import Cube from TM1py.Objects import Rules from TM1py.Services import TM1Service config = configparser.ConfigParser() config.read(Path(__file__).parent.joinpath('config.ini')) ...
true
true
f72b4610811bde97505c92b313e84557e3fe0425
809
py
Python
time_this_using_with.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
time_this_using_with.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
time_this_using_with.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' from timeit import default_timer class TimeThis: def __init__(self, title="TimeThis"): self.title = title self.start_time = None def __enter__(self): self.start_time = default_timer() return self de...
19.731707
94
0.566131
__author__ = 'ipetrash' from timeit import default_timer class TimeThis: def __init__(self, title="TimeThis"): self.title = title self.start_time = None def __enter__(self): self.start_time = default_timer() return self def __exit__(self, exc_type, exc_value, exc_trace...
true
true
f72b46c25c47804afbeb964bc15146379d6938f8
49,448
py
Python
lib/sqlalchemy/ext/associationproxy.py
mattkohl/sqlalchemy
edf8e782cf5011cd43a0ee281b9e0b1d1becef1f
[ "MIT" ]
2
2020-02-19T17:50:50.000Z
2021-02-10T02:52:41.000Z
lib/sqlalchemy/ext/associationproxy.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
null
null
null
lib/sqlalchemy/ext/associationproxy.py
KonstantinKlepikov/sqlalchemy-1
2c34d2503a17316cae3282192405b9b9d60df6fe
[ "MIT" ]
1
2019-08-27T06:57:57.000Z
2019-08-27T06:57:57.000Z
# ext/associationproxy.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Contain the ``AssociationProxy`` class. The ``AssociationProxy`` is a Py...
31.217172
86
0.596809
import operator from .. import exc from .. import inspect from .. import orm from .. import util from ..orm import collections from ..orm import interfaces from ..sql import or_ from ..sql.operators import ColumnOperators def association_proxy(target_collection, attr, **kw): return AssociationProxy(target_colle...
true
true
f72b47b083e75e7fc1652ef55122a7c099974a7c
2,333
py
Python
integreat_cms/cms/views/settings/mfa/authenticate_modify_mfa_view.py
Carlosbogo/integreat-cms
066f188b138e105e72f5420bc36d25709f25402d
[ "Apache-2.0" ]
1
2022-01-16T01:15:21.000Z
2022-01-16T01:15:21.000Z
integreat_cms/cms/views/settings/mfa/authenticate_modify_mfa_view.py
Carlosbogo/integreat-cms
066f188b138e105e72f5420bc36d25709f25402d
[ "Apache-2.0" ]
null
null
null
integreat_cms/cms/views/settings/mfa/authenticate_modify_mfa_view.py
Carlosbogo/integreat-cms
066f188b138e105e72f5420bc36d25709f25402d
[ "Apache-2.0" ]
null
null
null
""" This module contains all views related to multi-factor authentication """ import logging import time from django.contrib.auth.decorators import login_required from django.contrib.auth.hashers import check_password from django.shortcuts import redirect from django.urls import reverse_lazy from django.utils.decorato...
44.865385
143
0.743678
import logging import time from django.contrib.auth.decorators import login_required from django.contrib.auth.hashers import check_password from django.shortcuts import redirect from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.utils.translation import ugettext as _ ...
true
true
f72b482966239f05aa2cebf8fa85221da508dbeb
44
py
Python
CodeUp/6030.py
chae-heechan/Algorithm_Study
183a77e2cfe352cd82fb5e988b493082529a73dd
[ "MIT" ]
null
null
null
CodeUp/6030.py
chae-heechan/Algorithm_Study
183a77e2cfe352cd82fb5e988b493082529a73dd
[ "MIT" ]
null
null
null
CodeUp/6030.py
chae-heechan/Algorithm_Study
183a77e2cfe352cd82fb5e988b493082529a73dd
[ "MIT" ]
null
null
null
# 영문자 1개 입력받아 10진수로 변환하기 print(ord(input()))
22
24
0.704545
print(ord(input()))
true
true
f72b491d57302f379d5a1bd917da7dd51854de51
11,032
py
Python
allennlp/tests/common/params_test.py
craigbig/allennlp
3f15a8bdcae366f3ef732eec1e9df26d91521582
[ "Apache-2.0" ]
1
2020-02-24T10:21:37.000Z
2020-02-24T10:21:37.000Z
allennlp/tests/common/params_test.py
craigbig/allennlp
3f15a8bdcae366f3ef732eec1e9df26d91521582
[ "Apache-2.0" ]
null
null
null
allennlp/tests/common/params_test.py
craigbig/allennlp
3f15a8bdcae366f3ef732eec1e9df26d91521582
[ "Apache-2.0" ]
null
null
null
import json import os import re from collections import OrderedDict import pytest from allennlp.common.checks import ConfigurationError from allennlp.common.params import infer_and_cast, Params, parse_overrides, unflatten, with_fallback from allennlp.common.testing import AllenNlpTestCase class TestParams(AllenNlpT...
35.818182
100
0.562817
import json import os import re from collections import OrderedDict import pytest from allennlp.common.checks import ConfigurationError from allennlp.common.params import infer_and_cast, Params, parse_overrides, unflatten, with_fallback from allennlp.common.testing import AllenNlpTestCase class TestParams(AllenNlpT...
true
true
f72b4933b2a73e756ab6c71f5af4eb81142adabf
978
py
Python
ecl/tests/functional/baremetal/test_stock.py
nttcom/eclsdk
866bea3290806332f677344982f39cb8e5155480
[ "Apache-2.0" ]
5
2017-04-07T06:23:04.000Z
2019-11-19T00:52:34.000Z
ecl/tests/functional/baremetal/test_stock.py
nttcom/eclsdk
866bea3290806332f677344982f39cb8e5155480
[ "Apache-2.0" ]
16
2018-09-12T11:14:40.000Z
2021-04-19T09:02:44.000Z
ecl/tests/functional/baremetal/test_stock.py
nttcom/eclsdk
866bea3290806332f677344982f39cb8e5155480
[ "Apache-2.0" ]
14
2017-05-11T14:26:26.000Z
2021-07-14T14:00:06.000Z
# 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 t...
37.615385
75
0.742331
import six from ecl.tests.functional import base class TestStock(base.BaseFunctionalTest): def test_01_get_stock(self): stock = self.conn.baremetal.get_stock( "44d4ce9e-cf3d-4853-bdc9-95680bf95668", "groupa" ) self.assertIsInstance(stock.flavor_id, six.string_types) s...
true
true
f72b4949f2249b81afca92d0ad7c2bcf75710a96
9,579
py
Python
fudge/productData/distributions/distribution.py
brown170/fudge
4f818b0e0b0de52bc127dd77285b20ce3568c97a
[ "BSD-3-Clause" ]
14
2019-08-29T23:46:24.000Z
2022-03-21T10:16:25.000Z
fudge/productData/distributions/distribution.py
brown170/fudge
4f818b0e0b0de52bc127dd77285b20ce3568c97a
[ "BSD-3-Clause" ]
1
2020-08-04T16:14:45.000Z
2021-12-01T01:54:34.000Z
fudge/productData/distributions/distribution.py
brown170/fudge
4f818b0e0b0de52bc127dd77285b20ce3568c97a
[ "BSD-3-Clause" ]
2
2022-03-03T22:41:41.000Z
2022-03-03T22:54:43.000Z
# <<BEGIN-copyright>> # Copyright 2021, Lawrence Livermore National Security, LLC. # See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: BSD-3-Clause # <<END-copyright>> """Distribution class.""" from PoPs import IDs as IDsPoPsModule from fudge import abstractClasses as abstractClassesModule ...
48.135678
169
0.614156
from PoPs import IDs as IDsPoPsModule from fudge import abstractClasses as abstractClassesModule from xData import standards as standardsModule from . import angular as angularModule from . import energy as energyModule from . import energyAngular as energyAngularModule from . import energyAngularMC as energyAngula...
true
true
f72b4999422344e122188abc17640c29c420b644
5,593
py
Python
tfx/components/example_gen/base_example_gen_executor_test.py
pingsutw/tfx
bf0d1d74e3f6ea429989fc7b80b82bea08077857
[ "Apache-2.0" ]
1
2020-11-24T16:59:37.000Z
2020-11-24T16:59:37.000Z
tfx/components/example_gen/base_example_gen_executor_test.py
pingsutw/tfx
bf0d1d74e3f6ea429989fc7b80b82bea08077857
[ "Apache-2.0" ]
null
null
null
tfx/components/example_gen/base_example_gen_executor_test.py
pingsutw/tfx
bf0d1d74e3f6ea429989fc7b80b82bea08077857
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
36.555556
79
0.66619
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import random import apache_beam as beam import tensorflow as tf from google.protobuf import json_format from tfx.components.example_gen import base_example_gen_executor from tfx.proto import example...
true
true
f72b4a5949a2383abf083c3da9e19c3770c8c953
6,683
py
Python
service/moleprop.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
3
2022-02-06T09:13:51.000Z
2022-02-19T15:03:35.000Z
service/moleprop.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
1
2022-02-14T23:16:27.000Z
2022-02-14T23:16:27.000Z
service/moleprop.py
uta-smile/CD-MVGNN
b48f4cd14befed298980a83edb417ab6809f0af6
[ "MIT" ]
null
null
null
import os import time import math import numpy as np import torch # torch.multiprocessing.set_start_method('spawn') torch.multiprocessing.set_start_method('forkserver', force=True) import torch.nn as nn from torch.utils.data import DataLoader from tqdm import tqdm from argparse import Namespace from typing import List...
38.854651
115
0.60422
import os import time import math import numpy as np import torch torch.multiprocessing.set_start_method('forkserver', force=True) import torch.nn as nn from torch.utils.data import DataLoader from tqdm import tqdm from argparse import Namespace from typing import List from dglt.data.dataset.molecular import MoleculeD...
true
true
f72b4b922b786b9836eb43cd19f849b1ef9f3014
2,011
py
Python
cv-competition-1/pytorch_baseline/compute_overlaps_np.py
ipovalyaev/events
64ec6324368dd21f9cedd464304eed01e1737024
[ "MIT" ]
5
2021-06-15T05:34:01.000Z
2021-08-17T12:12:34.000Z
cv-competition-1/pytorch_baseline/compute_overlaps_np.py
ipovalyaev/events
64ec6324368dd21f9cedd464304eed01e1737024
[ "MIT" ]
1
2021-06-15T13:24:48.000Z
2021-06-15T13:24:48.000Z
cv-competition-1/pytorch_baseline/compute_overlaps_np.py
ipovalyaev/events
64ec6324368dd21f9cedd464304eed01e1737024
[ "MIT" ]
7
2021-06-15T05:36:47.000Z
2021-09-30T08:00:08.000Z
import time import numpy as np from compute_overlap import compute_overlap def compute_overlap_np(a: np.array, b: np.array) -> np.array: """ Args a: (N, 4) ndarray of float [xmin, ymin, xmax, ymax] b: (K, 4) ndarray of float [xmin, ymin, xmax, ymax] Returns overlaps: (N, K) ndarra...
29.144928
71
0.513178
import time import numpy as np from compute_overlap import compute_overlap def compute_overlap_np(a: np.array, b: np.array) -> np.array: N, K = len(a), len(b) overlaps = np.zeros(shape=(N, K)) for n in range(N): a_area = (a[n, 2] - a[n, 0]) * (a[n, 3] - a[n, 1]) for k in range(K): ...
true
true
f72b4bbd4fb629bc220cd90dcdf55c738b02e203
4,032
py
Python
policy_value_net_numpy.py
wesleytao/Checkers-Reinforcement-Learning
80d45f1c29fb7cd4503cdadedf344267553cad31
[ "MIT" ]
2
2019-01-21T02:54:19.000Z
2019-01-21T02:54:58.000Z
policy_value_net_numpy.py
wesleytao/Checkers-Reinforcement-Learning
80d45f1c29fb7cd4503cdadedf344267553cad31
[ "MIT" ]
null
null
null
policy_value_net_numpy.py
wesleytao/Checkers-Reinforcement-Learning
80d45f1c29fb7cd4503cdadedf344267553cad31
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Implement the policy value network using numpy, so that we can play with the trained AI model without installing any DL framwork @author: Junxiao Song """ from __future__ import print_function import numpy as np # some utility functions def softmax(x): probs = np.exp(x - np.max(x)) ...
34.758621
79
0.615575
from __future__ import print_function import numpy as np def softmax(x): probs = np.exp(x - np.max(x)) probs /= np.sum(probs) return probs def relu(X): out = np.maximum(X, 0) return out def conv_forward(X, W, b, stride=1, padding=1): n_filters, d_filter, h_filter, w_filter = W.shape ...
true
true
f72b4d5a2a367abecd980532b8d4750d10b4ca89
1,961
py
Python
sdk/python/tests/utils/online_store_utils.py
ibnummuhammad/feast
1fd9c2def1fbaca68e865a7c67336793ddb25582
[ "Apache-2.0" ]
810
2018-12-25T15:16:11.000Z
2020-05-14T09:49:40.000Z
sdk/python/tests/utils/online_store_utils.py
ibnummuhammad/feast
1fd9c2def1fbaca68e865a7c67336793ddb25582
[ "Apache-2.0" ]
701
2018-12-21T05:18:43.000Z
2020-05-16T01:30:21.000Z
sdk/python/tests/utils/online_store_utils.py
ibnummuhammad/feast
1fd9c2def1fbaca68e865a7c67336793ddb25582
[ "Apache-2.0" ]
155
2018-12-22T11:05:04.000Z
2020-05-14T07:33:41.000Z
from datetime import datetime import boto3 from feast import utils from feast.infra.online_stores.helpers import compute_entity_id from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto from feast.protos.feast.types.Value_pb2 import Value as ValueProto def _create_n_customer_test_samples(n=1...
34.403509
86
0.63182
from datetime import datetime import boto3 from feast import utils from feast.infra.online_stores.helpers import compute_entity_id from feast.protos.feast.types.EntityKey_pb2 import EntityKey as EntityKeyProto from feast.protos.feast.types.Value_pb2 import Value as ValueProto def _create_n_customer_test_samples(n=1...
true
true
f72b4fcb126c9560cd993ddf3c97358bf4458c21
2,011
py
Python
internal/notes/builtin-SAVE/packages/bbcp/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
1
2019-01-17T20:07:19.000Z
2019-01-17T20:07:19.000Z
internal/notes/builtin-SAVE/packages/bbcp/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
null
null
null
internal/notes/builtin-SAVE/packages/bbcp/package.py
HPCToolkit/hpctest
5ff4455582bf39e75530a31badcf6142081b386b
[ "BSD-3-Clause" ]
2
2019-08-06T18:13:57.000Z
2021-11-05T18:19:49.000Z
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
41.040816
78
0.651914
from spack import * class Bbcp(Package): homepage = "http://www.slac.stanford.edu/~abh/bbcp/" version('git', git='http://www.slac.stanford.edu/~abh/bbcp/bbcp.git', branch="master") depends_on('zlib') depends_on('openssl') def install(self, spec, prefix): cd("src") ma...
true
true
f72b4ff25106f6a06c072e4b810373c1bc5e5e95
1,964
py
Python
sdap/studies/admin.py
umr1085-irset/reproGenomicsViewer
187ea320668e567d01572bfbf9497bebd691569a
[ "MIT" ]
null
null
null
sdap/studies/admin.py
umr1085-irset/reproGenomicsViewer
187ea320668e567d01572bfbf9497bebd691569a
[ "MIT" ]
1
2020-02-16T10:48:55.000Z
2020-02-16T11:06:36.000Z
sdap/studies/admin.py
umr1085-irset/reproGenomicsViewer
187ea320668e567d01572bfbf9497bebd691569a
[ "MIT" ]
4
2019-11-04T15:00:55.000Z
2020-03-02T13:36:17.000Z
from django.contrib import admin from django import forms from .models import * from django_better_admin_arrayfield.admin.mixins import DynamicArrayMixin import sdap.tools.forms as tool_forms from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from django.apps impor...
32.733333
155
0.556517
from django.contrib import admin from django import forms from .models import * from django_better_admin_arrayfield.admin.mixins import DynamicArrayMixin import sdap.tools.forms as tool_forms from django.core.exceptions import ValidationError from django.utils.translation import gettext_lazy as _ from django.apps impor...
true
true
f72b50a50d6a2732a98caa1aae33253e14cfd9d0
1,772
py
Python
examples/simple/fe.py
HQSquantumsimulations/ActiveSpaceFinder
2471dd1cb764169a1be51937addea04813cf42d1
[ "Apache-2.0" ]
10
2020-11-09T18:12:43.000Z
2021-12-17T16:48:54.000Z
examples/simple/fe.py
HQSquantumsimulations/ActiveSpaceFinder
2471dd1cb764169a1be51937addea04813cf42d1
[ "Apache-2.0" ]
null
null
null
examples/simple/fe.py
HQSquantumsimulations/ActiveSpaceFinder
2471dd1cb764169a1be51937addea04813cf42d1
[ "Apache-2.0" ]
3
2021-01-26T12:41:08.000Z
2021-12-16T04:33:11.000Z
# Copyright 2020 HQS Quantum Simulations GmbH # Reza Ghafarian Shirazi, Thilo Mast. # reza.shirazi@quantumsimulations.de # # 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.apa...
30.551724
74
0.738149
from pyscf import gto, scf import asf mol = gto.Mole() mol.atom = """ Fe -0.0000000 0.0000000 0.0000000 O 0.0000000 2.0622910 0.0000000 H 0.7919274 2.6471973 0.0000000 H -0.7919274 2.6471973 0.0000000 O -0.0000000 0.0000000 2.0622910 H -0.0000000 0.7919274 2.6471973 H 0.0000000 -0.7919274 2.6471973 O 2.0622910 -0.000...
true
true
f72b50aeba2955ce6ef70f323284adca857cfc4f
3,088
py
Python
yolo_app/etc/commons/opencv_helpers.py
arvincsh/multiobjectdetection
26b4d43ce981a7a4cd031611df70b8f7c08757df
[ "MIT" ]
null
null
null
yolo_app/etc/commons/opencv_helpers.py
arvincsh/multiobjectdetection
26b4d43ce981a7a4cd031611df70b8f7c08757df
[ "MIT" ]
3
2021-06-08T22:25:30.000Z
2022-01-13T03:18:29.000Z
yolo_app/etc/commons/opencv_helpers.py
arvincsh/multiobjectdetection
26b4d43ce981a7a4cd031611df70b8f7c08757df
[ "MIT" ]
null
null
null
import cv2 import numpy as np from math import sqrt from scipy.spatial import distance from yolo_app.etc.config import config def crop_image(save_path, img, xywh): x = xywh[0] y = xywh[1] w = xywh[2] h = xywh[3] crop_img = img[y:y + h, x:x + w] cv2.imwrite(save_path, crop_img) def np_xyxy2xy...
26.393162
100
0.562176
import cv2 import numpy as np from math import sqrt from scipy.spatial import distance from yolo_app.etc.config import config def crop_image(save_path, img, xywh): x = xywh[0] y = xywh[1] w = xywh[2] h = xywh[3] crop_img = img[y:y + h, x:x + w] cv2.imwrite(save_path, crop_img) def np_xyxy2xy...
true
true
f72b5313853fd9dfc01ec04630bfc7a8a3c1dfba
2,762
py
Python
simple_generate.py
yuning1990/GPT2-Chinese
299855ad9a84ad81b2da6e2c583af124f6ed6ff9
[ "MIT" ]
null
null
null
simple_generate.py
yuning1990/GPT2-Chinese
299855ad9a84ad81b2da6e2c583af124f6ed6ff9
[ "MIT" ]
null
null
null
simple_generate.py
yuning1990/GPT2-Chinese
299855ad9a84ad81b2da6e2c583af124f6ed6ff9
[ "MIT" ]
null
null
null
from generate import * from datetime import datetime def main(): ''' e.g. python ./generate.py --length=512 --nsamples=1 --prefix=[MASK]哈利站在窗边 --tokenizer_path cache/vocab_small.txt --topk 40 --model_path model/model_epoch29 --save_samples --save_samples_path result/20210915_29_1135 ...
54.156863
115
0.68139
from generate import * from datetime import datetime def main(): parser = argparse.ArgumentParser() parser.add_argument('--key', default='intro', type=str, required=False, help='哪个模型') parser.add_argument('--model_v', default='-1', type=str, required=False, help='第几个模型') parser.add_argument('--device',...
true
true
f72b5336226a539fe7cd56683840a850c1179b1c
8,536
py
Python
awareutils/vision/col.py
anna-aware/awareutils
5571de71ad6f0adad6361e39f82073ba4dd402c5
[ "MIT" ]
null
null
null
awareutils/vision/col.py
anna-aware/awareutils
5571de71ad6f0adad6361e39f82073ba4dd402c5
[ "MIT" ]
null
null
null
awareutils/vision/col.py
anna-aware/awareutils
5571de71ad6f0adad6361e39f82073ba4dd402c5
[ "MIT" ]
null
null
null
import hashlib from typing import Iterable, Tuple from loguru import logger class Col: named: "NamedCols" def __init__(self, r: int, g: int, b: int, clip: bool = False, fix_numeric_type: bool = True): self._clip = clip self._fix_numeric_type = fix_numeric_type self.r = r # Note this...
31.732342
115
0.573336
import hashlib from typing import Iterable, Tuple from loguru import logger class Col: named: "NamedCols" def __init__(self, r: int, g: int, b: int, clip: bool = False, fix_numeric_type: bool = True): self._clip = clip self._fix_numeric_type = fix_numeric_type self.r = r sel...
true
true
f72b548ac9a0d323d3b91f562646813415979b88
8,590
py
Python
python/caffe/detector.py
MilesQLi/highway-networks
87d1c8d091ed698b7959c6dbcbbe2ac2e8bf5e3e
[ "BSD-2-Clause" ]
106
2015-08-11T05:45:50.000Z
2021-04-08T02:29:07.000Z
python/caffe/detector.py
scott89/caffe-crowd
de1875c33e311c12df7dc33decda67706dbf250a
[ "BSD-2-Clause" ]
2
2016-07-07T15:04:10.000Z
2016-09-12T14:00:13.000Z
python/caffe/detector.py
scott89/caffe-crowd
de1875c33e311c12df7dc33decda67706dbf250a
[ "BSD-2-Clause" ]
36
2015-08-14T07:33:42.000Z
2021-03-11T09:48:40.000Z
#!/usr/bin/env python """ Do windowed detection by classifying a number of images/crops at once, optionally using the selective search window proposal method. This implementation follows ideas in Ross Girshick, Jeff Donahue, Trevor Darrell, Jitendra Malik. Rich feature hierarchies for accurate object detection...
39.585253
80
0.590803
import numpy as np import os import caffe class Detector(caffe.Net): def __init__(self, model_file, pretrained_file, mean=None, input_scale=None, raw_scale=None, channel_swap=None, context_pad=None): caffe.Net.__init__(self, model_file, pretrained_file, caffe.TEST) ...
true
true
f72b56c1b85626f170db0a70640a8d036cae722e
858
py
Python
pcaspy/tools.py
dchabot/python-pcaspy
42c32e90b854414d0f929a1ecef32b7438344d42
[ "BSD-3-Clause" ]
null
null
null
pcaspy/tools.py
dchabot/python-pcaspy
42c32e90b854414d0f929a1ecef32b7438344d42
[ "BSD-3-Clause" ]
null
null
null
pcaspy/tools.py
dchabot/python-pcaspy
42c32e90b854414d0f929a1ecef32b7438344d42
[ "BSD-3-Clause" ]
null
null
null
import threading # Thread running server processing loop class ServerThread(threading.Thread): """ A helper class to run server in a thread. The following snippet runs the server for 4 seconds and quit:: server = SimpleServer() server_thread = ServerThread(server) server_thread.st...
22.578947
66
0.578089
import threading class ServerThread(threading.Thread): def __init__(self, server): super(ServerThread, self).__init__() self.server = server self.running = True def run(self): while self.running: self.server.process(0.1) def stop(self): self.running = F...
true
true
f72b56de21ac740c008099e3f07466941329206c
6,793
py
Python
bindings/python/ensmallen_graph/datasets/string/lachnobacteriumbovis.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/lachnobacteriumbovis.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
bindings/python/ensmallen_graph/datasets/string/lachnobacteriumbovis.py
caufieldjh/ensmallen_graph
14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a
[ "MIT" ]
null
null
null
""" This file offers the methods to automatically retrieve the graph Lachnobacterium bovis. The graph is automatically retrieved from the STRING repository. Report --------------------- At the time of rendering these methods (please see datetime below), the graph had the following characteristics: Datetime: 2021-...
35.565445
223
0.708229
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen_graph import EnsmallenGraph def LachnobacteriumBovis( directed: bool = False, verbose: int = 2, cache_path: str = "graphs/string", **additional_graph_kwargs: Dict ) -> EnsmallenGraph: re...
true
true
f72b570f213204c468b4f1b373c9ca56f111cbd6
1,128
py
Python
windyquery/validator/field.py
bluerelay/windyquery
049dc624f4c4a3210d455352b1495db6bd1ff441
[ "MIT" ]
51
2019-05-13T10:51:23.000Z
2021-09-12T08:11:56.000Z
windyquery/validator/field.py
bluerelay/windyquery
049dc624f4c4a3210d455352b1495db6bd1ff441
[ "MIT" ]
2
2020-10-08T16:28:45.000Z
2021-06-23T03:27:42.000Z
windyquery/validator/field.py
bluerelay/windyquery
049dc624f4c4a3210d455352b1495db6bd1ff441
[ "MIT" ]
3
2021-05-10T13:08:21.000Z
2021-06-20T19:58:30.000Z
from ._base import Base, _rule from .fullname_json import FullnameJson from .values.text_val import TextVal from .values.null import NULL from .values.holder import Holder from .values.true import TRUE from .values.false import FALSE class Field(FullnameJson, TextVal, NULL, Holder, TRUE, FALSE): reserved = {**Bas...
29.684211
111
0.606383
from ._base import Base, _rule from .fullname_json import FullnameJson from .values.text_val import TextVal from .values.null import NULL from .values.holder import Holder from .values.true import TRUE from .values.false import FALSE class Field(FullnameJson, TextVal, NULL, Holder, TRUE, FALSE): reserved = {**Bas...
true
true
f72b575498b298ee6a17f438e78286df5deb72f6
4,471
py
Python
distributex/service.py
calston/distributex
06ef0f948f7587ccf2a45305e8de45e9922990cc
[ "MIT" ]
2
2018-06-07T12:46:22.000Z
2020-11-21T18:10:44.000Z
distributex/service.py
calston/distributex
06ef0f948f7587ccf2a45305e8de45e9922990cc
[ "MIT" ]
null
null
null
distributex/service.py
calston/distributex
06ef0f948f7587ccf2a45305e8de45e9922990cc
[ "MIT" ]
null
null
null
from twisted.application import internet, service from twisted.web import server, resource, client from twisted.internet import defer, reactor, threads, utils, task from zope import interface import yaml import time import cgi import random from distributex.backends import in_memory_backend, memcached_backend class ...
29.609272
78
0.569895
from twisted.application import internet, service from twisted.web import server, resource, client from twisted.internet import defer, reactor, threads, utils, task from zope import interface import yaml import time import cgi import random from distributex.backends import in_memory_backend, memcached_backend class ...
true
true