hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c3f7ad4ef6b9d9d18d44be2d896e43eed4b7b8b
66,169
py
Python
workers/pull_request_worker/pull_request_worker.py
jnqqq/augur
c42306f656637bd0cd7e2a7e76b15dd232e76ad5
[ "MIT" ]
2
2021-08-31T06:54:27.000Z
2021-11-15T03:18:50.000Z
workers/pull_request_worker/pull_request_worker.py
NToepke/augur
aef5edca1c8cea2698b6800ced68fa64acae4d76
[ "MIT" ]
null
null
null
workers/pull_request_worker/pull_request_worker.py
NToepke/augur
aef5edca1c8cea2698b6800ced68fa64acae4d76
[ "MIT" ]
null
null
null
#SPDX-License-Identifier: MIT import ast import json import logging import os import sys import time import traceback from workers.worker_git_integration import WorkerGitInterfaceable from numpy.lib.utils import source import requests import copy from datetime import datetime from multiprocessing import Process, Queue ...
45.760028
192
0.534344
import ast import json import logging import os import sys import time import traceback from workers.worker_git_integration import WorkerGitInterfaceable from numpy.lib.utils import source import requests import copy from datetime import datetime from multiprocessing import Process, Queue import pandas as pd import sq...
true
true
1c3f7b58800d085db2e92f96db154a84a24c2a7d
1,168
py
Python
plotly/validators/scattercarpet/stream/__init__.py
piyush1301/plotly.py
50cd5c4cd4732042422751c7760acbab8dd8a50d
[ "MIT" ]
6
2019-05-03T02:12:04.000Z
2020-03-01T06:33:21.000Z
plotly/validators/scattercarpet/stream/__init__.py
piyush1301/plotly.py
50cd5c4cd4732042422751c7760acbab8dd8a50d
[ "MIT" ]
null
null
null
plotly/validators/scattercarpet/stream/__init__.py
piyush1301/plotly.py
50cd5c4cd4732042422751c7760acbab8dd8a50d
[ "MIT" ]
5
2019-05-18T16:50:11.000Z
2021-07-06T21:14:36.000Z
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='token', parent_name='scattercarpet.stream', **kwargs ): super(TokenValidator, self).__init__( plotly_name=plotly_name,...
25.955556
71
0.590753
import _plotly_utils.basevalidators class TokenValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='token', parent_name='scattercarpet.stream', **kwargs ): super(TokenValidator, self).__init__( plotly_name=plotly_name,...
true
true
1c3f7b8f6dcb7dec90206974a40dcaca5fa5ba83
1,131
py
Python
migrations/versions/efeb5cce78ac_users_table.py
danisaleem/Flask_App
bb3709fedd1cb40d36f2b91964b54875c55e9091
[ "MIT" ]
null
null
null
migrations/versions/efeb5cce78ac_users_table.py
danisaleem/Flask_App
bb3709fedd1cb40d36f2b91964b54875c55e9091
[ "MIT" ]
1
2020-05-14T16:31:48.000Z
2021-04-27T01:19:46.000Z
migrations/versions/efeb5cce78ac_users_table.py
danisaleem/Flask_App
bb3709fedd1cb40d36f2b91964b54875c55e9091
[ "MIT" ]
null
null
null
"""users table Revision ID: efeb5cce78ac Revises: Create Date: 2020-03-23 00:01:22.028648 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'efeb5cce78ac' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto genera...
29
80
0.678161
from alembic import op import sqlalchemy as sa revision = 'efeb5cce78ac' down_revision = None branch_labels = None depends_on = None def upgrade(): gth=120), nullable=True), sa.Column('password_hash', sa.String(length=128), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_index(op.f('i...
true
true
1c3f7bdad58bdc7300886175b27dda17fa0bda59
374
py
Python
JiYouMCC/0016/0016.py
hooting/show-me-the-code-python
0026ee495eade7c28aa5a1249716b1fdc20a141c
[ "MIT" ]
null
null
null
JiYouMCC/0016/0016.py
hooting/show-me-the-code-python
0026ee495eade7c28aa5a1249716b1fdc20a141c
[ "MIT" ]
null
null
null
JiYouMCC/0016/0016.py
hooting/show-me-the-code-python
0026ee495eade7c28aa5a1249716b1fdc20a141c
[ "MIT" ]
null
null
null
import xlwt import json import sys reload(sys) sys.setdefaultencoding('utf8') file = xlwt.Workbook(encoding='utf-8') table = file.add_sheet('numbers', cell_overwrite_ok=True) txt = open('numbers.txt').read() json_txt = json.loads(txt) for x in range(len(json_txt)): for y in range(len(json_txt[x])): table...
22
57
0.703209
import xlwt import json import sys reload(sys) sys.setdefaultencoding('utf8') file = xlwt.Workbook(encoding='utf-8') table = file.add_sheet('numbers', cell_overwrite_ok=True) txt = open('numbers.txt').read() json_txt = json.loads(txt) for x in range(len(json_txt)): for y in range(len(json_txt[x])): table...
true
true
1c3f7d2811a924f7d780fcfee57f6ad8a841e5a7
39,337
py
Python
mesh_tensorflow/bert/run_classifier.py
jinoobaek-qz/mesh
99a7c089bd6c3919dce898b1c77a4e2f7b4cf275
[ "Apache-2.0" ]
1
2021-04-18T08:25:31.000Z
2021-04-18T08:25:31.000Z
mesh_tensorflow/bert/run_classifier.py
jinoobaek-qz/mesh
99a7c089bd6c3919dce898b1c77a4e2f7b4cf275
[ "Apache-2.0" ]
null
null
null
mesh_tensorflow/bert/run_classifier.py
jinoobaek-qz/mesh
99a7c089bd6c3919dce898b1c77a4e2f7b4cf275
[ "Apache-2.0" ]
1
2021-07-06T23:06:05.000Z
2021-07-06T23:06:05.000Z
# coding=utf-8 # Copyright 2019 The Mesh TensorFlow 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 applicab...
36.155331
82
0.67237
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import csv import os import mesh_tensorflow as mtf import mesh_tensorflow.bert.bert as bert_lib import mesh_tensorflow.bert.optimization as optimization_lib import mesh_tenso...
true
true
1c3f7e11db8df3b681d8d8f066e13f183429620e
262
py
Python
tests/artificial/transf_Logit/trend_PolyTrend/cycle_7/ar_12/test_artificial_128_Logit_PolyTrend_7_12_100.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_Logit/trend_PolyTrend/cycle_7/ar_12/test_artificial_128_Logit_PolyTrend_7_12_100.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_Logit/trend_PolyTrend/cycle_7/ar_12/test_artificial_128_Logit_PolyTrend_7_12_100.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Logit", sigma = 0.0, exog_count = 100, ar_order = 12);
37.428571
162
0.729008
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Logit", sigma = 0.0, exog_count = 100, ar_order = 12);
true
true
1c3f7f0265ab655f120e105f8a3c29e9c4dc37c2
8,752
py
Python
FuzzingTool_Dialog_ObjectFileChoose_Child.py
Ryu-Miyaki/Fuzz4B
8546f165d4dbdd97eb6ab5a6f4c445ee81ec364b
[ "MIT" ]
16
2020-06-25T11:56:59.000Z
2022-02-05T14:00:12.000Z
FuzzingTool_Dialog_ObjectFileChoose_Child.py
Ryu-Miyaki/Fuzz4B
8546f165d4dbdd97eb6ab5a6f4c445ee81ec364b
[ "MIT" ]
null
null
null
FuzzingTool_Dialog_ObjectFileChoose_Child.py
Ryu-Miyaki/Fuzz4B
8546f165d4dbdd97eb6ab5a6f4c445ee81ec364b
[ "MIT" ]
null
null
null
import wx import FuzzingTool import pyperclip # Implementing Dialog_ObjectFileChoose class FuzzingTool_Dialog_ObjectFileChoose_Child( wx.Dialog ): def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0 ) ...
46.802139
305
0.776165
import wx import FuzzingTool import pyperclip class FuzzingTool_Dialog_ObjectFileChoose_Child( wx.Dialog ): def __init__( self, parent ): wx.Dialog.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString, pos = wx.DefaultPosition, size = wx.DefaultSize, style = 0 ) self.SetSizeHints( wx.DefaultSize, wx....
true
true
1c3f7feb8162ecf2c73e47b82f212ad4cf57200f
13,530
py
Python
orcid_api/models/work.py
jpeerz/NZ-ORCID-Hub
ba412d49cff0158842878753b65fc60731df158c
[ "MIT" ]
null
null
null
orcid_api/models/work.py
jpeerz/NZ-ORCID-Hub
ba412d49cff0158842878753b65fc60731df158c
[ "MIT" ]
null
null
null
orcid_api/models/work.py
jpeerz/NZ-ORCID-Hub
ba412d49cff0158842878753b65fc60731df158c
[ "MIT" ]
null
null
null
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import r...
26.425781
690
0.566593
from pprint import pformat from six import iteritems import re class Work(object): def __init__(self, created_date=None, last_modified_date=None, source=None, put_code=None, path=None, title=None, journal_title=None, short_description=None, citation=None, type=None, publication_date=None, external_ids=None, u...
true
true
1c3f804e9ac4240a15574562410b12ae5fd62227
1,472
py
Python
train.py
train255/Silent-Face-Anti-Spoofing
e2137cde55ba4c7b43c2a7d6340d827a106b7404
[ "Apache-2.0" ]
null
null
null
train.py
train255/Silent-Face-Anti-Spoofing
e2137cde55ba4c7b43c2a7d6340d827a106b7404
[ "Apache-2.0" ]
null
null
null
train.py
train255/Silent-Face-Anti-Spoofing
e2137cde55ba4c7b43c2a7d6340d827a106b7404
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 20-6-3 下午5:39 # @Author : zhuying # @Company : Minivision # @File : train.py # @Software : PyCharm import argparse import os from src.train_main import TrainMain from src.default_config import get_default_config, update_config def parse_args(): """parsing and configuration""" ...
36.8
90
0.683424
import argparse import os from src.train_main import TrainMain from src.default_config import get_default_config, update_config def parse_args(): desc = "Silence-FAS" parser = argparse.ArgumentParser(description=desc) parser.add_argument("--device_ids", type=str, default="1", help="which gpu id, 01...
true
true
1c3f8190c1626094869fa84261e62d28256a508c
126,857
py
Python
tests/models/layoutlmv2/test_tokenization_layoutlmv2.py
manuelciosici/transformers
c33f6046c3dab8f41bedf893404e6469dea3bce8
[ "Apache-2.0" ]
8,028
2018-11-05T15:19:44.000Z
2019-07-16T09:14:59.000Z
tests/models/layoutlmv2/test_tokenization_layoutlmv2.py
ymwangg/transformers
4a419d4995111c22d6842ee1bcd2d3f500150845
[ "Apache-2.0" ]
731
2018-11-05T21:35:52.000Z
2019-07-16T09:51:26.000Z
tests/models/layoutlmv2/test_tokenization_layoutlmv2.py
ymwangg/transformers
4a419d4995111c22d6842ee1bcd2d3f500150845
[ "Apache-2.0" ]
2,106
2018-11-05T15:29:15.000Z
2019-07-16T08:51:57.000Z
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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...
52.312165
1,398
0.5848
import inspect import os import re import shutil import tempfile import unittest from typing import List from transformers import AddedToken, LayoutLMv2TokenizerFast, SpecialTokensMixin, is_tf_available, is_torch_available from transformers.models.layoutlmv2.tokenization_layoutlmv2 import ( VOCAB_FI...
true
true
1c3f81fd472f006da3853fb2058fb95fb3cbadc3
371
py
Python
hw/python/count_hi.py
petrroll/npfl104
241646b02e91c14ac885dd6cc981b5bb63d4561c
[ "MIT" ]
null
null
null
hw/python/count_hi.py
petrroll/npfl104
241646b02e91c14ac885dd6cc981b5bb63d4561c
[ "MIT" ]
null
null
null
hw/python/count_hi.py
petrroll/npfl104
241646b02e91c14ac885dd6cc981b5bb63d4561c
[ "MIT" ]
null
null
null
#!/usr/bin/python3 def count_hi(str): return str.count("hi") def assert_eq(a, b): print(f"\tAct:{a}==Exp:{b}") assert(a == b) def test(): print(f"Test ({__file__}):") assert_eq(count_hi(''), 0) assert_eq(count_hi('hsi'), 0) assert_eq(count_hi('hi'), 1) assert_eq(count_hi('hihiqhi'), 3) print(f"\tTes...
19.526316
35
0.619946
def count_hi(str): return str.count("hi") def assert_eq(a, b): print(f"\tAct:{a}==Exp:{b}") assert(a == b) def test(): print(f"Test ({__file__}):") assert_eq(count_hi(''), 0) assert_eq(count_hi('hsi'), 0) assert_eq(count_hi('hi'), 1) assert_eq(count_hi('hihiqhi'), 3) print(f"\tTests success.") if...
true
true
1c3f82c9379220d89b5659c7a977fc50f113c0fe
1,202
py
Python
module4-software-testing-documentation-and-licensing/lambdata/lambdata_chancedurr/mod.py
ChanceDurr/DS-Unit-3-Sprint-1-Software-Engineering
842b0fd9364964b9efa0ca06dfae37f07c1e8947
[ "MIT" ]
null
null
null
module4-software-testing-documentation-and-licensing/lambdata/lambdata_chancedurr/mod.py
ChanceDurr/DS-Unit-3-Sprint-1-Software-Engineering
842b0fd9364964b9efa0ca06dfae37f07c1e8947
[ "MIT" ]
null
null
null
module4-software-testing-documentation-and-licensing/lambdata/lambdata_chancedurr/mod.py
ChanceDurr/DS-Unit-3-Sprint-1-Software-Engineering
842b0fd9364964b9efa0ca06dfae37f07c1e8947
[ "MIT" ]
null
null
null
import pandas as pd import unittest def checkNulls(dataframe): df = dataframe nulls = df.isnull().sum() for col, null in nulls.items(): print(f"'{col}' has {null} null value(s).") def addListToDataframe(alist, dataframe, colName='new_column'): newCol = pd.DataFrame(alist, columns=[colName]) ...
23.115385
85
0.593178
import pandas as pd import unittest def checkNulls(dataframe): df = dataframe nulls = df.isnull().sum() for col, null in nulls.items(): print(f"'{col}' has {null} null value(s).") def addListToDataframe(alist, dataframe, colName='new_column'): newCol = pd.DataFrame(alist, columns=[colName]) ...
true
true
1c3f82ffb5f32873bb236afb3842f2862405b217
2,219
py
Python
trustpay/__init__.py
RomanMelnyk113/trustpay-python
2cf67469edcae3059c78bff83db9408c54b93f7f
[ "MIT" ]
null
null
null
trustpay/__init__.py
RomanMelnyk113/trustpay-python
2cf67469edcae3059c78bff83db9408c54b93f7f
[ "MIT" ]
null
null
null
trustpay/__init__.py
RomanMelnyk113/trustpay-python
2cf67469edcae3059c78bff83db9408c54b93f7f
[ "MIT" ]
null
null
null
class PaymentException(Exception): pass order_xml_string = '''<?xml version="1.0" encoding="UTF-8"?> <Document xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"> <CstmrCdtTrfInitn> ...
31.253521
66
0.394322
class PaymentException(Exception): pass order_xml_string = '''<?xml version="1.0" encoding="UTF-8"?> <Document xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"> <CstmrCdtTrfInitn> ...
true
true
1c3f843b8d1393644c09337a3cb41a16c2b48573
1,048
py
Python
jupyter_contrib_nbextensions/__init__.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
jupyter_contrib_nbextensions/__init__.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
jupyter_contrib_nbextensions/__init__.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os import jupyter_nbextensions_configurator __version__ = '0.3.0' def _jupyter_server_extension_paths(): """Magically-named function for jupyter extension installations.""" return [] def _jupyter_nbextension_paths(): """Magically-named function for jupyter extension ins...
29.942857
76
0.669847
import os import jupyter_nbextensions_configurator __version__ = '0.3.0' def _jupyter_server_extension_paths(): return [] def _jupyter_nbextension_paths(): nbextension_dirs = [ os.path.join(os.path.dirname(__file__), 'nbextensions')] specs = jupyter_nbextensions_configurator.get_configurable...
true
true
1c3f85598d6d10f7ad9295935ad03bf15f07982d
5,117
py
Python
Pheme5MainResponseWAE4Early.py
zperfet/PathFake
fe09e5f6d872d682ef9e27384edabdb9e2ee27e9
[ "MIT" ]
null
null
null
Pheme5MainResponseWAE4Early.py
zperfet/PathFake
fe09e5f6d872d682ef9e27384edabdb9e2ee27e9
[ "MIT" ]
null
null
null
Pheme5MainResponseWAE4Early.py
zperfet/PathFake
fe09e5f6d872d682ef9e27384edabdb9e2ee27e9
[ "MIT" ]
1
2022-01-03T15:26:06.000Z
2022-01-03T15:26:06.000Z
# 相比MainPathVoting的不同之处:random使用全部路径文本;wae使用response path,即除去了源文本 # 二者使用不同的id编码,即每一条路径对应random path ids和wae response path ids from models.PathBased import ResponseWAE, ResponseCatWAE, ResponseWAECat from torch import optim import datetime from evaluate import * from get_args import _args, print_args from data_io...
43
96
0.522767
from models.PathBased import ResponseWAE, ResponseCatWAE, ResponseWAECat from torch import optim import datetime from evaluate import * from get_args import _args, print_args from data_io import * import sys from torch.optim.lr_scheduler import StepLR def main(): print_args(_args) setup_see...
true
true
1c3f85e1028366c5f6c8a26ba5ec68082c8dc435
602
py
Python
tools/gui_patch.py
facelessuser/Rummage
74f0ce1b078eef40c3ba683dbc4638112f3b9bb7
[ "MIT" ]
55
2015-02-15T08:17:55.000Z
2022-03-11T11:55:39.000Z
tools/gui_patch.py
facelessuser/Rummage
74f0ce1b078eef40c3ba683dbc4638112f3b9bb7
[ "MIT" ]
264
2015-01-29T20:27:40.000Z
2022-03-03T04:08:48.000Z
tools/gui_patch.py
facelessuser/Rummage
74f0ce1b078eef40c3ba683dbc4638112f3b9bb7
[ "MIT" ]
12
2017-08-30T22:54:20.000Z
2022-03-21T01:05:50.000Z
"""Patch graphical user interface file.""" import codecs import re filename = 'rummage/lib/gui/gui.py' with codecs.open(filename, 'r', encoding='utf-8') as f: text = f.read() # Add collapsible pane replacement text = re.sub( r'^((?:import|from)(?! \.controls\.collapsible_pane).*?)(\r?\n){2}', r'\1\2from ...
22.296296
92
0.646179
import codecs import re filename = 'rummage/lib/gui/gui.py' with codecs.open(filename, 'r', encoding='utf-8') as f: text = f.read() text = re.sub( r'^((?:import|from)(?! \.controls\.collapsible_pane).*?)(\r?\n){2}', r'\1\2from .controls.collapsible_pane import CollapsiblePane\2\2GUI_PATCHED = True\2\2',...
true
true
1c3f860e591eb1e16d50348d24e86f6ad56138e5
5,434
py
Python
tests/test_parser.py
KyleRConway/knack
73d76bae6fe4996f3ffea4bd24cf487b0263da85
[ "MIT" ]
null
null
null
tests/test_parser.py
KyleRConway/knack
73d76bae6fe4996f3ffea4bd24cf487b0263da85
[ "MIT" ]
null
null
null
tests/test_parser.py
KyleRConway/knack
73d76bae6fe4996f3ffea4bd24cf487b0263da85
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
35.986755
94
0.645749
import unittest from six import StringIO from knack.parser import CLICommandParser from knack.commands import CLICommand from knack.arguments import enum_choice_list from tests.util import MockContext class TestParser(unittest.TestCase): def setUp(self): self.io = StringIO() self.mock_ctx = ...
true
true
1c3f863d25b01378b7e621472637297beaefc32f
489
py
Python
fonolo/api/realtime.py
Fonolo/fonolo-python
2bc8b5bbdaea60f1fad34ead154a1804dcf73746
[ "MIT" ]
null
null
null
fonolo/api/realtime.py
Fonolo/fonolo-python
2bc8b5bbdaea60f1fad34ead154a1804dcf73746
[ "MIT" ]
null
null
null
fonolo/api/realtime.py
Fonolo/fonolo-python
2bc8b5bbdaea60f1fad34ead154a1804dcf73746
[ "MIT" ]
null
null
null
# # This file is part of the Fonolo Python Wrapper package. # # (c) Foncloud, Inc. # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. # import re from .requesthandler import RequestHandler from ..exception.exception import FonoloException cl...
22.227273
73
0.728016
import re from .requesthandler import RequestHandler from ..exception.exception import FonoloException class Realtime(object): def __init__(self, _handler): self.handler = _handler; def get(self, _params=None): return self.handler.get('realtime');
true
true
1c3f868dc109dce702dfbec5695442853f06239d
2,740
py
Python
exercises/4.0/ros2/src/myworkcell_support/launch/workcell.launch.py
Lrk114/industrial_training
82070ab18e64410abbe1b8e02dd3d183177ebd0e
[ "Apache-2.0" ]
1
2021-08-22T15:25:10.000Z
2021-08-22T15:25:10.000Z
exercises/4.0/ros2/src/myworkcell_support/launch/workcell.launch.py
Lrk114/industrial_training
82070ab18e64410abbe1b8e02dd3d183177ebd0e
[ "Apache-2.0" ]
null
null
null
exercises/4.0/ros2/src/myworkcell_support/launch/workcell.launch.py
Lrk114/industrial_training
82070ab18e64410abbe1b8e02dd3d183177ebd0e
[ "Apache-2.0" ]
null
null
null
import os import yaml import launch import launch_ros from ament_index_python import get_package_share_directory def get_package_file(package, file_path): """Get the location of a file installed in an ament package""" package_path = get_package_share_directory(package) absolute_file_path = os.path.join(pac...
36.052632
99
0.654745
import os import yaml import launch import launch_ros from ament_index_python import get_package_share_directory def get_package_file(package, file_path): package_path = get_package_share_directory(package) absolute_file_path = os.path.join(package_path, file_path) return absolute_file_path def load_file(...
true
true
1c3f86e294b56fda20f934bafc73878611a8c271
1,585
py
Python
kiosk/views.py
leonrenkema/makerspaceleiden-crm
36ea20f5b9e263e8f30b1831ae4a2b1d5b926d3c
[ "Apache-2.0" ]
5
2019-03-12T21:38:32.000Z
2021-11-06T15:26:56.000Z
kiosk/views.py
leonrenkema/makerspaceleiden-crm
36ea20f5b9e263e8f30b1831ae4a2b1d5b926d3c
[ "Apache-2.0" ]
33
2019-01-21T15:54:50.000Z
2021-05-18T17:54:52.000Z
kiosk/views.py
leonrenkema/makerspaceleiden-crm
36ea20f5b9e263e8f30b1831ae4a2b1d5b926d3c
[ "Apache-2.0" ]
5
2019-01-21T15:47:26.000Z
2021-09-22T07:14:34.000Z
import os import logging import json from django.shortcuts import render from django.contrib.sites.shortcuts import get_current_site from django.utils.encoding import force_bytes, force_text from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode from django.template.loader import render_to_string f...
34.456522
86
0.828391
import os import logging import json from django.shortcuts import render from django.contrib.sites.shortcuts import get_current_site from django.utils.encoding import force_bytes, force_text from django.utils.http import urlsafe_base64_encode, urlsafe_base64_decode from django.template.loader import render_to_string f...
true
true
1c3f87d26f8903e3b82e12e48ff535ce57b1bf43
4,964
py
Python
api/generated/python/azure-iiot-opc-registry/models/application_info_api_model.py
jaz230/Industrial-IoT
bd4c5abfe579cbb7086a621e8381978e6c70a563
[ "MIT" ]
1
2020-01-22T12:03:08.000Z
2020-01-22T12:03:08.000Z
api/generated/python/azure-iiot-opc-registry/models/application_info_api_model.py
likithadt/Industrial-IoT
d4ea7b330eff08455ca0556fed76aa74d2034da5
[ "MIT" ]
null
null
null
api/generated/python/azure-iiot-opc-registry/models/application_info_api_model.py
likithadt/Industrial-IoT
d4ea7b330eff08455ca0556fed76aa74d2034da5
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator 2.3.33.0 # ...
47.27619
380
0.6666
from msrest.serialization import Model class ApplicationInfoApiModel(Model): _validation = { 'capabilities': {'unique': True}, 'discovery_urls': {'unique': True}, 'host_addresses': {'unique': True}, } _attribute_map = { 'application_id': {'key': 'applicationId'...
true
true
1c3f89924bdc6392502c884a1fd372283dfdd904
9,069
py
Python
yt/frontends/nc4_cm1/data_structures.py
Ronan-Hix/yt
5ca4ab65e7486ee392577b0f24dbf2b56b892679
[ "BSD-3-Clause-Clear" ]
360
2017-04-24T05:06:04.000Z
2022-03-31T10:47:07.000Z
yt/frontends/nc4_cm1/data_structures.py
chrishavlin/yt
023680e3a7bd1000d601727e02a55e72b4cbdc75
[ "BSD-3-Clause-Clear" ]
2,077
2017-04-20T20:36:07.000Z
2022-03-31T16:39:43.000Z
yt/frontends/nc4_cm1/data_structures.py
chrishavlin/yt
023680e3a7bd1000d601727e02a55e72b4cbdc75
[ "BSD-3-Clause-Clear" ]
257
2017-04-19T20:52:28.000Z
2022-03-29T12:23:52.000Z
import os import stat import weakref from collections import OrderedDict import numpy as np from yt.data_objects.index_subobjects.grid_patch import AMRGridPatch from yt.data_objects.static_output import Dataset from yt.geometry.grid_geometry_handler import GridIndex from yt.utilities.file_handler import NetCDF4FileHa...
41.792627
88
0.603705
import os import stat import weakref from collections import OrderedDict import numpy as np from yt.data_objects.index_subobjects.grid_patch import AMRGridPatch from yt.data_objects.static_output import Dataset from yt.geometry.grid_geometry_handler import GridIndex from yt.utilities.file_handler import NetCDF4FileHa...
true
true
1c3f8a0bddd83d58c92ba7505f302d4e5c9c1774
353
py
Python
python/example_from_ray_website.py
viper7882/binance-public-data
94c77de455338b9a6b9bd03aeacbfd637e36c38a
[ "MIT" ]
null
null
null
python/example_from_ray_website.py
viper7882/binance-public-data
94c77de455338b9a6b9bd03aeacbfd637e36c38a
[ "MIT" ]
null
null
null
python/example_from_ray_website.py
viper7882/binance-public-data
94c77de455338b9a6b9bd03aeacbfd637e36c38a
[ "MIT" ]
null
null
null
import ray import pandas as pd import dask.dataframe as dd # Create a Dataset from a list of Pandas DataFrame objects. pdf = pd.DataFrame({"one": [1, 2, 3], "two": ["a", "b", "c"]}) ds = ray.data.from_pandas([ray.put(pdf)]) # Create a Dataset from a Dask-on-Ray DataFrame. dask_df = dd.from_pandas(pdf, npartitions=10)...
32.090909
62
0.70255
import ray import pandas as pd import dask.dataframe as dd pdf = pd.DataFrame({"one": [1, 2, 3], "two": ["a", "b", "c"]}) ds = ray.data.from_pandas([ray.put(pdf)]) dask_df = dd.from_pandas(pdf, npartitions=10) ds = ray.data.from_dask(dask_df)
true
true
1c3f8cb06461a4156bf8d23f4172c14cff4e6bf2
598
py
Python
src/jk_utils/RandomStateID.py
jkpubsrc/python-module-jk-utils
6bf97b3dcde7a970c20ca43323e2eb0dda8fbfb3
[ "Apache-1.1" ]
null
null
null
src/jk_utils/RandomStateID.py
jkpubsrc/python-module-jk-utils
6bf97b3dcde7a970c20ca43323e2eb0dda8fbfb3
[ "Apache-1.1" ]
null
null
null
src/jk_utils/RandomStateID.py
jkpubsrc/python-module-jk-utils
6bf97b3dcde7a970c20ca43323e2eb0dda8fbfb3
[ "Apache-1.1" ]
null
null
null
import os import string import random class RandomStateID(object): def __init__(self): self.__randomStateID = self.__randomString() # def __randomString(self, stringLength:int = 32) -> str: letters = string.ascii_letters + string.digits return "".join(random.choice(letters) for i in range(str...
8.794118
69
0.687291
import os import string import random class RandomStateID(object): def __init__(self): self.__randomStateID = self.__randomString() def __randomString(self, stringLength:int = 32) -> str: letters = string.ascii_letters + string.digits return "".join(random.choice(letters) for i in range(stri...
true
true
1c3f8dbdef82b91ec5509d0b222966b281d8b193
3,943
py
Python
ugrd-assistance-tools_win/[mr]-11_string-data-too-large.py
jungheum/cfreds-2017-winreg
ebdfc6a60849f1b8f0e9f2d35551cc1dfc012036
[ "Apache-2.0" ]
1
2020-04-11T15:33:13.000Z
2020-04-11T15:33:13.000Z
ugrd-assistance-tools_win/[mr]-11_string-data-too-large.py
jungheum/cfreds-2017-winreg
ebdfc6a60849f1b8f0e9f2d35551cc1dfc012036
[ "Apache-2.0" ]
null
null
null
ugrd-assistance-tools_win/[mr]-11_string-data-too-large.py
jungheum/cfreds-2017-winreg
ebdfc6a60849f1b8f0e9f2d35551cc1dfc012036
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ============================================================================= * Description MR (manipulated registry hives) category > Primary class 3 : Invalid data size > Secondary class 3.1 : String data too large * Autho...
36.509259
100
0.57824
import sys import os from cftt_hive import * assert len(sys.argv) == 2 BASE_ADJUST = 2 def mr_pc3_sc3_1(buffer, filesize): hive = cftt_hive(buffer) # get the offset of root cell (0x24 from the beginning of hive file) header = hive.get_header(0) offset = hive.calc_hive_offset(header.root_c...
true
true
1c3f8e91170c92d95f17968976a23f206f129654
633
py
Python
backend/manage.py
crowdbotics-apps/trouble-32410
969cdd6acba7c469990763e99022c635463c0551
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/trouble-32410
969cdd6acba7c469990763e99022c635463c0551
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/manage.py
crowdbotics-apps/trouble-32410
969cdd6acba7c469990763e99022c635463c0551
[ "FTL", "AML", "RSA-MD" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trouble_32410.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ...
28.772727
77
0.685624
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trouble_32410.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
1c3f8ead23fae09ca5bdafd4306caae855595ccc
3,551
py
Python
src/cryptocom/exchange/coins.py
stopkaya/cryptocom-exchange
7518767682d574474f1ba90578e88044dde416a0
[ "MIT" ]
null
null
null
src/cryptocom/exchange/coins.py
stopkaya/cryptocom-exchange
7518767682d574474f1ba90578e88044dde416a0
[ "MIT" ]
null
null
null
src/cryptocom/exchange/coins.py
stopkaya/cryptocom-exchange
7518767682d574474f1ba90578e88044dde416a0
[ "MIT" ]
null
null
null
from .structs import Coin AAVE = Coin("AAVE") ADA = Coin("ADA") AGLD = Coin("AGLD") ALGO = Coin("ALGO") ALICE = Coin("ALICE") AMP = Coin("AMP") ANKR = Coin("ANKR") ANY = Coin("ANY") AR = Coin("AR") ARPA = Coin("ARPA") ATOM = Coin("ATOM") AUDIO = Coin("AUDIO") AVAX = Coin("AVAX") AXS = Coin("AXS") BADGER = Coin("BADGER...
18.888298
50
0.58209
from .structs import Coin AAVE = Coin("AAVE") ADA = Coin("ADA") AGLD = Coin("AGLD") ALGO = Coin("ALGO") ALICE = Coin("ALICE") AMP = Coin("AMP") ANKR = Coin("ANKR") ANY = Coin("ANY") AR = Coin("AR") ARPA = Coin("ARPA") ATOM = Coin("ATOM") AUDIO = Coin("AUDIO") AVAX = Coin("AVAX") AXS = Coin("AXS") BADGER = Coin("BADGER...
true
true
1c3f8ede1e1aadd1f25a41230d9299e775ebf67c
4,257
py
Python
src/commercetools/platform/client/in_store/by_project_key_in_store_key_by_store_key_request_builder.py
labd/commercetools-python-sdk
d8ec285f08d56ede2e4cad45c74833f5b609ab5c
[ "MIT" ]
15
2018-11-02T14:35:52.000Z
2022-03-16T07:51:44.000Z
src/commercetools/platform/client/in_store/by_project_key_in_store_key_by_store_key_request_builder.py
labd/commercetools-python-sdk
d8ec285f08d56ede2e4cad45c74833f5b609ab5c
[ "MIT" ]
84
2018-11-02T12:50:32.000Z
2022-03-22T01:25:54.000Z
src/commercetools/platform/client/in_store/by_project_key_in_store_key_by_store_key_request_builder.py
labd/commercetools-python-sdk
d8ec285f08d56ede2e4cad45c74833f5b609ab5c
[ "MIT" ]
13
2019-01-03T09:16:50.000Z
2022-02-15T18:37:19.000Z
# This file is automatically generated by the rmf-codegen project. # # The Python code generator is maintained by Lab Digital. If you want to # contribute to this project then please do not edit this file directly # but send a pull request to the Lab Digital fork of rmf-codegen at # https://github.com/labd/rmf-codegen ...
38.008929
106
0.742072
import typing import warnings from ..carts.by_project_key_in_store_key_by_store_key_carts_request_builder import ( ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder, ) from ..customers.by_project_key_in_store_key_by_store_key_customers_request_builder import ( ByProjectKeyInStoreKeyByStoreKeyCustomersR...
true
true
1c3f8ee1dd9402086a363d8ccd669aa80cb0fa94
9,101
py
Python
test/functional/wallet_import_rescan.py
foxdproject/foxdcoin
9db505f6f32bd3e51bd2b2da533744c98cee23af
[ "MIT" ]
7
2020-06-19T20:49:02.000Z
2022-01-31T09:12:18.000Z
test/functional/wallet_import_rescan.py
foxdproject/foxdcoin
9db505f6f32bd3e51bd2b2da533744c98cee23af
[ "MIT" ]
1
2021-02-26T19:14:11.000Z
2021-02-26T19:14:11.000Z
test/functional/wallet_import_rescan.py
foxdproject/foxdcoin
9db505f6f32bd3e51bd2b2da533744c98cee23af
[ "MIT" ]
12
2020-05-02T20:01:44.000Z
2022-03-03T11:02:13.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Copyright (c) 2017-2019 The Raven Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test wallet import RPCs. Test rescan behavior of...
46.912371
116
0.659048
import collections import enum import itertools from test_framework.test_framework import FoxdcoinTestFramework from test_framework.util import assert_raises_rpc_error, connect_nodes, sync_blocks, assert_equal, set_node_times Call = enum.Enum("Call", "single multi") Data = enum.Enum("Data", "address pub priv"...
true
true
1c3f8f46878befe5b6837e93e3a1642a73da1eb5
30
py
Python
mplib/__init__.py
0000duck/MPlib
f5111db952a9ff1f712ef04b6c5ac3b8da8f1184
[ "MIT" ]
20
2021-09-15T05:06:25.000Z
2022-03-21T13:37:44.000Z
mplib/__init__.py
0000duck/MPlib
f5111db952a9ff1f712ef04b6c5ac3b8da8f1184
[ "MIT" ]
3
2021-09-27T22:04:41.000Z
2022-03-07T05:15:34.000Z
mplib/__init__.py
haosulab/MPlib
f5111db952a9ff1f712ef04b6c5ac3b8da8f1184
[ "MIT" ]
4
2021-08-02T05:33:37.000Z
2021-12-15T02:23:51.000Z
from .planner import Planner
10
28
0.8
from .planner import Planner
true
true
1c3f8f46ce106fcbd00ff7ff44983e1404f53e64
5,922
py
Python
kit_django/userAccount/models.py
safakoner/kit
aec36a70137febfb5f3e3a9205ea58879736eea4
[ "MIT" ]
6
2020-06-29T20:36:15.000Z
2021-09-08T23:34:01.000Z
kit_django/userAccount/models.py
safakoner/kit
aec36a70137febfb5f3e3a9205ea58879736eea4
[ "MIT" ]
9
2021-03-30T13:46:29.000Z
2022-03-12T00:38:27.000Z
kit_django/userAccount/models.py
safakoner/kit
aec36a70137febfb5f3e3a9205ea58879736eea4
[ "MIT" ]
1
2020-07-20T18:40:24.000Z
2020-07-20T18:40:24.000Z
# # ---------------------------------------------------------------------------------------------------- # DESCRIPTION # ---------------------------------------------------------------------------------------------------- # # --------------------------------------------------------------------------------------------...
37.245283
127
0.465552
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from rest_framework.authtoken.models import Token from core.randomValue import createRandomFileName from userAccount.apps import Use...
true
true
1c3f8fbf9d1244edc2a9631eb825360a52a8b713
920
py
Python
forms-flow-data-analysis-api/tests/unit/utils/test_logging.py
sreehari-aot/forms-flow-ai
11e2fdd6da792aaa9dd46c0cec38564fe5916b58
[ "Apache-2.0" ]
null
null
null
forms-flow-data-analysis-api/tests/unit/utils/test_logging.py
sreehari-aot/forms-flow-ai
11e2fdd6da792aaa9dd46c0cec38564fe5916b58
[ "Apache-2.0" ]
null
null
null
forms-flow-data-analysis-api/tests/unit/utils/test_logging.py
sreehari-aot/forms-flow-ai
11e2fdd6da792aaa9dd46c0cec38564fe5916b58
[ "Apache-2.0" ]
null
null
null
"""Tests to assure the logging utilities. Test-Suite to ensure that the logging setup is working as expected. """ import os from api.utils.logging import log_error, log_info, setup_logging def test_logging_with_file(capsys): """Assert that logging is setup with the configuration file.""" file_path = os.pat...
28.75
88
0.736957
import os from api.utils.logging import log_error, log_info, setup_logging def test_logging_with_file(capsys): file_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), "logging.conf") setup_logging(file_path) captured = capsys.readouterr() assert captured.out.startswith("Configure lo...
true
true
1c3f8fd38b0665f47857eca6f549cdb202bf5080
5,283
py
Python
Lib/ctypes/macholib/dyld.py
pxeger/cpython
959580bd9ff8824590e8b24895bc2276f3f10b35
[ "0BSD" ]
52,316
2015-01-01T15:56:25.000Z
2022-03-31T23:19:01.000Z
Lib/ctypes/macholib/dyld.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
25,286
2015-03-03T23:18:02.000Z
2022-03-31T23:17:27.000Z
Lib/ctypes/macholib/dyld.py
dalakatt/cpython
2f49b97cc5426087b46515254b9a97a22ee8c807
[ "0BSD" ]
31,623
2015-01-01T13:29:37.000Z
2022-03-31T19:55:06.000Z
""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * try: from _ctypes import _dyld_shared_cache_contains_path except ImportError: def _dyld_shared_cache_contains_path(*args): raise NotImplementedError...
30.362069
103
0.671588
import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * try: from _ctypes import _dyld_shared_cache_contains_path except ImportError: def _dyld_shared_cache_contains_path(*args): raise NotImplementedError __all__ = [ 'dyld...
true
true
1c3f90839acedeb4b9a5d478f2e55f5b2a78c281
45,047
py
Python
proofwallet.py
RCasatta/proof-wallet
7dc27a7618ce8a1124975562ed8fa679eadee6b4
[ "MIT" ]
1
2021-01-30T19:42:09.000Z
2021-01-30T19:42:09.000Z
proofwallet.py
RCasatta/proof-wallet
7dc27a7618ce8a1124975562ed8fa679eadee6b4
[ "MIT" ]
null
null
null
proofwallet.py
RCasatta/proof-wallet
7dc27a7618ce8a1124975562ed8fa679eadee6b4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ################################################################################################ # # GlacierScript: Part of the Glacier Protocol (http://glacierprotocol.org) # # GlacierScript is designed specifically for use in the context of executing the broader Glacier # Protocol, a step-by-...
38.305272
170
0.61609
tr = input("\nEnter descriptor key #{}: ".format(idx+1)) key = parse_descriptor_key(key_str) keys.append(key) unique_fingerprints = set(map(lambda key: key[0], keys)) unique_xpubs = set(map(lambda key: key[2], keys)) if len(unique_fingerprints) != n or len(unique_xpubs) != n: prin...
true
true
1c3f91818350f40735892d2d47b1ccb5f5d2f5d9
359
py
Python
tests/import/import02.py
ktok07b6/polyphony
657c5c7440520db6b4985970bd50547407693ac4
[ "MIT" ]
83
2015-11-30T09:59:13.000Z
2021-08-03T09:12:28.000Z
tests/import/import02.py
jesseclin/polyphony
657c5c7440520db6b4985970bd50547407693ac4
[ "MIT" ]
4
2017-02-10T01:43:11.000Z
2020-07-14T03:52:25.000Z
tests/import/import02.py
jesseclin/polyphony
657c5c7440520db6b4985970bd50547407693ac4
[ "MIT" ]
11
2016-11-18T14:39:15.000Z
2021-02-23T10:05:20.000Z
import polyphony from polyphony import io as io_ from polyphony import timing as ti_ from polyphony import typing as ty_ def import02(): return (io_.__name__ == 'polyphony.io' and ti_.__name__ == 'polyphony.timing' and ty_.__name__ == 'polyphony.typing') @polyphony.testbench def test(): ...
18.894737
50
0.682451
import polyphony from polyphony import io as io_ from polyphony import timing as ti_ from polyphony import typing as ty_ def import02(): return (io_.__name__ == 'polyphony.io' and ti_.__name__ == 'polyphony.timing' and ty_.__name__ == 'polyphony.typing') @polyphony.testbench def test(): ...
true
true
1c3f91d806b5845c36c6292a0a25f9d4cbab9821
28,266
py
Python
sdk/python/pulumi_azure/datafactory/factory.py
aangelisc/pulumi-azure
71dd9c75403146e16f7480e5a60b08bc0329660e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/datafactory/factory.py
aangelisc/pulumi-azure
71dd9c75403146e16f7480e5a60b08bc0329660e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/datafactory/factory.py
aangelisc/pulumi-azure
71dd9c75403146e16f7480e5a60b08bc0329660e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
49.851852
276
0.679615
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._inputs import * __all__ = ['FactoryArgs', 'Factory'] @pulumi.input_type class FactoryArgs: def __init__(__self__, *, ...
true
true
1c3f92052a683c5775b5e40afe7aeb1e5fe16842
1,786
py
Python
OSMtools/utils/configmanager.py
Benni5K/orstools-qgis-plugin
d255cccd4be71b63321c68178e7111d27f2660fa
[ "MIT" ]
null
null
null
OSMtools/utils/configmanager.py
Benni5K/orstools-qgis-plugin
d255cccd4be71b63321c68178e7111d27f2660fa
[ "MIT" ]
null
null
null
OSMtools/utils/configmanager.py
Benni5K/orstools-qgis-plugin
d255cccd4be71b63321c68178e7111d27f2660fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ /*************************************************************************** OSMtools A QGIS plugin falk ------------------- begin : 2017-02-01 git sha : $Format:%H$ ...
37.208333
78
0.416573
import os.path import yaml from OSMtools import BASE_DIR, CONFIG def read(): with open(os.path.join(BASE_DIR, CONFIG)) as f: doc = yaml.safe_load(f) return doc def write(key, value): doc = read() doc[key] = value with open(os.path.join(BASE_DIR, CONFIG), 'w') as f: ...
true
true
1c3f920f5859c8fbcfe7d3f2e78549e10c915289
11,465
py
Python
qrl/services/PublicAPIService.py
michael-go/QRL
591dfa60acca68e3ef6b4a09e393907939ae92b0
[ "MIT" ]
null
null
null
qrl/services/PublicAPIService.py
michael-go/QRL
591dfa60acca68e3ef6b4a09e393907939ae92b0
[ "MIT" ]
null
null
null
qrl/services/PublicAPIService.py
michael-go/QRL
591dfa60acca68e3ef6b4a09e393907939ae92b0
[ "MIT" ]
null
null
null
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from grpc import StatusCode from qrl.core import logger from qrl.core.StakeValidator import StakeValidator from qrl.core.Transaction import Transaction from qrl.core.q...
48.172269
122
0.665329
from grpc import StatusCode from qrl.core import logger from qrl.core.StakeValidator import StakeValidator from qrl.core.Transaction import Transaction from qrl.core.qrlnode import QRLNode from qrl.generated import qrl_pb2 from qrl.generated.qrl_pb2_grpc import PublicAPIServicer from qrl.services.grpcHelper import ...
true
true
1c3f92cfca5a1aef1e8f513f32a79c2defedb9f5
570
py
Python
load_cifarlt.py
caisarl76/classifier-balancing
b381279dc29539afb92fe40f7ca917e352aff9c6
[ "BSD-3-Clause" ]
null
null
null
load_cifarlt.py
caisarl76/classifier-balancing
b381279dc29539afb92fe40f7ca917e352aff9c6
[ "BSD-3-Clause" ]
null
null
null
load_cifarlt.py
caisarl76/classifier-balancing
b381279dc29539afb92fe40f7ca917e352aff9c6
[ "BSD-3-Clause" ]
null
null
null
from data.dataloader import * from utils import source_import, get_value splits = ['train', 'test', 'val'] data_root ='/home/vision/jihun/fb_decouple/dataset/cifar-100', from data import dataloader from data.CIFAR100_LT.imbalance_cifar import IMBALANCECIFAR100 data = {x: dataloader.load_data(data_root=data_root, ...
38
67
0.575439
from data.dataloader import * from utils import source_import, get_value splits = ['train', 'test', 'val'] data_root ='/home/vision/jihun/fb_decouple/dataset/cifar-100', from data import dataloader from data.CIFAR100_LT.imbalance_cifar import IMBALANCECIFAR100 data = {x: dataloader.load_data(data_root=data_root, ...
true
true
1c3f932c52cedfb81cad9a204332c60ff26b80d7
754
py
Python
scripts/sqlite3_sqlalchemy_core.py
scianand/Programming-With-Databases
4b4363be91f066f2852d78ae2a9240731c46f3b9
[ "Apache-2.0" ]
null
null
null
scripts/sqlite3_sqlalchemy_core.py
scianand/Programming-With-Databases
4b4363be91f066f2852d78ae2a9240731c46f3b9
[ "Apache-2.0" ]
null
null
null
scripts/sqlite3_sqlalchemy_core.py
scianand/Programming-With-Databases
4b4363be91f066f2852d78ae2a9240731c46f3b9
[ "Apache-2.0" ]
null
null
null
""" SQLite3 database connection using SQL Alchemy Core """ import sqlalchemy as db # connect to the database engine = db.create_engine('sqlite:///movies1.db') connection = engine.connect() # access the metadata of the database metadata = db.MetaData() movies = db.Table('Movies', metadata, autoload=True, autoload_wit...
25.133333
87
0.754642
import sqlalchemy as db engine = db.create_engine('sqlite:///movies1.db') connection = engine.connect() metadata = db.MetaData() movies = db.Table('Movies', metadata, autoload=True, autoload_with=engine) query = movies.insert().values(Title='Lust Stories', Director='Karan Johar', Year=2018) connection.execute(qu...
true
true
1c3f93b1daae20653f905fd1cfa594de85ec6a73
1,786
py
Python
contenido/tests/test_HU036_models.py
slinan/border
682bed850b3ed48d4f9e817dc9c2938388dd2181
[ "MIT" ]
null
null
null
contenido/tests/test_HU036_models.py
slinan/border
682bed850b3ed48d4f9e817dc9c2938388dd2181
[ "MIT" ]
null
null
null
contenido/tests/test_HU036_models.py
slinan/border
682bed850b3ed48d4f9e817dc9c2938388dd2181
[ "MIT" ]
null
null
null
from django.test import TestCase from contenido.models import Audio, Ratings, Artista from django.contrib.auth.models import User MODELS = [Ratings, Audio, Artista, User] class CalificacionTest(TestCase): def setUp(self): # Se elimina el contenido de las tablas del modelo for model in MODELS: ...
47
131
0.631579
from django.test import TestCase from contenido.models import Audio, Ratings, Artista from django.contrib.auth.models import User MODELS = [Ratings, Audio, Artista, User] class CalificacionTest(TestCase): def setUp(self): for model in MODELS: if len(model.objects.all()): ...
true
true
1c3f9460874cf861368978c0c3c74262daced354
234
py
Python
Kivy/cap01-layouts.py
fotavio16/PycharmProjects
f5be49db941de69159ec543e8a6dde61f9f94d86
[ "MIT" ]
null
null
null
Kivy/cap01-layouts.py
fotavio16/PycharmProjects
f5be49db941de69159ec543e8a6dde61f9f94d86
[ "MIT" ]
null
null
null
Kivy/cap01-layouts.py
fotavio16/PycharmProjects
f5be49db941de69159ec543e8a6dde61f9f94d86
[ "MIT" ]
null
null
null
from kivy.app import App from kivy.uix.gridlayout import GridLayout class MyGridLayout(GridLayout): pass class LayoutsApp(App): def build(self): return MyGridLayout() if __name__=="__main__": LayoutsApp().run()
18
42
0.713675
from kivy.app import App from kivy.uix.gridlayout import GridLayout class MyGridLayout(GridLayout): pass class LayoutsApp(App): def build(self): return MyGridLayout() if __name__=="__main__": LayoutsApp().run()
true
true
1c3f94a07566d83bff0daa7b693c9b2ca1ca88a3
1,506
py
Python
scoutingserver/users/tests/test_views.py
MichianaYouthRobotics/2019ScoutingServer
29a58e566851da97d78c49ef9a581ec3c540c14a
[ "MIT" ]
null
null
null
scoutingserver/users/tests/test_views.py
MichianaYouthRobotics/2019ScoutingServer
29a58e566851da97d78c49ef9a581ec3c540c14a
[ "MIT" ]
null
null
null
scoutingserver/users/tests/test_views.py
MichianaYouthRobotics/2019ScoutingServer
29a58e566851da97d78c49ef9a581ec3c540c14a
[ "MIT" ]
null
null
null
import pytest from django.conf import settings from django.test import RequestFactory from scoutingserver.users.views import UserRedirectView, UserUpdateView pytestmark = pytest.mark.django_db class TestUserUpdateView: """ TODO: extracting view initialization code as class-scoped fixture wou...
27.888889
77
0.675963
import pytest from django.conf import settings from django.test import RequestFactory from scoutingserver.users.views import UserRedirectView, UserUpdateView pytestmark = pytest.mark.django_db class TestUserUpdateView: def test_get_success_url( self, user: settings.AUTH_USER_MODEL, request_factory: Req...
true
true
1c3f94b3dd671d7cda82e3c5019659a1f8b39409
1,544
py
Python
tiger/urls.py
JingLinkai/tiger
ac54d0df2cc5d4f2a90cc59720762b28a1e9e2fa
[ "MIT" ]
null
null
null
tiger/urls.py
JingLinkai/tiger
ac54d0df2cc5d4f2a90cc59720762b28a1e9e2fa
[ "MIT" ]
1
2020-06-06T00:46:19.000Z
2020-06-06T00:46:19.000Z
tiger/urls.py
linkay3601/social-tiger
ac54d0df2cc5d4f2a90cc59720762b28a1e9e2fa
[ "MIT" ]
null
null
null
"""tiger URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
38.6
79
0.707902
from django.conf.urls import url from user import api as user_api from social import api as social_api from vip import api as vip_api urlpatterns = [ url(r'^api/user/vcode$', user_api.get_verify_code), url(r'^api/user/login$', user_api.login), url(r'^api/user/profile/show$', user_api.show_profile), u...
true
true
1c3f94bbab2f7cb9a67414113db5135aefc0a1fb
45
py
Python
src/deutschland/handelsregister/__init__.py
andreasbossard/deutschland
6f561256c707e21f81b54b139b9acb745b901298
[ "Apache-2.0" ]
445
2021-07-26T22:00:26.000Z
2022-03-31T08:31:08.000Z
src/deutschland/handelsregister/__init__.py
andreasbossard/deutschland
6f561256c707e21f81b54b139b9acb745b901298
[ "Apache-2.0" ]
30
2021-07-27T15:42:23.000Z
2022-03-26T16:14:11.000Z
src/deutschland/handelsregister/__init__.py
andreasbossard/deutschland
6f561256c707e21f81b54b139b9acb745b901298
[ "Apache-2.0" ]
28
2021-07-27T10:48:43.000Z
2022-03-26T14:31:30.000Z
from .handelsregister import Handelsregister
22.5
44
0.888889
from .handelsregister import Handelsregister
true
true
1c3f94db5fa48ef5bb72826fe800d6a9515e1d59
3,288
py
Python
f5/bigip/tm/cm/test/functional/test_trust.py
nghia-tran/f5-common-python
acb23a6e5830a119b460c19a578654113419f5c3
[ "Apache-2.0" ]
272
2016-02-23T06:05:44.000Z
2022-02-20T02:09:32.000Z
f5/bigip/tm/cm/test/functional/test_trust.py
nghia-tran/f5-common-python
acb23a6e5830a119b460c19a578654113419f5c3
[ "Apache-2.0" ]
1,103
2016-02-11T17:48:03.000Z
2022-02-15T17:13:37.000Z
f5/bigip/tm/cm/test/functional/test_trust.py
nghia-tran/f5-common-python
acb23a6e5830a119b460c19a578654113419f5c3
[ "Apache-2.0" ]
167
2016-02-11T17:48:21.000Z
2022-01-17T20:13:05.000Z
# Copyright 2016 F5 Networks 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 or agreed to in writi...
36.533333
75
0.630474
from f5.sdk_exception import InvalidCommand import pytest def set_trust(request, mgmt_root, name, device, dev_name, usr, passwd): dvcs = mgmt_root.tm.cm trust = dvcs.add_to_trust.exec_cmd('run', name=name, device=device, deviceName=dev_name, username=usr, ...
true
true
1c3f95a51251d4cf6c48c3abb5bd40665ab2c61e
4,984
py
Python
bcbio/pipeline/fastq.py
arvados/bcbio-nextgen
2a5cfa8c3a1d540bb2f2e66f51835042195cbc87
[ "MIT" ]
null
null
null
bcbio/pipeline/fastq.py
arvados/bcbio-nextgen
2a5cfa8c3a1d540bb2f2e66f51835042195cbc87
[ "MIT" ]
null
null
null
bcbio/pipeline/fastq.py
arvados/bcbio-nextgen
2a5cfa8c3a1d540bb2f2e66f51835042195cbc87
[ "MIT" ]
null
null
null
"""Pipeline utilities to retrieve FASTQ formatted files for processing. """ import os import sys from bcbio import bam, broad, utils from bcbio.bam import fastq from bcbio.bam import cram from bcbio.pipeline import alignment from bcbio.utils import file_exists, safe_makedir, splitext_plus from bcbio.provenance import ...
41.190083
88
0.642055
import os import sys from bcbio import bam, broad, utils from bcbio.bam import fastq from bcbio.bam import cram from bcbio.pipeline import alignment from bcbio.utils import file_exists, safe_makedir, splitext_plus from bcbio.provenance import do from bcbio.distributed.transaction import file_transaction def get_fast...
true
true
1c3f95a83bc3368b846edc6e57fe656d9a2c100c
5,821
py
Python
rocket_soc/lib/templates/lut-gamma-application/filter-image.py
PACO-CPU/rocket-soc
34e10472a51830669bae3635dae6d52b8b41426d
[ "BSD-2-Clause" ]
2
2017-08-11T13:15:02.000Z
2019-01-15T10:10:58.000Z
rocket_soc/lib/templates/lut-gamma-application/filter-image.py
PACO-CPU/rocket-soc
34e10472a51830669bae3635dae6d52b8b41426d
[ "BSD-2-Clause" ]
null
null
null
rocket_soc/lib/templates/lut-gamma-application/filter-image.py
PACO-CPU/rocket-soc
34e10472a51830669bae3635dae6d52b8b41426d
[ "BSD-2-Clause" ]
3
2019-01-15T10:11:00.000Z
2020-10-14T18:18:01.000Z
#!/usr/bin/env python3 import sys import time import struct import os.path import serial import threading import re import subprocess from paco import util from PIL import Image port="/dev/ttyUSB0" baud=115200 fRunRocket=False fRunPython=False filenames=[] def print_help(f): f.write( "filter-image.py [options]...
23.37751
83
0.606769
import sys import time import struct import os.path import serial import threading import re import subprocess from paco import util from PIL import Image port="/dev/ttyUSB0" baud=115200 fRunRocket=False fRunPython=False filenames=[] def print_help(f): f.write( "filter-image.py [options] file1 [file2 ...]\n" ...
true
true
1c3f95b5f09f03b747ec1fdd2b7a742a398b2bbc
429
py
Python
Giraffe/If statement.py
MaggieIllustrations/softuni-github-programming
f5695cb14602f3d2974359f6d8734332acc650d3
[ "MIT" ]
null
null
null
Giraffe/If statement.py
MaggieIllustrations/softuni-github-programming
f5695cb14602f3d2974359f6d8734332acc650d3
[ "MIT" ]
null
null
null
Giraffe/If statement.py
MaggieIllustrations/softuni-github-programming
f5695cb14602f3d2974359f6d8734332acc650d3
[ "MIT" ]
1
2022-01-14T17:12:44.000Z
2022-01-14T17:12:44.000Z
is_male = True is_tall = True if is_male or is_tall: print("You are a male or tall or both") else: print("You are neither male no tall") is_male = False is_tall = False if is_male and is_tall: print("You are a tall male") elif is_male and not(is_tall): print("You are a short male") elif is_male and...
20.428571
44
0.685315
is_male = True is_tall = True if is_male or is_tall: print("You are a male or tall or both") else: print("You are neither male no tall") is_male = False is_tall = False if is_male and is_tall: print("You are a tall male") elif is_male and not(is_tall): print("You are a short male") elif is_male and...
true
true
1c3f95e1775b02a01e699032453673f89db1bf1a
31,415
py
Python
geopandas/tests/test_plotting.py
schilli/geopandas
29add0a735b00dc20c79e0fccc8e6a775c4997b0
[ "BSD-3-Clause" ]
1
2022-01-12T09:00:54.000Z
2022-01-12T09:00:54.000Z
geopandas/tests/test_plotting.py
samuelduchesne/geopandas
29add0a735b00dc20c79e0fccc8e6a775c4997b0
[ "BSD-3-Clause" ]
null
null
null
geopandas/tests/test_plotting.py
samuelduchesne/geopandas
29add0a735b00dc20c79e0fccc8e6a775c4997b0
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import, division import itertools import warnings import numpy as np from shapely.affinity import rotate from shapely.geometry import MultiPolygon, Polygon, LineString, Point, MultiPoint from geopandas import GeoSeries, GeoDataFrame, read_file from geopandas.datasets import get_path ...
39.367168
88
0.607831
from __future__ import absolute_import, division import itertools import warnings import numpy as np from shapely.affinity import rotate from shapely.geometry import MultiPolygon, Polygon, LineString, Point, MultiPoint from geopandas import GeoSeries, GeoDataFrame, read_file from geopandas.datasets import get_path ...
true
true
1c3f95fa312334189873cf27fbc1e290bd179dc9
22,964
py
Python
neurips2019/hgnn_composer.py
SunHaozhe/modular-metalearning
c94dd18c6d105f18667d4de7bb4c81fa538a541c
[ "MIT" ]
70
2018-10-30T01:05:43.000Z
2022-02-11T04:08:19.000Z
neurips2019/hgnn_composer.py
SunHaozhe/modular-metalearning
c94dd18c6d105f18667d4de7bb4c81fa538a541c
[ "MIT" ]
7
2019-03-25T17:14:22.000Z
2021-06-11T11:57:22.000Z
neurips2019/hgnn_composer.py
SunHaozhe/modular-metalearning
c94dd18c6d105f18667d4de7bb4c81fa538a541c
[ "MIT" ]
12
2019-01-27T01:14:16.000Z
2021-10-05T17:47:19.000Z
from __future__ import print_function import copy import numpy as np import torch from torch import nn from composition import Composer from structure import Structure from tqdm import tqdm as Tqdm import json # import matplotlib.pyplot as plt import os import networkx as nx # from torchviz import make_dot from scipy.s...
43.492424
112
0.661514
from __future__ import print_function import copy import numpy as np import torch from torch import nn from composition import Composer from structure import Structure from tqdm import tqdm as Tqdm import json import os import networkx as nx from scipy.stats import entropy torch.set_default_tensor_type('torch.cuda.Fl...
true
true
1c3f9641e3c27b495230081a66c93766d00145b8
15,089
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/results_bd0cbe4a54d59462bce70486b688621e.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/results_0e8c0f2566f300a755bc9b2735193666.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/results_9d6b50c703ce2587fc1f039c09570043.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
42.624294
729
0.629068
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class Results(Base): __slots__ = () _SDM_NAME = 'results' _SDM_ATT_MAP = { 'CurrentActions': 'currentActions', 'CurrentViews': 'currentViews', '...
true
true
1c3f96648192ebf6e892f6aace58fee113c272a2
3,900
py
Python
ankidict/addon/collection.py
wojtex/millandict
6601873a1541ef7aaf938ac1a6b7aecb5f82cbf8
[ "MIT" ]
1
2015-10-15T19:04:05.000Z
2015-10-15T19:04:05.000Z
ankidict/addon/collection.py
wojtex/ankidict
6601873a1541ef7aaf938ac1a6b7aecb5f82cbf8
[ "MIT" ]
9
2015-03-24T08:06:51.000Z
2015-05-21T13:44:10.000Z
ankidict/addon/collection.py
wojtex/ankidict
6601873a1541ef7aaf938ac1a6b7aecb5f82cbf8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #### # Copyright (c) 2014 Wojciech Kordalski # Copyright (c) 2014 Franciszek Piszcz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including w...
30.952381
105
0.686667
aqt import mw import re def get_plugin(): return mw.ankidict def setup(): select_deck() def select_deck(): self = get_plugin() deckname = self.config.deck deckid = mw.col.decks.id(deckname) select_model() m = mw.col.models.current() m['did'] = deckid mw.col.mod...
true
true
1c3f979de1e38890393e0ca641ceec5d0d350d12
717
py
Python
openstack_dashboard/dashboards/project/appdetail/tests.py
soma-micro-service/Horizon
45243061b8a99935e0e483a314d95a82d33cc4cf
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/appdetail/tests.py
soma-micro-service/Horizon
45243061b8a99935e0e483a314d95a82d33cc4cf
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/appdetail/tests.py
soma-micro-service/Horizon
45243061b8a99935e0e483a314d95a82d33cc4cf
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
35.85
75
0.743375
from horizon.test import helpers as test class AppdetailTests(test.TestCase): def test_me(self): self.assertTrue(1 + 1 == 2)
true
true
1c3f97ce62b9cf4a3d0b30e9a3ea4994c6c6751e
939
py
Python
play/shutdownSystem.py
Svolcano/python_exercise
a50e05891cc7f1fbb40ebcae324b09b6a14473d2
[ "MIT" ]
6
2015-07-09T08:47:08.000Z
2020-05-16T10:47:31.000Z
play/shutdownSystem.py
Svolcano/python_exercise
a50e05891cc7f1fbb40ebcae324b09b6a14473d2
[ "MIT" ]
7
2019-03-27T04:13:12.000Z
2022-03-02T14:54:56.000Z
play/shutdownSystem.py
Svolcano/python_exercise
a50e05891cc7f1fbb40ebcae324b09b6a14473d2
[ "MIT" ]
2
2019-06-21T06:46:28.000Z
2019-12-23T09:31:09.000Z
#coding=utf-8 import time from os import system def shutdownSystem(): runing = True while runing: input_cmd = input('shutdown(s)reboot(r)?quit(q)') input_cmd = input_cmd.lower() if input_cmd == 'q' or input_cmd == 'quit': runing = False print ('byebye') ...
28.454545
71
0.526092
import time from os import system def shutdownSystem(): runing = True while runing: input_cmd = input('shutdown(s)reboot(r)?quit(q)') input_cmd = input_cmd.lower() if input_cmd == 'q' or input_cmd == 'quit': runing = False print ('byebye') break ...
true
true
1c3f9850d2bddf85fd1ad2831f488a02393e90ab
1,513
py
Python
genie/mafSP.py
kdaily/Genie
e2ff86938a9cdc9fc0415d4447d68762333b0cea
[ "MIT" ]
null
null
null
genie/mafSP.py
kdaily/Genie
e2ff86938a9cdc9fc0415d4447d68762333b0cea
[ "MIT" ]
1
2020-02-12T19:09:03.000Z
2020-09-18T22:23:34.000Z
genie/mafSP.py
kdaily/Genie
e2ff86938a9cdc9fc0415d4447d68762333b0cea
[ "MIT" ]
1
2019-08-30T23:16:26.000Z
2019-08-30T23:16:26.000Z
from __future__ import absolute_import from genie import maf, process_functions import os import logging import pandas as pd logger = logging.getLogger(__name__) class mafSP(maf): ''' MAF SP file format validation / processing ''' _fileType = "mafSP" def _validateFilename(self, filePath): ...
30.877551
73
0.623265
from __future__ import absolute_import from genie import maf, process_functions import os import logging import pandas as pd logger = logging.getLogger(__name__) class mafSP(maf): _fileType = "mafSP" def _validateFilename(self, filePath): assert os.path.basename(filePath[0]) == \ "nonGEN...
true
true
1c3f98c14fba98bd6f8af7e9419d91e0bdc2240d
4,475
py
Python
scripts/get_github_project_issues.py
mercycorps/toladata
4d5f9b45905a81af9981b586690e020d5b3bfc60
[ "Apache-2.0" ]
null
null
null
scripts/get_github_project_issues.py
mercycorps/toladata
4d5f9b45905a81af9981b586690e020d5b3bfc60
[ "Apache-2.0" ]
268
2020-03-31T15:46:59.000Z
2022-03-31T18:01:08.000Z
scripts/get_github_project_issues.py
mercycorps/toladata
4d5f9b45905a81af9981b586690e020d5b3bfc60
[ "Apache-2.0" ]
1
2021-01-05T01:58:24.000Z
2021-01-05T01:58:24.000Z
""" This script uses GitHub APIs to fetch a list of issues associated with a project. It outputs issue numbers and titles for all cards in all columns of the project. The output is particularly useful for putting into the GitHub release notes. You can store your github token in the settings.secret.yml file, if you wis...
37.605042
129
0.682682
import requests from requests.auth import HTTPBasicAuth import json import os import yaml import sys import re import getpass import argparse headers = {'Accept': 'application/vnd.github.inertia-preview+json'} parser = argparse.ArgumentParser(description='Parse a .po file') parser.add_argument('--column', help='the...
true
true
1c3f9a7759248b86862afe650b24be7a650c7e82
24,653
py
Python
tests/cli/commands/test_task_command.py
utkarsharma2/airflow
52569ef1cf90554d1a8d119ecc9f8fd767653c2b
[ "Apache-2.0" ]
null
null
null
tests/cli/commands/test_task_command.py
utkarsharma2/airflow
52569ef1cf90554d1a8d119ecc9f8fd767653c2b
[ "Apache-2.0" ]
null
null
null
tests/cli/commands/test_task_command.py
utkarsharma2/airflow
52569ef1cf90554d1a8d119ecc9f8fd767653c2b
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
36.850523
109
0.593031
import io import json import logging import os import re import unittest from argparse import ArgumentParser from contextlib import redirect_stdout from datetime import datetime from unittest import mock import pytest from parameterized import parameterized from airflow import DAG from airflow.cli i...
true
true
1c3f9ba1ef528c098a499f8749bd5a92e3a1417d
182,454
py
Python
yt_dlp/YoutubeDL.py
ibook86/yt-dlp
9a5b0125752179f6447ca29deb89ee452fd78b85
[ "Unlicense" ]
null
null
null
yt_dlp/YoutubeDL.py
ibook86/yt-dlp
9a5b0125752179f6447ca29deb89ee452fd78b85
[ "Unlicense" ]
null
null
null
yt_dlp/YoutubeDL.py
ibook86/yt-dlp
9a5b0125752179f6447ca29deb89ee452fd78b85
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 from __future__ import absolute_import, unicode_literals import collections import contextlib import datetime import errno import fileinput import functools import io import itertools import json import locale import operator import os import platform import re import shutil imp...
46.939542
140
0.571059
from __future__ import absolute_import, unicode_literals import collections import contextlib import datetime import errno import fileinput import functools import io import itertools import json import locale import operator import os import platform import re import shutil import subprocess import sys import temp...
true
true
1c3f9ceeccd755232226fb4d68b02dcf4d5fb914
2,764
py
Python
lib/rucio/api/dirac.py
faluchet/rucio
b8f3ebdc0748aeed022d8b789e7ef6e0f36e6dae
[ "Apache-2.0" ]
null
null
null
lib/rucio/api/dirac.py
faluchet/rucio
b8f3ebdc0748aeed022d8b789e7ef6e0f36e6dae
[ "Apache-2.0" ]
null
null
null
lib/rucio/api/dirac.py
faluchet/rucio
b8f3ebdc0748aeed022d8b789e7ef6e0f36e6dae
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright European Organization for Nuclear Research (CERN) since 2012 # # 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-...
41.253731
139
0.688495
from __future__ import print_function from rucio.api.permission import has_permission from rucio.api.scope import list_scopes from rucio.core.rse import get_rse_id from rucio.core import dirac from rucio.common.exception import AccessDenied from rucio.common.utils import extract_scope def add_files(l...
true
true
1c3f9e4ebd21ad0606f2ffec97ee9773ddb7352f
6,398
py
Python
sphinxcontrib/confluencebuilder/exceptions.py
tsvi/confluencebuilder
8a7577d5ca3afa095276dbe1e6f35821beae3f23
[ "BSD-2-Clause" ]
null
null
null
sphinxcontrib/confluencebuilder/exceptions.py
tsvi/confluencebuilder
8a7577d5ca3afa095276dbe1e6f35821beae3f23
[ "BSD-2-Clause" ]
null
null
null
sphinxcontrib/confluencebuilder/exceptions.py
tsvi/confluencebuilder
8a7577d5ca3afa095276dbe1e6f35821beae3f23
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ :copyright: Copyright 2017-2020 Sphinx Confluence Builder Contributors (AUTHORS) :license: BSD-2-Clause (LICENSE) """ from sphinx.errors import ConfigError from sphinx.errors import SphinxError class ConfluenceError(SphinxError): category = 'sphinxcontrib.confluencebuilder error' clas...
37.857988
80
0.523914
from sphinx.errors import ConfigError from sphinx.errors import SphinxError class ConfluenceError(SphinxError): category = 'sphinxcontrib.confluencebuilder error' class ConfluenceAuthenticationFailedUrlError(ConfluenceError): def __init__(self): SphinxError.__init__(self, """---\n""" ...
true
true
1c3f9e5aea4eb42fa74686213dd3f580aeda7d65
10,183
py
Python
2018-2019/project/utils/preprocessing.py
Tudor67/Neural-Networks-Assignments
7376e9d3b0059df2f2b21d56787c47d3c1ba6746
[ "MIT" ]
1
2019-04-07T03:50:57.000Z
2019-04-07T03:50:57.000Z
2018-2019/project/utils/preprocessing.py
Tudor67/Neural-Networks-Assignments
7376e9d3b0059df2f2b21d56787c47d3c1ba6746
[ "MIT" ]
5
2018-10-16T22:46:33.000Z
2019-02-04T20:11:41.000Z
2018-2019/project/utils/preprocessing.py
Tudor67/Neural-Networks-Assignments
7376e9d3b0059df2f2b21d56787c47d3c1ba6746
[ "MIT" ]
1
2019-04-07T03:50:42.000Z
2019-04-07T03:50:42.000Z
import numpy as np import os import skimage import sys def resize_images(images, new_h, new_w, ch): resized_images = np.zeros([len(images), new_h, new_w, ch]) for idx, img in enumerate(images): resized_images[idx] = skimage.transform.resize(img, [n...
41.060484
97
0.582343
import numpy as np import os import skimage import sys def resize_images(images, new_h, new_w, ch): resized_images = np.zeros([len(images), new_h, new_w, ch]) for idx, img in enumerate(images): resized_images[idx] = skimage.transform.resize(img, [n...
true
true
1c3f9ecbc4cd49d29d84f283efcb137d3085b13f
25,468
py
Python
qa/rpc-tests/fundrawtransaction-hd.py
zevno/zevno-core
f546a48aaaf55c268633fcd8d04fc7c41c7b2bc8
[ "MIT" ]
1
2020-12-10T00:17:10.000Z
2020-12-10T00:17:10.000Z
qa/rpc-tests/fundrawtransaction-hd.py
zevno/zevno-core
f546a48aaaf55c268633fcd8d04fc7c41c7b2bc8
[ "MIT" ]
null
null
null
qa/rpc-tests/fundrawtransaction-hd.py
zevno/zevno-core
f546a48aaaf55c268633fcd8d04fc7c41c7b2bc8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * # Creat...
40.683706
214
0.558701
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class RawTransactionsTest(BitcoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 4 def setup_network(self, split=False): ...
true
true
1c3f9fa719865326ced95a5c8076ae6f9ef8fd6c
296
py
Python
cartelisands/models.py
austing/cartels
bfb5c3c333cfcbf62c2d8a5850794a3235d2ff87
[ "MIT" ]
null
null
null
cartelisands/models.py
austing/cartels
bfb5c3c333cfcbf62c2d8a5850794a3235d2ff87
[ "MIT" ]
null
null
null
cartelisands/models.py
austing/cartels
bfb5c3c333cfcbf62c2d8a5850794a3235d2ff87
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from django.contrib.gis.db.models import PointField class Cartelisand(models.Model): user = models.OneToOneField(User) most_recent_place = PointField(blank=True, null=True)
29.6
57
0.807432
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from django.contrib.gis.db.models import PointField class Cartelisand(models.Model): user = models.OneToOneField(User) most_recent_place = PointField(blank=True, null=True)
true
true
1c3fa04b967474e8b10e6fa7984f418a7281fc93
1,403
py
Python
OrderSystem/utilities/Permissions.py
mattjt/OrderSystem
cbb433c1edb31527e77194d004cf408bd22a28ad
[ "MIT" ]
1
2018-03-31T12:36:02.000Z
2018-03-31T12:36:02.000Z
OrderSystem/utilities/Permissions.py
mattjt/OrderSystem
cbb433c1edb31527e77194d004cf408bd22a28ad
[ "MIT" ]
null
null
null
OrderSystem/utilities/Permissions.py
mattjt/OrderSystem
cbb433c1edb31527e77194d004cf408bd22a28ad
[ "MIT" ]
null
null
null
from functools import wraps from flask import abort, redirect, url_for, request from flask_login import current_user def get_path(): return str(request.path).strip('/') def admin_access_required(func): @wraps(func) def wrapper(*args, **kwargs): if current_user.is_authenticated: if c...
27.509804
83
0.607983
from functools import wraps from flask import abort, redirect, url_for, request from flask_login import current_user def get_path(): return str(request.path).strip('/') def admin_access_required(func): @wraps(func) def wrapper(*args, **kwargs): if current_user.is_authenticated: if c...
true
true
1c3fa1697442963e61d94c3212fdaec06e8e6352
2,485
py
Python
doctor/views.py
naitik2314/E-Health-Care
246774d4abdc01d829effd58b6bebae947c9c9c5
[ "MIT" ]
null
null
null
doctor/views.py
naitik2314/E-Health-Care
246774d4abdc01d829effd58b6bebae947c9c9c5
[ "MIT" ]
null
null
null
doctor/views.py
naitik2314/E-Health-Care
246774d4abdc01d829effd58b6bebae947c9c9c5
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login, logout from doctor.models import DoctorInfo from django.contrib import messages from doctor.forms import UserForm from django.db.models import Q from django.contrib.auth.decorators import user_passes_test, login_required...
35
180
0.696982
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login, logout from doctor.models import DoctorInfo from django.contrib import messages from doctor.forms import UserForm from django.db.models import Q from django.contrib.auth.decorators import user_passes_test, login_required...
true
true
1c3fa18e3a8be1afda0a727f003a3a985ab2d1d7
4,576
py
Python
sdks/python/http_client/v1/polyaxon_sdk/models/v1_image_type.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_image_type.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
sdks/python/http_client/v1/polyaxon_sdk/models/v1_image_type.py
gregmbi/polyaxon
8f24089fa9cb5df28fc7b70aec27d6d23ee81e8d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
28.246914
85
0.590691
import pprint import re import six from polyaxon_sdk.configuration import Configuration class V1ImageType(object): openapi_types = {"name": "str", "connection": "str"} attribute_map = {"name": "name", "connection": "connection"} def __init__( self, name=None, connection=...
true
true
1c3fa29f70d5302adfe320370e33ec19887b2f25
72
py
Python
Testing Files/scheduler test.py
Butterparade/School-stuff
0b92ca29c7c582727226bc18ac590a68d998f822
[ "Apache-2.0" ]
null
null
null
Testing Files/scheduler test.py
Butterparade/School-stuff
0b92ca29c7c582727226bc18ac590a68d998f822
[ "Apache-2.0" ]
null
null
null
Testing Files/scheduler test.py
Butterparade/School-stuff
0b92ca29c7c582727226bc18ac590a68d998f822
[ "Apache-2.0" ]
null
null
null
emp1 = [8, 24] emp2 = [8, 12] totalhours = [0, 24] filledhours = [0, 0]
14.4
20
0.555556
emp1 = [8, 24] emp2 = [8, 12] totalhours = [0, 24] filledhours = [0, 0]
true
true
1c3fa346c1495522249b91e4269ebedcf4b36dfd
771
py
Python
colordict/gradients.py
aleferna12/colordict
ee66c3695c755a1a8469f740980c53df0d74471d
[ "MIT" ]
1
2020-05-30T22:01:55.000Z
2020-05-30T22:01:55.000Z
colordict/gradients.py
aleferna12/colordict
ee66c3695c755a1a8469f740980c53df0d74471d
[ "MIT" ]
1
2021-04-19T19:16:56.000Z
2021-04-29T12:36:06.000Z
colordict/gradients.py
aleferna12/colordict
ee66c3695c755a1a8469f740980c53df0d74471d
[ "MIT" ]
null
null
null
"""Module containing classes to create gradients between colors. For now only the linear gradient is available. """ class LinearGrad(object): def __init__(self, color_values): color_values = tuple(color_values) super().__init__() self.colors = color_values def __call__(self, p): i = int(p * (len(self.colo...
24.09375
69
0.647211
class LinearGrad(object): def __init__(self, color_values): color_values = tuple(color_values) super().__init__() self.colors = color_values def __call__(self, p): i = int(p * (len(self.colors) - 1)) return self._lin_interp( self.colors[i], self.colors[min([i + 1, len(self.colors) - 1])], p * (l...
true
true
1c3fa3fc380272b6633e8325e6b5de0740f11444
4,539
py
Python
.history/src/Simulador_20200707141954.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
.history/src/Simulador_20200707141954.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
.history/src/Simulador_20200707141954.py
eduardodut/Trabalho_final_estatistica_cd
fbedbbea6bdd7a79e1d62030cde0fab4e93fc338
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo import random class Simulador(): def __init__( self, tamanho_matriz, #numero de linhas e colunas da matriz esférica densidade_populacional_inicial): #percentu...
40.526786
125
0.638907
import pandas as pd import numpy as np from Matriz_esferica import Matriz_esferica from Individuo import Individuo import random class Simulador(): def __init__( self, tamanho_matriz, densidade_populacional_inicial): self.num_iteracoes = 0 ...
true
true
1c3fa4b7f383bfaa1a5f9c469da3e85bd03e3a35
907
py
Python
tests/test_apps.py
alairock/integromat
4fd50531e4934d24a726e91d4885658026ff96a5
[ "Apache-2.0" ]
null
null
null
tests/test_apps.py
alairock/integromat
4fd50531e4934d24a726e91d4885658026ff96a5
[ "Apache-2.0" ]
null
null
null
tests/test_apps.py
alairock/integromat
4fd50531e4934d24a726e91d4885658026ff96a5
[ "Apache-2.0" ]
null
null
null
import pytest from integromat_wrapper.integromat import Apps, AioApps def test_get_apps(api_key): # test connection to integromat api imt_apps = Apps(api_key) # create a new app created_app = imt_apps.create_app('test-app-1-hw', 'Test App 1') newapp_name = created_app.get('name') newapp_versi...
25.914286
68
0.712238
import pytest from integromat_wrapper.integromat import Apps, AioApps def test_get_apps(api_key): imt_apps = Apps(api_key) created_app = imt_apps.create_app('test-app-1-hw', 'Test App 1') newapp_name = created_app.get('name') newapp_version = created_app.get('version') assert newapp_ver...
true
true
1c3fa4fb0b6c6e1f32cb36842725ad128397a212
9,624
py
Python
libs/metrics/social_distancing.py
dok529/smart-social-distancing
fd054c92cf478cefd5326c7beaa288b24dd5110f
[ "Apache-2.0" ]
null
null
null
libs/metrics/social_distancing.py
dok529/smart-social-distancing
fd054c92cf478cefd5326c7beaa288b24dd5110f
[ "Apache-2.0" ]
1
2021-08-25T16:13:56.000Z
2021-08-25T16:15:19.000Z
libs/metrics/social_distancing.py
myunyui22/smart-social-distancing-dev
2b71c4330420758a3ff6833923cf2ef81cdebdb1
[ "Apache-2.0" ]
1
2021-01-13T15:48:56.000Z
2021-01-13T15:48:56.000Z
import csv import ast import numpy as np import os from collections import deque from datetime import datetime, date, timedelta from typing import Dict, List, Iterator, Tuple from libs.utils.loggers import get_source_log_directory from .base import BaseMetric class SocialDistancingMetric(BaseMetric): reports_...
50.387435
121
0.64256
import csv import ast import numpy as np import os from collections import deque from datetime import datetime, date, timedelta from typing import Dict, List, Iterator, Tuple from libs.utils.loggers import get_source_log_directory from .base import BaseMetric class SocialDistancingMetric(BaseMetric): reports_...
true
true
1c3fa86adc535b5ca59895af3f30fbc046c4133f
152
py
Python
adet/modeling/DTMRInst_backup/__init__.py
shuaiqi361/AdelaiDet
35d944033a8d2f7aa623ad607b57bd8a1fe88b43
[ "BSD-2-Clause" ]
null
null
null
adet/modeling/DTMRInst_backup/__init__.py
shuaiqi361/AdelaiDet
35d944033a8d2f7aa623ad607b57bd8a1fe88b43
[ "BSD-2-Clause" ]
null
null
null
adet/modeling/DTMRInst_backup/__init__.py
shuaiqi361/AdelaiDet
35d944033a8d2f7aa623ad607b57bd8a1fe88b43
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .DTMRInst import DTMRInst from .DTMREncode import DistanceTransformEncoding
38
70
0.822368
from .DTMRInst import DTMRInst from .DTMREncode import DistanceTransformEncoding
true
true
1c3faad72af69451caa228795765f6467ec6e1c0
10,382
py
Python
game/level.py
Magicalbat/Spooktober-Jam-2021
ba652c0aa3b479f35ea08e26d6f0725bd1706ebd
[ "Unlicense" ]
null
null
null
game/level.py
Magicalbat/Spooktober-Jam-2021
ba652c0aa3b479f35ea08e26d6f0725bd1706ebd
[ "Unlicense" ]
null
null
null
game/level.py
Magicalbat/Spooktober-Jam-2021
ba652c0aa3b479f35ea08e26d6f0725bd1706ebd
[ "Unlicense" ]
null
null
null
import pygame import random from engine.gamescreen import GameScreen from engine.tilemap import Tilemap from engine.text import Text from engine.menu import Menu from engine.particles import Particles from engine.common import * from game.player import Player from game.pumpkin import Pumpkin from game.ghost import G...
42.203252
233
0.574648
import pygame import random from engine.gamescreen import GameScreen from engine.tilemap import Tilemap from engine.text import Text from engine.menu import Menu from engine.particles import Particles from engine.common import * from game.player import Player from game.pumpkin import Pumpkin from game.ghost import G...
true
true
1c3fad66793c87698591fd8a85a8f83a19bd9c05
14,295
py
Python
bin/Python27/Lib/site-packages/numpy/lib/arraysetops.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/numpy/lib/arraysetops.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
bin/Python27/Lib/site-packages/numpy/lib/arraysetops.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
1
2020-08-08T12:44:48.000Z
2020-08-08T12:44:48.000Z
""" Set operations for 1D numeric arrays based on sorting. :Contains: ediff1d, unique, intersect1d, setxor1d, in1d, union1d, setdiff1d :Notes: For floating point arrays, inaccurate results may appear due to usual round-off and floating point comparison issues. Speed could be gained in...
29.719335
80
0.561525
from __future__ import division, absolute_import, print_function import numpy as np __all__ = [ 'ediff1d', 'intersect1d', 'setxor1d', 'union1d', 'setdiff1d', 'unique', 'in1d' ] def ediff1d(ary, to_end=None, to_begin=None): ary = np.asanyarray(ary).flat ed = ary[1:] - ary[:-1] ...
true
true
1c3fadb18ea5a35b1a6c384aad3f988c75251fce
1,398
py
Python
10_path.py
akfmdl/testdome-python-solutions
f4a2dd2831bc9b11c3374f41c84abc53ff79c01b
[ "MIT" ]
2
2022-02-09T17:30:49.000Z
2022-02-27T17:25:53.000Z
10_path.py
akfmdl/testdome-python-solutions
f4a2dd2831bc9b11c3374f41c84abc53ff79c01b
[ "MIT" ]
null
null
null
10_path.py
akfmdl/testdome-python-solutions
f4a2dd2831bc9b11c3374f41c84abc53ff79c01b
[ "MIT" ]
null
null
null
""" 30 min Write a function that provides change directory (cd) function for an abstract file system. Notes: * Root path is '/'. * Path separator is '/'. * Parent directory is addressable as '..'. * Directory names consist only of English alphabet letters (A-Z and a-z). * The function should support both relative and...
22.918033
90
0.55794
class Path: def __init__(self, path): self.current_path = path def cd(self, new_path): if new_path.startswith('/'): self.current_path = new_path else: orig = self.current_path.split('/') for part in new_path.split('/'): if part == '....
true
true
1c3fafdd497f21f0c7a44fed0e588a194ae3989e
12,454
py
Python
pyserializer/serialize.py
deptofdefense/pyserializer
2f52664ed96b2640f24d4312b2a93db6c75d0b53
[ "MIT" ]
1
2022-03-05T01:18:08.000Z
2022-03-05T01:18:08.000Z
pyserializer/serialize.py
deptofdefense/pyserializer
2f52664ed96b2640f24d4312b2a93db6c75d0b53
[ "MIT" ]
null
null
null
pyserializer/serialize.py
deptofdefense/pyserializer
2f52664ed96b2640f24d4312b2a93db6c75d0b53
[ "MIT" ]
null
null
null
# ================================================================= # # Work of the U.S. Department of Defense, Defense Digital Service. # Released as open source under the MIT License. See LICENSE file. # # ================================================================= import csv import json import pyarrow as pa...
38.085627
119
0.453027
import csv import json import pyarrow as pa import pandas as pd from pyserializer.cleaner import clean from pyserializer.encoder import Encoder from pyserializer.parquet import DatasetWriter, PartitionWriter from pyserializer.writer import create_writer def write_jsonl_tuples(drop_blanks=None, drop_nulls=Non...
true
true
1c3fb030ac5b90d523c816d4c4a496444658a784
1,368
py
Python
trench/urls/base.py
eriol/django-trench
27b61479e6d494d7c2e94732c1d186247dac8dd9
[ "MIT" ]
190
2018-10-26T09:48:26.000Z
2022-03-31T14:09:28.000Z
trench/urls/base.py
eriol/django-trench
27b61479e6d494d7c2e94732c1d186247dac8dd9
[ "MIT" ]
116
2018-10-26T13:04:58.000Z
2022-03-28T13:51:21.000Z
trench/urls/base.py
eriol/django-trench
27b61479e6d494d7c2e94732c1d186247dac8dd9
[ "MIT" ]
29
2018-11-14T07:15:21.000Z
2022-03-19T08:13:16.000Z
from django.urls import path __all__ = [ "urlpatterns", ] from trench.views import ( MFAConfigView, MFAListActiveUserMethodsView, MFAMethodActivationView, MFAMethodBackupCodesRegenerationView, MFAMethodConfirmActivationView, MFAMethodDeactivationView, MFAMethodRequestCodeView, MFA...
25.333333
87
0.645468
from django.urls import path __all__ = [ "urlpatterns", ] from trench.views import ( MFAConfigView, MFAListActiveUserMethodsView, MFAMethodActivationView, MFAMethodBackupCodesRegenerationView, MFAMethodConfirmActivationView, MFAMethodDeactivationView, MFAMethodRequestCodeView, MFA...
true
true
1c3fb038214eb4d85d24f39d10adf779811cd5c4
891
py
Python
common/utils/time_series.py
shapeshift-legacy/watchtower
c9cd5150f8549145f7de9b1ea820d548959350fe
[ "MIT" ]
null
null
null
common/utils/time_series.py
shapeshift-legacy/watchtower
c9cd5150f8549145f7de9b1ea820d548959350fe
[ "MIT" ]
null
null
null
common/utils/time_series.py
shapeshift-legacy/watchtower
c9cd5150f8549145f7de9b1ea820d548959350fe
[ "MIT" ]
null
null
null
INTERVALS = { 'weekly': { 'unit': 'weeks', 'amount': 1, 'seconds': 60 * 60 * 24 * 7 }, 'daily': { 'unit': 'days', 'amount': 1, 'seconds': 60 * 60 * 24 }, 'hourly': { 'unit': 'hours', 'amount': 1, 'seconds': 60 * 60 }, 'm...
18.5625
35
0.352413
INTERVALS = { 'weekly': { 'unit': 'weeks', 'amount': 1, 'seconds': 60 * 60 * 24 * 7 }, 'daily': { 'unit': 'days', 'amount': 1, 'seconds': 60 * 60 * 24 }, 'hourly': { 'unit': 'hours', 'amount': 1, 'seconds': 60 * 60 }, 'm...
true
true
1c3fb16926f14de180ad561de64021de40c453a9
936
py
Python
django_ajax/mixins.py
skhaylov/django-ajax
d513975e536fc4feff5d710bb17d96b2ef80b28c
[ "MIT" ]
null
null
null
django_ajax/mixins.py
skhaylov/django-ajax
d513975e536fc4feff5d710bb17d96b2ef80b28c
[ "MIT" ]
null
null
null
django_ajax/mixins.py
skhaylov/django-ajax
d513975e536fc4feff5d710bb17d96b2ef80b28c
[ "MIT" ]
null
null
null
# coding=utf-8; __author__ = 'skhaylov' import json from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from json_response import JSONResponse class JSONMixin(object): response_class = JSONResponse def get_json_context(self): context = super(J...
24.631579
78
0.724359
__author__ = 'skhaylov' import json from django.views.decorators.csrf import csrf_exempt from django.utils.decorators import method_decorator from json_response import JSONResponse class JSONMixin(object): response_class = JSONResponse def get_json_context(self): context = super(JSONMixin, self)...
true
true
1c3fb1b1e0e6fa6147508ca62535516c9e779138
4,396
py
Python
test/Fortran/SHF03.py
jcassagnol-public/scons
8eaf585a893757e68c9e4a6e25d375021fa5eab7
[ "MIT" ]
1,403
2017-11-23T14:24:01.000Z
2022-03-30T20:59:39.000Z
test/Fortran/SHF03.py
jcassagnol-public/scons
8eaf585a893757e68c9e4a6e25d375021fa5eab7
[ "MIT" ]
3,708
2017-11-27T13:47:12.000Z
2022-03-29T17:21:17.000Z
test/Fortran/SHF03.py
jcassagnol-public/scons
8eaf585a893757e68c9e4a6e25d375021fa5eab7
[ "MIT" ]
281
2017-12-01T23:48:38.000Z
2022-03-31T15:25:44.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
35.168
73
0.682439
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import TestSCons _python_ = TestSCons._python_ _obj = TestSCons._shobj obj_ = TestSCons.shobj_ test = TestSCons.TestSCons() test.file_fixture(['fixture', 'myfortran.py']) test.write('SConstruct', """ env = Environment(SHF03 =...
true
true
1c3fb2f15462175a8dbd90b7f314dc22a0831c82
1,134
py
Python
Sorts/MaxHeap.py
ketansahils/Algorithms_One
7322048975c8c76f1d00e11d7cf94f72a9312901
[ "BSD-3-Clause" ]
null
null
null
Sorts/MaxHeap.py
ketansahils/Algorithms_One
7322048975c8c76f1d00e11d7cf94f72a9312901
[ "BSD-3-Clause" ]
null
null
null
Sorts/MaxHeap.py
ketansahils/Algorithms_One
7322048975c8c76f1d00e11d7cf94f72a9312901
[ "BSD-3-Clause" ]
null
null
null
class MaxHeap(object): def __init__(self): self._array = [None] self._N = 0 def _isEmpty(self): return self._N == 0 def insert(self,k): self._array.append(k) self._N += 1 self._swim(self._N) def _swim(self,i): while i > 1 and i <= self._N: if self._array[i] > self._array[i/2]: self._exch(i,i...
17.71875
62
0.58642
class MaxHeap(object): def __init__(self): self._array = [None] self._N = 0 def _isEmpty(self): return self._N == 0 def insert(self,k): self._array.append(k) self._N += 1 self._swim(self._N) def _swim(self,i): while i > 1 and i <= self._N: if self._array[i] > self._array[i/2]: self._exch(i,i...
false
true
1c3fb3bcdf36a09a0d89dedb18d20ebbe20b866f
4,466
py
Python
fuxictr/pytorch/models/HOFM.py
w32zhong/FuxiCTR
f9cac1c5b0a977d6a7dfd16c0ffb524811470f97
[ "Apache-2.0" ]
null
null
null
fuxictr/pytorch/models/HOFM.py
w32zhong/FuxiCTR
f9cac1c5b0a977d6a7dfd16c0ffb524811470f97
[ "Apache-2.0" ]
null
null
null
fuxictr/pytorch/models/HOFM.py
w32zhong/FuxiCTR
f9cac1c5b0a977d6a7dfd16c0ffb524811470f97
[ "Apache-2.0" ]
null
null
null
# ========================================================================= # Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
48.021505
115
0.576131
from torch import nn import torch from .base_model import BaseModel from ..layers import LR_Layer, EmbeddingLayer, InnerProductLayer from itertools import combinations class HOFM(BaseModel): def __init__(self, feature_map, model_id="HOFM", ...
true
true
1c3fb3cedd17e4c492cf2192f069b0c0863eee6d
2,129
py
Python
src/robust_deid/ner_datasets/distribution/print_distribution.py
obi-ml-public/ehr_deidentification
c9deaf30b8317689d28a4267d15ec13baa9791cd
[ "MIT" ]
null
null
null
src/robust_deid/ner_datasets/distribution/print_distribution.py
obi-ml-public/ehr_deidentification
c9deaf30b8317689d28a4267d15ec13baa9791cd
[ "MIT" ]
null
null
null
src/robust_deid/ner_datasets/distribution/print_distribution.py
obi-ml-public/ehr_deidentification
c9deaf30b8317689d28a4267d15ec13baa9791cd
[ "MIT" ]
null
null
null
from collections import Counter from typing import Sequence, NoReturn from .ner_distribution import NERDistribution class PrintDistribution(object): """ This class is used to print the distribution of NER types """ def __init__(self, ner_distribution: NERDistribution, key_counts: Counter) -> NoRetur...
42.58
117
0.591827
from collections import Counter from typing import Sequence, NoReturn from .ner_distribution import NERDistribution class PrintDistribution(object): def __init__(self, ner_distribution: NERDistribution, key_counts: Counter) -> NoReturn: self._ner_distribution = ner_distribution self._key_counts ...
true
true
1c3fb48f7768e1c691f56a6ad1099f95405463d3
569
py
Python
Dataset/Leetcode/test/8/125.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/test/8/125.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/test/8/125.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: def XXX(self, str: str) -> int: sign=1 str=str.strip() if not str: return 0 if str[0]=="+" or str[0]=="-": if str[0]=="-": sign=-1 str=str[1:] ans=0 for i in str: if i.isdigit(): ...
21.074074
38
0.388401
class Solution: def XXX(self, str: str) -> int: sign=1 str=str.strip() if not str: return 0 if str[0]=="+" or str[0]=="-": if str[0]=="-": sign=-1 str=str[1:] ans=0 for i in str: if i.isdigit(): ...
true
true
1c3fb526e37a26eea6f0226f05b415ad6d775a8e
72,404
py
Python
python/ray/serve/tests/test_deployment_state.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
python/ray/serve/tests/test_deployment_state.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
python/ray/serve/tests/test_deployment_state.py
jianoaix/ray
1701b923bc83905f8961c06a6a173e3eba46a936
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass import os import sys import time from typing import Any, Dict, List, Optional, Tuple from unittest.mock import patch, Mock import pytest import ray from ray.actor import ActorHandle from ray.serve.common import ( DeploymentConfig, DeploymentInfo, DeploymentStatus, Rep...
34.36355
88
0.688788
from dataclasses import dataclass import os import sys import time from typing import Any, Dict, List, Optional, Tuple from unittest.mock import patch, Mock import pytest import ray from ray.actor import ActorHandle from ray.serve.common import ( DeploymentConfig, DeploymentInfo, DeploymentStatus, Rep...
true
true
1c3fb6b30b996ff5765cfd6f146b4a0a3f563ca6
769
py
Python
providers/caching/DiskCacheProvider.py
Prouser123/xbl-web-api
eb49032edb34cfbfda7f4cfda7aa1eecc7ea7eb3
[ "MIT" ]
16
2019-09-30T11:30:56.000Z
2022-01-28T12:42:53.000Z
providers/caching/DiskCacheProvider.py
Prouser123/xbl-web-api
eb49032edb34cfbfda7f4cfda7aa1eecc7ea7eb3
[ "MIT" ]
13
2019-05-24T14:34:46.000Z
2022-02-23T15:35:39.000Z
providers/caching/DiskCacheProvider.py
Prouser123/xbl-web-api
eb49032edb34cfbfda7f4cfda7aa1eecc7ea7eb3
[ "MIT" ]
1
2021-07-30T23:34:31.000Z
2021-07-30T23:34:31.000Z
import diskcache from providers.caching.CacheProvider import CacheProvider class DiskCacheProvider(CacheProvider): def __init__(self, path): self.cache = diskcache.Cache(path) self.cache.clear() # Clear all items def get(self, key): return self.cache.get(key) def set(self, key,...
22.617647
63
0.639792
import diskcache from providers.caching.CacheProvider import CacheProvider class DiskCacheProvider(CacheProvider): def __init__(self, path): self.cache = diskcache.Cache(path) self.cache.clear() def get(self, key): return self.cache.get(key) def set(self, key, value, expire): ...
true
true
1c3fb705945f1d44f80d75cdcf2b417407d28418
5,511
py
Python
huaweicloud-sdk-cce/huaweicloudsdkcce/v3/model/update_node_pool_response.py
handsome-baby/huaweicloud-sdk-python-v3
6cdcf1da8b098427e58fc3335a387c14df7776d0
[ "Apache-2.0" ]
1
2021-04-16T07:59:28.000Z
2021-04-16T07:59:28.000Z
huaweicloud-sdk-cce/huaweicloudsdkcce/v3/model/update_node_pool_response.py
Lencof/huaweicloud-sdk-python-v3
d13dc4e2830a83e295be6e4de021999b3376e34e
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-cce/huaweicloudsdkcce/v3/model/update_node_pool_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 UpdateNodePoolResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (di...
25.873239
91
0.569044
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class UpdateNodePoolResponse(SdkResponse): sensitive_list = [] openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'NodePoolMetadata', 'spec': 'NodePoolSpec', ...
true
true
1c3fb724b82955a9d93f2abdc023952c315d892a
778
py
Python
mayan/apps/autoadmin/models.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/autoadmin/models.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/autoadmin/models.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from solo.models import SingletonModel from .managers import AutoAdminSingletonManager class AutoAdminSingleton(SingletonModel): account = models.ForeignKey( blank=True, null=True, on_de...
29.923077
78
0.732648
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from solo.models import SingletonModel from .managers import AutoAdminSingletonManager class AutoAdminSingleton(SingletonModel): account = models.ForeignKey( blank=True, null=True, on_de...
true
true
1c3fb7d69830be9fe5752e67677b4eb12326bb8e
3,618
py
Python
calculaIpv4.py
Werberty/Calculando-Redes_IPV4
c86ef00248c998b74cb6af377989c6f824d37ae4
[ "MIT" ]
1
2022-03-06T11:37:46.000Z
2022-03-06T11:37:46.000Z
calculaIpv4.py
Werberty/Calculando-Redes_IPV4
c86ef00248c998b74cb6af377989c6f824d37ae4
[ "MIT" ]
null
null
null
calculaIpv4.py
Werberty/Calculando-Redes_IPV4
c86ef00248c998b74cb6af377989c6f824d37ae4
[ "MIT" ]
null
null
null
import re class CalculaIpv4: def __init__(self, ip, mascara) -> None: self.ip = ip self.mascara = mascara self.prefixo = self.calc_prefixo(mascara) self.rede = self.calc_ip_rede(ip, mascara) self.broadcast = self.calc_broadcast(ip, mascara) self.numero_ips = self.ca...
30.661017
75
0.564677
import re class CalculaIpv4: def __init__(self, ip, mascara) -> None: self.ip = ip self.mascara = mascara self.prefixo = self.calc_prefixo(mascara) self.rede = self.calc_ip_rede(ip, mascara) self.broadcast = self.calc_broadcast(ip, mascara) self.numero_ips = self.ca...
true
true
1c3fb7e4d49e191f28457af06cee9b503f582ccc
5,190
py
Python
src/sqlTools/ReaderTools.py
XPH0904/Library-management-system
9990654070caa9f757af9a6f4771ce4b1b484083
[ "Apache-2.0" ]
null
null
null
src/sqlTools/ReaderTools.py
XPH0904/Library-management-system
9990654070caa9f757af9a6f4771ce4b1b484083
[ "Apache-2.0" ]
null
null
null
src/sqlTools/ReaderTools.py
XPH0904/Library-management-system
9990654070caa9f757af9a6f4771ce4b1b484083
[ "Apache-2.0" ]
null
null
null
import traceback import mysql.connector from ..model.Reader import Reader from ..database.database import DatabaseTools class ReaderTools: #return for Special ID def ReaderDataId(self, idReader): db = DatabaseTools() conn = db.getConn() result_set = None ls = [] try : ...
27.315789
142
0.522351
import traceback import mysql.connector from ..model.Reader import Reader from ..database.database import DatabaseTools class ReaderTools: def ReaderDataId(self, idReader): db = DatabaseTools() conn = db.getConn() result_set = None ls = [] try : sql = "selec...
true
true
1c3fb92f9cfb2eda4e23250f74cc254577012884
533
py
Python
4_Tran_Thi_Nhu_Huong_LOCAL/bai4.1.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
4_Tran_Thi_Nhu_Huong_LOCAL/bai4.1.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
null
null
null
4_Tran_Thi_Nhu_Huong_LOCAL/bai4.1.py
lpython2006e/exercies
84343eae57d86708a7984aa02f77183a4688a508
[ "MIT" ]
8
2020-07-10T14:13:54.000Z
2020-08-03T08:17:50.000Z
"""Create Student class with attributes like (Name, Nickname, birthday, class)""" class Student: def __init__(self, name, nickname, birthday, class_num): self.name = name self.nickname = nickname self.birthday = birthday self.class_num = class_num def show_info(self): ...
31.352941
136
0.660413
class Student: def __init__(self, name, nickname, birthday, class_num): self.name = name self.nickname = nickname self.birthday = birthday self.class_num = class_num def show_info(self): print("Name is {}, nickname is {}, birthday is {},class is {}.".format(self.name, ...
true
true
1c3fb995b1da3003ba9e6ca50446edc20caf3fae
532
py
Python
100 Python Exercises/Day 3/12.py
elipopovadev/Tournament-Tracker
5b0acbd460257869438e27d3db770ff269ac6d40
[ "MIT" ]
null
null
null
100 Python Exercises/Day 3/12.py
elipopovadev/Tournament-Tracker
5b0acbd460257869438e27d3db770ff269ac6d40
[ "MIT" ]
1
2022-02-21T12:40:21.000Z
2022-02-21T12:40:21.000Z
100 Python Exercises/Day 3/12.py
elipopovadev/Complete-Python-Developer
5b0acbd460257869438e27d3db770ff269ac6d40
[ "MIT" ]
null
null
null
import numpy as np '''Question 12: Write a program, which will find all such numbers between 1000 and 3000 (both included) such that each digit of the number is an even number.The numbers obtained should be printed in a comma-separated sequence on a single line.''' sample_list = [] sample_array = range(1000, 3001) for...
38
121
0.693609
import numpy as np sample_list = [] sample_array = range(1000, 3001) for variable in sample_array: var = str(variable) if int(var[0]) % 2 == 0 and int(var[1]) % 2 == 0 and int(var[2]) % 2 and int(var[3]) % 2 == 0: sample_list.append(var) print(",".join(sample_list))
true
true
1c3fbabd96e05b2650f95dc93074ba84d8a33b06
381
py
Python
tools/gen_interrupts.py
Narasimha1997/r3
fbeea8de1c7b07bad3a30c511a1085c8dd0c4495
[ "MIT" ]
65
2022-01-22T11:23:33.000Z
2022-03-29T12:12:50.000Z
tools/gen_interrupts.py
Narasimha1997/r3
fbeea8de1c7b07bad3a30c511a1085c8dd0c4495
[ "MIT" ]
2
2022-01-22T10:49:59.000Z
2022-01-23T05:50:00.000Z
tools/gen_interrupts.py
Narasimha1997/r3
fbeea8de1c7b07bad3a30c511a1085c8dd0c4495
[ "MIT" ]
3
2022-01-22T17:30:19.000Z
2022-03-12T03:25:37.000Z
LEGACY_INTERRUPTS_BASE = 0x20 MAX_ARCH_INTERRUPTS = 256 entries = [] writer = open('entries.txt', 'w') for idx in range(1, MAX_ARCH_INTERRUPTS - LEGACY_INTERRUPTS_BASE): entry = "IDT.lock().interrupts[LEGACY_HARDWARE_INTERRUPTS_BASE + {}] = prepare_no_irq_handler!(no_irq_fn, {});\n".format( hex(idx), he...
29.307692
125
0.713911
LEGACY_INTERRUPTS_BASE = 0x20 MAX_ARCH_INTERRUPTS = 256 entries = [] writer = open('entries.txt', 'w') for idx in range(1, MAX_ARCH_INTERRUPTS - LEGACY_INTERRUPTS_BASE): entry = "IDT.lock().interrupts[LEGACY_HARDWARE_INTERRUPTS_BASE + {}] = prepare_no_irq_handler!(no_irq_fn, {});\n".format( hex(idx), he...
true
true
1c3fbbb4b422fedd696e2428da5fa8fa8df82664
633
py
Python
Utopian_Tree.py
Quarantinex/Hackerrank_Python_Algorithm
4a5fc532bfbdac02e66e9d0d9ae279c4e33ca017
[ "MIT" ]
null
null
null
Utopian_Tree.py
Quarantinex/Hackerrank_Python_Algorithm
4a5fc532bfbdac02e66e9d0d9ae279c4e33ca017
[ "MIT" ]
null
null
null
Utopian_Tree.py
Quarantinex/Hackerrank_Python_Algorithm
4a5fc532bfbdac02e66e9d0d9ae279c4e33ca017
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the utopianTree function below. def utopianTree(n): temp = 1 if n == 0: return temp else: for i in range(1,n+1): if i%2 != 0: temp = temp*2 elif i%2 =...
17.583333
47
0.491311
import math import os import random import re import sys def utopianTree(n): temp = 1 if n == 0: return temp else: for i in range(1,n+1): if i%2 != 0: temp = temp*2 elif i%2 == 0: temp = temp+1 ...
true
true
1c3fbc5ca16d62fb96a83ee2f7d3e8ca38a8082a
3,170
py
Python
qiskit/result/models.py
ismaila-at-za-ibm/qiskit-terra
08303ec98ac7b33fde55266dc3a74466fbdcae95
[ "Apache-2.0" ]
2
2021-09-06T19:25:36.000Z
2021-11-17T10:46:12.000Z
qiskit/result/models.py
ismaila-at-za-ibm/qiskit-terra
08303ec98ac7b33fde55266dc3a74466fbdcae95
[ "Apache-2.0" ]
null
null
null
qiskit/result/models.py
ismaila-at-za-ibm/qiskit-terra
08303ec98ac7b33fde55266dc3a74466fbdcae95
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Schema and helper models for schema-conformant Results.""" from marshmallow.validate import Length, OneOf, Regexp, Range ...
32.020202
90
0.66183
from marshmallow.validate import Length, OneOf, Regexp, Range from qiskit.validation.base import BaseModel, BaseSchema, ObjSchema, bind_schema from qiskit.validation.fields import Complex, ByType from qiskit.validation.fields import Boolean, DateTime, Integer, List, Nested, Raw, String from qiskit.validation.v...
true
true
1c3fbcaba55e7177584dc605a776aa7a815b290f
7,249
py
Python
google/cloud/container_v1/__init__.py
sid-dinesh94/python-container
8870b0000fc859407f7a8eac391ae06e528b3aae
[ "Apache-2.0" ]
null
null
null
google/cloud/container_v1/__init__.py
sid-dinesh94/python-container
8870b0000fc859407f7a8eac391ae06e528b3aae
[ "Apache-2.0" ]
null
null
null
google/cloud/container_v1/__init__.py
sid-dinesh94/python-container
8870b0000fc859407f7a8eac391ae06e528b3aae
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
39.82967
74
0.82301
from .services.cluster_manager import ClusterManagerClient from .types.cluster_service import AcceleratorConfig from .types.cluster_service import AddonsConfig from .types.cluster_service import AuthenticatorGroupsConfig from .types.cluster_service import AutoUpgradeOptions from .types.cluster_service ...
true
true
1c3fbcd19b3ffbf3c6cb89409faf0751e9908e1d
5,110
py
Python
soft/lib.hdf5/customize.py
G4V/ck-env
b882480b00b9dbd88f15eef58440772e09414f64
[ "BSD-3-Clause" ]
80
2015-03-03T14:27:39.000Z
2022-01-04T15:37:01.000Z
soft/lib.hdf5/customize.py
G4V/ck-env
b882480b00b9dbd88f15eef58440772e09414f64
[ "BSD-3-Clause" ]
78
2016-02-20T07:47:05.000Z
2021-05-01T13:33:31.000Z
soft/lib.hdf5/customize.py
G4V/ck-env
b882480b00b9dbd88f15eef58440772e09414f64
[ "BSD-3-Clause" ]
22
2016-07-29T07:25:11.000Z
2021-02-08T16:18:26.000Z
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # import os ############################################################################## # ...
25.55
97
0.501957
import os
true
true
1c3fbd449f724a0f3dc9619c6e39da5f11648aac
6,009
py
Python
python/oneflow/compatible/single_client/test/ops/test_clip_by_value.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/compatible/single_client/test/ops/test_clip_by_value.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/compatible/single_client/test/ops/test_clip_by_value.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow 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 applicable law or agr...
35.140351
88
0.644533
import unittest from collections import OrderedDict import numpy as np import tensorflow as tf from test_util import GenArgList import oneflow.compatible.single_client.unittest from oneflow.compatible import single_client as flow from oneflow.compatible.single_client import typing as oft gpus = tf.config.experiment...
true
true
1c3fbd972582e7814d0ea0aca085c77b85fb4860
5,189
py
Python
metrics/functional/cls_acc_f1.py
ShannonAI/dice_loss_for_NLP
d437bb999185535df46fdb74d1f2f57161331b44
[ "Apache-2.0" ]
143
2020-04-25T11:23:10.000Z
2022-03-30T14:49:21.000Z
metrics/functional/cls_acc_f1.py
ShannonAI/dice_loss_for_NLP
d437bb999185535df46fdb74d1f2f57161331b44
[ "Apache-2.0" ]
17
2021-04-12T19:11:58.000Z
2022-02-21T02:42:56.000Z
metrics/functional/cls_acc_f1.py
ShannonAI/dice_loss_for_NLP
d437bb999185535df46fdb74d1f2f57161331b44
[ "Apache-2.0" ]
26
2021-03-26T08:05:37.000Z
2022-03-15T07:28:38.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # file: cls_acc_f1.py # description: # compute acc and f1 scores for text classification task. import torch import torch.nn.functional as F def collect_confusion_matrix(y_pred_labels, y_gold_labels, num_classes=2): """ compute accuracy and f1 scores for text cl...
39.310606
108
0.70264
import torch import torch.nn.functional as F def collect_confusion_matrix(y_pred_labels, y_gold_labels, num_classes=2): if num_classes <= 0: raise ValueError if num_classes == 1 or num_classes == 2: num_classes = 1 y_true_onehot = y_gold_labels.bool() y_pred_onehot = y_...
true
true