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
f75c0a08b21dcb84348aef0091fd0c91b5c17bee
228,623
py
Python
kubernetes/client/apis/rbac_authorization_v1beta1_api.py
kevingessner/python
3f4d09d260cf0839fae8173852c69e0419188454
[ "Apache-2.0" ]
null
null
null
kubernetes/client/apis/rbac_authorization_v1beta1_api.py
kevingessner/python
3f4d09d260cf0839fae8173852c69e0419188454
[ "Apache-2.0" ]
null
null
null
kubernetes/client/apis/rbac_authorization_v1beta1_api.py
kevingessner/python
3f4d09d260cf0839fae8173852c69e0419188454
[ "Apache-2.0" ]
1
2018-07-19T16:37:20.000Z
2018-07-19T16:37:20.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os im...
63.418308
1,390
0.646934
""" Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import sys import os import re from si...
false
true
f75c0a7772c050d78f163d6b00405e860a1aef86
4,836
py
Python
src/Nim.py
frouhi/Neural_network_for_Nim
481d76024030214ab67cd9129379d2a85dc7a05c
[ "MIT" ]
1
2020-01-06T14:33:45.000Z
2020-01-06T14:33:45.000Z
src/Nim.py
frouhi/Neural_network_for_Nim
481d76024030214ab67cd9129379d2a85dc7a05c
[ "MIT" ]
null
null
null
src/Nim.py
frouhi/Neural_network_for_Nim
481d76024030214ab67cd9129379d2a85dc7a05c
[ "MIT" ]
null
null
null
import pickle ''' This code uses the saved neural net to solve the nim game. Original output has 9 bits. Each bit of the output of NN is rounded to closest integer. The three most significant bits tell us which pile should change. The pile that has a value of 1 must change (the order is from left to right). The 6 least...
33.123288
99
0.539495
import pickle with open("../data/biases.txt", "rb") as fp: biases = pickle.load(fp) with open("../data/weights.txt", "rb") as fp: weights = pickle.load(fp) def forward_propagation(x): activations = [x] inp = x.copy() for l in range(0,len(weights)): outp = [] for r in range(0,l...
true
true
f75c0c3d4837685931a3036452b0b0a6fa209520
7,440
py
Python
tools/notifications.py
hnawar/rad-lab
f431fd556e1043bb0ad3aa9e66b1535f47c2c2a3
[ "Apache-2.0" ]
28
2021-11-03T13:34:40.000Z
2022-03-30T18:15:54.000Z
tools/notifications.py
hnawar/rad-lab
f431fd556e1043bb0ad3aa9e66b1535f47c2c2a3
[ "Apache-2.0" ]
29
2021-11-04T19:38:56.000Z
2022-03-31T12:47:32.000Z
tools/notifications.py
hnawar/rad-lab
f431fd556e1043bb0ad3aa9e66b1535f47c2c2a3
[ "Apache-2.0" ]
11
2021-11-04T13:15:41.000Z
2022-03-30T18:16:04.000Z
#!/usr/bin/env python3 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
36.831683
163
0.444489
import os import json import requests from pprint import pprint from requests.exceptions import URLRequired def main(): TOKEN = os.getenv('GITHUB_TOKEN') WEBHOOK = os.getenv('WEBHOOK') GITHUB_REPOSITORY = os.getenv('GITHUB_REPOSITORY') response = open_issue(GITHUB_REPOSITORY...
true
true
f75c0d7c5229a30d8dad9e55bf4023cea953d4fc
1,922
py
Python
learning/input.py
ucsd-progsys/nate
8b1267cd8b10283d8bc239d16a28c654a4cb8942
[ "BSD-3-Clause" ]
9
2017-08-30T23:00:52.000Z
2021-02-25T23:08:55.000Z
learning/input.py
ucsd-progsys/ml2
8b1267cd8b10283d8bc239d16a28c654a4cb8942
[ "BSD-3-Clause" ]
null
null
null
learning/input.py
ucsd-progsys/ml2
8b1267cd8b10283d8bc239d16a28c654a4cb8942
[ "BSD-3-Clause" ]
1
2022-03-31T19:50:33.000Z
2022-03-31T19:50:33.000Z
import pandas as pd import numpy as np def load_csv(path, filter_no_labels=False, balance_labels=True, only_slice=False, no_slice=False): '''Load feature vectors from a csv file. Expects a header row with feature columns prefixed with 'F-' and label columns prefixed with 'L-'. @param filter_no_labels...
32.576271
98
0.604579
import pandas as pd import numpy as np def load_csv(path, filter_no_labels=False, balance_labels=True, only_slice=False, no_slice=False): '''Load feature vectors from a csv file. Expects a header row with feature columns prefixed with 'F-' and label columns prefixed with 'L-'. @param filter_no_labels...
false
true
f75c0e4b96d4121fa0d591bf204eff3300388581
61,194
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_network_interfaces_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_network_interfaces_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_network_interfaces_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
52.572165
354
0.680443
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f75c0e7704114bad5772998a204dd7a3c66ddae8
5,464
py
Python
tests/fixtures.py
figgyfigs/revaultd
e60a87e2170e4b4f6dc075f759c1f01836ca175a
[ "BSD-3-Clause" ]
1
2021-04-28T21:49:51.000Z
2021-04-28T21:49:51.000Z
tests/fixtures.py
figgyfigs/revaultd
e60a87e2170e4b4f6dc075f759c1f01836ca175a
[ "BSD-3-Clause" ]
null
null
null
tests/fixtures.py
figgyfigs/revaultd
e60a87e2170e4b4f6dc075f759c1f01836ca175a
[ "BSD-3-Clause" ]
null
null
null
""" Most of the code here was initially stolen from C-lightning's test suite. Credits to Rusty Russell and Christian Decker from Blockstream who wrote most of the file i originally copied! (MIT licensed) """ from concurrent import futures from ephemeral_port_reserve import reserve from test_framework.bitcoind import Bi...
25.413953
119
0.666545
from concurrent import futures from ephemeral_port_reserve import reserve from test_framework.bitcoind import BitcoinD from test_framework.revaultd import ManagerRevaultd, StakeholderRevaultd from test_framework.revault_network import RevaultNetwork from test_framework.utils import ( get_participants, POSTGRES_...
true
true
f75c0f2ef923259c491b042c1a76550db493b211
7,252
py
Python
plugins.py
iSplasher/pluginpie
7909c3ae481bf1f6cc8cd13528fc6c16f973163b
[ "Apache-2.0" ]
null
null
null
plugins.py
iSplasher/pluginpie
7909c3ae481bf1f6cc8cd13528fc6c16f973163b
[ "Apache-2.0" ]
null
null
null
plugins.py
iSplasher/pluginpie
7909c3ae481bf1f6cc8cd13528fc6c16f973163b
[ "Apache-2.0" ]
null
null
null
import logging import os import uuid import threading import sys import traceback log = logging.getLogger(__name__) log_i = log.info log_d = log.debug log_w = log.warning log_e = log.error log_c = log.critical class Plugins: "" _connections = set() _plugins = {} hooks = {} def register(self, plu...
32.231111
124
0.604661
import logging import os import uuid import threading import sys import traceback log = logging.getLogger(__name__) log_i = log.info log_d = log.debug log_w = log.warning log_e = log.error log_c = log.critical class Plugins: _connections = set() _plugins = {} hooks = {} def register(self, plugin): ...
true
true
f75c0f3bb347d398c2b9df6f4d55a759d7296540
560
py
Python
mundo-1/ex011.py
PedroSantana2/exercicios-python-canal-curso-em-video
154ae9771e88906c7fcef5efc5799e44acfc2ae3
[ "MIT" ]
1
2021-03-17T20:16:36.000Z
2021-03-17T20:16:36.000Z
mundo-1/ex011.py
PedroSantana2/exercicios-python-canal-curso-em-video
154ae9771e88906c7fcef5efc5799e44acfc2ae3
[ "MIT" ]
null
null
null
mundo-1/ex011.py
PedroSantana2/exercicios-python-canal-curso-em-video
154ae9771e88906c7fcef5efc5799e44acfc2ae3
[ "MIT" ]
null
null
null
''' Faça um programa que leia a largura e a altura de uma parede em metros, calcule a sua area e a quantidade de tinta necessária para pinta-la, sabendo que cada litro de tinta, pinta uma area de 2m^2 ''' #Recebendo informações: largura = float(input('Digite a largura da parede: ')) altura = float(input('Digite a altu...
32.941176
196
0.730357
largura = float(input('Digite a largura da parede: ')) altura = float(input('Digite a altura da parede: ')) area = largura * altura tinta = area / 2 print('Pra pintar a parede de {:.2f} m2 você precisara de {:.2f} litros de tinta!'.format(area, tinta))
true
true
f75c0fc8597ea4398a89cc1d9ddf765061ff4ed1
4,097
py
Python
data/runBetData.py
humanyp/grid-futures-spot
611bf85310a956e1c786212757bfd0706eb63280
[ "MIT" ]
1
2021-05-22T16:56:03.000Z
2021-05-22T16:56:03.000Z
data/runBetData.py
li-tang826454/grid-futures-spot
037b7d0eb623f2229d255ebd206ed34c62d2ee67
[ "MIT" ]
null
null
null
data/runBetData.py
li-tang826454/grid-futures-spot
037b7d0eb623f2229d255ebd206ed34c62d2ee67
[ "MIT" ]
null
null
null
import os,json # linux data_path = os.getcwd()+"/data/data.json" # 本地调试 # data_path = os.getcwd()+""+"/data/data.json" # windows # data_path = os.getcwd() + "\data\data.json" class RunBetData: def _get_json_data(self): '''读取json文件''' tmp_json = {} with open(data_path, 'r') as f: ...
33.581967
133
0.609226
import os,json data_path = os.getcwd()+"/data/data.json" class RunBetData: def _get_json_data(self): tmp_json = {} with open(data_path, 'r') as f: tmp_json = json.load(f) f.close() return tmp_json def _modify_json_data(self,data): with open(data_path, ...
true
true
f75c10a90632f4b521b5383bbf5cf33532139ce2
3,062
py
Python
tests/task_plugin_test.py
pchoisel/girder_worker
66e1e8b82ee3e64421b59111a76b84852eec7947
[ "Apache-2.0" ]
37
2016-01-26T19:21:23.000Z
2021-06-10T14:12:59.000Z
tests/task_plugin_test.py
pchoisel/girder_worker
66e1e8b82ee3e64421b59111a76b84852eec7947
[ "Apache-2.0" ]
290
2016-01-27T14:02:10.000Z
2022-01-24T16:50:27.000Z
tests/task_plugin_test.py
pchoisel/girder_worker
66e1e8b82ee3e64421b59111a76b84852eec7947
[ "Apache-2.0" ]
29
2016-02-17T17:54:47.000Z
2022-03-17T23:36:17.000Z
from girder_worker import entrypoint from girder_worker.__main__ import main from girder_worker.entrypoint import discover_tasks import mock import pytest def setup_function(func): if hasattr(func, 'pytestmark'): for m in func.pytestmark: if m.name == 'namespace': namespace = ...
33.648352
93
0.701502
from girder_worker import entrypoint from girder_worker.__main__ import main from girder_worker.entrypoint import discover_tasks import mock import pytest def setup_function(func): if hasattr(func, 'pytestmark'): for m in func.pytestmark: if m.name == 'namespace': namespace = ...
true
true
f75c10e0edf35db5a694cba7b6467cdcd28138d0
9,654
py
Python
py/webScrapper/getSyntax.py
argonde/codeSkills
939feb29102a2e47a8c2c3047d3f77dd75b1465d
[ "Unlicense" ]
null
null
null
py/webScrapper/getSyntax.py
argonde/codeSkills
939feb29102a2e47a8c2c3047d3f77dd75b1465d
[ "Unlicense" ]
null
null
null
py/webScrapper/getSyntax.py
argonde/codeSkills
939feb29102a2e47a8c2c3047d3f77dd75b1465d
[ "Unlicense" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # auth: Ruben López Vázquez import requests from bs4 import BeautifulSoup from IPython.core.display import clear_output from random import randint import pandas as pd import csv import time as t import sqlite3 import sys import os def is_digit(check_input): """ func...
39.243902
119
0.598301
import requests from bs4 import BeautifulSoup from IPython.core.display import clear_output from random import randint import pandas as pd import csv import time as t import sqlite3 import sys import os def is_digit(check_input): if check_input.isdigit(): return True return False def create_table()...
true
true
f75c1108626161702826e7b0c972a2d11ea7bbd4
1,007
py
Python
marqeta/response_models/commando_mode_nested_transition.py
marqeta/marqeta-python
66fa690eb910825c510a391720b0fe717fac0234
[ "MIT" ]
21
2019-04-12T09:02:17.000Z
2022-02-18T11:39:06.000Z
marqeta/response_models/commando_mode_nested_transition.py
marqeta/marqeta-python
66fa690eb910825c510a391720b0fe717fac0234
[ "MIT" ]
1
2020-07-22T21:27:40.000Z
2020-07-23T17:38:43.000Z
marqeta/response_models/commando_mode_nested_transition.py
marqeta/marqeta-python
66fa690eb910825c510a391720b0fe717fac0234
[ "MIT" ]
10
2019-05-08T14:20:37.000Z
2021-09-20T18:09:26.000Z
from datetime import datetime, date from marqeta.response_models import datetime_object import json import re class CommandoModeNestedTransition(object): def __init__(self, json_response): self.json_response = json_response def __str__(self): return json.dumps(self.json_response, default=self...
25.175
121
0.701092
from datetime import datetime, date from marqeta.response_models import datetime_object import json import re class CommandoModeNestedTransition(object): def __init__(self, json_response): self.json_response = json_response def __str__(self): return json.dumps(self.json_response, default=self...
true
true
f75c1112b78129f2a8b4252181fe3963b3a25220
5,184
py
Python
java_sk/rewrite/generator.py
natebragg/java-sketch
f5ac26f2cc46ae4556f9a61c55afd37f55c961ff
[ "MIT" ]
15
2015-12-15T18:33:50.000Z
2021-09-29T11:48:54.000Z
java_sk/rewrite/generator.py
natebragg/java-sketch
f5ac26f2cc46ae4556f9a61c55afd37f55c961ff
[ "MIT" ]
11
2015-11-16T22:14:58.000Z
2021-09-23T05:28:40.000Z
java_sk/rewrite/generator.py
natebragg/java-sketch
f5ac26f2cc46ae4556f9a61c55afd37f55c961ff
[ "MIT" ]
8
2015-11-16T21:50:08.000Z
2021-03-23T15:15:34.000Z
import copy import logging import lib.const as C import lib.visit as v from .. import util from ..meta import class_nonce, register_class, class_lookup from ..meta.program import Program from ..meta.clazz import Clazz from ..meta.method import Method from ..meta.field import Field from ..meta.statement import Stateme...
24.923077
131
0.661844
import copy import logging import lib.const as C import lib.visit as v from .. import util from ..meta import class_nonce, register_class, class_lookup from ..meta.program import Program from ..meta.clazz import Clazz from ..meta.method import Method from ..meta.field import Field from ..meta.statement import Stateme...
true
true
f75c111deab2fcfeed5ef1b7ad833b7c99d1ed0a
506
py
Python
5 objectSwarmModelBugs/start 5 objectSwarmModelBugs.py
vishalbelsare/SLAPP2
d0e26502d4b512c4feaea413b7a09461548a0b6c
[ "CC0-1.0" ]
1
2018-01-10T15:23:38.000Z
2018-01-10T15:23:38.000Z
5 objectSwarmModelBugs/start 5 objectSwarmModelBugs.py
vishalbelsare/SLAPP2
d0e26502d4b512c4feaea413b7a09461548a0b6c
[ "CC0-1.0" ]
null
null
null
5 objectSwarmModelBugs/start 5 objectSwarmModelBugs.py
vishalbelsare/SLAPP2
d0e26502d4b512c4feaea413b7a09461548a0b6c
[ "CC0-1.0" ]
2
2017-08-03T20:44:33.000Z
2018-01-10T15:24:31.000Z
#start 5 objectSwarmModelBugs.py from Tools import * from ModelSwarm import * nBugs = input("How many bugs? ") worldXSize= input("X Size of the world? ") worldYSize= input("Y Size of the world? ") nCycles = input("How many cycles? (0 = exit) ") modelSwarm = ModelSwarm(nBugs, nCycles, worldXSize, worldYSize) ...
22
64
0.705534
from Tools import * from ModelSwarm import * nBugs = input("How many bugs? ") worldXSize= input("X Size of the world? ") worldYSize= input("Y Size of the world? ") nCycles = input("How many cycles? (0 = exit) ") modelSwarm = ModelSwarm(nBugs, nCycles, worldXSize, worldYSize) modelSwarm.buildObjects() mo...
false
true
f75c112cea32ca488ed406edf3a49266f718ed3c
2,067
py
Python
setup.py
inemajo/py3status
2dbe8b8cabb721edb4ddce902e80636fb10aadd4
[ "BSD-3-Clause" ]
null
null
null
setup.py
inemajo/py3status
2dbe8b8cabb721edb4ddce902e80636fb10aadd4
[ "BSD-3-Clause" ]
null
null
null
setup.py
inemajo/py3status
2dbe8b8cabb721edb4ddce902e80636fb10aadd4
[ "BSD-3-Clause" ]
null
null
null
""" py3status """ from setuptools import find_packages, setup import fastentrypoints # noqa f401 import os import sys module_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "py3status") sys.path.insert(0, module_path) from version import version # noqa e402 sys.path.remove(module_path) # Utility...
31.318182
84
0.658926
from setuptools import find_packages, setup import fastentrypoints import os import sys module_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "py3status") sys.path.insert(0, module_path) from version import version sys.path.remove(module_path) # README file and 2) it's easier to type in the REA...
true
true
f75c113b5cbaccb18a4f3743811a8f7c57f1f22c
2,941
py
Python
legal-api/src/legal_api/services/authz.py
argush3/lear
804820ea93a9ca44d1a474ce7a903bb0a808aacb
[ "Apache-2.0" ]
1
2019-11-07T20:32:59.000Z
2019-11-07T20:32:59.000Z
legal-api/src/legal_api/services/authz.py
argush3/lear
804820ea93a9ca44d1a474ce7a903bb0a808aacb
[ "Apache-2.0" ]
null
null
null
legal-api/src/legal_api/services/authz.py
argush3/lear
804820ea93a9ca44d1a474ce7a903bb0a808aacb
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
37.227848
117
0.66168
from http import HTTPStatus from typing import List from flask import current_app from flask_jwt_oidc import JwtManager from requests import Session, exceptions from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry SYSTEM_ROLE = 'system' STAFF_ROLE = 'staff' BASIC_USER = 'basic' COLIN_SVC_RO...
true
true
f75c11c97ed7b0b4a776b40750b0a50ba894e293
2,229
py
Python
resolwe_bio/tools/make_igv_session_archive.py
dblenkus/resolwe-bio
5077a162f454576dbe1bc41e97923bde49420261
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tools/make_igv_session_archive.py
dblenkus/resolwe-bio
5077a162f454576dbe1bc41e97923bde49420261
[ "Apache-2.0" ]
null
null
null
resolwe_bio/tools/make_igv_session_archive.py
dblenkus/resolwe-bio
5077a162f454576dbe1bc41e97923bde49420261
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """Create IGV session for archive.""" import argparse import os from lxml import etree parser = argparse.ArgumentParser(description="Create igv session.") parser.add_argument( "-f", "--input_file", required=True, help="File with paths to files for IGV." ) args = parser.parse_args() def...
27.518519
93
0.607896
import argparse import os from lxml import etree parser = argparse.ArgumentParser(description="Create igv session.") parser.add_argument( "-f", "--input_file", required=True, help="File with paths to files for IGV." ) args = parser.parse_args() def get_build_info(input_file): build_dict = { "hg38...
true
true
f75c11d1537163d15f8a33d1eda8d891537755b0
8,169
py
Python
Batman_Game.py
aku181/Batvsjoker
6cde5eefd4ed2d206b7f994e1425411dba92560a
[ "MIT" ]
null
null
null
Batman_Game.py
aku181/Batvsjoker
6cde5eefd4ed2d206b7f994e1425411dba92560a
[ "MIT" ]
null
null
null
Batman_Game.py
aku181/Batvsjoker
6cde5eefd4ed2d206b7f994e1425411dba92560a
[ "MIT" ]
null
null
null
import pygame, random pygame.init() pygame.mixer.init() # loading music pygame.mixer.music.load("batman_theme.mp3") try: batmanAttackSound = pygame.mixer.Sound("batman.wav") JokerattackSound = pygame.mixer.Sound("bullet.mp3") batmanLost = pygame.mixer.Sound("pushups.mp3") jokerHealthSound = pygame.mix...
27.691525
107
0.580242
import pygame, random pygame.init() pygame.mixer.init() pygame.mixer.music.load("batman_theme.mp3") try: batmanAttackSound = pygame.mixer.Sound("batman.wav") JokerattackSound = pygame.mixer.Sound("bullet.mp3") batmanLost = pygame.mixer.Sound("pushups.mp3") jokerHealthSound = pygame.mixer.Sound("seriou...
true
true
f75c12425d67a924ca15d427cd89dd9540fa9057
247
py
Python
VBYO-2017/kodlar/YuksekBasarimliHesaplama/ParPy/basic_3.py
metinuslu/VeriBilimiYazOkullari
474c4481a779532fb667874a44bcb03f8852e8e0
[ "MIT" ]
3
2020-02-17T19:17:56.000Z
2021-09-03T10:38:32.000Z
VBYO-2017/kodlar/YuksekBasarimliHesaplama/ParPy/basic_3.py
gokhangemici/VeriBilimiYazOkullari
474c4481a779532fb667874a44bcb03f8852e8e0
[ "MIT" ]
null
null
null
VBYO-2017/kodlar/YuksekBasarimliHesaplama/ParPy/basic_3.py
gokhangemici/VeriBilimiYazOkullari
474c4481a779532fb667874a44bcb03f8852e8e0
[ "MIT" ]
3
2019-12-07T01:11:03.000Z
2021-09-03T10:38:35.000Z
import uuid import multiprocessing def my_function(): print 'My Unique Id: {0}'.format(uuid.uuid1()) if __name__ == '__main__': for x in range(16): process = multiprocessing.Process(target=my_function) process.start()
20.583333
61
0.668016
import uuid import multiprocessing def my_function(): print 'My Unique Id: {0}'.format(uuid.uuid1()) if __name__ == '__main__': for x in range(16): process = multiprocessing.Process(target=my_function) process.start()
false
true
f75c127c9c4736d78c8b223dc86dbb8ef4047d5d
15,998
py
Python
tensor2tensor/trax/layers/core.py
byronyi/tensor2tensor
b93fc036fdbacfddcadad8fb781f5b670533384e
[ "Apache-2.0" ]
null
null
null
tensor2tensor/trax/layers/core.py
byronyi/tensor2tensor
b93fc036fdbacfddcadad8fb781f5b670533384e
[ "Apache-2.0" ]
null
null
null
tensor2tensor/trax/layers/core.py
byronyi/tensor2tensor
b93fc036fdbacfddcadad8fb781f5b670533384e
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
36.692661
80
0.684586
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import operator as op from jax import lax import numpy as onp from six.moves import reduce from tensor2tensor.trax import backend from tensor2tensor.trax.backend import numpy as np from ten...
true
true
f75c1302f76279e33294c895d2a261f72e98ffdc
889
py
Python
aboutrape/views.py
slamice/aboutrape
ccbc15cf469246861ae9a73878eaac06aac0a292
[ "MIT" ]
null
null
null
aboutrape/views.py
slamice/aboutrape
ccbc15cf469246861ae9a73878eaac06aac0a292
[ "MIT" ]
null
null
null
aboutrape/views.py
slamice/aboutrape
ccbc15cf469246861ae9a73878eaac06aac0a292
[ "MIT" ]
null
null
null
from django.views.generic import View from django.shortcuts import render, render_to_response from django.template import Template, Context from django.http import HttpResponse, HttpResponseRedirect from aboutrape.models import Category, Comment, UserProfile import json def about(request): users = UserProfile.obje...
44.45
133
0.778403
from django.views.generic import View from django.shortcuts import render, render_to_response from django.template import Template, Context from django.http import HttpResponse, HttpResponseRedirect from aboutrape.models import Category, Comment, UserProfile import json def about(request): users = UserProfile.obje...
true
true
f75c1350662b7401a4989803e476f27ed565157b
21,516
py
Python
hata/discord/emoji/emoji.py
WizzyBots/hata
f6991afc0bebf7dad932888a536f4d010f8663c7
[ "0BSD" ]
1
2022-03-02T03:59:57.000Z
2022-03-02T03:59:57.000Z
hata/discord/emoji/emoji.py
m0nk3ybraindead/hata
f87ed3d7009eeae31d6ea158772efd33775c7b1c
[ "0BSD" ]
1
2022-02-08T16:54:39.000Z
2022-02-08T16:54:39.000Z
hata/discord/emoji/emoji.py
WizzyBots/hata
f6991afc0bebf7dad932888a536f4d010f8663c7
[ "0BSD" ]
null
null
null
__all__ = ('Emoji',) from scarletio import export, include from ..bases import DiscordEntity, id_sort_key from ..bases import instance_or_id_to_instance, instance_or_id_to_snowflake, iterable_of_instance_or_id_to_snowflakes from ..core import BUILTIN_EMOJIS, EMOJIS, GUILDS, UNICODE_TO_EMOJI from ..http import urls a...
30.605974
119
0.500837
__all__ = ('Emoji',) from scarletio import export, include from ..bases import DiscordEntity, id_sort_key from ..bases import instance_or_id_to_instance, instance_or_id_to_snowflake, iterable_of_instance_or_id_to_snowflakes from ..core import BUILTIN_EMOJIS, EMOJIS, GUILDS, UNICODE_TO_EMOJI from ..http import urls a...
false
true
f75c171e272197891886ac7d90fca89fad25335a
2,269
py
Python
nlq/cosql/translate_sparc.py
huseinzol05/Malay-Dataset
e27b7617c74395c86bb5ed9f3f194b3cac2f66f6
[ "Apache-2.0" ]
51
2020-05-20T13:26:18.000Z
2021-05-13T07:21:17.000Z
nlq/sparc/translate_sparc.py
huseinzol05/Malaya-Dataset
c9c1917a6b1cab823aef5a73bd10e0fab0bff42d
[ "Apache-2.0" ]
3
2019-02-05T11:34:38.000Z
2020-03-19T03:18:38.000Z
nlq/cosql/translate_sparc.py
huseinzol05/Malaya-Dataset
c9c1917a6b1cab823aef5a73bd10e0fab0bff42d
[ "Apache-2.0" ]
21
2019-02-08T05:17:24.000Z
2020-05-05T09:28:50.000Z
from selenium import webdriver import threading from queue import Queue from tqdm import tqdm import warnings import time warnings.filterwarnings('ignore') span = '/html/body/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/div[2]/div[3]/div[1]/div[2]/div/span[1]/span' base_url = 'https://translate.google.com/#' class Tra...
30.662162
106
0.635963
from selenium import webdriver import threading from queue import Queue from tqdm import tqdm import warnings import time warnings.filterwarnings('ignore') span = '/html/body/div[2]/div[2]/div[1]/div[2]/div[1]/div[1]/div[2]/div[3]/div[1]/div[2]/div/span[1]/span' base_url = 'https://translate.google.com/#' class Tra...
true
true
f75c1729904c62be550f61e454a4df99f0da191b
2,746
py
Python
model/allergyintolerance.py
beda-software/fhir-py-experements
363cfb894fa6f971b9be19340cae1b0a3a4377d8
[ "MIT" ]
null
null
null
model/allergyintolerance.py
beda-software/fhir-py-experements
363cfb894fa6f971b9be19340cae1b0a3a4377d8
[ "MIT" ]
null
null
null
model/allergyintolerance.py
beda-software/fhir-py-experements
363cfb894fa6f971b9be19340cae1b0a3a4377d8
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.1-9346c8cc45 (http://hl7.org/fhir/StructureDefinition/AllergyIntolerance) on 2020-02-03. # 2020, SMART Health IT. import sys from dataclasses import dataclass, field from typing import ClassVar, Optional, List from .age import Age from .annota...
40.382353
115
0.753824
import sys from dataclasses import dataclass, field from typing import ClassVar, Optional, List from .age import Age from .annotation import Annotation from .backboneelement import BackboneElement from .codeableconcept import CodeableConcept from .domainresource import DomainResource from .fhirdate import FHIRDate fro...
true
true
f75c177780e092c9281f6ab6040351ef88f58664
232
py
Python
subscription/subscription/doctype/license_subscription_settings/test_license_subscription_settings.py
aerele/Subscription-v13
6d44098b76379e187bbe2ffc87ec31af25fed37e
[ "MIT" ]
null
null
null
subscription/subscription/doctype/license_subscription_settings/test_license_subscription_settings.py
aerele/Subscription-v13
6d44098b76379e187bbe2ffc87ec31af25fed37e
[ "MIT" ]
null
null
null
subscription/subscription/doctype/license_subscription_settings/test_license_subscription_settings.py
aerele/Subscription-v13
6d44098b76379e187bbe2ffc87ec31af25fed37e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, Subscription and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestLicenseSubscriptionSettings(unittest.TestCase): pass
21.090909
57
0.784483
from __future__ import unicode_literals import unittest class TestLicenseSubscriptionSettings(unittest.TestCase): pass
true
true
f75c17a9ca085994af536bb82cdf9e35d9f34c26
1,294
py
Python
source/sphinx_extensions/question.py
HelenHip/docs
9ad79b7c20925c3b87cab46a9804ec10b30f1f21
[ "BSD-3-Clause" ]
null
null
null
source/sphinx_extensions/question.py
HelenHip/docs
9ad79b7c20925c3b87cab46a9804ec10b30f1f21
[ "BSD-3-Clause" ]
null
null
null
source/sphinx_extensions/question.py
HelenHip/docs
9ad79b7c20925c3b87cab46a9804ec10b30f1f21
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
32.35
78
0.585781
from docutils import nodes from sphinx.util.docutils import SphinxDirective class QuestionAdmonition(nodes.Admonition, nodes.Element): pass class QuestionDirective(SphinxDirective): has_content = True def run(self): target_id = 'question-%d' % self.env.new_serialno('question') target_n...
true
true
f75c195777c70f59df24d7a876edb860089908ac
7,298
py
Python
lenstools/legacy/index.py
asabyr/LensTools
e155d6d39361e550906cec00dbbc57686a4bca5c
[ "MIT" ]
1
2021-04-27T02:03:11.000Z
2021-04-27T02:03:11.000Z
lenstools/legacy/index.py
asabyr/LensTools
e155d6d39361e550906cec00dbbc57686a4bca5c
[ "MIT" ]
null
null
null
lenstools/legacy/index.py
asabyr/LensTools
e155d6d39361e550906cec00dbbc57686a4bca5c
[ "MIT" ]
null
null
null
""" .. module:: index :platform: Unix :synopsis: This module implements a set of useful indexing operations useful for analyses with multiple statistical descriptors .. moduleauthor:: Andrea Petri <apetri@phys.columbia.edu> """ from abc import ABCMeta from abc import abstractproperty #########################...
24.085809
206
0.589203
from abc import ABCMeta from abc import abstractproperty class Descriptor(object): __metaclass__ = ABCMeta def __init__(self): self._first = None self._last = None self._start = 0 @abstractproperty def first(self): pass @abstractproperty def last(self): pass class PowerSpectrum(Descriptor): n...
true
true
f75c19be05d1085c15a42559b613ab6af199dc75
522
py
Python
hoodapp/migrations/0007_auto_20220103_1050.py
ezekielkibiego/The_Neighborhood
c688cce0906c8aa8d269faa671a668a147d7fc1c
[ "MIT" ]
null
null
null
hoodapp/migrations/0007_auto_20220103_1050.py
ezekielkibiego/The_Neighborhood
c688cce0906c8aa8d269faa671a668a147d7fc1c
[ "MIT" ]
null
null
null
hoodapp/migrations/0007_auto_20220103_1050.py
ezekielkibiego/The_Neighborhood
c688cce0906c8aa8d269faa671a668a147d7fc1c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.24 on 2022-01-03 07:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('hoodapp', '0006_auto_20220103_1050'), ] operations = [ migrations.RenameField( model_name='business', old_name='created_at'...
21.75
48
0.570881
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('hoodapp', '0006_auto_20220103_1050'), ] operations = [ migrations.RenameField( model_name='business', old_name='created_at', new_name='created_on', ), ...
true
true
f75c1a20a087891d2396f24b1bfbb87946850169
419
py
Python
src/CursoEmvideo/ex060.py
kessiarodrigues/Python-Course
2e6097af4475d826c2b242d4699aec72301060f7
[ "MIT" ]
null
null
null
src/CursoEmvideo/ex060.py
kessiarodrigues/Python-Course
2e6097af4475d826c2b242d4699aec72301060f7
[ "MIT" ]
null
null
null
src/CursoEmvideo/ex060.py
kessiarodrigues/Python-Course
2e6097af4475d826c2b242d4699aec72301060f7
[ "MIT" ]
null
null
null
'''from math import factorial n = int(input('Digite um número ´para calcular seu fatorial: ')) f = factorial(n) print('O fatorial de {} é {}'.format(n, f))''' n = int(input('Digite um número ´para calcular seu fatorial: ')) c = n f = 1 print('Calculando {}! = '.format(n), end='') while c > 0: print('{} '.format(c)...
26.1875
64
0.560859
n = int(input('Digite um número ´para calcular seu fatorial: ')) c = n f = 1 print('Calculando {}! = '.format(n), end='') while c > 0: print('{} '.format(c), end='') print(' x ' if c > 1 else ' = ', end='') f *= c c -= 1 print('{}'.format(f))
true
true
f75c1a5a63c873a6c022f28fe77f1222e46383a3
4,425
py
Python
accounts/user.py
vikifox/CMDB
bac9b7da204c3eee344f55bb2187df38ef3b3d4c
[ "Apache-2.0" ]
16
2020-08-13T04:28:50.000Z
2021-06-10T06:24:51.000Z
accounts/user.py
vikifox/CMDB
bac9b7da204c3eee344f55bb2187df38ef3b3d4c
[ "Apache-2.0" ]
1
2019-04-15T07:01:42.000Z
2019-04-15T07:01:42.000Z
accounts/user.py
vikifox/CMDB
bac9b7da204c3eee344f55bb2187df38ef3b3d4c
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # update by guohongze@126.com from django.shortcuts import render, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib import auth from accounts.forms import LoginUserForm, EditUserForm, ChangePasswordForm, ChangeLdapPasswordF...
30.308219
145
0.664181
from django.shortcuts import render, HttpResponseRedirect from django.contrib.auth.decorators import login_required from django.contrib import auth from accounts.forms import LoginUserForm, EditUserForm, ChangePasswordForm, ChangeLdapPasswordForm from django.contrib.auth import get_user_model from accounts.forms import...
true
true
f75c1a87298d9db9bf6e286c15e6a392ac70e5ee
8,543
py
Python
src/utils/image_augmentation.py
PawelRosikiewicz/SkinDiagnosticAI
7cc7b7a9ccd4103095a7548e7b99de4988858356
[ "MIT" ]
1
2021-05-15T09:57:25.000Z
2021-05-15T09:57:25.000Z
src/utils/image_augmentation.py
PawelRosikiewicz/SkinDiagnosticAI
7cc7b7a9ccd4103095a7548e7b99de4988858356
[ "MIT" ]
null
null
null
src/utils/image_augmentation.py
PawelRosikiewicz/SkinDiagnosticAI
7cc7b7a9ccd4103095a7548e7b99de4988858356
[ "MIT" ]
null
null
null
# ********************************************************************************** # # # # Project: FastClassAI workbecnch # # ...
45.441489
136
0.544305
import os import sys import re import glob import random import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib as mpl import tensorflow as tf import tensorflow_hub as hub import scipy.stats as stats import tensorflow.keras as keras from PIL import Image,...
true
true
f75c1d1d3f9cbc3f968d7605ea158ac0ea7606ba
7,787
py
Python
lib/models/backbones/resnet/wide_resnet_models.py
Xlinford/ContrastiveSeg
79eec700d2efdaad4da8cf0c07674107e72078da
[ "MIT" ]
1,069
2019-01-21T04:32:05.000Z
2022-03-30T12:07:36.000Z
lib/models/backbones/resnet/wide_resnet_models.py
Xlinford/ContrastiveSeg
79eec700d2efdaad4da8cf0c07674107e72078da
[ "MIT" ]
88
2019-02-13T03:43:09.000Z
2022-03-27T08:23:29.000Z
lib/models/backbones/resnet/wide_resnet_models.py
Xlinford/ContrastiveSeg
79eec700d2efdaad4da8cf0c07674107e72078da
[ "MIT" ]
124
2019-01-23T01:46:00.000Z
2022-03-26T14:07:23.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import torch.nn as nn from collections import OrderedDict from functools import partial from lib.models.tools.module_helper import ModuleHelper class GlobalAvgPool2d(nn.Module): ...
39.130653
121
0.535379
from __future__ import absolute_import from __future__ import division from __future__ import print_function import math import torch.nn as nn from collections import OrderedDict from functools import partial from lib.models.tools.module_helper import ModuleHelper class GlobalAvgPool2d(nn.Module): ...
true
true
f75c1d9eb94577e27f0fdee7d82c2e048246833a
1,829
py
Python
tests/test_preprocessing_glove.py
bbreton3/glove_tf_21
16b18bdb2d41c104dcd9159c0a760336bb5fd4d1
[ "MIT" ]
1
2020-04-18T16:33:05.000Z
2020-04-18T16:33:05.000Z
tests/test_preprocessing_glove.py
bbreton3/glove_tf_21
16b18bdb2d41c104dcd9159c0a760336bb5fd4d1
[ "MIT" ]
7
2020-11-13T17:44:25.000Z
2022-02-10T01:16:13.000Z
tests/test_preprocessing_glove.py
bbreton3/glove_tf_21
16b18bdb2d41c104dcd9159c0a760336bb5fd4d1
[ "MIT" ]
null
null
null
from glove_tf_21.utils.file_utils import save_labels import numpy as np import os def test_cooc_count(preprocessing_glove, ix_sequences_full, cooc_dict): output_cooc = dict() for ix_seq in ix_sequences_full: output_cooc = preprocessing_glove.cooc_count(output_cooc, ix_seq) assert len(output_cooc...
34.509434
108
0.785128
from glove_tf_21.utils.file_utils import save_labels import numpy as np import os def test_cooc_count(preprocessing_glove, ix_sequences_full, cooc_dict): output_cooc = dict() for ix_seq in ix_sequences_full: output_cooc = preprocessing_glove.cooc_count(output_cooc, ix_seq) assert len(output_cooc...
true
true
f75c1da2fe11ba659870267b6d31342ef11ea178
10,117
py
Python
python/tests/ibcc_test.py
CitizenScienceInAstronomyWorkshop/pyIBCC
35215648f3361689e374780182f39182eddda64f
[ "MIT" ]
11
2015-01-05T14:03:00.000Z
2020-05-31T07:22:20.000Z
python/tests/ibcc_test.py
CitizenScienceInAstronomyWorkshop/pyIBCC
35215648f3361689e374780182f39182eddda64f
[ "MIT" ]
5
2015-03-10T18:24:24.000Z
2018-04-03T12:52:40.000Z
python/tests/ibcc_test.py
CitizenScienceInAstronomyWorkshop/pyIBCC
35215648f3361689e374780182f39182eddda64f
[ "MIT" ]
7
2015-03-16T11:35:08.000Z
2018-04-24T05:45:51.000Z
''' Created on 8 Apr 2015 @author: edwin ''' import unittest import ibcc import logging import numpy as np from dynibcc import DynIBCC from ibcc_balanced import BalancedIBCC def check_accuracy(pT, target_acc, goldfile='./data/gold_verify.csv'): # check values are in tolerance range gold = np.genfromtxt(goldfi...
45.986364
119
0.632203
import unittest import ibcc import logging import numpy as np from dynibcc import DynIBCC from ibcc_balanced import BalancedIBCC def check_accuracy(pT, target_acc, goldfile='./data/gold_verify.csv'): gold = np.genfromtxt(goldfile) decisions = np.round(pT[:,1]) errors = np.abs(gold-decisions) ...
true
true
f75c1e068cb475ebc6d2d711039853fff097c8d6
57,082
py
Python
disnake/interactions/base.py
onerandomusername/disnake
d76c09fca5d50d3fbf1522890f668a6ed8812c21
[ "MIT" ]
null
null
null
disnake/interactions/base.py
onerandomusername/disnake
d76c09fca5d50d3fbf1522890f668a6ed8812c21
[ "MIT" ]
null
null
null
disnake/interactions/base.py
onerandomusername/disnake
d76c09fca5d50d3fbf1522890f668a6ed8812c21
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-present Disnake Development 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 restrictio...
37.308497
152
0.611594
from __future__ import annotations import asyncio from datetime import timedelta from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional, Tuple, Union, cast, overload from .. import utils from ..app_commands import OptionChoice from ..channel import ChannelType, PartialMessageable from ..enums import I...
true
true
f75c1f0d08aa27588fa0f125862b9e1034543b71
5,321
py
Python
ACROBAT_Merge.py
shaunwbell/EcoFOCI_AcrobatProcessing
4a8c2514d09c98779b473bfd25067e73dbf94956
[ "MIT" ]
2
2017-03-07T23:27:19.000Z
2020-10-01T18:14:14.000Z
ACROBAT_Merge.py
NOAA-PMEL/EcoFOCI_AcrobatProcessing
4a8c2514d09c98779b473bfd25067e73dbf94956
[ "MIT" ]
null
null
null
ACROBAT_Merge.py
NOAA-PMEL/EcoFOCI_AcrobatProcessing
4a8c2514d09c98779b473bfd25067e73dbf94956
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Mar 16 09:27:55 2017 @author: bell """ import pandas as pd import xarray as xa import matplotlib.pyplot as plt import seawater as sw import datetime from io_utils import ConfigParserLocal def cond2salinity(conductivity=None, temperature=None, pressur...
40.618321
134
0.700432
""" Created on Thu Mar 16 09:27:55 2017 @author: bell """ import pandas as pd import xarray as xa import matplotlib.pyplot as plt import seawater as sw import datetime from io_utils import ConfigParserLocal def cond2salinity(conductivity=None, temperature=None, pressure=None): stand_sw_cond = 4.2914 c...
false
true
f75c1f6fc5b74d828d68d91b49482933bd84286a
5,121
py
Python
WebServer/ProcessingServer/Request.py
yvanlvA/Possible_Web_Server_Frame
2992e2cf512d34efac8bd976b67fbbd46aa8a996
[ "MIT" ]
1
2019-12-16T07:55:55.000Z
2019-12-16T07:55:55.000Z
WebServer/ProcessingServer/Request.py
yvanlvA/Possible_Web_Server_Frame
2992e2cf512d34efac8bd976b67fbbd46aa8a996
[ "MIT" ]
null
null
null
WebServer/ProcessingServer/Request.py
yvanlvA/Possible_Web_Server_Frame
2992e2cf512d34efac8bd976b67fbbd46aa8a996
[ "MIT" ]
null
null
null
#_*_ coding:utf-8 _*_ import socket import mimetypes from urllib import parse class Request(object): def __init__(self, respServerSocket, client_addr, static_path, server_version): self.respServerSocket = respServerSocket self.requestByte = respServerSocket.recv(1024) self.static_path = ...
33.253247
108
0.568834
import socket import mimetypes from urllib import parse class Request(object): def __init__(self, respServerSocket, client_addr, static_path, server_version): self.respServerSocket = respServerSocket self.requestByte = respServerSocket.recv(1024) self.static_path = static_path se...
true
true
f75c1f75985ce4d907d7f3a19f4320f55d955c01
2,477
py
Python
robot_command/robot_command/cli/commander_shell.py
blakermchale/robot-command
15341e2ad314a5e9001335429c18ec68a157f01d
[ "MIT" ]
null
null
null
robot_command/robot_command/cli/commander_shell.py
blakermchale/robot-command
15341e2ad314a5e9001335429c18ec68a157f01d
[ "MIT" ]
null
null
null
robot_command/robot_command/cli/commander_shell.py
blakermchale/robot-command
15341e2ad314a5e9001335429c18ec68a157f01d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 ''' Shell ====== Shell interface for calling ROS2 actions. ''' import rclpy from cmd2 import Cmd2ArgumentParser, with_argparser from ros2_utils.cli import complete_action_call, ClientShell from .commander_client import CommanderClient from argparse import ArgumentParser class CommanderShell(Cli...
44.232143
126
0.742834
import rclpy from cmd2 import Cmd2ArgumentParser, with_argparser from ros2_utils.cli import complete_action_call, ClientShell from .commander_client import CommanderClient from argparse import ArgumentParser class CommanderShell(ClientShell): prompt = "> " intro = "Welcome to commander shell! Type ? to list c...
true
true
f75c2007c80ca52106f21cf28dd153fc852bd1b7
1,579
py
Python
share/rpcauth/rpcauth.py
Mirkolance1/nobilitas
6023c626240ec690e4477e5d8778dc1c56014061
[ "MIT" ]
null
null
null
share/rpcauth/rpcauth.py
Mirkolance1/nobilitas
6023c626240ec690e4477e5d8778dc1c56014061
[ "MIT" ]
null
null
null
share/rpcauth/rpcauth.py
Mirkolance1/nobilitas
6023c626240ec690e4477e5d8778dc1c56014061
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Nobilitas Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from argparse import ArgumentParser from base64 import urlsafe_b64encode from binascii import hexlify f...
33.595745
134
0.715009
from argparse import ArgumentParser from base64 import urlsafe_b64encode from binascii import hexlify from getpass import getpass from os import urandom import hmac def generate_salt(size): return hexlify(urandom(size)).decode() def generate_password(): return urlsafe_b64encode(urandom(32)).decode('utf-8') ...
true
true
f75c21f6ae13fb1d7fa5fdddfaa1e17b17457a70
64,926
py
Python
python/ccxt/bitstamp.py
alanwu4321/ccxt
0472d35b6a3ab650e7ebe1db83ebc711cdaa2f61
[ "MIT" ]
null
null
null
python/ccxt/bitstamp.py
alanwu4321/ccxt
0472d35b6a3ab650e7ebe1db83ebc711cdaa2f61
[ "MIT" ]
null
null
null
python/ccxt/bitstamp.py
alanwu4321/ccxt
0472d35b6a3ab650e7ebe1db83ebc711cdaa2f61
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
39.783088
279
0.457505
from ccxt.base.exchange import Exchange try: basestring except NameError: basestring = str import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.err...
true
true
f75c228a2b81a54cdcc43a29d0f1a8fd65ae7594
7,768
py
Python
scripts/random_self_pref_cluster.py
klarman-cell-observatory/PowerAnalysisForSpatialOmics
257e5663bb5476c7d9a22230741b5507fd621352
[ "BSD-3-Clause" ]
2
2022-01-13T16:57:30.000Z
2022-01-31T14:13:34.000Z
scripts/random_self_pref_cluster.py
klarman-cell-observatory/PowerAnalysisForSpatialOmics
257e5663bb5476c7d9a22230741b5507fd621352
[ "BSD-3-Clause" ]
null
null
null
scripts/random_self_pref_cluster.py
klarman-cell-observatory/PowerAnalysisForSpatialOmics
257e5663bb5476c7d9a22230741b5507fd621352
[ "BSD-3-Clause" ]
null
null
null
from glob import glob import numpy as np import scipy.sparse as sparse import matplotlib.pyplot as plt import networkx as nx import operator from spatialpower.tissue_generation import assign_labels from spatialpower.tissue_generation import visualization results_dir = './results/motif_detection/' adj_mat_list = np.sor...
51.786667
151
0.60878
from glob import glob import numpy as np import scipy.sparse as sparse import matplotlib.pyplot as plt import networkx as nx import operator from spatialpower.tissue_generation import assign_labels from spatialpower.tissue_generation import visualization results_dir = './results/motif_detection/' adj_mat_list = np.sor...
true
true
f75c23438f28fcc261d8a7f7baff078be462880d
2,031
py
Python
setup.py
plenarius/iota_balance_change_alert
f6f76f4167fd61ab4750fa2dd5b791ce042ea1ef
[ "MIT" ]
2
2017-12-31T16:42:41.000Z
2018-01-04T15:48:30.000Z
setup.py
plenarius/iota_balance_change_alert
f6f76f4167fd61ab4750fa2dd5b791ce042ea1ef
[ "MIT" ]
293
2018-02-11T06:42:16.000Z
2022-03-28T05:34:18.000Z
setup.py
plenarius/iota_balance_change_alert
f6f76f4167fd61ab4750fa2dd5b791ce042ea1ef
[ "MIT" ]
1
2017-12-26T23:41:10.000Z
2017-12-26T23:41:10.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'pyota>=2.0', ...
30.772727
166
0.661743
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ 'Click>=6.0', 'pyota>=2.0', 'schedule>=0.5.0', 'ConfigParser;python_version<"3"', 'con...
true
true
f75c23a02bc1b297874c8ede1e3cea677c4f40c8
2,114
py
Python
office365/directory/identities/userflows/language_configuration.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/directory/identities/userflows/language_configuration.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/directory/identities/userflows/language_configuration.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.directory.identities.userflows.language_page import UserFlowLanguagePage from office365.entity import Entity from office365.entity_collection import EntityCollection from office365.runtime.paths.resource_path import ResourcePath class UserFlowLanguageConfiguration(Entity): """Allows a user flow to ...
41.45098
113
0.658467
from office365.directory.identities.userflows.language_page import UserFlowLanguagePage from office365.entity import Entity from office365.entity_collection import EntityCollection from office365.runtime.paths.resource_path import ResourcePath class UserFlowLanguageConfiguration(Entity): @property def displa...
true
true
f75c23ee5f4b6890b8b9fa46b2a3630698e34add
6,641
py
Python
python/fledge/plugins/south/pt100/max31865.py
fledge-iot/fledge-south-pt100
81853c80c2f159393fdb7b755938b5be0b7ed2a3
[ "Apache-2.0" ]
1
2020-11-23T20:27:41.000Z
2020-11-23T20:27:41.000Z
python/fledge/plugins/south/pt100/max31865.py
fledge-iot/fledge-south-pt100
81853c80c2f159393fdb7b755938b5be0b7ed2a3
[ "Apache-2.0" ]
4
2018-08-30T10:56:18.000Z
2019-02-25T11:47:34.000Z
python/fledge/plugins/south/pt100/max31865.py
fledge-iot/fledge-south-pt100
81853c80c2f159393fdb7b755938b5be0b7ed2a3
[ "Apache-2.0" ]
null
null
null
import math import RPi.GPIO as GPIO import time class max31865(object): """Reading Temperature from the MAX31865 with GPIO using the Raspberry Pi. Any pins can be used. Numpy can be used to completely solve the Callendar-Van Dusen equation but it slows the temp reading down. I commented it o...
35.897297
92
0.56618
import math import RPi.GPIO as GPIO import time class max31865(object): def __init__(self, csPin = 8, misoPin = 9, mosiPin = 10, clkPin = 11): self.csPin = csPin self.misoPin = misoPin self.mosiPin = mosiPin self.clkPin = clkPin self.setupGPIO() def setupGPIO(self): ...
true
true
f75c24b9c36f12416a246d363d97194ee05b6feb
2,122
py
Python
apps/events/views.py
pugpe/pugpe
4584cdcf01037f0c4eb0e73f3a1c73633634eb18
[ "MIT" ]
11
2015-05-18T03:02:16.000Z
2020-09-26T20:41:58.000Z
apps/events/views.py
pugpe/pugpe
4584cdcf01037f0c4eb0e73f3a1c73633634eb18
[ "MIT" ]
7
2015-05-19T23:04:54.000Z
2022-03-11T23:12:14.000Z
apps/events/views.py
pugpe/pugpe
4584cdcf01037f0c4eb0e73f3a1c73633634eb18
[ "MIT" ]
1
2015-05-25T04:07:27.000Z
2015-05-25T04:07:27.000Z
# -*- coding: utf-8 -*- from django.views.generic import ListView from django.shortcuts import get_object_or_404, redirect import datetime from django.utils.timezone import utc from .models import Event, EventTalk from .models import Support, Sponsor class EventMixin(object): '''Add event to context of views th...
31.671642
80
0.656456
from django.views.generic import ListView from django.shortcuts import get_object_or_404, redirect import datetime from django.utils.timezone import utc from .models import Event, EventTalk from .models import Support, Sponsor class EventMixin(object): event = None sponsors = None supporters = None ...
true
true
f75c24e55a7c35a7a4543c6608e472df6f1d3e25
13,353
py
Python
tests/system/action/meeting/test_create.py
peb-adr/openslides-backend
f885105446760413f1bce3bde33241f7cb1205ac
[ "MIT" ]
null
null
null
tests/system/action/meeting/test_create.py
peb-adr/openslides-backend
f885105446760413f1bce3bde33241f7cb1205ac
[ "MIT" ]
19
2021-11-22T16:25:54.000Z
2021-11-25T13:38:13.000Z
tests/system/action/meeting/test_create.py
peb-adr/openslides-backend
f885105446760413f1bce3bde33241f7cb1205ac
[ "MIT" ]
null
null
null
from typing import Any, Dict, Iterable, cast from openslides_backend.action.actions.meeting.shared_meeting import ( meeting_projector_default_replacements, ) from openslides_backend.permissions.management_levels import ( CommitteeManagementLevel, OrganizationManagementLevel, ) from tests.system.action.base...
37.091667
105
0.526174
from typing import Any, Dict, Iterable, cast from openslides_backend.action.actions.meeting.shared_meeting import ( meeting_projector_default_replacements, ) from openslides_backend.permissions.management_levels import ( CommitteeManagementLevel, OrganizationManagementLevel, ) from tests.system.action.base...
true
true
f75c26dbd4fe6690f05ab85f62cc8bab37ca32c4
573
py
Python
running_modes/constructors/curriculum_learning_mode_constructor.py
truehanwj/REINVENT
b36b9d206e76590c7d584683fc45de8a74ce6033
[ "Apache-2.0" ]
null
null
null
running_modes/constructors/curriculum_learning_mode_constructor.py
truehanwj/REINVENT
b36b9d206e76590c7d584683fc45de8a74ce6033
[ "Apache-2.0" ]
null
null
null
running_modes/constructors/curriculum_learning_mode_constructor.py
truehanwj/REINVENT
b36b9d206e76590c7d584683fc45de8a74ce6033
[ "Apache-2.0" ]
null
null
null
from running_modes.utils.general import set_default_device_cuda from running_modes.constructors.base_running_mode import BaseRunningMode from running_modes.configurations import GeneralConfigurationEnvelope from running_modes.curriculum_learning.curriculum_runner import CurriculumRunner class CurriculumLearningModeC...
44.076923
86
0.835951
from running_modes.utils.general import set_default_device_cuda from running_modes.constructors.base_running_mode import BaseRunningMode from running_modes.configurations import GeneralConfigurationEnvelope from running_modes.curriculum_learning.curriculum_runner import CurriculumRunner class CurriculumLearningModeC...
true
true
f75c26e549f17037d4b1581992136e5ebe1f9a1d
1,560
py
Python
rgb_display/hx8353.py
jrmoserbaltimore/Adafruit_CircuitPython_RGB_Display
3dbff20dd56da2db4cde2d238732f9b0f6fdad47
[ "Unlicense", "MIT-0", "MIT" ]
3
2021-08-01T17:40:58.000Z
2022-02-08T22:19:06.000Z
rgb_display/hx8353.py
jrmoserbaltimore/Adafruit_CircuitPython_RGB_Display
3dbff20dd56da2db4cde2d238732f9b0f6fdad47
[ "Unlicense", "MIT-0", "MIT" ]
null
null
null
rgb_display/hx8353.py
jrmoserbaltimore/Adafruit_CircuitPython_RGB_Display
3dbff20dd56da2db4cde2d238732f9b0f6fdad47
[ "Unlicense", "MIT-0", "MIT" ]
1
2021-08-03T18:33:32.000Z
2021-08-03T18:33:32.000Z
# SPDX-FileCopyrightText: 2017 Radomir Dopieralski for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_rgb_display.hx8353` ==================================================== A simple driver for the HX8353-based displays. * Author(s): Radomir Dopieralski, Michael McWethy """ try: from micropy...
21.081081
74
0.594231
try: from micropython import const except ImportError: def const(n): return n from rgb_display.rgb import DisplayDevice __version__ = "0.0.0-auto.0" __repo__ = "https://github.com/jrmoser/RGB_Display.git" _SWRESET = const(0x01) _NORON = const(0x13) _INVOFF = const(0x20) _INVON = const(0x21) _DISPOFF = const(...
true
true
f75c2919e83bbb01cbf397155585ad031c85af9e
5,918
py
Python
test_pytest/test_sys/test_monitor/conftest.py
hrvojekeserica/hat-core
759def68620cf4f8c11e7bbbdbfd1e701dbafb09
[ "MIT" ]
null
null
null
test_pytest/test_sys/test_monitor/conftest.py
hrvojekeserica/hat-core
759def68620cf4f8c11e7bbbdbfd1e701dbafb09
[ "MIT" ]
null
null
null
test_pytest/test_sys/test_monitor/conftest.py
hrvojekeserica/hat-core
759def68620cf4f8c11e7bbbdbfd1e701dbafb09
[ "MIT" ]
null
null
null
import pytest import time import test_sys.test_monitor.common @pytest.fixture def monitor_factory(tmp_path, unused_tcp_port_factory): processes = [] def run_monitor(parent_infos=[], default_algorithm='BLESS_ALL', group_algorithms={}, default_rank=1): monitor_port = unused_tcp_por...
35.437126
79
0.589219
import pytest import time import test_sys.test_monitor.common @pytest.fixture def monitor_factory(tmp_path, unused_tcp_port_factory): processes = [] def run_monitor(parent_infos=[], default_algorithm='BLESS_ALL', group_algorithms={}, default_rank=1): monitor_port = unused_tcp_por...
true
true
f75c2b57161efa32091579b3cbcd493f48d8b59f
13,149
py
Python
app_class.py
nazibalalam/Pacman-1
438990f0b5e6197ee53282d53c1f3f17bfda9681
[ "MIT" ]
2
2021-04-01T07:19:04.000Z
2021-04-26T09:18:16.000Z
app_class.py
nazibalalam/Pacman-1
438990f0b5e6197ee53282d53c1f3f17bfda9681
[ "MIT" ]
2
2021-04-02T18:37:42.000Z
2021-05-02T15:06:45.000Z
app_class.py
nazibalalam/Pacman-1
438990f0b5e6197ee53282d53c1f3f17bfda9681
[ "MIT" ]
2
2021-03-31T17:05:17.000Z
2021-05-02T09:54:41.000Z
import pygame import sys import copy from settings import * from player_class import * from enemy_class import * pygame.init() vec = pygame.math.Vector2 class App: def __init__(self): try: with open(SCORE_FILE, 'r') as file: self.highest_score = int(file.read()) excep...
30.866197
95
0.496844
import pygame import sys import copy from settings import * from player_class import * from enemy_class import * pygame.init() vec = pygame.math.Vector2 class App: def __init__(self): try: with open(SCORE_FILE, 'r') as file: self.highest_score = int(file.read()) excep...
true
true
f75c2bd7b87ebf192c1cd89b0fc8920bb5489307
55
py
Python
const.py
satoshi03/pychain
d32fe7a5bae368c6b213accf31e1caa524b667d4
[ "MIT" ]
null
null
null
const.py
satoshi03/pychain
d32fe7a5bae368c6b213accf31e1caa524b667d4
[ "MIT" ]
2
2017-11-17T01:55:17.000Z
2021-06-01T22:09:57.000Z
const.py
naoto67/pychain
2caa8bce80b67b0a4e84e97e141c8511fbd87006
[ "MIT" ]
null
null
null
QUERY_LATEST = 0 QUERY_ALL = 1 RESPONSE_BLOCKCHAIN = 2
13.75
23
0.781818
QUERY_LATEST = 0 QUERY_ALL = 1 RESPONSE_BLOCKCHAIN = 2
true
true
f75c2c09b466c612fac39833b290fe000c9210cb
2,556
py
Python
tests/test_pagination.py
bapakode/Flask-OmMongo
4150505346f242b48405a4fbb719cc15bf9d5d11
[ "BSD-2-Clause" ]
2
2017-03-08T06:44:15.000Z
2017-03-17T03:51:15.000Z
tests/test_pagination.py
bapakode/Flask-OmMongo
4150505346f242b48405a4fbb719cc15bf9d5d11
[ "BSD-2-Clause" ]
null
null
null
tests/test_pagination.py
bapakode/Flask-OmMongo
4150505346f242b48405a4fbb719cc15bf9d5d11
[ "BSD-2-Clause" ]
null
null
null
from tests import BaseAppTestCase from werkzeug.exceptions import NotFound class FlaskOmMongoPaginationTestCase(BaseAppTestCase): "Flask-OmMongo Pagination class" def setup(self): super(FlaskOmMongoPaginationTestCase, self).setup() # saving 30 Todo's for i in range(4, 34): ...
40.571429
77
0.685837
from tests import BaseAppTestCase from werkzeug.exceptions import NotFound class FlaskOmMongoPaginationTestCase(BaseAppTestCase): def setup(self): super(FlaskOmMongoPaginationTestCase, self).setup() for i in range(4, 34): todo = self.Todo(description=u'Write my %dth book' % i...
true
true
f75c2c2db04353b30a5e941f41adb9b25aa62d4b
2,824
py
Python
topic_modeling/utils.py
JiachengLi1995/UCTopic
3875f2afbf6b99dfce2d5b5cd930976049746d41
[ "MIT" ]
5
2022-03-08T02:10:30.000Z
2022-03-30T18:56:16.000Z
topic_modeling/utils.py
JiachengLi1995/UCTopic
3875f2afbf6b99dfce2d5b5cd930976049746d41
[ "MIT" ]
null
null
null
topic_modeling/utils.py
JiachengLi1995/UCTopic
3875f2afbf6b99dfce2d5b5cd930976049746d41
[ "MIT" ]
1
2022-03-10T02:13:47.000Z
2022-03-10T02:13:47.000Z
import json import torch from tqdm import tqdm from .consts import ARGS, DEVICE, TOKENIZER def read_data(path): data = [] with open(path, encoding='utf8') as f: for line in f: line = json.loads(line) data.append(line) return data def batchify(sentence_dict, phrase_list_sampled, batch_size=32): batches ...
22.95935
119
0.733711
import json import torch from tqdm import tqdm from .consts import ARGS, DEVICE, TOKENIZER def read_data(path): data = [] with open(path, encoding='utf8') as f: for line in f: line = json.loads(line) data.append(line) return data def batchify(sentence_dict, phrase_list_sampled, batch_size=32): batches ...
true
true
f75c2c70eec67ddc11f4268894157ce65b52d8eb
6,961
py
Python
Str2D/tests/test_str2D/test_str2d.py
ReblochonMasque/Str2D
c56f710eee9ecc3beedce47c0212af1b7e562a4e
[ "MIT" ]
null
null
null
Str2D/tests/test_str2D/test_str2d.py
ReblochonMasque/Str2D
c56f710eee9ecc3beedce47c0212af1b7e562a4e
[ "MIT" ]
null
null
null
Str2D/tests/test_str2D/test_str2d.py
ReblochonMasque/Str2D
c56f710eee9ecc3beedce47c0212af1b7e562a4e
[ "MIT" ]
null
null
null
from Str2D.src.str2d import Str2D class TestStr2D(object): def test_constuction_one(self): s0_0 = 'a\nbc\ndef' s0_l = 'a \nbc \ndef' s0_c = ' a \nbc \ndef' s0_r = ' a\n bc\ndef' s0_w0 = s0_l s0_w4 = 'a \nbc \ndef ' s0_h0 = s0_l s0_h6_t = 'a \nb...
30.00431
71
0.481109
from Str2D.src.str2d import Str2D class TestStr2D(object): def test_constuction_one(self): s0_0 = 'a\nbc\ndef' s0_l = 'a \nbc \ndef' s0_c = ' a \nbc \ndef' s0_r = ' a\n bc\ndef' s0_w0 = s0_l s0_w4 = 'a \nbc \ndef ' s0_h0 = s0_l s0_h6_t = 'a \nb...
true
true
f75c2ca9033329760dc687c606157aa5cba43381
12,484
py
Python
matador/hull/phase_diagram.py
dquigley-warwick/matador
729e97efb0865c4fff50af87555730ff4b7b6d91
[ "MIT" ]
24
2020-01-21T21:40:44.000Z
2022-03-23T13:37:18.000Z
matador/hull/phase_diagram.py
dquigley-warwick/matador
729e97efb0865c4fff50af87555730ff4b7b6d91
[ "MIT" ]
234
2020-02-03T15:56:58.000Z
2022-03-29T21:36:45.000Z
matador/hull/phase_diagram.py
dquigley-warwick/matador
729e97efb0865c4fff50af87555730ff4b7b6d91
[ "MIT" ]
15
2019-11-29T11:33:32.000Z
2021-11-02T09:14:08.000Z
# coding: utf-8 # Distributed under the terms of the MIT License. """ This submodule implements the base PhaseDiagram creator that interfaces with QueryConvexHull and EnsembleHull. """ from traceback import print_exc import bisect import scipy.spatial import numpy as np from matador.utils.hull_utils import ( ...
48.387597
124
0.597244
from traceback import print_exc import bisect import scipy.spatial import numpy as np from matador.utils.hull_utils import ( barycentric2cart, vertices2plane, vertices2line, FakeHull, is_point_in_triangle ) from matador.utils.chem_utils import get_formula_from_stoich from matador.utils.cursor_utils import get_...
true
true
f75c2cc6af36ef6a4a7378aee5a56de4b2172c69
59
py
Python
tests/lif/lteq.py
Mieschendahl/assignment-final-stub
19eea657fcc4f8a455c42028f34b918628514cc0
[ "MIT" ]
null
null
null
tests/lif/lteq.py
Mieschendahl/assignment-final-stub
19eea657fcc4f8a455c42028f34b918628514cc0
[ "MIT" ]
1
2022-03-20T11:08:45.000Z
2022-03-20T11:08:45.000Z
tests/lif/lteq.py
Mieschendahl/assignment-final-stub
19eea657fcc4f8a455c42028f34b918628514cc0
[ "MIT" ]
6
2022-03-13T13:10:25.000Z
2022-03-28T22:18:12.000Z
print(42 if (input_int() - 2) <= (input_int() + 2) else 0)
29.5
58
0.576271
print(42 if (input_int() - 2) <= (input_int() + 2) else 0)
true
true
f75c2f0a66909614e6c5894904369474cd9efa59
12,544
py
Python
pynab/openapi/models/sub_transaction.py
idwagner/pynab
26e0f2d2adc86374ff5caf5a614778fafa1c19d6
[ "Apache-2.0" ]
null
null
null
pynab/openapi/models/sub_transaction.py
idwagner/pynab
26e0f2d2adc86374ff5caf5a614778fafa1c19d6
[ "Apache-2.0" ]
null
null
null
pynab/openapi/models/sub_transaction.py
idwagner/pynab
26e0f2d2adc86374ff5caf5a614778fafa1c19d6
[ "Apache-2.0" ]
1
2020-11-05T22:28:13.000Z
2020-11-05T22:28:13.000Z
# coding: utf-8 """ YNAB API Endpoints Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.youneedabudge...
31.281796
294
0.619898
import inspect import pprint import re import six from pynab.openapi.configuration import Configuration class SubTransaction(object): openapi_types = { 'id': 'str', 'transaction_id': 'str', 'amount': 'int', 'memo': 'str', 'payee_id': 'str', 'payee_name': 'str'...
true
true
f75c2f1d9e727b3a4e0b8534fe497d10a787daaf
9,750
py
Python
nova_powervm/virt/powervm/volume/driver.py
UbuntuEvangelist/nova-powervm
903ceabb329b2f526a73e9a330a5bc74750fe048
[ "Apache-2.0" ]
null
null
null
nova_powervm/virt/powervm/volume/driver.py
UbuntuEvangelist/nova-powervm
903ceabb329b2f526a73e9a330a5bc74750fe048
[ "Apache-2.0" ]
null
null
null
nova_powervm/virt/powervm/volume/driver.py
UbuntuEvangelist/nova-powervm
903ceabb329b2f526a73e9a330a5bc74750fe048
[ "Apache-2.0" ]
16
2017-01-12T10:33:43.000Z
2019-04-19T08:22:05.000Z
# Copyright 2015 IBM Corp. # # 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 a...
39.156627
79
0.646974
import abc import six from pypowervm.utils import transaction as pvm_tx from pypowervm.wrappers import virtual_io_server as pvm_vios from nova_powervm.virt.powervm import exception as exc from nova_powervm.virt.powervm import vm LOCAL_FEED_TASK = 'local_feed_task' @six.add_metaclass(abc.ABCMeta) class PowerVMVolu...
true
true
f75c308318eebb7e9578fb7cd2dcb99f595fad67
14,071
py
Python
walle/service/deployer.py
hyschumi/walle-web
190eeaee8ab905a7904dcabeccefd458ad8344a4
[ "Apache-2.0" ]
null
null
null
walle/service/deployer.py
hyschumi/walle-web
190eeaee8ab905a7904dcabeccefd458ad8344a4
[ "Apache-2.0" ]
null
null
null
walle/service/deployer.py
hyschumi/walle-web
190eeaee8ab905a7904dcabeccefd458ad8344a4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: wushuiyong # @Created Time : 日 1/ 1 23:43:12 2017 # @Description: import time from datetime import datetime import os import re from flask import current_app from flask_socketio import emit from walle.model.project import ProjectModel from walle.model.record ...
33.422803
113
0.581835
import time from datetime import datetime import os import re from flask import current_app from flask_socketio import emit from walle.model.project import ProjectModel from walle.model.record import RecordModel from walle.model.task import TaskModel from walle.service.extensions import socketio from walle.service.u...
true
true
f75c30b6723b35476e03938708dc1fa4be4c2d64
2,665
py
Python
applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_io.py
cwx-ae/Kratos
25e73148a1db56a142650a1e19f195124888c6cd
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_io.py
cwx-ae/Kratos
25e73148a1db56a142650a1e19f195124888c6cd
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_io.py
cwx-ae/Kratos
25e73148a1db56a142650a1e19f195124888c6cd
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
# Importing the Kratos Library import KratosMultiphysics as KM def Create(*args): raise Exception('"CoSimulationIO" is a baseclass and cannot be used directly!') class CoSimulationIO: """Baseclass defining the interface for the input and output methods for the communication with external solvers """ ...
36.013514
127
0.683677
import KratosMultiphysics as KM def Create(*args): raise Exception('"CoSimulationIO" is a baseclass and cannot be used directly!') class CoSimulationIO: def __init__(self, settings, model, solver_name, data_commnicator): self.model = model self.solver_name = solver_name self.data_commn...
true
true
f75c30b7d4a1dfd8f71bc979e52279d85ce8fc58
864
py
Python
find_fail.py
SimonZYC/hls-downloader
0fc60dcb72843ae28f21806643f17f86bb6d6c1c
[ "MIT" ]
null
null
null
find_fail.py
SimonZYC/hls-downloader
0fc60dcb72843ae28f21806643f17f86bb6d6c1c
[ "MIT" ]
null
null
null
find_fail.py
SimonZYC/hls-downloader
0fc60dcb72843ae28f21806643f17f86bb6d6c1c
[ "MIT" ]
null
null
null
import subprocess import sys import argparse parser = argparse.ArgumentParser(description='Deal with download errors.') parser.add_argument('object_dir', type=str, help='Ojective directory for detection') parser.add_argument('--del', action='store_true', default=False, help='If ...
26.181818
88
0.684028
import subprocess import sys import argparse parser = argparse.ArgumentParser(description='Deal with download errors.') parser.add_argument('object_dir', type=str, help='Ojective directory for detection') parser.add_argument('--del', action='store_true', default=False, help='If ...
true
true
f75c31ebee1c575c487db6678c659f1e492c04e5
37,312
py
Python
skorch/callbacks/logging.py
TheAutumnOfRice/skorch
6d778fc38d797644c847a9c87dd23299eea63087
[ "BSD-3-Clause" ]
2,748
2019-03-19T11:43:01.000Z
2022-03-31T13:55:28.000Z
skorch/callbacks/logging.py
TheAutumnOfRice/skorch
6d778fc38d797644c847a9c87dd23299eea63087
[ "BSD-3-Clause" ]
392
2019-03-19T11:17:04.000Z
2022-03-29T21:36:53.000Z
skorch/callbacks/logging.py
TheAutumnOfRice/skorch
6d778fc38d797644c847a9c87dd23299eea63087
[ "BSD-3-Clause" ]
197
2019-03-27T09:18:25.000Z
2022-03-27T00:15:23.000Z
""" Callbacks for printing, logging and log information.""" import sys import time import tempfile from contextlib import suppress from numbers import Number from itertools import cycle from pathlib import Path import numpy as np import tqdm from tabulate import tabulate from skorch.utils import Ansi from skorch.dat...
35.2
91
0.639633
import sys import time import tempfile from contextlib import suppress from numbers import Number from itertools import cycle from pathlib import Path import numpy as np import tqdm from tabulate import tabulate from skorch.utils import Ansi from skorch.dataset import get_len from skorch.callbacks import Callback _...
true
true
f75c339636825fc6f4d50131fff88b9339f77804
13,828
py
Python
train_multiOut_weightedRegress.py
atlas-calo-ml/GraphNets4Pions_LLNL
fb25259124711526cc4110461f09db1d03a669f9
[ "Apache-2.0" ]
1
2021-11-02T00:40:19.000Z
2021-11-02T00:40:19.000Z
train_multiOut_weightedRegress.py
atlas-calo-ml/GraphNets4Pions_LLNL
fb25259124711526cc4110461f09db1d03a669f9
[ "Apache-2.0" ]
null
null
null
train_multiOut_weightedRegress.py
atlas-calo-ml/GraphNets4Pions_LLNL
fb25259124711526cc4110461f09db1d03a669f9
[ "Apache-2.0" ]
null
null
null
import numpy as np import os import sys import glob import uproot as ur import matplotlib.pyplot as plt import time import seaborn as sns import tensorflow as tf from graph_nets import utils_np from graph_nets import utils_tf from graph_nets.graphs import GraphsTuple import sonnet as snt import argparse import yaml imp...
39.965318
138
0.611368
import numpy as np import os import sys import glob import uproot as ur import matplotlib.pyplot as plt import time import seaborn as sns import tensorflow as tf from graph_nets import utils_np from graph_nets import utils_tf from graph_nets.graphs import GraphsTuple import sonnet as snt import argparse import yaml imp...
true
true
f75c34f559b36ea38ab35162a6cf0275920b3447
11,875
py
Python
census/urls.py
NiJeLorg/d3-sd-child
23b00ae56f57c954b54f7e6efb44bbcd80c507be
[ "MIT" ]
1
2019-04-01T19:51:51.000Z
2019-04-01T19:51:51.000Z
census/urls.py
NiJeLorg/d3-sd-child
23b00ae56f57c954b54f7e6efb44bbcd80c507be
[ "MIT" ]
1
2018-03-08T04:05:07.000Z
2018-03-08T04:05:07.000Z
census/urls.py
NiJeLorg/d3-sd-child
23b00ae56f57c954b54f7e6efb44bbcd80c507be
[ "MIT" ]
2
2018-04-23T16:14:06.000Z
2019-09-25T19:10:32.000Z
from __future__ import absolute_import from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path, re_path from django.urls import reverse_lazy from django.http import HttpResponse from django.views.decorators.cache import cache_pag...
32.181572
632
0.602526
from __future__ import absolute_import from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import include, path, re_path from django.urls import reverse_lazy from django.http import HttpResponse from django.views.decorators.cache import cache_pag...
true
true
f75c359688f115715d6c30863015a2cf035cd0e7
3,947
py
Python
ginga/misc/Timer.py
chyan26/ginga
e00c887d8660e0a4178f9681ca7ea7784b7ca129
[ "BSD-3-Clause" ]
1
2019-04-27T01:34:27.000Z
2019-04-27T01:34:27.000Z
ginga/misc/Timer.py
chyan26/ginga
e00c887d8660e0a4178f9681ca7ea7784b7ca129
[ "BSD-3-Clause" ]
2
2017-07-25T15:22:13.000Z
2020-04-25T19:34:30.000Z
ginga/misc/Timer.py
chyan26/ginga
e00c887d8660e0a4178f9681ca7ea7784b7ca129
[ "BSD-3-Clause" ]
3
2018-02-09T20:06:30.000Z
2020-03-30T02:31:44.000Z
# # Timer.py -- GUI independent timers. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import time from ginga.misc import Bunch, Callback from ginga.util.heaptimer import Timer as HeapTimer, TimerHeap class TimerError(Exception): pass class Time...
24.981013
75
0.598429
import time from ginga.misc import Bunch, Callback from ginga.util.heaptimer import Timer as HeapTimer, TimerHeap class TimerError(Exception): pass class TimerFactory(object): def __init__(self, ev_quit=None, logger=None): self.ev_quit = ev_quit self.timer_heap = TimerHeap("TimerF...
true
true
f75c35cd2e3018fd97eb06df76167d2d8575b9ba
13,367
py
Python
boxsdk/object/folder.py
GabeLambda/box-python-sdk
6597e930929f3ee49d4930a53304277167c0a4db
[ "Apache-2.0" ]
null
null
null
boxsdk/object/folder.py
GabeLambda/box-python-sdk
6597e930929f3ee49d4930a53304277167c0a4db
[ "Apache-2.0" ]
null
null
null
boxsdk/object/folder.py
GabeLambda/box-python-sdk
6597e930929f3ee49d4930a53304277167c0a4db
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import json import os from six import text_type from boxsdk.config import API from boxsdk.object.group import Group from boxsdk.object.item import Item from boxsdk.object.user import User from boxsdk.util.api_call_decorator import api_call from boxsdk.util.text_...
34.186701
121
0.592055
from __future__ import unicode_literals import json import os from six import text_type from boxsdk.config import API from boxsdk.object.group import Group from boxsdk.object.item import Item from boxsdk.object.user import User from boxsdk.util.api_call_decorator import api_call from boxsdk.util.text_enum import Text...
true
true
f75c375128b7236fa25383e061f11dcf5a575b9e
12,361
py
Python
python/simplejson/__init__.py
manicmaniac/openradar
1f0401165f4e5b67b9a06bbdbeb2fc612d6b8e8e
[ "Apache-2.0" ]
264
2015-01-07T18:48:55.000Z
2022-02-07T15:09:59.000Z
simplejson/__init__.py
nevyn/openradar
d84604e9b8b8dc9982204dda6613cecf4983f4ed
[ "Apache-2.0" ]
32
2015-01-12T08:39:16.000Z
2022-03-26T10:30:08.000Z
simplejson/__init__.py
nevyn/openradar
d84604e9b8b8dc9982204dda6613cecf4983f4ed
[ "Apache-2.0" ]
28
2015-04-07T05:26:08.000Z
2022-02-22T09:14:54.000Z
r"""A simple, fast, extensible JSON encoder and decoder JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. simplejson exposes an API familiar to uses of the standard library marshal and pickle modules. Encoding ba...
39.366242
108
0.646873
__version__ = '2.0.4' __all__ = [ 'dump', 'dumps', 'load', 'loads', 'JSONDecoder', 'JSONEncoder', ] from decoder import JSONDecoder from encoder import JSONEncoder _default_encoder = JSONEncoder( skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, indent=None, separ...
true
true
f75c383e0aadc5aab53f5954dd365e6d0425e94d
2,108
py
Python
test_habit_tracker/Main_Package_t/Task_t.py
hennypurwadi/habit_tracker12345
7070e54129f3a7e17b0d87f4af910c2547928f0c
[ "Unlicense" ]
null
null
null
test_habit_tracker/Main_Package_t/Task_t.py
hennypurwadi/habit_tracker12345
7070e54129f3a7e17b0d87f4af910c2547928f0c
[ "Unlicense" ]
null
null
null
test_habit_tracker/Main_Package_t/Task_t.py
hennypurwadi/habit_tracker12345
7070e54129f3a7e17b0d87f4af910c2547928f0c
[ "Unlicense" ]
null
null
null
# Checkoff task def completetask(inputid: int): try: import sqlite3 import datetime import time from datetime import datetime, timedelta sqliteConnection = sqlite3.connect('habit_db.sqlite3') conn = sqliteConnection.cursor() records = conn.fetchall() ...
35.133333
120
0.611954
def completetask(inputid: int): try: import sqlite3 import datetime import time from datetime import datetime, timedelta sqliteConnection = sqlite3.connect('habit_db.sqlite3') conn = sqliteConnection.cursor() records = conn.fetchall() lenrecords = len...
true
true
f75c38b1d16fe6a960adb05042d8cbbccdfc935f
31,293
py
Python
pyleecan/GUI/Dialog/DMatLib/DMatSetup/Ui_DMatSetup.py
tobsen2code/pyleecan
5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9
[ "Apache-2.0" ]
4
2017-11-27T10:14:34.000Z
2018-09-20T11:30:32.000Z
pyleecan/GUI/Dialog/DMatLib/DMatSetup/Ui_DMatSetup.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
pyleecan/GUI/Dialog/DMatLib/DMatSetup/Ui_DMatSetup.py
Eomys/Pyleecan
4d7f0cbabf0311006963e7a2f435db2ecd901118
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # File generated according to DMatSetup.ui # WARNING! All changes made in this file will be lost! ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ from PySide2.QtCore import * from ...
37.209275
88
0.675167
from PySide2.QtCore import * from PySide2.QtGui import * from PySide2.QtWidgets import * from .....GUI.Tools.FloatEdit import FloatEdit from .....GUI.Tools.WTableData.DTableData import DTableData from pyleecan.GUI.Resources import pyleecan_rc class Ui_DMatSetup(object): def setupUi(self, DMatSetup): i...
true
true
f75c38d594c7df61bb8241d860bdf76c47d68d83
118,299
py
Python
sympy/printing/latex.py
dyc3/sympy
b2ff075530e1340425e1edd203aeb53c081bf9af
[ "BSD-3-Clause" ]
null
null
null
sympy/printing/latex.py
dyc3/sympy
b2ff075530e1340425e1edd203aeb53c081bf9af
[ "BSD-3-Clause" ]
null
null
null
sympy/printing/latex.py
dyc3/sympy
b2ff075530e1340425e1edd203aeb53c081bf9af
[ "BSD-3-Clause" ]
null
null
null
""" A Printer which converts an expression into its LaTeX equivalent. """ from typing import Any, Dict as tDict import itertools from sympy.core import Add, Float, Mod, Mul, Number, S, Symbol from sympy.core.alphabets import greeks from sympy.core.containers import Tuple from sympy.core.function import AppliedUndef,...
36.64777
190
0.533022
from typing import Any, Dict as tDict import itertools from sympy.core import Add, Float, Mod, Mul, Number, S, Symbol from sympy.core.alphabets import greeks from sympy.core.containers import Tuple from sympy.core.function import AppliedUndef, Derivative from sympy.core.operations import AssocOp from sympy.core.powe...
true
true
f75c38e6e288c3a95d80b0ca619eb2a055432eea
6,883
py
Python
BB/DB.py
poco0317/LiveCheck
c5ac9eb01b99781e501ef1d50a8e0505898daacd
[ "MIT" ]
3
2019-10-23T22:14:52.000Z
2021-05-06T09:07:42.000Z
BB/DB.py
poco0317/LiveCheck
c5ac9eb01b99781e501ef1d50a8e0505898daacd
[ "MIT" ]
1
2021-02-26T02:35:09.000Z
2021-02-26T02:35:09.000Z
BB/DB.py
poco0317/LiveCheck
c5ac9eb01b99781e501ef1d50a8e0505898daacd
[ "MIT" ]
null
null
null
import os import sqlite3 import traceback class GeneralDB: ''' basic sqlite3 db which can be used for many purposes this isnt very safe probably but i dont really care''' def __init__(self, sessionName): self.connection = None self.cursor = None self.sessionName = sessionName ...
33.251208
120
0.562981
import os import sqlite3 import traceback class GeneralDB: def __init__(self, sessionName): self.connection = None self.cursor = None self.sessionName = sessionName def initCursor(self): os.makedirs("DBSessions", exist_ok=True) self.connection = sqlite3.connect("DBSes...
true
true
f75c391cebf4028fa7fb725bd22746e0760add88
2,618
py
Python
grit/format/policy_templates/writers/writer_unittest_common.py
bpsinc-native/src_tools_grit
206c6aa4450db4e961d20f8367f33df42bba6a85
[ "BSD-2-Clause" ]
777
2017-08-29T15:15:32.000Z
2022-03-21T05:29:41.000Z
grit/format/policy_templates/writers/writer_unittest_common.py
bpsinc-native/src_tools_grit
206c6aa4450db4e961d20f8367f33df42bba6a85
[ "BSD-2-Clause" ]
66
2017-08-30T18:31:18.000Z
2021-08-02T10:59:35.000Z
grit/format/policy_templates/writers/writer_unittest_common.py
bpsinc-native/src_tools_grit
206c6aa4450db4e961d20f8367f33df42bba6a85
[ "BSD-2-Clause" ]
123
2017-08-30T01:19:34.000Z
2022-03-17T22:55:31.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Common tools for unit-testing writers.''' import os import tempfile import unittest import StringIO from grit import grd_read...
31.166667
95
0.699389
import os import tempfile import unittest import StringIO from grit import grd_reader from grit import util from grit.tool import build class DummyOutput(object): def __init__(self, type, language, file = 'hello.gif'): self.type = type self.language = language self.file = file def GetType(self): ...
true
true
f75c39caedf689d55b2b71a963b48107bc4fdcaf
603
py
Python
src/actions/buildroad.py
MarinVlaic/AIBG
cf4960586bdb3c32f8e566c10f9f1e59e6f9ac2d
[ "MIT" ]
null
null
null
src/actions/buildroad.py
MarinVlaic/AIBG
cf4960586bdb3c32f8e566c10f9f1e59e6f9ac2d
[ "MIT" ]
null
null
null
src/actions/buildroad.py
MarinVlaic/AIBG
cf4960586bdb3c32f8e566c10f9f1e59e6f9ac2d
[ "MIT" ]
null
null
null
from src.actions.action import Action from src.mapfeatures.intersection import Intersection from src.playerprofile import PlayerProfile from typing import Dict class BuildRoad(Action): def __init__(self, destination_id: int): self.destination_id = destination_id def __repr__(self): return f'b...
30.15
98
0.746269
from src.actions.action import Action from src.mapfeatures.intersection import Intersection from src.playerprofile import PlayerProfile from typing import Dict class BuildRoad(Action): def __init__(self, destination_id: int): self.destination_id = destination_id def __repr__(self): return f'b...
true
true
f75c39ddcc1a21b5a708419df9f699870d80807d
2,909
py
Python
rx/linq/observable/delaywithselector.py
AlexMost/RxPY
05cb14c72806dc41e243789c05f498dede11cebd
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
rx/linq/observable/delaywithselector.py
AlexMost/RxPY
05cb14c72806dc41e243789c05f498dede11cebd
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
rx/linq/observable/delaywithselector.py
AlexMost/RxPY
05cb14c72806dc41e243789c05f498dede11cebd
[ "ECL-2.0", "Apache-2.0" ]
1
2021-11-04T11:13:49.000Z
2021-11-04T11:13:49.000Z
from rx.observable import Observable from rx.anonymousobservable import AnonymousObservable from rx.disposables import CompositeDisposable, \ SingleAssignmentDisposable, SerialDisposable from rx.internal import extensionmethod @extensionmethod(Observable) def delay_with_selector(self, subscription_delay=None, ...
32.322222
74
0.561705
from rx.observable import Observable from rx.anonymousobservable import AnonymousObservable from rx.disposables import CompositeDisposable, \ SingleAssignmentDisposable, SerialDisposable from rx.internal import extensionmethod @extensionmethod(Observable) def delay_with_selector(self, subscription_delay=None, ...
true
true
f75c3a2586d1bdfcbed6157b40a027d28866693c
4,031
py
Python
utils.py
gabrieldesousah/awsmetric2csv
adcc8f42a8c1b5eba8a1f7413c24165d2e7d65ff
[ "MIT" ]
14
2018-04-23T20:24:54.000Z
2021-04-20T01:46:13.000Z
utils.py
gabrieldesousah/awsmetric2csv
adcc8f42a8c1b5eba8a1f7413c24165d2e7d65ff
[ "MIT" ]
1
2020-03-04T15:01:25.000Z
2020-03-23T09:41:47.000Z
utils.py
gabrieldesousah/awsmetric2csv
adcc8f42a8c1b5eba8a1f7413c24165d2e7d65ff
[ "MIT" ]
13
2018-05-07T11:15:32.000Z
2021-06-23T09:45:06.000Z
import boto3 import datetime import numpy as np csv_headers = { 'ec2': [ 'name', 'instance', 'type', 'hypervisor', 'virtualization_type', 'architecture', 'ebs_optimized', 'image_id', 'key_name', 'metric', 'low', 'high',...
26.346405
72
0.542793
import boto3 import datetime import numpy as np csv_headers = { 'ec2': [ 'name', 'instance', 'type', 'hypervisor', 'virtualization_type', 'architecture', 'ebs_optimized', 'image_id', 'key_name', 'metric', 'low', 'high',...
true
true
f75c3dd62939d647ef1c79a9023e4238aa9dc3d5
157
py
Python
flask-microservice/api/util/backup_handlers.py
sashaobucina/coronatracker
236a1130977987eb90cf15973e4367d5f079dc7d
[ "MIT" ]
9
2020-04-29T16:31:39.000Z
2021-12-19T01:18:21.000Z
flask-microservice/api/util/backup_handlers.py
sashaobucina/coronatracker
236a1130977987eb90cf15973e4367d5f079dc7d
[ "MIT" ]
7
2020-04-29T16:43:17.000Z
2022-02-19T07:04:59.000Z
flask-microservice/api/util/backup_handlers.py
sashaobucina/coronatracker
236a1130977987eb90cf15973e4367d5f079dc7d
[ "MIT" ]
2
2020-05-18T05:25:37.000Z
2020-08-07T09:02:33.000Z
def load_from_backup(): """ """ # TODO pass def save_to_backup(): """ """ # TODO pass if __name__ == "__main__": pass
9.8125
26
0.471338
def load_from_backup(): pass def save_to_backup(): pass if __name__ == "__main__": pass
true
true
f75c3e175611bab41a408d5dbdeea7be1d3fff3b
5,546
py
Python
tutel/examples/helloworld.py
yzygitzh/tutel
ca6f018bf7afae2e37a74f17deddd0f5f91ec2b2
[ "MIT" ]
null
null
null
tutel/examples/helloworld.py
yzygitzh/tutel
ca6f018bf7afae2e37a74f17deddd0f5f91ec2b2
[ "MIT" ]
null
null
null
tutel/examples/helloworld.py
yzygitzh/tutel
ca6f018bf7afae2e37a74f17deddd0f5f91ec2b2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # Recommend to initialize NUMA status at the most program begining (before any other imports) from tutel import system_init system_init.init_affinity_at_program_beginning() import os import time import torch import torch....
40.188406
189
0.727732
from tutel import system_init system_init.init_affinity_at_program_beginning() import os import time import torch import torch.optim as optim import torch.nn.functional as F import torch.distributed as dist from torch import nn import argparse from tutel import moe as tutel_moe parser = argparse.ArgumentParser() ...
true
true
f75c3e1f10b5df775411f676d2c39601c79764c7
523
py
Python
ex026.py
LucasIdalino/Exerc-cios-do-Curso
4ca4610d1acfe4672c20114f891b6aabae816049
[ "MIT" ]
null
null
null
ex026.py
LucasIdalino/Exerc-cios-do-Curso
4ca4610d1acfe4672c20114f891b6aabae816049
[ "MIT" ]
null
null
null
ex026.py
LucasIdalino/Exerc-cios-do-Curso
4ca4610d1acfe4672c20114f891b6aabae816049
[ "MIT" ]
null
null
null
frase = str(input("\033[1;32mFrase\033[m: ")).upper().lower().strip() #A função .count(), conta quantas letras dentro do parâmetro aplicado existem dentro do valor da variável. print("A letra aparece:", frase.count("a")) #A função .find() busca a primeira letra dentro do parâmetro aplicado no valor da váriavel. print...
47.545455
106
0.732314
frase = str(input("\033[1;32mFrase\033[m: ")).upper().lower().strip() print("A letra aparece:", frase.count("a")) print("Aparece pela primeira vez na posição:", frase.find("a")) print("Aparece pela última vez:", frase.rfind("a"))
true
true
f75c3f044637bd7a4d8f0e04fcf004ba5b92fb32
10,762
py
Python
python/pyclaw/io/hdf5.py
rypjones/D-Claw
6eed8cc5270bf53768e25fa20fa5259cb3c1532e
[ "BSD-3-Clause" ]
7
2016-11-13T03:11:51.000Z
2021-09-07T18:59:48.000Z
python/pyclaw/io/hdf5.py
rypjones/D-Claw
6eed8cc5270bf53768e25fa20fa5259cb3c1532e
[ "BSD-3-Clause" ]
11
2020-01-14T18:00:37.000Z
2022-03-29T14:25:24.000Z
python/pyclaw/io/hdf5.py
rypjones/D-Claw
6eed8cc5270bf53768e25fa20fa5259cb3c1532e
[ "BSD-3-Clause" ]
6
2020-01-14T17:15:42.000Z
2021-12-03T17:28:44.000Z
#!/usr/bin/env python # encoding: utf-8 r""" Routines for reading and writing a HDF5 output file This module reads and writes hdf5 files via either of the following modules: h5py - http://code.google.com/p/h5py/ PyTables - http://www.pytables.org/moin It will first try h5py and then PyTables and use the corre...
38.435714
87
0.482531
import os, sys import logging import numpy as np import pyclaw.solution logger = logging.getLogger("io") use_h5py = False use_PyTables = False try: import h5py use_h5py = True except: pass if use_h5py: try: import tables use_PyTables = True except: error_msg = ( ...
true
true
f75c3f52fff9ee58b9941396f9a2efa3705b87ef
1,800
py
Python
yowsup/run.py
Srinath-tr/Goferbot
0f734d01c6504c6c97dbdf45f5adf8b25c0f9fd9
[ "Apache-2.0", "bzip2-1.0.6" ]
1
2019-04-23T21:50:08.000Z
2019-04-23T21:50:08.000Z
yowsup/run.py
Srinath-tr/Goferbot
0f734d01c6504c6c97dbdf45f5adf8b25c0f9fd9
[ "Apache-2.0", "bzip2-1.0.6" ]
null
null
null
yowsup/run.py
Srinath-tr/Goferbot
0f734d01c6504c6c97dbdf45f5adf8b25c0f9fd9
[ "Apache-2.0", "bzip2-1.0.6" ]
2
2019-02-14T08:13:33.000Z
2019-04-23T21:47:48.000Z
from layer import EchoLayer from yowsup.layers import YowParallelLayer from yowsup.layers.auth import YowAuthenticationProtocolLayer from yowsup.layers.protocol_messages import YowMessagesProtocolLayer from yowsup.layers.protocol_receipts import Yow...
51.428571
127
0.732778
from layer import EchoLayer from yowsup.layers import YowParallelLayer from yowsup.layers.auth import YowAuthenticationProtocolLayer from yowsup.layers.protocol_messages import YowMessagesProtocolLayer from yowsup.layers.protocol_receipts import Yow...
true
true
f75c3f5b3450dd4bcaac5b1fcd05e8649f9789ba
1,223
py
Python
pydl4j/pydl4j/docker.py
rghwer/testdocs
8fafa40407411ed7a3f8216e691e42e0c7d32083
[ "Apache-2.0" ]
13,006
2015-02-13T18:35:31.000Z
2022-03-18T12:11:44.000Z
pydl4j/pydl4j/docker.py
heronggen/deeplearning4j
4670eee4f25cef84afca2ba2e2ebf46577968308
[ "Apache-2.0" ]
5,319
2015-02-13T08:21:46.000Z
2019-06-12T14:56:50.000Z
pydl4j/pydl4j/docker.py
heronggen/deeplearning4j
4670eee4f25cef84afca2ba2e2ebf46577968308
[ "Apache-2.0" ]
4,719
2015-02-13T22:48:55.000Z
2022-03-22T07:25:36.000Z
################################################################################ # Copyright (c) 2015-2018 Skymind, Inc. # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0. # # Unless...
35.970588
150
0.647588
def docker_file(): return """FROM java:openjdk-8-jdk ENV MAVEN_VERSION 3.3.9 RUN curl -fsSL http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz | tar xzf - -C /usr/share \ && mv /usr/share/apache-maven-$MAVEN_VERSION /usr/share/maven \ && ln -s /usr/sha...
true
true
f75c42385b416be70bb5a467ad71592857eeba4f
5,799
py
Python
tests/test_public_api_repr.py
pineappleslikei/pyhf
30a3a27f7b97e770de393cbbe9848d688fda70ce
[ "Apache-2.0" ]
2
2021-11-01T10:16:05.000Z
2021-11-08T08:35:46.000Z
tests/test_public_api_repr.py
RhnSharma/pyhf
1f8f7a0f9abdbeb3ae8047bead0795832c4eeeb5
[ "Apache-2.0" ]
null
null
null
tests/test_public_api_repr.py
RhnSharma/pyhf
1f8f7a0f9abdbeb3ae8047bead0795832c4eeeb5
[ "Apache-2.0" ]
null
null
null
import pyhf import pyhf.cli import pyhf.contrib.utils import pyhf.contrib.viz.brazil import pyhf.readxml import pyhf.writexml def test_top_level_public_api(): assert dir(pyhf) == [ "Model", "PatchSet", "Workspace", "__version__", "compat", "exceptions", "get...
22.564202
88
0.608208
import pyhf import pyhf.cli import pyhf.contrib.utils import pyhf.contrib.viz.brazil import pyhf.readxml import pyhf.writexml def test_top_level_public_api(): assert dir(pyhf) == [ "Model", "PatchSet", "Workspace", "__version__", "compat", "exceptions", "get...
true
true
f75c438d28d79d030e6507347f93a2080b466ef8
230
py
Python
main.py
oyaroshevych/twitter-soft
0c40bc5e76b493f746f302d4987afd14e26417d5
[ "Apache-2.0" ]
null
null
null
main.py
oyaroshevych/twitter-soft
0c40bc5e76b493f746f302d4987afd14e26417d5
[ "Apache-2.0" ]
null
null
null
main.py
oyaroshevych/twitter-soft
0c40bc5e76b493f746f302d4987afd14e26417d5
[ "Apache-2.0" ]
null
null
null
from driver_actions import mass_login from twitter_promote import start_promoting from find_tweets import find_tweets if __name__ == "__main__": usernames = mass_login() start_promoting(usernames) # find_tweets(15)
20.909091
43
0.782609
from driver_actions import mass_login from twitter_promote import start_promoting from find_tweets import find_tweets if __name__ == "__main__": usernames = mass_login() start_promoting(usernames)
true
true
f75c441e3dce73a14bbcf99ea9e3359c010c053a
1,293
py
Python
jdcloud_sdk/services/rds/models/K8SServiceAddr.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
14
2018-04-19T09:53:56.000Z
2022-01-27T06:05:48.000Z
jdcloud_sdk/services/rds/models/K8SServiceAddr.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
15
2018-09-11T05:39:54.000Z
2021-07-02T12:38:02.000Z
jdcloud_sdk/services/rds/models/K8SServiceAddr.py
jdcloud-apigateway/jdcloud-sdk-python
0886769bcf1fb92128a065ff0f4695be099571cc
[ "Apache-2.0" ]
33
2018-04-20T05:29:16.000Z
2022-02-17T09:10:05.000Z
# coding=utf8 # Copyright 2018 JDCLOUD.COM # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
38.029412
179
0.711524
class K8SServiceAddr(object): def __init__(self, addrType=None, accessType=None, addr=None, port=None): self.addrType = addrType self.accessType = accessType self.addr = addr self.port = port
true
true
f75c4478d800334a752e9334e17e4953a5dceb05
2,445
py
Python
mlTraining.py
storage4grid/PROFESS-PROFEV
adf4e26488225206c249938c9eecc394a06f9677
[ "Apache-2.0" ]
null
null
null
mlTraining.py
storage4grid/PROFESS-PROFEV
adf4e26488225206c249938c9eecc394a06f9677
[ "Apache-2.0" ]
null
null
null
mlTraining.py
storage4grid/PROFESS-PROFEV
adf4e26488225206c249938c9eecc394a06f9677
[ "Apache-2.0" ]
null
null
null
""" Created on Okt 04 12:03 2018 @author: nishit """ import configparser import json import time from IO.redisDB import RedisDB from config.configUpdater import ConfigUpdater from prediction.loadPrediction import LoadPrediction from utils_intern.messageLogger import MessageLogger redisDB = RedisDB() training_thre...
35.955882
97
0.613906
import configparser import json import time from IO.redisDB import RedisDB from config.configUpdater import ConfigUpdater from prediction.loadPrediction import LoadPrediction from utils_intern.messageLogger import MessageLogger redisDB = RedisDB() training_threads = {} def check_training(config, logger): whi...
true
true
f75c455870e4611cc859ce7df7434daa1dfa7d0c
9,928
py
Python
pyserver/pymysql3/tests/capabilities.py
joeedh/fairmotion
5c322fc012cdd94ddc2f21d68264c845b3c2c770
[ "MIT" ]
1
2015-05-22T14:11:17.000Z
2015-05-22T14:11:17.000Z
pyserver/pymysql3/tests/capabilities.py
joeedh/fairmotion
5c322fc012cdd94ddc2f21d68264c845b3c2c770
[ "MIT" ]
2
2021-09-02T20:01:35.000Z
2022-01-26T19:47:35.000Z
pyserver/pymysql3/tests/capabilities.py
joeedh/fairmotion
5c322fc012cdd94ddc2f21d68264c845b3c2c770
[ "MIT" ]
null
null
null
#!/usr/bin/env python -O """ Script to test database capabilities and the DB-API interface for functionality and memory leaks. Adapted from a script by M-A Lemburg. """ from time import time import array import unittest class DatabaseTest(unittest.TestCase): db_module = None connect_args = () ...
34.234483
102
0.535153
from time import time import array import unittest class DatabaseTest(unittest.TestCase): db_module = None connect_args = () connect_kwargs = dict() create_table_extra = '' rows = 10 debug = False def setUp(self): import gc db = self.db_module.connect(*self.connect_ar...
true
true
f75c4590fa1c8501973f6e4a2adb555fad77f580
8,421
py
Python
train/train.py
zhaoyuzhi/VCGAN
255b2f85ca9d5de10f9d47518924ab213683d3dc
[ "MIT" ]
17
2021-04-27T02:51:36.000Z
2022-03-10T01:52:29.000Z
train/train.py
yasar-rehman/VCGAN
025a61c6ec377b9a53c592d4d2ac2e0183bfba76
[ "MIT" ]
1
2021-10-18T09:19:41.000Z
2022-02-21T16:57:27.000Z
train/train.py
yasar-rehman/VCGAN
025a61c6ec377b9a53c592d4d2ac2e0183bfba76
[ "MIT" ]
4
2021-05-27T01:33:26.000Z
2021-09-27T08:58:42.000Z
import argparse import os if __name__ == "__main__": # ---------------------------------------- # Initialize the parameters # ---------------------------------------- parser = argparse.ArgumentParser() # pre-train, saving, and loading parameters parser.add_argument('--pre_train'...
83.376238
187
0.666667
import argparse import os if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--pre_train', type = bool, default = True, help = 'pre-train ot not') parser.add_argument('--save_mode', type = str, default = 'epoch', help = 'saving mode, and by_epoch saving ...
true
true
f75c468d6bc10af27cf11902e5419e2309f4b293
396
py
Python
setup/download_sample_data.py
nesp-tsr/tsx
99125db6e81652592cf4b3e8a89f8c8ac8de64af
[ "MIT" ]
3
2019-01-27T12:03:46.000Z
2022-01-29T02:06:33.000Z
setup/download_sample_data.py
nesp-tsr/tsx
99125db6e81652592cf4b3e8a89f8c8ac8de64af
[ "MIT" ]
27
2019-02-25T22:49:14.000Z
2022-02-02T04:07:52.000Z
setup/download_sample_data.py
nesp-tsr/tsx
99125db6e81652592cf4b3e8a89f8c8ac8de64af
[ "MIT" ]
1
2019-02-28T04:24:43.000Z
2019-02-28T04:24:43.000Z
from urllib.request import urlretrieve import ssl from subprocess import call import os import zipfile print("Downloading sample data, please wait") filename = 'sample.zip' urlretrieve('https://tsx.org.au/sample.zip', filename) print("Extracting") zip_ref = zipfile.ZipFile(filename, 'r') zip_ref.extractall('.') zip_r...
18.857143
54
0.757576
from urllib.request import urlretrieve import ssl from subprocess import call import os import zipfile print("Downloading sample data, please wait") filename = 'sample.zip' urlretrieve('https://tsx.org.au/sample.zip', filename) print("Extracting") zip_ref = zipfile.ZipFile(filename, 'r') zip_ref.extractall('.') zip_r...
true
true
f75c4713e2255f59febe15362333b88623cecb04
16,928
py
Python
py/test/selenium/webdriver/common/select_class_tests.py
Standard8/selenium
4d79679d2150cf7a7dc3ac8eec7b653c50a5f055
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/common/select_class_tests.py
Standard8/selenium
4d79679d2150cf7a7dc3ac8eec7b653c50a5f055
[ "Apache-2.0" ]
null
null
null
py/test/selenium/webdriver/common/select_class_tests.py
Standard8/selenium
4d79679d2150cf7a7dc3ac8eec7b653c50a5f055
[ "Apache-2.0" ]
1
2021-08-01T17:59:40.000Z
2021-08-01T17:59:40.000Z
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
49.209302
138
0.65436
import pytest import unittest from selenium.common.exceptions import NoSuchElementException, ElementNotSelectableException, UnexpectedTagNameException from selenium.webdriver.support.ui import Select from selenium.webdriver.common.by import By def not_available_on_remote(func): def testMethod(self): prin...
true
true
f75c476988a516fd655e9ed8d719f2bf87767ff1
2,931
py
Python
cumulusci/core/tests/test_salesforce_locators.py
hamedizadpanah-ibm/CumulusCI
eb93723e2da1ca66a7639b3197e6fab02d1bd24a
[ "BSD-3-Clause" ]
1
2020-08-08T03:55:21.000Z
2020-08-08T03:55:21.000Z
cumulusci/core/tests/test_salesforce_locators.py
Julian88Tex/CumulusCI
82d5fab71b61fbab53c1b5fc6001452fa3f97da8
[ "BSD-3-Clause" ]
null
null
null
cumulusci/core/tests/test_salesforce_locators.py
Julian88Tex/CumulusCI
82d5fab71b61fbab53c1b5fc6001452fa3f97da8
[ "BSD-3-Clause" ]
null
null
null
import unittest from robot.libraries.BuiltIn import RobotNotRunningError from cumulusci.robotframework.Salesforce import Salesforce from unittest import mock # FIXME: we shouldn't have to tweak these tests for every # version. The tests should be smarter. class TestLocators(unittest.TestCase): @mock.patch("cumulu...
42.478261
98
0.701808
import unittest from robot.libraries.BuiltIn import RobotNotRunningError from cumulusci.robotframework.Salesforce import Salesforce from unittest import mock # version. The tests should be smarter. class TestLocators(unittest.TestCase): @mock.patch("cumulusci.robotframework.Salesforce.Salesforce.get_latest_api_ve...
true
true
f75c47de74d5ff14aab751bc6a020b6856f278cb
321
py
Python
PCL/01_visualization/visiualization.py
kaka-lin/autonomous-driving-notes
6c1b29752d6deb679637766b6cea5c6fe5b72319
[ "MIT" ]
null
null
null
PCL/01_visualization/visiualization.py
kaka-lin/autonomous-driving-notes
6c1b29752d6deb679637766b6cea5c6fe5b72319
[ "MIT" ]
6
2020-06-10T02:56:37.000Z
2022-02-27T10:13:12.000Z
PCL/01_visualization/visiualization.py
kaka-lin/autonomous-driving-notes
6c1b29752d6deb679637766b6cea5c6fe5b72319
[ "MIT" ]
null
null
null
import numpy as np import pcl import pcl.pcl_visualization def main(): cloud = pcl.load_XYZRGB("../data/teacup.pcd") viewer = pcl.pcl_visualization.CloudViewing() viewer.ShowColorCloud(cloud, b'cloud') v = True while v: v = not(viewer.WasStopped()) if __name__ == "__main__": main()...
16.894737
49
0.657321
import numpy as np import pcl import pcl.pcl_visualization def main(): cloud = pcl.load_XYZRGB("../data/teacup.pcd") viewer = pcl.pcl_visualization.CloudViewing() viewer.ShowColorCloud(cloud, b'cloud') v = True while v: v = not(viewer.WasStopped()) if __name__ == "__main__": main()...
true
true
f75c495aaa1058037ba191ae4c2bb90de8f0df1b
1,285
py
Python
sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/cognitiveservices/azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py
pjquirk/azure-sdk-for-python
cbf02ec4f177b96eae1dbbba87c34c2c93880150
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/category_py3.py
xiafu-msft/azure-sdk-for-python
4d9560cfd519ee60667f3cc2f5295a58c18625db
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
33.815789
92
0.582101
from msrest.serialization import Model class Category(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'score': {'key': 'score', 'type': 'float'}, 'detail': {'key': 'detail', 'type': 'CategoryDetail'}, } def __init__(self, *, name: str=None, score: float=None, ...
true
true
f75c4a9f266aa595f850162683f16df9828def14
16,435
py
Python
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/5-sender_receiver_21.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/5-sender_receiver_21.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/5-sender_receiver_21.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import FrozenSet from collections import Iterable from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msa...
40.085366
89
0.568239
from typing import FrozenSet from collections import Iterable from math import log, ceil from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msa...
true
true
f75c4bad9e2cc2143b9b3752f8c3143443dfee64
10,236
py
Python
ocdeployer/utils.py
lcouzens/ocdeployer
3a99ee68547b4ccbac04ee993609283984412575
[ "MIT" ]
null
null
null
ocdeployer/utils.py
lcouzens/ocdeployer
3a99ee68547b4ccbac04ee993609283984412575
[ "MIT" ]
null
null
null
ocdeployer/utils.py
lcouzens/ocdeployer
3a99ee68547b4ccbac04ee993609283984412575
[ "MIT" ]
null
null
null
from __future__ import print_function import glob import json import logging import sys import threading import time import os import yaml import sh from sh import ErrorReturnCode log = logging.getLogger(__name__) # Resource types and their cli shortcuts # Mostly listed here: https://docs.openshift.com/online/cli...
28.512535
99
0.616159
from __future__ import print_function import glob import json import logging import sys import threading import time import os import yaml import sh from sh import ErrorReturnCode log = logging.getLogger(__name__) SHORTCUTS = { "build": None, "buildconfig": "bc", "deploymentconfig": "dc", "event":...
true
true
f75c4c4d84946ae1fd68a7e060c3e13e7632c726
3,145
py
Python
data/p2DJ/New/program/qiskit/simulator/startQiskit250.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/simulator/startQiskit250.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/simulator/startQiskit250.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=13 import cirq import qiskit from qiskit import IBMQ 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,floor, sqrt, pi import numpy a...
28.333333
82
0.623529
import cirq import qiskit from qiskit import IBMQ 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,floor, sqrt, pi import numpy as np import networkx as nx def bui...
true
true
f75c4cb9cbcb7f8d45af0002645dc260fbb4d999
856
py
Python
tests/bots/stocks/due_diligence/test_supplier.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
255
2022-03-29T16:43:51.000Z
2022-03-31T23:57:08.000Z
tests/bots/stocks/due_diligence/test_supplier.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
14
2022-03-29T14:20:33.000Z
2022-03-31T23:39:20.000Z
tests/bots/stocks/due_diligence/test_supplier.py
tehcoderer/GamestonkTerminal
54a1b6f545a0016c576e9e00eef5c003d229dacf
[ "MIT" ]
24
2022-03-29T15:28:56.000Z
2022-03-31T23:54:15.000Z
import pytest try: from bots.stocks.due_diligence.supplier import supplier_command except ImportError: pytest.skip(allow_module_level=True) @pytest.fixture(scope="module") def vcr_config(): return { "filter_headers": [("User-Agent", None)], "filter_query_parameters": [ ("perio...
23.135135
67
0.647196
import pytest try: from bots.stocks.due_diligence.supplier import supplier_command except ImportError: pytest.skip(allow_module_level=True) @pytest.fixture(scope="module") def vcr_config(): return { "filter_headers": [("User-Agent", None)], "filter_query_parameters": [ ("perio...
true
true
f75c4d626fdab6b55f42db55877dc4a7a3b0ebe8
1,171
py
Python
fixtures/filters.py
Smart-Studio/fbclm-backend
c9745259e95550c2aebc3410ac62aa3ba2197445
[ "Apache-2.0" ]
null
null
null
fixtures/filters.py
Smart-Studio/fbclm-backend
c9745259e95550c2aebc3410ac62aa3ba2197445
[ "Apache-2.0" ]
null
null
null
fixtures/filters.py
Smart-Studio/fbclm-backend
c9745259e95550c2aebc3410ac62aa3ba2197445
[ "Apache-2.0" ]
null
null
null
""" Copyright 2015 Smart Studio. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
26.022222
72
0.730145
import rest_framework_filters as filters from fixtures.models import League, Group, SubGroup __author__ = 'juanyanezgc' class LeaguesFilter(filters.FilterSet): season = filters.NumberFilter(name='season_id') class Meta: model = League fields = ['season'] class GroupsFilter(filters.FilterS...
true
true
f75c4de2d03b32f88894b3432c037a69e078bb41
32,924
py
Python
mblibs/fast.py
mickbad/mblibs
7925cc0a3286a5bd3049f3141cb27aec3ded5a06
[ "MIT" ]
1
2020-05-04T20:16:23.000Z
2020-05-04T20:16:23.000Z
mblibs/fast.py
mickbad/mblibs
7925cc0a3286a5bd3049f3141cb27aec3ded5a06
[ "MIT" ]
null
null
null
mblibs/fast.py
mickbad/mblibs
7925cc0a3286a5bd3049f3141cb27aec3ded5a06
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # ---------------------------------------------------------------------- # Librairie Outils # ---------------------------------------------------------------------- """ Fast tools for programming Usage: >>> from mblibs.fast import FastSettings >>> settings = FastSettings("/path/to/yaml_or_json"...
33.391481
124
0.628538
from __future__ import print_function import os import sys import time from datetime import datetime from datetime import timedelta __all__ = ["FastSettings", "FastLogger", "FastEmail", "FastThread", "FastDate"] import re import json import codecs class FastSettings(object): def __init__(self, config_filename...
true
true
f75c4df4ad5d1f89d27365ef6f7b3b33ae28e2c3
4,404
py
Python
Tweet_Streamer_Using_Tweepy/tweepy_streamer.py
ZYZMarshall/Twitter-Emotion-Radar
9d6ebf2464dfa1864268a9cdf69991e6cef542a3
[ "MIT" ]
3
2020-02-05T16:23:25.000Z
2020-02-05T16:47:09.000Z
Tweet_Streamer_Using_Tweepy/tweepy_streamer.py
ZYZMarshall/Twitter-Emotion-Radar
9d6ebf2464dfa1864268a9cdf69991e6cef542a3
[ "MIT" ]
16
2020-02-03T17:15:53.000Z
2021-06-10T22:44:13.000Z
Tweet_Streamer_Using_Tweepy/tweepy_streamer.py
ZYZMarshall/Twitter-Emotion-Radar
9d6ebf2464dfa1864268a9cdf69991e6cef542a3
[ "MIT" ]
null
null
null
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import twitter_credentials """Tweepy module is used to stream live tweets directly from Twitter in real-time. The tweets are visualized and then the TextBlob module is used to do sentiment analysis on the ...
33.876923
105
0.688238
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import twitter_credentials from tweepy import API from tweepy import Cursor from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import numpy as np import p...
true
true
f75c4e39ec6e9e6ebfc11a59674293e373584750
3,211
py
Python
ai_module.py
hilarioushappystar/SpiderSolitaireProject
4fa04d41fbdb4d916919004966594f39ec619665
[ "MIT" ]
null
null
null
ai_module.py
hilarioushappystar/SpiderSolitaireProject
4fa04d41fbdb4d916919004966594f39ec619665
[ "MIT" ]
null
null
null
ai_module.py
hilarioushappystar/SpiderSolitaireProject
4fa04d41fbdb4d916919004966594f39ec619665
[ "MIT" ]
null
null
null
########################################### # This is the ai_module class # This class handles the "clever stuff" such as working out best move(s) to play ########################################### # achieves 10% win rate in 50 games (more thorough testing may be warranted) import numpy as np from numpy import ran...
37.776471
104
0.583619
import numpy as np from numpy import random from gamestate import Gamestate from card import Card import copy def evaluate_position(gs, cfgh): myeval = 100 * gs.countsuitsremoved() + gs.countsuitedbuilds() + 10*(44 - gs.counthiddencards()) for foo in range(10): i...
true
true