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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27b183d627d557228a5c89c088d2f1e69f710f7a | 1,496 | py | Python | migrations/versions/6a0accee94b3_.py | npgeorge/twitter-bounty | 2730dc4f9b01ac3b632b3a0dfacf92e33df3789b | [
"MIT"
] | 3 | 2020-08-13T20:45:41.000Z | 2022-03-25T06:16:59.000Z | migrations/versions/6a0accee94b3_.py | npgeorge/twitter-bounty | 2730dc4f9b01ac3b632b3a0dfacf92e33df3789b | [
"MIT"
] | null | null | null | migrations/versions/6a0accee94b3_.py | npgeorge/twitter-bounty | 2730dc4f9b01ac3b632b3a0dfacf92e33df3789b | [
"MIT"
] | null | null | null | """empty message
Revision ID: 6a0accee94b3
Revises:
Create Date: 2020-06-25 00:44:29.146631
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '6a0accee94b3'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 31.166667 | 77 | 0.680481 |
700df8498ac108f45c70a448483cd8ec39717239 | 3,752 | py | Python | utility.py | lukovdm/NN-paper | daef51fe1305e4bdc268bba5da9309ace0578b47 | [
"MIT"
] | null | null | null | utility.py | lukovdm/NN-paper | daef51fe1305e4bdc268bba5da9309ace0578b47 | [
"MIT"
] | null | null | null | utility.py | lukovdm/NN-paper | daef51fe1305e4bdc268bba5da9309ace0578b47 | [
"MIT"
] | null | null | null | import tensorflow as tf
def variable_summaries(var, name):
"""Attach a lot of summaries to a Tensor."""
with tf.name_scope('summaries'):
mean = tf.reduce_mean(var)
tf.scalar_summary('mean/' + name, mean)
with tf.name_scope('stddev'):
stddev = tf.sqrt(tf.reduce_mean(tf.squar... | 42.636364 | 93 | 0.666311 |
0db662945fc9f7d8eb637fcf73b854a6e0abc7bd | 498 | py | Python | 2015/Day 8+/helpers/file.py | Fluxanoia/AdventOfCode | 1e5771860930dfa31bb488db11ee75eff5142b19 | [
"MIT"
] | null | null | null | 2015/Day 8+/helpers/file.py | Fluxanoia/AdventOfCode | 1e5771860930dfa31bb488db11ee75eff5142b19 | [
"MIT"
] | null | null | null | 2015/Day 8+/helpers/file.py | Fluxanoia/AdventOfCode | 1e5771860930dfa31bb488db11ee75eff5142b19 | [
"MIT"
] | null | null | null | import os
from typing import Optional
def drop_newline(str : str) -> str:
if len(str) > 0 and str[-1] == '\n':
return str[0:len(str) - 1]
return str
def load_file(number : int, drop_newlines : Optional[bool]) -> list[str]:
path = os.path.dirname(os.path.dirname(__file__))
path = os.path.join(p... | 33.2 | 73 | 0.64257 |
f499be08e376e79780fe4aabc5a919717de84b49 | 469 | py | Python | heart/migrations/0012_remove_trading_models.py | DarkoR12/dafi-system | f923ea4273b04f7acc7016b2f7d03e51eb00b85b | [
"MIT"
] | 7 | 2019-08-03T12:25:18.000Z | 2021-11-02T12:51:33.000Z | heart/migrations/0012_remove_trading_models.py | DarkoR12/dafi-system | f923ea4273b04f7acc7016b2f7d03e51eb00b85b | [
"MIT"
] | 11 | 2019-08-20T17:07:37.000Z | 2021-11-23T14:26:07.000Z | heart/migrations/0012_remove_trading_models.py | DarkoR12/dafi-system | f923ea4273b04f7acc7016b2f7d03e51eb00b85b | [
"MIT"
] | 4 | 2020-04-06T11:33:02.000Z | 2021-10-31T09:10:53.000Z | # Generated by Django 2.1.13 on 2019-11-02 12:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('heart', '0011_documentmedia_category'),
]
operations = [
migrations.RemoveField(
model_name='subject',
name='year',
... | 19.541667 | 49 | 0.547974 |
952c54d00d1f62fc0ea45ffa4b70b8b224f5c175 | 2,402 | py | Python | data/cirq_new/cirq_program/startCirq_Class726.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_Class726.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_Class726.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=21
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 33.361111 | 80 | 0.676936 |
c5c51352decdb969233fd587e57936fb32e7a2f9 | 17,210 | py | Python | test/test_user_tests.py | image72/browserscope | 44a63558ee376704d996851099bc7703128201cc | [
"Apache-2.0"
] | 22 | 2015-10-26T15:20:37.000Z | 2022-03-11T06:38:17.000Z | test/test_user_tests.py | image72/browserscope | 44a63558ee376704d996851099bc7703128201cc | [
"Apache-2.0"
] | 10 | 2016-01-22T18:46:19.000Z | 2019-07-19T12:49:51.000Z | test/test_user_tests.py | mcauer/browserscope | a9c0e1a250774f14689e06f93ad274d0b9d725e4 | [
"Apache-2.0"
] | 12 | 2015-10-17T09:40:44.000Z | 2019-06-08T19:54:36.000Z | #!/usr/bin/python2.5
#
# Copyright 2009 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 or ... | 36.852248 | 483 | 0.65828 |
9f82608e9e4ca0d5dc38ee2e206f834eab64ce48 | 2,737 | py | Python | tests/data23/recipe-213027.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-06-05T08:53:26.000Z | 2020-06-05T08:53:26.000Z | tests/data23/recipe-213027.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-06-04T13:47:19.000Z | 2020-06-04T13:47:57.000Z | tests/data23/recipe-213027.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-11-07T17:02:46.000Z | 2020-11-07T17:02:46.000Z | import copy
class _IDup(object):
"""Internal class used only to keep a reference on the actual iterator,
and to do housekeeping."""
def __init__(self,iterin):
self.__iter = iterin
self.__iterno = 0
self.__iteritems = []
self.__has... | 31.102273 | 79 | 0.500913 |
4a13aca846061d95fc97727280e81984c3f4de09 | 1,169 | py | Python | scripts/kmer.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | scripts/kmer.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | scripts/kmer.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | # https://rosalind.info/problems/kmer/
def fmtfa(fasta: list):
prev = True
header = []
seq = []
for f in fasta:
if ">" in f:
header.append(f[1:])
prev = True
elif prev:
seq.append(f)
prev = False
else:
seq[-1] += f
... | 19.483333 | 71 | 0.492729 |
a003815a242f8537a2bb5041697a0b5700e51fe0 | 111 | py | Python | Positive number.py | Pavithra120/positive-numbers- | a884e4c126483e983b84e6035e194c92249dbf07 | [
"MIT"
] | null | null | null | Positive number.py | Pavithra120/positive-numbers- | a884e4c126483e983b84e6035e194c92249dbf07 | [
"MIT"
] | null | null | null | Positive number.py | Pavithra120/positive-numbers- | a884e4c126483e983b84e6035e194c92249dbf07 | [
"MIT"
] | null | null | null | start, end = -4, 19
for num in range(start, end + 1):
if num >= 0:
print(num, end = " ")
| 11.1 | 34 | 0.45045 |
f7f47179de699961d9f8b77e8fa295cf2e988277 | 406 | py | Python | secrets.py | jimbobbennett/mandmcounter | 1edc39d42e0cd8249695a7f6397675b3291957bb | [
"MIT"
] | 1 | 2021-08-16T07:25:43.000Z | 2021-08-16T07:25:43.000Z | secrets.py | jimbobbennett/mandmcounter | 1edc39d42e0cd8249695a7f6397675b3291957bb | [
"MIT"
] | 2 | 2020-04-30T16:46:24.000Z | 2020-04-30T16:46:51.000Z | secrets.py | jimbobbennett/mandmcounter | 1edc39d42e0cd8249695a7f6397675b3291957bb | [
"MIT"
] | null | null | null | # This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it
# which would be not great. So, instead, keep it all in this one file and
# keep it a secret.
secrets = {
'ssid' : '<ssid>',
'password' : '<password>',
'prediction... | 33.833333 | 73 | 0.67734 |
be49bc9b1423fac0842c682b71c4aa731e3e5fd1 | 13,674 | py | Python | schedule/__init__.py | prayashm/schedule | 556de4d24cd11e6a79b71e838265636b33785420 | [
"MIT"
] | 7 | 2015-09-17T06:49:33.000Z | 2021-01-31T10:54:50.000Z | schedule/__init__.py | prayashm/schedule | 556de4d24cd11e6a79b71e838265636b33785420 | [
"MIT"
] | null | null | null | schedule/__init__.py | prayashm/schedule | 556de4d24cd11e6a79b71e838265636b33785420 | [
"MIT"
] | 8 | 2015-07-01T14:50:53.000Z | 2019-09-26T14:27:29.000Z | """
Python job scheduling for humans.
An in-process scheduler for periodic jobs that uses the builder pattern
for configuration. Schedule lets you run Python functions (or any other
callable) periodically at pre-determined intervals using a simple,
human-friendly syntax.
Inspired by Addam Wiggins' article "Rethinking... | 32.712919 | 79 | 0.582785 |
31435573885bcb872f31aaa226bef82c47ca5133 | 721 | py | Python | code_snippets/api-dashboard-update.py | directionless/datadog-documentation | 3b5efd463f1c0e2ab9ef984d60798cba418b496e | [
"BSD-3-Clause"
] | null | null | null | code_snippets/api-dashboard-update.py | directionless/datadog-documentation | 3b5efd463f1c0e2ab9ef984d60798cba418b496e | [
"BSD-3-Clause"
] | null | null | null | code_snippets/api-dashboard-update.py | directionless/datadog-documentation | 3b5efd463f1c0e2ab9ef984d60798cba418b496e | [
"BSD-3-Clause"
] | null | null | null | from datadog import initialize, api
options = {
'api_key': '9775a026f1ca7d1c6c5af9d94d9595a4',
'app_key': '87ce4a24b5553d2e482ea8a8500e71b8ad4554ff'
}
initialize(**options)
title = "My Timeboard"
description = "A new and improved timeboard!"
graphs = [{
"definition": {
"events": [],
"req... | 24.033333 | 139 | 0.654646 |
552f91ec18aa74463ae36f86141dca13ca7d85b1 | 2,351 | py | Python | Application/emotion_detect.py | Thehunk1206/Depression-Analysis | e8fa310bcd24e496fdf930b1ced1e9a77bf6a604 | [
"Apache-2.0"
] | 5 | 2020-09-02T20:35:17.000Z | 2021-10-10T07:33:36.000Z | Application/emotion_detect.py | Thehunk1206/Depression-Analysis | e8fa310bcd24e496fdf930b1ced1e9a77bf6a604 | [
"Apache-2.0"
] | 8 | 2020-09-25T22:14:58.000Z | 2021-11-10T19:59:28.000Z | Application/emotion_detect.py | Thehunk1206/Depression-Analysis | e8fa310bcd24e496fdf930b1ced1e9a77bf6a604 | [
"Apache-2.0"
] | 1 | 2021-11-12T11:10:42.000Z | 2021-11-12T11:10:42.000Z | import cv2
import tensorflow
from tensorflow.keras.preprocessing import image
from tensorflow.keras.models import load_model
import numpy as np
import pandas as pd
from datetime import datetime
from time import sleep
import sys
emotion_data_dict = {"time": [],
"emotions": []}
classes = ['Angry... | 25.835165 | 72 | 0.596767 |
4d3cf6ecb7bbe1562d87a7c553de4807d5d37be3 | 237 | py | Python | faker/providers/automotive/tl_PH/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 12,077 | 2015-01-01T18:30:07.000Z | 2022-03-31T23:22:01.000Z | faker/providers/automotive/tl_PH/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 1,306 | 2015-01-03T05:18:55.000Z | 2022-03-31T02:43:04.000Z | faker/providers/automotive/tl_PH/__init__.py | jacksmith15/faker | bc5dda1983e4d055aa2698ccf0806a462cb8370e | [
"MIT"
] | 1,855 | 2015-01-08T14:20:10.000Z | 2022-03-25T17:23:32.000Z | from ..en_PH import Provider as EnPhAutomotiveProvider
class Provider(EnPhAutomotiveProvider):
"""Implement automotive provider for ``tl_PH`` locale.
There is no difference from the ``en_PH`` implementation.
"""
pass
| 21.545455 | 61 | 0.725738 |
cc3f5bec137603f40a6e98a48ddaa36069c1442e | 5,777 | py | Python | tests/examples/test_longrun_actions.py | CareBT/carebt | 44c6da1e36e1f45baa5de5d5d9a5b733423c325d | [
"Apache-2.0"
] | 2 | 2021-11-08T12:19:39.000Z | 2021-12-02T16:10:05.000Z | tests/examples/test_longrun_actions.py | CareBT/carebt | 44c6da1e36e1f45baa5de5d5d9a5b733423c325d | [
"Apache-2.0"
] | null | null | null | tests/examples/test_longrun_actions.py | CareBT/carebt | 44c6da1e36e1f45baa5de5d5d9a5b733423c325d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Andreas Steck (steck.andi@gmail.com)
#
# 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 ... | 56.087379 | 95 | 0.67336 |
6b62189a09adb28357b1388a809f9b974687478a | 320 | py | Python | botmanager/plugins/transmission.py | edybsd/BotManager | 17e091f9b4b8522f605ccc231fdb0828c2cf8dc4 | [
"BSD-2-Clause"
] | null | null | null | botmanager/plugins/transmission.py | edybsd/BotManager | 17e091f9b4b8522f605ccc231fdb0828c2cf8dc4 | [
"BSD-2-Clause"
] | null | null | null | botmanager/plugins/transmission.py | edybsd/BotManager | 17e091f9b4b8522f605ccc231fdb0828c2cf8dc4 | [
"BSD-2-Clause"
] | null | null | null | def get_instance(config=None):
return PluginTransmission(config)
class PluginTransmission(object):
def __init__(self,config=None):
pass
def get_commands(self):
print("PluginTransmission get_commands")
def process_command(self, args):
print("PluginTransmission process_command") | 26.666667 | 51 | 0.721875 |
30092b6ebc5b3164fdd28437d63b1823e32f13c7 | 7,691 | py | Python | experiments/ashvin/corl2019/debug/pusher2/offpolicy_ccrig1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/debug/pusher2/offpolicy_ccrig1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/corl2019/debug/pusher2/offpolicy_ccrig1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | import rlkit.misc.hyperparameter as hyp
from experiments.murtaza.multiworld.skew_fit.reacher.generate_uniform_dataset import generate_uniform_dataset_reacher
from multiworld.envs.mujoco.cameras import sawyer_init_camera_zoomed_in, sawyer_pusher_camera_upright_v2
from rlkit.launchers.launcher_util import run_experiment
... | 37.334951 | 155 | 0.596281 |
02b2d5e14d7abfeb946a6383486c603fe0ad898f | 4,410 | py | Python | airflow/providers/google/cloud/sensors/dataproc.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2017-08-06T23:19:48.000Z | 2018-05-11T05:50:25.000Z | airflow/providers/google/cloud/sensors/dataproc.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 20 | 2016-11-21T22:54:28.000Z | 2018-10-28T20:03:13.000Z | airflow/providers/google/cloud/sensors/dataproc.py | holly-evans/airflow | 865406cbab4defd35c95afbf0a8d5987ff7788b1 | [
"Apache-2.0"
] | 3 | 2016-10-13T09:59:18.000Z | 2017-02-22T11:29:09.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.72973 | 107 | 0.666213 |
944067c44c012bc1f1b98b2d90a4711327c54210 | 544 | py | Python | manage.py | shivamsinghal212/Url-Shortener | 4127a993272744f6f8592415314c8e8514d43153 | [
"MIT"
] | 1 | 2018-11-17T16:19:57.000Z | 2018-11-17T16:19:57.000Z | manage.py | Akatsuki06/URLShortener | 44dbbbeaae9e610111a50aa6aca4d2bed1ca5f34 | [
"MIT"
] | 8 | 2020-06-05T18:23:15.000Z | 2022-03-11T23:23:57.000Z | manage.py | Akatsuki06/URLShortener | 44dbbbeaae9e610111a50aa6aca4d2bed1ca5f34 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "URLShortener.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django.... | 34 | 76 | 0.689338 |
20a743e300c926ca1ef1015884fd765c45bd02b8 | 26,296 | py | Python | endpoints_management/control/wsgi.py | robcharlwood/endpoints-management-python | 9c69f0766f33faf89a69af9e6bd2aeeb3253b588 | [
"Apache-2.0"
] | null | null | null | endpoints_management/control/wsgi.py | robcharlwood/endpoints-management-python | 9c69f0766f33faf89a69af9e6bd2aeeb3253b588 | [
"Apache-2.0"
] | null | null | null | endpoints_management/control/wsgi.py | robcharlwood/endpoints-management-python | 9c69f0766f33faf89a69af9e6bd2aeeb3253b588 | [
"Apache-2.0"
] | null | null | null | # 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 agree... | 38.22093 | 94 | 0.655575 |
b2a87acaec55bbd5085906a5d7d60aa258f3c3f1 | 9,580 | py | Python | dowhy/causal_estimators/distance_matching_estimator.py | leo-ware/dowhy | 3a2a79e2159a7f29456dd419a3c90395a384364e | [
"MIT"
] | 2,904 | 2019-05-07T08:09:33.000Z | 2022-03-31T18:28:41.000Z | dowhy/causal_estimators/distance_matching_estimator.py | leo-ware/dowhy | 3a2a79e2159a7f29456dd419a3c90395a384364e | [
"MIT"
] | 238 | 2019-05-11T02:57:22.000Z | 2022-03-31T23:47:18.000Z | dowhy/causal_estimators/distance_matching_estimator.py | leo-ware/dowhy | 3a2a79e2159a7f29456dd419a3c90395a384364e | [
"MIT"
] | 527 | 2019-05-08T16:23:45.000Z | 2022-03-30T21:02:41.000Z | from sklearn.neighbors import NearestNeighbors
import pandas as pd
import numpy as np
from dowhy.causal_estimator import CausalEstimate, CausalEstimator
class DistanceMatchingEstimator(CausalEstimator):
""" Simple matching estimator for binary treatments based on a distance metric.
"""
Valid_Dist_Metric_... | 47.425743 | 134 | 0.599374 |
a4b64bd0f91b5e79be86872b9a0ed92efc692be7 | 9,015 | py | Python | test/unit/test_router.py | vzhd1701/plugin.video.kinomanuz | 4344ccc351d20c6da92b2bda6982adcdf47b1037 | [
"MIT"
] | 1 | 2020-02-22T18:21:09.000Z | 2020-02-22T18:21:09.000Z | test/unit/test_router.py | vzhd1701/plugin.video.kinomanuz | 4344ccc351d20c6da92b2bda6982adcdf47b1037 | [
"MIT"
] | null | null | null | test/unit/test_router.py | vzhd1701/plugin.video.kinomanuz | 4344ccc351d20c6da92b2bda6982adcdf47b1037 | [
"MIT"
] | null | null | null | # coding=utf-8
# pylint: disable=protected-access, no-self-use
import unittest
try:
import mock
except ImportError:
from unittest import mock
from resources.internal import router
class TestPathSections(unittest.TestCase):
def test_good_path(self):
test_paths = (
("/", [""]),
... | 31.193772 | 88 | 0.63239 |
ff072c40b9b43d8d50805e25ea6d19add99f26d7 | 388 | py | Python | python-leetcode/1103.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 12 | 2020-01-16T08:55:27.000Z | 2021-12-02T14:52:39.000Z | python-leetcode/1103.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | null | null | null | python-leetcode/1103.py | MDGSF/interviews | 9faa9aacdb0cfbb777d4d3d4d1b14b55ca2c9f76 | [
"MIT"
] | 1 | 2019-12-11T12:00:38.000Z | 2019-12-11T12:00:38.000Z | class Solution:
def distributeCandies(self, candies: int, num_people: int) -> List[int]:
result = [0] * num_people
i, curCandy = 0, 1
while candies > 0:
if candies > curCandy:
result[i] += curCandy
candies -= curCandy
curCandy += 1
i = (i + 1) % num_people
else:... | 25.866667 | 74 | 0.554124 |
0aae5df144d2b8ea9d5fc26d186fd14c2a2416ed | 18,271 | py | Python | uniswap/analyse.py | amis-erc20/uniswap-analytics | 16eb90d29a2266fdd7c81cfdb2c39eeef24a2bff | [
"MIT"
] | null | null | null | uniswap/analyse.py | amis-erc20/uniswap-analytics | 16eb90d29a2266fdd7c81cfdb2c39eeef24a2bff | [
"MIT"
] | null | null | null | uniswap/analyse.py | amis-erc20/uniswap-analytics | 16eb90d29a2266fdd7c81cfdb2c39eeef24a2bff | [
"MIT"
] | null | null | null | import json
import logging
import os
import pickle
from collections import defaultdict
from math import sqrt
from typing import List, Iterable
import requests
from retrying import retry
from web3.utils.events import get_event_data
from config import uniswap_factory, web3, pool, UNISWAP_EXCHANGE_ABI, STR_ERC_20_ABI, H... | 42.889671 | 120 | 0.611461 |
0fa7e5940a3efaa3078a2054fcc5d5cf3210e535 | 1,106 | py | Python | onlinecourse/admin.py | serenagomez1304/final-cloud-app-with-database-master | 33a7b23b9e89951a0e970abd1f9c2630b780699f | [
"Apache-2.0"
] | null | null | null | onlinecourse/admin.py | serenagomez1304/final-cloud-app-with-database-master | 33a7b23b9e89951a0e970abd1f9c2630b780699f | [
"Apache-2.0"
] | null | null | null | onlinecourse/admin.py | serenagomez1304/final-cloud-app-with-database-master | 33a7b23b9e89951a0e970abd1f9c2630b780699f | [
"Apache-2.0"
] | 1 | 2022-01-05T10:46:15.000Z | 2022-01-05T10:46:15.000Z | from django.contrib import admin
# <HINT> Import any new Models here
from .models import Course, Lesson, Instructor, Learner, Question, Choice, Submission
# <HINT> Register QuestionInline and ChoiceInline classes here
class QuestionInline(admin.StackedInline):
model = Question
extra = 5
class ChoiceInline(adm... | 26.333333 | 85 | 0.738698 |
0e0b4c61469d6d32cd0c2d788f8ca518089c0e1d | 5,210 | py | Python | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py | szymanskilukasz/Lean | fe2ac131af2d0614494e5c970a57d4b7c89d5f88 | [
"Apache-2.0"
] | 1 | 2020-09-01T05:39:38.000Z | 2020-09-01T05:39:38.000Z | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py | szymanskilukasz/Lean | fe2ac131af2d0614494e5c970a57d4b7c89d5f88 | [
"Apache-2.0"
] | null | null | null | Algorithm.Python/IndexOptionShortCallOTMExpiryRegressionAlgorithm.py | szymanskilukasz/Lean | fe2ac131af2d0614494e5c970a57d4b7c89d5f88 | [
"Apache-2.0"
] | null | null | null | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Licen... | 52.626263 | 173 | 0.714012 |
e00986b493538e0bfc7d007b9dec7675149a0854 | 4,338 | py | Python | test/db_task_history_test.py | vgmartinez/luigi | b5ad3eba1501bdc25e91e98901bc781128f2d8a7 | [
"Apache-2.0"
] | 1 | 2021-05-26T09:41:53.000Z | 2021-05-26T09:41:53.000Z | test/db_task_history_test.py | vgmartinez/luigi | b5ad3eba1501bdc25e91e98901bc781128f2d8a7 | [
"Apache-2.0"
] | null | null | null | test/db_task_history_test.py | vgmartinez/luigi | b5ad3eba1501bdc25e91e98901bc781128f2d8a7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | 35.557377 | 109 | 0.681189 |
653df36c1cb3cb9d80f454ee88d3e1ebcd7108b4 | 44,231 | py | Python | octavia/tests/unit/common/sample_configs/sample_configs_combined.py | buty4649/octavia | a4aa03d3bc98eb27cc353140cd998a623baa505f | [
"Apache-2.0"
] | null | null | null | octavia/tests/unit/common/sample_configs/sample_configs_combined.py | buty4649/octavia | a4aa03d3bc98eb27cc353140cd998a623baa505f | [
"Apache-2.0"
] | 2 | 2018-09-28T08:41:14.000Z | 2019-08-01T11:20:37.000Z | octavia/tests/unit/common/sample_configs/sample_configs_combined.py | buty4649/octavia | a4aa03d3bc98eb27cc353140cd998a623baa505f | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 OpenStack Foundation
#
# 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 ... | 38.064544 | 79 | 0.607673 |
a5cf9f6c5bbac2ca12cb22ccc39fdb4660d9d460 | 1,560 | py | Python | Expenses/migrations/0001_initial.py | adithyanps/netprofit-django | 7ba87f054d09a201352635bb6cf8d0112208609e | [
"MIT"
] | null | null | null | Expenses/migrations/0001_initial.py | adithyanps/netprofit-django | 7ba87f054d09a201352635bb6cf8d0112208609e | [
"MIT"
] | null | null | null | Expenses/migrations/0001_initial.py | adithyanps/netprofit-django | 7ba87f054d09a201352635bb6cf8d0112208609e | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-23 04:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('Masters', '0001_initial'),
('Journal_Entry', '0001_initial'),
]
operations = [
... | 41.052632 | 154 | 0.612821 |
1479c743fd165ee0c2c6dd08fcf2ba7cdd8165e5 | 734 | py | Python | ffwd_rec/params/red_arec025_params.py | Felix11H/OCNC17_Rosenbaum2017 | 15c2eea6c46e3bbe8d505365465364b83a30de78 | [
"MIT"
] | null | null | null | ffwd_rec/params/red_arec025_params.py | Felix11H/OCNC17_Rosenbaum2017 | 15c2eea6c46e3bbe8d505365465364b83a30de78 | [
"MIT"
] | 3 | 2020-05-06T13:20:50.000Z | 2020-05-06T13:20:50.000Z | ffwd_rec/params/red_arec025_params.py | felix11h/OCNC17_Rosenbaum2017 | 15c2eea6c46e3bbe8d505365465364b83a30de78 | [
"MIT"
] | null | null | null |
from brian2.units import *
param_set = 'red'
Ne= 63**2
Ni= 32**2
N = Ne+Ni
tau_e = 15*ms
tau_i = 10*ms
E_L = -60*mV
V_T = -50*mV
V_re = -65*mV
V_th = -10*mV
DelT_e = 2*mV
DelT_i = 0.5*mV
ref_e = 1.5*ms
ref_i = 0.5*ms
tau_syn_e = 6*ms
tau_syn_i = 5*ms
tau_syn_f = tau_syn_e
j_ee = 40*mV / (N**0.5)
j_ie = 120... | 12.877193 | 45 | 0.585831 |
f06b5443e818839f2f36833a824a52a216d50a17 | 4,094 | py | Python | plaidml/plaidml_setup.py | nitescuc/plaidml | 83a81af049154a2701c4fde315b5ee9bc7050a7a | [
"Apache-2.0"
] | null | null | null | plaidml/plaidml_setup.py | nitescuc/plaidml | 83a81af049154a2701c4fde315b5ee9bc7050a7a | [
"Apache-2.0"
] | null | null | null | plaidml/plaidml_setup.py | nitescuc/plaidml | 83a81af049154a2701c4fde315b5ee9bc7050a7a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Creates a plaidml user configuration file."""
from __future__ import print_function
import sys
from six.moves import input
import plaidml
import plaidml.exceptions
import plaidml.settings
def main():
ctx = plaidml.Context()
plaidml.quiet()
def choice_prompt(question, choices, ... | 33.834711 | 99 | 0.617 |
fb97542f8df39a1e521fa46a20a797bd086be65e | 723 | py | Python | low_pass_filter.py | harshmathur1990/image-processing-learn | 3b51b243927f42efe9889310c8dacd5f8d857c76 | [
"MIT"
] | null | null | null | low_pass_filter.py | harshmathur1990/image-processing-learn | 3b51b243927f42efe9889310c8dacd5f8d857c76 | [
"MIT"
] | null | null | null | low_pass_filter.py | harshmathur1990/image-processing-learn | 3b51b243927f42efe9889310c8dacd5f8d857c76 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
def do():
image = cv2.imread('raw_images/dog.png')
height, width, channels = image.shape
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
fft_gray = np.fft.fft2(gray_image)
fft_shift_gray_image = np.fft.fftshift(fft_gray)
center_x, center_y = height/2, width... | 24.931034 | 65 | 0.644537 |
0d122bd8bc4b11065f4416b4a8b904b92a5f2ee9 | 3,687 | py | Python | data/pipeline/run/60_jpl/jpl_lookup.py | oneokorganization/asterank | b3194e3852f9bd4d671a63a4261fb985057ffadc | [
"MIT"
] | 184 | 2015-01-03T21:53:31.000Z | 2022-02-25T10:06:36.000Z | data/pipeline/run/60_jpl/jpl_lookup.py | oneokorganization/asterank | b3194e3852f9bd4d671a63a4261fb985057ffadc | [
"MIT"
] | 14 | 2016-06-14T21:01:33.000Z | 2022-03-11T23:19:48.000Z | data/pipeline/run/60_jpl/jpl_lookup.py | oneokorganization/asterank | b3194e3852f9bd4d671a63a4261fb985057ffadc | [
"MIT"
] | 53 | 2015-03-25T09:51:17.000Z | 2021-11-01T21:11:31.000Z | #!/usr/bin/env python
#
# Client for live queries to JPL database lookup
#
import sys
import urllib
import re
import json
import time
from bs4 import BeautifulSoup
from datetime import datetime
class Asteroid:
def __init__(self, name):
self.name = name
def load(self):
r = JPL_Query(self.name)
self.d... | 29.031496 | 102 | 0.606184 |
e2ed001e8cef21fe43b434a2cf2a16e975f15620 | 135 | py | Python | text/_cascade/_form/prefix.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/_cascade/_form/prefix.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | text/_cascade/_form/prefix.py | jedhsu/text | 8525b602d304ac571a629104c48703443244545c | [
"Apache-2.0"
] | null | null | null | """
Vendor prefixing.
"""
class VendorPrefixing:
EPub = "epub"
Moz = "moz"
Ms = "ms"
O = "o"
Webkit = "webkit"
| 9.642857 | 22 | 0.496296 |
1dd7e63c393496fa6ad555982c5795f1aa199658 | 342 | py | Python | setup.py | awblocker/exif2kmz | 0eb0357078b3fa50c7180f518d219138eb87e599 | [
"MIT"
] | 1 | 2020-01-11T10:23:41.000Z | 2020-01-11T10:23:41.000Z | setup.py | awblocker/exif2kmz | 0eb0357078b3fa50c7180f518d219138eb87e599 | [
"MIT"
] | null | null | null | setup.py | awblocker/exif2kmz | 0eb0357078b3fa50c7180f518d219138eb87e599 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
setup(name='exif2kmz',
version='0.1',
description='Converts EXIF geotagged images to KMZ',
author='Alexander W Blocker',
author_email='ablocker (at) gmail (dot) com',
scripts=['scripts/exif2kmz'],
requires=['Image (>=1.5)','pye... | 26.307692 | 58 | 0.625731 |
5fcac3fa74204fe751f1b8a1edc12a08afecdf0c | 626 | py | Python | Archive/Scattering/data_test/code/plot_data.py | merny93/tornado | a0d92dcede59a63eb6d765d5bbf04af5eb266ea0 | [
"MIT"
] | null | null | null | Archive/Scattering/data_test/code/plot_data.py | merny93/tornado | a0d92dcede59a63eb6d765d5bbf04af5eb266ea0 | [
"MIT"
] | null | null | null | Archive/Scattering/data_test/code/plot_data.py | merny93/tornado | a0d92dcede59a63eb6d765d5bbf04af5eb266ea0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jan 11 17:31:41 2021
@author: David
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
data_df = pd.read_csv('Na-22_Calibration_009.csv', skiprows = 6)
x = np.array(data_df['Channel'])
y = np.array(data_df['Counts... | 20.866667 | 64 | 0.680511 |
d9422b20319f8d9d49400e67c3326311af1b5632 | 534 | py | Python | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/beatclub-32518 | 482bc4a2eba8adadefdd289ce82b0fafd98d02b8 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/beatclub-32518 | 482bc4a2eba8adadefdd289ce82b0fafd98d02b8 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/beatclub-32518 | 482bc4a2eba8adadefdd289ce82b0fafd98d02b8 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "beatclub-32518.botics.co"
site_params = {
"name": "BeatClub",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.update_or_create... | 20.538462 | 61 | 0.655431 |
0666f1aa1daa54ca9ea02bcba9f55adf89fd152e | 696 | py | Python | new_nearby_places.py | Atulbargotra/smart_driving | 7356b468260c1f102528df702c412f3e9cbd74d5 | [
"MIT"
] | 4 | 2020-02-21T18:25:38.000Z | 2021-11-14T20:23:15.000Z | new_nearby_places.py | Atulbargotra/smart_driving | 7356b468260c1f102528df702c412f3e9cbd74d5 | [
"MIT"
] | 3 | 2020-02-21T17:58:58.000Z | 2020-02-21T17:58:59.000Z | new_nearby_places.py | Atulbargotra/smart_driving | 7356b468260c1f102528df702c412f3e9cbd74d5 | [
"MIT"
] | 4 | 2020-02-21T18:25:43.000Z | 2021-01-13T10:04:20.000Z | import requests
import json
from text_to_speech import speak
from location import get_location
import os
from dotenv import load_dotenv
load_dotenv()
def get_Nearest_Petrol_Station(longitude,latitude,category,radius=2000):
API_KEY = os.getenv('HERE_MAPS_API_KEY')
url = f"https://places.sit.ls.hereapi.com/places... | 40.941176 | 139 | 0.735632 |
465e6a1be7cfe5e7a67fc8f2b4db6b085d24a564 | 3,014 | py | Python | docs/report/cloudmesh-openapi/tests/deprecated/test_generator_broken.py | rickotten/cybertraining-dsc.github.io | c8ea59be4f09fd543040ba0908af118df5820a70 | [
"Apache-2.0"
] | 7 | 2020-02-29T14:53:19.000Z | 2021-01-17T17:08:44.000Z | tests/deprecated/test_generator_broken.py | imishra1/cloudmesh-openapi | 89fdc74aae459aba4ebb959f8564bb3ddd967cbb | [
"Apache-2.0"
] | 27 | 2020-02-29T13:38:11.000Z | 2020-09-02T20:24:59.000Z | tests/deprecated/test_generator_broken.py | imishra1/cloudmesh-openapi | 89fdc74aae459aba4ebb959f8564bb3ddd967cbb | [
"Apache-2.0"
] | 6 | 2020-03-02T17:09:14.000Z | 2020-10-30T22:48:01.000Z | ###############################################################
# pytest -v --capture=no tests/test_03_generator.py
# pytest -v tests/test_03_generator.py
# pytest -v --capture=no tests/test_generator..py::Test_name::<METHODNAME>
###############################################################
import sys
import pytes... | 37.675 | 124 | 0.577306 |
9ad1d136b8e92555bdb0708d9469500892b9f9f3 | 2,712 | py | Python | lib/models/centernet3d.py | sjg02122/monodle | 9eaf405b206f71ae13a5b86ad7a47f44f3b060a9 | [
"MIT"
] | 92 | 2021-03-31T02:40:27.000Z | 2022-03-30T03:35:27.000Z | lib/models/centernet3d.py | sjg02122/monodle | 9eaf405b206f71ae13a5b86ad7a47f44f3b060a9 | [
"MIT"
] | 22 | 2021-06-17T02:32:26.000Z | 2022-01-30T14:23:41.000Z | lib/models/centernet3d.py | sjg02122/monodle | 9eaf405b206f71ae13a5b86ad7a47f44f3b060a9 | [
"MIT"
] | 17 | 2021-06-13T23:39:30.000Z | 2022-03-03T07:09:14.000Z | import os
import cv2
import torch
import torch.nn as nn
import numpy as np
from lib.backbones import dla
from lib.backbones.dlaup import DLAUp
from lib.backbones.hourglass import get_large_hourglass_net
from lib.backbones.hourglass import load_pretrian_model
class CenterNet3D(nn.Module):
def __init__(self, back... | 33.073171 | 129 | 0.619469 |
f7fd7ca8d0f5e73967a4f5b5743658a0a4422e31 | 186 | py | Python | lib/matplotlib/tri/__init__.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | lib/matplotlib/tri/__init__.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/tri/__init__.py | pierre-haessig/matplotlib | 0d945044ca3fbf98cad55912584ef80911f330c6 | [
"MIT",
"PSF-2.0",
"BSD-3-Clause"
] | 3 | 2017-05-31T01:42:22.000Z | 2020-06-23T13:57:49.000Z | """
Unstructured triangular grid functions.
"""
from __future__ import print_function
from triangulation import *
from tricontour import *
from tripcolor import *
from triplot import *
| 18.6 | 39 | 0.795699 |
97c185cba0123127a9989e963eb959275c5b9778 | 163 | py | Python | backend/app/error.py | Orenoid/online-clipboard | 2de2d1a096f7e5cc76c6168b5aa9ea41d5f474bd | [
"MIT"
] | 2 | 2020-05-22T07:44:18.000Z | 2020-06-07T13:57:26.000Z | app/utils/exception.py | Orenoid/wechat-push | 735d77b5a9f693bce99b8e4eb91173ca4dd1e8c6 | [
"MIT"
] | 2 | 2022-02-19T02:43:56.000Z | 2022-02-27T05:25:24.000Z | app/utils/exception.py | Orenoid/wechat-push | 735d77b5a9f693bce99b8e4eb91173ca4dd1e8c6 | [
"MIT"
] | null | null | null | from flask import current_app
def handle_exception(e: Exception):
current_app.logger.exception('Uncaught exception')
return 'Internal Server Error', 500
| 23.285714 | 54 | 0.773006 |
0e59d5e43b142f7db499d95ae9936c011c432d04 | 6,818 | py | Python | tests/test_minas_fake.py | luis-puhl/minas-py | 7a665da366ab65bbb05b1713292492cf5ab4a859 | [
"MIT"
] | 4 | 2019-05-01T01:29:32.000Z | 2019-06-22T08:16:20.000Z | tests/test_minas_fake.py | luis-puhl/minas-py | 7a665da366ab65bbb05b1713292492cf5ab4a859 | [
"MIT"
] | 3 | 2020-03-24T17:04:13.000Z | 2021-06-08T19:50:48.000Z | tests/test_minas_fake.py | luis-puhl/minas-py | 7a665da366ab65bbb05b1713292492cf5ab4a859 | [
"MIT"
] | null | null | null | import unittest
import os
import queue
import asyncio
import time
import sys
import shutil
import logging
import csv
import io
from typing import List
from copy import deepcopy
import yaml
import matplotlib
import numpy as np
import pandas as pd
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from dask.distribut... | 42.08642 | 113 | 0.544001 |
e5e840243029a4e7d504e4ebdbf7facab8e65842 | 10,136 | py | Python | affinity_pred/model.py | jglaser/affinity_pred | b51ba839449f828706b9179949015e27ae18960b | [
"BSD-2-Clause"
] | null | null | null | affinity_pred/model.py | jglaser/affinity_pred | b51ba839449f828706b9179949015e27ae18960b | [
"BSD-2-Clause"
] | null | null | null | affinity_pred/model.py | jglaser/affinity_pred | b51ba839449f828706b9179949015e27ae18960b | [
"BSD-2-Clause"
] | null | null | null | from transformers import BertModel, BertConfig
from transformers.models.bert.modeling_bert import BertAttention, BertIntermediate, BertOutput
from transformers.modeling_utils import apply_chunking_to_forward
from transformers.deepspeed import deepspeed_config, is_deepspeed_zero3_enabled
import torch
import torch.nn a... | 41.540984 | 161 | 0.666831 |
acb4031e948d8ccb8e03d7be83f20f365f46336c | 1,201 | py | Python | snippets/telegram-user-by-id.py | orsinium/notes | 3e08977ee3329c09ab8a46b0e35a45ab65b93910 | [
"CC-BY-4.0"
] | 35 | 2018-05-17T10:11:45.000Z | 2022-02-27T21:22:38.000Z | snippets/telegram-user-by-id.py | orsinium/notes | 3e08977ee3329c09ab8a46b0e35a45ab65b93910 | [
"CC-BY-4.0"
] | 7 | 2018-07-06T14:00:43.000Z | 2019-01-28T11:03:43.000Z | snippets/telegram-user-by-id.py | orsinium/notes | 3e08977ee3329c09ab8a46b0e35a45ab65b93910 | [
"CC-BY-4.0"
] | 13 | 2018-05-23T06:02:16.000Z | 2021-04-25T18:15:10.000Z | """
This script allow you to send in Telegram message with link on user.
If user has login, you can just send "@login" message, and telegram
transform it into link on user profile.
However you cannot do it if user has no login.
In this case you need to this snippet.
This snippet get `user_id`, transfor it to link on ... | 26.108696 | 79 | 0.685262 |
b68a63b87562af78135570d473b227f2474ade0c | 558 | py | Python | packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/sunburst/marker/colorbar/_showticksuffix.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self,
plotly_name="showticksuffix",
parent_name="sunburst.marker.colorbar",
**kwargs,
):
super(ShowticksuffixValidator, self).__init__(
... | 31 | 80 | 0.625448 |
41722bd3779d99fd471e8bc7027cfb51cfa46439 | 19,726 | py | Python | tools/tune.py | Anonymous502/siamfda-for-eccv | 72dff5c174b7ebe30c59a6e21bb6f06fdb06c3fb | [
"Apache-2.0"
] | null | null | null | tools/tune.py | Anonymous502/siamfda-for-eccv | 72dff5c174b7ebe30c59a6e21bb6f06fdb06c3fb | [
"Apache-2.0"
] | null | null | null | tools/tune.py | Anonymous502/siamfda-for-eccv | 72dff5c174b7ebe30c59a6e21bb6f06fdb06c3fb | [
"Apache-2.0"
] | 2 | 2021-01-17T00:17:09.000Z | 2022-02-17T14:18:43.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import argparse
import os
import cv2
import torch
import numpy as np
from tqdm import tqdm
from multiprocessing import Pool
from SiamFDA.core.config import cfg
from ... | 40.84058 | 122 | 0.547045 |
aa14a51d1a964f5a4cd9afef0127078c0af984fc | 482 | py | Python | 06. Django + React.js apps/Todo app with CRUD functionality/backend/todolistapp/todoapp/migrations/0002_auto_20201007_0208.py | rexsimiloluwah/Python-Experiments | 63291ab7fe11e61cce2a936dd41b31f0eb35cc1f | [
"MIT"
] | 1 | 2021-01-21T11:39:07.000Z | 2021-01-21T11:39:07.000Z | 06. Django + React.js apps/Todo app with CRUD functionality/backend/todolistapp/todoapp/migrations/0002_auto_20201007_0208.py | rexsimiloluwah/Python-Experiments | 63291ab7fe11e61cce2a936dd41b31f0eb35cc1f | [
"MIT"
] | null | null | null | 06. Django + React.js apps/Todo app with CRUD functionality/backend/todolistapp/todoapp/migrations/0002_auto_20201007_0208.py | rexsimiloluwah/Python-Experiments | 63291ab7fe11e61cce2a936dd41b31f0eb35cc1f | [
"MIT"
] | 1 | 2021-01-21T11:39:19.000Z | 2021-01-21T11:39:19.000Z | # Generated by Django 3.1.1 on 2020-10-07 01:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('todoapp', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='todo',
name='priority',
f... | 25.368421 | 157 | 0.587137 |
919c1eece5637c80fb502711f07a3788b0b59d0d | 4,838 | py | Python | bcs-ui/backend/tests/container_service/clusters/tools/test_node.py | liuchenyiwork/bk-bcs | 63b3b844e90bbd240e216cce94b5ba08c28d5282 | [
"Apache-2.0"
] | 1 | 2021-11-16T08:15:13.000Z | 2021-11-16T08:15:13.000Z | bcs-ui/backend/tests/container_service/clusters/tools/test_node.py | Maclon9573/bk-bcs | b062fa6659490087441c0f405af612afcbadeda5 | [
"Apache-2.0"
] | null | null | null | bcs-ui/backend/tests/container_service/clusters/tools/test_node.py | Maclon9573/bk-bcs | b062fa6659490087441c0f405af612afcbadeda5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 48.868687 | 116 | 0.763745 |
9960cabacbaa8be97139840d045c5b7c82419def | 32,368 | py | Python | highway_merge.py | NKAmapper/highway_merge | 996575b12f515ae9640d592914837d426abc0e63 | [
"CC0-1.0"
] | null | null | null | highway_merge.py | NKAmapper/highway_merge | 996575b12f515ae9640d592914837d426abc0e63 | [
"CC0-1.0"
] | null | null | null | highway_merge.py | NKAmapper/highway_merge | 996575b12f515ae9640d592914837d426abc0e63 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf8
# highway_merge.py
# Replace OSM highways with NVDB (or Elveg)
# Usage: python highway_merge.py [command] [input_osm.osm] [input_nvdb.osm]
# Commands: - replace: Merge all existing OSM highways with NVDB
# - offset: Include all NVDB highways above an certain average offset
#... | 31.486381 | 149 | 0.670137 |
bb1a85fa37be2826078b8cf05d2ccd279cd7ccce | 44 | py | Python | accountifie/common/view_components/__init__.py | imcallister/accountifie | 094834c9d632e0353e3baf8d924eeb10cba0add4 | [
"MIT",
"Unlicense"
] | 4 | 2017-06-02T08:48:48.000Z | 2021-11-21T23:57:15.000Z | accountifie/common/view_components/__init__.py | imcallister/accountifie | 094834c9d632e0353e3baf8d924eeb10cba0add4 | [
"MIT",
"Unlicense"
] | 3 | 2020-06-05T16:55:42.000Z | 2021-06-10T17:43:12.000Z | accountifie/common/view_components/__init__.py | imcallister/accountifie | 094834c9d632e0353e3baf8d924eeb10cba0add4 | [
"MIT",
"Unlicense"
] | 4 | 2015-12-15T14:27:51.000Z | 2017-04-21T21:42:27.000Z | from .modals import *
from .tables import *
| 14.666667 | 21 | 0.727273 |
c86a19e93a495a3e851915ed30c0594b51911c58 | 461 | py | Python | lib/constants.py | Ucnt/aws-s3-webpage-searcher | 156ba5ad299ad95ebb90ca4acc91a3236b166892 | [
"MIT"
] | 6 | 2018-07-08T09:59:56.000Z | 2020-09-09T23:35:54.000Z | lib/constants.py | Ucnt/aws-s3-webpage-searcher | 156ba5ad299ad95ebb90ca4acc91a3236b166892 | [
"MIT"
] | null | null | null | lib/constants.py | Ucnt/aws-s3-webpage-searcher | 156ba5ad299ad95ebb90ca4acc91a3236b166892 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from lib.arg_parser import *
#Current file directory
lib_dir = os.path.dirname(os.path.realpath(__file__))
main_dir = os.path.dirname(os.path.dirname(__file__))
log_dir = "%s/log" % (main_dir)
list_dir = "%s/list" % (main_dir)
#Headers for requests
headers = {'User-Agent': 'Mozilla/5... | 20.954545 | 104 | 0.720174 |
f3fa9f2d094001f1b08ed38b40bfe1703d099ebe | 5,146 | py | Python | app/src/main/python/analyser.py | Motag8tor/BinaryEye | bb534bd05d5c743bf0df13f78f9ab70b898e7a5e | [
"MIT"
] | null | null | null | app/src/main/python/analyser.py | Motag8tor/BinaryEye | bb534bd05d5c743bf0df13f78f9ab70b898e7a5e | [
"MIT"
] | null | null | null | app/src/main/python/analyser.py | Motag8tor/BinaryEye | bb534bd05d5c743bf0df13f78f9ab70b898e7a5e | [
"MIT"
] | null | null | null | import validators, requests, re # Import external
import apikey, wifi, url, file # Import local
from io import BytesIO
apikey = apikey.apikey()
url_class = None
wifi_class = None
file_class = None
headers = {"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded",
"x-apikey": apikey}
... | 26.121827 | 93 | 0.635445 |
d6ef329b0e96dd5a888892c4d82acbef0cdab2fe | 855 | py | Python | alphatwirl/datasetloop/reader.py | shane-breeze/AlphaTwirl | 59dbd5348af31d02e133d43fd5bfaad6b99a155e | [
"BSD-3-Clause"
] | null | null | null | alphatwirl/datasetloop/reader.py | shane-breeze/AlphaTwirl | 59dbd5348af31d02e133d43fd5bfaad6b99a155e | [
"BSD-3-Clause"
] | 7 | 2018-02-26T10:32:26.000Z | 2018-03-19T12:27:12.000Z | alphatwirl/datasetloop/reader.py | shane-breeze/AlphaTwirl | 59dbd5348af31d02e133d43fd5bfaad6b99a155e | [
"BSD-3-Clause"
] | null | null | null | # Tai Sakuma <tai.sakuma@gmail.com>
##__________________________________________________________________||
class DatasetReaderComposite(object):
def __init__(self):
self.readers = [ ]
def __repr__(self):
name_value_pairs = (
('readers', self.readers),
)
return '{}(... | 25.909091 | 77 | 0.611696 |
44287667b7f4f8c0ba2e50a482355e9688206b66 | 780 | py | Python | alembic_folder/versions/a025c2020370_.py | shthiago/minimo-char-generator | 289b9698e58deabf4b6376b2ac55dd2740b7f30c | [
"MIT"
] | null | null | null | alembic_folder/versions/a025c2020370_.py | shthiago/minimo-char-generator | 289b9698e58deabf4b6376b2ac55dd2740b7f30c | [
"MIT"
] | null | null | null | alembic_folder/versions/a025c2020370_.py | shthiago/minimo-char-generator | 289b9698e58deabf4b6376b2ac55dd2740b7f30c | [
"MIT"
] | null | null | null | """empty message
Revision ID: a025c2020370
Revises: 6b48a14810ad
Create Date: 2020-08-01 20:32:20.713786
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a025c2020370'
down_revision = '6b48a14810ad'
branch_labels = None
depends_on = None
def upgrade():
# ... | 23.636364 | 65 | 0.652564 |
17f1fe7fb9488b60eb4b7c911e05402de12b2f4c | 36,252 | py | Python | pytype/pytd/visitors_test.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | null | null | null | pytype/pytd/visitors_test.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | null | null | null | pytype/pytd/visitors_test.py | dertilo/pytype | 385e4e846a98d352143a3cbeb9dff12c4be850b2 | [
"Apache-2.0"
] | null | null | null | import textwrap
from pytype.pytd import escape
from pytype.pytd import pytd
from pytype.pytd import pytd_utils
from pytype.pytd import visitors
from pytype.pytd.parse import parser_test_base
import unittest
# All of these tests implicitly test pytd_utils.Print because
# parser_test_base.AssertSourceEquals() uses py... | 33.975633 | 86 | 0.593043 |
5b77f09ef12910c997780635e863cb4eb817bf67 | 2,584 | py | Python | src/pyside2_demo/frontend/example05/example05.py | chihyi-liao/pyside2_demo | 410bdaf0876897febf4607ff73928c60186c7be1 | [
"MIT"
] | null | null | null | src/pyside2_demo/frontend/example05/example05.py | chihyi-liao/pyside2_demo | 410bdaf0876897febf4607ff73928c60186c7be1 | [
"MIT"
] | null | null | null | src/pyside2_demo/frontend/example05/example05.py | chihyi-liao/pyside2_demo | 410bdaf0876897febf4607ff73928c60186c7be1 | [
"MIT"
] | null | null | null | from PySide2.QtCore import Slot, Qt
from PySide2.QtWidgets import (
QMainWindow, QWidget, QGridLayout, QHBoxLayout, QPushButton, QTabWidget, QMessageBox)
from pyside2_demo.common import QHLine
class TabWidget(QWidget):
def __init__(self):
super(TabWidget, self).__init__()
class HelpCornerWidget(QW... | 31.512195 | 92 | 0.634288 |
0aabd0813ba2a0c8e0a5fc65307104082cc6b4e6 | 9,611 | py | Python | official/resnet/keras/keras_common.py | MedZghal/models | 7a4ed44bc52aace1130df848a812cb696560d1e3 | [
"Apache-2.0"
] | 1 | 2019-02-09T15:30:17.000Z | 2019-02-09T15:30:17.000Z | official/resnet/keras/keras_common.py | MedZghal/models | 7a4ed44bc52aace1130df848a812cb696560d1e3 | [
"Apache-2.0"
] | null | null | null | official/resnet/keras/keras_common.py | MedZghal/models | 7a4ed44bc52aace1130df848a812cb696560d1e3 | [
"Apache-2.0"
] | null | null | null | # 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... | 35.464945 | 80 | 0.682239 |
53fe1b5d59090a39a643028db3d776e8998615cd | 50,868 | py | Python | brownie/network/contract.py | hassoon1986/brownie | 8036ef80512251e2d4a55fbbb7ad7ecdf388acb2 | [
"MIT"
] | 1 | 2020-10-09T17:23:03.000Z | 2020-10-09T17:23:03.000Z | brownie/network/contract.py | hassoon1986/brownie | 8036ef80512251e2d4a55fbbb7ad7ecdf388acb2 | [
"MIT"
] | null | null | null | brownie/network/contract.py | hassoon1986/brownie | 8036ef80512251e2d4a55fbbb7ad7ecdf388acb2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import json
import os
import re
import warnings
from pathlib import Path
from textwrap import TextWrapper
from typing import Any, Dict, Iterator, List, Optional, Set, Tuple, Union
from urllib.parse import urlparse
import eth_abi
import requests
import solcx
from eth_utils import remove_0x_prefix
fr... | 35.572028 | 100 | 0.594971 |
80937a6295ec4adc9654321c4f5fea5721769eaf | 828 | py | Python | sdk/python/pulumi_oci/datascience/__init__.py | EladGabay/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2021-08-17T11:14:46.000Z | 2021-12-31T02:07:03.000Z | sdk/python/pulumi_oci/datascience/__init__.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-09-06T11:21:29.000Z | 2021-09-06T11:21:29.000Z | sdk/python/pulumi_oci/datascience/__init__.py | pulumi-oci/pulumi-oci | 6841e27d4a1a7e15c672306b769912efbfd3ba99 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-08-24T23:31:30.000Z | 2022-01-02T19:26:54.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from .. import _utilities
import typing
# Export this package's modules as members:
from .get_model import *
from .get_model_deployment... | 31.846154 | 87 | 0.778986 |
47ceb43405e51b11b8ac1b9bedd204f32b75ab56 | 132 | py | Python | pogam/scrapers/exceptions.py | ludaavics/yogam | ee92a8c712f27c132634d55a2c90e2aed8402330 | [
"MIT"
] | null | null | null | pogam/scrapers/exceptions.py | ludaavics/yogam | ee92a8c712f27c132634d55a2c90e2aed8402330 | [
"MIT"
] | 16 | 2019-12-27T22:06:13.000Z | 2020-03-08T01:57:40.000Z | pogam/scrapers/exceptions.py | ludaavics/yogam | ee92a8c712f27c132634d55a2c90e2aed8402330 | [
"MIT"
] | 1 | 2019-12-29T13:56:04.000Z | 2019-12-29T13:56:04.000Z | import requests
class Captcha(requests.exceptions.RequestException):
pass
class ListingParsingError(RuntimeError):
pass
| 13.2 | 52 | 0.787879 |
4cdf640791e03560eb60e84f25202abd6e3c7206 | 4,966 | py | Python | scitbx/examples/bootstrap.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | scitbx/examples/bootstrap.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | scitbx/examples/bootstrap.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | from __future__ import absolute_import, division, print_function
import scitbx.lbfgs
import scitbx.math
from scitbx.array_family import flex
import math
from six.moves import range
"""
This example shows and easy way of obtaining reasonable estimates of
standard deviations of refinable parameters.
A sample run is sho... | 27.136612 | 84 | 0.581957 |
afd7963733fb3b067eeb6fa4e53f70db500b8a50 | 11,199 | py | Python | equip_property/equipment.py | dkratzert/FinalCif | 07ca23dbb4e7439b108a906521a118cdb876d97e | [
"Beerware"
] | 13 | 2020-01-14T16:23:48.000Z | 2022-02-16T18:02:08.000Z | equip_property/equipment.py | dkratzert/FinalCif | 07ca23dbb4e7439b108a906521a118cdb876d97e | [
"Beerware"
] | 24 | 2021-04-21T05:30:42.000Z | 2022-03-31T20:07:29.000Z | equip_property/equipment.py | dkratzert/FinalCif | 07ca23dbb4e7439b108a906521a118cdb876d97e | [
"Beerware"
] | 1 | 2021-08-09T16:48:33.000Z | 2021-08-09T16:48:33.000Z | from bisect import bisect
from contextlib import suppress
from pathlib import Path
from typing import Tuple
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QListWidgetItem
from gemmi import cif
from cif.cif_file_io import CifContainer
from cif.core_dict import cif_all_dict
from cif.text import retranslate_del... | 44.61753 | 120 | 0.658094 |
6277506d36fe262dd9739c2f813feffd6d95184a | 689 | py | Python | test_Valid_Palindrome_125.py | twtrubiks/leetcode-python | b75d84cefc3d11e43c2648cb9156e65587e398eb | [
"MIT"
] | 25 | 2018-01-15T00:09:02.000Z | 2022-01-27T02:29:15.000Z | test_Valid_Palindrome_125.py | twtrubiks/leetcode-python | b75d84cefc3d11e43c2648cb9156e65587e398eb | [
"MIT"
] | null | null | null | test_Valid_Palindrome_125.py | twtrubiks/leetcode-python | b75d84cefc3d11e43c2648cb9156e65587e398eb | [
"MIT"
] | 18 | 2018-01-07T09:36:42.000Z | 2021-12-14T11:08:05.000Z | import unittest
from Valid_Palindrome_125 import *
'''
Example 1:
Input: "A man, a plan, a canal: Panama"
Output: true
Example 2:
Input: "race a car"
Output: false
'''
class Test_Case(unittest.TestCase):
def test_answer_01(self):
s = "A man, a plan, a canal: Panama"
result = True
self... | 19.138889 | 60 | 0.63135 |
14cc5c5ee13ac1f067a175515ae7363a908d8649 | 451 | py | Python | miagenda/core/__init__.py | JoulesCH/miagenda | dbc7d68ebb697bfd9f779b2b9435d6384ea98aaa | [
"MIT"
] | null | null | null | miagenda/core/__init__.py | JoulesCH/miagenda | dbc7d68ebb697bfd9f779b2b9435d6384ea98aaa | [
"MIT"
] | null | null | null | miagenda/core/__init__.py | JoulesCH/miagenda | dbc7d68ebb697bfd9f779b2b9435d6384ea98aaa | [
"MIT"
] | null | null | null | """
Módulo que instancia la aplicación
"""
from flask import Flask
import os
app = Flask(__name__, template_folder='../templates', static_folder='../static')
DATABASE_URL = os.getenv('DATABASE_URL')
if 'postgresql' not in DATABASE_URL:
DATABASE_URL = DATABASE_URL.replace('postgres', 'postgresql')
# Se importa e... | 22.55 | 80 | 0.762749 |
4eeb384656f858397c673d24ef5f8b26958a03e1 | 1,173 | py | Python | code/utils/tests/test_pearson_1d.py | berkeley-stat159/project-zeta-2 | 7c35423fbc1407751e1aea6aac99d5d02a82dfdc | [
"BSD-3-Clause"
] | null | null | null | code/utils/tests/test_pearson_1d.py | berkeley-stat159/project-zeta-2 | 7c35423fbc1407751e1aea6aac99d5d02a82dfdc | [
"BSD-3-Clause"
] | null | null | null | code/utils/tests/test_pearson_1d.py | berkeley-stat159/project-zeta-2 | 7c35423fbc1407751e1aea6aac99d5d02a82dfdc | [
"BSD-3-Clause"
] | null | null | null | """
Test Pearson module, pearson_1d function
Run with::
nosetests test_pearson_1d.py
This is a test module.
It is designed to be run the with the "nose" testing package (via the
"nosetests" script.
Nose will look for any functions with "test" in their names, and run them.
Nose reports any errors, or any failur... | 24.957447 | 79 | 0.727195 |
9774bc900bc3972e76c7e032dee724f7fb1f3199 | 420 | py | Python | select_models.py | seyitozztrk/Online-Al-veris-Siteleri-Yorumlar-zerine-Duygu-Analizi | 12796f0ad16ba71402ad36fa1415f9eb6a256b2a | [
"MIT"
] | null | null | null | select_models.py | seyitozztrk/Online-Al-veris-Siteleri-Yorumlar-zerine-Duygu-Analizi | 12796f0ad16ba71402ad36fa1415f9eb6a256b2a | [
"MIT"
] | null | null | null | select_models.py | seyitozztrk/Online-Al-veris-Siteleri-Yorumlar-zerine-Duygu-Analizi | 12796f0ad16ba71402ad36fa1415f9eb6a256b2a | [
"MIT"
] | null | null | null | from basic_abc import basic_operation
class models(basic_operation):
def __init__(self):
super().__init__()
def svmModel(self):
# self.embedding_process()
self.train_test_split_dataset('svm')
def NaiveBayesModel(self):
self.train_test_split_dataset('bay... | 20 | 49 | 0.642857 |
1367ace05879afe3632b0964dc8453a49d3578f3 | 3,706 | py | Python | oob_collector_baidu.py | ParkJonghyeon/out_of_band_onion_address_collector | 0405d68a94edc6f82e8850c939f101f24c77a16c | [
"Apache-2.0"
] | 1 | 2019-04-28T13:07:58.000Z | 2019-04-28T13:07:58.000Z | oob_collector_baidu.py | ParkJonghyeon/out_of_band_onion_address_collector | 0405d68a94edc6f82e8850c939f101f24c77a16c | [
"Apache-2.0"
] | null | null | null | oob_collector_baidu.py | ParkJonghyeon/out_of_band_onion_address_collector | 0405d68a94edc6f82e8850c939f101f24c77a16c | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException, WebDriverException
from time import strftime, localtime, time, sleep
import random
from pyvirtualdisplay import Display
collect_date = strftime('%y%m%d', localtime(time()))
sea... | 30.883333 | 103 | 0.633028 |
c147b6eded85fddd3553a1b657545fca83de4d4e | 522 | py | Python | gaussian-kernel.py | adl1995/image-processing-filters | 850e4a6e23ef0f3843cc306cf1e42569f705f07e | [
"MIT"
] | null | null | null | gaussian-kernel.py | adl1995/image-processing-filters | 850e4a6e23ef0f3843cc306cf1e42569f705f07e | [
"MIT"
] | null | null | null | gaussian-kernel.py | adl1995/image-processing-filters | 850e4a6e23ef0f3843cc306cf1e42569f705f07e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Adeel Ahmad"
__email__ = "adeelahmad14@hotmail.com"
__status__ = "Production"
def gFilter(sigma):
kernel = np.zeros((4*sigma+1,4*sigma+1))
x = -2 * sigma
while(x<2 * sigma + 1):
y = -2 * sigma
while(y<2 * sigma + 1):
norm = 1/((2 * 3.14159)*... | 23.727273 | 68 | 0.490421 |
7b0f78152531e9ed2ea225f987aefaf27cb660e7 | 2,047 | py | Python | read_json_antara.py | kiadzaky/scraping | 9d0912808787db8a1909570edc9507e5d574bff5 | [
"MIT"
] | null | null | null | read_json_antara.py | kiadzaky/scraping | 9d0912808787db8a1909570edc9507e5d574bff5 | [
"MIT"
] | null | null | null | read_json_antara.py | kiadzaky/scraping | 9d0912808787db8a1909570edc9507e5d574bff5 | [
"MIT"
] | null | null | null | import json
from urllib2 import urlopen
from urllib2 import Request, HTTPError
import pandas as pd
from bs4 import BeautifulSoup
url_array =[]
hasil =[]
judul_array = []
tanggal_array = []
gambar_array = []
caption_array = []
konten_array = []
with open('antara.json') as json_file:
data = json.load(json_file)
... | 34.694915 | 129 | 0.62384 |
cfffaa734a20a4ad6e8263ceaa6d7cf11179ace7 | 327 | py | Python | sdwan/get_devices_by_system_ip.py | sambyers/netauto_learning | 22c1049bf86e188f774f1c977823abea2bb3abfe | [
"MIT"
] | null | null | null | sdwan/get_devices_by_system_ip.py | sambyers/netauto_learning | 22c1049bf86e188f774f1c977823abea2bb3abfe | [
"MIT"
] | null | null | null | sdwan/get_devices_by_system_ip.py | sambyers/netauto_learning | 22c1049bf86e188f774f1c977823abea2bb3abfe | [
"MIT"
] | null | null | null | import json
import sys
from yaml import safe_load
from sdwan import Sdwan
config_file = sys.argv[1]
with open(config_file) as fh:
config = safe_load(fh.read())
s = Sdwan(**config, verify_tls=False)
params = {'system-ip': '10.10.1.17'}
response = s.get_devices(params=params)
print(json.dumps(response['data'], ind... | 23.357143 | 45 | 0.727829 |
af72caae65307873a000a2f3d8006f7a111169ec | 2,419 | py | Python | graph.py | weihengSu/testing | d9be7a56c886756ba8e607a3b6e4df6efbe4893b | [
"MIT"
] | null | null | null | graph.py | weihengSu/testing | d9be7a56c886756ba8e607a3b6e4df6efbe4893b | [
"MIT"
] | null | null | null | graph.py | weihengSu/testing | d9be7a56c886756ba8e607a3b6e4df6efbe4893b | [
"MIT"
] | null | null | null | __author__ = 'weiheng su'
import sys
class Graph(object):
def __init__(self, dict= {}):
self.data = dict
def get_adjlist(self, node):
if node in self.data.keys():
nodes = self.data[node]
return nodes
else:
return None
def is_adjacent(self, node1, ... | 28.127907 | 67 | 0.491112 |
3db79362ae2080defd337a990556b12769ec71a8 | 7,125 | py | Python | src/azure-cli-core/azure/cli/core/azlogging.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | null | null | null | src/azure-cli-core/azure/cli/core/azlogging.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | src/azure-cli-core/azure/cli/core/azlogging.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2017-12-28T04:51:44.000Z | 2017-12-28T04:51:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 37.698413 | 120 | 0.631579 |
c7068e49db76604d27dc8d0bb408eac934b2c3a9 | 11,904 | py | Python | demo/sprites.py | alexpietrow1/demo | d484c976fc961e21f15bc5b295ae357b0ba037d7 | [
"MIT"
] | null | null | null | demo/sprites.py | alexpietrow1/demo | d484c976fc961e21f15bc5b295ae357b0ba037d7 | [
"MIT"
] | null | null | null | demo/sprites.py | alexpietrow1/demo | d484c976fc961e21f15bc5b295ae357b0ba037d7 | [
"MIT"
] | null | null | null | # sprite classes for game
# i used some ideas from CodePylet https://www.youtube.com/watch?v=osDofIdja6s&t=1038s
# i also borrowed pretty much all of this from kids can code - thanks!
# on acceleration https://www.khanacademy.org/science/physics/one-dimensional-motion/kinematic-formulas/v/average-velocity-for-consta... | 44.58427 | 150 | 0.588542 |
85021967bc09d52b22afd47cdda0f89988b6b283 | 3,069 | py | Python | test/functional/feature_logging.py | bitcoinNickel/bitcoinnickel | 7980682cf13048d0177b370d272717ada4c66910 | [
"MIT"
] | 1 | 2022-02-06T18:40:22.000Z | 2022-02-06T18:40:22.000Z | test/functional/feature_logging.py | bitcoinNickel/bitcoinnickel | 7980682cf13048d0177b370d272717ada4c66910 | [
"MIT"
] | null | null | null | test/functional/feature_logging.py | bitcoinNickel/bitcoinnickel | 7980682cf13048d0177b370d272717ada4c66910 | [
"MIT"
] | 1 | 2022-01-02T16:36:33.000Z | 2022-01-02T16:36:33.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test debug logging."""
import os
from test_framework.test_framework import BitcoinNickelTestFramework... | 38.848101 | 131 | 0.67188 |
2a45310d36de592dcc9c6cdaea9b2a90b485a87e | 8,554 | py | Python | algorithms/genetic/abstract_genetic/abstract_genetic_algorithm.py | UCLM-SIMD/MONRP | 16b19ace0746365300b5d3d16f5dda8c3a196cf7 | [
"MIT"
] | null | null | null | algorithms/genetic/abstract_genetic/abstract_genetic_algorithm.py | UCLM-SIMD/MONRP | 16b19ace0746365300b5d3d16f5dda8c3a196cf7 | [
"MIT"
] | null | null | null | algorithms/genetic/abstract_genetic/abstract_genetic_algorithm.py | UCLM-SIMD/MONRP | 16b19ace0746365300b5d3d16f5dda8c3a196cf7 | [
"MIT"
] | null | null | null | from abc import abstractmethod
import random
from typing import Any, Dict, List, Tuple
import numpy as np
from datasets import Dataset
from models.Solution import Solution
from algorithms.abstract_algorithm.abstract_algorithm import AbstractAlgorithm
import evaluation.metrics as metrics
from models.Hyperparameter imp... | 42.346535 | 161 | 0.629881 |
f3a3df5e6c7c8f5c1dd94e55cfac5454f052c1b9 | 14,385 | py | Python | common/determined_common/experimental/checkpoint/_checkpoint.py | sean-adler/determined | 5bdc0e33ef245b1168aa3835c3867b8f6532f2ae | [
"Apache-2.0"
] | 1 | 2021-03-29T13:39:45.000Z | 2021-03-29T13:39:45.000Z | common/determined_common/experimental/checkpoint/_checkpoint.py | sean-adler/determined | 5bdc0e33ef245b1168aa3835c3867b8f6532f2ae | [
"Apache-2.0"
] | null | null | null | common/determined_common/experimental/checkpoint/_checkpoint.py | sean-adler/determined | 5bdc0e33ef245b1168aa3835c3867b8f6532f2ae | [
"Apache-2.0"
] | null | null | null | import enum
import json
import pathlib
import shutil
from typing import Any, Dict, List, Optional, cast
from determined_common import api, constants, storage
from determined_common.storage import shared
class ModelFramework(enum.Enum):
PYTORCH = 1
TENSORFLOW = 2
class CheckpointState(enum.Enum):
UNSPEC... | 41.575145 | 101 | 0.610914 |
c3c7a67e4abc3344c9fe430f360e08a16a95b1f9 | 6,017 | py | Python | utils.py | XiaoPanX/FastLatticeSuperpixels | 9fb7d9680b07b155cb33aa53558e050a923f11c2 | [
"MIT"
] | null | null | null | utils.py | XiaoPanX/FastLatticeSuperpixels | 9fb7d9680b07b155cb33aa53558e050a923f11c2 | [
"MIT"
] | null | null | null | utils.py | XiaoPanX/FastLatticeSuperpixels | 9fb7d9680b07b155cb33aa53558e050a923f11c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (C) 2018 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
Author: Varun Jampani
"""
import numpy as np
from init_caffe import *
import matplotlib.pyplot as plt
from scipy.ndimage impo... | 35.394118 | 105 | 0.591158 |
b665d82edd2876f6b17600919a314e4b90abfb94 | 2,307 | py | Python | src/api-service/__app__/timer_workers/__init__.py | andrew-slutsky/onefuzz | 933fe6850c902544a6296cf05b83d235137a61a5 | [
"MIT"
] | 1 | 2020-10-27T08:05:57.000Z | 2020-10-27T08:05:57.000Z | src/api-service/__app__/timer_workers/__init__.py | andrew-slutsky/onefuzz | 933fe6850c902544a6296cf05b83d235137a61a5 | [
"MIT"
] | 1 | 2021-02-15T00:38:32.000Z | 2021-02-15T00:38:32.000Z | src/api-service/__app__/timer_workers/__init__.py | anslutsk/onefuzz | 933fe6850c902544a6296cf05b83d235137a61a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import logging
import azure.functions as func
from onefuzztypes.enums import NodeState, PoolState
from ..onefuzzlib.autoscale import autoscale_pool
from ..onefuzzlib.events import get_events
from ..onefuzzlib.orm import ... | 35.492308 | 85 | 0.722583 |
7957b024f727bae66dba0ad129ba0b19840a0b32 | 4,051 | py | Python | backend/interdisciplinaire/settings.py | jacquant/interdisciplinaire | c2155517117c00d4eee9a0b34a59cda5983d0995 | [
"MIT"
] | null | null | null | backend/interdisciplinaire/settings.py | jacquant/interdisciplinaire | c2155517117c00d4eee9a0b34a59cda5983d0995 | [
"MIT"
] | null | null | null | backend/interdisciplinaire/settings.py | jacquant/interdisciplinaire | c2155517117c00d4eee9a0b34a59cda5983d0995 | [
"MIT"
] | null | null | null | """
Django settings for interdisciplinaire project.
Generated by 'django-admin startproject' using Django 2.2.6.
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/
"""
i... | 29.569343 | 91 | 0.709948 |
c9fa00bf9e2ba383dc822ce2c94b8108812f92cc | 1,766 | py | Python | src/urls.py | Midburn/midburn-profiles-django | e124a617986931baed0b17f5d7a1ba6c7d5528e9 | [
"MIT"
] | null | null | null | src/urls.py | Midburn/midburn-profiles-django | e124a617986931baed0b17f5d7a1ba6c7d5528e9 | [
"MIT"
] | 20 | 2019-10-05T13:23:47.000Z | 2022-03-11T23:37:37.000Z | src/urls.py | Midburn/midburn-profiles-django | e124a617986931baed0b17f5d7a1ba6c7d5528e9 | [
"MIT"
] | 1 | 2019-09-30T11:40:45.000Z | 2019-09-30T11:40:45.000Z | from django.urls import path
from django.views.generic import TemplateView
from rest_auth.views import LoginView, LogoutView, UserDetailsView, PasswordChangeView
from .auth.urls import users_api_router
from rest_framework.documentation import include_docs_urls
from django.conf.urls import include, url
from django.cont... | 43.073171 | 109 | 0.727067 |
18b293751d75e5ecd346d64bdde83075f8ace295 | 1,533 | py | Python | src/graficos/graficos_tiempo_variando_Ryb.py | ilebrero/Metodos-TP1 | 9b06eedbb51c6cf14b87ec84af2fa8891c637a59 | [
"MIT"
] | null | null | null | src/graficos/graficos_tiempo_variando_Ryb.py | ilebrero/Metodos-TP1 | 9b06eedbb51c6cf14b87ec84af2fa8891c637a59 | [
"MIT"
] | null | null | null | src/graficos/graficos_tiempo_variando_Ryb.py | ilebrero/Metodos-TP1 | 9b06eedbb51c6cf14b87ec84af2fa8891c637a59 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
from math import log
#numeros del eje x
x = [50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000]
# valores primera funcion
y_gauss = []
y_LU = []
y_cholesky = []
#valores primer fu... | 25.131148 | 85 | 0.691455 |
f5bc04445619c15b34265816ffe5d08281c67d21 | 5,728 | py | Python | flask_mpesa/tests/test_base.py | allansifuna/Flask-Mpesa | a9f1d10a8d3d9638b00e1c48254af4f032c2ea0e | [
"MIT"
] | 6 | 2019-11-28T10:56:49.000Z | 2021-03-25T19:42:33.000Z | flask_mpesa/tests/test_base.py | allansifuna/Flask-Mpesa | a9f1d10a8d3d9638b00e1c48254af4f032c2ea0e | [
"MIT"
] | 1 | 2020-10-15T15:40:00.000Z | 2020-10-18T21:42:10.000Z | flask_mpesa/tests/test_base.py | allansifuna/Flask-Mpesa | a9f1d10a8d3d9638b00e1c48254af4f032c2ea0e | [
"MIT"
] | 2 | 2020-01-23T07:12:31.000Z | 2020-11-10T09:46:50.000Z | import pytest
from .base import mp
@pytest.mark.usefixtures("mock_fixture_test_auth")
def test_auth(auth):
auth = mp.C2B.authenticate()
assert auth is not None
@pytest.mark.usefixtures("mock_fixture_test_b2c")
def test_b2c(b2c):
data = {"initiator_name": "testapi364",
"security_credential": ... | 45.824 | 382 | 0.693087 |
8621bf8a127d84bf6379a018894102d72b5cd5b9 | 8,943 | py | Python | demo/attn_visualize_demo.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | demo/attn_visualize_demo.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | demo/attn_visualize_demo.py | visaVita/mmaction2 | 2d7107a2d79b990b7facd3d6f7ac0b6ad974c153 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import argparse
import json
import random
from collections import deque
from operator import itemgetter
import cv2
import mmcv
import numpy as np
import torch
from mmcv import Config, DictAction
from mmcv.parallel import collate, scatter
from mmaction.apis import init_r... | 33.494382 | 78 | 0.60785 |
97af0f7771de7c26b9e1b6b57362eafe7df0b8a7 | 393 | py | Python | Facebook/asgi.py | MkAngelo/Facebook-Retro | a863b31a55600db57661f8896ef9d7896e655bfc | [
"MIT"
] | null | null | null | Facebook/asgi.py | MkAngelo/Facebook-Retro | a863b31a55600db57661f8896ef9d7896e655bfc | [
"MIT"
] | null | null | null | Facebook/asgi.py | MkAngelo/Facebook-Retro | a863b31a55600db57661f8896ef9d7896e655bfc | [
"MIT"
] | null | null | null | """
ASGI config for Facebook project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
917a0259f6e76a7f8614ae3c6f249c7b83bff404 | 883 | py | Python | utils/compilers/ConnectionCompiler/connection.py | willmexe/opuntiaOS | 2d8e299627dc3431948892ad377556c918090000 | [
"BSD-2-Clause"
] | 241 | 2021-08-08T18:32:11.000Z | 2022-03-27T20:16:59.000Z | utils/compilers/ConnectionCompiler/connection.py | willmexe/opuntiaOS | 2d8e299627dc3431948892ad377556c918090000 | [
"BSD-2-Clause"
] | 19 | 2021-08-17T03:07:23.000Z | 2022-03-29T19:37:54.000Z | utils/compilers/ConnectionCompiler/connection.py | willmexe/opuntiaOS | 2d8e299627dc3431948892ad377556c918090000 | [
"BSD-2-Clause"
] | 11 | 2021-08-22T10:29:23.000Z | 2022-03-12T03:25:55.000Z | # Copyright 2021 Nikita Melekhin. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
class Connection:
def __init__(self, name, magic, protected=False):
self.name = name
self.magic = magic
self.protected = protected
... | 35.32 | 72 | 0.614949 |
d9b14232fc59cd67734da2eae97ceedcb495e6b7 | 333 | py | Python | local_config.sample.py | Tacten/python-hl7 | acd215e192546a970e4aa99854e97ac75183b874 | [
"BSD-3-Clause"
] | 6 | 2021-02-06T11:09:14.000Z | 2021-04-16T02:38:34.000Z | local_config.sample.py | Tacten/python-hl7 | acd215e192546a970e4aa99854e97ac75183b874 | [
"BSD-3-Clause"
] | null | null | null | local_config.sample.py | Tacten/python-hl7 | acd215e192546a970e4aa99854e97ac75183b874 | [
"BSD-3-Clause"
] | 1 | 2021-05-19T08:19:03.000Z | 2021-05-19T08:19:03.000Z |
# ERPNext related configs
ERPNEXT_API_KEY = 'd8ab58401ee92a7'
ERPNEXT_API_SECRET = '3e234bbf0b74934'
ERPNEXT_URL = 'https://hms.aakvaerp.com'
# operational configs
PULL_FREQUENCY = 60 # in minutes
LOGS_DIRECTORY = 'logs' # logs of this script is stored in this directory
IMPORT_START_DATE = None # format: '... | 25.615385 | 74 | 0.747748 |
8354d09e4cdaa03f16ba80121aa74da35c9a839d | 99 | py | Python | extensions.py | SicongCheen/battleships | 6d647eb4bf2251a33b89fa9676dce3f9bdaefdd0 | [
"MIT"
] | null | null | null | extensions.py | SicongCheen/battleships | 6d647eb4bf2251a33b89fa9676dce3f9bdaefdd0 | [
"MIT"
] | null | null | null | extensions.py | SicongCheen/battleships | 6d647eb4bf2251a33b89fa9676dce3f9bdaefdd0 | [
"MIT"
] | null | null | null | from battleships import main
# if start from extensions.py
if __name__ == '__main__':
main()
| 14.142857 | 29 | 0.707071 |
5293840507245c24b79f9f85cfe6f96ef60d550e | 869 | py | Python | shitter/management/commands/create_random_followings.py | pablo-moreno/shitter-back | 33c0eb0e0bdff370b68148308ac08ab63b9e6e54 | [
"MIT"
] | null | null | null | shitter/management/commands/create_random_followings.py | pablo-moreno/shitter-back | 33c0eb0e0bdff370b68148308ac08ab63b9e6e54 | [
"MIT"
] | null | null | null | shitter/management/commands/create_random_followings.py | pablo-moreno/shitter-back | 33c0eb0e0bdff370b68148308ac08ab63b9e6e54 | [
"MIT"
] | null | null | null | from random import choice, randint, randrange
from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from shitter.models import UserFollow
class Command(BaseCommand):
help = 'Creates random user followings'
def handle(self, *args, **options):
users = User.obje... | 36.208333 | 91 | 0.608746 |
3d392bdfd33f424fff8045fe8d11d2926903d55e | 829 | py | Python | examples/spark-function.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2021-02-17T08:12:33.000Z | 2021-02-17T08:12:33.000Z | examples/spark-function.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2020-12-31T14:36:29.000Z | 2020-12-31T14:36:29.000Z | examples/spark-function.py | Hedingber/mlrun | e2269718fcc7caa7e1aa379ac28495830b45f9da | [
"Apache-2.0"
] | 1 | 2021-08-30T21:43:38.000Z | 2021-08-30T21:43:38.000Z | # Pyspark example called by mlrun_spark_k8s.ipynb
from pyspark.sql import SparkSession
from mlrun import get_or_create_ctx
# Acquire MLRun context
mlctx = get_or_create_ctx("spark-function")
# Get MLRun parameters
mlctx.logger.info("!@!@!@!@!@ Getting env variables")
READ_OPTIONS = mlctx.get_param("data_sources")
... | 26.741935 | 85 | 0.772014 |
97a3c508236145a65b6f328e988287af6dc55ac4 | 10,436 | py | Python | pybind/slxos/v16r_1_00b/routing_system/route_map/content/match/ipv6/address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/routing_system/route_map/content/match/ipv6/address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/routing_system/route_map/content/match/ipv6/address/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 62.119048 | 601 | 0.70688 |
c2bf545fe28e349bf2792ce0c24c4b3d49dfca3e | 676 | py | Python | mmpose/models/backbones/__init__.py | woffett/mmpose | cf8cbf49759e745896b70ce69d412518568af33b | [
"Apache-2.0"
] | null | null | null | mmpose/models/backbones/__init__.py | woffett/mmpose | cf8cbf49759e745896b70ce69d412518568af33b | [
"Apache-2.0"
] | null | null | null | mmpose/models/backbones/__init__.py | woffett/mmpose | cf8cbf49759e745896b70ce69d412518568af33b | [
"Apache-2.0"
] | null | null | null | from .alexnet import AlexNet
from .hourglass import HourglassNet
from .hrnet import HRNet
from .mobilenet_v2 import MobileNetV2
from .mobilenet_v3 import MobileNetV3
from .regnet import RegNet
from .resnet import ResNet, ResNetV1d
from .resnext import ResNeXt
from .scnet import SCNet
from .seresnet import SEResNet
from... | 21.806452 | 39 | 0.723373 |
69b357c842a5f5e311df7d659986581f6dda0447 | 64 | py | Python | cloud_guardrails/bin/version.py | nachtwaffen/cloud-guardrails | b82ae1ee3b252de53364c534e2f0e41308d24488 | [
"BSD-3-Clause"
] | null | null | null | cloud_guardrails/bin/version.py | nachtwaffen/cloud-guardrails | b82ae1ee3b252de53364c534e2f0e41308d24488 | [
"BSD-3-Clause"
] | null | null | null | cloud_guardrails/bin/version.py | nachtwaffen/cloud-guardrails | b82ae1ee3b252de53364c534e2f0e41308d24488 | [
"BSD-3-Clause"
] | null | null | null | # pylint: disable=missing-module-docstring
__version__ = '0.2.8' | 32 | 42 | 0.765625 |
98624311e05879576aeffdd6b141abd19e08c6cb | 4,104 | py | Python | test/TestDataObjects.py | vitorascorrea/pokemon-vgc-engine | 3925deb408a70d25c4c9e7b53e021ea5a25d3bda | [
"MIT"
] | 1 | 2022-01-05T10:00:46.000Z | 2022-01-05T10:00:46.000Z | test/TestDataObjects.py | vitorascorrea/pokemon-vgc-engine | 3925deb408a70d25c4c9e7b53e021ea5a25d3bda | [
"MIT"
] | null | null | null | test/TestDataObjects.py | vitorascorrea/pokemon-vgc-engine | 3925deb408a70d25c4c9e7b53e021ea5a25d3bda | [
"MIT"
] | null | null | null | import itertools
import random
import unittest
from copy import deepcopy
from random import sample
import numpy as np
from framework.DataConstants import MIN_HIT_POINTS, MAX_HIT_POINTS
from framework.DataObjects import PkmTemplate
from framework.DataTypes import PkmType
from framework.StandardPkmMoves import STANDARD... | 35.686957 | 94 | 0.642788 |
8ce393624eedac2c0ddfa7df3a93b562263e13da | 31 | py | Python | BottleOIDC/__init__.py | Glocktober/BottleOIDC | 12ba98a1f82b1fa26c5af9848beaf366be39014d | [
"MIT"
] | null | null | null | BottleOIDC/__init__.py | Glocktober/BottleOIDC | 12ba98a1f82b1fa26c5af9848beaf366be39014d | [
"MIT"
] | null | null | null | BottleOIDC/__init__.py | Glocktober/BottleOIDC | 12ba98a1f82b1fa26c5af9848beaf366be39014d | [
"MIT"
] | null | null | null | from .botOIDC import BottleOIDC | 31 | 31 | 0.870968 |
36ad5a87e339151a956ce09b398b8fa8338b27a0 | 401 | py | Python | xai_court/config.py | michaeljneely/court-of-xai | 37eded49f46b3a05ad56986c1a9bb22eee3ac4b1 | [
"MIT"
] | 4 | 2021-05-07T09:40:11.000Z | 2022-03-27T18:19:07.000Z | xai_court/config.py | michaeljneely/court-of-xai | 37eded49f46b3a05ad56986c1a9bb22eee3ac4b1 | [
"MIT"
] | 1 | 2021-05-10T09:31:05.000Z | 2021-05-10T09:31:05.000Z | xai_court/config.py | michaeljneely/court-of-xai | 37eded49f46b3a05ad56986c1a9bb22eee3ac4b1 | [
"MIT"
] | 1 | 2021-06-06T18:45:39.000Z | 2021-06-06T18:45:39.000Z | '''Define configuration classes'''
class Config:
'''Defines the parameters used across the code base which can be adjusted without modifying code directly'''
logger_name = 'attention-not-explanation'
package_name = 'xai_court'
#
serialization_base_dir = 'outputs'
#
seeds = [87, 2134, 55... | 21.105263 | 112 | 0.660848 |
b4c0374808b0aff9905d227a3c09c20b5d920906 | 2,139 | py | Python | Testing/EpdToJson.py | StuartRiffle/corvid | 21fbea9bf585f3713354f33a205e9fd8b96da555 | [
"MIT"
] | 6 | 2019-05-29T03:22:41.000Z | 2021-03-02T09:08:16.000Z | Testing/EpdToJson.py | StuartRiffle/corvid | 21fbea9bf585f3713354f33a205e9fd8b96da555 | [
"MIT"
] | 1 | 2019-05-29T16:15:55.000Z | 2019-05-29T16:15:55.000Z | Testing/EpdToJson.py | StuartRiffle/corvid | 21fbea9bf585f3713354f33a205e9fd8b96da555 | [
"MIT"
] | null | null | null | import sys
import json
import chess
import chess.engine
epdfile = sys.argv[1]
all_epd = []
refengine = chess.engine.SimpleEngine.popen_uci("..\\Engine\\stockfish-10")
line_idx = 0
with open(epdfile + ".epd") as epd:
for line in epd.readlines():
line_idx = line_idx + 1
line = line.strip()
... | 31.455882 | 85 | 0.499766 |
5b3e0332900ca42b785cfa26684e3ad309821e1a | 2,353 | py | Python | masakari/common/config.py | openstack/masakari | 7c6380d63e4e39db30176306303323e16b38fa3d | [
"Apache-2.0"
] | 70 | 2016-07-22T21:58:00.000Z | 2022-01-04T06:05:32.000Z | masakari/common/config.py | openstack/masakari | 7c6380d63e4e39db30176306303323e16b38fa3d | [
"Apache-2.0"
] | 1 | 2017-08-10T05:14:00.000Z | 2017-08-10T05:14:00.000Z | masakari/common/config.py | openstack/masakari | 7c6380d63e4e39db30176306303323e16b38fa3d | [
"Apache-2.0"
] | 33 | 2016-07-05T02:05:25.000Z | 2021-12-20T07:40:43.000Z | # Copyright 2016 NTT DATA
#
# 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, so... | 40.568966 | 116 | 0.570336 |
f0d23078d5f4fc52244c7dbeab918a0e83f64de5 | 12,421 | py | Python | base.py | DE-CIX/bgperf | 77f1a0d1de2aedcfc8f6d64602edb2bf65f7ca66 | [
"Apache-2.0"
] | 9 | 2017-06-20T15:16:00.000Z | 2017-11-20T16:41:15.000Z | base.py | DECIX/bgperf | 77f1a0d1de2aedcfc8f6d64602edb2bf65f7ca66 | [
"Apache-2.0"
] | 1 | 2021-02-24T01:32:19.000Z | 2021-02-24T01:32:19.000Z | base.py | DECIX/bgperf | 77f1a0d1de2aedcfc8f6d64602edb2bf65f7ca66 | [
"Apache-2.0"
] | 2 | 2017-06-23T01:28:11.000Z | 2017-07-17T11:44:56.000Z | # Copyright (C) 2016 Nippon Telegraph and Telephone 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 appli... | 40.72459 | 145 | 0.588197 |
31fae85722c72ada091c64a3b51130e6c372276a | 6,804 | py | Python | aleph/index/util.py | ATADDATALOG/test-repo | 353cf7bdc89e0f0d4b79d7be00df639e595d4fbc | [
"MIT"
] | 1 | 2019-06-18T21:35:59.000Z | 2019-06-18T21:35:59.000Z | aleph/index/util.py | heartofstone/aleph | d66b6615d2bfa10c291c63754f53b468de8bebde | [
"MIT"
] | null | null | null | aleph/index/util.py | heartofstone/aleph | d66b6615d2bfa10c291c63754f53b468de8bebde | [
"MIT"
] | null | null | null | import logging
from time import time
from pprint import pprint # noqa
from banal import ensure_list
from elasticsearch import TransportError
from elasticsearch.helpers import streaming_bulk
from servicelayer.util import backoff, service_retries
from aleph.core import es, settings
log = logging.getLogger(__name__)
#... | 30.648649 | 107 | 0.551587 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.