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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
89b9ee8def45b21622ac6cc34ae9489060de99f7 | 873 | py | Python | library_collection/migrations/0010_auto_20181009_1634.py | amywieliczka/avram | 1956130fcde464acf3ed00432a597dd857647e91 | [
"Unlicense"
] | null | null | null | library_collection/migrations/0010_auto_20181009_1634.py | amywieliczka/avram | 1956130fcde464acf3ed00432a597dd857647e91 | [
"Unlicense"
] | 5 | 2015-02-17T18:53:27.000Z | 2020-12-09T22:36:41.000Z | library_collection/migrations/0010_auto_20181009_1634.py | amywieliczka/avram | 1956130fcde464acf3ed00432a597dd857647e91 | [
"Unlicense"
] | 1 | 2022-02-25T15:22:40.000Z | 2022-02-25T15:22:40.000Z | # -*- coding: utf-8 -*-
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('library_collection', '0009_collection_merritt_extra_data'),
]
operations = [
migrations.AlterField(
model_name='collection',
name='harvest_ty... | 48.5 | 530 | 0.605956 |
d0e38610b448d52d0787ffad0a507171eda7002e | 321 | py | Python | script_runner.py | eferrares/codeinquero | cb8302e5a8b80e7c2948ff074761b45f1f4d551b | [
"BSD-3-Clause"
] | 1 | 2019-04-24T20:20:53.000Z | 2019-04-24T20:20:53.000Z | script_runner.py | eferrares/codeinquero | cb8302e5a8b80e7c2948ff074761b45f1f4d551b | [
"BSD-3-Clause"
] | null | null | null | script_runner.py | eferrares/codeinquero | cb8302e5a8b80e7c2948ff074761b45f1f4d551b | [
"BSD-3-Clause"
] | null | null | null | import os, sys
import django
import codeinquero.settings
from importlib.machinery import SourceFileLoader
os.environ.setdefault(
"DJANGO_SETTINGS_MODULE",
"codeinquero.settings"
)
django.setup()
if __name__ == '__main__':
script = SourceFileLoader('script', sys.argv[1]).load_module()
script.execute()... | 20.0625 | 66 | 0.750779 |
2d3a692da49373e4145b67c50f5cb35c22ff341c | 5,255 | py | Python | yellowbrick/style/colors.py | xingularity/yellowbrick | d13065786b25323558c493222d39b67f6b5243d9 | [
"Apache-2.0"
] | 1 | 2019-04-02T12:47:10.000Z | 2019-04-02T12:47:10.000Z | yellowbrick/style/colors.py | xingularity/yellowbrick | d13065786b25323558c493222d39b67f6b5243d9 | [
"Apache-2.0"
] | null | null | null | yellowbrick/style/colors.py | xingularity/yellowbrick | d13065786b25323558c493222d39b67f6b5243d9 | [
"Apache-2.0"
] | null | null | null | # yellowbrick.colors
# Colors and color helpers brought in from a different library.
#
# Author: Benjamin Bengfort <bbengfort@districtdatalabs.com>
# Created: Fri Jun 24 17:02:53 2016 -0400
#
# Copyright (C) 2016 District Data Labs
# For license information, see LICENSE.txt
#
# ID: colors.py [c6aff34] benjamin@bengf... | 30.375723 | 77 | 0.597526 |
9ac5a4c762adac8ea9383671837b4fa7bedcfb42 | 406 | py | Python | examples/binance/simple_binance_order.py | economicnetwork/archon | 2090d0568f198e08c0c6f0ae535ab06630e1db9b | [
"MIT"
] | 78 | 2018-09-20T12:50:42.000Z | 2021-12-17T11:44:03.000Z | examples/binance/simple_binance_order.py | economicnetwork/archon | 2090d0568f198e08c0c6f0ae535ab06630e1db9b | [
"MIT"
] | 49 | 2018-11-18T16:58:27.000Z | 2019-09-29T18:41:51.000Z | examples/binance/simple_binance_order.py | economicnetwork/archon | 2090d0568f198e08c0c6f0ae535ab06630e1db9b | [
"MIT"
] | 21 | 2018-09-20T11:31:50.000Z | 2021-10-19T17:01:47.000Z | """
binance tickers
"""
import archon.broker.broker as broker
import archon.exchange.exchanges as exc
from archon.exchange.binance import Client as clt
import time
a = broker.Broker(setAuto=False)
a.set_keys_exchange_file(path_file_apikeys="C:/trading/archon/examples/binance/apikeys.toml")
client = a.afacade.get_clien... | 29 | 93 | 0.793103 |
891d7a3fb3bb825daf99e1e523eba46ae02b8b64 | 3,245 | py | Python | Tensile/Tests/unit/test_ReplacementKernels.py | msujon-AMD/Tensile | da34e4f61107a9a288ff61e7cf3127f26d242eb4 | [
"MIT"
] | null | null | null | Tensile/Tests/unit/test_ReplacementKernels.py | msujon-AMD/Tensile | da34e4f61107a9a288ff61e7cf3127f26d242eb4 | [
"MIT"
] | null | null | null | Tensile/Tests/unit/test_ReplacementKernels.py | msujon-AMD/Tensile | da34e4f61107a9a288ff61e7cf3127f26d242eb4 | [
"MIT"
] | null | null | null | ################################################################################
# Copyright 2020 Advanced Micro Devices, Inc. All rights reserved.
#
# 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 So... | 42.697368 | 414 | 0.731279 |
7f4778ba4d51a6029f69378a9477f7620def0c05 | 4,214 | py | Python | fireworks/utilities/update_collection.py | kmu/fireworks | c9920b0f9d5bde3854761a7c32c43fbf017a555b | [
"BSD-3-Clause-LBNL"
] | null | null | null | fireworks/utilities/update_collection.py | kmu/fireworks | c9920b0f9d5bde3854761a7c32c43fbf017a555b | [
"BSD-3-Clause-LBNL"
] | null | null | null | fireworks/utilities/update_collection.py | kmu/fireworks | c9920b0f9d5bde3854761a7c32c43fbf017a555b | [
"BSD-3-Clause-LBNL"
] | null | null | null | from bson.json_util import dumps, loads
from tqdm import tqdm
import datetime
__author__ = 'Alireza Faghaninia, Anubhav Jain'
__email__ = 'alireza.faghaninia@gmail.com, ajain@lbl.gov'
__date__ = 'Dec 08, 2016'
def update_launchpad_data(lp, replacements, **kwargs):
"""
If you want to update a text string in y... | 47.348315 | 120 | 0.694115 |
5a7a4217d57bc28e51b4337c00d137e5cb09d557 | 22,110 | py | Python | openstack_dashboard/dashboards/project/instances/views.py | soma-micro-service/Horizon | 45243061b8a99935e0e483a314d95a82d33cc4cf | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/project/instances/views.py | soma-micro-service/Horizon | 45243061b8a99935e0e483a314d95a82d33cc4cf | [
"Apache-2.0"
] | 12 | 2022-03-22T07:28:29.000Z | 2022-03-22T07:29:55.000Z | openstack_dashboard/dashboards/project/instances/views.py | puppetlabs-operations/horizon | 4f13234118e49f04043f7e3d663cf39868580212 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | 40.054348 | 79 | 0.622931 |
f46285e71744b277576f08a69762a2b9597e8d47 | 773 | py | Python | ros2topic/test/test_xmllint.py | sunbo57123/ros2cli_common_extension | 75d07113c1c029848aab70f3fcdd2ae23b0a99e1 | [
"Apache-2.0"
] | 90 | 2017-06-06T22:16:23.000Z | 2022-03-08T20:16:05.000Z | ros2topic/test/test_xmllint.py | sunbo57123/ros2cli_common_extension | 75d07113c1c029848aab70f3fcdd2ae23b0a99e1 | [
"Apache-2.0"
] | 586 | 2017-06-12T18:00:16.000Z | 2022-03-29T21:17:13.000Z | ros2topic/test/test_xmllint.py | sunbo57123/ros2cli_common_extension | 75d07113c1c029848aab70f3fcdd2ae23b0a99e1 | [
"Apache-2.0"
] | 108 | 2017-07-11T16:20:12.000Z | 2022-03-27T21:30:22.000Z | # Copyright 2019 Open Source Robotics Foundation, 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... | 32.208333 | 74 | 0.751617 |
797ed44ebda98a4bfd970626101c4ea9c4b9e480 | 430 | py | Python | cloud_on_the_fly/conftest.py | ultraNick/cloud_on_the_fly | 253ba1f65916aa7918102649f711b7db1a1680c8 | [
"Apache-1.1"
] | null | null | null | cloud_on_the_fly/conftest.py | ultraNick/cloud_on_the_fly | 253ba1f65916aa7918102649f711b7db1a1680c8 | [
"Apache-1.1"
] | null | null | null | cloud_on_the_fly/conftest.py | ultraNick/cloud_on_the_fly | 253ba1f65916aa7918102649f711b7db1a1680c8 | [
"Apache-1.1"
] | null | null | null | import pytest
from django.conf import settings
from django.test import RequestFactory
from cloud_on_the_fly.users.tests.factories import UserFactory
@pytest.fixture(autouse=True)
def media_storage(settings, tmpdir):
settings.MEDIA_ROOT = tmpdir.strpath
@pytest.fixture
def user() -> settings.AUTH_USER_MODEL:
... | 20.47619 | 62 | 0.790698 |
2580120bba50d8c942bd06113e8c3a7011bcd988 | 7,677 | py | Python | opt/tri.py | sauloalgolang/ibrowser | dcc8aa100c5ab2735ff8967447a1e040c26c0e3d | [
"MIT"
] | null | null | null | opt/tri.py | sauloalgolang/ibrowser | dcc8aa100c5ab2735ff8967447a1e040c26c0e3d | [
"MIT"
] | 10 | 2019-04-26T08:19:33.000Z | 2019-05-08T09:04:00.000Z | opt/tri.py | sauloalgolang/ibrowser | dcc8aa100c5ab2735ff8967447a1e040c26c0e3d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import math
"""
$ ./tri.py
dimension 8
[ 0, 0, 0][ 0, 1, 1][ 0, 2, 2][ 0, 3, 3][ 0, 4, 4][ 0, 5, 5][ 0, 6, 6][ 0, 7, 7]
[ 1, 0, 8][ 1, 1, 9][ 1, 2, 10][ 1, 3, 11][ 1, 4, 12][ 1, 5, 13][ 1, 6, 14][ 1, 7, 15]
[ 2, 0, 16][ 2, 1, 17][ 2, 2, 18][ 2, 3, 19][ 2, 4, 20][ ... | 58.603053 | 494 | 0.273414 |
beedaa376d8f92b9b740dba666cafa8db74a92d7 | 748 | py | Python | nao_gestures/publish_bvh_to_ros.py | TomKingsfordUoA/NaoGestures | ba1cfbb2a376c02ab7bb51264e7504d6bb255c28 | [
"MIT"
] | 1 | 2021-08-12T03:35:59.000Z | 2021-08-12T03:35:59.000Z | nao_gestures/publish_bvh_to_ros.py | TomKingsfordUoA/NaoGestures | ba1cfbb2a376c02ab7bb51264e7504d6bb255c28 | [
"MIT"
] | 1 | 2021-08-10T20:22:55.000Z | 2021-08-10T20:22:55.000Z | nao_gestures/publish_bvh_to_ros.py | TomKingsfordUoA/NaoGestures | ba1cfbb2a376c02ab7bb51264e7504d6bb255c28 | [
"MIT"
] | 1 | 2021-10-18T06:24:11.000Z | 2021-10-18T06:24:11.000Z | import argparse
import pickle
import json
import rospy
from std_msgs.msg import String
from nao_gestures import NaoBvhConverter
from nao_gestures.mocap_data_helpers import mocap_data_to_json
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--bvh_file', type=str, default='nao_gestures/demo... | 25.793103 | 98 | 0.748663 |
b88534b7d960b6573272ffb029c68e7bff0d6de4 | 40,237 | py | Python | openstack_dashboard/api/cinder.py | nicozhang/horizon | 49df5cffd84b6d9da4e5926afd12e0a92737d740 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/cinder.py | nicozhang/horizon | 49df5cffd84b6d9da4e5926afd12e0a92737d740 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/api/cinder.py | nicozhang/horizon | 49df5cffd84b6d9da4e5926afd12e0a92737d740 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 OpenStack Foundation
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit of eBay Inc.
#
# Licensed under the Apach... | 32.846531 | 79 | 0.668887 |
cf03b6123962751b194a19933ad93ba685208c76 | 43 | py | Python | Python_MiniGame_Fighter/venv/Lib/site-packages/pygame/tests/cdrom_tags.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | Python_MiniGame_Fighter/venv/Lib/site-packages/pygame/tests/cdrom_tags.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | Python_MiniGame_Fighter/venv/Lib/site-packages/pygame/tests/cdrom_tags.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | __tags__ = ["interactive", "SDL2_ignore"]
| 21.5 | 42 | 0.697674 |
b02305d490b6c297cf67e9f25420716d1191af79 | 17,335 | py | Python | tools/grit/grit/gather/tr_html_unittest.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | 1 | 2016-05-08T15:35:17.000Z | 2016-05-08T15:35:17.000Z | tools/grit/grit/gather/tr_html_unittest.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | null | null | null | tools/grit/grit/gather/tr_html_unittest.py | bluebellzhy/chromium | 008c4fef2676506869a0404239da31e83fd6ccc7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python2.4
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Unit tests for grit.gather.tr_html'''
import os
import sys
if __name__ == '__main__':
sys.path.append(os.path.join(os.pa... | 41.871981 | 103 | 0.617479 |
13bb0d59cd64c42a494b1cf5402164bcc9f65484 | 6,029 | py | Python | url_handlers/heatmap.py | dieterich-lab/medex | e76926f00555d1cc4410bff15f0cf85cedc9ad32 | [
"MIT"
] | 3 | 2019-09-10T09:40:54.000Z | 2022-03-30T15:58:26.000Z | url_handlers/heatmap.py | dieterich-lab/medex | e76926f00555d1cc4410bff15f0cf85cedc9ad32 | [
"MIT"
] | 16 | 2020-05-22T09:36:27.000Z | 2022-02-09T10:09:18.000Z | url_handlers/heatmap.py | dieterich-lab/medex | e76926f00555d1cc4410bff15f0cf85cedc9ad32 | [
"MIT"
] | null | null | null | from flask import Blueprint, render_template, request,session
import pandas as pd
from scipy.stats import pearsonr
import modules.load_data_postgre as ps
import plotly.graph_objects as go
import url_handlers.filtering as filtering
from webserver import rdb, all_measurement,measurement_name, block, df_min_max,data
hea... | 43.374101 | 120 | 0.581854 |
0dc091ac6c5e926bcd5e837a1f24863b75267322 | 3,213 | py | Python | tests/core/txs/test_TransactionValidateSlave.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | 1 | 2020-07-12T23:40:48.000Z | 2020-07-12T23:40:48.000Z | tests/core/txs/test_TransactionValidateSlave.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | tests/core/txs/test_TransactionValidateSlave.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | from unittest import TestCase
from mock import patch, Mock
from qrl.core.misc import logger
from qrl.core.AddressState import AddressState
from qrl.core.txs.MessageTransaction import MessageTransaction
from tests.misc.helper import get_alice_xmss, get_bob_xmss
logger.initialize_default()
@patch('qrl.core.txs.Trans... | 41.727273 | 110 | 0.693433 |
f64c699ed93125adc6db5f37f1a3b1c182f7c865 | 12,922 | py | Python | config/mujoco/args_cheetah_vel_rl2.py | MasterXiong/varibad | b51f9746ae1c93f992804c50192ee3079a0eccd4 | [
"MIT"
] | null | null | null | config/mujoco/args_cheetah_vel_rl2.py | MasterXiong/varibad | b51f9746ae1c93f992804c50192ee3079a0eccd4 | [
"MIT"
] | null | null | null | config/mujoco/args_cheetah_vel_rl2.py | MasterXiong/varibad | b51f9746ae1c93f992804c50192ee3079a0eccd4 | [
"MIT"
] | null | null | null | import argparse
from utils.helpers import boolean_argument
def get_args(rest_args):
parser = argparse.ArgumentParser()
# --- GENERAL ---
parser.add_argument('--vel_lower_bound', type=float, default=0., help='the lower bound of the velocity space')
parser.add_argument('--num_frames', type=int, defaul... | 69.848649 | 144 | 0.704071 |
bcfaadefd621f68f32830eea98203a8e144ac1f4 | 17,321 | py | Python | src/skmultiflow/prototype/robust_soft_learning_vector_quantization.py | imran-salim/scikit-multiflow | 05cf9dc095744b2990da326f0172fbab2c7e026f | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/prototype/robust_soft_learning_vector_quantization.py | imran-salim/scikit-multiflow | 05cf9dc095744b2990da326f0172fbab2c7e026f | [
"BSD-3-Clause"
] | null | null | null | src/skmultiflow/prototype/robust_soft_learning_vector_quantization.py | imran-salim/scikit-multiflow | 05cf9dc095744b2990da326f0172fbab2c7e026f | [
"BSD-3-Clause"
] | null | null | null | import math
import numpy as np
from sklearn.utils import validation
from sklearn.metrics import euclidean_distances
from sklearn.utils.multiclass import unique_labels
from skmultiflow.core.base import ClassifierMixin, BaseSKMObject
class RobustSoftLearningVectorQuantization(ClassifierMixin, BaseSKMObject):
"""Rob... | 42.55774 | 112 | 0.557762 |
9d51e2a3158521b2a0b08c238bf80e84c5647e9b | 2,624 | py | Python | power/daniels_formula.py | aaron-schroeder/strava_flask_dashboard | caa4fdaacccbb69e72ab83cde299692cce46af58 | [
"MIT"
] | 1 | 2021-08-09T02:25:06.000Z | 2021-08-09T02:25:06.000Z | power/daniels_formula.py | aaron-schroeder/strava_flask_dashboard | caa4fdaacccbb69e72ab83cde299692cce46af58 | [
"MIT"
] | null | null | null | power/daniels_formula.py | aaron-schroeder/strava_flask_dashboard | caa4fdaacccbb69e72ab83cde299692cce46af58 | [
"MIT"
] | null | null | null | import datetime
import math
import scipy.optimize
def oxygen_cost_v(v):
"""Effectively defines Daniels' pace-power relationship.
AKA speed-to-vdot.
Assumed to be the same for all runners.
Args:
v (float): velocity in m/min.
Returns:
float: oxygen cost to cover distance in mL/kg/min.
"""
a1 ... | 23.017544 | 74 | 0.665777 |
37319529367d27f778c0fcb819fb0d18e2d7231c | 41,409 | py | Python | src/fluvius.py | csp-inc/fluvius | 8eb8c3caee2b98720ae17bef384302d6fa88c828 | [
"Apache-2.0"
] | null | null | null | src/fluvius.py | csp-inc/fluvius | 8eb8c3caee2b98720ae17bef384302d6fa88c828 | [
"Apache-2.0"
] | 3 | 2022-02-24T15:07:42.000Z | 2022-02-25T23:59:31.000Z | src/fluvius.py | csp-inc/fluvius | 8eb8c3caee2b98720ae17bef384302d6fa88c828 | [
"Apache-2.0"
] | 2 | 2022-03-17T19:59:33.000Z | 2022-03-17T20:00:41.000Z | #web scrapping libraries
from bs4 import BeautifulSoup as bs
import requests
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.options import Options
#data processing libraries
import fsspec
import os
import folium
import time
import numpy as np
impor... | 41.080357 | 145 | 0.576203 |
28e55101498273d91c429a2331a6a28a3e9bbba5 | 3,329 | py | Python | calfews_src/data/calc_indices.py | ahamilton144/CALFEWS | b6307de1fd977030153023f85f5367fe191a75d3 | [
"MIT"
] | 3 | 2020-10-20T16:26:37.000Z | 2021-11-19T05:02:52.000Z | calfews_src/data/calc_indices.py | ahamilton144/CALFEWS | b6307de1fd977030153023f85f5367fe191a75d3 | [
"MIT"
] | null | null | null | calfews_src/data/calc_indices.py | ahamilton144/CALFEWS | b6307de1fd977030153023f85f5367fe191a75d3 | [
"MIT"
] | 3 | 2020-09-15T17:47:20.000Z | 2022-03-01T04:49:48.000Z | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
sns.set_style('whitegrid')
# calc WYT and 8RI. add columns to datafile from cdec_scraper.
# confirm against http://cdec.water.ca.gov/cgi-progs/iodir/WSIHIST
cfsd_mafd = 2.29568411*10**-5 * 86400 / 10 ** 6
water_year = lambda ... | 30.824074 | 81 | 0.599579 |
79aadc949d272589a964a21cfd17e62ab90aec2e | 11,031 | py | Python | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/mpe_meta_data.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/mpe_meta_data.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/mpe_meta_data.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class MpeMetaData:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is att... | 25.127563 | 232 | 0.567129 |
7c2dc6d2d63e2e335c0ead86835776089e7b969f | 5,298 | py | Python | mapcreator/cli_util.py | 3Dmaps/mapcreator | f5d0a321905af6bf0c336d0a3e416bf580c8893a | [
"MIT"
] | 1 | 2018-05-06T12:30:05.000Z | 2018-05-06T12:30:05.000Z | mapcreator/cli_util.py | 3Dmaps/mapcreator | f5d0a321905af6bf0c336d0a3e416bf580c8893a | [
"MIT"
] | 17 | 2018-03-05T13:36:41.000Z | 2018-05-02T07:39:25.000Z | mapcreator/cli_util.py | 3Dmaps/mapcreator | f5d0a321905af6bf0c336d0a3e416bf580c8893a | [
"MIT"
] | 1 | 2018-02-26T13:15:46.000Z | 2018-02-26T13:15:46.000Z | import click
import sys, traceback
from mapcreator import building
from mapcreator import persistence
from mapcreator import echoes
from mapcreator.state import FileAddResult
"""
The x_or_error functions return a falsy value if an error was thrown.
If everything went OK, they return either True or resulting state, de... | 33.320755 | 107 | 0.623443 |
47851097ce51e01979c75bb946c35ca9e5c7d9da | 2,177 | py | Python | index.py | FURams09/CitiBikeExplorer | 6adac92d396f30e209bb49bbbf7dc1f64f5e2e99 | [
"MIT"
] | null | null | null | index.py | FURams09/CitiBikeExplorer | 6adac92d396f30e209bb49bbbf7dc1f64f5e2e99 | [
"MIT"
] | null | null | null | index.py | FURams09/CitiBikeExplorer | 6adac92d396f30e209bb49bbbf7dc1f64f5e2e99 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sat Nov 17 12:55:36 2018
@author: greg
"""
import pandas;
import requests;
import os.path;
import zipfile;
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.web... | 31.1 | 91 | 0.644006 |
02f0660b552dd115bcc395481e33920e4854dc54 | 7,739 | py | Python | test/functional/p2p_invalid_tx.py | TheCoffeeCoins/TheCoffeeCoins | 9b793253992ea762e4101edc12c3b0becc64261c | [
"MIT"
] | null | null | null | test/functional/p2p_invalid_tx.py | TheCoffeeCoins/TheCoffeeCoins | 9b793253992ea762e4101edc12c3b0becc64261c | [
"MIT"
] | null | null | null | test/functional/p2p_invalid_tx.py | TheCoffeeCoins/TheCoffeeCoins | 9b793253992ea762e4101edc12c3b0becc64261c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The thecoffeecoins Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid transactions.
In this test we connect to one node over p2p, and ... | 45.523529 | 113 | 0.681096 |
938794c1cd6a1ddb5cdb18ec3702ddf3a93e8246 | 229 | py | Python | Array/Search.py | sheikhsaifalislam/Data-Structure-in-Python | b2e687c75442beb44839994fe204cb4bbf42e3f0 | [
"MIT"
] | null | null | null | Array/Search.py | sheikhsaifalislam/Data-Structure-in-Python | b2e687c75442beb44839994fe204cb4bbf42e3f0 | [
"MIT"
] | null | null | null | Array/Search.py | sheikhsaifalislam/Data-Structure-in-Python | b2e687c75442beb44839994fe204cb4bbf42e3f0 | [
"MIT"
] | null | null | null | from array import *
array1 = array('i', [10,20,30,40,50])
# For searching you have to mention the value of any index and then index function will let you know the exact
# index of your given value.
print(array1.index(30)) | 32.714286 | 111 | 0.716157 |
4f422b32c89c55d43e7e102db2c9453f8b38dfb1 | 11,164 | py | Python | colour/utilities/tests/test_data_structures.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/utilities/tests/test_data_structures.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | colour/utilities/tests/test_data_structures.py | timgates42/colour | cea486394e3925718a0f3dd427edc9dd5b674f0c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Defines the unit tests for the :mod:`colour.utilities.data_structures` module.
"""
import numpy as np
import operator
import pickle
import unittest
from colour.utilities import (Structure, Lookup, CaseInsensitiveMapping,
LazyCaseInsensitiveMapping)
__author__... | 29.148825 | 79 | 0.609549 |
9be73e9e3c96f6b158d674c64dd80e21c9d1fd8f | 3,207 | py | Python | tests/_main.py | brsynth/module | 582170470acaa925ff653d4a289bda0bbf8e1067 | [
"MIT"
] | 13 | 2017-12-20T14:51:58.000Z | 2021-12-25T13:01:04.000Z | tests/_main.py | brsynth/module | 582170470acaa925ff653d4a289bda0bbf8e1067 | [
"MIT"
] | 4 | 2018-10-12T07:51:55.000Z | 2020-07-27T13:20:57.000Z | tests/_main.py | brsynth/module | 582170470acaa925ff653d4a289bda0bbf8e1067 | [
"MIT"
] | 7 | 2018-10-04T10:16:52.000Z | 2021-05-07T05:51:47.000Z | """
Created on Jul 15 2020
@author: Joan Hérisson
"""
from unittest import TestCase
from pathlib import Path
from os import stat as os_stat
from os import path as os_path
class Main(TestCase):
__test__ = False
def test(self):
# print(self.__class__.__name__)
if self.__class__.__name__ == '... | 27.646552 | 102 | 0.575616 |
4d7dd6d5916ad966e441e8e2267ee1ba33da7758 | 8,283 | py | Python | preprocessing_helpers.py | burnpiro/dengai-predicting-disease-spread | a225ff55936f1e9a8499775d63dab606c0098571 | [
"MIT"
] | null | null | null | preprocessing_helpers.py | burnpiro/dengai-predicting-disease-spread | a225ff55936f1e9a8499775d63dab606c0098571 | [
"MIT"
] | null | null | null | preprocessing_helpers.py | burnpiro/dengai-predicting-disease-spread | a225ff55936f1e9a8499775d63dab606c0098571 | [
"MIT"
] | null | null | null | import pandas as pd
import tensorflow as tf
import numpy as np
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from sklearn.model_selection import KFold
from data_info import *
from datetime import datetime
LSTM_STEP = 1
LSTM_FUTURE_TARGET = 1
LSTM_HISTORY = 6
def extract_data(train_file_path, columns... | 39.070755 | 131 | 0.65894 |
e8c76cda2aeacd9b4ba7aea34bf8ec20608287e9 | 11,712 | py | Python | fixedeffect/iv/iv.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | fixedeffect/iv/iv.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | fixedeffect/iv/iv.py | rphilipzhang/FixedEffectModel | 017a6f555fff44392d33e45e26c406d02ddde109 | [
"BSD-3-Clause"
] | null | null | null | from ..utils.DemeanDataframe import demean_dataframe
from ..utils.FormTransfer import form_transfer
from ..utils.CalDf import cal_df
from ..utils.CalFullModel import cal_fullmodel
from ..utils.WaldTest import waldtest
from ..utils.OLSFixed import OLSFixed
from ..utils.GenCrossProd import gencrossprod
import statsmodel... | 38.025974 | 126 | 0.591018 |
ba9e8e90a92832869906a7d4a059fac2d98e58f2 | 3,872 | py | Python | tests/hwsim/test_tnc.py | waittrue/wireless | 3c64f015dc62aec4da0b696f45cc4bcf41594c5d | [
"Unlicense"
] | 1 | 2018-02-05T23:29:00.000Z | 2018-02-05T23:29:00.000Z | tests/hwsim/test_tnc.py | Acidburn0zzz/third_party-hostap | 0542463c4de76fde6e8164f75b3a52ce0ddd8087 | [
"Unlicense"
] | null | null | null | tests/hwsim/test_tnc.py | Acidburn0zzz/third_party-hostap | 0542463c4de76fde6e8164f75b3a52ce0ddd8087 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# TNC tests
# Copyright (c) 2014-2015, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import os.path
import hostapd
from utils import HwsimSkip
from test_ap_eap import int_eap_server_params, check_eap_capa
def te... | 36.87619 | 70 | 0.590134 |
6e1686953fb63eb12c393be0b797b92196a698b1 | 9,531 | py | Python | ask-sdk-core/tests/unit/test_response_helper.py | koshyviv/alexa-skills-kit-sdk-for-python | 1ceace2b745f53d32a8fea8eeb18ec9f381cda1c | [
"Apache-2.0"
] | 1 | 2020-06-13T14:14:26.000Z | 2020-06-13T14:14:26.000Z | ask-sdk-core/tests/unit/test_response_helper.py | koshyviv/alexa-skills-kit-sdk-for-python | 1ceace2b745f53d32a8fea8eeb18ec9f381cda1c | [
"Apache-2.0"
] | null | null | null | ask-sdk-core/tests/unit/test_response_helper.py | koshyviv/alexa-skills-kit-sdk-for-python | 1ceace2b745f53d32a8fea8eeb18ec9f381cda1c | [
"Apache-2.0"
] | 2 | 2019-11-22T14:52:47.000Z | 2021-06-18T13:46:15.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights
# Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or i... | 40.905579 | 97 | 0.697199 |
25a85d126af6b28f986972babee096f9cc522315 | 1,828 | py | Python | paddlehub/dataset/bq.py | jjandnn/PaddleHub | 05e24ce2495b60e095b1b0d94ba1c7ac09d077f9 | [
"Apache-2.0"
] | 2 | 2020-11-30T08:54:01.000Z | 2021-04-07T10:11:36.000Z | paddlehub/dataset/bq.py | Melissa9596/PaddleHub | 0b002a0add1c982d52f7591a5e773bf09b3e6361 | [
"Apache-2.0"
] | null | null | null | paddlehub/dataset/bq.py | Melissa9596/PaddleHub | 0b002a0add1c982d52f7591a5e773bf09b3e6361 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
# Copyright (c) 2019 PaddlePaddle 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 req... | 33.851852 | 75 | 0.662473 |
2bffcc88966954eabb72a52e0d2791a8db494c5d | 2,455 | py | Python | setup.py | brahman-ai/PySyft | 48f7b6b633502bcaa45c88b1bbb86c40abed431e | [
"Apache-2.0"
] | null | null | null | setup.py | brahman-ai/PySyft | 48f7b6b633502bcaa45c88b1bbb86c40abed431e | [
"Apache-2.0"
] | 1 | 2020-01-25T19:33:08.000Z | 2020-01-25T19:33:08.000Z | setup.py | brahman-ai/PySyft | 48f7b6b633502bcaa45c88b1bbb86c40abed431e | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import find_packages
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
... | 38.359375 | 132 | 0.712424 |
30cd9e0e8c6f5ec06b9d53c8dbbce1710a7f1531 | 376 | py | Python | Week 8/Program5.py | Mitul-Joby/Semester-1-Python-Lab | 8ab62a6945dae0ec9873acec7ba395b9c360cad1 | [
"MIT"
] | null | null | null | Week 8/Program5.py | Mitul-Joby/Semester-1-Python-Lab | 8ab62a6945dae0ec9873acec7ba395b9c360cad1 | [
"MIT"
] | null | null | null | Week 8/Program5.py | Mitul-Joby/Semester-1-Python-Lab | 8ab62a6945dae0ec9873acec7ba395b9c360cad1 | [
"MIT"
] | null | null | null | '''PROGRAM TO FIND nTH FIBONACCI NUMBER USING CONCEPT OF DECORATOR'''
#Function fun
def func(fun):
print('nth Fibbonacci number:',fun())
return ''
#Decorator
@func
def outer():
a = 1
b = 1
n = int(input('\nEnter n to find nth fibbonaci number: '))
if n == 1:
return 0
for _ in range(... | 20.888889 | 69 | 0.582447 |
89504cc6bf98dc584b77b4cd86f566b7c57bdef7 | 16 | py | Python | technical_analysis/temp_file.py | olivier2311/Quantropy | 539014df811b85742a8731ca347f0a224d82820b | [
"MIT"
] | 1 | 2021-11-16T19:06:56.000Z | 2021-11-16T19:06:56.000Z | technical_analysis/temp_file.py | webclinic017/Quantropy-1 | 539014df811b85742a8731ca347f0a224d82820b | [
"MIT"
] | null | null | null | technical_analysis/temp_file.py | webclinic017/Quantropy-1 | 539014df811b85742a8731ca347f0a224d82820b | [
"MIT"
] | 1 | 2021-11-16T19:06:53.000Z | 2021-11-16T19:06:53.000Z | import talib
| 3.2 | 12 | 0.6875 |
80a3e9361ec395a7eace59d32a831a0ed4193a57 | 1,226 | py | Python | env/lib/python3.9/site-packages/tests/engines/test_engines_html5lib.py | afrokyss/DIT-ILLUMNI-WAGTAIL-APP | c1b22efa6b5b6c0ed5afb30c721b630ec8e37968 | [
"MIT"
] | 1 | 2021-06-03T21:57:32.000Z | 2021-06-03T21:57:32.000Z | env/lib/python3.9/site-packages/tests/engines/test_engines_html5lib.py | febycloud/wagtail_project_demo | 0a72f112133423b08c1a149d527f3366cfad198f | [
"MIT"
] | null | null | null | env/lib/python3.9/site-packages/tests/engines/test_engines_html5lib.py | febycloud/wagtail_project_demo | 0a72f112133423b08c1a149d527f3366cfad198f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import unittest
from draftjs_exporter.engines.html5lib import DOM_HTML5LIB
class TestDOM_HTML5LIB(unittest.TestCase):
def test_create_tag(self):
self.assertEqual(DOM_HTML5LIB.render_debug(DOM_HTML5LIB.create_tag('p', {'clas... | 42.275862 | 142 | 0.698206 |
b3d80ae3443d4a8481aec30067400394adc10ac7 | 354 | py | Python | data/scripts/mnist-2npz.py | rdadolf/fathom-lite | abd56bda25f9b54d3b4a8f2b1a355e5bfd53ce9b | [
"Apache-2.0"
] | 2 | 2018-07-14T22:59:32.000Z | 2018-10-05T16:10:29.000Z | data/scripts/mnist-2npz.py | rdadolf/fathom-lite | abd56bda25f9b54d3b4a8f2b1a355e5bfd53ce9b | [
"Apache-2.0"
] | null | null | null | data/scripts/mnist-2npz.py | rdadolf/fathom-lite | abd56bda25f9b54d3b4a8f2b1a355e5bfd53ce9b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import numpy as np
if __name__=='__main__':
images = np.fromfile('t10k-images-idx3-ubyte',dtype='uint8')[16:]
labels = np.fromfile('t10k-labels-idx1-ubyte',dtype='uint8')[8:]
images = images[:784000].reshape((1000,784))
labels = labels[:1000]
np.savez('mnist-inputs.npz',images)
np.... | 23.6 | 67 | 0.686441 |
3720489f9282f9a81dfa33715d003e19c51b161a | 714 | py | Python | mysql.py | AGitsjustsilver/NETSECNewsBotPy | 28aa0ffda570732068657d8dea43b1be2305a61d | [
"MIT"
] | null | null | null | mysql.py | AGitsjustsilver/NETSECNewsBotPy | 28aa0ffda570732068657d8dea43b1be2305a61d | [
"MIT"
] | 3 | 2019-06-04T16:55:17.000Z | 2019-06-04T17:12:51.000Z | mysql.py | AGitsjustsilver/NETSECNewsBotPy | 28aa0ffda570732068657d8dea43b1be2305a61d | [
"MIT"
] | null | null | null | """pull
Name: mysql
Author: Alessandro Guaresti
Description:
This module is used to interact with mysql for database purposes
regardless of databases in use for the project
"""
import os
import mysql.connector
# constants
user = os.environ.get('SQL_USER')
pswd = os.environ.get('SQL_USER_PSWD')
FEED_DB = None
ARTCL_... | 15.191489 | 65 | 0.635854 |
2ecc5c5417fe465438206eb829850ef063407944 | 6,005 | py | Python | 3. get_flux.py | galgodon/auroral_lines | 9c322a93c6d95c672a89a420cc72c52e71663e09 | [
"MIT"
] | null | null | null | 3. get_flux.py | galgodon/auroral_lines | 9c322a93c6d95c672a89a420cc72c52e71663e09 | [
"MIT"
] | null | null | null | 3. get_flux.py | galgodon/auroral_lines | 9c322a93c6d95c672a89a420cc72c52e71663e09 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 9 11:13:50 2019
@author: Gerome Algodon
"""
#%%
import time
t = time.clock()
# =============================================================================
# Import data
# =============================================================================
from a... | 49.221311 | 168 | 0.601665 |
d3dc6ad9d7d87d3125855d54d655a6c31bce3028 | 8,880 | py | Python | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/nmt_gpu/utils/iterator_utils_test.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-07T18:52:33.000Z | 2019-07-06T12:48:18.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/nmt_gpu/utils/iterator_utils_test.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 12 | 2018-12-13T18:04:36.000Z | 2019-06-14T20:49:33.000Z | v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/staging/models/rough/nmt_gpu/utils/iterator_utils_test.py | myelintek/results | 11c38436a158c453e3011f8684570f7a55c03330 | [
"Apache-2.0"
] | 44 | 2018-11-09T21:04:52.000Z | 2019-06-24T07:40:28.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 35.662651 | 80 | 0.61205 |
b2f3114bef34db96b017de240a58d0d7ca979b5a | 58 | py | Python | myapp.py | stefanofisc/ProgettoTW | c2d8f71eb050e6a2e40af8c76206e2d37d0b96a4 | [
"Apache-2.0"
] | null | null | null | myapp.py | stefanofisc/ProgettoTW | c2d8f71eb050e6a2e40af8c76206e2d37d0b96a4 | [
"Apache-2.0"
] | null | null | null | myapp.py | stefanofisc/ProgettoTW | c2d8f71eb050e6a2e40af8c76206e2d37d0b96a4 | [
"Apache-2.0"
] | null | null | null | from app import app
if __name__ == '__main__':
app.run() | 14.5 | 26 | 0.689655 |
24c80e556467dc0871365c4e0b1a89f549af494e | 20,612 | py | Python | SimPEG/EM/Static/DC/ProblemDC_2D.py | rolandhill/simpeg | 92d220e55d3d280b44e4cbcbddc42d57a974ca94 | [
"MIT"
] | null | null | null | SimPEG/EM/Static/DC/ProblemDC_2D.py | rolandhill/simpeg | 92d220e55d3d280b44e4cbcbddc42d57a974ca94 | [
"MIT"
] | null | null | null | SimPEG/EM/Static/DC/ProblemDC_2D.py | rolandhill/simpeg | 92d220e55d3d280b44e4cbcbddc42d57a974ca94 | [
"MIT"
] | 1 | 2021-03-21T09:54:33.000Z | 2021-03-21T09:54:33.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from SimPEG import Utils
from SimPEG.EM.Base import BaseEMProblem
from .SurveyDC import Survey_ky
from .FieldsDC_2D import Fields_ky, Fields_ky_CC, Fields_ky_N
from .Fiel... | 34.182421 | 87 | 0.492189 |
97f4979e0de59b941c9fa8ff3c891cc1dc0d652b | 3,996 | py | Python | setup.py | twz915/raven-python | 1dd30934c034df6744bfbb14f9dcbf0e552241d4 | [
"BSD-3-Clause"
] | 1 | 2019-05-09T08:59:49.000Z | 2019-05-09T08:59:49.000Z | setup.py | twz915/raven-python | 1dd30934c034df6744bfbb14f9dcbf0e552241d4 | [
"BSD-3-Clause"
] | null | null | null | setup.py | twz915/raven-python | 1dd30934c034df6744bfbb14f9dcbf0e552241d4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Raven
=====
Raven is a Python client for `Sentry <http://getsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
`Django <djangoproject.com>`_, `Flask <http://flask.pocoo.org/>`_, and `Pylons
<http://www.pylonsproject.org/>`_. Raven also includ... | 26.463576 | 78 | 0.627127 |
2b58d62f00927999f314490ad88c45940fa0cece | 9,540 | py | Python | src/radical/pilot/agent/scheduler/hombre.py | karahbit/radical.pilot | c611e1df781749deef899dcf5815728e1d8a962e | [
"MIT"
] | null | null | null | src/radical/pilot/agent/scheduler/hombre.py | karahbit/radical.pilot | c611e1df781749deef899dcf5815728e1d8a962e | [
"MIT"
] | null | null | null | src/radical/pilot/agent/scheduler/hombre.py | karahbit/radical.pilot | c611e1df781749deef899dcf5815728e1d8a962e | [
"MIT"
] | null | null | null |
__copyright__ = "Copyright 2017, http://radical.rutgers.edu"
__license__ = "MIT"
import copy
import radical.utils as ru
from .base import AgentSchedulingComponent
# ------------------------------------------------------------------------------
#
class Hombre(AgentSchedulingComponent):
'''
HOMBRE: HOMog... | 34.817518 | 80 | 0.473375 |
4c252d2492d1b88fecf57373dfa0f0abe34e2776 | 780 | py | Python | lfs/cart/management/commands/cleanup_carts.py | timgates42/django-lfs | 3bbcb3453d324c181ec68d11d5d35115a60a2fd5 | [
"BSD-3-Clause"
] | 345 | 2015-01-03T19:19:27.000Z | 2022-03-20T11:00:50.000Z | lfs/cart/management/commands/cleanup_carts.py | timgates42/django-lfs | 3bbcb3453d324c181ec68d11d5d35115a60a2fd5 | [
"BSD-3-Clause"
] | 73 | 2015-01-06T14:54:02.000Z | 2022-03-11T23:11:34.000Z | lfs/cart/management/commands/cleanup_carts.py | timgates42/django-lfs | 3bbcb3453d324c181ec68d11d5d35115a60a2fd5 | [
"BSD-3-Clause"
] | 148 | 2015-01-07T16:30:08.000Z | 2022-03-25T21:20:58.000Z | import datetime
from django.core.management.base import BaseCommand
class Command(BaseCommand):
help = 'Clean carts older than 7 days'
def add_arguments(self, parser):
parser.add_argument(
'--days',
action='store',
dest='days',
default=7,
he... | 27.857143 | 73 | 0.583333 |
81782362a5a1a0a0484d07cfa770e7c0ad6c9635 | 30,466 | py | Python | selfdrive/controls/lib/events.py | nara1111/openpilot-1 | cf453bc9dfcb763c09c0132a7af9c27cfbfdce3e | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | nara1111/openpilot-1 | cf453bc9dfcb763c09c0132a7af9c27cfbfdce3e | [
"MIT"
] | null | null | null | selfdrive/controls/lib/events.py | nara1111/openpilot-1 | cf453bc9dfcb763c09c0132a7af9c27cfbfdce3e | [
"MIT"
] | null | null | null | import os
from enum import IntEnum
from typing import Dict, Union, Callable, List, Optional
from cereal import log, car
import cereal.messaging as messaging
from common.realtime import DT_CTRL
from selfdrive.config import Conversions as CV
from selfdrive.locationd.calibrationd import MIN_SPEED_FILTER
from selfdrive.ve... | 35.180139 | 152 | 0.695891 |
6d5716671201c2860c81ade9103511802d26f0cf | 28,712 | py | Python | src/validate_train_spn.py | ThayaFluss/cnl | 485345e730a4cbf5cff6dbdeeb5e1fb7c4283733 | [
"MIT"
] | null | null | null | src/validate_train_spn.py | ThayaFluss/cnl | 485345e730a4cbf5cff6dbdeeb5e1fb7c4283733 | [
"MIT"
] | null | null | null | src/validate_train_spn.py | ThayaFluss/cnl | 485345e730a4cbf5cff6dbdeeb5e1fb7c4283733 | [
"MIT"
] | null | null | null | import numpy as np
import scipy as sp
from matrix_util import *
from random_matrices import *
import matplotlib.pyplot as plt
from timer import Timer
import os
import time
import logging
import sys
import json
from tqdm import tqdm,trange
from datetime import datetime
from train_fde import *
from vbmf.vbmf import VBM... | 35.186275 | 143 | 0.539008 |
ca34863b2e2e52f83076ed60827fd6d9430f85ed | 20,036 | py | Python | dffml/service/dev.py | jankeromnes/dffml | 6be8cef5252c692440f2e6acedd6ce98f3574d75 | [
"MIT"
] | null | null | null | dffml/service/dev.py | jankeromnes/dffml | 6be8cef5252c692440f2e6acedd6ce98f3574d75 | [
"MIT"
] | null | null | null | dffml/service/dev.py | jankeromnes/dffml | 6be8cef5252c692440f2e6acedd6ce98f3574d75 | [
"MIT"
] | null | null | null | import os
import sys
import ast
import json
import pydoc
import shutil
import asyncio
import pathlib
import getpass
import tempfile
import importlib
import subprocess
import contextlib
import configparser
import pkg_resources
import unittest.mock
import urllib.request
import importlib.util
from pathlib import Path
fro... | 33.227197 | 108 | 0.545219 |
210f3e4b9b9ec287948ebc5bd1250caa3c1f0b0b | 1,154 | py | Python | src/dcos_e2e_cli/dcos_docker/commands/create_loopback_sidecar.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_docker/commands/create_loopback_sidecar.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_docker/commands/create_loopback_sidecar.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | """
Tools for creating sidecar containers.
"""
import click
from dcos_e2e.docker_utils import DockerLoopbackVolume
from ._common import (
NODE_TYPE_LABEL_KEY,
NODE_TYPE_LOOPBACK_SIDECAR_LABEL_VALUE,
SIDECAR_NAME_LABEL_KEY,
loopback_sidecars_by_name,
)
@click.command('create-loopback-sidecar')
@clic... | 24.041667 | 72 | 0.686308 |
5f7742b17cebbfeb23656205fccc7972f57ce603 | 1,382 | py | Python | kw3pan/pancakeswap/factory/busd/pancakeswap_busd_factory.py | kkristof200/py_web3_pancakeswap | ae9dc7021b7da2365ce675f29f89e103fe44d77f | [
"MIT"
] | 6 | 2021-05-09T12:43:37.000Z | 2021-12-07T01:56:02.000Z | kw3pan/pancakeswap/factory/busd/pancakeswap_busd_factory.py | kkristof200/py_web3_pancakeswap | ae9dc7021b7da2365ce675f29f89e103fe44d77f | [
"MIT"
] | null | null | null | kw3pan/pancakeswap/factory/busd/pancakeswap_busd_factory.py | kkristof200/py_web3_pancakeswap | ae9dc7021b7da2365ce675f29f89e103fe44d77f | [
"MIT"
] | null | null | null | # ------------------------------------------------------------ Imports ----------------------------------------------------------- #
# System
from typing import Optional
# Pip
from kw3 import Web3
from kw3.constants import Constants
# Local
from ..core import PancakeswapFactory
from ...liquidity_pool import Pancake... | 32.139535 | 132 | 0.391462 |
696633659d010f3c172ef31fdb891477271eb6bb | 6,573 | py | Python | argo/workflows/client/models/v1alpha1_template_ref.py | jyotishp/argo-client-python | 7dfe27c8bc542a9142efcb0a8f55bb85c915448c | [
"Apache-2.0"
] | 1 | 2021-03-10T23:09:42.000Z | 2021-03-10T23:09:42.000Z | argo/workflows/client/models/v1alpha1_template_ref.py | jyotishp/argo-client-python | 7dfe27c8bc542a9142efcb0a8f55bb85c915448c | [
"Apache-2.0"
] | null | null | null | argo/workflows/client/models/v1alpha1_template_ref.py | jyotishp/argo-client-python | 7dfe27c8bc542a9142efcb0a8f55bb85c915448c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Argo Server API
You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501
The version of the OpenAPI document: v2.11.8
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
... | 31.753623 | 172 | 0.619656 |
5b890040dc5af0a7d73048baccf222de2f83d00c | 3,181 | py | Python | lib/surface/sql/users/create.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | null | null | null | lib/surface/sql/users/create.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | 11 | 2020-02-29T02:51:12.000Z | 2022-03-30T23:20:08.000Z | lib/surface/sql/users/create.py | kustodian/google-cloud-sdk | b6bae4137d4b58030adb3dcb1271216dfb19f96d | [
"Apache-2.0"
] | 1 | 2020-07-24T18:47:35.000Z | 2020-07-24T18:47:35.000Z | # -*- coding: utf-8 -*- #
# Copyright 2016 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 33.484211 | 80 | 0.722414 |
d37692e30cf6bc1fd154d4773873a977eb1d0c2e | 1,090 | py | Python | Models_training/PCA_reduction.py | Nagisa-sys/WriterIdentification | 9fcc0f75e6685e64abb99bdc469755c24dc9802e | [
"MIT"
] | 2 | 2020-09-16T01:20:11.000Z | 2020-11-21T00:25:19.000Z | Models_training/PCA_reduction.py | Nagisa-sys/WriterIdentification | 9fcc0f75e6685e64abb99bdc469755c24dc9802e | [
"MIT"
] | null | null | null | Models_training/PCA_reduction.py | Nagisa-sys/WriterIdentification | 9fcc0f75e6685e64abb99bdc469755c24dc9802e | [
"MIT"
] | 1 | 2021-06-24T14:21:27.000Z | 2021-06-24T14:21:27.000Z | import pickle
from sklearn.decomposition import PCA
import numpy as np
class PCA_reduction:
def __init__(self, pca_path):
self.pca_reload = pickle.load(open(pca_path,'rb'))
def reduce_size(self, vector):
return self.pca_reload.transform([vector])[0]
@staticmethod
def create_new_pca_model(vectors, path_to_sa... | 33.030303 | 79 | 0.768807 |
dc6251b5508532e29aa5640706d29346462bf616 | 54,849 | py | Python | qutip/piqs.py | purva-thakre/qutip | 4a9da224b72165dbad66ba0ba449d9429cd510c8 | [
"BSD-3-Clause"
] | 1 | 2021-05-05T07:55:39.000Z | 2021-05-05T07:55:39.000Z | qutip/piqs.py | purva-thakre/qutip | 4a9da224b72165dbad66ba0ba449d9429cd510c8 | [
"BSD-3-Clause"
] | null | null | null | qutip/piqs.py | purva-thakre/qutip | 4a9da224b72165dbad66ba0ba449d9429cd510c8 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of QuTiP: Quantum Toolbox in Python.
#
# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson,
# and the QuTiP Developers.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the foll... | 28.098873 | 86 | 0.569874 |
b0a3fc03aaf5e5e3be071c07c089030906aaf8ad | 1,400 | py | Python | Scripts/Run_alphafold.py | SamuelGreenrod/Structure-based_annotation | 7d91bf9fd8aab7aa3d714156790458611d720d31 | [
"BSD-3-Clause"
] | null | null | null | Scripts/Run_alphafold.py | SamuelGreenrod/Structure-based_annotation | 7d91bf9fd8aab7aa3d714156790458611d720d31 | [
"BSD-3-Clause"
] | null | null | null | Scripts/Run_alphafold.py | SamuelGreenrod/Structure-based_annotation | 7d91bf9fd8aab7aa3d714156790458611d720d31 | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess
def alphafold_run_multifasta(single_fasta_dict,alphafold_dir_path):
alphafold_folders = []
for key,value in single_fasta_dict:
Alphafold_output = key +"_alphafold"
Alphafold_output_path = os.path.join(alphafold_dir_path, Alphafold_output)
alphafold_folders.append(A... | 46.666667 | 282 | 0.760714 |
1887994ecc78acd341cb06801e8adcff9a19ad7b | 17,413 | py | Python | google/appengine/tools/docker/containers.py | enpi/Test | 5fb2055c7cfd4cc91ff97471c529b041f21abeb6 | [
"Apache-2.0"
] | null | null | null | google/appengine/tools/docker/containers.py | enpi/Test | 5fb2055c7cfd4cc91ff97471c529b041f21abeb6 | [
"Apache-2.0"
] | null | null | null | google/appengine/tools/docker/containers.py | enpi/Test | 5fb2055c7cfd4cc91ff97471c529b041f21abeb6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | 33.230916 | 80 | 0.679665 |
6c1da59c481a419fa885efac77d5a479b17e52ce | 4,204 | py | Python | deepy/core/neural_var.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 260 | 2015-05-16T07:58:29.000Z | 2016-01-07T09:10:47.000Z | deepy/core/neural_var.py | uaca/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 20 | 2015-04-21T01:46:46.000Z | 2015-12-20T00:04:23.000Z | deepy/core/neural_var.py | zomux/deepy | 090fbad22a08a809b12951cd0d4984f5bd432698 | [
"MIT"
] | 50 | 2016-01-27T03:45:25.000Z | 2020-12-16T07:02:57.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import theano.tensor as TT
from deepy.core.tensor_conversion import neural_computation, convert_to_theano_var
from deepy.layers.layer import NeuralLayer
class NeuralVariable(NeuralLayer):
"""
Create a constant layer with tensors.
"""
def __init__(self, ... | 32.338462 | 102 | 0.654139 |
5bff937d6784be7482f8355563996871757410aa | 1,877 | py | Python | src/CDTW/setup.py | pacemaker2828/CDTW | f747a592e72ca36020617251257a551859c74e1c | [
"MIT"
] | null | null | null | src/CDTW/setup.py | pacemaker2828/CDTW | f747a592e72ca36020617251257a551859c74e1c | [
"MIT"
] | null | null | null | src/CDTW/setup.py | pacemaker2828/CDTW | f747a592e72ca36020617251257a551859c74e1c | [
"MIT"
] | null | null | null | '''
CDTW: Capstone project for the Georgetown Data Science Certification Program - Spring 2016
Note that "python setup.py test" invokes pytest on the package. With appropriately
configured setup.cfg, this will check both xxx_test modules and docstrings.
Copyright 2016, Chris Dwayne Todd Willie.
Licensed under MIT.
''... | 33.517857 | 105 | 0.684603 |
143bd677b0719b1251821823cc80a43e23a74504 | 1,783 | py | Python | examples/deploy_k8s/example_project/example_repo/repo.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | examples/deploy_k8s/example_project/example_repo/repo.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | examples/deploy_k8s/example_project/example_repo/repo.py | rpatil524/dagster | 6f918d94cbd543ab752ab484a65e3a40fd441716 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | import os
from collections import Counter
from dagster import In, config_from_files, file_relative_path, graph, op, repository
from dagster_aws.s3 import s3_pickle_io_manager, s3_resource
from dagster_celery_k8s import celery_k8s_job_executor
from dagster_k8s import k8s_job_executor
@op(ins={"word": In(str)}, config... | 28.758065 | 94 | 0.700505 |
d47bb608bbaa109b0333c1a1d24e77dc5879993c | 52,868 | py | Python | python/ccxt/async_support/probit.py | sc0Vu/ccxt | e0b2938af5590743c3e14a214d3c016fe3b4e920 | [
"MIT"
] | 1 | 2022-02-18T03:54:29.000Z | 2022-02-18T03:54:29.000Z | python/ccxt/async_support/probit.py | sc0Vu/ccxt | e0b2938af5590743c3e14a214d3c016fe3b4e920 | [
"MIT"
] | null | null | null | python/ccxt/async_support/probit.py | sc0Vu/ccxt | e0b2938af5590743c3e14a214d3c016fe3b4e920 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import A... | 41.595594 | 512 | 0.483563 |
f2b3c11d59eb8e48ac72ea10bf4490940f2329a5 | 6,344 | py | Python | tools/lib-alert-tree/lib_alert_tree/models.py | scality/metalk8s | f573373562e29b3f5943ddb79618c718f9a79d67 | [
"Apache-2.0"
] | 255 | 2018-08-03T17:32:53.000Z | 2022-03-25T21:51:00.000Z | tools/lib-alert-tree/lib_alert_tree/models.py | scality/metalk8s | f573373562e29b3f5943ddb79618c718f9a79d67 | [
"Apache-2.0"
] | 3,259 | 2018-08-03T00:25:56.000Z | 2022-03-31T15:23:11.000Z | tools/lib-alert-tree/lib_alert_tree/models.py | scality/metalk8s | f573373562e29b3f5943ddb79618c718f9a79d67 | [
"Apache-2.0"
] | 43 | 2018-08-08T01:47:22.000Z | 2022-03-12T17:49:41.000Z | """Classes for manipulating tree-like hierarchies of alerts."""
import abc
import enum
from treelib import Tree
try:
import click
except ImportError:
CLICK_AVAILABLE = False
else:
CLICK_AVAILABLE = True
from . import prometheus
ALLOWED_SEVERITIES = frozenset(["critical", "warning"])
class BaseAlert(m... | 29.64486 | 85 | 0.611602 |
be35fa8fd5a4ffd0076393ed7eddc7aa29c3a2d7 | 462 | py | Python | tests/test_builder_setup.py | dante-signal31/vdist | 00a123d3a5361960498c915163f0812c46214ce6 | [
"MIT"
] | 21 | 2017-02-25T01:59:53.000Z | 2021-06-26T16:51:42.000Z | tests/test_builder_setup.py | dante-signal31/vdist | 00a123d3a5361960498c915163f0812c46214ce6 | [
"MIT"
] | 5 | 2017-06-15T13:58:39.000Z | 2021-09-18T17:06:32.000Z | tests/test_builder_setup.py | dante-signal31/vdist | 00a123d3a5361960498c915163f0812c46214ce6 | [
"MIT"
] | 6 | 2017-11-22T23:40:30.000Z | 2022-01-19T21:08:55.000Z | import pytest
from vdist.builder import Builder, NoBuildsFoundException
def test_builder_nobuilds():
b = Builder()
with pytest.raises(NoBuildsFoundException):
b.start_build()
def test_internal_profile_loads():
b = Builder()
profiles = b.get_available_profiles()
internal_profile_ids =... | 21 | 84 | 0.722944 |
8aebb04dde82f9aef7d211a64d7d44d608b5252b | 4,399 | py | Python | train_sirs_twostage.py | lime-j/YTMT-Strategy-1 | aacc38c4e61b91e187cac81aa95500e0422d4d0f | [
"Apache-2.0"
] | 26 | 2021-11-08T07:49:34.000Z | 2022-03-28T14:09:27.000Z | train_sirs_twostage.py | lime-j/YTMT-Strategy-1 | aacc38c4e61b91e187cac81aa95500e0422d4d0f | [
"Apache-2.0"
] | 2 | 2021-10-22T02:53:10.000Z | 2021-12-29T12:35:13.000Z | train_sirs_twostage.py | lime-j/YTMT-Strategy-1 | aacc38c4e61b91e187cac81aa95500e0422d4d0f | [
"Apache-2.0"
] | 1 | 2021-10-18T08:00:22.000Z | 2021-10-18T08:00:22.000Z | import os
from os.path import join
import torch.backends.cudnn as cudnn
import data.sirs_dataset as datasets
import util.util as util
from data.image_folder import read_fns
from engine import Engine
from options.net_options.train_options import TrainOptions
from tools import mutils
opt = TrainOptions().parse()
print... | 41.5 | 116 | 0.744942 |
dc57102f4303a28495adc73d4939d54d7a21952e | 1,172 | py | Python | tests/test_flask_routes.py | Aaryia/flask-api-cassation | 6873a83eada73217042ac76e7242aa24cc5f688a | [
"Unlicense"
] | null | null | null | tests/test_flask_routes.py | Aaryia/flask-api-cassation | 6873a83eada73217042ac76e7242aa24cc5f688a | [
"Unlicense"
] | null | null | null | tests/test_flask_routes.py | Aaryia/flask-api-cassation | 6873a83eada73217042ac76e7242aa24cc5f688a | [
"Unlicense"
] | null | null | null | import os
import pytest
import json
import app
@pytest.fixture
def client():
app.api.config['TESTING'] = True
with app.api.test_client() as client:
yield client
def test_recupere_tout_documents(client):
response = client.get('/docs')
data = json.loads(response.data)
assert len(data) ==... | 32.555556 | 132 | 0.71843 |
12a8a2713aed6c0259c77904cceee513df57bc99 | 380 | py | Python | Navigation Commands.py | rodrigues-i/Selenium-Lessons | 559865a1525e9ae5f754c6a171bb3376866e620f | [
"MIT"
] | null | null | null | Navigation Commands.py | rodrigues-i/Selenium-Lessons | 559865a1525e9ae5f754c6a171bb3376866e620f | [
"MIT"
] | null | null | null | Navigation Commands.py | rodrigues-i/Selenium-Lessons | 559865a1525e9ae5f754c6a171bb3376866e620f | [
"MIT"
] | null | null | null | from selenium import webdriver
from time import sleep
PATH = 'C:\Program Files (x86)\chromedriver.exe'
driver = webdriver.Chrome(PATH)
driver.get('http://www.mercury-tours.com/')
sleep(5)
print(driver.title)
driver.get('https://www.pavantestingtools.com/')
sleep(5)
print(driver.title)
driver.back()
sleep(5)
print(dr... | 17.272727 | 48 | 0.75 |
cdcf05d6886ce0125fc520b2ed1e03c2bd8046e8 | 628 | py | Python | var/spack/repos/builtin/packages/py-scp/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-scp/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-scp/package.py | MiddelkoopT/spack | 4d94c4c4600f42a7a3bb3d06ec879140bc259304 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyScp(PythonPackage):
"""scp module for paramiko"""
homepage = "https://github.com/jb... | 31.4 | 96 | 0.705414 |
9cf8b26a00a16c4b9b12e8adf22a9b942a2f5dc6 | 1,412 | py | Python | day_01/solution.py | juntuu/advent_of_code_2016 | c2849396b4bd7b0f0e9128624fcec20130bc243f | [
"MIT"
] | null | null | null | day_01/solution.py | juntuu/advent_of_code_2016 | c2849396b4bd7b0f0e9128624fcec20130bc243f | [
"MIT"
] | null | null | null | day_01/solution.py | juntuu/advent_of_code_2016 | c2849396b4bd7b0f0e9128624fcec20130bc243f | [
"MIT"
] | null | null | null | from typing import Iterable
from typing import NamedTuple
class Instruction(NamedTuple):
turn: complex
steps: int
def instruction(raw: str) -> Instruction:
turn = {"L": 1j, "R": -1j}
raw = raw.strip()
return Instruction(turn[raw[0]], int(raw[1:]))
def move(instructions: Iterable[Instruction], *... | 26.148148 | 90 | 0.600567 |
41ff4e150ffe17183693333102e513887fda4f55 | 1,573 | py | Python | classify_server.py | wilsonloo/my_traffic_tf2_yolo3 | 322104de934794870822e1ea2494ee8228de2540 | [
"MIT"
] | 1 | 2021-07-02T01:44:40.000Z | 2021-07-02T01:44:40.000Z | classify_server.py | wilsonloo/my_traffic_tf2_yolo3 | 322104de934794870822e1ea2494ee8228de2540 | [
"MIT"
] | null | null | null | classify_server.py | wilsonloo/my_traffic_tf2_yolo3 | 322104de934794870822e1ea2494ee8228de2540 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy
import os
import io
from io import BytesIO
import numpy as np
import cv2
from PIL import Image
from tensorflow import keras
from flask import Flask, request
import image_demo
config = tf.compat.v1.ConfigProto(allow_soft_placement=True)
gpu_options = tf.compat.v1.GPUOptions(per_proc... | 29.679245 | 90 | 0.700572 |
cc6df6290976ddc8f380f56c04eb5d01dcf7cad5 | 1,709 | py | Python | BERT6mA/setup.py | kuratahiroyuki/BERT6mA | 85d4a522154296d28f1aa008dc744ba437a9cac9 | [
"MIT"
] | 2 | 2022-03-03T08:54:07.000Z | 2022-03-07T11:24:21.000Z | BERT6mA/setup.py | kuratahiroyuki/BERT6mA | 85d4a522154296d28f1aa008dc744ba437a9cac9 | [
"MIT"
] | 1 | 2022-03-11T08:49:57.000Z | 2022-03-12T05:56:54.000Z | BERT6mA/setup.py | kuratahiroyuki/BERT6mA | 85d4a522154296d28f1aa008dc744ba437a9cac9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 1 01:36:42 2020
@author: tsukiyamashou
"""
import sys
from setuptools import setup, find_packages
import os
from setuptools import find_packages
import setuptools
from setuptools.command.install_scripts import install_scripts
from setuptools.comman... | 21.910256 | 387 | 0.651258 |
2a70e3a680673684ca4b8f4f16fc30dc527d9a7f | 1,058 | py | Python | misc/common.py | nashory/rtic-gcn-pytorch | 75c3a6d6c05dd69f1260db7b0b4bfaca20c56d5d | [
"MIT"
] | 6 | 2021-10-22T02:46:31.000Z | 2022-03-16T07:16:19.000Z | misc/common.py | nashory/rtic-gcn-pytorch | 75c3a6d6c05dd69f1260db7b0b4bfaca20c56d5d | [
"MIT"
] | 1 | 2021-11-30T03:38:00.000Z | 2021-12-02T07:41:02.000Z | misc/common.py | nashory/rtic-gcn-pytorch | 75c3a6d6c05dd69f1260db7b0b4bfaca20c56d5d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
class Flatten(nn.Module):
def __init__(self):
super(Flatten, self).__init__()
def forward(self, x):
return torch.flatten(x, 1)
class ConcatModule(torch... | 23.511111 | 84 | 0.651229 |
9c30f6c4c295f620b06f0ea0a110d434cc278a1d | 9,128 | py | Python | eds/openmtc-gevent/common/openmtc/lib/lwm2m_lib/operations/ObservationNotification.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc/lib/lwm2m_lib/operations/ObservationNotification.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | eds/openmtc-gevent/common/openmtc/lib/lwm2m_lib/operations/ObservationNotification.py | piyush82/elastest-device-emulator-service | b4d6b393d6042c54a7b3dfb5f58cad5efd00f0e7 | [
"Apache-2.0"
] | null | null | null | from json import loads
from lwm2m_lib.operations.OperationRequest import OperationRequest
from lwm2m_lib.data_model.ResourcesList import CommonLists
from lwm2m_lib.api import lwm2m_api
from lwm2m_lib.operations.EventDispatcher import Event
import threading
from time import sleep
import datetime
from futile.logging impo... | 47.790576 | 206 | 0.658961 |
e748620790ac6d2dfbf4faf9b553010cdbb83687 | 3,688 | py | Python | research/object_detection/models/faster_rcnn_resnet_keras_feature_extractor_tf2_test.py | zhaowt96/models | 03182253673b0e2666ad9a33839759834c0acebd | [
"Apache-2.0"
] | null | null | null | research/object_detection/models/faster_rcnn_resnet_keras_feature_extractor_tf2_test.py | zhaowt96/models | 03182253673b0e2666ad9a33839759834c0acebd | [
"Apache-2.0"
] | null | null | null | research/object_detection/models/faster_rcnn_resnet_keras_feature_extractor_tf2_test.py | zhaowt96/models | 03182253673b0e2666ad9a33839759834c0acebd | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 45.530864 | 91 | 0.750813 |
97a7ab1874f345e5cdbd59a6783f4c19899e3bec | 2,959 | py | Python | exploits/keysteal.py | thehappydinoa/rootOS | d5f83bb6f4ceeec1b1c56fea3be3b1e5590113ec | [
"MIT"
] | 114 | 2019-02-26T03:53:39.000Z | 2022-03-15T14:24:40.000Z | exploits/keysteal.py | TH3-HUNT3R/Root-MacOS | 77783a2d0bdd935c59f866a011c72f39074d6b37 | [
"MIT"
] | 2 | 2019-02-26T03:15:35.000Z | 2019-03-07T18:24:05.000Z | exploits/keysteal.py | TH3-HUNT3R/Root-MacOS | 77783a2d0bdd935c59f866a011c72f39074d6b37 | [
"MIT"
] | 23 | 2019-03-07T18:21:55.000Z | 2022-01-20T09:34:24.000Z | """root with no password"""
from __future__ import print_function
import base64
import binascii
import json
import os
import re
from distutils.version import LooseVersion
from .general import (
DEFAULT_COMMAND,
USER,
get_values,
interaction_prompt,
osascript,
random_string,
try_password,
)... | 24.865546 | 107 | 0.608314 |
9cc541ae9641c7d8f4443e88727d67a1f899d2c9 | 771 | py | Python | models/bpmndiagram.py | THM-MA/XSDATA-waypoint | dd94442f9d6677c525bf3ebb03c15fec52fa1079 | [
"MIT"
] | null | null | null | models/bpmndiagram.py | THM-MA/XSDATA-waypoint | dd94442f9d6677c525bf3ebb03c15fec52fa1079 | [
"MIT"
] | null | null | null | models/bpmndiagram.py | THM-MA/XSDATA-waypoint | dd94442f9d6677c525bf3ebb03c15fec52fa1079 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from typing import List, Optional
from .bpmnlabel_style import BpmnlabelStyle
from .bpmnplane import Bpmnplane
from .diagram import Diagram
__NAMESPACE__ = "http://www.omg.org/spec/BPMN/20100524/DI"
@dataclass
class Bpmndiagram(Diagram):
class Meta:
name = "BPMNDi... | 24.870968 | 62 | 0.614786 |
12e7ff3db214f621360326727ba0ec672838e91d | 16,690 | py | Python | feincms/admin/tree_editor.py | pjdelport/feincms | 6aed5b76104a6b3bb801fb1657f597506aa96d72 | [
"BSD-3-Clause"
] | null | null | null | feincms/admin/tree_editor.py | pjdelport/feincms | 6aed5b76104a6b3bb801fb1657f597506aa96d72 | [
"BSD-3-Clause"
] | null | null | null | feincms/admin/tree_editor.py | pjdelport/feincms | 6aed5b76104a6b3bb801fb1657f597506aa96d72 | [
"BSD-3-Clause"
] | null | null | null | # ------------------------------------------------------------------------
# coding=utf-8
# ------------------------------------------------------------------------
import json
import logging
from django.conf import settings as django_settings
from django.contrib import admin
from django.contrib.admin.views import ma... | 38.279817 | 144 | 0.603176 |
152cce5044637a0b835b669381a8f2951bb5bb35 | 294 | py | Python | pj25.py | Ziggareto/project_euler_solns | e52066b9ffec97005bad0f26a3f0e08760d5c5cb | [
"MIT"
] | null | null | null | pj25.py | Ziggareto/project_euler_solns | e52066b9ffec97005bad0f26a3f0e08760d5c5cb | [
"MIT"
] | null | null | null | pj25.py | Ziggareto/project_euler_solns | e52066b9ffec97005bad0f26a3f0e08760d5c5cb | [
"MIT"
] | null | null | null | #pj25
def len_num(num):
"""takes in e.g. 1234, outputs 4"""
return(len(str(num)))
a = 1
b = 1
comp = [1,1]
count = 3
while True:
print(count)
temp = a+b
comp.append(temp)
if len_num(temp) == 1000:
break
a = b
b = temp
count += 1
| 14.7 | 40 | 0.486395 |
60b770c0e3b1f60ee02fb068d1ea4670582d7044 | 405 | py | Python | bce/base/version.py | bce-toolkit/BCE | 9e4d168cab18132bbe2867d13c629510b86d350a | [
"BSD-3-Clause"
] | 12 | 2017-12-18T10:37:52.000Z | 2021-11-28T07:08:46.000Z | bce/base/version.py | bce-toolkit/BCE | 9e4d168cab18132bbe2867d13c629510b86d350a | [
"BSD-3-Clause"
] | null | null | null | bce/base/version.py | bce-toolkit/BCE | 9e4d168cab18132bbe2867d13c629510b86d350a | [
"BSD-3-Clause"
] | 4 | 2018-04-29T10:32:26.000Z | 2021-07-13T08:17:36.000Z | #!/usr/bin/env python
#
# Copyright 2014 - 2018 The BCE Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the license.txt file.
#
_MAJOR = 4
_MINOR = 7
_REVISION = 9647
def get_version():
"""Get the version.
:rtype : (int, int, int)
:ret... | 19.285714 | 73 | 0.659259 |
5247de82b74e796409357edfad058a33299b827e | 8,307 | py | Python | html_extractor/webapp/content.py | Bhaskers-Blu-Org1/MDfromHTML | e50d8ac3a9f24fcfabfdc628e9c0a7f1e8ec507a | [
"Apache-2.0"
] | null | null | null | html_extractor/webapp/content.py | Bhaskers-Blu-Org1/MDfromHTML | e50d8ac3a9f24fcfabfdc628e9c0a7f1e8ec507a | [
"Apache-2.0"
] | null | null | null | html_extractor/webapp/content.py | Bhaskers-Blu-Org1/MDfromHTML | e50d8ac3a9f24fcfabfdc628e9c0a7f1e8ec507a | [
"Apache-2.0"
] | 1 | 2020-07-30T10:36:13.000Z | 2020-07-30T10:36:13.000Z | # /**
# * (c) Copyright 2020 IBM Corporation
# * 1 New Orchard Road,
# * Armonk, New York, 10504-1722
# * United States
# * +1 914 499 1900
# * support: Nathaniel Mills wnm3@us.ibm.com
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the... | 32.833992 | 112 | 0.608282 |
df2efe0efff80528f7179ea4cb8726a6afd4d7a8 | 6,644 | py | Python | qa/rpc-tests/test_framework/authproxy.py | Drusuilia/Motion | fc7e4826b8088b0064bac63f946c2ed149a6d03a | [
"MIT"
] | 12 | 2018-05-04T08:33:07.000Z | 2021-12-06T00:10:41.000Z | qa/rpc-tests/test_framework/authproxy.py | Drusuilia/Motion | fc7e4826b8088b0064bac63f946c2ed149a6d03a | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/authproxy.py | Drusuilia/Motion | fc7e4826b8088b0064bac63f946c2ed149a6d03a | [
"MIT"
] | 15 | 2018-05-02T07:00:43.000Z | 2020-01-29T01:01:33.000Z |
"""
Copyright 2011 Jeff Garzik
AuthServiceProxy has the following improvements over python-jsonrpc's
ServiceProxy class:
- HTTP connections persist for the life of the AuthServiceProxy object
(if server supports HTTP/1.1)
- sends protocol 'version', per JSON-RPC 1.1
- sends proper, incrementing 'id'
... | 38.853801 | 141 | 0.633203 |
cf943d2f8aa9719c5ea8320ace481784da2969d9 | 106 | py | Python | colcon_cmake/__init__.py | mxgrey/colcon-cmake | fe5a59f543319f3197174470c208de2f0ac0e0ad | [
"Apache-2.0"
] | 1 | 2018-02-01T06:50:05.000Z | 2018-02-01T06:50:05.000Z | colcon_cmake/__init__.py | mxgrey/colcon-cmake | fe5a59f543319f3197174470c208de2f0ac0e0ad | [
"Apache-2.0"
] | 3 | 2019-11-01T13:54:27.000Z | 2021-04-08T14:17:58.000Z | colcon_cmake/__init__.py | mxgrey/colcon-cmake | fe5a59f543319f3197174470c208de2f0ac0e0ad | [
"Apache-2.0"
] | 1 | 2019-05-28T17:00:41.000Z | 2019-05-28T17:00:41.000Z | # Copyright 2016-2018 Dirk Thomas
# Licensed under the Apache License, Version 2.0
__version__ = '0.2.3'
| 21.2 | 48 | 0.745283 |
dc3c1b898ed72ace55cf7a970782d5bd6c652bef | 7,827 | py | Python | varats/varats/tables/global_eval.py | Kaufi-Jonas/VaRA-Tool-Suite | 31563896ad7dd1c1a147202b0c5c9fffe772b803 | [
"BSD-2-Clause"
] | 4 | 2020-11-16T18:43:11.000Z | 2022-03-19T17:39:55.000Z | varats/varats/tables/global_eval.py | Kaufi-Jonas/VaRA-Tool-Suite | 31563896ad7dd1c1a147202b0c5c9fffe772b803 | [
"BSD-2-Clause"
] | 201 | 2020-11-16T14:53:46.000Z | 2022-03-31T10:36:07.000Z | varats/varats/tables/global_eval.py | Kaufi-Jonas/VaRA-Tool-Suite | 31563896ad7dd1c1a147202b0c5c9fffe772b803 | [
"BSD-2-Clause"
] | 5 | 2021-04-28T17:05:16.000Z | 2022-03-31T23:11:22.000Z | """Module for phasar global analysis evaluation table."""
import logging
import typing as tp
from pathlib import Path
import pandas as pd
from scipy.stats import pearsonr
from tabulate import tabulate
from varats.data.reports.globals_report import (
GlobalsReportWith,
GlobalsReportWithout,
GlobalsReport,
... | 36.404651 | 80 | 0.593586 |
2c0a375667d2c9796112d166fc9cfc8a36c1a4bc | 3,894 | py | Python | BPF.py | shun60s/time-difference-WebApp | 434505195b931e72d487108fadb11f7783900c42 | [
"MIT"
] | null | null | null | BPF.py | shun60s/time-difference-WebApp | 434505195b931e72d487108fadb11f7783900c42 | [
"MIT"
] | null | null | null | BPF.py | shun60s/time-difference-WebApp | 434505195b931e72d487108fadb11f7783900c42 | [
"MIT"
] | null | null | null | #coding:utf-8
#
# A class of iir Band Pass Filter
#
import sys
import numpy as np
from matplotlib import pyplot as plt
from scipy import signal
# Check version
# Python 3.6.4 on win32 (Windows 10)
# numpy 1.14.0
# matplotlib 2.1.1
# scipy 1.0.0
class Class_BPF(object):
def __init__(self, ... | 27.230769 | 103 | 0.576785 |
45145b4e00b41b742b281fd855f035dbbc67a10e | 17 | py | Python | data/studio21_generated/introductory/3436/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3436/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3436/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def err_bob(s):
| 8.5 | 15 | 0.647059 |
5031ccd33da8b66a6fe849887056e27aba620ed6 | 1,764 | py | Python | Utils/tests/testTargetVisuals.py | rscalzo/subpipe | 641067a65810ad4acafcc75e7b09cb65712f40f1 | [
"BSD-3-Clause"
] | null | null | null | Utils/tests/testTargetVisuals.py | rscalzo/subpipe | 641067a65810ad4acafcc75e7b09cb65712f40f1 | [
"BSD-3-Clause"
] | null | null | null | Utils/tests/testTargetVisuals.py | rscalzo/subpipe | 641067a65810ad4acafcc75e7b09cb65712f40f1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
"""
RS 2015/05/07: Target Visuals Module
"""
from Utils.TargetVisuals import cutout_bounds
# Exercise the routine that locates cutouts on an image
def cutout_bounds_harness(func, params, result):
assert func(*params, verbose=True) == result
def test_cutout_bounds():
paramset = [
... | 42 | 73 | 0.501134 |
c38d3ec0275ec01e474865a39d88418b00c4fe76 | 41,059 | py | Python | frappe/utils/data.py | P-Froggy/frappe | c3ba0ec68cb4ff1cd40314b257ae142eda59ed0c | [
"MIT"
] | 2 | 2020-05-30T17:59:18.000Z | 2020-08-13T19:10:41.000Z | frappe/utils/data.py | P-Froggy/frappe | c3ba0ec68cb4ff1cd40314b257ae142eda59ed0c | [
"MIT"
] | 3 | 2019-10-06T19:52:50.000Z | 2020-02-27T10:12:06.000Z | frappe/utils/data.py | P-Froggy/frappe | c3ba0ec68cb4ff1cd40314b257ae142eda59ed0c | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from dateutil.parser._parser import ParserError
import operator
import json
import re, datetime, math, time
import babel.dates
from babel.core import UnknownLocaleE... | 28.473648 | 152 | 0.695633 |
f70eb2c0d33d0d03e11a8847b577c694fe9dd459 | 1,322 | py | Python | tracdap-runtime/python/test/tracdap_examples/test_chaining.py | martin-traverse/tracdap | 2df2f08bee352f4f5188953efe5a33aa1ae51f2d | [
"Apache-2.0"
] | null | null | null | tracdap-runtime/python/test/tracdap_examples/test_chaining.py | martin-traverse/tracdap | 2df2f08bee352f4f5188953efe5a33aa1ae51f2d | [
"Apache-2.0"
] | null | null | null | tracdap-runtime/python/test/tracdap_examples/test_chaining.py | martin-traverse/tracdap | 2df2f08bee352f4f5188953efe5a33aa1ae51f2d | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Accenture Global Solutions Limited
#
# 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 ... | 28.12766 | 75 | 0.706505 |
899d1a005153b56c93edc1549217e7fd043af280 | 148 | py | Python | python/entities_extractor-0.6/entities_extractor/__init__.py | dataesr/scanr-backend | 39681be69b9a96b4a07b9410754c897cd5b65c24 | [
"MIT"
] | null | null | null | python/entities_extractor-0.6/entities_extractor/__init__.py | dataesr/scanr-backend | 39681be69b9a96b4a07b9410754c897cd5b65c24 | [
"MIT"
] | 3 | 2020-06-18T15:06:10.000Z | 2021-05-07T16:29:50.000Z | plugins/entities_extractor/entities_extractor/__init__.py | reseachalps/Search-Engine | 1cd1e83902119938ffd412394b09dce92d082500 | [
"MIT"
] | null | null | null | # pragma: no cover
import os.path
__version__ = open(os.path.dirname(os.path.abspath(__file__)) +
"/version.txt").read().strip()
| 29.6 | 63 | 0.628378 |
d7d000b69a784f99a6200fdfd3edf4eb44a24100 | 3,845 | py | Python | apioxy/logger.py | APIOxy/APIOxy | 8b13693b2a348e9c902f2ef7a4e52384f743b1f5 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-11-13T19:31:47.000Z | 2020-11-13T19:31:47.000Z | apioxy/logger.py | APIOxy/APIOxy | 8b13693b2a348e9c902f2ef7a4e52384f743b1f5 | [
"BSD-3-Clause-Clear"
] | 1 | 2020-10-07T12:40:09.000Z | 2020-10-16T18:29:55.000Z | apioxy/logger.py | APIOxy/APIOxy | 8b13693b2a348e9c902f2ef7a4e52384f743b1f5 | [
"BSD-3-Clause-Clear"
] | null | null | null | """
apioxy logger module
Using a custom logger to avoid interference with RMG's / ARC's loggers.
"""
import datetime
import os
import shutil
import time
from typing import Optional
from arc.common import get_git_branch, get_git_commit, time_lapse
from t3.logger import Logger as T3Logger
from apioxy.common import V... | 39.234694 | 116 | 0.504031 |
44052a4de3b0e053250c4773e430ce12a30ca01b | 2,155 | py | Python | simpleflow/workflow.py | darkjh/simpleflow | b5809f931cd8c49034075a0967a800431791857c | [
"MIT"
] | null | null | null | simpleflow/workflow.py | darkjh/simpleflow | b5809f931cd8c49034075a0967a800431791857c | [
"MIT"
] | null | null | null | simpleflow/workflow.py | darkjh/simpleflow | b5809f931cd8c49034075a0967a800431791857c | [
"MIT"
] | null | null | null | from __future__ import absolute_import
class Workflow(object):
"""
Main interface to define a workflow by submitting tasks for asynchronous
execution.
The actual behavior depends on the executor backend.
"""
def __init__(self, executor):
self._executor = executor
def submit(self... | 29.930556 | 77 | 0.618097 |
d238f45380c4d2460a0d1fe767605106259742e7 | 5,826 | py | Python | plugin.video.catchuptvandmore/resources/lib/channels/uk/bristoltv.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 2 | 2018-11-02T19:55:30.000Z | 2020-08-14T02:22:20.000Z | plugin.video.catchuptvandmore/resources/lib/channels/uk/bristoltv.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | null | null | null | plugin.video.catchuptvandmore/resources/lib/channels/uk/bristoltv.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 3 | 2019-12-17T20:47:00.000Z | 2021-02-11T19:03:59.000Z | # -*- coding: utf-8 -*-
"""
Catch-up TV & More
Copyright (C) 2019 SylvainCecchetto
This file is part of Catch-up TV & More.
Catch-up TV & More is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundat... | 36.4125 | 97 | 0.617576 |
4b1e5a7ac2c3f85516e1425dcf405698b8227188 | 1,245 | py | Python | tests/test_main.py | xcao8/Lesson1Assignment2 | fdc2017dc47dc133a0affb5f4eba78ae27a0eace | [
"MIT"
] | null | null | null | tests/test_main.py | xcao8/Lesson1Assignment2 | fdc2017dc47dc133a0affb5f4eba78ae27a0eace | [
"MIT"
] | null | null | null | tests/test_main.py | xcao8/Lesson1Assignment2 | fdc2017dc47dc133a0affb5f4eba78ae27a0eace | [
"MIT"
] | null | null | null | from unittest.mock import patch, call
from signal_interpreter_client.main import main, init, ArgumentParser, parse_arguments
class MockArguments:
"""This is class for mocking args"""
signal = "11"
@patch.object(ArgumentParser, "parse_args", return_value=MockArguments)
@patch.object(ArgumentParser, "add_argu... | 37.727273 | 98 | 0.769478 |
b922e43650075290682c4fbfe8975c6b6888fa74 | 10,785 | py | Python | main.py | Smith42/BEGAN | b5573d9aace1c9f2a8e578f055f9d7f10463116c | [
"MIT"
] | null | null | null | main.py | Smith42/BEGAN | b5573d9aace1c9f2a8e578f055f9d7f10463116c | [
"MIT"
] | null | null | null | main.py | Smith42/BEGAN | b5573d9aace1c9f2a8e578f055f9d7f10463116c | [
"MIT"
] | 1 | 2019-04-24T06:35:50.000Z | 2019-04-24T06:35:50.000Z | import tensorflow as tf
from generator import began_generator as generator
from discriminator import began_discriminator as discriminator
from utils.misc import my_loadData, dataIterator
from config import data_path
import tqdm
import h5py
import numpy as np
from utils.misc import plot_gens
from config import checkpoin... | 41.164122 | 99 | 0.577098 |
3f16caca9fd408b569c39b915488359f95ee0166 | 1,102 | py | Python | code_review.py | ivan-mihailov/Lambdata-IM | f79cd65cc7ef8826cb896d58eeba5f1f09f3c6c0 | [
"Apache-2.0"
] | null | null | null | code_review.py | ivan-mihailov/Lambdata-IM | f79cd65cc7ef8826cb896d58eeba5f1f09f3c6c0 | [
"Apache-2.0"
] | null | null | null | code_review.py | ivan-mihailov/Lambdata-IM | f79cd65cc7ef8826cb896d58eeba5f1f09f3c6c0 | [
"Apache-2.0"
] | null | null | null | import math
import sys
def exampl1():
# THIS IS A LONG COMMENT AND should be wrapped to fit within a
# 72 character limit
some_tuple = (1, 2, 3, 'a')
some_variable={
"long" : "LONG CODE LINES should be wrapped within 79 character to\
prevent page cutoff stuff",
"other" ... | 31.485714 | 75 | 0.558984 |
dc30c24d528f6471fa9f7fe0da25260f3c776eeb | 3,084 | py | Python | utils/gyb_syntax_support/Trivia.py | lwhsu/swift | e1e7a3fe75b4762d5e3d4d241f40b56946a03fdb | [
"Apache-2.0"
] | 5 | 2016-11-20T18:33:05.000Z | 2018-10-18T19:15:45.000Z | utils/gyb_syntax_support/Trivia.py | lwhsu/swift | e1e7a3fe75b4762d5e3d4d241f40b56946a03fdb | [
"Apache-2.0"
] | 1 | 2019-08-12T02:33:42.000Z | 2019-08-12T02:33:58.000Z | utils/gyb_syntax_support/Trivia.py | lwhsu/swift | e1e7a3fe75b4762d5e3d4d241f40b56946a03fdb | [
"Apache-2.0"
] | 4 | 2016-05-14T13:32:03.000Z | 2016-09-22T21:23:46.000Z | from Node import error
from kinds import lowercase_first_word # noqa: I201
class Trivia(object):
def __init__(self, name, comment, serialization_code, characters=[],
swift_characters=[], is_new_line=False, is_comment=False):
self.name = name
self.comment = comment
self.se... | 41.12 | 78 | 0.635214 |
f88114e1c9e20fa42bc2179f8f214c0ee5f5e74a | 114,876 | py | Python | pandas/core/internals/blocks.py | Xia-Sam/pandas | 74748b9967d102e8c91ad2ef96733c0c1dc98821 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/internals/blocks.py | Xia-Sam/pandas | 74748b9967d102e8c91ad2ef96733c0c1dc98821 | [
"BSD-3-Clause"
] | null | null | null | pandas/core/internals/blocks.py | Xia-Sam/pandas | 74748b9967d102e8c91ad2ef96733c0c1dc98821 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
import functools
import inspect
import re
import warnings
import numpy as np
from pandas._libs import internals as libinternals, lib, tslib, tslibs
from pandas._libs.tslibs import Timedelta, conversion
import pandas.compat as compat
from pandas.co... | 34.832019 | 79 | 0.569605 |
1ae0c4a183faec067972f91225759bad5623694b | 5,289 | py | Python | docs/source/conf.py | fnzr/adb_shell | 0feaf247cba07252d0209210598f02d8f5b29c25 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | fnzr/adb_shell | 0feaf247cba07252d0209210598f02d8f5b29c25 | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | fnzr/adb_shell | 0feaf247cba07252d0209210598f02d8f5b29c25 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.222857 | 117 | 0.64776 |
eb2fc816357a65656d525c1f3abfc4fbe6ee1a38 | 2,848 | py | Python | bluebottle/cms/views.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/cms/views.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/cms/views.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | from datetime import datetime, time
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.http.response import Http404
from pytz import timezone
from bluebottle.clients import properties
from bluebottle.cms.models import ResultPage, HomePage
from bluebottle.cms.serializers... | 30.623656 | 72 | 0.632022 |
65087b05cc0f16568d4925dfa3576d0f0a381ac8 | 35,577 | py | Python | xarray/core/combine.py | LEGOS-CTOH/xarray | d543d09aaa7fdfc4f5f92edcd4e3c0af1207c95b | [
"Apache-2.0"
] | 1 | 2021-02-12T02:15:33.000Z | 2021-02-12T02:15:33.000Z | xarray/core/combine.py | LEGOS-CTOH/xarray | d543d09aaa7fdfc4f5f92edcd4e3c0af1207c95b | [
"Apache-2.0"
] | null | null | null | xarray/core/combine.py | LEGOS-CTOH/xarray | d543d09aaa7fdfc4f5f92edcd4e3c0af1207c95b | [
"Apache-2.0"
] | null | null | null | import itertools
import warnings
from collections import Counter
from textwrap import dedent
import pandas as pd
from . import dtypes
from .concat import concat
from .dataarray import DataArray
from .dataset import Dataset
from .merge import merge
def _infer_concat_order_from_positions(datasets):
combined_ids =... | 36.753099 | 94 | 0.631616 |
4be407270135be5c387f40312609fcab80cb9b27 | 3,004 | py | Python | handlers/create_api_key.py | ServerlessOpsIO/wild-rydes-api-auth | d7c0b73213dc89cf0124b4682c67eb6854f3c181 | [
"BSD-2-Clause"
] | null | null | null | handlers/create_api_key.py | ServerlessOpsIO/wild-rydes-api-auth | d7c0b73213dc89cf0124b4682c67eb6854f3c181 | [
"BSD-2-Clause"
] | null | null | null | handlers/create_api_key.py | ServerlessOpsIO/wild-rydes-api-auth | d7c0b73213dc89cf0124b4682c67eb6854f3c181 | [
"BSD-2-Clause"
] | null | null | null | '''Create API key'''
import json
from lambda_decorators import dump_json_body, load_json_body, on_exception
from src import api_key, ddb, logging
from src.errors import ApiAuthSvcDuplicateApiKeyError, ApiAuthSvcCreateApiKeyFailedError, ApiAuthSvcInvalidRequestData, apig_responder
_logger = logging.get_logger(__name_... | 30.653061 | 134 | 0.696405 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.