hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | 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 209 | max_issues_repo_name stringlengths 5 121 | 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 209 | max_forks_repo_name stringlengths 5 121 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51faf1a36b10936c70966aa7b44072ace395f150 | 68,559 | py | Python | venv/Lib/site-packages/pint/testsuite/test_quantity.py | zjh1015/first | 656b9174a507c06db47aebc508fc45a8846f1488 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pint/testsuite/test_quantity.py | zjh1015/first | 656b9174a507c06db47aebc508fc45a8846f1488 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/pint/testsuite/test_quantity.py | zjh1015/first | 656b9174a507c06db47aebc508fc45a8846f1488 | [
"BSD-3-Clause"
] | null | null | null | import copy
import datetime
import math
import operator as op
import warnings
from unittest.mock import patch
from pint import DimensionalityError, OffsetUnitCalculusError, UnitRegistry
from pint.compat import np
from pint.testsuite import QuantityTestCase, helpers
from pint.testsuite.parameterized import Parameterize... | 42.268187 | 102 | 0.560393 |
da2bfa418e4dd0a2aa8478320c2bfc3184363b0e | 10,083 | py | Python | src/Python/Unittests/test_read_write_obj.py | rzoller/OpenMesh | f84bca0b26c61eab5f9335b2191962ca8545c5f6 | [
"BSD-3-Clause"
] | 19 | 2020-08-13T05:15:09.000Z | 2022-03-31T14:51:29.000Z | src/Python/Unittests/test_read_write_obj.py | ccopsey/OpenMesh | 93e6e626c3f282bf4275521c33cd8da1ca559c7d | [
"BSD-3-Clause"
] | 2 | 2020-09-08T07:03:04.000Z | 2021-08-04T05:43:27.000Z | src/Python/Unittests/test_read_write_obj.py | ccopsey/OpenMesh | 93e6e626c3f282bf4275521c33cd8da1ca559c7d | [
"BSD-3-Clause"
] | 10 | 2020-08-06T02:37:46.000Z | 2021-07-01T09:12:06.000Z | import unittest
import openmesh
class ReadWriteOBJ(unittest.TestCase):
def setUp(self):
self.mesh = openmesh.TriMesh()
def test_load_simple_obj(self):
ok = openmesh.read_mesh(self.mesh, "cube-minimal.obj")
self.assertTrue(ok)
self.assertEqual(self.mesh.n_vert... | 43.83913 | 86 | 0.631657 |
39e783681019993725f1867a1d4fe08d4b7163d6 | 1,168 | py | Python | kde/kdegames/kshisen/kshisen.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-09-04T09:01:03.000Z | 2022-01-04T20:09:00.000Z | kde/kdegames/kshisen/kshisen.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 14 | 2017-12-15T08:11:22.000Z | 2020-12-29T19:11:13.000Z | kde/kdegames/kshisen/kshisen.py | wrobelda/craft-blueprints-kde | 366f460cecd5baebdf3a695696767c8c0e5e7c7e | [
"BSD-2-Clause"
] | 19 | 2017-09-05T19:16:21.000Z | 2020-10-18T12:46:06.000Z | import info
class subinfo(info.infoclass):
def setTargets(self):
self.versionInfo.setDefaultValues()
self.description = "KShisen"
def setDependencies(self):
self.runtimeDependencies["virtual/base"] = None
self.buildDependencies["kde/frameworks/extra-cmake-modules"] = None
... | 37.677419 | 75 | 0.717466 |
c6595533a4be47dc9f6100348abc224950c4e95d | 4,673 | py | Python | experiments/steven/online-vae/pick_and_place/dsae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/pick_and_place/dsae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/steven/online-vae/pick_and_place/dsae.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from multiworld.envs.mujoco.cameras import init_sawyer_camera_v1
from multiworld.envs.mujoco.cameras import sawyer_pick_and_place_camera
from rlkit.launchers.launcher_util import run_experiment
from rlkit.torch.grill.launcher import grill_her_td3_full_experiment
import rlkit.torc... | 35.671756 | 80 | 0.572009 |
c7eaa1878f146687039771a9ac34a2ab4c0ccc9f | 3,243 | py | Python | tutorials/tutorial_3_benchmarking_multiple_pipelines.py | plcrodrigues/moabb | aa4274fe7905631864e854c121c92e1927061f29 | [
"BSD-3-Clause"
] | 321 | 2017-06-03T16:14:45.000Z | 2022-03-28T17:43:59.000Z | tutorials/tutorial_3_benchmarking_multiple_pipelines.py | plcrodrigues/moabb | aa4274fe7905631864e854c121c92e1927061f29 | [
"BSD-3-Clause"
] | 223 | 2017-06-03T17:41:57.000Z | 2022-03-29T09:07:44.000Z | tutorials/tutorial_3_benchmarking_multiple_pipelines.py | girafe-ai/moabb | 78bbb48a2a0058b0725ebeba1ba1e3203f0eacd5 | [
"BSD-3-Clause"
] | 118 | 2017-06-03T18:36:35.000Z | 2022-03-16T06:22:02.000Z | """
===========================================
Tutorial 3: Benchmarking mulitple pipelines
===========================================
In this last part, we extend the previous example by assessing the
classification score of not one but three classification pipelines.
"""
# Authors: Pedro L. C. Rodrigues, Sylvain Ch... | 34.5 | 87 | 0.663891 |
03c26661caa9883f83d986560b1e1a2b6d6ff050 | 1,600 | py | Python | intezer_analyze_cli/key_store.py | LaudateCorpus1/analyze-cli | fe2055921af2eb06a1a3212000ef02224b168a21 | [
"Apache-2.0"
] | 13 | 2018-04-06T05:08:46.000Z | 2022-03-05T02:21:43.000Z | intezer_analyze_cli/key_store.py | LaudateCorpus1/analyze-cli | fe2055921af2eb06a1a3212000ef02224b168a21 | [
"Apache-2.0"
] | 3 | 2019-09-27T10:26:13.000Z | 2021-12-26T13:09:52.000Z | intezer_analyze_cli/key_store.py | LaudateCorpus1/analyze-cli | fe2055921af2eb06a1a3212000ef02224b168a21 | [
"Apache-2.0"
] | 3 | 2019-09-06T06:18:51.000Z | 2022-03-05T02:21:45.000Z | import logging
import os
from intezer_analyze_cli.config import default_config as config_
logger = logging.getLogger('intezer_client')
def get_key_file_path(key_file_name):
if os.name == 'posix':
return os.path.join(os.path.expanduser('~'), config_.key_dir_name, key_file_name)
return os.path.join(o... | 24.615385 | 93 | 0.73125 |
22a2e80af6c6daa4f331f502e57af95bdd8d1fb7 | 4,060 | py | Python | train/trainer/io.py | sweetcocoa/ddsp-pytorch | ea5f25318dd4cd22c601dd405ebc2bac8e3f4cb6 | [
"MIT"
] | 88 | 2020-02-26T16:37:53.000Z | 2022-03-16T23:27:17.000Z | train/trainer/io.py | sweetcocoa/ddsp-pytorch | ea5f25318dd4cd22c601dd405ebc2bac8e3f4cb6 | [
"MIT"
] | 3 | 2020-07-25T05:03:17.000Z | 2022-03-23T17:37:38.000Z | train/trainer/io.py | sweetcocoa/ddsp-pytorch | ea5f25318dd4cd22c601dd405ebc2bac8e3f4cb6 | [
"MIT"
] | 17 | 2020-06-03T09:11:10.000Z | 2021-11-25T10:24:25.000Z | import sys, os
from .PinkModule.logging import PinkBlackLogger
from omegaconf import OmegaConf
def convert_type(string: str):
try:
f = float(string)
if f.is_integer():
return int(f)
else:
return f
except ValueError:
return string
def get_args(default_c... | 27.066667 | 103 | 0.592365 |
57459aa3e53ced42856976658142983c849c4ff3 | 608 | py | Python | input_calculation/__init__.py | oTree-org/snippets | 6bd4b5fe9fdcec4d759cc0a5b2b2b1c7bb6fe73c | [
"MIT"
] | null | null | null | input_calculation/__init__.py | oTree-org/snippets | 6bd4b5fe9fdcec4d759cc0a5b2b2b1c7bb6fe73c | [
"MIT"
] | null | null | null | input_calculation/__init__.py | oTree-org/snippets | 6bd4b5fe9fdcec4d759cc0a5b2b2b1c7bb6fe73c | [
"MIT"
] | null | null | null | from otree.api import *
doc = """
Your app description
"""
class C(BaseConstants):
NAME_IN_URL = 'input_calculation'
PLAYERS_PER_GROUP = None
NUM_ROUNDS = 1
APR = 0.07
class Subsession(BaseSubsession):
pass
class Group(BaseGroup):
pass
class Player(BasePlayer):
amount = models.Curr... | 15.2 | 52 | 0.669408 |
de7db329c3cb4ff693ed3febbc3cdfeb19046716 | 998 | py | Python | content/en/modules/python_scripts/correction/cypher_script.py | brainhackorg/school | 18544c12e9c64b1b82e825ccb75e4a3f1c8a2b16 | [
"MIT"
] | 9 | 2020-05-09T04:03:30.000Z | 2021-07-13T11:39:51.000Z | content/en/modules/python_scripts/correction/cypher_script.py | brainhackorg/school | 18544c12e9c64b1b82e825ccb75e4a3f1c8a2b16 | [
"MIT"
] | 42 | 2020-02-28T16:17:49.000Z | 2020-07-05T16:44:32.000Z | content/en/modules/python_scripts/correction/cypher_script.py | brainhackorg/school | 18544c12e9c64b1b82e825ccb75e4a3f1c8a2b16 | [
"MIT"
] | 29 | 2020-02-13T19:01:51.000Z | 2021-11-11T03:07:20.000Z | #!/usr/bin/env python
import argparse
import os
from useful_functions import encrypt_letter, decrypt_letter, process_message
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--message", type=str, help="Path to the text file containing the message \
to b... | 43.391304 | 101 | 0.657315 |
f46ff0fd59e34c43347e29ea52f92d2c0bc5a802 | 5,098 | py | Python | en/ECelex/1.0/extract_relations.py | lukyjanek/universal-derivations | b95488df95033269999fa80f04404bc331c87946 | [
"RSA-MD"
] | null | null | null | en/ECelex/1.0/extract_relations.py | lukyjanek/universal-derivations | b95488df95033269999fa80f04404bc331c87946 | [
"RSA-MD"
] | null | null | null | en/ECelex/1.0/extract_relations.py | lukyjanek/universal-derivations | b95488df95033269999fa80f04404bc331c87946 | [
"RSA-MD"
] | 2 | 2021-10-01T14:40:14.000Z | 2021-10-03T14:44:31.000Z | #!/usr/bin/env python3
# coding: utf-8
"""Extract one-to-one relations in Dutch CELEX."""
import sys
import itertools as it
from collections import defaultdict
# translate pos
translate = {'N': 'N', 'V': 'V', 'A': 'A', 'B': 'D', 'D': 'X', 'F': 'A',
'Q': 'C', 'O': 'P', 'R': 'N', 'C': 'C', 'X': 'X', 'P':... | 34.917808 | 84 | 0.516869 |
c7fea01f2dabbba80262e196971a34a1ca4f97ac | 4,830 | py | Python | pytorch_toolkit/nncf/tests/pruning/filter_pruning/test_layers.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 3 | 2020-12-29T02:47:32.000Z | 2021-11-12T08:12:51.000Z | pytorch_toolkit/nncf/tests/pruning/filter_pruning/test_layers.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 23 | 2020-09-25T22:41:48.000Z | 2021-12-13T20:43:37.000Z | pytorch_toolkit/nncf/tests/pruning/filter_pruning/test_layers.py | morkovka1337/openvino_training_extensions | 846db45c264d6b061505213f51763520b9432ba9 | [
"Apache-2.0"
] | 1 | 2021-03-12T10:08:44.000Z | 2021-03-12T10:08:44.000Z | """
Copyright (c) 2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writin... | 37.734375 | 107 | 0.697308 |
d4d22f46827dd5d4370759ebb31fee434fbf3f0f | 575 | py | Python | src/apps/users/serializers/user.py | sanderland/katago-server | 6414fab080d007c05068a06ff4f25907b92848bd | [
"MIT"
] | 27 | 2020-05-03T11:01:27.000Z | 2022-03-17T05:33:10.000Z | src/apps/users/serializers/user.py | sanderland/katago-server | 6414fab080d007c05068a06ff4f25907b92848bd | [
"MIT"
] | 54 | 2020-05-09T01:18:41.000Z | 2022-01-22T10:31:15.000Z | src/apps/users/serializers/user.py | sanderland/katago-server | 6414fab080d007c05068a06ff4f25907b92848bd | [
"MIT"
] | 9 | 2020-09-29T11:31:32.000Z | 2022-03-09T01:37:50.000Z | from rest_framework import serializers
from src.apps.users.models import User
class LimitedUserSerializer(serializers.HyperlinkedModelSerializer):
"""
LimitedUserSerializer does not leak user email. Non superuser uses this serializer.
"""
class Meta:
model = User
fields = ["url", "us... | 23.958333 | 87 | 0.695652 |
2986c1b42860d793c057c95656d1a5fc5bde67da | 1,401 | py | Python | test/functional/feature_shutdown.py | DclrCoin/dclrcoin | 1ca3bd1f787fdead6ae84b7cda2bab6c6cb62b1d | [
"MIT"
] | null | null | null | test/functional/feature_shutdown.py | DclrCoin/dclrcoin | 1ca3bd1f787fdead6ae84b7cda2bab6c6cb62b1d | [
"MIT"
] | 2 | 2021-12-18T03:02:54.000Z | 2022-01-17T17:55:36.000Z | test/functional/feature_shutdown.py | DclrCoin/dclrcoin | 1ca3bd1f787fdead6ae84b7cda2bab6c6cb62b1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018-2019 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 dclrcoind shutdown."""
from test_framework.test_framework import BitcoinTestFramework
from test_f... | 38.916667 | 103 | 0.715917 |
ceef3952d43a6866b5c9a11e1c050988abcb118d | 997 | py | Python | core/LSH/models.py | StanHardy/LSFR | 7362f740efd5715b1b97a86ee2431fdbdd97a3de | [
"MIT"
] | null | null | null | core/LSH/models.py | StanHardy/LSFR | 7362f740efd5715b1b97a86ee2431fdbdd97a3de | [
"MIT"
] | null | null | null | core/LSH/models.py | StanHardy/LSFR | 7362f740efd5715b1b97a86ee2431fdbdd97a3de | [
"MIT"
] | 1 | 2022-02-24T10:13:17.000Z | 2022-02-24T10:13:17.000Z | from sqlalchemy import Column, Text, Integer, Float
from sqlalchemy.schema import PrimaryKeyConstraint
from .base import Base
class AutoRepr:
def __repr__(self):
return str(self.__dict__)
class Index(Base, AutoRepr):
__tablename__ = "findex"
vec_id = Column(Text)
hash_bucket = Column(Text)... | 20.770833 | 62 | 0.627884 |
75755b1b69f242b4d218673f18eaf60dd84bb49b | 1,597 | py | Python | alignmentrs/alnset/funcs.py | yamasampo/alignmentrs | 5f963d13ac2db72f4ef23b462de0836526f590b7 | [
"MIT"
] | null | null | null | alignmentrs/alnset/funcs.py | yamasampo/alignmentrs | 5f963d13ac2db72f4ef23b462de0836526f590b7 | [
"MIT"
] | null | null | null | alignmentrs/alnset/funcs.py | yamasampo/alignmentrs | 5f963d13ac2db72f4ef23b462de0836526f590b7 | [
"MIT"
] | null | null | null | # from alignmentrs.alnset import AlignmentSet
# __all__ = ['fasta_directory_to_alignmentset']
# def fasta_directory_to_alignmentset(dirpath, name, marker_kw=None,
# suffix='.aln',
# filename_to_key_encoder=None):
# """Reads a directory cont... | 37.139535 | 78 | 0.629931 |
98f3e24639a4a0cd77bc73e483a5b633443212f4 | 7,310 | py | Python | src/chess_zero/config.py | jimmyai/chess-alpha-zero | 485db05e4061132a9dff4c36dc692ced72df0715 | [
"MIT"
] | 1,998 | 2017-11-19T13:18:22.000Z | 2022-03-29T20:54:50.000Z | src/chess_zero/config.py | jimmyai/chess-alpha-zero | 485db05e4061132a9dff4c36dc692ced72df0715 | [
"MIT"
] | 91 | 2017-11-19T17:29:56.000Z | 2022-02-09T23:26:49.000Z | src/chess_zero/config.py | jimmyai/chess-alpha-zero | 485db05e4061132a9dff4c36dc692ced72df0715 | [
"MIT"
] | 518 | 2017-11-20T22:20:28.000Z | 2022-03-19T21:44:33.000Z | """
Everything related to configuration of running this application
"""
import os
import numpy as np
class PlayWithHumanConfig:
"""
Config for allowing human to play against an agent using uci
"""
def __init__(self):
self.simulation_num_per_move = 1200
self.threads_multiplier = 2
... | 36.919192 | 107 | 0.610944 |
daab0cf44a956aa8eada1fd70ee1bbdcde0a48ad | 809 | py | Python | manage.py | EruDev/eru_manager | 9bc7fb3af361c7de734bfa6c4e1562dd7f978500 | [
"Apache-2.0"
] | 17 | 2018-07-06T11:37:54.000Z | 2022-01-04T01:15:54.000Z | manage.py | EruDev/eru_manager | 9bc7fb3af361c7de734bfa6c4e1562dd7f978500 | [
"Apache-2.0"
] | 3 | 2018-07-17T01:56:44.000Z | 2020-06-05T18:34:48.000Z | manage.py | EruDev/eru_manager | 9bc7fb3af361c7de734bfa6c4e1562dd7f978500 | [
"Apache-2.0"
] | 4 | 2018-07-16T01:48:04.000Z | 2019-11-06T12:25:35.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "eru_manager.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that ... | 35.173913 | 77 | 0.644005 |
405196e3adf7766df0d2361bea118543340322c6 | 250 | py | Python | src/gather2gether/g2g.py | witrdotnet/gather2gether | 42b12d16351c7311ae84b1f507c6e498882bc5c8 | [
"MIT"
] | 1 | 2020-02-22T22:54:05.000Z | 2020-02-22T22:54:05.000Z | src/gather2gether/g2g.py | witrdotnet/gather2gether | 42b12d16351c7311ae84b1f507c6e498882bc5c8 | [
"MIT"
] | 13 | 2020-02-29T05:53:57.000Z | 2020-03-16T07:57:45.000Z | src/gather2gether/g2g.py | witrdotnet/gather2gether | 42b12d16351c7311ae84b1f507c6e498882bc5c8 | [
"MIT"
] | null | null | null | import click
from flask import Flask
from flask.cli import FlaskGroup
def create_app():
app = Flask('g2g')
return app
@click.group(cls=FlaskGroup, create_app=create_app)
def cli():
"""Management script for gather2gether application."""
| 20.833333 | 58 | 0.736 |
074e8174d2272621db80e4fd59d0eb4d25a94cd2 | 65,402 | py | Python | tests/test_modeling_tf_common.py | kct22aws/transformers | 04cddaf402591e9f5bdb5f116a111d829a0ce4f4 | [
"Apache-2.0"
] | 5 | 2020-10-30T13:07:02.000Z | 2021-03-17T12:18:30.000Z | tests/test_modeling_tf_common.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 2 | 2022-01-06T05:40:05.000Z | 2022-01-06T15:12:29.000Z | tests/test_modeling_tf_common.py | guang7400613/transformers | 28e091430eea9e0d40839e56fd0d57aec262f5f9 | [
"Apache-2.0"
] | 3 | 2022-01-06T04:44:13.000Z | 2022-02-18T23:35:21.000Z | # coding=utf-8
# Copyright 2019 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 45.198341 | 137 | 0.611862 |
ab411232861bf785831c03141cb11720f11ce13a | 778 | py | Python | tests/unit/opera/parser/tosca/v_1_3/test_relationship_template.py | abitrolly/xopera-opera | 49694282db95bb425b988117b90b629f898803ec | [
"Apache-2.0"
] | 31 | 2019-02-12T06:52:24.000Z | 2022-03-23T06:48:10.000Z | tests/unit/opera/parser/tosca/v_1_3/test_relationship_template.py | abitrolly/xopera-opera | 49694282db95bb425b988117b90b629f898803ec | [
"Apache-2.0"
] | 190 | 2019-05-09T09:12:38.000Z | 2022-03-31T06:21:51.000Z | tests/unit/opera/parser/tosca/v_1_3/test_relationship_template.py | abitrolly/xopera-opera | 49694282db95bb425b988117b90b629f898803ec | [
"Apache-2.0"
] | 19 | 2019-05-09T13:36:22.000Z | 2022-01-25T21:27:50.000Z | from opera.parser.tosca.v_1_3.relationship_template import RelationshipTemplate
class TestParse:
def test_full(self, yaml_ast):
RelationshipTemplate.parse(yaml_ast(
# language=yaml
"""
type: rel.type
description: Some muttering
metadata: {}
... | 25.096774 | 79 | 0.496144 |
6bfa327a4bdf5097639fa284dcdc9b7b1ccfa67c | 2,852 | py | Python | 0.1/btmp.py | nlysov/old-trading-project | 73fdeff96b0023ad802c02bee986ce1ca9ef5177 | [
"MIT"
] | null | null | null | 0.1/btmp.py | nlysov/old-trading-project | 73fdeff96b0023ad802c02bee986ce1ca9ef5177 | [
"MIT"
] | null | null | null | 0.1/btmp.py | nlysov/old-trading-project | 73fdeff96b0023ad802c02bee986ce1ca9ef5177 | [
"MIT"
] | null | null | null | import json, requests,ast,os
import time as ti
from datetime import *
import pandas as pd
import itertools as itr
def bitmex_data(quer,endT,tmg):
c = 500 * 60 * tmg["full"]
d = int(tmg["rem"])
cou = 0
pricer = []
sub = [[],[],[],[],[],[]]
ohlc = ["timestamp","open","high","low","... | 39.611111 | 109 | 0.47791 |
d20689b6c80e1834bf02a32f436b333505cff533 | 669 | py | Python | exercise_completed/actions.py | RasaHQ/workshop-rasa-x-simple | b986371cba569b900fc72d237c0e14e487c17a57 | [
"Apache-2.0"
] | null | null | null | exercise_completed/actions.py | RasaHQ/workshop-rasa-x-simple | b986371cba569b900fc72d237c0e14e487c17a57 | [
"Apache-2.0"
] | null | null | null | exercise_completed/actions.py | RasaHQ/workshop-rasa-x-simple | b986371cba569b900fc72d237c0e14e487c17a57 | [
"Apache-2.0"
] | null | null | null |
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
import requests
class ActionSubscribe(Action):
def name(self) -> Text:
return "action_subscribe"
def run(self, dispatcher: CollectingDispatcher,
tracker:... | 30.409091 | 171 | 0.684604 |
0ad6122e51c077eaff45905ae9436f44de4b221c | 5,495 | py | Python | timevortex/utils/commands.py | timevortexproject/timevortex | 2bc1a50b255524af8582e6624dee280d64d3c9f3 | [
"MIT"
] | null | null | null | timevortex/utils/commands.py | timevortexproject/timevortex | 2bc1a50b255524af8582e6624dee280d64d3c9f3 | [
"MIT"
] | null | null | null | timevortex/utils/commands.py | timevortexproject/timevortex | 2bc1a50b255524af8582e6624dee280d64d3c9f3 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf8 -*-
# -*- Mode: Python; py-indent-offset: 4 -*-
"""Commands utils file"""
import sys
import json
from time import tzname, sleep
import requests
from django.core.management.base import BaseCommand
from django.utils import timezone
from timevortex.utils.globals import ERROR_TIMESER... | 31.58046 | 114 | 0.590173 |
a16f78422898f4e547bbfc27b12f071650874e31 | 2,478 | py | Python | tools/build.py | YonVclaw/xmarkers | 1e9a72a43b1ef4f920e728b2ecf9d649591645a3 | [
"MIT"
] | null | null | null | tools/build.py | YonVclaw/xmarkers | 1e9a72a43b1ef4f920e728b2ecf9d649591645a3 | [
"MIT"
] | null | null | null | tools/build.py | YonVclaw/xmarkers | 1e9a72a43b1ef4f920e728b2ecf9d649591645a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
import subprocess
######## GLOBALS #########
MAINPREFIX = "z"
PREFIX = "XMARK_"
##########################
def mod_time(path):
if not os.path.isdir(path):
return os.path.getmtime(path)
maxi = os.path.getmtime(path)
for p in os.listdir(path):
max... | 26.934783 | 124 | 0.537934 |
a5fe0bbecd9a0d8188011dea610f91752863e6d4 | 2,194 | py | Python | tools/report-converter/tests/unit/analyzers/test_msan_parser.py | hyker/codechecker | 8ddb9bd1aa037d4499a2be8d35e9c1d470163baf | [
"Apache-2.0"
] | 1 | 2021-04-08T16:51:45.000Z | 2021-04-08T16:51:45.000Z | tools/report-converter/tests/unit/analyzers/test_msan_parser.py | hyker/codechecker | 8ddb9bd1aa037d4499a2be8d35e9c1d470163baf | [
"Apache-2.0"
] | 1 | 2021-11-30T10:43:49.000Z | 2021-11-30T10:43:49.000Z | tools/report-converter/tests/unit/analyzers/test_msan_parser.py | hyker/codechecker | 8ddb9bd1aa037d4499a2be8d35e9c1d470163baf | [
"Apache-2.0"
] | null | null | null | # -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# ---------------------------------------------------... | 30.054795 | 79 | 0.623063 |
74888b94aff64bea371332514ff720d019a6f63b | 18,846 | py | Python | src/ebay_rest/api/buy_order/models/order_line_item_v2.py | gbm001/ebay_rest | 077d3478423ccd80ff35e0361821d6a11180bc54 | [
"MIT"
] | null | null | null | src/ebay_rest/api/buy_order/models/order_line_item_v2.py | gbm001/ebay_rest | 077d3478423ccd80ff35e0361821d6a11180bc54 | [
"MIT"
] | null | null | null | src/ebay_rest/api/buy_order/models/order_line_item_v2.py | gbm001/ebay_rest | 077d3478423ccd80ff35e0361821d6a11180bc54 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Order API
<span class=\"tablenote\"><b>Note:</b> This version of the Order API (v2) currently only supports the guest payment flow for eBay managed payments. To view the v1_beta version of the Order API, which includes both member and guest checkout payment flows, refer to the <a href=\"/a... | 34.453382 | 900 | 0.639181 |
ec0cb3d4f47f00ec4245177528d00068a2cabd33 | 1,628 | py | Python | synth.py | chingor13/nodejs-bigquery-storage | 3335dbaaa73ff9bbc7312d04007f3e06c6ad2ba2 | [
"Apache-2.0"
] | null | null | null | synth.py | chingor13/nodejs-bigquery-storage | 3335dbaaa73ff9bbc7312d04007f3e06c6ad2ba2 | [
"Apache-2.0"
] | null | null | null | synth.py | chingor13/nodejs-bigquery-storage | 3335dbaaa73ff9bbc7312d04007f3e06c6ad2ba2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 38.761905 | 110 | 0.729115 |
fa2229a9583a4a8e9824709fa059cb2ae1339d3e | 711 | py | Python | tests/helpers/markers.py | owais/python-tornado | cdb8162768eb6b6fbcd4c0fac4156f3422c3c711 | [
"Apache-2.0"
] | null | null | null | tests/helpers/markers.py | owais/python-tornado | cdb8162768eb6b6fbcd4c0fac4156f3422c3c711 | [
"Apache-2.0"
] | null | null | null | tests/helpers/markers.py | owais/python-tornado | cdb8162768eb6b6fbcd4c0fac4156f3422c3c711 | [
"Apache-2.0"
] | null | null | null | import sys
import pytest
from tornado import version_info as tornado_version
skip_generator_contextvars_on_tornado6 = pytest.mark.skipif(
tornado_version >= (6, 0, 0),
reason=(
'tornado6 has a bug (#2716) that '
'prevents contextvars from working.'
)
)
skip_generator_contextvars_on_py34... | 24.517241 | 73 | 0.684951 |
e7073403c045c073a89a3b4f0ca8a5a9eb3a1f01 | 3,185 | py | Python | train.py | DimplesL/PyTorch_CIFAR10 | 6ff671c0d71ed9de967dc34a831610190ca9e3dc | [
"MIT"
] | null | null | null | train.py | DimplesL/PyTorch_CIFAR10 | 6ff671c0d71ed9de967dc34a831610190ca9e3dc | [
"MIT"
] | null | null | null | train.py | DimplesL/PyTorch_CIFAR10 | 6ff671c0d71ed9de967dc34a831610190ca9e3dc | [
"MIT"
] | null | null | null | import os
from argparse import ArgumentParser
import torch
from pytorch_lightning import Trainer, seed_everything
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.loggers import WandbLogger, TensorBoardLogger
from data import CIFAR10Data, MyData
from module import CIFAR10Module, MyModule... | 35.388889 | 111 | 0.684144 |
7c0c1177f9352791cbb43bdb463f6318d6e2681a | 4,452 | py | Python | pyatv/protocols/mrp/protobuf/TransactionPacket_pb2.py | Jacobs4/pyatv | 52956adf3b79198be52cc03649f3ddeee19f9e6c | [
"MIT"
] | 532 | 2017-02-01T19:23:28.000Z | 2022-03-29T09:57:39.000Z | pyatv/protocols/mrp/protobuf/TransactionPacket_pb2.py | Jacobs4/pyatv | 52956adf3b79198be52cc03649f3ddeee19f9e6c | [
"MIT"
] | 1,639 | 2017-02-01T19:22:04.000Z | 2022-03-31T17:26:40.000Z | pyatv/protocols/mrp/protobuf/TransactionPacket_pb2.py | bdraco/pyatv | 9541d21e6101c60866d832626be97bf962774cd5 | [
"MIT"
] | 102 | 2017-02-02T01:42:13.000Z | 2022-02-26T08:49:34.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pyatv/protocols/mrp/protobuf/TransactionPacket.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflec... | 43.647059 | 393 | 0.77965 |
cfd743af0c1b926d2df282575bd7450a38943884 | 912 | py | Python | src/vak/cli/cli.py | yardencsGitHub/vak | 04da97b02ded5acccab437c2538d0a1ded3bef80 | [
"BSD-3-Clause"
] | 1 | 2021-04-27T01:22:38.000Z | 2021-04-27T01:22:38.000Z | src/vak/cli/cli.py | yardencsGitHub/vak | 04da97b02ded5acccab437c2538d0a1ded3bef80 | [
"BSD-3-Clause"
] | null | null | null | src/vak/cli/cli.py | yardencsGitHub/vak | 04da97b02ded5acccab437c2538d0a1ded3bef80 | [
"BSD-3-Clause"
] | null | null | null | from .eval import eval
from .train import train
from .learncurve import learning_curve
from .predict import predict
from .prep import prep
def cli(command, config_file):
"""command-line interface
Parameters
----------
command : string
One of {'prep', 'train', 'eval', 'predict', 'finetune', 'l... | 22.8 | 77 | 0.625 |
de169466869dee9f262ce4c7f2b14388e5cf368f | 1,095 | py | Python | chapter_04_data_layer/account_example/account_example/example/migrations/0001_initial.py | Tm2197/Python-Architecture-Patterns | 8091b4d8e2580763ceb55a83c75aa9b6225fcb72 | [
"MIT"
] | 12 | 2021-07-20T12:55:39.000Z | 2022-02-05T10:53:38.000Z | chapter_04_data_layer/account_example/account_example/example/migrations/0001_initial.py | Tm2197/Python-Architecture-Patterns | 8091b4d8e2580763ceb55a83c75aa9b6225fcb72 | [
"MIT"
] | null | null | null | chapter_04_data_layer/account_example/account_example/example/migrations/0001_initial.py | Tm2197/Python-Architecture-Patterns | 8091b4d8e2580763ceb55a83c75aa9b6225fcb72 | [
"MIT"
] | 9 | 2021-07-22T06:01:03.000Z | 2022-03-01T05:50:45.000Z | # Generated by Django 3.2 on 2021-04-18 12:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='InternalAccount',
fields=[
... | 34.21875 | 149 | 0.605479 |
af90ea2628231ac54e8ddb2d9f9c866a62c5dc03 | 716 | py | Python | jesse/indicators/dema.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 1 | 2021-03-25T09:25:49.000Z | 2021-03-25T09:25:49.000Z | jesse/indicators/dema.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | null | null | null | jesse/indicators/dema.py | noenfugler/jesse | 217a3168620a755c1a9576d9deb27105db7dccf8 | [
"MIT"
] | 1 | 2021-09-28T16:23:40.000Z | 2021-09-28T16:23:40.000Z | from typing import Union
import numpy as np
import talib
from jesse.helpers import get_candle_source, slice_candles
def dema(candles: np.ndarray, period: int = 30, source_type: str = "close", sequential: bool = False) -> Union[
float, np.ndarray]:
"""
DEMA - Double Exponential Moving Average
:param... | 26.518519 | 111 | 0.701117 |
3bbf6866076e827f03245399ddd61c6bdecb1694 | 1,185 | py | Python | crabageprediction/venv/Lib/site-packages/pandas/tests/arrays/integer/test_comparison.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 3 | 2021-11-23T05:35:28.000Z | 2022-02-10T08:05:53.000Z | crabageprediction/venv/Lib/site-packages/pandas/tests/arrays/integer/test_comparison.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 354 | 2018-05-26T13:28:49.000Z | 2022-03-31T01:11:46.000Z | crabageprediction/venv/Lib/site-packages/pandas/tests/arrays/integer/test_comparison.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | 5 | 2018-04-24T13:31:56.000Z | 2021-10-21T05:06:23.000Z | import pytest
import pandas as pd
from pandas.tests.arrays.masked_shared import (
ComparisonOps,
NumericOps,
)
class TestComparisonOps(NumericOps, ComparisonOps):
@pytest.mark.parametrize("other", [True, False, pd.NA, -1, 0, 1])
def test_scalar(self, other, comparison_op, dtype):
ComparisonOp... | 30.384615 | 78 | 0.654852 |
8f40763a40fafab9fb3ea94649ef6c8926b6c4dc | 1,173 | py | Python | programmer_algorithm_interview/prj/production_codes/linkedlist_reverseorder.py | youngsheep7/datastructure_algorithm_for_python | 6a0601274a6cf0954f5203beea493abe105cf7fb | [
"Apache-2.0"
] | null | null | null | programmer_algorithm_interview/prj/production_codes/linkedlist_reverseorder.py | youngsheep7/datastructure_algorithm_for_python | 6a0601274a6cf0954f5203beea493abe105cf7fb | [
"Apache-2.0"
] | null | null | null | programmer_algorithm_interview/prj/production_codes/linkedlist_reverseorder.py | youngsheep7/datastructure_algorithm_for_python | 6a0601274a6cf0954f5203beea493abe105cf7fb | [
"Apache-2.0"
] | null | null | null | import random
class LinkedListNode:
def __init__(self, data, next):
self.data = data
self.next = next
def __init_linkedlist(hashead, i_length, isdatarandom):
'''
:param hashead:
:param i_length:
:param isdatarandom:
:return:
'''
if hashead == True:
head = LinkedListNode(i_length, None)
cur = head
i... | 18.046154 | 55 | 0.623188 |
f9922bf30918543e5f29a0062f8eb75803a6cec1 | 3,793 | py | Python | pychron/options/composite.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 31 | 2016-03-07T02:38:17.000Z | 2022-02-14T18:23:43.000Z | pychron/options/composite.py | ASUPychron/pychron | dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76 | [
"Apache-2.0"
] | 1,626 | 2015-01-07T04:52:35.000Z | 2022-03-25T19:15:59.000Z | pychron/options/composite.py | UIllinoisHALPychron/pychron | f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc | [
"Apache-2.0"
] | 26 | 2015-05-23T00:10:06.000Z | 2022-03-07T16:51:57.000Z | # ===============================================================================
# Copyright 2019 ross
#
# 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/LICE... | 33.566372 | 81 | 0.608489 |
40692de14a7e05b3af8a38de66ef571ff4da69d8 | 764 | py | Python | Payload_Types/kayn/mythic/agent_functions/exit_agent.py | simonedaini/Mythic | e1dd3a172c328fe98b13434c9ca3f3c40e3f5d33 | [
"BSD-3-Clause"
] | null | null | null | Payload_Types/kayn/mythic/agent_functions/exit_agent.py | simonedaini/Mythic | e1dd3a172c328fe98b13434c9ca3f3c40e3f5d33 | [
"BSD-3-Clause"
] | null | null | null | Payload_Types/kayn/mythic/agent_functions/exit_agent.py | simonedaini/Mythic | e1dd3a172c328fe98b13434c9ca3f3c40e3f5d33 | [
"BSD-3-Clause"
] | null | null | null | from mythic_payloadtype_container.MythicCommandBase import *
import json
class ExitArguments(TaskArguments):
def __init__(self, command_line):
super().__init__(command_line)
self.args = {}
async def parse_arguments(self):
pass
class ExitCommand(CommandBase):
cmd = "exit_agent"
... | 25.466667 | 90 | 0.692408 |
d2b64a8ef6ec42f500f85517b714bdc156951f77 | 1,006 | py | Python | test/util/generateCourses.py | SowinskiBraeden/school-management-api | a2d365625e2286de2fe6e2ad3fb5d0aadee45fa4 | [
"MIT"
] | 1 | 2022-02-17T20:36:37.000Z | 2022-02-17T20:36:37.000Z | test/util/generateCourses.py | SowinskiBraeden/school-management-api | a2d365625e2286de2fe6e2ad3fb5d0aadee45fa4 | [
"MIT"
] | null | null | null | test/util/generateCourses.py | SowinskiBraeden/school-management-api | a2d365625e2286de2fe6e2ad3fb5d0aadee45fa4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import json
import csv
realCourses = {}
# Get all courses from real sample data
def getSampleCourses(data_dir, log=False) -> dict:
with open(data_dir, newline='') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
exists = False
for course in realCourses:
... | 27.189189 | 80 | 0.620278 |
0f222890f9d722ab7cc02a48fff85d2388e2318f | 13,562 | py | Python | basis_set_exchange/validator.py | BasisSetExchange/basis_set_exchange | 1054817a0a898800897354b003e23b5222d54d21 | [
"BSD-3-Clause"
] | 4 | 2018-03-21T20:33:56.000Z | 2018-05-28T02:07:39.000Z | basis_set_exchange/validator.py | BasisSetExchange/basis_set_exchange | 1054817a0a898800897354b003e23b5222d54d21 | [
"BSD-3-Clause"
] | 20 | 2018-02-15T15:15:40.000Z | 2018-05-22T19:54:58.000Z | basis_set_exchange/validator.py | BasisSetExchange/basis_set_exchange | 1054817a0a898800897354b003e23b5222d54d21 | [
"BSD-3-Clause"
] | 1 | 2018-03-15T02:12:55.000Z | 2018-03-15T02:12:55.000Z | # Copyright (c) 2017-2022 The Molecular Sciences Software Institute, Virginia Tech
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this l... | 37.258242 | 120 | 0.6516 |
ad075538efce7f5689eec3e8bd8984905a9927db | 1,596 | py | Python | algorithms/quick_sort.py | chiqj/grokking-algorithms | 4681a4ea806a441d3511c8fb9d91a218b3fc89de | [
"MIT"
] | 1 | 2019-05-04T10:35:08.000Z | 2019-05-04T10:35:08.000Z | algorithms/quick_sort.py | chiqj/grokking-algorithms | 4681a4ea806a441d3511c8fb9d91a218b3fc89de | [
"MIT"
] | null | null | null | algorithms/quick_sort.py | chiqj/grokking-algorithms | 4681a4ea806a441d3511c8fb9d91a218b3fc89de | [
"MIT"
] | null | null | null | # coding=utf-8
import random
class QuickSort:
def sort(self, array: list) -> list:
if len(array) <= 1:
return array
else:
# choose pivot randomly
pivot = array.pop(random.randrange(len(array)))
left_partition = []
right_partition = []
... | 32.571429 | 75 | 0.528822 |
22896fc7355f1baa1a7f7d9e3165cdfe2c0b6611 | 165 | py | Python | src/node/ext/ldap/scope.py | enfold/node.ext.ldap | 28127057be6ba3092389f3c920575292d43d9f94 | [
"BSD-2-Clause"
] | 3 | 2016-04-22T00:37:17.000Z | 2020-04-03T07:14:54.000Z | src/node/ext/ldap/scope.py | enfold/node.ext.ldap | 28127057be6ba3092389f3c920575292d43d9f94 | [
"BSD-2-Clause"
] | 51 | 2015-02-10T11:14:01.000Z | 2021-05-05T11:06:59.000Z | src/node/ext/ldap/scope.py | enfold/node.ext.ldap | 28127057be6ba3092389f3c920575292d43d9f94 | [
"BSD-2-Clause"
] | 12 | 2016-08-09T09:39:35.000Z | 2020-04-18T14:53:56.000Z | # -*- coding: utf-8 -*-
import ldap
BASE = ldap.SCOPE_BASE
ONELEVEL = ldap.SCOPE_ONELEVEL
SUBTREE = ldap.SCOPE_SUBTREE
SCOPES = [BASE, ONELEVEL, SUBTREE]
del ldap
| 16.5 | 34 | 0.727273 |
77a6d69f96b69f5fa00a63fd2b53a070af7a8372 | 1,929 | py | Python | environment/Lib/site-packages/openpyxl/xml/functions.py | pumbas600/CriticalPath | 31889c875dedf733aeb9a4ebeba8bf8930e86176 | [
"MIT"
] | 2 | 2020-07-23T18:28:16.000Z | 2021-02-26T18:43:36.000Z | environment/Lib/site-packages/openpyxl/xml/functions.py | pumbas600/CriticalPath | 31889c875dedf733aeb9a4ebeba8bf8930e86176 | [
"MIT"
] | 10 | 2019-08-30T18:46:14.000Z | 2020-04-06T19:56:32.000Z | environment/Lib/site-packages/openpyxl/xml/functions.py | pumbas600/CriticalPath | 31889c875dedf733aeb9a4ebeba8bf8930e86176 | [
"MIT"
] | 1 | 2020-02-14T19:43:24.000Z | 2020-02-14T19:43:24.000Z | # Copyright (c) 2010-2019 openpyxl
"""
XML compatability functions
"""
# Python stdlib imports
import re
from functools import partial
from openpyxl import DEFUSEDXML, LXML
if LXML is True:
from lxml.etree import (
Element,
SubElement,
register_namespace,
QName,
xmlfile,
XMLParser,
)... | 22.694118 | 64 | 0.714878 |
75ba6270de4b80fdfe095b436c4b663c66aad4c7 | 9,954 | py | Python | internal/chrome_desktop.py | SpeedCurve-Metrics/wptagent-old | 365e2c1205c14b943f1539696a5dae5bf7e23ead | [
"Apache-2.0"
] | null | null | null | internal/chrome_desktop.py | SpeedCurve-Metrics/wptagent-old | 365e2c1205c14b943f1539696a5dae5bf7e23ead | [
"Apache-2.0"
] | null | null | null | internal/chrome_desktop.py | SpeedCurve-Metrics/wptagent-old | 365e2c1205c14b943f1539696a5dae5bf7e23ead | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 WebPageTest LLC.
# Copyright 2017 Google Inc.
# Use of this source code is governed by the Apache 2.0 license that can be
# found in the LICENSE file.
"""Logic for controlling a desktop Chrome browser"""
import gzip
import logging
import os
import platform
import subprocess
import shutil
import time
fr... | 42.357447 | 96 | 0.605887 |
28fac8be3b457dfcc10259eceb6cafab5e84fc66 | 1,981 | py | Python | py3.6+/DataProcess/RemoveAd.py | InspAlgo/WEIBO_Project | 2e6a17050ebcff5dfb5ec5a172c21aa4f8c32b82 | [
"MIT"
] | 13 | 2019-09-01T06:52:19.000Z | 2022-03-21T11:53:39.000Z | py3.6+/DataProcess/RemoveAd.py | InspAlgo/WEIBO_Project | 2e6a17050ebcff5dfb5ec5a172c21aa4f8c32b82 | [
"MIT"
] | null | null | null | py3.6+/DataProcess/RemoveAd.py | InspAlgo/WEIBO_Project | 2e6a17050ebcff5dfb5ec5a172c21aa4f8c32b82 | [
"MIT"
] | 2 | 2020-12-07T07:57:27.000Z | 2022-01-25T06:24:12.000Z | ################################################################################
##
## 新浪微博热点事件发现与脉络生成系统
##
## @Filename ./DataProcess/RemoveAd.py
## @Author 李林峰, 刘臻, 徐润邦, 马伯乐, 朱杰, 瞿凤业
## @Version 3.1
## @Date 2019/09/06
## @Copyright Copyright (c) 2019. All... | 31.444444 | 97 | 0.502776 |
ed0492af75cb1994ccf377456595ed499d4385d8 | 20,381 | py | Python | tods/timeseries_processing/SubsequenceSegmentation.py | ZhuangweiKang/tods | fe3f55f8ccb306dd292c668e0f1154f1afdfa556 | [
"Apache-2.0"
] | 544 | 2020-09-21T06:02:33.000Z | 2022-03-27T07:16:32.000Z | tods/timeseries_processing/SubsequenceSegmentation.py | ZhuangweiKang/tods | fe3f55f8ccb306dd292c668e0f1154f1afdfa556 | [
"Apache-2.0"
] | 35 | 2020-09-21T06:33:13.000Z | 2022-03-11T14:20:21.000Z | tods/timeseries_processing/SubsequenceSegmentation.py | ZhuangweiKang/tods | fe3f55f8ccb306dd292c668e0f1154f1afdfa556 | [
"Apache-2.0"
] | 86 | 2020-09-21T16:44:33.000Z | 2022-03-11T18:20:22.000Z | from typing import Any, Callable, List, Dict, Union, Optional, Sequence, Tuple
from numpy import ndarray
from collections import OrderedDict
from scipy import sparse
from sklearn.utils import check_array
import numpy as np
import typing
import time
import pandas as pd
import uuid
from d3m import container
from d3m.pri... | 42.284232 | 218 | 0.654924 |
f8959bd0399562d664d1bf244ba2b10d1cb3e5bb | 5,775 | py | Python | viz/net/affinity.py | thorwhalen/ut | 353a4629c35a2cca76ef91a4d5209afe766433b4 | [
"MIT"
] | 4 | 2016-12-17T20:06:10.000Z | 2021-11-19T04:45:29.000Z | viz/net/affinity.py | thorwhalen/ut | 353a4629c35a2cca76ef91a4d5209afe766433b4 | [
"MIT"
] | 11 | 2021-01-06T05:35:11.000Z | 2022-03-11T23:28:31.000Z | viz/net/affinity.py | thorwhalen/ut | 353a4629c35a2cca76ef91a4d5209afe766433b4 | [
"MIT"
] | 3 | 2015-06-12T10:44:16.000Z | 2021-07-26T18:39:47.000Z | __author__ = 'thor'
import datetime
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import finance
from matplotlib.collections import LineCollection
import pandas as pd
from sklearn import cluster, covariance, manifold
def affinity_propagation_network(X, names=None):
"""
Cluster (affinit... | 38.245033 | 130 | 0.599134 |
b54b8c76075a2284edd029c742c7575d20b9aab0 | 4,974 | py | Python | plots.py | Carloselrecharlie/Programming_module_project | 3f6794bb473caa7c36ff35fd80d987dd3503c715 | [
"Apache-2.0"
] | null | null | null | plots.py | Carloselrecharlie/Programming_module_project | 3f6794bb473caa7c36ff35fd80d987dd3503c715 | [
"Apache-2.0"
] | null | null | null | plots.py | Carloselrecharlie/Programming_module_project | 3f6794bb473caa7c36ff35fd80d987dd3503c715 | [
"Apache-2.0"
] | null | null | null | # Carlos Montes
# Charts code for the project of the module "Programming and scripting"
import csv
import numpy as np
import matplotlib.pyplot as plt
# array that stores data from the csv file
data = np.genfromtxt('data/iris.csv', delimiter = ',')
# variables per column
col1 = data[:,0]
col2 = data[:,1]
col3 = data... | 24.263415 | 98 | 0.67893 |
168b2ed23e9071c10b4c7a40834cb56e8d0607f6 | 850 | py | Python | kubeflow/fairing/builders/cluster/context_source.py | suomitekai/fairing | 9ca6a1138529b3f0b21979d62c7cb1f303bc52e0 | [
"Apache-2.0"
] | 334 | 2018-09-03T23:10:02.000Z | 2022-03-07T23:12:24.000Z | kubeflow/fairing/builders/cluster/context_source.py | suomitekai/fairing | 9ca6a1138529b3f0b21979d62c7cb1f303bc52e0 | [
"Apache-2.0"
] | 562 | 2018-09-03T21:33:42.000Z | 2022-03-29T12:47:43.000Z | kubeflow/fairing/builders/cluster/context_source.py | suomitekai/fairing | 9ca6a1138529b3f0b21979d62c7cb1f303bc52e0 | [
"Apache-2.0"
] | 160 | 2018-11-06T17:55:32.000Z | 2022-02-15T09:59:10.000Z | import abc
import six
@six.add_metaclass(abc.ABCMeta)
class ContextSourceInterface(object):
"""Interface that provides the build context to the in cluster builder"""
@abc.abstractmethod
def prepare(self):
"""Makes the context somehow available for use in the pod spec"""
raise NotImplement... | 30.357143 | 82 | 0.707059 |
f65ec2e9f52319925cc1effffdbb8adc4b57f546 | 287 | py | Python | webutils/admin.py | ernado-legacy/django-webutils | 10c479c10023a227b6705febb85ad5dab59b36ab | [
"BSD-3-Clause"
] | null | null | null | webutils/admin.py | ernado-legacy/django-webutils | 10c479c10023a227b6705febb85ad5dab59b36ab | [
"BSD-3-Clause"
] | null | null | null | webutils/admin.py | ernado-legacy/django-webutils | 10c479c10023a227b6705febb85ad5dab59b36ab | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from watermarker.models import Watermark
class WatermarkAdmin(admin.ModelAdmin):
model = Watermark
list_display = ['name', 'is_active']
list_filter = ['is_active']
search_fields = ['name']
admin.site.register(Watermark, WatermarkAdmin) | 26.090909 | 46 | 0.745645 |
49072eff83892d6b4ddf1fded2b7a14112d47a25 | 6,348 | py | Python | pointnet_cls.py | hoshino042/pointnet_re | a40e095cfc13acba712298aefa4378954b8dc975 | [
"MIT"
] | 2 | 2018-10-24T10:53:00.000Z | 2019-12-18T19:17:27.000Z | pointnet_cls.py | hoshino042/pointnet_re | a40e095cfc13acba712298aefa4378954b8dc975 | [
"MIT"
] | null | null | null | pointnet_cls.py | hoshino042/pointnet_re | a40e095cfc13acba712298aefa4378954b8dc975 | [
"MIT"
] | null | null | null | from utils import *
from ops import *
def get_input_placeholders(batch_size, num_point, num_feature):
pts_pl = tf.placeholder(tf.float32, shape=(batch_size, num_point, num_feature), name="point_clouds")
labels_pl = tf.placeholder(tf.int32, shape=(batch_size,), name="labels")
is_training_pl = tf.placeholde... | 45.342857 | 139 | 0.668399 |
1859ec727ef751d1cfa6ab0ff6ef5b82fd231d6b | 137 | py | Python | docker/pykafka/verify.py | ThisIsNotTheUserYouAreLookingFor/dockerfiles | f92673b0d15c457e4abe215cf260afbb5b25cf2e | [
"MIT"
] | 48 | 2018-12-12T12:18:09.000Z | 2022-03-05T02:23:42.000Z | docker/pykafka/verify.py | Axonius/dockerfiles | f2135e9abb468ee8db339ec27b2ba737acbbaef6 | [
"MIT"
] | 7,201 | 2018-12-24T17:14:17.000Z | 2022-03-31T13:39:12.000Z | docker/pykafka/verify.py | Axonius/dockerfiles | f2135e9abb468ee8db339ec27b2ba737acbbaef6 | [
"MIT"
] | 94 | 2018-12-17T10:59:21.000Z | 2022-03-29T12:59:30.000Z | import lz4.frame as lz4
import lz4f
import xxhash
import snappy
print("xxhash version: " + xxhash.XXHASH_VERSION)
print("all is good")
| 15.222222 | 49 | 0.766423 |
b59d0f161ba46cf90241021c315e9ec64a47b8bf | 273 | py | Python | tests/unit/test_serializers.py | thiagopena/python-mcollective | 77cac3e23e6a61542662be3b8f94ee54bbfea942 | [
"BSD-3-Clause"
] | 1 | 2015-07-29T00:35:51.000Z | 2015-07-29T00:35:51.000Z | tests/unit/test_serializers.py | jantman/python-mcollective | ceb8f362bc8a1981b42696889250bed1cce07fea | [
"BSD-3-Clause"
] | null | null | null | tests/unit/test_serializers.py | jantman/python-mcollective | ceb8f362bc8a1981b42696889250bed1cce07fea | [
"BSD-3-Clause"
] | 1 | 2019-01-02T18:40:24.000Z | 2019-01-02T18:40:24.000Z | """Tests for pymco.serializers"""
import pytest
from pymco import serializers
def test_serializer_can_not_be_instantiated():
"""Tests pymco.serializers.SerializerBase can't be instantiated."""
with pytest.raises(TypeError):
serializers.SerializerBase()
| 24.818182 | 72 | 0.758242 |
737327b721caece4647c05f7bb176d65f7d860ef | 2,705 | py | Python | pypy/module/cpyext/__init__.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/cpyext/__init__.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | pypy/module/cpyext/__init__.py | microvm/pypy-mu | 6b03fbe93052d0eb3a4c67152c987c16837b3484 | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | from pypy.interpreter.mixedmodule import MixedModule
from pypy.interpreter import gateway
from pypy.module.cpyext.state import State
from pypy.module.cpyext import api
class Module(MixedModule):
interpleveldefs = {
'load_module': 'api.load_extension_module',
}
appleveldefs = {
}
atexit_fu... | 33.8125 | 98 | 0.785582 |
c3d2c981202dad5586e325336d57b21c02b9b521 | 4,978 | py | Python | classic/reachable_nodes.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | classic/reachable_nodes.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | classic/reachable_nodes.py | Max-PJB/python-learning2 | e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
@ Author : pengj
@ date : 2018/11/7 13:55
@ IDE : PyCharm
@ GitHub : https://github.com/JackyPJB
@ Contact : pengjianbiao@hotmail.com
----------------... | 28.284091 | 89 | 0.49779 |
b06e9f26d2b8714c34b3127305306a13bc457635 | 4,163 | py | Python | ironfish_alexa/src/skill_server.py | shannon112/IronFish_alexa | 28376ca1d06ead5d0202330e160c276854610860 | [
"MIT"
] | 3 | 2020-05-26T09:22:17.000Z | 2021-12-02T07:54:06.000Z | ironfish_alexa/src/skill_server.py | shannon112/IronFish_alexa | 28376ca1d06ead5d0202330e160c276854610860 | [
"MIT"
] | null | null | null | ironfish_alexa/src/skill_server.py | shannon112/IronFish_alexa | 28376ca1d06ead5d0202330e160c276854610860 | [
"MIT"
] | 2 | 2019-06-04T05:16:33.000Z | 2021-12-07T04:37:51.000Z | #!/usr/bin/env python
import os
import rospy
import threading
import numpy as np
import csv
from flask import Flask
from flask_ask import Ask, question, statement
from std_msgs.msg import String
from ironfish_captain.srv import captain_command
app = Flask(__name__)
ask = Ask(app, "/")
# ROS node, publisher, and para... | 33.039683 | 132 | 0.666106 |
afd1cd20500a13c31d5626e776623b72dbd85d27 | 7,529 | py | Python | venv/lib/python3.8/site-packages/nltk/tokenize/toktok.py | avrumnoor/NewsSummarizer | a963497ef9bc62d2148aa28e624ea32955992f57 | [
"MIT"
] | 7 | 2021-01-30T17:42:00.000Z | 2022-01-09T08:08:48.000Z | venv/lib/python3.8/site-packages/nltk/tokenize/toktok.py | avrumnoor/NewsSummarizer | a963497ef9bc62d2148aa28e624ea32955992f57 | [
"MIT"
] | 25 | 2020-11-16T15:36:41.000Z | 2021-06-01T05:15:31.000Z | venv/lib/python3.8/site-packages/nltk/tokenize/toktok.py | avrumnoor/NewsSummarizer | a963497ef9bc62d2148aa28e624ea32955992f57 | [
"MIT"
] | 2 | 2021-05-03T04:02:50.000Z | 2021-05-18T01:34:45.000Z | # -*- coding: utf-8 -*-
# Natural Language Toolkit: Python port of the tok-tok.pl tokenizer.
#
# Copyright (C) 2001-2015 NLTK Project
# Author: Jon Dehdari
# Contributors: Liling Tan, Selcuk Ayguney, ikegami, Martijn Pieters
#
# URL: <http://nltk.sourceforge.net>
# For license information, see LICENSE.TXT
"""
The tok-... | 41.596685 | 172 | 0.624917 |
d4131abf4c1e2c1ddf5906fb8b5aab3b5ec920d3 | 1,431 | py | Python | borealis/server.py | yadudoc/borealis | a7ba6eb80162efc453cc4baf74a9349e2d0f4557 | [
"Apache-2.0"
] | null | null | null | borealis/server.py | yadudoc/borealis | a7ba6eb80162efc453cc4baf74a9349e2d0f4557 | [
"Apache-2.0"
] | null | null | null | borealis/server.py | yadudoc/borealis | a7ba6eb80162efc453cc4baf74a9349e2d0f4557 | [
"Apache-2.0"
] | 1 | 2018-06-25T18:56:20.000Z | 2018-06-25T18:56:20.000Z | import threading
import zmq
class Server(threading.Thread):
def __init__(self, service_port=55055, worker_port=55056):
self._stop = threading.Event()
self.service_port = service_port
self.worker_port = worker_port
threading.Thread.__init__(self)
def stop(self):
self._... | 25.105263 | 62 | 0.522013 |
571a0ad4fbfdf1d62bd8f080131e2fbb697015ef | 1,347 | py | Python | nova/scheduler/weights/compute.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,874 | 2015-01-04T05:18:34.000Z | 2022-03-31T03:30:28.000Z | nova/scheduler/weights/compute.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 40 | 2015-04-13T02:32:42.000Z | 2022-02-16T02:28:06.000Z | nova/scheduler/weights/compute.py | woraser/nova | fc3890667e4971e3f0f35ac921c2a6c25f72adec | [
"Apache-2.0"
] | 1,996 | 2015-01-04T15:11:51.000Z | 2022-03-31T11:03:13.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 36.405405 | 79 | 0.722346 |
67b8e74af5a9537fc09f441fc46f0e444763a219 | 967 | py | Python | Medium/238. Product of Array Except Self/solution (1).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 3 | 2020-05-09T12:55:09.000Z | 2022-03-11T18:56:05.000Z | Medium/238. Product of Array Except Self/solution (1).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | null | null | null | Medium/238. Product of Array Except Self/solution (1).py | czs108/LeetCode-Solutions | 889f5b6a573769ad077a6283c058ed925d52c9ec | [
"MIT"
] | 1 | 2022-03-11T18:56:16.000Z | 2022-03-11T18:56:16.000Z | # 238. Product of Array Except Self
# Runtime: 318 ms, faster than 22.10% of Python3 online submissions for Product of Array Except Self.
# Memory Usage: 22.4 MB, less than 15.83% of Python3 online submissions for Product of Array Except Self.
class Solution:
# Dynamic Programming | Left and Right Products
... | 34.535714 | 105 | 0.564633 |
32247f9507f7956d5bb0b1c090fea60c1ae33821 | 30,599 | py | Python | away/away.py | SnooPee508/aikaterna-cogs | cf1a63ce8b31bac7fce27345e264c5a6c7a09ad2 | [
"Apache-2.0"
] | null | null | null | away/away.py | SnooPee508/aikaterna-cogs | cf1a63ce8b31bac7fce27345e264c5a6c7a09ad2 | [
"Apache-2.0"
] | null | null | null | away/away.py | SnooPee508/aikaterna-cogs | cf1a63ce8b31bac7fce27345e264c5a6c7a09ad2 | [
"Apache-2.0"
] | null | null | null | import discord
from redbot.core import Config, commands, checks
from typing import Optional, Literal
import datetime
import re
IMAGE_LINKS = re.compile(r"(http[s]?:\/\/[^\"\']*\.(?:png|jpg|jpeg|gif|png))")
class Away(commands.Cog):
"""Le away cog"""
default_global_settings = {"ign_servers": []}
default_... | 49.11557 | 139 | 0.590673 |
d90eac8ea1b2f7b00d9af1b275d712395b3b3865 | 370 | py | Python | bot_cogs/base/base_cog.py | Derrick-Png/NYPClassBot | bbc6372e1fc4c61e81dff21194c34740a67d891b | [
"MIT"
] | 1 | 2020-12-29T14:08:52.000Z | 2020-12-29T14:08:52.000Z | bot_cogs/base/base_cog.py | Derrick-Png/NYPClassBot | bbc6372e1fc4c61e81dff21194c34740a67d891b | [
"MIT"
] | 5 | 2021-04-06T18:24:12.000Z | 2022-01-13T03:29:54.000Z | bot_cogs/base/base_cog.py | Derrick-Png/NYPClassBot | bbc6372e1fc4c61e81dff21194c34740a67d891b | [
"MIT"
] | 1 | 2021-01-15T14:45:32.000Z | 2021-01-15T14:45:32.000Z | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from bot import bot
from discord.ext import commands
class BaseCog(commands.Cog):
def __init__(self, _bot: type(bot)):
self.bot = _bot
@commands.Cog.listener()
async def on_ready(self):
print("{} C... | 23.125 | 69 | 0.713514 |
ef76fedacc74ba558fdcd816129c99dd5e54d66a | 563 | py | Python | mmmaya/windows/userSetup2.py | loftysky/mmmaya | 9b0959a2de0f61ac9d2aec85fec19c77e90b1569 | [
"BSD-3-Clause"
] | null | null | null | mmmaya/windows/userSetup2.py | loftysky/mmmaya | 9b0959a2de0f61ac9d2aec85fec19c77e90b1569 | [
"BSD-3-Clause"
] | null | null | null | mmmaya/windows/userSetup2.py | loftysky/mmmaya | 9b0959a2de0f61ac9d2aec85fec19c77e90b1569 | [
"BSD-3-Clause"
] | null | null | null | from maya import cmds
def mmmaya_windows_dirmap():
print '[mmmaya.windows] Setting up dirmaps: for CGroot -> K and AnimationProjects -> Z'
for src, dst in [
# Linux to Windows.
('/Volumes/CGroot', 'K:/'),
('/Volumes/AnimationProjects', 'Z:/'),
# Miao Miao moved on July 4th.
('//10.10.1.5/AnimationProjec... | 22.52 | 88 | 0.662522 |
cffe4dcb0fa663750bd88941e06ad336a43b527f | 86 | py | Python | mmcls/datasets/samplers/__init__.py | ZwwWayne/mmclassification | 2ccc55ce4f783ca34892fe7d91f247d18906a994 | [
"Apache-2.0"
] | 549 | 2020-01-02T05:14:57.000Z | 2022-03-29T18:34:12.000Z | mmcls/datasets/samplers/__init__.py | ZwwWayne/mmclassification | 2ccc55ce4f783ca34892fe7d91f247d18906a994 | [
"Apache-2.0"
] | 127 | 2021-12-03T05:00:14.000Z | 2022-03-31T13:47:33.000Z | mmcls/datasets/samplers/__init__.py | ZwwWayne/mmclassification | 2ccc55ce4f783ca34892fe7d91f247d18906a994 | [
"Apache-2.0"
] | 233 | 2020-01-18T03:46:27.000Z | 2022-03-19T03:17:47.000Z | from .distributed_sampler import DistributedSampler
__all__ = ['DistributedSampler']
| 21.5 | 51 | 0.837209 |
ea198db71daa2799309872e40e092aa6f40c6acc | 717 | py | Python | setup.py | andrewmummery/CodeWordSolver | 868b8f6eca5dbcf20e7daa3d816c96b6034658fe | [
"MIT"
] | null | null | null | setup.py | andrewmummery/CodeWordSolver | 868b8f6eca5dbcf20e7daa3d816c96b6034658fe | [
"MIT"
] | null | null | null | setup.py | andrewmummery/CodeWordSolver | 868b8f6eca5dbcf20e7daa3d816c96b6034658fe | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="codewordsolver", # Name of module to import
version="0.0.1",
author="Andrew Mummery",
author_email="andrew.mummery.software@gmail.com",
description="A small package which solves codeword p... | 32.590909 | 64 | 0.683403 |
cbcbccae577e7299dc5a7798b7124c04b15c31ad | 376 | py | Python | atest/testresources/testlibs/NamespaceUsingLibrary.py | rdagum/robotframework | b7069d505374e9f09a140ed5a9727d2a40716446 | [
"ECL-2.0",
"Apache-2.0"
] | 7,073 | 2015-01-01T17:19:16.000Z | 2022-03-31T22:01:29.000Z | atest/testresources/testlibs/NamespaceUsingLibrary.py | imust6226/robotframework | 08c56fef2ebc64d682c7f99acd77c480d8d0e028 | [
"ECL-2.0",
"Apache-2.0"
] | 2,412 | 2015-01-02T09:29:05.000Z | 2022-03-31T13:10:46.000Z | atest/testresources/testlibs/NamespaceUsingLibrary.py | 3mdeb/robotframework | 6006ce0b3d5fc6b45c5eb040dc859acd64bfa846 | [
"ECL-2.0",
"Apache-2.0"
] | 2,298 | 2015-01-03T02:47:15.000Z | 2022-03-31T02:00:16.000Z | from robot.libraries.BuiltIn import BuiltIn
class NamespaceUsingLibrary:
def __init__(self):
self._importing_suite = BuiltIn().get_variable_value('${SUITE NAME}')
self._easter = BuiltIn().get_library_instance('Easter')
def get_importing_suite(self):
return self._importing_suite
d... | 26.857143 | 77 | 0.718085 |
f054138874a97ae2f40652ab5d6c4c91de5cec7d | 1,117 | py | Python | tools/toollib.py | abelalez/nipype | 878271bd906768f11c4cabd04e5d1895551ce8a7 | [
"Apache-2.0"
] | 7 | 2017-02-17T08:54:26.000Z | 2022-03-10T20:57:23.000Z | tools/toollib.py | abelalez/nipype | 878271bd906768f11c4cabd04e5d1895551ce8a7 | [
"Apache-2.0"
] | 2 | 2018-04-17T19:18:16.000Z | 2020-03-04T22:05:02.000Z | tools/toollib.py | abelalez/nipype | 878271bd906768f11c4cabd04e5d1895551ce8a7 | [
"Apache-2.0"
] | 2 | 2017-09-23T16:22:00.000Z | 2019-08-01T14:18:52.000Z | # -*- coding: utf-8 -*-
"""Various utilities common to IPython release and maintenance tools.
"""
from builtins import map
# Library imports
import os
import sys
from subprocess import Popen, PIPE, CalledProcessError, check_call
from distutils.dir_util import remove_tree
# Useful shorthands
pjoin = os.path.join
cd ... | 28.641026 | 79 | 0.548791 |
0a6a308638bdd9d6f29f40cb226b260545b1adbd | 529 | bzl | Python | modules/benchmarks/e2e_test.bzl | John-Cassidy/angular | 6375fa79875c0fe7b815efc45940a6e6f5c9c9eb | [
"MIT"
] | 95,154 | 2015-01-01T04:52:07.000Z | 2022-03-31T21:33:49.000Z | modules/benchmarks/e2e_test.bzl | John-Cassidy/angular | 6375fa79875c0fe7b815efc45940a6e6f5c9c9eb | [
"MIT"
] | 45,008 | 2015-01-03T23:36:09.000Z | 2022-03-31T23:57:28.000Z | modules/benchmarks/e2e_test.bzl | John-Cassidy/angular | 6375fa79875c0fe7b815efc45940a6e6f5c9c9eb | [
"MIT"
] | 30,083 | 2015-01-02T20:55:07.000Z | 2022-03-31T21:03:16.000Z | load("//tools:defaults.bzl", "protractor_web_test_suite")
"""
Macro that can be used to define a e2e test in `modules/benchmarks`. Targets created through
this macro differentiate from a "benchmark_test" as they will run on CI and do not run
with `@angular/benchpress`.
"""
def e2e_test(name, server, **kwargs):
... | 33.0625 | 108 | 0.695652 |
0f612ac8c7e261f2237ba11127377b4a872d2507 | 5,639 | py | Python | infershape/onnx_model_infershape.py | Ascend/tools | d572d26275c5a72f1c7f32893b114a0b2b4a60ed | [
"Apache-2.0"
] | 56 | 2018-12-20T11:16:20.000Z | 2022-01-26T08:22:49.000Z | infershape/onnx_model_infershape.py | Ascend/tools | d572d26275c5a72f1c7f32893b114a0b2b4a60ed | [
"Apache-2.0"
] | 16 | 2019-04-29T15:22:45.000Z | 2021-04-22T16:05:09.000Z | infershape/onnx_model_infershape.py | Ascend/tools | d572d26275c5a72f1c7f32893b114a0b2b4a60ed | [
"Apache-2.0"
] | 59 | 2019-03-05T12:37:43.000Z | 2021-11-08T11:01:18.000Z | import os
import onnx
import numpy as np
import onnxruntime as rt
from onnx import helper,shape_inference,TensorProto
import argparse
parser = argparse.ArgumentParser(usage='use -h/--help to show tips', description='help info')
parser.add_argument('-m', '--model', required=True, dest='model_path', help='onnx model f... | 34.808642 | 197 | 0.634864 |
b484c5139b41887cfee553d7422def949535cb70 | 944 | py | Python | splitn/split.py | born2Btiled/splitn | de7c88f8d14be212964705028c6a58ca1f40eb8c | [
"MIT"
] | 1 | 2019-12-03T09:12:56.000Z | 2019-12-03T09:12:56.000Z | splitn/split.py | warzocha/splitn | de7c88f8d14be212964705028c6a58ca1f40eb8c | [
"MIT"
] | 1 | 2021-03-22T11:16:36.000Z | 2021-03-22T11:16:36.000Z | splitn/split.py | warzocha/splitn | de7c88f8d14be212964705028c6a58ca1f40eb8c | [
"MIT"
] | null | null | null | import sys
from typing import Tuple, Iterator, Generator
from itertools import combinations, chain
def splitted(sequence: str, separator: str = ' ') -> Generator[str, None, None]:
for pattern in patterns(len(sequence)):
yield split(sequence=sequence, pattern=pattern, separator=separator)
def patterns(leng... | 30.451613 | 91 | 0.650424 |
6742710494554bade062b89146b1a5cfa0f92275 | 342 | py | Python | pedido/migrations/0003_auto_20181126_0209.py | techacking/newconecta | 4b06c2831dff17f05158591dbbb0990358788dce | [
"Apache-2.0"
] | null | null | null | pedido/migrations/0003_auto_20181126_0209.py | techacking/newconecta | 4b06c2831dff17f05158591dbbb0990358788dce | [
"Apache-2.0"
] | null | null | null | pedido/migrations/0003_auto_20181126_0209.py | techacking/newconecta | 4b06c2831dff17f05158591dbbb0990358788dce | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.3 on 2018-11-26 04:09
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('pedido', '0002_auto_20181126_0207'),
]
operations = [
migrations.AlterModelManagers(
name='orcamento',
managers=[
... | 18 | 47 | 0.570175 |
e500857fbcc639255ea07cd6f0c1e353e159c704 | 415 | py | Python | app/__init__.py | OjureFred/WireOnlineNews | 7fd6edf01c272d88a062f9d827da6c3e2791fec8 | [
"MIT"
] | null | null | null | app/__init__.py | OjureFred/WireOnlineNews | 7fd6edf01c272d88a062f9d827da6c3e2791fec8 | [
"MIT"
] | null | null | null | app/__init__.py | OjureFred/WireOnlineNews | 7fd6edf01c272d88a062f9d827da6c3e2791fec8 | [
"MIT"
] | null | null | null | from flask import Flask
from .config import DevConfig
from flask_bootstrap import Bootstrap
#Initializing application
app = Flask(__name__, instance_relative_config = True)
# Setting up configuration
app.config.from_object(DevConfig)
app.config.from_pyfile('config.py')
#Initializing flask extensions
bootstrap = Boot... | 23.055556 | 54 | 0.816867 |
e0c7ec3b9fc0028a80e5bbb578bf28febc5cf56f | 2,085 | py | Python | python/src/Lib/test/test_module.py | vlinhd11/vlinhd11-android-scripting | c90f04eb26a3746f025a6a0beab92bb6aa88c084 | [
"Apache-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | python/src/Lib/test/test_module.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 315 | 2015-05-31T11:55:46.000Z | 2022-01-12T08:36:37.000Z | python/src/Lib/test/test_module.py | weiqiangzheng/sl4a | d3c17dca978cbeee545e12ea240a9dbf2a6999e9 | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | # Test the module type
import unittest
from test.test_support import run_unittest
import sys
ModuleType = type(sys)
class ModuleTests(unittest.TestCase):
def test_uninitialized(self):
# An uninitialized module has no __dict__ or __name__,
# and __doc__ is None
foo = ModuleType.__new__(Modu... | 33.629032 | 76 | 0.615827 |
36948f4374d0f228580acd7d26ecf1dd9c2219aa | 3,199 | py | Python | qiskit/pulse/pulse_lib/pulse.py | AdityaZade/qiskit-terra | cb102a2a4fab8e740f08ce66f3ce510dcfa866b5 | [
"Apache-2.0"
] | 1 | 2020-03-30T14:07:10.000Z | 2020-03-30T14:07:10.000Z | qiskit/pulse/pulse_lib/pulse.py | ismetshn/qiskit-terra | 691ffdf7fe50214cf944783357fdcb5c5054e9c2 | [
"Apache-2.0"
] | null | null | null | qiskit/pulse/pulse_lib/pulse.py | ismetshn/qiskit-terra | 691ffdf7fe50214cf944783357fdcb5c5054e9c2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# 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 modif... | 36.352273 | 96 | 0.647702 |
598e5fcb2beb28c2ead1e994d6273099afc279c1 | 6,621 | py | Python | hubspot/crm/quotes/models/error_detail.py | Ronfer/hubspot-api-python | 1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4 | [
"Apache-2.0"
] | 117 | 2020-04-06T08:22:53.000Z | 2022-03-18T03:41:29.000Z | hubspot/crm/quotes/models/error_detail.py | Ronfer/hubspot-api-python | 1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4 | [
"Apache-2.0"
] | 62 | 2020-04-06T16:21:06.000Z | 2022-03-17T16:50:44.000Z | hubspot/crm/quotes/models/error_detail.py | Ronfer/hubspot-api-python | 1c87274ecbba4aa3c7728f890ccc6e77b2b6d2e4 | [
"Apache-2.0"
] | 45 | 2020-04-06T16:13:52.000Z | 2022-03-30T21:33:17.000Z | # coding: utf-8
"""
Quotes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v3
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from hubspo... | 30.511521 | 139 | 0.606857 |
638596443c0fdc4038ffc4e6fc4eb1165461153c | 12,018 | py | Python | sdk/python/pulumi_azure_native/deviceupdate/instance.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/deviceupdate/instance.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/deviceupdate/instance.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 40.464646 | 263 | 0.634964 |
0cd4f984e3d24f2f149f108174427df1e1476475 | 6,189 | py | Python | aethersprite/extensions/base/only.py | haliphax/aethersprite | adc18f167e251de559bb5033cc13762be7f4bc6c | [
"MIT"
] | 1 | 2021-03-31T01:49:28.000Z | 2021-03-31T01:49:28.000Z | aethersprite/extensions/base/only.py | haliphax/aethersprite | adc18f167e251de559bb5033cc13762be7f4bc6c | [
"MIT"
] | 8 | 2021-02-22T17:10:09.000Z | 2021-04-20T03:08:18.000Z | aethersprite/extensions/base/only.py | haliphax/aethersprite | adc18f167e251de559bb5033cc13762be7f4bc6c | [
"MIT"
] | 1 | 2021-04-13T17:34:24.000Z | 2021-04-13T17:34:24.000Z | "Only cog"
# stdlib
from functools import partial
import typing
# 3rd party
from discord import DMChannel, TextChannel
from discord.ext.commands import Cog, command
from discord_argparse import ArgumentConverter
from discord_argparse.argparse import OptionalArgument
from sqlitedict import SqliteDict
# local
from aethe... | 28.786047 | 99 | 0.609792 |
6c8a6d592700a4be1f81dfa653c1adfd22893784 | 9,857 | py | Python | Template_App/main.py | ChairOfStructuralMechanicsTUM/Mechanics_Apps | b064a42d4df3fa9bde62a5cff9cb27ca61b0127c | [
"MIT"
] | 11 | 2017-05-06T17:05:29.000Z | 2020-11-12T09:26:47.000Z | Template_App/main.py | ChairOfStructuralMechanicsTUM/Mechanics_Apps | b064a42d4df3fa9bde62a5cff9cb27ca61b0127c | [
"MIT"
] | 49 | 2017-04-20T11:26:11.000Z | 2020-05-29T13:18:06.000Z | Template_App/main.py | ChairOfStructuralMechanicsTUM/Mechanics_Apps | b064a42d4df3fa9bde62a5cff9cb27ca61b0127c | [
"MIT"
] | 4 | 2017-02-14T12:55:34.000Z | 2022-01-12T15:07:07.000Z | """
Tamplate App - provides a template for new apps
"""
# general imports
import numpy as np
# bokeh imports
from bokeh.io import curdoc
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource, Arrow, OpenHead, NormalHead
from bokeh.models.glyphs import ImageURL
from boke... | 38.205426 | 231 | 0.656386 |
c745871a0ff8cf9b7c388c73a4d0a8d27b5d3168 | 11,082 | py | Python | populationsim/simul_balancer.py | bstabler/populationsim | 872f7d26992e566c6fe75aed1cc14c8ad5f71d3a | [
"BSD-3-Clause"
] | null | null | null | populationsim/simul_balancer.py | bstabler/populationsim | 872f7d26992e566c6fe75aed1cc14c8ad5f71d3a | [
"BSD-3-Clause"
] | null | null | null | populationsim/simul_balancer.py | bstabler/populationsim | 872f7d26992e566c6fe75aed1cc14c8ad5f71d3a | [
"BSD-3-Clause"
] | null | null | null | from __future__ import division
from __future__ import absolute_import
# PopulationSim
# See full license in LICENSE.txt.
from builtins import zip
from builtins import range
from builtins import object
import logging
import numpy as np
import pandas as pd
from activitysim.core.config import setting
logger = logging... | 38.61324 | 100 | 0.666757 |
e70c9fa31d60e2c62db2a10e97913b3ef583258a | 2,017 | py | Python | src/krux/context.py | odudex/krux | db421a3f107c0263221e5f1e877e9c38925bb17c | [
"MIT"
] | null | null | null | src/krux/context.py | odudex/krux | db421a3f107c0263221e5f1e877e9c38925bb17c | [
"MIT"
] | null | null | null | src/krux/context.py | odudex/krux | db421a3f107c0263221e5f1e877e9c38925bb17c | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2021 Tom J. Sun
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 38.788462 | 85 | 0.723847 |
9581f84ebe0f2127cc16a4dcf2c257ded8a8fc9e | 7,298 | py | Python | maskrcnn_benchmark/modeling/detector/simnet.py | bcmi/TraMaS-Weak-Shot-Object-Detection | 34daa61d05297250445250832fe36763a2ada01e | [
"MIT"
] | 28 | 2021-10-07T03:12:22.000Z | 2022-03-02T06:35:27.000Z | maskrcnn_benchmark/modeling/detector/simnet.py | bcmi/TraMaS-Weak-Shot-Object-Detection | 34daa61d05297250445250832fe36763a2ada01e | [
"MIT"
] | null | null | null | maskrcnn_benchmark/modeling/detector/simnet.py | bcmi/TraMaS-Weak-Shot-Object-Detection | 34daa61d05297250445250832fe36763a2ada01e | [
"MIT"
] | 2 | 2021-11-01T03:23:12.000Z | 2022-02-11T15:52:37.000Z | import os
import json
import torch
import random
from torch.utils.data.sampler import Sampler
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from torch.optim.sgd import SGD
import numpy as np
os.environ['CUDA_VISIBLE_DEVICES'] = '0,1'
class SimDataset():
def __init__... | 33.477064 | 119 | 0.616744 |
d1a9f0aaca1ff826612b4f04a3468106ef2b82c7 | 73,606 | py | Python | src/transformers/models/t5/modeling_tf_t5.py | talkhaldi/transformers | c0328a6c263494fff527fac7288faa627e3267e0 | [
"Apache-2.0"
] | 2 | 2021-09-20T05:44:21.000Z | 2022-01-25T08:13:44.000Z | src/transformers/models/t5/modeling_tf_t5.py | talkhaldi/transformers | c0328a6c263494fff527fac7288faa627e3267e0 | [
"Apache-2.0"
] | null | null | null | src/transformers/models/t5/modeling_tf_t5.py | talkhaldi/transformers | c0328a6c263494fff527fac7288faa627e3267e0 | [
"Apache-2.0"
] | 1 | 2021-04-19T20:49:55.000Z | 2021-04-19T20:49:55.000Z | # coding=utf-8
# Copyright 2020 T5 Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | 45.689634 | 205 | 0.655082 |
751b27cc1f201ac66f8e41da0f0786220b559ce2 | 2,820 | py | Python | examples/CAV-experiments/gen-grid-config.py | nsg-ethz/synet | 8d5c424ef4395cf6003b7a1846c03a16fd6bdc20 | [
"Apache-2.0"
] | 13 | 2017-10-26T19:58:55.000Z | 2021-12-26T08:04:15.000Z | examples/CAV-experiments/gen-grid-config.py | nsg-ethz/synet | 8d5c424ef4395cf6003b7a1846c03a16fd6bdc20 | [
"Apache-2.0"
] | 2 | 2019-05-29T14:57:40.000Z | 2019-06-11T16:06:23.000Z | examples/CAV-experiments/gen-grid-config.py | nsg-ethz/synet | 8d5c424ef4395cf6003b7a1846c03a16fd6bdc20 | [
"Apache-2.0"
] | 10 | 2017-11-23T15:44:22.000Z | 2021-05-19T06:50:14.000Z | #!/usr/bin/python
import sys
assert len(sys.argv) == 3
n=int(sys.argv[1])
mode=sys.argv[2]
inputs_file = open('grid{}-{}.logic'.format(n, mode), 'w')
req_file = open('grid{}-{}-req.logic'.format(n, mode), 'w')
print 'Genearing config for grid of size', n, 'in mode', mode
for x in range(1, n+1):
for y in range(1,... | 37.105263 | 132 | 0.537589 |
929628c4345fbb1fcc509ef03ab96006c71663a5 | 1,386 | py | Python | 002-Methods/003-Visualization/001-InSitu/001-Catalyst2JupyterLab-Tutorial/CatalystEnabledSimulation/fedriver.py | jhgoebbert/jupyter-jsc-notebooks | bcd08ced04db00e7a66473b146f8f31f2e657539 | [
"BSD-3-Clause"
] | null | null | null | 002-Methods/003-Visualization/001-InSitu/001-Catalyst2JupyterLab-Tutorial/CatalystEnabledSimulation/fedriver.py | jhgoebbert/jupyter-jsc-notebooks | bcd08ced04db00e7a66473b146f8f31f2e657539 | [
"BSD-3-Clause"
] | null | null | null | 002-Methods/003-Visualization/001-InSitu/001-Catalyst2JupyterLab-Tutorial/CatalystEnabledSimulation/fedriver.py | jhgoebbert/jupyter-jsc-notebooks | bcd08ced04db00e7a66473b146f8f31f2e657539 | [
"BSD-3-Clause"
] | 1 | 2022-01-13T18:49:12.000Z | 2022-01-13T18:49:12.000Z | """
A simple example of a Python simulation code working with Catalyst.
It depends on numpy and mpi4py being available. The environment
variables need to be set up properly to find Catalyst when running directly
from python. For Linux
and Mac machines they should be:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:<Catalyst ... | 28.875 | 81 | 0.747475 |
7151973656dd5134b1584e03171376aec6ce7686 | 3,605 | py | Python | mars/services/meta/api/web.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | mars/services/meta/api/web.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | mars/services/meta/api/web.py | chineking/mars | 660098c65bcb389c6bbebc26b2502a9b3af43cf9 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 39.615385 | 85 | 0.698752 |
85a706c8b013cda3fb771b681c1eb78088c78dd6 | 8,097 | py | Python | robot-server/robot_server/service/session/models/command.py | y3rsh/opentrons | b446567910db218030fef40396ab2255cc074bba | [
"Apache-2.0"
] | 235 | 2017-10-27T20:37:27.000Z | 2022-03-30T14:09:49.000Z | robot-server/robot_server/service/session/models/command.py | y3rsh/opentrons | b446567910db218030fef40396ab2255cc074bba | [
"Apache-2.0"
] | 8,425 | 2017-10-26T15:25:43.000Z | 2022-03-31T23:54:26.000Z | robot-server/robot_server/service/session/models/command.py | y3rsh/opentrons | b446567910db218030fef40396ab2255cc074bba | [
"Apache-2.0"
] | 130 | 2017-11-09T21:02:37.000Z | 2022-03-15T18:01:24.000Z | """Modeling of session commands.
Creating a new command type requires these steps:
1) Creation of a CommandDefinition enum identifying the command
type.
2) If necessary, define a data payload model.
3) If necessary, define a result payload model.
4) Create specialized `SessionCommandRequest` and `SessionCommandResp... | 27.447458 | 88 | 0.773496 |
393e79e34ec6b1a09dd0efb7b0fb8fd74aecee74 | 6,987 | py | Python | appfunction.py | abhii1/PhoneBook | 75b0750a1c92a4b0d1f0eafb8d3cc806279d0468 | [
"MIT"
] | 1 | 2021-01-24T05:41:19.000Z | 2021-01-24T05:41:19.000Z | appfunction.py | abhii1/PhoneBook | 75b0750a1c92a4b0d1f0eafb8d3cc806279d0468 | [
"MIT"
] | null | null | null | appfunction.py | abhii1/PhoneBook | 75b0750a1c92a4b0d1f0eafb8d3cc806279d0468 | [
"MIT"
] | null | null | null | #class consist of all the functionalities of a phoneook app
#name of class is operation
class operation:
def __setup_connection(self):
import pymongo
try:
client=pymongo.MongoClient("mongodb+srv://9125366556:ib4d6PDNfzCTNYP8@cluster0.xwtnq.gcp.mongodb.net/<dbname>?ret... | 29.858974 | 212 | 0.568055 |
922dcef828c2e7a33775d7ea3a98e03d6f3bf1b0 | 1,220 | py | Python | src/visions/core/implementations/types/visions_time.py | sweersr/visions | 1af04235cb77bec52e4923627dfbf968ed1a584d | [
"BSD-4-Clause"
] | null | null | null | src/visions/core/implementations/types/visions_time.py | sweersr/visions | 1af04235cb77bec52e4923627dfbf968ed1a584d | [
"BSD-4-Clause"
] | null | null | null | src/visions/core/implementations/types/visions_time.py | sweersr/visions | 1af04235cb77bec52e4923627dfbf968ed1a584d | [
"BSD-4-Clause"
] | null | null | null | import pandas.api.types as pdt
import pandas as pd
from typing import Sequence
from visions.core.model.relations import IdentityRelation, InferenceRelation
from visions.core.model import TypeRelation
from visions.core.model.type import VisionsBaseType
def _get_relations(cls) -> Sequence[TypeRelation]:
from visio... | 29.047619 | 83 | 0.680328 |
16567ea66e5a239ff09908bd33906eef03ad58b1 | 20,225 | py | Python | pysnmp/KENYA-COMPONENT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/KENYA-COMPONENT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/KENYA-COMPONENT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module KENYA-COMPONENT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/KENYA-COMPONENT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:54:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... | 118.970588 | 3,582 | 0.770284 |
a81d96faa138e6c9fc0405fa3831d428f9e553c1 | 1,163 | py | Python | checkout/migrations/0001_initial.py | vinipachecov/django-ecommerce | d626b38df9e898eb2a704b0921a3e0e0d91bb3f8 | [
"CC0-1.0"
] | 1 | 2021-03-27T00:24:19.000Z | 2021-03-27T00:24:19.000Z | checkout/migrations/0001_initial.py | vinipachecov/django-ecommerce | d626b38df9e898eb2a704b0921a3e0e0d91bb3f8 | [
"CC0-1.0"
] | null | null | null | checkout/migrations/0001_initial.py | vinipachecov/django-ecommerce | d626b38df9e898eb2a704b0921a3e0e0d91bb3f8 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2017-10-04 13:38
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('catalog', '0001_initial'),
]
op... | 35.242424 | 138 | 0.61135 |
cbffeefdfacfe2637bb7de3a253c863200e8b3a3 | 5,120 | py | Python | part_11/firmware_building/firmware_headers/janky_ambit_header.py | zcutlip/broken_abandoned | 76f2f8577de3c1a570e28f081349e6f22fb33a34 | [
"MIT"
] | 28 | 2015-05-02T22:19:26.000Z | 2021-04-26T20:01:00.000Z | part_11/firmware_building/firmware_headers/janky_ambit_header.py | zcutlip/broken_abandoned | 76f2f8577de3c1a570e28f081349e6f22fb33a34 | [
"MIT"
] | null | null | null | part_11/firmware_building/firmware_headers/janky_ambit_header.py | zcutlip/broken_abandoned | 76f2f8577de3c1a570e28f081349e6f22fb33a34 | [
"MIT"
] | 6 | 2015-11-03T08:12:43.000Z | 2018-08-19T21:48:18.000Z | #!/usr/bin/env python
# Copyright (c) 2015
# - Zachary Cutlip <uid000()gmail.com>
#
# See LICENSE for more details.
#
from bowcaster.common.support import LittleEndian
from bowcaster.common.support import BigEndian
from bowcaster.development import OverflowBuffer
from bowcaster.development import SectionCreator
from... | 34.594595 | 111 | 0.632422 |
b4bb13fc452f6b44d499db84f0bcb6450acc4246 | 1,951 | py | Python | cryptographer_1.py | ReetNayan/PythonMiscellaneousProgramsForFun | 9fd51432726dbfb4b06e5e13fd143171a4319ab7 | [
"MIT"
] | 1 | 2021-08-04T01:46:19.000Z | 2021-08-04T01:46:19.000Z | cryptographer_1.py | ReetNayan/PythonMiscellaneousProgramsForFun | 9fd51432726dbfb4b06e5e13fd143171a4319ab7 | [
"MIT"
] | null | null | null | cryptographer_1.py | ReetNayan/PythonMiscellaneousProgramsForFun | 9fd51432726dbfb4b06e5e13fd143171a4319ab7 | [
"MIT"
] | null | null | null | from randWord import *
def encrypt(text):
# This method :
# Encrypts the text given in the param.
# A 3 digit random key is retured by genrtNum()
# and is stored in 'key'
# then a list is created which stores random small
# alphabets numbering just 1 less than the length of 'text'
... | 35.472727 | 94 | 0.626345 |
df17c331c223e542e4978edcbd58ea92e91ef32d | 365 | py | Python | test.py | davidbradway/fusefit | 55af7786c1e2789a0f0fc007df65d50b52b2de91 | [
"MIT"
] | null | null | null | test.py | davidbradway/fusefit | 55af7786c1e2789a0f0fc007df65d50b52b2de91 | [
"MIT"
] | null | null | null | test.py | davidbradway/fusefit | 55af7786c1e2789a0f0fc007df65d50b52b2de91 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Tests"""
import unittest
from parseTCX import parseTCX
class TestparseTCX(unittest.TestCase):
def setUp(self):
pass
def test_parseLaps(self):
pass
# rv = self.app.get('/')
# self.assertTrue(rv.data)
# self.assertEqual(rv.status_code, 200)
if... | 17.380952 | 47 | 0.621918 |
660745badf349021100547d641509e370b93352c | 3,298 | py | Python | ppadb/sync/__init__.py | cuongnguyen2190/pure-python-adb | f8424f349cb7a72967690a9279f117799c16e8a0 | [
"MIT"
] | 382 | 2018-07-12T07:56:47.000Z | 2022-03-31T08:12:09.000Z | ppadb/sync/__init__.py | cuongnguyen2190/pure-python-adb | f8424f349cb7a72967690a9279f117799c16e8a0 | [
"MIT"
] | 74 | 2018-10-10T15:23:24.000Z | 2022-03-31T00:27:10.000Z | ppadb/sync/__init__.py | cuongnguyen2190/pure-python-adb | f8424f349cb7a72967690a9279f117799c16e8a0 | [
"MIT"
] | 84 | 2018-07-08T17:15:54.000Z | 2022-03-31T08:12:12.000Z | import struct
import time
import os
from ppadb.protocol import Protocol
from ppadb.sync.stats import S_IFREG
import logging
logger = logging.getLogger(__name__)
class Sync:
TEMP_PATH = '/data/local/tmp'
DEFAULT_CHMOD = 0o644
DATA_MAX_LENGTH = 65536
def __init__(self, connection):
self.conn... | 27.483333 | 80 | 0.552153 |
02d2c8cb1a410d6e23c5f27fb66facbbaa49279f | 360 | py | Python | board/urls/user.py | devunt/hydrocarbon | 3e13f03f8375533c422a6e609742b3d2f4c38c0f | [
"MIT"
] | 8 | 2015-04-14T00:36:08.000Z | 2017-06-02T06:08:51.000Z | board/urls/user.py | devunt/hydrocarbon | 3e13f03f8375533c422a6e609742b3d2f4c38c0f | [
"MIT"
] | 10 | 2020-03-24T15:33:11.000Z | 2022-03-11T23:16:05.000Z | board/urls/user.py | devunt/hydrocarbon | 3e13f03f8375533c422a6e609742b3d2f4c38c0f | [
"MIT"
] | 2 | 2016-08-04T23:58:29.000Z | 2016-09-22T10:20:05.000Z | from django.conf.urls import url
from board.views import UserProfileView, UserPostListView, UserCommentListView
urlpatterns = [
url(r'^$', UserProfileView.as_view(), name='user_profile'),
url(r'^posts/$', UserPostListView.as_view(), name='user_profile_posts'),
url(r'^comments/$', UserCommentListView.as_v... | 32.727273 | 85 | 0.741667 |
a49985f0446d7731e1129fee459a97ddb30337d1 | 28,592 | py | Python | tensorflow/compiler/tests/depthwise_conv_op_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/compiler/tests/depthwise_conv_op_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/compiler/tests/depthwise_conv_op_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2015 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... | 40.962751 | 80 | 0.589675 |
952db4b5466f7641e9ba66859dc727e7259d5bf2 | 361 | py | Python | examples/basics/gloo/start.py | Aaru143/vispy | 9a0af760779b570f7bd75cede6b243155fb6aa9b | [
"BSD-3-Clause"
] | 1 | 2021-08-04T06:31:02.000Z | 2021-08-04T06:31:02.000Z | examples/basics/gloo/start.py | Aaru143/vispy | 9a0af760779b570f7bd75cede6b243155fb6aa9b | [
"BSD-3-Clause"
] | 1 | 2022-03-16T13:38:49.000Z | 2022-03-16T13:47:30.000Z | examples/basics/gloo/start.py | Aaru143/vispy | 9a0af760779b570f7bd75cede6b243155fb6aa9b | [
"BSD-3-Clause"
] | 1 | 2018-09-17T07:00:38.000Z | 2018-09-17T07:00:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Probably the simplest vispy example."""
import sys
from vispy import app, gloo
canvas = app.Canvas(keys='interactive')
@canvas.connect
def on_draw(event):
gloo.set_clear_color((0.2, 0.4, 0.6, 1.0))
gloo.clear()
canvas.show()
if __name__ == '__main__' and s... | 17.190476 | 57 | 0.65928 |
f4693aee433a153f23d2bbfea0643418728fbfdf | 232 | py | Python | pywrap/__init__.py | steffanschlein/cythonwrapper | ef30a3bc1a24024b9845dad4aa8a42e05219bd91 | [
"BSD-3-Clause"
] | 33 | 2016-04-17T21:26:17.000Z | 2021-12-31T03:29:46.000Z | pywrap/__init__.py | steffanschlein/cythonwrapper | ef30a3bc1a24024b9845dad4aa8a42e05219bd91 | [
"BSD-3-Clause"
] | 19 | 2016-04-12T22:28:11.000Z | 2017-08-19T16:34:32.000Z | pywrap/__init__.py | steffanschlein/cythonwrapper | ef30a3bc1a24024b9845dad4aa8a42e05219bd91 | [
"BSD-3-Clause"
] | 7 | 2018-04-29T18:46:59.000Z | 2021-09-25T09:35:14.000Z | __version__ = "0.1"
__description__ = "Generate Cython wrapper for C++ code automatically."
__author__ = "Alexander Fabisch"
__author_email__ = "afabisch@googlemail.com"
__url__ = "https://github.com/AlexanderFabisch/cythonwrapper"
| 38.666667 | 71 | 0.788793 |
c1ef753755663b6d09b16206dee86396be5e63e5 | 23,146 | py | Python | Tools/px4moduledoc/srcparser.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 1,537 | 2020-10-28T17:49:02.000Z | 2022-03-31T13:55:38.000Z | Tools/px4moduledoc/srcparser.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 2,514 | 2020-10-28T17:49:10.000Z | 2022-03-31T17:47:22.000Z | Tools/px4moduledoc/srcparser.py | lgarciaos/Firmware | 26dba1407bd1fbc65c23870a22fed904afba6347 | [
"BSD-3-Clause"
] | 1,945 | 2020-10-28T18:14:05.000Z | 2022-03-31T23:15:37.000Z | #! /usr/bin/env python3
import sys
import re
import math
import textwrap
from functools import reduce
class ModuleDocumentation(object):
"""
documentation for a single module
"""
# If you add categories or subcategories, they also need to be added to the
# TOC in https://github.com/PX4/Devguide/b... | 41.039007 | 125 | 0.568349 |
7603615d08387ac6598dd9179b85c00855e9ed7e | 1,627 | py | Python | lvfs/stat.py | Razdeep/lvfs | 559d6f9618523aab2356bef054fe734b4daa57fc | [
"MIT"
] | 6 | 2021-11-18T19:05:14.000Z | 2022-03-10T14:14:43.000Z | lvfs/stat.py | Razdeep/lvfs | 559d6f9618523aab2356bef054fe734b4daa57fc | [
"MIT"
] | 6 | 2021-10-31T22:09:09.000Z | 2022-02-17T07:39:34.000Z | lvfs/stat.py | Razdeep/lvfs | 559d6f9618523aab2356bef054fe734b4daa57fc | [
"MIT"
] | 5 | 2021-11-16T20:11:11.000Z | 2022-03-10T12:52:44.000Z | import datetime
class Stat:
""" VFS stat() result
This differs from the builtin os.stat_result in that:
* It doesn"t include less commonly used attributes like inode number
* It guesses fallbacks, like if mtime is null use ctime, etc.
* Timestamps are datetime objects so they can ... | 36.155556 | 97 | 0.597419 |
9182ff451c740ba02959b270fe92f08b300bca29 | 5,463 | py | Python | pySPACE/missions/nodes/spatial_filtering/fda.py | pyspace/pyspace | 763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62 | [
"BSD-3-Clause"
] | 32 | 2015-02-20T09:03:09.000Z | 2022-02-25T22:32:52.000Z | pySPACE/missions/nodes/spatial_filtering/fda.py | pyspace/pyspace | 763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62 | [
"BSD-3-Clause"
] | 5 | 2015-05-18T15:08:40.000Z | 2020-03-05T19:18:01.000Z | pySPACE/missions/nodes/spatial_filtering/fda.py | pyspace/pyspace | 763e62c0e7fa7cfcb19ccee1a0333c4f7e68ae62 | [
"BSD-3-Clause"
] | 18 | 2015-09-28T07:16:38.000Z | 2021-01-20T13:52:19.000Z | """ Fisher's Discriminant Analysis and variants for spatial filtering """
import os
import cPickle
try:
import mdp
except:
pass
import numpy
from pySPACE.missions.nodes.spatial_filtering.spatial_filtering import SpatialFilteringNode
from pySPACE.resources.data_types.time_series import TimeSeries
from pySPA... | 36.42 | 126 | 0.617426 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.