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
1c0019e4b390fceba19d156628aa7bd42c21119b
2,466
py
Python
azure-batch/azure/batch/models/pool_enable_auto_scale_parameter_py3.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
null
null
null
azure-batch/azure/batch/models/pool_enable_auto_scale_parameter_py3.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-batch/azure/batch/models/pool_enable_auto_scale_parameter_py3.py
NMijat1024/azure-sdk-for-python
c49e1d6d797dceaca81813cafb1a486d67185182
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
51.375
111
0.705596
from msrest.serialization import Model class PoolEnableAutoScaleParameter(Model): _attribute_map = { 'auto_scale_formula': {'key': 'autoScaleFormula', 'type': 'str'}, 'auto_scale_evaluation_interval': {'key': 'autoScaleEvaluationInterval', 'type': 'duration'}, } def __init__(self, *, au...
true
true
1c001a51ac77db51bb9f7d1bd19881c288524f5b
4,838
py
Python
gym_microrts/api.py
Agents-Bar/gym-microrts
69267b05f0fff557f6318ab15182758d6d8889f4
[ "Apache-2.0" ]
null
null
null
gym_microrts/api.py
Agents-Bar/gym-microrts
69267b05f0fff557f6318ab15182758d6d8889f4
[ "Apache-2.0" ]
null
null
null
gym_microrts/api.py
Agents-Bar/gym-microrts
69267b05f0fff557f6318ab15182758d6d8889f4
[ "Apache-2.0" ]
null
null
null
import logging from typing import Any, Dict, Optional, Union from fastapi import FastAPI, HTTPException from gym_microrts.envs import MicroRTSBotVecEnv, MicroRTSGridModeVecEnv from gym_microrts.microrts_ai import coacAI from gym_microrts.types import (ActionType, EnvActionType, EnvStepType, ...
32.469799
110
0.684374
import logging from typing import Any, Dict, Optional, Union from fastapi import FastAPI, HTTPException from gym_microrts.envs import MicroRTSBotVecEnv, MicroRTSGridModeVecEnv from gym_microrts.microrts_ai import coacAI from gym_microrts.types import (ActionType, EnvActionType, EnvStepType, ...
true
true
1c001ac54ff711b71e5647278e2f28d7c1b2565c
947
py
Python
musketeer/equilibriumConstants.py
mjw99/Musketeer
0299a7974ad90c09d8d9206fcf862e45f9fddf30
[ "MIT" ]
null
null
null
musketeer/equilibriumConstants.py
mjw99/Musketeer
0299a7974ad90c09d8d9206fcf862e45f9fddf30
[ "MIT" ]
null
null
null
musketeer/equilibriumConstants.py
mjw99/Musketeer
0299a7974ad90c09d8d9206fcf862e45f9fddf30
[ "MIT" ]
null
null
null
import tkinter as tk import numpy as np from . import moduleFrame class GetKsCustom(): def __init__(self, titration): self.titration = titration popup = tk.Toplevel() popup.title("Edit equilibrium constant values") popup.grab_set() # TODO: implement def __call__(self...
24.282051
64
0.662091
import tkinter as tk import numpy as np from . import moduleFrame class GetKsCustom(): def __init__(self, titration): self.titration = titration popup = tk.Toplevel() popup.title("Edit equilibrium constant values") popup.grab_set() def __call__(self, kVars): ...
true
true
1c001b7fd5d82b5a21385abd90be667be76a1d49
11,828
py
Python
test/python/transpiler/test_hoare_opt.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
1
2021-07-06T09:07:47.000Z
2021-07-06T09:07:47.000Z
test/python/transpiler/test_hoare_opt.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
null
null
null
test/python/transpiler/test_hoare_opt.py
Elliot-Coupe/qiskit-terra
8a604e156ba4c2fa099b1c24cd941f59b9408398
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
31.291005
99
0.560873
import unittest from numpy import pi from qiskit.transpiler.passes.optimization.hoare_opt import HAS_Z3 from qiskit.transpiler.passes import HoareOptimizer from qiskit.converters import circuit_to_dag from qiskit import QuantumCircuit from qiskit.test import QiskitTestCase from qiskit.circuit.library import XGate, RZ...
true
true
1c001b923db64d7f9de7828ca14ce8765da8270f
163
py
Python
comic_dl/__init__.py
StefanUlbrich/comic-dl
84a38c9f5706fa40be8ff149ea31865c61de3a38
[ "MIT" ]
478
2016-11-13T15:11:10.000Z
2022-03-30T22:22:22.000Z
comic_dl/__init__.py
darodi/comic-dl
1e752321b79ee1fd599e22b31328248e6ee9c41c
[ "MIT" ]
270
2017-02-01T03:21:45.000Z
2022-03-28T04:16:27.000Z
comic_dl/__init__.py
darodi/comic-dl
1e752321b79ee1fd599e22b31328248e6ee9c41c
[ "MIT" ]
101
2016-11-14T20:31:55.000Z
2022-03-11T06:33:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # import sites # # import manga_eden # # import comic_dl # # import globalFunctions # # from comic_dl import ComicDL
20.375
32
0.687117
true
true
1c001ba02687c8f66c9409488365bebe3713b54b
173
py
Python
Models/querysets/Field lookups/__gt/tests.py
looking-for-a-job/django-examples
dfafa450668cac5c0351f6c7238b8886511229bf
[ "Unlicense" ]
null
null
null
Models/querysets/Field lookups/__gt/tests.py
looking-for-a-job/django-examples
dfafa450668cac5c0351f6c7238b8886511229bf
[ "Unlicense" ]
null
null
null
Models/querysets/Field lookups/__gt/tests.py
looking-for-a-job/django-examples
dfafa450668cac5c0351f6c7238b8886511229bf
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python from .models import MyModel """ https://docs.djangoproject.com/en/dev/ref/models/querysets/#gt """ qs = MyModel.objects q.filter(field__gt=42) # =42
17.3
62
0.716763
from .models import MyModel qs = MyModel.objects q.filter(field__gt=42)
true
true
1c001c34f063245b3a8e0be008a17cc3bb41eef0
4,921
py
Python
16.py
mjenrungrot/AdventOfCode2020
ad2607fe6c4418327a97b863146f7a5af3361afe
[ "MIT" ]
null
null
null
16.py
mjenrungrot/AdventOfCode2020
ad2607fe6c4418327a97b863146f7a5af3361afe
[ "MIT" ]
null
null
null
16.py
mjenrungrot/AdventOfCode2020
ad2607fe6c4418327a97b863146f7a5af3361afe
[ "MIT" ]
null
null
null
import sys import itertools import copy def extra(): fp = open("16.input") lines = list(map(lambda x: x.strip(), fp.readlines())) curr_line_no = 0 features = {} while curr_line_no < len(lines): if lines[curr_line_no] == "": curr_line_no += 1 break line = l...
30.376543
80
0.522455
import sys import itertools import copy def extra(): fp = open("16.input") lines = list(map(lambda x: x.strip(), fp.readlines())) curr_line_no = 0 features = {} while curr_line_no < len(lines): if lines[curr_line_no] == "": curr_line_no += 1 break line = l...
true
true
1c001cfa3a09b0cc8f9d8e1fd94b87533e0ee780
1,150
py
Python
jinahub/encoders/text/SpacyTextEncoder/tests/integration/test_spacy_text_encoder.py
vivek2301/executors
8159681d68408ab8f797497bc3374be77e6ca392
[ "Apache-2.0" ]
null
null
null
jinahub/encoders/text/SpacyTextEncoder/tests/integration/test_spacy_text_encoder.py
vivek2301/executors
8159681d68408ab8f797497bc3374be77e6ca392
[ "Apache-2.0" ]
null
null
null
jinahub/encoders/text/SpacyTextEncoder/tests/integration/test_spacy_text_encoder.py
vivek2301/executors
8159681d68408ab8f797497bc3374be77e6ca392
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020-2021 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import subprocess import pytest from jina import Document, DocumentArray, Flow from ...spacy_text_encoder import SpacyTextEncoder _EMBEDDING_DIM = 96 @pytest.mark.parametrize('request_size', [1, 10, 50, 100]...
28.04878
79
0.652174
__copyright__ = "Copyright (c) 2020-2021 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import subprocess import pytest from jina import Document, DocumentArray, Flow from ...spacy_text_encoder import SpacyTextEncoder _EMBEDDING_DIM = 96 @pytest.mark.parametrize('request_size', [1, 10, 50, 100]...
true
true
1c001eac7fed97f8b568bbeba6068936807855d8
2,302
py
Python
homeassistant/components/myq/light.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
homeassistant/components/myq/light.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
homeassistant/components/myq/light.py
liangleslie/core
cc807b4d597daaaadc92df4a93c6e30da4f570c6
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Support for MyQ-Enabled lights.""" from pymyq.errors import MyQError from homeassistant.components.light import ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.core import HomeAssistant from homeassistant.exceptions i...
30.693333
81
0.673762
from pymyq.errors import MyQError from homeassistant.components.light import ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError from homeassi...
true
true
1c00208294a11aab1b7ac7fc2dccaf08aa97d976
926
py
Python
libs/external_libs/Pygments-0.11.1/tests/test_clexer.py
google-code-export/django-hotclub
d783a5bbcc06816289565f3eae6d99461188ca4a
[ "MIT" ]
3
2015-12-25T14:45:36.000Z
2016-11-28T09:58:03.000Z
libs/external_libs/Pygments-0.11.1/tests/test_clexer.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
libs/external_libs/Pygments-0.11.1/tests/test_clexer.py
indro/t2c
56482ad4aed150f29353e054db2c97b567243bf8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Basic CLexer Test ~~~~~~~~~~~~~~~~~ :copyright: 2006-2007 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import os from pygments.token import Text, Number from pygments.lexers import CLexer class CLexerTest(unittest.TestCase): de...
25.722222
68
0.576674
import unittest import os from pygments.token import Text, Number from pygments.lexers import CLexer class CLexerTest(unittest.TestCase): def setUp(self): self.lexer = CLexer() def testNumbers(self): code = '42 23.42 23. .42 023 0xdeadbeef 23e+42 42e-23' wanted = [] for ite...
true
true
1c0020de81805eedff3abd13f338261a2b01bf37
5,820
py
Python
test/functional/wallet_upgrade.py
decenomy/BECN
de00ed19a7a6bf0a56c196335fe6e79318fc78c3
[ "MIT" ]
15
2018-11-15T19:31:40.000Z
2020-06-03T15:28:49.000Z
test/functional/wallet_upgrade.py
decenomy/BECN
de00ed19a7a6bf0a56c196335fe6e79318fc78c3
[ "MIT" ]
1
2019-11-14T20:39:26.000Z
2019-11-15T02:16:51.000Z
test/functional/wallet_upgrade.py
decenomy/BECN
de00ed19a7a6bf0a56c196335fe6e79318fc78c3
[ "MIT" ]
18
2018-11-19T19:37:51.000Z
2021-07-16T17:21:09.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the walletupgrade functionality. - 1) start one beacond node from an pre-HD wallet wallet.dat fil...
38.289474
111
0.636942
import os import shutil from test_framework.test_framework import PivxTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, wait_until, initialize_datadir, ) def read_dump(file_name, addrs): with open(file_name, encoding='utf8') as inputfile: found_addr = 0 ...
true
true
1c0021c8b1535ec8fe057b13cd3f72e8eab9ed3f
6,318
py
Python
iothub_device.py
jimbobbennett/Circuitpython-AzureIoT
616b88cbe19b37ca08e425bf5de75ab62f44464f
[ "MIT" ]
null
null
null
iothub_device.py
jimbobbennett/Circuitpython-AzureIoT
616b88cbe19b37ca08e425bf5de75ab62f44464f
[ "MIT" ]
null
null
null
iothub_device.py
jimbobbennett/Circuitpython-AzureIoT
616b88cbe19b37ca08e425bf5de75ab62f44464f
[ "MIT" ]
null
null
null
"""Connectivity to Azure IoT Hub """ import json from iot_error import IoTError from iot_mqtt import IoTMQTT, IoTMQTTCallback, IoTResponse from adafruit_esp32spi.adafruit_esp32spi_wifimanager import ESPSPI_WiFiManager import adafruit_logging as logging def _validate_keys(connection_string_parts): """Raise ValueE...
36.310345
147
0.697689
import json from iot_error import IoTError from iot_mqtt import IoTMQTT, IoTMQTTCallback, IoTResponse from adafruit_esp32spi.adafruit_esp32spi_wifimanager import ESPSPI_WiFiManager import adafruit_logging as logging def _validate_keys(connection_string_parts): host_name = connection_string_parts.get(HOST_NAME) ...
true
true
1c0022632125c586628c375e523f8a08d3babe0c
71
py
Python
trekipsum/dialog/__init__.py
infinitewarp/trekipsum
1401d5cedef5ac20e9941708d846911c7ec9ca09
[ "MIT" ]
1
2019-09-25T19:31:07.000Z
2019-09-25T19:31:07.000Z
trekipsum/dialog/__init__.py
infinitewarp/trekipsum
1401d5cedef5ac20e9941708d846911c7ec9ca09
[ "MIT" ]
2
2017-08-23T15:01:36.000Z
2018-01-26T20:24:03.000Z
trekipsum/dialog/__init__.py
infinitewarp/trekipsum
1401d5cedef5ac20e9941708d846911c7ec9ca09
[ "MIT" ]
1
2018-01-25T15:17:13.000Z
2018-01-25T15:17:13.000Z
from .sqlite import DialogChooser as SqliteRandomChooser # noqa: F401
35.5
70
0.816901
from .sqlite import DialogChooser as SqliteRandomChooser
true
true
1c0022a13dbaf4f4be9fe42732e2f2eb15ab338c
2,809
py
Python
fuzzers/007-timing/utils/utils.py
common-config-bot/prjuray
c550b03a26b4c4a9c4453353bd642a21f710b3ec
[ "Apache-2.0" ]
2
2022-03-18T00:17:38.000Z
2022-03-28T22:57:58.000Z
fuzzers/007-timing/utils/utils.py
common-config-bot/prjuray
c550b03a26b4c4a9c4453353bd642a21f710b3ec
[ "Apache-2.0" ]
null
null
null
fuzzers/007-timing/utils/utils.py
common-config-bot/prjuray
c550b03a26b4c4a9c4453353bd642a21f710b3ec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2022 F4PGA Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
29.260417
77
0.52225
def merged_dict(itr): output = {} for keys, value in itr: target = output for key in keys[:-1]: if key not in target: target[key] = {} target = target[key] if keys[-1] in target: assert target[keys[-1]] == value, (keys, value, targe...
true
true
1c0022b0c738d375628c7dff4f32b30d891a1b06
1,344
py
Python
quickplots.py
eposs/solution_scattering
c9e1570cdc7ad0b5b9303770e798bd0bb71650c3
[ "BSD-3-Clause" ]
null
null
null
quickplots.py
eposs/solution_scattering
c9e1570cdc7ad0b5b9303770e798bd0bb71650c3
[ "BSD-3-Clause" ]
null
null
null
quickplots.py
eposs/solution_scattering
c9e1570cdc7ad0b5b9303770e798bd0bb71650c3
[ "BSD-3-Clause" ]
null
null
null
import glob import matplotlib.pyplot as plt import pandas as pd from saxs_plots import real_space_plotter dats = glob.glob('./*dat') diffs = [item for item in dats if "diff" in item] sums = [item for item in dats if "sum" in item] avgs = [item for item in dats if "diff" not in item] spfs = [item for item in dats if "s...
28
111
0.619048
import glob import matplotlib.pyplot as plt import pandas as pd from saxs_plots import real_space_plotter dats = glob.glob('./*dat') diffs = [item for item in dats if "diff" in item] sums = [item for item in dats if "sum" in item] avgs = [item for item in dats if "diff" not in item] spfs = [item for item in dats if "s...
true
true
1c0022c128cd578d036ee4291a04b32141795b2b
143
py
Python
tst_level_2_min_url_directory.py
Egida-Kassandra/kassandra
162f6a5ee67a70122e24143e08c6a779a987f82d
[ "Apache-2.0", "Unlicense" ]
6
2021-04-21T16:16:18.000Z
2021-12-16T09:09:07.000Z
tst_level_2_min_url_directory.py
albact7/kassandra
162f6a5ee67a70122e24143e08c6a779a987f82d
[ "Apache-2.0", "Unlicense" ]
1
2021-04-30T21:18:11.000Z
2021-04-30T21:18:11.000Z
tst_level_2_min_url_directory.py
albact7/kassandra
162f6a5ee67a70122e24143e08c6a779a987f82d
[ "Apache-2.0", "Unlicense" ]
2
2021-07-20T06:56:57.000Z
2021-09-01T14:22:24.000Z
import kass_nn.level_2.characteristics.min_vs_url_directory as dir if __name__ == '__main__': dir.main("BIG_TEST_TRANS_min_directory.log")
35.75
66
0.811189
import kass_nn.level_2.characteristics.min_vs_url_directory as dir if __name__ == '__main__': dir.main("BIG_TEST_TRANS_min_directory.log")
true
true
1c0025f823ab81d918e3b8fa8576232d4061cc34
5,327
py
Python
tools/train_net.py
wpsliu123/maskrcnn
5296b25f79c3f90e802c9ea252416b310ada522a
[ "MIT" ]
5
2018-10-25T15:10:52.000Z
2022-02-15T17:06:52.000Z
tools/train_net.py
OSSDC/maskrcnn-benchmark
5296b25f79c3f90e802c9ea252416b310ada522a
[ "MIT" ]
null
null
null
tools/train_net.py
OSSDC/maskrcnn-benchmark
5296b25f79c3f90e802c9ea252416b310ada522a
[ "MIT" ]
1
2020-12-04T05:03:00.000Z
2020-12-04T05:03:00.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. r""" Basic training script for PyTorch """ # Set up custom environment before nearly anything else is imported # NOTE: this should be the first import (no not reorder) from maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:s...
31.152047
88
0.690633
from maskrcnn_benchmark.utils.env import setup_environment import argparse import os import torch from maskrcnn_benchmark.config import cfg from maskrcnn_benchmark.data import make_data_loader from maskrcnn_benchmark.solver import make_lr_scheduler from maskrcnn_benchmark.solver import make_optimizer from maskrcnn_...
true
true
1c00269e482a87b0a38f644d0176cd682ced1155
5,591
py
Python
weedcoco/utils.py
Sydney-Informatics-Hub/Weed-ID-Interchange
d27891c2148de54d03727f688f8b6c6c414ec09b
[ "MIT" ]
4
2021-05-21T00:53:24.000Z
2021-08-30T12:01:24.000Z
weedcoco/utils.py
Sydney-Informatics-Hub/Weed-ID-Interchange
d27891c2148de54d03727f688f8b6c6c414ec09b
[ "MIT" ]
282
2020-07-10T00:52:21.000Z
2021-03-01T06:58:05.000Z
weedcoco/utils.py
Sydney-Informatics-Hub/Weed-ID-Interchange
d27891c2148de54d03727f688f8b6c6c414ec09b
[ "MIT" ]
2
2020-10-07T06:12:39.000Z
2021-02-02T05:21:32.000Z
import json import pathlib import os import warnings import hashlib import PIL.Image import yaml import imagehash from .species_utils import get_eppo_singleton EPPO_PATH = "_eppo_xmlfull.zip" def set_info(coco, metadata): info = coco.get("info", {}).copy() info["metadata"] = metadata info["description"...
29.272251
87
0.640136
import json import pathlib import os import warnings import hashlib import PIL.Image import yaml import imagehash from .species_utils import get_eppo_singleton EPPO_PATH = "_eppo_xmlfull.zip" def set_info(coco, metadata): info = coco.get("info", {}).copy() info["metadata"] = metadata info["description"...
true
true
1c002ab2d4ab0f528780a811ded203dc68ada128
2,213
py
Python
tests/test.draw.001.py
ceccopierangiolieugenio/py-ttk
117d61844bb7344bbe22a7797b7e3763d5fe4de5
[ "MIT" ]
null
null
null
tests/test.draw.001.py
ceccopierangiolieugenio/py-ttk
117d61844bb7344bbe22a7797b7e3763d5fe4de5
[ "MIT" ]
null
null
null
tests/test.draw.001.py
ceccopierangiolieugenio/py-ttk
117d61844bb7344bbe22a7797b7e3763d5fe4de5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restricti...
34.046154
83
0.705377
import sys, os import logging import time sys.path.append(os.path.join(sys.path[0],'..')) from TermTk.libbpytop import Term, Mv from TermTk import TTkLog def message_handler(mode, context, message): log = logging.debug if mode == TTkLog.InfoMsg: log = logging.info elif mode == TTkLog.WarningMsg: ...
true
true
1c002ae73e5c85941f6ad0f8dec0e29f880975e8
12,540
py
Python
elf/parallel/operations.py
qin-yu/elf
bb8e0a41c1c2539ac6f866271751139271fbeeb1
[ "MIT" ]
23
2019-09-07T23:02:08.000Z
2022-03-19T09:50:58.000Z
elf/parallel/operations.py
qin-yu/elf
bb8e0a41c1c2539ac6f866271751139271fbeeb1
[ "MIT" ]
34
2019-08-07T11:54:01.000Z
2022-03-29T09:50:54.000Z
elf/parallel/operations.py
qin-yu/elf
bb8e0a41c1c2539ac6f866271751139271fbeeb1
[ "MIT" ]
12
2019-08-23T09:01:29.000Z
2021-11-09T01:21:20.000Z
import multiprocessing # would be nice to use dask for all of this instead of concurrent.futures # so that this could be used on a cluster as well from concurrent import futures from numbers import Number from functools import partial from tqdm import tqdm from .common import get_blocking from ..util import set_numpy_...
39.310345
113
0.598644
import multiprocessing from concurrent import futures from numbers import Number from functools import partial from tqdm import tqdm from .common import get_blocking from ..util import set_numpy_threads set_numpy_threads(1) import numpy as np def _compute_broadcast(shapex, shapey): broadcast = [] for shx, sh...
true
true
1c002afb834cac93f5a5076d13c00ea9f9fa40fe
645
py
Python
xlsxutility/align.py
MattDJensen/Xlsx_Utility_Package
f023f55a0a9a978627c8fefdfa2db24a4a9a923c
[ "MIT" ]
1
2020-11-23T11:15:44.000Z
2020-11-23T11:15:44.000Z
xlsxutility/align.py
MattDJensen/Xlsx_Utility_Package
f023f55a0a9a978627c8fefdfa2db24a4a9a923c
[ "MIT" ]
null
null
null
xlsxutility/align.py
MattDJensen/Xlsx_Utility_Package
f023f55a0a9a978627c8fefdfa2db24a4a9a923c
[ "MIT" ]
null
null
null
def align_cells(dataframe,workbook,worksheet, align='center'): """ :param dataframe: Reference Dataset, Pandas Dataframe :type dataframe: Pandas Dataframe :param workbook: Xlsxwriter workbook :param worksheet: Xlsxwriter worksheet (must be within workbook) :param align: Alignment type Horizonta...
49.615385
174
0.737984
def align_cells(dataframe,workbook,worksheet, align='center'): cell_format = workbook.add_format() cell_format.set_align(align) worksheet.set_column(first_col=0, last_col=(len(dataframe.columns) + 1), width=1, cell_format=cell_format)
true
true
1c002bc8791dd4f41682c049af81e35149aa1da9
865
py
Python
tools/ds5/configdb/kernelDebug_A15.py
lambdaxymox/barrelfish
06a9f54721a8d96874a8939d8973178a562c342f
[ "MIT" ]
111
2015-02-03T02:57:27.000Z
2022-03-01T23:57:09.000Z
tools/ds5/configdb/kernelDebug_A15.py
lambdaxymox/barrelfish
06a9f54721a8d96874a8939d8973178a562c342f
[ "MIT" ]
12
2016-03-22T14:44:32.000Z
2020-03-18T13:30:29.000Z
tools/ds5/configdb/kernelDebug_A15.py
lambdaxymox/barrelfish
06a9f54721a8d96874a8939d8973178a562c342f
[ "MIT" ]
55
2015-02-03T05:28:12.000Z
2022-03-31T05:00:03.000Z
from arm_ds.debugger_v1 import Debugger from arm_ds.debugger_v1 import DebugException import os # The CPU driver is linked at this address LINKADDRESS = 0 # The boot driver is relocated to this address RAMBASE = 0x80000000 debugger = Debugger() ec = debugger.getCurrentExecutionContext() # Load the boot driver symbo...
27.03125
108
0.772254
from arm_ds.debugger_v1 import Debugger from arm_ds.debugger_v1 import DebugException import os LINKADDRESS = 0 RAMBASE = 0x80000000 debugger = Debugger() ec = debugger.getCurrentExecutionContext() im= ec.getImageService() im.loadSymbols('Barrelfish/armv7/sbin/boot_ve', RAMBASE) vs = ec.getVariableService() kernel...
false
true
1c002d2805935f0f76727d9aeb477442c979fc89
597
py
Python
mlab_api/data/raw_data.py
m-lab/mlab-vis-api
2368d88223148bf73d83c62d285fb458558619e0
[ "MIT" ]
1
2017-09-05T14:52:11.000Z
2017-09-05T14:52:11.000Z
mlab_api/data/raw_data.py
m-lab/mlab-vis-api
2368d88223148bf73d83c62d285fb458558619e0
[ "MIT" ]
9
2017-09-14T15:30:02.000Z
2019-03-05T18:35:20.000Z
mlab_api/data/raw_data.py
m-lab/mlab-vis-api
2368d88223148bf73d83c62d285fb458558619e0
[ "MIT" ]
3
2017-06-01T16:01:37.000Z
2017-10-24T22:44:47.000Z
# -*- coding: utf-8 -*- ''' Data class for accessing data for raw data ''' from mlab_api.data.table_config import get_table_config from mlab_api.data.base_data import Data import mlab_api.data.bigtable_utils as bt class RawData(Data): ''' Pull out some raw data ''' def get_raw_test_results(self): ...
25.956522
77
0.666667
from mlab_api.data.table_config import get_table_config from mlab_api.data.base_data import Data import mlab_api.data.bigtable_utils as bt class RawData(Data): def get_raw_test_results(self): table_name = 'raw_sample' table_config = get_table_config(self.table_configs, None, table_name) r...
true
true
1c002f21f5fb461f94f226ca06508ec82c3c32a6
694
py
Python
homeassistant/components/browser/__init__.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/browser/__init__.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/components/browser/__init__.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2019-04-28T16:35:45.000Z
2020-05-28T15:21:59.000Z
"""Support for launching a web browser on the host machine.""" import voluptuous as vol ATTR_URL = 'url' ATTR_URL_DEFAULT = 'https://www.google.com' DOMAIN = 'browser' SERVICE_BROWSE_URL = 'browse_url' SERVICE_BROWSE_URL_SCHEMA = vol.Schema({ # pylint: disable=no-value-for-parameter vol.Required(ATTR_URL, d...
25.703704
67
0.657061
import voluptuous as vol ATTR_URL = 'url' ATTR_URL_DEFAULT = 'https://www.google.com' DOMAIN = 'browser' SERVICE_BROWSE_URL = 'browse_url' SERVICE_BROWSE_URL_SCHEMA = vol.Schema({ vol.Required(ATTR_URL, default=ATTR_URL_DEFAULT): vol.Url(), }) def setup(hass, config): import webbrowser hass.servi...
true
true
1c002f586f486b173382077f98bbfed320cbe082
1,624
py
Python
MetReg/train/train_dl.py
leelew/MetReg
b38e28326374e30521eab70625b9c22105688d8d
[ "MIT" ]
3
2021-02-18T02:28:09.000Z
2022-02-27T14:31:38.000Z
MetReg/train/train_dl.py
leelew/MetReg
b38e28326374e30521eab70625b9c22105688d8d
[ "MIT" ]
null
null
null
MetReg/train/train_dl.py
leelew/MetReg
b38e28326374e30521eab70625b9c22105688d8d
[ "MIT" ]
1
2021-11-17T10:41:48.000Z
2021-11-17T10:41:48.000Z
# ----------------------------------------------------------------------------- # Train module # # ----------------------------------------------------------------------------- # author: Lu Li # ...
33.833333
79
0.461207
import os import time import numpy as np import tensorflow as tf def get_callback(save_path, task): if not os.path.exists(save_path): os.mkdir(save_path) checkpoint_path = save_path + str(task) + '/' + str(task) + '.ckpt' callbacks = [ tf.keras.callbacks.ModelCheckpoint( ...
false
true
1c002f785db030c947675d30bb8f3f3dd173fc2f
1,767
py
Python
benchmark.py
igorperic17/object_detection_tf_example
4d79eb45f5cf05af51e1055f72e4226dfa0f3538
[ "Apache-2.0" ]
null
null
null
benchmark.py
igorperic17/object_detection_tf_example
4d79eb45f5cf05af51e1055f72e4226dfa0f3538
[ "Apache-2.0" ]
null
null
null
benchmark.py
igorperic17/object_detection_tf_example
4d79eb45f5cf05af51e1055f72e4226dfa0f3538
[ "Apache-2.0" ]
null
null
null
import tensorflow.compat.v2 as tf import tensorflow_datasets as tfds tf.enable_v2_behavior() from tensorflow.python.framework.ops import disable_eager_execution disable_eager_execution() from tensorflow.python.compiler.mlcompute import mlcompute mlcompute.set_mlc_device(device_name='gpu') (ds_train, ds_test), ds_i...
27.609375
68
0.729485
import tensorflow.compat.v2 as tf import tensorflow_datasets as tfds tf.enable_v2_behavior() from tensorflow.python.framework.ops import disable_eager_execution disable_eager_execution() from tensorflow.python.compiler.mlcompute import mlcompute mlcompute.set_mlc_device(device_name='gpu') (ds_train, ds_test), ds_i...
true
true
1c002f7b0bbbcd873f7e1846371ed80083dda97a
351
py
Python
packages/coinstac-images/coinstac-large-input-test/remote.py
sraashis/coinstac
52fc2528223346343963596742daab68a1f2f54c
[ "MIT" ]
19
2020-02-21T07:03:03.000Z
2022-03-02T05:01:27.000Z
packages/coinstac-images/coinstac-large-input-test/remote.py
sraashis/coinstac
52fc2528223346343963596742daab68a1f2f54c
[ "MIT" ]
246
2019-11-04T21:48:52.000Z
2022-03-31T20:46:33.000Z
packages/coinstac-images/coinstac-large-input-test/remote.py
sraashis/coinstac
52fc2528223346343963596742daab68a1f2f54c
[ "MIT" ]
11
2020-02-20T07:54:53.000Z
2021-09-22T17:11:21.000Z
#!/usr/bin/python import sys import json doc = json.loads(sys.stdin.read()) for site, output in doc['input'].items(): outFile = output['outFile'] break if doc['state']['iteration'] == 100: success = True else: success = False output = { "output": { "outputFile": outFile }, "success": success } sys.st...
20.647059
68
0.652422
import sys import json doc = json.loads(sys.stdin.read()) for site, output in doc['input'].items(): outFile = output['outFile'] break if doc['state']['iteration'] == 100: success = True else: success = False output = { "output": { "outputFile": outFile }, "success": success } sys.stdout.write(json.du...
true
true
1c002f7d49ef786fcac053fb637182f75a084f85
188
py
Python
tests/test_even_fibonacci.py
panc86/coding-problems
d3e780630e4e7843a07c6459e76c9170944cff32
[ "CC-BY-4.0" ]
null
null
null
tests/test_even_fibonacci.py
panc86/coding-problems
d3e780630e4e7843a07c6459e76c9170944cff32
[ "CC-BY-4.0" ]
null
null
null
tests/test_even_fibonacci.py
panc86/coding-problems
d3e780630e4e7843a07c6459e76c9170944cff32
[ "CC-BY-4.0" ]
null
null
null
import unittest from problems import even_fibonacci as func class TestEvenFibonacci(unittest.TestCase): def test_solution(self): self.assertTrue(func.solution() == 4613732)
20.888889
51
0.760638
import unittest from problems import even_fibonacci as func class TestEvenFibonacci(unittest.TestCase): def test_solution(self): self.assertTrue(func.solution() == 4613732)
true
true
1c003039e30de9fb2d69d2522c1ea6405da0cedc
4,884
py
Python
version_checker/registry.py
growse/k8s-version-checker
0e863f3f8660dba8aac1c905cfa685b251004c78
[ "MIT" ]
null
null
null
version_checker/registry.py
growse/k8s-version-checker
0e863f3f8660dba8aac1c905cfa685b251004c78
[ "MIT" ]
null
null
null
version_checker/registry.py
growse/k8s-version-checker
0e863f3f8660dba8aac1c905cfa685b251004c78
[ "MIT" ]
null
null
null
import functools import logging import re from typing import Tuple, Optional import requests from packaging.version import Version, parse from requests import Response logger = logging.getLogger(__name__) # List of hosts that return the correct docker digest even on schema v1 digest_correct_hosts = ["quay.io"] def...
33.916667
85
0.634726
import functools import logging import re from typing import Tuple, Optional import requests from packaging.version import Version, parse from requests import Response logger = logging.getLogger(__name__) digest_correct_hosts = ["quay.io"] def get_newest_tag(image_name: str, match_pattern: str = "") -> Optional[st...
true
true
1c00304c3112121cd765e17801eb78bb8a2442c3
64
py
Python
autolens/pipeline/phase/__init__.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
autolens/pipeline/phase/__init__.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
autolens/pipeline/phase/__init__.py
rakaar/PyAutoLens
bc140c5d196c426092c1178b8abfa492c6fab859
[ "MIT" ]
null
null
null
from autolens.pipeline.phase.imaging.phase import PhaseImaging
32
63
0.859375
from autolens.pipeline.phase.imaging.phase import PhaseImaging
true
true
1c00308a392d5c5582f10dbf048c881eb08d4462
2,240
py
Python
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateProductDistributeJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateProductDistributeJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/CreateProductDistributeJobRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.129032
85
0.775893
from aliyunsdkcore.request import RpcRequest from aliyunsdkiot.endpoint import endpoint_data class CreateProductDistributeJobRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Iot', '2018-01-20', 'CreateProductDistributeJob','iot') self.set_method('POST') if hasattr(self, "endpoint_map"): ...
true
true
1c0030c0fa5029fa015396697649b5a9f51952a6
65,358
py
Python
roles/lib_openshift/library/oc_service.py
rashmi7321/openshift
068ec3dbb209592b052426ca3e573904f3df5613
[ "Apache-2.0" ]
null
null
null
roles/lib_openshift/library/oc_service.py
rashmi7321/openshift
068ec3dbb209592b052426ca3e573904f3df5613
[ "Apache-2.0" ]
null
null
null
roles/lib_openshift/library/oc_service.py
rashmi7321/openshift
068ec3dbb209592b052426ca3e573904f3df5613
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
33.637674
119
0.548242
from __future__ import print_function import atexit import copy import fcntl import json import time import os import re import shutil import subprocess import tempfile try: import ruamel.yaml as yaml except ImportError: import yaml from ansible.module_utils.basic import AnsibleModule DOCUMENTATION = ''' ...
true
true
1c00311bb4228317c5c0d6c776314f0cb98e0531
3,467
py
Python
gym_wrapper.py
kasimte/RLs
0eba84bd7cc571269f874b65923bec2188828ef6
[ "Apache-2.0" ]
null
null
null
gym_wrapper.py
kasimte/RLs
0eba84bd7cc571269f874b65923bec2188828ef6
[ "Apache-2.0" ]
null
null
null
gym_wrapper.py
kasimte/RLs
0eba84bd7cc571269f874b65923bec2188828ef6
[ "Apache-2.0" ]
null
null
null
import gym import numpy as np import threading class MyThread(threading.Thread): def __init__(self, func, args=()): super().__init__() self.func = func self.args = args def run(self): self.result = self.func(*self.args) def get_result(self): try: ...
34.67
115
0.553216
import gym import numpy as np import threading class MyThread(threading.Thread): def __init__(self, func, args=()): super().__init__() self.func = func self.args = args def run(self): self.result = self.func(*self.args) def get_result(self): try: ...
true
true
1c0031c5bc5ee5bcc816cc9a1d591ec49efbc91d
1,241
py
Python
dit/pid/irr.py
marwahaha/dit
feaa7dfa87b4f6067039be4ac05c7e645fdcec3c
[ "BSD-3-Clause" ]
null
null
null
dit/pid/irr.py
marwahaha/dit
feaa7dfa87b4f6067039be4ac05c7e645fdcec3c
[ "BSD-3-Clause" ]
null
null
null
dit/pid/irr.py
marwahaha/dit
feaa7dfa87b4f6067039be4ac05c7e645fdcec3c
[ "BSD-3-Clause" ]
null
null
null
""" The I_RR measure, described in ``Temporal information partitioning: Characterizing synergy, uniqueness, and redundancy in interacting environmental variables'' by Goodwell & Kumar. """ from __future__ import division from .pid import BaseBivariatePID from ..multivariate import coinformation, entropy def i_rr(d...
26.404255
83
0.680097
from __future__ import division from .pid import BaseBivariatePID from ..multivariate import coinformation, entropy def i_rr(d, inputs, output): R_min = max([0, coinformation(d, inputs + (output,))]) R_mmi = min(coinformation(d, [input_, output]) for input_ in inputs) I_s = coinformation(d, inputs)/min...
true
true
1c0031cbf06c5e2bd9ae29e81d0a89261bbc6a9f
1,862
py
Python
src/flowket/callbacks/monte_carlo/__init__.py
vigsterkr/FlowKet
0d8f301b5f51a1bab83021f10f65cfb5f2751079
[ "MIT" ]
21
2019-11-19T13:59:13.000Z
2021-12-03T10:26:30.000Z
src/flowket/callbacks/monte_carlo/__init__.py
HUJI-Deep/PyKet
61238afd3fe1488d35c57d280675f544c559bd01
[ "MIT" ]
10
2019-11-15T12:07:28.000Z
2020-11-07T18:12:18.000Z
src/flowket/callbacks/monte_carlo/__init__.py
HUJI-Deep/PyKet
61238afd3fe1488d35c57d280675f544c559bd01
[ "MIT" ]
11
2019-12-09T22:51:17.000Z
2021-11-29T22:05:41.000Z
from .bad_eigen_state_stopping import BadEigenStateStopping from .generator_iterator import GeneratorIterator from .local_energy_stats import LocalEnergyStats from .mcmc_stats import MCMCStats from .observable import ObservableStats from .runtime_stats import RuntimeStats from .tensorboard_with_generator_validation_dat...
62.066667
115
0.66058
from .bad_eigen_state_stopping import BadEigenStateStopping from .generator_iterator import GeneratorIterator from .local_energy_stats import LocalEnergyStats from .mcmc_stats import MCMCStats from .observable import ObservableStats from .runtime_stats import RuntimeStats from .tensorboard_with_generator_validation_dat...
true
true
1c0032d315402bcff39d83e9781f9d11dae86298
1,093
py
Python
code_train/process/split_code_imgs.py
TexTecGo/ZhengFang_CodeRecog
6a118c2b9b5454aacf9238c075649cc9a0b7e767
[ "Apache-2.0" ]
6
2018-05-21T00:57:30.000Z
2020-04-16T12:15:44.000Z
code_train/process/split_code_imgs.py
TexTecGo/ZhengFang_CodeRecog
6a118c2b9b5454aacf9238c075649cc9a0b7e767
[ "Apache-2.0" ]
null
null
null
code_train/process/split_code_imgs.py
TexTecGo/ZhengFang_CodeRecog
6a118c2b9b5454aacf9238c075649cc9a0b7e767
[ "Apache-2.0" ]
1
2020-03-05T03:29:41.000Z
2020-03-05T03:29:41.000Z
# -*- coding: utf-8 -*- """ Created on 2018/5/20 @author: susmote """ import os from PIL import Image def img_to_single(train_data_full__folder, train_data_single_folder): """ 将完整验证码图片切分成单个字符的图片 :param train_data_full__folder: 完整图片文件夹,图片事先通过request批量抓取 :param train_data_single_folder: 切分后图片保存文件夹 ...
27.325
81
0.589204
import os from PIL import Image def img_to_single(train_data_full__folder, train_data_single_folder): images = os.listdir(train_data_full__folder) for img in images: image = Image.open('%s/%s' % (train_data_full__folder, img)).convert("L") x_size, y_size = image.size print(image.size...
true
true
1c0033f71a7b6b9c115c5ed09b85ace0e27c0979
1,926
py
Python
official/nlp/keras_nlp/layers/self_attention_mask.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
8
2021-12-30T06:07:14.000Z
2022-02-10T14:49:13.000Z
official/nlp/keras_nlp/layers/self_attention_mask.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
62
2021-06-09T00:47:27.000Z
2021-09-24T09:06:58.000Z
official/nlp/keras_nlp/layers/self_attention_mask.py
akshit-protonn/models
38c8c6fe4144c93d6aadd19981c2b90570c29eba
[ "Apache-2.0" ]
2
2021-06-13T10:26:17.000Z
2021-08-28T08:40:01.000Z
# Copyright 2021 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...
34.392857
80
0.714434
import tensorflow as tf @tf.keras.utils.register_keras_serializable(package='keras_nlp') class SelfAttentionMask(tf.keras.layers.Layer): def call(self, inputs, to_mask): from_shape = tf.shape(inputs) batch_size = from_shape[0] from_seq_length = from_shape[1] to_shape = tf.shape(to_mask) to_s...
true
true
1c003461e1a3331215516ce7f9792712c68054fc
850
py
Python
setup.py
pavel-kirienko/sphinx-computron
71ed04193aa659391435bde56403ffb4503a6b5f
[ "MIT" ]
1
2019-07-13T11:57:05.000Z
2019-07-13T11:57:05.000Z
setup.py
pavel-kirienko/sphinx-computron
71ed04193aa659391435bde56403ffb4503a6b5f
[ "MIT" ]
null
null
null
setup.py
pavel-kirienko/sphinx-computron
71ed04193aa659391435bde56403ffb4503a6b5f
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup setup( name='sphinx_computron', version='1.0.0', packages=['sphinx_computron'], url='https://github.com/pavel-kirienko/sphinx-computron', license='MIT', author='JP Senior, Pavel Kirienko', author_email='pavel.kirienko@gmail.com', descr...
30.357143
117
0.638824
from setuptools import setup setup( name='sphinx_computron', version='1.0.0', packages=['sphinx_computron'], url='https://github.com/pavel-kirienko/sphinx-computron', license='MIT', author='JP Senior, Pavel Kirienko', author_email='pavel.kirienko@gmail.com', description='Sphinx support...
true
true
1c0034cdbf29e099f981f3a6046bdeaefa708348
9,957
py
Python
lingvo/model_registry.py
halostorm/lingvo
0919a77e4fb899e1adb65658523d49098aa9ae3b
[ "Apache-2.0" ]
1
2020-08-04T08:39:35.000Z
2020-08-04T08:39:35.000Z
lingvo/model_registry.py
halostorm/lingvo
0919a77e4fb899e1adb65658523d49098aa9ae3b
[ "Apache-2.0" ]
null
null
null
lingvo/model_registry.py
halostorm/lingvo
0919a77e4fb899e1adb65658523d49098aa9ae3b
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # 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 # ...
36.339416
80
0.713066
from __future__ import absolute_import from __future__ import division from __future__ import print_function import inspect from lingvo import model_imports import lingvo.compat as tf from lingvo.core import base_model_params tf.flags.DEFINE_string( 'model_params_override', '', 'Optional text specifying' ' m...
true
true
1c0035597939fa4daa1455109745ba19907d485c
11,819
py
Python
main/control/user.py
fredatgithub/github-stats
fe795cc7fffe611a843030f6a3fc5a0591b37aec
[ "MIT" ]
6
2018-05-12T22:06:25.000Z
2021-09-25T08:54:08.000Z
main/control/user.py
fredatgithub/github-stats
fe795cc7fffe611a843030f6a3fc5a0591b37aec
[ "MIT" ]
null
null
null
main/control/user.py
fredatgithub/github-stats
fe795cc7fffe611a843030f6a3fc5a0591b37aec
[ "MIT" ]
3
2018-10-30T18:41:25.000Z
2020-05-25T12:17:10.000Z
# coding: utf-8 import copy from flask.ext import login from flask.ext import wtf from google.appengine.ext import ndb from webargs.flaskparser import parser from webargs import fields as wf import flask import wtforms import auth import cache import config import model import task import util from main import app ...
32.02981
98
0.643371
import copy from flask.ext import login from flask.ext import wtf from google.appengine.ext import ndb from webargs.flaskparser import parser from webargs import fields as wf import flask import wtforms import auth import cache import config import model import task import util from main import app @app.route('/a...
true
true
1c00359ea6ef100c133eee6c50b1d8add61678e2
535
py
Python
plenum/server/batch_handlers/pool_batch_handler.py
andkononykhin/plenum
28dc1719f4b7e80d31dafbadb38cfec4da949886
[ "Apache-2.0" ]
148
2017-07-11T19:05:25.000Z
2022-03-16T21:31:20.000Z
plenum/server/batch_handlers/pool_batch_handler.py
andkononykhin/plenum
28dc1719f4b7e80d31dafbadb38cfec4da949886
[ "Apache-2.0" ]
561
2017-06-29T17:59:56.000Z
2022-03-09T15:47:14.000Z
plenum/server/batch_handlers/pool_batch_handler.py
andkononykhin/plenum
28dc1719f4b7e80d31dafbadb38cfec4da949886
[ "Apache-2.0" ]
378
2017-06-29T17:45:27.000Z
2022-03-26T07:27:59.000Z
from plenum.common.constants import POOL_LEDGER_ID from plenum.server.batch_handlers.batch_request_handler import BatchRequestHandler from plenum.server.database_manager import DatabaseManager class PoolBatchHandler(BatchRequestHandler): def __init__(self, database_manager: DatabaseManager): super().__in...
33.4375
82
0.805607
from plenum.common.constants import POOL_LEDGER_ID from plenum.server.batch_handlers.batch_request_handler import BatchRequestHandler from plenum.server.database_manager import DatabaseManager class PoolBatchHandler(BatchRequestHandler): def __init__(self, database_manager: DatabaseManager): super().__in...
true
true
1c0036ffc7778151bb371a0055286afb89291075
6,871
py
Python
util/reggen/gen_rtl.py
wxjstz/opentitan
6ff4397bac9c07373d735bd859c7ef8de39c2af8
[ "Apache-2.0" ]
null
null
null
util/reggen/gen_rtl.py
wxjstz/opentitan
6ff4397bac9c07373d735bd859c7ef8de39c2af8
[ "Apache-2.0" ]
1
2020-10-30T06:30:51.000Z
2020-10-30T06:30:51.000Z
util/reggen/gen_rtl.py
wxjstz/opentitan
6ff4397bac9c07373d735bd859c7ef8de39c2af8
[ "Apache-2.0" ]
1
2019-12-13T00:52:40.000Z
2019-12-13T00:52:40.000Z
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 """Generate SystemVerilog designs from validated register JSON tree """ import logging as log from mako.template import Template from mako import exceptions from pkg_resou...
32.258216
83
0.592054
import logging as log from mako.template import Template from mako import exceptions from pkg_resources import resource_filename from .data import Field, Reg, MultiReg, Window, Block from .field_enums import HwAccess, SwRdAccess, SwWrAccess def escape_name(name): return name.lower().replace(' ', '_') def che...
true
true
1c003856b2ef6f5eb094b20188fb95fb1e66a595
612
py
Python
setup.py
parin13/eth2_public_protos
d592c291d7f6e022a6988f5d3d36f9b1e8b89a2a
[ "MIT" ]
null
null
null
setup.py
parin13/eth2_public_protos
d592c291d7f6e022a6988f5d3d36f9b1e8b89a2a
[ "MIT" ]
null
null
null
setup.py
parin13/eth2_public_protos
d592c291d7f6e022a6988f5d3d36f9b1e8b89a2a
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="mcs_protos", version="1.0.0", author="parishilan", author_email="parishilanrayamajhi@gmail.com", description="A package that makes it easy to create Pypi packages", long_description=l...
26.608696
71
0.665033
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="mcs_protos", version="1.0.0", author="parishilan", author_email="parishilanrayamajhi@gmail.com", description="A package that makes it easy to create Pypi packages", long_description=l...
true
true
1c0039153a00be1f303b5ff65e6279b299f27d8e
1,525
py
Python
data/single_dataset.py
ShivamGuptaHat/pytorch-CycleGAN-and-pix2pix
16121c6d6d7bab6d6675b7bc8c14c5b222c2a797
[ "BSD-3-Clause" ]
null
null
null
data/single_dataset.py
ShivamGuptaHat/pytorch-CycleGAN-and-pix2pix
16121c6d6d7bab6d6675b7bc8c14c5b222c2a797
[ "BSD-3-Clause" ]
null
null
null
data/single_dataset.py
ShivamGuptaHat/pytorch-CycleGAN-and-pix2pix
16121c6d6d7bab6d6675b7bc8c14c5b222c2a797
[ "BSD-3-Clause" ]
null
null
null
from data.base_dataset import BaseDataset, get_transform from data.image_folder import make_dataset from PIL import Image class SingleDataset(BaseDataset): """This dataset class can load a set of images specified by the path --dataroot /path/to/data. It can be used for generating CycleGAN results only for on...
36.309524
105
0.651148
from data.base_dataset import BaseDataset, get_transform from data.image_folder import make_dataset from PIL import Image class SingleDataset(BaseDataset): def __init__(self, opt): BaseDataset.__init__(self, opt) self.A_paths = sorted(make_dataset(opt.dataroot, opt.max_dataset_size)) inpu...
true
true
1c00397a01048c915246a7bcf1d4b0cffd4fde3f
32,258
py
Python
src/Python27Packages/py_modelica_exporter/py_modelica_exporter/exporters.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
src/Python27Packages/py_modelica_exporter/py_modelica_exporter/exporters.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
src/Python27Packages/py_modelica_exporter/py_modelica_exporter/exporters.py
lefevre-fraser/openmeta-mms
08f3115e76498df1f8d70641d71f5c52cab4ce5f
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import print_function import six from six.moves import range __author__ = 'Zsolt' import logging import json import os import sys import collections from .omc_session import OMCSession from .modelica_classes import Connector, Extend, Parameter, Red...
42.556728
154
0.586428
from __future__ import absolute_import from __future__ import print_function import six from six.moves import range __author__ = 'Zsolt' import logging import json import os import sys import collections from .omc_session import OMCSession from .modelica_classes import Connector, Extend, Parameter, Red...
true
true
1c003a260769c9ba2966de8150ee5cf6b458665f
529
py
Python
3-Publish_Subscribe/send.py
MaiconMares/RabbitMQ-Distributed-Programming
de7e8192847fc3afd9234b113eb7d88c275d1e25
[ "MIT" ]
null
null
null
3-Publish_Subscribe/send.py
MaiconMares/RabbitMQ-Distributed-Programming
de7e8192847fc3afd9234b113eb7d88c275d1e25
[ "MIT" ]
null
null
null
3-Publish_Subscribe/send.py
MaiconMares/RabbitMQ-Distributed-Programming
de7e8192847fc3afd9234b113eb7d88c275d1e25
[ "MIT" ]
null
null
null
import pika # Inicia a conexão e cria o canal de conexao connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() # Cria um exchange que envia todas as mensagens que chega a ele a # todas as filas que ele conhece channel.exchange_declare(exchange='logs', exchange_typ...
29.388889
76
0.703214
import pika connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() channel.exchange_declare(exchange='logs', exchange_type='fanout') channel.basic_publish(exchange='logs', routing_key='', body='Bonjour, comment-allez...
true
true
1c003a8e749cae9308840b8d4220e553eab1ee2e
345
py
Python
rc/test/util.py
mfornet/python-rc
6cd0c17d987fc061dd5504e950e3cfad4e91a8e7
[ "BSD-3-Clause" ]
1
2020-03-10T04:53:36.000Z
2020-03-10T04:53:36.000Z
rc/test/util.py
mfornet/python-rc
6cd0c17d987fc061dd5504e950e3cfad4e91a8e7
[ "BSD-3-Clause" ]
4
2020-03-24T18:03:54.000Z
2020-04-22T05:24:36.000Z
rc/test/util.py
mfornet/python-rc
6cd0c17d987fc061dd5504e950e3cfad4e91a8e7
[ "BSD-3-Clause" ]
1
2020-03-27T19:43:20.000Z
2020-03-27T19:43:20.000Z
from timeit import default_timer as timer from humanfriendly import format_timespan class Timer(): def __init__(self, action): self.action = action def __enter__(self): self.start = timer() def __exit__(self, type, value, traceback): print("Time to", self.action+":", format_times...
24.642857
78
0.678261
from timeit import default_timer as timer from humanfriendly import format_timespan class Timer(): def __init__(self, action): self.action = action def __enter__(self): self.start = timer() def __exit__(self, type, value, traceback): print("Time to", self.action+":", format_times...
true
true
1c003b15213ee0a1b562f2514166a3675581a975
465
py
Python
tests/handlers.py
Tijani-Dia/yrouter
9836bde3e9665136f85a702856600a371bbce2bf
[ "BSD-3-Clause" ]
null
null
null
tests/handlers.py
Tijani-Dia/yrouter
9836bde3e9665136f85a702856600a371bbce2bf
[ "BSD-3-Clause" ]
null
null
null
tests/handlers.py
Tijani-Dia/yrouter
9836bde3e9665136f85a702856600a371bbce2bf
[ "BSD-3-Clause" ]
null
null
null
def articles_handler(): pass def catchall(): pass def home_handler(): pass def users_handler(): pass def article_categories(): pass def category(): pass def day_handler(): pass def handler_2020(): pass def month_handler(): pass def newest(): pass def year_hand...
7.881356
25
0.617204
def articles_handler(): pass def catchall(): pass def home_handler(): pass def users_handler(): pass def article_categories(): pass def category(): pass def day_handler(): pass def handler_2020(): pass def month_handler(): pass def newest(): pass def year_hand...
true
true
1c003bdd35e12c2261aca092025e5832fead4c58
26,900
py
Python
keras/engine/compile_utils.py
tsheaff/keras
ee227dda766d769b7499a5549e8ed77b5e88105b
[ "Apache-2.0" ]
1
2020-02-02T04:43:33.000Z
2020-02-02T04:43:33.000Z
keras/engine/compile_utils.py
tsheaff/keras
ee227dda766d769b7499a5549e8ed77b5e88105b
[ "Apache-2.0" ]
1
2022-02-03T12:41:50.000Z
2022-02-03T12:47:45.000Z
keras/engine/compile_utils.py
tsheaff/keras
ee227dda766d769b7499a5549e8ed77b5e88105b
[ "Apache-2.0" ]
1
2020-12-13T22:14:48.000Z
2020-12-13T22:14:48.000Z
# Copyright 2019 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 applic...
34.935065
86
0.682119
import copy from keras import losses as losses_mod from keras import metrics as metrics_mod from keras.utils import generic_utils from keras.utils import losses_utils from keras.utils import tf_utils import tensorflow.compat.v2 as tf class Container: def __init__(self, output_names=None): self._output_names ...
true
true
1c003c39f5faa7a54a61f1327767c51fe8353177
818
py
Python
leetcode/p451.py
mythnc/lab
9f69482a063e3cfce2ce8832c2ef1425658c31b9
[ "MIT" ]
null
null
null
leetcode/p451.py
mythnc/lab
9f69482a063e3cfce2ce8832c2ef1425658c31b9
[ "MIT" ]
null
null
null
leetcode/p451.py
mythnc/lab
9f69482a063e3cfce2ce8832c2ef1425658c31b9
[ "MIT" ]
null
null
null
from collections import Counter class Solution: # 54 ms def frequencySort(self, s: str) -> str: count = Counter(s) return "".join(char * times for char, times in count.most_common()) # 65 ms def frequencySort_s(self, s: str) -> str: count = Counter(s) result = "" ...
24.787879
107
0.537897
from collections import Counter class Solution: def frequencySort(self, s: str) -> str: count = Counter(s) return "".join(char * times for char, times in count.most_common()) def frequencySort_s(self, s: str) -> str: count = Counter(s) result = "" for char, tim...
true
true
1c003d766c686948f2572ef756a043694db43f69
8,511
py
Python
integration/experiment/power_sweep/gen_plot_node_efficiency.py
asmaalrawi/geopm
e93548dfdd693a17c81163787ba467891937356d
[ "BSD-3-Clause" ]
null
null
null
integration/experiment/power_sweep/gen_plot_node_efficiency.py
asmaalrawi/geopm
e93548dfdd693a17c81163787ba467891937356d
[ "BSD-3-Clause" ]
null
null
null
integration/experiment/power_sweep/gen_plot_node_efficiency.py
asmaalrawi/geopm
e93548dfdd693a17c81163787ba467891937356d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, Intel Corporation # # 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 copyrig...
42.984848
119
0.663377
import sys import os import pandas import matplotlib.pyplot as plt import argparse import geopmpy.io from experiment import common_args from experiment import machine def generate_histogram(data, app_name, min_drop, max_drop, label, bin_size, xprecision, output_dir): data = data[label] ...
true
true
1c003f01f795da062e4aa64f97d7fdd15ab1772a
19,964
py
Python
sap/aibus/dar/client/model_manager_client.py
Juliana-Morais/data-attribute-recommendation-python-sdk
95afcfff97ec4f71c5bf10953c0dfa813635636e
[ "Apache-2.0" ]
null
null
null
sap/aibus/dar/client/model_manager_client.py
Juliana-Morais/data-attribute-recommendation-python-sdk
95afcfff97ec4f71c5bf10953c0dfa813635636e
[ "Apache-2.0" ]
null
null
null
sap/aibus/dar/client/model_manager_client.py
Juliana-Morais/data-attribute-recommendation-python-sdk
95afcfff97ec4f71c5bf10953c0dfa813635636e
[ "Apache-2.0" ]
null
null
null
""" Client API for the Model Manager microservice. """ # pylint: disable=fixme import typing from sap.aibus.dar.client.base_client import BaseClientWithSession from sap.aibus.dar.client.exceptions import ( TrainingJobFailed, TrainingJobTimeOut, DeploymentTimeOut, DeploymentFailed, ) from sap.aibus.d...
35.086116
121
0.639701
import typing from sap.aibus.dar.client.base_client import BaseClientWithSession from sap.aibus.dar.client.exceptions import ( TrainingJobFailed, TrainingJobTimeOut, DeploymentTimeOut, DeploymentFailed, ) from sap.aibus.dar.client.model_manager_constants import ( JobStatus, DeploymentStatus,...
true
true
1c00403ff2373d2fb9a349252a315bcd699cefc9
3,927
py
Python
ssiosinstaller/context.py
leopf/ssi-os
9d14e29f8dd02bbea4868797a34898d0930ded6c
[ "MIT" ]
null
null
null
ssiosinstaller/context.py
leopf/ssi-os
9d14e29f8dd02bbea4868797a34898d0930ded6c
[ "MIT" ]
null
null
null
ssiosinstaller/context.py
leopf/ssi-os
9d14e29f8dd02bbea4868797a34898d0930ded6c
[ "MIT" ]
null
null
null
from abc import abstractclassmethod import subprocess from typing import List, TypedDict from paramiko import SSHClient, AutoAddPolicy def escape_subcommand(command: str): return command.replace("\\", "\\\\").replace("'", "\\'") class CommandResult(TypedDict): stderr: str stdout: str class InstallConfig(...
28.664234
110
0.621085
from abc import abstractclassmethod import subprocess from typing import List, TypedDict from paramiko import SSHClient, AutoAddPolicy def escape_subcommand(command: str): return command.replace("\\", "\\\\").replace("'", "\\'") class CommandResult(TypedDict): stderr: str stdout: str class InstallConfig(...
true
true
1c0040ac62002f953e15d2e87af2bd7ae083a9a8
324
py
Python
geoloc-server/routerinfo/__init__.py
muzammilar/passport
7918561916fbcb5e82cd73d577873fb17a819d19
[ "BSD-3-Clause" ]
1
2021-12-06T01:32:56.000Z
2021-12-06T01:32:56.000Z
geoloc-server/routerinfo/__init__.py
muzammilar/passport
7918561916fbcb5e82cd73d577873fb17a819d19
[ "BSD-3-Clause" ]
null
null
null
geoloc-server/routerinfo/__init__.py
muzammilar/passport
7918561916fbcb5e82cd73d577873fb17a819d19
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ routerinfo ~~~~~~ A module to convert multiple router IP address aliases to a single router IP address. :author: Muzammil Abdul Rehman :copyright: Northeastern University © 2018. :license: Custom BSD, see LICENSE for more details. :email: passport@ccs.neu.edu ...
21.6
89
0.654321
true
true
1c00412a03740e24ba3b77cc35128df9fedb5232
7,236
py
Python
tools/psptools/psptool/prx.py
DaveeFTW/infinity
6a4f269f8abcf65696064cad94ba9ac8b845bd74
[ "MIT" ]
137
2019-11-10T16:12:16.000Z
2022-03-27T23:32:15.000Z
tools/psptools/psptool/prx.py
DaveeFTW/infinity
6a4f269f8abcf65696064cad94ba9ac8b845bd74
[ "MIT" ]
12
2019-11-11T20:37:05.000Z
2021-11-14T17:18:56.000Z
tools/psptools/psptool/prx.py
DaveeFTW/infinity
6a4f269f8abcf65696064cad94ba9ac8b845bd74
[ "MIT" ]
49
2019-11-15T02:37:05.000Z
2022-03-28T20:04:49.000Z
import struct import hashlib from Crypto.Util.strxor import strxor as xor from Crypto.Hash import SHA1 import psptool.kirk import psptool.prxtypes.type2 as type2 import psptool.prxtypes.type6 as type6 import psptool.prxtypes.type8 as type8 import psptool.prxtypes.type9 as type9 _metatypes = { 0x457B8AF0: { ...
32.44843
307
0.686429
import struct import hashlib from Crypto.Util.strxor import strxor as xor from Crypto.Hash import SHA1 import psptool.kirk import psptool.prxtypes.type2 as type2 import psptool.prxtypes.type6 as type6 import psptool.prxtypes.type8 as type8 import psptool.prxtypes.type9 as type9 _metatypes = { 0x457B8AF0: { ...
true
true
1c0041ae58f6ff97eecee9d82c1fbb31d3ce32cd
1,509
py
Python
tests/test_api_views.py
Amir-4m/django-pickled-model
9b04af0fe2c58309a617e91b7e27f4a9ec035a08
[ "MIT" ]
1
2022-01-21T11:27:57.000Z
2022-01-21T11:27:57.000Z
tests/test_api_views.py
Amir-4m/django-pickled-model
9b04af0fe2c58309a617e91b7e27f4a9ec035a08
[ "MIT" ]
null
null
null
tests/test_api_views.py
Amir-4m/django-pickled-model
9b04af0fe2c58309a617e91b7e27f4a9ec035a08
[ "MIT" ]
null
null
null
import logging from django.contrib.auth.models import User from django.test import RequestFactory from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase, APIClient from authentication.models import UserVerificationRequest from config.models import Config from gen...
36.804878
113
0.721007
import logging from django.contrib.auth.models import User from django.test import RequestFactory from django.urls import reverse from rest_framework import status from rest_framework.test import APITestCase, APIClient from authentication.models import UserVerificationRequest from config.models import Config from gen...
true
true
1c0041b5ecfd38e92c2ec7b9468471892440cf28
510
py
Python
tests/test_bar.py
Kadiska/ascii_art
75a51bf4344aa44308416c812696b527afc79fcb
[ "MIT" ]
10
2016-10-06T02:11:41.000Z
2020-04-15T20:15:08.000Z
tests/test_bar.py
Kadiska/ascii_art
75a51bf4344aa44308416c812696b527afc79fcb
[ "MIT" ]
1
2022-01-28T10:00:12.000Z
2022-01-28T10:00:12.000Z
tests/test_bar.py
Kadiska/ascii_art
75a51bf4344aa44308416c812696b527afc79fcb
[ "MIT" ]
2
2017-10-03T14:43:17.000Z
2022-01-28T10:00:54.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from ascii_art import Bar def test_bar(): data = { "cats": 6, "ferrets": 15, "dogs": 2, } bar = Bar(data, bar_char="=", width=20, sort=True) expected_output = '\n'.join( [ '', 'ferrets | ============...
21.25
54
0.358824
from ascii_art import Bar def test_bar(): data = { "cats": 6, "ferrets": 15, "dogs": 2, } bar = Bar(data, bar_char="=", width=20, sort=True) expected_output = '\n'.join( [ '', 'ferrets | ==================== | 15', ' cats | =======...
true
true
1c00430817cc677381a8dcbd3130fe7665128238
13,724
py
Python
mys/transpiler/header_visitor.py
eerimoq/mys
40c7e7abd745f6da4f7a31379fed84bdd6f2e318
[ "MIT" ]
83
2020-08-18T18:48:46.000Z
2021-01-01T17:00:45.000Z
mys/transpiler/header_visitor.py
eerimoq/mys
40c7e7abd745f6da4f7a31379fed84bdd6f2e318
[ "MIT" ]
13
2020-08-24T20:58:22.000Z
2020-12-17T09:56:13.000Z
mys/transpiler/header_visitor.py
eerimoq/mys
40c7e7abd745f6da4f7a31379fed84bdd6f2e318
[ "MIT" ]
5
2020-08-26T09:23:19.000Z
2020-11-23T13:29:22.000Z
import textwrap from collections import defaultdict from ..parser import ast from .base import BaseVisitor from .context import Context from .generics import TypeVisitor from .generics import add_generic_class from .generics import format_parameters from .utils import CompileError from .utils import GenericType from ....
35.371134
86
0.555159
import textwrap from collections import defaultdict from ..parser import ast from .base import BaseVisitor from .context import Context from .generics import TypeVisitor from .generics import add_generic_class from .generics import format_parameters from .utils import CompileError from .utils import GenericType from ....
true
true
1c004319d3b1045adb165f9ad858bb29e94ca828
3,642
py
Python
controllers/notion_controller.py
anggelomos/bulloh
44343fe71aff8803e7a23dd65aa101dbce35cd84
[ "MIT" ]
2
2022-03-01T19:05:39.000Z
2022-03-04T23:26:02.000Z
controllers/notion_controller.py
anggelomos/bulloh
44343fe71aff8803e7a23dd65aa101dbce35cd84
[ "MIT" ]
null
null
null
controllers/notion_controller.py
anggelomos/bulloh
44343fe71aff8803e7a23dd65aa101dbce35cd84
[ "MIT" ]
null
null
null
import datetime import logging import statistics from typing import List, Tuple import requests from controllers.general_utilities import GeneralUtilities as gu from data.payloads.notion_payloads import NotionPayloads from data.tasks.task_notion_parameters import TaskNotionParameters as tnp from data.tasks.task_data i...
37.546392
111
0.657606
import datetime import logging import statistics from typing import List, Tuple import requests from controllers.general_utilities import GeneralUtilities as gu from data.payloads.notion_payloads import NotionPayloads from data.tasks.task_notion_parameters import TaskNotionParameters as tnp from data.tasks.task_data i...
true
true
1c004370e7d0f94c85fa4b27e41a0704c49d2caa
5,917
py
Python
datasets/duorc/duorc.py
ExpressAI/DataLab
c3eddd4068f131d031c2486c60b650092bb0ae84
[ "Apache-2.0" ]
54
2022-01-26T06:58:58.000Z
2022-03-31T05:11:35.000Z
datasets/duorc/duorc.py
ExpressAI/DataLab
c3eddd4068f131d031c2486c60b650092bb0ae84
[ "Apache-2.0" ]
81
2022-01-26T06:46:41.000Z
2022-03-24T05:05:31.000Z
datasets/duorc/duorc.py
ExpressAI/DataLab
c3eddd4068f131d031c2486c60b650092bb0ae84
[ "Apache-2.0" ]
7
2022-02-06T09:28:31.000Z
2022-03-16T01:06:37.000Z
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and DataLab Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
36.98125
181
0.561264
import json import datalabs from datalabs import get_task, TaskType _CITATION = """\ @inproceedings{DuoRC, author = { Amrita Saha and Rahul Aralikatte and Mitesh M. Khapra and Karthik Sankaranarayanan},\ title = {{DuoRC: Towards Complex Language Understanding with Paraphrased Reading Comprehension}}, booktitle = {M...
true
true
1c00438a44c897a27d141937f6b69fac532e90f1
98,147
py
Python
src/ui/game_widget_test.py
cpatrasciuc/schnapsen-card-game
e5131ae91c71d341968d682fd625aff3f97cc516
[ "BSD-3-Clause" ]
null
null
null
src/ui/game_widget_test.py
cpatrasciuc/schnapsen-card-game
e5131ae91c71d341968d682fd625aff3f97cc516
[ "BSD-3-Clause" ]
18
2021-06-03T01:54:51.000Z
2022-03-30T06:12:08.000Z
src/ui/game_widget_test.py
cpatrasciuc/schnapsen-card-game
e5131ae91c71d341968d682fd625aff3f97cc516
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021 Cristian Patrasciuc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=too-many-lines,too-many-statements,too-many-locals # pylint: disable=too-many-public-methods,too-many-ancestors import logging impor...
45.649767
80
0.736273
import logging import os import platform import random import unittest from collections import Counter from typing import Tuple, List, Optional from unittest.mock import Mock from kivy.base import EventLoop from kivy.metrics import dp from kivy.tests.common import UnitTestTouch from model.card import Card from mode...
true
true
1c00438eb8ab9613bd740eb2aea3d3d060a364f7
30,570
py
Python
chatbot_env/Lib/site-packages/sklearn/tests/test_naive_bayes.py
rakmakan/Chatbot
d04bc1526b56961a16c25148d9ef18c4f157e9c4
[ "MIT" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
chatbot_env/Lib/site-packages/sklearn/tests/test_naive_bayes.py
rakmakan/Chatbot
d04bc1526b56961a16c25148d9ef18c4f157e9c4
[ "MIT" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
site-packages/sklearn/tests/test_naive_bayes.py
Wristlebane/Pyto
901ac307b68486d8289105c159ca702318bea5b0
[ "MIT" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
import pickle from io import BytesIO import numpy as np import scipy.sparse import pytest from sklearn.datasets import load_digits, load_iris from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.utils._testing import assert_almost_equal from sklearn.u...
36.392857
82
0.638371
import pickle from io import BytesIO import numpy as np import scipy.sparse import pytest from sklearn.datasets import load_digits, load_iris from sklearn.model_selection import train_test_split from sklearn.model_selection import cross_val_score from sklearn.utils._testing import assert_almost_equal from sklearn.u...
true
true
1c0043ec407e68d96f90e16b13b74224870e2d58
47,623
py
Python
python/ccxt/async_support/bigone.py
jc-emx/ccxt
5e9457c9b9bd25c1080a9a2fa3beb1f5a31ee646
[ "MIT" ]
1
2021-10-16T17:00:03.000Z
2021-10-16T17:00:03.000Z
python/ccxt/async_support/bigone.py
jc-emx/ccxt
5e9457c9b9bd25c1080a9a2fa3beb1f5a31ee646
[ "MIT" ]
2
2020-05-12T12:53:48.000Z
2020-07-05T12:59:52.000Z
python/ccxt/async_support/bigone.py
jc-emx/ccxt
5e9457c9b9bd25c1080a9a2fa3beb1f5a31ee646
[ "MIT" ]
3
2020-04-01T05:56:19.000Z
2020-06-24T10:17:13.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import A...
40.052986
214
0.455788
from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import PermissionDenied from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import BadRequest from ccxt.base.errors impor...
true
true
1c0043fd82662710a6178dc298ea5ef13612e922
30,696
py
Python
src/tests/api/test_subevents.py
inwwin/pretix
c3bfb57d3e46577f54c1a32c7a8b61df570c272e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/api/test_subevents.py
inwwin/pretix
c3bfb57d3e46577f54c1a32c7a8b61df570c272e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/tests/api/test_subevents.py
inwwin/pretix
c3bfb57d3e46577f54c1a32c7a8b61df570c272e
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from datetime import datetime from decimal import Decimal from unittest import mock import pytest from django_countries.fields import Country from django_scopes import scopes_disabled from pytz import UTC from pretix.base.models import ( InvoiceAddress, Order, OrderPosition, SeatingPlan, SubEvent, ) from pretix.b...
33.880795
133
0.554014
from datetime import datetime from decimal import Decimal from unittest import mock import pytest from django_countries.fields import Country from django_scopes import scopes_disabled from pytz import UTC from pretix.base.models import ( InvoiceAddress, Order, OrderPosition, SeatingPlan, SubEvent, ) from pretix.b...
true
true
1c0045f30a3e0692c5390efce7971ebc1571d858
7,789
py
Python
lithops/serverless/backends/knative/config.py
pablogs98/lithops
ab73af96d168b17594477d36195c652ec58199da
[ "Apache-2.0" ]
null
null
null
lithops/serverless/backends/knative/config.py
pablogs98/lithops
ab73af96d168b17594477d36195c652ec58199da
[ "Apache-2.0" ]
null
null
null
lithops/serverless/backends/knative/config.py
pablogs98/lithops
ab73af96d168b17594477d36195c652ec58199da
[ "Apache-2.0" ]
null
null
null
# # (C) Copyright IBM Corp. 2019 # (C) Copyright Cloudlab URV 2020 # # 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...
29.503788
97
0.646938
import os import sys import shutil import subprocess as sp from lithops.version import __version__ from lithops.utils import version_str CONTAINER_REGISTRY = 'docker.io' RUNTIME_NAME = 'lithops-knative' DEFAULT_GROUP = "serving.knative.dev" DEFAULT_VERSION = "v1" BUILD_GIT_URL = 'https://github.com/lithops-cloud/li...
true
true
1c0046a2c07720d5d3cbb647e82ac9ba4e60ba2d
6,805
py
Python
tests/test_parser.py
KMilhan/nats.py
02904bd699ba191cd7d9b395eff3f08ed01477f1
[ "Apache-2.0" ]
null
null
null
tests/test_parser.py
KMilhan/nats.py
02904bd699ba191cd7d9b395eff3f08ed01477f1
[ "Apache-2.0" ]
null
null
null
tests/test_parser.py
KMilhan/nats.py
02904bd699ba191cd7d9b395eff3f08ed01477f1
[ "Apache-2.0" ]
null
null
null
import asyncio import sys import unittest from nats.errors import ProtocolError from nats.aio.client import Subscription from nats.protocol.parser import * from tests.utils import async_test class MockNatsClient: def __init__(self): self._subs = {} self._pongs = [] self._pings_outstandin...
29.458874
138
0.595151
import asyncio import sys import unittest from nats.errors import ProtocolError from nats.aio.client import Subscription from nats.protocol.parser import * from tests.utils import async_test class MockNatsClient: def __init__(self): self._subs = {} self._pongs = [] self._pings_outstandin...
true
true
1c00491a3775513aa94befa2a2d4748b045ccc2b
331
py
Python
pypy/translator/c/winproj/standalone/pypytest_slp.py
camillobruni/pygirl
ddbd442d53061d6ff4af831c1eab153bcc771b5a
[ "MIT" ]
12
2016-01-06T07:10:28.000Z
2021-05-13T23:02:02.000Z
pypy/translator/c/winproj/standalone/pypytest_slp.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
null
null
null
pypy/translator/c/winproj/standalone/pypytest_slp.py
woodrow/pyoac
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
[ "MIT" ]
2
2016-07-29T07:09:50.000Z
2016-10-16T08:50:26.000Z
from stackless import * c1 = coroutine() c2 = coroutine() def f(name, n, other): print "starting", name, n for i in xrange(n): print name, i, "switching to", other other.switch() print name, i, "back from", other return name c1.bind(f, "eins", 10, c2) c2.bind(f, "zwei", 10, c1) c...
18.388889
44
0.586103
from stackless import * c1 = coroutine() c2 = coroutine() def f(name, n, other): print "starting", name, n for i in xrange(n): print name, i, "switching to", other other.switch() print name, i, "back from", other return name c1.bind(f, "eins", 10, c2) c2.bind(f, "zwei", 10, c1) c...
false
true
1c004921fc924ad0127fc62a078c01ee1bcf5234
1,225
py
Python
setup.py
remignot/basilic_ipy
4a54bc8caedeaefe644dfbf6052290b9320c17c8
[ "MIT" ]
null
null
null
setup.py
remignot/basilic_ipy
4a54bc8caedeaefe644dfbf6052290b9320c17c8
[ "MIT" ]
null
null
null
setup.py
remignot/basilic_ipy
4a54bc8caedeaefe644dfbf6052290b9320c17c8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # ------------------------------------------------------------------------------ """ Setup file of ipon. Author: Rémi Mignot, 2020. """ from setuptools import setup # Load requirements: with open('requirements.txt') as f: requirements = f.read().splitlines() # Problem with 'ins...
27.222222
80
0.515918
from setuptools import setup with open('requirements.txt') as f: requirements = f.read().splitlines() for req in requirements: if req.find( '://' ) != -1: requirements.remove( req ); setup( name = 'ipon', version = '0.1.1', author = 'Rémi Mignot', packages = [ 'ipon'...
true
true
1c004a52bddd4be296735985cac689861bd7fecd
2,060
py
Python
tests/case_manager/test_case_data_manager.py
IfengAutomation/uitester
6f9c78c86965b05efea875d38dbd9587386977fa
[ "Apache-2.0" ]
4
2016-07-12T09:01:52.000Z
2016-12-07T03:11:02.000Z
tests/case_manager/test_case_data_manager.py
IfengAutomation/uitester
6f9c78c86965b05efea875d38dbd9587386977fa
[ "Apache-2.0" ]
null
null
null
tests/case_manager/test_case_data_manager.py
IfengAutomation/uitester
6f9c78c86965b05efea875d38dbd9587386977fa
[ "Apache-2.0" ]
3
2016-11-29T02:13:17.000Z
2019-10-16T06:25:20.000Z
# @Time : 2016/9/1 21:04 # @Author : lixintong import datetime import os import unittest from uitester.case_manager.case_manager import CaseManager class TestCaseDataManager(unittest.TestCase): def setUp(self): self.case_data_manager = CaseManager() self.package_name = '' def test_export...
46.818182
111
0.613107
import datetime import os import unittest from uitester.case_manager.case_manager import CaseManager class TestCaseDataManager(unittest.TestCase): def setUp(self): self.case_data_manager = CaseManager() self.package_name = '' def test_export_and_import_data(self): pri...
true
true
1c004a9d14c09a8c08925b2a264544c82f640553
1,732
py
Python
contentcuration/contentcuration/tests/test_settings.py
DXCanas/content-curation
06ac2cf2a49d2420cb8a418f5df2bfee53ef644b
[ "MIT" ]
1
2019-03-30T18:14:25.000Z
2019-03-30T18:14:25.000Z
contentcuration/contentcuration/tests/test_settings.py
DXCanas/content-curation
06ac2cf2a49d2420cb8a418f5df2bfee53ef644b
[ "MIT" ]
2
2019-04-06T07:06:08.000Z
2019-04-08T23:33:53.000Z
contentcuration/contentcuration/tests/test_settings.py
MisRob/studio
92a5c780c8952f7d37db38952483ab7a28d3cb9d
[ "MIT" ]
1
2020-10-20T05:21:56.000Z
2020-10-20T05:21:56.000Z
import json from django.core.urlresolvers import reverse_lazy from .base import BaseAPITestCase from contentcuration.models import User from contentcuration.views.settings import DeleteAccountView from contentcuration.views.settings import UsernameChangeView class SettingsTestCase(BaseAPITestCase): def test_use...
46.810811
130
0.705543
import json from django.core.urlresolvers import reverse_lazy from .base import BaseAPITestCase from contentcuration.models import User from contentcuration.views.settings import DeleteAccountView from contentcuration.views.settings import UsernameChangeView class SettingsTestCase(BaseAPITestCase): def test_use...
true
true
1c004c683c09aba5e8cbab6dad54850822408dd7
268
py
Python
zwnlptk/__version__.py
njzhaowei/zwnlptk
d29657e546e52723de39896dd8b2e2f9f1f513b2
[ "MIT" ]
null
null
null
zwnlptk/__version__.py
njzhaowei/zwnlptk
d29657e546e52723de39896dd8b2e2f9f1f513b2
[ "MIT" ]
null
null
null
zwnlptk/__version__.py
njzhaowei/zwnlptk
d29657e546e52723de39896dd8b2e2f9f1f513b2
[ "MIT" ]
null
null
null
__version__ = '0.0.1' __title__ = 'zwnlptk' __description__ = 'Personal nlp utils.' __url__ = 'https://github.com/njzhaowei/%s'%__title__ __author__ = 'Zhao Wei' __author_email__ = 'yewberry@163.com' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2020 Zhao Wei'
33.5
53
0.746269
__version__ = '0.0.1' __title__ = 'zwnlptk' __description__ = 'Personal nlp utils.' __url__ = 'https://github.com/njzhaowei/%s'%__title__ __author__ = 'Zhao Wei' __author_email__ = 'yewberry@163.com' __license__ = 'Apache 2.0' __copyright__ = 'Copyright 2020 Zhao Wei'
true
true
1c004d546776fa77fbf2f93901ff1784639e3251
19,672
py
Python
provision/env/lib/python3.6/site-packages/ansible/plugins/inventory/vmware_vm_inventory.py
brightkan/tukole-frontend
45e1d82a4ae5a65e88e7434f67d4d1a88f462e96
[ "MIT" ]
1
2020-03-29T18:41:01.000Z
2020-03-29T18:41:01.000Z
ansible/ansible/plugins/inventory/vmware_vm_inventory.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
7
2020-09-07T17:27:56.000Z
2022-03-02T06:25:46.000Z
ansible/ansible/plugins/inventory/vmware_vm_inventory.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
1
2020-10-30T12:48:24.000Z
2020-10-30T12:48:24.000Z
# # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' name: vm...
40.394251
154
0.608428
from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' name: vmware_vm_inventory plugin_type: inventory short_description: VMware Guest inventory source version_added: "2.7" author: - Abhijeet Kasurde (@Akasurde) description: -...
true
true
1c004e08cabe4742862130c496a4ce502e630671
1,493
py
Python
thumbnails/processors.py
SeiryuZ/django-thumbnails
826e5bd36eccb9381dcc6fc616711abec08423c5
[ "MIT" ]
null
null
null
thumbnails/processors.py
SeiryuZ/django-thumbnails
826e5bd36eccb9381dcc6fc616711abec08423c5
[ "MIT" ]
null
null
null
thumbnails/processors.py
SeiryuZ/django-thumbnails
826e5bd36eccb9381dcc6fc616711abec08423c5
[ "MIT" ]
null
null
null
import io from django.core.files.base import ContentFile from da_vinci import images def resize(image, **kwargs): """ Resized an image based on given width and height """ image.resize(**kwargs) return image def rotate(image, **kwargs): """ Rotates an argument by X degrees. """ ...
21.028169
76
0.649699
import io from django.core.files.base import ContentFile from da_vinci import images def resize(image, **kwargs): image.resize(**kwargs) return image def rotate(image, **kwargs): image.rotate(**kwargs) return image def flip(image, **kwargs): image.flip(**kwargs) return image def crop(i...
true
true
1c004e2d4d896ac25e334a64c23a21f2ea203173
9,330
py
Python
classifier/run_classifier_utils.py
googleinterns/smart-content-summary
595c8e2cb0e160a87cacb954a2a030953fdce6c5
[ "Apache-2.0" ]
5
2020-05-25T23:27:42.000Z
2022-01-15T08:57:47.000Z
classifier/run_classifier_utils.py
googleinterns/smart-content-summary
595c8e2cb0e160a87cacb954a2a030953fdce6c5
[ "Apache-2.0" ]
6
2020-11-13T18:56:37.000Z
2022-02-10T02:13:31.000Z
classifier/run_classifier_utils.py
googleinterns/smart-content-summary
595c8e2cb0e160a87cacb954a2a030953fdce6c5
[ "Apache-2.0" ]
2
2020-09-02T08:06:18.000Z
2021-10-31T16:56:16.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
39.702128
84
0.639335
from __future__ import absolute_import, division, print_function from bert import modeling, optimization import tensorflow as tf class LaserTaggerConfig(modeling.BertConfig): def __init__(self, **kwargs): super(LaserTaggerConfig, self).__init__(**kwargs) class ModelFnBuilder(object): def __init__(self, co...
true
true
1c004fc28d0bea49726bb19b7240c4ec856787e7
336
py
Python
ex/gauss.py
wyli/cpp-py-example
8ad6fd8f0b4a4f4ddcde2f21099fc9d914cc0f36
[ "BSD-3-Clause" ]
null
null
null
ex/gauss.py
wyli/cpp-py-example
8ad6fd8f0b4a4f4ddcde2f21099fc9d914cc0f36
[ "BSD-3-Clause" ]
20
2017-03-17T12:15:12.000Z
2017-03-25T12:44:10.000Z
ex/gauss.py
dzhoshkun/cpp-python-wrapper-example
a5a09f1a5d93565dadb082aefa2807e1d157187f
[ "BSD-3-Clause" ]
1
2019-09-10T11:03:46.000Z
2019-09-10T11:03:46.000Z
#!/usr/bin/env python3 from pymycpp import Bitmap import scipy.ndimage as ndi if __name__ == '__main__': img = Bitmap('baboon.bmp') data_np = img.data() ndi.gaussian_filter(input=data_np, sigma=(5, 15, 0), order=0, output=data_np) ...
18.666667
41
0.526786
from pymycpp import Bitmap import scipy.ndimage as ndi if __name__ == '__main__': img = Bitmap('baboon.bmp') data_np = img.data() ndi.gaussian_filter(input=data_np, sigma=(5, 15, 0), order=0, output=data_np) img.save()
true
true
1c004fc46c482951acfe5122fc17d4eb352fb683
392
py
Python
jupyter/cWebConn/d_selenium_class/Ex02_google.py
WoolinChoi/test
a0f9c8ecc63443acaae61d744eecec6c943d3a26
[ "MIT" ]
null
null
null
jupyter/cWebConn/d_selenium_class/Ex02_google.py
WoolinChoi/test
a0f9c8ecc63443acaae61d744eecec6c943d3a26
[ "MIT" ]
1
2021-03-30T09:01:47.000Z
2021-03-30T09:01:47.000Z
jupyter/cWebConn/d_selenium_class/Ex02_google.py
WoolinChoi/test
a0f9c8ecc63443acaae61d744eecec6c943d3a26
[ "MIT" ]
1
2019-12-06T18:21:10.000Z
2019-12-06T18:21:10.000Z
''' 1. 크롬웹드라이버로 구글 사이트 열기 2. 실제 크롬창에서 '플레이데이터'라고 검색버튼을 누른다. 개발자모드(F12)에서 이 부분을 보면 <input name='q' value='플레이데이터'~~ > 그리고 'google검색' 버튼이 type='submit' 인거 확인 ''' from selenium import webdriver driver = webdriver.Chrome("./webdriver/chromedriver.exe") driver.get("http://www.google.com") # selenium이 입력을 해줌 ...
21.777778
57
0.688776
from selenium import webdriver driver = webdriver.Chrome("./webdriver/chromedriver.exe") driver.get("http://www.google.com") bt = driver.find_element_by_name("q") bt.send_keys("플레이데이터") bt.submit()
true
true
1c00508a2e8cc591a1a262236f3e523be78157cb
432
py
Python
lib/taniumpy/object_types/string_hint_list.py
netsec/pytan
29a3484d21cb90d8896275febd1c535e4f3cdc7e
[ "MIT" ]
1
2019-01-29T21:22:06.000Z
2019-01-29T21:22:06.000Z
lib/taniumpy/object_types/string_hint_list.py
c1rdan/pytan
5e537a6dcf4136e3b9c3905a39f073396e7f044f
[ "MIT" ]
1
2021-12-08T08:29:26.000Z
2021-12-08T08:29:26.000Z
pytanlib/taniumpy/object_types/string_hint_list.py
splunk-soar-connectors/tanium
e6f38fd014ea125e11a584ac9932ad4e7e855ac7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Tanium Inc # # Generated from console.wsdl version 0.0.1 # # from .base import BaseType class StringHintList(BaseType): _soap_tag = 'string_hints' def __init__(self): BaseType.__init__( self, simple_properties={}, complex_properties={},...
15.428571
49
0.55787
from .base import BaseType class StringHintList(BaseType): _soap_tag = 'string_hints' def __init__(self): BaseType.__init__( self, simple_properties={}, complex_properties={}, list_properties={'string_hint': str}, ) ...
true
true
1c0051ab03f14060c47a2000e8f500f5e90a98ac
1,323
py
Python
state_machine/src/states/Welcome_speech.py
Thedush/ChatBot
d82042649d994c4763a0d5200fb6d43d3c1066c4
[ "BSD-3-Clause" ]
null
null
null
state_machine/src/states/Welcome_speech.py
Thedush/ChatBot
d82042649d994c4763a0d5200fb6d43d3c1066c4
[ "BSD-3-Clause" ]
null
null
null
state_machine/src/states/Welcome_speech.py
Thedush/ChatBot
d82042649d994c4763a0d5200fb6d43d3c1066c4
[ "BSD-3-Clause" ]
1
2021-11-10T11:56:53.000Z
2021-11-10T11:56:53.000Z
import rospy import smach import os, sys import time class welcome_speech(smach.State): def __init__(self): smach.State.__init__(self, outcomes=['completed'],input_keys=['speech_in'],) # Outcome def execute(self, userdata): rospy.loginfo('Executing welcome speech state') if userdata.speech_in == 's...
35.756757
94
0.733938
import rospy import smach import os, sys import time class welcome_speech(smach.State): def __init__(self): smach.State.__init__(self, outcomes=['completed'],input_keys=['speech_in'],) def execute(self, userdata): rospy.loginfo('Executing welcome speech state') if userdata.speech_in == 'sub1': pr...
false
true
1c0051cfef1ad4dd7adceaa35d65d698c96d77a0
7,700
py
Python
autotest/ogr/ogr_arcgen.py
mihadyuk/gdal
d4627981715b82ff368547ef00ef26e0b9207048
[ "MIT" ]
null
null
null
autotest/ogr/ogr_arcgen.py
mihadyuk/gdal
d4627981715b82ff368547ef00ef26e0b9207048
[ "MIT" ]
null
null
null
autotest/ogr/ogr_arcgen.py
mihadyuk/gdal
d4627981715b82ff368547ef00ef26e0b9207048
[ "MIT" ]
null
null
null
#!/usr/bin/env python ############################################################################### # $Id$ # # Project: GDAL/OGR Test Suite # Purpose: Test read functionality for OGR Arc/Info generate driver. # Author: Even Rouault <even dot rouault at mines dash paris dot org> # ################################...
30.078125
97
0.569221
import sys sys.path.append( '../pymod' ) import gdaltest import ogrtest from osgeo import ogr def ogr_arcgen_points(): ds = ogr.Open('data/points.gen') if ds is None: gdaltest.post_reason('cannot open dataset') return 'fail' if ds.GetLayerCount() != 1: gdaltest.post_reason('ba...
true
true
1c0052a99b4d6b99df714ec513d55b0b1546ca47
532
py
Python
text-deep/python/servlet_get_api.py
hovinhthinh/Qsearch
ed450efbb0eebe1a5ad625422edb435b402b096e
[ "Apache-2.0" ]
7
2022-01-26T16:37:56.000Z
2022-02-19T09:31:55.000Z
text-deep/python/servlet_get_api.py
hovinhthinh/Qsearch
ed450efbb0eebe1a5ad625422edb435b402b096e
[ "Apache-2.0" ]
null
null
null
text-deep/python/servlet_get_api.py
hovinhthinh/Qsearch
ed450efbb0eebe1a5ad625422edb435b402b096e
[ "Apache-2.0" ]
null
null
null
import requests def tag(sent, etags, qpos, end_point='http://varuna:2022/tag'): params = { 'sent': ' '.join(sent), 'etags': ' '.join(etags), 'qpos': qpos } r = requests.get(url=end_point, params=params).json() return r['tags'], r['conf'] sent = ['BMW', 'i8', 'has', 'a', 'batt...
28
119
0.507519
import requests def tag(sent, etags, qpos, end_point='http://varuna:2022/tag'): params = { 'sent': ' '.join(sent), 'etags': ' '.join(etags), 'qpos': qpos } r = requests.get(url=end_point, params=params).json() return r['tags'], r['conf'] sent = ['BMW', 'i8', 'has', 'a', 'batt...
true
true
1c00563268841dc54372804653c1173084236e8d
406
py
Python
examples/ccs811_simpletest.py
kattni/Adafruit_CircuitPython_CCS811
ecd081cffe9e2a9a8e5f34b9aa051120a7aa5e9d
[ "MIT" ]
null
null
null
examples/ccs811_simpletest.py
kattni/Adafruit_CircuitPython_CCS811
ecd081cffe9e2a9a8e5f34b9aa051120a7aa5e9d
[ "MIT" ]
null
null
null
examples/ccs811_simpletest.py
kattni/Adafruit_CircuitPython_CCS811
ecd081cffe9e2a9a8e5f34b9aa051120a7aa5e9d
[ "MIT" ]
null
null
null
import time from board import SCL, SDA import busio import adafruit_ccs811 i2c_bus = busio.I2C(SCL, SDA) ccs = adafruit_ccs811.CCS811(i2c_bus) #wait for the sensor to be ready and calibrate the thermistor while not ccs.data_ready: pass temp = ccs.temperature ccs.temp_offset = temp - 25.0 while True: print...
19.333333
75
0.719212
import time from board import SCL, SDA import busio import adafruit_ccs811 i2c_bus = busio.I2C(SCL, SDA) ccs = adafruit_ccs811.CCS811(i2c_bus) while not ccs.data_ready: pass temp = ccs.temperature ccs.temp_offset = temp - 25.0 while True: print("CO2: ", ccs.eco2, " TVOC:", ccs.tvoc, " temp:", ccs.temperat...
true
true
1c0056760b048c16269477d5d3fa0d7513f0ed5e
11,755
py
Python
Backend/core/destiny/activities.py
LukasSchmid97/destinyBloodoakStats
1420802ce01c3435ad5c283f44eb4531d9b22c38
[ "MIT" ]
3
2019-10-19T11:24:50.000Z
2021-01-29T12:02:17.000Z
Backend/core/destiny/activities.py
LukasSchmid97/destinyBloodoakStats
1420802ce01c3435ad5c283f44eb4531d9b22c38
[ "MIT" ]
29
2019-10-14T12:26:10.000Z
2021-07-28T20:50:29.000Z
Backend/core/destiny/activities.py
LukasSchmid97/destinyBloodoakStats
1420802ce01c3435ad5c283f44eb4531d9b22c38
[ "MIT" ]
2
2019-10-13T17:11:09.000Z
2020-05-13T15:29:04.000Z
import asyncio import dataclasses import datetime import logging from collections.abc import AsyncGenerator from typing import Optional from sqlalchemy.ext.asyncio import AsyncSession from Backend.core.destiny.profile import DestinyProfile from Backend.core.errors import CustomException from Backend.crud import activ...
38.042071
213
0.609188
import asyncio import dataclasses import datetime import logging from collections.abc import AsyncGenerator from typing import Optional from sqlalchemy.ext.asyncio import AsyncSession from Backend.core.destiny.profile import DestinyProfile from Backend.core.errors import CustomException from Backend.crud import activ...
true
true
1c0058024d0967923e7a98b482bf9e1eb80a9388
3,925
py
Python
tensorflow/lite/tools/convert_image_to_csv.py
yage99/tensorflow
c7fa71b32a3635eb25596ae80d007b41007769c4
[ "Apache-2.0" ]
78
2020-08-04T12:36:25.000Z
2022-03-25T04:23:40.000Z
tensorflow/lite/tools/convert_image_to_csv.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
203
2019-06-14T23:53:10.000Z
2022-02-10T02:27:23.000Z
tensorflow/lite/tools/convert_image_to_csv.py
sseung0703/tensorflow
be084bd7a4dd241eb781fc704f57bcacc5c9b6dd
[ "Apache-2.0" ]
66
2020-05-15T10:05:12.000Z
2022-02-14T07:28:18.000Z
# Lint as: python2, python3 # Copyright 2020 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 # ...
33.836207
84
0.704459
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import sys from tensorflow.python.client import session from tensorflow.python.framework import ops from tensorflow.python.framework.errors_impl import NotFoundError from tensorflow.python.ops ...
true
true
1c0058470e35069c1433b569a3c5cb89959d5b8d
5,490
py
Python
tests/commands/test_uninstall.py
williamirick/hatch
704cdcd1a0cd3a621235ac9f5b2b90e7524e3cd3
[ "Apache-2.0", "MIT" ]
2,549
2017-09-05T06:44:17.000Z
2022-03-31T23:21:02.000Z
tests/commands/test_uninstall.py
williamirick/hatch
704cdcd1a0cd3a621235ac9f5b2b90e7524e3cd3
[ "Apache-2.0", "MIT" ]
97
2017-06-07T23:14:12.000Z
2022-03-30T14:22:34.000Z
tests/commands/test_uninstall.py
williamirick/hatch
704cdcd1a0cd3a621235ac9f5b2b90e7524e3cd3
[ "Apache-2.0", "MIT" ]
140
2017-06-10T14:16:47.000Z
2022-03-23T09:25:01.000Z
import os from click.testing import CliRunner from hatch.cli import hatch from hatch.config import get_venv_dir from hatch.env import get_installed_packages from hatch.utils import env_vars, remove_path, temp_chdir from hatch.venv import create_venv, get_new_venv_name, is_venv, venv from ..utils import requires_inter...
33.47561
92
0.612386
import os from click.testing import CliRunner from hatch.cli import hatch from hatch.config import get_venv_dir from hatch.env import get_installed_packages from hatch.utils import env_vars, remove_path, temp_chdir from hatch.venv import create_venv, get_new_venv_name, is_venv, venv from ..utils import requires_inter...
true
true
1c005864183e8c0c08722c101d6cdcb776027fde
2,982
py
Python
fmp_python/common/fmpdecorator.py
simpsus/fmp_python
858e3ff276aa24da77d242c0d72c7ec2a91ac875
[ "MIT" ]
null
null
null
fmp_python/common/fmpdecorator.py
simpsus/fmp_python
858e3ff276aa24da77d242c0d72c7ec2a91ac875
[ "MIT" ]
null
null
null
fmp_python/common/fmpdecorator.py
simpsus/fmp_python
858e3ff276aa24da77d242c0d72c7ec2a91ac875
[ "MIT" ]
null
null
null
import os import functools import pandas as pd import inspect from datetime import datetime from pathlib import Path from fmp_python.common.fmpexception import FMPException class FMPDecorator(): @classmethod def inject_api_key(cls,func): @functools.wraps(func) def deco_function(self, *args, ...
34.275862
120
0.577465
import os import functools import pandas as pd import inspect from datetime import datetime from pathlib import Path from fmp_python.common.fmpexception import FMPException class FMPDecorator(): @classmethod def inject_api_key(cls,func): @functools.wraps(func) def deco_function(self, *args, ...
true
true
1c0058c6616922f47a550ca095ba9d1c0cec0d72
28,096
py
Python
faker/providers/person/es_ES/__init__.py
mgorny/faker
b1176e01bf4d7f1aef408a4bb96a9e46188cc113
[ "MIT" ]
12,077
2015-01-01T18:30:07.000Z
2022-03-31T23:22:01.000Z
faker/providers/person/es_ES/__init__.py
mgorny/faker
b1176e01bf4d7f1aef408a4bb96a9e46188cc113
[ "MIT" ]
1,306
2015-01-03T05:18:55.000Z
2022-03-31T02:43:04.000Z
faker/providers/person/es_ES/__init__.py
mgorny/faker
b1176e01bf4d7f1aef408a4bb96a9e46188cc113
[ "MIT" ]
1,855
2015-01-08T14:20:10.000Z
2022-03-25T17:23:32.000Z
from typing import Tuple from .. import Provider as PersonProvider class Provider(PersonProvider): formats_male: Tuple[str, ...] = ( '{{first_name_male}} {{last_name}} {{last_name}}', '{{first_name_male}} {{last_name}} {{last_name}}', '{{first_name_male}} {{last_name}} {{last_name}}', ...
68.526829
96
0.553068
from typing import Tuple from .. import Provider as PersonProvider class Provider(PersonProvider): formats_male: Tuple[str, ...] = ( '{{first_name_male}} {{last_name}} {{last_name}}', '{{first_name_male}} {{last_name}} {{last_name}}', '{{first_name_male}} {{last_name}} {{last_name}}', ...
true
true
1c005a4772fc7aa0769867255a3599264660c527
18,411
py
Python
fiftyone/utils/eval/regression.py
Fariborzzz/fiftyone
06975961f5ee649dd36429feb21c959dfc0744ed
[ "Apache-2.0" ]
1
2021-12-17T10:11:37.000Z
2021-12-17T10:11:37.000Z
fiftyone/utils/eval/regression.py
Fariborzzz/fiftyone
06975961f5ee649dd36429feb21c959dfc0744ed
[ "Apache-2.0" ]
null
null
null
fiftyone/utils/eval/regression.py
Fariborzzz/fiftyone
06975961f5ee649dd36429feb21c959dfc0744ed
[ "Apache-2.0" ]
null
null
null
""" Regression evaluation. | Copyright 2017-2021, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ import logging import itertools import numbers import numpy as np import sklearn.metrics as skm from tabulate import tabulate import eta.core.utils as etau import fiftyone.core.evaluation as foe import fift...
33.353261
97
0.609798
import logging import itertools import numbers import numpy as np import sklearn.metrics as skm from tabulate import tabulate import eta.core.utils as etau import fiftyone.core.evaluation as foe import fiftyone.core.fields as fof import fiftyone.core.labels as fol import fiftyone.core.plots as fop import fiftyone.co...
true
true
1c005aa24478096e1d772e5099537ce04c2851dd
5,068
py
Python
gryphon/execution/scripts/reset_balance.py
qiquanzhijia/gryphon
7bb2c646e638212bd1352feb1b5d21536a5b918d
[ "Apache-2.0" ]
1,109
2019-06-20T19:23:27.000Z
2022-03-20T14:03:43.000Z
gryphon/execution/scripts/reset_balance.py
qiquanzhijia/gryphon
7bb2c646e638212bd1352feb1b5d21536a5b918d
[ "Apache-2.0" ]
63
2019-06-21T05:36:17.000Z
2021-05-26T21:08:15.000Z
gryphon/execution/scripts/reset_balance.py
qiquanzhijia/gryphon
7bb2c646e638212bd1352feb1b5d21536a5b918d
[ "Apache-2.0" ]
181
2019-06-20T19:42:05.000Z
2022-03-21T13:05:13.000Z
""" This script modifies the database object and ledger for an exchange to bring both in line with the exchange API's reported balance for this account. It does this by calculating forcing exchange_account.balance to equal ledger_balance, and then adding arbitrary deposit or withdrawal transactions to the ledger to ma...
31.478261
191
0.706196
import pyximport; pyximport.install() import os import sys from gryphon.lib import session from gryphon.lib.exchange import exchange_factory from gryphon.lib.logger import get_logger from gryphon.lib.models.exchange import Exchange as ExchangeData from gryphon.lib.models.transaction import Transaction from gryphon.l...
true
true
1c005c7fe5654fe04ee7e9b98ac0e0417ae8b240
10,069
py
Python
setup.py
pskopnik/apq
827e722ec604d2f7c050f43748136613c3cd3d70
[ "MIT" ]
4
2020-02-12T11:59:19.000Z
2021-08-21T07:01:31.000Z
setup.py
pskopnik/apq
827e722ec604d2f7c050f43748136613c3cd3d70
[ "MIT" ]
null
null
null
setup.py
pskopnik/apq
827e722ec604d2f7c050f43748136613c3cd3d70
[ "MIT" ]
1
2020-02-11T18:52:35.000Z
2020-02-11T18:52:35.000Z
from distutils.core import Command import functools from os import environ, stat from os.path import isfile, splitext, join as pathjoin from setuptools import setup from setuptools.command.sdist import sdist as sdist_ from setuptools.extension import Extension import sys import versioneer cmdclass=versioneer.get_cmdc...
30.981538
93
0.612375
from distutils.core import Command import functools from os import environ, stat from os.path import isfile, splitext, join as pathjoin from setuptools import setup from setuptools.command.sdist import sdist as sdist_ from setuptools.extension import Extension import sys import versioneer cmdclass=versioneer.get_cmdc...
true
true
1c005ceabc80f841e3b402695cc3354e9dd4dcb1
5,584
py
Python
convert.py
Laubeee/caffe-tensorflow
1a5c027b19c6e9d4bc5f2cb4d5906efe46c60466
[ "MIT" ]
20
2017-05-29T15:54:08.000Z
2020-06-20T04:25:04.000Z
convert.py
Laubeee/caffe-tensorflow
1a5c027b19c6e9d4bc5f2cb4d5906efe46c60466
[ "MIT" ]
null
null
null
convert.py
Laubeee/caffe-tensorflow
1a5c027b19c6e9d4bc5f2cb4d5906efe46c60466
[ "MIT" ]
21
2017-07-20T07:32:43.000Z
2021-12-30T15:59:53.000Z
#!/usr/bin/env python import os import sys import numpy as np import argparse from kaffe import KaffeError, print_stderr from kaffe.tensorflow import TensorFlowTransformer import shutil import tensorflow as tf from tensorflow.python.tools.freeze_graph import freeze_graph def fatal_error(msg): print_stderr(msg) ...
42.625954
121
0.650609
import os import sys import numpy as np import argparse from kaffe import KaffeError, print_stderr from kaffe.tensorflow import TensorFlowTransformer import shutil import tensorflow as tf from tensorflow.python.tools.freeze_graph import freeze_graph def fatal_error(msg): print_stderr(msg) exit(-1) def val...
true
true
1c005d1596230995368b0461c249767b8f388487
11,237
py
Python
d2/detr/detr.py
kuna-systems/detr
ae18dec551b4810eb44d58d612c5181812305a1b
[ "Apache-2.0" ]
null
null
null
d2/detr/detr.py
kuna-systems/detr
ae18dec551b4810eb44d58d612c5181812305a1b
[ "Apache-2.0" ]
null
null
null
d2/detr/detr.py
kuna-systems/detr
ae18dec551b4810eb44d58d612c5181812305a1b
[ "Apache-2.0" ]
1
2021-02-27T13:13:56.000Z
2021-02-27T13:13:56.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import math from typing import List import numpy as np import torch import torch.distributed as dist import torch.nn.functional as F from scipy.optimize import linear_sum_assignment from torch import nn from detectron2.layers import...
42.726236
147
0.634422
import logging import math from typing import List import numpy as np import torch import torch.distributed as dist import torch.nn.functional as F from scipy.optimize import linear_sum_assignment from torch import nn from detectron2.layers import ShapeSpec from detectron2.modeling import META_ARCH_REGISTRY, build_ba...
true
true
1c005dde5779b5b6137e29e049ed12de67a92574
15,353
py
Python
tests/files/tests.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
19
2015-07-07T02:08:59.000Z
2021-11-08T11:05:40.000Z
tests/files/tests.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
10
2016-05-19T21:54:42.000Z
2019-08-09T15:59:50.000Z
tests/files/tests.py
imjvdn/scratch-game-1
5dffd79f17e0b66d3d2e57262749311aca28e850
[ "PSF-2.0", "BSD-3-Clause" ]
11
2019-09-14T20:57:30.000Z
2022-01-19T17:59:26.000Z
import errno import gzip import os import struct import tempfile import unittest from io import BytesIO, StringIO, TextIOWrapper from unittest import mock from django.core.files import File from django.core.files.base import ContentFile from django.core.files.move import file_move_safe from django.core.files.temp impo...
37.815271
102
0.640266
import errno import gzip import os import struct import tempfile import unittest from io import BytesIO, StringIO, TextIOWrapper from unittest import mock from django.core.files import File from django.core.files.base import ContentFile from django.core.files.move import file_move_safe from django.core.files.temp impo...
true
true
1c005f0354b69bcdee3130e4950fbbf78f018227
104
py
Python
benchmark/profile_efm32_fastest.py
akshaim/EFM2RIOT
273ec7bb2f5ed53e72a680d6d97e3b75c6646d61
[ "MIT" ]
4
2017-07-03T22:47:34.000Z
2022-02-11T17:04:19.000Z
benchmark/profile_efm32_fastest.py
akshaim/EFM2RIOT
273ec7bb2f5ed53e72a680d6d97e3b75c6646d61
[ "MIT" ]
2
2016-05-20T09:13:51.000Z
2016-05-20T09:34:32.000Z
benchmark/profile_efm32_fastest.py
akshaim/EFM2RIOT
273ec7bb2f5ed53e72a680d6d97e3b75c6646d61
[ "MIT" ]
5
2016-09-24T02:39:58.000Z
2020-06-29T06:07:20.000Z
from profile_efm32 import * # noqa APPLICATIONS = [ "examples/default", ] SETTINGS = [ {}, ]
10.4
35
0.596154
from profile_efm32 import * APPLICATIONS = [ "examples/default", ] SETTINGS = [ {}, ]
true
true
1c005f28f0a1dce1751790c4848d5d46138b82ed
29,495
py
Python
pcdet/models/bbox_heads/anchor_target_assigner.py
AndyYuan96/MVF-End-to-End-Multi-View-Fusion-for-3D-Object-Detection-in-LiDAR-Point-Clouds-
cf34897f25353a3f348d0a39c8db5ba15cadb2d7
[ "Apache-2.0" ]
55
2020-06-16T20:52:44.000Z
2022-03-03T02:13:50.000Z
pcdet/models/bbox_heads/anchor_target_assigner.py
K586/End-to-End-Multi-View-Fusion-for-3D-Object-Detection-in-LiDAR-Point-Clouds
cf34897f25353a3f348d0a39c8db5ba15cadb2d7
[ "Apache-2.0" ]
3
2020-12-11T01:15:46.000Z
2022-02-17T03:15:11.000Z
pcdet/models/bbox_heads/anchor_target_assigner.py
K586/End-to-End-Multi-View-Fusion-for-3D-Object-Detection-in-LiDAR-Point-Clouds
cf34897f25353a3f348d0a39c8db5ba15cadb2d7
[ "Apache-2.0" ]
15
2020-07-08T03:20:04.000Z
2022-03-22T12:10:48.000Z
# This file is modified from https://github.com/traveller59/second.pytorch import numpy as np import numpy.random as npr import numba from ...utils import common_utils def unmap(data, count, inds, fill=0): '''Unmap a subset of item (data) back to the original set of items (of size count)''' if count == l...
46.81746
120
0.610883
import numpy as np import numpy.random as npr import numba from ...utils import common_utils def unmap(data, count, inds, fill=0): if count == len(inds): return data if len(data.shape) == 1: ret = np.empty((count, ), dtype=data.dtype) ret.fill(fill) ret[inds] = data else:...
true
true
1c005fb4c17d7b3795ed9ac34a897ed44abcb6a9
16,246
py
Python
openakun/pages.py
alethiophile/openakun
6e9a6aee403c3b94dd3e323ff39a6bdfd80e2374
[ "MIT" ]
null
null
null
openakun/pages.py
alethiophile/openakun
6e9a6aee403c3b94dd3e323ff39a6bdfd80e2374
[ "MIT" ]
null
null
null
openakun/pages.py
alethiophile/openakun
6e9a6aee403c3b94dd3e323ff39a6bdfd80e2374
[ "MIT" ]
null
null
null
#!python from . import models from .data import Vote, clean_html, BadHTMLError, ChapterHTMLText, Post from flask import (Flask, render_template, request, redirect, url_for, g, flash, abort, jsonify, session) from flask_login import (LoginManager, login_user, current_user, logout_user, ...
34.565957
79
0.619783
from . import models from .data import Vote, clean_html, BadHTMLError, ChapterHTMLText, Post from flask import (Flask, render_template, request, redirect, url_for, g, flash, abort, jsonify, session) from flask_login import (LoginManager, login_user, current_user, logout_user, ...
true
true
1c00602aaeb176d98ddbaf061504db1ef8f6bd34
6,075
py
Python
train_and_predict_with_unet/unet_model_deeper.py
ComputationalAndPhysicalSystems/physarum_ecology
21772bc020168a7ddbf7ea9750aec4d95425c949
[ "MIT" ]
null
null
null
train_and_predict_with_unet/unet_model_deeper.py
ComputationalAndPhysicalSystems/physarum_ecology
21772bc020168a7ddbf7ea9750aec4d95425c949
[ "MIT" ]
null
null
null
train_and_predict_with_unet/unet_model_deeper.py
ComputationalAndPhysicalSystems/physarum_ecology
21772bc020168a7ddbf7ea9750aec4d95425c949
[ "MIT" ]
null
null
null
# u-net model with up-convolution or up-sampling and weighted binary-crossentropy as loss func from keras.models import Model from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D, concatenate, Conv2DTranspose, BatchNormalization, Dropout from keras.optimizers import Adam from keras.utils import plot_mode...
46.374046
125
0.670288
from keras.models import Model from keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D, concatenate, Conv2DTranspose, BatchNormalization, Dropout from keras.optimizers import Adam from keras.utils import plot_model from keras import backend as K def unet_model(n_classes=5, im_sz=320, n_channels=8, n_filte...
true
true
1c0060b2c63a11f779b4c8bc47c6ef4d3c3ee908
9,783
py
Python
owtf/data/tools/discovery/web/rev_proxy/HTTP-Traceroute.py
timgates42/owtf
30f8e40976a6dd13f1a332e334d219c71cef6482
[ "BSD-3-Clause" ]
1
2021-02-03T10:03:35.000Z
2021-02-03T10:03:35.000Z
owtf/data/tools/discovery/web/rev_proxy/HTTP-Traceroute.py
justdvnsh/owtf
3a543b4eb2a7ad67155eb96dd2d99efbc181498d
[ "BSD-3-Clause" ]
3
2021-03-26T00:33:28.000Z
2022-02-13T21:08:52.000Z
owtf/data/tools/discovery/web/rev_proxy/HTTP-Traceroute.py
justdvnsh/owtf
3a543b4eb2a7ad67155eb96dd2d99efbc181498d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python try: import http.server as server except ImportError: import BaseHTTPServer as server import getopt import re import sys try: from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError, URLError from urllib.r...
26.369272
98
0.525606
try: import http.server as server except ImportError: import BaseHTTPServer as server import getopt import re import sys try: from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request from urllib.error import HTTPError, URLError from urllib.request import ( ...
true
true
1c006153ecead06e485e3205f1ca346ea6265444
4,599
py
Python
lib/tools/regen_apis/main.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
null
null
null
lib/tools/regen_apis/main.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
lib/tools/regen_apis/main.py
kustodian/google-cloud-sdk
b6bae4137d4b58030adb3dcb1271216dfb19f96d
[ "Apache-2.0" ]
1
2020-07-24T18:47:35.000Z
2020-07-24T18:47:35.000Z
# -*- coding: utf-8 -*- # # Copyright 2016 Google 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 requi...
35.929688
80
0.619265
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import argparse import logging import pprint import sys from googlecloudsdk.api_lib.regen import generate from googlecloudsdk.core import yaml from googlecloudsdk.core.util import files import six class E...
true
true
1c006284d72e34729eb9288f52af20f3e7e7dc51
205
py
Python
hil00_asst1-2/ruler.py
hibalubbad/hiba.baddie
69001ad56c8a51f6e36a802bae061128d9fd5a71
[ "MIT" ]
null
null
null
hil00_asst1-2/ruler.py
hibalubbad/hiba.baddie
69001ad56c8a51f6e36a802bae061128d9fd5a71
[ "MIT" ]
null
null
null
hil00_asst1-2/ruler.py
hibalubbad/hiba.baddie
69001ad56c8a51f6e36a802bae061128d9fd5a71
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 11 17:28:04 2018 @author: misskeisha """ a = "1" b = a + "2" + a c = b + "3" + b d = c + "4" + c print(a) print(b) print(c) print(d)
12.058824
35
0.521951
a = "1" b = a + "2" + a c = b + "3" + b d = c + "4" + c print(a) print(b) print(c) print(d)
true
true
1c0063e56d68662d65da1da543ddee6e3896c4b3
1,226
py
Python
setup.py
AdityaMuthukattu/svg
81ef2fe168e33aa14a0f76c12355143d30822328
[ "Apache-2.0" ]
3
2019-09-06T03:13:12.000Z
2021-09-20T09:25:05.000Z
setup.py
AdityaMuthukattu/svg
81ef2fe168e33aa14a0f76c12355143d30822328
[ "Apache-2.0" ]
null
null
null
setup.py
AdityaMuthukattu/svg
81ef2fe168e33aa14a0f76c12355143d30822328
[ "Apache-2.0" ]
3
2019-09-03T09:44:43.000Z
2021-09-22T03:58:27.000Z
# Copyright 2019 Max Godfrey # # 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 w...
29.902439
75
0.72186
from __future__ import absolute_import from __future__ import division from __future__ import print_function import setuptools DESCRIPTION = 'Create Scalable Vector Graphics in Python.' setuptools.setup( name='svg', version='0.1.0', description=DESCRIPTION, author='Max Godfrey', ...
true
true