max_stars_repo_path
stringlengths
3
269
max_stars_repo_name
stringlengths
4
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.05M
score
float64
0.23
5.13
int_score
int64
0
5
annogesiclib/stat_operon.py
Sung-Huan/ANNOgesic
26
55500
import csv import itertools def _boolean(data): if data == "False": result = False else: result = True return result def row_to_location(row): if row[4] == "0": sub = False nosub = True else: sub = True nosub = False tss = _boolean(row[6]) ...
3.1875
3
openclean/function/value/filter.py
remram44/openclean-core
4
55501
<gh_stars>1-10 # This file is part of the Data Cleaning Library (openclean). # # Copyright (C) 2018-2021 New York University. # # openclean is released under the Revised BSD License. See file LICENSE for # full license details. """Functions that filter values in a given list.""" from openclean.function.value.base imp...
3.609375
4
ansible/library/imgadm.py
n1ete/esdc-factory
12
55502
<reponame>n1ete/esdc-factory<filename>ansible/library/imgadm.py #!/usr/bin/python # -*- coding: utf-8 -*- # # © 2014, <NAME> <<EMAIL>> # Ansible boilerplate from ansible.module_utils.basic import BOOLEANS, BOOLEANS_TRUE, AnsibleModule DOCUMENTATION = ''' --- module: imgadm author: <NAME> version_added: 1.8.2 short_des...
1.851563
2
igittigitt/__init__conf__.py
hellcats/igittigitt
0
55503
<filename>igittigitt/__init__conf__.py name = "igittigitt" title = "A spec-compliant gitignore parser for Python" version = "v2.0.4" url = "https://github.com/bitranox/igittigitt" author = "<NAME>" author_email = "<EMAIL>" shell_command = "igittigitt" def print_info() -> None: print( """\ Info for igitti...
1.609375
2
EM/GMM.py
shuyansy/Pattern-Recognition-Algorithm-
3
55504
import numpy as np import math def GMM(alpha, x, u, conv,dim): covdet = np.linalg.det(conv + np.eye(dim) * 0.001) covinv = np.linalg.inv(conv + np.eye(dim) * 0.001) T1 = 1 / ( (2 * math.pi)**(dim/2) * np.sqrt(covdet)) T2 = np.exp((-0.5) * ((np.transpose(x - u)).dot(covinv).dot(x - u))) prob = T1 *...
2.3125
2
code/train/hr-attr/src/hr_attr/pipelines/data_processing/nodes.py
vishwajeettewari/ml-kedro-new
0
55505
# Copyright 2021 QuantumBlack Visual Analytics 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 # # THE SOFTWARE IS PROVIDED "AS IS", WIT...
1.679688
2
bot/utils/helpers/utils.py
TinderBrazil/sticker-thief
0
55506
import logging import logging.config import json import re import emoji logger = logging.getLogger(__name__) API_EXCEPTIONS = { 10: 'sticker set name is already occupied', 11: 'STICKERSET_INVALID', # eg. trying to remove a sticker from a set the bot doesn't own 12: 'STICKERSET_NOT_MODIFIED', 13: 'st...
2.578125
3
grAdapt/space/transformer/__init__.py
mkduong-ai/grAdapt
25
55507
from .Transformer import Transformer
1.078125
1
ch06/ch0604_conv1D.py
zhuyuanxiang/deep-learning-with-python-notebooks
6
55508
# -*- encoding: utf-8 -*- """ @Author : zYx.Tom @Contact : <EMAIL> @site : https://zhuyuanxiang.github.io --------------------------- @Software : PyCharm @Project : deep-learning-with-python-notebooks @File : ch0604_conv1D.py @Version : v0.1 @Time : 2019-11-26 11:08 ...
2.265625
2
receive.py
verystrongjoe/c-and-python-serialization-test
0
55509
<filename>receive.py """ needs to install protobuf ( pip install protobuf ) """ import socket from foo_pb2 import Foo sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind(("127.0.0.1", 5555)) foo = Foo() while True: data, addr = sock.recvfrom(1024) foo.ParseFromString(data) print("Got foo w...
2.4375
2
optimization/main_algo.py
DartML/PPO-Stein-Control-Variate
34
55510
#! /usr/bin/env python3 """ Stein PPO: Sample-efficient Policy Optimization with Stein Control Variate Motivated by the Stein’s identity, Stein PPO extends the previous control variate methods used in REINFORCE and advantage actor-critic by introducing more general action-dependent baseline functions. Details see th...
2.578125
3
python/split.py
nikbaya/split
0
55511
<reponame>nikbaya/split<filename>python/split.py #!/usr/bin/env python2 ### # load packages print "Loading packages..." ### import datetime import numpy as np import random from hail import * hc = HailContext() phen = '20160' desc = 'smoking' #one word description of the phenotype print('Time: {:%H:%M:%S (%Y-%b-%d)...
2.515625
3
examples/progression_3d.py
SZanko/radontea
10
55512
<gh_stars>1-10 """Progress monitoring with progression The progress of the reconstruction algorithms in radontea can be tracked with other packages such as `progression <https://cimatosa.github.io/progression/>`_. """ from multiprocessing import cpu_count import numpy as np import progression as pr import radontea a...
2.421875
2
ClasicQLearning/start.py
altek42/inz
0
55513
import sys sys.path.append('..') from FrozenLake.Game import Config, FrozenLake from random import randint import pprint class qAlgorithm(object): EPOCH = 1000 def __init__(self): conf = Config() conf.setSize(10,10) conf.setEnd(9,9) conf.addHole(randint(0,9),randint(0,9)) conf.addHole(randint(0,9),randint...
2.640625
3
src/tools/linear_regression/__init__.py
pdoms/project_i
0
55514
<reponame>pdoms/project_i from .linear_regression import *
1.125
1
python3/tests/test_singly_link_list.py
BISOON/data-structure
0
55515
<reponame>BISOON/data-structure<gh_stars>0 import unittest from singly_link_list import SinglyLinkList class TestSinglyLinkList(unittest.TestCase): def test_size_is_0_on_creation(self): self.assertEqual(0, SinglyLinkList().size) def test_head_should_be_none_on_creation(self): self.assertIsN...
3.03125
3
openscraper/scraper/downloaders.py
thibault/OpenScraper
79
55516
<gh_stars>10-100 from scrapy.core.downloader.handlers.http import HttpDownloadHandler class HttpsDownloaderIgnoreCNError (HttpDownloadHandler) : def __init__(self, *args, **kwargs): super(HttpsDownloaderIgnoreCNError, self).__init__(*args, **kwargs)
2.03125
2
src/opts/base_opts.py
ParikhKadam/part-affinity
110
55517
import argparse import os class Opts: def __init__(self): self.parser = argparse.ArgumentParser() def init(self): self.parser.add_argument('-expID', default='default', help='Experiment ID') self.parser.add_argument('-data', default='default', help='Input data folder') self.pars...
2.75
3
generate-metadata.py
totallyReal123/bingo
0
55518
<filename>generate-metadata.py import random import os NUM_TERMS_ON_BOARD = 24 def main(): """ The main function is responsible for creating a metadata.yaml for use in the pandoc templating feature/ """ # read terms from file with open('terms', 'r') as file: terms = file.read() #...
4
4
plugins/red_canary/komand_red_canary/actions/list_all_activity_monitor_matches/action.py
lukaszlaszuk/insightconnect-plugins
46
55519
import komand from .schema import ListAllActivityMonitorMatchesInput, ListAllActivityMonitorMatchesOutput # Custom imports below class ListAllActivityMonitorMatches(komand.Action): def __init__(self): super(self.__class__, self).__init__( name="list_all_activity_monitor_matches", ...
2.171875
2
cirq/quantum_fourier_transform.py
milind-u/quantum-computing
1
55520
<gh_stars>1-10 #!/usr/bin/env python3 import math import cirq _NUM_QUBITS = 4 def _initial_state(): yield cirq.X(cirq.LineQubit(_NUM_QUBITS - 1)) def _swap(qubits): """ Swap qubits to reverse and correct QFT order """ for i in range(len(qubits) // 2): yield cirq.SWAP(qubits[i], qubits[len(qu...
3.140625
3
docfish/apps/pubmed/actions.py
vsoch/wordfish
0
55521
<reponame>vsoch/wordfish ''' Copyright (c) 2017 <NAME> 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, merge, pu...
1.609375
2
blockchain/all_challenges/2018/wctf/BelluminarBank/mimicdb/sqli_exp.py
yuxingzh/CTF
0
55522
<gh_stars>0 import requests target = '192.168.23.130:5000' payload = '''" or 1=1# $$ or 1=1 -- ' or ascii(substring((%s),%s,1))>%s -- a''' query = "select host_name()" query = "select routine_definition from master.information_schema.routines where routine_name='sp_logEvent'" s = requests.Session() res = '' for i ...
2.46875
2
cooking/routers/participant.py
DataScientest/cooking
0
55523
from flask import Blueprint from flask import flash from flask import redirect from flask import render_template from flask import request from flask import url_for from werkzeug.exceptions import abort from cooking.routers.auth import login_required from cooking.db import get_db bp = Blueprint("participant", __name_...
2.46875
2
dataset/data.py
Andong-Li-speech/MDNet
2
55524
<filename>dataset/data.py import json import os import numpy as np from random import shuffle from torch.utils.data import Dataset, DataLoader import random import soundfile as sf import librosa as lib from utils.utils import BatchInfo, pad_to_longest, logger_print, ToTensor class InstanceDataset(Dataset): ...
2.375
2
composer/models/timm/model.py
anisehsani/composer
0
55525
<reponame>anisehsani/composer # Copyright 2021 MosaicML. All Rights Reserved. import textwrap from typing import Optional from composer.models.base import ComposerClassifier class Timm(ComposerClassifier): """A wrapper around :func:`timm.create_model` used to create a :class:`ComposerClassifier` from a timm mode...
2.234375
2
flatdata-generator/tests/generators/py_expectations/archives/empty.py
gferon/flatdata
140
55526
class n_A(flatdata.archive.Archive): _SCHEMA = """namespace n { archive A { } } """ _NAME = "A" _RESOURCES = { "A.archive" : flatdata.archive.ResourceSignature( container=flatdata.resources.RawData, initializer=None, schema=_SCHEMA, is_optional=False,...
2.09375
2
answer/a8_kurikaesi_for.py
breeze-shared-inc/python_training_01
0
55527
<reponame>breeze-shared-inc/python_training_01<gh_stars>0 for i in range(11): print(i) for i in "pythonの世界へようこそ": print(i)
2.046875
2
practice0/for_loops_examples.py
DeercoderPractice/python
0
55528
<reponame>DeercoderPractice/python #! /usr/bin/python # Samples Python/PYgames # Print 'Hi' 10 times for i in range(10): print("Hi") for i in range(5): print("Hello") print ("There") for i in range(5): print("Hello") print("There") for i in range(10): print(i) for i in range(1, 11): print(i...
3.75
4
gameobjects-0.0.3/setup.py
lfkdsk/StageFight
5
55529
"""Classes for help wth game creation""" classifiers = """\ Development Status :: 2 - Pre-Alpha Intended Audience :: Developers Programming Language :: Python License :: Public Domain Operating System :: OS Independent Topic :: Games/Entertainment """ from distutils.core import setup from gameobjects.__init__ import ...
1.554688
2
senlin-7.0.0/senlin/tests/unit/test_common_messaging.py
scottwedge/OpenStack-Stein
0
55530
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
1.859375
2
scripts/src/remove_feature_branch.py
dmoiseenko/kon-config
0
55531
#!/usr/bin/python3 import os from shutil import rmtree from os.path import join from common.bash import execute_bash_script feature_branch_name = os.environ["FEATURE_BRANCH"] feature_branch_folder = join("./cluster/development/kon", feature_branch_name) rmtree(feature_branch_folder) execute_bash_script( [ ...
1.75
2
ceph/datadog_checks/ceph/__init__.py
dvanderveer/integrations-core
2
55532
from . import ceph Ceph = ceph.Ceph __version__ = "1.3.0" __all__ = ['ceph']
1.046875
1
migrations/versions/2212ec124f21_.py
WhoTargetsMe/WhoTargetsMe-FBAdLibrary
1
55533
"""Create materialized view for unique adverts Revision ID: <KEY> Revises: ec6065fc7ea3 Create Date: 2020-10-01 11:47:32.801222 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "<KEY>" down_revision = "ec6065fc7ea3" branch_labels = None depends_on = None def u...
1.773438
2
crf.py
ottokart/sequence-labeler
10
55534
import theano import numpy # CRF implementation based on Lample et al. # "Neural Architectures for Named Entity Recognition" floatX=theano.config.floatX def log_sum(x, axis=None): x_max_value = x.max(axis=axis) x_max_tensor = x.max(axis=axis, keepdims=True) return x_max_value + theano.tensor.log(theano.t...
2.4375
2
app.py
ron2618/ruangkomik
3
55535
from flask import Flask from lib.router import Router app = Flask(__name__) Router.run(app)
1.609375
2
django_oidc_user/apps.py
montudor/django-cross-project-tools
7
55536
<reponame>montudor/django-cross-project-tools from django.apps import AppConfig class DjangoOIDCUserConfig(AppConfig): name = 'django_oidc_user' verbose_name = 'User Accounts'
1.453125
1
models/customTimeModel.py
M-garrigan/Python-Microservice
1
55537
from psycopg2 import sql ''' @name -> retrieveOldCustomTime @param (dbConnection) -> db connection object @param (cursor) -> db cursor object @return -> a python list of 5 integers that means [year, month, day, hour, minute] @about -> This model will retrieve the last row from the same table with every call. ...
3.296875
3
ownblock/ownblock/apps/storage/models.py
danjac/ownblock
3
55538
<filename>ownblock/ownblock/apps/storage/models.py import uuid import os import mimetypes from django.conf import settings from django.db import models from sorl.thumbnail import get_thumbnail, delete from ..buildings.models import Building class Place(models.Model): name = models.CharField(max_length=60) ...
2.171875
2
djangocms_comments/urls.py
gruy/djangocms-comments
0
55539
from django.conf.urls import * from djangocms_comments.views import SaveComment urlpatterns = [ url(r'^ajax/save_comment$', SaveComment.as_view(), name='djangocms_comments_save_comment'), ]
1.445313
1
torchlib/dataset/time_series/ausgrid.py
vermouth1992/torchlib
3
55540
""" Functions to load and process Ausgrid dataset. The dataset contains 300 users with their location, PV production and electrical consumption. The timeline for this dataset is 3 years separated in 3 files. """ import os import pickle import numpy as np import pandas as pd from pandas.tseries.offsets import Day from...
2.75
3
ddpg.py
danthe42/drlnd_p3
0
55541
<reponame>danthe42/drlnd_p3 # individual network settings for each actor + critic pair # see networkforall for details from model import Network from utilities import hard_update from torch.optim import Adam import torch import numpy as np # add OU noise for exploration from OUNoise import OUNoise class DDPGAgent: ...
2.3125
2
29-poisonous-mushrooms/poisonous_mushrooms.py
tomwhite/datavision-code
1
55542
<filename>29-poisonous-mushrooms/poisonous_mushrooms.py import matplotlib.patches as mpatches import matplotlib.pyplot as plt import numpy as np import pandas as pd import umap if __name__ == "__main__": # Load original data df = pd.read_csv("data/agaricus-lepiota.data", header=None) def ep_to_colour(ep)...
2.890625
3
server/net/broker.py
blackadar/shepherd
2
55543
""" Manages the network negotiation portion of a client connection. Node connects here first to get the node and Pool ID, then is redirected to the PUB/SUB ZMQ interface. """ import zmq import sqlalchemy as sa from sqlalchemy.orm import Session import server.constants as const import threading import pickle from proto....
2.703125
3
CLASS 3/1074: Z/solution.py
coco-in-bluemoon/baekjoon-online-judge
0
55544
<reponame>coco-in-bluemoon/baekjoon-online-judge def draw_z(size, position, target): if size == 1: return (position == target, 1) base_r, base_c = position half_size = size // 2 counter = 0 matched = False if (target[0] >= (base_r + size)) or (target[1] >= (base_c + size)): cou...
3.03125
3
dummy.py
sschneem/PyES
0
55545
<filename>dummy.py import numpy as np from PyES import ES from tensorflow.keras.datasets import mnist def relu(x): return np.maximum(x, 0) def softmax(x): r = np.exp(x - np.max(x)) return r / r.sum() def predict(dna, x, args): pos = 0 posb = len(dna) for i in range(0, len(args) - 1): ...
2.953125
3
util.py
alspitz/esc_test
1
55546
<filename>util.py import numpy as np def filter_nan(ts, vs): good_vs = np.logical_not(np.isnan(vs)) return ts[good_vs], vs[good_vs] def first_that(f, arr): for i, v in enumerate(arr): if f(v): return i return None def first_nonzero(arr): return first_that(lambda x: x, arr) def first_greater_than...
2.984375
3
src/preprocessing.py
MilaNLProc/wordify-webapp-streamlit
0
55547
import multiprocessing as mp import os import re import string from collections import OrderedDict from typing import Callable, List, Optional, Union import spacy import vaex from pandas.core.frame import DataFrame from pandas.core.series import Series from textacy.preprocessing import make_pipeline, normalize, remove...
2.421875
2
testbed_frontend/api/emulation/task_manager.py
Ncu-software-research-center/IIOT-testbed
1
55548
''' Vortex OpenSplice This software and documentation are Copyright 2006 to TO_YEAR ADLINK Technology Limited, its affiliated companies and licensors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Lice...
2.09375
2
api/totp.py
XianwuLin/totp_pw
1
55549
#!/usr/bin/python # -*- coding: utf-8 -*- import pyotp import datetime class Totp(object): def __init__(self, seed=None): if seed is not None: self.seed = seed self.totp = pyotp.TOTP(seed) else: self.seed = None self.totp = None def create_see...
2.609375
3
recognition/utils.py
cjswo4034/face-mosaic_on_real-time_streaming
0
55550
<reponame>cjswo4034/face-mosaic_on_real-time_streaming<gh_stars>0 import cv2 import time def probablities(target, previos): # 현재 박스 좌표와 이전 박스의 일치 정도 if target[0] > previos[2] or target[2] < previos[0]\ or target[1] > previos[3] or target[3] < previos[1]: # 두 개의 박스가 겹치지 않는다 return False ...
2.09375
2
Blinkenlights/clients/blinken.py
mbalasz/Blinkenlights
3
55551
<reponame>mbalasz/Blinkenlights # Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
2.75
3
config.py
classner/pytorch-template
0
55552
#!/usr/bin/env python """Configuration values.""" from os import path import click EXP_DATA_FP = path.abspath(path.join(path.dirname(__file__), "data")) @click.command() @click.argument("key", type=click.STRING) def cli(key): """Print a configuration value.""" if key in globals().keys(): print(globa...
2.5625
3
bcbio/log/logbook_zmqpush.py
matanhofree/bcbio-nextgen
1
55553
<filename>bcbio/log/logbook_zmqpush.py """Enable multiple processes to send logs to a central server through ZeroMQ. Thanks to <NAME>: https://github.com/zacharyvoase/logbook-zmqpush Slightly modified to support Logbook 0.4.1. """ import errno import json import socket import zmq import logbook.queues from logbook.ba...
2.453125
2
bolt/utils/__init__.py
arahmanhamdy/bolt
15
55554
<filename>bolt/utils/__init__.py """ """ from ._utfiles import * from ._utconfig import * from ._uttime import *
1.265625
1
PathTracking/model_predictive_speed_and_steer_control/courses.py
vasi1796/PythonRobotics
0
55555
<filename>PathTracking/model_predictive_speed_and_steer_control/courses.py import cubic_spline_planner import math def get_straight_course(dl): ax = [0.0, 5.0, 10.0, 20.0, 30.0, 40.0, 50.0] ay = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] cx, cy, cyaw, ck, s = cubic_spline_planner.calc_spline_course( ax, ...
2.578125
3
python/paddle/v2/framework/tests/test_multiplex_op.py
shenchaohua/Paddle
3
55556
<reponame>shenchaohua/Paddle import unittest import numpy as np from op_test import OpTest class TestMultiplexOp(OpTest): def setUp(self): self.op_type = "multiplex" rows = 4 index = np.arange(0, rows).astype('int32') np.random.shuffle(index) index = np.reshape(index, (rows...
2.328125
2
app_python/common/db.py
koktut/wbmonitor
3
55557
<filename>app_python/common/db.py from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker import common.env as env class Db: def __init__(self): self.engine = create_engine('postgresql+psycopg2://{user}:{password}@{host}:{port}/{database}'.format( user=env.POSTGRES_USER, ...
2.78125
3
tests/__init__.py
arago/python-hiro-stonebranch-actionhandler
0
55558
import logging from arago.hiro.actionhandler.plugin.stonebranch.action.stonebranch_exec_unix_command_action import \ StonebranchExecUnixCommandAction from arago.hiro.actionhandler.plugin.stonebranch.stonebranch_instance import StonebranchInstance from arago.hiro.actionhandler.plugin.stonebranch.stonebranch_rest_cl...
1.851563
2
dronekit_scripts/015_takeoff_util.py
slm-sum/droneschool
4
55559
<gh_stars>1-10 import time from dronekit import connect, TimeoutError vehicle = connect('127.0.0.1:14551', wait_ready=True, timeout=60) # vehicle = connect('tcp:127.0.0.1:5762', wait_ready=True, timeout=60) try: vehicle.wait_for_mode("GUIDED") vehicle.wait_for_armable() vehicle.arm() time.sleep(1) ...
2.5
2
oarepo_enrollments/cli.py
oarepo/oarepo-enrollments
0
55560
<gh_stars>0 import json from collections import defaultdict import click from click.utils import make_str from flask import current_app from flask.cli import with_appcontext from invenio_accounts.models import User from tabulate import tabulate from oarepo_enrollments import enroll, list_enrollments as api_list_enrol...
2.296875
2
github/methods/activity/events/list_public_events.py
appheap/PyGithub
1
55561
<reponame>appheap/PyGithub from github.scaffold import Scaffold from github.types import Response from github.utils import utils class ListPublicEvents(Scaffold): """ List public events """ def list_public_events( self, *, per_page: int = 100, page: int...
2.75
3
codes_auto/174.dungeon-game.py
smartmark-pro/leetcode_record
0
55562
<gh_stars>0 # # @lc app=leetcode.cn id=174 lang=python3 # # [174] dungeon-game # None # @lc code=end
1.203125
1
naverwebtoon/merge.py
miiiingi/algorithmstudy
0
55563
<reponame>miiiingi/algorithmstudy<gh_stars>0 import pandas as pd person = pd.read_csv('doit_pandas/data/survey_person.csv') site = pd.read_csv('doit_pandas/data/survey_site.csv') survey = pd.read_csv('doit_pandas/data/survey_survey.csv') visited = pd.read_csv('doit_pandas/data/survey_visited.csv') visited_subset = visi...
2.953125
3
chesspdftofen/__init__.py
jamarshon/chesspdftofen
5
55564
<gh_stars>1-10 import numpy as np import cv2 import io import matplotlib.pyplot as plt import os from pdf2image import convert_from_path from PIL import Image from PyPDF2 import PdfFileWriter, PdfFileReader import re import tempfile # import tkinter as tk # from tkinter import Frame, Text, Label import torch import tor...
2.515625
3
oldStuff/local_oauth.py
Panda88CO/udi-yolink
0
55565
<reponame>Panda88CO/udi-yolink<gh_stars>0 #!/bin/env python3 import logging logging.basicConfig(level=logging.DEBUG) #creds client_id = '60dd7fa7960d177187c82039' client_secret = '3f68536b695a435d8a1a376fc8254e70' redirect_uri="https://127.0.0.1/yolink" #oauth endpoints authorization_base_url = "https://api.yosmart.c...
2.5
2
buildbot/buildbot_pnacl_toolchain.py
MicrohexHQ/nacl_contracts
6
55566
<reponame>MicrohexHQ/nacl_contracts #!/usr/bin/python # Copyright (c) 2013 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import logging import os import platform import subprocess import sys sys.pat...
1.953125
2
html_test_report/runner.py
adelplanque/html-test-report
0
55567
# -*- coding: utf-8 -*- from six.moves import cStringIO as StringIO import codecs import collections import datetime import imghdr import json import logging import os import pkg_resources import pprint import re import six import socket import subprocess import sys import unittest import uuid from jinja2 import Temp...
1.960938
2
src/tools/intervaltable.py
rondnelson99/vcs-instrument
0
55568
<gh_stars>0 #!/usr/bin/python3 import sys # this program generates tables representing musical intervals for the Atari 2600's unique sound hardware. # the chip takes a source frequency of around 30kHz, # divides that by a constant depending to the instrument (timbre) selected with AUDCx, # divides that by an arbitra...
3.734375
4
toughradius/manage/models.py
geosson/GSRadius
1
55569
<filename>toughradius/manage/models.py<gh_stars>1-10 #!/usr/bin/env python #coding:utf-8 import sqlalchemy import warnings warnings.simplefilter('ignore', sqlalchemy.exc.SAWarning) from sqlalchemy import * from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relation from sqlalchemy.orm im...
2.125
2
annotators/migrations/0001_squashed_0004_auto_20201125_1728.py
wisn/ccgtown
1
55570
# Generated by Django 3.1.3 on 2020-11-26 07:32 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import uuid class Migration(migrations.Migration): replaces = [('annotators', '0001_initial'), ('annotators', '0002_auto_20201110_0257'), ('annotators', '0003_au...
1.796875
2
storm_analysis/sa_library/static_background.py
bintulab/storm-analysis
0
55571
#!/usr/bin/env python """ Estimates the static background in a STORM movie. The estimate is performed by averaging this might not be the best choice for movies with a high density of real localizations. This may be a good choice if you have a largish fixed background and a relatively low density of real localizations...
3.03125
3
apps/users/migrations/0005_auto_20190219_1844.py
bopopescu/diandian_online
3
55572
# Generated by Django 2.1.7 on 2019-02-19 18:44 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20190218_1809'), ] operations = [ migrations.AlterField( model_name='userprofiles', name='head_po...
1.5625
2
tests/generateToyImages.py
sebastiengilbert73/PCA
0
55573
import argparse import ast import os import numpy as np import cv2 parser = argparse.ArgumentParser() parser.add_argument('OutputDirectory', help='The directory where the generated images will be saved') parser.add_argument('--numberOfImages', help='The number of generated images. Default: 100', type=int, default=100)...
3
3
blog.py
miyuchina/ipsum-lorem
2
55574
# Python packages import re, json class Blog: """ Read config file and store site-wide variables. """ def __init__(self, config_file="./config.json"): """ When initializing a Blog instance, populate it with settings in the config file. In case of KeyError (user not prov...
3.03125
3
leetcode/1701-remove-max-number-of-edges-to-keep-graph-fully-traversable.py
Magic07/online-judge-solutions
0
55575
<gh_stars>0 class Solution: def maxNumEdgesToRemove(self, n: int, edges: List[List[int]]) -> int: answer=0 aliceVisited=[0]*(n+1) bobVisited=[0]*(n+1) aliceSet={} aliceSetNum=1 bobSet={} bobSetNum=1 # Return False if this edge can be deleted...
3.078125
3
prognum.py
xyzpda/algorithm
0
55576
def fibonum(num): if num == 1: return 1 elif num == 2: return 1 else: return fibonum(num - 1) + fibonum(num - 2)
4.03125
4
Competitive Programming/System Design/Design Authentication Manager.py
shreejitverma/GeeksforGeeks
2
55577
<gh_stars>1-10 '''https://leetcode.com/problems/design-authentication-manager/ 1797. Design Authentication Manager Medium 120 23 Add to List Share There is an authentication system that works with authentication tokens. For each session, the user will receive a new authentication token that will expire timeToLive ...
3
3
src/__main__w.py
NikolayRag/codeg
0
55578
<gh_stars>0 ''' Codeg, gcode playground https://github.com/NikolayRag/codeg ''' from Ui import * from GGData import * from Dispatch import * from Args import * AppName = 'codeg' AppPrefs = { #Blockname: {property:[default, range, type, description],..} 'Application': { 'initFit': [0.85], 'scheme': ['dark', ['...
1.742188
2
accelerator/models/partner_application_interest.py
masschallenge/django-accelerator
6
55579
# MIT License # Copyright (c) 2017 MassChallenge, Inc. import swapper from accelerator_abstract.models import BasePartnerApplicationInterest class PartnerApplicationInterest(BasePartnerApplicationInterest): class Meta(BasePartnerApplicationInterest.Meta): swappable = swapper.swappable_setting( ...
2.171875
2
tests/unit/operations/test_spotops.py
senstb/aws-elastic-beanstalk-cli
110
55580
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
2.078125
2
Identificar o tipo da Matriz fornecida.py
IuryChagas25/algebralinearcompython
1
55581
<gh_stars>1-10 #Código criado por: <NAME> import numpy as np #importando bibliteca numpy para o objeto np #variaveis com inicialização em 0 para retirar lixo de memoria identidade = 0 simetrica = 0 antisimetrica = 0 nula = 0 #solicitando ao usuario os dados necessarios print("##### Este programa identifica a matriz di...
3.734375
4
core/run_crf.py
StevenChaoo/Unisound-NER
1
55582
# Author: StevenChaoo # -*- coding:UTF-8 -*- import json import logging import time import random import sys from sklearn_crfsuite import CRF from sklearn.metrics import classification_report from util import tools from tqdm import tqdm logging.basicConfig( format="%(asctime)s - %(levelname)s - %(name)s - %(me...
2.59375
3
core/process_mask.py
liruilong940607/A-NeRF
110
55583
<reponame>liruilong940607/A-NeRF import os from io import BytesIO import tarfile import tempfile from six.moves import urllib import time import numpy as np from PIL import Image import cv2, pdb, glob, argparse import tensorflow as tf # code borrowed from: https://github.com/senguptaumd/Background-Matting/blob/maste...
2.453125
2
setup.py
Tamlyn78/geo
0
55584
from setuptools import setup setup(name='geo', version='0.1', description='Useful geoprospection processing methods', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['geo'], zip_safe=False)
0.917969
1
tests/common/tracing/test_tracing_helpers.py
iciac/concrete-numpy
96
55585
<reponame>iciac/concrete-numpy """Test file for common tracing helpers""" from typing import Any, Dict, List import pytest from concrete.common.tracing.tracing_helpers import prepare_function_parameters @pytest.mark.parametrize( "function,function_parameters,ref_dict", [ pytest.param(lambda x: None...
2.25
2
src/tree.py
harsha-bhat/family-tree-simulator
1
55586
<filename>src/tree.py from collections import deque from .tree_node import TreeNode class Tree: """ Base family tree class """ def __init__(self, root_name, root_gender) -> None: self.root = TreeNode(root_name, root_gender) def find_node(self, name: str) -> "TreeNode": """ ...
3.8125
4
tests/fixtures/__init__.py
greg-reese/chaostoolkit-google-cloud-platform
5
55587
<filename>tests/fixtures/__init__.py # -*- coding: utf-8 -*- from fixtures import cloudbuild from fixtures import nodepool from fixtures import sql from fixtures import storage secrets = { "service_account_file": "tests/fixtures/fake_creds.json" } secrets_with_k8s = { "service_account_file": "tests/fixtures/f...
1.601563
2
Easy/intersection_of_two_linked_lists.py
BrynjarGeir/LeetCode
0
55588
<filename>Easy/intersection_of_two_linked_lists.py<gh_stars>0 from typing import ListNode, Optional # Definition for singly-linked list. # class ListNode: # def __init__(self, x): # self.val = x # self.next = None class Solution: def getIntersectionNode(self, headA: ListNode, headB: ListNode) -...
3.421875
3
rest_api_models.py
Bariumm/Stocks-Pattern-Analyzer
136
55589
<filename>rest_api_models.py from datetime import datetime from typing import List, Optional from pydantic import BaseModel class SuccessResponse(BaseModel): message: str = "Successful" class SearchWindowSizeResponse(BaseModel): sizes: List[int] class AvailableSymbolsResponse(BaseModel): symbols: Lis...
2.515625
3
scripts/preprocessing.py
Hrovatin/scib
1
55590
<gh_stars>1-10 #!/usr/bin/env python # coding: utf-8 import argparse import scipy import anndata parser = argparse.ArgumentParser(description='Normalisation with scran') parser.add_argument('-i', '--input_file', required=True) parser.add_argument('-o', '--output_file', required=True) args = parser.parse_args() impor...
2.671875
3
setup.py
fanandactuaility/mysite
0
55591
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = 'setup' __author__ = 'zhouzhuan' __mtime__ = '2017/6/29' """ import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__),'README.rst')) as readme: README = readme.read() #allow setup to be run from any path os....
1.34375
1
setup.py
topteulen/timely-beliefs
1
55592
from setuptools import setup setup( name="timely-beliefs", description="Data modelled as beliefs (at a certain time) about events (at a certain time).", author="<NAME>", author_email="<EMAIL>", keywords=[ "time series", "forecasting", "analytics", "visualization", ...
1.375
1
metrics/mahalanobis/mahalanobis.py
MitchellTesla/datasets
3,395
55593
# Copyright 2021 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
2.5
2
LAMARCK_ML/architectures/dataFlow.py
JonasDHomburg/LAMARCK
3
55594
from typing import Dict, Tuple, List from LAMARCK_ML.data_util import TypeShape from LAMARCK_ML.data_util import ProtoSerializable class DataFlow(ProtoSerializable): def __init__(self, *args, **kwargs): super(DataFlow, self).__init__(**kwargs) @property def outputs(self) -> Dict[str, TypeShape]: """ ...
2.953125
3
ml_skeleton_py/model/__init__.py
ChaoYan/drl4rec
92
55595
<reponame>ChaoYan/drl4rec """Model package.""" from .train import train from .predict import predict __all__ = ["train", "predict"]
1.28125
1
Parte1/Cap5/exercicios/fase_life.py
fabianoflorentino/python-CursoIntensivoDePython
0
55596
age = int(input('What your age?: ')) if age <= 2: print('Is a baby!') elif age <= 4: print('You are a children!') elif age <= 13: print('You are a kid!') elif age <= 20: print('You are a teenager!') elif age <= 65: print('You are a adult!') else: print('You are a old!')
4.28125
4
RIT33PYT/Codigo_1/DesignPattern/visitante.py
Sbastdia/Ejercicios-probables-examen
0
55597
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Patrón de diseño Visitante """ __author__ = "<NAME>" __copyright__ = "Copyright 2012" __credits__ = ["<NAME>", "InsPyration.org", "Ediciones ENI"] __license__ = "GPL" __version__ = "1.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Production" class ...
3.25
3
setup.py
mindscale/worin
0
55598
<reponame>mindscale/worin from setuptools import setup setup(name='worin', version='0.1.0', description='A Korean POS Tagger using Neural Network', author='<NAME>', author_email='<EMAIL>', url='https://github.com/mindscale/worin', packages=['worin'], package_data={ '...
1.289063
1
backend/moonstream/routes/users.py
peersky/moonstock
2
55599
<reponame>peersky/moonstock """ The Moonstream users HTTP API """ import logging from typing import Any, Dict import uuid from bugout.data import BugoutToken, BugoutUser from bugout.exceptions import BugoutResponseException from fastapi import ( FastAPI, Form, HTTPException, Request, ) from fastapi.mid...
2.125
2