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
build_fake_image__build_exe/__injected_code.py
DazEB2/SimplePyScripts
117
12788651
<reponame>DazEB2/SimplePyScripts import os.path from pathlib import Path file_name = Path(os.path.expanduser("~/Desktop")).resolve() / "README_YOU_WERE_HACKED.txt" file_name.touch(exist_ok=True)
2.265625
2
tests/fixtures/simple_app.py
ravenac95/flask-command
4
12788652
<gh_stars>1-10 from flaskcommand import flask_command from flask import Flask app = Flask(__name__) @app.route('/') def index(): return "hello, there" main = flask_command(app) if __name__ == '__main__': main()
2.3125
2
server/utils/read_data.py
RaulRomani/Interactive-Data-Projection
1
12788653
import pandas as pd import numpy as np dataset_name = "Caltech" relative = "../../../" df = pd.read_csv(relative + "datasets/" + dataset_name + '/'+ dataset_name + '.csv', sep=";", header=None) df = df.drop(0, 1) print(df.describe()) print(df.nunique()) print(df.head()) print(df.shape) df[11] = pd.Categorical...
3.03125
3
sso/user/migrations/0033_serviceemailaddress.py
uktrade/staff-sso
7
12788654
# Generated by Django 2.2.13 on 2020-07-07 17:18 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ( "samlidp", "0003_samlapplication_allow_access_by_email_suffix_squashed_0004_auto_20200420_1246", ...
1.78125
2
CalibTracker/SiStripCommon/python/ShallowGainCalibration_cfi.py
ckamtsikis/cmssw
852
12788655
<reponame>ckamtsikis/cmssw<filename>CalibTracker/SiStripCommon/python/ShallowGainCalibration_cfi.py import FWCore.ParameterSet.Config as cms shallowGainCalibration = cms.EDProducer("ShallowGainCalibration", Tracks=cms.InputTag("generalTracks",""), ...
1.125
1
ipyannotations/images/canvases/image_utils.py
janfreyberg/ipyannotate
19
12788656
<filename>ipyannotations/images/canvases/image_utils.py import io import pathlib import re import typing from dataclasses import dataclass from functools import singledispatch, wraps from typing import Any, Callable, Optional, Sequence, Tuple import ipywidgets as widgets import numpy as np from ipycanvas import Canvas...
2.765625
3
Python/Algorithm/5.Tree.py
LilyYC/legendary-train
0
12788657
"""Tree Practice === Module description === - Task 1, which contains one Tree method to implement. - Task 2, which asks you to implement two operations that allow you to convert between trees and nested lists. - Task 3, which asks you to learn about and use a more restricted form of trees known as *binary t...
4.28125
4
workstation-backend/account/urls.py
cindy21td/WorkStation
0
12788658
from django.urls import path from .views import RegisterView urlpatterns = [ path("register", RegisterView.as_view(), name="account-register"), ]
1.492188
1
Week 1 Exercises/vara_varb.py
parkerbxyz/MITx-6.00.1x-2T2019a
1
12788659
<reponame>parkerbxyz/MITx-6.00.1x-2T2019a if type(varA) is str or type(varB) is str: print('string involved') elif varA == varB: print('equal') elif varA > varB: print('bigger') elif varA < varB: print('smaller')
3.609375
4
ufits.py
zhongmicai/ITS_clustering
1
12788660
#!/usr/bin/env python #Wrapper script for UFITS package. import sys, os, subprocess, inspect, tarfile, shutil, urllib2, urlparse script_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) sys.path.insert(0,script_path) import lib.ufitslib as ufitslib URL = { 'ITS': 'https://www.dropbox.c...
2.859375
3
evaluation_dataset/source/FST_creation/create_lang_fsts.py
gonenhila/codeswitching-lm
10
12788661
import string import itertools from operator import add import argparse import json parser = argparse.ArgumentParser() parser.add_argument("--l1", default="en", help="name of language 1") parser.add_argument("--l2", default="sp", help="name of language 2") parser.add_argument("--probs_l1", default="../../da...
3.015625
3
docs/source/conf.py
steven-lang/SPFlow
199
12788662
# -- Path setup -------------------------------------------------------------- import os import sys sys.path.insert(0, os.path.abspath("../../src")) import sphinx_gallery # -- Project information ----------------------------------------------------- project = "SPFlow" copyright = "2020, <NAME>, <NAME>, <NAME>, <NAME>...
1.484375
1
scoreserver/scoreserver/highscore/views.py
petraszd/pyweek-14
0
12788663
<filename>scoreserver/scoreserver/highscore/views.py from django.http import HttpResponse from django.core import serializers from scoreserver.highscore.models import HighScore from scoreserver.highscore.forms import HighScoreForm def top10(request): top = HighScore.objects.order_by('-score')[:10] return Htt...
2.03125
2
convert.py
mindcruzer/rbc-statement-to-csv
5
12788664
<filename>convert.py from datetime import datetime import sys import xml.etree.ElementTree as ET import re import csv output_file = sys.argv[1] input_files = sys.argv[2:] txns = [] re_exchange_rate = re.compile(r'Exchange rate-([0-9]+\.[0-9]+)', re.MULTILINE) re_foreign_currency = re.compile(r'Foreign Currency-([A-Z]+...
2.78125
3
tests/test_events.py
trichter/sito
18
12788665
<reponame>trichter/sito #!/usr/bin/env python # by TR from sito import Events import os.path import unittest class TestCase(unittest.TestCase): def setUp(self): self.path = os.path.dirname(__file__) self.eventfile = os.path.join(self.path, 'data_temp', 'event_list.txt') self.eventfile2 = o...
2.53125
3
mid_software/HoneywellInterface.py
bluthen/isadore_electronics
0
12788666
<reponame>bluthen/isadore_electronics<filename>mid_software/HoneywellInterface.py # Copyright 2010-2019 <NAME>, <NAME> # # 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:/...
2.296875
2
examples/python/Polyhedron_incremental_builder.py
sloriot/cgal-swig-bindings
0
12788667
<gh_stars>0 from __future__ import print_function from CGAL.CGAL_Polyhedron_3 import Polyhedron_modifier from CGAL.CGAL_Polyhedron_3 import Polyhedron_3 from CGAL.CGAL_Polyhedron_3 import ABSOLUTE_INDEXING from CGAL.CGAL_Kernel import Point_3 # declare a modifier interfacing the incremental_builder m = Polyhedron_modi...
2.234375
2
python3/trec_car/__init__.py
flaviomartins/trec-car-tools
39
12788668
<gh_stars>10-100 """__init__ module for trec-car-tools, imports all necessary functions for reading cbor data provided in the TREC CAR""" __version__ = 1.0 __all__ = ['read_data', 'format_runs']
1.054688
1
wotd-tomorrow.py
mwbetrg/englishdb
0
12788669
<reponame>mwbetrg/englishdb<gh_stars>0 #!/usr/bin/python #Created : Sat 25 Jul 2015 09:46:47 PM UTC #Last Modified : Sat 25 Jul 2015 10:00:25 PM UTC import os import sys #qpy:2 #qpy:console import site from peewee import * import datetime #database = SqliteDatabase('english-notes-exercises.sqlite', **{}) database ...
2.84375
3
geokey/applications/tests/test_views.py
universityofsussex/geokey
0
12788670
"""Tests for views of applications.""" from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import AnonymousUser from django.http import HttpResponseRedirect from nose.tools import raises from oauth2_provider.models import AccessToken from rest_framework.test ...
2.296875
2
gluoncv/model_zoo/center_net/deconv_resnet.py
JSoothe/gluon-cv
48
12788671
<gh_stars>10-100 """ResNet with Deconvolution layers for CenterNet object detection.""" # pylint: disable=unused-argument from __future__ import absolute_import import warnings import math import mxnet as mx from mxnet.context import cpu from mxnet.gluon import nn from mxnet.gluon import contrib from .. model_zoo imp...
2.203125
2
tests/pirateplayer/test_library.py
TestDotCom/pirateplayer
12
12788672
<gh_stars>10-100 from unittest import TestCase from unittest.mock import MagicMock, patch from pirateplayer.library import Library class TestLibrary(TestCase): def setUp(self): self._root = '~/Music' dirtree = [ (self._root, ('Gorillaz', 'Daft Punk'), ('test.ogg')), ...
2.609375
3
tests/runtests.py
yasserglez/pytiger2c
2
12788673
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Script para compilar y ejecutar los programas de prueba. """ import os import unittest import subprocess SRC_DIR = os.path.join(os.path.dirname(__file__), os.pardir) PYTIGER2C_SCRIPT = os.path.abspath(os.path.join(SRC_DIR, 'scripts', 'pytiger2c.py')) PYTIGER2C_CMD = ['py...
2.390625
2
BOJ10823.py
INYEONGKIM/BOJ
2
12788674
<reponame>INYEONGKIM/BOJ<gh_stars>1-10 res="" while True: try: res+=input() except EOFError: break l=map(int, res.split(",")) print(sum(l))
2.453125
2
accountifie/cal/models.py
imcallister/accountifie
4
12788675
<reponame>imcallister/accountifie<filename>accountifie/cal/models.py """Date objects all nicely joinable together to allow SQL GROUP BY. The calendar actually gets constructed by functions in __init__.py """ from datetime import date from django.db import models class Year(models.Model): id = models.IntegerField...
2.53125
3
softlabels/Deepfashion2-Faster-RCNN/eval_RCNN.py
bsridatta/robotfashion
0
12788676
<reponame>bsridatta/robotfashion import matplotlib import matplotlib.pyplot as plt import transforms as T import torch import numpy as np import cv2 import random import datetime import pickle import time import errno import os import re import json import itertools import utils from config import * #################...
2.25
2
greedy/dot_product.py
younes-assou/some-data-structures-and-algos
0
12788677
def max_dot_product(a, b): #write your code here res = 0 a=sorted(a) b=sorted(b) for i in range(len(a)): res += a[i] * b[i] return res n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) print(max_dot_product(a, b))
3.765625
4
rlf/Steer1.py
richardlford/pyev3dev2
0
12788678
#!/usr/bin/env python3 from ev3dev2.motor import MoveSteering, MediumMotor, OUTPUT_A, OUTPUT_B, OUTPUT_C from ev3dev2.sensor.lego import TouchSensor from time import sleep ts = TouchSensor() steer_pair = MoveSteering(OUTPUT_A, OUTPUT_B) mm = MediumMotor(OUTPUT_C) mm.on(speed=100) #teer_pair.on_for_rotations(steering=...
2.828125
3
coviduci/db/test_sqlite.py
nazareno/covid-icu-monitor
1
12788679
<gh_stars>1-10 import os import time from absl.testing import absltest from coviduci.db import sqlite import sqlite3 import tempfile class SQLiteDBTest(absltest.TestCase): def test_init(self): with tempfile.TemporaryDirectory() as tmp_folder: sqldb = sqlite.SQLiteDB(os.path.join(tmp_folder, "test.db"))...
2.71875
3
tests/rep/gcd.py
GillesArcas/cws
13
12788680
<filename>tests/rep/gcd.py # greatest common divisor def gcd(a, b): c = 1 while c != 0: c = a % b if c == 0: return b else: a = b b = c a = 8136 b = 492 print(gcd(a, b))
3.265625
3
sensors/cmxdevice.py
tingxin/DevIoT_IndoorLocation_Starter_Kit
0
12788681
<gh_stars>0 __author__ = 'tingxxu' import sys from DevIoTGateway.sensor import Sensor, SProperty, SSetting from DevIoTGateway.config import config from logic.sensorlogic import SensorLogic floor = config["service"]["map_name"] default_location = {"location": "others"} areas = [] for area in config["areas"]: ar...
2.28125
2
lib-opencc-android/src/main/jni/OpenCC/binding.gyp
huxiaomao/android-opencc
5,895
12788682
{ "includes": [ "node/global.gypi", "node/configs.gypi", "node/dicts.gypi", "node/node_opencc.gypi", ] }
1.078125
1
test_concat.py
gnumber13/fastapi_webpage
0
12788683
<filename>test_concat.py import units as un un.concat_blogs('markdown/')
1.320313
1
python/python_backup/PRAC_PYTHON/deb.py
SayanGhoshBDA/code-backup
16
12788684
<gh_stars>10-100 a=input("enter a no") if a>0: print "a is positive" else: print "a is negative"
3.3125
3
functions/jaccard_cosine_similarity.py
DalavanCloud/UGESCO
1
12788685
import re import math from collections import Counter import numpy as np text1 = '<NAME> mangé du singe' text2 = 'Nicole a mangé du rat' class Similarity(): def compute_cosine_similarity(self, string1, string2): # intersects the words that are common # in the set of the two words intersec...
3.46875
3
evolclust/test/test_data.py
maks-ym/evolclust
0
12788686
import data import numpy as np # TODO: split tests 1 test per assert statement # TODO: move repeating constants out of functions class TestHAPT: def test_get_train_data(self): d = data.HAPT() assert d._train_attrs is None d.get_train_data() assert len(d._train_attrs) > 0 a...
2.484375
2
incidentes/migraciones2/0002_auto_20181020_0802.py
Alvaruz/ATMS
0
12788687
<reponame>Alvaruz/ATMS # Generated by Django 2.1.2 on 2018-10-20 11:02 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('incidentes', '0001_initial'), ] operations = [ migrations.CreateModel( n...
1.53125
2
adadelta.py
morpheusthewhite/twitter-sent-dnn
314
12788688
<gh_stars>100-1000 """ Adadelta algorithm implementation """ import numpy as np import theano import theano.tensor as T def build_adadelta_updates(params, param_shapes, param_grads, rho=0.95, epsilon=0.001): # AdaDelta parameter update # E[g^2] # initialized to zero egs = [ theano.shared( ...
2.1875
2
tests/function/test_deprecate_version_module.py
gavincyi/auto-deprecator
2
12788689
import pytest from auto_deprecator import deprecate __version__ = "2.0.0" @deprecate( expiry="2.1.0", version_module="tests.function.test_deprecate_version_module", ) def simple_deprecate(): pass @deprecate( expiry="2.1.0", version_module="tests.function.conftest", ) def failed_to_locate_version(...
2.59375
3
set_1/p1_6.py
PedroBernini/ipl-2021
0
12788690
# Programa para aproximar o valor de π. p_d = 151 def isValidCell(cell, pd): return (cell[0] ** 2 + cell[1] ** 2) ** 0.5 <= pd / 2 def getNumberValidCells(pd): validCells = 0 limit = int(pd / 2) for j in range(limit, -(limit + 1), -1): for i in range(-limit, limit + 1): if isValid...
3.328125
3
qtrader/simulation/tests/__init__.py
aaron8tang/qtrader
381
12788691
<reponame>aaron8tang/qtrader from qtrader.simulation.tests.arbitrage import Arbitrage from qtrader.simulation.tests.moments import Moments
1.085938
1
cook.py
hahahaha666/pythonpachong
0
12788692
from urllib import request url="http://www.renren.com/970973463" headers={ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0', 'Cookie':'anonymid=jw6ali52-qw6ldx; depovince=GUZ; _r01_=1; JSESSIONID=abcv45u4hL5Z0cQdde5Rw; ick_login=99f8241c-bfc0-4cda-9ed9-a...
2.375
2
Chapter1/Modules.py
rabbitism/Beginning-Python-Practice
0
12788693
import math from math import sqrt import cmath print("Module math imported") print(math.floor(32.9)) print(int(32.9)) print(math.ceil(32.3)) print(math.ceil(32)) print(sqrt(9)) print(sqrt(2)) #cmath and Complex Numbers ##print(sqrt(-1)) This will trigger a ValueError: math domain error print(cmath.sqrt(-1)) prin...
2.875
3
First REST API/app.py
ccruz182/Python-Flask
0
12788694
from flask import Flask, jsonify, request app = Flask(__name__) # Gives a unique name stores = [ { 'name': 'MyStore', 'items': [ { 'name': 'My Item', 'price': 15.99 } ] } ] """ @app.route('/') # Route of the endpoint 'http://www.google.com/' def home(): return "Hello, world!...
3.296875
3
setup.py
yingnn/fq2vcf
0
12788695
#!/usr/bin/env python """fq2vcf """ from __future__ import division, print_function import os import glob from setuptools import setup, find_packages VERSION = '0.0.0' scripts = ['scripts/fq2vcf'] scripts.extend(glob.glob('scripts/*.sh')) scripts.extend(glob.glob('scripts/*.py')) print(scripts) def read(fname): ...
1.914063
2
python/viewer/radar_image.py
LordHui/ZendarSDK
7
12788696
import numpy as np from collections import namedtuple from util import ( vec3d_to_array, quat_to_array, array_to_vec3d_pb, array_to_quat_pb, ) from radar_data_streamer import RadarData from data_pb2 import Image Extrinsic = namedtuple('Extrinsic', ['position', 'attitude']) class RadarImage(RadarData)...
2.8125
3
contacts/__init__.py
heimann/contacts
1
12788697
# __ __ ___ _______ #/ `/ \|\ || /\ / `|/__` #\__,\__/| \||/~~\\__,|.__/ # """ Contact Cards ~~~~~~~~~~~~~~~~~~~~~ Contacts let's you create Contact Cards in Python that just work, so you can worry about having meaningful conversations with people who know who you are. Here's how it works: >>> from contac...
3.5625
4
Gina.py
Zekx/CS332Fighting_Game
0
12788698
<reponame>Zekx/CS332Fighting_Game import pygame from boxes import HurtBox from boxes import HitBox from boxes import DamageBox from boxes import InvincibleBox from boxes import GrabBox from projectile import GinaFireBall from effects import * from Character import Character class Gina(Character): def __init__(sel...
2.71875
3
lib/tree.py
usermicrodevices/pywingui
0
12788699
<reponame>usermicrodevices/pywingui ## Copyright (c) 2003 <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...
1.828125
2
13b-iterative-dont-do-that.py
jpparent/aoc2020
0
12788700
f = open('13.txt') rows = f.readlines() f.close() ids = [int(x) if x != 'x' else 0 for x in rows[1].split(',')] t = 0 i = 0 earliestT = None while True: print(t,end='\r') if i == len(ids): break # matched all elif ids[i] == 0: i += 1 t += 1 continue elif t % ids[i] == 0: earliestT = t if not earliestT ...
2.921875
3
Fever.py
CSID-DGU/2020-2-OSSP-Ssanhocho-7
0
12788701
import pygame import Levels from Sprites import * is_fever = False class Fever(): global fever_score def __init__(self): self.is_fever = False def feverTime(self,hero_sprites,ghost_sprites): pygame.sprite.groupcollide(hero_sprites, ghost_sprites, False, False) return True
2.875
3
movies-client.py
povstenko/movielens-process
0
12788702
"""Get top N rated movies from MovieLens This script allows user to get information about films. This file can also be imported as a module and contains the following functions: * display_movies - Print data in csv format * get_arguments - Construct the argument parser and get the arguments * main - the ...
3.484375
3
OOPS_CONCEPT/Functional and Modular Progarmming/discount_product_7.py
abhigyan709/dsalgo
1
12788703
# buying 2 mobile # returning only one 1 phone # making sure that purchase_shoe() function won't accidentally modify the global value for mobile # complication is increasing now total_price_mobile = 0 total_price_shoe = 0 def purchase_mobile(price, brand): global total_price_mobile if brand == "Apple": ...
3.8125
4
power/coding-challenges/hour-of-python/gerund-slicing.py
TuxedoMeow/Hello-World
0
12788704
""" Make a function gerund_infinitive that, given a string ending in "ing", returns the rest of the string prefixed with "to ". If the string doesn't end in "ing", return "That's not a gerund!" >>>> gerund_infinitive("building") to build >>>> gerund_infinitive("build") That's not a gerund! """ def gerund_infinitive(s...
4.625
5
fxwebgen/utils.py
tiliado/fxwebgen
0
12788705
<gh_stars>0 import os from argparse import HelpFormatter from typing import Optional def file_mtime(path: str) -> float: try: return os.path.getmtime(path) except OSError: return -1 def abspath(base_path: Optional[str], path: str) -> str: assert path, f'Path must be specified.' asser...
2.90625
3
concat.py
voelkerb/matroska_plotter
0
12788706
<gh_stars>0 # !/usr/bin/python import os import sys from os.path import basename import argparse from mkv.mkv import concat def initParser(): parser = argparse.ArgumentParser() parser.add_argument("--inFolder", type=str, default=None, help="Folder that contains mkv files") par...
3.09375
3
month01/day11/exercise03.py
Amiao-miao/all-codes
1
12788707
<reponame>Amiao-miao/all-codes<gh_stars>1-10 """ 练习1:以面向对象思想,描述下列情景. 小明请保洁打扫卫生 """ #小明每次雇佣新保洁 """ class Client: def __init__(self, name=""): self.name=name def engage(self): print("雇佣") cleaner=Cleaner() cleaner.clean() class Cleaner: def clean(self): print("打扫") x...
3.5
4
SUAVE/SUAVE-2.5.0/trunk/SUAVE/Analyses/Energy/__init__.py
Vinicius-Tanigawa/Undergraduate-Research-Project
0
12788708
<filename>SUAVE/SUAVE-2.5.0/trunk/SUAVE/Analyses/Energy/__init__.py ## @defgroup Analyses-Energy Energy # This is the analysis that controls energy network evaluations. # @ingroup Analyses from .Energy import Energy
1.054688
1
hardware/temperature_sensor/__init__.py
magnusnordlander/silvia-pi
16
12788709
from .EmulatedSensor import EmulatedSensor try: from .Max31865Sensor import Max31865Sensor except NotImplementedError: pass
1.1875
1
PositioningSolver/src/config.py
rodrigo-moliveira/PositioningSolver
0
12788710
<reponame>rodrigo-moliveira/PositioningSolver """Configuration handler The configuration is a simple dictionary, with possible fallbacks """ from .utils.errors import ConfigError class Config(dict): """Config class inherits from dict class """ _instance = None def get(self, *keys, fallback=...
2.765625
3
logger.py
dontsovcmc/waterius.alice
0
12788711
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging import os import sys import settings from datetime import datetime class Logger(object): def __init__(self): log = logging.getLogger('') log.setLevel(logging.INFO) filename = datetime.utcnow().strftime('%Y.%m....
2.5625
3
model.py
wkhattak/Behavioural-Cloning
0
12788712
import csv import cv2 from datetime import datetime import numpy as np import matplotlib.pyplot as plt import sklearn from sklearn.utils import shuffle from sklearn.model_selection import train_test_split from keras.models import Sequential from keras.layers import Convolution2D,Flatten,Dense,Lambda from keras import o...
2.609375
3
jumping_numbers.py
zuhi/Programming
0
12788713
<gh_stars>0 #A number is called as a Jumping Number if all adjacent digits in it differ by 1. #The difference between ‘9’ and ‘0’ is not considered as 1. All single digit numbers are considered as Jumping Numbers. #For example 7, 8987 and 4343456 are Jumping numbers but 796 and 89098 are not. #Given a positive number ...
3.84375
4
_ext/python/crawlab/client/__init__.py
crawlab-team/crawlab-python-sdk
0
12788714
from .request import * from .response import * from .client import *
1.0625
1
tests/test_node_network.py
tjjlemaire/MorphoSONIC
0
12788715
<reponame>tjjlemaire/MorphoSONIC<gh_stars>0 # -*- coding: utf-8 -*- # @Author: <NAME> # @Email: <EMAIL> # @Date: 2020-01-13 19:51:33 # @Last Modified by: <NAME> # @Last Modified time: 2021-07-27 17:47:02 import logging from PySONIC.core import PulsedProtocol from PySONIC.neurons import getPointNeuron from PySONIC...
2.109375
2
notepower.py
pietro2356/NotePower
0
12788716
<reponame>pietro2356/NotePower import tkinter as tk # min: 12:17 # Classe controller class NotePower: def __init__(self, master): master.title("Untitle - NotePower") master.geometry("1200x700") self.master = master self.txtArea = tk.Text(master) self.scroll = tk.Scrollbar...
3.21875
3
nerd/__init__.py
vishalbelsare/ner-d
16
12788717
<reponame>vishalbelsare/ner-d #!/usr/bin/env python # -*- coding: utf-8 -*- """Python module for Named Entity Recognition (NER).""" from __future__ import absolute_import __author__ = "<NAME>" __email__ = "<EMAIL>" __copyright__ = "Copyright (c) 2019 <NAME>" __license__ = "MIT License" __version__ = "0.4.0" __url__ ...
0.945313
1
scripts/post/relabel_chain.py
ss199514/qfit-3.0
0
12788718
<reponame>ss199514/qfit-3.0<filename>scripts/post/relabel_chain.py #!/usr/bin/env python """Renaming Chains in holo based on corresponding apo""" import argparse import os import numpy as np from qfit.structure import Structure def parse_args(): p = argparse.ArgumentParser(description=__doc__) p.add_argume...
2.296875
2
www/generadorarboles.py
JoseManuelVargas/arandasoft-cpp-prueba-tecnica
0
12788719
<filename>www/generadorarboles.py import random class Nodo: def __init__(self, valor): self.valor = valor self.izquierda = None self.derecha = None def insertar(self, valor): q = [] q.append(self) while (len(q)): temp = q[0] q.pop(0) ...
3.546875
4
errgrep/log_line.py
csm10495/errgrep
0
12788720
import functools import pathlib import queue import re import sys import time import typing from .line_timestamper import LineTimestamper from .non_blocking_read_thread import stdin_read_thread class LogLine: def __init__(self, raw_text=None, raw_text_lines=None, log_file=None, read_...
2.84375
3
osm_graphml_downloader_cli.py
maptastik/osm_graphml_downloader
0
12788721
<filename>osm_graphml_downloader_cli.py from time import perf_counter start = perf_counter() import os import shutil import gzip import click from datetime import timedelta from osm_graphml_downloader import osm_graphml_downloader @click.command() @click.option('-x', '--network_type', help = 'Network type: "walk", "b...
2.671875
3
test/countries/test_canada.py
OmoMicheal/marketanalysis
2
12788722
<reponame>OmoMicheal/marketanalysis # -*- coding: utf-8 -*- # marketanalysis # ---------------- # A fast, efficient Python library for generating country, province and state # specific sets of marketholidayss on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as po...
2.53125
3
kernel/components/binning/horzfeaturebinning/param.py
rinceyuan/WeFe
39
12788723
# Copyright 2021 <NAME>. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
1.515625
2
nova/tests/functional/compute/test_aggregate_api.py
ChameleonCloud/nova
1
12788724
<filename>nova/tests/functional/compute/test_aggregate_api.py<gh_stars>1-10 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
2.03125
2
scripts/_evaluate.py
leichtrhino/torch-chimera
0
12788725
import os import sys import torch try: import torchchimera except: # attempts to import local module sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')) import torchchimera from torchchimera.datasets import FolderTuple from torchchimera.metrics import eval_snr from torchchi...
2.140625
2
lithium/manage/templates/config.py
PressLabs/lithium
2
12788726
API_VERSION = '1' SQLALCHEMY_DATABASE_URI = 'sqlite:///:memory:' DEBUG = True
1.21875
1
Flyon/CCKS_CRF/eval/onefile.py
kyzhouhzau/CCKS-2018-
89
12788727
import glob import os # files = glob.glob("./finall/*") # files = sorted(files) # print(files) import codecs with open("result.txt",'w') as wf: for num in range(1,401): file = "./finall/入院记录现病史-"+str(num)+".txt" with codecs.open(file,'r',encoding='utf-8') as rf: for i,line in e...
3.15625
3
July21/EssentialPython/classesandobjects/calc.py
pythonbykhaja/intesivepython
2
12788728
class Calculator: def __init__(self) -> None: self.memory = list() def add(self, *args): result = 0 for number in args: result += number self.append_to_memory(result) return result def multiply(self, *args): result = 1 for number in args:...
3.8125
4
models/LSTM/LSTM_Model.py
yassienshaalan/DTOPS
3
12788729
from keras.models import Sequential, load_model from keras.callbacks import History, EarlyStopping, Callback from keras.layers.recurrent import LSTM from keras.layers import Bidirectional from keras.losses import mse, binary_crossentropy,cosine from keras.layers.core import Dense, Activation, Dropout import numpy as np...
2.828125
3
tests/robotcode/jsonrpc/test_jsonrpcprotocol.py
d-biehl/robotcode
21
12788730
import asyncio import json from typing import Any, Dict, Generator, List, Optional, cast import pytest from robotcode.jsonrpc2.protocol import ( JsonRPCError, JsonRPCErrorObject, JsonRPCErrors, JsonRPCMessage, JsonRPCProtocol, JsonRPCRequest, JsonRPCResponse, ) from robotcode.jsonrpc2.serv...
2.203125
2
Lib/site-packages/miscutils/functions.py
fochoao/cpython
0
12788731
from __future__ import annotations import ast import inspect import os import sys import traceback from typing import Optional, Any, Callable from collections.abc import Iterable from subtypes import Str from pathmagic import Dir def is_running_in_ipython() -> bool: """Returns True if run from within a jupyter ...
2.40625
2
turbulenz_local/lib/__init__.py
turbulenz/turbulenz_local
12
12788732
<reponame>turbulenz/turbulenz_local # Copyright (c) 2011,2013 Turbulenz Limited
0.785156
1
analysis/src/python/data_analysis/preprocessing/build_issues.py
eartser/hyperstyle-analyze
1
12788733
import argparse import logging import sys from typing import Dict import pandas as pd from analysis.src.python.data_analysis.model.column_name import IssuesColumns, SubmissionColumns from analysis.src.python.data_analysis.utils.df_utils import read_df, write_df from analysis.src.python.data_analysis.utils.parsing_uti...
2.78125
3
histoprint/cli.py
mbhall88/histoprint
0
12788734
"""Module containing the CLI programs for histoprint.""" import numpy as np import click from histoprint import * import histoprint.formatter as formatter @click.command() @click.argument("infile", type=click.Path(exists=True, dir_okay=False, allow_dash=True)) @click.option( "-b", "--bins", type=str, ...
2.8125
3
aranyapythonpb/rpcpb/edgedevice_pb2_grpc.py
arhat-dev/aranya-proto
0
12788735
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc import proto_pb2 as proto__pb2 class EdgeDeviceStub(object): """Missing associated documentation comment in .proto file.""" def __init__(self, channel...
1.789063
2
Source/game_data.py
JFiedler23/PyInvaders
0
12788736
<filename>Source/game_data.py class GameData: def __init__(self, score=0, curr_level=1, alien_speed=850, alien_y=40): self.score = score self.curr_level = curr_level self.alien_speed = alien_speed self.alien_y = alien_y
2.34375
2
my_ip/urls.py
OscarMugendi/Django-week3-IP
0
12788737
from django.conf.urls import url from django.urls import path, include from . import views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ url('^$', views.home, name='home'), path('account/', include('django.contrib.auth.urls')), path('profile/<id>/', views.profi...
1.992188
2
msghandle/logger.py
RaenonX/Jelly-Bot-API
5
12788738
from extutils.logger import LoggerSkeleton logger = LoggerSkeleton("sys.handle", logger_name_env="EVT_HANDLER")
1.5
2
src/injecta/service/resolved/NamedArgumentsResolver.py
DataSentics/injecta
3
12788739
from typing import List, Dict from injecta.service.argument.ArgumentInterface import ArgumentInterface from injecta.service.class_.InspectedArgument import InspectedArgument from injecta.service.resolved.ResolvedArgument import ResolvedArgument from injecta.service.argument.validator.ArgumentsValidator import Arguments...
2.34375
2
setup.py
markmuetz/cosmic
0
12788740
<gh_stars>0 #!/usr/bin/env python import os try: from setuptools import setup, Extension except ImportError: from distutils.core import setup, Extension def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='cosmic...
1.757813
2
c10_tools/inspect.py
atac-bham/c10-tools
0
12788741
<filename>c10_tools/inspect.py from collections import OrderedDict import asyncio import csv import os import sys from chapter10 import C10 from termcolor import colored import click from .common import fmt_number, FileProgress, walk_packets class Inspect: KEYS = { 'Channel': 'channel_id', 'Typ...
2.34375
2
tests/unittests/analysis/test_lpi.py
obilaniu/orion
177
12788742
<filename>tests/unittests/analysis/test_lpi.py # -*- coding: utf-8 -*- """Tests :func:`orion.analysis.lpi`""" import copy import numpy import pandas as pd import pytest from orion.analysis.base import to_numpy, train_regressor from orion.analysis.lpi_utils import compute_variances, lpi, make_grid from orion.core.io.s...
2.390625
2
src/oaipmh/interfaces.py
unt-libraries/pyoai
58
12788743
<filename>src/oaipmh/interfaces.py class IOAI: def getRecord(metadataPrefix, identifier): """Get a record for a metadataPrefix and identifier. metadataPrefix - identifies metadata set to retrieve identifier - repository-unique identifier of record Should raise error.CannotD...
2.578125
3
esda/tests/test_local_geary_mv.py
jeffcsauer/esda
145
12788744
import unittest import libpysal from libpysal.common import pandas, RTOL, ATOL from esda.geary_local_mv import Geary_Local_MV import numpy as np PANDAS_EXTINCT = pandas is None class Geary_Local_MV_Tester(unittest.TestCase): def setUp(self): np.random.seed(100) self.w = libpysal.io.open(libpysal.e...
2.34375
2
packages/pyright-scip/snapshots/output/nested_items/src/__init__.py
sourcegraph/pyright
0
12788745
<reponame>sourcegraph/pyright # < definition scip-python pypi snapshot-util 0.1 src/__init__: #documentation (module) src
0.726563
1
strYa/raw_data_timeline.py
karyna-volokhatiuk/strYa
3
12788746
''' Module that makes timeline graphs from csv data. ''' import matplotlib.pyplot as plt import numpy as np import pandas as pd def plot_timeline(file_name): ''' Makes timeline graphs from csv data. ''' # data frame from rounded data file df = pd.read_csv(file_name) # find all par for graphs...
3.59375
4
profile_app/urls.py
saif-ali5589/Profile-rest-api
0
12788747
<gh_stars>0 from django.urls import path , include from rest_framework.routers import DefaultRouter from profile_app import views router = DefaultRouter() router.register('hello-viewset',views.HelloViewSet,base_name='hello-viewset') router.register('profile',views.UserProfileViewSet) router.register('feed',views.UserP...
2.125
2
genomics_gans/lit_modules.py
Unique-Divine/GANs-for-Genomics
1
12788748
import pytorch_lightning as pl import torch import torch.nn as nn import numpy as np import matplotlib.pyplot as plt from typing import List, Tuple, Dict, Any, Union, Iterable try: import genomics_gans except: exec(open('__init__.py').read()) import genomics_gans from genomics_gans.prepare_data.data_module...
2.515625
3
pybaseball/cache/file_utils.py
reddigari/pybaseball
650
12788749
import json import os import pathlib from typing import Any, Dict, List, Union, cast JSONData = Union[List[Any], Dict[str, Any]] # Splitting this out for testing with no side effects def mkdir(directory: str) -> None: return pathlib.Path(directory).mkdir(parents=True, exist_ok=True) # Splitting this out for te...
3.03125
3
src/runner.py
tandriamil/bcs-aes256-ctr
0
12788750
#!/usr/bin/python3 """ Script for generating the data set (128b, 256b, 1kB, 1MB, 100MB, 1GB). Context : Projet BCS - Master 2 SSI - Istic (Univ. Rennes1) Authors : <NAME> and <NAME> This script also executes the time measurement into 4 contexts => Sequential encryption => Sequential decryption => Parallel encry...
2.578125
3