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
utils/pascal_voc.py
hktxt/fasterrcnn
0
37000
import os import uuid import numpy as np from tqdm import tqdm import pickle from utils.config import opt from .voc_eval import voc_eval devkit_path = opt.voc_data_dir[:-8] year = opt.year def do_python_eval(classes, image_set, output_dir='output'): annopath = os.path.join( devkit_path, 'VOC' + ...
2.140625
2
indicators.py
abulte/python-influxdb-alerts
2
37001
"""Indicators to monitor""" import click from configparser import NoOptionError from query import Query from config import CONFIG class BaseIndicator(object): client = Query() # name of the metric in influxdb name = 'base_indicator' # unit (displays in alerts) unit = '' # alert when value g...
2.625
3
Project-4/python_template/mogEM.py
ybhan/Machine-Learning-Projects
0
37002
from kmeans import * import sys import matplotlib.pyplot as plt plt.ion() def mogEM(x, K, iters, minVary=0): """ Fits a Mixture of K Gaussians on x. Inputs: x: data with one data vector in each column. K: Number of Gaussians. iters: Number of EM iterations. minVary: minimum varianc...
3.28125
3
openbook_posts/migrations/0022_auto_20190311_1432.py
TamaraAbells/okuna-api
164
37003
<gh_stars>100-1000 # Generated by Django 2.2b1 on 2019-03-11 13:32 from django.db import migrations import imagekit.models.fields import openbook_posts.helpers class Migration(migrations.Migration): dependencies = [ ('openbook_posts', '0021_auto_20190309_1532'), ] operations = [ migrati...
1.546875
2
setup.py
AndersenLab/liftover-utils
7
37004
from setuptools import setup import glob setup(name='liftover.py', version='0.1', packages=['liftover'], description='C. elegans liftover utility', url='https://github.com/AndersenLab/liftover-utils', author='<NAME>', author_email='<EMAIL>', license='MIT', entry_points="...
1.40625
1
functions/include/serializer.py
xyclin/fluent
1,164
37005
# Copyright 2018 U.C. Berkeley RISE Lab # # 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 agree...
1.976563
2
tests/test_atom.py
mkowiel/restraintlib
0
37006
<gh_stars>0 # -*- coding: utf-8 -*- import math from unittest import TestCase from restraintlib.atom import Atom class AtomTestCase(TestCase): def setUp(self): self.atom = Atom('A', '100', 'DT', 'C2', ' ', (1.0, 0.2, 0.3), 1) self.atom2 = Atom('A', '100', 'DT', 'C3', ' ', (1.0, 1.0, 1.0), 2) ...
3.15625
3
QRARRAY.py
k205045/GreenTransAGV
0
37007
from PIL import Image, ImageDraw, ImageFilter from PIL import ImageFont from os import listdir from os.path import isfile, join #QRcode拼貼 mypath = "QRcodefloder" # im = Image.open("advanceduse.png") list = [] onlyfiles = [ f for f in listdir(mypath) if isfile(join(mypath,f)) ] print(onlyfiles) for onlyfile in onlyfiles...
2.875
3
vaksina/person.py
Guiorgy/vaksina
39
37008
# Copyright (c) 2022 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, ...
2.578125
3
tests/integration/test_breakpoint_step.py
benjamintemitope/SublimeTextXdebug
344
37009
import os try: from xdebug.unittesting import XdebugDeferrableTestCase except: from SublimeTextXdebug.xdebug.unittesting import XdebugDeferrableTestCase class TestBreakpointStep(XdebugDeferrableTestCase): breakpoint_step_file = 'breakpoint_step.php' breakpoint_step_file_local_path = os.path.join(Xdebu...
2.234375
2
tests/test_settings.py
wegostudio/wegq
0
37010
import unittest from wework import settings, wechat class TestSettings(unittest.TestCase): def test_init(self): t = settings.init( CROP_ID='a', PROVIDER_SECRET='a', REGISTER_URL='www.quseit.com/', HELPER='wegq.DjangoHelper' ) self.assertTrue(...
2.75
3
icevision/models/ultralytics/yolov5/fastai/learner.py
ai-fast-track/mantisshrimp
580
37011
<filename>icevision/models/ultralytics/yolov5/fastai/learner.py __all__ = ["learner"] from icevision.imports import * from icevision.engines.fastai import * from icevision.models.ultralytics.yolov5.fastai.callbacks import Yolov5Callback from yolov5.utils.loss import ComputeLoss def learner( dls: List[Union[DataL...
2.1875
2
v0.5/training/image_classification/train.py
PhilippvK/tiny
148
37012
<gh_stars>100-1000 ''' MLCommons group: TinyMLPerf (https://github.com/mlcommons/tiny) image classification on cifar10 train.py desc: loads data, trains and saves model, plots training metrics ''' import numpy as np import matplotlib.pyplot as plt import pickle import tensorflow as tf from keras.callbacks import Lea...
2.984375
3
setup.py
mchalek/timetools
0
37013
from distutils.core import setup setup( name = 'timetools', version = '1.0.0', description = 'CL tools for timestamps', author = '<NAME>', author_email = '<EMAIL>', url = 'https://github.com/mchalek/timetools', scripts = [ 'bin/now', 'bin/...
0.996094
1
src/tests/web/web_auth_utils_test.py
tomgilbertson/script-server-v1
833
37014
from unittest import TestCase from parameterized import parameterized from tests.test_utils import mock_request_handler from web.web_auth_utils import remove_webpack_suffixes, is_allowed_during_login class WebpackSuffixesTest(TestCase): def test_remove_webpack_suffixes_when_css(self): normalized = remov...
2.609375
3
home/migrations/0020_remove_comment_content_type.py
yys534640040/blog
0
37015
# Generated by Django 3.0.5 on 2020-07-03 20:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('home', '0019_comment_content_type'), ] operations = [ migrations.RemoveField( model_name='comment', name='content_type', ...
1.335938
1
maldives/bot/models/price.py
filipecn/maldives
1
37016
from datetime import datetime class Price: date: datetime = datetime(1, 1, 1) currency: str = 'BRL' symbol: str = '' current: float = 0 open: float = 0 close: float = 0 low: float = 0 high: float = 0 volume: float = 0 interval: str = '' def __init__(self, **kwargs): ...
3.15625
3
components/collector/src/source_collectors/trello/base.py
kargaranamir/quality-time
33
37017
<filename>components/collector/src/source_collectors/trello/base.py """Trello metric collector base classes.""" from abc import ABC from base_collectors import SourceCollector from collector_utilities.type import URL from model import SourceResponses class TrelloBase(SourceCollector, ABC): # pylint: disable=abstra...
2.578125
3
keylib/private_key.py
Wealize/keylib-py
10
37018
# -*- coding: utf-8 -*- """ pybitcoin ~~~~~ :copyright: (c) 2014 by Halfmoon Labs :license: MIT, see LICENSE for more details. """ import os import json import hashlib import ecdsa from binascii import hexlify, unhexlify from ecdsa.keys import SigningKey from .key_formatting import compress, encode_p...
2.40625
2
testcase/T_requests.py
jacktan1016/InnerAutoTest_W
0
37019
import json import requests from utils.RequestsUtil import RequestsUtil from config.Conf import ConfYaml import os request_util = RequestsUtil() conf = ConfYaml() def login(): url = os.path.join(conf.get_yaml_data(),"authorizations/") # url = "http://192.168.3.11:8064/authorizations/" data = {"username":...
2.53125
3
pluto_navigation/scripts/wait_for_goal.py
SabrinaFrohn/mesh_navigation
0
37020
<reponame>SabrinaFrohn/mesh_navigation import rospy import smach import threading from geometry_msgs.msg import PoseStamped class WaitForGoal(smach.State): def __init__(self): smach.State.__init__(self, outcomes=['received_goal', 'preempted'], input_keys=[], output_keys=['target_pose']) self.targ...
2.296875
2
filesystems/click.py
Julian/Filesystems
2
37021
<reponame>Julian/Filesystems<gh_stars>1-10 """ Click support for `filesystems.Path`. """ from __future__ import absolute_import import click import filesystems class Path(click.ParamType): name = "path" def convert(self, value, param, context): if not isinstance(value, str): return va...
2.453125
2
equilibrium-propagation/numpy_one_layer.py
jiangdaniel/dl-papers
1
37022
#!/usr/bin/env python3 from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import numpy as np import torch as th import torchvision from tqdm import tqdm def main(args): trainloader, testloader = get_loaders(args.batch_size, args.fashion)...
2.296875
2
atc53/rule/weighted.py
cloudtools/atc53
3
37023
<filename>atc53/rule/weighted.py from atc53 import BaseAWSObject, AWSProperty class WeightedItem(AWSProperty): props = { 'EndpointReference': (basestring, False), 'RuleReference': (basestring, False), 'Weight': (basestring, True), 'EvaluateTargetHealth': (bool, False), 'Hea...
2.6875
3
radiation/python/scripts/record_random_walk.py
dfridovi/exploration
5
37024
<filename>radiation/python/scripts/record_random_walk.py """ Copyright (c) 2015, The Regents of the University of California (Regents). 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. Redistributi...
1.875
2
setup.py
nokx5/speedo
0
37025
#!/usr/bin/env python # mypy: ignore-errors # # # Speedo # # import os from setuptools import setup, find_namespace_packages from speedo_common.version import speedo_version as __version__ def get_requirements(filename: str): """Build the requirements list from the filename""" requirements_list = [] wit...
2.171875
2
model.py
NerdToMars/Fringe-pattern-denoising-based-on-deep-learning
5
37026
""" This script demonstrates the use of a convolutional LSTM network. This network is used to predict the next frame of an artificially generated movie which contains moving squares. """ from keras.models import Sequential from keras.layers.convolutional import Conv3D from keras.layers.convolutional_recurrent import Co...
3.484375
3
Advent2019/14.py
SSteve/AdventOfCode
0
37027
<gh_stars>0 #I couldn't figure this one out so I copied the solution from https://github.com/joelgrus/advent2019/blob/master/day14/day14.py from __future__ import annotations import math import re from collections import defaultdict from typing import Iterable, List, NamedTuple, Dict REACTIONS1 = """10 ORE => 10 A 1...
2.515625
3
crawler/views.py
kuna/twfavcrawler
0
37028
<reponame>kuna/twfavcrawler from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from models import * import twitter # ------------------------------- def main(request): return render(request, "main.htm") # if not logined, then go to auth page fir...
2.421875
2
Test/test.py
ed-chin-git/Utils_edchin
0
37029
# ====================================================== # Packaging Python Projects Tutorial : https://packaging.python.org/tutorials/packaging-projects/ # # Installation : # pip install -i https://test.pypi.org/simple/ utils-edchin # # # =================================================================== # Imp...
3.046875
3
app/api/api_test.py
optimuspaul/sensei
0
37030
import unittest from datetime import datetime, timedelta import json from ..main import create_app from base64 import b64encode from ..models import * class ApiTestCase(unittest.TestCase): def setUp(self): # Configure app and create a test_client app = create_app('app.config.TestConfig') ap...
2.578125
3
reqlog/__main__.py
JFF-Bohdan/reqlog
0
37031
<reponame>JFF-Bohdan/reqlog<filename>reqlog/__main__.py import os import sys import bottle base_module_dir = os.path.dirname(sys.modules[__name__].__file__) try: import reqlog # noqa: F401 # need to check import possibility except ImportError: path = base_module_dir path = os.path.join(path, ...
1.835938
2
bchscript/__init__.py
gandrewstone/bchscript
7
37032
<gh_stars>1-10 from bchscript.bchutil import BCH_TESTNET, BCH_MAINNET, BCH_REGTEST, bitcoinAddress2bin from bchscript.bchscript import compile, script2hex, script2bin, prettyPrint def mode(m): global BCH_ADDRESS_PREFIX BCH_ADDRESS_PREFIX = m # print("setting bch network to '%s'" % BCH_ADDRESS_PREFIX) __...
2.109375
2
djangobbs/uploads/exif.py
JuanbingTeam/djangobbs
0
37033
<gh_stars>0 # Library to extract EXIF information in digital camera image files # # To use this library call with: # f=open(path_name, 'rb') # tags=EXIF.process_file(f) # tags will now be a dictionary mapping names of EXIF tags to their # values in the file named by path_name. You can process the tags # a...
2.84375
3
Introducao python/exercicios/ex009.py
Luis12368/python
0
37034
n = int(input('Insira um número: ')) print('_' * 12) print(f'{n} X 1 = {n*1}') print(f'{n} X 2 = {n*2}') print(f'{n} X 3 = {n*3}') print(f'{n} X 4 = {n*4}') print(f'{n} X 5 = {n*5}') print(f'{n} x 6 = {n*6}') print(f'{n} X 7 = {n*7}') print(f'{n} X 8 = {n*8}') print(f'{n} X 9 = {n*9}') print(f'{n} X 10 = {n*10...
4.03125
4
setup.py
GSri30/Disbot
0
37035
from setuptools import setup, find_packages with open('README.md') as readme_file: README=readme_file.read() with open('HISTORY.md') as history_file: HISTORY=history_file.read() setup_args=dict( name='DisBot', version='1.0', description='Tool to create a quick new discord.py bot', long_descri...
1.59375
2
simple_help/__init__.py
DCOD-OpenSource/django-simple-help
3
37036
# -*- coding: utf-8 -*- # django-simple-help # simple_help/__init__.py from __future__ import unicode_literals __all__ = [ "default_app_config", ] default_app_config = "simple_help.apps.Config"
1.226563
1
avanza/avanza_socket.py
jonasoreland/avanza
0
37037
import asyncio import logging import json import websockets from typing import Any, Callable, Sequence from .constants import ( ChannelType ) WEBSOCKET_URL = 'wss://www.avanza.se/_push/cometd' logger = logging.getLogger("avanza_socket") class AvanzaSocket: def __init__(self, push_subscription_id, cookies):...
2.578125
3
app/auth/routes.py
oldcryptogeek/coinjerk-btcp
8
37038
<filename>app/auth/routes.py from flask import jsonify, request, current_app from app import db from app.auth import auth from app.models import User from datetime import datetime, timedelta import jwt @auth.route("/login", methods=['POST']) def login(): data = request.get_json() user = User.authenticate(**...
2.625
3
event/io/dataset/richere.py
edvisees/DDSemantics
0
37039
import logging import os import xml.etree.ElementTree as ET from collections import defaultdict from event.io.dataset.base import ( Span, DataLoader, DEDocument, RelationMention, ) class RichERE(DataLoader): def __init__(self, params, corpus, with_doc=False): super().__init__(params, corp...
2.171875
2
cfc-parser.py
FIFCOM/codeforces-contests-parser
0
37040
<reponame>FIFCOM/codeforces-contests-parser import os import urllib.request import json import datetime from prettytable import PrettyTable contest_url = "https://codeforces.com/api/contest.list" cur_timestamp = int(datetime.datetime.now().timestamp()) def get_contest_list(): response = urllib.request.urlopen(con...
3.1875
3
src/main/python/util/java_runner.py
gsj601/ggp-hardware
0
37041
<reponame>gsj601/ggp-hardware<filename>src/main/python/util/java_runner.py<gh_stars>0 """java_runner A module for helping you run java as an external process. """ # Local libraries import config_help # Standard Imports import subprocess # Setting up logging: # https://docs.python.org/2/howto/logging.html#configuring...
2.96875
3
tests/test_fill.py
NioGreek/Clashgap
2
37042
<gh_stars>1-10 import clashgap as cg def test_fill(): assert cg.fill([["sp", "h"], "am"]) == ["spam", "ham"]
1.929688
2
Python/stack.py
uday256071/DataStructures-and-Algorithms
0
37043
class Stack(): def __init__(self): self.items=[] def isEmpty(self): return self.items==[] def push(self,item): self.items.append(item) def pop(self): return self.items.pop() def peek(self): return self.items[-1] def size(self): return len(self.item...
3.71875
4
examples/util/rectangular_binner.py
CU-NESS/pylinex
0
37044
""" File: examples/util/rectangular_binner.py Author: <NAME> Date: 22 Sep 2018 Description: Example script showing the use of the RectangularBinner class. """ from __future__ import division import numpy as np import matplotlib.pyplot as pl from pylinex import RectangularBinner fontsize = 24 num_old_x_values = 1000 ...
3.109375
3
setup.py
gardsted/bulmate
0
37045
__license__ = open('LICENSE').read() version = open('VERSION').read() from setuptools import setup long_description = open('README.md').read() setup( name = 'bulmate', version = version, author = 'gardsted', author_email = '<EMAIL>', license = 'MIT', url = 'https://github.com/gardsted/bulmate/', ...
1.34375
1
mindhome_alpha/erpnext/selling/page/sales_funnel/sales_funnel.py
Mindhome/field_service
1
37046
<gh_stars>1-10 # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from erpnext.accounts.report.utils import convert import pandas as pd def validate_filters(from_date...
2.21875
2
ns/nxml.py
kentnf/noschema
0
37047
#!/usr/bin/python3 ''' parse large XML files which stores funtional annotations of features infact, we do not need xml module such as SAX at here ''' import sys # import datetime ''' re_match_tag -- using regexp to match tag of xml string: line of xml file tag: <tag> or </tag> status: 0 or 1, 0 match start, 1 ...
3.59375
4
CodesComplete/Alura/DesignPatterns/calculador_de_impostos.py
vinimmelo/python
0
37048
class Calculador_de_impostos: def realiza_calculo(self, orcamento, imposto): imposto_calculado = imposto.calcula(orcamento) print(imposto_calculado) if __name__ == '__main__': from orcamento import Orcamento, Item from impostos import ISS, ICMS, ICPP, IKCV orcamento = Orcamento() ...
2.890625
3
pyy1/.pycharm_helpers/python_stubs/-1550516950/_dbus_bindings/SignalMessage.py
pyy1988/pyy_test1
0
37049
<reponame>pyy1988/pyy_test1<filename>pyy1/.pycharm_helpers/python_stubs/-1550516950/_dbus_bindings/SignalMessage.py<gh_stars>0 # encoding: utf-8 # module _dbus_bindings # from /usr/lib/python3/dist-packages/_dbus_bindings.cpython-35m-x86_64-linux-gnu.so # by generator 1.145 """ Low-level Python bindings for libdbus. Do...
1.976563
2
examples3/sac/visualize_deepmind.py
lgvaz/torchrl
5
37050
<gh_stars>1-10 import torch, torch.nn as nn, numpy as np import reward as rw, reward.utils as U from dm_control import suite, viewer DEVICE = U.device.get() class PolicyNN(nn.Module): def __init__(self, n_in, n_out, hidden=256, activation=nn.ReLU, logstd_range=(-20, 2)): super().__init__() self.lo...
2.203125
2
evaluator/evaluate_model.py
k-chuang/code-generation-from-images
5
37051
import sys sys.path.extend(['..']) import tensorflow as tf config = tf.ConfigProto(log_device_placement=False) config.gpu_options.allow_growth = True sess = tf.Session(config=config) from generator.generate_code import * from nltk.translate.bleu_score import corpus_bleu from config.config import * from base.BaseModel...
2.296875
2
populate/populate.py
vascoalramos/roomie
0
37052
from faker import Faker import os, random, requests, json fake = Faker() BASE_URL = "http://localhost:8083/api" cities = [ "Braga", "Viseu", "Porto", "Lisboa", "Guimarães", "Leiria", "Coimbra", "Santarém", "Guarda", "Aveiro", "Faro", "Portimão", "Beja", "Évora...
2.625
3
python/deploy-cpu-alarms.py
earthlab/aws-ops
1
37053
# Deploy idle CPU alarms to stop EC2 instances import boto3 account_id = boto3.client("sts").get_caller_identity().get("Account") region = boto3.session.Session().region_name client = boto3.client("cloudwatch") ec = boto3.client("ec2") reservations = ec.describe_instances() exceptions = ["prf-"] for r in reservation...
2.46875
2
Exam/oppgave_2.py
Chillu1/PythonUiS
0
37054
<gh_stars>0 import turtle def stjerne(størrelse): for i in range(24): turtle.forward(størrelse) turtle.backward(størrelse) turtle.right(15) def tegn_stjerner(stjerner): turtle.speed(0) for i in range(4): for i in range(stjerner-1):#Ramme stjerne(10) ...
3.203125
3
YatzyPy/tests.py
markomanninen/YatzyPy
0
37055
<filename>YatzyPy/tests.py # tests.py from . main import Yatzy def runTests(): c = Yatzy([5, 5, 6, 5, 6]) s = c.getScoreTable() assert s['change'] == 27 and s['fullhouse'] == 27 assert s['double'] == 12 and s['six'] == 12 assert s['five'] == 15 and s['triple'] == 15 assert s['pair'] == 22 ...
2.78125
3
main/libx11/update.py
RoastVeg/cports
46
37056
pkgname = "libX11"
1.015625
1
raiden/tests/integration/test_version.py
anmolshl/raiden
0
37057
import pytest import tempfile import re import os import shutil from raiden.utils import get_contract_path from raiden.utils.solc import compile_files_cwd from raiden.exceptions import ContractVersionMismatch from raiden.blockchain.abi import CONTRACT_VERSION_RE, CONTRACT_MANAGER, CONTRACT_CHANNEL_MANAGER def repla...
2.203125
2
quex/engine/state_machine/algebra/TESTS/additional_laws/TEST/complement-relative.py
smmckay/quex-mirror
0
37058
import os import sys sys.path.insert(0, os.environ["QUEX_PATH"]) from quex.engine.state_machine.core import DFA from quex.engine.state_machine.algebra.TESTS.helper import test2, test1, test3, union, \ intersection, \ ...
2.34375
2
Pyrado/scripts/sandbox/sb_mg.py
theogruner/SimuRLacra
52
37059
# Copyright (c) 2020, <NAME>, Honda Research Institute Europe GmbH, and # Technical University of Darmstadt. # 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 mus...
1.21875
1
src/leetcode_43_multiply_strings.py
sungho-joo/leetcode2github
0
37060
# @l2g 43 python3 # [43] Multiply Strings # Difficulty: Medium # https://leetcode.com/problems/multiply-strings # # Given two non-negative integers num1 and num2 represented as strings, # return the product of num1 and num2,also represented as a string. # Note: You must not use any built-in BigInteger library or conver...
4.03125
4
examples/helpers/post/unlike.py
javad94/instauto
79
37061
from instauto.api.client import ApiClient from instauto.helpers.post import unlike_post client = ApiClient.initiate_from_file('.instauto.save') unlike_post(client, "media_id")
1.609375
2
Fund/main.py
livi2000/FundSpider
0
37062
# -*- coding: utf-8 -*- from url_manager import * from downloader import * from parser import * from collector import * from url_manager import FundURLIndex class FundMain(object): def __init__(self): self.url_manager = FundURLManager() self.html_downloader = FundDownloader() self.html_pas...
2.765625
3
scenario/run.py
Abdelmouise/covid-19-pandemic-simulation
3
37063
import random import sys import time from scenario.example import sc1_simple_lockdown_removal, sc2_yoyo_lockdown_removal, sc0_base_lockdown, \ scx_base_just_a_flu, sc3_loose_lockdown, sc4_rogue_citizen, sc5_rogue_neighborhood, sc6_travelers from simulator.constants.keys import scenario_id_key, random_seed_key, dra...
2.234375
2
apps/wiki/admin.py
karpiq24/django-klima-kar
2
37064
<gh_stars>1-10 from django.contrib import admin from apps.wiki.models import Article, Tag, ExternalLink, ArticleFile admin.site.register(Article) admin.site.register(Tag) admin.site.register(ExternalLink) admin.site.register(ArticleFile)
1.367188
1
code/arrange-fastq.py
jdblischak/dox
4
37065
<gh_stars>1-10 #!/usr/bin/env python3 # Move and rename fastq files downloaded from FGF's FTP site. # # Usage: # # python3 arrange-fastq.py indir outdir # # indir - Highly nested directory structure from downloading data # outdir - New output directory (created if does not exist) # # Ex: # # python3 arrange-fastq.py f...
2.640625
3
sosia/establishing/__init__.py
sosia-dev/sosia
14
37066
<gh_stars>10-100 from sosia.establishing.config import * from sosia.establishing.constants import * from sosia.establishing.database import * from sosia.establishing.fields_sources import *
1.210938
1
3.py
guillesiesta/python_comprehensions
0
37067
<gh_stars>0 hola = True adiosguillermomurielsanchezlafuente = True if (adiosguillermomurielsanchezlafuente and hola): print("ok con nombre muy largo")
2.328125
2
problemas/1100/1144.py
filimor/uri-online-judge
10
37068
<gh_stars>1-10 for i in range(1, int(input()) + 1): quadrado = i ** 2 cubo = i ** 3 print(f'{i} {quadrado} {cubo}') print(f'{i} {quadrado + 1} {cubo + 1}')
3.296875
3
source/origo_scrape/views.py
yinm8315/Origo_Scrape
1
37069
# Create your views here. from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login from django.contrib.auth.models import User from django.template import loader from django.forms.utils import ErrorList from django.http import HttpResponse from .origo import Origo_Thread from .o...
1.96875
2
sharpy/postproc/plotflowfield.py
ACea15/sharpy
80
37070
<gh_stars>10-100 import os import numpy as np from tvtk.api import tvtk, write_data from sharpy.utils.solver_interface import solver, BaseSolver import sharpy.utils.generator_interface as gen_interface import sharpy.utils.settings as settings import sharpy.aero.utils.uvlmlib as uvlmlib import ctypes as ct from sharpy.u...
2.171875
2
what_apps/do/functions.py
SlashRoot/WHAT
0
37071
<reponame>SlashRoot/WHAT from .models import Task from django.contrib.auth.models import User from django.template import loader, Context def get_tasks_in_prototype_related_to_object(prototype_id, object): from django.contrib.contenttypes.models import ContentType user_contenttype = ContentType.objects.get_fo...
1.945313
2
distriploy/github.py
exmakhina/distriploy
1
37072
#!/usr/bin/env python # -*- coding: utf-8 vi:et import sys, io, os, logging import re import json import tempfile import subprocess import urllib.request, urllib.error logger = logging.getLogger(__name__) __all__ = ( "get_remote", "create_release", "download_default_release_asset", "upload_release_asset", "u...
2.421875
2
src/foxdot/sandbox/180823_0948_compo_036.py
Neko250/aisthesis
4
37073
Scale.default = Scale.chromatic Root.default = 0 Clock.bpm = 120 var.ch = var(P[1,5,0,3],8) ~p1 >> play('m', amp=.8, dur=PDur(3,8), rate=[1,(1,2)]) ~p2 >> play('-', amp=.5, dur=2, hpf=2000, hpr=linvar([.1,1],16), sample=1).often('stutter', 4, dur=3).every(8, 'sample.offadd', 1) ~p3 >> play('{ ppP[pP][Pp]}', amp=.8,...
1.710938
2
test/unit/report/test_table.py
colibri-coruscans/pyGSTi
73
37074
from pygsti.report.table import ReportTable from ..util import BaseCase class TableInstanceTester(BaseCase): custom_headings = { 'html': 'test', 'python': 'test', 'latex': 'test' } def setUp(self): self.table = ReportTable(self.custom_headings, ['Normal'] * 4) # Four form...
2.359375
2
pyFunc/pyFunc_12.py
pemtash/pyrevision2022
0
37075
def namedArgumentFunction(a, b, c): print("the values are a: {}, b: {}, c: {}".format(a,b,c)) namedArgumentFunction(100, 200, 300) # positional arguments namedArgumentFunction(c=3, a=1, b=2) # named arguments #namedArgumentFunction(181, a=102, b=103) # mix of position + name error namedArgumentFunction(101...
3.1875
3
views.py
ezl/hnofficehours
2
37076
from django.contrib.auth.models import User from datetime import datetime, timedelta from django.core.urlresolvers import reverse from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.views.generic.simple im...
2.0625
2
declarative/properties/__init__.py
jrollins/python-declarative
6
37077
<filename>declarative/properties/__init__.py # -*- coding: utf-8 -*- """ """ from __future__ import ( division, print_function, absolute_import, ) from .bases import ( PropertyTransforming, HasDeclaritiveAttributes, InnerException, PropertyAttributeError, ) from .memoized import ( memo...
1.804688
2
src/models.py
TahjidEshan/keras-3dgan
22
37078
from keras.models import Model from keras.layers import Input from keras.layers.core import Activation from keras.layers.convolutional import Conv3D, Deconv3D from keras.layers.advanced_activations import LeakyReLU from keras.layers.normalization import BatchNormalization def generator(phase_train=True, params={'z_siz...
2.75
3
statmail/Types.py
birm/StatMail
0
37079
<reponame>birm/StatMail from .SMBase import SMBase """ A collection of builtin server types. """ class Types(SMBase): """A class for keeping track of all types supported.""" # TODO read from files later for types, but for now... supported = ["minimal"] @classmethod def supported(self, stype): ...
2.421875
2
k8skiller.py
ech0png/k8skiller
0
37080
<filename>k8skiller.py import urllib3 from art import * from terminaltables import AsciiTable from vulnsVerify import * from podTable import * from listarPods import * from menu import * from shells import * from podDeploy import * urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) tprint("K8SKILLE...
2.78125
3
pokershell/intro.py
fblaha/pokershell
6
37081
<reponame>fblaha/pokershell<filename>pokershell/intro.py import prettytable def _create_intro(): intro_head = """ Texas hold'em command line calculator and simulator. Simulation command example: JdJc 6 0.2; QdAc8h 4 1.0; Jh 1.5; 2h 3 3.2 """ token_col = 'Line Tokens' explanation_col = 'Explanation' t...
3.515625
4
tests/archive/test_archive_value.py
heikomuller/histore
2
37082
<filename>tests/archive/test_archive_value.py # This file is part of the History Store (histore). # # Copyright (C) 2018-2021 New York University. # # The History Store (histore) is released under the Revised BSD License. See # file LICENSE for full license details. """Unit test for archived cell values.""" import py...
2.5625
3
server/src/api/api_environment.py
SpongeyBob/ALFRED
0
37083
# Add paths toward dependecies in different subdirectories import os import sys sys.path.append(os.path.abspath('./drone')) sys.path.append(os.path.abspath('./log')) # Add dependencies from drone_list import DroneList from environment import Environment from setup_logging import LogsConfig logsConfig = LogsConfig() l...
2.125
2
jts/backend/event/migrations/0002_auto_20191009_1119.py
goupaz/babylon
1
37084
<filename>jts/backend/event/migrations/0002_auto_20191009_1119.py<gh_stars>1-10 # Generated by Django 2.2 on 2019-10-09 18:19 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ...
1.453125
1
fennlp/layers/albert_transformer.py
transformerzhou/NLP
1
37085
<reponame>transformerzhou/NLP<filename>fennlp/layers/albert_transformer.py #! usr/bin/env python3 # -*- coding:utf-8 -*- """ @Author:zhoukaiyin """ import tensorflow as tf from fennlp.tools import create_initializer from .attention import ALBERTAttention from fennlp.layers import dense class AlbertTransformer(tf.kera...
2.421875
2
ansiblemetrics/playbook/num_included_vars.py
radon-h2020/AnsibleMetrics
1
37086
import ansiblemetrics.utils as utils from ansiblemetrics.ansible_metric import AnsibleMetric class NumIncludedVars(AnsibleMetric): """ This class measures the number of included variables in a playbook. """ def count(self): """Return the number of included variables. Example ----...
2.953125
3
predict.py
smacawi/tweet-classifier
0
37087
from allennlp.data.vocabulary import Vocabulary from content_analyzer.models.rnn_classifier import RnnClassifier from allennlp.data.tokenizers.word_tokenizer import WordTokenizer from content_analyzer.data.dataset_readers.twitter import TwitterNLPDatasetReader from allennlp.data.token_indexers import PretrainedBertInde...
2.421875
2
mmur/viz/generators.py
RUrlus/ModelMetricUncertaintyResearch
0
37088
import math import numpy as np from scipy.special import expit, logit import matplotlib.pyplot as plt from mmur.viz import _set_plot_style COLORS = _set_plot_style() def plot_logstic_dgp(N=500, figsize=None): """Plot example of DGP as used in mmur.generators.LogisticGenerator. Parameters ---------- ...
2.78125
3
src/robust_deid/sequence_tagging/models/hf/crf/crf_bert_model_for_token_classification.py
obi-ml-public/ehr_deidentification
0
37089
<gh_stars>0 from transformers import ( BertConfig, BertForTokenClassification, ) from .conditional_random_field_sub import ConditionalRandomFieldSub from .crf_token_classifier_output import CRFTokenClassifierOutput class CRFBertModelForTokenClassification(BertForTokenClassification): def __init__( ...
2.375
2
Python_ch8/Ch8_1_String_Op.py
ninhnguyen01/Python_Book
0
37090
# Basic String Operations (Title) # Reading # Iterating over a String with the 'for' Loop (section) # General Format: # for variable in string: # statement # statement # etc. name = 'Juliet' for ch in name: print(ch) # This program counts the number of times the letter T # ...
4.25
4
moto/elb/__init__.py
argos83/moto
1
37091
from __future__ import unicode_literals from .models import elb_backends from ..core.models import MockAWS, base_decorator elb_backend = elb_backends['us-east-1'] mock_elb = base_decorator(elb_backends)
1.546875
2
contenttype/tree/TestStandardTree_BlackBox.py
ytyaru/GitHub.Uploader.ContentType.201705020847__old
0
37092
import unittest from SubTypeTree import SubTypeTreeFactory from SubTypeTree import VenderTreeFactory from SubTypeTree import SubTypeTree from SubTypeTree import VenderTree from SubTypeTree import GitHubVenderTree from SubTypeTree import StandardTree from SubTypeTree import ParsonalTree from SubTypeTree import Unregiste...
2.078125
2
ade25/widgets/widgets/image/image.py
ade25/ade25.widgets
0
37093
<gh_stars>0 # -*- coding: utf-8 -*- """Module providing base widget""" import uuid import uuid as uuid_tool from Acquisition import aq_inner from Products.Five import BrowserView from ade25.widgets.interfaces import IContentWidgets from plone import api from plone.api.exc import MissingParameterError class WidgetIma...
1.90625
2
tests/test_tie_point_grid.py
Vasudha-AiDash/arosics
0
37094
<filename>tests/test_tie_point_grid.py<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # AROSICS - Automated and Robust Open-Source Image Co-Registration Software # # Copyright (C) 2017-2021 # - <NAME> (GFZ Potsdam, <EMAIL>) # - Helmholtz Centre Potsdam - GFZ German Research Centre for Geosciences Potsdam, # ...
1.84375
2
tests/system/action/meeting/test_delete_all_speakers_of_all_lists.py
MJJojo97/openslides-backend
0
37095
<filename>tests/system/action/meeting/test_delete_all_speakers_of_all_lists.py from openslides_backend.permissions.permissions import Permissions from tests.system.action.base import BaseActionTestCase class MeetingDeleteAllSpeakersOfAllListsActionTest(BaseActionTestCase): def setUp(self) -> None: super()...
2.25
2
jpyextra/__init__.py
metal3d/jupyter-extra
0
37096
<filename>jpyextra/__init__.py import subprocess from IPython.display import HTML, display name = "jpyextra" def datadoc(data): """ Display sklearn dataset DESCR in well formed Markdown You need "pandoc" tool. Install it with conda, or with your package manager. """ doc = data.DESCR.replace('%PL...
2.625
3
backend/core/introduction_to_algorithms/logics/catalog.py
kehuo/myweb
0
37097
<reponame>kehuo/myweb<filename>backend/core/introduction_to_algorithms/logics/catalog.py # @File: catalog.py # @Author: <NAME> # @LastUpdate: 4/10/2020 10:13 AM import json from common.utils.http import load_json_file from core.introduction_to_algorithms.logics.replace_n_to_br import replace_n_to_br_func # 因为python m...
1.992188
2
editregions/tests/contrib/embeds/forms.py
kezabelle/django-editregions
1
37098
# -*- coding: utf-8 -*- from django.forms.models import modelform_factory try: from unittest.case import TestCase, expectedFailure except ImportError: from django.utils.unittest.case import TestCase, expectedFailure from django_ace import AceWidget from editregions.contrib.embeds.forms import JavaScriptEditorFo...
2.203125
2
overplot.py
EmlynG/LowFMode
0
37099
from __future__ import print_function import sys import os import re import numpy as np import subprocess from matplotlib import pyplot as plt inputpath = os.path.join(os.path.realpath('..'),'INPUT/') print("Initialising") fig, ax = plt.subplots() n=0 for filenum in ['INPUT/0.txt','INPUT/1.txt','INPUT/2.txt']: os.ren...
2.453125
2