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
f74055ee4dbc3bfd6ba72d5c47385140d0c1accf
8,884
py
Python
indy_common/test/test_transactions.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
627
2017-07-06T12:38:08.000Z
2022-03-30T13:18:43.000Z
indy_common/test/test_transactions.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
580
2017-06-29T17:59:57.000Z
2022-03-29T21:37:52.000Z
indy_common/test/test_transactions.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
704
2017-06-29T17:45:34.000Z
2022-03-30T07:08:58.000Z
from indy_common.constants import NYM, NODE, ATTRIB, SCHEMA, CLAIM_DEF, DISCLO, GET_ATTR, GET_NYM, GET_TXNS, \ GET_SCHEMA, GET_CLAIM_DEF, POOL_UPGRADE, NODE_UPGRADE, \ POOL_CONFIG, REVOC_REG_DEF, REVOC_REG_ENTRY, \ GET_REVOC_REG_DEF, GET_REVOC_REG, GET_REVOC_REG_DELTA, POOL_RESTART, VALIDATOR_INFO, CHANGE_K...
51.953216
115
0.77769
from indy_common.constants import NYM, NODE, ATTRIB, SCHEMA, CLAIM_DEF, DISCLO, GET_ATTR, GET_NYM, GET_TXNS, \ GET_SCHEMA, GET_CLAIM_DEF, POOL_UPGRADE, NODE_UPGRADE, \ POOL_CONFIG, REVOC_REG_DEF, REVOC_REG_ENTRY, \ GET_REVOC_REG_DEF, GET_REVOC_REG, GET_REVOC_REG_DELTA, POOL_RESTART, VALIDATOR_INFO, CHANGE_K...
true
true
f74056511be51a217aa65c0a8bd8a7837e4919eb
351
py
Python
test/datasets/test_transforms.py
pvrancx/torch_isr
831278ae5c3b939b4147bae1a99bc3f3d4fc415d
[ "MIT" ]
null
null
null
test/datasets/test_transforms.py
pvrancx/torch_isr
831278ae5c3b939b4147bae1a99bc3f3d4fc415d
[ "MIT" ]
null
null
null
test/datasets/test_transforms.py
pvrancx/torch_isr
831278ae5c3b939b4147bae1a99bc3f3d4fc415d
[ "MIT" ]
null
null
null
import pytest from isr.datasets.transforms import ChannelSelect @pytest.mark.parametrize("channel_idx", [0, 1, 2]) def test_channel_select(pil_img, channel_idx: int): transform = ChannelSelect(channel_idx) channels = pil_img.split() output = transform(pil_img) assert output.mode == "L" assert c...
23.4
51
0.732194
import pytest from isr.datasets.transforms import ChannelSelect @pytest.mark.parametrize("channel_idx", [0, 1, 2]) def test_channel_select(pil_img, channel_idx: int): transform = ChannelSelect(channel_idx) channels = pil_img.split() output = transform(pil_img) assert output.mode == "L" assert c...
true
true
f74056d2999ed5ea5e9e83f224dcb7a1cf267dec
1,225
py
Python
functests/helpers/func_test_helpers.py
jwdashel/woms
f326fabd1c3aae0fd4d678ecbcf5e2c59911cbbd
[ "BSD-3-Clause" ]
null
null
null
functests/helpers/func_test_helpers.py
jwdashel/woms
f326fabd1c3aae0fd4d678ecbcf5e2c59911cbbd
[ "BSD-3-Clause" ]
null
null
null
functests/helpers/func_test_helpers.py
jwdashel/woms
f326fabd1c3aae0fd4d678ecbcf5e2c59911cbbd
[ "BSD-3-Clause" ]
null
null
null
import sys offset = "\t\t" woms_keys = { "title": "title", "composer": "composer", "mm_uid": "mm-uid" } def assert_and_report(element, one, another): print(f"{offset} asserting that {element} is {one} ...") try: assert one == another print(f"{offset}\u2713 {one} is {element}!") ...
33.108108
75
0.718367
import sys offset = "\t\t" woms_keys = { "title": "title", "composer": "composer", "mm_uid": "mm-uid" } def assert_and_report(element, one, another): print(f"{offset} asserting that {element} is {one} ...") try: assert one == another print(f"{offset}\u2713 {one} is {element}!") ...
true
true
f74056e213ef23d29688422b24d4df6f5fa87221
383
py
Python
Aula 06/AdicionandoElementosArray.py
eduardojpsena/EstruturaDeDados-Python-IESP
97c22fc1411dfdae2d1085e9a3ca0c334ee07988
[ "MIT" ]
null
null
null
Aula 06/AdicionandoElementosArray.py
eduardojpsena/EstruturaDeDados-Python-IESP
97c22fc1411dfdae2d1085e9a3ca0c334ee07988
[ "MIT" ]
null
null
null
Aula 06/AdicionandoElementosArray.py
eduardojpsena/EstruturaDeDados-Python-IESP
97c22fc1411dfdae2d1085e9a3ca0c334ee07988
[ "MIT" ]
null
null
null
print("--- ADICIONANDO ELEMENTOS EM UM ARRAY ---") def main(): registro = [] while True: valores = str(input("Digite algo para adcionar a lista: ")) registro.append(valores) condição = str(input("Deseja continuar? [S/N] ")).strip().upper()[0] if condição in 'N': bre...
27.357143
76
0.582245
print("--- ADICIONANDO ELEMENTOS EM UM ARRAY ---") def main(): registro = [] while True: valores = str(input("Digite algo para adcionar a lista: ")) registro.append(valores) condição = str(input("Deseja continuar? [S/N] ")).strip().upper()[0] if condição in 'N': bre...
true
true
f74057876c9b2fd16ed2dca3ee9a5d8d6a926360
17,699
py
Python
utils/Quaternions.py
sanweiliti/HMP
3d1a96ec86a72396349daa9f8dde9b2e5a3fc578
[ "MIT" ]
92
2021-08-25T01:23:36.000Z
2022-03-20T02:29:55.000Z
NN/data/motion/Quaternions.py
lcyzgdy/GraduationProject-PFNN
abb37a553c9ebeccf746225331bd90ccc0e33df9
[ "MIT" ]
9
2021-10-14T11:54:01.000Z
2022-03-13T17:45:37.000Z
NN/data/motion/Quaternions.py
lcyzgdy/GraduationProject-PFNN
abb37a553c9ebeccf746225331bd90ccc0e33df9
[ "MIT" ]
12
2021-08-25T01:49:43.000Z
2022-03-16T13:46:13.000Z
import numpy as np class Quaternions: """ Quaternions is a wrapper around a numpy ndarray that allows it to act as if it were an narray of a quaternion data type. Therefore addition, subtraction, multiplication, division, negation, absolute, are all defined in terms of quater...
37.818376
121
0.471157
import numpy as np class Quaternions: def __init__(self, qs): if isinstance(qs, np.ndarray): if len(qs.shape) == 1: qs = np.array([qs]) self.qs = qs return if isinstance(qs, Quaternions): self.qs = qs.qs ...
true
true
f74058e160a9bcf64c14da9fc4d47871126d8b2f
778
py
Python
pornhub/entry/channel.py
LaudateCorpus1/pornhub-dl
ded5d5ce82d816544d400ead68b2d3eb0100e81b
[ "MIT" ]
204
2019-03-28T00:40:55.000Z
2022-03-31T23:25:59.000Z
pornhub/entry/channel.py
Inncee81/pornhub-dl-1
ded5d5ce82d816544d400ead68b2d3eb0100e81b
[ "MIT" ]
15
2019-05-01T20:01:20.000Z
2022-03-17T22:29:51.000Z
pornhub/entry/channel.py
Inncee81/pornhub-dl-1
ded5d5ce82d816544d400ead68b2d3eb0100e81b
[ "MIT" ]
40
2019-04-07T20:06:05.000Z
2022-03-29T18:59:56.000Z
from datetime import datetime import click from pornhub.core import get_session from pornhub.extractors import download_channel_videos, get_channel_info from pornhub.models import Channel @click.command(name="channel") @click.argument("name") def get_channel(name: str) -> None: """Download a specific channel. ...
27.785714
72
0.722365
from datetime import datetime import click from pornhub.core import get_session from pornhub.extractors import download_channel_videos, get_channel_info from pornhub.models import Channel @click.command(name="channel") @click.argument("name") def get_channel(name: str) -> None: session = get_session() chan...
true
true
f74059c1f759b7f9d7034dbc25408e2f6768fd39
6,851
py
Python
src/gluonts/nursery/tsbench/src/tsbench/surrogate/deepset.py
RingoIngo/gluon-ts
62fb20c36025fc969653accaffaa783671709564
[ "Apache-2.0" ]
1
2022-03-28T01:17:00.000Z
2022-03-28T01:17:00.000Z
src/gluonts/nursery/tsbench/src/tsbench/surrogate/deepset.py
RingoIngo/gluon-ts
62fb20c36025fc969653accaffaa783671709564
[ "Apache-2.0" ]
null
null
null
src/gluonts/nursery/tsbench/src/tsbench/surrogate/deepset.py
RingoIngo/gluon-ts
62fb20c36025fc969653accaffaa783671709564
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
38.706215
99
0.646475
from typing import cast, List, Literal, Optional import numpy as np import numpy.typing as npt import pytorch_lightning as pl import torch from lightkit.data import DataLoader from torch import nn from torch.utils.data import TensorDataset from tsbench.config import Config, EnsembleConfig from tsbench.eval...
true
true
f7405aca876088f9dd2150aa791d233b606a8a83
5,484
py
Python
les12/modularsecret.py
abreens/sn
0da9e23a464436be6a3f2fb7f070838a613b0f5a
[ "MIT" ]
null
null
null
les12/modularsecret.py
abreens/sn
0da9e23a464436be6a3f2fb7f070838a613b0f5a
[ "MIT" ]
3
2019-10-07T15:28:57.000Z
2019-10-14T23:07:31.000Z
les12/modularsecret.py
abreens/sn
0da9e23a464436be6a3f2fb7f070838a613b0f5a
[ "MIT" ]
null
null
null
##### # # Les 12 - Make the "Guess the secret number" game more modular # # Use functions to make the game more modular. Also try to add another while loop so the user can play # many rounds of the game without having to re-run the program each time. # # You can let the user choose the level of the game: 'Easy' of 'Har...
33.644172
110
0.588257
random import json import datetime def lees_geheel(upper_limit): while True: invoer = input("\nGeef een getal (tussen 1 en " + str(upper_limit) + "): ") try: getal = int(invoer) except ValueError: print("Jammer genoeg was dit geen (geheel) getal. Probeer aub opni...
true
true
f7405b26f971953af9b26eafb9d62c5d9862f5e6
1,013
py
Python
vimiv/exceptions.py
karlch/vimiv
acbb83e003805e5304131be1f73d7f66528606d6
[ "MIT" ]
268
2015-11-15T22:41:27.000Z
2022-02-07T21:54:52.000Z
vimiv/exceptions.py
karlch/vimiv
acbb83e003805e5304131be1f73d7f66528606d6
[ "MIT" ]
92
2015-12-12T00:35:54.000Z
2021-04-26T16:16:30.000Z
vimiv/exceptions.py
karlch/vimiv
acbb83e003805e5304131be1f73d7f66528606d6
[ "MIT" ]
15
2015-12-11T19:42:15.000Z
2020-09-24T13:00:36.000Z
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4 """Contains custom exceptions used by vimiv.""" class NoSearchResultsError(Exception): """Raised when a search result is accessed although there are no results.""" class StringConversionError(ValueError): """Raised when a setting or argument could not be con...
25.974359
80
0.727542
class NoSearchResultsError(Exception): class StringConversionError(ValueError): class SettingNotFoundError(Exception): class NotABoolean(Exception): class NotANumber(Exception): class AliasError(Exception): class TrashUndeleteError(Exception): class NotTransformable(Exception): class ArgumentAmountEr...
true
true
f7405d1b42037cf682fd50862edbc5f0debc789e
6,795
py
Python
preprocessing/MaskRCNN/MaskRCNN_TUM.py
Wayne-Mai/DynSLAM
7b62e13d2a33ff58ca888a346433a4891a228a20
[ "BSD-3-Clause" ]
null
null
null
preprocessing/MaskRCNN/MaskRCNN_TUM.py
Wayne-Mai/DynSLAM
7b62e13d2a33ff58ca888a346433a4891a228a20
[ "BSD-3-Clause" ]
null
null
null
preprocessing/MaskRCNN/MaskRCNN_TUM.py
Wayne-Mai/DynSLAM
7b62e13d2a33ff58ca888a346433a4891a228a20
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # # This file is part of https://github.com/martinruenz/maskfusion # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
37.75
137
0.675644
import sys import os mask_rcnn_path = os.path.abspath("../Mask_RCNN") sys.path.insert(0, mask_rcnn_path) import random import math import numpy as np import scipy.misc import matplotlib import matplotlib.pyplot as plt import argparse from samples.coco import coco from mrcnn import utils from mrcnn ...
true
true
f7405d8b131b0f923bce41ed1ab11c436b42d591
10,558
py
Python
docs/sphinx_extensions/dfhack/changelog.py
Arson00/dfhack
fc384fd1a2bee65315fe79831a55ca74c8e6717b
[ "CC-BY-3.0" ]
926
2015-01-02T13:06:12.000Z
2022-03-24T13:22:26.000Z
docs/sphinx_extensions/dfhack/changelog.py
Arson00/dfhack
fc384fd1a2bee65315fe79831a55ca74c8e6717b
[ "CC-BY-3.0" ]
1,238
2015-01-01T00:11:23.000Z
2022-03-31T23:05:32.000Z
docs/sphinx_extensions/dfhack/changelog.py
Arson00/dfhack
fc384fd1a2bee65315fe79831a55ca74c8e6717b
[ "CC-BY-3.0" ]
318
2015-01-03T16:35:50.000Z
2022-03-31T00:22:01.000Z
import collections import copy import itertools import os import sys from sphinx.errors import ExtensionError, SphinxError, SphinxWarning from dfhack.util import DFHACK_ROOT, DOCS_ROOT CHANGELOG_PATHS = ( 'docs/changelog.txt', 'scripts/changelog.txt', 'library/xml/changelog.txt', ) CHANGELOG_PATHS = (os....
34.730263
89
0.545937
import collections import copy import itertools import os import sys from sphinx.errors import ExtensionError, SphinxError, SphinxWarning from dfhack.util import DFHACK_ROOT, DOCS_ROOT CHANGELOG_PATHS = ( 'docs/changelog.txt', 'scripts/changelog.txt', 'library/xml/changelog.txt', ) CHANGELOG_PATHS = (os....
true
true
f7405db7123016b7a8f0e1d8452b7b1738e6374e
762
py
Python
src/data_management/corpus_for_context2vec.py
joaquimgomez/BachelorThesis-TextSimilarityMeasures
a5efd4d651c53f7e35cab05e8408ebf769f5aadf
[ "MIT" ]
null
null
null
src/data_management/corpus_for_context2vec.py
joaquimgomez/BachelorThesis-TextSimilarityMeasures
a5efd4d651c53f7e35cab05e8408ebf769f5aadf
[ "MIT" ]
null
null
null
src/data_management/corpus_for_context2vec.py
joaquimgomez/BachelorThesis-TextSimilarityMeasures
a5efd4d651c53f7e35cab05e8408ebf769f5aadf
[ "MIT" ]
null
null
null
import argparse from os import listdir, mkdir from os.path import isfile, join from nltk import sent_tokenize def main(org, dest): with open(org, 'r') as o: corpus = o.read() sent_corpus = sent_tokenize(corpus) with open(dest, 'w') as d: for sent in sent_corpus: d.write(sent + '\n') if __name__ == "__m...
29.307692
105
0.686352
import argparse from os import listdir, mkdir from os.path import isfile, join from nltk import sent_tokenize def main(org, dest): with open(org, 'r') as o: corpus = o.read() sent_corpus = sent_tokenize(corpus) with open(dest, 'w') as d: for sent in sent_corpus: d.write(sent + '\n') if __name__ == "__m...
true
true
f7405e34e7549ce69644fe380a87bd075ba374c3
500
py
Python
dashboard/spotify_main_app.py
Mega-Barrel/spotify_analysis
8cc48f7fcaec195518872cb5b8429e3bcf03ebbf
[ "MIT" ]
1
2021-12-26T15:35:05.000Z
2021-12-26T15:35:05.000Z
dashboard/spotify_main_app.py
Mega-Barrel/spotify_analysis
8cc48f7fcaec195518872cb5b8429e3bcf03ebbf
[ "MIT" ]
null
null
null
dashboard/spotify_main_app.py
Mega-Barrel/spotify_analysis
8cc48f7fcaec195518872cb5b8429e3bcf03ebbf
[ "MIT" ]
null
null
null
# Main dashboard screen # importing libraries import dash from dash import dcc from dash import html from dash.dependencies import Input, Output, State # dash app app = dash.Dash(__name__) # Dash layout app.layout = html.Div( children=[ html.H1( children='Spotify Analysis' ), ...
17.857143
50
0.602
import dash from dash import dcc from dash import html from dash.dependencies import Input, Output, State app = dash.Dash(__name__) app.layout = html.Div( children=[ html.H1( children='Spotify Analysis' ), html.Div( children=''' Dashboard for songs...
true
true
f7405f6efbff415e1704f438a5b36046e2ea5f73
77,311
py
Python
tests/v2/test_0224-arrow-to-awkward.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
2
2019-09-12T03:07:23.000Z
2019-09-27T05:32:07.000Z
tests/v2/test_0224-arrow-to-awkward.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
1
2019-09-26T17:57:45.000Z
2019-09-26T17:57:45.000Z
tests/v2/test_0224-arrow-to-awkward.py
jpivarski/awkward-1.0
49a3ff13ef90b8778a80573211d58c544729eaa5
[ "BSD-3-Clause" ]
null
null
null
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import pytest # noqa: F401 import numpy as np # noqa: F401 import awkward as ak # noqa: F401 pyarrow = pytest.importorskip("pyarrow") pytest.importorskip("awkward._v2._connect.pyarrow") to_list = ak._v2.operations.to_list de...
32.648226
94
0.473387
import pytest import numpy as np import awkward as ak pyarrow = pytest.importorskip("pyarrow") pytest.importorskip("awkward._v2._connect.pyarrow") to_list = ak._v2.operations.to_list def test_toarrow_BitMaskedArray(): content = ak._v2.highlevel.Array( ["one", "two", "three", "four", "five", "six...
true
true
f7405fa518f9b880306d5582a05a900e0fe44aa7
5,886
py
Python
scripts/stampede/diff_machine_log_rule_keys_test.py
isfaaghyth/buck
cad8f7ac2de2c9a4f08ce66180db677e44d61aee
[ "Apache-2.0" ]
2
2019-09-22T05:33:37.000Z
2019-09-22T06:36:24.000Z
scripts/stampede/diff_machine_log_rule_keys_test.py
isfaaghyth/buck
cad8f7ac2de2c9a4f08ce66180db677e44d61aee
[ "Apache-2.0" ]
null
null
null
scripts/stampede/diff_machine_log_rule_keys_test.py
isfaaghyth/buck
cad8f7ac2de2c9a4f08ce66180db677e44d61aee
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-present Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
35.672727
84
0.633028
import os import unittest import diff_machine_log_rule_keys as rule_key_differ from diff_machine_log_rule_keys import DEFAULT_RULE_KEY, INPUT_RULE_KEY def get_test_dir(test_dir): this_dir = os.path.dirname(os.path.realpath(__file__)) return os.path.join(this_dir, "testdata", test_dir) class T...
true
true
f7406041853c8313000eb6da7c803c6cfbf9dd51
1,487
py
Python
resnet/official/utils/logs/cloud_lib_test.py
biolins/frivolous_dnns
23d9a057ac517770cdfe9d8ac71543c328fcf76d
[ "MIT" ]
1
2021-05-17T01:42:29.000Z
2021-05-17T01:42:29.000Z
official/utils/logs/cloud_lib_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
null
null
null
official/utils/logs/cloud_lib_test.py
jdavidagudelo/tensorflow-models
6f019beec73b01861363bf717706e27f4210b979
[ "Apache-2.0" ]
2
2021-05-31T23:08:13.000Z
2021-12-28T19:11:08.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
30.346939
80
0.710155
from __future__ import absolute_import from __future__ import division from __future__ import print_function import unittest import mock import requests from official.utils.logs import cloud_lib class CloudLibTest(unittest.TestCase): @mock.patch("requests.get") def test_on_gcp(self, mock_r...
true
true
f74060c1de71240f9718b12324bf4e301a79653a
8,680
py
Python
python/infinoted.py
speedyleion/vobby
7369afb52184358130dd4143a2a19e4c1dbb7ecf
[ "Unlicense" ]
null
null
null
python/infinoted.py
speedyleion/vobby
7369afb52184358130dd4143a2a19e4c1dbb7ecf
[ "Unlicense" ]
null
null
null
python/infinoted.py
speedyleion/vobby
7369afb52184358130dd4143a2a19e4c1dbb7ecf
[ "Unlicense" ]
null
null
null
""" This handles the communication to an infinoted server """ from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.names.srvconnect import SRVConnector from twisted.words.xish import domish from twisted.words.protocols.jabber import xmlstream, client from twisted.words.protocol...
38.070175
90
0.574539
from twisted.internet import reactor from twisted.internet.defer import Deferred from twisted.names.srvconnect import SRVConnector from twisted.words.xish import domish from twisted.words.protocols.jabber import xmlstream, client from twisted.words.protocols.jabber.jid import JID from twisted.words.protocols.jabber.sa...
true
true
f7406225dfee59c79c27a2de9850dcf8c9432964
351
py
Python
applications/DEMApplication/DEMApplication.py
HubertBalcerzak/Kratos
c15689d53f06dabb36dc44c13eeac73d3e183916
[ "BSD-4-Clause" ]
null
null
null
applications/DEMApplication/DEMApplication.py
HubertBalcerzak/Kratos
c15689d53f06dabb36dc44c13eeac73d3e183916
[ "BSD-4-Clause" ]
null
null
null
applications/DEMApplication/DEMApplication.py
HubertBalcerzak/Kratos
c15689d53f06dabb36dc44c13eeac73d3e183916
[ "BSD-4-Clause" ]
null
null
null
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 from KratosDEMApplication import * from KratosMultiphysics import _ImportApplication application = KratosDEMApplication() application_name = "KratosDEMApplication" _ImportApplication(...
39
134
0.863248
from __future__ import print_function, absolute_import, division from KratosDEMApplication import * from KratosMultiphysics import _ImportApplication application = KratosDEMApplication() application_name = "KratosDEMApplication" _ImportApplication(application, application_name)
true
true
f74063724c532a90b8fe454df280bd34fbbc81f0
8,355
py
Python
third_party/WebKit/Source/devtools/PRESUBMIT.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-01-28T08:09:58.000Z
2021-11-15T15:32:10.000Z
third_party/WebKit/Source/devtools/PRESUBMIT.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/WebKit/Source/devtools/PRESUBMIT.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
6
2020-09-23T08:56:12.000Z
2021-11-18T03:40:49.000Z
# Copyright (C) 2014 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
50.331325
155
0.735727
import sys compile_note = "Be sure to run your patch by the compile_frontend.py script prior to committing!" def _CheckDevtoolsStyle(input_api, output_api): local_paths = [f.AbsoluteLocalPath() for f in input_api.AffectedFiles() if f.Action() != "D"] devtools_root = input_api.Pr...
true
true
f74063bc03f89b1d2a11dfd8032608a3b22b9622
8,029
py
Python
docs/conf.py
cjwatson/zope.configuration
24d5808a53c55112145f176912f6ace1b7061b98
[ "ZPL-2.1" ]
null
null
null
docs/conf.py
cjwatson/zope.configuration
24d5808a53c55112145f176912f6ace1b7061b98
[ "ZPL-2.1" ]
null
null
null
docs/conf.py
cjwatson/zope.configuration
24d5808a53c55112145f176912f6ace1b7061b98
[ "ZPL-2.1" ]
null
null
null
# -*- coding: utf-8 -*- # # zope.configuration documentation build configuration file, created by # sphinx-quickstart on Sat May 5 13:59:34 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
32.24498
92
0.71715
import sys, os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'repoze.sphinx.autointerface', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'zope.configuration' copyri...
true
true
f74064d308efa4b861fec2b996dfb9c04769b387
56,010
py
Python
caffe2/python/data_parallel_model_test.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
caffe2/python/data_parallel_model_test.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
caffe2/python/data_parallel_model_test.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from future.utils import viewkeys from multiprocessing import Process, Queue import numpy as np import os import shutil import tempfile import unittest import time from mock import Mock from hypothesis import a...
39.388186
174
0.556829
from __future__ import absolute_import from __future__ import division from __future__ import print_function from future.utils import viewkeys from multiprocessing import Process, Queue import numpy as np import os import shutil import tempfile import unittest import time from mock import Mock from hypothesis import a...
true
true
f740653ddfcac2c4284824f0764681afd28fa43e
8,530
py
Python
numba_dppy/spirv_generator.py
akharche/numba-dppy
f12dac64b149bd72f305f341ff64b796bbb648c1
[ "Apache-2.0" ]
null
null
null
numba_dppy/spirv_generator.py
akharche/numba-dppy
f12dac64b149bd72f305f341ff64b796bbb648c1
[ "Apache-2.0" ]
null
null
null
numba_dppy/spirv_generator.py
akharche/numba-dppy
f12dac64b149bd72f305f341ff64b796bbb648c1
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
31.018182
77
0.582181
import os import shutil import tempfile from subprocess import CalledProcessError, check_call from numba_dppy import config from numba_dppy.target import LINK_ATOMIC, LLVM_SPIRV_ARGS def _raise_bad_env_path(msg, path, extra=None): error_message = msg.format(path) if extra is not None: ...
true
true
f7406573d0f8e639e82ec6f3bc90d07a3d09e38b
4,700
py
Python
XiaocaiCrawler/XiaocaiCrawler/settings.py
XiaocaiFintech/FundCrawler
3a12ca1e6b6194a5a94cdee0782a37db198ada33
[ "MIT" ]
null
null
null
XiaocaiCrawler/XiaocaiCrawler/settings.py
XiaocaiFintech/FundCrawler
3a12ca1e6b6194a5a94cdee0782a37db198ada33
[ "MIT" ]
null
null
null
XiaocaiCrawler/XiaocaiCrawler/settings.py
XiaocaiFintech/FundCrawler
3a12ca1e6b6194a5a94cdee0782a37db198ada33
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for XiaocaiCrawler project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en...
33.571429
109
0.774894
BOT_NAME = 'XiaocaiCrawler' SPIDER_MODULES = ['XiaocaiCrawler.spiders'] NEWSPIDER_MODULE = 'XiaocaiCrawler.spiders' ROBOTSTXT_OBEY = True Y = 3 COOKIES_ENABLED = False = { 'XiaocaiCrawler.contrib.downloadmiddleware.rotate_useragent.RotateUse...
true
true
f7406864141ab40b34366fdc02f27120e324b62c
8,857
py
Python
tests/benchmark/milvus_benchmark/runners/utils.py
AropJoe/milvus
132b3c2248c50e96a4edde56aefb43659a270837
[ "Apache-2.0" ]
2
2021-09-05T15:00:49.000Z
2022-01-05T06:42:23.000Z
tests/benchmark/milvus_benchmark/runners/utils.py
AropJoe/milvus
132b3c2248c50e96a4edde56aefb43659a270837
[ "Apache-2.0" ]
38
2021-11-22T11:15:27.000Z
2022-03-30T08:14:12.000Z
tests/benchmark/milvus_benchmark/runners/utils.py
Bennu-Li/milvus
35612881e33ce19a7407628769f6b51a7518bfe9
[ "Apache-2.0" ]
3
2021-11-17T09:21:42.000Z
2021-11-22T11:54:09.000Z
import os import logging import numpy as np import sklearn.preprocessing import h5py import random from itertools import product from pymilvus import DataType from milvus_benchmark import config logger = logging.getLogger("milvus_benchmark.runners.utils") DELETE_INTERVAL_TIME = 2 VECTORS_PER_FILE = 1000000 SIFT_VEC...
31.859712
109
0.657559
import os import logging import numpy as np import sklearn.preprocessing import h5py import random from itertools import product from pymilvus import DataType from milvus_benchmark import config logger = logging.getLogger("milvus_benchmark.runners.utils") DELETE_INTERVAL_TIME = 2 VECTORS_PER_FILE = 1000000 SIFT_VEC...
true
true
f740689002a21202a1640b8ad785796340a6cb62
619
py
Python
Requests/auth_finished.py
derek-hoogewerf/Libraries
ecca0aafee9699097b1b142e745b612e9498d9ab
[ "MIT" ]
null
null
null
Requests/auth_finished.py
derek-hoogewerf/Libraries
ecca0aafee9699097b1b142e745b612e9498d9ab
[ "MIT" ]
null
null
null
Requests/auth_finished.py
derek-hoogewerf/Libraries
ecca0aafee9699097b1b142e745b612e9498d9ab
[ "MIT" ]
null
null
null
# Python Essential Libraries by Joe Marini course example # Example file for the Requests library import requests from requests.auth import HTTPDigestAuth # define user and password values user = "theuser" passwd = "thepass" # TODO: use the basic authentication method url = "https://httpbin.org/basic-auth/theusr/thep...
29.47619
60
0.77706
import requests from requests.auth import HTTPDigestAuth user = "theuser" passwd = "thepass" url = "https://httpbin.org/basic-auth/theusr/thepas" resp = requests.get(url, auth=(user, passwd)) print(resp.status_code) print(resp.text) url = "https://httpbin.org/digest-auth/auth/theuser/thepass" resp = requests.ge...
true
true
f740698a01dac54de2a3710be2e5c1b391811088
188,336
py
Python
autotest/ogr/ogr_shape.py
praiskup/gdal
abddfb4c4debbb37da239029f4e6d120c533eca7
[ "MIT" ]
null
null
null
autotest/ogr/ogr_shape.py
praiskup/gdal
abddfb4c4debbb37da239029f4e6d120c533eca7
[ "MIT" ]
null
null
null
autotest/ogr/ogr_shape.py
praiskup/gdal
abddfb4c4debbb37da239029f4e6d120c533eca7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Shapefile driver testing. # Author: Frank Warmerdam <warmerdam@pobox.com> # ###############################################################...
33.721755
3,679
0.600607
0365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))' if ogrtest.check_feature_geometry(feat, wkt, ...
true
true
f74069a911c84783c06e271f6e312b9114368485
2,805
py
Python
automation/tinc/main/ext/qautils/gppylib/operations/__init__.py
lchx1010/pxf
f6e11f91fb8c01ed27fc829beb3800f3b253c209
[ "Apache-2.0" ]
46
2018-10-22T23:34:03.000Z
2022-03-31T09:31:34.000Z
automation/tinc/main/ext/qautils/gppylib/operations/__init__.py
lchx1010/pxf
f6e11f91fb8c01ed27fc829beb3800f3b253c209
[ "Apache-2.0" ]
317
2018-10-05T23:51:48.000Z
2022-03-22T17:38:52.000Z
automation/tinc/main/ext/qautils/gppylib/operations/__init__.py
lchx1010/pxf
f6e11f91fb8c01ed27fc829beb3800f3b253c209
[ "Apache-2.0" ]
46
2018-10-10T18:55:00.000Z
2022-03-28T07:27:04.000Z
# Make sure Python loads the modules of this package via absolute paths. from os.path import abspath as _abspath from qautils.gppylib import gplog __path__[0] = _abspath(__path__[0]) logger = gplog.get_default_logger() class Operation(object): """ An Operation (abstract class) is one atomic unit of work. ...
44.52381
106
0.632442
from os.path import abspath as _abspath from qautils.gppylib import gplog __path__[0] = _abspath(__path__[0]) logger = gplog.get_default_logger() class Operation(object): """ An Operation (abstract class) is one atomic unit of work. An implementation of Operation is fully defined by: __init__...
false
true
f7406ad4f0a3c43b6f488aebe7fcaed0be7de152
109
py
Python
app.py
gigq/flasktodo
0175ead27abd934ba88b20b0238cb27ea82ab816
[ "MIT" ]
12
2015-01-30T08:47:10.000Z
2021-09-30T11:41:05.000Z
app.py
spacecode-live/flasktodo
0175ead27abd934ba88b20b0238cb27ea82ab816
[ "MIT" ]
null
null
null
app.py
spacecode-live/flasktodo
0175ead27abd934ba88b20b0238cb27ea82ab816
[ "MIT" ]
10
2015-03-16T16:25:37.000Z
2020-10-18T17:43:18.000Z
#!/usr/bin/python from wsgiref.handlers import CGIHandler from application import app CGIHandler().run(app)
18.166667
39
0.798165
from wsgiref.handlers import CGIHandler from application import app CGIHandler().run(app)
true
true
f7406ad847deceec4516d2748311f6ff21431547
4,658
py
Python
GANs/WGANGP_Gulrajani_et_al_2017/driver.py
gonzrubio/ML_Papers
562f85c81b0afb8771708ff31063f722d838b9d2
[ "MIT" ]
6
2021-11-05T05:09:22.000Z
2022-03-10T03:32:30.000Z
GANs/WGANGP_Gulrajani_et_al_2017/driver.py
gonzrubio/ML_Papers
562f85c81b0afb8771708ff31063f722d838b9d2
[ "MIT" ]
null
null
null
GANs/WGANGP_Gulrajani_et_al_2017/driver.py
gonzrubio/ML_Papers
562f85c81b0afb8771708ff31063f722d838b9d2
[ "MIT" ]
1
2021-11-05T05:09:26.000Z
2021-11-05T05:09:26.000Z
"""Improved Training of Wasserstein GANs. Papers: https://arxiv.org/abs/1701.07875 https://arxiv.org/abs/1704.00028 Created on Tue Oct 26 15:17:08 2021 @author: gonzo """ import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import CosineAnnealingLR from torch.utils...
30.644737
80
0.603907
import torch import torch.nn as nn import torch.optim as optim from torch.optim.lr_scheduler import CosineAnnealingLR from torch.utils.data import DataLoader, ConcatDataset from torch.utils.tensorboard import SummaryWriter from torchvision import transforms, datasets from torchvision.utils import make_grid from m...
true
true
f7406af353380d664b2a7909073c44bc985e150e
570
py
Python
tests/classifiers/test_amino_acid_delins.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
1
2022-01-19T18:17:49.000Z
2022-01-19T18:17:49.000Z
tests/classifiers/test_amino_acid_delins.py
cancervariants/variation-normalization
9c8fbab1562591ae9445d82ddd15df29f1ea1f5a
[ "MIT" ]
99
2021-06-07T12:50:34.000Z
2022-03-23T13:38:29.000Z
tests/classifiers/test_amino_acid_delins.py
cancervariants/variant-normalization
e89a9f8366a659c82b2042aeb7effe339851bfb4
[ "MIT" ]
null
null
null
"""Module for testing Amino Acid DelIns Classifier.""" import unittest from variation.classifiers import AminoAcidDelInsClassifier from .classifier_base import ClassifierBase class TestAminoAcidDelInsClassifier(ClassifierBase, unittest.TestCase): """A class to test the Amino Acid DelIns Classifier.""" def cl...
33.529412
71
0.759649
import unittest from variation.classifiers import AminoAcidDelInsClassifier from .classifier_base import ClassifierBase class TestAminoAcidDelInsClassifier(ClassifierBase, unittest.TestCase): def classifier_instance(self): return AminoAcidDelInsClassifier() def fixture_name(self): return 'am...
true
true
f7406c7c540dd02f2ead5262459a7a1760f8ea9e
2,570
py
Python
modules/serviceDLLs.py
codegrande/CIS-ESP
e63476f470d6861a8a5c110812be0af9827ce7da
[ "Apache-2.0" ]
48
2015-03-29T21:56:21.000Z
2022-02-08T06:53:06.000Z
modules/serviceDLLs.py
matse144/CIS-ESP
0c08f8d423390fdea9091746879a0109aabd2a60
[ "Apache-2.0" ]
null
null
null
modules/serviceDLLs.py
matse144/CIS-ESP
0c08f8d423390fdea9091746879a0109aabd2a60
[ "Apache-2.0" ]
14
2015-05-18T12:09:36.000Z
2022-02-21T15:53:20.000Z
#Copyright 2014 Center for Internet Security - Computer Emergency Response Team (CIS-CERT) #This is part of the CIS Enumeration and Scanning Program (CIS-ESP) # #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 ...
45.892857
163
0.70856
import _winreg from modules import support def getServiceDLLs(computerName,objRegistry,hostPath): print computerName + " - checking service DLLs" outFile = open(hostPath + "\SERVICEDLLS-" + computerName + ".csv", "w") outFile.write("service,display_name,service_path,service_dll\n") key = ...
false
true
f7406d7decb2976099c01c0227278cc83acfacf1
1,657
py
Python
leetcode/valid_word_abbr.py
CarlosUrteaga/training_questions
292bd97fb8cccd21f4595565ee85de57d509c9d3
[ "MIT" ]
null
null
null
leetcode/valid_word_abbr.py
CarlosUrteaga/training_questions
292bd97fb8cccd21f4595565ee85de57d509c9d3
[ "MIT" ]
null
null
null
leetcode/valid_word_abbr.py
CarlosUrteaga/training_questions
292bd97fb8cccd21f4595565ee85de57d509c9d3
[ "MIT" ]
null
null
null
""" cant start a number with 0 we can have multiple characters without numbers iterate over each element on abbr always compare current i with the string if they are not equal we have a number, word[i] == abr[i] convert the string to number and find if the value i position exist is the same """ class Solution: de...
24.014493
79
0.442366
class Solution: def validWordAbbreviation(self, word: str, abbr: str) -> bool: idx = 0 carry = 0 alone = True for i in range(0, len(abbr)): if abbr[i].isdigit(): if abbr[i]=='0' and alone : return False else: ...
true
true
f7406debf0cebf0f29bb05a930668707e45c961e
61,109
py
Python
typings/bl_ui/properties_texture.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
2
2021-12-12T18:51:52.000Z
2022-02-23T09:49:16.000Z
src/blender/blender_autocomplete-master/2.92/bl_ui/properties_texture.py
JonasWard/ClayAdventures
a716445ac690e4792e70658319aa1d5299f9c9e9
[ "MIT" ]
2
2021-11-08T12:09:02.000Z
2021-12-12T23:01:12.000Z
typings/bl_ui/properties_texture.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
null
null
null
import sys import typing import bpy_types import rna_prop_ui class TEXTURE_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI): COMPAT_ENGINES = None ''' ''' bl_label = None ''' ''' bl_rna = None ''' ''' id_data = None ''' ''' def append(self, draw_func): ''' ...
12.219356
79
0.38068
import sys import typing import bpy_types import rna_prop_ui class TEXTURE_MT_context_menu(bpy_types.Menu, bpy_types._GenericUI): COMPAT_ENGINES = None bl_label = None bl_rna = None id_data = None def append(self, draw_func): pass def as_pointer(self): pass def bl_rna...
true
true
f7406dedbb6f316b4914754696e5aa5f3021e930
147
py
Python
python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/contextManagerSubclass.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class C(object): def __enter__(self): return self class D(C): def foo(self): pass with D() as cm: cm.foo() # pass
11.307692
24
0.52381
class C(object): def __enter__(self): return self class D(C): def foo(self): pass with D() as cm: cm.foo()
true
true
f74072a4b5989c7688aeaa3e82475874494d7e5d
8,710
py
Python
src/python/pants/init/logging.py
jsirois/pants
82199113869ddaa93ba1d115ff581c012ebcc93d
[ "Apache-2.0" ]
null
null
null
src/python/pants/init/logging.py
jsirois/pants
82199113869ddaa93ba1d115ff581c012ebcc93d
[ "Apache-2.0" ]
null
null
null
src/python/pants/init/logging.py
jsirois/pants
82199113869ddaa93ba1d115ff581c012ebcc93d
[ "Apache-2.0" ]
1
2021-08-01T05:43:34.000Z
2021-08-01T05:43:34.000Z
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import http.client import locale import logging import os import sys from contextlib import contextmanager from io import BufferedReader, TextIOWrapper from logging import Formatter, LogRe...
43.118812
121
0.722503
import http.client import locale import logging import os import sys from contextlib import contextmanager from io import BufferedReader, TextIOWrapper from logging import Formatter, LogRecord, StreamHandler from typing import Dict, Iterator import pants.util.logging as pants_logging from pants.base.deprecated impo...
true
true
f740730e1b7741e78a0dc8ce039764fe9cbbd668
2,433
py
Python
calh/cli.py
ricky-lim/calh
27185862b93cec92c9a5af4705aadea47b7a15d1
[ "Apache-2.0" ]
2
2020-05-05T20:12:26.000Z
2021-08-19T20:25:46.000Z
calh/cli.py
ricky-lim/calh
27185862b93cec92c9a5af4705aadea47b7a15d1
[ "Apache-2.0" ]
6
2020-04-11T04:59:28.000Z
2020-05-03T06:17:25.000Z
calh/cli.py
ricky-lim/calh
27185862b93cec92c9a5af4705aadea47b7a15d1
[ "Apache-2.0" ]
null
null
null
"""Console script for calh.""" import sys import click import click_spinner @click.group(invoke_without_command=True) @click.option("-v", "--version", is_flag=True, default=False) def cli(version): if version: import calh click.echo(f"Version: {calh.__version__}") @cli.command() @click.option(...
29.670732
84
0.658035
import sys import click import click_spinner @click.group(invoke_without_command=True) @click.option("-v", "--version", is_flag=True, default=False) def cli(version): if version: import calh click.echo(f"Version: {calh.__version__}") @cli.command() @click.option( "--input-file", required=T...
true
true
f74073c0d3ae07280f3b94844447ef655e24ba97
17,155
py
Python
ax/modelbridge/factory.py
KireinaHoro/Ax
e044c3a1b3cfc9228743cf7acbc5798c528a6494
[ "MIT" ]
1
2021-11-18T07:18:46.000Z
2021-11-18T07:18:46.000Z
ax/modelbridge/factory.py
michaeldeyzel/Ax
16cb868911eecba323759e2e129df8833361e614
[ "MIT" ]
null
null
null
ax/modelbridge/factory.py
michaeldeyzel/Ax
16cb868911eecba323759e2e129df8833361e614
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from logging import Logger from typing import Any, Dict, List, Optional, Type import torch from ax.core.data import Da...
35.371134
88
0.680268
from logging import Logger from typing import Any, Dict, List, Optional, Type import torch from ax.core.data import Data from ax.core.experiment import Experiment from ax.core.multi_type_experiment import MultiTypeExperiment from ax.core.objective import MultiObjective from ax.core.observation import Observation...
true
true
f740749ef03e9e8a600a6c215590eed198169133
7,902
py
Python
python/GafferUI/PythonEditor.py
ACFX/gaffer
4519dbfa2beb09d724eeb0b6d3d76dc4c1326cca
[ "BSD-3-Clause" ]
31
2017-07-10T10:02:07.000Z
2022-02-08T13:54:14.000Z
python/GafferUI/PythonEditor.py
ACFX/gaffer
4519dbfa2beb09d724eeb0b6d3d76dc4c1326cca
[ "BSD-3-Clause" ]
null
null
null
python/GafferUI/PythonEditor.py
ACFX/gaffer
4519dbfa2beb09d724eeb0b6d3d76dc4c1326cca
[ "BSD-3-Clause" ]
3
2017-11-04T15:30:11.000Z
2018-09-25T18:36:11.000Z
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
36.082192
141
0.692989
true
true
f74075cb1859064dee3e819231c7acbb3bc257f6
52,772
py
Python
FINE/storage.py
maximilian-hoffmann/FINE
62828f5feefefc2208dde0133435979d63398cc1
[ "MIT" ]
null
null
null
FINE/storage.py
maximilian-hoffmann/FINE
62828f5feefefc2208dde0133435979d63398cc1
[ "MIT" ]
null
null
null
FINE/storage.py
maximilian-hoffmann/FINE
62828f5feefefc2208dde0133435979d63398cc1
[ "MIT" ]
null
null
null
from FINE.component import Component, ComponentModel from FINE import utils import pyomo.environ as pyomo import warnings import pandas as pd class Storage(Component): """ A Storage component can store a commodity and thus transfers it between time steps. """ def __init__(self, esM, name, commodity, c...
63.580723
120
0.640207
from FINE.component import Component, ComponentModel from FINE import utils import pyomo.environ as pyomo import warnings import pandas as pd class Storage(Component): def __init__(self, esM, name, commodity, chargeRate=1, dischargeRate=1, chargeEfficiency=1, dischargeEfficiency=1, selfDischarge=...
true
true
f7407641c3ffb75d0425bbf6147b786de1cd376f
3,308
py
Python
src/transformers/data/processors/xnli.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
47
2021-04-16T22:29:25.000Z
2022-02-11T08:19:13.000Z
src/transformers/data/processors/xnli.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
15
2021-03-16T08:13:25.000Z
2022-02-01T12:22:33.000Z
src/transformers/data/processors/xnli.py
WERimagin/transformers
cc7d14511c647f8147494df72f8b0575015e37ab
[ "Apache-2.0" ]
7
2021-08-24T09:50:44.000Z
2022-02-23T13:55:28.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a cop...
36.755556
128
0.643894
import os from ...utils import logging from .utils import DataProcessor, InputExample logger = logging.get_logger(__name__) class XnliProcessor(DataProcessor): def __init__(self, language, train_language=None): self.language = language self.train_language = train_language ...
true
true
f74077fb34a6bb313375934f4b2c1afe00bd750b
225
py
Python
mpan/generation/mimesis.py
limejump/mpan
143c82331397cd685a195fbeab18dff84fc76264
[ "MIT" ]
2
2021-03-19T09:43:15.000Z
2022-02-10T10:19:25.000Z
mpan/generation/mimesis.py
limejump/mpan
143c82331397cd685a195fbeab18dff84fc76264
[ "MIT" ]
3
2021-02-25T13:56:22.000Z
2022-01-22T00:08:41.000Z
mpan/generation/mimesis.py
limejump/mpan
143c82331397cd685a195fbeab18dff84fc76264
[ "MIT" ]
null
null
null
from mimesis.providers.base import BaseProvider from .helpers import generate class MPANProvider(BaseProvider): class Meta: name = "mpan" @staticmethod def generate() -> str: return generate()
17.307692
47
0.68
from mimesis.providers.base import BaseProvider from .helpers import generate class MPANProvider(BaseProvider): class Meta: name = "mpan" @staticmethod def generate() -> str: return generate()
true
true
f7407874a9970f13bb662e91d6a6551da1e3997a
722
py
Python
geo_coding_platform_test/apps/geocoding/utils.py
saduqz/geo-coding-platform-test
011de3a0644fd9c266258b7310c3b25028597306
[ "MIT" ]
null
null
null
geo_coding_platform_test/apps/geocoding/utils.py
saduqz/geo-coding-platform-test
011de3a0644fd9c266258b7310c3b25028597306
[ "MIT" ]
null
null
null
geo_coding_platform_test/apps/geocoding/utils.py
saduqz/geo-coding-platform-test
011de3a0644fd9c266258b7310c3b25028597306
[ "MIT" ]
null
null
null
import json import urllib.request class GoogleGeocodeAPI: def __init__(self, api_key): self.API_KEY = api_key self.url = "https://maps.googleapis.com/maps/api/geocode/json" def get_geocode(self, latitude, longitude): url = f'{self.url}?latlng={latitude},{longitude}' return sel...
28.88
70
0.65374
import json import urllib.request class GoogleGeocodeAPI: def __init__(self, api_key): self.API_KEY = api_key self.url = "https://maps.googleapis.com/maps/api/geocode/json" def get_geocode(self, latitude, longitude): url = f'{self.url}?latlng={latitude},{longitude}' return sel...
true
true
f740792bd6eff6203188dff3fe1349f4f9ebb2d0
16,961
py
Python
tests/unit/multivariate/test_gaussian.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
null
null
null
tests/unit/multivariate/test_gaussian.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
null
null
null
tests/unit/multivariate/test_gaussian.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import Mock, patch import numpy as np import pandas as pd from copulas import get_qualified_name from copulas.multivariate.gaussian import GaussianMultivariate from copulas.univariate import GaussianUnivariate class TestGaussianMultivariate(TestCase): def setUp(...
36.164179
95
0.594364
from unittest import TestCase from unittest.mock import Mock, patch import numpy as np import pandas as pd from copulas import get_qualified_name from copulas.multivariate.gaussian import GaussianMultivariate from copulas.univariate import GaussianUnivariate class TestGaussianMultivariate(TestCase): def setUp(...
true
true
f7407a8837413032f4048a22bb42dd7c40c7fb01
3,873
py
Python
doridori.py
Cheol-H-Jeong/Doridori-Counter
c16da56dbbcccdc24033ddb9435d13506feb8b99
[ "MIT" ]
null
null
null
doridori.py
Cheol-H-Jeong/Doridori-Counter
c16da56dbbcccdc24033ddb9435d13506feb8b99
[ "MIT" ]
null
null
null
doridori.py
Cheol-H-Jeong/Doridori-Counter
c16da56dbbcccdc24033ddb9435d13506feb8b99
[ "MIT" ]
null
null
null
import cv2 import mediapipe as mp import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy.spatial import distance from scipy.signal import find_peaks from celluloid import Camera from tqdm import tqdm class Doridori: def __init__(self,filepath): self.cap = cv...
36.885714
101
0.559773
import cv2 import mediapipe as mp import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from scipy.spatial import distance from scipy.signal import find_peaks from celluloid import Camera from tqdm import tqdm class Doridori: def __init__(self,filepath): self.cap = cv...
true
true
f7407a9f8f1d7dd6a6bff35ff7db27bdb720b0ab
2,794
py
Python
commands/sleep.py
zbylyrcxr/DennisMUD
cb9be389e3be3e267fd78b1520ed2902941742da
[ "MIT" ]
2
2022-02-21T17:55:03.000Z
2022-02-22T06:25:04.000Z
commands/sleep.py
zbylyrcxr/DennisMUD
cb9be389e3be3e267fd78b1520ed2902941742da
[ "MIT" ]
3
2022-02-09T18:18:29.000Z
2022-03-07T08:15:54.000Z
commands/sleep.py
zbylyrcxr/DennisMUD
cb9be389e3be3e267fd78b1520ed2902941742da
[ "MIT" ]
1
2022-03-07T08:10:59.000Z
2022-03-07T08:10:59.000Z
##################### # Dennis MUD # # sit.py # # Copyright 2020 # # Michael D. Reiley # ##################### # ********** # 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 Softwa...
41.701493
108
0.692913
will sleep on that item. Otherwise you will just sleep. You cannot sit down on an item that is in your inventory; it must be in the room. The modification to your description is affected by your pronouns; see `set pronouns`. Ex. `sleep` Ex2. `sleep on carpet`""" def COMMAND(console, args): if not COMMON.ch...
true
true
f7407aa267e2d2df5c2f3777d7f2f91249b5dedc
853
py
Python
tests/__init__.py
b00f/g2p-seq2seq
96c3e36754b9a4571d6416446a24c5eef2171128
[ "Apache-2.0" ]
661
2016-04-27T05:47:54.000Z
2022-03-20T08:42:43.000Z
tests/__init__.py
b00f/g2p-seq2seq
96c3e36754b9a4571d6416446a24c5eef2171128
[ "Apache-2.0" ]
189
2016-04-28T20:10:18.000Z
2021-08-19T02:04:34.000Z
tests/__init__.py
b00f/g2p-seq2seq
96c3e36754b9a4571d6416446a24c5eef2171128
[ "Apache-2.0" ]
219
2016-04-30T23:58:45.000Z
2022-03-09T16:05:37.000Z
# Copyright 2016 AC Technologies LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
35.541667
80
0.702227
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tests import g2p_unittest
true
true
f7407acaf9ed7addaaf4169ae9bae54ef03583f2
1,383
py
Python
setup.py
ratschlab/spladder
8175c054a9b8fe7ae509f34fe5fb4d90a8cbe151
[ "BSD-3-Clause" ]
96
2015-03-27T01:06:09.000Z
2022-03-20T05:56:54.000Z
setup.py
ratschlab/spladder
8175c054a9b8fe7ae509f34fe5fb4d90a8cbe151
[ "BSD-3-Clause" ]
160
2015-01-20T20:45:48.000Z
2022-03-31T14:48:05.000Z
setup.py
ratschlab/spladder
8175c054a9b8fe7ae509f34fe5fb4d90a8cbe151
[ "BSD-3-Clause" ]
42
2015-03-27T20:49:15.000Z
2021-12-21T12:39:42.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """The setup script.""" from setuptools import setup, find_packages with open('README.md') as readme_file: readme = readme_file.read() setup_requirements = ['pytest-runner'] with open('requirements.txt') as f: requirements = list(f.readlines()) test_requiremen...
27.117647
110
0.65799
from setuptools import setup, find_packages with open('README.md') as readme_file: readme = readme_file.read() setup_requirements = ['pytest-runner'] with open('requirements.txt') as f: requirements = list(f.readlines()) test_requirements = ['pytest'] setup( author="Andre Kahles", author_email=...
true
true
f7407b7d9801b9ffd6250322dc7b75b1b23e563b
817
py
Python
apps/wx_logistics/urls.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
12
2020-02-01T01:52:01.000Z
2021-04-28T15:06:43.000Z
apps/wx_logistics/urls.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
5
2020-02-06T08:07:58.000Z
2020-06-02T13:03:45.000Z
apps/wx_logistics/urls.py
lianxiaopang/camel-store-api
b8021250bf3d8cf7adc566deebdba55225148316
[ "Apache-2.0" ]
11
2020-02-03T13:07:46.000Z
2020-11-29T01:44:06.000Z
from django.urls import path, include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.include_root_view = False # 打印员 router.register('printer', views.DeliveryPrinterViewSet) # 账号管理 router.register('account', views.DeliveryAccountViewSet) # 发件人地址管理 router.regist...
24.029412
63
0.72093
from django.urls import path, include from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.include_root_view = False router.register('printer', views.DeliveryPrinterViewSet) router.register('account', views.DeliveryAccountViewSet) router.register('address', views....
true
true
f7407c92309cae3a8a2059d2fa9acb2cd0ef95f3
121
py
Python
blog/admin.py
EHoggard/Price-Comparison-Group2-BE
03175b360fb20f682730cd7b7f3fc80e2696dc00
[ "MIT" ]
null
null
null
blog/admin.py
EHoggard/Price-Comparison-Group2-BE
03175b360fb20f682730cd7b7f3fc80e2696dc00
[ "MIT" ]
26
2019-05-21T13:24:59.000Z
2019-06-13T10:24:29.000Z
blog/admin.py
EHoggard/Price-Comparison-Group2-BE
03175b360fb20f682730cd7b7f3fc80e2696dc00
[ "MIT" ]
2
2019-05-21T12:55:23.000Z
2019-05-21T14:31:14.000Z
from django.contrib import admin from .models import Comment # Register your models here. admin.site.register(Comment)
17.285714
32
0.801653
from django.contrib import admin from .models import Comment admin.site.register(Comment)
true
true
f7407ca4a495924fb0524d25592e375c90c4ca39
7,621
py
Python
ACO/ACO.py
MobTgZhang/CIAlgorithms
3aa1b249f526d75fb8e9bf7f37516f18a025d50a
[ "MIT" ]
null
null
null
ACO/ACO.py
MobTgZhang/CIAlgorithms
3aa1b249f526d75fb8e9bf7f37516f18a025d50a
[ "MIT" ]
null
null
null
ACO/ACO.py
MobTgZhang/CIAlgorithms
3aa1b249f526d75fb8e9bf7f37516f18a025d50a
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import urllib.request import os import time def download(root_path,filename): if not os.path.exists(root_path): os.mkdir(root_path) if not os.path.exists(os.path.join(root_path,filename)): url = "http://elib.zib.de/pub/mp-testdata/tsp/tsplib/ts...
41.873626
108
0.556882
import numpy as np import matplotlib.pyplot as plt import urllib.request import os import time def download(root_path,filename): if not os.path.exists(root_path): os.mkdir(root_path) if not os.path.exists(os.path.join(root_path,filename)): url = "http://elib.zib.de/pub/mp-testdata/tsp/tsplib/ts...
true
true
f7407cce732581271d667580a3306ff8cf89c233
11,304
py
Python
src/torchphysics/utils/user_fun.py
uwe-iben/torchphysics
f0a56539cff331d49caaa90bc2fdd0d238b298f8
[ "Apache-2.0" ]
203
2021-11-10T10:33:29.000Z
2022-03-26T09:05:12.000Z
src/torchphysics/utils/user_fun.py
DKreuter/torchphysics
775d9aca71752a568f1fca972c958b99107f3b7c
[ "Apache-2.0" ]
3
2022-01-07T19:57:00.000Z
2022-03-10T08:04:49.000Z
src/torchphysics/utils/user_fun.py
DKreuter/torchphysics
775d9aca71752a568f1fca972c958b99107f3b7c
[ "Apache-2.0" ]
16
2021-09-30T08:35:37.000Z
2022-03-16T13:12:22.000Z
"""Contains a class which extracts the needed arguments of an arbitrary methode/function and wraps them for future usage. E.g correctly choosing the needed arguments and passing them on to the original function. """ import inspect import copy import torch from ..problem.spaces.points import Points class UserFunct...
36.115016
93
0.589791
import inspect import copy import torch from ..problem.spaces.points import Points class UserFunction: def __init__(self, fun, defaults={}, args={}): if isinstance(fun, (UserFunction, DomainUserFunction)): self.fun = fun.fun self.defaults = fun.defaults self.args = fu...
true
true
f7407d9960c1c58fdbeb6883ead3f6fad4d5bb00
581
py
Python
setup.py
Zenrac/monstercatFM.py
c1d21b6ce16f0c7b46731eebb5a80d16fbd111fe
[ "MIT" ]
null
null
null
setup.py
Zenrac/monstercatFM.py
c1d21b6ce16f0c7b46731eebb5a80d16fbd111fe
[ "MIT" ]
1
2019-02-14T22:17:22.000Z
2019-02-14T22:17:22.000Z
setup.py
Zenrac/monstercatFM
c1d21b6ce16f0c7b46731eebb5a80d16fbd111fe
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='monstercatFM', packages=['monstercatFM'], version='v1.1.3', description='Unofficial shitty API wrapper to get information about the monstercat live stream', author='Zenrac', author_email='zenrac@outlook.fr', url='https://github.com/Zenrac/m...
36.3125
101
0.695353
from setuptools import setup setup( name='monstercatFM', packages=['monstercatFM'], version='v1.1.3', description='Unofficial shitty API wrapper to get information about the monstercat live stream', author='Zenrac', author_email='zenrac@outlook.fr', url='https://github.com/Zenrac/m...
true
true
f7407ddb71bd44b58b7c76a0de4badca6a016750
5,031
py
Python
src/297.serialize-and-deserialize-binary-tree.py
wisesky/LeetCode-Practice
65549f72c565d9f11641c86d6cef9c7988805817
[ "MIT" ]
null
null
null
src/297.serialize-and-deserialize-binary-tree.py
wisesky/LeetCode-Practice
65549f72c565d9f11641c86d6cef9c7988805817
[ "MIT" ]
null
null
null
src/297.serialize-and-deserialize-binary-tree.py
wisesky/LeetCode-Practice
65549f72c565d9f11641c86d6cef9c7988805817
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=297 lang=python3 # # [297] Serialize and Deserialize Binary Tree # # https://leetcode.com/problems/serialize-and-deserialize-binary-tree/description/ # # algorithms # Hard (51.39%) # Likes: 4821 # Dislikes: 214 # Total Accepted: 480.7K # Total Submissions: 935.3K # Testcase Example: '[1,2...
26.203125
115
0.61777
class TreeNode(object): def __init__(self, x) -> None: self.val = x self.left = None self.right = None class Codec: def serialize(self, root): inOrder = self.inOrder(root) preOrder = self.preOrder...
true
true
f7407e387908383b4ac4b2a5c54c8bfbdfb1be5a
6,046
py
Python
ding/interaction/tests/base/test_network.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
464
2021-07-08T07:26:33.000Z
2022-03-31T12:35:16.000Z
ding/interaction/tests/base/test_network.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
177
2021-07-09T08:22:55.000Z
2022-03-31T07:35:22.000Z
ding/interaction/tests/base/test_network.py
sailxjx/DI-engine
c6763f8e2ba885a2a02f611195a1b5f8b50bff00
[ "Apache-2.0" ]
92
2021-07-08T12:16:37.000Z
2022-03-31T09:24:41.000Z
import json import time from contextlib import contextmanager from multiprocessing import Process import pytest import requests import responses from flask import Flask, request from requests import HTTPError from urlobject import URLObject from ..test_utils import silence from ...base import get_host_ip, success_res...
35.151163
114
0.576083
import json import time from contextlib import contextmanager from multiprocessing import Process import pytest import requests import responses from flask import Flask, request from requests import HTTPError from urlobject import URLObject from ..test_utils import silence from ...base import get_host_ip, success_res...
true
true
f7407e7c10ebdcbe4698f73720e95ff4d41abe49
256
py
Python
setup.py
Gokul-S-Kumar/child_health_casestudy
cd2e0bb03c2544b85c73e64d5b0ebe97ca688175
[ "BSD-3-Clause" ]
null
null
null
setup.py
Gokul-S-Kumar/child_health_casestudy
cd2e0bb03c2544b85c73e64d5b0ebe97ca688175
[ "BSD-3-Clause" ]
null
null
null
setup.py
Gokul-S-Kumar/child_health_casestudy
cd2e0bb03c2544b85c73e64d5b0ebe97ca688175
[ "BSD-3-Clause" ]
null
null
null
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Repo containing codefiles developed for the case-study.', author='Gokul S Kumar, IIDS, ISB', license='BSD-3', )
23.272727
74
0.679688
from setuptools import find_packages, setup setup( name='src', packages=find_packages(), version='0.1.0', description='Repo containing codefiles developed for the case-study.', author='Gokul S Kumar, IIDS, ISB', license='BSD-3', )
true
true
f7407ed62fa0d435d3371186dca1b2ec5f0e31db
1,158
py
Python
tutorial/examples/dashbio_components/speck.py
grofte/dash-docs
cbaa6b186652f2b869e16182152fb0f7109c2c6c
[ "MIT" ]
null
null
null
tutorial/examples/dashbio_components/speck.py
grofte/dash-docs
cbaa6b186652f2b869e16182152fb0f7109c2c6c
[ "MIT" ]
null
null
null
tutorial/examples/dashbio_components/speck.py
grofte/dash-docs
cbaa6b186652f2b869e16182152fb0f7109c2c6c
[ "MIT" ]
null
null
null
import six.moves.urllib.request as urlreq from six import PY3 import dash import dash_bio as dashbio import dash_html_components as html import dash_core_components as dcc from dash_bio_utils import xyz_reader external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_st...
23.16
76
0.674439
import six.moves.urllib.request as urlreq from six import PY3 import dash import dash_bio as dashbio import dash_html_components as html import dash_core_components as dcc from dash_bio_utils import xyz_reader external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_st...
true
true
f7407eed7f1c74c7130f9b9e9f63df2c44973047
2,133
py
Python
google/cloud/security/stubs.py
joshiumang107/forseti-security
c088e677426ec60daae0e44a5d1acbb337386ddb
[ "Apache-2.0" ]
null
null
null
google/cloud/security/stubs.py
joshiumang107/forseti-security
c088e677426ec60daae0e44a5d1acbb337386ddb
[ "Apache-2.0" ]
null
null
null
google/cloud/security/stubs.py
joshiumang107/forseti-security
c088e677426ec60daae0e44a5d1acbb337386ddb
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
37.421053
90
0.78106
from google.apputils import run_script_module def RunForsetiInventory(): import google.cloud.security.inventory.inventory_loader as forseti_inventory run_script_module.RunScriptModule(forseti_inventory) def RunForsetiScanner(): import google.cloud.security.scanner.scanner as forseti_scann...
true
true
f740804cec2b95d85179c45985c800700bbbe8d5
6,432
py
Python
safelifeEnv/lib/python3.6/site-packages/pyglet/libs/win32/winkey.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
2
2019-07-17T13:00:32.000Z
2019-07-17T13:09:30.000Z
safelifeEnv/lib/python3.6/site-packages/pyglet/libs/win32/winkey.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
null
null
null
safelifeEnv/lib/python3.6/site-packages/pyglet/libs/win32/winkey.py
JohnBurden/safelife
338c9c42aa94fed49f6d80151c37dd28ba6f7978
[ "Apache-2.0" ]
null
null
null
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2019 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
26.8
78
0.581312
from __future__ import absolute_import __docformat__ = 'restructuredtext' __version__ = '$Id: $' from pyglet.window import key from .constants import * keymap = { ord('A'): key.A, ord('B'): key.B, ord('C'): key.C, ord('D'): key.D, ord('E'): key.E, ord('F'): ...
true
true
f740820decc2d41424a66c34cf2a2b5b709c1a24
830
py
Python
db.py
TheWebRage/Blog-Flask
ee1242154360afe9b299361891f9991346f24ab7
[ "MIT" ]
null
null
null
db.py
TheWebRage/Blog-Flask
ee1242154360afe9b299361891f9991346f24ab7
[ "MIT" ]
null
null
null
db.py
TheWebRage/Blog-Flask
ee1242154360afe9b299361891f9991346f24ab7
[ "MIT" ]
null
null
null
import sqlite3 import click from flask import current_app, g from flask.cli import with_appcontext def get_db(): if 'db' not in g: g.db = sqlite3.connect( 'database.db', detect_types=sqlite3.PARSE_DECLTYPES ) g.db.row_factory = sqlite3.Row return g.db def cl...
18.863636
56
0.645783
import sqlite3 import click from flask import current_app, g from flask.cli import with_appcontext def get_db(): if 'db' not in g: g.db = sqlite3.connect( 'database.db', detect_types=sqlite3.PARSE_DECLTYPES ) g.db.row_factory = sqlite3.Row return g.db def cl...
true
true
f7408242a2894fa43ae0e3ec4be11c764544f7df
326
py
Python
setting.py
lyddonb/gae-Checkbook
259b7a8b6558c20341a7b7331266b5afd76c0ef2
[ "Apache-2.0" ]
4
2019-05-20T13:15:28.000Z
2019-05-23T04:49:46.000Z
setting.py
lyddonb/gae-Checkbook
259b7a8b6558c20341a7b7331266b5afd76c0ef2
[ "Apache-2.0" ]
null
null
null
setting.py
lyddonb/gae-Checkbook
259b7a8b6558c20341a7b7331266b5afd76c0ef2
[ "Apache-2.0" ]
null
null
null
import logging import os import sys # Add lib to path. libs_dir = os.path.join(os.path.dirname(__file__), 'lib') if libs_dir not in sys.path: logging.debug('Adding lib to path.') sys.path.insert(0, libs_dir) import webapp2 url_map = [ ('.*/mybook', 'mybook.MainPage'), ] app = webapp2.WSGIApplication(ur...
18.111111
57
0.696319
import logging import os import sys libs_dir = os.path.join(os.path.dirname(__file__), 'lib') if libs_dir not in sys.path: logging.debug('Adding lib to path.') sys.path.insert(0, libs_dir) import webapp2 url_map = [ ('.*/mybook', 'mybook.MainPage'), ] app = webapp2.WSGIApplication(url_map)
true
true
f7408384e37d48745e377b46d0aae98f242b6bd2
1,133
py
Python
topaz/objects/bindingobject.py
ruby-compiler-survey/topaz
bf4a56adbe03ae9ab4984729c733fcbc64a164c4
[ "BSD-3-Clause" ]
241
2015-01-02T18:49:09.000Z
2022-03-15T15:08:45.000Z
topaz/objects/bindingobject.py
ruby-compiler-survey/topaz
bf4a56adbe03ae9ab4984729c733fcbc64a164c4
[ "BSD-3-Clause" ]
16
2015-05-04T21:31:08.000Z
2020-06-04T22:49:36.000Z
topaz/objects/bindingobject.py
ruby-compiler-survey/topaz
bf4a56adbe03ae9ab4984729c733fcbc64a164c4
[ "BSD-3-Clause" ]
24
2015-02-15T05:35:11.000Z
2022-03-22T13:29:04.000Z
from topaz.astcompiler import SymbolTable from topaz.module import ClassDef from topaz.objects.objectobject import W_Object class W_BindingObject(W_Object): classdef = ClassDef("Binding", W_Object.classdef) _immutable_fields_ = ["names[*]", "cells[*]", "w_self", "lexical_scope"] def __init__(self, space,...
37.766667
92
0.676081
from topaz.astcompiler import SymbolTable from topaz.module import ClassDef from topaz.objects.objectobject import W_Object class W_BindingObject(W_Object): classdef = ClassDef("Binding", W_Object.classdef) _immutable_fields_ = ["names[*]", "cells[*]", "w_self", "lexical_scope"] def __init__(self, space,...
true
true
f7408435676386b4846162d71344e472df6a3faf
2,625
py
Python
test/cmd/unix/test_cmd_uptime.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
test/cmd/unix/test_cmd_uptime.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
test/cmd/unix/test_cmd_uptime.py
carr-elagheb/moler
b896ff668d9cc3704b6f806f7c2bf6e76c13427d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Testing of uptime command. """ __author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2018-2019, Nokia' __email__ = 'marcin.usielski@nokia.com' import pytest from moler.exceptions import CommandFailure from moler.exceptions import CommandTimeout def test_calling_uptime_returns_resu...
31.626506
102
0.743619
__author__ = 'Marcin Usielski' __copyright__ = 'Copyright (C) 2018-2019, Nokia' __email__ = 'marcin.usielski@nokia.com' import pytest from moler.exceptions import CommandFailure from moler.exceptions import CommandTimeout def test_calling_uptime_returns_result_parsed_from_command_output(buffer_connection, ...
true
true
f7408450d71ea02d8f22f8a56dd4c164c2b31432
5,104
py
Python
fn/monad.py
bofm/fn.py
9ad18489256c6af82980879b3072cf49bf0cc0fd
[ "Apache-2.0" ]
120
2016-03-18T14:14:04.000Z
2022-01-20T19:24:20.000Z
fn/monad.py
bofm/fn.py
9ad18489256c6af82980879b3072cf49bf0cc0fd
[ "Apache-2.0" ]
36
2016-03-18T15:12:41.000Z
2020-08-05T12:19:18.000Z
fn/monad.py
bofm/fn.py
9ad18489256c6af82980879b3072cf49bf0cc0fd
[ "Apache-2.0" ]
24
2016-03-18T15:09:37.000Z
2022-01-03T05:11:56.000Z
""" ``fn.monad.Option`` represents optional values, each instance of ``Option`` can be either instance of ``Full`` or ``Empty``. It provides you with simple way to write long computation sequences and get rid of many ``if/else`` blocks. See usage examples below. Assume that you have ``Request`` class that gives you pa...
26.174359
77
0.612265
from functools import partial, wraps from operator import eq, is_not class Option(object): def __new__(tp, value, checker=partial(is_not, None)): if isinstance(value, Option): return value return Full(value) if checker(value) else Empty() @staticmethod...
true
true
f740845c91894d8f0fba2197cb6b676f4fbf863d
80,991
py
Python
src/olympia/reviewers/tests/test_models.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
843
2016-02-09T13:00:37.000Z
2022-03-20T19:17:06.000Z
src/olympia/reviewers/tests/test_models.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
10,187
2016-02-05T23:51:05.000Z
2022-03-31T15:24:44.000Z
src/olympia/reviewers/tests/test_models.py
covariant/addons-server
41e6ee9e426facb19a1e1ca8d40277cb6f94a7da
[ "BSD-3-Clause" ]
551
2016-02-08T20:32:16.000Z
2022-03-15T16:49:24.000Z
import json import time from datetime import datetime, timedelta from unittest import mock from django.conf import settings from django.core import mail from olympia import amo from olympia.abuse.models import AbuseReport from olympia.access.models import Group, GroupUser from olympia.addons.models import AddonApprova...
39.546387
88
0.642899
import json import time from datetime import datetime, timedelta from unittest import mock from django.conf import settings from django.core import mail from olympia import amo from olympia.abuse.models import AbuseReport from olympia.access.models import Group, GroupUser from olympia.addons.models import AddonApprova...
true
true
f7408517f5f0c90d6e8d3f71ff7855266f5fb221
17,727
py
Python
pw_console/py/log_view_test.py
octml/pigweed
e273d46024ef7b5a7c7ec584e4aaada41c541fc4
[ "Apache-2.0" ]
86
2021-03-09T23:49:40.000Z
2022-03-30T08:14:51.000Z
pw_console/py/log_view_test.py
octml/pigweed
e273d46024ef7b5a7c7ec584e4aaada41c541fc4
[ "Apache-2.0" ]
4
2021-07-27T20:32:03.000Z
2022-03-08T10:39:07.000Z
pw_console/py/log_view_test.py
octml/pigweed
e273d46024ef7b5a7c7ec584e4aaada41c541fc4
[ "Apache-2.0" ]
22
2021-03-11T15:15:47.000Z
2022-02-09T06:16:36.000Z
# Copyright 2021 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
38.204741
100
0.582388
import logging import time import sys import unittest from datetime import datetime from unittest.mock import MagicMock, patch from parameterized import parameterized from prompt_toolkit.data_structures import Point from prompt_toolkit.formatted_text import FormattedText from pw_console.console_prefs im...
true
true
f74086de121480ea400a10964d4e8f2984ff98d1
1,921
py
Python
prepro.py
DevRx28/pokemon-type
2f62d4b88856dcd9aff79bdda993a4ddc093d7b7
[ "Apache-2.0" ]
null
null
null
prepro.py
DevRx28/pokemon-type
2f62d4b88856dcd9aff79bdda993a4ddc093d7b7
[ "Apache-2.0" ]
null
null
null
prepro.py
DevRx28/pokemon-type
2f62d4b88856dcd9aff79bdda993a4ddc093d7b7
[ "Apache-2.0" ]
null
null
null
import numpy as np from scipy.optimize import fmin_l_bfgs_b import time import argparse import cv2 from tensorflow.keras.models import load_model import numpy as np import csv import sys from matplotlib import pyplot as plt from PIL import Image from keras.preprocessing.image import img_to_array img = cv2.imread('po...
25.276316
103
0.700677
import numpy as np from scipy.optimize import fmin_l_bfgs_b import time import argparse import cv2 from tensorflow.keras.models import load_model import numpy as np import csv import sys from matplotlib import pyplot as plt from PIL import Image from keras.preprocessing.image import img_to_array img = cv2.imread('po...
true
true
f740873de4a3531e99da51998cbcb2e41bde6227
2,748
py
Python
vvhgvs/dataproviders/seqfetcher.py
openvar/vv_hgvs
b3a18e0f1d7ec012d280bd6332ba2e6c2fa9e2b3
[ "Apache-2.0" ]
2
2020-11-13T02:40:26.000Z
2021-01-15T03:09:52.000Z
vvhgvs/dataproviders/seqfetcher.py
openvar/vv_hgvs
b3a18e0f1d7ec012d280bd6332ba2e6c2fa9e2b3
[ "Apache-2.0" ]
1
2022-03-08T05:31:10.000Z
2022-03-08T05:31:10.000Z
vvhgvs/dataproviders/seqfetcher.py
openvar/vv_hgvs
b3a18e0f1d7ec012d280bd6332ba2e6c2fa9e2b3
[ "Apache-2.0" ]
3
2020-06-24T09:18:06.000Z
2021-02-02T12:47:57.000Z
# -*- coding: utf-8 -*- """provides sequencing fetching from NCBI and Ensembl """ from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import re import bioutils.seqfetcher from ..exceptions import HGVSDataNotAvailableError _logger = logging.getLogger(__name__...
34.78481
100
0.684498
from __future__ import absolute_import, division, print_function, unicode_literals import logging import os import re import bioutils.seqfetcher from ..exceptions import HGVSDataNotAvailableError _logger = logging.getLogger(__name__) class SeqFetcher(object): def __init__(self): s...
true
true
f7408776c8e5e20ab86f318d0a00921a6a63f843
1,867
py
Python
setup.py
caternuson/Adafruit_CircuitPython_PN532
51ee2ddff9f94d2f97be05d21b97402f875103b8
[ "MIT" ]
null
null
null
setup.py
caternuson/Adafruit_CircuitPython_PN532
51ee2ddff9f94d2f97be05d21b97402f875103b8
[ "MIT" ]
null
null
null
setup.py
caternuson/Adafruit_CircuitPython_PN532
51ee2ddff9f94d2f97be05d21b97402f875103b8
[ "MIT" ]
null
null
null
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.absp...
30.606557
89
0.700054
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='adafruit-circuitpython-pn532', use_scm_version=True, setup...
true
true
f74087e8975578890643d004c26f27909458894b
2,965
py
Python
swarmform/core/swarmwork.py
AyeshW/SwarmForm
1b23c18b0dedb1be588b5f77ef3515f32a3953e1
[ "MIT" ]
2
2020-10-14T05:16:53.000Z
2020-10-20T10:36:35.000Z
swarmform/core/swarmwork.py
AyeshW/SwarmForm
1b23c18b0dedb1be588b5f77ef3515f32a3953e1
[ "MIT" ]
11
2020-04-19T05:06:38.000Z
2021-01-13T05:55:49.000Z
swarmform/core/swarmwork.py
AyeshW/SwarmForm
1b23c18b0dedb1be588b5f77ef3515f32a3953e1
[ "MIT" ]
5
2020-04-19T04:38:11.000Z
2020-06-01T09:10:40.000Z
from fireworks import Workflow, Firework class SwarmFlow(Workflow): def __init__(self, fireworks, links_dict=None, name=None, metadata=None, created_on=None, updated_on=None, fw_states=None, sf_id=None): """ Args: fireworks ([Firework]): all FireWorks in this SwarmFlo...
33.693182
110
0.586847
from fireworks import Workflow, Firework class SwarmFlow(Workflow): def __init__(self, fireworks, links_dict=None, name=None, metadata=None, created_on=None, updated_on=None, fw_states=None, sf_id=None): super().__init__(fireworks, links_dict, name, metadata, created_on, updated_on, fw_...
true
true
f7408808fc111ee42c942c22eb3cab024ba538a3
33,873
py
Python
lasso/dyna/FemzipMapper.py
vishalbelsare/lasso-python
319bf590599b4a4d50d9345e83e8030afe044aec
[ "BSD-3-Clause" ]
43
2019-06-20T20:23:15.000Z
2022-03-08T11:28:12.000Z
lasso/dyna/FemzipMapper.py
vishalbelsare/lasso-python
319bf590599b4a4d50d9345e83e8030afe044aec
[ "BSD-3-Clause" ]
19
2019-10-04T17:13:34.000Z
2022-02-16T16:49:59.000Z
lasso/dyna/FemzipMapper.py
vishalbelsare/lasso-python
319bf590599b4a4d50d9345e83e8030afe044aec
[ "BSD-3-Clause" ]
17
2020-02-09T08:19:03.000Z
2021-12-03T07:06:31.000Z
import logging import re import traceback from typing import Dict, List, Set, Tuple, Union import numpy as np from lasso.dyna.ArrayType import ArrayType from lasso.femzip.femzip_api import FemzipAPI, FemzipFileMetadata, VariableInfo from lasso.femzip.fz_config import (FemzipArrayType, FemzipVariableCategory,...
38.361268
111
0.64919
import logging import re import traceback from typing import Dict, List, Set, Tuple, Union import numpy as np from lasso.dyna.ArrayType import ArrayType from lasso.femzip.femzip_api import FemzipAPI, FemzipFileMetadata, VariableInfo from lasso.femzip.fz_config import (FemzipArrayType, FemzipVariableCategory,...
true
true
f74089310aed432bec1f1e532a6f991186a49aa9
296
py
Python
src/mop2/utils/files.py
robertfischer3/python-mop2
2f8f4da52092489bf2610818458f95f5c7fd9c6e
[ "MIT" ]
null
null
null
src/mop2/utils/files.py
robertfischer3/python-mop2
2f8f4da52092489bf2610818458f95f5c7fd9c6e
[ "MIT" ]
null
null
null
src/mop2/utils/files.py
robertfischer3/python-mop2
2f8f4da52092489bf2610818458f95f5c7fd9c6e
[ "MIT" ]
null
null
null
import os from contextlib import contextmanager @contextmanager def change_dir(destination): # Allows for temporary change of working directory when used with a with statement try: cwd = os.getcwd() os.chdir(destination) yield finally: os.chdir(cwd)
21.142857
86
0.682432
import os from contextlib import contextmanager @contextmanager def change_dir(destination): try: cwd = os.getcwd() os.chdir(destination) yield finally: os.chdir(cwd)
true
true
f74089ed0415b6fbf9bbd5f2d3dbfd98ea07d4ee
7,445
py
Python
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
190,993
2015-11-09T13:17:30.000Z
2022-03-31T23:05:27.000Z
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
48,461
2015-11-09T14:21:11.000Z
2022-03-31T23:17:33.000Z
tensorflow/python/distribute/cluster_resolver/kubernetes_cluster_resolver.py
EricRemmerswaal/tensorflow
141ff27877579c81a213fa113bd1b474c1749aca
[ "Apache-2.0" ]
104,981
2015-11-09T13:40:17.000Z
2022-03-31T19:51:54.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
40.906593
92
0.70141
from tensorflow.python.distribute.cluster_resolver.cluster_resolver import ClusterResolver from tensorflow.python.distribute.cluster_resolver.cluster_resolver import format_master_url from tensorflow.python.training import server_lib from tensorflow.python.util.tf_export import tf_export @tf_export('di...
true
true
f7408a8f58b4bb638001f83f7a9b2cc8f4e287e2
5,397
py
Python
open_test.py
rewin123/NNPreprocessingTomography
b630f4c2cb9705c3c8432480498e4307ed511edf
[ "MIT" ]
1
2021-12-21T03:30:06.000Z
2021-12-21T03:30:06.000Z
open_test.py
rewin123/NNPreprocessingTomography
b630f4c2cb9705c3c8432480498e4307ed511edf
[ "MIT" ]
null
null
null
open_test.py
rewin123/NNPreprocessingTomography
b630f4c2cb9705c3c8432480498e4307ed511edf
[ "MIT" ]
null
null
null
import torch from torch import nn from torch.nn import Sequential #model definition class Unet1D(nn.Module): def __init__(self): super(Unet1D, self).__init__() ch = 32 self.maxpool = nn.MaxPool2d((1,2)) self.unpool = nn.Upsample(scale_factor=(1,2)) self.startLayer =...
35.98
110
0.67556
import torch from torch import nn from torch.nn import Sequential class Unet1D(nn.Module): def __init__(self): super(Unet1D, self).__init__() ch = 32 self.maxpool = nn.MaxPool2d((1,2)) self.unpool = nn.Upsample(scale_factor=(1,2)) self.startLayer = nn.Conv2d(1, ch...
true
true
f7408aa00e4b70006014d70b64f325b8d62f3321
3,952
py
Python
djoser/utils.py
unacast/djoser
8b5d547f799bc1140fe587f78213ce9807796ee1
[ "MIT" ]
null
null
null
djoser/utils.py
unacast/djoser
8b5d547f799bc1140fe587f78213ce9807796ee1
[ "MIT" ]
null
null
null
djoser/utils.py
unacast/djoser
8b5d547f799bc1140fe587f78213ce9807796ee1
[ "MIT" ]
1
2015-11-24T11:37:50.000Z
2015-11-24T11:37:50.000Z
from django.conf import settings as django_settings from django.core.mail import EmailMultiAlternatives, EmailMessage from django.template import loader from rest_framework import response, status try: from django.contrib.sites.shortcuts import get_current_site except ImportError: from django.contrib.sites.mod...
35.927273
98
0.700152
from django.conf import settings as django_settings from django.core.mail import EmailMultiAlternatives, EmailMessage from django.template import loader from rest_framework import response, status try: from django.contrib.sites.shortcuts import get_current_site except ImportError: from django.contrib.sites.mod...
true
true
f7408b38dd09eb369e4748ec54dca9b6422b1793
9,328
py
Python
src/python/GazePal_PC.py
rran9235/GazePal-Application
88d6a74daeddd18ab37c0f2953a118f1f59e06a5
[ "MIT" ]
null
null
null
src/python/GazePal_PC.py
rran9235/GazePal-Application
88d6a74daeddd18ab37c0f2953a118f1f59e06a5
[ "MIT" ]
null
null
null
src/python/GazePal_PC.py
rran9235/GazePal-Application
88d6a74daeddd18ab37c0f2953a118f1f59e06a5
[ "MIT" ]
null
null
null
""" GazePal Application Author: Rishi Rangarajan Year: 2021 File: GazePal_PC.py Info: GazePal_PC class definition """ # Imports import csv import os import pyautogui import time import torch import torchvision import cv2 as cv import numpy as np import torchvision.transforms as transforms from collections import Cou...
32.388889
108
0.545883
import csv import os import pyautogui import time import torch import torchvision import cv2 as cv import numpy as np import torchvision.transforms as transforms from collections import Counter from threading import Thread from Class_CNN import CNN class GazePal_PC: def __init__(self): ...
true
true
f7408c53a424884c9788fa23c9e5d5ebeca169b7
189
py
Python
read/read/str/readers/sqlite3.py
vitalfadeev/read
f8893daa732d50bb6f1da94e66d016d5611f1983
[ "MIT" ]
null
null
null
read/read/str/readers/sqlite3.py
vitalfadeev/read
f8893daa732d50bb6f1da94e66d016d5611f1983
[ "MIT" ]
null
null
null
read/read/str/readers/sqlite3.py
vitalfadeev/read
f8893daa732d50bb6f1da94e66d016d5611f1983
[ "MIT" ]
null
null
null
import io import sqlite3 def Reader( f, url, stream=False, tag=None ): db = sqlite3.connect( url ) c = db.cursor() rows = c.execute("select * from wikipedia") return rows
18.9
47
0.640212
import io import sqlite3 def Reader( f, url, stream=False, tag=None ): db = sqlite3.connect( url ) c = db.cursor() rows = c.execute("select * from wikipedia") return rows
true
true
f7408d91513ed5fa925381e05fef7e56e5857ff0
5,937
py
Python
pysigview/widgets/transforms/filters.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
1
2021-03-26T12:48:49.000Z
2021-03-26T12:48:49.000Z
pysigview/widgets/transforms/filters.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
39
2018-09-06T21:32:54.000Z
2020-10-12T09:04:52.000Z
pysigview/widgets/transforms/filters.py
ICRC-BME/PySigView
8ac60960dea0e5c70757c76545a896c76a95f68d
[ "Apache-2.0" ]
2
2019-12-24T02:57:47.000Z
2022-02-28T22:22:09.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Jun 29 09:23:17 2017 Annotations plugin for pysigview Ing.,Mgr. (MSc.) Jan Cimbálník Biomedical engineering International Clinical Research Center St. Anne's University Hospital in Brno Czech Republic & Mayo systems electrophysiology lab Mayo Clinic 20...
28.406699
77
0.623547
from PyQt5.QtCore import pyqtSignal, Qt from PyQt5.QtWidgets import (QVBoxLayout, QWidget, QLineEdit, QComboBox, QLabel, QMessageBox, QPushButton) from scipy.signal import butter, filtfilt from pysigview.core.plot_transform import BasePlotTransform cl...
true
true
f7408e51c1f36d4b11644bab222cd99ac6f0fc29
713
py
Python
t/test_kill.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
14
2015-03-04T12:40:25.000Z
2021-07-07T04:06:09.000Z
t/test_kill.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
43
2015-01-27T13:52:39.000Z
2020-10-17T19:51:20.000Z
t/test_kill.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
2
2015-11-23T08:59:07.000Z
2019-04-17T13:04:49.000Z
import prodtest import produce import time class KillTest(prodtest.ProduceTestCase): """ Tests that a single recipe failing causes immediate abort and cleanup. """ def test(self): self.assertDirectoryContents(['produce.ini']) with self.assertRaises(produce.ProduceError): s...
28.52
74
0.603086
import prodtest import produce import time class KillTest(prodtest.ProduceTestCase): def test(self): self.assertDirectoryContents(['produce.ini']) with self.assertRaises(produce.ProduceError): self.produce(**{'-j': '3'}) now = time.time() self.assertDirectoryContents([...
true
true
f7408e69f7dec714131ba17aed5eaeab24d02d9e
75,117
py
Python
pandas/core/arrays/datetimes.py
monferrand/pandas
a3477c769b3d2ea4950ae69f8867e3b291b743c1
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2020-06-04T21:46:19.000Z
2020-06-04T21:46:19.000Z
pandas/core/arrays/datetimes.py
monferrand/pandas
a3477c769b3d2ea4950ae69f8867e3b291b743c1
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/core/arrays/datetimes.py
monferrand/pandas
a3477c769b3d2ea4950ae69f8867e3b291b743c1
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
from datetime import datetime, time, timedelta from typing import Union import warnings import numpy as np from pytz import utc from pandas._libs import lib, tslib from pandas._libs.tslibs import ( NaT, Timestamp, ccalendar, conversion, fields, iNaT, normalize_date, resolution as libre...
32.073868
88
0.557743
from datetime import datetime, time, timedelta from typing import Union import warnings import numpy as np from pytz import utc from pandas._libs import lib, tslib from pandas._libs.tslibs import ( NaT, Timestamp, ccalendar, conversion, fields, iNaT, normalize_date, resolution as libre...
true
true
f7408e6bc242ee0612f2cb9cab7eeb0d1bdfe38f
2,055
py
Python
old/dedupe/data.py
rec/dedupe
315bc8f6859e284f95ea3b6cb06564508ca8006d
[ "MIT" ]
2
2019-05-26T15:09:38.000Z
2019-06-15T10:18:44.000Z
old/dedupe/data.py
rec/dedupe
315bc8f6859e284f95ea3b6cb06564508ca8006d
[ "MIT" ]
null
null
null
old/dedupe/data.py
rec/dedupe
315bc8f6859e284f95ea3b6cb06564508ca8006d
[ "MIT" ]
null
null
null
import attr import contextlib import json import os import shutil import sys @attr.dataclass class Data: load_kwds: dict = attr.Factory(dict) dump_kwds: dict = attr.Factory(dict) binary: bool = False backup: bool = True write: bool = False loader: object = json output_file: object = sys.st...
27.4
67
0.57129
import attr import contextlib import json import os import shutil import sys @attr.dataclass class Data: load_kwds: dict = attr.Factory(dict) dump_kwds: dict = attr.Factory(dict) binary: bool = False backup: bool = True write: bool = False loader: object = json output_file: object = sys.st...
true
true
f7408ec2802d4fc566c8f3a932c89d6a89bd2001
932
py
Python
var/spack/repos/builtin/packages/py-bandit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/py-bandit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/py-bandit/package.py
LiamBindle/spack
e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyBandit(PythonPackage): """Security oriented static analyser for python code.""" hom...
38.833333
95
0.67382
from spack import * class PyBandit(PythonPackage): homepage = "https://bandit.readthedocs.io/en/latest/" pypi = "bandit/bandit-1.7.0.tar.gz" version('1.7.0', sha256='8a4c7415254d75df8ff3c3b15cfe9042ecee628a1e40b44c15a98890fbfc2608') depends_on('python@3.5:', type=('build', 'run')) depe...
true
true
f7408fc16ebf0021079ff787183426f9e4409034
842
py
Python
spacy/tests/lang/lt/test_lemmatizer.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
null
null
null
spacy/tests/lang/lt/test_lemmatizer.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
1
2021-08-16T13:39:17.000Z
2021-08-16T13:39:40.000Z
spacy/tests/lang/lt/test_lemmatizer.py
jaydeepborkar/spaCy
16aa092fb5cffb5ec7079951ea0c04cb96733b3e
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import unicode_literals import pytest # fmt: off TEST_CASES = [ (["Galime", "vadinti", "gerovės", "valstybe", ",", "turime", "išvystytą", "socialinę", "apsaugą", ",", "sveikatos", "apsaugą", "ir", "prieinamą", "švietimą", "."], ["galėti", "vadintas", "gerovė", "valstybė"...
40.095238
106
0.612827
from __future__ import unicode_literals import pytest TEST_CASES = [ (["Galime", "vadinti", "gerovės", "valstybe", ",", "turime", "išvystytą", "socialinę", "apsaugą", ",", "sveikatos", "apsaugą", "ir", "prieinamą", "švietimą", "."], ["galėti", "vadintas", "gerovė", "valstybė", ",", "turėti", "išvysty...
true
true
f7409031ea60f66e97fd738d8d477b7d1ceba72f
453
py
Python
flexget/_version.py
qk4l/Flexget
d12350d0ad31f3add0374280b5d22ba86fdf7b4d
[ "MIT" ]
null
null
null
flexget/_version.py
qk4l/Flexget
d12350d0ad31f3add0374280b5d22ba86fdf7b4d
[ "MIT" ]
null
null
null
flexget/_version.py
qk4l/Flexget
d12350d0ad31f3add0374280b5d22ba86fdf7b4d
[ "MIT" ]
null
null
null
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
41.181818
114
0.785872
__version__ = '2.10.94.dev'
true
true
f7409052e991f74d3f09e333b94e7c31a46d3a3a
6,081
py
Python
Bio/Alphabet/Reduced.py
xzy3/biopython
4bd06c16bbcef7a0f5bc43ba9bb936b9557996e9
[ "BSD-3-Clause" ]
2
2020-06-25T12:52:03.000Z
2020-07-11T09:47:34.000Z
Bio/Alphabet/Reduced.py
EmmanuelOwusu/biopython
4e9a15172ba26bae104eaa7f05819cd6d41d0da8
[ "BSD-3-Clause" ]
null
null
null
Bio/Alphabet/Reduced.py
EmmanuelOwusu/biopython
4e9a15172ba26bae104eaa7f05819cd6d41d0da8
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2004 by Iddo Friedberg. # All rights reserved. # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Reduced alphabets wh...
21.336842
79
0.527874
from Bio import Alphabet murphy_15_tab = { "L": "L", "V": "L", "I": "L", "M": "L", "C": "C", "A": "A", "G": "G", "S": "S", "T": "T", "P": "P", "F": "F", "Y": "F", "W": "W", "E": "E", "D": "D", "N": "N", "Q": "Q", "K": "K", "R": "K", ...
true
true
f74090bcbcebe95489aa5c181192d16399ae0d39
3,648
py
Python
fairseq/optim/lr_scheduler/inverse_square_root_decay_schedule.py
steventan0110/multiDDS
9ca17bd6a8f546f4ed26716397c2d0dd2df3358f
[ "MIT" ]
20
2020-09-06T20:45:27.000Z
2022-03-10T05:50:08.000Z
fairseq/optim/lr_scheduler/inverse_square_root_decay_schedule.py
steventan0110/NMT_RL_Filter
b77d0ad7b8f38d5b3b1b0e63e2671e0de0e3da00
[ "MIT" ]
5
2020-09-19T02:49:44.000Z
2021-11-29T06:22:51.000Z
fairseq/optim/lr_scheduler/inverse_square_root_decay_schedule.py
steventan0110/NMT_RL_Filter
b77d0ad7b8f38d5b3b1b0e63e2671e0de0e3da00
[ "MIT" ]
6
2020-09-08T00:54:50.000Z
2021-04-03T04:01:41.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from . import FairseqLRScheduler, register_lr_scheduler import torch @register_lr_scheduler('inverse_sqrt_decay') class InverseSquareRootDeca...
42.917647
97
0.647478
from . import FairseqLRScheduler, register_lr_scheduler import torch @register_lr_scheduler('inverse_sqrt_decay') class InverseSquareRootDecaySchedule(FairseqLRScheduler): def __init__(self, args, optimizer): super().__init__(args, optimizer) if len(args.lr) > 1: raise ValueError(...
true
true
f740912029b085237e692618d7137b5cbd2fb6a9
8,803
py
Python
typhon/objects/networking/endpoints.py
monte-language/typhon
ee7cd9712407370116fea076819e5a9891010219
[ "Apache-2.0" ]
63
2015-02-19T20:47:16.000Z
2021-12-27T23:29:54.000Z
typhon/objects/networking/endpoints.py
monte-language/typhon
ee7cd9712407370116fea076819e5a9891010219
[ "Apache-2.0" ]
197
2015-02-23T23:05:24.000Z
2021-04-05T16:15:04.000Z
typhon/objects/networking/endpoints.py
monte-language/typhon
ee7cd9712407370116fea076819e5a9891010219
[ "Apache-2.0" ]
9
2015-02-15T09:27:09.000Z
2018-02-14T17:27:40.000Z
# Copyright (C) 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
28.767974
78
0.628309
from rpython.rlib.debug import debug_print from rpython.rlib.objectmodel import we_are_translated from rpython.rlib.rarithmetic import intmask from typhon import ruv from typhon.atoms import getAtom from typhon.autohelp import autohelp, method from typhon.errors import userError from typhon.futures impor...
true
true
f7409120990c2d302f9ac19e16d639e51bab81ae
2,033
py
Python
telegrambots/examples/telegram_1.py
carlfarterson/telegrambots
adce297620403b2369d0e6b3ac8897537d809d5e
[ "MIT" ]
null
null
null
telegrambots/examples/telegram_1.py
carlfarterson/telegrambots
adce297620403b2369d0e6b3ac8897537d809d5e
[ "MIT" ]
null
null
null
telegrambots/examples/telegram_1.py
carlfarterson/telegrambots
adce297620403b2369d0e6b3ac8897537d809d5e
[ "MIT" ]
null
null
null
from api import token from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import Updater, CommandHandler, CallbackQueryHandler import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLog...
27.472973
106
0.688146
from api import token from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import Updater, CommandHandler, CallbackQueryHandler import logging logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.getLog...
true
true
f7409178df94be7adb2e2e58834805025a2e8984
4,039
py
Python
corehq/apps/cloudcare/touchforms_api.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
471
2015-01-10T02:55:01.000Z
2022-03-29T18:07:18.000Z
corehq/apps/cloudcare/touchforms_api.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
14,354
2015-01-01T07:38:23.000Z
2022-03-31T20:55:14.000Z
corehq/apps/cloudcare/touchforms_api.py
akashkj/commcare-hq
b00a62336ec26cea1477dfb8c048c548cc462831
[ "BSD-3-Clause" ]
175
2015-01-06T07:16:47.000Z
2022-03-29T13:27:01.000Z
from corehq.apps.app_manager.suite_xml.sections.entries import EntriesHelper from corehq.apps.cloudcare import CLOUDCARE_DEVICE_ID from corehq.apps.users.models import CouchUser from corehq.form_processor.interfaces.dbaccessors import CaseAccessors DELEGATION_STUB_CASE_TYPE = "cc_delegation_stub" class BaseSessionDa...
35.743363
103
0.664769
from corehq.apps.app_manager.suite_xml.sections.entries import EntriesHelper from corehq.apps.cloudcare import CLOUDCARE_DEVICE_ID from corehq.apps.users.models import CouchUser from corehq.form_processor.interfaces.dbaccessors import CaseAccessors DELEGATION_STUB_CASE_TYPE = "cc_delegation_stub" class BaseSessionDa...
true
true
f74091b926be364ce1af026b849b0662ae49afdc
1,121
py
Python
backend/middleware.py
MrGrote/forms-backend
1b4b4fe6819352f1f072ce307eee892866a11dcf
[ "MIT" ]
13
2020-10-10T14:22:51.000Z
2022-02-25T23:35:05.000Z
backend/middleware.py
MrGrote/forms-backend
1b4b4fe6819352f1f072ce307eee892866a11dcf
[ "MIT" ]
89
2020-11-22T08:31:54.000Z
2022-03-14T11:18:17.000Z
backend/middleware.py
LaudateCorpus1/forms-backend
f949747aadca05f746530f261fefabeac3e98230
[ "MIT" ]
8
2020-12-14T14:50:21.000Z
2022-01-10T13:50:53.000Z
import typing as t import ssl from motor.motor_asyncio import AsyncIOMotorClient from starlette.middleware.base import BaseHTTPMiddleware from starlette.requests import Request from starlette.responses import JSONResponse, Response from backend.constants import DATABASE_URL, DOCS_PASSWORD, MONGO_DATABASE class Data...
35.03125
82
0.723461
import typing as t import ssl from motor.motor_asyncio import AsyncIOMotorClient from starlette.middleware.base import BaseHTTPMiddleware from starlette.requests import Request from starlette.responses import JSONResponse, Response from backend.constants import DATABASE_URL, DOCS_PASSWORD, MONGO_DATABASE class Data...
true
true
f74091cd762967657470e6888f6454ffab4dcfe2
309
py
Python
tools/fileinfo/detection/installers/inno/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
tools/fileinfo/detection/installers/inno/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
tools/fileinfo/detection/installers/inno/test.py
stepanek-m/retdec-regression-tests
12b834b14ede2826fec451368fa8192ab00ddadf
[ "MIT" ]
null
null
null
from regression_tests import * class TestInnoSetupDetection(Test): settings = TestSettings( tool='fileinfo', input='inno.exe' ) def test_detected_inno(self): assert self.fileinfo.succeeded assert self.fileinfo.output.contains(r'.*Inno Setup \(5.4.0 - 5.5.1\)')
22.071429
79
0.650485
from regression_tests import * class TestInnoSetupDetection(Test): settings = TestSettings( tool='fileinfo', input='inno.exe' ) def test_detected_inno(self): assert self.fileinfo.succeeded assert self.fileinfo.output.contains(r'.*Inno Setup \(5.4.0 - 5.5.1\)')
true
true
f740922faa62f51b191c87217cbb011168b37e34
60,557
py
Python
tests/lax_numpy_indexing_test.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
tests/lax_numpy_indexing_test.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
tests/lax_numpy_indexing_test.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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 or agreed to in writing, ...
41.083446
107
0.616923
from contextlib import contextmanager import enum from functools import partial import itertools import typing from typing import Any, Optional, Tuple import warnings from absl.testing import absltest from absl.testing import parameterized import numpy as np import jax from jax import lax from jax imp...
true
true
f740927f3053a7019204b01f443b2defa1439973
1,171
py
Python
config-default.py
marsDurden/UnipdBot
402b74f6bd876265b952f052e2c132f6aa3c050d
[ "Unlicense" ]
4
2018-04-12T03:39:36.000Z
2019-11-26T07:52:30.000Z
config-default.py
marsDurden/UnipdBot
402b74f6bd876265b952f052e2c132f6aa3c050d
[ "Unlicense" ]
null
null
null
config-default.py
marsDurden/UnipdBot
402b74f6bd876265b952f052e2c132f6aa3c050d
[ "Unlicense" ]
1
2019-10-07T16:50:48.000Z
2019-10-07T16:50:48.000Z
# Configuration file # Bot token bot_token = 'bot token here' botAdminID = 123456789 # Orario list_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/combo_call.php' orario_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/grid_call.php' # File locations global_path = '/path/to/this/folder/' db_path =...
35.484848
156
0.694278
bot_token = 'bot token here' botAdminID = 123456789 list_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/combo_call.php' orario_url = 'https://gestionedidattica.unipd.it/PortaleStudenti/grid_call.php' global_path = '/path/to/this/folder/' db_path = 'database/database.db' captions_path = 'database/langu...
true
true
f740937db06159befc79ce60ca9fd330e88325fb
9,288
py
Python
empyro/charcode.py
aymanizz/empyro
225be4af935d81d6dfa53a77e9bea1de0971a922
[ "MIT" ]
null
null
null
empyro/charcode.py
aymanizz/empyro
225be4af935d81d6dfa53a77e9bea1de0971a922
[ "MIT" ]
null
null
null
empyro/charcode.py
aymanizz/empyro
225be4af935d81d6dfa53a77e9bea1de0971a922
[ "MIT" ]
null
null
null
"""Unicode code points and alt codes for code page 437. this module defines: class CharCode(IntEnum) -- an enum of the unicode code points. CharCode.altcode -- the alt code of the character, for convenience. altcodes -- a mapping from code points to alt codes. """ from enum import IntEnum class Cha...
29.96129
75
0.741064
from enum import IntEnum class CharCode(IntEnum): NULL = 0x0000 WHITE_SMILING_FACE = 0x263a BLACK_SMILING_FACE = 0x263b BLACK_HEART_SUIT = 0x2665 BLACK_DIAMOND_SUIT = 0x2666 BLACK_CLUB_SUIT = 0x2663 BLACK_SPADE_SUIT = 0x2660 BULLET = 0x2022 INVERSE_BULLET = 0x25d8 W...
true
true
f74094242042e1ae8ac2c9191238845f43364867
26,578
py
Python
Examples/Python2/CounterAndTimer.py
zjn97/artiq_spinnaker
293a61e8dd1495bd0def2bd1ffe267b9b91e84d6
[ "MIT" ]
null
null
null
Examples/Python2/CounterAndTimer.py
zjn97/artiq_spinnaker
293a61e8dd1495bd0def2bd1ffe267b9b91e84d6
[ "MIT" ]
null
null
null
Examples/Python2/CounterAndTimer.py
zjn97/artiq_spinnaker
293a61e8dd1495bd0def2bd1ffe267b9b91e84d6
[ "MIT" ]
null
null
null
# coding=utf-8 # ============================================================================= # Copyright (c) 2001-2021 FLIR Systems, Inc. All Rights Reserved. # # This software is the confidential and proprietary information of FLIR # Integrated Imaging Solutions, Inc. ("Confidential Information"). You # shall not di...
39.668657
121
0.679923
# frame rate (by default, the PWM signal is set to 50 Hz). # # Counter and Timer functionality is only available for BFS and Oryx Cameras. # For details on the hardware setup, see our kb article, "Using Counter and # Timer Control"; https://www.flir.com/support-center/iis/machine-vision/applicatio...
false
true
f74094b4da58e8f5be707bf6bc35acfb4c67d701
2,352
py
Python
opensfm/commands/extract_metadata.py
cjld/OpenSfM
016b852d581f2bd0b93318b852a17090954abd6b
[ "BSD-2-Clause" ]
1
2018-04-18T08:49:40.000Z
2018-04-18T08:49:40.000Z
opensfm/commands/extract_metadata.py
cjld/OpenSfM
016b852d581f2bd0b93318b852a17090954abd6b
[ "BSD-2-Clause" ]
1
2018-04-19T13:57:35.000Z
2018-04-19T13:57:35.000Z
opensfm/commands/extract_metadata.py
cjld/OpenSfM
016b852d581f2bd0b93318b852a17090954abd6b
[ "BSD-2-Clause" ]
1
2020-08-17T13:47:25.000Z
2020-08-17T13:47:25.000Z
import copy import logging import time from opensfm import dataset from opensfm import exif logger = logging.getLogger(__name__) logging.getLogger("exifread").setLevel(logging.WARNING) class Command: name = 'extract_metadata' help = "Extract metadata from images' EXIF tag" def add_arguments(self, pars...
32.219178
76
0.591837
import copy import logging import time from opensfm import dataset from opensfm import exif logger = logging.getLogger(__name__) logging.getLogger("exifread").setLevel(logging.WARNING) class Command: name = 'extract_metadata' help = "Extract metadata from images' EXIF tag" def add_arguments(self, pars...
true
true
f74094f5d51c631615b3335675b38a5598d892a2
59,187
py
Python
mpl4qt/widgets/mplbasewidget.py
archman/python-mpl4qt
f84fefb95113492407899206269ff82b609279b2
[ "MIT" ]
null
null
null
mpl4qt/widgets/mplbasewidget.py
archman/python-mpl4qt
f84fefb95113492407899206269ff82b609279b2
[ "MIT" ]
null
null
null
mpl4qt/widgets/mplbasewidget.py
archman/python-mpl4qt
f84fefb95113492407899206269ff82b609279b2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ mplbasewidget.py Base class for matplotlib widget for PyQt. Copyright (C) 2018 Tong Zhang <zhangt@frib.msu.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either ve...
31.46571
147
0.578539
import time import numpy as np from collections import deque from collections import OrderedDict from functools import partial from PyQt5.QtCore import QTimer from PyQt5.QtCore import QVariant from PyQt5.QtCore import Qt from PyQt5.QtCore import pyqtProperty from PyQt5.QtCore import pyqtSignal from PyQt5.QtCore impo...
true
true
f74095d9ee8abd512fbaa19a8b53f2c67f503d14
140
py
Python
python/p005.py
RUiNtheExtinct/project-euler
5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1
[ "MIT" ]
null
null
null
python/p005.py
RUiNtheExtinct/project-euler
5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1
[ "MIT" ]
null
null
null
python/p005.py
RUiNtheExtinct/project-euler
5c3e64c7dfcbf52d5213df88d2310550f4ee9ce1
[ "MIT" ]
null
null
null
from math import gcd t = list(range(1, 21)) print(t) ans = 1 for i in t: if ans % i: ans = (ans * i) // gcd(ans, i) print(ans)
14
38
0.535714
from math import gcd t = list(range(1, 21)) print(t) ans = 1 for i in t: if ans % i: ans = (ans * i) // gcd(ans, i) print(ans)
true
true
f740985a4028569cb1a6c799da538cd07c4134e0
255
py
Python
setup.py
jgmartinss/animeinfo
1d754bb8b4c0388dc4c95b78e97465ac3bd917de
[ "MIT" ]
1
2019-07-08T16:43:48.000Z
2019-07-08T16:43:48.000Z
setup.py
jgmartinss/animeinfo
1d754bb8b4c0388dc4c95b78e97465ac3bd917de
[ "MIT" ]
1
2019-07-08T16:44:31.000Z
2019-07-08T16:44:31.000Z
setup.py
jgmartinss/animeinfo
1d754bb8b4c0388dc4c95b78e97465ac3bd917de
[ "MIT" ]
null
null
null
from setuptools import setup setup( name='Animeinfo', author='João Martins', author_email='jgmartinsss@hotmail.com', description='An API to know everything about your favorite anime', url='https://github.com/jgmartinss/animeinfo', )
23.181818
70
0.717647
from setuptools import setup setup( name='Animeinfo', author='João Martins', author_email='jgmartinsss@hotmail.com', description='An API to know everything about your favorite anime', url='https://github.com/jgmartinss/animeinfo', )
true
true
f74098e015fd4bb31098204237131c4867f72839
475
py
Python
melodic-manatees/early_internet/templatetags/form_tags.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
melodic-manatees/early_internet/templatetags/form_tags.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
melodic-manatees/early_internet/templatetags/form_tags.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
from django import template register = template.Library() @register.filter(name='add_class') def add_class(field, classname): existing_classes = field.field.widget.attrs.get('class', None) if existing_classes: if existing_classes.find(given_class) == -1: classes = existing_classes + ' ' +...
27.941176
66
0.667368
from django import template register = template.Library() @register.filter(name='add_class') def add_class(field, classname): existing_classes = field.field.widget.attrs.get('class', None) if existing_classes: if existing_classes.find(given_class) == -1: classes = existing_classes + ' ' +...
true
true
f740998b9d5953f27eb9b4de74780b3dc9e77f61
12,293
py
Python
bin/apps/bash/hhs-app/plugins/firebase/firebase.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
34
2018-08-29T11:07:41.000Z
2022-03-31T12:18:39.000Z
bin/apps/bash/hhs-app/plugins/firebase/firebase.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
22
2020-01-11T01:04:04.000Z
2020-03-05T17:27:12.000Z
bin/apps/bash/hhs-app/plugins/firebase/firebase.py
yorevs/homesetup
6e77fd0bffbda3a44d4daf95c974b8d2c744eb5d
[ "MIT" ]
4
2020-02-28T03:35:32.000Z
2020-06-05T15:09:55.000Z
""" @package: - @script: firebase.py @purpose: This application is a firebase integration @created: Mon 27, 2020 @author: <B>H</B>ugo <B>S</B>aporetti <B>J</B>unior @mailto: yorevs@hotmail.com @site: https://github.com/yorevs/homesetup @license: Please refer to <https://opensource.or...
32.957105
110
0.608964
import json import os import sys import ast import atexit import base64 import getopt import getpass import signal import traceback import uuid import subprocess from datetime import datetime from hhslib.colors import cprint, Colors from hhslib.commons import log_init, check_arguments, exit_handler, read, create_file ...
true
true