hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cbfb410cacd5080693f012f125e877edd266870a | 172 | py | Python | features/environment.py | geeksforsocialchange/imok | efb7189c13c398dbd5d4301ca496a2e583b0f5b7 | [
"MIT"
] | 6 | 2021-05-12T08:40:36.000Z | 2022-01-25T08:31:06.000Z | features/environment.py | geeksforsocialchange/imok | efb7189c13c398dbd5d4301ca496a2e583b0f5b7 | [
"MIT"
] | 14 | 2021-05-12T09:03:08.000Z | 2021-06-10T13:18:52.000Z | features/environment.py | geeksforsocialchange/imok | efb7189c13c398dbd5d4301ca496a2e583b0f5b7 | [
"MIT"
] | 1 | 2021-05-14T20:54:15.000Z | 2021-05-14T20:54:15.000Z | from django.conf import settings
settings.NOTIFY_EMAIL = 'root@localhost'
settings.DEBUG = True
def before_all(context):
context.users = {}
context.members = {}
| 17.2 | 40 | 0.72093 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.093023 |
cbfc891317c3347008f8eaea66169ec8996add82 | 2,546 | py | Python | h2o-py/tests/testdir_jira/pyunit_pubdev_7353_reset_threshold.py | vishalbelsare/h2o-3 | 9322fb0f4c0e2358449e339a434f607d524c69fa | [
"Apache-2.0"
] | 6,098 | 2015-05-22T02:46:12.000Z | 2022-03-31T16:54:51.000Z | h2o-py/tests/testdir_jira/pyunit_pubdev_7353_reset_threshold.py | vishalbelsare/h2o-3 | 9322fb0f4c0e2358449e339a434f607d524c69fa | [
"Apache-2.0"
] | 2,517 | 2015-05-23T02:10:54.000Z | 2022-03-30T17:03:39.000Z | h2o-py/tests/testdir_jira/pyunit_pubdev_7353_reset_threshold.py | vishalbelsare/h2o-3 | 9322fb0f4c0e2358449e339a434f607d524c69fa | [
"Apache-2.0"
] | 2,199 | 2015-05-22T04:09:55.000Z | 2022-03-28T22:20:45.000Z | import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.gbm import H2OGradientBoostingEstimator
from h2o.utils.model_utils import reset_model_threshold
def test_reset_threshold():
"""
Test the model threshold can be reset.
Performance metric should be recalc... | 35.361111 | 112 | 0.714061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 788 | 0.309505 |
cbfd7282e7bf8367942a36811a4c23c2043f6215 | 2,324 | py | Python | tests/datasets/TestV1/csv2sql.py | pvanderknyff/alibabacloud-adb-tableau-connector | 0280428bfc916530f9de26336631f6a6602c6804 | [
"MIT"
] | 1 | 2019-08-21T17:53:50.000Z | 2019-08-21T17:53:50.000Z | tests/datasets/TestV1/csv2sql.py | aliyun/aliyun-adb-tableau-connector | 0280428bfc916530f9de26336631f6a6602c6804 | [
"MIT"
] | 1 | 2020-06-29T08:38:54.000Z | 2020-06-29T08:38:54.000Z | tests/datasets/TestV1/csv2sql.py | aliyun/alibabacloud-adb-tableau-connector | 0280428bfc916530f9de26336631f6a6602c6804 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import argparse
import csv
import sys
'''
This script takes a CSV file with a mandatory header and a sql tablename and converts the data in the csv file into
an SQL INSERT statement.
'''
def parse_arguments():
# initialize argumentparser and arguments
parser = argparse.ArgumentParser(descri... | 31.835616 | 120 | 0.55809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 845 | 0.363597 |
cbff48d02931d3f7dcc779f4f74d3a26a84b6bb5 | 1,043 | py | Python | FlaskApp/app.py | Dec22gln/FlaskBlog | 114ca9fc39f039cbdf0f1ff613fb66e364cea171 | [
"MIT"
] | null | null | null | FlaskApp/app.py | Dec22gln/FlaskBlog | 114ca9fc39f039cbdf0f1ff613fb66e364cea171 | [
"MIT"
] | null | null | null | FlaskApp/app.py | Dec22gln/FlaskBlog | 114ca9fc39f039cbdf0f1ff613fb66e364cea171 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('index.html')
@app.route('/index')
def index():
return render_template('index.html')
@app.route('/contact')
def contact():
return render_template('contact.html')
@a... | 21.729167 | 56 | 0.708533 | 0 | 0 | 0 | 0 | 899 | 0.861937 | 0 | 0 | 341 | 0.326942 |
cbffe9c4b5d1ee44110edbd0b422813f50993bf7 | 1,913 | py | Python | azure-servicefabric/azure/servicefabric/models/primary_replicator_status_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-servicefabric/azure/servicefabric/models/primary_replicator_status_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-servicefabric/azure/servicefabric/models/primary_replicator_status_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-10-16T13:08:23.000Z | 2018-10-16T13:08:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 39.854167 | 103 | 0.665447 | 1,384 | 0.723471 | 0 | 0 | 0 | 0 | 0 | 0 | 1,352 | 0.706743 |
0200db1441c66699ac789aeb7d02549ecd867f2a | 448 | py | Python | example/example/models.py | KnightConan/sspdatatables | 1179a11358734e5e472e5eee703e8d34fa49e9bf | [
"MIT"
] | 4 | 2018-11-23T16:17:38.000Z | 2018-11-26T16:08:49.000Z | example/example/models.py | zhiwei2017/sspdatatables | 1179a11358734e5e472e5eee703e8d34fa49e9bf | [
"MIT"
] | 8 | 2018-11-26T16:38:55.000Z | 2019-01-18T15:13:12.000Z | example/example/models.py | KnightConan/sspdatatables | 1179a11358734e5e472e5eee703e8d34fa49e9bf | [
"MIT"
] | null | null | null | from django.db import models
from django_countries.fields import CountryField
from django.db.models.deletion import CASCADE
class Author(models.Model):
name = models.CharField(max_length=60)
nationality = CountryField()
class Book(models.Model):
name = models.CharField(max_length=60)
description = m... | 26.352941 | 57 | 0.765625 | 317 | 0.707589 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
020213a818c2a038dbd07a3442e4a8ae253739be | 4,805 | py | Python | workspace/baseline/midi_generator.py | SeungHeonDoh/EMOPIA | 0afb93a91c9226949d617894d6aa2d67c4de4eb6 | [
"MIT"
] | 69 | 2021-07-12T03:17:17.000Z | 2022-03-27T06:16:35.000Z | workspace/baseline/midi_generator.py | SeungHeonDoh/EMOPIA | 0afb93a91c9226949d617894d6aa2d67c4de4eb6 | [
"MIT"
] | 7 | 2021-07-27T09:10:15.000Z | 2022-02-07T05:15:56.000Z | workspace/baseline/midi_generator.py | SeungHeonDoh/EMOPIA | 0afb93a91c9226949d617894d6aa2d67c4de4eb6 | [
"MIT"
] | 7 | 2021-07-12T10:41:14.000Z | 2022-02-04T10:28:08.000Z | import os
os.environ["CUDA_VISIBLE_DEVICES"] = "4"
import json
import argparse
import numpy as np
import tensorflow as tf
import midi_encoder as me
from train_generative import build_generative_model
from train_classifier import preprocess_sentence
GENERATED_DIR = './generated'
def override_neurons(model, layer_idx... | 35.330882 | 134 | 0.678044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,181 | 0.245786 |
020563bca2febded13ab705cf7257f5af323ab0d | 1,616 | py | Python | holobot/sdk/chrono/interval_parser.py | rexor12/holobot | 89b7b416403d13ccfeee117ef942426b08d3651d | [
"MIT"
] | 1 | 2021-05-24T00:17:46.000Z | 2021-05-24T00:17:46.000Z | holobot/sdk/chrono/interval_parser.py | rexor12/holobot | 89b7b416403d13ccfeee117ef942426b08d3651d | [
"MIT"
] | 41 | 2021-03-24T22:50:09.000Z | 2021-12-17T12:15:13.000Z | holobot/sdk/chrono/interval_parser.py | rexor12/holobot | 89b7b416403d13ccfeee117ef942426b08d3651d | [
"MIT"
] | null | null | null | from ..utils import pad_left, try_parse_int
from datetime import timedelta
from typing import Dict, List
TIME_PARTS: List[str] = [ "D", "H", "M", "S" ]
FIXED_INTERVALS: Dict[str, timedelta] = {
"WEEK": timedelta(weeks=1),
"DAY": timedelta(days=1),
"HOUR": timedelta(hours=1)
}
def parse_interval(value: str... | 36.727273 | 91 | 0.633045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 65 | 0.040223 |
02063c864e384d1ba7ec730d4d03b03f063ebc1f | 80,245 | py | Python | pirates/ai/PiratesMagicWordManager.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 3 | 2021-02-25T06:38:13.000Z | 2022-03-22T07:00:15.000Z | pirates/ai/PiratesMagicWordManager.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | null | null | null | pirates/ai/PiratesMagicWordManager.py | itsyaboyrocket/pirates | 6ca1e7d571c670b0d976f65e608235707b5737e3 | [
"BSD-3-Clause"
] | 1 | 2021-02-25T06:38:17.000Z | 2021-02-25T06:38:17.000Z | # uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.ai.PiratesMagicWordManager
from direct.showbase.ShowBaseGlobal import *
from direct.distributed import DistributedObject
from di... | 69.176724 | 993 | 0.408349 | 78,717 | 0.980958 | 0 | 0 | 0 | 0 | 0 | 0 | 5,299 | 0.066035 |
0207e1cd7c3433152b1e340e7f376f8049a8644d | 634 | bzl | Python | layers/bazel/deps.bzl | celentes/bazel-container-ubuntu1804 | 67c12c3f6db785909fa3695c80ebbdec1ff81b61 | [
"Apache-2.0"
] | null | null | null | layers/bazel/deps.bzl | celentes/bazel-container-ubuntu1804 | 67c12c3f6db785909fa3695c80ebbdec1ff81b61 | [
"Apache-2.0"
] | null | null | null | layers/bazel/deps.bzl | celentes/bazel-container-ubuntu1804 | 67c12c3f6db785909fa3695c80ebbdec1ff81b61 | [
"Apache-2.0"
] | null | null | null | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
def deps():
excludes = native.existing_rules().keys()
if "bazel_installer" not in excludes:
http_file(
name = "bazel_installer",
downloaded_file_path = "bazel-installer.sh",
sha256 = "bd7a3a583a18640f... | 39.625 | 116 | 0.62776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 358 | 0.564669 |
0208d63efe0cf495f00648e33345a8f7f3c257eb | 4,318 | py | Python | db.py | RecycledMedia/apprenticeship-app | 67eb18300163dedcc4f473883f20d992644af7b2 | [
"BSD-3-Clause"
] | null | null | null | db.py | RecycledMedia/apprenticeship-app | 67eb18300163dedcc4f473883f20d992644af7b2 | [
"BSD-3-Clause"
] | null | null | null | db.py | RecycledMedia/apprenticeship-app | 67eb18300163dedcc4f473883f20d992644af7b2 | [
"BSD-3-Clause"
] | null | null | null | import os
import sqlite3
class TaskDatabase:
def __init__(self, db_filename):
self.filename = db_filename
self.connection = None
def get_connection(self):
""" Return a connection to the database, creating one if it doesn't exist """
if self.connection is None:
self... | 32.712121 | 96 | 0.585456 | 4,290 | 0.993516 | 0 | 0 | 0 | 0 | 0 | 0 | 1,706 | 0.39509 |
02097fb19e8e97c98afe88f64252e859af37785e | 243 | py | Python | python/vars_test.py | runningforlife/CodingExamples | 808b12cdb996390225d40a687bf6215c4b7d1822 | [
"Apache-2.0"
] | null | null | null | python/vars_test.py | runningforlife/CodingExamples | 808b12cdb996390225d40a687bf6215c4b7d1822 | [
"Apache-2.0"
] | null | null | null | python/vars_test.py | runningforlife/CodingExamples | 808b12cdb996390225d40a687bf6215c4b7d1822 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
def test_vars():
"""test variables in python"""
int_var = 5
string_var = "hah"
assert int_var == 5
assert string_var == 'hah'
print("test vars is done")
if __name__ == "__main__":
test_vars()
| 15.1875 | 34 | 0.596708 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.353909 |
020a172c0d9f7b9606628146aaa062d113a7182b | 7,199 | py | Python | src/data_preparation/tfrecords_and_queues.py | Zhenxingzhang/tiny_imagenet | f44512023ce52df30cdffd80d3cb7cc4e1426354 | [
"Apache-2.0"
] | null | null | null | src/data_preparation/tfrecords_and_queues.py | Zhenxingzhang/tiny_imagenet | f44512023ce52df30cdffd80d3cb7cc4e1426354 | [
"Apache-2.0"
] | null | null | null | src/data_preparation/tfrecords_and_queues.py | Zhenxingzhang/tiny_imagenet | f44512023ce52df30cdffd80d3cb7cc4e1426354 | [
"Apache-2.0"
] | null | null | null | """
Up to now we have held all data in memory. This is of course impossible with large datasets.
In this file we explore the use of TFRecords (binary files quickly loading data from disk) and Queues to store
asynchronously loading data.
In this example we the TinyImageNet-200 dataset which has 100,000 64x64 images fo... | 41.137143 | 114 | 0.633282 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,977 | 0.41353 |
020a1a0bc964b8990c94fa3dbddf6619f8e10b21 | 2,906 | py | Python | relialok/SerialPort.py | jrhosk/relialok | 28d59dfd39296695ebec19387eda9b986ecdd60f | [
"MIT"
] | null | null | null | relialok/SerialPort.py | jrhosk/relialok | 28d59dfd39296695ebec19387eda9b986ecdd60f | [
"MIT"
] | null | null | null | relialok/SerialPort.py | jrhosk/relialok | 28d59dfd39296695ebec19387eda9b986ecdd60f | [
"MIT"
] | null | null | null | import serial
import serial.tools.list_ports
from PyQt5.QtCore import QObject
import relialok.Logger
class SerialPort(QObject):
@relialok.Logger.function_log
def __init__(self, port, parent = None):
self.port = port
self.resource_free = True
self.connection_active = True
self.po... | 34.188235 | 114 | 0.604955 | 2,804 | 0.9649 | 0 | 0 | 2,749 | 0.945974 | 0 | 0 | 913 | 0.314178 |
020a85d2b9268f0ad8b4e717c76fefae39beb819 | 339 | py | Python | Python/DDUtil.py | dalek7/umbrella | cabf0367940905ca5164d104d7aef6ff719ee166 | [
"MIT"
] | 1 | 2021-03-09T09:12:02.000Z | 2021-03-09T09:12:02.000Z | Python/DDUtil.py | dalek7/umbrella | cabf0367940905ca5164d104d7aef6ff719ee166 | [
"MIT"
] | null | null | null | Python/DDUtil.py | dalek7/umbrella | cabf0367940905ca5164d104d7aef6ff719ee166 | [
"MIT"
] | null | null | null | import os
import datetime
def exit():
os._exit(0)
def GetTimeString(m = -1):
if m==0:
s1 = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
else:
s1 = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
return s1
def MakeDir(directory):
if not os.path.exists(directory):
os.... | 19.941176 | 62 | 0.60767 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.085546 |
020b56188f2411001ea02312adb3e4b3e9f8fcbc | 4,301 | py | Python | codes/modelTraining.py | jairock282/hatsi | ecb16fb99115c413e980855ae3d06433ced2260c | [
"MIT"
] | null | null | null | codes/modelTraining.py | jairock282/hatsi | ecb16fb99115c413e980855ae3d06433ced2260c | [
"MIT"
] | null | null | null | codes/modelTraining.py | jairock282/hatsi | ecb16fb99115c413e980855ae3d06433ced2260c | [
"MIT"
] | null | null | null | """
__| |_____________________________________________________________________________________| |__
(__ _____________________________________________________________________________________ __)
| | | |
| | ... | 44.802083 | 215 | 0.601953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,306 | 0.53603 |
020c16a78df08433f5dc19175781c44bf2dcbb01 | 1,763 | py | Python | datasource/mylaps/tests.py | SphinxNZ/game-on | da10ea9303563cd91ccab13321ba15a927e703e5 | [
"Apache-2.0"
] | null | null | null | datasource/mylaps/tests.py | SphinxNZ/game-on | da10ea9303563cd91ccab13321ba15a927e703e5 | [
"Apache-2.0"
] | null | null | null | datasource/mylaps/tests.py | SphinxNZ/game-on | da10ea9303563cd91ccab13321ba15a927e703e5 | [
"Apache-2.0"
] | null | null | null | import datetime
from django.utils import timezone
from django.test import TestCase
from sport.models import Sport, Competition, Venue
from compete.models import CompetitionRound
from compete.motorsport.models import Race
from datasource.models import DataSource
from datasource.mylaps.scoreboard import ScoreboardHand... | 43 | 115 | 0.676687 | 1,429 | 0.81055 | 0 | 0 | 0 | 0 | 0 | 0 | 363 | 0.205899 |
020c551868d4325ef446cf93f3e3b90f6e4e9908 | 1,697 | py | Python | scripts/generate_tests.py | alibaba/sionnx | 3f3e18826ddcc26402b4e2af96ca8aac15560456 | [
"Apache-2.0"
] | 34 | 2019-05-29T03:15:48.000Z | 2022-03-24T03:14:58.000Z | scripts/generate_tests.py | alibaba/sionnx | 3f3e18826ddcc26402b4e2af96ca8aac15560456 | [
"Apache-2.0"
] | 1 | 2020-05-21T11:44:22.000Z | 2020-05-21T11:44:22.000Z | scripts/generate_tests.py | alibaba/sionnx | 3f3e18826ddcc26402b4e2af96ca8aac15560456 | [
"Apache-2.0"
] | 4 | 2019-12-16T18:49:42.000Z | 2021-10-11T18:41:54.000Z | #*
#* Copyright (C) 2017-2019 Alibaba Group Holding 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 ... | 36.891304 | 124 | 0.703595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,004 | 0.591632 |
020e09341ffea9ce59519650e80614b26a974b81 | 6,610 | py | Python | tests/mixins.py | jarkkorantala/sqlalchemy-utils | 7cee65f0a3074245b853425e19a732aa274bfa3e | [
"BSD-3-Clause"
] | 879 | 2015-01-01T12:06:35.000Z | 2022-03-27T16:13:05.000Z | tests/mixins.py | jarkkorantala/sqlalchemy-utils | 7cee65f0a3074245b853425e19a732aa274bfa3e | [
"BSD-3-Clause"
] | 418 | 2015-01-02T08:43:43.000Z | 2022-03-25T15:49:21.000Z | tests/mixins.py | jarkkorantala/sqlalchemy-utils | 7cee65f0a3074245b853425e19a732aa274bfa3e | [
"BSD-3-Clause"
] | 295 | 2015-01-06T14:19:33.000Z | 2022-03-26T16:20:50.000Z | import pytest
import sqlalchemy as sa
class ThreeLevelDeepOneToOne(object):
@pytest.fixture
def Catalog(self, Base, Category):
class Catalog(Base):
__tablename__ = 'catalog'
id = sa.Column('_id', sa.Integer, primary_key=True)
category = sa.orm.relationship(
... | 28.864629 | 79 | 0.522542 | 6,563 | 0.99289 | 0 | 0 | 6,359 | 0.962027 | 0 | 0 | 720 | 0.108926 |
020e71ff56d4917b70bf98b950bcfa70c6d8e56c | 6,041 | py | Python | gbpservice/nfp/lib/rest_client_over_unix.py | ashutosh-mishra/my-test | 51c82af293f291b9182204392e7d21bda27786d1 | [
"Apache-2.0"
] | null | null | null | gbpservice/nfp/lib/rest_client_over_unix.py | ashutosh-mishra/my-test | 51c82af293f291b9182204392e7d21bda27786d1 | [
"Apache-2.0"
] | null | null | null | gbpservice/nfp/lib/rest_client_over_unix.py | ashutosh-mishra/my-test | 51c82af293f291b9182204392e7d21bda27786d1 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 35.327485 | 78 | 0.609833 | 4,256 | 0.704519 | 0 | 0 | 0 | 0 | 0 | 0 | 1,907 | 0.315676 |
020f39177cabbb0de46cc69acb4473e957930343 | 3,916 | py | Python | tk_sim.py | incherre/slam-bot | 8479aff8f595b2d602a83e9e922b64836ae64375 | [
"MIT"
] | null | null | null | tk_sim.py | incherre/slam-bot | 8479aff8f595b2d602a83e9e922b64836ae64375 | [
"MIT"
] | null | null | null | tk_sim.py | incherre/slam-bot | 8479aff8f595b2d602a83e9e922b64836ae64375 | [
"MIT"
] | null | null | null | '''Robot sim with a nicer display.'''
from sim_framework import *
from math import radians
import tkinter
BACKGROUND_COLOR = 'grey60'
ENTITY_COLOR = 'RoyalBlue1'
OBSTACLE_COLOR = 'black'
ENTITY_TAG = 'entity'
class TKWorld(World):
'''A world that will display via tkinter instead of ascii.'''
def __init__(self... | 36.943396 | 112 | 0.565884 | 3,052 | 0.779367 | 0 | 0 | 0 | 0 | 0 | 0 | 565 | 0.14428 |
0210ff2439d9da24bc21178720c18eee48ba770a | 1,224 | py | Python | COT/tests/test_doctests.py | morneaup/cot | 3d4dc7079a33aa0c09216ec339b44f84ab69ff4b | [
"MIT"
] | 81 | 2015-01-18T22:31:42.000Z | 2022-03-14T12:34:33.000Z | COT/tests/test_doctests.py | morneaup/cot | 3d4dc7079a33aa0c09216ec339b44f84ab69ff4b | [
"MIT"
] | 67 | 2015-01-05T15:24:39.000Z | 2021-08-16T12:44:58.000Z | COT/tests/test_doctests.py | morneaup/cot | 3d4dc7079a33aa0c09216ec339b44f84ab69ff4b | [
"MIT"
] | 20 | 2015-07-09T14:20:25.000Z | 2021-09-18T17:59:57.000Z | #!/usr/bin/env python
#
# test_doctests.py - test runner for COT doctests
#
# July 2016, Glenn F. Matthews
# Copyright (c) 2016-2017 the COT project developers.
# See the COPYRIGHT.txt file at the top-level directory of this distribution
# and at https://github.com/glennmatthews/cot/blob/master/COPYRIGHT.txt.
#
# This ... | 33.081081 | 78 | 0.750817 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 909 | 0.742647 |
021113c40a21b05029b6c6708d8e10e3927d9701 | 1,045 | py | Python | aws/etc/packer/tools/python/stardog/cluster/test_program.py | stardog-union/stardog-graviton | 652fa3e3bbb166e92ce165938ef2075831d26c04 | [
"Apache-2.0"
] | 3 | 2017-03-10T15:00:08.000Z | 2019-10-29T07:46:19.000Z | aws/etc/packer/tools/python/stardog/cluster/test_program.py | stardog-union/stardog-graviton | 652fa3e3bbb166e92ce165938ef2075831d26c04 | [
"Apache-2.0"
] | 31 | 2017-02-21T16:19:11.000Z | 2021-03-25T21:27:50.000Z | aws/etc/packer/tools/python/stardog/cluster/test_program.py | stardog-union/stardog-graviton | 652fa3e3bbb166e92ce165938ef2075831d26c04 | [
"Apache-2.0"
] | 6 | 2017-04-26T07:22:25.000Z | 2020-07-29T20:17:55.000Z | import logging
import subprocess
import sys
import stardog.cluster.utils as utils
def run_program(cmd, tries):
def pgm_func():
try:
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
o, e = p.communicate()
logging.debug("STDOUT: %s", ... | 29.857143 | 97 | 0.572249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.159809 |
0211dbc40a6aa48e66ae666cbc2afb8294c1a296 | 297 | py | Python | apps/core/urls.py | tayyabRazzaq/opl-platform | 37b0efdb9327253a144c50bfd192132fac732619 | [
"MIT"
] | 2 | 2019-04-03T04:04:53.000Z | 2019-04-28T16:13:56.000Z | apps/core/urls.py | tayyabRazzaq/opl-platform | 37b0efdb9327253a144c50bfd192132fac732619 | [
"MIT"
] | 8 | 2021-06-04T21:57:30.000Z | 2022-03-11T23:48:38.000Z | apps/core/urls.py | tayyab-razzaq/opl-platform | 37b0efdb9327253a144c50bfd192132fac732619 | [
"MIT"
] | 7 | 2019-03-12T19:39:08.000Z | 2021-04-15T05:25:59.000Z | """ Here all the blog's urls routes will be mapped """
from django.urls import path
from django.conf.urls import include, url
from . import views
app_name = 'core'
urlpatterns = [
# path('', views.home, name='home-page'),
url(r'^api/', include('apps.core.api.urls', namespace='api')),
]
| 24.75 | 66 | 0.670034 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.451178 |
021267aeacfe0ae1c6472616df30ce20f8a2d09b | 24,270 | py | Python | picoCTF-web/tests/api/functional/common.py | MongYahHsieh/picoCTF | dd500ad9c59768137b33e2d2b102a089ddf0ad40 | [
"MIT"
] | null | null | null | picoCTF-web/tests/api/functional/common.py | MongYahHsieh/picoCTF | dd500ad9c59768137b33e2d2b102a089ddf0ad40 | [
"MIT"
] | null | null | null | picoCTF-web/tests/api/functional/common.py | MongYahHsieh/picoCTF | dd500ad9c59768137b33e2d2b102a089ddf0ad40 | [
"MIT"
] | null | null | null | """Utilities for functional tests."""
import datetime
import json
import re
import pymongo
import pytest
import api
RATE_LIMIT_BYPASS = "test_bypass"
TESTING_DB_NAME = 'ctf_test'
db = None
def decode_response(res):
"""Parse a WebSuccess or WebError response."""
decoded_dict = json.loads(res.data.decode('u... | 34.621969 | 1,680 | 0.486279 | 0 | 0 | 0 | 0 | 284 | 0.011702 | 0 | 0 | 18,431 | 0.759415 |
0212be2b426e881f46ce9b5faa0a4d6cd2b0e659 | 11 | py | Python | py2codes/py2_exec.py | rhabacker/lib2to3import | 36102fa844bf18234053d96f6b9b90f5c6068e87 | [
"MIT"
] | null | null | null | py2codes/py2_exec.py | rhabacker/lib2to3import | 36102fa844bf18234053d96f6b9b90f5c6068e87 | [
"MIT"
] | 1 | 2020-11-14T01:39:18.000Z | 2020-11-17T07:54:28.000Z | py2codes/py2_exec.py | rhabacker/lib2to3import | 36102fa844bf18234053d96f6b9b90f5c6068e87 | [
"MIT"
] | 2 | 2019-08-12T09:58:05.000Z | 2021-03-18T17:13:06.000Z | exec "123"
| 5.5 | 10 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.454545 |
02154f47c33721ccd238e5aa1dcf948b5ec4704f | 1,308 | py | Python | Tools/RaiseCheck.py | 17320692835RGF/buptoj | 3d1e4719d757b4f0199e4451be7c0bee28e7c3ca | [
"MIT"
] | null | null | null | Tools/RaiseCheck.py | 17320692835RGF/buptoj | 3d1e4719d757b4f0199e4451be7c0bee28e7c3ca | [
"MIT"
] | null | null | null | Tools/RaiseCheck.py | 17320692835RGF/buptoj | 3d1e4719d757b4f0199e4451be7c0bee28e7c3ca | [
"MIT"
] | null | null | null |
import MySQLdb
from queue import Queue
import socket
import json
from time import sleep
import threading
import os
queue = Queue() # 全局判题列表
myjsonfile = open("./setting.json", 'r')
judgerjson = json.loads(myjsonfile.read())
if os.environ.get("DB_USER"):
judgerjson["db_ip"] = os.environ.get(... | 22.169492 | 96 | 0.603211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 260 | 0.19697 |
02159d47bc916fdaaa02496845099d898342fd4d | 909 | py | Python | first_steps_in_oop/programmer.py | ivan-yosifov88/python_oop_june_2021 | 7ae6126065abbcce7ce97c86d1150ae307360249 | [
"MIT"
] | 1 | 2021-08-03T19:14:24.000Z | 2021-08-03T19:14:24.000Z | first_steps_in_oop/programmer.py | ivan-yosifov88/python_oop_june_2021 | 7ae6126065abbcce7ce97c86d1150ae307360249 | [
"MIT"
] | null | null | null | first_steps_in_oop/programmer.py | ivan-yosifov88/python_oop_june_2021 | 7ae6126065abbcce7ce97c86d1150ae307360249 | [
"MIT"
] | null | null | null | class Programmer:
def __init__(self, name, language, skills):
self.name = name
self.language = language
self.skills = skills
def watch_course(self, course_name, language, skills_earned):
if not self.language == language:
return f"{self.name} does not know {language}"... | 37.875 | 81 | 0.651265 | 909 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.256326 |
0216b8ad609381ab0fb91a808c2538b44b5d722d | 1,557 | py | Python | unit_test.py | LSTM-Kirigaya/MsnEnvironment | 29c6e02525c7671f304d0f9d7689942509f12a16 | [
"MIT"
] | null | null | null | unit_test.py | LSTM-Kirigaya/MsnEnvironment | 29c6e02525c7671f304d0f9d7689942509f12a16 | [
"MIT"
] | null | null | null | unit_test.py | LSTM-Kirigaya/MsnEnvironment | 29c6e02525c7671f304d0f9d7689942509f12a16 | [
"MIT"
] | null | null | null | from env import MsnDiscrete, MaplessNaviEnv
from robot_utils import *
from robot_utils.log import msn_debug
from robot_utils.scene import *
from env import *
from collections import Counter
MAX_FORCE = 10.
TARGET_VELOCITY = 5.
MULTIPLY = 2.0
def keyboard_control():
global MAX_FORCE
global TARGET_VELOCITY
... | 28.833333 | 126 | 0.705202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.062065 |
0218bf8ae5e0f91bee4226c0b79fa035f5a60a3c | 12,358 | py | Python | meta-refkit-core/lib/ostree/ostreeupdate.py | kraj/intel-iot-refkit | 04cd5afec0c41deeb5e1a48b43a0a31e708295c1 | [
"MIT"
] | 36 | 2017-02-20T04:04:28.000Z | 2022-02-17T05:36:33.000Z | meta-refkit-core/lib/ostree/ostreeupdate.py | kraj/intel-iot-refkit | 04cd5afec0c41deeb5e1a48b43a0a31e708295c1 | [
"MIT"
] | 284 | 2017-02-06T08:51:52.000Z | 2021-11-03T16:52:16.000Z | meta-refkit-core/lib/ostree/ostreeupdate.py | kraj/intel-iot-refkit | 04cd5afec0c41deeb5e1a48b43a0a31e708295c1 | [
"MIT"
] | 65 | 2017-02-03T12:36:16.000Z | 2021-02-18T11:00:46.000Z | import bb
import oe.path
import glob
import hashlib
import os.path
import shutil
import string
import subprocess
VARIABLES = (
'IMAGE_ROOTFS',
'OSTREE_BRANCHNAME',
'OSTREE_COMMIT_SUBJECT',
'OSTREE_REPO',
'OSTREE_GPGDIR',
'OSTREE_GPGID',
'OSTREE_OS',
'OSTREE_REMOTE',
'OSTREE_BARE',
... | 42.177474 | 149 | 0.606732 | 11,991 | 0.970303 | 0 | 0 | 0 | 0 | 0 | 0 | 6,220 | 0.503318 |
021a272ec30f97420b7269bd3ee1d988857ff0cb | 123 | py | Python | returns-the- value-to-the-variable.py | fatihwin-yt/a-Python-Tutorial-of-2021 | 7d2110f80efdfa79437bf64f8edcd08ec3d61926 | [
"MIT"
] | 1 | 2021-03-29T02:29:58.000Z | 2021-03-29T02:29:58.000Z | returns-the- value-to-the-variable.py | fatihwin-yt/a-Python-Tutorial-of-2021 | 7d2110f80efdfa79437bf64f8edcd08ec3d61926 | [
"MIT"
] | null | null | null | returns-the- value-to-the-variable.py | fatihwin-yt/a-Python-Tutorial-of-2021 | 7d2110f80efdfa79437bf64f8edcd08ec3d61926 | [
"MIT"
] | 1 | 2021-03-27T15:00:06.000Z | 2021-03-27T15:00:06.000Z | #returns the value to the variable #
x = 900
print(x)
#print will take the argument x as the value in the variable #
| 20.5 | 63 | 0.699187 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.813008 |
021a57faf00fc6d4266f3268c12b51f08834cc6c | 1,453 | py | Python | app.py | alvaropp/interactive-fantasy-map | b75ebc734970790bc5779865ab5e786e50250709 | [
"MIT"
] | 4 | 2021-02-11T03:23:40.000Z | 2022-02-13T01:56:58.000Z | app.py | alvaropp/interactive-fantasy-map | b75ebc734970790bc5779865ab5e786e50250709 | [
"MIT"
] | null | null | null | app.py | alvaropp/interactive-fantasy-map | b75ebc734970790bc5779865ab5e786e50250709 | [
"MIT"
] | null | null | null | from glob import glob
from flask import flash, Flask, Markup, render_template, redirect, request, send_from_directory
from form import MapForm
from process_new_map import create_map_from_form
app = Flask(__name__)
with open("secret.txt", "r") as secret_f:
app.config["SECRET_KEY"] = secret_f.read()
@app.route(... | 29.653061 | 105 | 0.692361 | 0 | 0 | 0 | 0 | 1,078 | 0.741913 | 0 | 0 | 385 | 0.264969 |
021afdb076c4754aa3ba63a750975318ad4eba13 | 4,121 | py | Python | monai/deploy/core/execution_context.py | jlvahldiek/monai-deploy-app-sdk | 050aeabec581067a11566f59a2970b075d36ae7c | [
"Apache-2.0"
] | 28 | 2021-09-17T18:16:42.000Z | 2022-03-31T16:32:36.000Z | monai/deploy/core/execution_context.py | jlvahldiek/monai-deploy-app-sdk | 050aeabec581067a11566f59a2970b075d36ae7c | [
"Apache-2.0"
] | 109 | 2021-09-17T18:34:31.000Z | 2022-03-31T21:04:35.000Z | monai/deploy/core/execution_context.py | jlvahldiek/monai-deploy-app-sdk | 050aeabec581067a11566f59a2970b075d36ae7c | [
"Apache-2.0"
] | 11 | 2021-09-17T20:23:31.000Z | 2022-03-29T08:55:19.000Z | # Copyright 2021 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, s... | 32.448819 | 106 | 0.674351 | 3,158 | 0.766319 | 0 | 0 | 608 | 0.147537 | 0 | 0 | 1,902 | 0.461538 |
021b5b2946a725db8a4879a92f48d89c65c21d97 | 11,698 | py | Python | LeetCode-All-Solution/Python3/LC-1728-Cat-and-Mouse-II.py | YuweiYin/Algorithm_YuweiYin | 28648fac59c5a4e3c907978cbd1b3e662ba18fd5 | [
"MIT"
] | null | null | null | LeetCode-All-Solution/Python3/LC-1728-Cat-and-Mouse-II.py | YuweiYin/Algorithm_YuweiYin | 28648fac59c5a4e3c907978cbd1b3e662ba18fd5 | [
"MIT"
] | null | null | null | LeetCode-All-Solution/Python3/LC-1728-Cat-and-Mouse-II.py | YuweiYin/Algorithm_YuweiYin | 28648fac59c5a4e3c907978cbd1b3e662ba18fd5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""=================================================================
@Project : Algorithm_YuweiYin/LeetCode-All-Solution/Python3
@File : LC-1728-Cat-and-Mouse-II.py
@Author : [YuweiYin](https://github.com/YuweiYin)
@Date : 2022-05-10
==================================... | 44.310606 | 116 | 0.566422 | 8,292 | 0.708839 | 0 | 0 | 0 | 0 | 0 | 0 | 3,372 | 0.288254 |
021c36744a33f4725dc24d93c0aa09acf81e97bf | 2,193 | py | Python | tictac/tictac/cli.py | SteveDMurphy/tic_tac_go | 7e80dc1ec6fbeceb3c9879cee7fb32b7ecfe37a7 | [
"MIT"
] | null | null | null | tictac/tictac/cli.py | SteveDMurphy/tic_tac_go | 7e80dc1ec6fbeceb3c9879cee7fb32b7ecfe37a7 | [
"MIT"
] | null | null | null | tictac/tictac/cli.py | SteveDMurphy/tic_tac_go | 7e80dc1ec6fbeceb3c9879cee7fb32b7ecfe37a7 | [
"MIT"
] | null | null | null | import click
from random import randrange
from tictac import Tictac
@click.group()
def tictac():
pass
@tictac.command(name="games", help="Returns all started games, order by when they were created")
def view_games():
tictac_class = Tictac()
click.echo(tictac_class.view_games())
@tictac.command(name="... | 33.227273 | 96 | 0.645691 | 0 | 0 | 0 | 0 | 2,070 | 0.943912 | 0 | 0 | 609 | 0.277702 |
021d46262a81bc3bd29354a1c4c85f1ce3571b25 | 4,230 | py | Python | matchId.py | terryhahm/ARAM | bbaa6446aec6ad7141d492aef174832e627c7b74 | [
"MIT"
] | null | null | null | matchId.py | terryhahm/ARAM | bbaa6446aec6ad7141d492aef174832e627c7b74 | [
"MIT"
] | null | null | null | matchId.py | terryhahm/ARAM | bbaa6446aec6ad7141d492aef174832e627c7b74 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import riotConstant
import time
import requests
def wait( tik ):
tik = int(tik)
tik += 2
while( tik > 0 ):
print("API Rate Limit exceeded, wait for " + str(tik) + " second(s)", end = ' \r')
tik -= 1
time.sleep(1)
print(" ... | 37.433628 | 108 | 0.607092 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,729 | 0.408747 |
021d5769d36b572a0f2addec694597fefa3cfa6f | 158 | py | Python | Backend/order/urls.py | Bhavya0020/Readopolis | a0053e4fae97dc8291b50c746f3dc3e6b454ad95 | [
"MIT"
] | null | null | null | Backend/order/urls.py | Bhavya0020/Readopolis | a0053e4fae97dc8291b50c746f3dc3e6b454ad95 | [
"MIT"
] | null | null | null | Backend/order/urls.py | Bhavya0020/Readopolis | a0053e4fae97dc8291b50c746f3dc3e6b454ad95 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('checkout/', views.checkout),
path('orders/', views.OrdersList.as_view()),
] | 19.75 | 50 | 0.677215 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0.126582 |
02223351c3f6f455c742ce52e04a38d560dc3455 | 299 | py | Python | src/z3c/saconfig/__init__.py | zopefoundation/z3c.saconfig | 69a32e7f7617ec4a1f9667d673a1ddc00aff59c2 | [
"ZPL-2.1"
] | 2 | 2016-03-12T14:22:23.000Z | 2019-05-22T04:18:26.000Z | src/z3c/saconfig/__init__.py | zopefoundation/z3c.saconfig | 69a32e7f7617ec4a1f9667d673a1ddc00aff59c2 | [
"ZPL-2.1"
] | 13 | 2015-05-05T12:27:48.000Z | 2021-05-20T11:11:49.000Z | src/z3c/saconfig/__init__.py | zopefoundation/z3c.saconfig | 69a32e7f7617ec4a1f9667d673a1ddc00aff59c2 | [
"ZPL-2.1"
] | 4 | 2015-05-04T12:18:31.000Z | 2019-11-18T09:47:31.000Z | from z3c.saconfig.scopedsession import Session, named_scoped_session
from z3c.saconfig.utility import (
GloballyScopedSession, SiteScopedSession, EngineFactory)
__all__ = [
'Session',
'named_scoped_session',
'GloballyScopedSession',
'SiteScopedSession',
'EngineFactory',
]
| 23 | 68 | 0.752508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.294314 |
0223c05bd579183b627da44b67aca37eba1114e5 | 557 | py | Python | src/triage/experiments/singlethreaded.py | josephbajor/triage_NN | cbaee6e5a06e597c91fec372717d89a2b5f34fa5 | [
"MIT"
] | 160 | 2017-06-13T09:59:59.000Z | 2022-03-21T22:00:35.000Z | src/triage/experiments/singlethreaded.py | josephbajor/triage_NN | cbaee6e5a06e597c91fec372717d89a2b5f34fa5 | [
"MIT"
] | 803 | 2016-10-21T19:44:02.000Z | 2022-03-29T00:02:33.000Z | src/triage/experiments/singlethreaded.py | josephbajor/triage_NN | cbaee6e5a06e597c91fec372717d89a2b5f34fa5 | [
"MIT"
] | 59 | 2017-01-31T22:10:22.000Z | 2022-03-19T12:35:03.000Z | from triage.experiments import ExperimentBase
class SingleThreadedExperiment(ExperimentBase):
def process_query_tasks(self, query_tasks):
self.feature_generator.process_table_tasks(query_tasks)
def process_matrix_build_tasks(self, matrix_build_tasks):
self.matrix_builder.build_all_matrices(ma... | 34.8125 | 66 | 0.800718 | 508 | 0.912029 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
022635491f2d2bfe0024464d83f72d0ff2d7769e | 11,374 | py | Python | Webspider.py | radiantbk/webspider | 62a9c71f8f3f39e5e07e0fb68682fc05a83edd5b | [
"MIT"
] | 1 | 2019-11-09T01:36:39.000Z | 2019-11-09T01:36:39.000Z | Webspider.py | radiantbk/webspider | 62a9c71f8f3f39e5e07e0fb68682fc05a83edd5b | [
"MIT"
] | null | null | null | Webspider.py | radiantbk/webspider | 62a9c71f8f3f39e5e07e0fb68682fc05a83edd5b | [
"MIT"
] | null | null | null |
import re
import os
class tag_obj:
def __init__(self):
self.pos = 0
self.name = ""
self.class_name = ""
self.content = ''
self.children =''
self.pairpos = -1
self.pair=""
self.tag_label = ""
class spider:
def __init__(self, txt):
self.... | 31.076503 | 164 | 0.481976 | 11,250 | 0.989098 | 0 | 0 | 0 | 0 | 0 | 0 | 3,402 | 0.299103 |
022a8bafe44b23b7f0a6af1c6947a769d26527f0 | 4,909 | py | Python | QScrollAreaImages.py | ErwinSchotman/QT5-QScrollAreaImages | 053e06a3ff67311f753712902902c43b1f011d30 | [
"MIT"
] | 1 | 2019-11-29T00:37:31.000Z | 2019-11-29T00:37:31.000Z | QScrollAreaImages.py | ErwinSchotman/QT5-QScrollAreaImages | 053e06a3ff67311f753712902902c43b1f011d30 | [
"MIT"
] | null | null | null | QScrollAreaImages.py | ErwinSchotman/QT5-QScrollAreaImages | 053e06a3ff67311f753712902902c43b1f011d30 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2019 Erwin Schotman
#
# Licensed under MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the right... | 48.127451 | 121 | 0.534528 | 3,508 | 0.714606 | 0 | 0 | 0 | 0 | 0 | 0 | 2,468 | 0.50275 |
022b9e68ba47723e01a95addbedb6c10c435b96e | 30,434 | py | Python | pyrax/fakes.py | jfreeman812/pyrax | dba18df916dcc3a9f539bd9c609b1bb68f3d9203 | [
"Apache-2.0"
] | null | null | null | pyrax/fakes.py | jfreeman812/pyrax | dba18df916dcc3a9f539bd9c609b1bb68f3d9203 | [
"Apache-2.0"
] | 1 | 2019-11-06T20:21:59.000Z | 2019-11-06T20:21:59.000Z | pyrax/fakes.py | jfreeman812/pyrax | dba18df916dcc3a9f539bd9c609b1bb68f3d9203 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
import os
import random
import time
import uuid
import pyrax
from pyrax.autoscale import AutoScaleClient
from pyrax.autoscale import AutoScalePolicy
from pyrax.autoscale import AutoScaleWebhook
from pyrax.autoscale import Sca... | 33.554576 | 80 | 0.630676 | 19,387 | 0.637018 | 0 | 0 | 492 | 0.016166 | 0 | 0 | 6,289 | 0.206644 |
022be07ba133b6de16720dad8708b355fc237656 | 2,869 | py | Python | ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/alerts/alert_logfeeder.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 25 | 2019-12-04T03:09:55.000Z | 2022-03-08T10:52:06.000Z | ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/alerts/alert_logfeeder.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 29 | 2019-12-04T03:00:39.000Z | 2022-03-02T06:25:44.000Z | ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/alerts/alert_logfeeder.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 33 | 2019-12-04T02:51:30.000Z | 2022-03-24T02:47:38.000Z | #!/usr/bin/env python
"""
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")... | 33.752941 | 113 | 0.776577 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,690 | 0.589055 |
022d316f00567159f07f5f66967da1595528de9a | 3,589 | py | Python | hack/scripts/ca_metrics_parser.py | nicdoye/autoscaler | ebadbda2b2417d7da6147fbc0c1b39f7f55aff22 | [
"Apache-2.0"
] | 17 | 2018-09-14T10:31:43.000Z | 2021-09-14T08:47:34.000Z | hack/scripts/ca_metrics_parser.py | nicdoye/autoscaler | ebadbda2b2417d7da6147fbc0c1b39f7f55aff22 | [
"Apache-2.0"
] | 12 | 2019-01-09T10:34:06.000Z | 2022-03-24T08:37:25.000Z | hack/scripts/ca_metrics_parser.py | nicdoye/autoscaler | ebadbda2b2417d7da6147fbc0c1b39f7f55aff22 | [
"Apache-2.0"
] | 3 | 2019-05-06T14:51:10.000Z | 2020-12-22T14:03:43.000Z | #!/usr/bin/env python
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 28.712 | 96 | 0.713291 | 365 | 0.1017 | 0 | 0 | 0 | 0 | 0 | 0 | 1,551 | 0.432154 |
022e461176e9788379dfe2431986a89fcba4d6ae | 2,631 | py | Python | tests/test_cli.py | dls-controls/tickit | 00bb013e69674bcfe4926f365ecb3c65c080abe8 | [
"Apache-2.0"
] | 4 | 2021-09-16T13:35:33.000Z | 2022-02-01T23:35:53.000Z | tests/test_cli.py | dls-controls/tickit | 00bb013e69674bcfe4926f365ecb3c65c080abe8 | [
"Apache-2.0"
] | 46 | 2021-09-16T13:44:58.000Z | 2022-02-02T13:42:56.000Z | tests/test_cli.py | dls-controls/tickit | 00bb013e69674bcfe4926f365ecb3c65c080abe8 | [
"Apache-2.0"
] | null | null | null | from typing import Iterable
import pytest
from click.testing import CliRunner, Result
from mock import Mock, patch
from mock.mock import create_autospec
from tickit.cli import main
from tickit.core.components.component import ComponentConfig
from tickit.core.management.schedulers.master import MasterScheduler
from ti... | 27.989362 | 88 | 0.72824 | 0 | 0 | 942 | 0.358039 | 1,022 | 0.388445 | 0 | 0 | 275 | 0.104523 |
022e5e8924eb3bc3c0fcb9bc827782f367ea128d | 565 | py | Python | homework5/app/config.py | sakost/tinkoff_fintech | 64b9d5a2a818b4db7c438b0dc53a8f31882f95ba | [
"MIT"
] | null | null | null | homework5/app/config.py | sakost/tinkoff_fintech | 64b9d5a2a818b4db7c438b0dc53a8f31882f95ba | [
"MIT"
] | null | null | null | homework5/app/config.py | sakost/tinkoff_fintech | 64b9d5a2a818b4db7c438b0dc53a8f31882f95ba | [
"MIT"
] | 2 | 2021-08-29T15:01:39.000Z | 2022-02-23T18:48:21.000Z | from typing import Any
from pydantic import BaseSettings
from .utils import singleton_cache
class Settings(BaseSettings):
TESTING: bool = False
SQLALCHEMY_DATABASE_URI: str = 'sqlite:///db.sqlite3'
FIRST_SUPERUSER: str = 'admin'
FIRST_SUPERUSER_PASSWORD: str = 'admin'
FIRST_SUPERUSER_ROLE: str... | 20.178571 | 57 | 0.699115 | 374 | 0.661947 | 0 | 0 | 91 | 0.161062 | 0 | 0 | 59 | 0.104425 |
022f6a23b370efd01d97a4fc32d332f4e763d78f | 2,158 | py | Python | nabu/story.py | sterlingbaldwin/nabu | 6f19a1b237cdab6ff2179c952f41e239e1a0a3e8 | [
"MIT"
] | null | null | null | nabu/story.py | sterlingbaldwin/nabu | 6f19a1b237cdab6ff2179c952f41e239e1a0a3e8 | [
"MIT"
] | 1 | 2022-02-14T12:15:45.000Z | 2022-02-14T12:15:45.000Z | nabu/story.py | sterlingbaldwin/nabu | 6f19a1b237cdab6ff2179c952f41e239e1a0a3e8 | [
"MIT"
] | null | null | null | from typing import ChainMap
import yaml
from pathlib import Path
from jinja2 import Template
from weasyprint import HTML, CSS
# from xhtml2pdf import pisa
class Story():
def __init__(self, story_path, story_name, template_path, *args, **kwargs):
self.template_path = template_path
self.story_path =... | 37.206897 | 79 | 0.598239 | 2,000 | 0.926784 | 0 | 0 | 0 | 0 | 0 | 0 | 418 | 0.193698 |
022fd56061f4a128f54c059a42d1bbaadf434720 | 322 | py | Python | src/homework/models/__init__.py | nvo87/education-backend | 1f008bd396b5dde4483af611532826a9bca9fef5 | [
"MIT"
] | 62 | 2021-09-22T18:38:26.000Z | 2022-03-29T06:09:42.000Z | src/homework/models/__init__.py | nvo87/education-backend | 1f008bd396b5dde4483af611532826a9bca9fef5 | [
"MIT"
] | 50 | 2021-09-16T07:17:31.000Z | 2022-03-26T12:06:58.000Z | src/homework/models/__init__.py | nvo87/education-backend | 1f008bd396b5dde4483af611532826a9bca9fef5 | [
"MIT"
] | 16 | 2021-10-17T17:43:31.000Z | 2022-03-26T11:22:45.000Z | from homework.models.answer import Answer
from homework.models.answer_access_log_entry import AnswerAccessLogEntry
from homework.models.answer_cross_check import AnswerCrossCheck
from homework.models.question import Question
__all__ = [
'Answer',
'AnswerAccessLogEntry',
'AnswerCrossCheck',
'Question',
... | 26.833333 | 72 | 0.801242 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.180124 |
0230ced77fc05cfeb2ad94e5f316982b5ce418ba | 1,650 | py | Python | second workout/8B/A.py | paktusov/algorithms | b21e7ead2325f77a606dc53495866e359f2e24fe | [
"BSD-3-Clause"
] | null | null | null | second workout/8B/A.py | paktusov/algorithms | b21e7ead2325f77a606dc53495866e359f2e24fe | [
"BSD-3-Clause"
] | null | null | null | second workout/8B/A.py | paktusov/algorithms | b21e7ead2325f77a606dc53495866e359f2e24fe | [
"BSD-3-Clause"
] | null | null | null | def add(tree, x):
if not tree:
tree.extend([x, None, None])
print('DONE')
return
key = tree[0]
if x == key:
print('ALREADY')
elif x < key:
left = tree[1]
if left == None:
tree[1] = [x, None, None]
print('DONE')
else:
... | 21.710526 | 54 | 0.434545 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.090303 |
023179993902aa78bcb94918909fb230bdfcaedd | 5,502 | py | Python | fewshot/clis/score_simple.py | armancohan/flex | 2a005fd18f522d2667421f170568df1164a73c3a | [
"Apache-2.0"
] | 63 | 2021-07-01T23:40:55.000Z | 2022-03-15T21:56:57.000Z | fewshot/clis/score_simple.py | armancohan/flex | 2a005fd18f522d2667421f170568df1164a73c3a | [
"Apache-2.0"
] | 1 | 2022-03-04T11:15:55.000Z | 2022-03-28T09:33:54.000Z | fewshot/clis/score_simple.py | armancohan/flex | 2a005fd18f522d2667421f170568df1164a73c3a | [
"Apache-2.0"
] | 3 | 2021-07-31T05:06:14.000Z | 2022-02-28T12:45:06.000Z | import json
from typing import TextIO
from functools import partial
import click
import numpy as np
from scipy.stats import sem
import pandas as pd
from fewshot.bootstrap import bootstrap
from fewshot.bootstrap import ci
from fewshot.challenges.utils import get_gold_dataset
from . import score_utils as su
def statist... | 38.746479 | 117 | 0.596692 | 0 | 0 | 0 | 0 | 4,667 | 0.848237 | 0 | 0 | 1,135 | 0.206289 |
0232a5792f409bc2541863dd10af6a3d5b55632c | 1,196 | py | Python | KWS/Dissection/tf_mfcc_from_log_mel_spectrogram_sample.py | xrick/gotek_smic | 7655b6d7415b23c35810b8db48af7424f7dcdb06 | [
"MIT"
] | null | null | null | KWS/Dissection/tf_mfcc_from_log_mel_spectrogram_sample.py | xrick/gotek_smic | 7655b6d7415b23c35810b8db48af7424f7dcdb06 | [
"MIT"
] | null | null | null | KWS/Dissection/tf_mfcc_from_log_mel_spectrogram_sample.py | xrick/gotek_smic | 7655b6d7415b23c35810b8db48af7424f7dcdb06 | [
"MIT"
] | null | null | null | batch_size, num_samples, sample_rate = 32, 32000, 16000.0
# A Tensor of [batch_size, num_samples] mono PCM samples in the range [-1, 1].
pcm = tf.random.normal([batch_size, num_samples], dtype=tf.float32)
# A 1024-point STFT with frames of 64 ms and 75% overlap.
stfts = tf.signal.stft(pcm, frame_length=1024, frame_ste... | 46 | 78 | 0.778428 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 326 | 0.272575 |
0232d872e8633ddbe199a54a9b7cd036c696f627 | 458 | py | Python | user/migrations/0017_auto_20200812_2149.py | Muia23/Grammer | dcc26937d88382c1da36a5f72306e6de367e90a3 | [
"Unlicense"
] | null | null | null | user/migrations/0017_auto_20200812_2149.py | Muia23/Grammer | dcc26937d88382c1da36a5f72306e6de367e90a3 | [
"Unlicense"
] | null | null | null | user/migrations/0017_auto_20200812_2149.py | Muia23/Grammer | dcc26937d88382c1da36a5f72306e6de367e90a3 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-08-12 18:49
from __future__ import unicode_literals
from django.db import migrations
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('user', '0016_post_likes'),
]
operations = [
migrations.Alter... | 20.818182 | 55 | 0.617904 | 285 | 0.622271 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.237991 |
0233159b2601985f539a68dd35218b81258f9ecc | 1,834 | py | Python | audio/loudness_normalization.py | Open-Speech-EkStep/common_scripts | 916f01444e028f9111d5499217abf4443bd24017 | [
"MIT"
] | 4 | 2021-07-22T15:32:13.000Z | 2022-01-25T08:13:45.000Z | audio/loudness_normalization.py | Open-Speech-EkStep/common_scripts | 916f01444e028f9111d5499217abf4443bd24017 | [
"MIT"
] | null | null | null | audio/loudness_normalization.py | Open-Speech-EkStep/common_scripts | 916f01444e028f9111d5499217abf4443bd24017 | [
"MIT"
] | 3 | 2021-04-12T05:04:55.000Z | 2021-08-25T06:55:42.000Z | from pydub import AudioSegment, effects
import glob
import os
from tqdm import tqdm
import argparse
class AudioNormalization:
def __init__(self, wav_file):
self.wav_file = wav_file
def loudness_normalization(self, target_dBFS=-15):
audio_file = AudioSegment.from_file(self.wav_file, format='wav... | 36.68 | 95 | 0.698473 | 582 | 0.317339 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.083969 |
0233975ca46a04c5b097d1d82d0ed1a76059f352 | 12,308 | py | Python | libcloud/dns/drivers/nsone.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | 4 | 2017-11-14T17:24:12.000Z | 2020-10-30T01:46:02.000Z | libcloud/dns/drivers/nsone.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | 11 | 2017-01-29T08:59:21.000Z | 2018-07-02T09:17:47.000Z | libcloud/dns/drivers/nsone.py | dupontz/libcloud | 419c69441ea10e7bbf37319e5e8d02e82e7e6b40 | [
"Apache-2.0"
] | 4 | 2016-04-04T08:01:48.000Z | 2018-06-06T08:04:36.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 use ... | 34.188889 | 79 | 0.537699 | 11,062 | 0.898765 | 0 | 0 | 0 | 0 | 0 | 0 | 4,266 | 0.346604 |
02339931b6a314a7b42357abbf8fe125695e6d76 | 533 | py | Python | ocr.py | PI2-Braille-printer/OCR | 25511596efbe5e408fe43a92c0d04e513d7fea39 | [
"MIT"
] | null | null | null | ocr.py | PI2-Braille-printer/OCR | 25511596efbe5e408fe43a92c0d04e513d7fea39 | [
"MIT"
] | 6 | 2021-03-18T20:56:22.000Z | 2022-03-11T23:28:10.000Z | ocr.py | PI2-Braille-printer/OCR | 25511596efbe5e408fe43a92c0d04e513d7fea39 | [
"MIT"
] | null | null | null | from PIL import Image, ImageEnhance
import pytesseract
import os
#image = Image.open('f_test.jpg')
#enhance = ImageEnhance.Contrast(image)
#new_image = enhance.enhance(1.5)
#new_image.save('f_test__c_2.jpg')
for x in range(0,3):
os.system('./textcleaner -g -s 2 -a 1 ./Images/test_crop_'+str(x)+'.jpg ./Images/test_cr... | 31.352941 | 110 | 0.739212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.589118 |
0233f5b5066a471f59d0277aa64b3c981e22b913 | 2,090 | py | Python | processing/lua_file_builder.py | eubr-atmosphere/Spark-Log-Parser | 6f2025d50944b3603ce3e41ab09afcb38eab4e08 | [
"Apache-2.0"
] | 1 | 2017-05-06T21:25:39.000Z | 2017-05-06T21:25:39.000Z | processing/lua_file_builder.py | eubr-atmosphere/Spark-Log-Parser | 6f2025d50944b3603ce3e41ab09afcb38eab4e08 | [
"Apache-2.0"
] | null | null | null | processing/lua_file_builder.py | eubr-atmosphere/Spark-Log-Parser | 6f2025d50944b3603ce3e41ab09afcb38eab4e08 | [
"Apache-2.0"
] | 3 | 2018-10-19T12:35:56.000Z | 2019-05-09T08:09:54.000Z | #! /usr/bin/env python3
## Copyright 2018 Eugenio Gianniti <[email protected]>
## Copyright 2016 Giorgio Pea <[email protected]>
##
## 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 Li... | 32.65625 | 75 | 0.623445 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 981 | 0.469378 |
0236d15dce7606a0d8edbca50d378b142b6663f7 | 127 | py | Python | mynlp/__init__.py | Suneel123/mynlp | 9dcf6fb57df66ebd4a359b8cd866323f43bc8ec4 | [
"MIT"
] | null | null | null | mynlp/__init__.py | Suneel123/mynlp | 9dcf6fb57df66ebd4a359b8cd866323f43bc8ec4 | [
"MIT"
] | null | null | null | mynlp/__init__.py | Suneel123/mynlp | 9dcf6fb57df66ebd4a359b8cd866323f43bc8ec4 | [
"MIT"
] | null | null | null | """Top-level package for mynlp."""
__author__ = """Suneel Dondapati"""
__email__ = '[email protected]'
__version__ = '0.1.0'
| 21.166667 | 35 | 0.685039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.653543 |
0236d5c96173fb20b1c62f540c0341822dff9bf5 | 788 | py | Python | test/point_test.py | markupCode/computational-geometry | 9a0a63a0b0c86e0618c18f82283b41baded21c50 | [
"MIT"
] | null | null | null | test/point_test.py | markupCode/computational-geometry | 9a0a63a0b0c86e0618c18f82283b41baded21c50 | [
"MIT"
] | null | null | null | test/point_test.py | markupCode/computational-geometry | 9a0a63a0b0c86e0618c18f82283b41baded21c50 | [
"MIT"
] | null | null | null | import unittest
from geometry.point import Point
class TestPoint(unittest.TestCase):
def get_points(self):
return [
Point(0, 0),
Point(1, 1),
Point(0, 1),
Point(-1, 1),
Point(-1, 0),
Point(-1, -1),
Point(1, -1)
]... | 23.878788 | 50 | 0.549492 | 686 | 0.870558 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.01269 |
0238ca053db973ce47447cd47778ddb364794224 | 2,183 | py | Python | scenarios/simpleBTSEdgeCloudIngestion/units/sensors.py | rdsea/IoTCloudSamples | 37a3550627682981aa7d2a4cf317f19a3b1a699c | [
"Apache-2.0"
] | 5 | 2019-05-04T08:43:58.000Z | 2021-12-20T14:22:52.000Z | scenarios/simpleBTSEdgeCloudIngestion/units/sensors.py | rdsea/IoTCloudSamples | 37a3550627682981aa7d2a4cf317f19a3b1a699c | [
"Apache-2.0"
] | 7 | 2017-10-30T22:53:51.000Z | 2022-02-06T18:03:32.000Z | scenarios/simpleBTSEdgeCloudIngestion/units/sensors.py | rdsea/IoTCloudSamples | 37a3550627682981aa7d2a4cf317f19a3b1a699c | [
"Apache-2.0"
] | 3 | 2018-12-17T17:04:04.000Z | 2021-09-23T07:07:01.000Z | import yaml
import os, errno
import json
def load_config(path):
config = None
with open(path, 'r') as config_file:
config = yaml.load(config_file)
return config
def createSensorConfigs(topicSensors):
sensors = []
count = 0
for i in range(topicSensors['nb']):
config = {}
... | 30.319444 | 149 | 0.607879 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 464 | 0.212552 |
0238ea3d027c6d41c055683ac6fc0e17e3bc821b | 879 | py | Python | array/0018_4_sum/0018_4_sum.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 6 | 2019-09-16T01:50:44.000Z | 2020-09-17T08:52:25.000Z | array/0018_4_sum/0018_4_sum.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | null | null | null | array/0018_4_sum/0018_4_sum.py | zdyxry/LeetCode | 33371285d0f3302158230f46e8b1b63b9f4639c4 | [
"Xnet",
"X11"
] | 4 | 2020-02-07T12:43:16.000Z | 2021-04-11T06:38:55.000Z | import collections
class Solution(object):
def fourSum(self, nums, target):
nums, result, lookup = sorted(nums), [], collections.defaultdict(list)
for i in xrange(0, len(nums) - 1):
for j in xrange(i+1, len(nums)):
lookup[nums[i]+nums[j]].append([i,j])
for i in ... | 35.16 | 83 | 0.480091 | 772 | 0.878271 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
023b3b94e54c17d3e9f985c30a7d72a9e9d96bce | 573 | py | Python | Qcover/backends/__init__.py | BAQIS-Quantum/Qcover | ca3776ed73fefa0cfef08042143a8cf842f8dad5 | [
"Apache-2.0"
] | 38 | 2021-12-22T03:12:01.000Z | 2022-03-17T06:57:10.000Z | Qcover/backends/__init__.py | BAQIS-Quantum/Qcover | ca3776ed73fefa0cfef08042143a8cf842f8dad5 | [
"Apache-2.0"
] | null | null | null | Qcover/backends/__init__.py | BAQIS-Quantum/Qcover | ca3776ed73fefa0cfef08042143a8cf842f8dad5 | [
"Apache-2.0"
] | 13 | 2021-12-22T07:32:44.000Z | 2022-02-28T06:47:41.000Z | from .backend import Backend
from .circuitbyqiskit import CircuitByQiskit
from .circuitbyprojectq import CircuitByProjectq
from .circuitbycirq import CircuitByCirq
from .circuitbyqulacs import CircuitByQulacs
# from .circuitbytket import CircuitByTket
from .circuitbytensor import CircuitByTensor
from .circuitbyq... | 27.285714 | 49 | 0.767888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.279232 |
023c2aec98d43d7652c64c1fee878f6de026330b | 766 | py | Python | python-files/dictionary-val.py | chirumist/Python-Practice | fc7d6447ca492989221904121321aaf762bb6b43 | [
"MIT"
] | null | null | null | python-files/dictionary-val.py | chirumist/Python-Practice | fc7d6447ca492989221904121321aaf762bb6b43 | [
"MIT"
] | null | null | null | python-files/dictionary-val.py | chirumist/Python-Practice | fc7d6447ca492989221904121321aaf762bb6b43 | [
"MIT"
] | null | null | null | """
User Get Key Value Input Dictionary Start
"""
dic = {
"google": "google is provide job and internship.",
"amezon": "amezon is e-commerce store and cloud computing provider.",
"zoom": "zoom is provide video call system to connecting meeating.",
"microsoft": "microsoft is owner of windows and office ... | 24.709677 | 73 | 0.663185 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 498 | 0.650131 |
023fa6bbd20b990b812f3f037de938b8c58a24d0 | 2,811 | py | Python | cloudpredictionframework/anomaly_detection/algorithms/hybrid_algorithm.py | Fruktus/CloudPredictionFramework | 1474287cc9bdfd58ae92db7bc24966a7e600258f | [
"MIT"
] | 1 | 2021-11-19T13:13:20.000Z | 2021-11-19T13:13:20.000Z | cloudpredictionframework/anomaly_detection/algorithms/hybrid_algorithm.py | Fruktus/CloudPredictionFramework | 1474287cc9bdfd58ae92db7bc24966a7e600258f | [
"MIT"
] | null | null | null | cloudpredictionframework/anomaly_detection/algorithms/hybrid_algorithm.py | Fruktus/CloudPredictionFramework | 1474287cc9bdfd58ae92db7bc24966a7e600258f | [
"MIT"
] | null | null | null | from statistics import mean
from collections import defaultdict
from cloudpredictionframework.anomaly_detection.algorithms.base_algorithm import BaseAlgorithm
class HybridAlgorithm(BaseAlgorithm):
def __init__(self, filters: [BaseAlgorithm], min_confidence=0.8):
super().__init__()
self._filters... | 41.338235 | 116 | 0.644966 | 2,648 | 0.942014 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.082177 |
02426c5e9ebc5b6e7797b501d9a365d58338fa41 | 159 | py | Python | Defer/__init__.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | Defer/__init__.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | Defer/__init__.py | loynoir/defer.py | 46f37a046028b1854586301a45870c2b3a628f65 | [
"MIT"
] | null | null | null | __all__ = ['Defer']
from contextlib import contextmanager, ExitStack
@contextmanager
def Defer():
with ExitStack() as stack:
yield stack.callback
| 19.875 | 48 | 0.72327 | 0 | 0 | 72 | 0.45283 | 88 | 0.553459 | 0 | 0 | 7 | 0.044025 |
024385bec991016fbb9a7b197fba1d40d6b4f297 | 9,798 | py | Python | jsonmerge/strategies.py | open-contracting-archive/jsonmerge | 2b87eea10bed3aa380cb28034a96783ac3081a85 | [
"Unlicense"
] | null | null | null | jsonmerge/strategies.py | open-contracting-archive/jsonmerge | 2b87eea10bed3aa380cb28034a96783ac3081a85 | [
"Unlicense"
] | 3 | 2015-09-16T15:37:05.000Z | 2015-09-16T16:32:26.000Z | jsonmerge/strategies.py | open-contracting-archive/jsonmerge | 2b87eea10bed3aa380cb28034a96783ac3081a85 | [
"Unlicense"
] | null | null | null | # vim:ts=4 sw=4 expandtab softtabstop=4
from jsonmerge.exceptions import HeadInstanceError, \
BaseInstanceError, \
SchemaError
import jsonschema
import re
class Strategy(object):
"""Base class for merge strategies.
"""
def merge(self, walk,... | 31.504823 | 112 | 0.557359 | 9,554 | 0.975097 | 0 | 0 | 0 | 0 | 0 | 0 | 3,268 | 0.333537 |
0243fa264d20be4663ad37da1958e0275ed6a559 | 3,100 | py | Python | ArcGISDesktop/reconcile_post_versions.py | jonhusen/ArcGIS | 1d39a627888ce6039c490cdad810cd6d8035cb77 | [
"MIT"
] | null | null | null | ArcGISDesktop/reconcile_post_versions.py | jonhusen/ArcGIS | 1d39a627888ce6039c490cdad810cd6d8035cb77 | [
"MIT"
] | null | null | null | ArcGISDesktop/reconcile_post_versions.py | jonhusen/ArcGIS | 1d39a627888ce6039c490cdad810cd6d8035cb77 | [
"MIT"
] | null | null | null | """
Reconcile and posting versions at 10.0
TODO:WIP
"""
import arcpy, os, sys, string
#Populate parent and child versions in the following manner('Parent':'Child', etc). DO NOT LIST DEFAULT
vTree = {'SDE.Parent':'SDE.Child','SDE.QA':'SDE.Edit'}
#Reconcile and post child versions with parent
def RecPostNonDefault(wo... | 40.789474 | 148 | 0.709677 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 901 | 0.290645 |
024430ea1d89420e6939d1c770a6a86ca49668e5 | 4,626 | py | Python | example/F3Dp/F3D_syn.py | Chunfang/defmod-swpc | 74fe7c02b24a46aa24bca7438738aa5adb72e2b6 | [
"MIT"
] | 26 | 2017-05-12T08:11:57.000Z | 2022-03-06T01:44:24.000Z | example/F3Dp/F3D_syn.py | Soengmou/defmod-swpc | 75740fca3b36107e9d18201a5623c955f6010740 | [
"MIT"
] | 4 | 2019-09-11T15:35:16.000Z | 2020-06-23T10:49:34.000Z | example/F3Dp/F3D_syn.py | Chunfang/defmod-swpc | 74fe7c02b24a46aa24bca7438738aa5adb72e2b6 | [
"MIT"
] | 8 | 2017-05-22T18:40:13.000Z | 2021-02-10T08:04:39.000Z | #!/usr/bin/env python
import numpy as np
import os,sys
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import pyplot as plt
import argparse
ap=argparse.ArgumentParser()
ap.add_argument('-vis') # 1 plot cropped point cloud
ap.add_argument('-refine') # 1 refine mesh
ap.add_argument('-clean') # 1 remove tmp... | 34.266667 | 115 | 0.635754 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 996 | 0.215305 |
0244e0d25129f6105b7892408951f27b584d128e | 2,850 | py | Python | fltk/util/data_loader_utils.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | null | null | null | fltk/util/data_loader_utils.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 2 | 2021-05-11T12:48:14.000Z | 2021-05-11T12:49:24.000Z | fltk/util/data_loader_utils.py | tudelft-eemcs-dml/fltk-testbed-gr-5 | 72afa24a37cd1f8f5f49665c83ccbd730d76ad21 | [
"BSD-2-Clause"
] | 2 | 2021-05-03T17:40:18.000Z | 2021-05-11T09:34:30.000Z | import numpy
from torch.utils.data import DataLoader
import os
import pickle
import random
from ..datasets import Dataset
def generate_data_loaders_from_distributed_dataset(distributed_dataset, batch_size):
"""
Generate data loaders from a distributed dataset.
:param distributed_dataset: Distributed data... | 31.318681 | 138 | 0.729825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 878 | 0.30807 |
024580a7ff506aa3cbda6d46122b84b1603a6c05 | 794 | py | Python | pywikibot/families/omegawiki_family.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | pywikibot/families/omegawiki_family.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | pywikibot/families/omegawiki_family.py | shizhao/pywikibot-core | 8441a1cd0e8dd5d3701f1c5e26077e40a40937ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
__version__ = '$Id: 024580a7ff506aa3cbda6d46122b84b1603a6c05 $'
from pywikibot import family
# Omegawiki, the Ultimate online dictionary
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'omegawiki'
self.langs['omegawiki']... | 22.685714 | 82 | 0.632242 | 627 | 0.789673 | 0 | 0 | 0 | 0 | 0 | 0 | 312 | 0.392947 |
024a818dbea659d940b31f646bbc0d73684c65d8 | 4,781 | py | Python | tools/scripts/extract_features_WORLD.py | feelins/mcd_WORLD | 8a98c1c740ec5371a322d038b8498cb72f3f7750 | [
"BSD-3-Clause"
] | 5 | 2019-05-16T11:42:21.000Z | 2022-03-25T22:25:35.000Z | tools/scripts/extract_features_WORLD.py | feelins/mcd_WORLD | 8a98c1c740ec5371a322d038b8498cb72f3f7750 | [
"BSD-3-Clause"
] | null | null | null | tools/scripts/extract_features_WORLD.py | feelins/mcd_WORLD | 8a98c1c740ec5371a322d038b8498cb72f3f7750 | [
"BSD-3-Clause"
] | null | null | null | import os
import sys
import shutil
import glob
import time
import multiprocessing as mp
if len(sys.argv)!=4:
print("Usage: ")
print("python extract_features_WORLD.py <path_to_wav_dir> <path_to_feat_dir> <sampling rate>")
sys.exit(1)
# top currently directory
current_dir = os.getcwd()
# input audio direct... | 34.89781 | 116 | 0.535244 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,470 | 0.307467 |
024b2b7d9d7075b55a314e3428f50fdfaf0a011e | 19,261 | py | Python | mmtbx/bulk_solvent/f_model_all_scales.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | mmtbx/bulk_solvent/f_model_all_scales.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | mmtbx/bulk_solvent/f_model_all_scales.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
from cctbx.array_family import flex
from cctbx import adptbx
from mmtbx import bulk_solvent
from cctbx.array_family import flex
from cctbx import adptbx
import mmtbx
from libtbx import group_args
import mmtbx.arrays
import mmtbx.bulk_solvent.scaler
from l... | 44.380184 | 82 | 0.626343 | 18,746 | 0.973262 | 0 | 0 | 0 | 0 | 0 | 0 | 2,819 | 0.146358 |
024c1d679000935d415d1310cd2a49a746f73e4a | 4,704 | py | Python | pysparkpro/dsl/nodesbak.py | liaoxiong3x/pyspark | 2a16ad495780b1b37f5dc571cb7ea11260765366 | [
"Apache-2.0"
] | null | null | null | pysparkpro/dsl/nodesbak.py | liaoxiong3x/pyspark | 2a16ad495780b1b37f5dc571cb7ea11260765366 | [
"Apache-2.0"
] | null | null | null | pysparkpro/dsl/nodesbak.py | liaoxiong3x/pyspark | 2a16ad495780b1b37f5dc571cb7ea11260765366 | [
"Apache-2.0"
] | null | null | null | from session.abstract_class import PysparkPro
class DslAdaptor(object):
pysparkpro = PysparkPro()
select = 'SELECT'
insert = 'INSERT'
delete = 'DELETE'
update = 'UPDATE'
alert = 'ALERT'
create_table = 'CREATETABLE'
drop_table = 'DROPTABLE'
create_index = 'CREATEINDEX'
drop_inde... | 26.426966 | 83 | 0.650298 | 4,531 | 0.963223 | 0 | 0 | 0 | 0 | 0 | 0 | 217 | 0.046131 |
024c4ab64cff5513fb1d36a41a43c50162ebb3f1 | 821 | py | Python | backdoor/detect_buffer_overflow.py | Sanardi/bored | 2816395b99c05871f01fbbd55a833dcd13801014 | [
"MIT"
] | null | null | null | backdoor/detect_buffer_overflow.py | Sanardi/bored | 2816395b99c05871f01fbbd55a833dcd13801014 | [
"MIT"
] | null | null | null | backdoor/detect_buffer_overflow.py | Sanardi/bored | 2816395b99c05871f01fbbd55a833dcd13801014 | [
"MIT"
] | null | null | null | import socket
def connect(server, port):
# open a connection to vulnserver
s = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
s.connect ((server, port))
return s
def read_until(s, delim=b':'):
buf = b''
while not buf.endswith(delim):
buf += s.recv(1)
return buf
def overflo... | 23.457143 | 58 | 0.548112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.149817 |
024c6205dd81c6aee9436b9f31977f458d63fa70 | 3,384 | py | Python | tools/test.py | EMinsight/MPh | 2b967b77352f9ce7effcd50ad4774bf5eaf731ea | [
"MIT"
] | null | null | null | tools/test.py | EMinsight/MPh | 2b967b77352f9ce7effcd50ad4774bf5eaf731ea | [
"MIT"
] | null | null | null | tools/test.py | EMinsight/MPh | 2b967b77352f9ce7effcd50ad4774bf5eaf731ea | [
"MIT"
] | null | null | null | """
Runs all tests in the intended order.
Each test script (in the `tests` folder) contains a group of tests.
These scripts must be run in separate processes as most of them start
and stop the Java virtual machine, which can only be done once per
process. This is why simply calling pyTest (with `python -m pytes... | 36 | 76 | 0.636525 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,823 | 0.538393 |
024c8b636c73803ba5c14b996265676bb94e1dd0 | 592 | py | Python | notebooks/shared/ipypublish/export_plugins/html_standard.py | leonbett/debuggingbook | ae1fa940c306160429232fbc93a7a7f14b44efb7 | [
"MIT"
] | 728 | 2018-09-21T03:51:04.000Z | 2022-03-28T09:35:04.000Z | notebooks/shared/ipypublish/export_plugins/html_standard.py | leonbett/debuggingbook | ae1fa940c306160429232fbc93a7a7f14b44efb7 | [
"MIT"
] | 103 | 2018-09-02T12:26:32.000Z | 2022-02-09T07:19:08.000Z | notebooks/shared/ipypublish/export_plugins/html_standard.py | leonbett/debuggingbook | ae1fa940c306160429232fbc93a7a7f14b44efb7 | [
"MIT"
] | 157 | 2018-09-02T08:00:50.000Z | 2022-03-27T22:04:50.000Z | #!/usr/bin/env python
"""html in standard nbconvert format
"""
from ipypublish.html.create_tpl import create_tpl
from ipypublish.html.standard import content
from ipypublish.html.standard import content_tagging
from ipypublish.html.standard import document
from ipypublish.html.standard import inout_prompt
from ipypubl... | 28.190476 | 52 | 0.802365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.113176 |
024cdbf14b841e1da6f77d24cda6ea8444019523 | 1,320 | py | Python | application/src/app_pkg/routes/get_messages.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | null | null | null | application/src/app_pkg/routes/get_messages.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | 3 | 2021-06-08T21:39:12.000Z | 2022-01-13T02:46:20.000Z | application/src/app_pkg/routes/get_messages.py | eyardley/CSC648-SoftwareEngineering-Snapster | 6dbe1cf9b34de6d6dbc6be75db3a34583f67c01a | [
"MIT"
] | 1 | 2021-05-09T21:01:28.000Z | 2021-05-09T21:01:28.000Z | # from flask import render_template, request, make_response, jsonify
# from src.app_pkg.routes.common import validate_helper
# from src.app_pkg import app, db
# from src.app_pkg.forms import MessageForm
#
# ################################################
# # Show All Messages / User Profile #
# ###########... | 37.714286 | 106 | 0.641667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,286 | 0.974242 |
024d5f02a7be6e61357ca017fedc52a6ef5e46ea | 18,681 | py | Python | tests/fixtures/test_product.py | oldarmyc/cap | 2e3e4b89d3d05f03876446d6f339167bd2805ea8 | [
"Apache-2.0"
] | 1 | 2017-12-13T20:19:29.000Z | 2017-12-13T20:19:29.000Z | tests/fixtures/test_product.py | oldarmyc/cap | 2e3e4b89d3d05f03876446d6f339167bd2805ea8 | [
"Apache-2.0"
] | null | null | null | tests/fixtures/test_product.py | oldarmyc/cap | 2e3e4b89d3d05f03876446d6f339167bd2805ea8 | [
"Apache-2.0"
] | 1 | 2018-09-21T15:26:42.000Z | 2018-09-21T15:26:42.000Z | # Copyright 2016 Dave Kludt
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 26.018106 | 79 | 0.429849 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,301 | 0.497886 |
0251012874a85c99ece694f4c087c35e3ad1cb49 | 2,150 | py | Python | script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | ef4fb92c470e45c0a07b0ee0e474224d88d3d410 | [
"Apache-2.0"
] | 2 | 2020-04-08T17:05:01.000Z | 2020-06-30T18:02:03.000Z | script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | ef4fb92c470e45c0a07b0ee0e474224d88d3d410 | [
"Apache-2.0"
] | null | null | null | script/download_pretrained.py | cttsai1985/google-quest-qa-labeling-pipeline | ef4fb92c470e45c0a07b0ee0e474224d88d3d410 | [
"Apache-2.0"
] | null | null | null | """
fork THIS excellent downloader
https://www.kaggle.com/maroberti/transformers-model-downloader-pytorch-tf2-0
"""
from typing import Union
from pathlib import Path
import os
import transformers
from transformers import AutoConfig, AutoTokenizer, TFAutoModel
def transformers_model_dowloader(pretrained_model_name: ... | 28.289474 | 120 | 0.693953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 758 | 0.352558 |
0251ffe3075d234371ce4b6df85d16a4d7b3e648 | 28,128 | py | Python | scripts/icdcs2019/communication.py | HKBU-HPML/gtopkssgd | 6f57343f3749939b0345d36fcb2c24470942aefd | [
"Apache-2.0"
] | 33 | 2019-05-13T12:04:15.000Z | 2022-03-14T06:23:56.000Z | scripts/icdcs2019/communication.py | HKBU-HPML/gtopkssgd | 6f57343f3749939b0345d36fcb2c24470942aefd | [
"Apache-2.0"
] | 2 | 2019-04-24T02:38:07.000Z | 2021-05-31T11:22:24.000Z | scripts/icdcs2019/communication.py | HKBU-HPML/gtopkssgd | 6f57343f3749939b0345d36fcb2c24470942aefd | [
"Apache-2.0"
] | 10 | 2019-07-18T23:43:32.000Z | 2021-06-16T13:22:04.000Z | from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from utils import read_log, plot_hist, update_fontsize, autolabel, read_p100_log
from plot_sth import Bar
import os
import plot_sth as Color
import math
OUTPUT_PATH = '/media/sf_Shared_Data/tmp/icdcs2019'
INPUT_PATH = '/media/sf_S... | 38.478796 | 141 | 0.581342 | 6,004 | 0.213453 | 0 | 0 | 0 | 0 | 0 | 0 | 8,009 | 0.284734 |
02527978354f0193255cdacc1cd11fc9125db75e | 2,188 | py | Python | app/routers/post.py | thiere18/fastapi-boilerplate | 6760e0e49caa915563d44897262d493b012207c0 | [
"MIT"
] | 5 | 2021-12-10T17:35:31.000Z | 2021-12-30T18:36:23.000Z | app/routers/post.py | thiere18/fastapi-boilerplate | 6760e0e49caa915563d44897262d493b012207c0 | [
"MIT"
] | 1 | 2021-11-21T13:59:03.000Z | 2021-11-21T13:59:03.000Z | app/routers/post.py | thiere18/fastapi-boilerplate | 6760e0e49caa915563d44897262d493b012207c0 | [
"MIT"
] | 1 | 2021-12-07T14:08:12.000Z | 2021-12-07T14:08:12.000Z | from logging import raiseExceptions
from typing import List
from fastapi import APIRouter,Depends,HTTPException, Response,status
from sqlalchemy.orm.session import Session
from .. database import get_db
from .. import models,schemas ,oauth2
router=APIRouter(
prefix='/posts',
tags=['Post']
)
@router.get('/'... | 39.781818 | 137 | 0.743601 | 0 | 0 | 0 | 0 | 1,871 | 0.855119 | 0 | 0 | 131 | 0.059872 |
0252f8eedc296b4ab429a47459f42ba29b283dbc | 8,766 | py | Python | src/util.py | thanhnhan311201/via-line-detection | 1ba986110f7522df1b82c2cdeacd5c8bc27ac896 | [
"Unlicense"
] | null | null | null | src/util.py | thanhnhan311201/via-line-detection | 1ba986110f7522df1b82c2cdeacd5c8bc27ac896 | [
"Unlicense"
] | null | null | null | src/util.py | thanhnhan311201/via-line-detection | 1ba986110f7522df1b82c2cdeacd5c8bc27ac896 | [
"Unlicense"
] | null | null | null | import torch.nn as nn
import cv2
import torch
from copy import deepcopy
import numpy as np
from torch.autograd import Variable
from torch.autograd import Function as F
from numpy.polynomial import Polynomial as P
try:
from parameters import Parameters
except:
from src.parameters import Parameters
import math... | 27.828571 | 98 | 0.544832 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 960 | 0.109514 |
0253374b375e14e18b7b22c7b40e9e638b1ad7cf | 3,322 | py | Python | src/tests/unit_tests/io_tools_test.py | samueljackson92/major-project | 5d82b875944fcf1f001f9beb5e5419ba60be3bf1 | [
"MIT"
] | 8 | 2015-01-26T16:23:29.000Z | 2020-03-17T00:57:42.000Z | src/tests/unit_tests/io_tools_test.py | samueljackson92/major-project | 5d82b875944fcf1f001f9beb5e5419ba60be3bf1 | [
"MIT"
] | 64 | 2015-02-05T06:34:56.000Z | 2015-05-03T15:46:49.000Z | src/tests/unit_tests/io_tools_test.py | samueljackson92/major-project | 5d82b875944fcf1f001f9beb5e5419ba60be3bf1 | [
"MIT"
] | null | null | null | import nose.tools
import unittest
import os
import json
import pandas as pd
import numpy as np
import mia
from mia.io_tools import *
from ..test_utils import get_file_path
class IOTests(unittest.TestCase):
@classmethod
def setupClass(cls):
cls._output_files = []
@classmethod
def teardownCla... | 35.340426 | 81 | 0.669175 | 3,146 | 0.94702 | 0 | 0 | 207 | 0.062312 | 0 | 0 | 459 | 0.13817 |
0254feaa1c998dfb2faf7f35247b0cc22066d85a | 326 | py | Python | main/migrations_old/0007_remove_profile_rated_recipes.py | ggetzie/nnr | a8b1b1d771027edee2c19062f39fa982cfd024b0 | [
"MIT"
] | null | null | null | main/migrations_old/0007_remove_profile_rated_recipes.py | ggetzie/nnr | a8b1b1d771027edee2c19062f39fa982cfd024b0 | [
"MIT"
] | 5 | 2020-07-28T12:41:50.000Z | 2022-01-21T23:27:15.000Z | main/migrations_old/0007_remove_profile_rated_recipes.py | ggetzie/nnr | a8b1b1d771027edee2c19062f39fa982cfd024b0 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2019-09-29 13:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0006_recipe_tags'),
]
operations = [
migrations.RemoveField(
model_name='profile',
name='rated_recipes',
),
... | 18.111111 | 47 | 0.588957 | 241 | 0.739264 | 0 | 0 | 0 | 0 | 0 | 0 | 95 | 0.291411 |
0255255ddce0aede915e8004ff48e8619c540430 | 126 | py | Python | src/timber_clay_hybrid/assembly/__init__.py | augmentedfabricationlab/Timber_Clay_Hybrid | 243efddac77970c989b551697a0e188932064849 | [
"MIT"
] | 1 | 2020-12-16T01:25:07.000Z | 2020-12-16T01:25:07.000Z | src/timber_clay_hybrid/assembly/__init__.py | augmentedfabricationlab/timber_clay_hybrid | 243efddac77970c989b551697a0e188932064849 | [
"MIT"
] | null | null | null | src/timber_clay_hybrid/assembly/__init__.py | augmentedfabricationlab/timber_clay_hybrid | 243efddac77970c989b551697a0e188932064849 | [
"MIT"
] | null | null | null | from .assembly import HRCAssembly
from .element import HRCElement
from .artist import AssemblyArtist
from .utilities import *
| 25.2 | 34 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
025829c61e2b13a8ebf606a7afdd54a016dd8119 | 3,674 | py | Python | backend/api/tests/schema/test_newsletter.py | pauloxnet/pycon | 82b6eff76dcc785865ea3ffd97a45e931c0add26 | [
"MIT"
] | 2 | 2017-07-18T21:51:25.000Z | 2017-12-23T11:08:39.000Z | backend/api/tests/schema/test_newsletter.py | pauloxnet/pycon | 82b6eff76dcc785865ea3ffd97a45e931c0add26 | [
"MIT"
] | 23 | 2017-07-18T20:22:38.000Z | 2018-01-05T05:45:15.000Z | backend/api/tests/schema/test_newsletter.py | pauloxnet/pycon | 82b6eff76dcc785865ea3ffd97a45e931c0add26 | [
"MIT"
] | 2 | 2017-07-18T21:27:33.000Z | 2017-07-18T22:07:03.000Z | from unittest.mock import patch
import pytest
from pytest import mark
from integrations.mailchimp import SubscriptionResult
from newsletters.models import Subscription
def test_subscribe_to_newsletter(graphql_client):
email = "[email protected]"
variables = {"email": email}
query = """
mutation($em... | 27.833333 | 78 | 0.617583 | 0 | 0 | 0 | 0 | 1,755 | 0.477681 | 0 | 0 | 1,797 | 0.489113 |
02591832a76c44befd1384a4984c9e645f451a38 | 3,077 | py | Python | conference_lib/confemailrecipients.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | conference_lib/confemailrecipients.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | 1 | 2020-02-05T13:00:29.000Z | 2020-02-05T13:00:29.000Z | conference_lib/confemailrecipients.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | #-----------------------------------------------------
# Mimas: conference submission and review system
# (c) Allan Kelly 2016-2020 http://www.allankelly.net
# Licensed under MIT License, see LICENSE file
# -----------------------------------------------------
# System imports
# Google imports
from google.appengine.e... | 40.486842 | 109 | 0.653559 | 2,637 | 0.857004 | 0 | 0 | 0 | 0 | 0 | 0 | 764 | 0.248294 |
0259184a3f3d6c2f7159bf04b270b9b14a650178 | 891 | py | Python | jexam/argparser.py | chrispyles/jexam | ebe83b170f51c5820e0c93955824c3798922f097 | [
"BSD-3-Clause"
] | 1 | 2020-07-25T02:36:38.000Z | 2020-07-25T02:36:38.000Z | jexam/argparser.py | chrispyles/jexam | ebe83b170f51c5820e0c93955824c3798922f097 | [
"BSD-3-Clause"
] | null | null | null | jexam/argparser.py | chrispyles/jexam | ebe83b170f51c5820e0c93955824c3798922f097 | [
"BSD-3-Clause"
] | null | null | null | #################################
##### jExam Argument Parser #####
#################################
import argparse
def get_parser():
"""
Creates and returns the argument parser for jExam
Returns:
``argparse.ArgumentParser``: the argument parser for jExam
"""
parser = argparse.Argum... | 42.428571 | 119 | 0.628507 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.586981 |
02591a0ba3663c70495908f0fded2d81e95b4ceb | 474 | py | Python | Entities/element.py | JoseleSolis/Proceso-de-aprendizaje | 0c6ee3a64ad48501dd42d2abcb5bf8b4cbb4f370 | [
"MIT"
] | null | null | null | Entities/element.py | JoseleSolis/Proceso-de-aprendizaje | 0c6ee3a64ad48501dd42d2abcb5bf8b4cbb4f370 | [
"MIT"
] | null | null | null | Entities/element.py | JoseleSolis/Proceso-de-aprendizaje | 0c6ee3a64ad48501dd42d2abcb5bf8b4cbb4f370 | [
"MIT"
] | 2 | 2022-02-07T05:42:57.000Z | 2022-02-13T11:05:21.000Z | class Element:
dependencies = []
def __init__(self, name):
self.name = name
def add_dependencies(self, *elements):
for element in elements:
if not self.dependencies.__contains__(element):
self.dependencies.append(element)
def remove_dependencies(self, *elem... | 19.75 | 59 | 0.622363 | 465 | 0.981013 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0259bea6f07ec94194968114adbb7688e3c79035 | 236 | py | Python | basic/Pyshop/products/models.py | IsAlbertLiu/Python-basics | 49c0c93fb7d1abb70548854b69346eb5837ba00d | [
"MIT"
] | null | null | null | basic/Pyshop/products/models.py | IsAlbertLiu/Python-basics | 49c0c93fb7d1abb70548854b69346eb5837ba00d | [
"MIT"
] | null | null | null | basic/Pyshop/products/models.py | IsAlbertLiu/Python-basics | 49c0c93fb7d1abb70548854b69346eb5837ba00d | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Product(models.Model):
name = models.CharField(max_length=255)
price = models.FloatField()
stack = models.IntegerField()
image_url = models.CharField(2083)
| 23.6 | 43 | 0.724576 | 177 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 26 | 0.110169 |
0259fbe373b86b3d2859b384b23af03bfb7c829a | 758 | py | Python | examples/delta_setitem/001_check_setitem.py | pkicsiny/xpart | cddf3eb65ffc198c22dd37204139ce3177a9bd96 | [
"MIT"
] | null | null | null | examples/delta_setitem/001_check_setitem.py | pkicsiny/xpart | cddf3eb65ffc198c22dd37204139ce3177a9bd96 | [
"MIT"
] | null | null | null | examples/delta_setitem/001_check_setitem.py | pkicsiny/xpart | cddf3eb65ffc198c22dd37204139ce3177a9bd96 | [
"MIT"
] | null | null | null | import numpy as np
import xpart as xp
import xobjects as xo
#context = xo.ContextPyopencl()
context = xo.ContextCpu()
ctx2np = context.nparray_from_context_array
particles = xp.Particles(_context=context, p0c=26e9, delta=[1,2,3])
assert ctx2np(particles.delta[2]) == 3
assert np.isclose(ctx2np(particles.rvv[2]), 1.00... | 32.956522 | 82 | 0.726913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.040897 |
025a143f5cc2381ed79e2e47f4c56370b64d62d8 | 9,628 | py | Python | tests/test_train_eval_mode.py | glmcdona/stable-baselines3-contrib | 91f9b1ed34fbaa9243a044ea67aa4c677663bfc2 | [
"MIT"
] | 93 | 2020-10-22T14:44:58.000Z | 2022-03-25T20:06:47.000Z | tests/test_train_eval_mode.py | glmcdona/stable-baselines3-contrib | 91f9b1ed34fbaa9243a044ea67aa4c677663bfc2 | [
"MIT"
] | 36 | 2020-10-26T11:13:23.000Z | 2022-03-31T15:11:05.000Z | tests/test_train_eval_mode.py | glmcdona/stable-baselines3-contrib | 91f9b1ed34fbaa9243a044ea67aa4c677663bfc2 | [
"MIT"
] | 50 | 2020-12-06T14:21:10.000Z | 2022-03-31T14:25:36.000Z | from typing import Union
import gym
import numpy as np
import pytest
import torch as th
import torch.nn as nn
from stable_baselines3.common.preprocessing import get_flattened_obs_dim
from stable_baselines3.common.torch_layers import BaseFeaturesExtractor
from sb3_contrib import QRDQN, TQC, MaskablePPO
from sb3_contri... | 35.791822 | 125 | 0.745015 | 818 | 0.084961 | 0 | 0 | 2,223 | 0.230889 | 0 | 0 | 1,129 | 0.117262 |
025a4cb24f7a49faae7c43b7347971470e80c885 | 880 | py | Python | test_harness.py | alexk307/server-exercise | 31c76a3b370334a22787e06b4c28f8c65f4dd4ff | [
"Apache-2.0"
] | null | null | null | test_harness.py | alexk307/server-exercise | 31c76a3b370334a22787e06b4c28f8c65f4dd4ff | [
"Apache-2.0"
] | null | null | null | test_harness.py | alexk307/server-exercise | 31c76a3b370334a22787e06b4c28f8c65f4dd4ff | [
"Apache-2.0"
] | null | null | null | from requests import post
from random import randrange
from uuid import uuid4
import base64
import json
PORT = 6789
MAX_SIZE_UDP = 65535
HEADER_SIZE = 12
NUM_TRANSACTIONS = 10
SERVER = 'http://localhost:1234/add'
def main():
for i in range(NUM_TRANSACTIONS):
# Psuedo-random transaction ID
trans... | 22 | 69 | 0.582955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.151136 |
025c24bac13de507908c7c75d29225711dbc0aef | 2,414 | py | Python | checkmate_comp/experiments/table_approx_speedup_ratios.py | uwsampl/dtr-prototype | eff53cc4804cc7d6246a6e5086861ce2b846f62b | [
"Linux-OpenIB"
] | 90 | 2020-06-18T05:32:06.000Z | 2022-03-28T13:05:17.000Z | checkmate_comp/experiments/table_approx_speedup_ratios.py | merrymercy/dtr-prototype | bf40e182453a7d8d23581ea68f32a9d7d2037d62 | [
"Linux-OpenIB"
] | 5 | 2020-07-02T02:25:16.000Z | 2022-03-24T05:50:30.000Z | checkmate_comp/experiments/table_approx_speedup_ratios.py | uwsampl/dtr-prototype | eff53cc4804cc7d6246a6e5086861ce2b846f62b | [
"Linux-OpenIB"
] | 13 | 2020-06-27T07:01:54.000Z | 2022-01-18T07:31:01.000Z | from experiments.common.definitions import remat_data_dir
import numpy as np
import pandas as pd
import glob
import re
# compute aggregated tables of max and geomean lp approximation ratios
exp_name_re = re.compile(r"^(?P<platform>.+?)_(?P<model_name>.+?)_(?P<batch_size>[0-9]+?)_(?P<input_shape>None|.+?)$")
dfs = []
... | 47.333333 | 223 | 0.67937 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 871 | 0.360812 |
025c491da627375770263331eb452c03d4b317b0 | 431 | py | Python | src/terra/contracts/levana.py | fentas/staketaxcsv | ad37a32d8864111dbf88e926b80eb4ccacb921c6 | [
"MIT"
] | null | null | null | src/terra/contracts/levana.py | fentas/staketaxcsv | ad37a32d8864111dbf88e926b80eb4ccacb921c6 | [
"MIT"
] | null | null | null | src/terra/contracts/levana.py | fentas/staketaxcsv | ad37a32d8864111dbf88e926b80eb4ccacb921c6 | [
"MIT"
] | null | null | null | # known contracts from protocol
CONTRACTS = [
# NFT - Meteor Dust
"terra1p70x7jkqhf37qa7qm4v23g4u4g8ka4ktxudxa7",
# NFT - Eggs
"terra1k0y373yxqne22pc9g7jvnr4qclpsxtafevtrpg",
# NFT - Dragons
"terra1vhuyuwwr4rkdpez5f5lmuqavut28h5dt29rpn6",
# NFT - Loot
"terra14gfnxnwl0yz6njzet4n33erq5n70w... | 26.9375 | 51 | 0.723898 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 306 | 0.709977 |
025c55086785bd2358aa07697fa9e5ff75a7e9fe | 2,268 | py | Python | github/migrations/0007_auto_20201003_1239.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | github/migrations/0007_auto_20201003_1239.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | github/migrations/0007_auto_20201003_1239.py | h3nnn4n/git-o-matic-9k | d8241cc768591e0f41c02b2057d7b56697a4cc86 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-03 12:39
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('github', '0006_repository_open_issues_count'),
]
operations = [
migrations.RenameField(
model_name=... | 29.076923 | 74 | 0.543651 | 2,146 | 0.946208 | 0 | 0 | 0 | 0 | 0 | 0 | 353 | 0.155644 |
025c8c73c3dda45b9c81e36fafb6a8137598b6d5 | 254 | py | Python | tests/unit/test_databeardb.py | chrisrycx/pyDataLogger | 21094da9de54ab467519a26680247ddc3efa6696 | [
"MIT"
] | 1 | 2020-09-25T16:25:09.000Z | 2020-09-25T16:25:09.000Z | tests/unit/test_databeardb.py | chrisrycx/pyDataLogger | 21094da9de54ab467519a26680247ddc3efa6696 | [
"MIT"
] | 4 | 2020-10-06T17:16:58.000Z | 2020-12-18T17:06:16.000Z | tests/unit/test_databeardb.py | chrisrycx/pyDataLogger | 21094da9de54ab467519a26680247ddc3efa6696 | [
"MIT"
] | 2 | 2020-03-24T14:32:29.000Z | 2020-08-05T17:38:24.000Z | '''
A unit test for databearDB.py
Runs manually at this point...
'''
import unittest
from databear.databearDB import DataBearDB
#Tests
class testDataBearDB(unittest.TestCase):
def setUp(self):
'''
Hmm
'''
pass
| 14.111111 | 42 | 0.622047 | 111 | 0.437008 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.397638 |
025ca2353166896f2415d32f2b2cf83266307837 | 19 | py | Python | dbt/adapters/athena/__version__.py | sacundim/dbt-athena | 120c9d3c88da98ec11ddfcf0a0a3fda49538f197 | [
"Apache-2.0"
] | 92 | 2019-03-23T07:23:55.000Z | 2021-06-15T18:18:32.000Z | dbt/adapters/athena/__version__.py | sacundim/dbt-athena | 120c9d3c88da98ec11ddfcf0a0a3fda49538f197 | [
"Apache-2.0"
] | 156 | 2019-03-21T03:26:58.000Z | 2021-06-29T15:30:51.000Z | dbt/adapters/athena/__version__.py | sacundim/dbt-athena | 120c9d3c88da98ec11ddfcf0a0a3fda49538f197 | [
"Apache-2.0"
] | 58 | 2019-04-12T09:09:43.000Z | 2021-06-24T15:25:11.000Z | version = "0.21.0"
| 9.5 | 18 | 0.578947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 0.421053 |
025d05b924cc7305e801b76dce5c6ec01a360e7c | 1,161 | py | Python | dxtbx/conftest.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | dxtbx/conftest.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | dxtbx/conftest.py | jbeilstenedmands/cctbx_project | c228fb15ab10377f664c39553d866281358195aa | [
"BSD-3-Clause-LBNL"
] | null | null | null | #
# See https://github.com/dials/dials/wiki/pytest for documentation on how to
# write and run pytest tests, and an overview of the available features.
#
from __future__ import absolute_import, division, print_function
import os
import pytest
@pytest.fixture(scope="session")
def dials_regression():
'''Return the ... | 33.171429 | 81 | 0.731266 | 0 | 0 | 0 | 0 | 350 | 0.301464 | 0 | 0 | 566 | 0.487511 |
025e3d2d32267b02443190a02969375302ba67a9 | 978 | py | Python | ietf/review/migrations/0020_auto_20191115_2059.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 25 | 2022-03-05T08:26:52.000Z | 2022-03-30T15:45:42.000Z | ietf/review/migrations/0020_auto_20191115_2059.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 219 | 2022-03-04T17:29:12.000Z | 2022-03-31T21:16:14.000Z | ietf/review/migrations/0020_auto_20191115_2059.py | hassanakbar4/ietfdb | cabee059092ae776015410640226064331c293b7 | [
"BSD-3-Clause"
] | 22 | 2022-03-04T15:34:34.000Z | 2022-03-28T13:30:59.000Z | # Copyright The IETF Trust 2019-2020, All Rights Reserved
# -*- coding: utf-8 -*-
# Generated by Django 1.11.26 on 2019-11-15 20:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('review', '0019_auto_20191023_0829'),
]
operations = [
m... | 36.222222 | 231 | 0.677914 | 800 | 0.817996 | 0 | 0 | 0 | 0 | 0 | 0 | 507 | 0.518405 |
025e72e9d1d41e03246451d111dab4b24c0f7bd1 | 442 | py | Python | AlgoExpert/PalindromeCheck.py | akhil-ece/160Days | 545d1c70c79c6ef2341137a88e6a09f81f330ea4 | [
"MIT"
] | null | null | null | AlgoExpert/PalindromeCheck.py | akhil-ece/160Days | 545d1c70c79c6ef2341137a88e6a09f81f330ea4 | [
"MIT"
] | null | null | null | AlgoExpert/PalindromeCheck.py | akhil-ece/160Days | 545d1c70c79c6ef2341137a88e6a09f81f330ea4 | [
"MIT"
] | null | null | null | def isPalindrome(string, i = 0):
j = len(string) - 1 -i
return True if i > j else string[i] == string[j] and isPalindrome(string, i+1)
def isPalindrome(string):
return string == string[::-1]
def isPalindromeUsingIndexes(string):
lIx = 0
rIdx = len(string) -1
while lIx < rIdx:
if(string... | 24.555556 | 82 | 0.561086 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |