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
pset_challenging_ext/exercises/p18.py
mottaquikarim/pydev-psets
5
30400
<filename>pset_challenging_ext/exercises/p18.py """ A website requires the users to input username and password to register. Write a program to check the validity of password input by users. """ """Question 18 Level 3 Question: A website requires the users to input username and password to register. Write a program to...
3.859375
4
tool/taint_analysis/summary_functions.py
cpbscholten/karonte
294
30401
""" Though karonte relies on angr's sim procedures, sometimes these add in the current state some constraints to make the used analysis faster. For example, if a malloc has an unconstrained size, angr add the constraint size == angr-defined.MAX_SIZE. Though this makes the analysis faster, it makes impossible to reason ...
2.25
2
djangodash2013/settings.py
nnrcschmdt/djangodash2013
0
30402
import os PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('<NAME>', '<EMAIL>'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'data.sqlite' } } ALLOWED_HOSTS = ['*'] TIME_ZONE = '...
1.789063
2
Commongen_code/TED/transformers_local/examples/run_generation.py
nlgandnlu/TED-code
1
30403
<gh_stars>1-10 #!/usr/bin/env python3 # coding=utf-8 # Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this f...
1.789063
2
kenlm_training/tests/test_minify.py
ruinunca/data_tooling
435
30404
# 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. # import json from pathlib import Path import pytest import cc_net import cc_net.minify as minify from cc_net import jsonql, process_wet_fil...
2.25
2
credentials.py
feliposz/submissions-scraper-selenium
3
30405
class ACCOUNTS(): def __init__(self): self.CodeChef = { "username": "username", "password": "password" } self.Hackerrank = { "username": "username", "password": "password", "tracks": ["python"] # Available (...
3.15625
3
beast/observationmodel/observations.py
cmurray-astro/beast
0
30406
<reponame>cmurray-astro/beast<filename>beast/observationmodel/observations.py """ Defines a generic interface to observation catalog """ import numpy as np from astropy.table import Table, Column from beast.observationmodel.vega import Vega __all__ = ["Observations", "gen_SimObs_from_sedgrid"] class Observations(o...
2.5625
3
src/lib/__init__.py
nekoffski/bachelor-thesis
2
30407
<gh_stars>1-10 from .cvision import * from .models import * from .net import * from .util import *
1
1
workflow/scripts/helpers/__init__.py
IMS-Bio2Core-Facility/single_snake_sequencing
0
30408
<gh_stars>0 # -*- coding: utf-8 -*- """BIC083-Eunyoung-Lee analysis."""
1.015625
1
testsuite/driver/src/case/case_executor/clean.py
openmaple/MapleCompiler
5
30409
<reponame>openmaple/MapleCompiler<gh_stars>1-10 # # Copyright (c) [2021] Huawei Technologies Co.,Ltd.All rights reserved. # # OpenArkCompiler is licensed under Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # # http://license.coscl.org.cn/MulanPSL2 # # THIS SOFT...
2.015625
2
teraserver/python/modules/FlaskModule/API/user/UserLogin.py
introlab/opentera
10
30410
<filename>teraserver/python/modules/FlaskModule/API/user/UserLogin.py from flask import session, request from flask_restx import Resource, reqparse from flask_babel import gettext from modules.LoginModule.LoginModule import user_http_auth from modules.FlaskModule.FlaskModule import user_api_ns as api from opentera.redi...
2.15625
2
yemek.py
raydingoz/cerrahapp
2
30411
##bu python kodu, selenium ve chromedriver ile çalışmakta, siteyi normal kullanıcı gibi ziyaret edip, gerekli verileri parse ediyor from selenium import webdriver from selenium.webdriver.chrome.options import Options import os from bs4 import BeautifulSoup import time, datetime import json import requests import sys ...
3.09375
3
our_env.py
Venatoral/Slight
0
30412
from typing import List, overload from flow.envs.multiagent.traffic_light_grid import MultiTrafficLightGridPOEnv from flow.envs.traffic_light_grid import TrafficLightGridPOEnv from gym.spaces import Box, Discrete import numpy as np ID_IDX = 1 class SeqTraffiLightEnv(TrafficLightGridPOEnv): def __init__(self, en...
2.796875
3
example/nodelabeled-unweighted.py
yhtang/GraphDot
9
30413
<reponame>yhtang/GraphDot #!/usr/bin/env python # -*- coding: utf-8 -*- '''An example of similarity comparison between node-labeled but unweighted graphs using the marginalized graph kernel.''' import numpy as np import networkx as nx from graphdot import Graph from graphdot.kernel.marginalized import MarginalizedGraph...
2.78125
3
sparse_causal_model_learner_rl/annealer/threshold.py
sergeivolodin/causality-disentanglement-rl
2
30414
import gin import torch import logging from sparse_causal_model_learner_rl.metrics import find_value, find_key @gin.configurable def AnnealerThresholdSelector(config, config_object, epoch_info, temp, adjust_every=100, multiplier=10, # allow the lo...
2.21875
2
Episode01-Move_Player/Pygame/Shmup tutorial-01.py
Inksaver/Shmup_With_Pygame_Love2D_Monogame
1
30415
<filename>Episode01-Move_Player/Pygame/Shmup tutorial-01.py # https://www.youtube.com/watch?v=nGufy7weyGY ''' Only 1 player so use code module (static class) for player and a separate shared code module for global variables ''' # import libraries import pygame, os import shared, player def process_events() ->...
3.078125
3
python/091-100/Interleaving String.py
KaiyuWei/leetcode
150
30416
<reponame>KaiyuWei/leetcode<filename>python/091-100/Interleaving String.py class Solution: # @param {string} s1 # @param {string} s2 # @param {string} s3 # @return {boolean} def isInterleave(self, s1, s2, s3): m = len(s1) n = len(s2) if m+n != len(s3): return Fals...
3.609375
4
vvrest/vault.py
GRM-VisualVault/vvPyRest
1
30417
<filename>vvrest/vault.py from .token import Token from .utilities import get_token_expiration from .services.auth_service import AuthService class Vault: def __init__(self, url, customer_alias, database_alias, client_id, client_secret, user_web_token=None, jwt=None): """ if user_web_token is pass...
2.875
3
setup.py
saimn/stsci.tools
0
30418
<filename>setup.py #!/usr/bin/env python import os import pkgutil import sys from setuptools import setup, find_packages from subprocess import check_call, CalledProcessError if not pkgutil.find_loader('relic'): relic_local = os.path.exists('relic') relic_submodule = (relic_local and os...
1.585938
2
settings.py
Nayigiziki/apartment-finder
0
30419
import os # filters FILTERS = { 'min_bathrooms': 1, 'min_bedrooms': 3 } ## Location preferences # The Craigslist site you want to search on. # For instance, https://sfbay.craigslist.org is SF and the Bay Area. # You only need the beginning of the URL. CRAIGSLIST_SITE = 'sfbay' # What Craigslist subdirectorie...
3.203125
3
randomPanFlute.py
aleixcm/tensorflow-wavenet
0
30420
import os import scipy.io.wavfile import matplotlib.pyplot as plt import numpy as np import os import random ''' Create a random dataset with three different frequencies that are always in fase. Frequencies will be octave [440, 880, 1320]. ''' fs = 16000 x1 = scipy.io.wavfile.read('corpus/Analysis/a440.wav')[1] x2 ...
2.75
3
Very Easy/hello.py
Maverick-cmd/Python-Practice
0
30421
<filename>Very Easy/hello.py def hello(): return "hello edabit.com"
2.109375
2
py/scripts/ci_imstats.py
dstndstn/gfa_reduce
0
30422
<gh_stars>0 #!/usr/bin/env python import argparse import os import gfa_reduce.io as io import glob import time import numpy as np import copy import gfa_reduce.common as common import astropy.io.fits as fits import gfa_reduce.dark_current as dark_current from gfa_reduce.analysis.sky import adu_to_surface_brightness d...
2.125
2
onnxmltools/convert/common/utils.py
xjarvik/onnxmltools
1
30423
# SPDX-License-Identifier: Apache-2.0 from onnxconverter_common.utils import * # noqa
1.140625
1
navegador5/time_utils.py
ihgazni2/navegador5
0
30424
<filename>navegador5/time_utils.py import re import time import datetime import html def in_ignoreUpper(lora,key): for each in lora: if(key.lower() == each.lower()): return((True,each)) else: pass return((False,None)) def s2hms(seconds): arr = ...
3.484375
3
scripts/job/memcached_submit.py
Container-Projects/firmament
287
30425
from base import job_desc_pb2 from base import task_desc_pb2 from base import reference_desc_pb2 from google.protobuf import text_format import httplib, urllib, re, sys, random import binascii import time import shlex def add_worker_task(job_name, task, binary, args, worker_id, num_workers, extra_args): task.uid = 0...
2.140625
2
gala/dynamics/_genfunc/genfunc_3d.py
ltlancas/gala
1
30426
# Solving the series of linear equations for true action # and generating function Fourier components import numpy as np import matplotlib.pyplot as plt from scipy.integrate import odeint from matplotlib.ticker import MaxNLocator import matplotlib.cm as cm import time # in units kpc, km/s and 10^11 M_solar Grav = 430...
2.375
2
scripts/find-attorneys.py
kendallcorner/oscn
0
30427
<reponame>kendallcorner/oscn import sys import time import csv import oscn counties = ['tulsa', 'cimarron', 'adair', 'delaware'] years = ['2010'] for county in counties: csv_file = open(f'data/{county}-attorneys.csv', "w") # if this breaks, you may need to mkdir data writer = csv.writer(csv_file, delimi...
2.578125
3
tests/middlewares/__init__.py
caputomarcos/mongorest
16
30428
# -*- encoding: UTF-8 -*- from __future__ import absolute_import, unicode_literals from .authentication_middleware import * from .cors_middleware import *
1.085938
1
katena_chain_sdk_py/serializer/bytes_field.py
katena-chain/sdk-py
0
30429
<filename>katena_chain_sdk_py/serializer/bytes_field.py """ Copyright (c) 2019, TransChain. This source code is licensed under the Apache 2.0 license found in the LICENSE file in the root directory of this source tree. """ from marshmallow import fields from base64 import b64encode, b64decode class BytesField(field...
2.421875
2
requests_api/adapter.py
degagne/requests-api
1
30430
<filename>requests_api/adapter.py from __future__ import absolute_import from typing import List, Dict, NoReturn, Any from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry from requests_api.constants import ( BACKOFF_FACTOR, STATUS_FORCELIST, ALLOWED_METHODS ) class RetryAdapter(...
2.671875
3
tests/engine/dice_test.py
slalom/slaloms-and-dragons
7
30431
import unittest import game.engine.dice as dice class DiceRollTest(unittest.TestCase): def test_dice_roll(self): roll = dice.roll() self.assertGreaterEqual(roll, 1) self.assertLessEqual(roll, 6)
3.21875
3
pepenc/data/peptide_encoder_training_dataset.py
bmmalone/peptide-encoder
0
30432
""" This module contains a pytorch dataset for learning peptide embeddings. In particular, each "instance" of the dataset comprises two peptide sequences, as well as the sNebula similarity between them. The sNebula distance reflects the BLOSSUM similarity transformed from 0 to 1. """ import logging logger = logging.ge...
3.296875
3
src/chime_dash/app/components/__init__.py
nickcanz/chime
2
30433
"""Combines all components The `sidebar` component combines all the inputs while other components potentially have callbacks. To add or remove components, adjust the `setup`. If callbacks are present, also adjust `CALLBACK_INPUTS`, `CALLBACK_OUTPUTS` and `callback_body`. """ from collections import OrderedDict from ...
1.921875
2
src/page/page_parser.py
baallezx/collect
1
30434
<reponame>baallezx/collect # TODO: implement a page_parser that uses nlp and stats to get a good read of a file. class page_parser(object): """ a multi purpose parser that can read these file types """ def __init__(self): pass
2.078125
2
crawl_and_scrap/__main__.py
byung-u/GranXiSearch
1
30435
"""crwal_and_scrap trying to gathering news with web scrawl""" from crwal_and_scrap.main import main main()
1.039063
1
output/models/ibm_data/valid/d3_4_6/d3_4_6v06_xsd/d3_4_6v06.py
tefra/xsdata-w3c-tests
1
30436
from dataclasses import dataclass, field from typing import List __NAMESPACE__ = "a" @dataclass class Nametest: choice: List[object] = field( default_factory=list, metadata={ "type": "Elements", "choices": ( { "name": "_ele", ...
3.046875
3
grape_data.py
Dechorgnat/wine_app
0
30437
import pprint from app.models import Cepage data = [] counter = 0 with open('static_data.tsv', 'r') as file: for line in file: if counter == 0: headers = line.split('\t') print(len(headers)) else: print(len(line.split('\t'))) data.append(dict(zip(head...
2.375
2
docs/build/docutils/test/functional/tests/math_output_html.py
mjtamlyn/django-braces
1
30438
<gh_stars>1-10 # Source and destination file names. test_source = "data/math.txt" test_destination = "math_output_html.html" # Keyword parameters passed to publish_file. reader_name = "standalone" parser_name = "rst" writer_name = "html" # Extra setting settings_overrides['math_output'] = 'HTML' settings_overrides['...
1.21875
1
craftroom/thefriendlystars/panels.py
davidjwilson/craftroom
1
30439
<filename>craftroom/thefriendlystars/panels.py ''' Panel object contains up to one image in the background, and any number of catalogs plotted. ''' import astroquery.skyview class Panel: ''' A single frame of a finder chart, that has up to one image in the background, and any number of catalogs plot...
2.90625
3
lib/wqmc_to_newick_converter.py
pythonLoader/QT-GILD
0
30440
<reponame>pythonLoader/QT-GILD import os,sys import time if(len(sys.argv) < 3): print("Format -> handle.py <input_file> <base_directory>") exit() input_file_name = sys.argv[1] base_direc = sys.argv[2] # with open(input_file_name, "r") as input_file: # data = input_file.read() input_ = open(input_file_name, "r") ...
2.625
3
plugin/rasa.py
mayflower/err-rasa
1
30441
<gh_stars>1-10 from rasa_core.interpreter import RasaNLUInterpreter from rasa_core.agent import Agent from rasa_core.interpreter import RegexInterpreter from rasa_core.policies.keras_policy import KerasPolicy from rasa_core.policies.memoization import MemoizationPolicy import json import config from errbot import B...
2.265625
2
pyboretum/tree/list_tree.py
picwell/pyboretum
1
30442
<reponame>picwell/pyboretum<filename>pyboretum/tree/list_tree.py from __future__ import absolute_import import math from .base import ( Tree, TreeIterator, ) def _get_left_index(node_index): return 2 * node_index + 1 def _get_right_index(node_index): return 2 * node_index + 2 def _get_depth(node...
3.25
3
Data/CSV_naar_hashtable.py
Tomaat/Programmeerproject
0
30443
import csv import json from collections import defaultdict f = open('DOOSTROOM_new.csv', 'rU') h = defaultdict(lambda: defaultdict(lambda: defaultdict(int))) for line in f: line_list = line.split(";") h[line_list[7]]["oorsprong"][line_list[3]] += int(line_list[12]) h[line_list[7]]["profiel"][line_list[6]] +=...
2.921875
3
python/version_creator.py
geoff-possum/lambda-versioning
2
30444
<gh_stars>1-10 import boto3 from botocore.vendored import requests import json from uuid import uuid4 def send(event, context, response_status, Reason=None, ResponseData=None, PhysicalResourceId=None): response_url = event.get('ResponseURL', "") json_body = json.dumps({ 'Status' : response_status, 'Reason'...
2.109375
2
musicdwh/musicdwh.py
dagmar-urbancova/musicdwh
0
30445
<reponame>dagmar-urbancova/musicdwh<filename>musicdwh/musicdwh.py """Main module.""" import os import sys import time from datetime import datetime import pandas as pd import ipapi import sqlalchemy as sqla try: DATA_DATE = os.environ['DATA_DATE'] print('Using data from {}'.format(DATA_DATE)) except: p...
2.09375
2
biserici_inlemnite/biserici/migrations/0033_auto_20210803_1623.py
ck-tm/biserici-inlemnite
0
30446
<gh_stars>0 # Generated by Django 3.1.13 on 2021-08-03 13:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('biserici', '0032_auto_20210803_1622'), ] operations = [ migrations.AddField( model_name='descriere', na...
1.46875
1
load_data.py
rlatjcj/Naver-AI-Vision
0
30447
<reponame>rlatjcj/Naver-AI-Vision<gh_stars>0 # -*- coding: utf_8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import cv2 import pickle import random import numpy as np def train_load1(data_path, img_size, output_path): label_list = [] ...
2.265625
2
data/train/python/aa479b29bfe32b3b0d5ad18d34ca8b1c4f74dff8api.py
harshp8l/deep-learning-lang-detection
84
30448
from tastypie.api import Api from encuestas.api.user import UserResource from encuestas.api.encuesta import EncuestaResource from encuestas.api.grupo import GrupoResource from encuestas.api.pregunta import PreguntaResource from encuestas.api.opcion import OpcionResource from encuestas.api.link import LinkResource from ...
1.5
2
ex1/gerador.py
renzon/oo-inpe
0
30449
<reponame>renzon/oo-inpe from random import randint from ex1.evento import Evento class Gerador(): def __init__(self, msg): self.msg = msg def gerar_evento(self, tempo): """ Método que gera evento levando em conta tempo de execução. :return: Instancia de Evento ou Nulo se não...
3.171875
3
tests/api/v1/test_bucketlist_endpoint.py
Elbertbiggs360/buckelist-api
0
30450
<reponame>Elbertbiggs360/buckelist-api import json from tests.base_test import BaseCase from app.models.bucketlist import Bucketlist class TestBucketlistEndpoint(BaseCase): ''' A class to test the bucketlist endpoints ''' def setUp(self): super(TestBucketlistEndpoint, self).setUp() self.bucke...
2.40625
2
lib/SetAPI/readsalignment/ReadsAlignmentSetInterfaceV1.py
r2sunita/SetAPI
0
30451
""" An interface for handling sets of ReadsAlignments. """ from pprint import pprint from SetAPI.generic.SetInterfaceV1 import SetInterfaceV1 from SetAPI import util class ReadsAlignmentSetInterfaceV1: def __init__(self, workspace_client): self.workspace_client = workspace_client self.set_interfa...
2.9375
3
datacatalog/linkedstores/process/store.py
SD2E/python-datacatalog
0
30452
import collections import inspect import json import jsonschema import os import sys from pprint import pprint from slugify import slugify from ...dicthelpers import data_merge from ..basestore import LinkedStore, linkages from ..basestore import HeritableDocumentSchema, JSONSchemaCollection, formatChecker from ..base...
2.015625
2
tests/clickhouse/test_columns.py
fpacifici/snuba
0
30453
from copy import deepcopy import pytest from snuba.clickhouse.columns import ( UUID, AggregateFunction, Array, ColumnType, Date, DateTime, Enum, FixedString, Float, IPv4, IPv6, Nested, ReadOnly, ) from snuba.clickhouse.columns import SchemaModifiers as Modifier from ...
2.109375
2
src/paddle_prompt/templates/base_template.py
wj-Mcat/paddle-prompt
1
30454
<reponame>wj-Mcat/paddle-prompt """Base Abstract Template class""" from __future__ import annotations import json from abc import ABC from collections import OrderedDict from typing import Any, Dict, List import numpy as np import paddle from paddle import nn from paddlenlp.transformers.tokenizer_utils import Pretrai...
2.453125
2
tests/test_eulerian.py
guojingyu/DeNovoAssembly
4
30455
<reponame>guojingyu/DeNovoAssembly #!/usr/bin/env python """ Test eulerian functions including the random walk Author : <NAME> """ import unittest from de_novo_assembly.de_bruijn_graph import DeBruijnGraph from Bio.SeqRecord import SeqRecord from de_novo_assembly.eulerian import has_euler_path, has_euler_circuit, \ ...
2.515625
3
gameevents/tests/test_gameevents.py
danilovbarbosa/sg-gameevents
0
30456
<reponame>danilovbarbosa/sg-gameevents import unittest import time import datetime import json import sys #import base64 #from werkzeug.wrappers import Response sys.path.append("..") #from flask import current_app #from werkzeug.datastructures import Headers from gameevents_app import create_app #Extensions from ...
2.15625
2
regions/core/regions.py
dhomeier/regions
46
30457
<filename>regions/core/regions.py # Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module provides a Regions class. """ from .core import Region from .registry import RegionsRegistry __all__ = ['Regions'] __doctest_skip__ = ['Regions.read', 'Regions.write', 'Regions.parse', ...
2.4375
2
main.py
rhaksar/control-percolation
1
30458
from collections import defaultdict import itertools import numpy as np import pickle import time import warnings from Analysis import binomial_pgf, BranchModel, StaticModel from simulators.fires.UrbanForest import UrbanForest from Policies import NCTfires, UBTfires, DWTfires, RHTfires, USTfires from Utilities import ...
2.078125
2
tests/functional/test_create.py
AgeOfLearning/uget-cli
1
30459
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Functional tests for `ugetcli` package - `create` command. Tests functionality of the cli create command with various options. """ import os import unittest import json from click.testing import CliRunner from mock import MagicMock, patch from ugetcli import cli from...
2.34375
2
hackerrank/calc_missing.py
capac/python-exercises
0
30460
#! /usr/bin/env python import re import pandas as pd from numpy import interp import os from pathlib import Path home = os.environ['HOME'] home_dir = Path(home) work_dir = home_dir / 'Programming/Python/python-exercises/hackerrank' # 12/14/2012 16:00:00 Missing_19 pattern = re.compile(r'(\d{1,2}/\d{1,2}/2012)\s+(16:...
3.078125
3
qcloudsdkvod/ApplyUploadRequest.py
f3n9/qcloudcli
0
30461
# -*- coding: utf-8 -*- from qcloudsdkcore.request import Request class ApplyUploadRequest(Request): def __init__(self): super(ApplyUploadRequest, self).__init__( 'vod', 'qcloudcliV1', 'ApplyUpload', 'vod.api.qcloud.com') def get_SubAppId(self): return self.get_params().get('SubA...
2.0625
2
Merge Sorted Array.py
sugia/leetcode
0
30462
''' Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note: The number of elements initialized in nums1 and nums2 are m and n respectively. You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional elements from nums2. Ex...
4.34375
4
test.py
stepan20000/MITx-6-00-1
0
30463
import string def foo(shift): shiftDict = {} for l in string.ascii_lowercase: shiftDict[l] = chr((ord(l) - 97 + shift)%26 + 97) for l in string.ascii_uppercase: shiftDict[l] = chr((ord(l) - 65 + shift)%26 + 65) return shiftDict print(foo(1))
3.5625
4
deepreg/model/loss/deform.py
agrimwood/DeepRegFromMain20200714
0
30464
<reponame>agrimwood/DeepRegFromMain20200714 import tensorflow as tf def local_displacement_energy(ddf, energy_type, **kwargs): def gradient_dx(fv): return (fv[:, 2:, 1:-1, 1:-1] - fv[:, :-2, 1:-1, 1:-1]) / 2 def gradient_dy(fv): return (fv[:, 1:-1, 2:, 1:-1] - fv[:, 1:-1, :-2, 1:-1]) / 2 ...
2.015625
2
sa/profiles/Generic/get_inventory.py
prorevizor/noc
84
30465
<reponame>prorevizor/noc # --------------------------------------------------------------------- # Generic.get_inventory # --------------------------------------------------------------------- # Copyright (C) 2007-2019 The NOC Project # See LICENSE for details # ---------------------------------------------------------...
2.078125
2
pirates/uberdog/DistributedAvatarManager.py
itsyaboyrocket/pirates
3
30466
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.uberdog.DistributedAvatarManager from otp.uberdog.OtpAvatarManager import OtpAvatarManager from otp.otpbase import OTPGlobals c...
1.96875
2
src/the_tale/the_tale/game/roads/admin.py
al-arz/the-tale
85
30467
<reponame>al-arz/the-tale<gh_stars>10-100 import smart_imports smart_imports.all() class RoadAdmin(django_admin.ModelAdmin): list_display = ('id', 'point_1', 'point_2', 'length') list_filter = ('point_1', 'point_2') django_admin.site.register(models.Road, RoadAdmin)
1.875
2
test.py
lexibank/asjp
0
30468
<gh_stars>0 def test_valid(cldf_dataset, cldf_logger): assert cldf_dataset.validate(log=cldf_logger) def test_parameters(cldf_dataset): assert len(list(cldf_dataset["ParameterTable"])) == 100 def test_languages(cldf_dataset): assert len(list(cldf_dataset["LanguageTable"])) > 4000
2.09375
2
nicos_mlz/spodi/setups/special/monitor-html.py
jkrueger1/nicos
12
30469
description = 'setup for the status monitor' group = 'special' _expcolumn = Column( Block('Experiment', [ BlockRow( # Field(name='Proposal', key='exp/proposal', width=7), # Field(name='Title', key='exp/title', width=20, # istext=True, maxlen=20), Field(name...
1.414063
1
tools/tsec.bzl
brkgyln/angular
0
30470
"""Bazel rules and macros for running tsec over a ng_module or ts_library.""" load("@npm//@bazel/typescript/internal:ts_config.bzl", "TsConfigInfo") load("@build_bazel_rules_nodejs//:providers.bzl", "DeclarationInfo") load("@npm//tsec:index.bzl", _tsec_test = "tsec_test") TsecTsconfigInfo = provider(fields = ["src", ...
1.929688
2
simulation_scripts/Q2.py
szwieback/BayesianTripleCollocation
0
30471
<reponame>szwieback/BayesianTripleCollocation<filename>simulation_scripts/Q2.py ''' Created on Jun 8, 2017 @author: zwieback ''' import numpy as np import os from simulation_internal import simulation_internal from simulation_paths import path def Q2_simulation(): ns = [100,250,500] nrep = 25 niter = 2000 ...
1.921875
2
app.py
giao-cloude/card
0
30472
<reponame>giao-cloude/card<filename>app.py #coding:utf-8 import tensorflow as tf import backward import forward import PreProcess as PP def restore_model(testArr): with tf.Graph().as_default() as tg: x = tf.placeholder(tf.float32, [None, forward.INPUT_NODE]) y = forward.forward(x, None) preValue = tf.argmax(y...
2.265625
2
utils/test_fm.py
dilum1995/DAugmentor
1
30473
from utils import constants as const print(const.PATH)
1.226563
1
jsk_recognition/jsk_perception/node_scripts/openpose/pose_net.py
VT-ASIM-LAB/autoware.ai
0
30474
from __future__ import print_function import os import itertools, pkg_resources, sys from distutils.version import LooseVersion if LooseVersion(pkg_resources.get_distribution("chainer").version) >= LooseVersion('7.0.0') and \ sys.version_info.major == 2: print('''Please install chainer <= 7.0.0: sudo pip in...
2.109375
2
wxtbx/phil_controls/text_base.py
hbrunie/cctbx_project
2
30475
from __future__ import absolute_import, division, print_function from wxtbx import phil_controls import wxtbx from libtbx.utils import Abort, to_unicode, to_str from libtbx import Auto import wx import sys class ValidatedTextCtrl(wx.TextCtrl, phil_controls.PhilCtrl): def __init__(self, *args, **kwds): saved_val...
2.046875
2
cogs/commands/misc/misc.py
DiscordGIR/Bloo
34
30476
import base64 import datetime import io import json import traceback import aiohttp import discord import pytimeparse from data.services.guild_service import guild_service from discord.commands import Option, slash_command, message_command, user_command from discord.ext import commands from discord.utils import forma...
2.109375
2
src/preprocessing.py
smartdatalake/pathlearn
0
30477
<reponame>smartdatalake/pathlearn<filename>src/preprocessing.py """This module provides various functions used to read/write and generate the data structures used for Path Learn""" import networkx as nx import random as rnd import numpy as np import pandas as pd import os def find_single_paths(G, node, lim, paths_li...
2.953125
3
refinery/bnpy/bnpy-dev/tests/merge/TestMergeHDPTopicModel.py
csa0001/Refinery
103
30478
''' Unit tests for MergeMove.py for HDPTopicModels Verification merging works as expected and produces valid models. Attributes ------------ self.Data : K=4 simple WordsData object from AbstractBaseTestForHDP self.hmodel : K=4 simple bnpy model from AbstractBaseTestForHDP Coverage ----------- * run_many_merge_moves...
2.5
2
bluzelle/codec/crud/Paging_pb2.py
hhio618/bluezelle-py
3
30479
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: crud/Paging.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.pro...
1.179688
1
Python/Utilities/dater.py
S-c-r-a-t-c-h-y/coding-projects
0
30480
<filename>Python/Utilities/dater.py import sys import time from datetime import datetime, timedelta import os import pathlib from watchdog.events import FileSystemEventHandler from watchdog.observers import Observer creation = "C:\\Date de création" today = "C:\\Date d'aujourd'hui" last_modification = "C:\\Date de der...
2.65625
3
blendhunter/blend.py
andrevitorelli/BlendHunter
2
30481
# -*- coding: utf-8 -*- """ BLEND This module defines classes and methods for blending images. :Author: <NAME> <<EMAIL>> """ import numpy as np from lmfit import Model from lmfit.models import GaussianModel, ConstantModel from modopt.base.np_adjust import pad2d from sf_tools.image.stamp import postage_stamp from s...
2.796875
3
Guia/4.0-Estados_conversacion.py
nicosiebert2/telegram-bot
0
30482
<filename>Guia/4.0-Estados_conversacion.py import logging from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, ConversationHandler #Obtener la info de la sesion logging.basicConfig(level = logging.INFO, format = "%(asctime)s - %(na...
2.296875
2
src/radical/pilot/unit_manager.py
karahbit/radical.pilot
0
30483
__copyright__ = "Copyright 2013-2016, http://radical.rutgers.edu" __license__ = "MIT" import os import time import threading as mt import radical.utils as ru from . import utils as rpu from . import states as rps from . import constants as rpc from . import compute_unit_description as rpcud # bulk call...
2.40625
2
syncstream/file.py
cainmagi/sync-stream
0
30484
<filename>syncstream/file.py<gh_stars>0 #!python # -*- coding: UTF-8 -*- ''' ################################################################ # File-based stream synchronization. # @ Sync-stream # Produced by # <NAME> @ <EMAIL>, # <EMAIL>. # Requirements: (Pay attention to version) # python 3.6+ # fast...
2.34375
2
spatialtis/_plotting/__init__.py
Mr-Milk/SpatialTis
10
30485
<reponame>Mr-Milk/SpatialTis import matplotlib as mpl from matplotlib import cycler from .api import ( NCDMarkers, NMDMarkers, cell_co_occurrence, cell_components, cell_density, cell_map, cell_morphology, community_map, expression_map, neighborhood_analysis, neighbors_map, ...
1.773438
2
terminal.py
TeknohouseID/rumah_aria_graha_NEW_2018
0
30486
<reponame>TeknohouseID/rumah_aria_graha_NEW_2018 import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) pin_terminal = [15,16] #definisi pin GPIO yg terhubung ke relay terminal GPIO.setup(pin_terminal, GPIO.OUT) def terminal_on(pin): #fungsi untuk menyalakan lampu (NC) GPIO.output(pin, 1) def te...
2.296875
2
ListaExercicios1/exercicio21.py
GabrielSouzaGit/PythonStudies
0
30487
'''Escreva um programa que solicite ao usuário dois números e apresente na tela os resultados das operações aritméticas (soma, subtração, multiplicação, divisão, resto da divisão, exponenciação, radiciação)''' import math num1 = float(input('Informe um numero: ')) num2 = float(input('Informe outro numero: ')) print(f...
4.53125
5
benchmarking/remote/django_url_printer.py
virtan/FAI-PEP
1
30488
<filename>benchmarking/remote/django_url_printer.py from __future__ import absolute_import, division, print_function, unicode_literals import json import os import urllib from remote.url_printer_base import URLPrinterBase from remote.url_printer_base import registerResultURL DJANGO_SUB_URL = "benchmark/visualize" ...
2.265625
2
pynq_networking/lib/mqttsn_sw.py
Xilinx/PYNQ-Networking
40
30489
<filename>pynq_networking/lib/mqttsn_sw.py<gh_stars>10-100 # Copyright (c) 2017, Xilinx, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must ...
1.359375
1
python/problems/degree_of_an_array.py
vivaxy/algorithms
1
30490
<gh_stars>1-10 """ https://leetcode.com/problems/degree-of-an-array/ https://leetcode.com/submissions/detail/130966108/ """ class Solution: def findShortestSubArray(self, nums): """ :type nums: List[int] :rtype: int """ d = dict() for index, num in enumerate(nums):...
3.375
3
algorithms/shellSort.py
maxotar/algorithms
0
30491
def shellSort(alist): gap = len(alist) // 2 while gap > 0: for i in range(gap, len(alist)): val = alist[i] j = i while j >= gap and alist[j - gap] > val: alist[j] = alist[j - gap] j -= gap alist[j] = val gap //= 2
3.4375
3
tests/test_model_finder_multiclass.py
maciek3000/data_dashboard
8
30492
<reponame>maciek3000/data_dashboard import pytest import numpy as np import pandas as pd from sklearn.linear_model import LogisticRegression, RidgeClassifier from sklearn.tree import DecisionTreeClassifier from sklearn.svm import SVC from sklearn.metrics import accuracy_score from sklearn.dummy import DummyClassifier ...
2.5
2
possum/utils/pipenv_.py
brysontyrrell/Possum
24
30493
import os import shutil import subprocess from possum.exc import PipenvPathNotFound class PipenvWrapper: def __init__(self): self.pipenv_path = shutil.which('pipenv') if not self.pipenv_path: raise PipenvPathNotFound # Force pipenv to ignore any currently active pipenv envir...
2.328125
2
tests/test__init__.py
Combofoods/pyenv
1
30494
import pytest import envpy import os folder = os.path.dirname(__file__) folder_env_file = f'{folder}/resources' file_dot_env = 'test.env' def test__init__(): karg = {'filepath':folder_env_file, 'filename':file_dot_env} envpy.get_variables(**karg) envpy.printenv(envpy.get_variables(**karg)) if __name_...
1.976563
2
randomAgent.py
FavOla/SIAUROP
0
30495
<reponame>FavOla/SIAUROP<gh_stars>0 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: fnels """ import random def random_actions(): action_list = [random.randint(0, 3)] return action_list
1.90625
2
scripts/owlnets_script/__main__pre_20210905.py
hubmapconsortium/ontology-api
2
30496
<gh_stars>1-10 #!/usr/bin/env python import argparse import os import pkt_kg as pkt import psutil import re from rdflib import Graph from rdflib.namespace import OWL, RDF, RDFS from tqdm import tqdm import glob import logging.config import time from datetime import timedelta from lxml import etree from urllib.request ...
2.09375
2
utils/RunONNXModel.py
kwu91/onnx-mlir
1
30497
import os import sys import argparse import onnx import time import subprocess import numpy as np import tempfile from onnx import numpy_helper from collections import OrderedDict # Command arguments. parser = argparse.ArgumentParser() parser.add_argument('model_path', type=str, help="Path to the ONNX model.") parser...
2.484375
2
test/run/t242.py
timmartin/skulpt
2,671
30498
class O(object): pass class A(O): pass class B(O): pass class C(O): pass class D(O): pass class E(O): pass class K1(A,B,C): pass class K2(D,B,E): pass class K3(D,A): pass class Z(K1,K2,K3): pass print K1.__mro__ print K2.__mro__ print K3.__mro__ print Z.__mro__
2.421875
2
bot/assets/wiki/wiki.py
AdvaithGS/Astrobot
2
30499
import requests from json import loads from bs4 import BeautifulSoup from os import environ l = ['atom','moon','star','space','astro','cluster','galaxy','sky','planet','solar','science','physic','scientist','cosmos'] def clean(text): while '[' in text: text = text.replace(text[text.find('['):text.find(']',...
3.171875
3