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
env/lib/python2.7/site-packages/billiard/py2/reduction.py
jlwysf/onduty
39
13700
<reponame>jlwysf/onduty # # Module to allow connection and socket objects to be transferred # between processes # # multiprocessing/reduction.py # # Copyright (c) 2006-2008, <NAME> # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import os import sys import socket import threa...
2.0625
2
BOJ_Solved/BOJ-19698.py
CodingLeeSeungHoon/Python_Algorithm_TeamNote
7
13701
""" 백준 19698번 : 헛간 청약 """ N, W, H, L = map(int, input().split()) print(min(W//L * H//L, N))
2.4375
2
.venv/lib/python2.7/site-packages/ansible/module_utils/nxos.py
Achraf-Ben/Ansible-
0
13702
<gh_stars>0 # # This code is part of Ansible, but is an independent component. # # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to...
1.265625
1
example/bin_provider.py
dell/dataiq-plugin-example
1
13703
<filename>example/bin_provider.py # Copyright 2020 Dell Inc, or its subsidiaries. # # SPDX-License-Identifier: Apache-2.0 import csv import datetime import os import sys from abc import ABC, abstractmethod from collections import namedtuple from typing import Tuple, List, Iterator from dateutil.relativedelta import r...
2.234375
2
test.py
ewuerfel66/lambdata-mjh09
0
13704
<filename>test.py import unittest class TestSum(unittest.TestCase): def test_sum(self): self.assertEqual(sum([1,2,3]), 6, 'Should be 6') def test_sum_tuple(self): self.assertEqual(sum((1,2,2)), 6, 'Should be 6') if __name__ == '__main__': unittest.main()
3.296875
3
md5tosha256.py
yym68686/VirusTotalSpider
2
13705
import os import re import time import numpy as np from msedge.selenium_tools import EdgeOptions, Edge from selenium.webdriver.common.action_chains import ActionChains headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36 Edg/8...
2.421875
2
python/square root.py
SULING4EVER/learngit
0
13706
x=input("Enter a umber of which you want to know the square root.") x=int(x) g=x/2 while (g*g-x)*(g*g-x)>0.00000000001: g=(g+x/g)/2 print(g) print(g)
3.96875
4
chapter 5/sampleCode22.py
DTAIEB/Thoughtful-Data-Science
15
13707
import pixiedust my_logger = pixiedust.getLogger(__name__)
1.15625
1
iaso/migrations/0052_fix_period_before_after.py
ekhalilbsq/iaso
29
13708
# Generated by Django 2.1.11 on 2020-06-04 09:19 from django.db import migrations, models def fix_period_before_after(apps, schema_editor): # noinspection PyPep8Naming Form = apps.get_model("iaso", "Form") for form in Form.objects.filter(period_type=None).exclude(periods_before_allowed=0, periods_after_...
1.992188
2
vc/manager/generation_result.py
very-meanly/vc
0
13709
<gh_stars>0 from vc.manager.base import Manager from vc.model.generation_result import GenerationResult class GenerationResultManager(Manager): model_class = GenerationResult
1.359375
1
src/aceinna/bootstrap/__init__.py
lihaiyong827/python-openimu
41
13710
<reponame>lihaiyong827/python-openimu import sys import os import traceback from .default import Default from .cli import CommandLine from .loader import Loader
1.023438
1
test/tutorial/scripts/api/logout_api.py
GPelayo/dcp-cli
8
13711
from hca.dss import DSSClient dss = DSSClient() dss.logout()
1.195313
1
home/stock_model.py
85599/nse-django
0
13712
<reponame>85599/nse-django<gh_stars>0 import os import pandas as pd from sklearn import linear_model from nsetools import Nse import pathlib import joblib nse = Nse() def nse_data(stock_name): '''input stock_name : str output : list = output,high,low''' data = nse.get_quote(stock_name) current = [data...
2.734375
3
examples/rough_translated1/osgthreadedterrain.py
JaneliaSciComp/osgpyplusplus
17
13713
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgthreadedterrain" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import OpenThreads from osgpypp import osg from osgpypp import osgDB from osgpypp import osgGA from osgpypp...
1.78125
2
deepy/data/audio/tau2019.py
popura/deepy-pytorch
1
13714
import sys import os import os.path import random from pathlib import Path import torch import torchaudio from .audiodataset import AUDIO_EXTENSIONS, default_loader from ..dataset import PureDatasetFolder, has_file_allowed_extension class TAU2019(PureDatasetFolder): """TAU urban acoustic scene 2019 dataset. ...
2.15625
2
rrl.py
siekmanj/apex
0
13715
import os import torch import hashlib from collections import OrderedDict from util.env import env_factory, eval_policy from util.logo import print_logo if __name__ == "__main__": import sys, argparse, time, os parser = argparse.ArgumentParser() parser.add_argument("--nolog", action='store_true') print...
2.34375
2
swaping 2.py
aash-gates/aash-python-babysteps
7
13716
<filename>swaping 2.py<gh_stars>1-10 ''' practice qusestion from chapter 1 Module 5 of IBM Digital Nation Courses by <NAME>/<NAME> ''' x = 10 y = "ten" #step 1 x,y = y,x #printing on next line print(x) print(y) #end of the program
2.953125
3
Lab_5_Eigen_Decomposition/eigen_images.py
NahianHasan/ECE63700-Digital_Image_Processing
0
13717
import read_data as RD import numpy as np import matplotlib.pyplot as plt from PIL import Image X = RD.read_data() print('X = ',X.shape) X_mean = np.reshape(np.sum(X,1)/X.shape[1],[ X.shape[0],1]) X = X-X_mean print('X_centerred = ',X.shape) [U,S,V] = np.linalg.svd(X, full_matrices=False) print('U = ',U.shape) print('...
2.640625
3
activatable_model/models.py
wesleykendall/django-activatable-model
0
13718
from django.db import models from manager_utils import ManagerUtilsQuerySet, ManagerUtilsManager from activatable_model.signals import model_activations_changed class ActivatableQuerySet(ManagerUtilsQuerySet): """ Provides bulk activation/deactivation methods. """ def update(self, *args, **kwargs): ...
2.15625
2
my_lambdata/my_mod.py
DevvinK/lambdata-devvink-dspt6
0
13719
# my_lambdata/my_mod.py # my_lambdata.my_mod import pandas as pd def enlarge(num): return num * 100 def null_check(df): null_lines = df[df.isnull().any(axis=1)] return null_lines def date_divider(df,date_col): ''' df: the whole dataframe adding new day, month, year to date_col: the name of the c...
4.125
4
visibility.py
DanielAndreasen/ObservationTools
2
13720
<filename>visibility.py # -*- coding: utf-8 -*- from __future__ import print_function import sys import numpy as np import datetime as dt from dateutil import tz import pickle from random import choice from PyAstronomy import pyasl from astropy.coordinates import SkyCoord from astropy.coordinates import name_resolve im...
2.3125
2
brainrender/Utils/parsers/rat.py
maithamn/BrainRender
0
13721
import sys sys.path.append('./') import os import pandas as pd from vtkplotter import load from brainrender import DEFAULT_STRUCTURE_COLOR def get_rat_regions_metadata(metadata_fld): """ :param metadata_fld: """ return pd.read_pickle(os.path.join(metadata_fld, "rat_structures.pkl")) def get_rat_...
2.015625
2
components/isceobj/Alos2burstProc/runFrameMosaic.py
vincentschut/isce2
1
13722
<reponame>vincentschut/isce2 # # Author: <NAME> # Copyright 2015-present, NASA-JPL/Caltech # import os import logging import isceobj from isceobj.Alos2Proc.runFrameMosaic import frameMosaic from isceobj.Alos2Proc.runFrameMosaic import frameMosaicParameters from isceobj.Alos2Proc.Alos2ProcPublic import create_xml log...
1.851563
2
acronym.py
steffenschroeder/python-playground
0
13723
<filename>acronym.py<gh_stars>0 import unittest def abbreviate(text): return "".join((i[0].upper() for i in text.split())) class AcronymTest(unittest.TestCase): def test_basic(self): self.assertEqual('PNG', abbreviate('Portable Network Graphics')) def test_lowercase_words(self): self.a...
3.171875
3
env/lib/python3.8/site-packages/plotly/validators/waterfall/_connector.py
acrucetta/Chicago_COVI_WebApp
11,750
13724
import _plotly_utils.basevalidators class ConnectorValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="connector", parent_name="waterfall", **kwargs): super(ConnectorValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
2.640625
3
src/euler_python_package/euler_python/medium/p207.py
wilsonify/euler
0
13725
<reponame>wilsonify/euler def problem207(): pass
0.804688
1
ssd_data/augmentations/geometrics.py
star-baba/res50_sa_ssd
1
13726
<gh_stars>1-10 from numpy import random import numpy as np import logging from ._utils import decision from ssd.core.boxes.utils import iou_numpy, centroids2corners_numpy, corners2centroids_numpy from .base import Compose class RandomExpand(object): def __init__(self, filled_rgb_mean=(103.939, 116.779, 123.68), r...
2.4375
2
tests/unit_tests/prepare_email/test_mail_segmenting.py
farthur/melusine
0
13727
import pandas as pd from melusine.prepare_email.mail_segmenting import structure_email, tag_signature structured_historic = [ { "text": " \n \n \n Bonjours, \n \n Suite a notre conversation \ téléphonique de Mardi , pourriez vous me dire la \n somme que je vous \ dois afin d'd'être en régularisat...
2.53125
3
Modulos/Modulo2/app3.py
Trallyan/Curso_Udemy
0
13728
idade = 18 carteiramotorista = True print (idade >= 18 and carteiramotorista == True) print ("Pode Dirigir") velocidade = 90 radar = 100 radarfuncionando = False print (velocidade > radar and radarfuncionando == True) print ("Não foi multado") velocidade1 = 101 print (velocidade1 >= radar)
3.375
3
examples/basic/merge_instance.py
talashilkarraj/spydrnet-physical
3
13729
""" =================================== Merging two instances in the design =================================== This example demonstrate how to merge two instance in the design to create a new merged definition .. hdl-diagram:: ../../../examples/basic/_initial_design_merge.v :type: netlistsvg :align: center ...
2.875
3
splunge.py
neilebliss/reddit_bot
0
13730
import praw import re import os reddit = praw.Reddit('Splunge Bot v1', client_id=os.environ['REDDIT_CLIENT_ID'], client_secret=os.environ['REDDIT_CLIENT_SECRET'], password=os.environ['REDDIT_PASSWORD'], username=os.environ['REDDIT_USERNAME']) subreddit = reddit.subreddit('tubasaur') for submission in subreddit.new(lim...
2.734375
3
cogv3/admin/managecommands.py
XFazze/discordbot
2
13731
import discord from discord import embeds from discord.ext import commands from discord.ext.commands.core import command from pymongo import MongoClient, collation from discord_components import Button, Select, SelectOption, ComponentsBot from discord.utils import get class managecommands(commands.Cog): def __ini...
2.484375
2
edb/pgsql/compiler/context.py
OhBonsai/edgedb
2
13732
<reponame>OhBonsai/edgedb<filename>edb/pgsql/compiler/context.py<gh_stars>1-10 # # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in comp...
2.125
2
tests/unit/test_resources_log.py
CarlosAMolina/logs-analyzer
0
13733
import unittest import mock from src.api.resources import log from tests import LOGS_PATH class TestLogListResource(unittest.TestCase): def setUp(self): self.class_ = log.LogListResource() def test_post_with_file_that_exits(self): class FakeRequest: @staticmethod def ...
2.8125
3
src/rqt_py_trees/message_loader_thread.py
alexfneves/rqt_py_trees
4
13734
# Software License Agreement (BSD License) # # Copyright (c) 2012, <NAME>, 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: # # * Redistributions of source code must retain the above copyri...
1.609375
2
run_ddpg.py
huangwl18/geometry-dex
29
13735
<reponame>huangwl18/geometry-dex from rl_modules.utils import * import torch import random from rl_modules.ddpg_agent import ddpg_agent from arguments_ddpg import get_args import os import numpy as np import dex_envs import wandb import warnings warnings.simplefilter(action='ignore', category=FutureWarning) """ train ...
2.125
2
code/a_train_generalist.py
seba-1511/specialists
1
13736
<reponame>seba-1511/specialists #!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is an experiment that will train a specified generalist network. """ import random import numpy as np from neon.backends import gen_backend from neon.data import DataIterator, load_cifar10 from neon.transforms.cost import Mis...
2.359375
2
lilies/terminal/ansicodes.py
mrz1988/lilies
0
13737
<filename>lilies/terminal/ansicodes.py from __future__ import unicode_literals # Leading control character CSI = "\033[" FULLRESET = 0 BOLD = BRIGHT = 1 DIM = 2 ITALIC = 3 UNDERLINE = 4 BLINK = 5 # Unsupported ################ # RAPIDBLINK = 6 # REVERSE = 7 # CONCEAL = 8 STRIKE = 9 # Unsupported ################ #...
2.140625
2
preprocess/step1.py
wenhuchen/KGPT
119
13738
import json import regex import nltk.data from nltk.tokenize import word_tokenize import sys sent_detector = nltk.data.load('tokenizers/punkt/english.pickle') def tokenize(string): return word_tokenize(string) def split_paragraphs(text): """ remove urls, lowercase all words and separate paragraphs ""...
2.875
3
mintools/zmqmin/client.py
jtimon/elements-explorer
9
13739
# Copyright (c) 2012-2018 The Mintools developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import pyzmq from .messenger import Messenger class Client(Messenger): def _init_socket(self): self.socket = self.con...
2.328125
2
scripts/filter_genes_matrix.py
fengwanwan/st_analysis
4
13740
<reponame>fengwanwan/st_analysis #! /usr/bin/env python """ Script that takes ST dataset (matrix of counts) where the columns are genes and the rows are spot coordinates gene gene XxY XxY And removes the columns of genes matching the regular expression given as input. @Author <NAME> <<EMAIL>> """ imp...
3
3
libs/models/__init__.py
tonyngjichun/pspnet-pytorch
56
13741
<reponame>tonyngjichun/pspnet-pytorch from __future__ import absolute_import from .resnet import * from .pspnet import *
0.984375
1
modules/tools/record_analyzer/common/distribution_analyzer.py
seeclong/apollo
3
13742
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy ...
2.390625
2
models/batch.py
scaleapi/sail
7
13743
from helpers.concurrency import execute from scaleapi import exceptions def upsert(client, project_name, batches): print("\n\nCreating Batches...") print("===================") def upsert_batch(desired_batch): batch_name = desired_batch['name'] batch_callback_url = desired_batch['callbac...
2.484375
2
worker/xs.py
hoshimaemi/XZZ
29
13744
from zzcore import StdAns, mysakuya import requests class Ans(StdAns): def GETMSG(self): msg='' try: msg += xs() except: msg += '可能是机器人笑死了!' return msg def xs(): url = "http://api-x.aya1.xyz:6/" text = requests.get(url=url).text return text
2.609375
3
bot.py
matthewzhaocc/discord-server-status
0
13745
<filename>bot.py #a discord bot for playing with CICD #system dependencies import os #3rd party dependencies import discord TOKEN = os.environ.get("DISCORD_API_TOKEN") client = discord.Client() @client.event async def on_ready(): print(f'{client.user} has connected to Discord!') client.run(TOKEN...
2.828125
3
repost/api/schemas/user.py
pckv/fastapi-backend
9
13746
<reponame>pckv/fastapi-backend """API schemas for users.""" from datetime import datetime from typing import Optional from pydantic import BaseModel class User(BaseModel): """Schema for a user account""" username: str bio: Optional[str] avatar_url: Optional[str] created: datetime edited: Opti...
2.5625
3
gluon/packages/dal/pydal/adapters/sap.py
GeorgesBrantley/ResistanceGame
408
13747
<reponame>GeorgesBrantley/ResistanceGame<filename>gluon/packages/dal/pydal/adapters/sap.py<gh_stars>100-1000 import re from .._compat import integer_types, long from .base import SQLAdapter from . import adapters @adapters.register_for("sapdb") class SAPDB(SQLAdapter): dbengine = "sapdb" drivers = ("sapdb",) ...
2.28125
2
search.py
Hawxo/GoWDiscordTeamBot
0
13748
import copy import datetime import importlib import logging import operator import re from calendar import different_locale import translations from data_source.game_data import GameData from game_constants import COLORS, EVENT_TYPES, RARITY_COLORS, SOULFORGE_REQUIREMENTS, TROOP_RARITIES, \ UNDERWORLD_SOULFORGE_RE...
1.976563
2
troposphere/sagemaker.py
filipepmo/troposphere
0
13749
# Copyright (c) 2012-2022, <NAME> <<EMAIL>> # All rights reserved. # # See LICENSE file for full license. # # *** Do not modify - this file is autogenerated *** # Resource specification version: 51.0.0 from . import AWSObject, AWSProperty, PropsDictType, Tags from .validators import boolean, double, integer class R...
1.796875
2
src/lib/divergence.py
evolutics/sparse-approximation
0
13750
import math from numpy import linalg from scipy import stats from scipy.spatial import distance import numpy def euclidean(p, Q): return numpy.apply_along_axis(lambda q: linalg.norm(p - q), 0, Q) def hellinger(p, Q): factor = 1 / math.sqrt(2) sqrt_p = numpy.sqrt(p) return factor * numpy.apply_along...
2.75
3
vad/data_models/voice_activity.py
zsl24/voice-activity-detection
74
13751
import json import math from dataclasses import dataclass from datetime import timedelta from enum import Enum from pathlib import Path from typing import List, Optional import numpy as np from vad.util.time_utils import ( format_timedelta_to_milliseconds, format_timedelta_to_timecode, parse_timecode_to_t...
2.65625
3
face_recognition/project/schema.py
dgr113/face-recognition
0
13752
# coding: utf-8 SCHEMA_MAPPING = { "persons": { "type": "object", "patternProperties": { r"\d+": { "type": "object", "properties": { "first_name": {"type": "string"}, "last_name": {"type": "string"}, ...
1.71875
2
resources/www/scripts/recibido.py
miguelarman/Redes-de-comunicaciones-ii-practica1
0
13753
import sys import urllib.parse as urlparse print("Argumentos recibidos por STDIN: ") try: for line in sys.stdin: url = 'foo.com/?' + line parsed = urlparse.urlparse(url) print('Recibido: {}'.format(urlparse.parse_qs(parsed.query))) except: ignorar = True
3.375
3
gui/main.py
aman-v1729/CommonAudioVideoCLI
0
13754
<filename>gui/main.py import tkinter import subprocess from tkinter import filedialog, messagebox import os import pyqrcode def clip_filename_with_extension(filename): """ clips long file names """ clipped = filename[filename.rfind("/") + 1 :] if len(clipped) > 15: clipped = clipped[:6] + "..." +...
3.171875
3
virtex/core/profile.py
chrislarson1/virtex
5
13755
# ------------------------------------------------------------------- # Copyright 2021 Virtex authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www....
1.898438
2
apps/molecular_generation/JT_VAE/src/mol_tree.py
agave233/PaddleHelix
454
13756
<reponame>agave233/PaddleHelix # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
2.375
2
torch/indicator/vision/object_detection/iou.py
jihuacao/Putil
1
13757
# coding = utf-8 from abc import ABCMeta, abstractmethod import torch from Putil.torch.indicator.vision.object_detection import box ##@brief 计算iou # @note # @return def _iou(x11, y11, x12, y12, x21, y21, x22, y22): cap, cup = box._cap_cup(x11, y11, x12, y12, x21, y21, x22, y22) return cap / cup def _cap_cup_...
2.546875
3
magPi_05_mountains.py
oniMoNaku/thePit
0
13758
# today is 389f # the python pit # magPi - 05 # MOUNTAINS import os, pygame; from pygame.locals import * pygame.init(); clock = pygame.time.Clock() os.environ['SDL_VIDEO_WINDOW_POS'] = 'center' pygame.display.set_caption("Mountains") screen=pygame.display.set_mode([600,382],0,32) sky = pygame.Surface((600,255)) r=0;...
3.140625
3
bots/parkour/reports.py
Marcin1396/parkour
0
13759
""" Handles reports """ from parkour.env import env from parkour.utils import normalize_name import asyncio import aiotfm import time class Reports(aiotfm.Client): def __init__(self, *args, **kwargs): self.rep_id = 0 self.reports = {} self.reported = [] self.reporters = [] super().__init__(*args, **kwarg...
2.546875
3
data_analysis_scripts/mouse_et_ephys_viz.py
idc9/mvmm_sim
0
13760
from joblib import load from os.path import join import argparse import numpy as np import matplotlib.pyplot as plt from mvmm_sim.simulation.sim_viz import save_fig from mvmm_sim.data_analysis.utils import load_data from mvmm_sim.simulation.utils import make_and_get_dir from mvmm_sim.mouse_et.MouseETPaths import Mous...
1.804688
2
gimmemotifs/commands/match.py
littleblackfish/gimmemotifs
0
13761
#!/usr/bin/env python # Copyright (c) 2009-2016 <NAME> <<EMAIL>> # # This module is free software. You can redistribute it and/or modify it under # the terms of the MIT License, see the file COPYING included with this # distribution. from __future__ import print_function from gimmemotifs.comparison import MotifCompa...
2.203125
2
rest-service/manager_rest/rest/resources_v3/users.py
TS-at-WS/cloudify-manager
0
13762
<reponame>TS-at-WS/cloudify-manager<gh_stars>0 ######### # Copyright (c) 2016 GigaSpaces Technologies Ltd. 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:/...
1.625
2
src/m2_run_this_on_laptop.py
Petersl13/99-CapstoneProject-201920
0
13763
<reponame>Petersl13/99-CapstoneProject-201920<filename>src/m2_run_this_on_laptop.py<gh_stars>0 """ Capstone Project. Code to run on a LAPTOP (NOT the robot). Displays the Graphical User Interface (GUI) and communicates with the robot. Authors: Your professors (for the framework) and <NAME>. Winter term, ...
3.046875
3
python/tree/0704_binary_search.py
linshaoyong/leetcode
6
13764
class Solution(object): def search(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ return self.binary_search(nums, target, 0, len(nums) - 1) def binary_search(self, nums, target, low, hight): mid = low + (hight - low) // 2...
3.625
4
alphamind/benchmarks/data/neutralize.py
rongliang-tech/alpha-mind
186
13765
# -*- coding: utf-8 -*- """ Created on 2017-4-25 @author: cheng.li """ import datetime as dt import numpy as np from sklearn.linear_model import LinearRegression from alphamind.data.neutralize import neutralize def benchmark_neutralize(n_samples: int, n_features: int, n_loops: int) -> None: pr...
2.96875
3
python/__init__.py
seangal/xAODAnaHelpers
0
13766
#!/usr/bin/env python # -*- coding: utf-8 -*-, from __future__ import absolute_import from __future__ import print_function from . import logging as xAH_logging try: from .config import Config except: xAH_logging.logger.warning("xAH::Config could not be imported.") __version__ = "1.0.0" __all__ = ["utils", "...
1.46875
1
process/extract.py
kogakenji/kasatomaru
0
13767
<filename>process/extract.py from bs4 import BeautifulSoup import lxml.html import pathlib import db import datetime from concurrent.futures import ThreadPoolExecutor import threading # Define the lock globally lock = threading.Lock() def files_list(start, end): """Generate url list with given start and end of in...
2.921875
3
tests/shunit/data/bad_i18n_newline_5.py
nicole331/TWLight
67
13768
# Single-quoted string is preceded and succeeded by newlines. # Translators: This is a helpful comment. _( '5' )
1.210938
1
deciphon/protein_profile.py
EBI-Metagenomics/deciphon-py
0
13769
from __future__ import annotations from math import log from typing import List, Type, Union from imm import MuteState, Sequence, lprob_add, lprob_zero from nmm import ( AminoAlphabet, AminoLprob, BaseLprob, CodonLprob, CodonMarg, DNAAlphabet, FrameState, RNAAlphabet, codon_iter, )...
1.96875
2
ptranking/ltr_adhoc/util/one_hot_utils.py
junj2ejj/ptranking.github.io
1
13770
#!/usr/bin/env python # -*- coding: utf-8 -*- """Description """ import torch from ptranking.ltr_global import global_gpu as gpu def get_one_hot_reprs(batch_stds): """ Get one-hot representation of batch ground-truth labels """ batch_size = batch_stds.size(0) hist_size = batch_stds.size(1) int_batch...
2.5
2
src/data_module.py
enningxie/lightning-semantic-matching
2
13771
<filename>src/data_module.py # Created by xieenning at 2020/10/19 from argparse import ArgumentParser, Namespace from typing import Optional, Union, List from pytorch_lightning import LightningDataModule from transformers import BertTokenizer from transformers import ElectraTokenizer from transformers.utils import logg...
2.109375
2
mainwin.py
hatmann1944/pyqt-http-file-svr
1
13772
<reponame>hatmann1944/pyqt-http-file-svr # -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/mnt/hgfs/tmpcode/pyqt-http/untitled.ui' # # Created: Fri Jun 5 10:59:33 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtC...
2.1875
2
monzo/handlers/echo.py
petermcd/monzo-api
1
13773
<gh_stars>1-10 """Class to echo credentials.""" from monzo.handlers.storage import Storage class Echo(Storage): """Class that will echo out credentials.""" def store( self, access_token: str, client_id: str, client_secret: str, expiry: int, refresh_token: str =...
2.921875
3
grappelli/settings.py
theatlantic/django-grappelli-old
285
13774
<filename>grappelli/settings.py # coding: utf-8 # DJANGO IMPORTS from django.conf import settings # Admin Site Title ADMIN_HEADLINE = getattr(settings, "GRAPPELLI_ADMIN_HEADLINE", 'Grappelli') ADMIN_TITLE = getattr(settings, "GRAPPELLI_ADMIN_TITLE", 'Grappelli') # Link to your Main Admin Site (no slashes at start a...
1.492188
1
epikjjh/baekjoon/2178.py
15ers/Solve_Naively
3
13775
import sys def conv(stream): return [int(e) for e in stream] input = sys.stdin.readline n,m = map(int,input().split()) arr = [conv(input().split()[0]) for i in range(n)] visit = [[0]*m for i in range(n)] visit[0][0] = 1 direction = [(0,1),(0,-1),(1,0),(-1,0)] queue = [[0,0]] while queue: y,x = queue....
2.53125
3
DockerHubPackages/code/analyzer/analyzers/python_packages.py
halcyondude/datasets
283
13776
from ..utils import run import logging logger = logging.getLogger(__name__) def process_one_package(path, package, python_version="3"): """Get details about one precise python package in the given image. :param path: path were the docker image filesystem is expanded. :type path: string :param pa...
2.921875
3
src/maho/modules/__init__.py
evangelos-ch/maho-bot
0
13777
<reponame>evangelos-ch/maho-bot<gh_stars>0 """Maho bot modules."""
0.785156
1
backend/dc_tests/api_views.py
gitter-badger/djangochannel
2
13778
from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, JsonResponse from django.views.generic.base import View from django.contrib.auth.mixins import LoginRequiredMixin from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import ...
1.960938
2
sdk/python/pulumi_kubernetes/apps/v1/ControllerRevision.py
rosskevin/pulumi-kubernetes
0
13779
<filename>sdk/python/pulumi_kubernetes/apps/v1/ControllerRevision.py import pulumi import pulumi.runtime from ... import tables class ControllerRevision(pulumi.CustomResource): """ ControllerRevision implements an immutable snapshot of state data. Clients are responsible for serializing and deserializing ...
2.21875
2
backend/python_scripts/feedback_frequency.py
bartaliskrisztian/sapifeedback
0
13780
<reponame>bartaliskrisztian/sapifeedback<filename>backend/python_scripts/feedback_frequency.py import sys import json import pandas as pd from datetime import datetime, timedelta import matplotlib.pyplot as plt import os import base64 def main(): # getting the array of feedback dates argv_tmp = eval(sys.argv[...
3.453125
3
tempest/tests/lib/services/placement/test_resource_providers_client.py
AurelienLourot/tempest
0
13781
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
1.453125
1
problems/095.py
JoshKarpel/Euler
1
13782
from problems import utils, mymath @utils.memoize def sum_proper_factors(n): return sum(mymath.proper_factorization(n)) def solve(): upper_bound = 1000000 chains = dict() for start_number in range(1, upper_bound): chain = [start_number] current_number = sum_proper_factors(start_num...
3.21875
3
core/utils.py
jojo23333/mcan-vqa
0
13783
<gh_stars>0 import copy import logging import re import torch import json from fvcore.common.checkpoint import ( get_missing_parameters_message, get_unexpected_parameters_message, ) from core.data.data_utils import ans_stat class HierarchicClassification(object): def __init__(self, __C): self.__C...
1.90625
2
spid_cie_oidc/entity/trust_chain_operations.py
peppelinux/spid-cie-oidc-authority
4
13784
import logging from django.utils import timezone from typing import Union from .exceptions import InvalidTrustchain, TrustchainMissingMetadata from .models import FetchedEntityStatement, TrustChain from .statements import EntityConfiguration, get_entity_configurations from .settings import HTTPC_PARAMS from .trust_ch...
2.078125
2
code.py
FoamyGuy/CircuitPython_CSV_TileMap_Game
1
13785
<filename>code.py import board import displayio import adafruit_imageload from displayio import Palette from adafruit_pybadger import PyBadger import time # Direction constants for comparison UP = 0 DOWN = 1 RIGHT = 2 LEFT = 3 # how long to wait between rendering frames FPS_DELAY = 1/30 # how many tiles can fit on t...
2.921875
3
tools/harness/tests/compiler-rt_builtins.py
Harvard-PRINCESS/barrelfish-trunk-mirror
4
13786
########################################################################## # Copyright (c) 2009, ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092...
2.046875
2
api_base.py
mpalazzolo/API-Base
0
13787
import requests from requests.exceptions import HTTPError import time class APIBase: """ This class is to be used as a base to build an API library. Authorization token generation and endpoint functions must be written """ def __init__(self, root, proxies=None, requests_session=True, max_retries...
3.484375
3
plasmasm/arch/X64.py
LRGH/plasmasm
1
13788
# Copyright (C) 2011-2020 Airbus, <EMAIL> containers = { 'ELF': 'X86_64', 'MACHO': 'X86_64' } try: from plasmasm.python.compatibility import set except ImportError: pass from plasmasm.arch.I386 import opcodes as opcodes_x86 x64_att_opcodes = set([ 'jmpq', 'callq', 'retq', 'popq', 'pushq', 'movq'...
1.445313
1
ansiblelater/rules/CheckScmInSrc.py
ankitdobhal/ansible-later
38
13789
from ansible.parsing.yaml.objects import AnsibleMapping from ansiblelater.standard import StandardBase class CheckScmInSrc(StandardBase): sid = "ANSIBLE0005" description = "Use `scm:` key rather than `src: scm+url`" helptext = "usage of `src: scm+url` not recommended" version = "0.1" types = ["r...
2.3125
2
DMOJ/CCC/slot machine.py
eddiegz/Personal-C
3
13790
<gh_stars>1-10 quarter=int(input()) p1=int(input()) p2=int(input()) p3=int(input()) time=0 while quarter>0: if quarter == 0: continue p1+=1 quarter-=1 time+=1 if p1==35: quarter+=30 p1=0 if quarter == 0: continue time+=1 p2+=1 ...
3.109375
3
project/app/migrations/0003_auto_20210125_0924.py
dbinetti/kidsallin
0
13791
# Generated by Django 3.1.5 on 2021-01-25 16:24 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0002_auto_20210124_0610'), ] operations = [ migrations.RenameModel( old_name='Parent', new_name='Account', ),...
1.648438
2
cinder/volume/drivers/emc/emc_vmax_provision.py
kazum/cinder
0
13792
<gh_stars>0 # Copyright (c) 2012 - 2014 EMC Corporation. # 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...
1.953125
2
tests/gold_tests/redirect/redirect_actions.test.py
cmcfarlen/trafficserver
1,351
13793
<gh_stars>1000+ ''' Test redirection behavior to invalid addresses ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # t...
2.65625
3
LynkCoHelper/lynco_regist_wrok.py
21haoshaonian/LynkCoHelper
0
13794
#!/usr/bin/python3 import threading import time import base64 from lynkco_app_request import lynkco_app_request from com.uestcit.api.gateway.sdk.auth.aes import aes as AES from sms_request import sms_request import json import sys import os import re class lynco_regist_wrok(threading.Thread): """新开线程处理任务""" d...
2.109375
2
acestream/ACEStream/Core/RequestPolicy.py
GrandPaRPi/p2ptv-pi
0
13795
<filename>acestream/ACEStream/Core/RequestPolicy.py #Embedded file name: ACEStream\Core\RequestPolicy.pyo from ACEStream.Core.simpledefs import * from ACEStream.Core.exceptions import * from ACEStream.Core.BitTornado.BT1.MessageID import * DEBUG = False MAX_QUERIES_FROM_RANDOM_PEER = 1000 class AbstractRequestPolicy: ...
2.09375
2
appserver.py
XplosiveX/webfortune
0
13796
<reponame>XplosiveX/webfortune<filename>appserver.py<gh_stars>0 from flask import Flask, render_template, request, session, redirect, url_for, jsonify, abort import os import subprocess import uuid app = Flask(__name__) app.secret_key = str(uuid.uuid4().hex) intropre = '<pre style="border:black solid 4px; border-radi...
2.34375
2
auth0/v3/test/management/test_stats.py
akmjenkins/auth0-python
340
13797
<filename>auth0/v3/test/management/test_stats.py import unittest import mock from ...management.stats import Stats class TestStats(unittest.TestCase): def test_init_with_optionals(self): t = Stats(domain='domain', token='<PASSWORD>', telemetry=False, timeout=(10, 2)) self.assertEqual(t.client.opt...
2.234375
2
JavPy/utils/common.py
generaljun/JavPy
1
13798
<reponame>generaljun/JavPy<gh_stars>1-10 import datetime import functools import re from typing import Iterable version = "0.6" def noexcept(lambda_expression, default=None, return_exception=False): try: res = lambda_expression() return res if not return_exception else (res, None) except Exce...
2.375
2
Foundry_Manager_v2.py
MrVauxs/Foundry-Selection-Menu
5
13799
import requests from bottle import route, run, template,ServerAdapter,redirect import subprocess from html.parser import HTMLParser import threading import time ssl_cert=None #XYZ - 'fullchain.pem' ssl_key=None #XYZ - 'privkey.pem' world_mapping={"URL_Path":["world-folder","Name To Be Shown"], "URL_Path2":["world-fo...
2.21875
2