hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a18cafc2cc5f5c78a0ca6d78cbd2dcfbb268d80 | 8,366 | py | Python | Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_timeout.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | from _pydev_bundle._pydev_saved_modules import threading
from _pydevd_bundle.pydevd_daemon_thread import PyDBDaemonThread
from _pydevd_bundle.pydevd_constants import thread_get_ident, IS_CPYTHON, NULL
import ctypes
import time
from _pydev_bundle import pydev_log
import weakref
from _pydevd_bundle.pydevd_utils import is... | 34.858333 | 116 | 0.619412 |
4a18cb35fb73cc714307c4e53c5a1ddc24c992d8 | 3,346 | py | Python | tests/conftest.py | Naillik1/python-schema-registry-client | 2a69fe619cb2409eed1ac82d79048c0f68818b29 | [
"MIT"
] | null | null | null | tests/conftest.py | Naillik1/python-schema-registry-client | 2a69fe619cb2409eed1ac82d79048c0f68818b29 | [
"MIT"
] | null | null | null | tests/conftest.py | Naillik1/python-schema-registry-client | 2a69fe619cb2409eed1ac82d79048c0f68818b29 | [
"MIT"
] | null | null | null | import logging
import os
import pytest
from schema_registry.client import SchemaRegistryClient, errors, schema
from schema_registry.serializers import MessageSerializer
logger = logging.getLogger(__name__)
CERTIFICATES_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "certificates")
flat_schemas = {... | 24.970149 | 92 | 0.578004 |
4a18cbceab7a27d7162f3e6e668d6fd67c2ef7e3 | 10,861 | py | Python | from_parlai/eval_model.py | skywalker023/focused-empathy | 04bdd0cf2fcd7bb4ee204cacb54ce970f426c916 | [
"MIT"
] | 29 | 2021-09-07T06:54:23.000Z | 2022-03-25T12:33:04.000Z | from_parlai/eval_model.py | skywalker023/focused-empathy | 04bdd0cf2fcd7bb4ee204cacb54ce970f426c916 | [
"MIT"
] | 8 | 2021-09-25T05:39:40.000Z | 2022-03-29T07:04:08.000Z | from_parlai/eval_model.py | skywalker023/focused-empathy | 04bdd0cf2fcd7bb4ee204cacb54ce970f426c916 | [
"MIT"
] | 2 | 2021-11-07T08:27:38.000Z | 2022-01-09T05:28:41.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Basic example which iterates through the tasks specified and evaluates the given model
on them.
## Examples
```she... | 32.713855 | 198 | 0.631065 |
4a18cbe12916f40f4a6339f4a56718d7af9fc872 | 3,124 | py | Python | tests/functional_tests.py | google/coursebuilder-hello-world-module | 4429cc9a53c8edd5745d9e9535cf4d8b8c126f40 | [
"Apache-2.0"
] | 7 | 2016-02-11T19:39:31.000Z | 2021-04-20T20:38:14.000Z | tests/functional_tests.py | google/coursebuilder-hello-world-module | 4429cc9a53c8edd5745d9e9535cf4d8b8c126f40 | [
"Apache-2.0"
] | 2 | 2015-04-16T22:37:15.000Z | 2015-04-17T21:27:04.000Z | tests/functional_tests.py | google/coursebuilder-hello-world-module | 4429cc9a53c8edd5745d9e9535cf4d8b8c126f40 | [
"Apache-2.0"
] | 7 | 2017-07-25T21:33:39.000Z | 2021-10-12T02:35:14.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 35.101124 | 78 | 0.723752 |
4a18cc141c2c6f8bab7febc2e7a632954d716e7b | 3,718 | py | Python | {{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/tests/controllers/test_pet.py | srikiran1/cookiecutter-connexion-microcosm-service | da1dea38e08379e8415202b6aed23f79d2d9d24d | [
"MIT"
] | 2 | 2019-12-10T03:08:09.000Z | 2019-12-10T03:08:11.000Z | {{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/tests/controllers/test_pet.py | srikiran1/cookiecutter-connexion-microcosm-service | da1dea38e08379e8415202b6aed23f79d2d9d24d | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/tests/controllers/test_pet.py | srikiran1/cookiecutter-connexion-microcosm-service | da1dea38e08379e8415202b6aed23f79d2d9d24d | [
"MIT"
] | 1 | 2019-12-10T03:08:03.000Z | 2019-12-10T03:08:03.000Z | from hamcrest import assert_that, is_, equal_to, calling, raises
from mock import Mock, patch
from werkzeug.exceptions import NotFound
from {{ cookiecutter.project_name }}.controllers.pet import PetController
class TestPetController(object):
def setup(self):
self.graph = Mock()
self.controller = ... | 41.775281 | 107 | 0.61646 |
4a18cc2e119d7cfb3f15da593d4944abd445905b | 15,944 | py | Python | tensorflow/python/keras/_impl/keras/engine/saving_test.py | Pravo21/tensorflow | 10be1f2377bf7aad1a4cfa306277c53e44493a57 | [
"Apache-2.0"
] | 13 | 2018-07-23T18:53:35.000Z | 2021-11-18T19:56:45.000Z | tensorflow/python/keras/_impl/keras/engine/saving_test.py | sysufuchao/tensorflow | 10be1f2377bf7aad1a4cfa306277c53e44493a57 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/_impl/keras/engine/saving_test.py | sysufuchao/tensorflow | 10be1f2377bf7aad1a4cfa306277c53e44493a57 | [
"Apache-2.0"
] | 13 | 2018-09-07T13:28:38.000Z | 2020-07-17T15:06:24.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.510823 | 80 | 0.615341 |
4a18cecde3f358ddb42121c04e4f1fd488e78d13 | 604 | py | Python | openFlow/ofptSetAsync.py | wsharif/thesis | 96a9bd6c86ed027c3eeee231b2eae1c14394d728 | [
"MIT"
] | null | null | null | openFlow/ofptSetAsync.py | wsharif/thesis | 96a9bd6c86ed027c3eeee231b2eae1c14394d728 | [
"MIT"
] | null | null | null | openFlow/ofptSetAsync.py | wsharif/thesis | 96a9bd6c86ed027c3eeee231b2eae1c14394d728 | [
"MIT"
] | null | null | null | from ofptHeader import ofptHeader
from random import randint
from struct import Struct
def ofptSetAsync():
packetInMask = Struct('! I').pack(randint(0, 7))
packetInMask2 = Struct('! I').pack(randint(0, 7))
packetStatusMask = Struct('! I').pack(randint(0, 7))
packetStatusMask2 = Struct('! I').pack(randint(0, 7))
... | 35.529412 | 115 | 0.730132 |
4a18cf1e489b3c79d11c94ead62e276737f2f542 | 11,883 | py | Python | curious/query.py | ginkgobioworks/curious | ee8a33a92640b95d477422d5d627c750920d976b | [
"MIT"
] | 10 | 2016-12-18T20:19:39.000Z | 2020-09-05T02:49:38.000Z | curious/query.py | ginkgobioworks/curious | ee8a33a92640b95d477422d5d627c750920d976b | [
"MIT"
] | 5 | 2017-05-19T22:38:20.000Z | 2018-04-04T15:16:07.000Z | curious/query.py | benjiec/curious | 4e92c763f57ce9a61bd1a4b18203f9bb9b7bdaf6 | [
"MIT"
] | 3 | 2015-08-12T03:01:50.000Z | 2019-03-18T13:31:47.000Z | import time
from curious import model_registry
from curious.graph import traverse, mk_filter_function
from .parser import Parser
from .utils import report_time
class Query(object):
def __init__(self, query):
parser = Parser(query)
self.__query = query
self.__obj_query = parser.object_query
self.__s... | 30.864935 | 111 | 0.629723 |
4a18cff823d4c94030df536ee5a995795359c31a | 1,886 | py | Python | src/python/zquantum/qaoa/problems/generators.py | zapatacomputing/z-quantum-qaoa | a13a99939ee41c760fdfb302e5f4944e087a09a7 | [
"Apache-2.0"
] | 3 | 2020-10-06T13:54:40.000Z | 2021-07-04T21:02:14.000Z | src/python/zquantum/qaoa/problems/generators.py | zapatacomputing/z-quantum-qaoa | a13a99939ee41c760fdfb302e5f4944e087a09a7 | [
"Apache-2.0"
] | 34 | 2020-04-30T02:52:31.000Z | 2022-03-30T19:19:14.000Z | src/python/zquantum/qaoa/problems/generators.py | zapatacomputing/z-quantum-qaoa | a13a99939ee41c760fdfb302e5f4944e087a09a7 | [
"Apache-2.0"
] | 5 | 2020-06-24T10:57:01.000Z | 2021-07-09T01:14:16.000Z | from typing import Callable, Dict, List
import networkx as nx
import numpy as np
from openfermion import QubitOperator
from zquantum.core.graph import generate_graph_from_specs
def get_random_hamiltonians_for_problem(
graph_specs: Dict,
number_of_instances: int,
possible_number_of_qubits: List[int],
h... | 40.12766 | 92 | 0.712619 |
4a18d01ea6cd6818c1a98878ba6e84750e2c5f0f | 1,099 | py | Python | services/movies_admin/utils/sqlite_to_postgres/load_data.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | services/movies_admin/utils/sqlite_to_postgres/load_data.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | services/movies_admin/utils/sqlite_to_postgres/load_data.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | 1 | 2021-09-30T09:49:40.000Z | 2021-09-30T09:49:40.000Z | import os
import sqlite3
from pathlib import Path
import psycopg2
from psycopg2.extensions import connection as _connection
from utils.loader import SQLiteLoader
from utils.saver import PostgresSaver
def load_from_sqlite(connection: sqlite3.Connection, pg_conn: _connection):
"""Basic method for loading data from... | 33.30303 | 89 | 0.719745 |
4a18d0f336d21256fb7c4e51ecd092c67467c038 | 297 | py | Python | easy/28. Implement strStr().py | junyinglucn/leetcode | 1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7 | [
"MIT"
] | null | null | null | easy/28. Implement strStr().py | junyinglucn/leetcode | 1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7 | [
"MIT"
] | null | null | null | easy/28. Implement strStr().py | junyinglucn/leetcode | 1fbd0962e4b7dc46b4ed4f0f86778cfedbda72e7 | [
"MIT"
] | null | null | null | class Solution:
def strStr(self, haystack: str, needle: str) -> int:
l = len(needle)
if l == 0:
return 0
i = 0
while i <= (len(haystack) - l):
if haystack[i:i + l] == needle:
return i
i += 1
return -1
| 24.75 | 56 | 0.420875 |
4a18d10a58f0e03779cf33de960ad76e8c8fde7d | 333 | py | Python | rest_registration/api/views/__init__.py | gcbirzan/django-rest-registration | 1a9da937c283d03d1fce1a68322a702e14692c79 | [
"MIT"
] | 329 | 2018-05-09T13:10:37.000Z | 2022-03-25T11:05:20.000Z | rest_registration/api/views/__init__.py | gcbirzan/django-rest-registration | 1a9da937c283d03d1fce1a68322a702e14692c79 | [
"MIT"
] | 167 | 2018-04-21T00:28:17.000Z | 2022-03-30T09:24:52.000Z | rest_registration/api/views/__init__.py | gcbirzan/django-rest-registration | 1a9da937c283d03d1fce1a68322a702e14692c79 | [
"MIT"
] | 97 | 2018-05-09T14:17:59.000Z | 2022-02-23T08:46:30.000Z | from .change_password import change_password # noqa
from .login import login, logout # noqa
from .profile import profile # noqa
from .register import register, verify_registration # noqa
from .register_email import register_email, verify_email # noqa
from .reset_password import reset_password, send_reset_password_... | 47.571429 | 76 | 0.813814 |
4a18d31811e8bfbbb7f6e21c58fd09ed1536601f | 6,253 | py | Python | utils_test.py | ockibagusp/cek-password | f7f38c5bcd518913cfe9ce6b5fcf7359e7b9e559 | [
"MIT"
] | null | null | null | utils_test.py | ockibagusp/cek-password | f7f38c5bcd518913cfe9ce6b5fcf7359e7b9e559 | [
"MIT"
] | null | null | null | utils_test.py | ockibagusp/cek-password | f7f38c5bcd518913cfe9ce6b5fcf7359e7b9e559 | [
"MIT"
] | null | null | null | #!/bin/python
# -*- coding: utf-8 -*-
"""
Ocki Bagus Pratama © 2021
"""
import json
import unittest
from utils import check_password
from sys import version_info
class TestUtils(unittest.TestCase):
def test_random_password(self):
# Lists of normal case scenarios.
list_test = [
# ("C... | 41.138158 | 191 | 0.560371 |
4a18d362f8c86407938eca7b648ffd90ce5c5b8c | 1,885 | py | Python | script/Debug/debug_ardu.py | NeelamMahapatro/Roborex_Chess | cc2666c56c09fc21a7c76879e2f19e594ddd474c | [
"MIT"
] | 3 | 2019-06-20T04:17:54.000Z | 2020-07-17T15:34:14.000Z | script/Debug/debug_ardu.py | NeelamMahapatro/Roborex_Chess | cc2666c56c09fc21a7c76879e2f19e594ddd474c | [
"MIT"
] | 1 | 2018-03-31T09:48:58.000Z | 2018-03-31T09:48:58.000Z | script/Debug/debug_ardu.py | NeelamMahapatro/Roborex_Chess | cc2666c56c09fc21a7c76879e2f19e594ddd474c | [
"MIT"
] | 6 | 2018-03-30T12:24:25.000Z | 2020-07-17T15:33:48.000Z | #!/usr/bin/env python
################################################################################
##
## MIT License
##
## Copyright (c) 2018 Team Roborex, NIT Rourkela
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Sof... | 36.25 | 81 | 0.612202 |
4a18d37c75da750ba721c5f1647bbe8a50b21586 | 5,706 | py | Python | testing/cross_language/mac_test.py | rosstimothy/tink | 4f9daa3ba6210f2d888549a9f52a50cbc123f926 | [
"Apache-2.0"
] | null | null | null | testing/cross_language/mac_test.py | rosstimothy/tink | 4f9daa3ba6210f2d888549a9f52a50cbc123f926 | [
"Apache-2.0"
] | null | null | null | testing/cross_language/mac_test.py | rosstimothy/tink | 4f9daa3ba6210f2d888549a9f52a50cbc123f926 | [
"Apache-2.0"
] | null | null | null | # 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
# distributed under t... | 41.05036 | 80 | 0.746057 |
4a18d61df539e0d271a324425ce4ca91105d12ff | 3,508 | py | Python | battle/pettingzoomagentDQNdecentralizedparallel.py | Sriram94/DMFG | 9206d4302350bed165e6812e8874041335ecf8a8 | [
"MIT"
] | 4 | 2021-12-17T08:00:28.000Z | 2022-02-12T12:25:24.000Z | battle/pettingzoomagentDQNdecentralizedparallel.py | Sriram94/DMFG | 9206d4302350bed165e6812e8874041335ecf8a8 | [
"MIT"
] | null | null | null | battle/pettingzoomagentDQNdecentralizedparallel.py | Sriram94/DMFG | 9206d4302350bed165e6812e8874041335ecf8a8 | [
"MIT"
] | null | null | null | from pettingzoo.magent import battle_v2
from RL_brainDQN import DeepQNetwork
import csv
import numpy as np
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
def change_observation(observation):
observation = observation.tolist()
new_list = []
for i in range(len(observation)):
for j in ra... | 31.603604 | 116 | 0.574971 |
4a18d63bf253d6255e1ed516047eae50cffccf8e | 10,574 | py | Python | src/oemof/solph/blocks/flow.py | lensum/oemof-solph | 75789b1578035d0b658c4b97fcc41fc3ca61638e | [
"MIT"
] | 59 | 2020-04-01T12:02:37.000Z | 2022-03-26T06:31:06.000Z | src/oemof/solph/blocks/flow.py | lensum/oemof-solph | 75789b1578035d0b658c4b97fcc41fc3ca61638e | [
"MIT"
] | 170 | 2020-03-31T12:04:26.000Z | 2022-03-31T15:41:04.000Z | src/oemof/solph/blocks/flow.py | lensum/oemof-solph | 75789b1578035d0b658c4b97fcc41fc3ca61638e | [
"MIT"
] | 33 | 2020-04-28T11:17:09.000Z | 2022-03-14T21:25:08.000Z | # -*- coding: utf-8 -*-
"""Creating sets, variables, constraints and parts of the objective function
for Flow objects.
SPDX-FileCopyrightText: Uwe Krien <krien@uni-bremen.de>
SPDX-FileCopyrightText: Simon Hilpert
SPDX-FileCopyrightText: Cord Kaldemeyer
SPDX-FileCopyrightText: Patrik Schönfeldt
SPDX-FileCopyrightText:... | 36.588235 | 79 | 0.541517 |
4a18d6b287ccd5eb645aac0cc2d74f142457f0a2 | 9,576 | py | Python | train.py | yaxingwang/MineGAN | a810f2d77f36ea9cf6993dede958b6f5d458f4b6 | [
"MIT"
] | 76 | 2020-03-04T16:25:10.000Z | 2022-03-25T08:58:18.000Z | train.py | yaxingwang/MineGAN | a810f2d77f36ea9cf6993dede958b6f5d458f4b6 | [
"MIT"
] | 7 | 2020-05-24T07:02:44.000Z | 2022-02-10T01:57:40.000Z | train.py | yaxingwang/MineGAN | a810f2d77f36ea9cf6993dede958b6f5d458f4b6 | [
"MIT"
] | 9 | 2020-07-04T16:35:14.000Z | 2022-03-12T06:20:40.000Z | """ BigGAN: The Authorized Unofficial PyTorch release
Code by A. Brock and A. Andonian
This code is an unofficial reimplementation of
"Large-Scale GAN Training for High Fidelity Natural Image Synthesis,"
by A. Brock, J. Donahue, and K. Simonyan (arXiv 1809.11096).
Let's go.
"""
import os
import fu... | 40.066946 | 124 | 0.630952 |
4a18d7178bb4a6c0c00aa1833d7fa406ffacbb15 | 2,889 | py | Python | sbin/build_config_upload.py | muarachmann/Submitty | 86cea3d3441419089b1a3058d01c663e6807294c | [
"BSD-3-Clause"
] | null | null | null | sbin/build_config_upload.py | muarachmann/Submitty | 86cea3d3441419089b1a3058d01c663e6807294c | [
"BSD-3-Clause"
] | null | null | null | sbin/build_config_upload.py | muarachmann/Submitty | 86cea3d3441419089b1a3058d01c663e6807294c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# This script is run by a cron job as the DAEMON_USER
#
# Regularly checks a queue to rebuild assignment configurations for recently modified gradeables.
#
import os
import pwd
import time
import subprocess
from submitty_utils import glob
import json
# ---------------------------------------... | 32.460674 | 104 | 0.563517 |
4a18d789acfe6bb45d01b597f7252d7be551cb82 | 813 | py | Python | spark_auto_mapper_fhir/value_sets/v2_0372.py | imranq2/SparkAutoMapper.FHIR | dd23b218fb0097d1edc2f3e688e8d6d4d7278bd2 | [
"Apache-2.0"
] | 1 | 2020-10-31T23:25:07.000Z | 2020-10-31T23:25:07.000Z | spark_auto_mapper_fhir/value_sets/v2_0372.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | spark_auto_mapper_fhir/value_sets/v2_0372.py | icanbwell/SparkAutoMapper.FHIR | 98f368e781b46523142c7cb513c670d659a93c9b | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from spark_auto_mapper_fhir.fhir_types.uri import FhirUri
from spark_auto_mapper_fhir.value_sets.generic_type import GenericTypeCode
from spark_auto_mapper.type_definitions.defined_types import AutoMapperTextInputType
# This file is auto-generated by generate_classes so do not edi... | 31.269231 | 84 | 0.757688 |
4a18d8883b8324a5375ec84ac49970584c01ce45 | 4,659 | py | Python | download_bench.py | itamaro/download-files-benchmark | 806c309be987f069e98aa8d8978616cf5a522280 | [
"MIT"
] | null | null | null | download_bench.py | itamaro/download-files-benchmark | 806c309be987f069e98aa8d8978616cf5a522280 | [
"MIT"
] | null | null | null | download_bench.py | itamaro/download-files-benchmark | 806c309be987f069e98aa8d8978616cf5a522280 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2018 Itamar Ostricher
"""Benchmark and compare different ways to download files in Python"""
import base64
from concurrent.futures import ThreadPoolExecutor
from functools import wraps
import hashlib
import itertools
import os
import shutil
import subprocess
import tempfile
from t... | 31.47973 | 141 | 0.647135 |
4a18d96c209b4d06a0ebb1cf440df9c86ff719c6 | 2,960 | py | Python | rogue/api/todo/controler.py | 4383/rogue | faafec989145c301459e87c67af6c4728950fb3c | [
"MIT"
] | null | null | null | rogue/api/todo/controler.py | 4383/rogue | faafec989145c301459e87c67af6c4728950fb3c | [
"MIT"
] | null | null | null | rogue/api/todo/controler.py | 4383/rogue | faafec989145c301459e87c67af6c4728950fb3c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sqlite3
BASE_PATH = os.path.dirname(__file__)
USER_PATH = os.path.expanduser('~')
TODO_PATH = os.path.join(USER_PATH, '.rogue')
DATABASE_PATH = os.path.join(TODO_PATH, 'todo.db')
def sort(tasks):
sorted_tasks = {
'hight': [],
'low': [],
'normal':... | 25.084746 | 77 | 0.55 |
4a18da132aa50c2da33de370ab7e129187312262 | 1,824 | py | Python | repositoryupdater/cli.py | marciogranzotto/repository-updater | f703142f84659e4d478a6fd6d569788c9fb5dbbf | [
"MIT"
] | 9 | 2018-05-02T10:10:42.000Z | 2022-03-30T06:09:57.000Z | repositoryupdater/cli.py | marciogranzotto/repository-updater | f703142f84659e4d478a6fd6d569788c9fb5dbbf | [
"MIT"
] | 11 | 2018-06-07T19:47:32.000Z | 2022-02-04T19:10:09.000Z | repositoryupdater/cli.py | marciogranzotto/repository-updater | f703142f84659e4d478a6fd6d569788c9fb5dbbf | [
"MIT"
] | 6 | 2020-01-27T13:14:40.000Z | 2022-03-30T06:11:28.000Z | """
CLI Module.
Handles CLI for the Repository Updater
"""
from os import environ
from sys import argv
import click
import crayons
from . import APP_FULL_NAME, APP_VERSION
from .github import GitHub
from .repository import Repository
@click.command()
@click.option(
"--token",
hide_input=True,
prompt="G... | 28.061538 | 87 | 0.683662 |
4a18da16656d7a48a3b6ef26f46bf3f12049d339 | 8,044 | py | Python | tests/test_server_16_endpoint_context.py | IdentityPython/idpy-oidc | 44f78f5f70d0c5ddc0108fa9a241c460179b53a8 | [
"Apache-2.0"
] | 1 | 2022-03-24T23:39:22.000Z | 2022-03-24T23:39:22.000Z | tests/test_server_16_endpoint_context.py | IdentityPython/idpy-oidc | 44f78f5f70d0c5ddc0108fa9a241c460179b53a8 | [
"Apache-2.0"
] | null | null | null | tests/test_server_16_endpoint_context.py | IdentityPython/idpy-oidc | 44f78f5f70d0c5ddc0108fa9a241c460179b53a8 | [
"Apache-2.0"
] | null | null | null | import copy
import os
import pytest
from cryptojwt.key_jar import build_keyjar
from idpyoidc.server import OPConfiguration
from idpyoidc.server import Server
from idpyoidc.server import do_endpoints
from idpyoidc.server.endpoint import Endpoint
from idpyoidc.server.endpoint_context import EndpointContext
from idpyoid... | 32.176 | 98 | 0.602685 |
4a18db01f46f4a43c8095e773595c56eb1751ffe | 3,432 | py | Python | util/git-pre-commit.py | leonardopsantos/cmp237 | 9be2df44253fce38e25edd3a515d476feefbd675 | [
"BSD-3-Clause"
] | null | null | null | util/git-pre-commit.py | leonardopsantos/cmp237 | 9be2df44253fce38e25edd3a515d476feefbd675 | [
"BSD-3-Clause"
] | null | null | null | util/git-pre-commit.py | leonardopsantos/cmp237 | 9be2df44253fce38e25edd3a515d476feefbd675 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) 2016 ARM Limited
# All rights reserved
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementatio... | 38.133333 | 79 | 0.743881 |
4a18db96c5a3cce133f72d0c13eedcdf780877c6 | 3,433 | py | Python | dbconnection/connector.py | FrancescoDelBuono/MASQ | 4299f09a338209fb6f03cc7c0806f8cc01447fe0 | [
"MIT"
] | 2 | 2020-08-06T10:54:28.000Z | 2021-02-13T04:59:05.000Z | dbconnection/connector.py | softlab-unimore/MASQ | 4299f09a338209fb6f03cc7c0806f8cc01447fe0 | [
"MIT"
] | 6 | 2020-06-24T08:58:31.000Z | 2021-09-22T19:18:03.000Z | dbconnection/connector.py | softlab-unimore/MASQ | 4299f09a338209fb6f03cc7c0806f8cc01447fe0 | [
"MIT"
] | null | null | null | import logging
import pandas as pd
from sqlalchemy import create_engine, MetaData
from sqlalchemy.exc import SQLAlchemyError
import urllib
from utils.dbms_utils import DBMSUtils
def check_url_connection(url_connection):
if 'SQL Server' in url_connection:
odbc_params = urllib.parse.quote_plus(url_connectio... | 28.848739 | 111 | 0.678415 |
4a18dba9e09715b562e348d15fb38ddbbb48d0a0 | 1,659 | py | Python | pycosmosac/param/parameters.py | fishjojo/pycosmosac | 9984a0ca2c9093142de60112f4c9a7fe33865946 | [
"MIT"
] | 3 | 2020-07-28T02:07:57.000Z | 2021-02-26T06:25:39.000Z | pycosmosac/param/parameters.py | fishjojo/pycosmosac | 9984a0ca2c9093142de60112f4c9a7fe33865946 | [
"MIT"
] | null | null | null | pycosmosac/param/parameters.py | fishjojo/pycosmosac | 9984a0ca2c9093142de60112f4c9a7fe33865946 | [
"MIT"
] | null | null | null | import json
from pycosmosac.param import data
KEYS = ["a_eff", "f_decay", "q_0", "r_0"]
class Parameters():
'''
Parameters for COSMO-SAC models.
Attributes:
parameters : dict
user input paramters
'''
def __init__(self, parameters=data.Saidi_2002):
self.parameters = Non... | 27.65 | 94 | 0.564798 |
4a18dd399018c60ebda5f4f5cf35824c4dc41184 | 1,003 | py | Python | tests/test_docsearch_topic.py | bib0x/pydocsearch | 5724c8205dfe895b51aed4f4d3f0cbd31aeb8c3f | [
"Beerware"
] | null | null | null | tests/test_docsearch_topic.py | bib0x/pydocsearch | 5724c8205dfe895b51aed4f4d3f0cbd31aeb8c3f | [
"Beerware"
] | null | null | null | tests/test_docsearch_topic.py | bib0x/pydocsearch | 5724c8205dfe895b51aed4f4d3f0cbd31aeb8c3f | [
"Beerware"
] | null | null | null | import pytest
from docsearch.docsearch import *
def test_docsearch_show_topic_without_search(cmd_opts, envpaths, capsys):
tests = {
'one_cheat': "\n".join([
"[one_cheat] description for the first cheat",
"- first cheat",
"- second cheat",
"\n"
]),
... | 29.5 | 73 | 0.57328 |
4a18de32b457d9bba12e985b36607f9607d18f17 | 1,703 | py | Python | Lib/keyword.py | jiaminglimjm/JawiPython | affbb34c7876498a7cc3eef2ef87d59f7cccd8b1 | [
"0BSD"
] | null | null | null | Lib/keyword.py | jiaminglimjm/JawiPython | affbb34c7876498a7cc3eef2ef87d59f7cccd8b1 | [
"0BSD"
] | null | null | null | Lib/keyword.py | jiaminglimjm/JawiPython | affbb34c7876498a7cc3eef2ef87d59f7cccd8b1 | [
"0BSD"
] | null | null | null | """Keywords (from "Grammar/python.gram")
This file is automatically generated; please don't muck it up!
To update the symbols in this file, 'cd' to the top directory of
the python source tree and run:
PYTHONPATH=Tools/peg_generator python3 -m pegen.keywordgen \
Grammar/python.gram \
Grammar/Token... | 14.938596 | 64 | 0.48855 |
4a18de3bf9ad1220dbfa93016996c8562e2a16ae | 4,612 | py | Python | monitor/src/radiation_monitor_red.py | autonomy-and-verification-uol/ROSMonitoring | 01256f780b4e3ec6f0520d7571558dfa01b8fd91 | [
"MIT",
"BSD-3-Clause"
] | 11 | 2020-02-18T18:51:01.000Z | 2022-03-16T12:18:51.000Z | monitor/src/radiation_monitor_red.py | autonomy-and-verification-uol/ROSMonitoring | 01256f780b4e3ec6f0520d7571558dfa01b8fd91 | [
"MIT",
"BSD-3-Clause"
] | 6 | 2020-02-03T15:34:49.000Z | 2020-02-05T15:58:37.000Z | monitor/src/radiation_monitor_red.py | autonomy-and-verification-uol/ROSMonitoring | 01256f780b4e3ec6f0520d7571558dfa01b8fd91 | [
"MIT",
"BSD-3-Clause"
] | 2 | 2021-10-06T13:37:47.000Z | 2022-03-24T16:27:15.000Z | #!/usr/bin/env python
import rospy
import sys
import json
import yaml
import websocket
from threading import *
from rospy_message_converter import message_converter
from monitor.msg import *
from std_msgs.msg import String
ws_lock = Lock()
dict_msgs = {}
from gazebo_radiation_plugins.msg import Simulated_... | 37.803279 | 205 | 0.645924 |
4a18df85db89a74d3a14478fc1fd46600e185ad1 | 75 | py | Python | testprojects/src/python/interpreter_selection/resolver_blacklist_testing/import_futures.py | jakubbujny/pants | e7fe73eaa3bc196d6d976e9f362bf60b69da17b3 | [
"Apache-2.0"
] | null | null | null | testprojects/src/python/interpreter_selection/resolver_blacklist_testing/import_futures.py | jakubbujny/pants | e7fe73eaa3bc196d6d976e9f362bf60b69da17b3 | [
"Apache-2.0"
] | null | null | null | testprojects/src/python/interpreter_selection/resolver_blacklist_testing/import_futures.py | jakubbujny/pants | e7fe73eaa3bc196d6d976e9f362bf60b69da17b3 | [
"Apache-2.0"
] | null | null | null | from concurrent.futures import Future
print(Future)
print('Successful.')
| 12.5 | 37 | 0.786667 |
4a18df88f9eb8e6d5ea2048117a038ecb972baee | 1,016 | py | Python | Algorithms/Strings/hackerrank_in_a_string.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Strings/hackerrank_in_a_string.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Strings/hackerrank_in_a_string.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
q = int(input().strip())
for a0 in range(q):
s = input().strip()
start = s.find('h', 0)
if start == -1:
print('NO')
continue
start = s.find('a', start+1)
if start == -1:
print('NO')
continue
start = s.find('c', start+1)
if s... | 20.734694 | 32 | 0.458661 |
4a18df909a756ccdcbdef7a31b87f6742bf91c6f | 868 | py | Python | BDD_Formy_testing/src/features/steps/modal_page_steps.py | AntonioIonica/Automation_testing | 6f7c94c55677b0958e6fada24058f1a00d2c0d0e | [
"MIT"
] | null | null | null | BDD_Formy_testing/src/features/steps/modal_page_steps.py | AntonioIonica/Automation_testing | 6f7c94c55677b0958e6fada24058f1a00d2c0d0e | [
"MIT"
] | null | null | null | BDD_Formy_testing/src/features/steps/modal_page_steps.py | AntonioIonica/Automation_testing | 6f7c94c55677b0958e6fada24058f1a00d2c0d0e | [
"MIT"
] | null | null | null | import time
from behave import *
from selenium.webdriver.common.by import By
@when(u'I navigate to modal page')
def step_impl(context):
context.driver.find_element(By.XPATH, '/html/body/div/div/li[10]/a').click()
time.sleep(1.5)
@when(u'I click on "Open Modal"')
def step_impl(context):
context.driver.fi... | 24.8 | 90 | 0.697005 |
4a18dfd4101442937cca25c0a1d52fdaad1af669 | 720 | py | Python | useful_scripts/scaleToWidthxWidth.py | jessvb/3d_world_procedural_generation | 44468f4267ccb378de90efb53d6c52a204cd6e25 | [
"MIT"
] | 7 | 2019-01-29T21:20:01.000Z | 2020-11-23T01:03:04.000Z | useful_scripts/scaleToWidthxWidth.py | jessvb/3d_world_procedural_generation | 44468f4267ccb378de90efb53d6c52a204cd6e25 | [
"MIT"
] | null | null | null | useful_scripts/scaleToWidthxWidth.py | jessvb/3d_world_procedural_generation | 44468f4267ccb378de90efb53d6c52a204cd6e25 | [
"MIT"
] | 1 | 2021-07-12T10:43:29.000Z | 2021-07-12T10:43:29.000Z | ############################################################
###### Run this script within the source image folder ######
############################################################
import PIL
import glob
from PIL import Image
imgList = glob.glob('*.png')
fileOutputPath = 'C:/Users/jessv/Dropbox (MIT)/1st Year EECS... | 30 | 110 | 0.569444 |
4a18e00d8bc3c6f27e943b7ff65831f134118697 | 918 | py | Python | main/migrations/0004_auto_20190801_1128.py | NuTTeR/routersite-web | 340595ccb129fd91233b847695c8d72c29d77e00 | [
"MIT"
] | null | null | null | main/migrations/0004_auto_20190801_1128.py | NuTTeR/routersite-web | 340595ccb129fd91233b847695c8d72c29d77e00 | [
"MIT"
] | 4 | 2021-04-08T21:55:02.000Z | 2021-06-10T20:28:22.000Z | main/migrations/0004_auto_20190801_1128.py | NuTTeR/routersite-web | 340595ccb129fd91233b847695c8d72c29d77e00 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-08-01 11:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0003_routeinitauto_driver_limit'),
]
operations = [
migrations.AddField(
model_name='route',
name='load_time... | 30.6 | 115 | 0.617647 |
4a18e0830194616bcb147114d72c0a307257e565 | 22,984 | py | Python | baselines/imagenet/het_rank1_bnn.py | dvdzhang/uncertainty-baselines | 8ce0d7494e5cae0719c1b750da4b61564e536636 | [
"Apache-2.0"
] | null | null | null | baselines/imagenet/het_rank1_bnn.py | dvdzhang/uncertainty-baselines | 8ce0d7494e5cae0719c1b750da4b61564e536636 | [
"Apache-2.0"
] | null | null | null | baselines/imagenet/het_rank1_bnn.py | dvdzhang/uncertainty-baselines | 8ce0d7494e5cae0719c1b750da4b61564e536636 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The Uncertainty Baselines Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | 44.629126 | 80 | 0.674513 |
4a18e09f4248a6edd27c80f43be471fdf084cac6 | 906 | py | Python | imperial/imperial/core/gui/filterReturn.py | jorgesaw/imperial | ed4d33d1bcc71eb5f497b3cfed52d1fed48b0a7a | [
"Unlicense"
] | null | null | null | imperial/imperial/core/gui/filterReturn.py | jorgesaw/imperial | ed4d33d1bcc71eb5f497b3cfed52d1fed48b0a7a | [
"Unlicense"
] | null | null | null | imperial/imperial/core/gui/filterReturn.py | jorgesaw/imperial | ed4d33d1bcc71eb5f497b3cfed52d1fed48b0a7a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append('./')
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import PyQt4
import PyQt4.QtCore as QtCore
import PyQt4.QtGui as QtGui
class FilterReturn(QtCore.QObject):
def eventFilter(self, source, event):
if (event.type()==QEvent.Key... | 31.241379 | 61 | 0.61479 |
4a18e2df26127f6c931bd0d7d37672a573a3cc12 | 2,309 | py | Python | train.py | lgchencong/AlexNet | 6d420d5384c04ba56bb17e84b0a3a3ee2acf99e9 | [
"Apache-2.0"
] | null | null | null | train.py | lgchencong/AlexNet | 6d420d5384c04ba56bb17e84b0a3a3ee2acf99e9 | [
"Apache-2.0"
] | null | null | null | train.py | lgchencong/AlexNet | 6d420d5384c04ba56bb17e84b0a3a3ee2acf99e9 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from torch import optim
from torchvision import transforms, datasets
from model import AlexNet
from torch.utils.data import DataLoader
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
batch_size = 32
print(device)
data_transform = {
"train": tran... | 41.981818 | 99 | 0.61845 |
4a18e32a7c16c0689b21f566639387331abda70e | 1,072 | py | Python | examples/robotchef/docs/source/conf.py | pgajdos/lml | 047bad491a25192d0d3816103b6b47e7374cc5a1 | [
"BSD-3-Clause"
] | null | null | null | examples/robotchef/docs/source/conf.py | pgajdos/lml | 047bad491a25192d0d3816103b6b47e7374cc5a1 | [
"BSD-3-Clause"
] | null | null | null | examples/robotchef/docs/source/conf.py | pgajdos/lml | 047bad491a25192d0d3816103b6b47e7374cc5a1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
DESCRIPTION = "Sample project to demonstrate load me later plugin system" + ""
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
]
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"
project = u"r... | 20.226415 | 78 | 0.584888 |
4a18e34095c646354c7d192e1316efb67b1dd64b | 1,840 | py | Python | test/test_user_commons/test_sensor.py | MarcinMoskala/biggerquery | 54bcf1b289854709fc7d430fb8ac347ce84ed7b9 | [
"Apache-2.0"
] | null | null | null | test/test_user_commons/test_sensor.py | MarcinMoskala/biggerquery | 54bcf1b289854709fc7d430fb8ac347ce84ed7b9 | [
"Apache-2.0"
] | null | null | null | test/test_user_commons/test_sensor.py | MarcinMoskala/biggerquery | 54bcf1b289854709fc7d430fb8ac347ce84ed7b9 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from unittest import main
import pandas as pd
import mock
from biggerquery.user_commons.sensor import sensor_component
YESTERDAY_WHERE_CLAUSE = "DATE(%(partitioning_column)s) = DATE(TIMESTAMP_ADD(TIMESTAMP('{dt} UTC'), INTERVAL -24 HOUR))"
def return_table_not_ready(*args, **kwargs):
... | 31.724138 | 120 | 0.691304 |
4a18e36e1dd053c07c244872f560fcda82f4e797 | 972 | py | Python | fixture/application.py | fastmelodic/PythonQA | 964ed27d812a2f4927784d18e4d44c86fac43ac9 | [
"Apache-2.0"
] | null | null | null | fixture/application.py | fastmelodic/PythonQA | 964ed27d812a2f4927784d18e4d44c86fac43ac9 | [
"Apache-2.0"
] | null | null | null | fixture/application.py | fastmelodic/PythonQA | 964ed27d812a2f4927784d18e4d44c86fac43ac9 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from fixture.session import SessionHelper
from fixture.group import GroupHelper
from fixture.contact import ContactHelper
class Application:
def __init__(self, browser, baseurl):
if browser == "firefox":
self.wd = webdriver.Firefox()
elif browser == "... | 27 | 65 | 0.599794 |
4a18e4a6111d89ab085e6daaefa074833979815d | 18,116 | py | Python | keras/optimizers/optimizer_experimental/optimizer_test.py | hdubbs/keras | 4967ce6f8f0199969ba40d74eba1bddc204ca100 | [
"Apache-2.0"
] | null | null | null | keras/optimizers/optimizer_experimental/optimizer_test.py | hdubbs/keras | 4967ce6f8f0199969ba40d74eba1bddc204ca100 | [
"Apache-2.0"
] | null | null | null | keras/optimizers/optimizer_experimental/optimizer_test.py | hdubbs/keras | 4967ce6f8f0199969ba40d74eba1bddc204ca100 | [
"Apache-2.0"
] | null | null | null | """Tests for the reworked optimizer.
More context in go/new-keras-optimizer
"""
import os
import re
from absl import logging
from absl.testing import parameterized
import keras
from keras.optimizers import learning_rate_schedule
from keras.optimizers.optimizer_experimental import adadelta as adadelta_new
from keras.... | 38.544681 | 80 | 0.690991 |
4a18e59bcd86169a0ab3d6496797d913e0b698e1 | 10,195 | py | Python | toytree/utils.py | PhilippineDubertrand/toytree | cdb57fae164f0035dc5f451e08289780deae927a | [
"BSD-3-Clause"
] | null | null | null | toytree/utils.py | PhilippineDubertrand/toytree | cdb57fae164f0035dc5f451e08289780deae927a | [
"BSD-3-Clause"
] | null | null | null | toytree/utils.py | PhilippineDubertrand/toytree | cdb57fae164f0035dc5f451e08289780deae927a | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
from __future__ import print_function, division, absolute_import
import re
from copy import deepcopy
import numpy as np
#######################################################
# Exception Classes
#######################################################
class ToytreeError(Exception):
def __... | 28.88102 | 84 | 0.53742 |
4a18e63931544787b7523106c5608cb5144cf1d5 | 12,395 | py | Python | tests/components/hvv_departures/test_config_flow.py | mikan-megane/core | 837220cce40890e296920d33a623adbc11bd15a6 | [
"Apache-2.0"
] | 4 | 2020-08-10T20:02:24.000Z | 2022-01-31T02:14:22.000Z | tests/components/hvv_departures/test_config_flow.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 78 | 2020-07-23T07:13:08.000Z | 2022-03-31T06:02:04.000Z | tests/components/hvv_departures/test_config_flow.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 3 | 2022-01-17T20:10:54.000Z | 2022-01-17T20:17:22.000Z | """Test the HVV Departures config flow."""
import json
from unittest.mock import patch
from pygti.exceptions import CannotConnect, InvalidAuth
from homeassistant import data_entry_flow
from homeassistant.components.hvv_departures.const import (
CONF_FILTER,
CONF_REAL_TIME,
CONF_STATION,
DOMAIN,
)
from... | 33.141711 | 124 | 0.623477 |
4a18e63af34f4c5b2ee35242c56e345b5c542a17 | 2,540 | py | Python | llvd/downloader.py | vgoebbels/llvd | bc86fa4f2f7b57d61452408bae08966216413dcb | [
"MIT"
] | null | null | null | llvd/downloader.py | vgoebbels/llvd | bc86fa4f2f7b57d61452408bae08966216413dcb | [
"MIT"
] | null | null | null | llvd/downloader.py | vgoebbels/llvd | bc86fa4f2f7b57d61452408bae08966216413dcb | [
"MIT"
] | null | null | null |
from tqdm import tqdm
import requests
import time
import click
import re
def download_video(url, index, filename):
"""
Downloads a video and saves it by its name plus index for easy sorting
"""
print("\n" + filename + "\n")
maximum_retries = 5
with open(f"{index}-{filename}.mp4", 'wb') as... | 32.151899 | 101 | 0.525197 |
4a18e732d4e19c9c904d94532c2042fb942f71de | 960 | py | Python | core-plugins/microscopy/2/dss/drop-boxes/MicroscopyDropbox/MicroscopyDropbox.py | aarpon/obit_microscopy_core_technology | 9402922771129ac8bcf6ea3317563306b1293af1 | [
"Apache-2.0"
] | 1 | 2018-12-20T23:55:40.000Z | 2018-12-20T23:55:40.000Z | core-plugins/microscopy/2/dss/drop-boxes/MicroscopyDropbox/MicroscopyDropbox.py | aarpon/obit_microscopy_core_technology | 9402922771129ac8bcf6ea3317563306b1293af1 | [
"Apache-2.0"
] | 3 | 2017-09-25T14:47:51.000Z | 2019-10-24T06:44:26.000Z | core-plugins/microscopy/2/dss/drop-boxes/MicroscopyDropbox/MicroscopyDropbox.py | aarpon/obit_microscopy_core_technology | 9402922771129ac8bcf6ea3317563306b1293af1 | [
"Apache-2.0"
] | 1 | 2017-09-25T08:12:06.000Z | 2017-09-25T08:12:06.000Z | # -*- coding: utf-8 -*-
"""
@author: Aaron Ponti
"""
import os
import logging
from Processor import Processor
def process(transaction):
"""Dropbox entry point.
@param transaction, the transaction object
"""
# Get path to containing folder
# __file__ does not work (reliably) in Jython
dbPa... | 22.325581 | 76 | 0.652083 |
4a18e796648140853dbbd6ca2252fc04b60e2b37 | 287 | py | Python | blackmamba/lib/pyflakes/scripts/pyflakes.py | oz90210/blackmamba | 65c82c8e99028d6fbb57098ce82d0a394df215a0 | [
"MIT"
] | 913 | 2016-07-01T07:54:20.000Z | 2022-03-30T07:15:23.000Z | blackmamba/lib/pyflakes/scripts/pyflakes.py | oz90210/blackmamba | 65c82c8e99028d6fbb57098ce82d0a394df215a0 | [
"MIT"
] | 405 | 2016-06-25T14:54:20.000Z | 2022-03-23T14:22:10.000Z | blackmamba/lib/pyflakes/scripts/pyflakes.py | oz90210/blackmamba | 65c82c8e99028d6fbb57098ce82d0a394df215a0 | [
"MIT"
] | 249 | 2015-01-07T22:49:49.000Z | 2022-03-18T02:32:06.000Z | """
Implementation of the command-line I{pyflakes} tool.
"""
from __future__ import absolute_import
# For backward compatibility
__all__ = ['check', 'checkPath', 'checkRecursive', 'iterSourceCode', 'main']
from pyflakes.api import check, checkPath, checkRecursive, iterSourceCode, main
| 31.888889 | 79 | 0.773519 |
4a18e8570c52ba995ae01b1653564d623b7f16f5 | 54,569 | py | Python | guild/commands/runs_impl.py | guildai/guild-python2 | 8f83e8234fc4b268b6f29ca7d0f1b93148e4d2a6 | [
"Apache-2.0"
] | null | null | null | guild/commands/runs_impl.py | guildai/guild-python2 | 8f83e8234fc4b268b6f29ca7d0f1b93148e4d2a6 | [
"Apache-2.0"
] | null | null | null | guild/commands/runs_impl.py | guildai/guild-python2 | 8f83e8234fc4b268b6f29ca7d0f1b93148e4d2a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2022 RStudio, PBC
#
# 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... | 26.400097 | 88 | 0.615258 |
4a18e97517b8146db954c806cb011e5da1eb08d9 | 2,799 | py | Python | database/db_checker.py | KevynTang/vein-project | 1a49515ac112493c1b6510d9a382c3b64629ba8e | [
"MIT"
] | 4 | 2021-10-01T04:54:01.000Z | 2021-11-10T05:27:01.000Z | database/db_checker.py | KevynTang/vein-project | 1a49515ac112493c1b6510d9a382c3b64629ba8e | [
"MIT"
] | null | null | null | database/db_checker.py | KevynTang/vein-project | 1a49515ac112493c1b6510d9a382c3b64629ba8e | [
"MIT"
] | 2 | 2021-09-27T05:31:34.000Z | 2022-01-29T00:43:27.000Z | from database.db_reader import read_from_db, check_table_exist, check_table_not_empty
from database import date_getter
def get_standard_latest_trade_date(frequency='daily'):
if frequency == 'quarter':
return date_getter.get_quarter_end_date_before()
else:
return date_getter.get_trade_date_befor... | 27.99 | 90 | 0.544837 |
4a18e9b14c50a0addcaf57bdba73d221f5b00095 | 1,314 | py | Python | tests/functional_tests/pool/close_pool_ledger_with_valid_data_test.py | wYaobiz/indy-test-suite | 7b4a3f9bb73e5830fea17a158dc0fc96ab29ac32 | [
"Apache-2.0"
] | 1 | 2021-07-26T14:19:07.000Z | 2021-07-26T14:19:07.000Z | tests/functional_tests/pool/close_pool_ledger_with_valid_data_test.py | wYaobiz/indy-test-suite | 7b4a3f9bb73e5830fea17a158dc0fc96ab29ac32 | [
"Apache-2.0"
] | null | null | null | tests/functional_tests/pool/close_pool_ledger_with_valid_data_test.py | wYaobiz/indy-test-suite | 7b4a3f9bb73e5830fea17a158dc0fc96ab29ac32 | [
"Apache-2.0"
] | null | null | null | from indy import pool
from utilities import utils
from utilities import common, constant
from test_scripts.functional_tests.pool.pool_test_base import PoolTestBase
import pytest
class TestClosePoolLedgerConfig(PoolTestBase):
@pytest.mark.asyncio
async def test(self):
# 1. Create pool ledger configure... | 41.0625 | 79 | 0.592846 |
4a18e9b72f87bebf55ae46995c10589174009fca | 736 | py | Python | lib/generator/sitemap.py | vane/static-site-generator | 14a6031dac43f04a5ede7d95dec846e619d0c8b9 | [
"MIT"
] | null | null | null | lib/generator/sitemap.py | vane/static-site-generator | 14a6031dac43f04a5ede7d95dec846e619d0c8b9 | [
"MIT"
] | null | null | null | lib/generator/sitemap.py | vane/static-site-generator | 14a6031dac43f04a5ede7d95dec846e619d0c8b9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import lib.helper
def generate(posts, config, output):
data = """<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitema... | 35.047619 | 235 | 0.63587 |
4a18ea43a2db591292baf9f946112fe8fb9ec45e | 173 | py | Python | tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_ConstantTrend_Seasonal_MonthOfYear_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_ConstantTrend_Seasonal_MonthOfYear_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_ConstantTrend_Seasonal_MonthOfYear_MLP.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['Difference'] , ['ConstantTrend'] , ['Seasonal_MonthOfYear'] , ['MLP'] ); | 43.25 | 95 | 0.768786 |
4a18ea5c25d07904b583c5ca7f4d3aadeb6fa286 | 384 | py | Python | catkin_ws/build/lane_filter/catkin_generated/pkg.installspace.context.pc.py | YDHsieh/YDHsieh | f26b6a97536fc32dd3641a2493add2c974d83c13 | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/build/lane_filter/catkin_generated/pkg.installspace.context.pc.py | YDHsieh/YDHsieh | f26b6a97536fc32dd3641a2493add2c974d83c13 | [
"CC-BY-2.0"
] | null | null | null | catkin_ws/build/lane_filter/catkin_generated/pkg.installspace.context.pc.py | YDHsieh/YDHsieh | f26b6a97536fc32dd3641a2493add2c974d83c13 | [
"CC-BY-2.0"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "lane_filter"
PROJECT_SPACE_DIR = "/ho... | 42.666667 | 68 | 0.710938 |
4a18eb82ac049673c155079e5dbfbb05a743a450 | 69 | py | Python | start.py | igna31/Wasm | 574e2cd78f7a87762106e90b80b1cad64039f0d1 | [
"MIT"
] | null | null | null | start.py | igna31/Wasm | 574e2cd78f7a87762106e90b80b1cad64039f0d1 | [
"MIT"
] | null | null | null | start.py | igna31/Wasm | 574e2cd78f7a87762106e90b80b1cad64039f0d1 | [
"MIT"
] | null | null | null | import os
os.system("wat2wasm main.wat")
os.system("node script.js")
| 17.25 | 30 | 0.73913 |
4a18ebda93d3401192ed91866e18523a2564013f | 56 | py | Python | 02_numpy/solutions/14_solutions.py | HirahTang/datascience_starter_course | a4429db9ae1795eaf52b795d16897466d769c40c | [
"CC0-1.0"
] | 3 | 2020-09-06T06:01:41.000Z | 2020-09-23T19:03:04.000Z | 01_numpy/solutions/14_solutions.py | glemaitre/smob_paristech_12_2018 | b669206f204a3e57e71efb3dd22e2ffbc4e0a309 | [
"CC0-1.0"
] | 4 | 2019-02-22T21:37:20.000Z | 2019-03-12T13:20:29.000Z | 01_numpy/solutions/14_solutions.py | glemaitre/smob_paristech_12_2018 | b669206f204a3e57e71efb3dd22e2ffbc4e0a309 | [
"CC0-1.0"
] | 5 | 2020-10-26T05:03:09.000Z | 2022-03-24T04:22:09.000Z | x = np.arange(3).reshape((3, 1))
y = np.arange(3)
x + y
| 14 | 32 | 0.553571 |
4a18ec1f09b7cf2bea7fab4b64a880f179d146a6 | 5,476 | py | Python | core/etl/extractor/base.py | xUndero/noc | 9fb34627721149fcf7064860bd63887e38849131 | [
"BSD-3-Clause"
] | 1 | 2019-09-20T09:36:48.000Z | 2019-09-20T09:36:48.000Z | core/etl/extractor/base.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | core/etl/extractor/base.py | ewwwcha/noc | aba08dc328296bb0e8e181c2ac9a766e1ec2a0bb | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# Data Extractor
# ----------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------... | 34.658228 | 99 | 0.524105 |
4a18ec2609f32193792343235dc303cf02506279 | 14,574 | py | Python | debexpo/tests/functional/test_my.py | jadonk/debexpo | a022160492e40cd02bafc413a3cb009551fd6f8d | [
"MIT"
] | null | null | null | debexpo/tests/functional/test_my.py | jadonk/debexpo | a022160492e40cd02bafc413a3cb009551fd6f8d | [
"MIT"
] | null | null | null | debexpo/tests/functional/test_my.py | jadonk/debexpo | a022160492e40cd02bafc413a3cb009551fd6f8d | [
"MIT"
] | 2 | 2017-01-20T23:08:40.000Z | 2019-08-13T20:30:00.000Z | from debexpo.tests import TestController, url
from debexpo.lib import constants
from debexpo.model import meta
from debexpo.model.users import User
from debexpo.model.user_countries import UserCountry
import md5
class TestMyController(TestController):
_LOW_STRENGTH_GPGKEY = """-----BEGIN PGP PUBLIC KEY BLOCK-----
... | 53.189781 | 110 | 0.68485 |
4a18ecaf7e91c71a2171f99ee0428cf43f275a01 | 3,085 | py | Python | wolff/settings.py | hanztura/wolff | d1fc568cd54453714f2ea61f5e99a58cc109ef65 | [
"MIT"
] | 2 | 2022-01-21T15:29:20.000Z | 2022-01-21T17:42:30.000Z | wolff/settings.py | hanztura/wolff | d1fc568cd54453714f2ea61f5e99a58cc109ef65 | [
"MIT"
] | null | null | null | wolff/settings.py | hanztura/wolff | d1fc568cd54453714f2ea61f5e99a58cc109ef65 | [
"MIT"
] | 1 | 2020-04-14T09:36:25.000Z | 2020-04-14T09:36:25.000Z | """
Django settings for wolff project.
Generated by 'django-admin startproject' using Django 2.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# B... | 25.495868 | 91 | 0.696921 |
4a18edcdf17b0c16da89722622f70505a7b3b92c | 860 | py | Python | climateeconomics/tests/witness_constraints_wrt_design_var_jacobian_pickle_dump.py | os-climate/witness-core | 3ef9a44d86804c5ad57deec3c9916348cb3bfbb8 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2022-01-14T06:37:42.000Z | 2022-01-14T06:37:42.000Z | climateeconomics/tests/witness_constraints_wrt_design_var_jacobian_pickle_dump.py | os-climate/witness-core | 3ef9a44d86804c5ad57deec3c9916348cb3bfbb8 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | climateeconomics/tests/witness_constraints_wrt_design_var_jacobian_pickle_dump.py | os-climate/witness-core | 3ef9a44d86804c5ad57deec3c9916348cb3bfbb8 | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | '''
Copyright 2022 Airbus SAS
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
dis... | 33.076923 | 91 | 0.803488 |
4a18ef2cf7f8eaefacf3da5c0134dbfa5d270674 | 201 | py | Python | util/__init__.py | ywchiao/shot | 4b7c55bdcca44d05e07fffa59fe4e23364032cb5 | [
"MIT"
] | null | null | null | util/__init__.py | ywchiao/shot | 4b7c55bdcca44d05e07fffa59fe4e23364032cb5 | [
"MIT"
] | null | null | null | util/__init__.py | ywchiao/shot | 4b7c55bdcca44d05e07fffa59fe4e23364032cb5 | [
"MIT"
] | 1 | 2020-03-27T02:07:27.000Z | 2020-03-27T02:07:27.000Z |
from .angle import Angle
from .circular_list import CircularList
from .node import Node
from .table import Table
from .vector_2d import Vector2D
from .module_loader import load_module
# __init__.py
| 18.272727 | 39 | 0.81592 |
4a18ef9334205d3f28adf97e9cd9203575408a26 | 1,112 | py | Python | scripts/monty.py | TobiasFFThomsen/EncryptionAccelerator | bc9dd86cc83956530e5c2a9abc1cdb2501b346eb | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | scripts/monty.py | TobiasFFThomsen/EncryptionAccelerator | bc9dd86cc83956530e5c2a9abc1cdb2501b346eb | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | scripts/monty.py | TobiasFFThomsen/EncryptionAccelerator | bc9dd86cc83956530e5c2a9abc1cdb2501b346eb | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # 17^2 mod 33 on montgomery form
a = 17
b = 18
c = 19
n = 37
# We compute c = a*b mod n by converting to montgomery form. We choose R > n
R = 64
R_inverse = 11
result_expected_1 = a * b % n
print("a*b mod n: ", result_expected_1)
# For 3 case multiplications we get
# c = a*b*c mod n
result_expected_2 = a * b * c % n... | 22.693878 | 78 | 0.598022 |
4a18efa592a6ac74575e3ffc5090f84c206fd5a9 | 891 | py | Python | env/Lib/site-packages/plotly/graph_objs/barpolar/__init__.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | venv/Lib/site-packages/plotly/graph_objs/barpolar/__init__.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | venv/Lib/site-packages/plotly/graph_objs/barpolar/__init__.py | wakisalvador/constructed-misdirection | 74779e9ec640a11bc08d5d1967c85ac4fa44ea5e | [
"Unlicense"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | import sys
if sys.version_info < (3, 7):
from ._hoverlabel import Hoverlabel
from ._legendgrouptitle import Legendgrouptitle
from ._marker import Marker
from ._selected import Selected
from ._stream import Stream
from ._unselected import Unselected
from . import hoverlabel
from . import... | 29.7 | 84 | 0.643098 |
4a18efbca2e37155ae687a931b6d1c0126ebf7df | 345 | py | Python | attack/crafter/__init__.py | nps1ngh/adversarial-bert-german-attacks-defense | 3cca292ec4c3c07945f4198ae81e1f671462ed90 | [
"Apache-2.0"
] | 2 | 2022-03-05T15:05:14.000Z | 2022-03-06T11:19:47.000Z | attack/crafter/__init__.py | nps1ngh/adversarial-bert-german-attacks-defense | 3cca292ec4c3c07945f4198ae81e1f671462ed90 | [
"Apache-2.0"
] | null | null | null | attack/crafter/__init__.py | nps1ngh/adversarial-bert-german-attacks-defense | 3cca292ec4c3c07945f4198ae81e1f671462ed90 | [
"Apache-2.0"
] | 1 | 2022-01-12T20:30:54.000Z | 2022-01-12T20:30:54.000Z | from crafter.blackbox.character_level import BlackboxCharacterLevel
from crafter.blackbox.word_level import BlackboxWordLevelAttack
from crafter.whitebox.word_level import WhiteboxWordLevelAttack
from crafter.whitebox.character_level import WhiteboxCharacterLevel
from crafter.whitebox.baseline_word_level import Baselin... | 57.5 | 80 | 0.913043 |
4a18f034b96fbe3fd7943f2ba434326f65edefd8 | 564 | py | Python | samples/mxm_openmp.py | dina-fouad/pyccel | f4d919e673b400442b9c7b81212b6fbef749c7b7 | [
"MIT"
] | 206 | 2018-06-28T00:28:47.000Z | 2022-03-29T05:17:03.000Z | samples/mxm_openmp.py | dina-fouad/pyccel | f4d919e673b400442b9c7b81212b6fbef749c7b7 | [
"MIT"
] | 670 | 2018-07-23T11:02:24.000Z | 2022-03-30T07:28:05.000Z | samples/mxm_openmp.py | dina-fouad/pyccel | f4d919e673b400442b9c7b81212b6fbef749c7b7 | [
"MIT"
] | 19 | 2019-09-19T06:01:00.000Z | 2022-03-29T05:17:06.000Z | # coding: utf-8
from numpy import zeros
n = 800
m = 1600
p = 800
a = zeros((n,m))
b = zeros((m,p))
c = zeros((n,p))
#$ omp parallel
#$ omp for schedule(runtime)
for i in range(0, n):
for j in range(0, m):
a[i,j] = i-j
#$ omp end for nowait
#$ omp for schedule(runtime)
for i in range(0, m):
for j in... | 17.090909 | 43 | 0.544326 |
4a18f2c73ce72d1f7d537a2c348a02f0f9538fc9 | 4,152 | py | Python | arknights/load_scenes.py | yue-litam/arknights-auto-scripts | 4670b7a0c3e0b6b4c0e269ef13cf3d75c0b06a24 | [
"Apache-2.0"
] | 24 | 2019-12-01T18:18:06.000Z | 2021-09-25T06:47:02.000Z | arknights/load_scenes.py | yue-litam/arknights-auto-scripts | 4670b7a0c3e0b6b4c0e269ef13cf3d75c0b06a24 | [
"Apache-2.0"
] | 5 | 2020-05-22T12:09:59.000Z | 2022-01-13T01:51:27.000Z | arknights/load_scenes.py | yue-litam/arknights-auto-scripts | 4670b7a0c3e0b6b4c0e269ef13cf3d75c0b06a24 | [
"Apache-2.0"
] | 6 | 2020-06-19T06:35:13.000Z | 2021-11-29T06:04:06.000Z | import time
from common.logutil import logger
from common.scene import Scene
from common.tool import load_resource
def account_upgrade_detection(prefix):
return Scene('检测账号升级',
identify_image=load_resource('account_upgrade_detection.png', prefix))
def prts_disable_detection(prefix)... | 35.186441 | 108 | 0.654383 |
4a18f2f8d81d27afb31d8a46f5d4fccf5ea6b00c | 51 | py | Python | src/brainy/version.py | pelkmanslab/brainy | eb088be9585734c66be5d6ef0b7127a923f4066c | [
"MIT"
] | null | null | null | src/brainy/version.py | pelkmanslab/brainy | eb088be9585734c66be5d6ef0b7127a923f4066c | [
"MIT"
] | null | null | null | src/brainy/version.py | pelkmanslab/brainy | eb088be9585734c66be5d6ef0b7127a923f4066c | [
"MIT"
] | null | null | null | __version__ = '0.2.1'
brainy_version = __version__
| 17 | 28 | 0.764706 |
4a18f414dde63eff7e1a06931ef3b1725eecda3f | 539 | py | Python | tests/import/module_getattr.py | sebi5361/micropython | 6c054cd124bc6229bee127128264dc0829dea53c | [
"MIT"
] | 198 | 2017-03-24T23:23:54.000Z | 2022-01-07T07:14:00.000Z | tests/import/module_getattr.py | sebi5361/micropython | 6c054cd124bc6229bee127128264dc0829dea53c | [
"MIT"
] | 509 | 2017-03-28T19:37:18.000Z | 2022-03-31T20:31:43.000Z | tests/import/module_getattr.py | sebi5361/micropython | 6c054cd124bc6229bee127128264dc0829dea53c | [
"MIT"
] | 187 | 2017-03-24T23:23:58.000Z | 2022-02-25T01:48:45.000Z | # test __getattr__ on module
# ensure that does_not_exist doesn't exist to start with
this = __import__(__name__)
try:
this.does_not_exist
assert False
except AttributeError:
pass
# define __getattr__
def __getattr__(attr):
if attr == 'does_not_exist':
return False
raise AttributeError
# ... | 22.458333 | 70 | 0.742115 |
4a18f493f277e47762b80bc38916a51ed63e45bd | 36,723 | py | Python | bomber.py | byanonyms/TBomb | 649af75e6e41b6f8949ecac7a0ba6761be26acf3 | [
"MIT"
] | 1 | 2020-04-21T09:24:41.000Z | 2020-04-21T09:24:41.000Z | bomber.py | byanonyms/TBomb | 649af75e6e41b6f8949ecac7a0ba6761be26acf3 | [
"MIT"
] | null | null | null | bomber.py | byanonyms/TBomb | 649af75e6e41b6f8949ecac7a0ba6761be26acf3 | [
"MIT"
] | 1 | 2020-10-11T08:55:32.000Z | 2020-10-11T08:55:32.000Z | #!/usr/bin/env python
from datetime import datetime
import os
import hashlib
import sys
import time
import threading
import string
import random
import base64
import urllib.request
import urllib.parse
try:
import requests
except ImportError:
print('[!] Error: some dependencies are not installed')
print('Ty... | 56.410138 | 2,211 | 0.611143 |
4a18f54bb8d2db5ae4294422029b6b66a0b1b488 | 1,623 | py | Python | api.py | Demojh8/airnow | fce5fa150bb5e6f460dd91da70ca46edbd9c66ee | [
"MIT"
] | null | null | null | api.py | Demojh8/airnow | fce5fa150bb5e6f460dd91da70ca46edbd9c66ee | [
"MIT"
] | null | null | null | api.py | Demojh8/airnow | fce5fa150bb5e6f460dd91da70ca46edbd9c66ee | [
"MIT"
] | null | null | null | import urllib2
import json
import datetime
class ApiBase:
def _makeRequest(self, url):
request = urllib2.Request(url)
opener = urllib2.build_opener()
response = opener.open(request)
responseStatusCode = response.getcode()
return response, responseStatusCode
... | 32.46 | 181 | 0.643869 |
4a18f746ee4fc2cb6de4e7ff6c365873a85b2726 | 26,833 | py | Python | conda_build/source.py | gabm/conda-build | 6720ae109a5d08737786d950687b9fdc48c05e16 | [
"BSD-3-Clause"
] | null | null | null | conda_build/source.py | gabm/conda-build | 6720ae109a5d08737786d950687b9fdc48c05e16 | [
"BSD-3-Clause"
] | null | null | null | conda_build/source.py | gabm/conda-build | 6720ae109a5d08737786d950687b9fdc48c05e16 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, print_function
import io
import locale
import os
from os.path import join, isdir, isfile, abspath, basename, exists, normpath, expanduser
import re
import shutil
from subprocess import CalledProcessError
import sys
import time
from .conda_interface import download, Te... | 41.60155 | 100 | 0.595051 |
4a18f78736b84b0454cdb59a1321f03b0af27ae4 | 633 | py | Python | scripts/make_html.py | dannguyen/smalldata | 73db5892e0cf6ae1e338c343b2f1b0c3d1c131b3 | [
"MIT"
] | 4 | 2016-10-23T00:37:02.000Z | 2021-02-28T03:59:16.000Z | scripts/make_html.py | dannguyen/smalldata | 73db5892e0cf6ae1e338c343b2f1b0c3d1c131b3 | [
"MIT"
] | null | null | null | scripts/make_html.py | dannguyen/smalldata | 73db5892e0cf6ae1e338c343b2f1b0c3d1c131b3 | [
"MIT"
] | 1 | 2020-04-28T06:31:58.000Z | 2020-04-28T06:31:58.000Z | import argparse
from csv import DictReader
from pathlib import Path
from sys import stdout, stderr
from settings import create_dataset_object,\
dataset_template
import yaml
if __name__ == '__main__':
parser = argparse.ArgumentParser("Print out a HTML version of dataset YAML file")
parser.... | 33.315789 | 85 | 0.71564 |
4a18f859f60cd8803a596c795d038c3335799e66 | 4,353 | py | Python | rapidtide/wiener.py | bbfrederick/rapidtide | ddd1899a93fafd550feb134debdd028bbba8c853 | [
"Apache-2.0"
] | 44 | 2017-01-19T10:12:39.000Z | 2022-02-08T05:43:58.000Z | rapidtide/wiener.py | bbfrederick/delaytools | 190d79ae4c19317dfce38a528e43fd05459f29a5 | [
"Apache-2.0"
] | 70 | 2018-05-02T14:35:45.000Z | 2022-03-18T17:43:33.000Z | rapidtide/wiener.py | bbfrederick/delaytools | 190d79ae4c19317dfce38a528e43fd05459f29a5 | [
"Apache-2.0"
] | 12 | 2019-02-12T20:40:27.000Z | 2021-06-16T13:28:21.000Z | #!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Copyright 2016-2021 Blaise Frederick
#
# 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/LICEN... | 31.092857 | 92 | 0.526074 |
4a18f8f40f820f78081d0a7c9d8d5715d3343689 | 2,023 | py | Python | rmis_integration/management/commands/rmis_get_mkb.py | Wellheor1/l2 | d980210921c545c68fe9d5522bb693d567995024 | [
"MIT"
] | 10 | 2018-03-14T06:17:06.000Z | 2022-03-10T05:33:34.000Z | rmis_integration/management/commands/rmis_get_mkb.py | Wellheor1/l2 | d980210921c545c68fe9d5522bb693d567995024 | [
"MIT"
] | 512 | 2018-09-10T07:37:34.000Z | 2022-03-30T02:23:43.000Z | rmis_integration/management/commands/rmis_get_mkb.py | D00dleman/l2 | 0870144537ee340cd8db053a608d731e186f02fb | [
"MIT"
] | 24 | 2018-07-31T05:52:12.000Z | 2022-02-08T00:39:41.000Z | from django.core.management import BaseCommand
from rmis_integration.client import Client as RC
from directions.models import Diagnoses
class Command(BaseCommand):
help = "Получение справочника МКБ"
def handle(self, *args, **options):
c = RC()
request_data = {
"refbookCode": "1.2... | 39.666667 | 109 | 0.454276 |
4a18f9fa4aef8e90594cb8be86006b39b98d6633 | 6,902 | py | Python | pypy/module/micronumpy/test/test_object_arrays.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | pypy/module/micronumpy/test/test_object_arrays.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | pypy/module/micronumpy/test/test_object_arrays.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | from pypy.module.micronumpy.test.test_base import BaseNumpyAppTest
from pypy.conftest import option
class AppTestObjectDtypes(BaseNumpyAppTest):
spaceconfig = dict(usemodules=["micronumpy", "struct", "binascii"])
def setup_class(cls):
BaseNumpyAppTest.setup_class.im_func(cls)
cls.w_runappdire... | 32.102326 | 90 | 0.526079 |
4a18f9fdd13e11f7657149b004abedeff2767615 | 7,991 | py | Python | Youtube/youtube.py | rishabhjainfinal/selenium-automations | 3928e8d1722eb7e8339e782b95c160604d181117 | [
"MIT"
] | null | null | null | Youtube/youtube.py | rishabhjainfinal/selenium-automations | 3928e8d1722eb7e8339e782b95c160604d181117 | [
"MIT"
] | 1 | 2021-03-21T21:04:07.000Z | 2021-03-21T21:04:07.000Z | Youtube/youtube.py | rishabhjainfinal/selenium-automations | 3928e8d1722eb7e8339e782b95c160604d181117 | [
"MIT"
] | 2 | 2021-03-21T20:54:04.000Z | 2021-03-21T22:52:15.000Z | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
import os
class youtube:
"""This module is use for automation of youtube threw sekenium webdriver
this module is only for youtube
for this module you need latest webdriver in same directory as progarm
just ch... | 28.744604 | 369 | 0.650732 |
4a18fa450d5b391cafa7409532cf18b7eb13ab69 | 1,116 | py | Python | model-optimizer/extensions/back/ParameterToPlaceholder.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 3 | 2020-02-09T23:25:37.000Z | 2021-01-19T09:44:12.000Z | model-optimizer/extensions/back/ParameterToPlaceholder.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/back/ParameterToPlaceholder.py | zhoub/dldt | e42c01cf6e1d3aefa55e2c5df91f1054daddc575 | [
"Apache-2.0"
] | 2 | 2020-04-18T16:24:39.000Z | 2021-01-19T09:42:19.000Z | """
Copyright (c) 2019 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 wri... | 31.885714 | 96 | 0.701613 |
4a18facd538f03698c2f07a9682cda569b9d2b55 | 397 | py | Python | Using_Database_in_Python/Transaction_timing/11_tzcheck.py | ajeyln/python_scripts_udemy | 387a027170207a12daf16c25a9592adb27e45870 | [
"MIT"
] | null | null | null | Using_Database_in_Python/Transaction_timing/11_tzcheck.py | ajeyln/python_scripts_udemy | 387a027170207a12daf16c25a9592adb27e45870 | [
"MIT"
] | null | null | null | Using_Database_in_Python/Transaction_timing/11_tzcheck.py | ajeyln/python_scripts_udemy | 387a027170207a12daf16c25a9592adb27e45870 | [
"MIT"
] | null | null | null | import sqlite3
import pytz
import pickle
db = sqlite3.connect("accounts.sqlite",detect_types=sqlite3.PARSE_DECLTYPES)
for row in db.execute("SELECT * FROM history"):
utc_time = row[0]
picked_zone = row[3]
zone = pickle.load(picked_zone)
local_time = pytz.utc.localize(utc_time).astimezone(zone)
pr... | 30.538462 | 77 | 0.720403 |
4a18fd621151a9b74a54a2f22ff515ada00b135a | 23,568 | py | Python | graphqa/netquery/decoders.py | gengchenmai/se-kge | 0e5a630a8403d4c7965de0f71e2e22b95f7be7bd | [
"Apache-2.0"
] | 9 | 2020-06-17T06:16:55.000Z | 2021-11-18T10:35:15.000Z | graphqa/netquery/decoders.py | gengchenmai/se-kge | 0e5a630a8403d4c7965de0f71e2e22b95f7be7bd | [
"Apache-2.0"
] | 1 | 2020-08-12T15:18:52.000Z | 2020-08-13T01:06:36.000Z | graphqa/netquery/decoders.py | gengchenmai/se-kge | 0e5a630a8403d4c7965de0f71e2e22b95f7be7bd | [
"Apache-2.0"
] | 3 | 2020-08-27T23:53:35.000Z | 2021-06-29T06:33:31.000Z | import torch
import torch.nn as nn
from torch.nn import init
import numpy as np
import torch.nn.functional as F
"""
A set of decoder modules.
Each decoder takes pairs of embeddings and predicts relationship scores given these embeddings.
"""
"""
*Edge decoders*
For all edge decoders, the forward method returns a sim... | 38.891089 | 133 | 0.602979 |
4a18fd9aee6a0653298bf1b3cd3b8a1f26888283 | 4,233 | py | Python | force_translate/models/mrp_abstract_workorder.py | xpheragroup/FJAgosto21 | aad1ba8104a6ea1dfcc39fc250897465872ea930 | [
"MIT"
] | null | null | null | force_translate/models/mrp_abstract_workorder.py | xpheragroup/FJAgosto21 | aad1ba8104a6ea1dfcc39fc250897465872ea930 | [
"MIT"
] | null | null | null | force_translate/models/mrp_abstract_workorder.py | xpheragroup/FJAgosto21 | aad1ba8104a6ea1dfcc39fc250897465872ea930 | [
"MIT"
] | null | null | null | from collections import defaultdict
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools import float_compare, float_round, float_is_zero
# This module only changes string to force translate
# The original definition is done in mrp/models/mrp_abstract_workorder.py !
class Mr... | 47.033333 | 160 | 0.626034 |
4a18fe8dcc40336b560ccd20ce45bc39ad9f3dd6 | 2,190 | py | Python | final_project/neural_net/net_model_resnet.py | jrkwon/ce491-2019 | 25e66157b03f123abcfdda294f36d47a0bc12273 | [
"CC0-1.0"
] | null | null | null | final_project/neural_net/net_model_resnet.py | jrkwon/ce491-2019 | 25e66157b03f123abcfdda294f36d47a0bc12273 | [
"CC0-1.0"
] | null | null | null | final_project/neural_net/net_model_resnet.py | jrkwon/ce491-2019 | 25e66157b03f123abcfdda294f36d47a0bc12273 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Feb 28 2019 4:57 pm
@author: doshininad
"""
from keras.applications.resnet50 import ResNet50
from keras.preprocessing import image
from keras.models import Model
from keras.layers import Dense
from keras import losses, optimizers
from config import Con... | 33.692308 | 98 | 0.643836 |
4a18feb6e018958c4d785115e75d178c2c1b9ef1 | 14,968 | py | Python | tests/test_context.py | danjac/django-components | bb3193cd4c66feb6636a4357c40e677b162d4f02 | [
"MIT"
] | null | null | null | tests/test_context.py | danjac/django-components | bb3193cd4c66feb6636a4357c40e677b162d4f02 | [
"MIT"
] | null | null | null | tests/test_context.py | danjac/django-components | bb3193cd4c66feb6636a4357c40e677b162d4f02 | [
"MIT"
] | null | null | null | from django.template import Context, Template
from django_components import component
from .django_test_setup import * # NOQA
from .testutils import Django111CompatibleSimpleTestCase as SimpleTestCase
class SimpleComponent(component.Component):
def context(self, variable=None):
return {"variable": vari... | 51.972222 | 119 | 0.661745 |
4a18ffa1106fb1bf2476d83c2d9fd8b253cb2255 | 1,332 | py | Python | py/trash/921_mean_0218-1.py | KazukiOnodera/Microsoft-Malware-Prediction | 103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80 | [
"MIT"
] | 24 | 2019-03-14T05:03:16.000Z | 2021-07-16T05:14:05.000Z | py/trash/921_mean_0218-1.py | xwc940512/Microsoft-Malware-Prediction | 103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80 | [
"MIT"
] | 1 | 2019-05-20T10:06:33.000Z | 2019-05-20T10:06:33.000Z | py/trash/921_mean_0218-1.py | xwc940512/Microsoft-Malware-Prediction | 103cbf7c4fc98ae584e1aa9d1c220bb79ddbbd80 | [
"MIT"
] | 8 | 2019-03-14T06:28:38.000Z | 2019-05-21T14:58:21.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 15 18:10:36 2019
@author: kazuki.onodera
"""
import numpy as np
import pandas as pd
from glob import glob
import utils
SUBMIT_FILE_PATH = '../output/0218-1.csv.gz'
COMMENT = 'nejumi + f002'
EXE_SUBMIT = True
# =================================... | 25.132075 | 96 | 0.535285 |
4a1900a123262453571877fe8a9ed5fb36bfd53a | 458 | py | Python | book/src/ch10/service/libs/web/setup.py | zangyuchen2008/Clean-Code-in-Python-Second-Edition | 0be2e41f6cf7322e12ec55d76135ff398df61b4a | [
"MIT"
] | 133 | 2016-07-22T15:16:16.000Z | 2022-03-29T22:39:40.000Z | book/src/ch10/service/libs/web/setup.py | zangyuchen2008/Clean-Code-in-Python-Second-Edition | 0be2e41f6cf7322e12ec55d76135ff398df61b4a | [
"MIT"
] | 137 | 2021-01-05T11:21:04.000Z | 2022-03-31T11:10:11.000Z | book/src/ch10/service/libs/web/setup.py | zangyuchen2008/Clean-Code-in-Python-Second-Edition | 0be2e41f6cf7322e12ec55d76135ff398df61b4a | [
"MIT"
] | 41 | 2020-12-29T04:46:14.000Z | 2022-03-20T22:36:17.000Z | from setuptools import find_packages, setup
with open("README.rst", "r") as longdesc:
long_description = longdesc.read()
install_requires = ["sanic>=20,<21"]
setup(
name="web",
description="Library with helpers for the web-related functionality",
long_description=long_description,
author="Dev te... | 24.105263 | 73 | 0.696507 |
4a1900d53f28c261a6f05504ebe12b3b681588ed | 7,395 | py | Python | applications/app1/venv/lib/python2.7/site-packages/gluon/storage.py | link-money-dev/link-api-web-service | 3da226c7115ee4267f8346620029b710b9987e74 | [
"BSD-3-Clause"
] | null | null | null | applications/app1/venv/lib/python2.7/site-packages/gluon/storage.py | link-money-dev/link-api-web-service | 3da226c7115ee4267f8346620029b710b9987e74 | [
"BSD-3-Clause"
] | 1 | 2021-06-01T22:32:25.000Z | 2021-06-01T22:32:25.000Z | applications/app1/venv/lib/python2.7/site-packages/gluon/storage.py | link-money-dev/link-api-web-service | 3da226c7115ee4267f8346620029b710b9987e74 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Provides:
- List; like list but returns None instead of IndexOutOfBounds
- Storage; like dictionary allowi... | 27.490706 | 125 | 0.553212 |
4a1903ef21b5ca9c0058b5e328575015cc65a16b | 54,447 | bzl | Python | tools/build_variables.bzl | gmagogsfm/pytorch-1 | 88032d894311e5c0aed8bbc21a4306bc6be4af82 | [
"Intel"
] | 1 | 2019-11-20T08:10:31.000Z | 2019-11-20T08:10:31.000Z | tools/build_variables.bzl | goncaloperes/pytorch | 4a128ed811324b7a8d6cdd9bba16d9aeaac9cf86 | [
"Intel"
] | null | null | null | tools/build_variables.bzl | goncaloperes/pytorch | 4a128ed811324b7a8d6cdd9bba16d9aeaac9cf86 | [
"Intel"
] | null | null | null | # In both open-source and fbcode builds, these are generated into
# torch/csrc/{autgrad,jit}/generated.i
GENERATED_CPP = [
"autograd/generated/Functions.cpp",
"autograd/generated/VariableType_0.cpp",
"autograd/generated/VariableType_1.cpp",
"autograd/generated/VariableType_2.cpp",
"autograd/generate... | 47.099481 | 134 | 0.738608 |
4a1904463fbf8aed011d6c5d888f477e501d06b0 | 2,011 | py | Python | tests/test_mate_tool_box_stateless.py | MacHu-GWU/pathlib_mate-project | 5b8f5441e681730d02209211cce7f46986147418 | [
"MIT"
] | 9 | 2017-09-07T21:21:43.000Z | 2020-10-11T09:47:24.000Z | tests/test_mate_tool_box_stateless.py | MacHu-GWU/pathlib_mate-project | 5b8f5441e681730d02209211cce7f46986147418 | [
"MIT"
] | 2 | 2018-10-16T14:30:26.000Z | 2020-12-05T02:40:46.000Z | tests/test_mate_tool_box_stateless.py | MacHu-GWU/pathlib_mate-project | 5b8f5441e681730d02209211cce7f46986147418 | [
"MIT"
] | 2 | 2017-09-05T14:06:01.000Z | 2021-06-29T15:31:13.000Z | # -*- coding: utf-8 -*-
import pytest
from pytest import raises
from pathlib_mate.pathlib2 import Path
class TestToolBoxStateless(object):
def test_dir_fingerprint(self):
p = Path(Path(__file__).dirpath)
assert p.dir_md5 == p.dir_md5
assert p.dir_sha256 == p.dir_sha256
assert p.di... | 28.323944 | 79 | 0.606663 |
4a19046c82885ac3bedad4c34dc99c2befbadb4b | 8,128 | py | Python | clmm/cosmology/parent_class.py | LSSTDESC/CLMM | 7922ad984a297393d57b3f89ed708fec18e04e3a | [
"BSD-3-Clause"
] | 20 | 2018-02-23T22:28:39.000Z | 2022-03-24T07:03:47.000Z | clmm/cosmology/parent_class.py | LSSTDESC/CLMM | 7922ad984a297393d57b3f89ed708fec18e04e3a | [
"BSD-3-Clause"
] | 446 | 2018-06-01T17:43:41.000Z | 2022-03-31T13:29:23.000Z | clmm/cosmology/parent_class.py | LSSTDESC/CLMM | 7922ad984a297393d57b3f89ed708fec18e04e3a | [
"BSD-3-Clause"
] | 20 | 2019-01-18T08:16:11.000Z | 2022-03-29T05:27:00.000Z | """@file parent_class.py
"""
# CLMM Cosmology object abstract superclass
import numpy as np
class CLMMCosmology:
"""
Cosmology object superclass for supporting multiple back-end cosmology objects
Attributes
----------
backend: str
Name of back-end used
be_cosmo: cosmology library
... | 28.222222 | 99 | 0.537156 |
4a190474fa5033567b41ff69bb8aa80a9f02ee4d | 1,223 | pyw | Python | Dino_Hack/Dino.pyw | SoumadeepChoudhury/Projects | d68f2c289e047fadfb077c51485474b33a7e1498 | [
"MIT"
] | 1 | 2021-10-05T03:03:19.000Z | 2021-10-05T03:03:19.000Z | Dino_Hack/Dino.pyw | SoumadeepChoudhury/Projects | d68f2c289e047fadfb077c51485474b33a7e1498 | [
"MIT"
] | null | null | null | Dino_Hack/Dino.pyw | SoumadeepChoudhury/Projects | d68f2c289e047fadfb077c51485474b33a7e1498 | [
"MIT"
] | null | null | null | import pyautogui
from PIL import Image, ImageGrab
import time
def hit(key):
pyautogui.keyDown(key)
# LIGHT
def isCollide(data):
# Check for birds
#for i in range(200, 250):
# for j in range(355, 370):
# if data[i, j] < 171:
# hit("down")
... | 21.086207 | 50 | 0.464432 |
4a1905357b6c4c0668900a89a5f97c9ed4e93740 | 928 | py | Python | nonebot_plugin_heybox/__init__.py | SimonHurricane5/nonebot_plugin_heybox | 6c2b68bc35b0ae3908565ce9483fe622276dfd5c | [
"MIT"
] | 1 | 2022-02-16T04:57:48.000Z | 2022-02-16T04:57:48.000Z | nonebot_plugin_heybox/__init__.py | SimonHurricane5/nonebot_plugin_heybox | 6c2b68bc35b0ae3908565ce9483fe622276dfd5c | [
"MIT"
] | null | null | null | nonebot_plugin_heybox/__init__.py | SimonHurricane5/nonebot_plugin_heybox | 6c2b68bc35b0ae3908565ce9483fe622276dfd5c | [
"MIT"
] | null | null | null | from nonebot.params import State, CommandArg
from nonebot import on_command, on_regex, on_keyword
from nonebot.adapters.onebot.v11 import Bot, MessageEvent, GROUP, MessageSegment, Event, Message, GroupMessageEvent
from .heybox_crawler import *
heybox_search = on_command("小黑盒搜",aliases={"查游戏","查史低"}, priority=46, ... | 38.666667 | 116 | 0.724138 |
4a190584f5f6769566df3c0c772785776f28fd7d | 59 | py | Python | web/mysql_config.py | semodi/arxiv_app | e33e8e1eae96e25cf41d4169dca82d88615e5d08 | [
"BSD-3-Clause"
] | 1 | 2022-02-08T19:55:19.000Z | 2022-02-08T19:55:19.000Z | web/mysql_config.py | semodi/paper-scraper | e33e8e1eae96e25cf41d4169dca82d88615e5d08 | [
"BSD-3-Clause"
] | null | null | null | web/mysql_config.py | semodi/paper-scraper | e33e8e1eae96e25cf41d4169dca82d88615e5d08 | [
"BSD-3-Clause"
] | null | null | null | host = 'db'
name = 'root'
password ='mypassword'
port=3306
| 11.8 | 22 | 0.677966 |
4a1906b7ca79a64ceba13d19eb3154baf24b2a37 | 1,469 | py | Python | test/test_modify_contact.py | kochetov-a/python_training | 20cb104dea8b743c576b8c02a4dedc13679ff384 | [
"Apache-2.0"
] | null | null | null | test/test_modify_contact.py | kochetov-a/python_training | 20cb104dea8b743c576b8c02a4dedc13679ff384 | [
"Apache-2.0"
] | null | null | null | test/test_modify_contact.py | kochetov-a/python_training | 20cb104dea8b743c576b8c02a4dedc13679ff384 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.contact import Contact
from random import *
# Модификация случайного контакта из списка
def test_modify_contact_by_index(app, db, check_ui):
if len(db.get_contact_list()) == 0: # Получаем из БД список контактов
app.contact.create(Contact(first_name="Contact Test", last... | 66.772727 | 132 | 0.761743 |
4a19088e1e283d70a5d48f36ef4b1606eb035051 | 6,997 | py | Python | unittests/test_dataset_creation/test_image_transformations/test_patching.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | 1 | 2022-01-25T09:49:45.000Z | 2022-01-25T09:49:45.000Z | unittests/test_dataset_creation/test_image_transformations/test_patching.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | null | null | null | unittests/test_dataset_creation/test_image_transformations/test_patching.py | imsb-uke/ecarenet | ffbf24e740d9154312d02b9f775816ed4b3d4691 | [
"MIT"
] | null | null | null | import unittest
from matplotlib import pyplot as plt
import tensorflow as tf
import os
import numpy as np
from dataset_creation.image_transformations.patching import create_patches, advanced_patching, tf_create_patches
from unittests.unittest_helpers import create_image_label_dataset
class TestPatching(unittest.TestC... | 46.646667 | 123 | 0.556381 |
4a190a29935ae4dfc42e4f51ec71fa881f9b2dbc | 3,809 | py | Python | mitzasql/ui/widgets/command_edit.py | vladbalmos/mitzasql | 06c2a96eb4494095b2b72bc1454199a4940b0700 | [
"MIT"
] | 69 | 2019-05-16T06:40:18.000Z | 2022-03-24T06:23:49.000Z | mitzasql/ui/widgets/command_edit.py | vladbalmos/mitzasql | 06c2a96eb4494095b2b72bc1454199a4940b0700 | [
"MIT"
] | 36 | 2019-05-15T19:55:24.000Z | 2021-07-22T07:07:14.000Z | mitzasql/ui/widgets/command_edit.py | vladbalmos/mitzasql | 06c2a96eb4494095b2b72bc1454199a4940b0700 | [
"MIT"
] | 8 | 2019-05-16T06:56:28.000Z | 2022-02-11T02:24:12.000Z | # Copyright (c) 2021 Vlad Balmos <vladbalmos@yahoo.com>
# Author: Vlad Balmos <vladbalmos@yahoo.com>
# See LICENSE file
import urwid
from .emacs_edit import EmacsEdit
class CommandEdit(EmacsEdit):
'''Implement a basic VIM style command edit widget'''
SIGNAL_CANCEL = 'cancel_edit'
def __init__(self, comm... | 29.3 | 78 | 0.559727 |
4a190abb645c728c3829bbce7802b6d0e783cb31 | 241 | py | Python | abc062/a.py | y-sira/atcoder | 479cb8d219ba812c2b8dc7dcbe8f6241ec3c12a3 | [
"MIT"
] | null | null | null | abc062/a.py | y-sira/atcoder | 479cb8d219ba812c2b8dc7dcbe8f6241ec3c12a3 | [
"MIT"
] | null | null | null | abc062/a.py | y-sira/atcoder | 479cb8d219ba812c2b8dc7dcbe8f6241ec3c12a3 | [
"MIT"
] | null | null | null | x, y = map(int, input().split())
g1 = [1, 3, 5, 7, 8, 10, 12]
g2 = [4, 6, 9, 11]
g3 = [2]
if x in g1 and y in g1:
print('Yes')
elif x in g2 and y in g2:
print('Yes')
elif x in g3 and y in g3:
print('Yes')
else:
print('No')
| 16.066667 | 32 | 0.510373 |
4a190b1f2e75dc5aa77aeebd0e28d4ebe889d837 | 6,593 | py | Python | notification/views.py | Toflex/notification | eb0700d00543fea38f97daa264dc146885192a54 | [
"MIT"
] | null | null | null | notification/views.py | Toflex/notification | eb0700d00543fea38f97daa264dc146885192a54 | [
"MIT"
] | null | null | null | notification/views.py | Toflex/notification | eb0700d00543fea38f97daa264dc146885192a54 | [
"MIT"
] | null | null | null | from django.urls import reverse
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect, Http404, HttpResponse
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
try:
from django.contrib.syndication.views import feed
except... | 32.477833 | 89 | 0.637494 |
4a190cb92b155424e1843fc135310b7e6dfb507b | 243 | py | Python | examples/M1/M1_run.py | pabloabur/netpyne | 7763d835eb89b9c3c1d0b49489e215ceaceafd82 | [
"MIT"
] | 1 | 2018-01-23T00:05:57.000Z | 2018-01-23T00:05:57.000Z | examples/M1/M1_run.py | pabloabur/netpyne | 7763d835eb89b9c3c1d0b49489e215ceaceafd82 | [
"MIT"
] | 2 | 2019-11-05T00:05:56.000Z | 2019-11-18T00:16:24.000Z | examples/M1/M1_run.py | pabloabur/netpyne | 7763d835eb89b9c3c1d0b49489e215ceaceafd82 | [
"MIT"
] | null | null | null | import M1 # import parameters file
from netpyne import sim # import netpyne init module
sim.createSimulateAnalyze(netParams = M1.netParams, simConfig = M1.simConfig) # create and simulate network
# check model output
sim.checkOutput('M1') | 34.714286 | 108 | 0.786008 |
4a190ceb2abc6d3a9a389aac05e2488fd853f58a | 1,578 | py | Python | app/routes.py | joasepul/steganographic_app | 83ae1821110971b6aa815fea465f3ddf1e717e47 | [
"MIT"
] | null | null | null | app/routes.py | joasepul/steganographic_app | 83ae1821110971b6aa815fea465f3ddf1e717e47 | [
"MIT"
] | null | null | null | app/routes.py | joasepul/steganographic_app | 83ae1821110971b6aa815fea465f3ddf1e717e47 | [
"MIT"
] | null | null | null | from app import app
import os
from flask import render_template
from flask import Flask, request, redirect, send_from_directory
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = './app/templates/'
ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'])
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDE... | 34.304348 | 74 | 0.624842 |
4a190d47f994819d273f7d41b14b11c48338d3bb | 2,452 | py | Python | examples/reading_comprehension/model.py | span11UR/Debias-QA | 5214cd138ac73696a836dc0b1276e611b29e0e5a | [
"Apache-2.0"
] | 3 | 2021-04-13T08:12:50.000Z | 2021-12-12T04:30:24.000Z | examples/reading_comprehension/model.py | SeanXiaoyuSun/LUKE-QA-bias-analysis | 5214cd138ac73696a836dc0b1276e611b29e0e5a | [
"Apache-2.0"
] | null | null | null | examples/reading_comprehension/model.py | SeanXiaoyuSun/LUKE-QA-bias-analysis | 5214cd138ac73696a836dc0b1276e611b29e0e5a | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
import torch
from torch.nn import CrossEntropyLoss
from luke.model import LukeEntityAwareAttentionModel
from examples.debias_model.config import BertConfig
from ..debias_model.model import BertModel
class LukeForReadingComprehension(LukeEntityAwareAttentionModel):
def __init__(self, args):
... | 36.058824 | 93 | 0.65783 |
4a190ee6746dbfc8f8fbb8eeb402d5cf78f56a70 | 10,646 | py | Python | openmdao/drivers/doe_driver.py | bollwyvl/OpenMDAO | 4d7a31b2bb39674e2be0d6a13cbe22de3f5353af | [
"Apache-2.0"
] | null | null | null | openmdao/drivers/doe_driver.py | bollwyvl/OpenMDAO | 4d7a31b2bb39674e2be0d6a13cbe22de3f5353af | [
"Apache-2.0"
] | null | null | null | openmdao/drivers/doe_driver.py | bollwyvl/OpenMDAO | 4d7a31b2bb39674e2be0d6a13cbe22de3f5353af | [
"Apache-2.0"
] | 1 | 2018-07-27T06:39:15.000Z | 2018-07-27T06:39:15.000Z | """
Design-of-Experiments Driver.
"""
from __future__ import print_function
import traceback
import inspect
from openmdao.core.driver import Driver, RecordingDebugging
from openmdao.core.analysis_error import AnalysisError
from openmdao.drivers.doe_generators import DOEGenerator, ListGenerator
from openmdao.utils.mp... | 32.358663 | 99 | 0.558614 |
4a190f5c63f3bcbe6d90f33ace5a24b2da63fcf5 | 3,481 | py | Python | pyqode/core/_forms/pnl_encoding_ui.py | SunChuquin/pyqode.core | edf29204446e3679701e74343288cf692eb07d86 | [
"MIT"
] | 42 | 2018-05-02T07:07:27.000Z | 2022-02-01T19:49:49.000Z | pyqode/core/_forms/pnl_encoding_ui.py | SunChuquin/pyqode.core | edf29204446e3679701e74343288cf692eb07d86 | [
"MIT"
] | 65 | 2018-03-08T11:53:13.000Z | 2018-09-17T09:00:09.000Z | Lib/site-packages/pyqode/core/_forms/pnl_encoding_ui.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 24 | 2015-01-09T14:16:41.000Z | 2021-12-06T15:11:22.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/colin/dev/pyQode/pyqode.core/forms/pnl_encoding.ui'
#
# Created by: PyQt5 UI code generator 5.5.1
#
# WARNING! All changes made in this file will be lost!
from pyqode.qt import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def ... | 52.742424 | 348 | 0.731399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.