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
Assignment 1/problem1/route.py
Chirag-Galani/B551-Elements-Of-Artificial-Intelligence
0
49000
#!/usr/bin/env python #Assignment 1 ; Question1 #Team: <NAME>, <NAME>, <NAME> #To find good driving directions between pair of cities given by the user using four algorithms. #We have included our observations in readme file of question1. import sys import Queue import pandas import numpy import math #Heurisitc func...
3.546875
4
lib/aquilon/worker/formats/service_map.py
ned21/aquilon
7
49001
<reponame>ned21/aquilon<gh_stars>1-10 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in...
2
2
utils/graph_utils.py
MarcoFavorito/knowledge-based-telegram-bot
0
49002
""" This module use the networkx package to deal with graphs. """ from networkx import Graph, shortest_path from networkx.algorithms.shortest_paths.unweighted import all_pairs_shortest_path from networkx.algorithms.shortest_paths.unweighted import single_source_shortest_path import constants as c def build_networkXG...
3.078125
3
scripts/gen_auth_keypair.py
PowerSaucisse/QuarKEY-api-server
5
49003
""" import peewee, datetime, argparse from database.database import db from database.models import SQLAuthToken from utils.security.auth import gen_account_keypair """ from utils.security.auth import gen_account_keypair from database.database import PGDatabase if __name__ == "__main__": """ parser = argparse....
2.875
3
models/experiment.py
mingxuts/multi-center-fed-learning
4
49004
import os import sys import numpy as np import time from utils_io import get_job_config from utils.model_utils import read_data from utils.args import parse_job_args from fedsem import Fedsem_Trainer from fedavg import Fedavg_Trainer from fedprox import Fedprox_Trainer from fedsgd import Fedsgd_Trainer from fedbaye...
2.21875
2
find_best_model.py
cvl-umass/bilinear-cnn
9
49005
import argparse import os import re def main(args): folder_path = os.path.join('..', 'exp', args.dataset) res = re.compile('Best val accuracy: ([.\d]+)') best_acc = 0 best_model = None for folder in os.listdir(folder_path): train_hist_file = os.path.join(folder_path, folder, 'train_history...
2.859375
3
setup.py
lrowe/pyramid_iap
0
49006
import os.path from setuptools import setup version = "0.1" install_requires = ["pyramid", "PyJWT", "cryptography", "requests", "zope.interface"] tests_require = ["pytest", "pytest-flake8", "requests-mock", "WebTest"] here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, "README.rst"))....
1.375
1
python/finess/__init__.py
dcseal/finess
0
49007
<reponame>dcseal/finess<filename>python/finess/__init__.py<gh_stars>0 """Python library written for FINESS. """
1.21875
1
mms-ent/migration/3.3.0/util.py
ronniscapaldi/mms-alfresco
12
49008
import urllib2 import json global base_url global auth_key global ticket def get_ticket(): url = base_url + "/alfresco/service/api/login" headers = {"Content-Type": "application/json"} data = auth_key try: response = make_post_request(url, data, headers) return json.load(response).get...
2.890625
3
icevision/models/torchvision_models/mask_rcnn/lightning/__init__.py
RibenaMapleSyrup/icevision
88
49009
<filename>icevision/models/torchvision_models/mask_rcnn/lightning/__init__.py from icevision.models.torchvision_models.mask_rcnn.lightning.model_adapter import *
1.1875
1
problem/01000~09999/05073/5073.py3.py
njw1204/BOJ-AC
1
49010
<reponame>njw1204/BOJ-AC while True: A,B,C=map(int,input().split()) if not A: exit() if A+B+C<=max(A,B,C)*2: print('Invalid') elif A==B==C: print('Equilateral') elif True in (A==B,A==C,B==C): print('Isosceles') else: print('Scalene')
3.21875
3
cjax/continuation/methods/predictor/natural_predictor.py
harsh306/continuation-jax
2
49011
from cjax.continuation.methods.predictor.base_predictor import Predictor from cjax.utils.math_trees import pytree_element_add class NaturalPredictor(Predictor): """Natural Predictor only updates continuation parameter""" def __init__(self, concat_states, delta_s): super().__init__(concat_states) ...
2.53125
3
tests/mail/test_mailgun.py
MoBagel/awesome-sso
8
49012
from pydantic import EmailStr from awesome_sso.mail.mailgun import MailGun def test_send_message(mailgun: MailGun): resp = mailgun.send_simple_message( from_name="test", from_email=EmailStr("<EMAIL>"), to=[EmailStr("<EMAIL>")], subject="test title", text="test content", ...
2.390625
2
events/contrib/plugins/form_handlers/db_store/views.py
mansonul/events
0
49013
<filename>events/contrib/plugins/form_handlers/db_store/views.py from django.contrib.auth.decorators import login_required from events.decorators import permissions_required, SATISFY_ALL, SATISFY_ANY from .....base import ( get_form_handler_plugin_widget, # get_form_wizard_handler_plugin_widget, ) from . imp...
1.6875
2
src/optimum/onnxruntime/convert_and_optimize.py
dkurt/optimum
1
49014
# Copyright 2021 The HuggingFace Team. 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 app...
1.882813
2
ibm_whcs_sdk/insights_for_medical_literature/tests/integration/test_search_metadata.py
paul-felt/whcs-python-sdk
5
49015
<gh_stars>1-10 # coding: utf-8 # Copyright 2018 IBM All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
2.0625
2
plot.py
jakeybob/brexit-maps
5
49016
<gh_stars>1-10 import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib as mpl import mapMisc as mapMisc # load data GBRpropertiesDF, NIpropertiesDF, GIBpropertiesDF, GBRdataDF, NIdataDF, GIBdataDF, GBRmp, NImp, GIBmp,\ GBRpolyCount, NIpolyCount, GIBpolyCount, bounds = mapMisc.loadData('d...
2.21875
2
tests/xlfunctions_vs_excel/test_logical.py
ckp95/xlcalculator
54
49017
from .. import testing class LogicalFunctionsTest(testing.FunctionalTestCase): filename = "logical.xlsx" def test_IF_false_case(self): self.assertEqual( self.evaluator.evaluate('Sheet1!C2'), self.evaluator.get_cell_value('Sheet1!C2') ) def test_IF_true_case(self)...
2.703125
3
survivalbox/__init__.py
JohannesTheo/SurvivalBox
0
49018
from .survivalbox import SurvivalBox
1.03125
1
ti_nbody/__init__.py
xuyanwen2012/ti_nbody
0
49019
from .n_body import * from .util import *
1.101563
1
contabilidad/users/models.py
R3SWebDevelopment/CreaLibreCanacintraMembership
0
49020
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.postgres.fields import JSONField from django.conf import settings class Profile(models.Model): mobile_number = JSONField(default={}) user = models.OneToOneField( settings.AUTH_USER_MODEL, on_del...
1.851563
2
api_lambda_function.py
yuyasugano/defi-test
3
49021
#!/usr/bin/python import json import boto3 import decimal from decimal import Decimal from boto3.dynamodb.conditions import Key, Attr TABLE = 'Tokens' dynamodb = boto3.resource('dynamodb', region_name='ap-northeast-1') table = dynamodb.Table(TABLE_NAME) # Helper class to convert a DynamoDB item to JSON class Decimal...
2.453125
2
PacMan/Main.py
akshitgoyal/PacMan
1
49022
import pygame from pygame.locals import * from constants import * from pacman import Pacman, LifeIcon from nodes import NodeGroup from ghosts import GhostGroup from pellets import Pellets_Group from sprites import Spritesheet from maze import Maze from welcome import Welcome class GameController: """ This the...
3.703125
4
reviewboard/oauth/apps.py
pombredanne/reviewboard
0
49023
<gh_stars>0 """The app definition for reviewboard.oauth.""" from django.apps import AppConfig class OAuthAppConfig(AppConfig): name = 'reviewboard.oauth'
1.25
1
videoio/video_uint16.py
vguzov/videoio
13
49024
<reponame>vguzov/videoio import os import numpy as np import ffmpeg from typing import Tuple from .info import read_video_params, H264_PRESETS def uint16read(path: str, output_resolution: Tuple[int, int] = None, start_frame: int = 0) -> np.ndarray: """ Read 16-bit unsigned integer array encoded with uint16sav...
2.90625
3
tests/broker/test_refresh_user.py
ned21/aquilon
7
49025
<reponame>ned21/aquilon #!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2014-2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
2.0625
2
App.py
kristianmk/python-multiplication-table
0
49026
# Written by <NAME> 2021-09-23 import itertools import random import time import phue as hue max_number_of_exercises = 100 enable_hue = True hue_bridge_ip = '10.0.0.169' hue_light_name = 'Stue ved skyvedør høyre' def input_integer_number(message): while True: try: return int(input(message)) ...
3.53125
4
Provinces and Gold/prov.py
rajitbanerjee/kattis
2
49027
<filename>Provinces and Gold/prov.py """https://open.kattis.com/problems/provincesandgold""" from collections import OrderedDict vic, tres = OrderedDict(), OrderedDict() vic = {"Province": 8, "Duchy": 5, "Estate": 2} tres = {"Gold": 6, "Silver": 3, "Copper": 0} inp = list(map(int, input().split())) money = inp[0] * 3...
3.609375
4
temp-down/application.py
scavicchio/easyWaltonTracker
2
49028
from flask import Flask, render_template, request, url_for, redirect application = app = Flask(__name__) @app.before_request def check_for_maintenance(): if request.path != url_for('maintenance'): return redirect(url_for('maintenance')) # Or alternatively, dont redirect # return 'Sorry, ...
2.390625
2
transforms.py
Shelly-Lee/ICCV-2021-Competition-Valence-Arousal-Challenge
58
49029
<reponame>Shelly-Lee/ICCV-2021-Competition-Valence-Arousal-Challenge import torchvision import random from PIL import Image, ImageOps import numpy as np import numbers import math import torch class GroupRandomCrop(object): def __init__(self, size, seed=None): if isinstance(size, numbers.Number): ...
2.71875
3
trello2toggl/__init__.py
dobarkod/trello2toggl
1
49030
<filename>trello2toggl/__init__.py from .toggl import Toggl from .trello import Trello from .sync import Sync
1.117188
1
services/twilio.py
sourceperl/docker.mqttwarn
0
49031
<reponame>sourceperl/docker.mqttwarn #!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = '<NAME> <<EMAIL>>' __copyright__ = 'Copyright 2014 <NAME>' __license__ = """Eclipse Public License - v 1.0 (http://www.eclipse.org/legal/epl-v10.html)""" HAVE_TWILIO=True try: from twilio.rest import TwilioRestCli...
2.046875
2
message-extractor.py
tsusanka/telegram-extractor
21
49032
#!/bin/python # Extracts messages.data into headers and the actual message import binascii import pprint import click def hexToStr(byte): return binascii.hexlify(byte).decode() def printByte(label, byte): print(label + ':\t' + hexToStr(byte)) @click.command() @click.argument('path') def extractMessage(pa...
2.671875
3
Projects/project05/dequeue-shrink.py
tonysulfaro/CSE-331
2
49033
<filename>Projects/project05/dequeue-shrink.py<gh_stars>1-10 from CircularQueue import CircularQueue def main(): test = CircularQueue(15) test.enqueue(3) test.enqueue(3) test.enqueue(3) test.enqueue(3) test.enqueue(3) test.enqueue(3) test.enqueue(3) test.enqueue(3) print(test)...
2.796875
3
mygit/commands/merge.py
7Bpencil/mygit
0
49034
<filename>mygit/commands/merge.py<gh_stars>0 import argparse from textwrap import dedent from mygit.state import State from mygit.constants import Constants from mygit.command import Command from mygit.backend import merge class Merge(Command): def __init__(self, subparsers: argparse._SubParsersAction, commands_d...
2.734375
3
polar.py
peterhinch/micropython-fourier
60
49035
# polar.py Fast floating point cartesian to polar coordinate conversion # Author: <NAME> # 31st Oct 2015 Updated to match latest firmware # 21st April 2015 # Now uses recently implemented FPU mnemonics # Arctan is based on the following approximation applicable to octant zero where q = x/y : # arctan(q) = q*pi/4- q*(q ...
2.703125
3
python/test/test_pose_format_converter.py
stellarpower/vio_common
16
49036
<filename>python/test/test_pose_format_converter.py<gh_stars>10-100 # -*- coding: utf-8 -*- # !/usr/bin/env python ''' This module tests methods from pose_format_converter To run tests, $python -m pytest ''' from __future__ import print_function import os import numpy as np import utility_functions import convert_p...
2.859375
3
intranet/settings.py
We-Are-One-CS/intranet
3
49037
<reponame>We-Are-One-CS/intranet """ Django settings for intranet project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2...
1.8125
2
big_o.py
IanDCarroll/BigO
1
49038
<reponame>IanDCarroll/BigO class BigO_of_1(object): def check_index_0_is_int(self, value_list): if value_list[0] == int(value_list[0]): return True class BigO_of_N(object): def double_values(self, value_list): for i in range(0, len(value_list)): value_list[i] *= 2 ...
3.265625
3
renamedb.py
mochisoft/OC_Offline
0
49039
import glob, os def rename(dir, pattern): for pathAndFilename in glob.iglob(os.path.join(dir, pattern)): print pathAndFilename title, ext = os.path.splitext(os.path.basename(pathAndFilename)) print title print ext os.rename(pathAndFilename,os.path.join(dir, 'study_name_to_be...
3.390625
3
python_oop/interface.py
tokusumi/python-oop
0
49040
<filename>python_oop/interface.py from abc import ABC, abstractmethod class Car(ABC): @abstractmethod def move(self) -> bool: pass @abstractmethod def stop(self) -> bool: pass class Tractor(Car): def move(self) -> bool: pass # do something def stop(self) -> bool: ...
3.921875
4
loadlib.py
mit-dci/litloadtest
0
49041
<reponame>mit-dci/litloadtest<gh_stars>0 import time import random import testlib def square_pos(size, x, y): return size * (y % size) + (x % size) # Makes a big grid of nodes, all connected to their neighbors. def make_grid_env(size): print('Making grid env of size', size) env = testlib.TestEnv(size ** ...
2.53125
3
model_metrics.py
gbrltv/process_meta_learning
2
49042
<gh_stars>1-10 import os import time import pandas as pd from tqdm import tqdm from pm4py.objects.log.importer.xes import importer as xes_importer from pm4py.algo.discovery.inductive import algorithm as inductive_miner from pm4py.algo.discovery.heuristics import algorithm as heuristics_miner from pm4py.algo.discovery.a...
1.992188
2
day06/mysql_tutorial.py
zhangyage/Python-jike
0
49043
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 演示数据的插入操作 学习常见的连接操作mysql的方法 1、官方客户端mysql-connector使用 2、第三方客户端MySQLdb 3、MySQLdb的二次封装torndb使用 ''' from __future__ import print_function sql = "insert into ipdata (startip,endip,loacl,country) values (16777123,16777324,'电信','青海省')" sql_tmp = "insert into ipdata (startip,e...
2.703125
3
interfaces/kr_python_interface/src/kr_python_interface/mav_example.py
fcladera/kr_mav_control
29
49044
#! /usr/bin/env python3 import rospy import numpy as np import random from geometry_msgs.msg import Twist, Pose from nav_msgs.msg import Odometry from std_srvs.srv import SetBool, Trigger from kr_tracker_msgs.msg import TrajectoryTrackerAction, TrajectoryTrackerGoal, CircleTrackerAction, CircleTrackerGoal from kr_pyt...
2.15625
2
test/integration/test_global_search_v2.py
nathan-hekman/platform-services-python-sdk
10
49045
<filename>test/integration/test_global_search_v2.py<gh_stars>1-10 # -*- coding: utf-8 -*- # (C) Copyright IBM Corp. 2020. # # 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.a...
2.109375
2
scripts/avg_bw_every_n_tasks.py
AndreyNevolin/PEF
1
49046
<filename>scripts/avg_bw_every_n_tasks.py<gh_stars>1-10 #!/usr/bin/env python ## # Copyright © 2019 <NAME>, https://github.com/AndreyNevolin # Twitter: @Andrey_Nevolin # LinkedIn: https://www.linkedin.com/in/andrey-nevolin-76387328 # # This script produces bandwidth report from PEF execution report # # The script assu...
3.1875
3
visualizer/sorting/algorithms/quick.py
mensch272/sortvis
3
49047
<filename>visualizer/sorting/algorithms/quick.py from .algorithm import Algorithm class QuickSort(Algorithm): def __init__(self, array, low, high): super(QuickSort, self).__init__(array) self.initial_low = low self.initial_high = high def sort(self): self.quicksort(self.initi...
3.890625
4
gui/profile/urls.py
klebed/esdc-ce
97
49048
<filename>gui/profile/urls.py<gh_stars>10-100 from django.conf.urls import patterns, url urlpatterns = patterns( 'gui.profile.views', # Profile pages, with url prefix: accounts/profile url(r'^$', 'index', name='profile'), url(r'^api_keys/$', 'apikeys', name='profile_apikeys'), url(r'^update/$', 'u...
1.882813
2
gz-file/src/atmfjstc/lib/gz_file/__init__.py
goc9000/python-library
0
49049
<gh_stars>0 """ This package provides an advanced interface for accessing multi-member GZip files (analogous to TarFile etc.) With respect to the built-in `gzip.GZipFile` class in Python, this interface offers: - Multi-member support (i.e. multiple ``.gz`` files concatenated in one, which is allowed by the standard) ...
2.890625
3
tests/bacnet/test_network.py
yozora-hitagi/bacprop
3
49050
from bacprop.bacnet.network import VirtualSensorNetwork from bacprop.bacnet import network from bacpypes.pdu import Address from bacpypes.comm import service_map from bacprop.bacnet.sensor import Sensor from pytest_mock import MockFixture import pytest # Required for full coverage network._debug = 1 class TestVirtu...
2.390625
2
python/challenges/queue_with_stacks/queue_with_stacks.py
ManarAbdelkarim/data-structures-and-algorithms
0
49051
class EmptyStackException(Exception): pass class Node: def __init__(self, value=None): self.value = value self.next = None class Stack: def __init__(self, node=None): self.top = node def push(self, value): if not self.top: self.top = Node(value) else: node = Node(value) ...
3.75
4
Python/Strings/string_validators.py
isbendiyarovanezrin/HackerRankSolutions
2
49052
<gh_stars>1-10 # Language: Python 3 if __name__ == '__main__': s = input() n = any(i.isalnum() for i in s) a = any(i.isalpha() for i in s) d = any(i.isdigit() for i in s) l = any(i.islower() for i in s) u = any(i.isupper() for i in s) print(n, a, d, l, u, sep="\n")
3.515625
4
examples/translation/make_context_dataset/make_context_nmt_dataset.py
yukunfeng/fairseq
0
49053
<filename>examples/translation/make_context_dataset/make_context_nmt_dataset.py import argparse import os import jieba def make_context_nmt_dataset(data_prefix, src, tgt, out_dir, both_context=False, ...
2.4375
2
src/brewlog/home/views.py
zgoda/brewlog
3
49054
<reponame>zgoda/brewlog<filename>src/brewlog/home/views.py from flask import current_app, render_template from flask_login import current_user from ..brew.utils import BrewUtils from ..brewery.utils import BreweryUtils from ..ext import pages from ..models import Brew, BrewerProfile, Brewery, TastingNote from ..tastin...
2
2
scripts/list_to_json.py
EnzoVargasM/advancing-hero
1
49055
<reponame>EnzoVargasM/advancing-hero import json my_list = [ [4, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1], [4, 2, 2, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1], [4, 2, 2, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1], [4, 1, 1, 2, 1, 1, 1, 1, 1, 5, 5, 1, 1, 3, 1, 1], [4, 1, 1, 2, 1, 1, 1, 1, 1, 5, 5, 1, 1...
2.5625
3
tests/test_vec_log.py
LechuzaAI/touchstone
0
49056
import numpy as np from touchstone.environments.make import make_vec_envs NUM_ENVS = 2 if __name__ == '__main__': env = make_vec_envs("Pendulum-v0", 42, NUM_ENVS) np.random.seed(42) state = env.reset() for i in range(1000): actions = env.action_space.sample() out = env.step([actions f...
2.484375
2
debug/deploy_zipped.py
micprog/SystemVerilog
29
49057
<gh_stars>10-100 import util from deploy_config import PACKAGE_CONTROL_SETTINGS_FILE, SUBLIME_SETTINGS_FILE, PACKAGE_NAME, SRC, DST_ZIPPED, IGNORE_DIRS import time print('[deploy] Deployment to Installed Packages ...') util.change_settings(PACKAGE_CONTROL_SETTINGS_FILE, "auto_upgrade_ignore"...
2.046875
2
Week-04/evorobotpy2/pybullet/showrobot/showrobot.py
mhd-medfa/BCR22
0
49058
<filename>Week-04/evorobotpy2/pybullet/showrobot/showrobot.py import pybullet as p import pybullet_data import time import sys robotfile = "" gravity = -9.8; if len(sys.argv) == 1: print("ROBOTSHOW.PY: shows a robot within the GUI") print("You can indicate the following robot names as parameters:") print(...
2.765625
3
Day-06/Fir.py
parastuffs/adventofcode-2020
0
49059
with open("input", 'r') as f: lines = f.readlines() # lines = [x.strip("\n") for x in lines] lines.append("\n") total = 0 answers = set() for line in lines: if line == "\n": total += len(answers) answers = set() else: for letter in line.strip("\n"): answers.add(letter) print("Total: {}".format(total))
3.515625
4
WebApp/tests/models/pointrend.py
Diversion2k22/Objectify
5
49060
<filename>WebApp/tests/models/pointrend.py def load_model(): print("Model Loaded")
1.351563
1
MultirefPredict/casbased_diagnostic.py
hjkgrp/MultirefPredict
14
49061
<reponame>hjkgrp/MultirefPredict """ casscf_based_diag.py Classes that calculate the casscf based multireference diagnostics """ from abc import abstractmethod import numpy as np import qcengine import qcelemental from MultirefPredict.diagnostic import Diagnostic from MultirefPredict.io_tools import qcres_to_json, wri...
2.25
2
scripts/deploy_esp/seo/error.py
smart-edge-open/open-developer-experience-kits
3
49062
# SPDX-License-Identifier: Apache-2.0 # Copyright (c) 2021-2022 Intel Corporation """ Error handling related utilities """ import enum TS_REF = "See the Troubleshooting section of the Intel® Smart Edge Open Provisioning Process document" class Codes(enum.Enum): """ Script exit codes """ NO_ERROR = 0 G...
2.046875
2
playdeliver/__init__.py
Larusso/play-deliver
3
49063
"""Package for playdeliver modules.""" from pkg_resources import get_distribution, DistributionNotFound import os.path try: _dist = get_distribution('playdeliver') # Normalize case for Windows systems dist_loc = os.path.normcase(_dist.location) here = os.path.normcase(__file__) if not here.startswi...
2.09375
2
test/test_v1alpha1_application_spec.py
RyanSiu1995/argocd-python-client
1
49064
""" Consolidate Services Description of all APIs # noqa: E501 The version of the OpenAPI document: version not set Generated by: https://openapi-generator.tech """ import sys import unittest import argocd_python_client from argocd_python_client.model.v1alpha1_application_destination import V1alpha...
1.851563
2
genBook.py
lvstross/audioBible
0
49065
#!bin/python3 import os import sys import time import random from datetime import datetime book = sys.argv[1] startChapter = sys.argv[2] endChapter = sys.argv[3] for it in range(int(startChapter), int(endChapter) + 1): # Get random wait time waitTime = random.randrange(2, 5) # Get current time now = d...
3.234375
3
Keywords/pass.py
GowthamPrasad/py_thon
0
49066
<reponame>GowthamPrasad/py_thon<gh_stars>0 #pass is just a placeholder which does nothing def func(): pass for i in [1,2,3,4,5]: pass
1.671875
2
incrowd/website/urls.py
incrowdio/incrowd
4
49067
from rest_framework import routers from website.api import UserViewSet, PostViewSet, CommentViewSet, \ CategoryViewSet, CrowdViewSet router = routers.SimpleRouter() router.register(r'users', UserViewSet) router.register(r'posts', PostViewSet) router.register(r'categories', CategoryViewSet) router.register(r'commen...
1.679688
2
frgpascal/hardware/liquidhandler.py
fenning-research-group/PASCAL
1
49068
import numpy as np import asyncio import time import ntplib import json import os import yaml import websockets import threading import uuid import logging MODULE_DIR = os.path.dirname(__file__) with open(os.path.join(MODULE_DIR, "hardwareconstants.yaml"), "r") as f: constants = yaml.load(f, Loader=yaml.FullLoader...
2.21875
2
data_utils.py
kamalkraj/dlrm-jax
1
49069
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # # Description: generate inputs and targets for the DLRM benchmark # # Utility function(s) to download and pre-process public data sets # - Cr...
2.515625
3
src/core/config.py
week-with-me/fastapi-graphql
0
49070
from functools import lru_cache from pydantic import BaseSettings, Field class Settings(BaseSettings): LEVEL: str PROJECT_TITLE: str = 'FastAPI with GraphQL and REST' GRAPHQL_API: str = '/graphql' REST_API: str = '/rest' COMMON_API: str = '/api' class Config: env_file = ".env" ...
2.40625
2
dataset/nl/feature_sets/family_names/__init__.py
prolody/piif
2
49071
""" family_names wordlists """ import os import csv import json from .. import word_list_counter from .. import parse_assoc from .. import dictionaries NAME = 'family_name' raw_nl_family_names_1_path = os.path.join( os.path.dirname(os.path.realpath(__file__)), 'raw', 'DutchNameGenerator', 'MarkovDu...
3.09375
3
.venv/lib/python3.8/site-packages/pathos/multiprocessing.py
eo1989/VectorBTanalysis
0
49072
#!/usr/bin/env python # # Author: <NAME> (mmckerns @caltech and @uqfoundation) # Copyright (c) 1997-2016 California Institute of Technology. # Copyright (c) 2016-2020 The Uncertainty Quantification Foundation. # License: 3-clause BSD. The full license text is available at: # - https://github.com/uqfoundation/pathos/b...
3.265625
3
src/spaceone/notification/manager/notification_manager.py
jihyungSong/plugin-megazone-sms-notification-protocol
1
49073
<filename>src/spaceone/notification/manager/notification_manager.py from spaceone.core.manager import BaseManager from spaceone.notification.manager.megazone_sms_manager import MegazoneSMSManager class NotificationManager(BaseManager): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs...
2.03125
2
tests/validation/test_single_field_subscriptions.py
closeio/graphql-core
590
49074
<gh_stars>100-1000 from functools import partial from graphql.utilities import build_schema from graphql.validation import SingleFieldSubscriptionsRule from .harness import assert_validation_errors schema = build_schema( """ type Message { body: String sender: String } type SubscriptionR...
2.265625
2
ooobuild/lo/sdb/result_column.py
Amourspirit/ooo_uno_tmpl
0
49075
<filename>ooobuild/lo/sdb/result_column.py # coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # 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/...
1.773438
2
second/zp/config.py
zhangpur/second.pytorch
0
49076
<filename>second/zp/config.py from second.zp.utils_zp import * ''' g_data_root='/home/zp/data/nuscene/nuscene' g_data_name='nuscene-trainval' g_version='v1.0-trainval' ''' g_data_root='/home/zp/data/nuscene/nuscene-mini' g_data_name='nuscene-mini' g_version='v1.0-mini' g_DataPrepare_config=g_data_root + '/DataPrepare....
2.140625
2
TAO/Firewall/BUZZDIRECTION/BUZZ_1120/LP/Scripts/Lp_UserInterface.py
dendisuhubdy/grokmachine
46
49077
<filename>TAO/Firewall/BUZZDIRECTION/BUZZ_1120/LP/Scripts/Lp_UserInterface.py import cmd import os import Lp_FrontEndFunctions import Lp_CursesDriver import Lp_XmlParser import Lp_RpcDispatcher import string import sys import socket import textwrap import time import subprocess import signal import platform import thre...
1.929688
2
mlsriracha/deploy.py
awcchungster/mlsriracha
0
49078
<filename>mlsriracha/deploy.py<gh_stars>0 from mlsriracha.plugins.azureml.deploy import AzureMlDeploy from mlsriracha.plugins.gcpvertex.deploy import GcpVertexDeploy from mlsriracha.plugins.awssagemaker.deploy import AwsSageMakerDeploy class DeployAdapter: def __init__(self, provider: str): self.provider_n...
2.046875
2
src/structures.py
adamtpowell/mdgrep
0
49079
<filename>src/structures.py<gh_stars>0 from typing import NamedTuple # Holds a line and its number in the original file (used for returnarea expansion) class FileLine(NamedTuple): line_number: int line_text: str class FoundSegment(NamedTuple): line_number: int line_position: int text: str ...
3
3
desktop/core/ext-py/chardet-3.0.4/setup.py
kokosing/hue
1,511
49080
<reponame>kokosing/hue<filename>desktop/core/ext-py/chardet-3.0.4/setup.py<gh_stars>1000+ #!/usr/bin/env python import re import sys from setuptools import find_packages, setup needs_pytest = set(['pytest', 'test', 'ptr']).intersection(sys.argv) pytest_runner = ['pytest-runner'] if needs_pytest else [] # Get versi...
1.726563
2
src/radical/pilot/agent/launch_method/archive/dplace.py
eirrgang/radical.pilot
1
49081
__copyright__ = "Copyright 2016, http://radical.rutgers.edu" __license__ = "MIT" import radical.utils as ru from .base import LaunchMethod # ------------------------------------------------------------------------------ # class DPlace(LaunchMethod): # -------------------------------------------------------...
2.03125
2
cliente_old.py
rafaelpleite/Algoritmos
0
49082
<gh_stars>0 # -*- coding: utf-8 -*- #------------------------------------------------------------------ # LEIA E PREENCHA O CABEÇALHO # NÃO ALTERE OS NOMES DAS FUNÇÕES # NÃO APAGUE OS DOCSTRINGS # NÃO INCLUA NENHUM OUTRO import ... #------------------------------------------------------------------ ''' Nome: <NA...
2.1875
2
Archive Formats/fmt_davidsonassoc_res.py
TheDeverEric/noesis-scripts
0
49083
<reponame>TheDeverEric/noesis-scripts #------------------------------------------------------------------------------- # Name: Davidson & Associates *.res # Purpose: Extract Archive # # Author: <NAME> # # Created: 01/09/2017 # Copyright: (c) <NAME> 2017 # Licence: <MIT License> #-----...
1.96875
2
psx/_dump_/28/_dump_ida_/overlay_3/set_funcs.py
maoa3/scalpel
15
49084
del_items(0x800A0E8C) SetType(0x800A0E8C, "void VID_OpenModule__Fv()") del_items(0x800A0F4C) SetType(0x800A0F4C, "void InitScreens__Fv()") del_items(0x800A103C) SetType(0x800A103C, "void MEM_SetupMem__Fv()") del_items(0x800A1068) SetType(0x800A1068, "void SetupWorkRam__Fv()") del_items(0x800A10F8) SetType(0x800A10F8, "...
1.21875
1
Code/train_model.py
ngbla/memoire_bigdata_face
0
49085
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jun 23 10:06:05 2021 @author: ngbla """ import os import cv2 import numpy as np # Command: pip install pillow from PIL import Image #Initialize names and path to empty list names = [] path = [] # Get the names of all the users for users in os.list...
3.125
3
model/ODE/ode45-list.py
neulbo-187/Cucker-Smale-Model
2
49086
#%% import numpy as np from scipy import integrate import matplotlib.pyplot as plt import matplotlib as mpl import random import time import copy from matplotlib import animation, rc from IPython.display import HTML def _update_plot (i,fig,scat,qax) : scat.set_offsets(P[i]) qax.set_offsets(P[i]) VVV=...
2.609375
3
src/Messages/ShutdownRequest.py
M4ddinPoe/PiNetRadio
0
49087
<reponame>M4ddinPoe/PiNetRadio from src.Messages.MessageData import MessageData class ShutdownRequest(MessageData): pass
1.132813
1
src/modules/__init__.py
Nobregaigor/FEBio-Python
0
49088
from .sys_functions import * from .enums import * from .classes import *
1.09375
1
tronn/stats/distances.py
kundajelab/tronn
5
49089
<gh_stars>1-10 # description: code for calculating various distances import numpy as np def generalized_jaccard_similarity(a, b): """Calculates a jaccard on real valued vectors note that for correct min/max, vectors should be normalized to be on same scale """ assert np.all(a >= 0) assert np...
3.390625
3
venv/Lib/site-packages/notebook/prometheus/__init__.py
ajayiagbebaku/NFL-Model
76
49090
""" A package containing all the functionality and configuration connected to the prometheus metrics """
0.691406
1
backend/takeout/admin/views.py
BillBillBillBill/laughing-garbanzo
15
49091
# coding: utf-8 from rest_framework.views import APIView from models.admin import Admin from lib.utils.response import JsonResponse, JsonErrorResponse from lib.utils.misc import get_update_dict_by_list from lib.utils.token_tools import get_token class AdminList(APIView): def get(self, request): # 获取管理员列表 ...
2.28125
2
beetsplug/autofix/task/audio_conversion.py
adamjakab/BeetsPluginAutofix
8
49092
<reponame>adamjakab/BeetsPluginAutofix # Copyright: Copyright (c) 2020., <NAME> # # Author: <NAME> <adam at jakab dot pro> # Created: 24/03/2020, 16.00 # License: See LICENSE.txt import os import subprocess import tempfile from beets import util from beetsplug import convert from beetsplug.convert import ConvertP...
1.890625
2
nerblackbox/modules/datasets/formatter/sucx_formatter.py
flxst/nerblackbox
0
49093
from typing import List, Dict, Optional, Tuple import pandas as pd from datasets import load_dataset from os.path import join from datasets import DatasetDict from nerblackbox.modules.datasets.formatter.base_formatter import ( BaseFormatter, SENTENCES_ROWS, ) SUCX_SUBSETS = [ "original_cased", "origin...
2.671875
3
src/web-scrapers/GetTable.py
CharlesFrankum/FF_Team_Selector
0
49094
import os import sys sys.path.insert(1, f'{os.path.dirname(os.getcwd())}\\models\\') import pandas as pd import requests from Mapper import df_ISO3_mapper def get_PL_table(url): x = requests.get(url) league_table = pd.read_html(x.content)[0] del league_table['Last 6'] return league_table d...
2.78125
3
mt_driver_train.py
pulkit10251/Machine-Translation
0
49095
from factoryModel.config import mt_config as confFile from factoryModel.preprocessing import SentenceSplit, cleanData, TrainMaker, Embedding from factoryModel.dataLoaders import textLoader from factoryModel.models import ModelBuilding from tensorflow.keras.callbacks import ModelCheckpoint from tensorflow.keras.models i...
2.28125
2
backend/app/templates/processor.py
joparram/openDataCleaner
0
49096
from ..api import _v1 from pathlib import Path from app.error import Error import pandas as pd from app.components._data import dataframeHandler import numpy as np from sklearn.impute import KNNImputer from sklearn import preprocessing # ** ALL CONTENT COMENTED BETWEEN ASTERISCS MUST BE EDITED ** # ** Set the plugin ...
2.375
2
python/merge_sort.py
shibli049/miscellaneous
1
49097
<gh_stars>1-10 def mergeSort(a, temp, leftStart, rightEnd): if(leftStart >= rightEnd): return middle = int((leftStart + rightEnd) / 2) mergeSort(a, temp, leftStart, middle) mergeSort(a, temp, middle + 1, rightEnd) merge(a, temp, leftStart, middle, rightEnd) return def merge(a, temp, le...
3.875
4
bin/dist.py
soloproyectos-ts/matrix2
0
49098
#!/usr/bin/env python """Creates or updates distribution files""" import subprocess print "Updates JavaScript and Type Definition files..." subprocess.call(['rm', 'dist', '-rf']) subprocess.call(['tsc', '--declaration'])
1.867188
2
capture.py
LEON6156SCOTT/Hand-Cricket
3
49099
<reponame>LEON6156SCOTT/Hand-Cricket import cv2 as cv import numpy as np import matplotlib.pyplot as plt import os class Capture: def Collect(num_samples): global one,two,three,four,five,none capture = cv.VideoCapture(0) capture.set(cv.CAP_PROP_FRAME_WIDTH, 1024) ...
2.8125
3