hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7598b7e3749ec4a9b48dfad4aad79302be74daf
320
py
Python
Python/two-sum.py
coolryze/LeetCode
03876232521a20d32f8fa4e7d6d19cf208739a79
[ "MIT" ]
2
2018-07-18T01:33:07.000Z
2018-11-16T03:17:03.000Z
Python/two-sum.py
coolryze/LeetCode
03876232521a20d32f8fa4e7d6d19cf208739a79
[ "MIT" ]
null
null
null
Python/two-sum.py
coolryze/LeetCode
03876232521a20d32f8fa4e7d6d19cf208739a79
[ "MIT" ]
null
null
null
class Solution: def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ d = dict() for i, num in enumerate(nums): if (target - num) in d: return [d[target - num], i] d[num] = i
22.857143
43
0.434375
class Solution: def twoSum(self, nums, target): d = dict() for i, num in enumerate(nums): if (target - num) in d: return [d[target - num], i] d[num] = i
true
true
f7598bb423105ef9bc30e1c0e5377ca11bdfe458
4,987
py
Python
lib/surface/compute/target_instances/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
lib/surface/compute/target_instances/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
null
null
null
lib/surface/compute/target_instances/create.py
google-cloud-sdk-unofficial/google-cloud-sdk
2a48a04df14be46c8745050f98768e30474a1aac
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# -*- coding: utf-8 -*- # # Copyright 2014 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 requir...
37.216418
80
0.748747
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from googlecloudsdk.api_lib.compute import base_classes from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.compute import exceptions as compute_exceptions from googlecloudsdk.command_li...
true
true
f7598f16a8fea2943aec69d03c06395efe9a6c30
2,778
py
Python
core/base_sr_dataset.py
Guominyingxiongququ/RAFT
04c1bbf2cf404489c7b5fa082a8b883e4df231e7
[ "BSD-3-Clause" ]
null
null
null
core/base_sr_dataset.py
Guominyingxiongququ/RAFT
04c1bbf2cf404489c7b5fa082a8b883e4df231e7
[ "BSD-3-Clause" ]
null
null
null
core/base_sr_dataset.py
Guominyingxiongququ/RAFT
04c1bbf2cf404489c7b5fa082a8b883e4df231e7
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import copy import os.path as osp from collections import defaultdict from pathlib import Path from mmcv import scandir from base_dataset import BaseDataset IMG_EXTENSIONS = ('.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '....
31.568182
79
0.573794
import copy import os.path as osp from collections import defaultdict from pathlib import Path from mmcv import scandir from base_dataset import BaseDataset IMG_EXTENSIONS = ('.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', '.tif', '.TIF', '.tiff', '.TIFF') class ...
true
true
f7598f178f10f8e1b03594bea0f1f0e86b87e061
1,861
py
Python
openstackclient/identity/v3/unscoped_saml.py
cloudification-io/python-openstackclient
e07324e30fbb24e89fd63d1c5a5fe485f693a45c
[ "Apache-2.0" ]
262
2015-01-29T20:10:49.000Z
2022-03-23T01:59:23.000Z
openstackclient/identity/v3/unscoped_saml.py
adgeese/python-openstackclient
06263bd5852aad9cd03a76f50140fbbb2d0751ba
[ "Apache-2.0" ]
5
2015-01-21T02:37:35.000Z
2021-11-23T02:26:00.000Z
openstackclient/identity/v3/unscoped_saml.py
adgeese/python-openstackclient
06263bd5852aad9cd03a76f50140fbbb2d0751ba
[ "Apache-2.0" ]
194
2015-01-08T07:39:27.000Z
2022-03-30T13:51:23.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 # distrib...
35.788462
78
0.669533
from osc_lib.command import command from osc_lib import utils from openstackclient.i18n import _ class ListAccessibleDomains(command.Lister): _description = _("List accessible domains") def take_action(self, parsed_args): columns = ('ID', 'Enabled', 'Name', 'Description') identity_client =...
true
true
f7598f2e313c3031c489f8d9b2981affebe0d28d
8,751
py
Python
share/lib/python/neuron/rxd/geometry3d/FullJoinMorph.py
tommorse/nrn
73236b12977118ae0a98d7dbbed60973994cdaee
[ "BSD-3-Clause" ]
1
2020-05-28T17:21:52.000Z
2020-05-28T17:21:52.000Z
share/lib/python/neuron/rxd/geometry3d/FullJoinMorph.py
tommorse/nrn
73236b12977118ae0a98d7dbbed60973994cdaee
[ "BSD-3-Clause" ]
2
2019-11-09T23:02:28.000Z
2019-11-18T00:17:10.000Z
share/lib/python/neuron/rxd/geometry3d/FullJoinMorph.py
tommorse/nrn
73236b12977118ae0a98d7dbbed60973994cdaee
[ "BSD-3-Clause" ]
1
2019-11-13T21:28:29.000Z
2019-11-13T21:28:29.000Z
import numpy import time import math from .ctng import constructive_neuronal_geometry from .graphicsPrimitives import Sphere, Cone, Cylinder, SkewCone, Plane, Union, Intersection, SphereCone from .GeneralizedVoxelization import voxelize from .simplevolume_helper import simplevolume from .surface_a import surfa...
37.883117
175
0.573992
import numpy import time import math from .ctng import constructive_neuronal_geometry from .graphicsPrimitives import Sphere, Cone, Cylinder, SkewCone, Plane, Union, Intersection, SphereCone from .GeneralizedVoxelization import voxelize from .simplevolume_helper import simplevolume from .surface_a import surfa...
true
true
f7598f667c30f1c00f8dda70738a216f16a8c84b
5,026
py
Python
angr/analyses/reaching_definitions/dataset.py
Alexeyan/angr
445fa2036584598d310ffd58436566847bbc7e1c
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reaching_definitions/dataset.py
Alexeyan/angr
445fa2036584598d310ffd58436566847bbc7e1c
[ "BSD-2-Clause" ]
null
null
null
angr/analyses/reaching_definitions/dataset.py
Alexeyan/angr
445fa2036584598d310ffd58436566847bbc7e1c
[ "BSD-2-Clause" ]
null
null
null
import logging import operator from .constants import DEBUG from .undefined import Undefined, undefined l = logging.getLogger(name=__name__) class DataSet: __slots__ = ('data', '_bits', '_mask') """ This class represents a set of data. Addition and subtraction are performed on the cartesian produ...
29.391813
115
0.558496
import logging import operator from .constants import DEBUG from .undefined import Undefined, undefined l = logging.getLogger(name=__name__) class DataSet: __slots__ = ('data', '_bits', '_mask') maximum_size = 5 def __init__(self, data, bits): self.data = data if type(data) is set else {data}...
true
true
f7598ff30ecd5cd7ee283a1da89045686b12d33a
46,800
py
Python
ckan/logic/action/update.py
aramboi/ckan
e25a0e53541a54bdfeeae6cbb13280810e2de0d5
[ "BSD-3-Clause" ]
2
2017-05-15T08:16:49.000Z
2019-05-30T23:53:39.000Z
ckan/logic/action/update.py
aramboi/ckan
e25a0e53541a54bdfeeae6cbb13280810e2de0d5
[ "BSD-3-Clause" ]
1
2021-05-13T14:40:55.000Z
2021-05-13T14:40:55.000Z
ckan/logic/action/update.py
cascaoSDC/ckan
75a08caa7c688ce70229dfea7070cc667a15c5e8
[ "BSD-3-Clause" ]
4
2018-10-08T12:05:16.000Z
2021-11-24T16:18:52.000Z
# encoding: utf-8 '''API functions for updating existing data in CKAN.''' import logging import datetime import time import json from ckan.common import config import ckan.common as converters import six from six import text_type import ckan.lib.helpers as h import ckan.plugins as plugins import ckan.logic as logic...
33.309609
117
0.654573
import logging import datetime import time import json from ckan.common import config import ckan.common as converters import six from six import text_type import ckan.lib.helpers as h import ckan.plugins as plugins import ckan.logic as logic import ckan.logic.schema as schema_ import ckan.lib.dictization as dictiz...
true
true
f7599095c65c9f6275e483618427ea90514e08e9
2,024
py
Python
language/nql/nql_test_lib.py
Ram81/language
cb954c8bf3c9265855b23e768f70abb528ab60a7
[ "Apache-2.0" ]
1
2020-02-12T17:27:05.000Z
2020-02-12T17:27:05.000Z
language/nql/nql_test_lib.py
Ram81/language
cb954c8bf3c9265855b23e768f70abb528ab60a7
[ "Apache-2.0" ]
null
null
null
language/nql/nql_test_lib.py
Ram81/language
cb954c8bf3c9265855b23e768f70abb528ab60a7
[ "Apache-2.0" ]
1
2019-11-20T02:38:48.000Z
2019-11-20T02:38:48.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
35.508772
74
0.63587
from __future__ import absolute_import from __future__ import division from __future__ import print_function from language.nql import nql def cell(i, j): return 'cell_%d_%d' % (i, j) def make_grid(): result = nql.NeuralQueryContext() result.declare_relation('n', 'place_t', 'place_t') result.declare_rela...
true
true
f759925ae27e47febf6649c942592b075b96a6b8
440
py
Python
ex46/skeleton/setup.py
aung-kyaw-khaing/python-exercises
1a2bf0ef143c33e3493cdc9250636c0963a70ff7
[ "MIT" ]
null
null
null
ex46/skeleton/setup.py
aung-kyaw-khaing/python-exercises
1a2bf0ef143c33e3493cdc9250636c0963a70ff7
[ "MIT" ]
null
null
null
ex46/skeleton/setup.py
aung-kyaw-khaing/python-exercises
1a2bf0ef143c33e3493cdc9250636c0963a70ff7
[ "MIT" ]
1
2018-06-25T20:42:25.000Z
2018-06-25T20:42:25.000Z
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'My Project', 'author': 'Aung Kyaw Khaing', 'url': 'URL to get it at.', 'download_url': 'Where to download it.', 'author_email': 'mitu16888@gmail.com', 'version': '0.1', ...
23.157895
44
0.588636
try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'My Project', 'author': 'Aung Kyaw Khaing', 'url': 'URL to get it at.', 'download_url': 'Where to download it.', 'author_email': 'mitu16888@gmail.com', 'version': '0.1', ...
true
true
f75992b9a6aac216ca5363079c49ea2044d2bed0
7,869
py
Python
applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/core/web_infrastructure/supervisorctl.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
1
2020-10-14T00:06:54.000Z
2020-10-14T00:06:54.000Z
applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/core/web_infrastructure/supervisorctl.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/core/web_infrastructure/supervisorctl.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
2
2015-08-06T07:45:48.000Z
2017-01-04T17:47:16.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Matt Wright <matt@nobien.net> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
35.445946
139
0.655484
import os DOCUMENTATION = ''' --- module: supervisorctl short_description: Manage the state of a program or group of programs running via supervisord description: - Manage the state of a program or group of programs running via supervisord version_added: "0.7" options: name: description: - The name o...
true
true
f75993c7a6578a168a612107800c90df1e8b3963
387
py
Python
venv/lib/python3.10/site-packages/traitlets/_version.py
Ahmed-Abdelgawad-Dev/fullstack-startercode
edf6eb00d7c30dd4ce25c3f2bcd61ba625a3d40f
[ "MIT" ]
null
null
null
venv/lib/python3.10/site-packages/traitlets/_version.py
Ahmed-Abdelgawad-Dev/fullstack-startercode
edf6eb00d7c30dd4ce25c3f2bcd61ba625a3d40f
[ "MIT" ]
null
null
null
venv/lib/python3.10/site-packages/traitlets/_version.py
Ahmed-Abdelgawad-Dev/fullstack-startercode
edf6eb00d7c30dd4ce25c3f2bcd61ba625a3d40f
[ "MIT" ]
null
null
null
version_info = (5, 2, 2) __version__ = "5.2.2" # unlike `.dev`, alpha, beta and rc _must not_ have dots, # or the wheel and tgz won't look to pip like the same version. assert __version__ == ( ".".join(map(str, version_info)).replace(".b", "b").replace(".a", "a").replace(".rc", "rc") ) assert ".b" not in __versio...
29.769231
95
0.656331
version_info = (5, 2, 2) __version__ = "5.2.2" assert __version__ == ( ".".join(map(str, version_info)).replace(".b", "b").replace(".a", "a").replace(".rc", "rc") ) assert ".b" not in __version__ assert ".a" not in __version__ assert ".rc" not in __version__
true
true
f759945fd58e0ebd276420727c9583058962d8b8
3,245
py
Python
setup.py
hadrianl/qlib
fa8f1cba06ba511744a0625afdf2cc3ac05302d0
[ "MIT" ]
1
2021-09-10T09:44:25.000Z
2021-09-10T09:44:25.000Z
setup.py
hadrianl/qlib
fa8f1cba06ba511744a0625afdf2cc3ac05302d0
[ "MIT" ]
null
null
null
setup.py
hadrianl/qlib
fa8f1cba06ba511744a0625afdf2cc3ac05302d0
[ "MIT" ]
1
2021-09-10T09:44:29.000Z
2021-09-10T09:44:29.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. import io import os import numpy from setuptools import find_packages, setup, Extension # Package meta-data. NAME = "pyqlib" DESCRIPTION = "A Quantitative-research Platform" REQUIRES_PYTHON = ">=3.5.0" VERSION = "0.6.3.99" # Detect Cython try:...
26.382114
100
0.619106
import io import os import numpy from setuptools import find_packages, setup, Extension NAME = "pyqlib" DESCRIPTION = "A Quantitative-research Platform" REQUIRES_PYTHON = ">=3.5.0" VERSION = "0.6.3.99" try: import Cython ver = Cython.__version__ _CYTHON_INSTALLED = ver >= "0.28" except ImportError: ...
true
true
f7599584e08061ee3a21af11d39b177c6b686461
8,579
py
Python
scripts/linters/python_linter_test.py
mzaman07/oppia
cac5737ba63a0a209d47d20f3b464495da12bd59
[ "Apache-2.0" ]
1
2022-02-22T09:27:22.000Z
2022-02-22T09:27:22.000Z
scripts/linters/python_linter_test.py
mzaman07/oppia
cac5737ba63a0a209d47d20f3b464495da12bd59
[ "Apache-2.0" ]
null
null
null
scripts/linters/python_linter_test.py
mzaman07/oppia
cac5737ba63a0a209d47d20f3b464495da12bd59
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
42.681592
80
0.695419
from __future__ import absolute_import from __future__ import unicode_literals import multiprocessing import os from core.tests import test_utils import python_utils from . import pre_commit_linter from . import python_linter LINTER_TESTS_DIR = os.path.join(os.getcwd(), 'scripts', 'linters', 'test_files') VALID...
true
true
f75995987874cb43f821921b01b1b17ca5ae07b6
171
py
Python
efls-console/console/resource/__init__.py
universe-hcy/Elastic-Federated-Learning-Solution
4e047fbbe6ae9809cd631499b7d3a3855dfe2208
[ "Apache-2.0" ]
65
2021-09-30T01:54:34.000Z
2022-03-26T13:57:15.000Z
efls-console/console/resource/__init__.py
universe-hcy/Elastic-Federated-Learning-Solution
4e047fbbe6ae9809cd631499b7d3a3855dfe2208
[ "Apache-2.0" ]
24
2021-09-30T09:25:43.000Z
2022-03-29T06:33:44.000Z
efls-console/console/resource/__init__.py
universe-hcy/Elastic-Federated-Learning-Solution
4e047fbbe6ae9809cd631499b7d3a3855dfe2208
[ "Apache-2.0" ]
18
2021-09-30T09:04:08.000Z
2022-03-31T10:17:27.000Z
# -*- coding: utf8 -*- __all__ = ['blueprint', 'ResourceService'] from console.resource.controller import blueprint from console.resource.service import ResourceService
24.428571
52
0.77193
__all__ = ['blueprint', 'ResourceService'] from console.resource.controller import blueprint from console.resource.service import ResourceService
true
true
f759960554a1a5f17dc17b7596cb65ee638f39ec
41,432
py
Python
src/cowrie/commands/base.py
BA7JCM/cowrie
830b3860e75eebcc608c21a2a15543178d73fa1e
[ "BSD-3-Clause" ]
null
null
null
src/cowrie/commands/base.py
BA7JCM/cowrie
830b3860e75eebcc608c21a2a15543178d73fa1e
[ "BSD-3-Clause" ]
null
null
null
src/cowrie/commands/base.py
BA7JCM/cowrie
830b3860e75eebcc608c21a2a15543178d73fa1e
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com> # See the COPYRIGHT file for more information # coding=utf-8 from __future__ import annotations import codecs import datetime import getopt import random import re import time from typing import Callable from twisted.internet import error, reactor # type: igno...
35.502999
188
0.359191
from __future__ import annotations import codecs import datetime import getopt import random import re import time from typing import Callable from twisted.internet import error, reactor from twisted.python import failure, log from cowrie.core import utils from cowrie.shell.command import HoneyPotCommand from cow...
true
true
f759966497825fc6bfe9b0da4a1b5b46233cfd41
3,662
py
Python
linearRegression/main.py
PauloBernardo/InteligenciaComputacional
f5edcc01c68b83fc4435e6669e3ebd0a32d7d8b7
[ "MIT" ]
null
null
null
linearRegression/main.py
PauloBernardo/InteligenciaComputacional
f5edcc01c68b83fc4435e6669e3ebd0a32d7d8b7
[ "MIT" ]
null
null
null
linearRegression/main.py
PauloBernardo/InteligenciaComputacional
f5edcc01c68b83fc4435e6669e3ebd0a32d7d8b7
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import LinearRegression def simple_example(): X = [10, 20, 30] Y = [15, 19, 45] plt.scatter(X, Y,) plt.show() A = np.array([10, 1, 20, 1, 30, 1]).reshape(3, 2) B = np.array(Y).reshape(3, 1) a = np.linspace(10, 3...
32.122807
166
0.65101
import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import LinearRegression def simple_example(): X = [10, 20, 30] Y = [15, 19, 45] plt.scatter(X, Y,) plt.show() A = np.array([10, 1, 20, 1, 30, 1]).reshape(3, 2) B = np.array(Y).reshape(3, 1) a = np.linspace(10, 3...
true
true
f75997a1b42236473c8eed4795a2034c3fe67c5e
1,124
py
Python
gitgetpm/commands/edit.py
awesmubarak/gitget
35b193c120b3c26ba55f972f67a7b18d158f0077
[ "MIT" ]
6
2019-09-29T04:11:04.000Z
2021-01-22T10:27:51.000Z
gitgetpm/commands/edit.py
abactel/git-get
35b193c120b3c26ba55f972f67a7b18d158f0077
[ "MIT" ]
6
2017-12-04T20:40:59.000Z
2019-08-13T20:43:22.000Z
gitgetpm/commands/edit.py
awesmubarak/gitget
35b193c120b3c26ba55f972f67a7b18d158f0077
[ "MIT" ]
2
2017-12-06T06:58:41.000Z
2019-09-09T15:46:27.000Z
from ._base import Base from loguru import logger from os import path import subprocess, os, platform class Edit(Base): """Edit. Opens the default editor (run `echo $EDITOR`) to edit the package file. Usage: gitget edit [global options] Examples: gitget edit """ def run(self): ...
30.378378
131
0.593416
from ._base import Base from loguru import logger from os import path import subprocess, os, platform class Edit(Base): def run(self): filepath = self.get_package_list_filepath() logger.debug("Attempting to open the text editor") try: if platform.system() == "Darwin":...
true
true
f7599807259b58929eac1ef8bb077b57cfe74a79
710
py
Python
byecha/src/byecha/basemodel.py
nothink/ByeCha
b9619c7fa54a14c71801afe14d682052532c7e01
[ "MIT" ]
null
null
null
byecha/src/byecha/basemodel.py
nothink/ByeCha
b9619c7fa54a14c71801afe14d682052532c7e01
[ "MIT" ]
1
2019-12-08T14:43:44.000Z
2019-12-08T14:43:44.000Z
byecha/src/byecha/basemodel.py
nothink/ByeCha
b9619c7fa54a14c71801afe14d682052532c7e01
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- class BaseModel(object): _all_dic = None ''' Base Model ''' def __init__(self, uid, dic): ''' initializer ''' self.uid = uid # keep all values in dic for key in dic.keys(): setattr(self, key, dic.get(key, None)) @classmethod def...
27.307692
62
0.528169
class BaseModel(object): _all_dic = None def __init__(self, uid, dic): self.uid = uid for key in dic.keys(): setattr(self, key, dic.get(key, None)) @classmethod def get_all(cls, all_dic=None): if not cls._all_dic and all_dic: cls._all_dic = []...
true
true
f75998a1033eea11784b812b820c93c4c3c7c384
1,182
py
Python
python_advance/multiprocessing/multiprocess_basic.py
makeesyai/makeesy-python
f0ce124d1db5dc5218e3c226ad5e0dd601ff0e9c
[ "Apache-2.0" ]
2
2021-01-11T12:05:15.000Z
2021-01-11T21:30:03.000Z
python_advance/multiprocessing/multiprocess_basic.py
makeesyai/makeesy-python
f0ce124d1db5dc5218e3c226ad5e0dd601ff0e9c
[ "Apache-2.0" ]
null
null
null
python_advance/multiprocessing/multiprocess_basic.py
makeesyai/makeesy-python
f0ce124d1db5dc5218e3c226ad5e0dd601ff0e9c
[ "Apache-2.0" ]
1
2021-01-11T11:55:51.000Z
2021-01-11T11:55:51.000Z
# Multiprocessing: ability of a system to support more than one processor at the same time. # Requires- # 1. Multiprocessor - more than one central processor. # 2. Hyper-Threading - makes each core look like two CPUs to the operating system import time from multiprocessing import Process def cpu_bound(n, name): ...
22.301887
91
0.605753
import time from multiprocessing import Process def cpu_bound(n, name): print(f'Process:{name} started...') while n: n -= 1 print(f'Process:{name} Completed!') if __name__ == '__main__': start = time.time() n = 100000000 p1 = Process(target=cpu_bound, args=(n, "p1"...
true
true
f75998cf711102b1106ac962dcc6bf88ed474d6a
1,724
py
Python
core/dbt/version.py
ClaySheffler/dbt
588851ac1cd2ef9856706f14cee573dedbc46d8c
[ "Apache-2.0" ]
1
2020-08-11T08:44:33.000Z
2020-08-11T08:44:33.000Z
core/dbt/version.py
ClaySheffler/dbt
588851ac1cd2ef9856706f14cee573dedbc46d8c
[ "Apache-2.0" ]
null
null
null
core/dbt/version.py
ClaySheffler/dbt
588851ac1cd2ef9856706f14cee573dedbc46d8c
[ "Apache-2.0" ]
null
null
null
import json import re import requests import dbt.exceptions import dbt.semver PYPI_VERSION_URL = 'https://pypi.org/pypi/dbt/json' def get_latest_version(): try: resp = requests.get(PYPI_VERSION_URL) data = resp.json() version_string = data['info']['version'] except (json.JSONDecode...
27.806452
77
0.658933
import json import re import requests import dbt.exceptions import dbt.semver PYPI_VERSION_URL = 'https://pypi.org/pypi/dbt/json' def get_latest_version(): try: resp = requests.get(PYPI_VERSION_URL) data = resp.json() version_string = data['info']['version'] except (json.JSONDecode...
true
true
f759995e60917449077717656564f810cf67e4f3
4,710
py
Python
workload_analyzer/PerfMonAnalyzer.py
xkf15/faas-profiler
77681daa9f5776e58d1e7dc2d38b61735d54b014
[ "MIT" ]
70
2019-10-07T17:07:08.000Z
2022-03-10T18:23:10.000Z
workload_analyzer/PerfMonAnalyzer.py
xkf15/faas-profiler
77681daa9f5776e58d1e7dc2d38b61735d54b014
[ "MIT" ]
8
2019-11-20T04:40:53.000Z
2022-03-15T07:15:39.000Z
workload_analyzer/PerfMonAnalyzer.py
xkf15/faas-profiler
77681daa9f5776e58d1e7dc2d38b61735d54b014
[ "MIT" ]
28
2019-10-22T18:16:34.000Z
2022-02-09T00:10:12.000Z
# Copyright (c) 2019 Princeton University # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from datetime import datetime, timedelta import json import os.path import pandas as pd import sys sys.path = ['./', '../'] + sys.path # Local from G...
31.610738
95
0.548408
from datetime import datetime, timedelta import json import os.path import pandas as pd import sys sys.path = ['./', '../'] + sys.path from GenConfigs import * from Logger import ScriptLogger logger = ScriptLogger(loggername='workload_analyzer/perf_mon_analyzer', logfile='WA.log') def ReadPQ...
true
true
f7599be82b3f66aa748b25de3dd2173211ecd9e0
9,886
py
Python
infer/lib/python/inferlib/issues.py
sangwoo-joh/infer
598a4d5a5579a92bf51ee5cad5dbe5a36edfa2d0
[ "MIT" ]
30
2019-06-28T15:20:25.000Z
2021-08-25T11:37:30.000Z
infer/lib/python/inferlib/issues.py
sangwoo-joh/infer
598a4d5a5579a92bf51ee5cad5dbe5a36edfa2d0
[ "MIT" ]
39
2019-06-28T15:08:12.000Z
2020-07-17T01:44:33.000Z
infer/lib/python/inferlib/issues.py
sangwoo-joh/infer
598a4d5a5579a92bf51ee5cad5dbe5a36edfa2d0
[ "MIT" ]
17
2019-06-28T14:40:41.000Z
2021-03-11T19:26:13.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_li...
35.181495
79
0.63686
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import codecs import datetime import itertools import operator import os import re import sys try: from lxml import etree except ImportError: etree = None from...
false
true
f7599c0074270551593f87371a1460ab934e25cd
8,426
py
Python
raw/parse_pdf2txt.py
lexibank/satterthwaitephillipstb
4828122bdd3bfa462528118b1fd2ab92570c20f0
[ "CC-BY-4.0" ]
null
null
null
raw/parse_pdf2txt.py
lexibank/satterthwaitephillipstb
4828122bdd3bfa462528118b1fd2ab92570c20f0
[ "CC-BY-4.0" ]
4
2018-06-20T08:47:48.000Z
2021-07-26T10:15:18.000Z
raw/parse_pdf2txt.py
lexibank/satterthwaitetb
4828122bdd3bfa462528118b1fd2ab92570c20f0
[ "CC-BY-4.0" ]
null
null
null
ERRATA = { "earth": {"repl": "earth1|earth2", "num_tokens": 2}, "enter (去)[": { "repl": "enter|evening|extinguish|eye|fall|Hanzi|徃 (去) [徃来]", "num_tokens": 7, }, "far": { "repl": "far|fart, to|fast|fat [of person]|fat [of meat]|father|fear, to|Hanzi|径", "num_tokens": 8, ...
42.555556
195
0.564087
ERRATA = { "earth": {"repl": "earth1|earth2", "num_tokens": 2}, "enter (去)[": { "repl": "enter|evening|extinguish|eye|fall|Hanzi|徃 (去) [徃来]", "num_tokens": 7, }, "far": { "repl": "far|fart, to|fast|fat [of person]|fat [of meat]|father|fear, to|Hanzi|径", "num_tokens": 8, ...
false
true
f7599c2ff40378e4848d674e13c12d80df084089
2,397
py
Python
sudoku.py
cipcosma/sudoku
de209e7a3ab319cd57590eb1037d829055ae408f
[ "Apache-2.0" ]
null
null
null
sudoku.py
cipcosma/sudoku
de209e7a3ab319cd57590eb1037d829055ae408f
[ "Apache-2.0" ]
null
null
null
sudoku.py
cipcosma/sudoku
de209e7a3ab319cd57590eb1037d829055ae408f
[ "Apache-2.0" ]
null
null
null
''' Created on Jan 6, 2015 @author: Ciprian Cosma ''' def find_first_eligible(matrix): ''' return the first empty location of the matrix it searches by row/column if all the matrix has values, it returns -1, -1 ''' size = len(matrix) for x in range(size): for y in range(size): ...
26.054348
68
0.508135
''' Created on Jan 6, 2015 @author: Ciprian Cosma ''' def find_first_eligible(matrix): ''' return the first empty location of the matrix it searches by row/column if all the matrix has values, it returns -1, -1 ''' size = len(matrix) for x in range(size): for y in range(size): ...
false
true
f7599cbcefaf3a11e24f1d3d6427d82b72e8bbdb
7,847
py
Python
sequentia/lib/sequentia/internals/validator.py
eonu/inf4-hons
4b7372272860f19c0f5ea2910f122a62531d7d2e
[ "CC-BY-4.0" ]
null
null
null
sequentia/lib/sequentia/internals/validator.py
eonu/inf4-hons
4b7372272860f19c0f5ea2910f122a62531d7d2e
[ "CC-BY-4.0" ]
null
null
null
sequentia/lib/sequentia/internals/validator.py
eonu/inf4-hons
4b7372272860f19c0f5ea2910f122a62531d7d2e
[ "CC-BY-4.0" ]
null
null
null
import numpy as np from copy import copy class _Validator: """Performs internal validations on various input types.""" def observation_sequences(self, X, allow_single=False): """Validates observation sequence(s). Parameters ---------- X: numpy.ndarray or List[numpy.ndarray] ...
30.893701
150
0.550656
import numpy as np from copy import copy class _Validator: def observation_sequences(self, X, allow_single=False): X = copy(X) if isinstance(X, (list, np.ndarray) if allow_single else list): if isinstance(X, list): for i, x in enumerate(X): if not is...
true
true
f7599dc902555a1f3de34791bb19ceda28819be7
945
py
Python
streaming_app/stream.py
chriscoombs/aws-rekognition-workshop-twitter-bot
8b0306763791b3e41ed814c644bceab727969641
[ "Apache-2.0" ]
40
2017-06-20T00:23:47.000Z
2018-01-31T09:34:26.000Z
streaming_app/stream.py
chriscoombs/aws-rekognition-workshop-twitter-bot
8b0306763791b3e41ed814c644bceab727969641
[ "Apache-2.0" ]
1
2017-06-21T20:12:13.000Z
2017-06-22T15:33:09.000Z
streaming_app/stream.py
chriscoombs/aws-rekognition-workshop-twitter-bot
8b0306763791b3e41ed814c644bceab727969641
[ "Apache-2.0" ]
21
2018-02-13T17:32:41.000Z
2021-10-30T20:37:22.000Z
from __future__ import print_function import json import sys import os import boto3 from fleece.xray import monkey_patch_botocore_for_xray monkey_patch_botocore_for_xray() import twitter SSM_NAME = os.getenv("SSM_PARAMETER_NAME") REGION = os.getenv("REGION") STREAM_NAME = os.getenv("STREAM_NAME") session = boto3.s...
26.25
93
0.701587
from __future__ import print_function import json import sys import os import boto3 from fleece.xray import monkey_patch_botocore_for_xray monkey_patch_botocore_for_xray() import twitter SSM_NAME = os.getenv("SSM_PARAMETER_NAME") REGION = os.getenv("REGION") STREAM_NAME = os.getenv("STREAM_NAME") session = boto3.s...
true
true
f7599e3f40016359b6536bb3785e75b23b14c93b
61
py
Python
cieg/utils/covariance/__init__.py
tpopordanoska/confidence-intervals
6b9325093fdfd9dd903a56d6832e472427a4a24f
[ "MIT" ]
3
2021-06-23T10:21:59.000Z
2021-07-24T18:32:57.000Z
cieg/utils/covariance/__init__.py
tpopordanoska/confidence-intervals
6b9325093fdfd9dd903a56d6832e472427a4a24f
[ "MIT" ]
null
null
null
cieg/utils/covariance/__init__.py
tpopordanoska/confidence-intervals
6b9325093fdfd9dd903a56d6832e472427a4a24f
[ "MIT" ]
null
null
null
from ._cov_cov import covCov_estimator from ._cov import cov
20.333333
38
0.836066
from ._cov_cov import covCov_estimator from ._cov import cov
true
true
f7599f56a5511462f76a94a90ae392f3af7f0331
695
py
Python
argo_sys/argonaute/views.py
viallymboma/argo
ad52acdd9e7fd91176f3fe84cbb786c13f5a026f
[ "MIT" ]
null
null
null
argo_sys/argonaute/views.py
viallymboma/argo
ad52acdd9e7fd91176f3fe84cbb786c13f5a026f
[ "MIT" ]
null
null
null
argo_sys/argonaute/views.py
viallymboma/argo
ad52acdd9e7fd91176f3fe84cbb786c13f5a026f
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions # from django.views.decoraors.csrf import ensure_csrf_cookie, csrf_protect from django.middleware.csrf import get_token # Create your views here. def welcome(...
34.75
74
0.769784
from django.shortcuts import render from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions from django.middleware.csrf import get_token def welcome(request): return render(request, 'index.html') def csrf(request): return JsonResponse({'csrf...
true
true
f7599f85e1fb90cbbea9b0bcf9b6b502b8ee7c6a
3,394
py
Python
Backend/SihProject/SihProject/urls.py
rondon1947/RA26_Ctrl-Alt-Elite_WIMDR
cc88219fee93d8d9ec176609fe0b4fbe2ab4b2ac
[ "MIT" ]
1
2020-10-06T03:57:28.000Z
2020-10-06T03:57:28.000Z
Backend/SihProject/SihProject/urls.py
Amitdutta7/SIH2020
9c7448008aa294cc7c5ab40dcac66f30dec11988
[ "MIT" ]
null
null
null
Backend/SihProject/SihProject/urls.py
Amitdutta7/SIH2020
9c7448008aa294cc7c5ab40dcac66f30dec11988
[ "MIT" ]
2
2020-08-05T19:34:19.000Z
2020-08-18T15:51:42.000Z
"""SihProject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
52.215385
311
0.715675
from django.contrib import admin from django.urls import path, include from .router import router from rest_framework.authtoken import views from django.contrib.auth.views import LoginView from proj.views import UserRegister, CheckOnlyGovernMentView, CheckOnlyNgoView, activate, UserRegisterMobile, GetLocationList, GetA...
true
true
f759a00027a0e91ea731edb68acca794e006f9f2
2,348
py
Python
script/cache_result.py
naver/qadiver
041b4a31d4835c2acaf9640d74bf24c4b439203b
[ "Apache-2.0" ]
8
2019-03-14T06:39:33.000Z
2019-09-24T08:08:42.000Z
script/cache_result.py
minchoi02/qadiver
041b4a31d4835c2acaf9640d74bf24c4b439203b
[ "Apache-2.0" ]
null
null
null
script/cache_result.py
minchoi02/qadiver
041b4a31d4835c2acaf9640d74bf24c4b439203b
[ "Apache-2.0" ]
3
2019-04-13T04:37:50.000Z
2021-10-01T05:42:43.000Z
# Copyright 2019-present NAVER Corp. # # 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 ...
31.306667
81
0.704003
import sys sys.path.insert(0, "./") import argparse, json from tqdm import tqdm from cache.cache_db import QACache parser = argparse.ArgumentParser() parser.add_argument('--config_file', type=str, default=None) parser.add_argument('--cache_path', type=str, default="cache/qa_cache.db") parser.add_argument('--data_p...
true
true
f759a0a1a0e1b2b4e4c41d9ffeec17a816810b58
52,917
py
Python
tensorflow/python/ops/array_ops.py
JianGoForIt/tensorflow
12e78f07a30e5ec8d1a9baf7cd87f4f45d29b657
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/array_ops.py
JianGoForIt/tensorflow
12e78f07a30e5ec8d1a9baf7cd87f4f45d29b657
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/array_ops.py
JianGoForIt/tensorflow
12e78f07a30e5ec8d1a9baf7cd87f4f45d29b657
[ "Apache-2.0" ]
1
2022-01-12T08:21:25.000Z
2022-01-12T08:21:25.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
32.624538
86
0.660808
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import numpy as np from tensorflow.python.framework import dtypes from tensorflow.python.framework import ops from tensorflow.python.framework import tensor_shape from tensorflow.python.framework i...
true
true
f759a39731d566f2fd5f4ee1b384d924524502f2
716
py
Python
egs/sprakbanken/s5/local/normalize_transcript.py
jxzhanggg/kaldi-trunk
03fbab26e5714a990e1b6dee9475d4a282a42ccc
[ "Apache-2.0" ]
319
2016-10-24T23:08:04.000Z
2022-03-08T02:36:51.000Z
egs/sprakbanken/s5/local/normalize_transcript.py
jxzhanggg/kaldi-trunk
03fbab26e5714a990e1b6dee9475d4a282a42ccc
[ "Apache-2.0" ]
18
2017-01-12T12:08:07.000Z
2020-06-18T07:37:20.000Z
egs/sprakbanken/s5/local/normalize_transcript.py
jxzhanggg/kaldi-trunk
03fbab26e5714a990e1b6dee9475d4a282a42ccc
[ "Apache-2.0" ]
87
2016-10-25T04:39:48.000Z
2021-12-24T07:47:31.000Z
#!/usr/bin/env python import codecs import sys import re import writenumbers ## Global vars normdict = {".": "", ",": "", ":": "", ";": "", "?": "", "\\": " ", "\t": " " } t_table = str.maketrans(normdict) ## Main numtable = writ...
19.351351
60
0.550279
import codecs import sys import re import writenumbers normdict = {".": "", ",": "", ":": "", ";": "", "?": "", "\\": " ", "\t": " " } t_table = str.maketrans(normdict) numtable = writenumbers.loadNumTable(sys.argv[1]) transcript...
true
true
f759a71d535b3c18308e31bc5fe44cf4c4199f09
6,329
py
Python
chainer/iterators/multithread_iterator.py
Munyola/chainer
11f0a8943fc3e315801cf66947670c2cf8df3d61
[ "MIT" ]
null
null
null
chainer/iterators/multithread_iterator.py
Munyola/chainer
11f0a8943fc3e315801cf66947670c2cf8df3d61
[ "MIT" ]
1
2019-06-29T21:02:12.000Z
2019-07-29T21:11:45.000Z
chainer/iterators/multithread_iterator.py
Munyola/chainer
11f0a8943fc3e315801cf66947670c2cf8df3d61
[ "MIT" ]
null
null
null
from __future__ import division from multiprocessing import pool import numpy from chainer.dataset import iterator from chainer.iterators import _statemachine from chainer.iterators.order_samplers import ShuffleOrderSampler class MultithreadIterator(iterator.Iterator): """Dataset iterator that loads examples i...
33.136126
78
0.624111
from __future__ import division from multiprocessing import pool import numpy from chainer.dataset import iterator from chainer.iterators import _statemachine from chainer.iterators.order_samplers import ShuffleOrderSampler class MultithreadIterator(iterator.Iterator): def __init__(self, dataset, batch_size, ...
true
true
f759a8114ec66f680a71914b8fffe1fd9e447456
375
py
Python
wavespectra/input/__init__.py
jorgeperezg/wavespectra
38f35e5dd2955d8b9565d5b8304822ae72890a7b
[ "MIT" ]
57
2018-04-03T20:01:08.000Z
2022-03-02T01:34:44.000Z
wavespectra/input/__init__.py
jorgeperezg/wavespectra
38f35e5dd2955d8b9565d5b8304822ae72890a7b
[ "MIT" ]
20
2018-05-08T21:53:35.000Z
2022-03-31T19:02:53.000Z
wavespectra/input/__init__.py
jorgeperezg/wavespectra
38f35e5dd2955d8b9565d5b8304822ae72890a7b
[ "MIT" ]
23
2018-04-03T02:00:36.000Z
2021-08-18T13:07:48.000Z
"""Access functions to read spectra from data files. The following structure is expected: - Reading functions for each data file type defined in specific modules - Modules named as {datatype}.py, e.g. swan.py - Functions named as read_{dataname}, e.g. read_swan All functions defined with these conventions...
31.25
75
0.754667
true
true
f759a92e921bb0a9605b06aec9982f429a26c235
8,878
py
Python
oscaar/photometry.py
breaks-software/OSCAAR
254acfccbd907b89485b9d78cff2681892a40309
[ "MIT" ]
29
2015-02-01T13:06:27.000Z
2022-02-19T08:47:51.000Z
oscaar/photometry.py
breaks-software/OSCAAR
254acfccbd907b89485b9d78cff2681892a40309
[ "MIT" ]
15
2015-04-21T19:55:11.000Z
2021-03-28T16:44:16.000Z
oscaar/photometry.py
breaks-software/OSCAAR
254acfccbd907b89485b9d78cff2681892a40309
[ "MIT" ]
8
2015-01-24T23:52:51.000Z
2021-03-28T16:07:08.000Z
'''oscaar v2.0 Module for differential photometry Developed by Brett Morris, 2011-2013''' import numpy as np from matplotlib import pyplot as plt import matplotlib.cm as cm def phot(image, xCentroid, yCentroid, apertureRadius, plottingThings, annulusOuterRadiusFactor=2.8, annulusInnerRadiusFactor=1.40, ccdGain=...
44.169154
229
0.655553
import numpy as np from matplotlib import pyplot as plt import matplotlib.cm as cm def phot(image, xCentroid, yCentroid, apertureRadius, plottingThings, annulusOuterRadiusFactor=2.8, annulusInnerRadiusFactor=1.40, ccdGain=1, plots=False): if plots: [fig,subplotsDimensions,photSubplotsOffset] = plottingThin...
true
true
f759a985c508488dd9fe357d6f30ca1ae41513f4
1,797
py
Python
pybo/utils.py
dreamflasher/pybo-python3
803873df98640c94580ccd93b6661197acf8fc5e
[ "BSD-2-Clause" ]
null
null
null
pybo/utils.py
dreamflasher/pybo-python3
803873df98640c94580ccd93b6661197acf8fc5e
[ "BSD-2-Clause" ]
null
null
null
pybo/utils.py
dreamflasher/pybo-python3
803873df98640c94580ccd93b6661197acf8fc5e
[ "BSD-2-Clause" ]
1
2020-12-20T23:50:28.000Z
2020-12-20T23:50:28.000Z
""" Various utility functions. """ import numpy as np import re import subprocess __all__ = ['rstate', 'SubprocessQuery', 'InteractiveQuery'] def rstate(rng=None): """ Return a RandomState object. This is just a simple wrapper such that if rng is already an instance of RandomState it will be passed ...
30.457627
81
0.631608
import numpy as np import re import subprocess __all__ = ['rstate', 'SubprocessQuery', 'InteractiveQuery'] def rstate(rng=None): if not isinstance(rng, np.random.RandomState): rng = np.random.RandomState(rng) return rng class SubprocessQuery(object): def __init__(self, command): se...
true
true
f759a98d3960337fb3db7a3c4d3f931852dfad5e
9,540
py
Python
biothings/web/handlers/api.py
zcqian/biothings.api
61c0300317cf2ac7db8310b5b5741ad9b08c4163
[ "Apache-2.0" ]
null
null
null
biothings/web/handlers/api.py
zcqian/biothings.api
61c0300317cf2ac7db8310b5b5741ad9b08c4163
[ "Apache-2.0" ]
null
null
null
biothings/web/handlers/api.py
zcqian/biothings.api
61c0300317cf2ac7db8310b5b5741ad9b08c4163
[ "Apache-2.0" ]
null
null
null
""" Biothings Web API Handlers Supports: (all features in parent classes and ...) - payload type 'application/json' (through self.json_arguments) - parsing keyword argument options (type, default, alias, ...) - multi-type dictionary output (json, yaml, html, msgpack) - standardized error response ...
34.817518
86
0.613208
import datetime import json from collections import OrderedDict from pprint import pformat from urllib.parse import (parse_qs, unquote_plus, urlencode, urlparse, urlunparse) import yaml from biothings.utils.common import DateTimeJSONEncoder from biothings.utils.web.analytics import GAMixIn f...
true
true
f759a9d24ea72d8b0b9f04319a3740b176fcada9
2,042
py
Python
static/extension/dynamic_scope/work_phone.py
madumlao/gluu-community-edition-setup
59a7e707abead60c980fb0fc7efed0d524f280c4
[ "MIT" ]
null
null
null
static/extension/dynamic_scope/work_phone.py
madumlao/gluu-community-edition-setup
59a7e707abead60c980fb0fc7efed0d524f280c4
[ "MIT" ]
null
null
null
static/extension/dynamic_scope/work_phone.py
madumlao/gluu-community-edition-setup
59a7e707abead60c980fb0fc7efed0d524f280c4
[ "MIT" ]
null
null
null
# oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. # Copyright (c) 2016, Gluu # # Author: Yuriy Movchan # from org.xdi.model.custom.script.type.scope import DynamicScopeType from org.xdi.service.cdi.util import CdiUtil from org.xdi.oxauth.service import Us...
36.464286
106
0.710088
from org.xdi.model.custom.script.type.scope import DynamicScopeType from org.xdi.service.cdi.util import CdiUtil from org.xdi.oxauth.service import UserService from org.xdi.util import StringHelper, ArrayHelper from java.util import Arrays, ArrayList import java class DynamicScope(DynamicScopeType): de...
false
true
f759aa7cfdde272c87cb6afbe355d423ee01626a
600
py
Python
experiments/rfcn/rfcn_testscalereg.py
cmu-enyac/AdaScale
0aa3a00f88bc2f9e30f4b6e178a999aa485e3d02
[ "Apache-2.0" ]
2
2020-10-03T14:47:57.000Z
2021-08-28T12:23:01.000Z
experiments/rfcn/rfcn_testscalereg.py
cmu-enyac/AdaScale
0aa3a00f88bc2f9e30f4b6e178a999aa485e3d02
[ "Apache-2.0" ]
1
2020-07-28T11:23:15.000Z
2021-02-15T14:59:40.000Z
experiments/rfcn/rfcn_testscalereg.py
cmu-enyac/AdaScale
0aa3a00f88bc2f9e30f4b6e178a999aa485e3d02
[ "Apache-2.0" ]
null
null
null
# -------------------------------------------------------- # Deformable Convolutional Networks # Copyright (c) 2017 Microsoft # Licensed under The Apache-2.0 License [see LICENSE for details] # Written by Yuwen Xiong # -------------------------------------------------------- import os import sys os.environ['PYTHONUNBU...
30
65
0.59
import os import sys os.environ['PYTHONUNBUFFERED'] = '1' os.environ['MXNET_CUDNN_AUTOTUNE_DEFAULT'] = '0' os.environ['MXNET_ENABLE_GPU_P2P'] = '0' this_dir = os.path.dirname(__file__) sys.path.insert(0, os.path.join(this_dir, '..', '..', 'rfcn')) import test_scalereg if __name__ == "__main__": test_scalereg.mai...
true
true
f759abca4c111481cd7ca587354923270a64c5d3
4,958
py
Python
bluebottle/funding/messages.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/funding/messages.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/funding/messages.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- from django.conf import settings from django.utils.translation import gettext_lazy as _ from bluebottle.notifications.messages import TransitionMessage class DonationSuccessActivityManagerMessage(TransitionMessage): subject = _(u"You have a new donation!💰") template = 'messages/donat...
27.092896
87
0.664986
from django.conf import settings from django.utils.translation import gettext_lazy as _ from bluebottle.notifications.messages import TransitionMessage class DonationSuccessActivityManagerMessage(TransitionMessage): subject = _(u"You have a new donation!💰") template = 'messages/donation_success_owner' ...
true
true
f759ad211b0547fca48edbc7fd7568c92b671325
3,333
py
Python
tools/check_documentation.py
jkrejcha/praw
2bf8cc18d4fe1518acfd6e4e652874dec33c7ee0
[ "BSD-2-Clause" ]
null
null
null
tools/check_documentation.py
jkrejcha/praw
2bf8cc18d4fe1518acfd6e4e652874dec33c7ee0
[ "BSD-2-Clause" ]
null
null
null
tools/check_documentation.py
jkrejcha/praw
2bf8cc18d4fe1518acfd6e4e652874dec33c7ee0
[ "BSD-2-Clause" ]
null
null
null
"""Checks for attributes and code examples in RedditBase subclasses""" import os import re import sys # This line imports from the local PRAW rather than the global installed PRAW. sys.path.insert(0, os.path.abspath(os.path.join(__file__, "..", ".."))) from praw.models.reddit.base import RedditBase # noqa: E402 fro...
35.084211
140
0.594659
import os import re import sys sys.path.insert(0, os.path.abspath(os.path.join(__file__, "..", ".."))) from praw.models.reddit.base import RedditBase from praw.models.reddit.modmail import ModmailObject from praw.util.cache import cachedproperty class DocumentationChecker: BASE_SEARCH_CLASS = RedditBase ...
true
true
f759ad60f678051a953e5a28c9fbd4610258943b
7,769
py
Python
util/pydevd/pysrc/tests/test_simpleTipper.py
hinesmr/mica
82d26b9c6b04e1b8cea7d80c054e2cf482a58520
[ "Apache-2.0" ]
6
2015-01-26T16:14:43.000Z
2019-08-22T01:29:24.000Z
util/pydevd/pysrc/tests/test_simpleTipper.py
hinesmr/mica
82d26b9c6b04e1b8cea7d80c054e2cf482a58520
[ "Apache-2.0" ]
3
2015-01-06T13:31:28.000Z
2016-10-11T16:52:09.000Z
util/pydevd/pysrc/tests/test_simpleTipper.py
hinesmr/mica
82d26b9c6b04e1b8cea7d80c054e2cf482a58520
[ "Apache-2.0" ]
null
null
null
''' @author Fabio Zadrozny ''' import os import sys #make it as if we were executing from the directory above this one (so that we can use pycompletionserver #without the need for it being in the pythonpath) #twice the dirname to get the previous level from this file. sys.path.insert(1, os.path.split(os.path.split(__f...
36.995238
135
0.489767
import os import sys sys.path.insert(1, os.path.split(os.path.split(__file__)[0])[0]) try: import __builtin__ BUILTIN_MOD = '__builtin__' except ImportError: BUILTIN_MOD = 'builtins' if sys.platform.find('java') == -1: HAS_WX = False import unittest import _pydev_imports_tipper ...
true
true
f759ad6f1c3f3429ad0fdd1556378f87cfba3b61
9,442
py
Python
Catch.Manipulation_data.py
o-Ian/X-Minerei
d9f86d802787381afa4e955d7532cf9788b94962
[ "MIT" ]
2
2021-05-19T19:59:04.000Z
2021-08-31T02:33:23.000Z
Catch.Manipulation_data.py
o-Ian/X-Minerei
d9f86d802787381afa4e955d7532cf9788b94962
[ "MIT" ]
null
null
null
Catch.Manipulation_data.py
o-Ian/X-Minerei
d9f86d802787381afa4e955d7532cf9788b94962
[ "MIT" ]
null
null
null
import requests import csv import json import pandas as pd import os import numpy as np import datetime import os from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common....
43.311927
292
0.696992
import requests import csv import json import pandas as pd import os import numpy as np import datetime import os from selenium.webdriver.chrome.options import Options from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common....
true
true
f759aeca8e113d96733c5f4e9e332d5ee50c75b4
11,371
py
Python
scripts/word_embeddings/evaluation.py
shangz-ai/gluon-nlp
75b3c121ac02c1bdef25a785fda2238e256246f9
[ "Apache-2.0" ]
1
2020-06-09T01:50:53.000Z
2020-06-09T01:50:53.000Z
scripts/word_embeddings/evaluation.py
shangz-ai/gluon-nlp
75b3c121ac02c1bdef25a785fda2238e256246f9
[ "Apache-2.0" ]
null
null
null
scripts/word_embeddings/evaluation.py
shangz-ai/gluon-nlp
75b3c121ac02c1bdef25a785fda2238e256246f9
[ "Apache-2.0" ]
3
2021-07-20T07:40:15.000Z
2021-08-03T08:39:17.000Z
# coding: utf-8 # 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...
37.281967
79
0.62932
import itertools import sys import logging import json import mxnet as mx import numpy as np from scipy import stats import gluonnlp as nlp def add_parameters(parser): group = parser.add_argument_group('Evaluation arguments') group.add_argument('--eval-batch-size', type=int, default=512) group.ad...
true
true
f759b08f5f1cdc8ec1c535b0aa92dfe6c9f7c90c
142
py
Python
RL/TicTacToe/train_alphazero.py
tsubame-mz/reinforcement_learning
b69cce573deed11676f60653b41e036d8e79aedc
[ "MIT" ]
null
null
null
RL/TicTacToe/train_alphazero.py
tsubame-mz/reinforcement_learning
b69cce573deed11676f60653b41e036d8e79aedc
[ "MIT" ]
null
null
null
RL/TicTacToe/train_alphazero.py
tsubame-mz/reinforcement_learning
b69cce573deed11676f60653b41e036d8e79aedc
[ "MIT" ]
null
null
null
from agent.AlphaZero import AlphaZero def main(): alphazero = AlphaZero() alphazero.train() if __name__ == "__main__": main()
12.909091
37
0.661972
from agent.AlphaZero import AlphaZero def main(): alphazero = AlphaZero() alphazero.train() if __name__ == "__main__": main()
true
true
f759b2a6bf02fc887e331c79319de683e541fccf
11,025
py
Python
tls/message.py
mahmoud/tls
2364908a8bdf22e1e0a70fb17f84c82948a4132b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tls/message.py
mahmoud/tls
2364908a8bdf22e1e0a70fb17f84c82948a4132b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
tls/message.py
mahmoud/tls
2364908a8bdf22e1e0a70fb17f84c82948a4132b
[ "Apache-2.0", "BSD-3-Clause" ]
1
2020-12-18T08:28:54.000Z
2020-12-18T08:28:54.000Z
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import attr from construct import Container, ListContainer from six imp...
29.08971
79
0.60127
from __future__ import absolute_import, division, print_function import attr from construct import Container, ListContainer from six import BytesIO from tls import _constructs from tls._common import enums from tls.hello_message import ClientHello, ProtocolVersion, ServerHello class HelloRequest(object): d...
true
true
f759b316ac65ff0f21e8eb59aeacd351580be831
13,432
py
Python
tests/functional_tests/uri.py
ahook/monero
d1cf16364fb1901c2940ce66024688ea3fe3fc48
[ "MIT" ]
57
2018-04-11T15:34:22.000Z
2021-12-12T00:14:43.000Z
tests/functional_tests/uri.py
ahook/monero
d1cf16364fb1901c2940ce66024688ea3fe3fc48
[ "MIT" ]
67
2018-04-16T10:44:40.000Z
2020-06-29T03:11:18.000Z
tests/functional_tests/uri.py
ahook/monero
d1cf16364fb1901c2940ce66024688ea3fe3fc48
[ "MIT" ]
64
2018-04-15T14:14:56.000Z
2022-03-25T06:10:16.000Z
#!/usr/bin/env python3 #encoding=utf-8 # Copyright (c) 2019 The Monero Project # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are # permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above cop...
57.157447
192
0.709351
from __future__ import print_function try: from urllib import quote as urllib_quote except: from urllib.parse import quote as urllib_quote from framework.wallet import Wallet class URITest(): def run_test(self): self.create() self.test_monero_uri() def create(self): print('Creating...
true
true
f759b31eafbbd232043b166342a9ac1ba28994e4
14,133
py
Python
trimtuner/trimtuner/trimtuner.py
pedrogbmendes/TrimTuner
a9dec1f1ac610e6ec6d54cfaf5f9c93bc4f80f97
[ "MIT" ]
null
null
null
trimtuner/trimtuner/trimtuner.py
pedrogbmendes/TrimTuner
a9dec1f1ac610e6ec6d54cfaf5f9c93bc4f80f97
[ "MIT" ]
null
null
null
trimtuner/trimtuner/trimtuner.py
pedrogbmendes/TrimTuner
a9dec1f1ac610e6ec6d54cfaf5f9c93bc4f80f97
[ "MIT" ]
1
2021-03-11T14:46:24.000Z
2021-03-11T14:46:24.000Z
import time import sys import math import random import george import numpy as np import os #acq function from trimtuner.acquisition_functions.constrained_entropy_search import Constrained_EntropySearch from trimtuner.acquisition_functions.marginalization import MarginalizationGPMCMC, MarginalizationDT from robo.acqui...
36.51938
298
0.600863
import time import sys import math import random import george import numpy as np import os from trimtuner.acquisition_functions.constrained_entropy_search import Constrained_EntropySearch from trimtuner.acquisition_functions.marginalization import MarginalizationGPMCMC, MarginalizationDT from robo.acquisition_functio...
true
true
f759b404ad0e3967f84d488057bda77e0282ac12
88
py
Python
output/models/ms_data/regex/re_i73_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/ms_data/regex/re_i73_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/ms_data/regex/re_i73_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.ms_data.regex.re_i73_xsd.re_i73 import Doc __all__ = [ "Doc", ]
14.666667
61
0.715909
from output.models.ms_data.regex.re_i73_xsd.re_i73 import Doc __all__ = [ "Doc", ]
true
true
f759b49adb838945936abdcc86ce975c3d699851
3,352
py
Python
templates/template_generation.py
matteoferla/GNB2_analysis
f2685914948a051c180e28072ddb1c4c0cc4fa44
[ "MIT" ]
null
null
null
templates/template_generation.py
matteoferla/GNB2_analysis
f2685914948a051c180e28072ddb1c4c0cc4fa44
[ "MIT" ]
null
null
null
templates/template_generation.py
matteoferla/GNB2_analysis
f2685914948a051c180e28072ddb1c4c0cc4fa44
[ "MIT" ]
null
null
null
######################################################################################################################## #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys if sys.version_info[0] < 3: raise EnvironmentError("Hey, caveman, use Python 3.") __doc__ = \ """ PDB minimization for different...
35.284211
120
0.625895
import sys if sys.version_info[0] < 3: raise EnvironmentError("Hey, caveman, use Python 3.") __doc__ = \ """ PDB minimization for different GNB2 models. """ __author__ = "Matteo Ferla. [Github](https://github.com/matteoferla)" __email__ = "matteo.ferla@gmail.com" __date__ = "2019 A.D." __license__...
true
true
f759b5fe3629c030a3779603f2e00777e02a48dd
165
py
Python
Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Calibration/TkAlCaRecoProducers/python/AlcaBeamSpotProducer_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from Calibration.TkAlCaRecoProducers.AlcaBeamSpotProducer_cfi import * alcaBeamSpot = cms.Sequence( alcaBeamSpotProducer )
33
70
0.860606
import FWCore.ParameterSet.Config as cms from Calibration.TkAlCaRecoProducers.AlcaBeamSpotProducer_cfi import * alcaBeamSpot = cms.Sequence( alcaBeamSpotProducer )
true
true
f759b6f137d20fa4f540134e3083cc9d671b0160
11,388
py
Python
AppDB/cassandra/cassandra_interface.py
UCSB-CS-RACELab/eager-appscale
d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d
[ "Apache-2.0" ]
3
2016-06-12T01:18:49.000Z
2018-07-16T18:20:23.000Z
AppDB/cassandra/cassandra_interface.py
davgit/appscale
17d35a14fa5a56975de1e3517bec9e7f9047d82a
[ "Apache-2.0" ]
null
null
null
AppDB/cassandra/cassandra_interface.py
davgit/appscale
17d35a14fa5a56975de1e3517bec9e7f9047d82a
[ "Apache-2.0" ]
1
2020-05-25T02:59:15.000Z
2020-05-25T02:59:15.000Z
# Programmer: Navraj Chohan <nlake44@gmail.com> """ Cassandra Interface for AppScale """ import base64 import logging import os import string import sys import time from thrift_cass.Cassandra import Client from thrift_cass.ttypes import * from thrift import Thrift from thrift.transport import TSocket from thrift.tra...
35.04
80
0.664384
""" Cassandra Interface for AppScale """ import base64 import logging import os import string import sys import time from thrift_cass.Cassandra import Client from thrift_cass.ttypes import * from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol im...
false
true
f759b70fca48e2bb4f4d0f829c964be2ef3e5f0a
29,005
py
Python
watertap3/watertap3/utils/financials.py
kurbansitterley/WaterTAP3
8f4493182a39e3ba180019aba02249916dbae500
[ "BSD-3-Clause" ]
null
null
null
watertap3/watertap3/utils/financials.py
kurbansitterley/WaterTAP3
8f4493182a39e3ba180019aba02249916dbae500
[ "BSD-3-Clause" ]
null
null
null
watertap3/watertap3/utils/financials.py
kurbansitterley/WaterTAP3
8f4493182a39e3ba180019aba02249916dbae500
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Institute for the Design of Advanced Energy Systems Process Systems # Engineering Framework (IDAES PSE Framework) Copyright (c) 2018-2020, by the # software owners: The Regents of the University of California, through # Lawrence Berkeley N...
48.261231
226
0.620514
import pandas as pd from pyomo.environ import (Block, Expression, Param, Var, NonNegativeReals, units as pyunits) from .ml_regression import get_linear_regression __all__ = ['SystemSpecs', 'get_complete_costing', 'get_ind_table', 'get_system_specs', 'get_system_costing', 'global_costing_parameters'] last...
true
true
f759b7aca2a0174716d1d345f4abf0c57a897202
5,624
py
Python
.history/DEBER_20210904233156.py
Alopezm5/PROYECTO-PARTE-1
bd7a8594edf08d41c6ca544cf6bac01ea4fcb684
[ "MIT" ]
null
null
null
.history/DEBER_20210904233156.py
Alopezm5/PROYECTO-PARTE-1
bd7a8594edf08d41c6ca544cf6bac01ea4fcb684
[ "MIT" ]
null
null
null
.history/DEBER_20210904233156.py
Alopezm5/PROYECTO-PARTE-1
bd7a8594edf08d41c6ca544cf6bac01ea4fcb684
[ "MIT" ]
null
null
null
import os class Empresa(): def __init__(self,nom="",ruc=0,dire="",tele=0,ciud="",tipEmpr=""): self.nombre=nom self.ruc=ruc self.direccion=dire self.telefono=tele self.ciudad=ciud self.tipoEmpresa=tipEmpr def datosEmpresa(self):#3 self.nombre=input("Ingres...
39.886525
251
0.67372
import os class Empresa(): def __init__(self,nom="",ruc=0,dire="",tele=0,ciud="",tipEmpr=""): self.nombre=nom self.ruc=ruc self.direccion=dire self.telefono=tele self.ciudad=ciud self.tipoEmpresa=tipEmpr def datosEmpresa(self): self.nombre=input("Ingresar ...
true
true
f759b8ab04cf2bcf402b92dab69132d6d888e0ce
2,459
py
Python
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveDomainBpsDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveDomainBpsDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveDomainBpsDataRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.22973
86
0.761692
from aliyunsdkcore.request import RpcRequest from aliyunsdklive.endpoint import endpoint_data class DescribeLiveDomainBpsDataRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'live', '2016-11-01', 'DescribeLiveDomainBpsData','live') self.set_method('POST') if hasattr(self, "endpoint_map"): ...
true
true
f759b9432ed15b2ed83e5cb7b259e5a7513b0137
3,809
py
Python
apis/ocpdiag/ocpdiag/core/hwinterface/lib/off_dut_machine_interface/ssh/remote.py
opencomputeproject/ocp-diag-core
37b83ff6f69684b435364000d26cd913eb6ff5f3
[ "Apache-2.0" ]
10
2021-11-09T20:20:56.000Z
2022-03-25T11:59:14.000Z
apis/ocpdiag/ocpdiag/core/hwinterface/lib/off_dut_machine_interface/ssh/remote.py
opencomputeproject/ocp-diag-core
37b83ff6f69684b435364000d26cd913eb6ff5f3
[ "Apache-2.0" ]
2
2022-02-10T21:27:33.000Z
2022-03-23T22:08:30.000Z
apis/ocpdiag/ocpdiag/core/hwinterface/lib/off_dut_machine_interface/ssh/remote.py
opencomputeproject/ocp-diag-core
37b83ff6f69684b435364000d26cd913eb6ff5f3
[ "Apache-2.0" ]
1
2021-11-24T04:46:00.000Z
2021-11-24T04:46:00.000Z
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.707965
80
0.705697
import datetime import subprocess import sys from typing import List from absl import logging from ocpdiag.core.hwinterface.lib.off_dut_machine_interface import remote class SSHConn(remote.Conn): SSH_DEFAULT_USER = 'root' DEFAULT_IO_TIMEOUT = datetime.timedelta(minutes=15) def __init__(self, node: remote....
true
true
f759b968bf738024e76a8ae1cef86d30a0ed6022
95
py
Python
odoo-13.0/web_oca/web_notify/tests/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
3
2019-04-02T13:52:50.000Z
2019-04-11T03:19:03.000Z
odoo-13.0/web_oca/web_notify/tests/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/web_oca/web_notify/tests/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
1
2019-03-26T06:39:48.000Z
2019-03-26T06:39:48.000Z
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from . import test_res_users
23.75
64
0.736842
from . import test_res_users
true
true
f759bb253fe9fc8d73c33f7c2cc25d1a71ba04ac
10,863
py
Python
Day 47/classifiers/neural_net.py
vgaurav3011/100-Days-of-ML
ec302b03fd492c459cff2592b3a4f5e38f9c9d72
[ "MIT" ]
12
2020-03-30T15:10:48.000Z
2021-11-08T06:04:01.000Z
Day 47/classifiers/neural_net.py
vgaurav3011/100-Days-of-ML
ec302b03fd492c459cff2592b3a4f5e38f9c9d72
[ "MIT" ]
3
2021-06-08T22:34:58.000Z
2022-01-13T03:25:23.000Z
Day 47/classifiers/neural_net.py
vgaurav3011/100-Days-of-ML
ec302b03fd492c459cff2592b3a4f5e38f9c9d72
[ "MIT" ]
3
2020-04-13T09:51:28.000Z
2021-04-28T07:37:36.000Z
from __future__ import print_function from builtins import range from builtins import object import numpy as np import matplotlib.pyplot as plt from past.builtins import xrange class TwoLayerNet(object): """ A two-layer fully-connected neural network. The net has an input dimension of N, a hidden layer di...
43.802419
85
0.531069
from __future__ import print_function from builtins import range from builtins import object import numpy as np import matplotlib.pyplot as plt from past.builtins import xrange class TwoLayerNet(object): def __init__(self, input_size, hidden_size, output_size, std=1e-4): self.params = {} self.par...
true
true
f759bb46f3df8999dd717e22a0200a95b4ce2a85
3,141
py
Python
data_utils/hdf5_utils.py
gvalvano/idas
e1b112c8d0cd17b2b8486435dfe9de477bca2221
[ "Apache-2.0" ]
29
2020-07-04T00:04:28.000Z
2022-03-18T01:49:34.000Z
idas/data_utils/hdf5_utils.py
gvalvano/unet_crf_as_rnn
31b79741b77614764dcf3d2690fe0b0fab44934d
[ "Apache-2.0" ]
2
2020-10-31T14:41:02.000Z
2021-11-21T18:16:19.000Z
data_utils/hdf5_utils.py
gvalvano/idas
e1b112c8d0cd17b2b8486435dfe9de477bca2221
[ "Apache-2.0" ]
7
2020-10-21T01:02:52.000Z
2021-11-14T16:52:18.000Z
""" Utilities for hdf5 data """ # Copyright 2019 Gabriele Valvano # # 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 require...
31.41
111
0.672716
import h5py import os import logging def create_hdf5_db(x_train, y_train, x_validation, y_validation, x_test, y_test, db_name='data.h5'): print("Building database: " + db_name) h5f = h5py.File(db_name, 'w') h5f.create_dataset('x_train', data=x_train) h5f.create_dataset('y_train', data=y_train) ...
true
true
f759bb7276e1fe948675fcb8df76c85a208e3047
1,128
py
Python
gerador.py
pmarkun/guess_who
c3ddaf5726706a01dbe76da3fd95a0016b6ff1c7
[ "MIT" ]
null
null
null
gerador.py
pmarkun/guess_who
c3ddaf5726706a01dbe76da3fd95a0016b6ff1c7
[ "MIT" ]
null
null
null
gerador.py
pmarkun/guess_who
c3ddaf5726706a01dbe76da3fd95a0016b6ff1c7
[ "MIT" ]
null
null
null
# -*- coding: future_fstrings -*- from xml.dom import minidom import xpath import os import base64 import mimetypes class TemplateSVG: def __init__(self, templateFile): with open(templateFile, 'r') as arquivo: self.template = minidom.parse(arquivo) self.svg = self.template.cloneNod...
34.181818
80
0.638298
from xml.dom import minidom import xpath import os import base64 import mimetypes class TemplateSVG: def __init__(self, templateFile): with open(templateFile, 'r') as arquivo: self.template = minidom.parse(arquivo) self.svg = self.template.cloneNode(True) def openBase64(self, ...
true
true
f759bc75c4150c615d87f5987e62aaa62faa94a6
130
py
Python
Models in Django/mysite/main/urls.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
2
2020-02-14T19:23:50.000Z
2020-04-19T08:26:38.000Z
Models in Django/mysite/main/urls.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
42
2021-02-02T23:08:30.000Z
2022-03-12T00:54:55.000Z
Models in Django/mysite/main/urls.py
AyemunHossain/Django
0b1ed21fd6bd2906a4a1a220c029a2193658320f
[ "MIT" ]
1
2022-03-07T08:09:41.000Z
2022-03-07T08:09:41.000Z
from django.urls import path from . import views app_name = "main" urlpatterns = [ path('',views.homepage,name="homepage") ]
16.25
43
0.7
from django.urls import path from . import views app_name = "main" urlpatterns = [ path('',views.homepage,name="homepage") ]
true
true
f759bc7f728c6ec5a7eb7b72133910deb67fdddb
22,704
py
Python
cassandra_snapshotter/snapshotting.py
daysofwonder/cassandra_snapshotter
1526281953061aeb06e03122b7361e1df0f45cbf
[ "BSD-3-Clause" ]
null
null
null
cassandra_snapshotter/snapshotting.py
daysofwonder/cassandra_snapshotter
1526281953061aeb06e03122b7361e1df0f45cbf
[ "BSD-3-Clause" ]
null
null
null
cassandra_snapshotter/snapshotting.py
daysofwonder/cassandra_snapshotter
1526281953061aeb06e03122b7361e1df0f45cbf
[ "BSD-3-Clause" ]
null
null
null
from __future__ import (absolute_import, print_function) # From system import os import re import sys import time import json import shutil import logging from distutils.util import strtobool from boto.s3.connection import S3Connection from boto.s3.key import Key from boto.exception import S3ResponseError from datetim...
38.943396
156
0.596459
from __future__ import (absolute_import, print_function) import os import re import sys import time import json import shutil import logging from distutils.util import strtobool from boto.s3.connection import S3Connection from boto.s3.key import Key from boto.exception import S3ResponseError from datetime import datet...
true
true
f759bcdadd65091a4cccd038021865cdcb272ebb
388
py
Python
hail/python/hailtop/utils/tqdm.py
MaxGreil/hail
4e0605b6bfd24a885a8194e8c0984b20994d3407
[ "MIT" ]
789
2016-09-05T04:14:25.000Z
2022-03-30T09:51:54.000Z
hail/python/hailtop/utils/tqdm.py
MaxGreil/hail
4e0605b6bfd24a885a8194e8c0984b20994d3407
[ "MIT" ]
5,724
2016-08-29T18:58:40.000Z
2022-03-31T23:49:42.000Z
hail/python/hailtop/utils/tqdm.py
MaxGreil/hail
4e0605b6bfd24a885a8194e8c0984b20994d3407
[ "MIT" ]
233
2016-08-31T20:42:38.000Z
2022-02-17T16:42:39.000Z
from tqdm.notebook import tqdm as tqdm_notebook from tqdm.auto import tqdm as tqdm_auto # To tqdm_notebook, None means do not display. To standard tqdm, None means # display only when connected to a TTY. TQDM_DEFAULT_DISABLE = False if tqdm_auto == tqdm_notebook else None def tqdm(*args, disable=TQDM_DEFAULT_DISABLE...
35.272727
75
0.780928
from tqdm.notebook import tqdm as tqdm_notebook from tqdm.auto import tqdm as tqdm_auto TQDM_DEFAULT_DISABLE = False if tqdm_auto == tqdm_notebook else None def tqdm(*args, disable=TQDM_DEFAULT_DISABLE, **kwargs): return tqdm_auto(*args, disable=disable, **kwargs)
true
true
f759bd479eb3a7fef2efb703a849e96f17243082
49,580
py
Python
scripts/tests/test_opengl.py
jsa4000/OpenGL-Python
62055ba0c16f54507b7ba709d6691b2e9c7bc152
[ "Apache-2.0" ]
null
null
null
scripts/tests/test_opengl.py
jsa4000/OpenGL-Python
62055ba0c16f54507b7ba709d6691b2e9c7bc152
[ "Apache-2.0" ]
null
null
null
scripts/tests/test_opengl.py
jsa4000/OpenGL-Python
62055ba0c16f54507b7ba709d6691b2e9c7bc152
[ "Apache-2.0" ]
1
2021-10-08T06:12:11.000Z
2021-10-08T06:12:11.000Z
import os import math import ctypes import numpy as np import pandas as pd import OpenGL.GL as GL import OpenGL.GL.shaders import pygame from PIL import Image from pyrr import Quaternion, matrix44, Matrix44, Vector3 # https://github.com/adamlwgriffiths/Pyrr/tree/master/pyrr # https://www.opengl.org/discussion_boards/...
38.613707
127
0.61194
import os import math import ctypes import numpy as np import pandas as pd import OpenGL.GL as GL import OpenGL.GL.shaders import pygame from PIL import Image from pyrr import Quaternion, matrix44, Matrix44, Vector3 def Rectangle3D(): vertices = [ -0.5, -0.5, 0.0, 1.0, 0.5, -0.5, 0.0, 1.0, ...
true
true
f759bd545a06ef23d29158200b4994af04a0b2d2
5,472
py
Python
tests/test_secrets.py
namanyt/chatto
34bbabf9e308313c2064ccbdd6150bab88233168
[ "BSD-3-Clause" ]
4
2021-12-30T13:02:39.000Z
2022-01-08T16:11:13.000Z
tests/test_secrets.py
namanyt/chatto
34bbabf9e308313c2064ccbdd6150bab88233168
[ "BSD-3-Clause" ]
3
2022-01-08T16:35:20.000Z
2022-01-10T13:17:11.000Z
tests/test_secrets.py
namanyt/chatto
34bbabf9e308313c2064ccbdd6150bab88233168
[ "BSD-3-Clause" ]
1
2022-01-08T16:11:17.000Z
2022-01-08T16:11:17.000Z
# Copyright (c) 2021-2022, Ethan Henderson # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of condition...
38
88
0.732822
from __future__ import annotations import asyncio import json import typing as t from pathlib import Path import pytest from chatto.secrets import Secrets from tests.paths import SECRETS_PATH @pytest.fixture() def secrets() -> Secrets: return Secrets.from_file(SECRETS_PATH) @pytest.fixture() def secrets_dic...
true
true
f759bdb0c01bcedd8978f1a0dee8807a53555dcb
3,617
py
Python
tests/test_api.py
denisfrm/tutorial-pybr
1f86540d428467817880210fafc1989e16b7e30c
[ "MIT" ]
null
null
null
tests/test_api.py
denisfrm/tutorial-pybr
1f86540d428467817880210fafc1989e16b7e30c
[ "MIT" ]
null
null
null
tests/test_api.py
denisfrm/tutorial-pybr
1f86540d428467817880210fafc1989e16b7e30c
[ "MIT" ]
null
null
null
from http import HTTPStatus from uuid import UUID import pytest from fastapi.testclient import TestClient from api_pedidos.api import app, recuperar_itens_por_pedido from api_pedidos.config_logging import logging from api_pedidos.esquema import Item from api_pedidos.excecao import ( FalhaDeComunicacaoError, P...
32.881818
77
0.679016
from http import HTTPStatus from uuid import UUID import pytest from fastapi.testclient import TestClient from api_pedidos.api import app, recuperar_itens_por_pedido from api_pedidos.config_logging import logging from api_pedidos.esquema import Item from api_pedidos.excecao import ( FalhaDeComunicacaoError, P...
true
true
f759bdd7dfbe57755677ae1fba1ceaa74027c05b
3,222
py
Python
cms/lib/python2.7/site-packages/classytags/helpers.py
macs03/demo-cms
fb79e6e7d73504af8e9feb4c4b2053fbc0024bdd
[ "MIT" ]
null
null
null
cms/lib/python2.7/site-packages/classytags/helpers.py
macs03/demo-cms
fb79e6e7d73504af8e9feb4c4b2053fbc0024bdd
[ "MIT" ]
null
null
null
cms/lib/python2.7/site-packages/classytags/helpers.py
macs03/demo-cms
fb79e6e7d73504af8e9feb4c4b2053fbc0024bdd
[ "MIT" ]
null
null
null
from classytags.core import Tag from classytags.utils import flatten_context from django.core.exceptions import ImproperlyConfigured from django.template.loader import render_to_string class AsTag(Tag): """ Same as tag but allows for an optional 'as varname'. The 'as varname' options must be added 'manual...
31.90099
78
0.619491
from classytags.core import Tag from classytags.utils import flatten_context from django.core.exceptions import ImproperlyConfigured from django.template.loader import render_to_string class AsTag(Tag): def __init__(self, parser, tokens): super(AsTag, self).__init__(parser, tokens) if len(self.opt...
true
true
f759bfb44549bec5e4bf86d8807667c74cd47f35
14,451
py
Python
backend/src/manage.py
spiritutumduo/spiritumDuo
987785906cd504f46ccebe3bbfe0e81cbf02bf7c
[ "MIT" ]
1
2022-03-11T14:07:16.000Z
2022-03-11T14:07:16.000Z
backend/src/manage.py
spiritutumduo/spiritumDuo
987785906cd504f46ccebe3bbfe0e81cbf02bf7c
[ "MIT" ]
3
2022-02-25T22:46:46.000Z
2022-03-30T08:19:41.000Z
backend/src/manage.py
spiritutumduo/spiritumDuo
987785906cd504f46ccebe3bbfe0e81cbf02bf7c
[ "MIT" ]
1
2022-03-31T14:35:51.000Z
2022-03-31T14:35:51.000Z
import asyncio import secrets import string from faker import Faker from sqlalchemy.exc import IntegrityError from trustadapter.trustadapter import ( Patient_IE, TrustIntegrationCommunicationError, PseudoTrustAdapter ) from containers import SDContainer from models.db import db, DATABASE_URL from models imp...
35.160584
127
0.571241
import asyncio import secrets import string from faker import Faker from sqlalchemy.exc import IntegrityError from trustadapter.trustadapter import ( Patient_IE, TrustIntegrationCommunicationError, PseudoTrustAdapter ) from containers import SDContainer from models.db import db, DATABASE_URL from models imp...
true
true
f759bfe6fc5a080223f8a5cae875ca72d806303f
637
py
Python
Python/lab5 [2, 4, 7, 8, 12]/t2.py
da-foxbite/KSU121
133637abb4f465aeecb845e6735ba383a2fdd689
[ "MIT" ]
3
2019-09-23T06:06:30.000Z
2020-02-24T10:22:26.000Z
Python/lab5 [2, 4, 7, 8, 12]/t2.py
da-foxbite/KSU141
133637abb4f465aeecb845e6735ba383a2fdd689
[ "MIT" ]
null
null
null
Python/lab5 [2, 4, 7, 8, 12]/t2.py
da-foxbite/KSU141
133637abb4f465aeecb845e6735ba383a2fdd689
[ "MIT" ]
1
2020-10-26T11:00:22.000Z
2020-10-26T11:00:22.000Z
# 141, Суптеля Владислав # 【Дата】:「19.03.20」 # 2. Описати рекурсивную функцію Fact2 (N) дійсного типу, яка обчислює значення подвійного факторіала N !! = N • (N-2) • (N-4) • ... # (N> 0 - параметр цілого типу; останній співмножник в творі дорівнює 2, якщо N - парне число, і 1, якщо N - непарне). # За допомогою цієї фун...
35.388889
132
0.673469
import random def double_factorial(n): if n <= 0: return 1 else: return n * double_factorial(n - 2) for i in range(0, 5): num = random.randint(1, 10) print(f'Подвiйний факторiал {num} = {double_factorial(num)}')
true
true
f759c0f9272cc5c5d3f2c9634b19d51c3d389eeb
2,291
py
Python
demo_video_face_recognition.py
fadhilmch/FaceRecognition
03ecddb15db79b23ff612b119c9678f5b2ce1194
[ "Apache-2.0" ]
1
2021-03-25T11:07:03.000Z
2021-03-25T11:07:03.000Z
demo_video_face_recognition.py
fadhilmch/FaceRecognition
03ecddb15db79b23ff612b119c9678f5b2ce1194
[ "Apache-2.0" ]
null
null
null
demo_video_face_recognition.py
fadhilmch/FaceRecognition
03ecddb15db79b23ff612b119c9678f5b2ce1194
[ "Apache-2.0" ]
null
null
null
import cv2 import time import numpy as np from detection.FaceDetector import FaceDetector from recognition.FaceRecognition import FaceRecognition from classifier.FaceClassifier import FaceClassifier VIDEO_INPUT_FILE = './media/test_video/Zidane_1.avi' VIDEO_OUTPUT_FILE = './media/test_video_output/Zidane_Recognition_1...
34.19403
109
0.670886
import cv2 import time import numpy as np from detection.FaceDetector import FaceDetector from recognition.FaceRecognition import FaceRecognition from classifier.FaceClassifier import FaceClassifier VIDEO_INPUT_FILE = './media/test_video/Zidane_1.avi' VIDEO_OUTPUT_FILE = './media/test_video_output/Zidane_Recognition_1...
true
true
f759c17773a7cb569a8eacf108666090dc8ac87e
23,153
py
Python
nimare/_version.py
yifan0330/NiMARE
cb542af17c4f969afd05e4fd381a1200a1e4817c
[ "MIT" ]
1
2020-04-19T22:51:52.000Z
2020-04-19T22:51:52.000Z
nimare/_version.py
yifan0330/NiMARE
cb542af17c4f969afd05e4fd381a1200a1e4817c
[ "MIT" ]
null
null
null
nimare/_version.py
yifan0330/NiMARE
cb542af17c4f969afd05e4fd381a1200a1e4817c
[ "MIT" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.896124
84
0.580616
import errno import os import re import subprocess import sys from typing import Callable, Dict def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return k...
true
true
f759c312fcbfa6b2f201926bab72fda42c98d6f8
55
py
Python
lib/watchopticalmc/watchopticalmc/__main__.py
davehadley/watchoptical
a3a999b1318b021a319497c6c23624051a1b1cb3
[ "MIT" ]
null
null
null
lib/watchopticalmc/watchopticalmc/__main__.py
davehadley/watchoptical
a3a999b1318b021a319497c6c23624051a1b1cb3
[ "MIT" ]
null
null
null
lib/watchopticalmc/watchopticalmc/__main__.py
davehadley/watchoptical
a3a999b1318b021a319497c6c23624051a1b1cb3
[ "MIT" ]
null
null
null
from watchopticalmc.scripts.runall import main main()
13.75
46
0.818182
from watchopticalmc.scripts.runall import main main()
true
true
f759c384f520736d77f129336faf504a7128ef02
7,435
py
Python
tests/test_postgres.py
annelhote/fonduer
bd5b1feebfb2860286ae8b5a520b24baa023b445
[ "MIT" ]
null
null
null
tests/test_postgres.py
annelhote/fonduer
bd5b1feebfb2860286ae8b5a520b24baa023b445
[ "MIT" ]
null
null
null
tests/test_postgres.py
annelhote/fonduer
bd5b1feebfb2860286ae8b5a520b24baa023b445
[ "MIT" ]
null
null
null
"""Unit tests that involve postgres access.""" import logging from fonduer.candidates import CandidateExtractor, MentionExtractor, MentionFigures from fonduer.candidates.matchers import LambdaFunctionFigureMatcher from fonduer.candidates.models import ( Candidate, Mention, candidate_subclass, mention_s...
35.236967
89
0.723739
import logging from fonduer.candidates import CandidateExtractor, MentionExtractor, MentionFigures from fonduer.candidates.matchers import LambdaFunctionFigureMatcher from fonduer.candidates.models import ( Candidate, Mention, candidate_subclass, mention_subclass, ) from fonduer.parser import Parser fr...
true
true
f759c3b7aa4b2cff397d761640b405c9384c0cea
4,912
py
Python
.Config/FslBuildGen/Generator/VariantNameHelper.py
alexvonduar/gtec-demo-framework
6f8a7e429d0e15242ba64eb4cb41bfc2dd7dc749
[ "MIT", "BSD-3-Clause" ]
3
2019-01-19T20:21:24.000Z
2021-08-10T02:11:32.000Z
.Config/FslBuildGen/Generator/VariantNameHelper.py
alexvonduar/gtec-demo-framework
6f8a7e429d0e15242ba64eb4cb41bfc2dd7dc749
[ "MIT", "BSD-3-Clause" ]
null
null
null
.Config/FslBuildGen/Generator/VariantNameHelper.py
alexvonduar/gtec-demo-framework
6f8a7e429d0e15242ba64eb4cb41bfc2dd7dc749
[ "MIT", "BSD-3-Clause" ]
1
2021-08-10T02:11:33.000Z
2021-08-10T02:11:33.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #**************************************************************************************************************************************************** # Copyright 2017 NXP # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifi...
47.230769
190
0.67671
from typing import List from typing import Optional import itertools from FslBuildGen.Log import Log from FslBuildGen.Packages.Package import Package class VariantNameHelper(object): def __init__(self, log: Log) -> None: super().__init__() self.Log = log def __BuildAllVariantStrings(self, pa...
true
true
f759c3d40c984f864bc139f1f4235c7edb410a7c
100
py
Python
terra/exceptions.py
jooddang/terra-py
c048ffd53dad13cdfb0c516ccef3d06b1b968cb2
[ "MIT" ]
null
null
null
terra/exceptions.py
jooddang/terra-py
c048ffd53dad13cdfb0c516ccef3d06b1b968cb2
[ "MIT" ]
null
null
null
terra/exceptions.py
jooddang/terra-py
c048ffd53dad13cdfb0c516ccef3d06b1b968cb2
[ "MIT" ]
null
null
null
class ApiError(Exception): """Raised when an error occured while communicating with the API."""
33.333333
72
0.74
class ApiError(Exception):
true
true
f759c5084e0bf891662fc55d1b2c3c980298387e
1,191
py
Python
setup.py
rhasspy/rhasspy-asr-pocketsphinx-hermes
89c33a05327ff67e24b87e2ce16412de7c6e66ab
[ "MIT" ]
null
null
null
setup.py
rhasspy/rhasspy-asr-pocketsphinx-hermes
89c33a05327ff67e24b87e2ce16412de7c6e66ab
[ "MIT" ]
null
null
null
setup.py
rhasspy/rhasspy-asr-pocketsphinx-hermes
89c33a05327ff67e24b87e2ce16412de7c6e66ab
[ "MIT" ]
3
2020-01-24T22:34:17.000Z
2020-11-10T12:51:59.000Z
"""Setup for rhasspyasr_pocketsphinx_hermes""" import os import setuptools this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, "README.md"), "r") as readme_file: long_description = readme_file.read() with open(os.path.join(this_dir, "requirements.txt"), "r") as requirements_fil...
32.189189
91
0.70361
import os import setuptools this_dir = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(this_dir, "README.md"), "r") as readme_file: long_description = readme_file.read() with open(os.path.join(this_dir, "requirements.txt"), "r") as requirements_file: requirements = requirements_file.read()....
true
true
f759c5e139ec26e4d0cb537ebbf89bf4725d9776
470
py
Python
src/angelos/__init__.py
kristoffer-paulsson/angelos
2ec236770d6530884a8ad88505aab01183f752b4
[ "MIT" ]
8
2020-06-07T23:26:34.000Z
2022-03-28T00:20:34.000Z
src/angelos/__init__.py
kristoffer-paulsson/angelos
2ec236770d6530884a8ad88505aab01183f752b4
[ "MIT" ]
1
2019-12-24T22:06:02.000Z
2020-07-12T19:18:57.000Z
src/angelos/__init__.py
kristoffer-paulsson/angelos
2ec236770d6530884a8ad88505aab01183f752b4
[ "MIT" ]
null
null
null
# cython: language_level=3, linetrace=True # # Copyright (c) 2020 by Kristoffer Paulsson <kristoffer.paulsson@talenten.se>. # # This software is available under the terms of the MIT license. Parts are licensed under # different terms if stated. The legal terms are attached to the LICENSE file and are # made available o...
31.333333
89
0.755319
true
true
f759c5e8cfc826a7e8950073f625ccc8174cb646
187
py
Python
imu_rabbitmq/imu/__init__.py
apl-ocean-engineering/sensor-test-frame-controller
5e1457e478d6b66eca19000d7e8877ebb96c51d4
[ "MIT" ]
null
null
null
imu_rabbitmq/imu/__init__.py
apl-ocean-engineering/sensor-test-frame-controller
5e1457e478d6b66eca19000d7e8877ebb96c51d4
[ "MIT" ]
12
2018-04-20T16:31:38.000Z
2018-05-18T22:41:08.000Z
imu_rabbitmq/imu/__init__.py
apl-ocean-engineering/sensor-test-frame-controller
5e1457e478d6b66eca19000d7e8877ebb96c51d4
[ "MIT" ]
1
2018-03-09T05:44:59.000Z
2018-03-09T05:44:59.000Z
from __future__ import absolute_import, division, print_function from .version import __version__ from .imu import * from .server import * from .client import * from .imu import *
23.375
64
0.764706
from __future__ import absolute_import, division, print_function from .version import __version__ from .imu import * from .server import * from .client import * from .imu import *
true
true
f759c76918aded2d7f9491c9609c2a13e3a866a6
528
py
Python
src/msgraph/model/free_busy_status.py
microsoftarchive/msgraph-sdk-python
1320ba9116be0d00a1d7fce3484ea979e24ee82d
[ "MIT" ]
7
2019-07-17T06:59:53.000Z
2021-05-13T15:23:37.000Z
src/msgraph/model/free_busy_status.py
microsoftarchive/msgraph-sdk-python
1320ba9116be0d00a1d7fce3484ea979e24ee82d
[ "MIT" ]
null
null
null
src/msgraph/model/free_busy_status.py
microsoftarchive/msgraph-sdk-python
1320ba9116be0d00a1d7fce3484ea979e24ee82d
[ "MIT" ]
2
2020-06-30T13:06:59.000Z
2021-06-03T09:47:35.000Z
# -*- coding: utf-8 -*- """ # Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. # # This file was generated and any changes will be overwritten. """ from enum import Enum class FreeBusyStatus(Enum): """The Enum ...
22
151
0.632576
from enum import Enum class FreeBusyStatus(Enum): free = "0" tentative = "1" busy = "2" oof = "3" workingElsewhere = "4" unknown = "5"
true
true
f759c7ea95cda8cd694d6110274e7ee6897a5b37
1,792
py
Python
src/features.py
ahn1305/igpd-linux
b87c1c7fec09177748f9210bb2d4262e7a982239
[ "MIT" ]
null
null
null
src/features.py
ahn1305/igpd-linux
b87c1c7fec09177748f9210bb2d4262e7a982239
[ "MIT" ]
null
null
null
src/features.py
ahn1305/igpd-linux
b87c1c7fec09177748f9210bb2d4262e7a982239
[ "MIT" ]
null
null
null
import os from instaloader import Profile, Post class IgpdLinuxFeaturesPrivate: def download_post(self,link,p_instance_param): pid = link.rsplit("/",2)[-2] post = Post.from_shortcode(p_instance_param.context, pid) p_instance_param.download_post(post,target=(pid)) print("\nPost do...
33.811321
121
0.705915
import os from instaloader import Profile, Post class IgpdLinuxFeaturesPrivate: def download_post(self,link,p_instance_param): pid = link.rsplit("/",2)[-2] post = Post.from_shortcode(p_instance_param.context, pid) p_instance_param.download_post(post,target=(pid)) print("\nPost do...
true
true
f759c83198f84b0faa3d0a2a66c44b183b13be55
7,472
py
Python
start.py
vladhq/search-crawler-php-python
9c5b5215eaec6cb2da572a48696fe01006685c9a
[ "AAL" ]
null
null
null
start.py
vladhq/search-crawler-php-python
9c5b5215eaec6cb2da572a48696fe01006685c9a
[ "AAL" ]
null
null
null
start.py
vladhq/search-crawler-php-python
9c5b5215eaec6cb2da572a48696fe01006685c9a
[ "AAL" ]
null
null
null
import os import base64 import urllib2 import subprocess import urlparse import nltk import sys reload(sys) sys.setdefaultencoding('utf8') from bs4 import BeautifulSoup os.system('cls') url_list = ['https://en.wikipedia.org/wiki/Islamic_State_of_Iraq_and_the_Levant'] print '-----------------------' print ' Claw Searc...
31.931624
157
0.558084
import os import base64 import urllib2 import subprocess import urlparse import nltk import sys reload(sys) sys.setdefaultencoding('utf8') from bs4 import BeautifulSoup os.system('cls') url_list = ['https://en.wikipedia.org/wiki/Islamic_State_of_Iraq_and_the_Levant'] print '-----------------------' print ' Claw Searc...
false
true
f759c878f5c58e5fbf8847a4b0947e424eb791ce
491
py
Python
examples/helloserver.py
lordpeara/wind
f6f636e287ec322b23698c07c558c152612f74e4
[ "MIT" ]
3
2017-05-21T15:05:45.000Z
2019-02-05T08:39:49.000Z
examples/helloserver.py
daftshady/wind
f6f636e287ec322b23698c07c558c152612f74e4
[ "MIT" ]
1
2015-10-01T11:51:19.000Z
2015-10-01T11:51:19.000Z
examples/helloserver.py
lordpeara/wind
f6f636e287ec322b23698c07c558c152612f74e4
[ "MIT" ]
2
2016-11-30T12:56:36.000Z
2019-02-06T08:32:42.000Z
#!/usr/bin/env python # Copyright (c) 2014 Park Ilsu. See LICENSE for details. from wind.web.httpserver import HTTPServer from wind.web.app import WindApp, path, Resource class HelloResource(Resource): def handle_get(self): self.write('Hello') self.finish() def main(): app = WindApp([ ...
19.64
56
0.645621
from wind.web.httpserver import HTTPServer from wind.web.app import WindApp, path, Resource class HelloResource(Resource): def handle_get(self): self.write('Hello') self.finish() def main(): app = WindApp([ path(HelloResource, route='/', methods=['get']) ]) server = HTTPSer...
true
true
f759c8a5118ec1ccef6b7e9a31ed617f49922c77
1,210
py
Python
posts/models.py
mohammadanarul/drf-blog-api
25d6d72235b2d995639ac1eed5367cf6a8a1535c
[ "MIT" ]
null
null
null
posts/models.py
mohammadanarul/drf-blog-api
25d6d72235b2d995639ac1eed5367cf6a8a1535c
[ "MIT" ]
null
null
null
posts/models.py
mohammadanarul/drf-blog-api
25d6d72235b2d995639ac1eed5367cf6a8a1535c
[ "MIT" ]
null
null
null
from django.db import models from django.utils.translation import gettext_lazy as _ from taggit.managers import TaggableManager from django.utils.text import slugify from category.models import Category from django.contrib.auth import get_user_model from .mixins import TimeStamp User = get_user_model() class Post(Ti...
31.842105
91
0.687603
from django.db import models from django.utils.translation import gettext_lazy as _ from taggit.managers import TaggableManager from django.utils.text import slugify from category.models import Category from django.contrib.auth import get_user_model from .mixins import TimeStamp User = get_user_model() class Post(Ti...
true
true
f759cce3d2354e27cb9af165e4f13f15248f6a72
11,584
bzl
Python
closure/compiler/closure_js_binary.bzl
mhlopko/rules_closure
acad96981d76b60844bf815d03043619714839ad
[ "Apache-2.0" ]
null
null
null
closure/compiler/closure_js_binary.bzl
mhlopko/rules_closure
acad96981d76b60844bf815d03043619714839ad
[ "Apache-2.0" ]
null
null
null
closure/compiler/closure_js_binary.bzl
mhlopko/rules_closure
acad96981d76b60844bf815d03043619714839ad
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The Closure Rules 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 appli...
41.519713
80
0.697427
load("//closure/private:defs.bzl", "CLOSURE_WORKER_ATTR", "CLOSURE_LIBRARY_BASE_ATTR", "JS_LANGUAGES", "JS_LANGUAGE_IN", "JS_LANGUAGE_OUT_DEFAULT", "collect_js", "collect_runfiles", "create_argfile", "difference", "find_js_module_roots", "sort_roots", "unfur...
true
true
f759cd5dfd349e548a6c841cf2e1788d98c3b148
1,289
py
Python
tchannel/status.py
islavov/tchannel-python
ca3da9b4e0367d2e00078b158ab9e0bb4f328619
[ "MIT" ]
98
2015-07-10T23:42:11.000Z
2021-11-08T11:21:02.000Z
tchannel/status.py
islavov/tchannel-python
ca3da9b4e0367d2e00078b158ab9e0bb4f328619
[ "MIT" ]
445
2015-07-10T23:58:02.000Z
2021-08-24T14:58:39.000Z
tchannel/status.py
islavov/tchannel-python
ca3da9b4e0367d2e00078b158ab9e0bb4f328619
[ "MIT" ]
43
2015-07-22T19:14:57.000Z
2021-09-14T12:12:38.000Z
# Copyright (c) 2016 Uber Technologies, Inc. # # 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, merge, publ...
42.966667
79
0.775019
from __future__ import ( absolute_import, division, print_function, unicode_literals ) OK = 0 FAILED = 1
true
true
f759cd7bf63cad9dcb251e56b5a74cef4f8563e8
5,133
py
Python
src/multi.py
SiChen-cuc/Tiyuntsong
b1797b543f21d8e0cc80b2934aa1f5a70df5ee45
[ "BSD-2-Clause" ]
20
2018-11-28T13:05:44.000Z
2022-02-23T02:45:31.000Z
src/multi.py
SiChen-cuc/Tiyuntsong
b1797b543f21d8e0cc80b2934aa1f5a70df5ee45
[ "BSD-2-Clause" ]
1
2019-01-27T08:02:40.000Z
2019-01-31T09:11:16.000Z
src/multi.py
thu-media/Tiyuntsong
b1797b543f21d8e0cc80b2934aa1f5a70df5ee45
[ "BSD-2-Clause" ]
6
2018-11-18T12:30:38.000Z
2020-05-07T06:15:08.000Z
import sabre as env import math from network import Zero from tracepool import tracepool import numpy as np from rules import rules from log import log import os from multiprocessing import cpu_count import multiprocessing as mp NUM_AGENT = 2 USE_CORES = cpu_count() def agent(agent_id, net_params_queue, exp_queue): ...
32.283019
80
0.567699
import sabre as env import math from network import Zero from tracepool import tracepool import numpy as np from rules import rules from log import log import os from multiprocessing import cpu_count import multiprocessing as mp NUM_AGENT = 2 USE_CORES = cpu_count() def agent(agent_id, net_params_queue, exp_queue): ...
true
true
f759cda21dbe457e3133af64b52b3118a76109d9
1,514
py
Python
cog/command/beta.py
DrLarck/DiscordBallZ_
c274e26efce4c5a757d258c54bc285d118618751
[ "MIT" ]
4
2020-01-19T13:53:43.000Z
2020-01-20T13:34:17.000Z
cog/command/beta.py
DrLarck/DiscordBallZ_
c274e26efce4c5a757d258c54bc285d118618751
[ "MIT" ]
18
2020-01-19T17:52:17.000Z
2020-02-17T15:06:13.000Z
cog/command/beta.py
DrLarck/DiscordBallZ_
c274e26efce4c5a757d258c54bc285d118618751
[ "MIT" ]
1
2020-10-08T19:59:42.000Z
2020-10-08T19:59:42.000Z
""" BETA test commands """ # dependancies import asyncio import discord from discord.ext import commands # util from utility.cog.player.player import Player from utility.cog.combat_system.cpu import CPU # characters from utility.cog.character.list import c001_sabimen from utility.cog.character.list import c002_sabim...
23.65625
65
0.589168
import asyncio import discord from discord.ext import commands from utility.cog.player.player import Player from utility.cog.combat_system.cpu import CPU from utility.cog.character.list import c001_sabimen from utility.cog.character.list import c002_sabimen from utility.cog.character.list import c003_sabimen class ...
true
true
f759ceb74c438cb9d58e0bce5863dfcb059badef
6,531
py
Python
tests/__init__.py
EnTeQuAk/Python-Markdown
6fc26b6bc816d517f2c0c13fc807119927efe06d
[ "BSD-3-Clause" ]
2
2018-02-18T15:59:37.000Z
2021-01-05T00:19:18.000Z
tests/__init__.py
EnTeQuAk/Python-Markdown
6fc26b6bc816d517f2c0c13fc807119927efe06d
[ "BSD-3-Clause" ]
null
null
null
tests/__init__.py
EnTeQuAk/Python-Markdown
6fc26b6bc816d517f2c0c13fc807119927efe06d
[ "BSD-3-Clause" ]
3
2015-10-16T11:03:20.000Z
2019-10-06T12:42:24.000Z
import os import markdown import codecs import difflib try: import nose except ImportError as e: msg = e.args[0] msg = msg + ". The nose testing framework is required to run the Python-" \ "Markdown tests. Run `pip install nose` to install the latest version." e.args = (msg,) + e.args[1:] ra...
35.688525
79
0.602205
import os import markdown import codecs import difflib try: import nose except ImportError as e: msg = e.args[0] msg = msg + ". The nose testing framework is required to run the Python-" \ "Markdown tests. Run `pip install nose` to install the latest version." e.args = (msg,) + e.args[1:] ra...
true
true
f759cf50446296d7d6354ce635378e64f1701410
1,217
py
Python
playground/random_obs.py
zygn/f1tenth_gym
fbb5b6a2b84bff0bd1e4eeeb62d963c74632f787
[ "MIT" ]
null
null
null
playground/random_obs.py
zygn/f1tenth_gym
fbb5b6a2b84bff0bd1e4eeeb62d963c74632f787
[ "MIT" ]
null
null
null
playground/random_obs.py
zygn/f1tenth_gym
fbb5b6a2b84bff0bd1e4eeeb62d963c74632f787
[ "MIT" ]
null
null
null
import random import cv2 import numpy as np from tqdm import tqdm file_name = 'map.png' img = cv2.imread(file_name, -1) dst = img.copy() h, w = img.shape epsilon = 0.9999 # 그레이스케일과 바이너리 스케일 변환 th = cv2.bitwise_not(dst) contours, _ = cv2.findContours(th, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) contours.sort(key=len...
23.862745
83
0.653246
import random import cv2 import numpy as np from tqdm import tqdm file_name = 'map.png' img = cv2.imread(file_name, -1) dst = img.copy() h, w = img.shape epsilon = 0.9999 th = cv2.bitwise_not(dst) contours, _ = cv2.findContours(th, cv2.RETR_CCOMP, cv2.CHAIN_APPROX_SIMPLE) contours.sort(key=len) size_contours = [] p...
true
true
f759cf67a98bf68210fcbde300df305982931878
2,445
py
Python
project/settings.py
mosbasik/blog_app
e44cc0b4823cc56ae654e5c991f12838330c96bb
[ "Apache-2.0" ]
null
null
null
project/settings.py
mosbasik/blog_app
e44cc0b4823cc56ae654e5c991f12838330c96bb
[ "Apache-2.0" ]
null
null
null
project/settings.py
mosbasik/blog_app
e44cc0b4823cc56ae654e5c991f12838330c96bb
[ "Apache-2.0" ]
null
null
null
""" Django settings for project project. Generated by 'django-admin startproject' using Django 1.8.3. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
25.736842
71
0.707566
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', ...
true
true
f759cf96fdf3caa75e928a66dedd61561ed37f9a
558
py
Python
symmetric/openapi/helpers.py
daleal/symmetric
e4611b059e9f08db905dbe54b6a2212d9d4fdb5c
[ "MIT" ]
74
2020-03-02T13:14:31.000Z
2021-02-19T07:39:44.000Z
symmetric/openapi/helpers.py
daleal/symmetric
e4611b059e9f08db905dbe54b6a2212d9d4fdb5c
[ "MIT" ]
14
2020-02-21T03:42:31.000Z
2020-10-30T04:19:58.000Z
symmetric/openapi/helpers.py
daleal/symmetric
e4611b059e9f08db905dbe54b6a2212d9d4fdb5c
[ "MIT" ]
1
2020-03-13T02:24:10.000Z
2020-03-13T02:24:10.000Z
""" A module for every helper of the OpenAPI documentation generator. """ import symmetric.constants def is_not_docs(route): """Checks if a route is not a documentation-related route.""" # Check that the route is not the schema route not_schema = route != symmetric.constants.OPENAPI_ROUTE # Check tha...
32.823529
72
0.758065
import symmetric.constants def is_not_docs(route): not_schema = route != symmetric.constants.OPENAPI_ROUTE not_documentation = route != symmetric.constants.DOCUMENTATION_ROUTE return not_schema and not_documentation
true
true
f759d04d405862db65bab0cd1b766c8476ab3eb7
4,057
py
Python
python_examples/examples/databases/mongodb_example.py
BurnySc2/tools
f2b0f4450fb30cff61d390b222f561c26fd2324b
[ "MIT" ]
null
null
null
python_examples/examples/databases/mongodb_example.py
BurnySc2/tools
f2b0f4450fb30cff61d390b222f561c26fd2324b
[ "MIT" ]
10
2021-12-22T19:48:26.000Z
2022-03-31T13:22:47.000Z
python_examples/examples/databases/mongodb_example.py
BurnySc2/tools
f2b0f4450fb30cff61d390b222f561c26fd2324b
[ "MIT" ]
null
null
null
import re from typing import Dict, List, Union import pymongo from bson import ObjectId from loguru import logger from pymongo import MongoClient from pymongo.collection import Collection from pymongo.database import Database from pymongo.errors import ServerSelectionTimeoutError from pymongo.results import InsertMany...
39.009615
121
0.562978
import re from typing import Dict, List, Union import pymongo from bson import ObjectId from loguru import logger from pymongo import MongoClient from pymongo.collection import Collection from pymongo.database import Database from pymongo.errors import ServerSelectionTimeoutError from pymongo.results import InsertMany...
true
true
f759d07e95a441962e79c7a41b6ab93813e43c85
3,169
py
Python
third_party/openthread/repo/tests/scripts/thread-cert/Cert_6_4_01_LinkLocal.py
huamenggg/otbr-makefile
35af321a31488b08cbd6c10a0dab102cde3474d1
[ "BSD-3-Clause" ]
2
2018-08-24T05:14:27.000Z
2018-09-25T03:02:36.000Z
third_party/openthread/repo/tests/scripts/thread-cert/Cert_6_4_01_LinkLocal.py
huamenggg/otbr-makefile
35af321a31488b08cbd6c10a0dab102cde3474d1
[ "BSD-3-Clause" ]
4
2016-09-09T17:10:04.000Z
2016-09-29T05:18:09.000Z
tests/scripts/thread-cert/Cert_6_4_01_LinkLocal.py
turon/openthread
20145cb42fca90d791c4918475db28b7b91290d6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
37.72619
78
0.689176
import unittest import config import node LEADER = 1 ED = 2 class Cert_6_4_1_LinkLocal(unittest.TestCase): def setUp(self): self.simulator = config.create_default_simulator() self.nodes = {} for i in range(1, 3): self.nodes[i] = node.Node(i, (i == ED), simulator=self.simula...
true
true
f759d1104c09039547f4cbf67705880d4ad124cb
485
py
Python
Notebooks/SentinelUtilities/SentinelExceptions/input_error.py
ytognder/Azure-Sentinel
7345560f178e731d7ba5a5541fd3383bca285311
[ "MIT" ]
266
2019-10-18T00:41:39.000Z
2022-03-18T05:44:01.000Z
Notebooks/SentinelUtilities/SentinelExceptions/input_error.py
ytognder/Azure-Sentinel
7345560f178e731d7ba5a5541fd3383bca285311
[ "MIT" ]
113
2020-03-10T16:56:10.000Z
2022-03-28T21:54:26.000Z
Notebooks/SentinelUtilities/SentinelExceptions/input_error.py
ytognder/Azure-Sentinel
7345560f178e731d7ba5a5541fd3383bca285311
[ "MIT" ]
93
2020-01-07T20:28:43.000Z
2022-03-23T04:09:39.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """ input...
30.3125
76
0.519588
class InputError(ValueError):
true
true
f759d178fe7c28abd437acb080cee8e641632102
3,525
py
Python
designate/tests/test_manage/test_update_pool.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
145
2015-01-02T09:35:53.000Z
2021-12-14T17:03:53.000Z
designate/tests/test_manage/test_update_pool.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
6
2015-03-15T00:22:27.000Z
2019-12-16T09:37:38.000Z
designate/tests/test_manage/test_update_pool.py
mrlesmithjr/designate
bff3d5f6e31fe595a77143ec4ac779c187bf72a8
[ "Apache-2.0" ]
109
2015-01-13T16:47:34.000Z
2021-03-15T13:18:48.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...
34.558824
75
0.647376
from unittest import mock from oslo_log import log as logging from designate.manage.pool import PoolCommands from designate import objects from designate.tests import fixtures from designate.tests.test_manage import DesignateManageTestCase LOG = logging.getLogger(__name__) class UpdatePoolTestCase(DesignateManageT...
true
true
f759d26fd868f40135d377fddcfbe85bccebf073
2,693
py
Python
tests/test_catalyst.py
pmrowla/dvclive
fe95917c965db210a6a11ff3d6f287c2df298330
[ "Apache-2.0" ]
null
null
null
tests/test_catalyst.py
pmrowla/dvclive
fe95917c965db210a6a11ff3d6f287c2df298330
[ "Apache-2.0" ]
null
null
null
tests/test_catalyst.py
pmrowla/dvclive
fe95917c965db210a6a11ff3d6f287c2df298330
[ "Apache-2.0" ]
null
null
null
import os import pytest from catalyst import dl from catalyst.contrib.datasets import MNIST from catalyst.data import ToTensor from catalyst.utils.torch import get_available_engine from torch import nn, optim from torch.utils.data import DataLoader import dvclive from dvclive.catalyst import DvcLiveCallback # pylint...
26.145631
74
0.645006
import os import pytest from catalyst import dl from catalyst.contrib.datasets import MNIST from catalyst.data import ToTensor from catalyst.utils.torch import get_available_engine from torch import nn, optim from torch.utils.data import DataLoader import dvclive from dvclive.catalyst import DvcLiveCallback @pytes...
true
true
f759d3f6960d54a6bfd3e44a93b2764902fc2e12
6,949
py
Python
tests/test_pager.py
appeltel/lambdapager
2d08099e965e1e85269e7c2fa2690f1aebbc2a10
[ "Apache-2.0" ]
1
2016-06-27T13:09:36.000Z
2016-06-27T13:09:36.000Z
tests/test_pager.py
appeltel/lambdapager
2d08099e965e1e85269e7c2fa2690f1aebbc2a10
[ "Apache-2.0" ]
null
null
null
tests/test_pager.py
appeltel/lambdapager
2d08099e965e1e85269e7c2fa2690f1aebbc2a10
[ "Apache-2.0" ]
null
null
null
""" _test_pager_ Tests for the pager module and LambdaPager class. Here I don't provide full integration testing or individual unit tests, but due to the nature and simplicity of the pager, test that for a given configuration the pager makes the correct requests and twilio API calls through mocks. """ import os impor...
31.161435
78
0.578644
import os import unittest from StringIO import StringIO import mock import requests import requests.exceptions from lambdapager import LambdaPager class MockRequest(mock.Mock): def __init__(self, *args, **kwargs): super(MockRequest, self).__init__(*args, **kwargs) self.side_effect = self.handle ...
true
true
f759d3fc064e4fecfe563740c981a001aecdc2fd
1,065
py
Python
create_fo_bundle.py
daserzw/oidc-swamid-federation
2f97eac2d63186848c4984b4fb9559cb9029b6a9
[ "Apache-2.0" ]
null
null
null
create_fo_bundle.py
daserzw/oidc-swamid-federation
2f97eac2d63186848c4984b4fb9559cb9029b6a9
[ "Apache-2.0" ]
null
null
null
create_fo_bundle.py
daserzw/oidc-swamid-federation
2f97eac2d63186848c4984b4fb9559cb9029b6a9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os from urllib.parse import quote_plus from urllib.parse import unquote_plus from fedoidcmsg.bundle import FSJWKSBundle from fedoidcmsg.test_utils import create_federation_entities from oidcmsg.key_jar import KeyJar # make sure the necessary directories are there for _dir in ['public', ...
29.583333
72
0.720188
import os from urllib.parse import quote_plus from urllib.parse import unquote_plus from fedoidcmsg.bundle import FSJWKSBundle from fedoidcmsg.test_utils import create_federation_entities from oidcmsg.key_jar import KeyJar for _dir in ['public', 'private', 'fo_bundle']: if not os.path.isdir(_dir): os.mkd...
true
true
f759d40d5f2d9d36ef14c6fb907b58aa0ee9979c
1,657
py
Python
TrainingNoise_CIFAR10/Update.py
lynshao/NoisyNN
2c827dbe697f4a8d8f9b2cb8abb2aa43a749fa16
[ "MIT" ]
3
2021-05-26T08:43:36.000Z
2021-11-28T20:43:24.000Z
TrainingNoise_CIFAR10/Update.py
lynshao/NoisyNN
2c827dbe697f4a8d8f9b2cb8abb2aa43a749fa16
[ "MIT" ]
null
null
null
TrainingNoise_CIFAR10/Update.py
lynshao/NoisyNN
2c827dbe697f4a8d8f9b2cb8abb2aa43a749fa16
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.utils.data import DataLoader, Dataset class DatasetSplit(Dataset): def __init__(self, dataset, idxs): self.dataset = dataset self.idxs = list(idxs) def __len__(self): return len(self.idxs) def __getitem__(self, item): image, la...
31.865385
124
0.611949
import torch from torch import nn from torch.utils.data import DataLoader, Dataset class DatasetSplit(Dataset): def __init__(self, dataset, idxs): self.dataset = dataset self.idxs = list(idxs) def __len__(self): return len(self.idxs) def __getitem__(self, item): image, la...
true
true
f759d4c51b44a306bcc77dc0a4c54ec7c1df7c01
8,765
py
Python
regression-build.py
phargogh/invest-natcap.invest-3
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
[ "BSD-3-Clause" ]
null
null
null
regression-build.py
phargogh/invest-natcap.invest-3
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
[ "BSD-3-Clause" ]
null
null
null
regression-build.py
phargogh/invest-natcap.invest-3
ee96055a4fa034d9a95fa8ccc6259ab03264e6c1
[ "BSD-3-Clause" ]
null
null
null
import sys import os import shutil import readline import argparse import invest_natcap.testing from invest_natcap.testing import test_writing from invest_natcap.testing import autocomplete from invest_natcap.iui import fileio #CONFIG_DATA = { # 'Input archive': '', # 'Output archive': '', #} class ConfiguredC...
33.841699
98
0.636281
import sys import os import shutil import readline import argparse import invest_natcap.testing from invest_natcap.testing import test_writing from invest_natcap.testing import autocomplete from invest_natcap.iui import fileio class ConfiguredCorrectly(Exception): pass class TestExists(Exception): pass def...
false
true