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
f7586dab25cea2ae0ce86336c1686bdffbf0abd3
155
py
Python
tests/test_mdio.py
Samtec-ASH/pyrpio
b087be9c935367ab4d2424371b2b3fffe5375138
[ "MIT" ]
5
2020-02-27T19:49:48.000Z
2022-03-11T02:49:49.000Z
tests/test_mdio.py
Samtec-ASH/pyrpio
b087be9c935367ab4d2424371b2b3fffe5375138
[ "MIT" ]
1
2021-02-19T10:08:50.000Z
2021-02-19T22:42:23.000Z
tests/test_mdio.py
Samtec-ASH/pyrpio
b087be9c935367ab4d2424371b2b3fffe5375138
[ "MIT" ]
2
2021-06-07T14:13:52.000Z
2021-10-17T11:59:36.000Z
import pytest from pyrpio.mdio import MDIO class TestMDIO: def test_open(self): assert True def test_transfer(self): assert True
15.5
28
0.677419
import pytest from pyrpio.mdio import MDIO class TestMDIO: def test_open(self): assert True def test_transfer(self): assert True
true
true
f7586e47a874b10e20826983ab6c81b9596a93f7
59,284
py
Python
pyseqlab/utilities.py
bratao/-PySeqLab
fea1c4bd4d43565b1bb20a789d78946e1022d0ff
[ "MIT" ]
6
2019-05-03T22:14:11.000Z
2022-03-04T10:36:31.000Z
pyseqlab/utilities.py
bratao/-PySeqLab
fea1c4bd4d43565b1bb20a789d78946e1022d0ff
[ "MIT" ]
1
2020-11-12T02:46:15.000Z
2020-11-12T03:12:45.000Z
pyseqlab/utilities.py
bratao/-PySeqLab
fea1c4bd4d43565b1bb20a789d78946e1022d0ff
[ "MIT" ]
3
2019-05-04T03:50:49.000Z
2020-06-27T00:43:29.000Z
""" @author: ahmed allam <ahmed.allam@yale.edu> """ import os import pickle import shutil from datetime import datetime from copy import deepcopy from itertools import combinations import heapq import numpy class SequenceStruct(object): r"""class for representing each sequence/segment Args: ...
37.592898
145
0.547635
import os import pickle import shutil from datetime import datetime from copy import deepcopy from itertools import combinations import heapq import numpy class SequenceStruct(object): def __init__(self, X, Y, seg_other_symbol=None): self.seg_attr = {} self.X = X self.Y = (Y, seg_other_sy...
true
true
f7586e7709f11aebeac250ea9ba6948ee1e85f87
418
py
Python
src/wechaty_puppet_mock/__init__.py
wechaty/python-wechaty-puppet-mock
ffad481545b93d328f346b42bd7e9565f5dda88a
[ "Apache-2.0" ]
null
null
null
src/wechaty_puppet_mock/__init__.py
wechaty/python-wechaty-puppet-mock
ffad481545b93d328f346b42bd7e9565f5dda88a
[ "Apache-2.0" ]
null
null
null
src/wechaty_puppet_mock/__init__.py
wechaty/python-wechaty-puppet-mock
ffad481545b93d328f346b42bd7e9565f5dda88a
[ "Apache-2.0" ]
null
null
null
"""import all external package""" from wechaty_puppet_mock.puppet_mock import PuppetMock, PuppetMockOptions from wechaty_puppet_mock.exceptions import ( MockEnvironmentError ) from wechaty_puppet_mock.mock.environment import EnvironmentMock from wechaty_puppet_mock.mock.mocker import Mocker __all__ = [ 'Puppet...
26.125
73
0.787081
from wechaty_puppet_mock.puppet_mock import PuppetMock, PuppetMockOptions from wechaty_puppet_mock.exceptions import ( MockEnvironmentError ) from wechaty_puppet_mock.mock.environment import EnvironmentMock from wechaty_puppet_mock.mock.mocker import Mocker __all__ = [ 'PuppetMock', 'PuppetMockOptions', ...
true
true
f7586f0277dcd698c785c3103266a974f355858e
5,067
py
Python
src/CodeExecResource.py
narhen/code-exec-as-a-service
8cf4edd2bb6381cfd73f4610f8706af7ce8bae02
[ "MIT" ]
2
2021-01-02T16:22:38.000Z
2021-07-11T09:50:53.000Z
src/CodeExecResource.py
narhen/code-exec-as-a-service
8cf4edd2bb6381cfd73f4610f8706af7ce8bae02
[ "MIT" ]
null
null
null
src/CodeExecResource.py
narhen/code-exec-as-a-service
8cf4edd2bb6381cfd73f4610f8706af7ce8bae02
[ "MIT" ]
null
null
null
import falcon import tempfile import base64 import traceback import string from json import loads from os import path, unlink from shutil import rmtree from settings import application as app_settings from Exceptions import ValidationException class Languages: def __init__(self, docker_client): self.docker...
39.27907
110
0.650286
import falcon import tempfile import base64 import traceback import string from json import loads from os import path, unlink from shutil import rmtree from settings import application as app_settings from Exceptions import ValidationException class Languages: def __init__(self, docker_client): self.docker...
true
true
f7586fa6c35becb418cac21949112a443d64e24e
1,766
py
Python
pymortafix/utils.py
Mortafix/PyMortafix
e82afa6be50942116ad93e51e85ae4fa596aad46
[ "MIT" ]
null
null
null
pymortafix/utils.py
Mortafix/PyMortafix
e82afa6be50942116ad93e51e85ae4fa596aad46
[ "MIT" ]
null
null
null
pymortafix/utils.py
Mortafix/PyMortafix
e82afa6be50942116ad93e51e85ae4fa596aad46
[ "MIT" ]
null
null
null
from re import findall, match, sub from colorifix.colorifix import erase from pymortafix._getchar import _Getch def get_sub_from_matching(dictionary, matching): index = [i for i, group in enumerate(matching.groups()) if group] matched = list(dictionary)[index[0]] if index else None return dictionary.get(...
31.535714
83
0.634202
from re import findall, match, sub from colorifix.colorifix import erase from pymortafix._getchar import _Getch def get_sub_from_matching(dictionary, matching): index = [i for i, group in enumerate(matching.groups()) if group] matched = list(dictionary)[index[0]] if index else None return dictionary.get(...
true
true
f758704e27977923040ff6d2e7dc3c43acb05f4c
46,638
py
Python
Tests/Marketplace/upload_packs.py
freimer/content
ade5d3ea39a7c06330d01493af4babdbb991524f
[ "MIT" ]
null
null
null
Tests/Marketplace/upload_packs.py
freimer/content
ade5d3ea39a7c06330d01493af4babdbb991524f
[ "MIT" ]
null
null
null
Tests/Marketplace/upload_packs.py
freimer/content
ade5d3ea39a7c06330d01493af4babdbb991524f
[ "MIT" ]
null
null
null
import json import os import sys import argparse import shutil import uuid import prettytable import glob import requests import logging from datetime import datetime from zipfile import ZipFile from typing import Any, Tuple, Union from Tests.Marketplace.marketplace_services import init_storage_client, init_bigquery_cl...
45.903543
120
0.673635
import json import os import sys import argparse import shutil import uuid import prettytable import glob import requests import logging from datetime import datetime from zipfile import ZipFile from typing import Any, Tuple, Union from Tests.Marketplace.marketplace_services import init_storage_client, init_bigquery_cl...
true
true
f75871cf3a74b52389953763ee36ef8bb46ecafa
1,235
py
Python
data/p4VQE/R4/benchmark/startPyquil685.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startPyquil685.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R4/benchmark/startPyquil685.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=15 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=1 pr...
23.301887
64
0.60081
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += H(0) prog += CNOT(3,0) prog += CNOT(3,0) prog += Z(3) pro...
true
true
f7587217613ce503a5570f1db03474046498432a
481
py
Python
senstech/config/desktop.py
martinzoller/senstech
25b5a1eaa6aa6d33a0db8449d8e73d77caa3e6b7
[ "MIT" ]
null
null
null
senstech/config/desktop.py
martinzoller/senstech
25b5a1eaa6aa6d33a0db8449d8e73d77caa3e6b7
[ "MIT" ]
null
null
null
senstech/config/desktop.py
martinzoller/senstech
25b5a1eaa6aa6d33a0db8449d8e73d77caa3e6b7
[ "MIT" ]
2
2021-02-01T15:17:50.000Z
2021-08-14T22:26:58.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Senstech", "category": "Modules", "label": _("Senstech"), "color": "grey", "icon": "icon cube-blue", "type": "module" }, { "module_name": "Senstech Settin...
20.041667
49
0.56341
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Senstech", "category": "Modules", "label": _("Senstech"), "color": "grey", "icon": "icon cube-blue", "type": "module" }, { "module_name": "Senstech Settings", "category": "Mod...
true
true
f758727ae9d6ec9ca45110f0b05b2dbea1a60127
2,018
py
Python
setup.py
antgonza/qp-qiime2
73133537b8af17e614bc0630657b29a86266d0b7
[ "BSD-3-Clause" ]
4
2016-05-06T18:31:23.000Z
2019-05-10T16:40:32.000Z
setup.py
antgonza/qp-qiime2
73133537b8af17e614bc0630657b29a86266d0b7
[ "BSD-3-Clause" ]
59
2016-06-30T22:34:20.000Z
2021-11-18T16:39:04.000Z
setup.py
antgonza/qp-qiime2
73133537b8af17e614bc0630657b29a86266d0b7
[ "BSD-3-Clause" ]
3
2016-04-13T20:54:38.000Z
2017-04-29T16:42:02.000Z
#!/usr/bin/env python # ----------------------------------------------------------------------------- # Copyright (c) 2013, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------------...
35.403509
79
0.600595
from setuptools import setup from qiime2 import __version__ as qiime2_version __version__ = qiime2_version classes = """ Development Status :: 5 - Production/Stable License :: OSI Approved :: BSD License Topic :: Scientific/Engineering :: Bio-Informatics Topic :: Software Development :: Libraries ...
true
true
f758734595709d92a85aa436a4091fd534884147
2,125
py
Python
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/support/encoded_file.py
Polidea/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
427
2018-05-29T14:21:02.000Z
2022-03-16T03:17:54.000Z
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/support/encoded_file.py
PolideaPlayground/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
25
2018-07-23T08:34:15.000Z
2021-11-05T07:13:36.000Z
SymbolExtractorAndRenamer/lldb/packages/Python/lldbsuite/support/encoded_file.py
PolideaPlayground/SiriusObfuscator
b0e590d8130e97856afe578869b83a209e2b19be
[ "Apache-2.0" ]
52
2018-07-19T19:57:32.000Z
2022-03-11T16:05:38.000Z
""" The LLVM Compiler Infrastructure This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details. Prepares language bindings for LLDB build process. Run with --help to see a description of the supported command line arguments. """ # Python modules:...
29.109589
96
0.631529
import io import sys import six def _encoded_read(old_read, encoding): def impl(size): result = old_read(size) if six.PY2: result = result.encode(encoding) return result return impl def _encoded_write(old_write, encoding): def impl(s): ...
true
true
f75874eb9254c69a49fe536ca7564fa9bac4671f
1,399
py
Python
src/covid_model_seiir_pipeline/pipeline/parameter_fit/workflow.py
yukgu/covid-model-seiir-pipeline
3433034d3f089938e7993b6321d570365bdf62db
[ "BSD-3-Clause" ]
23
2020-05-25T00:20:32.000Z
2022-01-18T10:32:09.000Z
src/covid_model_seiir_pipeline/pipeline/parameter_fit/workflow.py
yukgu/covid-model-seiir-pipeline
3433034d3f089938e7993b6321d570365bdf62db
[ "BSD-3-Clause" ]
15
2020-06-15T16:34:22.000Z
2021-08-15T22:11:37.000Z
src/covid_model_seiir_pipeline/pipeline/parameter_fit/workflow.py
yukgu/covid-model-seiir-pipeline
3433034d3f089938e7993b6321d570365bdf62db
[ "BSD-3-Clause" ]
11
2020-05-24T21:57:29.000Z
2021-09-07T18:21:15.000Z
import shutil from typing import Dict from covid_shared import workflow import covid_model_seiir_pipeline from covid_model_seiir_pipeline.pipeline.parameter_fit.specification import FIT_JOBS, FitScenario class BetaFitTaskTemplate(workflow.TaskTemplate): tool = workflow.get_jobmon_tool(covid_model_seiir_pipeline...
32.534884
97
0.661187
import shutil from typing import Dict from covid_shared import workflow import covid_model_seiir_pipeline from covid_model_seiir_pipeline.pipeline.parameter_fit.specification import FIT_JOBS, FitScenario class BetaFitTaskTemplate(workflow.TaskTemplate): tool = workflow.get_jobmon_tool(covid_model_seiir_pipeline...
true
true
f758751cc2c46581edf419efe1b032d99771f9a9
599
py
Python
refs/utils.py
muhfahmir/Discord-Bot-GUI
df078ec9c9f2aa253dca4cc212f9787cb9a64eb7
[ "MIT" ]
null
null
null
refs/utils.py
muhfahmir/Discord-Bot-GUI
df078ec9c9f2aa253dca4cc212f9787cb9a64eb7
[ "MIT" ]
null
null
null
refs/utils.py
muhfahmir/Discord-Bot-GUI
df078ec9c9f2aa253dca4cc212f9787cb9a64eb7
[ "MIT" ]
5
2021-10-01T04:20:50.000Z
2021-10-30T07:11:00.000Z
import discord from dataclasses import dataclass @dataclass class FakeAvatar: url: str class FakeUser(discord.Object): @property def avatar(self): return FakeAvatar("https://cdn.discordapp.com/embed/avatars/0.png") @property def mention(self): return f"<@{self.id}>" @prope...
17.114286
75
0.611018
import discord from dataclasses import dataclass @dataclass class FakeAvatar: url: str class FakeUser(discord.Object): @property def avatar(self): return FakeAvatar("https://cdn.discordapp.com/embed/avatars/0.png") @property def mention(self): return f"<@{self.id}>" @prope...
true
true
f75875deb478d59645b574519de38c0ac0d5aa26
6,313
py
Python
pyscf/cc/__init__.py
r-peng/pyscf
9a14f9bcc63bc75f5939cb4d00eb47861d8d8989
[ "Apache-2.0" ]
2
2021-06-30T22:33:35.000Z
2021-11-22T18:02:36.000Z
pyscf/cc/__init__.py
r-peng/pyscf
9a14f9bcc63bc75f5939cb4d00eb47861d8d8989
[ "Apache-2.0" ]
null
null
null
pyscf/cc/__init__.py
r-peng/pyscf
9a14f9bcc63bc75f5939cb4d00eb47861d8d8989
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-2018 The PySCF Developers. 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 appl...
35.466292
101
0.665769
from pyscf.cc import ccsd from pyscf.cc import ccsd_lambda from pyscf.cc import ccsd_rdm from pyscf.cc import addons from pyscf.cc import rccsd from pyscf.cc import uccsd from pyscf.cc import gccsd from pyscf.cc import eom_rccsd from pyscf.cc import eom_uccsd from pyscf.cc import eom_gccsd from pyscf import scf def ...
true
true
f75877f256341e5bddecf60c43152f92383e0179
15,107
py
Python
test/functional/wallet_listtransactions.py
apokalyzr/bitcoin
5b4b8f76f3ae11064d4aa3ac157558e364751fd2
[ "MIT" ]
65,371
2015-01-01T06:52:02.000Z
2022-03-31T23:29:23.000Z
test/functional/wallet_listtransactions.py
apokalyzr/bitcoin
5b4b8f76f3ae11064d4aa3ac157558e364751fd2
[ "MIT" ]
18,259
2015-01-01T03:22:57.000Z
2022-03-31T23:18:25.000Z
test/functional/wallet_listtransactions.py
apokalyzr/bitcoin
5b4b8f76f3ae11064d4aa3ac157558e364751fd2
[ "MIT" ]
28,827
2015-01-01T00:25:45.000Z
2022-03-31T23:48:15.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the listtransactions API.""" from decimal import Decimal import os import shutil from test_frame...
52.093103
150
0.616933
from decimal import Decimal import os import shutil from test_framework.messages import ( COIN, tx_from_hex, ) from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_array_result, assert_equal, assert_raises_rpc_error, ) class ListTransactionsTest...
true
true
f75878a71688b613b37bad25492bb5aa13c1bae2
708
py
Python
app/models/games.py
chrislaskey/kingdom
be82551824adadfc0c70e08b188eb45adae974c1
[ "MIT" ]
6
2015-02-17T23:40:42.000Z
2021-11-04T17:22:57.000Z
app/models/games.py
chrislaskey/kingdom
be82551824adadfc0c70e08b188eb45adae974c1
[ "MIT" ]
null
null
null
app/models/games.py
chrislaskey/kingdom
be82551824adadfc0c70e08b188eb45adae974c1
[ "MIT" ]
1
2020-12-15T16:01:57.000Z
2020-12-15T16:01:57.000Z
from . import db games_users = db.Table( 'games_users', db.Column('game_id', db.Integer(), db.ForeignKey('game.id')), db.Column('user_id', db.Integer(), db.ForeignKey('user.id')) ) class Game(db.Model): ''' status - text field game status, values created|declined|started|withdrew|ended ...
26.222222
67
0.618644
from . import db games_users = db.Table( 'games_users', db.Column('game_id', db.Integer(), db.ForeignKey('game.id')), db.Column('user_id', db.Integer(), db.ForeignKey('user.id')) ) class Game(db.Model): id = db.Column(db.Integer, primary_key=True) status = db.Column(db.String(255)) name = db...
true
true
f758790d250b3d764d0093aae0ddbceb9cdbdba3
7,852
py
Python
src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py
srinathnarayanan/azure-cli
b98bddc8dd18e6cb15fc44a6dc160b02a0bd255a
[ "MIT" ]
1
2019-03-30T20:49:32.000Z
2019-03-30T20:49:32.000Z
src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py
srinathnarayanan/azure-cli
b98bddc8dd18e6cb15fc44a6dc160b02a0bd255a
[ "MIT" ]
4
2018-08-08T20:01:17.000Z
2018-09-17T15:20:06.000Z
src/command_modules/azure-cli-profile/azure/cli/command_modules/profile/custom.py
srinathnarayanan/azure-cli
b98bddc8dd18e6cb15fc44a6dc160b02a0bd255a
[ "MIT" ]
1
2018-04-14T01:46:00.000Z
2018-04-14T01:46:00.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
40.061224
118
0.678171
from __future__ import print_function from knack.log import get_logger from knack.prompting import prompt_pass, NoTTYException from knack.util import CLIError from azure.cli.core._profile import Profile from azure.cli.core.util import in_cloud_console logger = get_logger(__name__) _CLOUD_CONSOLE_LOGOUT_WARNING = ...
true
true
f7587bd238a3f29f3aed5cdf9ee8568fa318382b
157
py
Python
liyi_cute/processor/tokenizers/__init__.py
daiyizheng/liyi-cute
2881a5e74a483a5e7a9fa1d9f16444f442735661
[ "Apache-2.0" ]
null
null
null
liyi_cute/processor/tokenizers/__init__.py
daiyizheng/liyi-cute
2881a5e74a483a5e7a9fa1d9f16444f442735661
[ "Apache-2.0" ]
null
null
null
liyi_cute/processor/tokenizers/__init__.py
daiyizheng/liyi-cute
2881a5e74a483a5e7a9fa1d9f16444f442735661
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2022/5/15 16:01 # @Author : Yizheng Dai # @Email : 387942239@qq.com # @File : __init__.py.py
26.166667
29
0.579618
true
true
f7587db5ecd4251ae6c89b5cb1fc0d82165654b9
9,814
py
Python
test/functional/p2p_blockfilters.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
test/functional/p2p_blockfilters.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
test/functional/p2p_blockfilters.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Vadercoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Tests NODE_COMPACT_FILTERS (BIP 157/158). Tests that a node configured with -blockfilterindex and -p...
37.891892
99
0.642653
from test_framework.messages import ( FILTER_TYPE_BASIC, NODE_COMPACT_FILTERS, hash256, msg_getcfcheckpt, msg_getcfheaders, msg_getcfilters, ser_uint256, uint256_from_str, ) from test_framework.p2p import P2PInterface from test_framework.test_framework import VadercoinTestFramework from...
true
true
f7587df850f1398706b06810556071a03d64723d
18,366
py
Python
conda/models/prefix_graph.py
forrestwaters/conda
0614e8108bf2ac392dcff2143d9b2e028a8623e9
[ "BSD-3-Clause" ]
1
2019-07-03T05:39:44.000Z
2019-07-03T05:39:44.000Z
conda/models/prefix_graph.py
al-yakubovich/conda
fa4c53f14216a8e94bbb04784195beef9545c8bc
[ "BSD-3-Clause" ]
null
null
null
conda/models/prefix_graph.py
al-yakubovich/conda
fa4c53f14216a8e94bbb04784195beef9545c8bc
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause from __future__ import absolute_import, division, print_function, unicode_literals from collections import defaultdict, OrderedDict from logging import getLogger from .enums import NoarchType from .match_spec import Mat...
39.076596
99
0.576881
from __future__ import absolute_import, division, print_function, unicode_literals from collections import defaultdict, OrderedDict from logging import getLogger from .enums import NoarchType from .match_spec import MatchSpec from .._vendor.boltons.setutils import IndexedSet from ..base.context import context from .....
true
true
f7587e8cd69fb9cb8fb04e790b3f09b5570a5e83
31
py
Python
pytemple/version.py
malczuuu/pytemple
66731e5fc55a64566f74904e0dab5cae17dd9af0
[ "MIT" ]
null
null
null
pytemple/version.py
malczuuu/pytemple
66731e5fc55a64566f74904e0dab5cae17dd9af0
[ "MIT" ]
null
null
null
pytemple/version.py
malczuuu/pytemple
66731e5fc55a64566f74904e0dab5cae17dd9af0
[ "MIT" ]
null
null
null
__version__ = "1.1.0-SNAPSHOT"
15.5
30
0.709677
__version__ = "1.1.0-SNAPSHOT"
true
true
f7587e8f3b87565e487482a59981cef07a5f45c6
324
py
Python
iCount/externals/__init__.py
genialis/iCount
80dba0f7292a364c62843d71e76c1b22e6268e14
[ "MIT" ]
null
null
null
iCount/externals/__init__.py
genialis/iCount
80dba0f7292a364c62843d71e76c1b22e6268e14
[ "MIT" ]
1
2021-09-30T12:55:37.000Z
2021-09-30T12:55:37.000Z
iCount/externals/__init__.py
ulelab/iCount
b9dc1b21b80e4dae77b3ac33734514091fbe3151
[ "MIT" ]
4
2021-03-23T12:38:55.000Z
2021-05-14T10:10:00.000Z
""".. Line to protect from pydocstyle D205, D400. Externals ========= A number of external software is needed for iCount to work. .. automodule:: iCount.externals.cutadapt :members: .. automodule:: iCount.externals.star :members: """ from . import cutadapt from . import star EXPECTED_CUTADAPT_VERSION = '1....
16.2
59
0.703704
from . import cutadapt from . import star EXPECTED_CUTADAPT_VERSION = '1.14'
true
true
f7587e985dae807443f615bbb8a004fd82e19d7e
1,376
py
Python
analysis_pb2_grpc.py
charliezon/stock_success
5deb7891122378dc9598da59a4142642c788d082
[ "Apache-2.0" ]
null
null
null
analysis_pb2_grpc.py
charliezon/stock_success
5deb7891122378dc9598da59a4142642c788d082
[ "Apache-2.0" ]
null
null
null
analysis_pb2_grpc.py
charliezon/stock_success
5deb7891122378dc9598da59a4142642c788d082
[ "Apache-2.0" ]
null
null
null
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import analysis_pb2 as analysis__pb2 class AnalysisStub(object): """The analysis service definition. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.RequireAnalysis...
29.276596
76
0.739826
import grpc import analysis_pb2 as analysis__pb2 class AnalysisStub(object): def __init__(self, channel): self.RequireAnalysis = channel.unary_unary( '/analysis.Analysis/RequireAnalysis', request_serializer=analysis__pb2.AnalysisRequest.SerializeToString, response_deserializer=analysis...
true
true
f7587f0db0b02be3fd2cb24364727cbbf361b25e
3,333
py
Python
okonf/facts/apt.py
hoh/Okonf
26b3629b20504bc1c4ee51f054df6a59e54427ae
[ "Apache-2.0" ]
1
2018-03-20T14:55:41.000Z
2018-03-20T14:55:41.000Z
okonf/facts/apt.py
hoh/Okonf
26b3629b20504bc1c4ee51f054df6a59e54427ae
[ "Apache-2.0" ]
null
null
null
okonf/facts/apt.py
hoh/Okonf
26b3629b20504bc1c4ee51f054df6a59e54427ae
[ "Apache-2.0" ]
null
null
null
import re from typing import Iterable, Dict, Tuple, Union, Optional from .abstract import Fact from ..connectors.abstract import Executor RE_UPGRADEABLE = r'([^\/]+)\/([^\s]+)\s+([^\s]+)\s+(\w+)\s+' \ r'\[upgradable from:\s+([^\s]+)\]$' def parse_upgradeable(lines: Iterable[str]) -> Iterable[Tuple[...
30.027027
96
0.569157
import re from typing import Iterable, Dict, Tuple, Union, Optional from .abstract import Fact from ..connectors.abstract import Executor RE_UPGRADEABLE = r'([^\/]+)\/([^\s]+)\s+([^\s]+)\s+(\w+)\s+' \ r'\[upgradable from:\s+([^\s]+)\]$' def parse_upgradeable(lines: Iterable[str]) -> Iterable[Tuple[...
true
true
f7587fa934ce0f88736c571411779ee12fff9e33
341
py
Python
myapi/resource_healthcheck.py
ChanReece/SoloProjectFalconAPI
2006b4905d13ceedf9de307110ff634c82caafd6
[ "MIT" ]
null
null
null
myapi/resource_healthcheck.py
ChanReece/SoloProjectFalconAPI
2006b4905d13ceedf9de307110ff634c82caafd6
[ "MIT" ]
null
null
null
myapi/resource_healthcheck.py
ChanReece/SoloProjectFalconAPI
2006b4905d13ceedf9de307110ff634c82caafd6
[ "MIT" ]
null
null
null
import json import falcon class HealthResource(object): def on_get(self, req, resp): """Handles GET requests""" response = {"status": "good"} as_string = json.dumps(response) # Set attributes of the Response which is sent to requestor resp.body = as_string resp.stat...
26.230769
67
0.639296
import json import falcon class HealthResource(object): def on_get(self, req, resp): response = {"status": "good"} as_string = json.dumps(response) resp.body = as_string resp.status = falcon.HTTP_200
true
true
f7587faac0a2360efe05e6517cc09c07bb821534
29,995
py
Python
src/transformers/configuration_utils.py
agemagician/transformers
666220fc6417505607148ffb19d172d5732e860a
[ "Apache-2.0" ]
2
2020-11-30T11:30:40.000Z
2021-03-26T17:20:33.000Z
src/transformers/configuration_utils.py
agemagician/transformers
666220fc6417505607148ffb19d172d5732e860a
[ "Apache-2.0" ]
1
2020-11-12T11:00:12.000Z
2020-11-12T11:00:12.000Z
src/transformers/configuration_utils.py
agemagician/transformers
666220fc6417505607148ffb19d172d5732e860a
[ "Apache-2.0" ]
1
2020-11-17T02:48:00.000Z
2020-11-17T02:48:00.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
52.9947
153
0.647275
import copy import json import os from typing import Any, Dict, Tuple from .file_utils import CONFIG_NAME, cached_path, hf_bucket_url, is_remote_url from .utils import logging logger = logging.get_logger(__name__) class PretrainedConfig(object): model_type: str = "" is_composition: bool = False def ...
true
true
f75880965757445e2894554b5a1aeb7c22827b73
1,193
py
Python
app/api/V1/__init__.py
eduhmik/Store-Manager-api
50395d39758800784fbd0b3e516b8bedc900cdeb
[ "MIT" ]
null
null
null
app/api/V1/__init__.py
eduhmik/Store-Manager-api
50395d39758800784fbd0b3e516b8bedc900cdeb
[ "MIT" ]
8
2018-10-24T01:33:32.000Z
2019-10-21T17:36:01.000Z
app/api/V1/__init__.py
eduhmik/Store-Manager-api
50395d39758800784fbd0b3e516b8bedc900cdeb
[ "MIT" ]
1
2018-10-19T21:57:48.000Z
2018-10-19T21:57:48.000Z
from flask_restplus import Api from flask import Blueprint # Import all endpoints for all models from .views.product_endpoints import api as product_namespace from .views.sales_endpoints import api as sales_namespace from .views.auth_endpoints import ns2 as userLogin_namespace from .views.auth_endpoints import api a...
39.766667
189
0.781224
from flask_restplus import Api from flask import Blueprint from .views.product_endpoints import api as product_namespace from .views.sales_endpoints import api as sales_namespace from .views.auth_endpoints import ns2 as userLogin_namespace from .views.auth_endpoints import api as userRegistration_namespace from .vi...
true
true
f75881a65d2c8ce321aa87f9ca19b4fb453e1416
415
py
Python
dev/import_excel.py
patarapolw/srs-sqlite
2985d7aed645b50f8a5f13acb7d7a518cf8e50cc
[ "MIT" ]
2
2019-05-09T03:51:00.000Z
2021-05-24T13:24:05.000Z
dev/import_excel.py
patarapolw/srs-sqlite
2985d7aed645b50f8a5f13acb7d7a518cf8e50cc
[ "MIT" ]
null
null
null
dev/import_excel.py
patarapolw/srs-sqlite
2985d7aed645b50f8a5f13acb7d7a518cf8e50cc
[ "MIT" ]
1
2021-10-29T22:15:46.000Z
2021-10-29T22:15:46.000Z
import pyexcel from . import db from .databases import SrsRecord, SrsTuple def import_excel(filename, sheet_name): for record in pyexcel.iget_records(file_name=filename, sheet_name=sheet_name): if SrsRecord.query.filter_by(front=record['Front']).first() is None: srs_record = SrsRecord(**SrsTu...
29.642857
82
0.708434
import pyexcel from . import db from .databases import SrsRecord, SrsTuple def import_excel(filename, sheet_name): for record in pyexcel.iget_records(file_name=filename, sheet_name=sheet_name): if SrsRecord.query.filter_by(front=record['Front']).first() is None: srs_record = SrsRecord(**SrsTu...
true
true
f7588203fcdac1f0885a394335356883d4e52169
7,843
py
Python
test/python/topology/test2_consistent_region_config.py
Jaimie-Jin1/streamsx.topology
6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08
[ "Apache-2.0" ]
31
2015-06-24T06:21:14.000Z
2020-08-28T21:45:50.000Z
test/python/topology/test2_consistent_region_config.py
Jaimie-Jin1/streamsx.topology
6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08
[ "Apache-2.0" ]
1,203
2015-06-15T02:11:49.000Z
2021-03-22T09:47:54.000Z
test/python/topology/test2_consistent_region_config.py
Jaimie-Jin1/streamsx.topology
6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08
[ "Apache-2.0" ]
53
2015-05-28T21:14:16.000Z
2021-12-23T12:58:59.000Z
from streamsx.topology.topology import * from streamsx.topology.state import ConsistentRegionConfig import unittest from datetime import timedelta # Test the ConsistentRegionConfig class. class TestConsistentRegionConfig(unittest.TestCase): _DEFAULT_DRAIN_TIMEOUT = 180.0 _DEFAULT_RESET_TIMEOUT = 180.0 _DE...
43.093407
118
0.729058
from streamsx.topology.topology import * from streamsx.topology.state import ConsistentRegionConfig import unittest from datetime import timedelta class TestConsistentRegionConfig(unittest.TestCase): _DEFAULT_DRAIN_TIMEOUT = 180.0 _DEFAULT_RESET_TIMEOUT = 180.0 _DEFAULT_ATTEMPTS = 5 def test_op_drive...
true
true
f7588218086ff9488994abb0241c1311dd7c9aec
23,842
py
Python
statsmodels/tsa/vector_ar/irf.py
toobaz/statsmodels
5286dd713a809b0630232508bf9ad5104aae1980
[ "BSD-3-Clause" ]
10
2016-05-18T11:46:33.000Z
2018-12-23T04:52:27.000Z
statsmodels/tsa/vector_ar/irf.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
1
2021-09-11T14:30:32.000Z
2021-09-11T14:30:32.000Z
statsmodels/tsa/vector_ar/irf.py
AnaMP/statsmodels
2d4aad9a14619ce0c84d4c7bca9dacd66b2be566
[ "BSD-3-Clause" ]
3
2015-04-01T08:26:54.000Z
2020-02-14T14:34:10.000Z
""" Impulse reponse-related code """ from __future__ import division import numpy as np import numpy.linalg as la import scipy.linalg as L from scipy import stats from statsmodels.tools.decorators import cache_readonly from statsmodels.tools.tools import chain_dot #from statsmodels.tsa.api import VAR import statsm...
34.354467
118
0.529108
from __future__ import division import numpy as np import numpy.linalg as la import scipy.linalg as L from scipy import stats from statsmodels.tools.decorators import cache_readonly from statsmodels.tools.tools import chain_dot import statsmodels.tsa.tsatools as tsa import statsmodels.tsa.vector_ar.plotting as plo...
true
true
f758824f5bb8d4258e4f9ffa6a13c9303f6b9a90
7,044
py
Python
pyrex/seed.py
pyrex-coin/pyrex-python
03872f839db305170b0f14e0101c33d46cc8476f
[ "BSD-3-Clause" ]
null
null
null
pyrex/seed.py
pyrex-coin/pyrex-python
03872f839db305170b0f14e0101c33d46cc8476f
[ "BSD-3-Clause" ]
null
null
null
pyrex/seed.py
pyrex-coin/pyrex-python
03872f839db305170b0f14e0101c33d46cc8476f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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 withou...
39.351955
126
0.658007
from pyrex import wordlists from pyrex import ed25519 from pyrex import base58 from pyrex.address import address from binascii import hexlify, unhexlify from os import urandom from sha3 import keccak_256 class Seed(object): def __init__(self, phrase_or_hex="", wordlist="English"): self.phrase = "" ...
true
true
f75882bdac8453e2aaad9c07e3baa2eb1269dbd5
682
py
Python
projects/migrations/0003_auto_20180403_2232.py
farispriadi/proman-python
e5b4d9238f1b769a89e6885ec8c923735db19563
[ "MIT" ]
55
2019-12-13T09:30:23.000Z
2021-07-19T10:34:15.000Z
projects/migrations/0003_auto_20180403_2232.py
farispriadi/proman-python
e5b4d9238f1b769a89e6885ec8c923735db19563
[ "MIT" ]
7
2020-02-11T21:59:48.000Z
2021-07-12T17:49:14.000Z
projects/migrations/0003_auto_20180403_2232.py
farispriadi/proman-python
e5b4d9238f1b769a89e6885ec8c923735db19563
[ "MIT" ]
40
2019-12-13T09:30:30.000Z
2021-07-15T11:19:43.000Z
# Generated by Django 2.0.3 on 2018-04-04 01:32 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0002_auto_20180402_2041'), ] operations = [ migrations.AlterField( model_name='proj...
27.28
104
0.6261
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0002_auto_20180402_2041'), ] operations = [ migrations.AlterField( model_name='project', name='company', fi...
true
true
f75882db6f36610a2b744ed2975b180df0458fbc
1,099
py
Python
colab/apps/voting/models.py
caseywstark/colab
e05293e45a657eda19d733bf05624a1613a7a9b7
[ "MIT" ]
1
2015-11-05T11:49:32.000Z
2015-11-05T11:49:32.000Z
colab/apps/voting/models.py
caseywstark/colab
e05293e45a657eda19d733bf05624a1613a7a9b7
[ "MIT" ]
null
null
null
colab/apps/voting/models.py
caseywstark/colab
e05293e45a657eda19d733bf05624a1613a7a9b7
[ "MIT" ]
null
null
null
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), ) class Vote(models.Model): """ ...
28.179487
73
0.646952
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), ) class Vote(models.Model): user = ...
true
true
f75882de0e0a3b46cd7df05193d7b8b344728673
1,379
py
Python
data-structures/Starters PA1/check_brackets.py
richardson-souza/coursera-dsa
0b77c5420b40efb80cded4405960baf75d6a334b
[ "MIT" ]
null
null
null
data-structures/Starters PA1/check_brackets.py
richardson-souza/coursera-dsa
0b77c5420b40efb80cded4405960baf75d6a334b
[ "MIT" ]
null
null
null
data-structures/Starters PA1/check_brackets.py
richardson-souza/coursera-dsa
0b77c5420b40efb80cded4405960baf75d6a334b
[ "MIT" ]
null
null
null
# python3 import sys class Bracket: def __init__(self, bracket_type, position): self.bracket_type = bracket_type self.position = position def Match(self, c): if self.bracket_type == '[' and c == ']': return True if self.bracket_type == '{' and c == '}': ...
29.978261
85
0.499637
import sys class Bracket: def __init__(self, bracket_type, position): self.bracket_type = bracket_type self.position = position def Match(self, c): if self.bracket_type == '[' and c == ']': return True if self.bracket_type == '{' and c == '}': ...
true
true
f7588340fa0788abf074db66287f0698e0b35484
5,956
py
Python
FlaskApp/database_setup.py
robertavram/project5
12a2816b84be994b561f2f693cf34c0fa4f0ca19
[ "Apache-2.0" ]
7
2015-09-20T22:11:01.000Z
2021-11-09T18:04:47.000Z
FlaskApp/database_setup.py
robertavram/project5
12a2816b84be994b561f2f693cf34c0fa4f0ca19
[ "Apache-2.0" ]
9
2020-03-24T15:24:59.000Z
2022-03-11T23:13:00.000Z
FlaskApp/database_setup.py
robertavram/project5
12a2816b84be994b561f2f693cf34c0fa4f0ca19
[ "Apache-2.0" ]
2
2016-03-06T00:30:54.000Z
2017-04-06T10:15:06.000Z
from sqlalchemy import Column, ForeignKey, Integer, String, TIMESTAMP, LargeBinary from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy.orm.exc import NoResultFound from sqlalchemy import create_engine, func import other_info Base = declarative_base() clas...
28.634615
138
0.602586
from sqlalchemy import Column, ForeignKey, Integer, String, TIMESTAMP, LargeBinary from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy.orm.exc import NoResultFound from sqlalchemy import create_engine, func import other_info Base = declarative_base() clas...
true
true
f75883d618bc52eac9329f62b3d30338f7ecc32f
310
py
Python
.github/git_version.py
DasBasti/IndiaNavi_Firmware
81d75ec775b574a400c9e0353ffdd29c671cce60
[ "MIT" ]
7
2021-05-28T08:15:24.000Z
2021-07-09T15:21:50.000Z
.github/git_version.py
DasBasti/IndiaNavi_Firmware
81d75ec775b574a400c9e0353ffdd29c671cce60
[ "MIT" ]
null
null
null
.github/git_version.py
DasBasti/IndiaNavi_Firmware
81d75ec775b574a400c9e0353ffdd29c671cce60
[ "MIT" ]
1
2021-06-18T08:45:13.000Z
2021-06-18T08:45:13.000Z
import subprocess import datetime dt_date = datetime.datetime.now() revision = ( subprocess.check_output(["git", "describe", "--abbrev=7", "--dirty", "--always", "--tags"]) .strip() .decode("utf-8") ) print("-DGIT_HASH='\"Version: %s built: %s\"'" % (revision, dt_date.strftime("%d %b %Y %H:%M")))
31
96
0.612903
import subprocess import datetime dt_date = datetime.datetime.now() revision = ( subprocess.check_output(["git", "describe", "--abbrev=7", "--dirty", "--always", "--tags"]) .strip() .decode("utf-8") ) print("-DGIT_HASH='\"Version: %s built: %s\"'" % (revision, dt_date.strftime("%d %b %Y %H:%M")))
true
true
f75884fd88d4d24436da1f213ad6c6b04570b89a
851
py
Python
edge_GitCommit.py
santarini/python
8f1d576d59b7c9ca23c3d80058fa2d14833c54ae
[ "MIT" ]
3
2017-12-22T09:33:18.000Z
2020-07-06T04:53:00.000Z
edge_GitCommit.py
santarini/python
8f1d576d59b7c9ca23c3d80058fa2d14833c54ae
[ "MIT" ]
null
null
null
edge_GitCommit.py
santarini/python
8f1d576d59b7c9ca23c3d80058fa2d14833c54ae
[ "MIT" ]
null
null
null
import time import datetime import random from selenium import webdriver driver = webdriver.Edge('C:\Program Files\Python\MicrosoftWebDriver.exe') driver.get('https://github.com/santarini/seleniumPushes/blob/master/pythonlog.md'); rand1 = random.uniform(3,10) time.sleep(rand1)#arbitrary sleep time page_body = driver.f...
38.681818
83
0.772033
import time import datetime import random from selenium import webdriver driver = webdriver.Edge('C:\Program Files\Python\MicrosoftWebDriver.exe') driver.get('https://github.com/santarini/seleniumPushes/blob/master/pythonlog.md'); rand1 = random.uniform(3,10) time.sleep(rand1)page_body = driver.find_element_by_tag_nam...
true
true
f75885156726c855f24a287c18702c5bc9b5cba5
588
py
Python
Geometry/HcalAlgo/python/testGeomHB_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
1
2018-07-25T03:57:34.000Z
2018-07-25T03:57:34.000Z
Geometry/HcalAlgo/python/testGeomHB_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
Geometry/HcalAlgo/python/testGeomHB_cfi.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
2
2019-09-27T08:33:22.000Z
2019-11-14T10:52:30.000Z
import FWCore.ParameterSet.Config as cms XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/HcalCommonData/data/hcalrotations.xml', 'G...
39.2
76
0.702381
import FWCore.ParameterSet.Config as cms XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/HcalCommonData/data/hcalrotations.xml', 'G...
true
true
f75885baea76b312a7884a4534252f9791fafd1a
267
py
Python
example.py
Questionable-Research-Labs/NOERA
0224c857df07c0b012ec057c496dfeb9909a0a84
[ "MIT" ]
null
null
null
example.py
Questionable-Research-Labs/NOERA
0224c857df07c0b012ec057c496dfeb9909a0a84
[ "MIT" ]
null
null
null
example.py
Questionable-Research-Labs/NOERA
0224c857df07c0b012ec057c496dfeb9909a0a84
[ "MIT" ]
null
null
null
from OdrvWrapper.odrv_wrapper import Odrive_Arm import random print("Initialize") arm = Odrive_Arm() while True: # Move to random point, this blocks the thread until the move is complete arm.move_blocking( (random.random(),random.random(),random.random()))
26.7
77
0.756554
from OdrvWrapper.odrv_wrapper import Odrive_Arm import random print("Initialize") arm = Odrive_Arm() while True: arm.move_blocking( (random.random(),random.random(),random.random()))
true
true
f758871a2c74dcf25c5b0d7f81e465f7084b849e
6,672
py
Python
SNDG/Sequence/Assembly.py
ezequieljsosa/sndg-bio
5f709b5b572564ec1dfa40d090eca9a34295743e
[ "MIT" ]
null
null
null
SNDG/Sequence/Assembly.py
ezequieljsosa/sndg-bio
5f709b5b572564ec1dfa40d090eca9a34295743e
[ "MIT" ]
null
null
null
SNDG/Sequence/Assembly.py
ezequieljsosa/sndg-bio
5f709b5b572564ec1dfa40d090eca9a34295743e
[ "MIT" ]
1
2020-09-01T15:57:54.000Z
2020-09-01T15:57:54.000Z
""" """ import os import shutil from SNDG import execute, mkdir import Bio.SeqIO as bpio import multiprocessing class Assembly: SPADES_DOCKER_IMAGE = 'ezequieljsosa/spades' @staticmethod def assemble_pe(r1: str, r2: str, out: str, name: str , ss: str = None, trusted_contigs: str = None, ...
44.48
157
0.557854
import os import shutil from SNDG import execute, mkdir import Bio.SeqIO as bpio import multiprocessing class Assembly: SPADES_DOCKER_IMAGE = 'ezequieljsosa/spades' @staticmethod def assemble_pe(r1: str, r2: str, out: str, name: str , ss: str = None, trusted_contigs: str = None, untrus...
true
true
f758877877b55be5b882964cd025edb18b30bee4
31,250
py
Python
prescient/engine/egret/egret_plugin.py
shrivats-pu/Prescient
3d4238e98ddd767e2b81adc4091bb723dbf563d3
[ "BSD-3-Clause" ]
1
2021-10-14T20:39:50.000Z
2021-10-14T20:39:50.000Z
prescient/engine/egret/egret_plugin.py
shrivats-pu/Prescient
3d4238e98ddd767e2b81adc4091bb723dbf563d3
[ "BSD-3-Clause" ]
null
null
null
prescient/engine/egret/egret_plugin.py
shrivats-pu/Prescient
3d4238e98ddd767e2b81adc4091bb723dbf563d3
[ "BSD-3-Clause" ]
null
null
null
# ___________________________________________________________________________ # # Prescient # Copyright 2020 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. # Government retains certain rights in this software. # This software is ...
46.921922
147
0.639744
from __future__ import annotations import os import math import logging import datetime import dateutil from pyomo.environ import value, Suffix from egret.common.log import logger as egret_logger from egret.data.model_data import ModelData from egret.parsers.prescient_dat_parser import get_uc_model, create_model_dat...
true
true
f758883322b50b4af838bf244c429874f32195a5
20,587
py
Python
nautobot/ipam/tests/test_api.py
steffann/nautobot
f5cf4a294861e69fa10ac445f7fc89f432d5b3df
[ "Apache-2.0" ]
1
2021-03-16T15:14:55.000Z
2021-03-16T15:14:55.000Z
nautobot/ipam/tests/test_api.py
steffann/nautobot
f5cf4a294861e69fa10ac445f7fc89f432d5b3df
[ "Apache-2.0" ]
null
null
null
nautobot/ipam/tests/test_api.py
steffann/nautobot
f5cf4a294861e69fa10ac445f7fc89f432d5b3df
[ "Apache-2.0" ]
1
2021-10-14T01:54:24.000Z
2021-10-14T01:54:24.000Z
import json from django.urls import reverse from netaddr import IPNetwork from rest_framework import status from nautobot.dcim.models import Device, DeviceRole, DeviceType, Manufacturer, Site from nautobot.extras.models import Status from nautobot.ipam.choices import * from nautobot.ipam.models import ( Aggregate...
34.084437
113
0.563802
import json from django.urls import reverse from netaddr import IPNetwork from rest_framework import status from nautobot.dcim.models import Device, DeviceRole, DeviceType, Manufacturer, Site from nautobot.extras.models import Status from nautobot.ipam.choices import * from nautobot.ipam.models import ( Aggregate...
true
true
f758885d9cf27353c92bd76a4683559edb8cf4af
1,113
py
Python
test/model/test_address.py
Trulioo/sdk-python
3bf0530e2ba1a3ec93d89b967b2e257e7401d5c2
[ "RSA-MD" ]
1
2022-01-11T12:08:45.000Z
2022-01-11T12:08:45.000Z
test/model/test_address.py
Trulioo/sdk-python
3bf0530e2ba1a3ec93d89b967b2e257e7401d5c2
[ "RSA-MD" ]
null
null
null
test/model/test_address.py
Trulioo/sdk-python
3bf0530e2ba1a3ec93d89b967b2e257e7401d5c2
[ "RSA-MD" ]
1
2021-05-17T08:33:15.000Z
2021-05-17T08:33:15.000Z
import unittest from trulioo_sdk.model.address import Address from trulioo_sdk.exceptions import ApiAttributeError, ApiTypeError from trulioo_sdk.configuration import Configuration class TestAddress(unittest.TestCase): def test_address(self): address = Address( unit_number="123", ...
28.538462
82
0.628032
import unittest from trulioo_sdk.model.address import Address from trulioo_sdk.exceptions import ApiAttributeError, ApiTypeError from trulioo_sdk.configuration import Configuration class TestAddress(unittest.TestCase): def test_address(self): address = Address( unit_number="123", ...
true
true
f75888859c0cfed0e889a84bb162d512a567feff
14,836
py
Python
identify-imagery/nagap/identify-imagery-70s-90s.py
elischwat/hsfm-geomorph
ddd7cd8a5434d04fef9cab7f16f15e7efde868c8
[ "MIT" ]
null
null
null
identify-imagery/nagap/identify-imagery-70s-90s.py
elischwat/hsfm-geomorph
ddd7cd8a5434d04fef9cab7f16f15e7efde868c8
[ "MIT" ]
null
null
null
identify-imagery/nagap/identify-imagery-70s-90s.py
elischwat/hsfm-geomorph
ddd7cd8a5434d04fef9cab7f16f15e7efde868c8
[ "MIT" ]
1
2020-12-22T06:25:46.000Z
2020-12-22T06:25:46.000Z
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.5.2 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- #...
32.895787
164
0.700593
import matplotlib.pyplot as plt from PIL import Image import numpy as np import matplotlib.pyplot as plt import contextily as ctx import os import cv2 import fiona import geopandas as gpd import re import pandas as pd gpd.io.file.fiona.drvsupport.supported_drivers['KML'] = 'rw' data_dir = '/data2/elilouis/hsfm-ge...
true
true
f7588a4b295e1222c1990c2f40eddbe9fd56575b
4,371
py
Python
lib/envs/blackjack.py
noahwoo/rl-sutton
246d556fb3b05727d042254bdb7786d8c57ee5e5
[ "MIT" ]
2
2019-08-12T03:14:48.000Z
2019-08-18T02:49:47.000Z
lib/envs/blackjack.py
noahwoo/rl-sutton
246d556fb3b05727d042254bdb7786d8c57ee5e5
[ "MIT" ]
null
null
null
lib/envs/blackjack.py
noahwoo/rl-sutton
246d556fb3b05727d042254bdb7786d8c57ee5e5
[ "MIT" ]
null
null
null
import gym from gym import spaces from gym.utils import seeding def cmp(a, b): return int((a > b)) - int((a < b)) # 1 = Ace, 2-10 = Number cards, Jack/Queen/King = 10 deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10] def draw_card(np_random): return np_random.choice(deck) def draw_hand(np_random): # ...
35.25
79
0.639442
import gym from gym import spaces from gym.utils import seeding def cmp(a, b): return int((a > b)) - int((a < b)) deck = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10] def draw_card(np_random): return np_random.choice(deck) def draw_hand(np_random): return [draw_card(np_random), draw_card(np_random)]...
true
true
f7588bde7da83036be56b89325650c80f08b2203
2,358
py
Python
source/tests/cdk_solution_helper/test_mappings.py
turnoutnow/maintaining-personalized-experiences-with-machine-learning
b45588c094734cce70198811890a28e65b8e39e1
[ "Apache-2.0" ]
1
2021-09-23T23:27:42.000Z
2021-09-23T23:27:42.000Z
source/tests/cdk_solution_helper/test_mappings.py
turnoutnow/maintaining-personalized-experiences-with-machine-learning
b45588c094734cce70198811890a28e65b8e39e1
[ "Apache-2.0" ]
null
null
null
source/tests/cdk_solution_helper/test_mappings.py
turnoutnow/maintaining-personalized-experiences-with-machine-learning
b45588c094734cce70198811890a28e65b8e39e1
[ "Apache-2.0" ]
null
null
null
# ###################################################################################################################### # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
60.461538
120
0.45335
import pytest from aws_cdk.core import App, Stack from aws_solutions.cdk.mappings import Mappings @pytest.mark.parametrize("send_data,result", [(True, "Yes"), (False, "No")]) def test_mappings(send_data, result): solution_id = "SO001" app = App() stack = Stack(app) Mappings(stack, solution_id=solutio...
true
true
f7588d44cb8da63378c4309c95ca342a22bf2406
172,392
py
Python
languages/prs.py
kachelundmacher/edensahana
a02eb996d60f42e61c7e4678efff9fe584918358
[ "MIT" ]
null
null
null
languages/prs.py
kachelundmacher/edensahana
a02eb996d60f42e61c7e4678efff9fe584918358
[ "MIT" ]
null
null
null
languages/prs.py
kachelundmacher/edensahana
a02eb996d60f42e61c7e4678efff9fe584918358
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- { "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": "یک موقعیت که منطقه جغرافیایی را برای این ساحه مشخص می کند. این یک موقعیت از سلسله موقعیت ها یا 'موقعیت ...
54.58898
476
0.723189
{ "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": "یک موقعیت که منطقه جغرافیایی را برای این ساحه مشخص می کند. این یک موقعیت از سلسله موقعیت ها یا 'موقعیت گروپ' یا موقعیت است که د...
true
true
f7588d71096d7276b2623b8b9ad49808a0c26462
9,741
py
Python
nflfastpy/utils.py
jbf302/nflfastpy
c1e2365966e0f0f8efeb651be804d84caba57807
[ "MIT" ]
1
2021-09-23T19:00:01.000Z
2021-09-23T19:00:01.000Z
nflfastpy/utils.py
jbf302/nflfastpy
c1e2365966e0f0f8efeb651be804d84caba57807
[ "MIT" ]
null
null
null
nflfastpy/utils.py
jbf302/nflfastpy
c1e2365966e0f0f8efeb651be804d84caba57807
[ "MIT" ]
null
null
null
import codecs import numpy as np import pandas as pd pd.options.mode.chained_assignment = None # default='warn' def convert_to_gsis_id(new_id): """ Convert new player id columns to old gsis id """ if type(new_id) == float: return new_id return codecs.decode(new_id[4:-8].replace('-', ''), ...
36.897727
175
0.6718
import codecs import numpy as np import pandas as pd pd.options.mode.chained_assignment = None def convert_to_gsis_id(new_id): if type(new_id) == float: return new_id return codecs.decode(new_id[4:-8].replace('-', ''), "hex").decode('utf-8') def agg_stats(pbp, by_team=True): list_of_teams = ['...
true
true
f7588dfbd59bdc53c075bf68df376c2e396a8db2
3,925
py
Python
clean_urls.py
lukkiddd/thai_websites_crawler
dbc2175d7c1923dd2b3840de6b70b937f594f68a
[ "Apache-2.0" ]
6
2020-03-26T04:21:32.000Z
2021-06-07T12:50:12.000Z
clean_urls.py
lukkiddd/thai_websites_crawler
dbc2175d7c1923dd2b3840de6b70b937f594f68a
[ "Apache-2.0" ]
null
null
null
clean_urls.py
lukkiddd/thai_websites_crawler
dbc2175d7c1923dd2b3840de6b70b937f594f68a
[ "Apache-2.0" ]
3
2020-05-06T06:46:16.000Z
2021-06-07T12:50:06.000Z
import requests import json import re import tqdm import multiprocessing from functools import partial import argparse def get_parallel_url(from_url, lang_from='th', lang_to='en'): d = {f'{lang_from}_url':'',f'{lang_to}_url':''} to_url = from_url.replace(f'/{lang_from}/',f'/{lang_to}/') blank_url = from_ur...
33.547009
116
0.602038
import requests import json import re import tqdm import multiprocessing from functools import partial import argparse def get_parallel_url(from_url, lang_from='th', lang_to='en'): d = {f'{lang_from}_url':'',f'{lang_to}_url':''} to_url = from_url.replace(f'/{lang_from}/',f'/{lang_to}/') blank_url = from_ur...
false
true
f7588e8e67b4b563b51c867f87215811f02b9129
888
py
Python
userbot/modules/help.py
Davotsutsuki/jembot
f107d345b25af04dda7e2c647c06d135290da1f2
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/help.py
Davotsutsuki/jembot
f107d345b25af04dda7e2c647c06d135290da1f2
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/help.py
Davotsutsuki/jembot
f107d345b25af04dda7e2c647c06d135290da1f2
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # """Userbot help command""" from userbot import CMD_HELP from userbot.events import register @register(outgoing=True,...
32.888889
101
0.619369
from userbot import CMD_HELP from userbot.events import register @register(outgoing=True, pattern="^.tolong(?: |$)(.*)") async def help(event): args = event.pattern_match.group(1).lower() if args: if args in CMD_HELP: await event.edit(str(CMD_HELP[args])) else: await e...
true
true
f7588f9831b205911cfc6947c1635fc66ee469d0
1,879
py
Python
tests/test_commands.py
justengel/pybk8500
6a9748033c783a0081ec391359067dfb9dc83760
[ "MIT" ]
null
null
null
tests/test_commands.py
justengel/pybk8500
6a9748033c783a0081ec391359067dfb9dc83760
[ "MIT" ]
null
null
null
tests/test_commands.py
justengel/pybk8500
6a9748033c783a0081ec391359067dfb9dc83760
[ "MIT" ]
null
null
null
def test_names_to_values(): import pybk8500 cmd = pybk8500.CommandStatus(status=0x90) assert cmd.status == 'Checksum incorrect' assert cmd[3] == 0x90 cmd = pybk8500.CommandStatus(status='Parameter incorrect') assert cmd.status == 'Parameter incorrect' assert cmd[3] == 0xA0 cmd = pybk8...
29.359375
73
0.646088
def test_names_to_values(): import pybk8500 cmd = pybk8500.CommandStatus(status=0x90) assert cmd.status == 'Checksum incorrect' assert cmd[3] == 0x90 cmd = pybk8500.CommandStatus(status='Parameter incorrect') assert cmd.status == 'Parameter incorrect' assert cmd[3] == 0xA0 cmd = pybk8...
true
true
f7588fed95772828447244f7b051a54c93e9fc51
2,935
py
Python
v1.0.0.test/toontown/building/DistributedTrophyMgrAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v1.0.0.test/toontown/building/DistributedTrophyMgrAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v1.0.0.test/toontown/building/DistributedTrophyMgrAI.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
from operator import itemgetter from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.toonbase import TTLocalizer class DistributedTrophyMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTro...
35.792683
86
0.58569
from operator import itemgetter from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.toonbase import TTLocalizer class DistributedTrophyMgrAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedTro...
true
true
f7589058c5f5335de99e25040ea928e9c5ef8809
119
py
Python
tests/handler.py
liranbg/nuclio-jupyter
f355fbdd9a2a5eca46443de4cc691b6da54c19c9
[ "Apache-2.0" ]
null
null
null
tests/handler.py
liranbg/nuclio-jupyter
f355fbdd9a2a5eca46443de4cc691b6da54c19c9
[ "Apache-2.0" ]
null
null
null
tests/handler.py
liranbg/nuclio-jupyter
f355fbdd9a2a5eca46443de4cc691b6da54c19c9
[ "Apache-2.0" ]
null
null
null
def handler(context, event): context.logger.info('This is an unstructured log') return 'Hello, from Nuclio :]'
29.75
54
0.697479
def handler(context, event): context.logger.info('This is an unstructured log') return 'Hello, from Nuclio :]'
true
true
f7589174dd71f66343df9fc9bf22ff6ab60067da
14,873
py
Python
numba/dppl/ocl/oclimpl.py
DrTodd13/numba
de35af55d295f1677cca76646691d8c51c79d3cf
[ "BSD-2-Clause" ]
null
null
null
numba/dppl/ocl/oclimpl.py
DrTodd13/numba
de35af55d295f1677cca76646691d8c51c79d3cf
[ "BSD-2-Clause" ]
null
null
null
numba/dppl/ocl/oclimpl.py
DrTodd13/numba
de35af55d295f1677cca76646691d8c51c79d3cf
[ "BSD-2-Clause" ]
null
null
null
from __future__ import print_function, absolute_import, division import operator from functools import reduce from llvmlite import ir from llvmlite.llvmpy.core import Type import llvmlite.llvmpy.core as lc import llvmlite.binding as ll from numba.core.imputils import Registry from numba.core import cgutils, types fr...
36.542998
110
0.625227
from __future__ import print_function, absolute_import, division import operator from functools import reduce from llvmlite import ir from llvmlite.llvmpy.core import Type import llvmlite.llvmpy.core as lc import llvmlite.binding as ll from numba.core.imputils import Registry from numba.core import cgutils, types fr...
true
true
f75891ce997283d3d63380144ab48b4a432e1c0e
276
py
Python
MECboard/migrations/0006_merge_20190722_1723.py
HwangToLee/MEC
656cc1b72a15fd546ddc59825e51a4782683276c
[ "MIT" ]
1
2019-07-18T15:43:12.000Z
2019-07-18T15:43:12.000Z
MECboard/migrations/0006_merge_20190722_1723.py
HwangToLee/MEC
656cc1b72a15fd546ddc59825e51a4782683276c
[ "MIT" ]
null
null
null
MECboard/migrations/0006_merge_20190722_1723.py
HwangToLee/MEC
656cc1b72a15fd546ddc59825e51a4782683276c
[ "MIT" ]
6
2019-07-17T07:59:14.000Z
2019-09-12T04:08:37.000Z
# Generated by Django 2.2.3 on 2019-07-22 08:23 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('MECboard', '0004_merge_20190722_1200'), ('MECboard', '0005_auto_20190722_1610'), ] operations = [ ]
18.4
49
0.652174
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('MECboard', '0004_merge_20190722_1200'), ('MECboard', '0005_auto_20190722_1610'), ] operations = [ ]
true
true
f75891f1a0eb3bee8f326bdb5e59d332d2b32be4
91,244
py
Python
lib/galaxy/selenium/navigates_galaxy.py
itisAliRH/galaxy
b3b693ea0788f773442c8481472a87f43ccb10d7
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/selenium/navigates_galaxy.py
itisAliRH/galaxy
b3b693ea0788f773442c8481472a87f43ccb10d7
[ "CC-BY-3.0" ]
6
2021-11-11T20:57:49.000Z
2021-12-10T15:30:33.000Z
lib/galaxy/selenium/navigates_galaxy.py
itisAliRH/galaxy
b3b693ea0788f773442c8481472a87f43ccb10d7
[ "CC-BY-3.0" ]
null
null
null
"""A mixing that extends a HasDriver class with Galaxy-specific utilities. Implementer must provide a self.build_url method to target Galaxy. """ import collections import contextlib import random import string import time from abc import abstractmethod from functools import ( partial, wraps, ) from typing im...
43.888408
196
0.69792
import collections import contextlib import random import string import time from abc import abstractmethod from functools import ( partial, wraps, ) from typing import ( Any, cast, Dict, Optional, Union, ) import requests import yaml from selenium.webdriver.common.keys import Keys from se...
true
true
f75891f60378cb97a03f5b77287652bbf6c996ec
137
py
Python
3.Python/Jcupzz.py
tony21122000/Learn-Coding
11862f3a372069693bd381b1f99063d95d3b2b65
[ "MIT" ]
54
2020-10-01T07:06:36.000Z
2021-10-21T03:24:30.000Z
3.Python/Jcupzz.py
tony21122000/Learn-Coding
11862f3a372069693bd381b1f99063d95d3b2b65
[ "MIT" ]
19
2020-10-01T13:04:55.000Z
2020-10-27T06:10:52.000Z
3.Python/Jcupzz.py
tony21122000/Learn-Coding
11862f3a372069693bd381b1f99063d95d3b2b65
[ "MIT" ]
97
2020-10-01T07:07:17.000Z
2021-10-21T03:25:20.000Z
name, age = "Jacob Ranjit", 19 username = "Jcupzz" print ('Hello!') print("Name: {}\nAge: {}\nUsername: {}".format(name, age, username))
27.4
68
0.635036
name, age = "Jacob Ranjit", 19 username = "Jcupzz" print ('Hello!') print("Name: {}\nAge: {}\nUsername: {}".format(name, age, username))
true
true
f758933ac6ae472adc87934328c6e2ce4429dabf
1,852
py
Python
tldevice/tl_cmd_devinfo.py
stefanvanherwijnen/tio-python
cb929e03edae975631debd52ca71c3264bff5f53
[ "MIT" ]
9
2017-12-21T16:21:49.000Z
2021-12-02T20:48:03.000Z
tldevice/tl_cmd_devinfo.py
stefanvanherwijnen/tio-python
cb929e03edae975631debd52ca71c3264bff5f53
[ "MIT" ]
5
2018-12-14T22:06:08.000Z
2021-09-30T17:33:53.000Z
tldevice/tl_cmd_devinfo.py
stefanvanherwijnen/tio-python
cb929e03edae975631debd52ca71c3264bff5f53
[ "MIT" ]
4
2017-12-27T12:46:34.000Z
2020-06-05T17:14:34.000Z
""" .. Copyright: 2017 Twinleaf LLC Author: kornack@twinleaf.com OriginalDate: March 2017 """ import struct import yaml import tio from .tl_cmd_conf import * class TwinleafDevFirmwareInfoController(object): def __init__(self, dev): self._dev = dev def hash(self): return self._dev._tio.rpc('de...
22.313253
85
0.697084
import struct import yaml import tio from .tl_cmd_conf import * class TwinleafDevFirmwareInfoController(object): def __init__(self, dev): self._dev = dev def hash(self): return self._dev._tio.rpc('dev.firmware.hash').decode('utf-8') def serial(self): return self._dev._tio.rpc('dev.firmware.serial'...
true
true
f758941ce19276e6c94082152cb7326398485237
5,309
py
Python
recipes/harfbuzz/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1
2020-01-31T22:47:14.000Z
2020-01-31T22:47:14.000Z
recipes/harfbuzz/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
3
2020-05-05T11:27:44.000Z
2022-02-28T20:19:50.000Z
recipes/harfbuzz/all/conanfile.py
rockandsalt/conan-center-index
d739adcec3e4dd4c250eff559ceb738e420673dd
[ "MIT" ]
1
2020-10-12T10:45:13.000Z
2020-10-12T10:45:13.000Z
from conans import ConanFile, CMake, tools import functools import os required_conan_version = ">=1.33.0" class HarfbuzzConan(ConanFile): name = "harfbuzz" description = "HarfBuzz is an OpenType text shaping engine." topics = ("opentype", "text", "engine") url = "https://github.com/conan-io/conan-cen...
37.652482
91
0.6246
from conans import ConanFile, CMake, tools import functools import os required_conan_version = ">=1.33.0" class HarfbuzzConan(ConanFile): name = "harfbuzz" description = "HarfBuzz is an OpenType text shaping engine." topics = ("opentype", "text", "engine") url = "https://github.com/conan-io/conan-cen...
true
true
f75895abe98727abc0e936f3555c787511e3b2b2
22,961
py
Python
automl/google/cloud/automl_v1beta1/proto/image_pb2.py
DaveCheez/google-cloud-python
fc03d4d41f13e9d13db7206438163b3a471fdabd
[ "Apache-2.0" ]
null
null
null
automl/google/cloud/automl_v1beta1/proto/image_pb2.py
DaveCheez/google-cloud-python
fc03d4d41f13e9d13db7206438163b3a471fdabd
[ "Apache-2.0" ]
null
null
null
automl/google/cloud/automl_v1beta1/proto/image_pb2.py
DaveCheez/google-cloud-python
fc03d4d41f13e9d13db7206438163b3a471fdabd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/cloud/automl_v1beta1/proto/image.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import messa...
39.316781
1,361
0.665781
import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym...
true
true
f75896634b1e8432182af0da5e08fc24a9ab4ddc
571
py
Python
scripts/MI06A_Residuals_generate.py
alanlegoallec/Age_Sex_and_Medical_Images
d2b57bef1484360e129e9e2c97d4ae535c68e9c9
[ "MIT" ]
null
null
null
scripts/MI06A_Residuals_generate.py
alanlegoallec/Age_Sex_and_Medical_Images
d2b57bef1484360e129e9e2c97d4ae535c68e9c9
[ "MIT" ]
4
2021-08-25T15:13:50.000Z
2022-02-09T23:58:01.000Z
scripts/MI06A_Residuals_generate.py
alanlegoallec/Age_Sex_and_Medical_Images
d2b57bef1484360e129e9e2c97d4ae535c68e9c9
[ "MIT" ]
null
null
null
import sys from MI_Classes import ResidualsGenerate # Default parameters if len(sys.argv) != 4: print('WRONG NUMBER OF INPUT PARAMETERS! RUNNING WITH DEFAULT SETTINGS!\n') sys.argv = [''] sys.argv.append('Age') # target sys.argv.append('test') # fold sys.argv.append('eids') # pred_type # Option...
24.826087
99
0.726795
import sys from MI_Classes import ResidualsGenerate if len(sys.argv) != 4: print('WRONG NUMBER OF INPUT PARAMETERS! RUNNING WITH DEFAULT SETTINGS!\n') sys.argv = [''] sys.argv.append('Age') sys.argv.append('test') sys.argv.append('eids') debug_mode = False Residuals_Generate = ResidualsGenerat...
true
true
f75896b244d4f84fd180010344626d0e070676dc
1,069
py
Python
output/function0_output.py
Frank-the-Obscure/idoulist
1f89a4356f3172ce9ec2762eabf351c691756344
[ "MIT" ]
null
null
null
output/function0_output.py
Frank-the-Obscure/idoulist
1f89a4356f3172ce9ec2762eabf351c691756344
[ "MIT" ]
null
null
null
output/function0_output.py
Frank-the-Obscure/idoulist
1f89a4356f3172ce9ec2762eabf351c691756344
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Author Frank Hu # iDoulist Function 0 - output ''' std test output_list = ['http://book.douban.com/subject/1139336/', 'http://book.douban.com/subject/25724948/'] ''' def output_CLI(output_doulist): print 'iDoulist: your input doulist link contains: ' for i in output_doulist...
28.891892
73
0.710945
''' std test output_list = ['http://book.douban.com/subject/1139336/', 'http://book.douban.com/subject/25724948/'] ''' def output_CLI(output_doulist): print 'iDoulist: your input doulist link contains: ' for i in output_doulist: print i ''' def output_file(output_doulist): file_target = file('iDo...
false
true
f758988c86a5e081219ab492b385e94aaa9cbb4d
347
py
Python
pdpython_model/generic_model/agents.py
seifely/pdpython
41410ca2807509caf32794bef57e7e210dcbce6f
[ "MIT" ]
null
null
null
pdpython_model/generic_model/agents.py
seifely/pdpython
41410ca2807509caf32794bef57e7e210dcbce6f
[ "MIT" ]
null
null
null
pdpython_model/generic_model/agents.py
seifely/pdpython
41410ca2807509caf32794bef57e7e210dcbce6f
[ "MIT" ]
null
null
null
from mesa import Agent class Gagent(Agent): def __init__(self, pos, model, stepcount=0, score=0): super().__init__(pos, model) self.pos = pos self.stepCount = stepcount self.score = score def some_function(self): a = 2 + 2 return a def step(self): ...
21.6875
57
0.587896
from mesa import Agent class Gagent(Agent): def __init__(self, pos, model, stepcount=0, score=0): super().__init__(pos, model) self.pos = pos self.stepCount = stepcount self.score = score def some_function(self): a = 2 + 2 return a def step(self): ...
true
true
f758989aca66e4330626b937802f4518caac9d6f
24,667
py
Python
userbot/plugins/admin.py
goodmeow/xtrauserbot
ca3dcba6bc70042026a53c1860150a2de7363072
[ "MIT" ]
null
null
null
userbot/plugins/admin.py
goodmeow/xtrauserbot
ca3dcba6bc70042026a53c1860150a2de7363072
[ "MIT" ]
null
null
null
userbot/plugins/admin.py
goodmeow/xtrauserbot
ca3dcba6bc70042026a53c1860150a2de7363072
[ "MIT" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. """ Userbot module to help you manage a group """ from asyncio import sleep from os import remove from telethon import ...
32.456579
114
0.607208
from asyncio import sleep from os import remove from telethon import events from datetime import datetime from telethon.tl.functions.channels import EditBannedRequest from telethon.tl.types import ChatBannedRights from telethon.errors import (BadRequestError, ChatAdminRequiredError, Imag...
true
true
f75898c1b1aeba9d25e88d00e24cfe8fdf0c4995
397
py
Python
end2you/data_provider/audio_provider.py
tfyd/myEnd2you
455d5404a19dd4867cb5db4f30705041d425d2b3
[ "BSD-3-Clause" ]
null
null
null
end2you/data_provider/audio_provider.py
tfyd/myEnd2you
455d5404a19dd4867cb5db4f30705041d425d2b3
[ "BSD-3-Clause" ]
null
null
null
end2you/data_provider/audio_provider.py
tfyd/myEnd2you
455d5404a19dd4867cb5db4f30705041d425d2b3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from .provider import BaseProvider from pathlib import Path from torch import is_tensor class AudioProvider(BaseProvider): """Provides the data for the audio modality.""" def __init__(self, *args, **kwargs): self.modality = 'audio' super().__init__(*args, **kwargs) ...
23.352941
51
0.667506
import numpy as np from .provider import BaseProvider from pathlib import Path from torch import is_tensor class AudioProvider(BaseProvider): def __init__(self, *args, **kwargs): self.modality = 'audio' super().__init__(*args, **kwargs) def process_input(self, data, labels): ...
true
true
f75899682710b825a4a2780808cc8edb60bc6d6a
107
py
Python
tests/environment.py
linkml/linkml-csv
faab3ce6921d5558b2c552ad09077a0821d15b00
[ "CC0-1.0" ]
2
2021-08-05T16:00:35.000Z
2021-08-22T22:47:14.000Z
tests/environment.py
linkml/linkml-csv
faab3ce6921d5558b2c552ad09077a0821d15b00
[ "CC0-1.0" ]
1
2021-08-09T17:57:15.000Z
2021-08-22T23:47:08.000Z
tests/environment.py
linkml/linkml-csv
faab3ce6921d5558b2c552ad09077a0821d15b00
[ "CC0-1.0" ]
null
null
null
from linkml_runtime.tests.support.test_environment import TestEnvironment env = TestEnvironment(__file__)
26.75
73
0.869159
from linkml_runtime.tests.support.test_environment import TestEnvironment env = TestEnvironment(__file__)
true
true
f7589a6813f3fa809d8540f35e8880008b918d13
12,266
py
Python
docs_en/conf.py
yatendra-dev/WeBASE-Doc
f97b4866673932408f82495301a1a2fec814a41b
[ "Apache-2.0" ]
null
null
null
docs_en/conf.py
yatendra-dev/WeBASE-Doc
f97b4866673932408f82495301a1a2fec814a41b
[ "Apache-2.0" ]
null
null
null
docs_en/conf.py
yatendra-dev/WeBASE-Doc
f97b4866673932408f82495301a1a2fec814a41b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Test documentation build configuration file, created by # sphinx-quickstart on Sat Feb 7 20:09:23 2015. # # This file is execfile() with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
32.109948
89
0.7158
import sys import os import sphinx_rtd_theme from recommonmark.transform import AutoStructify DOC_SOURCES_DIR = os.path.dirname(os.path.abspath(__file__)) PROJECT_ROOT_DIR = os.path.dirname(os.path.abspath(DOC_SOURCES_DIR)) sys.path.insert(0, DOC_SOURCES_DIR) print('PROJECT_ROOT_DIR:', PROJECT_ROOT_DIR) print('DOC_...
true
true
f7589a83da7e256b5379c1e77db6465a7ce77a57
919
py
Python
aylien/nlp_tools/migrations/0003_auto_20180129_0300.py
jijyisme/senior-project-backend
a86c1335dcfeef30e6fef0a4695549e931efba36
[ "MIT" ]
null
null
null
aylien/nlp_tools/migrations/0003_auto_20180129_0300.py
jijyisme/senior-project-backend
a86c1335dcfeef30e6fef0a4695549e931efba36
[ "MIT" ]
null
null
null
aylien/nlp_tools/migrations/0003_auto_20180129_0300.py
jijyisme/senior-project-backend
a86c1335dcfeef30e6fef0a4695549e931efba36
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-01-29 03:00 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nlp_tools', '0002_auto_20180127_1231'), ] operations = [ migrations.CreateM...
27.029412
114
0.556039
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nlp_tools', '0002_auto_20180127_1231'), ] operations = [ migrations.CreateModel( name='TaggedToken', fields=[ ...
true
true
f7589aa01a2b358b42ca2b6ea897139b6f26887c
17,126
py
Python
openpyxl_templates/table_sheet/columns.py
bonashen/openpyxl-templates
76ab0f15e7423f61f0873383f64210d91b75ac4b
[ "MIT" ]
1
2018-03-03T15:30:38.000Z
2018-03-03T15:30:38.000Z
openpyxl_templates/table_sheet/columns.py
bonashen/openpyxl-templates
76ab0f15e7423f61f0873383f64210d91b75ac4b
[ "MIT" ]
null
null
null
openpyxl_templates/table_sheet/columns.py
bonashen/openpyxl-templates
76ab0f15e7423f61f0873383f64210d91b75ac4b
[ "MIT" ]
null
null
null
from datetime import date, datetime, timedelta, time from types import FunctionType from collections import Iterable from openpyxl.cell import WriteOnlyCell from openpyxl.formatting import Rule from openpyxl.utils import get_column_letter from openpyxl.worksheet.datavalidation import DataValidation from openpyxl_temp...
31.714815
117
0.645393
from datetime import date, datetime, timedelta, time from types import FunctionType from collections import Iterable from openpyxl.cell import WriteOnlyCell from openpyxl.formatting import Rule from openpyxl.utils import get_column_letter from openpyxl.worksheet.datavalidation import DataValidation from openpyxl_temp...
true
true
f7589ad1cdc47e10cf3a55bab4cb4ece44c8b8c8
1,278
py
Python
solutions/11. Container With Most Water.py
JacopoPan/leetcode-top100-liked-questions
03dc05f087d05805d54b7585ce740338f3128833
[ "MIT" ]
null
null
null
solutions/11. Container With Most Water.py
JacopoPan/leetcode-top100-liked-questions
03dc05f087d05805d54b7585ce740338f3128833
[ "MIT" ]
null
null
null
solutions/11. Container With Most Water.py
JacopoPan/leetcode-top100-liked-questions
03dc05f087d05805d54b7585ce740338f3128833
[ "MIT" ]
null
null
null
""" Runtime: 6200 ms, faster than 5.01% of Python3 online submissions for Container With Most Water. Memory Usage: 27.5 MB, less than 57.22% of Python3 online submissions for Container With Most Water. """ from typing import List from typing import Optional class Solution: def maxArea(self, height: List[int]) -> i...
31.170732
100
0.50939
from typing import List from typing import Optional class Solution: def maxArea(self, height: List[int]) -> int: i = 0 j = len(height) - 1 used_min_vert = min(height[i], height[j]) max_water = (j - i) * used_min_vert while i+1 != j: if height[i] > height[j]: ...
true
true
f7589adac7d2683e0661e59cfec0ac79e5a3b194
8,515
py
Python
growth/too/tests/test_gcn.py
shreyasahasram08/growth-too-marshal
f3fbf0043b50d3ffe56e6b4e06b0c1472fc10220
[ "MIT" ]
14
2019-04-16T19:31:30.000Z
2020-08-18T21:34:54.000Z
growth/too/tests/test_gcn.py
shreyasahasram08/growth-too-marshal
f3fbf0043b50d3ffe56e6b4e06b0c1472fc10220
[ "MIT" ]
86
2019-04-16T20:43:04.000Z
2021-04-23T16:16:39.000Z
growth/too/tests/test_gcn.py
shreyasahasram08/growth-too-marshal
f3fbf0043b50d3ffe56e6b4e06b0c1472fc10220
[ "MIT" ]
11
2019-04-16T18:41:53.000Z
2020-04-21T13:22:13.000Z
import datetime from unittest import mock from astropy import time from astropy import units as u import gcn import lxml.etree import numpy as np import pkg_resources import pytest from .. import models from ..jinja import btoa from ..flask import app from ..gcn import handle, listen from . import mock_download_file ...
37.183406
122
0.670112
import datetime from unittest import mock from astropy import time from astropy import units as u import gcn import lxml.etree import numpy as np import pkg_resources import pytest from .. import models from ..jinja import btoa from ..flask import app from ..gcn import handle, listen from . import mock_download_file ...
true
true
f7589aea8cf6c95303af76d7eb36a4671e93322e
2,236
py
Python
goza/chart.py
zgongaware/gonzo
290eae429eb115793cdac3d0be69a064eb73f9a2
[ "MIT" ]
null
null
null
goza/chart.py
zgongaware/gonzo
290eae429eb115793cdac3d0be69a064eb73f9a2
[ "MIT" ]
null
null
null
goza/chart.py
zgongaware/gonzo
290eae429eb115793cdac3d0be69a064eb73f9a2
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt class Chart: """ Chart class to create and format a basic pyplot figure """ def __init__(self, title=None, xlabel=None, ylabel=None, figsize=None): self.title = title if title else "Unnamed Chart" self.xlabel = xlabel if xlabel else "X-Axis" sel...
27.604938
80
0.586315
import matplotlib.pyplot as plt class Chart: def __init__(self, title=None, xlabel=None, ylabel=None, figsize=None): self.title = title if title else "Unnamed Chart" self.xlabel = xlabel if xlabel else "X-Axis" self.ylabel = ylabel if ylabel else "Y-Axis" self.figsize = figsize if...
true
true
f7589d336f437dac17cfdf63d145d977ba77f7d1
1,189
py
Python
elmoformanylangs/modules/lstm.py
luomou97/ELMoForManyLangs
3e97600baa3a4dde229c1e78c513785e7d50e8e1
[ "MIT" ]
null
null
null
elmoformanylangs/modules/lstm.py
luomou97/ELMoForManyLangs
3e97600baa3a4dde229c1e78c513785e7d50e8e1
[ "MIT" ]
null
null
null
elmoformanylangs/modules/lstm.py
luomou97/ELMoForManyLangs
3e97600baa3a4dde229c1e78c513785e7d50e8e1
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import unicode_literals import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import copy # \ref page 4, layers=2, forward + backward, concat[forward_projection, backward_projection] class LstmbiLm(nn.Module): de...
42.464286
147
0.652649
from __future__ import absolute_import from __future__ import unicode_literals import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import copy class LstmbiLm(nn.Module): def __init__(self, config, use_cuda=False): super(LstmbiLm, self).__init__() self.confi...
true
true
f7589dd3a3896fe1626d48356000851b4a5f4060
1,401
py
Python
py300/py300To90.py
metacogpe/python
f7b2bcd0fae9ae9899399e3a314ffea3955896b0
[ "Apache-2.0" ]
null
null
null
py300/py300To90.py
metacogpe/python
f7b2bcd0fae9ae9899399e3a314ffea3955896b0
[ "Apache-2.0" ]
null
null
null
py300/py300To90.py
metacogpe/python
f7b2bcd0fae9ae9899399e3a314ffea3955896b0
[ "Apache-2.0" ]
null
null
null
# 별 표현식 a, b = (1,2) print(a,b) #위와 달리 갯수가 맞지 않을 경우 a, b, *c = (0,1,2,3,4,5) print(a) print(b) print(c) # 리스트로 반영 scores = [8.8,8.9,8.7,9.2,9.3,9.7,9.9,9.5,7.8,9.4] *valid_score, a, b = scores print(valid_score) # a = 7.8, b = 9.4 이외는 valid_scoreㄷ # 체조 점수 구하기 : 최고/최저 제거 scores = [8.8,8.9,8.7,9.2,9.3,9.7,9.9,9.5,7....
17.734177
54
0.552463
a, b = (1,2) print(a,b) a, b, *c = (0,1,2,3,4,5) print(a) print(b) print(c) scores = [8.8,8.9,8.7,9.2,9.3,9.7,9.9,9.5,7.8,9.4] *valid_score, a, b = scores print(valid_score) scores = [8.8,8.9,8.7,9.2,9.3,9.7,9.9,9.5,7.8,9.4] scores.sort() a, *score, b = scores print(a); print(score); print(b) print(sum(score)/len(...
true
true
f7589e98f4151e504de1806f639692af4578dc31
45,640
py
Python
src/transformers/adapters/model_mixin.py
rahuln/adapter-transformers
ac3284547064686d31b95e5e1b078447a2199779
[ "Apache-2.0" ]
null
null
null
src/transformers/adapters/model_mixin.py
rahuln/adapter-transformers
ac3284547064686d31b95e5e1b078447a2199779
[ "Apache-2.0" ]
null
null
null
src/transformers/adapters/model_mixin.py
rahuln/adapter-transformers
ac3284547064686d31b95e5e1b078447a2199779
[ "Apache-2.0" ]
null
null
null
import logging import os import warnings from abc import ABC, abstractmethod from collections import defaultdict from os.path import join from typing import Iterable, List, Optional, Tuple, Union import torch from torch import nn from .composition import AdapterCompositionBlock, Fuse, Stack, parse_composition from .c...
43.466667
138
0.648751
import logging import os import warnings from abc import ABC, abstractmethod from collections import defaultdict from os.path import join from typing import Iterable, List, Optional, Tuple, Union import torch from torch import nn from .composition import AdapterCompositionBlock, Fuse, Stack, parse_composition from .c...
true
true
f7589ec59305385fd588db3bf65f7dd9122397e9
1,150
py
Python
donations/migrations/0001_initial.py
gauravuttarkar/SoftwareEngineering
23c6e58176fcb27031f9095a1090c2f72602a3f6
[ "MIT" ]
null
null
null
donations/migrations/0001_initial.py
gauravuttarkar/SoftwareEngineering
23c6e58176fcb27031f9095a1090c2f72602a3f6
[ "MIT" ]
3
2020-06-05T20:14:46.000Z
2021-06-10T21:20:45.000Z
donations/migrations/0001_initial.py
gauravuttarkar/SoftwareEngineering
23c6e58176fcb27031f9095a1090c2f72602a3f6
[ "MIT" ]
null
null
null
# Generated by Django 2.0.9 on 2019-04-07 12:27 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('events', '0008_auto_20190407_1227'), migrations.sw...
38.333333
134
0.626957
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('events', '0008_auto_20190407_1227'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
true
true
f7589ef57c259c64eb79c5be58bbd5a5519d409e
3,841
py
Python
deep_lynx/models/import_data_type_mapping_response.py
idaholab/Deep-Lynx-Python-Package
99927cc877eba8e2ee396feec807da1c48c64893
[ "MIT" ]
3
2021-06-16T20:34:41.000Z
2021-06-16T23:54:36.000Z
deep_lynx/models/import_data_type_mapping_response.py
idaholab/Deep-Lynx-Python-Package
99927cc877eba8e2ee396feec807da1c48c64893
[ "MIT" ]
null
null
null
deep_lynx/models/import_data_type_mapping_response.py
idaholab/Deep-Lynx-Python-Package
99927cc877eba8e2ee396feec807da1c48c64893
[ "MIT" ]
null
null
null
# coding: utf-8 """ Deep Lynx The construction of megaprojects has consistently demonstrated challenges for project managers in regard to meeting cost, schedule, and performance requirements. Megaproject construction challenges are common place within megaprojects with many active projects in the United State...
45.188235
1,455
0.659203
import pprint import re import six class ImportDataTypeMappingResponse(object): swagger_types = { } attribute_map = { } def __init__(self): self.discriminator = None def to_dict(self): result = {} for attr, _ in six.iteritems(self.swagger_types): val...
true
true
f758a0266e22fe747734759c8c9a4a79eb91dd79
1,017
py
Python
qtrader/simulation/aaft.py
aaron8tang/qtrader
9bd50fd173c7b55707e91d75985055bbe8664548
[ "Apache-2.0" ]
381
2017-10-25T19:17:04.000Z
2021-03-02T08:46:53.000Z
qtrader/simulation/aaft.py
362115815/qtrader
e5c1e175e19b20381f9140fb76c30ad5cb81f01c
[ "Apache-2.0" ]
3
2018-02-13T23:19:40.000Z
2018-12-03T22:50:58.000Z
qtrader/simulation/aaft.py
362115815/qtrader
e5c1e175e19b20381f9140fb76c30ad5cb81f01c
[ "Apache-2.0" ]
145
2017-10-25T19:17:06.000Z
2021-02-15T04:54:08.000Z
import numpy as np import pandas as pd def AAFT(df, random=np.random.uniform, random_state=None): """Amplitude Adjusted Fourier Transform Baseline Generator.""" # set random seed np.random.seed(random_state) # Operate on numpy.ndarray ts = df.values # 2d time-series format _ts = ts.reshape...
32.806452
66
0.621436
import numpy as np import pandas as pd def AAFT(df, random=np.random.uniform, random_state=None): np.random.seed(random_state) ts = df.values _ts = ts.reshape(len(ts), -1) if len(_ts) % 2 != 0: _ts = _ts[1:, :] ts_gen = np.empty_like(_ts) for i, tsi in enumerate(_ts...
true
true
f758a0841dac4dadda94c987656ab56b6bc17fbb
1,749
py
Python
cd4ml/model_tracking/validation_metrics.py
camila-contreras/CD4ML-Scenarios
806f812990c7cf33b5f78456f0065012b5b4cd35
[ "MIT" ]
1
2021-07-17T19:31:31.000Z
2021-07-17T19:31:31.000Z
cd4ml/model_tracking/validation_metrics.py
camila-contreras/CD4ML-Scenarios
806f812990c7cf33b5f78456f0065012b5b4cd35
[ "MIT" ]
1
2020-11-02T21:15:23.000Z
2020-11-02T21:15:23.000Z
cd4ml/model_tracking/validation_metrics.py
camila-contreras/CD4ML-Scenarios
806f812990c7cf33b5f78456f0065012b5b4cd35
[ "MIT" ]
2
2020-04-15T14:05:42.000Z
2021-04-29T13:24:20.000Z
from sklearn import metrics import numpy as np import logging logger = logging.getLogger(__name__) # TODO: add others # TODO: add ability to include generic functions def r2_score(true_target, prediction): # R2 metric return metrics.r2_score(y_true=true_target, y_pred=prediction) def rms_score(true_target,...
30.684211
78
0.722699
from sklearn import metrics import numpy as np import logging logger = logging.getLogger(__name__) def r2_score(true_target, prediction): return metrics.r2_score(y_true=true_target, y_pred=prediction) def rms_score(true_target, prediction): return np.sqrt(((prediction - true_target)**2).mean()) d...
true
true
f758a0915034fa55f3fab47778de2ca357299ec5
1,647
py
Python
src/nxrefine/plugins/refine/new_sample.py
rayosborn/nxpeaks
a90367b4ab84a5ce7b435f71beb35726c753fcc4
[ "BSD-3-Clause-Clear" ]
1
2022-01-07T11:29:17.000Z
2022-01-07T11:29:17.000Z
src/nxrefine/plugins/refine/new_sample.py
rayosborn/nxpeaks
a90367b4ab84a5ce7b435f71beb35726c753fcc4
[ "BSD-3-Clause-Clear" ]
1
2022-03-29T14:52:07.000Z
2022-03-29T15:25:54.000Z
src/nxrefine/plugins/refine/new_sample.py
axmas-anl/nxrefine
6f5f53f955737c6f306d566b0a24ad1067089142
[ "BSD-3-Clause-Clear" ]
null
null
null
# ----------------------------------------------------------------------------- # Copyright (c) 2015-2021, NeXpy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING, distributed with this software. # -------------------------------------------------...
33.612245
79
0.55677
import os from nexpy.gui.datadialogs import GridParameters, NXDialog from nexpy.gui.utils import report_error from nexusformat.nexus import NeXusError def show_dialog(): try: dialog = SampleDialog() dialog.show() except NeXusError as error: report_error("Defining New Sample", error) ...
true
true
f758a09dd7b97cf144f01015e9aa6d844d946ba6
10,699
py
Python
aws/amazonia/amazonia/classes/amz_api_gateway.py
linz/Geodesy-Web-Services
d2f52a5beed179f817cbf8040e6c85b623c97fb9
[ "BSD-3-Clause" ]
2
2018-06-19T04:05:19.000Z
2020-07-17T02:31:31.000Z
aws/amazonia/amazonia/classes/amz_api_gateway.py
linz/Geodesy-Web-Services
d2f52a5beed179f817cbf8040e6c85b623c97fb9
[ "BSD-3-Clause" ]
null
null
null
aws/amazonia/amazonia/classes/amz_api_gateway.py
linz/Geodesy-Web-Services
d2f52a5beed179f817cbf8040e6c85b623c97fb9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 from troposphere import Ref, Join, GetAtt, Output, ImportValue, Export from troposphere.apigateway import Deployment from troposphere.apigateway import RestApi, Resource, MethodResponse, IntegrationResponse, Integration, Method from troposphere.awslambda import Permission class ApiGateway(object):...
41.792969
121
0.627629
from troposphere import Ref, Join, GetAtt, Output, ImportValue, Export from troposphere.apigateway import Deployment from troposphere.apigateway import RestApi, Resource, MethodResponse, IntegrationResponse, Integration, Method from troposphere.awslambda import Permission class ApiGateway(object): def __init__(s...
true
true
f758a114092aa4404fc002b0d22c22cc4227068a
1,723
py
Python
examples/daal4py/dbscan_spmd.py
yumorozov/scikit-learn-intelex
7a39c0a0e208b49f209168b01fb50206f962175f
[ "Apache-2.0" ]
1
2021-12-24T16:53:01.000Z
2021-12-24T16:53:01.000Z
examples/daal4py/dbscan_spmd.py
yumorozov/scikit-learn-intelex
7a39c0a0e208b49f209168b01fb50206f962175f
[ "Apache-2.0" ]
null
null
null
examples/daal4py/dbscan_spmd.py
yumorozov/scikit-learn-intelex
7a39c0a0e208b49f209168b01fb50206f962175f
[ "Apache-2.0" ]
null
null
null
#=============================================================================== # Copyright 2014 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
33.784314
89
0.630876
import daal4py as d4p import numpy as np def main(method='defaultDense'): infile = "./data/batch/dbscan_dense.csv" epsilon = 0.04 minObservations = 45 data = np.loadtxt(infile, delimiter=',') rpp = int(data.shape[0] / d4p.num_procs()) data = data[rpp * d4p.my_procid(): rpp * d4p.my_proc...
true
true
f758a230a9aa92c8e43ee79986d4f4999229544c
53,523
py
Python
awx/main/models/unified_jobs.py
devops786/awx-demo
5ebb8a15628865e5ddd2f39ccb29e19387782205
[ "Apache-2.0" ]
1
2018-09-03T19:09:55.000Z
2018-09-03T19:09:55.000Z
awx/main/models/unified_jobs.py
devops786/awx-demo
5ebb8a15628865e5ddd2f39ccb29e19387782205
[ "Apache-2.0" ]
1
2020-04-09T08:43:28.000Z
2020-04-09T08:43:28.000Z
awx/main/models/unified_jobs.py
devops786/awx-demo
5ebb8a15628865e5ddd2f39ccb29e19387782205
[ "Apache-2.0" ]
2
2018-09-03T19:10:02.000Z
2019-06-12T07:07:16.000Z
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python from StringIO import StringIO import json import logging import os import re import subprocess import tempfile from collections import OrderedDict # Django from django.conf import settings from django.db import models, connection from django.core.exce...
38.203426
160
0.61723
from StringIO import StringIO import json import logging import os import re import subprocess import tempfile from collections import OrderedDict from django.conf import settings from django.db import models, connection from django.core.exceptions import NON_FIELD_ERRORS from django.utils.translation import ugettext...
true
true
f758a2b7c3f4f1b6754dc5040a4449e83048a77a
4,224
py
Python
third_party/coriander/src/CLBlast/scripts/database/database.py
pint1022/tensorflow
92e437b36ae58ea22910dbed67e2c238c869c09f
[ "Apache-2.0" ]
2
2019-04-15T23:07:00.000Z
2020-03-11T16:09:02.000Z
third_party/coriander/src/CLBlast/scripts/database/database.py
pint1022/tensorflow
92e437b36ae58ea22910dbed67e2c238c869c09f
[ "Apache-2.0" ]
null
null
null
third_party/coriander/src/CLBlast/scripts/database/database.py
pint1022/tensorflow
92e437b36ae58ea22910dbed67e2c238c869c09f
[ "Apache-2.0" ]
2
2020-03-04T13:59:48.000Z
2020-03-09T13:11:45.000Z
#!/usr/bin/env python # This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This file follows the # PEP8 Python style guide and uses a max-width of 120 characters per line. # # Author(s): # Cedric Nugteren <www.cedricnugteren.nl> import sys import os.path import glob import a...
40.228571
119
0.718513
import sys import os.path import glob import argparse import database.io as io import database.db as db import database.clblast as clblast import database.bests as bests import database.defaults as defaults DATABASE_SERVER_URL = "http://www.cedricnugteren.nl/tuning/clblast.json" VENDOR_TRANSLATION_TABLE = { "Gen...
true
true
f758a2d1f094d7516db009344fd0d4597cfaa539
3,577
py
Python
basic/string1.py
felipetac/google-python-exercises
1756657240c7db709a8a58d5d05193e857678a4c
[ "Apache-2.0" ]
null
null
null
basic/string1.py
felipetac/google-python-exercises
1756657240c7db709a8a58d5d05193e857678a4c
[ "Apache-2.0" ]
null
null
null
basic/string1.py
felipetac/google-python-exercises
1756657240c7db709a8a58d5d05193e857678a4c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already se...
31.9375
80
0.659212
# http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already set up # to call the functions with a few different inputs, # printing 'OK' when each function is correct. # The starter code for each function includes a 'return' # which...
true
true
f758a34607b4fa1680d5bf14f931c0049e5731d9
2,574
py
Python
fedml_api/model/cv/darts/utils.py
Alex-Roudjiat/Federated-ML-AI-Federated-ML-
8ccc24cf2c01b868988f5d5bd65f1666cf5526bc
[ "Apache-2.0" ]
1,120
2020-07-22T02:30:52.000Z
2022-03-31T08:10:44.000Z
fedml_api/model/cv/darts/utils.py
Alex-Roudjiat/Federated-ML-AI-Federated-ML-
8ccc24cf2c01b868988f5d5bd65f1666cf5526bc
[ "Apache-2.0" ]
113
2020-07-27T03:48:09.000Z
2022-03-30T03:25:56.000Z
fedml_api/model/cv/darts/utils.py
Alex-Roudjiat/Federated-ML-AI-Federated-ML-
8ccc24cf2c01b868988f5d5bd65f1666cf5526bc
[ "Apache-2.0" ]
381
2020-07-22T06:12:57.000Z
2022-03-30T18:38:35.000Z
import os import shutil import numpy as np import torch from torch.autograd import Variable class AvgrageMeter(object): def __init__(self): self.reset() def reset(self): self.avg = 0 self.sum = 0 self.cnt = 0 def update(self, val, n=1): self.sum += val * n ...
25.485149
109
0.602564
import os import shutil import numpy as np import torch from torch.autograd import Variable class AvgrageMeter(object): def __init__(self): self.reset() def reset(self): self.avg = 0 self.sum = 0 self.cnt = 0 def update(self, val, n=1): self.sum += val * n ...
true
true
f758a36287d57cffd941254c9101499537620f17
12,312
py
Python
src/pretalx/orga/views/review.py
oxinabox/pretalx
aa8cb810addd3f6f3fd6e7557497a04a51653413
[ "Apache-2.0" ]
null
null
null
src/pretalx/orga/views/review.py
oxinabox/pretalx
aa8cb810addd3f6f3fd6e7557497a04a51653413
[ "Apache-2.0" ]
null
null
null
src/pretalx/orga/views/review.py
oxinabox/pretalx
aa8cb810addd3f6f3fd6e7557497a04a51653413
[ "Apache-2.0" ]
null
null
null
from django.contrib import messages from django.db import transaction from django.db.models import Count, Exists, OuterRef, Q from django.shortcuts import get_object_or_404, redirect from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from django.views.generic imp...
38
189
0.620045
from django.contrib import messages from django.db import transaction from django.db.models import Count, Exists, OuterRef, Q from django.shortcuts import get_object_or_404, redirect from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from django.views.generic imp...
true
true
f758a3cd64e8bac5d7062865554471fc3adbed5c
14,097
py
Python
python_modules/libraries/dagstermill/dagstermill/solids.py
wingyplus/dagster
1771b49f58c62141628da6a767516d3dcb9637d6
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagstermill/dagstermill/solids.py
wingyplus/dagster
1771b49f58c62141628da6a767516d3dcb9637d6
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagstermill/dagstermill/solids.py
wingyplus/dagster
1771b49f58c62141628da6a767516d3dcb9637d6
[ "Apache-2.0" ]
null
null
null
import copy import os import pickle import uuid import nbformat import papermill import six from papermill.engines import papermill_engines from papermill.iorw import load_notebook_node, write_ipynb from papermill.parameterize import _find_first_tagged_cell_index from dagster import ( AssetMaterialization, Ev...
42.718182
146
0.64645
import copy import os import pickle import uuid import nbformat import papermill import six from papermill.engines import papermill_engines from papermill.iorw import load_notebook_node, write_ipynb from papermill.parameterize import _find_first_tagged_cell_index from dagster import ( AssetMaterialization, Ev...
true
true
f758a3d1b5f6c6c6a74f9fe582cef2f60178bfc2
897
py
Python
examples/linear_regression_plot.py
alexbarcelo/dislib
989f81f235ae30b17410a8d805df258c7d931b38
[ "Apache-2.0" ]
36
2018-10-22T19:21:14.000Z
2022-03-22T12:10:01.000Z
examples/linear_regression_plot.py
alexbarcelo/dislib
989f81f235ae30b17410a8d805df258c7d931b38
[ "Apache-2.0" ]
329
2018-11-22T18:04:57.000Z
2022-03-18T01:26:55.000Z
examples/linear_regression_plot.py
alexbarcelo/dislib
989f81f235ae30b17410a8d805df258c7d931b38
[ "Apache-2.0" ]
21
2019-01-10T11:46:39.000Z
2022-03-17T12:59:45.000Z
import numpy as np from pylab import scatter, plot, show import dislib as ds from dislib.regression import LinearRegression def main(): """ Linear regression example with plot """ # Example data x = np.array([1000, 4000, 5000, 4500, 3000, 4000, 9000, 11000, 15000, 12000, 7000, ...
25.628571
73
0.605351
import numpy as np from pylab import scatter, plot, show import dislib as ds from dislib.regression import LinearRegression def main(): x = np.array([1000, 4000, 5000, 4500, 3000, 4000, 9000, 11000, 15000, 12000, 7000, 3000]) y = np.array([9914, 40487, 54324, 50044, 34719, 42551, 94871...
true
true
f758a4f692475b93f48e89fdb3c84d8b81706425
832
py
Python
travis_aws_key_rotate.py
gebn/travis-aws-key-rotate
520576bf7d7607f786320e659ea8caefb68b693d
[ "MIT" ]
null
null
null
travis_aws_key_rotate.py
gebn/travis-aws-key-rotate
520576bf7d7607f786320e659ea8caefb68b693d
[ "MIT" ]
1
2018-02-20T01:04:44.000Z
2018-02-20T01:04:44.000Z
travis_aws_key_rotate.py
gebn/travis-aws-key-rotate
520576bf7d7607f786320e659ea8caefb68b693d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging import os import trawsate logger = logging.getLogger(__name__) logging.getLogger('boto3').setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.INFO) logging.getLogger('urllib3').setLevel(logging.INFO) logger.setLevel(logging.DEBUG) _TRAVIS_ACCESS_TOKEN = os.en...
27.733333
75
0.716346
import logging import os import trawsate logger = logging.getLogger(__name__) logging.getLogger('boto3').setLevel(logging.INFO) logging.getLogger('botocore').setLevel(logging.INFO) logging.getLogger('urllib3').setLevel(logging.INFO) logger.setLevel(logging.DEBUG) _TRAVIS_ACCESS_TOKEN = os.environ['TRAVIS_ACCESS_TOK...
true
true
f758a59780503e88ef8d21698f3fe033ef9a5a93
7,258
py
Python
scripts/python/blend_sat/ncvdefs.py
OSADP/Pikalert-Vehicle-Data-Translator-
295da604408f6f13af0301b55476a81311459386
[ "Apache-2.0" ]
2
2020-06-03T15:59:50.000Z
2020-12-21T11:11:57.000Z
scripts/python/blend_sat/ncvdefs.py
OSADP/Pikalert-Vehicle-Data-Translator-
295da604408f6f13af0301b55476a81311459386
[ "Apache-2.0" ]
null
null
null
scripts/python/blend_sat/ncvdefs.py
OSADP/Pikalert-Vehicle-Data-Translator-
295da604408f6f13af0301b55476a81311459386
[ "Apache-2.0" ]
2
2019-10-02T06:47:23.000Z
2020-02-02T18:32:23.000Z
#!/usr/bin/env python # # File containing standard definitions for various things # # File suffixes or extensions ADDS_SUFFIX = "bin" ASC_SUFFIX = "asc" BUFR_SUFFIX = "bufr" EPL_SUFFIX = "epl" GINI_SUFFIX = "gini" GRB_SUFFIX = "grb" GRB2_SUFFIX = "grb2" GZIP_SUFFIX = "gz" HDF_SUFFIX = "h5" NC_SUFFIX = "nc" NETCDF_SUF...
46.229299
118
0.539267
ADDS_SUFFIX = "bin" ASC_SUFFIX = "asc" BUFR_SUFFIX = "bufr" EPL_SUFFIX = "epl" GINI_SUFFIX = "gini" GRB_SUFFIX = "grb" GRB2_SUFFIX = "grb2" GZIP_SUFFIX = "gz" HDF_SUFFIX = "h5" NC_SUFFIX = "nc" NETCDF_SUFFIX = "nc" PKL_SUFFIX = "pkl" PYL_SUFFIX = "pyl" Ascii = "ascii" Grib = "grib" Grib2 = "grib2" Hdf = "hdf" Mdv = ...
true
true
f758a5ca710442733604415e64f9bd6c165753d7
3,109
py
Python
examples/python/real_time_insights.py
JeffreyLuu/apexe3-api
081da51370e8b01b1e8169e4137a99636ea71866
[ "MIT" ]
null
null
null
examples/python/real_time_insights.py
JeffreyLuu/apexe3-api
081da51370e8b01b1e8169e4137a99636ea71866
[ "MIT" ]
null
null
null
examples/python/real_time_insights.py
JeffreyLuu/apexe3-api
081da51370e8b01b1e8169e4137a99636ea71866
[ "MIT" ]
null
null
null
''' /** * real_time_insights.py * * Streams a real-time insights for the supplied pair * An example of the real-time insights is available here: * https://app.ae3platform.com/insights * * Disclaimer: * APEX:E3 is a financial technology company based in the United Kingdom https://www.apexe3.com * * None of...
34.164835
95
0.616919
import sys sys.path.append('..') from apexe3.apexe3 import initialise from apexe3.apexe3 import initialise_stream from apexe3.apexe3 import initialise_insights_for_pair import pandas as pd base = 'btc' quote = 'usdt' def process_spread(event): print('Best spreads for ' + str(base) +' '+ str(quote)) table=pd....
true
true
f758a6638bd3d3e99a3123d81b4e81e8b19203d5
11,575
py
Python
src/discriminator/instance.py
Ravi-0809/question-generation
9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c
[ "MIT" ]
212
2018-08-15T11:06:35.000Z
2021-11-21T10:21:55.000Z
src/discriminator/instance.py
Ravi-0809/question-generation
9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c
[ "MIT" ]
44
2018-10-15T12:50:31.000Z
2020-11-13T18:02:03.000Z
src/discriminator/instance.py
Ravi-0809/question-generation
9065a3b47293b8a69a0548af1f6bedd4a4aa7f9c
[ "MIT" ]
51
2018-08-17T18:17:43.000Z
2021-03-04T06:14:52.000Z
import sys,json,time,os sys.path.insert(0, "/Users/tom/Dropbox/msc-ml/project/src/") sys.path.insert(0, "/cs/student/msc/ml/2017/thosking/dev/msc-project/src/") import tensorflow as tf import numpy as np import discriminator.config from discriminator.model import Model from discriminator.prepro import convert_to_feat...
38.712375
160
0.623067
import sys,json,time,os sys.path.insert(0, "/Users/tom/Dropbox/msc-ml/project/src/") sys.path.insert(0, "/cs/student/msc/ml/2017/thosking/dev/msc-project/src/") import tensorflow as tf import numpy as np import discriminator.config from discriminator.model import Model from discriminator.prepro import convert_to_feat...
true
true
f758a8147e484ea7566933dbc130e20625fa989e
14,673
py
Python
spyder/plugins/editor/widgets/tests/test_editorsplitter.py
seryj/spyder
acea4f501c1a04d57b02e5e817708a69b503f430
[ "MIT" ]
1
2019-07-17T00:20:41.000Z
2019-07-17T00:20:41.000Z
spyder/plugins/editor/widgets/tests/test_editorsplitter.py
sixteentons/spyder
ae9513879e0dc9b6909e065e304c00a04179a0ec
[ "MIT" ]
null
null
null
spyder/plugins/editor/widgets/tests/test_editorsplitter.py
sixteentons/spyder
ae9513879e0dc9b6909e065e304c00a04179a0ec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # """ Tests for EditorSplitter class in editor.py """ # Standard library imports try: from unittest.mock import Mock import pathlib except ImportError: from mock import Mock # Python 2 im...
34.935714
82
0.669665
try: from unittest.mock import Mock import pathlib except ImportError: from mock import Mock import pathlib2 as pathlib import os import os.path as osp from functools import partial import pytest from qtpy.QtCore import Qt from spyder.plugins.editor.widgets.editor import EditorStack, EditorSplitte...
true
true
f758a843fc039717ae670fa32efe9c70e73354d7
277
py
Python
vehicle_management/vehicle_management/doctype/vehicle_owner_contract/test_vehicle_owner_contract.py
muirawachanga/vehicle
1025f99ecab14d27485584f540e9630bfcb50c0f
[ "MIT" ]
null
null
null
vehicle_management/vehicle_management/doctype/vehicle_owner_contract/test_vehicle_owner_contract.py
muirawachanga/vehicle
1025f99ecab14d27485584f540e9630bfcb50c0f
[ "MIT" ]
null
null
null
vehicle_management/vehicle_management/doctype/vehicle_owner_contract/test_vehicle_owner_contract.py
muirawachanga/vehicle
1025f99ecab14d27485584f540e9630bfcb50c0f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2015, Bituls Company Limited and Contributors # See license.txt from __future__ import unicode_literals import unittest # test_records = frappe.get_test_records('Owner Contract') class TestOwnerContract(unittest.TestCase): pass
19.785714
61
0.761733
from __future__ import unicode_literals import unittest class TestOwnerContract(unittest.TestCase): pass
true
true
f758a88799406090a7e2b0f4fe6dbd4aa9ec2992
369
py
Python
Python/04_Sets/001_Introduction_to_Sets.py
drbuche/HackerRank
f956e29409f8af90025d04482149ec16b4f83622
[ "MIT" ]
1
2020-09-05T21:56:48.000Z
2020-09-05T21:56:48.000Z
Python/04_Sets/001_Introduction_to_Sets.py
drbuche/HackerRank
f956e29409f8af90025d04482149ec16b4f83622
[ "MIT" ]
null
null
null
Python/04_Sets/001_Introduction_to_Sets.py
drbuche/HackerRank
f956e29409f8af90025d04482149ec16b4f83622
[ "MIT" ]
null
null
null
# Problem : https://www.hackerrank.com/challenges/py-introduction-to-sets/problem # Score : 10 points(MAX) def average(arr): return (sum(set(arr))) / (len(set(arr))) # apenas divida a soma de um set pelo seu número de elementos if __name__ == '__main__': n = int(input()) arr = list(map(int, input().split...
30.75
107
0.658537
def average(arr): return (sum(set(arr))) / (len(set(arr))) if __name__ == '__main__': n = int(input()) arr = list(map(int, input().split())) result = average(arr) print(result)
true
true
f758a99d8401b2ae72ce089944b62d8b00bdc0be
4,475
py
Python
benchmark/startQiskit_Class3399.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class3399.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class3399.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=4 # total number=46 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_...
34.960938
140
0.648492
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2 import numpy as np import networkx as nx def bitwise_xor(s: str, t: str) -> str: len...
true
true
f758aa75d701602a3ea0f45c382ea03ae2d44a1d
16,051
py
Python
Jumpscale/clients/git/GitClient.py
Dinaamagdy/jumpscale_core
dec5d42e368ab2b5b2e40837b71d27a59cb501ab
[ "Apache-2.0" ]
null
null
null
Jumpscale/clients/git/GitClient.py
Dinaamagdy/jumpscale_core
dec5d42e368ab2b5b2e40837b71d27a59cb501ab
[ "Apache-2.0" ]
null
null
null
Jumpscale/clients/git/GitClient.py
Dinaamagdy/jumpscale_core
dec5d42e368ab2b5b2e40837b71d27a59cb501ab
[ "Apache-2.0" ]
null
null
null
from Jumpscale import j import git import copy JSBASE = j.application.jsbase_get_class() class GitClient(JSBASE): """ Client of git services, has all git related operations like push, pull, ... """ def __init__(self, baseDir, check_path=True): # NOQA if baseDir==None or baseDir.strip()=="":...
31.721344
125
0.54682
from Jumpscale import j import git import copy JSBASE = j.application.jsbase_get_class() class GitClient(JSBASE): def __init__(self, baseDir, check_path=True): if baseDir==None or baseDir.strip()=="": raise RuntimeError("basedir cannot be empty") baseDir_org=copy.copy(baseDir) ...
true
true
f758aca726f3d42e1f2b8313c2a96882950c5608
314
py
Python
doc/customizing_guide/scripts/coord_convert.py
areza7/glue
42b68baec522b257e70a2f902c151233a0414720
[ "BSD-3-Clause" ]
null
null
null
doc/customizing_guide/scripts/coord_convert.py
areza7/glue
42b68baec522b257e70a2f902c151233a0414720
[ "BSD-3-Clause" ]
null
null
null
doc/customizing_guide/scripts/coord_convert.py
areza7/glue
42b68baec522b257e70a2f902c151233a0414720
[ "BSD-3-Clause" ]
null
null
null
from glue.config import link_function @link_function(info="Celsius to Fahrenheit", output_labels=['F']) def celsius2farhenheit(c): return c * 9. / 5. + 32 @link_function(info="Fahrenheit to Celsius", output_labels=['C']) def farhenheit2celsius(f): return (f - 32) * 5. / 9.
26.166667
44
0.633758
from glue.config import link_function @link_function(info="Celsius to Fahrenheit", output_labels=['F']) def celsius2farhenheit(c): return c * 9. / 5. + 32 @link_function(info="Fahrenheit to Celsius", output_labels=['C']) def farhenheit2celsius(f): return (f - 32) * 5. / 9.
true
true
f758ae42f199d6476077c532e3c8a80bee045533
45,584
py
Python
code/client/munkilib/updatecheck/analyze.py
ca-ecuad-macadmins/munki
ddc456b5c766dd1ec03b3631b953c486a9f848c8
[ "Apache-2.0" ]
2,536
2015-01-03T18:11:06.000Z
2022-03-29T09:06:02.000Z
code/client/munkilib/updatecheck/analyze.py
ca-ecuad-macadmins/munki
ddc456b5c766dd1ec03b3631b953c486a9f848c8
[ "Apache-2.0" ]
639
2015-01-09T02:42:46.000Z
2022-03-31T14:41:28.000Z
code/client/munkilib/updatecheck/analyze.py
ca-ecuad-macadmins/munki
ddc456b5c766dd1ec03b3631b953c486a9f848c8
[ "Apache-2.0" ]
439
2015-01-05T18:09:53.000Z
2022-03-28T17:15:04.000Z
# encoding: utf-8 # # Copyright 2009-2021 Greg Neagle. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
44.60274
80
0.602668
from __future__ import absolute_import, print_function import datetime import os from . import catalogs from . import compare from . import download from . import installationstate from . import manifestutils from . import unused_software from .. import display from .. import fetch from .. import info from .. import...
true
true
f758af5f982ca00ece4ee66b8ec4c9848d2da3cb
58,934
py
Python
python/mxnet/optimizer.py
ijkguo/mxnet
c7667126163c0d90c5cfab19579272ea714cf949
[ "Apache-2.0" ]
4
2016-07-01T00:20:33.000Z
2018-01-26T12:19:06.000Z
python/mxnet/optimizer.py
ijkguo/mxnet
c7667126163c0d90c5cfab19579272ea714cf949
[ "Apache-2.0" ]
6
2018-06-21T17:08:26.000Z
2018-08-09T17:58:08.000Z
python/mxnet/optimizer.py
ijkguo/mxnet
c7667126163c0d90c5cfab19579272ea714cf949
[ "Apache-2.0" ]
3
2016-07-19T15:36:21.000Z
2018-03-19T01:27:52.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.468668
129
0.618251
import logging import math import pickle import warnings import numpy from .base import py_str from .ndarray import (NDArray, zeros, clip, sqrt, cast, maximum, abs as NDabs) from .ndarray import (sgd_update, sgd_mom_update, adam_update, rmsprop_update, rmspropalex_update, mp_sgd_update, mp_sgd_mo...
true
true