hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fe228e351ddbe48a7edc1aa371a85bc8b172ff83 | 26,502 | py | Python | rl_games/algos_torch/SACAgent.py | Veyron2121/rl_games | 4abdea5aeb66b13399f8f6acb5fce8b7d8c318b3 | [
"MIT"
] | null | null | null | rl_games/algos_torch/SACAgent.py | Veyron2121/rl_games | 4abdea5aeb66b13399f8f6acb5fce8b7d8c318b3 | [
"MIT"
] | null | null | null | rl_games/algos_torch/SACAgent.py | Veyron2121/rl_games | 4abdea5aeb66b13399f8f6acb5fce8b7d8c318b3 | [
"MIT"
] | null | null | null | from rl_games.common import a2c_common
from rl_games.algos_torch import torch_ext
from rl_games.algos_torch.running_mean_std import RunningMeanStd
# from rl_games.algos_torch import central_value, rnd_curiosity
from rl_games.common import vecenv
from rl_games.common import common_losses
from rl_games.common import dat... | 43.660626 | 186 | 0.637046 |
2c9f73f7d384325378b7f76b7c14112fb8f3d0f7 | 303 | py | Python | adsimulator/utils/principals.py | nicolas-carolo/adsimulator | 06017982b987349ecfa0def65d4ae767bb509933 | [
"BSD-3-Clause"
] | 11 | 2022-01-09T21:08:07.000Z | 2022-02-18T20:53:38.000Z | adsimulator/utils/principals.py | nicolas-carolo/adsimulator | 06017982b987349ecfa0def65d4ae767bb509933 | [
"BSD-3-Clause"
] | null | null | null | adsimulator/utils/principals.py | nicolas-carolo/adsimulator | 06017982b987349ecfa0def65d4ae767bb509933 | [
"BSD-3-Clause"
] | null | null | null | def get_name(name, domain_name):
return f"{name}@{domain_name}"
def get_cn(name):
return str(name).upper().split("@")[0]
def get_sid_from_rid(rid, domain_sid):
return f"{domain_sid}-{str(rid)}"
def get_dn(name, ldap_path):
cn = get_cn(name)
return "CN=" + cn + "," + ldap_path
| 18.9375 | 42 | 0.636964 |
ecfef401e1e829627fd0972f43b27b3a0e82c2eb | 22,099 | py | Python | proton.py | hzj730/proton | bad58c608a015d5caf46b5be0a0483d76f11738d | [
"Apache-2.0"
] | null | null | null | proton.py | hzj730/proton | bad58c608a015d5caf46b5be0a0483d76f11738d | [
"Apache-2.0"
] | null | null | null | proton.py | hzj730/proton | bad58c608a015d5caf46b5be0a0483d76f11738d | [
"Apache-2.0"
] | null | null | null | #encoding=utf-8
'''
Copyright YANG Huan (sy.yanghuan@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 or ag... | 32.498529 | 144 | 0.594688 |
df223c9294d5d4713038fde26aca17a0e13d1e37 | 898 | py | Python | homework3-EM/code/docLength.py | 0lidaxiang/IR | e4a7213f43e7aa2e332057b2b4b2bd98ceabf5be | [
"Apache-2.0"
] | 3 | 2018-03-16T08:44:08.000Z | 2020-02-04T08:07:44.000Z | homework3-EM/code/docLength.py | 0lidaxiang/IR | e4a7213f43e7aa2e332057b2b4b2bd98ceabf5be | [
"Apache-2.0"
] | null | null | null | homework3-EM/code/docLength.py | 0lidaxiang/IR | e4a7213f43e7aa2e332057b2b4b2bd98ceabf5be | [
"Apache-2.0"
] | 1 | 2019-11-20T09:22:37.000Z | 2019-11-20T09:22:37.000Z | #!/usr/bin/python3
# coding: utf-8
import os
import document
def createDocLength():
fname = "../initialResult/docLength.txt"
allFilesContent = document.getAllFilesContent()
res = os.path.isfile(fname)
if res:
pass
else:
f = open(fname, 'w')
for doc in allFilesContent:
... | 20.883721 | 57 | 0.555679 |
f8bd9dd8daad96c7e22da5603fb8596caa8560f2 | 1,492 | py | Python | apps/project/migrations/0001_initial.py | FeiChaiCom/django-netdisk | f9ef4f46a065527f0ace0a65f2b3210d1657b80f | [
"MIT"
] | 6 | 2021-05-22T12:23:29.000Z | 2022-01-01T01:38:29.000Z | apps/project/migrations/0001_initial.py | gaomugong/django-netdisk | 5b2204f5087579bb6a26c6b92972a9f53bd05a7c | [
"MIT"
] | null | null | null | apps/project/migrations/0001_initial.py | gaomugong/django-netdisk | 5b2204f5087579bb6a26c6b92972a9f53bd05a7c | [
"MIT"
] | 1 | 2021-05-22T15:25:33.000Z | 2021-05-22T15:25:33.000Z | # Generated by Django 2.2.18 on 2021-03-27 01:37
from django.db import migrations, models
import django.db.models.manager
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name='Project',
fields=[
... | 45.212121 | 113 | 0.621314 |
1a2694830c168c7d99b762b09a35c5266fcda406 | 1,166 | py | Python | application/passions/data.py | Vahen/VahenWebsite | 19a0f0f923874d66d8229e20e0df5b7916da5595 | [
"MIT"
] | null | null | null | application/passions/data.py | Vahen/VahenWebsite | 19a0f0f923874d66d8229e20e0df5b7916da5595 | [
"MIT"
] | null | null | null | application/passions/data.py | Vahen/VahenWebsite | 19a0f0f923874d66d8229e20e0df5b7916da5595 | [
"MIT"
] | null | null | null | from typing import List, Dict
from flask import url_for
# Permet de query la liste de tous les projets
def passions() -> List[Dict]:
passion_list = [
{
'name': "GN",
'miniature': url_for('static', filename='general/img/miniature/gn_miniature.png'),
'url': url_for('pass... | 31.513514 | 98 | 0.581475 |
383c71bcd5be2ec3d25060d5461c3cf6ac1cf9a1 | 3,689 | py | Python | bindings/python/ensmallen/datasets/string/candidatusmagasanikbacteriabacteriumrifcsphigho202full4113.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/candidatusmagasanikbacteriabacteriumrifcsphigho202full4113.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/candidatusmagasanikbacteriabacteriumrifcsphigho202full4113.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Candidatus Magasanikbacteria bacterium RIFCSPHIGHO2_02_FULL_41_13.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019stri... | 35.133333 | 223 | 0.695039 |
c69e6f4817a4ac7f60e9c08c7ecfa8aa6ee8f083 | 20,599 | py | Python | PyFocus/sim.py | Stefani-Lab/PyFocus | 2f91b9fa4af9a0ae07ddb80e63ff850557b31cf6 | [
"MIT"
] | 5 | 2021-12-29T16:23:21.000Z | 2022-03-13T03:22:33.000Z | PyFocus/sim.py | fcaprile/PyFocus | 7e7eeca589f2950c6189d461185efdb5d1810a73 | [
"MIT"
] | 1 | 2022-01-20T12:54:44.000Z | 2022-01-20T12:54:44.000Z | PyFocus/sim.py | Stefani-Lab/PyFocus | 2f91b9fa4af9a0ae07ddb80e63ff850557b31cf6 | [
"MIT"
] | 4 | 2021-12-29T16:20:52.000Z | 2022-03-27T08:42:29.000Z | '''
High-level functions to simulate the foci obtained when: Focusing a gaussian beam, focusing a gaussian beam modulated with a VP mask and focusing a gaussian beam modulated with a custom phase mask
The functions use the 'parameters' array, defined as:
parameters=np.array((NA, n, h, w0, wavelength, gamma, b... | 65.186709 | 376 | 0.698335 |
ca6c01905af04c76d9ffb6cde1e1f6b74e281c34 | 2,143 | py | Python | acme/tf/networks/base.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | acme/tf/networks/base.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | acme/tf/networks/base.py | wookayin/acme | 71b2ab8577a118c103718f034fa62c5ad2c0fd97 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 DeepMind Technologies Limited. 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 ... | 31.985075 | 80 | 0.713486 |
b7d92701aa34835218bca9a994fc621914c0719d | 15,879 | py | Python | tests/validation/cline/cline_params.py | drewhart/geonomics | 884676d7a2c02d914da4cae0d0befcd1f24f956a | [
"MIT"
] | 8 | 2020-08-27T17:06:04.000Z | 2021-09-17T22:55:07.000Z | tests/validation/cline/cline_params.py | drewhart/geonomics | 884676d7a2c02d914da4cae0d0befcd1f24f956a | [
"MIT"
] | null | null | null | tests/validation/cline/cline_params.py | drewhart/geonomics | 884676d7a2c02d914da4cae0d0befcd1f24f956a | [
"MIT"
] | 2 | 2020-08-28T23:45:28.000Z | 2021-01-25T21:47:40.000Z | #cline_params.py
import numpy as np
from nlmpy import nlmpy
array_center_vals = np.array([*np.linspace(0.25, 0.75, 20)][::-1])
array_center_vals = 0.5+-0.5*np.sin(2*np.pi*array_center_vals)
array_vals = np.hstack(([1]*15, array_center_vals, [0]*15))
env_array = np.vstack([array_vals]*50)
K_array = np.ones((50,50))
#... | 39.896985 | 79 | 0.353108 |
94bb77cd8528c9214392a0aa09a1b11ff4bcc50b | 2,403 | py | Python | _lcd4.py | jb-leger/avrxmegastuff | cb4f4be41070c632c29b37065b7b805632056210 | [
"MIT"
] | null | null | null | _lcd4.py | jb-leger/avrxmegastuff | cb4f4be41070c632c29b37065b7b805632056210 | [
"MIT"
] | null | null | null | _lcd4.py | jb-leger/avrxmegastuff | cb4f4be41070c632c29b37065b7b805632056210 | [
"MIT"
] | null | null | null | from ._stuff import *
import collections
def lcd4(
*, prefix, data_pindesc4567, e_pindesc, rs_pindesc, header=True,
custom_chars = None
):
assert len(data_pindesc4567)==4
assert data_pindesc4567[0].port == data_pindesc4567[1].port == data_pindesc4567[2].port == data_pindesc4567[3].port
dico = col... | 33.84507 | 119 | 0.606742 |
e6feab87ad433bccb8905946741e4d6f02014a97 | 710 | py | Python | djangodb/mainapp/migrations/0003_renovatedsight.py | Inclementia/django-db | afd9b40eca0d92f0c1fadd2488c329ead933932c | [
"MIT"
] | null | null | null | djangodb/mainapp/migrations/0003_renovatedsight.py | Inclementia/django-db | afd9b40eca0d92f0c1fadd2488c329ead933932c | [
"MIT"
] | null | null | null | djangodb/mainapp/migrations/0003_renovatedsight.py | Inclementia/django-db | afd9b40eca0d92f0c1fadd2488c329ead933932c | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2020-10-25 19:06
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0002_sight'),
]
operations = [
migrations.CreateModel(
name='RenovatedSight',
... | 29.583333 | 114 | 0.597183 |
145624f4aad8a75f8a0dfd86da23b49a84a5dd90 | 1,424 | py | Python | hash_substring.py | jerrybelmonte/DataStructures-Python | 553a156f685d83291e73e0c35b85167e6b114379 | [
"MIT"
] | null | null | null | hash_substring.py | jerrybelmonte/DataStructures-Python | 553a156f685d83291e73e0c35b85167e6b114379 | [
"MIT"
] | null | null | null | hash_substring.py | jerrybelmonte/DataStructures-Python | 553a156f685d83291e73e0c35b85167e6b114379 | [
"MIT"
] | null | null | null | # Find Pattern In Text
# Rabin-Karp's algorithm implementation.
# Author: jerrybelmonte
from random import randint
def read_input():
return input().rstrip(), input().rstrip()
def print_occurrences(output):
print(' '.join(map(str, output)))
def poly_hash(s, prime, number):
hash_value = 0
for i in r... | 23.733333 | 75 | 0.605337 |
528e6f7bb58bd4c373553d59f4596d441843738b | 2,769 | py | Python | sandbox/sand/OpenEIT/reconstruction/worker.py | marionleborgne/EIT_Dashboard | 057e05d20325fa6a9b9b0183f63a73c8b7e6cd3b | [
"Apache-2.0"
] | null | null | null | sandbox/sand/OpenEIT/reconstruction/worker.py | marionleborgne/EIT_Dashboard | 057e05d20325fa6a9b9b0183f63a73c8b7e6cd3b | [
"Apache-2.0"
] | null | null | null | sandbox/sand/OpenEIT/reconstruction/worker.py | marionleborgne/EIT_Dashboard | 057e05d20325fa6a9b9b0183f63a73c8b7e6cd3b | [
"Apache-2.0"
] | null | null | null | """
This module contains an image reconstruction implementation based
on interpolation and inverse radon transformation.
"""
import logging
import itertools
import time
import threading
import numpy as np
from .bp import BpReconstruction
from .jac import JacReconstruction
from .greit import GreitReconstruction
from .... | 31.465909 | 86 | 0.637775 |
9dfd339f2233aff26e82b2522987248df5ba8173 | 17,785 | py | Python | flask/cli.py | DasIch/flask | c0087204e5b83ad4e3983d07b66d17acdde0b9de | [
"BSD-3-Clause"
] | null | null | null | flask/cli.py | DasIch/flask | c0087204e5b83ad4e3983d07b66d17acdde0b9de | [
"BSD-3-Clause"
] | null | null | null | flask/cli.py | DasIch/flask | c0087204e5b83ad4e3983d07b66d17acdde0b9de | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
flask.cli
~~~~~~~~~
A simple command line application to run flask apps.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from threading import Lock, Thread
from functools import update_wrapper
import click
... | 35.148221 | 78 | 0.630925 |
988773771203fa0a9355b180b019271f1f524974 | 2,691 | py | Python | test/test_smtp.py | ondratu/falias | 6b2a3bc41d9cbc247df7044fd5442085f93e9ddb | [
"BSD-3-Clause"
] | null | null | null | test/test_smtp.py | ondratu/falias | 6b2a3bc41d9cbc247df7044fd5442085f93e9ddb | [
"BSD-3-Clause"
] | null | null | null | test/test_smtp.py | ondratu/falias | 6b2a3bc41d9cbc247df7044fd5442085f93e9ddb | [
"BSD-3-Clause"
] | null | null | null | """Run test by:
$~ py.test tests/test_smtp.py
"""
from sys import path as python_path
from os import path
from pytest import fixture
python_path.insert(0, path.abspath(
path.join(path.dirname(__file__), path.pardir)))
from falias.smtp import Smtp # noqa
DSNS = (
dict(host='localhost', p... | 28.62766 | 74 | 0.613898 |
e9c3feca67c3a7d15568b45a19505c192b5b40c0 | 5,904 | py | Python | read_forecasts.py | phaustin/nws_parse | 036ec4468bf6431bd137417f51fb182dd990cb80 | [
"CC0-1.0"
] | null | null | null | read_forecasts.py | phaustin/nws_parse | 036ec4468bf6431bd137417f51fb182dd990cb80 | [
"CC0-1.0"
] | null | null | null | read_forecasts.py | phaustin/nws_parse | 036ec4468bf6431bd137417f51fb182dd990cb80 | [
"CC0-1.0"
] | null | null | null | """
Given a directory with html files scraped from the NWS website, create a text file
for every html file in that directory containing a list of temperture forecasts for the week. Also write
a single json file with each week stored as an ordered dictionary containing the temperatures
and header information
exam... | 33.355932 | 121 | 0.655318 |
23beda8e69b0b822816fa6c6795cb5458cdf10f6 | 1,151 | py | Python | tensorflow-learning/tensorflow-lab/linear-regression/1.py | hojeong3709/ML | 2fdd8d22dc5584103397559cb23a6efa8bb59637 | [
"MIT"
] | null | null | null | tensorflow-learning/tensorflow-lab/linear-regression/1.py | hojeong3709/ML | 2fdd8d22dc5584103397559cb23a6efa8bb59637 | [
"MIT"
] | 2 | 2020-09-26T00:59:22.000Z | 2020-11-13T18:46:29.000Z | tensorflow-learning/tensorflow-lab/linear-regression/1.py | hojeong3709/numpy-pandas-tensorflow-learning | 2fdd8d22dc5584103397559cb23a6efa8bb59637 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore')
# import os
# print(os.getcwd())
cars = np.loadtxt("../../data/cars.csv", delimiter=",", dtype=np.int32)
# print(cars)
print(cars.shape)
x = cars[:, 0]
y = cars[:, 1]
x1, y1 = cars.T
print(... | 20.192982 | 71 | 0.67854 |
8e33e659df4ce3c6360a6ab6c2626a90946f9c13 | 509 | py | Python | clsdescriptor/variantmethod.py | OaklandPeters/clsdescriptor | a040faebace191940c2d7ca8146e1cb89f0277d0 | [
"MIT"
] | null | null | null | clsdescriptor/variantmethod.py | OaklandPeters/clsdescriptor | a040faebace191940c2d7ca8146e1cb89f0277d0 | [
"MIT"
] | null | null | null | clsdescriptor/variantmethod.py | OaklandPeters/clsdescriptor | a040faebace191940c2d7ca8146e1cb89f0277d0 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import types
__all__ = ['variantmethod']
class variantmethod(object):
def __init__(self, func):
self.func = func
if hasattr(func, '__name__'):
self.name = func.__name__
else:
self.name = repr(func)
def __get__(self, obj, o... | 26.789474 | 55 | 0.62279 |
d811a017d3b5970aab422240eb36c0566791508e | 2,015 | py | Python | jarvis/accounts/migrations/0003_auto_20170228_0759.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2019-01-03T06:10:04.000Z | 2019-01-03T06:10:04.000Z | jarvis/accounts/migrations/0003_auto_20170228_0759.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | 1 | 2021-03-31T19:11:52.000Z | 2021-03-31T19:11:52.000Z | jarvis/accounts/migrations/0003_auto_20170228_0759.py | Anubhav722/blahblah | 160698e06a02e671ac40de3113cd37d642e72e96 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.3 on 2017-02-28 07:59
import jarvis.accounts.generators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accounts', '0002_auto_20170223_1315'),
]
operations = [
... | 38.018868 | 147 | 0.602978 |
2430028ee0883987bbc892538701bd420cf5c7e7 | 25,251 | py | Python | svd/svd.py | BayLibre/RegiceSVD | d5ec2697aa171fab8bde47eff50260d8a985e8a6 | [
"MIT"
] | 1 | 2018-11-14T17:01:38.000Z | 2018-11-14T17:01:38.000Z | svd/svd.py | BayLibre/RegiceSVD | d5ec2697aa171fab8bde47eff50260d8a985e8a6 | [
"MIT"
] | null | null | null | svd/svd.py | BayLibre/RegiceSVD | d5ec2697aa171fab8bde47eff50260d8a985e8a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2018 BayLibre
#
# 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 limitatio... | 37.800898 | 100 | 0.585838 |
a8ab84ac0e99c488063393f099b7e4f22952ef71 | 999 | py | Python | egrul/storage.py | ServerHack-The-First-Law-Of-Robotics/data_engineering | 4651d69615eda1eaac518a86b8c9f94b8912146e | [
"MIT"
] | null | null | null | egrul/storage.py | ServerHack-The-First-Law-Of-Robotics/data_engineering | 4651d69615eda1eaac518a86b8c9f94b8912146e | [
"MIT"
] | null | null | null | egrul/storage.py | ServerHack-The-First-Law-Of-Robotics/data_engineering | 4651d69615eda1eaac518a86b8c9f94b8912146e | [
"MIT"
] | null | null | null | from typing import Dict
from json import dump, load, loads
from os.path import isfile
from base.storage import Storage
from .data_objects import EgrulResult
class EgrulStorage(Storage):
def __init__(
self,
*args,
parsed_inns_list_path: str,
**kwargs
):
... | 26.289474 | 62 | 0.593594 |
83c26e6930b7e32bdadaf0a597629646f35ed57a | 6,957 | py | Python | tools/run_abi_tests.py | leonluc-dev/sdk | ff1fb0869fbcbc0b26c1e5bc4396ce39bb45d963 | [
"BSD-3-Clause"
] | 1 | 2020-04-26T15:27:19.000Z | 2020-04-26T15:27:19.000Z | tools/run_abi_tests.py | cc-shifo/sdk | aeb22cbfb478e706c90a5d76cb911536715439b4 | [
"BSD-3-Clause"
] | null | null | null | tools/run_abi_tests.py | cc-shifo/sdk | aeb22cbfb478e706c90a5d76cb911536715439b4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Runs tests with old ABI versions and check if the results differ from the
# current results.
import argp... | 33.608696 | 81 | 0.633175 |
87b991ad701d7c7c6306fc0a36fee13c9143603e | 852 | py | Python | ocr/utils/draw_text_on_image.py | vee51/Hand | eae25f189e7561d5b386511e11de2b9cec29b7a5 | [
"Apache-2.0"
] | 435 | 2019-03-16T21:45:56.000Z | 2022-03-25T09:14:22.000Z | ocr/utils/draw_text_on_image.py | freedom9393/handwritten-text-recognition-for-apache-mxnet | bf7b6297747c794046665c682d04a153aaec20dd | [
"Apache-2.0"
] | 60 | 2019-03-19T05:53:40.000Z | 2022-03-31T12:27:48.000Z | ocr/utils/draw_text_on_image.py | freedom9393/handwritten-text-recognition-for-apache-mxnet | bf7b6297747c794046665c682d04a153aaec20dd | [
"Apache-2.0"
] | 220 | 2019-03-17T10:06:06.000Z | 2022-03-15T14:13:39.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import cv2
import numpy as np
def draw_text_on_image(images, text):
output_image_shape = (images.shape[0], images.shape[1], images.shape[2] * 2, images.shape[3]) # Double the output_image_shape to prin... | 47.333333 | 162 | 0.699531 |
271081efc5aba981d05b69134151460cb7a0f9fc | 2,562 | py | Python | qulab/cli/instrument_newDriver.py | feihoo87/QuLab | cc16f4777e5523fca327f7f0a9725fd13f9b057f | [
"MIT"
] | 16 | 2018-03-16T12:08:31.000Z | 2022-03-20T08:53:35.000Z | qulab/cli/instrument_newDriver.py | feihoo87/QuLab | cc16f4777e5523fca327f7f0a9725fd13f9b057f | [
"MIT"
] | 148 | 2018-03-18T09:33:18.000Z | 2022-03-21T16:00:15.000Z | qulab/cli/instrument_newDriver.py | feihoo87/QuLab | cc16f4777e5523fca327f7f0a9725fd13f9b057f | [
"MIT"
] | 14 | 2018-03-18T08:00:12.000Z | 2020-10-21T12:39:42.000Z | import asyncio
import logging
import pickle
from qulab.loader_newDriver import loadDriver
from qulab.sugar import getDHT, mount
from qulab.utils import ShutdownBlocker
def setLogger(level=logging.DEBUG):
log = logging.getLogger('qulab.Driver')
log.setLevel(level)
ch = logging.StreamHandler()
ch.setLe... | 29.113636 | 78 | 0.607728 |
457047faf5d7a5b8ac2ed792dfd042efbf23c6d6 | 1,055 | py | Python | test/programytest/processors/pre/test_wordtagger.py | NeolithEra/program-y | 8c2396611f30c8095e98ff02988223a641c1a3be | [
"MIT"
] | null | null | null | test/programytest/processors/pre/test_wordtagger.py | NeolithEra/program-y | 8c2396611f30c8095e98ff02988223a641c1a3be | [
"MIT"
] | null | null | null | test/programytest/processors/pre/test_wordtagger.py | NeolithEra/program-y | 8c2396611f30c8095e98ff02988223a641c1a3be | [
"MIT"
] | null | null | null | import unittest
from programy.processors.pre.wordtagger import WordTaggerPreProcessor
from programytest.client import TestClient
class MockClientContext(object):
def __init__(self, bot):
self.bot = bot
class TranslatorPreProcessorTest(unittest.TestCase):
def setUp(self):
self.client = Te... | 29.305556 | 118 | 0.726066 |
d55f64fa82698eb231ed9b97c384eff614d2284b | 400 | py | Python | tuning_game/wsgi.py | tobegit3hub/tuning_game | 92e01e24c01793dc60b227c9894da865aa1040f4 | [
"Apache-2.0"
] | 14 | 2017-12-27T12:04:16.000Z | 2021-06-21T09:57:30.000Z | tuning_game/wsgi.py | tobegit3hub/tuning_game | 92e01e24c01793dc60b227c9894da865aa1040f4 | [
"Apache-2.0"
] | null | null | null | tuning_game/wsgi.py | tobegit3hub/tuning_game | 92e01e24c01793dc60b227c9894da865aa1040f4 | [
"Apache-2.0"
] | 2 | 2018-01-09T03:30:22.000Z | 2018-04-23T03:32:45.000Z | """
WSGI config for tuning_game project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_... | 23.529412 | 78 | 0.79 |
1ce5b3cca9689b65d6f5cd4bb40b6cdcc46fa9c2 | 206 | py | Python | backend/run.py | avivace/sha | 33240d9074ddb473fb556af31e30c3672f59a4e1 | [
"Apache-2.0"
] | 2 | 2019-06-26T07:52:20.000Z | 2020-05-19T15:47:19.000Z | backend/run.py | avivace/sha | 33240d9074ddb473fb556af31e30c3672f59a4e1 | [
"Apache-2.0"
] | 25 | 2021-03-09T08:42:00.000Z | 2022-02-26T12:00:11.000Z | backend/run.py | avivace/sha | 33240d9074ddb473fb556af31e30c3672f59a4e1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Main software entrypoint
from app import initConnexApp
# Initialise and start the configured Connexion app
app = initConnexApp()
app.run(debug=True, use_reloader=True, port=8081) | 22.888889 | 51 | 0.786408 |
60685f856b24566ac703c76996528eeb9f9f23fc | 2,621 | py | Python | tests/test_sbml_fetcher.py | virtualcell/test_suite | 35aeee3edcd8ed937cfce63d13c5d410c5f16143 | [
"MIT"
] | null | null | null | tests/test_sbml_fetcher.py | virtualcell/test_suite | 35aeee3edcd8ed937cfce63d13c5d410c5f16143 | [
"MIT"
] | 8 | 2020-11-26T23:26:03.000Z | 2021-01-07T22:49:49.000Z | tests/test_sbml_fetcher.py | virtualcell/test_suite | 35aeee3edcd8ed937cfce63d13c5d410c5f16143 | [
"MIT"
] | null | null | null | from report_generation.sbml import sbml_fetcher
import unittest
soup_header = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Langua... | 42.274194 | 160 | 0.655475 |
bb4c3b0ef6acbc913bb9182f4a36f7982cdceaf4 | 187 | py | Python | hfb/result/__init__.py | harshanarayana/hfb | c42a6d7da29ada5053e259195a4676835a6afa86 | [
"MIT"
] | 1 | 2019-02-09T18:42:39.000Z | 2019-02-09T18:42:39.000Z | hfb/result/__init__.py | harshanarayana/hfb | c42a6d7da29ada5053e259195a4676835a6afa86 | [
"MIT"
] | null | null | null | hfb/result/__init__.py | harshanarayana/hfb | c42a6d7da29ada5053e259195a4676835a6afa86 | [
"MIT"
] | null | null | null | from hfb.strategy import BaseBenchmarkResultStrategy
class SimpleBenchmarkResult(BaseBenchmarkResultStrategy):
"""Default Implementation"""
def print_stats(self):
pass
| 20.777778 | 57 | 0.770053 |
3e648616e494e695f96e69cbd0aa1dcf41370a26 | 55,565 | py | Python | ShapeTools.py | nicholasmartino/morphology | 50f9d5bdcf82e93f0f8762d4dd16a8ac621ec4f7 | [
"CC-BY-4.0"
] | null | null | null | ShapeTools.py | nicholasmartino/morphology | 50f9d5bdcf82e93f0f8762d4dd16a8ac621ec4f7 | [
"CC-BY-4.0"
] | null | null | null | ShapeTools.py | nicholasmartino/morphology | 50f9d5bdcf82e93f0f8762d4dd16a8ac621ec4f7 | [
"CC-BY-4.0"
] | null | null | null | import itertools
import gc
import itertools
import math
import sys
import time
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from shapely.affinity import scale, translate
from shapely.geometry import Point, Polygon, LineString, MultiPoint, MultiLineString, MultiPolygon
... | 40.469774 | 159 | 0.589022 |
f18216acf30391f2aff6b253c8137e942a9f31f4 | 156,682 | py | Python | source/globalCommands.py | mwhapples/nvda | 9032a5a1306d821288e92ee78f64a618af5b8333 | [
"bzip2-1.0.6"
] | null | null | null | source/globalCommands.py | mwhapples/nvda | 9032a5a1306d821288e92ee78f64a618af5b8333 | [
"bzip2-1.0.6"
] | null | null | null | source/globalCommands.py | mwhapples/nvda | 9032a5a1306d821288e92ee78f64a618af5b8333 | [
"bzip2-1.0.6"
] | null | null | null | # -*- coding: UTF-8 -*-
# A part of NonVisual Desktop Access (NVDA)
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2006-2021 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee,
# Leonard de Ruijter, Derek Riemer, Babbage B.V... | 42.118817 | 182 | 0.744265 |
cff3f5a1ff68e9901e166c4cd61a6049cdf911ad | 2,439 | py | Python | poetry/utils/extras.py | TylerLubeck/poetry | a26be4a6ca5950fd603d14dd6dc54e61aab3ee79 | [
"MIT"
] | 1 | 2021-05-08T01:35:28.000Z | 2021-05-08T01:35:28.000Z | poetry/utils/extras.py | TylerLubeck/poetry | a26be4a6ca5950fd603d14dd6dc54e61aab3ee79 | [
"MIT"
] | 1 | 2021-04-03T15:18:40.000Z | 2021-04-10T15:27:25.000Z | poetry/utils/extras.py | pwoolvett/poetry | 855bc88bb537794bee3921f7c1f1938c7ab34623 | [
"MIT"
] | null | null | null | from typing import Iterable
from typing import Iterator
from typing import List
from typing import Mapping
from typing import Sequence
from poetry.core.packages import Package
from poetry.utils.helpers import canonicalize_name
def get_extra_package_names(
packages, # type: Sequence[Package]
extras, # type:... | 39.983607 | 86 | 0.672817 |
96f6bbeba3a9045c39a9bb90b0681ddcee04c455 | 47 | py | Python | inauguralproject/inauguralproject.py | AskerNC/projects-2021-team-olm | 880c94c31530845990c45130adf5438c48c8c561 | [
"MIT"
] | null | null | null | inauguralproject/inauguralproject.py | AskerNC/projects-2021-team-olm | 880c94c31530845990c45130adf5438c48c8c561 | [
"MIT"
] | null | null | null | inauguralproject/inauguralproject.py | AskerNC/projects-2021-team-olm | 880c94c31530845990c45130adf5438c48c8c561 | [
"MIT"
] | null | null | null | We will not be using modules for this project.
| 23.5 | 46 | 0.787234 |
d4c48a6b05e65f6ff3b7a8aa4ec5fe432dd7704b | 4,896 | py | Python | python/python3/lib/python3.5/site-packages/itchat/utils.py | zykzhang/practice | 180cdf41ae6397b1e71059fc32389cb305e8fea0 | [
"Apache-2.0"
] | null | null | null | python/python3/lib/python3.5/site-packages/itchat/utils.py | zykzhang/practice | 180cdf41ae6397b1e71059fc32389cb305e8fea0 | [
"Apache-2.0"
] | null | null | null | python/python3/lib/python3.5/site-packages/itchat/utils.py | zykzhang/practice | 180cdf41ae6397b1e71059fc32389cb305e8fea0 | [
"Apache-2.0"
] | 1 | 2017-12-26T17:10:15.000Z | 2017-12-26T17:10:15.000Z | import re, os, sys, subprocess, copy
try:
from HTMLParser import HTMLParser
except ImportError:
from html.parser import HTMLParser
from . import config
emojiRegex = re.compile(r'<span class="emoji emoji(.{1,10})"></span>')
htmlParser = HTMLParser()
try:
b = u'\u2588'
sys.stdout.write(b +... | 38.857143 | 96 | 0.55719 |
b821cbe6d11592f49c5c1a7b90f057f65c1740ed | 4,542 | py | Python | machina/apps/forum_conversation/forum_polls/forms.py | jujinesy/initdjango-machina | 93c24877f546521867b3ef77fa278237af932d42 | [
"BSD-3-Clause"
] | 1 | 2021-10-08T03:31:24.000Z | 2021-10-08T03:31:24.000Z | machina/apps/forum_conversation/forum_polls/forms.py | jujinesy/initdjango-machina | 93c24877f546521867b3ef77fa278237af932d42 | [
"BSD-3-Clause"
] | 7 | 2020-02-12T01:11:13.000Z | 2022-03-11T23:26:32.000Z | machina/apps/forum_conversation/forum_polls/forms.py | jujinesy/initdjango-machina | 93c24877f546521867b3ef77fa278237af932d42 | [
"BSD-3-Clause"
] | 1 | 2019-04-20T05:26:27.000Z | 2019-04-20T05:26:27.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.core.exceptions import ValidationError
from django.forms.models import BaseModelFormSet
from django.forms.models import modelformset_factory
from django.utils.translation import ugettext_lazy as _
from machina.conf i... | 34.409091 | 93 | 0.651035 |
fe56dfb8b4748b38d9a7fc5fa31caf18d4f66e75 | 13,366 | py | Python | custom_arguments.py | gares/coq-tools | f270f5ad7e09661e191499bc028165e71300b157 | [
"MIT"
] | null | null | null | custom_arguments.py | gares/coq-tools | f270f5ad7e09661e191499bc028165e71300b157 | [
"MIT"
] | 1 | 2015-01-21T16:41:01.000Z | 2015-01-22T11:10:33.000Z | custom_arguments.py | gares/coq-tools | f270f5ad7e09661e191499bc028165e71300b157 | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys, os
from argparse_compat import argparse
from util import PY3
__all__ = ["add_libname_arguments", "add_passing_libname_arguments", "ArgumentParser", "update_env_with_libnames", "add_logging_arguments", "process_logging_arguments", "update_env_with_coqpath_folders", "DEF... | 50.821293 | 253 | 0.612524 |
40d2d109882c8769de691f9745e6238f19f59938 | 585 | py | Python | tests/iaas_classic/models/IPReservations/__init__.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | tests/iaas_classic/models/IPReservations/__init__.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | tests/iaas_classic/models/IPReservations/__init__.py | ericmharris/gc3-query | 0bf5226130aafbb1974aeb96d93ee1996833e87d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gc3-query.__init__.py [9/13/2018 10:48 AM]
~~~~~~~~~~~~~~~~
<DESCR SHORT>
<DESCR>
"""
################################################################################
## Standard Library Imports
import sys, os
##########################################################################... | 24.375 | 80 | 0.391453 |
44cfc2cb2ec95ec429d688b213342da780f683b8 | 656 | py | Python | animus/keras/callbacks.py | bagxi/animus | b60ec0eba413f48624a71b20c113542a73cec377 | [
"Apache-2.0"
] | 8 | 2022-01-12T23:21:55.000Z | 2022-03-22T13:26:05.000Z | animus/keras/callbacks.py | bagxi/animus | b60ec0eba413f48624a71b20c113542a73cec377 | [
"Apache-2.0"
] | 1 | 2022-02-09T14:54:08.000Z | 2022-02-09T14:54:08.000Z | animus/keras/callbacks.py | bagxi/animus | b60ec0eba413f48624a71b20c113542a73cec377 | [
"Apache-2.0"
] | 1 | 2022-01-21T19:51:35.000Z | 2022-01-21T19:51:35.000Z | # Date: 12/12/2021
# Author: Sergey Kolesnikov (scitator@gmail.com)
# Licence: Apache 2.0
from typing import Any
import tensorflow as tf
from animus.callbacks import ICheckpointerCallback
from animus.core import IExperiment
class KerasCheckpointerCallback(ICheckpointerCallback):
def save(self, exp: IExperiment,... | 24.296296 | 70 | 0.66311 |
7f5a7386610aeb37d3ee00364bbf73c136d25619 | 650 | py | Python | openselfsup/models/utils/__init__.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | null | null | null | openselfsup/models/utils/__init__.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 6 | 2021-03-11T05:35:54.000Z | 2021-04-03T22:25:11.000Z | openselfsup/models/utils/__init__.py | Berkeley-Data/OpenSelfSup | 221191b88d891de57725b149caf237ffef72e529 | [
"Apache-2.0"
] | 1 | 2021-07-04T00:47:46.000Z | 2021-07-04T00:47:46.000Z | from .accuracy import Accuracy, accuracy, auroc
from .conv_module import ConvModule, build_conv_layer
from .conv_ws import ConvWS2d, conv_ws_2d
from .gather_layer import GatherLayer
from .multi_pooling import MultiPooling
from .norm import build_norm_layer
from .scale import Scale
#from .weight_init import (bias_init_w... | 38.235294 | 74 | 0.749231 |
d81f05127afc504a6fd1c387ce307bec96184a32 | 7,975 | py | Python | Jumpscale/servers/grid_capacity/server/types/client_support.py | threefoldtech/JumpscaleX | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 2 | 2019-05-09T07:21:25.000Z | 2019-08-05T06:37:53.000Z | Jumpscale/servers/grid_capacity/server/types/client_support.py | threefoldtech/JumpscaleX | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 664 | 2018-12-19T12:43:44.000Z | 2019-08-23T04:24:42.000Z | Jumpscale/servers/grid_capacity/server/types/client_support.py | threefoldtech/jumpscale10 | 5fb073a82aeb0e66fc7d9660c45a1e31bc094bfa | [
"Apache-2.0"
] | 7 | 2019-05-03T07:14:37.000Z | 2019-08-05T12:36:52.000Z | # DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml.
"""
support methods for python clients
"""
import json
import collections
from datetime import datetime
from uuid import UUID
from enum import Enum
from dateutil import parser
# python2/3 compatible basestring, for use in to_dict
try:
... | 29.537037 | 110 | 0.625831 |
272ada3ce202a356c930f3a5331b9bcc6b4e0b8d | 4,657 | bzl | Python | packages/esbuild/helpers.bzl | kriswuollett/rules_nodejs | 5798eeeda78c8acc2ebc2f24a41aca33164a972f | [
"Apache-2.0"
] | 645 | 2017-08-22T22:18:51.000Z | 2022-03-31T11:50:53.000Z | packages/esbuild/helpers.bzl | bolitt/rules_nodejs | ba9f82103c6122bb316614734489e44552d3d266 | [
"Apache-2.0"
] | 2,172 | 2017-08-26T23:52:39.000Z | 2022-03-31T23:51:29.000Z | packages/esbuild/helpers.bzl | bolitt/rules_nodejs | ba9f82103c6122bb316614734489e44552d3d266 | [
"Apache-2.0"
] | 570 | 2017-08-24T19:57:44.000Z | 2022-03-29T12:09:04.000Z | """
Utility helper functions for the esbuild rule
"""
load("@build_bazel_rules_nodejs//third_party/github.com/bazelbuild/bazel-skylib:lib/paths.bzl", "paths")
TS_EXTENSIONS = ["ts", "tsx"]
JS_EXTENSIONS = ["js", "jsx", "mjs"]
ALLOWED_EXTENSIONS = JS_EXTENSIONS + TS_EXTENSIONS
def strip_ext(f):
"Strips the extens... | 29.10625 | 136 | 0.647198 |
c737a7ae962fb4305438e08a15b91f6838ca055d | 453,790 | py | Python | interface/material_rc.py | BlueflameLi/Ticket_reservation_system | c459aefd3fa346ed7b2119cdecdcc8c5bac01d34 | [
"MIT"
] | 3 | 2021-06-20T12:47:19.000Z | 2021-06-27T03:31:43.000Z | interface/material_rc.py | BlueflameLi/Ticket_reservation_system | c459aefd3fa346ed7b2119cdecdcc8c5bac01d34 | [
"MIT"
] | null | null | null | interface/material_rc.py | BlueflameLi/Ticket_reservation_system | c459aefd3fa346ed7b2119cdecdcc8c5bac01d34 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.9.7)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x01\xbf\
\x00\
\x00\x10\x50\x78\x9c\xed\x90\xb1\x4f\xdb\x40\x14\xc6\xaf\xa1\x8a\
\xa2\x08\xaa\x5... | 65.444188 | 129 | 0.727191 |
d2b82926dec0222ef14d01502b9779eaf6fd2648 | 525 | py | Python | setup.py | daffidwilde/dogma | 9bd3b6019897b9e4be22b1728760a9222ecf94f7 | [
"MIT"
] | null | null | null | setup.py | daffidwilde/dogma | 9bd3b6019897b9e4be22b1728760a9222ecf94f7 | [
"MIT"
] | null | null | null | setup.py | daffidwilde/dogma | 9bd3b6019897b9e4be22b1728760a9222ecf94f7 | [
"MIT"
] | null | null | null | """ Setup file. """
from setuptools import find_packages, setup
with open("README.md", "r") as r:
README = r.read()
setup(
name="dogma",
version="0.0.1",
description="A heliocentric social deduction game",
long_description=README,
long_description_content_type="text/markdown",
url="https:... | 25 | 57 | 0.655238 |
58e1304d3949fc8fa30ec8fc304d9c6f22d5cce0 | 122 | py | Python | src/dipdup/__main__.py | arrijabba/dipdup-py | fa90bfd889c473966e0d5aed98cec90a575fcb90 | [
"MIT"
] | 39 | 2021-04-13T10:53:27.000Z | 2022-02-11T00:53:44.000Z | src/dipdup/__main__.py | arrijabba/dipdup-py | fa90bfd889c473966e0d5aed98cec90a575fcb90 | [
"MIT"
] | 113 | 2021-06-01T18:16:42.000Z | 2022-03-28T06:12:58.000Z | src/dipdup/__main__.py | arrijabba/dipdup-py | fa90bfd889c473966e0d5aed98cec90a575fcb90 | [
"MIT"
] | 16 | 2021-05-26T07:04:40.000Z | 2022-03-29T06:50:25.000Z | from dipdup.cli import cli
if __name__ == '__main__':
cli(prog_name='dipdup', standalone_mode=False) # type: ignore
| 24.4 | 66 | 0.721311 |
d8a010ad1b5164bea93bd6a23a19e81bbaae3bfa | 19,988 | py | Python | examples/slim/train_image_classifier.py | tobiajo/yarntf | 791f6261f0c36a1f88265eb3588b132a639654ee | [
"Apache-2.0"
] | 13 | 2017-03-21T08:15:43.000Z | 2018-08-21T13:58:05.000Z | examples/slim/train_image_classifier.py | tobiajo/tfyarn | 791f6261f0c36a1f88265eb3588b132a639654ee | [
"Apache-2.0"
] | null | null | null | examples/slim/train_image_classifier.py | tobiajo/tfyarn | 791f6261f0c36a1f88265eb3588b132a639654ee | [
"Apache-2.0"
] | 3 | 2017-05-12T06:54:23.000Z | 2020-09-15T06:00:46.000Z | """Generic training script that trains a model using a given dataset."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
import yarntf
from tensorflow.python.ops import control_flow_ops
from datasets import dataset_factor... | 34.402754 | 94 | 0.663448 |
1d24914fdc9e8e0fd98068a49e00ddf1daa35669 | 2,354 | py | Python | cloud/beach/hcp/analytics/HuntsManager.py | certego/limacharlie | 54075e17530d2dea50e4a7295fe7e8582d29eef3 | [
"Apache-2.0"
] | null | null | null | cloud/beach/hcp/analytics/HuntsManager.py | certego/limacharlie | 54075e17530d2dea50e4a7295fe7e8582d29eef3 | [
"Apache-2.0"
] | null | null | null | cloud/beach/hcp/analytics/HuntsManager.py | certego/limacharlie | 54075e17530d2dea50e4a7295fe7e8582d29eef3 | [
"Apache-2.0"
] | 1 | 2019-11-06T15:40:56.000Z | 2019-11-06T15:40:56.000Z | # Copyright 2015 refractionPOINT
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 36.215385 | 96 | 0.639337 |
e4af1a2dc751515994bb2a4933aac0f6ce9d62ef | 896 | py | Python | fastapi_server/test/base_test.py | BurnySc2/monorepo | 634feac142cd4471bde47a95c39ff71f39ce2867 | [
"MIT"
] | null | null | null | fastapi_server/test/base_test.py | BurnySc2/monorepo | 634feac142cd4471bde47a95c39ff71f39ce2867 | [
"MIT"
] | 10 | 2021-12-22T19:48:26.000Z | 2022-03-31T13:22:47.000Z | fastapi_server/test/base_test.py | BurnySc2/monorepo | 634feac142cd4471bde47a95c39ff71f39ce2867 | [
"MIT"
] | null | null | null | import contextlib
import pytest
from starlette.testclient import TestClient
from fastapi_server.main import app
class BaseTest:
method_client: TestClient = None # type: ignore
# pylint: disable=R0201
def setup_method(self, _method):
BaseTest.method_client = TestClient(app)
# pylint: disab... | 25.6 | 66 | 0.679688 |
5dddbe519caed89ba5de8a12d6d8790075669131 | 5,357 | py | Python | cartos-master/app/analise/routes.py | JoaoNunoAbreu/Cartos | 9674328e6501f092b704bc23df6d1227e5d87902 | [
"MIT"
] | null | null | null | cartos-master/app/analise/routes.py | JoaoNunoAbreu/Cartos | 9674328e6501f092b704bc23df6d1227e5d87902 | [
"MIT"
] | null | null | null | cartos-master/app/analise/routes.py | JoaoNunoAbreu/Cartos | 9674328e6501f092b704bc23df6d1227e5d87902 | [
"MIT"
] | null | null | null | from flask import jsonify, render_template, redirect, request, url_for
from app.analise import blueprint
from app import neo4j_db
from bson.json_util import dumps
from bson.json_util import loads
from datetime import datetime
from app import token_required, admin_required, photo_auth, neo4j_db
from flask_cors import... | 42.856 | 274 | 0.622177 |
14734defb1c3fcddfb3a14314015ce2eeb0d525e | 308 | py | Python | Python_Ex_vazio/ex026.py | matheusmiguelsa/Exerc-cios-de-Python | 53387266b747f79e67964356993b38c2267ac04a | [
"MIT"
] | null | null | null | Python_Ex_vazio/ex026.py | matheusmiguelsa/Exerc-cios-de-Python | 53387266b747f79e67964356993b38c2267ac04a | [
"MIT"
] | null | null | null | Python_Ex_vazio/ex026.py | matheusmiguelsa/Exerc-cios-de-Python | 53387266b747f79e67964356993b38c2267ac04a | [
"MIT"
] | null | null | null | n1 = str(input('Digite uma frase: ').strip())
n2 = n1.lower()
nx = n2.split()
ny = ''.join(nx)
n3 = n2.count('a')
n4 = ny.find('a') + 1
n5 = ny.rfind('a') + 1
print('A letra A aparece {} vezes na frase.\nA primeira letra A apareceu na posição {}\nA última letra A apareceu na posição {}'.format(n3, n4, n5))
| 34.222222 | 148 | 0.626623 |
daa67fa87be348198448cf324806fd3cfb92fbaf | 6,967 | py | Python | Lib/lib2to3/patcomp.py | ystk/debian-python2.6 | 17d77164dc5d5748e54aeaa5adc89ac511fc71ae | [
"PSF-2.0"
] | 8 | 2021-11-26T06:19:06.000Z | 2022-01-11T01:30:11.000Z | Lib/lib2to3/patcomp.py | ystk/debian-python2.6 | 17d77164dc5d5748e54aeaa5adc89ac511fc71ae | [
"PSF-2.0"
] | 1 | 2020-09-07T15:33:56.000Z | 2020-09-07T15:33:56.000Z | Lib/lib2to3/patcomp.py | ystk/debian-python2.6 | 17d77164dc5d5748e54aeaa5adc89ac511fc71ae | [
"PSF-2.0"
] | 3 | 2017-04-07T12:02:22.000Z | 2020-03-23T12:11:55.000Z | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Pattern compiler.
The grammer is taken from PatternGrammar.txt.
The compiler compiles a pattern to a pytree.*Pattern instance.
"""
__author__ = "Guido van Rossum <guido@python.org>"
# Python imports
import os
# ... | 34.490099 | 79 | 0.581599 |
95c8cdaff61fc887ac749fb36b92c71d52f381b5 | 496 | py | Python | vendor/HoeffdingTree/ht/split.py | writ3it/HD_Netezza_in-database_prediction | 9a89d4618e93ff2cf3b1c16660522c56aae27373 | [
"MIT"
] | null | null | null | vendor/HoeffdingTree/ht/split.py | writ3it/HD_Netezza_in-database_prediction | 9a89d4618e93ff2cf3b1c16660522c56aae27373 | [
"MIT"
] | null | null | null | vendor/HoeffdingTree/ht/split.py | writ3it/HD_Netezza_in-database_prediction | 9a89d4618e93ff2cf3b1c16660522c56aae27373 | [
"MIT"
] | 1 | 2019-09-03T03:11:09.000Z | 2019-09-03T03:11:09.000Z | from abc import ABCMeta, abstractmethod
class Split(object):
__metaclass__ = ABCMeta;
"""Base for classes that handle splitting (UnivariateNominaMultiwaySplit
and UnivariateNumericBinarySplit)."""
def __init__(self):
self._split_att_names = []
@abstractmethod
def branch_for_instance(s... | 26.105263 | 77 | 0.705645 |
f769a73d28c0d242dfcd050e2aa6cb605df0bf79 | 5,396 | py | Python | push_notifications/apns.py | BuddyHC/django-push-notifications | 7b7799d9ee632953c1df7ace8b5b23800aafeb82 | [
"MIT"
] | null | null | null | push_notifications/apns.py | BuddyHC/django-push-notifications | 7b7799d9ee632953c1df7ace8b5b23800aafeb82 | [
"MIT"
] | null | null | null | push_notifications/apns.py | BuddyHC/django-push-notifications | 7b7799d9ee632953c1df7ace8b5b23800aafeb82 | [
"MIT"
] | null | null | null | """
Apple Push Notification Service
Documentation is available on the iOS Developer Library:
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html
"""
import time
from apns2 import client as apns2_client
from apns2 import credentials as apns2_c... | 33.104294 | 127 | 0.779466 |
05b7d607a98d6001a6205d8db401b6ebe666e1fc | 329 | py | Python | run.py | ofurman/IsingModel | 81e54368fb702512472bd77a21f1b63a42c1a74a | [
"MIT"
] | null | null | null | run.py | ofurman/IsingModel | 81e54368fb702512472bd77a21f1b63a42c1a74a | [
"MIT"
] | null | null | null | run.py | ofurman/IsingModel | 81e54368fb702512472bd77a21f1b63a42c1a74a | [
"MIT"
] | 2 | 2021-03-08T13:28:46.000Z | 2021-05-17T18:10:07.000Z | from multiprocessing import Pool
import os
import numpy as np
import time
def drive(i):
os.system(f'./nematic {i}')
if __name__ == '__main__':
start_time = time.time()
temps = np.linspace(0.01,1,12)
pool = Pool()
pool.map(drive, temps)
pool.close()
pool.join()
print("--- %s seconds ---" % (time.time() - sta... | 19.352941 | 57 | 0.662614 |
b42259c79af03190e9859e75306785cb31926729 | 1,924 | py | Python | test/test_metrics_apel.py | mod3000a/Grid-Tools-Metric-Gathering | 32420850b21d1742e60024c11f4def85d1f6c68f | [
"Apache-2.0"
] | 1 | 2018-07-13T13:48:57.000Z | 2018-07-13T13:48:57.000Z | test/test_metrics_apel.py | mod3000a/Grid-Tools-Metric-Gathering | 32420850b21d1742e60024c11f4def85d1f6c68f | [
"Apache-2.0"
] | null | null | null | test/test_metrics_apel.py | mod3000a/Grid-Tools-Metric-Gathering | 32420850b21d1742e60024c11f4def85d1f6c68f | [
"Apache-2.0"
] | null | null | null | """This script can be used to unit test metric_apel"""
import xml.dom.minidom
from metrics_apel import get_sites, get_services, get_countries
import unittest
class TeestMetricsAPEL(unittest.TestCase):
"""This class holds the test for metrics_APELv4"""
def test_get_sites(self):
"""Tests the get_sites ... | 32.066667 | 68 | 0.70842 |
cc74ceaf148b3c82a88cd46f4ec8fe60a1569466 | 10,330 | py | Python | iotprovision/iotprovision_main.py | microchip-pic-avr-tools/iotprovision | 310806d6df4462484fe289a14957228a6f34ca48 | [
"MIT"
] | null | null | null | iotprovision/iotprovision_main.py | microchip-pic-avr-tools/iotprovision | 310806d6df4462484fe289a14957228a6f34ca48 | [
"MIT"
] | null | null | null | iotprovision/iotprovision_main.py | microchip-pic-avr-tools/iotprovision | 310806d6df4462484fe289a14957228a6f34ca48 | [
"MIT"
] | null | null | null | """
Top-level logic of IOT provisioning program
"""
import os
from logging import getLogger
from packaging import version
from pykitcommander.kitmanager import KitProgrammer
from pykitcommander.kitcommandererrors import KitConnectionError, KitCommunicationError, PykitcommanderError
from .provisioner import get_provisi... | 46.116071 | 108 | 0.635528 |
30cc4ba3189ac6bb34a5b56f355de9206cd0d73a | 458 | py | Python | teams/migrations/0011_student_in_team.py | gennadis/dvmn_teams | f760780e634efe7cdddf669ae42f168917d5c8d1 | [
"MIT"
] | null | null | null | teams/migrations/0011_student_in_team.py | gennadis/dvmn_teams | f760780e634efe7cdddf669ae42f168917d5c8d1 | [
"MIT"
] | null | null | null | teams/migrations/0011_student_in_team.py | gennadis/dvmn_teams | f760780e634efe7cdddf669ae42f168917d5c8d1 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-28 23:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("teams", "0010_alter_team_students"),
]
operations = [
migrations.AddField(
model_name="student",
name="in_team",
... | 21.809524 | 69 | 0.578603 |
7068d9555a731b004b3bb4765496dd7bd10ade53 | 1,164 | py | Python | shifting-exp.py | micha7a/surface-reconstruction | 3e782d155e69729b68278ef55bdccb78deb1bb50 | [
"MIT"
] | null | null | null | shifting-exp.py | micha7a/surface-reconstruction | 3e782d155e69729b68278ef55bdccb78deb1bb50 | [
"MIT"
] | 4 | 2022-01-20T18:33:39.000Z | 2022-01-20T18:33:40.000Z | shifting-exp.py | LCAV/surface-reconstruction | 00094419bb7967ea0cd781c1520ed62926fcc848 | [
"MIT"
] | null | null | null | """ Shifting Exponential Polynomials
Script generating plots describing the movement of samples for a path in the space of complex exponential polynomial
(periodic bandlimited function), not included in the paper.
To use just run
python shifting-exp.py
script does not take any command line arguments or flags.
"... | 23.755102 | 116 | 0.69244 |
ae21f0e0c92966e0ecb08eb0e893c3fa00ffe9a9 | 4,862 | py | Python | isso/db_psql/__init__.py | anba8005/isso-postgresql | 3b10e53f2e169b32d3c6a57daaf3e84569574c71 | [
"MIT"
] | null | null | null | isso/db_psql/__init__.py | anba8005/isso-postgresql | 3b10e53f2e169b32d3c6a57daaf3e84569574c71 | [
"MIT"
] | null | null | null | isso/db_psql/__init__.py | anba8005/isso-postgresql | 3b10e53f2e169b32d3c6a57daaf3e84569574c71 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
import psycopg2
import logging
import operator
import os.path
from collections import defaultdict
from contextlib import contextmanager
from psycopg2 import pool
logger = logging.getLogger("isso")
from isso.db_psql.comments import Comments
from isso.db_psql.threads import Threads
from isso... | 32.851351 | 116 | 0.58659 |
864eb1a77c9a76c7cf246215d24216005ec5bfbc | 18,138 | py | Python | single_channel_models.py | WWH98932/Audio-Classification-Models | ed1f9a56cf87e9a6eab88c54b4727a8123d20a12 | [
"MIT"
] | 8 | 2020-10-14T06:15:58.000Z | 2022-03-18T13:33:00.000Z | single_channel_models.py | vishalkk/Audio-Classification-Models | ed1f9a56cf87e9a6eab88c54b4727a8123d20a12 | [
"MIT"
] | null | null | null | single_channel_models.py | vishalkk/Audio-Classification-Models | ed1f9a56cf87e9a6eab88c54b4727a8123d20a12 | [
"MIT"
] | 5 | 2020-10-14T06:16:12.000Z | 2021-09-22T23:15:32.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : stft+cldnn.py
@Time : 2020/09/25 11:09:06
@Author : Wang Minxuan
@Version : 1.0.0
@Contact : mx.wang@cyber-insight.com
@License : (C)Copyright 2019-2020, CyberInsight
@Desc : None
'''
# here put the import lib
import glob... | 42.083527 | 134 | 0.640864 |
09aec2cb4879fdecf79609ae3d54a4083108cca8 | 905 | py | Python | DQM/L1TMonitorClient/python/L1TStage2OMTFEmulatorClient_cff.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQM/L1TMonitorClient/python/L1TStage2OMTFEmulatorClient_cff.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | DQM/L1TMonitorClient/python/L1TStage2OMTFEmulatorClient_cff.py | pasmuss/cmssw | 566f40c323beef46134485a45ea53349f59ae534 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
from DQM.L1TMonitor.L1TdeStage2OMTF_cfi import ignoreBins
# RegionalMuonCands
l1tStage2OMTFEmulatorCompRatioClient = DQMEDHarvester("L1TStage2RatioClient",
monitorDir = cms.untracked.string('L1TEMU/L1TdeStage2OMTF')... | 41.136364 | 110 | 0.79337 |
8abbe726320bcf07bdcff0553a205014a59c155a | 92,824 | py | Python | AlGDock/backup/2014_02_01_docker.py | xinliu0609/AlGDock | 0795a9cfea690e1d287b8eb2be5ed8586f61b2d3 | [
"MIT"
] | null | null | null | AlGDock/backup/2014_02_01_docker.py | xinliu0609/AlGDock | 0795a9cfea690e1d287b8eb2be5ed8586f61b2d3 | [
"MIT"
] | null | null | null | AlGDock/backup/2014_02_01_docker.py | xinliu0609/AlGDock | 0795a9cfea690e1d287b8eb2be5ed8586f61b2d3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# TO DO: Revamp functions to
# -compare different Lennard-Jones grid transformations
# TO DO: Clean up output
# TO DO: Write docstrings
# TO DO: Set up checkpoints
# Ideas from Prodock by Trosset & Scheraga
# TO DO: Grid interpolation with Bezier splines, which provides second derivatives [Ober... | 38.936242 | 316 | 0.615875 |
f6ffcf462a8437b800c557b41e1d2fabcc3c1dfd | 12,456 | py | Python | networkx/algorithms/bipartite/tests/test_generators.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 10,024 | 2015-01-01T13:06:43.000Z | 2022-03-31T12:45:25.000Z | networkx/algorithms/bipartite/tests/test_generators.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 3,191 | 2015-01-01T18:13:11.000Z | 2022-03-31T22:06:00.000Z | networkx/algorithms/bipartite/tests/test_generators.py | jebogaert/networkx | 8563c3313223a53c548530f39c8cfb6e433539d3 | [
"BSD-3-Clause"
] | 3,272 | 2015-01-01T05:04:53.000Z | 2022-03-31T17:46:35.000Z | import pytest
import networkx as nx
from ..generators import (
alternating_havel_hakimi_graph,
complete_bipartite_graph,
configuration_model,
gnmk_random_graph,
havel_hakimi_graph,
preferential_attachment_graph,
random_graph,
reverse_havel_hakimi_graph,
)
"""
Generators - Bipartite
----... | 31.14 | 88 | 0.53966 |
67a2d9dc45b66fa5f7a522901c7100069aa5f48d | 1,012 | py | Python | PYTHON/Desafios Python - Mundo 2/056A.py | FR7/Meus-Projetos | 1c8e1a91eaf143cccdc10f0e7edd013d910de474 | [
"MIT"
] | null | null | null | PYTHON/Desafios Python - Mundo 2/056A.py | FR7/Meus-Projetos | 1c8e1a91eaf143cccdc10f0e7edd013d910de474 | [
"MIT"
] | null | null | null | PYTHON/Desafios Python - Mundo 2/056A.py | FR7/Meus-Projetos | 1c8e1a91eaf143cccdc10f0e7edd013d910de474 | [
"MIT"
] | null | null | null | # Desenvolva um programa que leia o nome, idade e sexo de 4 pessoas.
# No final do programa, mostre:
#-A MÉDIA DE IDADE DO GRUPO
#qUAL É O NOME DO HOMEM MAIS VELHO
# QUANTAS MULHERES TEM MENOS DE 20 ANOS.
somaidade = 0
mediaidade = 0
maioridadehomem = 0
nomevelho = ''
totmulher20 = 0
for p in range(1, 5):
print(... | 32.645161 | 91 | 0.634387 |
72092eb2ae926646e4f9108c945e337c8a8e08a0 | 8,103 | py | Python | src/httpie_nifcloud_authv4.py | kzmake/httpie-aws-authv4 | 8b46032dd904eb3303ba143524a4bff14f75ecf3 | [
"MIT"
] | 2 | 2021-12-02T10:08:13.000Z | 2021-12-02T10:08:47.000Z | src/httpie_nifcloud_authv4.py | kzmake/httpie-nifcloud-authv4 | 8b46032dd904eb3303ba143524a4bff14f75ecf3 | [
"MIT"
] | null | null | null | src/httpie_nifcloud_authv4.py | kzmake/httpie-nifcloud-authv4 | 8b46032dd904eb3303ba143524a4bff14f75ecf3 | [
"MIT"
] | null | null | null | """
AWS/NIFCLOUD auth v4 plugin for HTTPie.
"""
import os
import sys
import time
import binascii
import re
import requests
from aws_requests_auth.aws_auth import AWSRequestsAuth
from httpie.status import ExitStatus
from httpie.plugins import AuthPlugin
try:
from urllib.parse import urlparse
except ImportError:
... | 31.652344 | 88 | 0.575466 |
ab71c827285a776305a8f980813ec456dfe46bb1 | 4,286 | py | Python | purity_fb/purity_fb_1dot8dot1/models/object_store_user_response.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot8dot1/models/object_store_user_response.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot8dot1/models/object_store_user_response.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.8.1 Python SDK
Pure Storage FlashBlade REST 1.8.1 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.8.1
Cont... | 27.831169 | 206 | 0.585628 |
87a5aa0ad85ccf211436828cf6a65e7077ab476f | 36,246 | py | Python | python/ccxt/async_support/coinbasepro.py | EdwinSchrubb/ccxt | b134ce6ffad54c69ceaa872b07c71ca07e7d3a1a | [
"MIT"
] | 1 | 2020-08-25T23:07:18.000Z | 2020-08-25T23:07:18.000Z | python/ccxt/async_support/coinbasepro.py | EdwinSchrubb/ccxt | b134ce6ffad54c69ceaa872b07c71ca07e7d3a1a | [
"MIT"
] | 2 | 2020-05-12T12:53:48.000Z | 2020-07-05T12:59:52.000Z | python/ccxt/async_support/coinbasepro.py | EdwinSchrubb/ccxt | b134ce6ffad54c69ceaa872b07c71ca07e7d3a1a | [
"MIT"
] | 3 | 2020-04-01T05:56:19.000Z | 2020-06-24T10:17:13.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 39.312364 | 187 | 0.509601 |
a4d8cbcc6014674b80701c84eacefe685f237395 | 1,226 | py | Python | dicomviewer/csvview.py | pdyban/dicombrowser | d3ced316979edea498508ac954ab45967f2c774c | [
"Apache-2.0"
] | null | null | null | dicomviewer/csvview.py | pdyban/dicombrowser | d3ced316979edea498508ac954ab45967f2c774c | [
"Apache-2.0"
] | 1 | 2021-06-01T21:54:17.000Z | 2021-06-01T21:54:17.000Z | dicomviewer/csvview.py | pdyban/dicombrowser | d3ced316979edea498508ac954ab45967f2c774c | [
"Apache-2.0"
] | 1 | 2017-12-01T19:43:45.000Z | 2017-12-01T19:43:45.000Z | from .fileview import FileView, FileViewModel
import csv
from .model import Model
class CSVView(FileView):
def __init__(self, filestream, delimiter=';', lineterminator='\n'):
super(CSVView, self).__init__(filestream=filestream)
self.delimiter = delimiter
self.lineterminator = lineterminato... | 29.902439 | 88 | 0.607667 |
8ce995c44c87edabc6265b0ac467972c015d0eb8 | 2,657 | py | Python | doc/manual/LD/msprime_two_pop_parsing.py | grahamgower/moments | 54d2c58d91a231303fb361258e24b41b23f50661 | [
"BSD-3-Clause"
] | null | null | null | doc/manual/LD/msprime_two_pop_parsing.py | grahamgower/moments | 54d2c58d91a231303fb361258e24b41b23f50661 | [
"BSD-3-Clause"
] | null | null | null | doc/manual/LD/msprime_two_pop_parsing.py | grahamgower/moments | 54d2c58d91a231303fb361258e24b41b23f50661 | [
"BSD-3-Clause"
] | null | null | null | import msprime
import moments.LD as mold
import numpy as np
import os, sys
## First we'll create some data using msprime
## The model will be a two population model that split some time
## in the past, with subsequent migration and size changes
L = 1e6 # simulate a 1 Mb chunk
r = 2e-8 # constant per base recombinati... | 31.630952 | 65 | 0.685736 |
13a04dda71ad755f0b77902afbb71ede020a0788 | 339 | py | Python | sutdents D33102 HouDan/sutdents D33102 HouDan lr5/Schedule/Discipline_schedule/forms.py | HD799/ITMO_ICT_WebProgramming_2020-2021_d3310 | 17ebcd5f2b4a018a3c7324ec3dd13d82e5062361 | [
"MIT"
] | null | null | null | sutdents D33102 HouDan/sutdents D33102 HouDan lr5/Schedule/Discipline_schedule/forms.py | HD799/ITMO_ICT_WebProgramming_2020-2021_d3310 | 17ebcd5f2b4a018a3c7324ec3dd13d82e5062361 | [
"MIT"
] | null | null | null | sutdents D33102 HouDan/sutdents D33102 HouDan lr5/Schedule/Discipline_schedule/forms.py | HD799/ITMO_ICT_WebProgramming_2020-2021_d3310 | 17ebcd5f2b4a018a3c7324ec3dd13d82e5062361 | [
"MIT"
] | null | null | null | from django import forms
from Student_Class.models import Teacher, Schedule, Discipline
class TeacherForm(forms.ModelForm):
class Meta:
model = Teacher
fields = ["name"]
class ScheduleForm(forms.ModelForm):
class Meta:
model = Schedule
fields = ["date", "id_group", "id_teacher",... | 26.076923 | 68 | 0.678466 |
c927eee50e68d715b592a30443c42435ea420610 | 717,691 | py | Python | ccxt/exchanges.py | jianwang0212/ccxt | a0056396257e3c273e4fd3e564e17a4410228f1b | [
"MIT"
] | null | null | null | ccxt/exchanges.py | jianwang0212/ccxt | a0056396257e3c273e4fd3e564e17a4410228f1b | [
"MIT"
] | null | null | null | ccxt/exchanges.py | jianwang0212/ccxt | a0056396257e3c273e4fd3e564e17a4410228f1b | [
"MIT"
] | 1 | 2020-05-13T22:39:43.000Z | 2020-05-13T22:39:43.000Z | # -*- coding: utf-8 -*-
"""
MIT License
Copyright (c) 2017 Igor Kroitor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy,... | 38.305455 | 232 | 0.468806 |
d2a10090dbb7f7db6f0935cf49990b65a5b30e45 | 35,219 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/cloudengine/ce_snmp_community.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/cloudengine/ce_snmp_community.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | null | null | null | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/network/cloudengine/ce_snmp_community.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-02-13T14:24:57.000Z | 2020-02-13T14:24:57.000Z | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 36.159138 | 113 | 0.548738 |
3441911ebfc65043752cdfe118f1f576e777cbc6 | 438 | py | Python | tests/conftest.py | paylogic/pushserver | 85d5562d98a26dfd47b3721d0755c286e8148ece | [
"MIT"
] | 3 | 2016-03-21T09:27:11.000Z | 2016-08-14T03:17:20.000Z | tests/conftest.py | paylogic/pushserver | 85d5562d98a26dfd47b3721d0755c286e8148ece | [
"MIT"
] | null | null | null | tests/conftest.py | paylogic/pushserver | 85d5562d98a26dfd47b3721d0755c286e8148ece | [
"MIT"
] | null | null | null | """Pushserver test config."""
import pytest
from pushserver.server import create_app
@pytest.fixture(scope='session')
def server():
"""Flask application object."""
return create_app(mode='development')
@pytest.fixture
def http(server):
"""Test client.
Usage:
with http as c:
res... | 18.25 | 41 | 0.641553 |
4e95111062249146b5e5efa06346591803a87980 | 28,235 | py | Python | test/functional/test_framework/script.py | Cminor-pools/bitcoinvg | d47a3cf13e06f4fe03d965826f5309e6d5706470 | [
"MIT"
] | null | null | null | test/functional/test_framework/script.py | Cminor-pools/bitcoinvg | d47a3cf13e06f4fe03d965826f5309e6d5706470 | [
"MIT"
] | null | null | null | test/functional/test_framework/script.py | Cminor-pools/bitcoinvg | d47a3cf13e06f4fe03d965826f5309e6d5706470 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Functionality to build scripts, as well as signature hash functions.
This file is modified from python... | 33.062061 | 201 | 0.616221 |
4fa9ecde8c8053d0671f3b8cf5258ae46e012ae3 | 22,582 | py | Python | formlibrary/old-views.py | nathanostdiek/activity | 9b2becdd1be0918b000732625ed7c1a8ecc7bf65 | [
"Apache-2.0"
] | null | null | null | formlibrary/old-views.py | nathanostdiek/activity | 9b2becdd1be0918b000732625ed7c1a8ecc7bf65 | [
"Apache-2.0"
] | null | null | null | formlibrary/old-views.py | nathanostdiek/activity | 9b2becdd1be0918b000732625ed7c1a8ecc7bf65 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
###############################################################
# ! Legacy code for views.py left for reference purposes #
###############################################################
import json
from django.contrib import messages
from django.core.serializers.json... | 34.848765 | 96 | 0.645558 |
87b717d73ebc4d7fe995ff0dee159c0c7ee3a8a8 | 37 | py | Python | avalon/tools/html_server/__init__.py | Yowza-Animation/avalon-core | 0a423bfb6c92e8c06dcf5cc61ba04494fb0bac85 | [
"MIT"
] | null | null | null | avalon/tools/html_server/__init__.py | Yowza-Animation/avalon-core | 0a423bfb6c92e8c06dcf5cc61ba04494fb0bac85 | [
"MIT"
] | null | null | null | avalon/tools/html_server/__init__.py | Yowza-Animation/avalon-core | 0a423bfb6c92e8c06dcf5cc61ba04494fb0bac85 | [
"MIT"
] | null | null | null | from . import app
__all__ = ["app"]
| 9.25 | 17 | 0.621622 |
931556c34756d73da99048620e637be422d64143 | 43,491 | py | Python | moto/elbv2/models.py | antoarun/moto | 1e41b62cecc7f2fab41f6ca17a1ed43d0d74fde4 | [
"Apache-2.0"
] | null | null | null | moto/elbv2/models.py | antoarun/moto | 1e41b62cecc7f2fab41f6ca17a1ed43d0d74fde4 | [
"Apache-2.0"
] | null | null | null | moto/elbv2/models.py | antoarun/moto | 1e41b62cecc7f2fab41f6ca17a1ed43d0d74fde4 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import datetime
import pytz
import re
from jinja2 import Template
from botocore.exceptions import ParamValidationError
from moto.compat import OrderedDict
from moto.core.exceptions import RESTError
from moto.core import BaseBackend, BaseModel, CloudFormationModel
from moto.core.... | 36.182196 | 221 | 0.59479 |
725e1fb81e53a78d7370ee38b1299411fdefe526 | 6,213 | py | Python | src-el/relations.py | EulerProject/EulerX | 49e63e6a27be97ab30832180a47d214494388e15 | [
"MIT"
] | 15 | 2016-02-17T20:48:29.000Z | 2021-03-05T20:38:05.000Z | src-el/relations.py | eddy7896/EulerX | 49e63e6a27be97ab30832180a47d214494388e15 | [
"MIT"
] | 16 | 2015-02-05T18:38:48.000Z | 2021-06-14T11:38:36.000Z | src-el/relations.py | eddy7896/EulerX | 49e63e6a27be97ab30832180a47d214494388e15 | [
"MIT"
] | 4 | 2016-01-26T03:24:52.000Z | 2020-01-09T07:57:15.000Z | # Copyright (c) 2014 University of California, Davis
#
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify,... | 34.137363 | 79 | 0.49316 |
03a19698c969b5253f32aae85e7776e451e88032 | 16,847 | py | Python | src/sage/interfaces/sage0.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2018-09-11T11:16:26.000Z | 2019-09-10T15:26:37.000Z | src/sage/interfaces/sage0.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/interfaces/sage0.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2020-03-29T17:13:36.000Z | 2021-05-03T18:11:28.000Z | r"""
Interface to Sage
This is an expect interface to *another* copy of the Sage
interpreter.
"""
from __future__ import absolute_import
#*****************************************************************************
# Copyright (C) 2005 William Stein <wstein@gmail.com>
#
# Distributed under the terms of the GN... | 26.998397 | 104 | 0.501632 |
d96733e4a4069b3be346eaf21941807a0328d5b5 | 45,957 | py | Python | tests/test_intl.py | ravwojdyla/sphinx | a7e10c1d36007650b5e3948021d4aa90d78127d4 | [
"BSD-2-Clause"
] | 8 | 2021-01-29T23:28:16.000Z | 2021-06-04T07:12:32.000Z | tests/test_intl.py | ravwojdyla/sphinx | a7e10c1d36007650b5e3948021d4aa90d78127d4 | [
"BSD-2-Clause"
] | null | null | null | tests/test_intl.py | ravwojdyla/sphinx | a7e10c1d36007650b5e3948021d4aa90d78127d4 | [
"BSD-2-Clause"
] | 2 | 2019-11-03T19:02:59.000Z | 2021-03-05T12:10:47.000Z | """
test_intl
~~~~~~~~~
Test message patching for internationalization purposes. Runs the text
builder in the test root.
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import re
import pytest
from babel.messages import ... | 35.162204 | 95 | 0.603999 |
91db86ba934450e324eaec279f580fbc5f015617 | 267 | py | Python | shellshock_scanner/settings.py | pombredanne/shellshock-scanner | 4c6efb6ac14f9a1b93cc1270e46c7ffef784b662 | [
"MIT"
] | 1 | 2020-10-03T19:42:18.000Z | 2020-10-03T19:42:18.000Z | shellshock_scanner/settings.py | pombredanne/shellshock-scanner | 4c6efb6ac14f9a1b93cc1270e46c7ffef784b662 | [
"MIT"
] | null | null | null | shellshock_scanner/settings.py | pombredanne/shellshock-scanner | 4c6efb6ac14f9a1b93cc1270e46c7ffef784b662 | [
"MIT"
] | 1 | 2020-10-03T19:42:19.000Z | 2020-10-03T19:42:19.000Z | BOT_NAME = 'ShellshockScanner'
USER_AGENT = 'ShellshockScanner'
SPIDER_MODULES = ['shellshock_scanner.spiders']
NEWSPIDER_MODULE = 'shellshock_scanner.spiders'
DEFAULT_REQUEST_HEADERS = {
'x-shellshock-scan': '() { :;}; echo x-shellshock-status: vulnerable',
}
| 26.7 | 74 | 0.752809 |
26c9f154cf6213b69ab20057f11b5812587d4dd5 | 4,413 | py | Python | app_old/datamodels.py | ericmjl/worship-manager | e145fd69b4c2eee2a4f26c27151137832bc0d1e7 | [
"MIT"
] | 4 | 2017-07-24T02:32:15.000Z | 2020-06-29T18:09:47.000Z | app_old/datamodels.py | ericmjl/worship-manager | e145fd69b4c2eee2a4f26c27151137832bc0d1e7 | [
"MIT"
] | 115 | 2019-02-11T15:02:31.000Z | 2022-03-21T15:46:09.000Z | app_old/datamodels.py | ericmjl/worship-manager | e145fd69b4c2eee2a4f26c27151137832bc0d1e7 | [
"MIT"
] | null | null | null | """
Data models used in the project.
"""
import pinyin
from sqlalchemy.dialects.postgresql import JSON
from flask_sqlalchemy import SQLAlchemy
# from .__init__ import db
# class Song(db.Model):
# id = db.Column(db.Integer, primary_key=True)
# name = db.Column(db.String(), unique=True, nullable=False)
# ... | 29.032895 | 81 | 0.579424 |
3c4746cd0b2a9c1e8d077fc0a9d6d295a644f6e9 | 2,746 | py | Python | dataset.py | schmitts/yin_yang_data_set | baae7976b4cd7dd0ab75ed25aa9805e70ac82fe4 | [
"MIT"
] | 20 | 2020-09-01T15:32:09.000Z | 2022-03-19T09:51:09.000Z | dataset.py | schmitts/yin_yang_data_set | baae7976b4cd7dd0ab75ed25aa9805e70ac82fe4 | [
"MIT"
] | 3 | 2021-01-06T16:23:55.000Z | 2021-03-04T11:00:29.000Z | dataset.py | schmitts/yin_yang_data_set | baae7976b4cd7dd0ab75ed25aa9805e70ac82fe4 | [
"MIT"
] | 5 | 2020-10-07T09:50:05.000Z | 2021-03-04T09:55:31.000Z | import numpy as np
from torch.utils.data.dataset import Dataset
class YinYangDataset(Dataset):
def __init__(self, r_small=0.1, r_big=0.5, size=1000, seed=42, transform=None):
super(YinYangDataset, self).__init__()
# using a numpy RNG to allow compatibility to other deep learning frameworks
... | 38.676056 | 84 | 0.581209 |
a4d93af708966acf30b2d6508de064da685815f7 | 1,067 | py | Python | dq0/sdk/examples/cifar/run_demo.py | gradientzero/dq0-sdk | 90856dd5ac56216971ffe33004447fd037a21660 | [
"0BSD"
] | 2 | 2020-09-16T09:28:00.000Z | 2021-03-18T21:26:29.000Z | dq0/sdk/examples/cifar/run_demo.py | gradientzero/dq0-sdk | 90856dd5ac56216971ffe33004447fd037a21660 | [
"0BSD"
] | 22 | 2020-04-15T10:19:33.000Z | 2022-03-12T00:20:57.000Z | dq0/sdk/examples/cifar/run_demo.py | gradientzero/dq0-sdk | 90856dd5ac56216971ffe33004447fd037a21660 | [
"0BSD"
] | null | null | null | # -*- coding: utf-8 -*-
"""CIFAR-10 example.
Run script to test the execution locally.
Copyright 2020, Gradient Zero
All rights reserved
"""
import os
import dq0.sdk
from dq0.sdk.data.utils import util
from dq0.sdk.examples.cifar.model.user_model import UserModel
if __name__ == '__main__':
print('\nRunning de... | 20.921569 | 78 | 0.689784 |
9bd7bc1c5b99e418b8da59308aaa29d17179d581 | 5,680 | py | Python | segformer_pytorch/segformer_pytorch.py | Ravimk07/segformer-pytorch | 7ab3c29d960d9dea11417a98a7922b2a624961c1 | [
"MIT"
] | 1 | 2021-09-30T11:07:32.000Z | 2021-09-30T11:07:32.000Z | segformer_pytorch/segformer_pytorch.py | Ravimk07/segformer-pytorch | 7ab3c29d960d9dea11417a98a7922b2a624961c1 | [
"MIT"
] | null | null | null | segformer_pytorch/segformer_pytorch.py | Ravimk07/segformer-pytorch | 7ab3c29d960d9dea11417a98a7922b2a624961c1 | [
"MIT"
] | null | null | null | from math import sqrt
from functools import partial
import torch
from torch import nn, einsum
import torch.nn.functional as F
from einops import rearrange, reduce
from einops.layers.torch import Rearrange
# helpers
def exists(val):
return val is not None
def cast_tuple(val, depth):
return val if isinstance(... | 30.702703 | 215 | 0.55757 |
00c51bf8e8a3dac9a41813165da589a288f6ffe1 | 3,068 | py | Python | tests/test_organizations_config_templates.py | GST5555/meraki_api | 3f49008ecd4197c976026b6c39f5a67b7c6552b3 | [
"MIT"
] | null | null | null | tests/test_organizations_config_templates.py | GST5555/meraki_api | 3f49008ecd4197c976026b6c39f5a67b7c6552b3 | [
"MIT"
] | 2 | 2019-06-03T22:41:38.000Z | 2020-01-06T17:26:34.000Z | tests/test_organizations_config_templates.py | GST5555/meraki_api | 3f49008ecd4197c976026b6c39f5a67b7c6552b3 | [
"MIT"
] | null | null | null | """
Meraki API Testing module.
"""
KEY = "SOME_KEY"
ORGANIZATION_ID = "ORGANIZATION_ID"
CONFIG_TEMPLATE_ID = "CONFIG_TEMPLATE_ID"
import unittest
# The context.py file on this folder sets up the context for the test case.
from context import MerakiAPI
class TestMerakiApi(unittest.TestCase):
""" Meraki API test c... | 28.943396 | 77 | 0.562907 |
64f8aca0a2d40d22453c252e5197652383b950a1 | 3,351 | py | Python | mendel.py | dancollins/rosalind | 526e9346e2dbb503a2e871826e4438cf4de82b98 | [
"Apache-2.0"
] | null | null | null | mendel.py | dancollins/rosalind | 526e9346e2dbb503a2e871826e4438cf4de82b98 | [
"Apache-2.0"
] | null | null | null | mendel.py | dancollins/rosalind | 526e9346e2dbb503a2e871826e4438cf4de82b98 | [
"Apache-2.0"
] | null | null | null | '''
Problem
Probability is the mathematical study of randomly occurring phenomena. We will
model such a phenomenon with a random variable, which is simply a variable that
can take a number of different distinct outcomes depending on the result of an
underlying random process.
For example, say that we have a bag conta... | 45.283784 | 80 | 0.719785 |
48a8bb6a1cafdc8d6234ce447edd337880f97018 | 4,290 | py | Python | feature.py | ashishpatel26/acoustic-classification-segmentation | b80ef566821fe71350e53bd5914bcec848b8ad09 | [
"MIT"
] | null | null | null | feature.py | ashishpatel26/acoustic-classification-segmentation | b80ef566821fe71350e53bd5914bcec848b8ad09 | [
"MIT"
] | null | null | null | feature.py | ashishpatel26/acoustic-classification-segmentation | b80ef566821fe71350e53bd5914bcec848b8ad09 | [
"MIT"
] | 1 | 2021-03-10T11:43:24.000Z | 2021-03-10T11:43:24.000Z | import os
import librosa
import numpy as np
labels = {'speech': 0, 'music': 1, 'noise': 2}
FRAME_SIZE = 10 # milliseconds
CONTEXT_FRAMES = 0
ZCR=False
MFCC_NUM=40
def extract(wav_fname, frame_size=FRAME_SIZE, context_frames=CONTEXT_FRAMES, zcr=ZCR, mfcc_num=MFCC_NUM, verbose=False, **kwargs):
# will sample 1600... | 43.333333 | 213 | 0.684149 |
644e7dea3bdbd05d42b73f92a97d2f64e998548b | 3,411 | py | Python | src/training.py | FrankSauve/472-Project-2 | 45233ff83f5170669f845ead92c8f2aeeab76a20 | [
"MIT"
] | null | null | null | src/training.py | FrankSauve/472-Project-2 | 45233ff83f5170669f845ead92c8f2aeeab76a20 | [
"MIT"
] | null | null | null | src/training.py | FrankSauve/472-Project-2 | 45233ff83f5170669f845ead92c8f2aeeab76a20 | [
"MIT"
] | null | null | null | import os
from sklearn import tree
from sklearn.naive_bayes import MultinomialNB, BernoulliNB, GaussianNB, ComplementNB
from sklearn.neural_network import MLPClassifier
from sklearn.externals import joblib
import warnings
def warn(*args, **kwargs):
pass
warnings.warn = warn
def save_classifier(classifier, fil... | 32.798077 | 104 | 0.718558 |
87d08468e128e985ab72909edbfbe338d10b7dff | 27,871 | py | Python | src/xgboost_colsub.py | drivendata/countable-care-3rd-place | d1bba2f09ba0196cc3f35d2a41ea93bfbc4086a2 | [
"MIT"
] | 2 | 2020-06-26T12:00:28.000Z | 2021-09-20T19:28:24.000Z | src/xgboost_colsub.py | drivendata/countable-care-3rd-place | d1bba2f09ba0196cc3f35d2a41ea93bfbc4086a2 | [
"MIT"
] | null | null | null | src/xgboost_colsub.py | drivendata/countable-care-3rd-place | d1bba2f09ba0196cc3f35d2a41ea93bfbc4086a2 | [
"MIT"
] | 2 | 2019-05-16T17:40:03.000Z | 2021-09-20T19:28:25.000Z | # coding: utf-8
"""
xgboost: eXtreme Gradient Boosting library
Authors: Tianqi Chen, Bing Xu
Early stopping by Zygmunt Zając
"""
from __future__ import absolute_import
import os
import sys
import ctypes
import collections
import numpy as np
import scipy.sparse
try:
from sklearn.base import BaseEstimator
f... | 32.635831 | 130 | 0.580496 |
bf0635113b65d71fa8c9d970592316cdcedb0c49 | 433 | py | Python | output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_enumeration_3_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 1 | 2021-08-14T17:59:21.000Z | 2021-08-14T17:59:21.000Z | output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_enumeration_3_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | 4 | 2020-02-12T21:30:44.000Z | 2020-04-15T20:06:46.000Z | output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_enumeration_3_xsd/__init__.py | tefra/xsdata-w3c-tests | b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f | [
"MIT"
] | null | null | null | from output.models.nist_data.atomic.positive_integer.schema_instance.nistschema_sv_iv_atomic_positive_integer_enumeration_3_xsd.nistschema_sv_iv_atomic_positive_integer_enumeration_3 import (
NistschemaSvIvAtomicPositiveIntegerEnumeration3,
NistschemaSvIvAtomicPositiveIntegerEnumeration3Type,
)
__all__ = [
... | 43.3 | 191 | 0.884527 |
5ae77afe21a66e80e627e88449663f861737d9ab | 2,453 | py | Python | Hinting/BlueFuzzer.py | danielgamage/Mekkablue-Scripts | 0b0b4468ec938f8c669b3552e2fa429080b65bf1 | [
"Apache-2.0"
] | 1 | 2021-09-04T18:41:30.000Z | 2021-09-04T18:41:30.000Z | Hinting/BlueFuzzer.py | davidtahim/Glyphs-Scripts | 5ed28805b5fe03c63d904ad2f79117844c22aa44 | [
"Apache-2.0"
] | null | null | null | Hinting/BlueFuzzer.py | davidtahim/Glyphs-Scripts | 5ed28805b5fe03c63d904ad2f79117844c22aa44 | [
"Apache-2.0"
] | 1 | 2021-06-09T19:16:47.000Z | 2021-06-09T19:16:47.000Z | #MenuTitle: BlueFuzzer
# -*- coding: utf-8 -*-
__doc__="""
Extends all alignment zones (except for the baseline zone that should stay at 0).
"""
import vanilla
import GlyphsApp
windowHeight = 110
class BlueFuzzer( object ):
def __init__( self ):
self.w = vanilla.FloatingWindow( (300, windowHeight), "BlueFuzzer", ... | 29.914634 | 180 | 0.680391 |
d092a90d74e510f4cb6eb0f166798214a611b739 | 16,993 | py | Python | cogs/memes.py | ianpaes211/Kurisu | e37e70edad1047adb6c5165a3144556d07d0a954 | [
"Apache-2.0"
] | null | null | null | cogs/memes.py | ianpaes211/Kurisu | e37e70edad1047adb6c5165a3144556d07d0a954 | [
"Apache-2.0"
] | null | null | null | cogs/memes.py | ianpaes211/Kurisu | e37e70edad1047adb6c5165a3144556d07d0a954 | [
"Apache-2.0"
] | null | null | null | import random
import math
import discord
from discord.ext import commands
class Memes(commands.Cog):
"""
Meme commands
"""
def __init__(self, bot):
self.bot = bot
print(f'Cog "{self.qualified_name}" loaded')
async def _meme(self, ctx, msg, directed: bool = False, imagelink=None):
... | 41.045894 | 159 | 0.63432 |
33a784defb706d329421c45befcf255d02404a71 | 3,055 | py | Python | musicdiff/__main__.py | gregchapman-dev/musicdiff | 077ea707d1efb1b378120e1411dd9299d7688933 | [
"MIT"
] | 7 | 2022-02-11T09:54:48.000Z | 2022-03-12T03:40:07.000Z | musicdiff/__main__.py | gregchapman-dev/musicdiff | 077ea707d1efb1b378120e1411dd9299d7688933 | [
"MIT"
] | 4 | 2022-01-26T11:10:19.000Z | 2022-03-29T22:27:34.000Z | musicdiff/__main__.py | gregchapman-dev/musicdiff | 077ea707d1efb1b378120e1411dd9299d7688933 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Purpose: __main__.py is a music file comparison tool built on musicdiff.
# musicdiff is a package for comparing music scores using music21.
# Usage:
# python3 -m musicdiff filePath1 f... | 45.597015 | 101 | 0.602291 |
ac44c73b71d6cc49028bc111026bb45c2cc6f9ce | 4,330 | py | Python | pkg/msgapi/http/push.py | ToraNova/rapidflask | f42354b296659dac5be904d7bb68076b9458f79a | [
"MIT"
] | null | null | null | pkg/msgapi/http/push.py | ToraNova/rapidflask | f42354b296659dac5be904d7bb68076b9458f79a | [
"MIT"
] | null | null | null | pkg/msgapi/http/push.py | ToraNova/rapidflask | f42354b296659dac5be904d7bb68076b9458f79a | [
"MIT"
] | null | null | null | #--------------------------------------------------
# push.py
# this file is for API routings, particularly pushing data
# introduced 8/12/2018
#--------------------------------------------------
#flask routing imports
from flask import render_template, redirect, url_for
from flask import request, abort
from flask imp... | 37.652174 | 114 | 0.651963 |
1e1f818631cb270432ebb03c0d19601ebde52c25 | 357 | py | Python | Codewars/8kyu/define-a-card-suit/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/8kyu/define-a-card-suit/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/8kyu/define-a-card-suit/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.6.0
test.describe('Basic Tests')
test.it("Expected 'clubs'")
test.assert_equals(define_suit('3C'), 'clubs')
test.it("Expected 'spades'")
test.assert_equals(define_suit('QS'), 'spades')
test.it("Expected 'diamonds'")
test.assert_equals(define_suit('9D'), 'diamonds')
test.it("Expected 'hearts'")
test.assert... | 29.75 | 49 | 0.719888 |
b0f0402666721c8c8ac4d602fd0b0cdf58ab51b9 | 2,851 | py | Python | scripts/update_feconf.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | 1 | 2019-01-31T18:48:50.000Z | 2019-01-31T18:48:50.000Z | scripts/update_feconf.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | 1 | 2020-01-26T14:02:43.000Z | 2020-01-26T14:02:43.000Z | scripts/update_feconf.py | netajik/oppia | d3780352d615db7438e010c5aa5eb60588bb7de6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Oppia 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 applicable ... | 35.197531 | 79 | 0.704665 |
24ad1dfc00fabaffd66650a5b86650f99988b95b | 2,380 | py | Python | tests/actions_tests.py | seleznevae/fort | 4e80174c64c54cb8366ba4ada042a352964d0e75 | [
"MIT"
] | 1 | 2021-08-31T16:54:01.000Z | 2021-08-31T16:54:01.000Z | tests/actions_tests.py | seleznevae/fort | 4e80174c64c54cb8366ba4ada042a352964d0e75 | [
"MIT"
] | null | null | null | tests/actions_tests.py | seleznevae/fort | 4e80174c64c54cb8366ba4ada042a352964d0e75 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
action_test_suite = {
"name": "Action tests",
"scenarios": [
{
"name": "Action for one line",
"args": ["-b", "basic", "--action=1fg-red"],
"input": '''\
0,1
2,3
4,5
''' ,
"output": u'''\
+---+---+
| 0 | 1 |
| \x1b[31m2\x1b[0m | \x1b[31m3\x1b[0m |
| 4 | 5 |
+---+---+
'''
}... | 14.691358 | 54 | 0.459244 |
7ae71d43a3fa10b4c6ac452577f542f58f285c75 | 2,791 | py | Python | dashboard/src/unit_tests.py | jpopelka/fabric8-analytics-common | 8b020075c74415c66c16a5fa2a981c7c537f2b78 | [
"Apache-2.0"
] | null | null | null | dashboard/src/unit_tests.py | jpopelka/fabric8-analytics-common | 8b020075c74415c66c16a5fa2a981c7c537f2b78 | [
"Apache-2.0"
] | null | null | null | dashboard/src/unit_tests.py | jpopelka/fabric8-analytics-common | 8b020075c74415c66c16a5fa2a981c7c537f2b78 | [
"Apache-2.0"
] | null | null | null | """Test coverage parsing and computing."""
import re
import requests
from progress_bar import *
CODE_COVERAGE_THRESHOLD = 50
def unit_test_coverage_ok(unit_test_coverage):
"""Return True only if unit test coverage is above given threshold."""
if unit_test_coverage is not None:
return int(unit_test_... | 36.246753 | 96 | 0.615192 |
e51ea0d7633d2effbda910299ce46569be2786dc | 223 | py | Python | Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/datasets/mnist/__init__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 3 | 2019-04-01T11:03:04.000Z | 2019-12-31T02:17:15.000Z | Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/datasets/mnist/__init__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2021-04-15T18:46:45.000Z | 2021-04-15T18:46:45.000Z | Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/datasets/mnist/__init__.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2021-09-23T13:43:07.000Z | 2021-09-23T13:43:07.000Z | """Imports for Python API.
This file is MACHINE GENERATED! Do not edit.
Generated by: tensorflow/tools/api/generator/create_python_api.py script.
"""
from tensorflow.python.keras._impl.keras.datasets.mnist import load_data | 37.166667 | 73 | 0.807175 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.