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
src/Parse/NYUSupport.py
Stonehill-GWAIN-PC-Lab/Data-Mining-for-Procedural-Room-Generation
2
12772851
<reponame>Stonehill-GWAIN-PC-Lab/Data-Mining-for-Procedural-Room-Generation #It's a matlab file that needs to be cleaned up from scipy.io import loadmat import h5py,math from collections import Counter,defaultdict import numpy as np from .. import ObjectMetrics #Return back a parsed list of Support frequency connecti...
2.34375
2
src/111.py
cloudzfy/euler
12
12772852
<filename>src/111.py # Considering 4-digit primes containing repeated digits it is # clear that they cannot all be the same: 1111 is divisible by # 11, 2222 is divisible by 22, and so on. But there are nine # 4-digit primes containing three ones: # 1117, 1151, 1171, 1181, 1511, 1811, 2111, 4111, 8111 # We shall s...
3.796875
4
demo/align_face.py
hologerry/pix2pix-flow
2,898
12772853
# OLD USAGE # python align_faces.py --shape-predictor shape_predictor_68_face_landmarks.dat --image images/example_01.jpg # import the necessary packages from imutils.face_utils import FaceAligner from PIL import Image import numpy as np # import argparse import imutils import dlib import cv2 # construct the argument...
3.171875
3
toontown/fishing/DistributedFishingTarget.py
AnonymousDeveloper65535/open-toontown
8
12772854
<gh_stars>1-10 from pandac.PandaModules import * from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.distributed import DistributedNode from direct.fsm import ClassicFSM from direct.fsm import State from direct.directuti...
1.898438
2
social_media_crawling/models.py
diahnuri/TMSS
1
12772855
<filename>social_media_crawling/models.py<gh_stars>1-10 from django.db import models # Create your models here. class Crawl(models.Model): name = models.CharField(max_length=100) content = models.CharField(max_length=140) c_at = models.DateField() #Retweet = models.CharField(max_length=100) #hasht...
2.359375
2
scripts/extract_src.py
jvyduna/pb-examples
3
12772856
<gh_stars>1-10 # Use this to extract the src/ driectory from the contents of epe/. # Aborts if it finds a file to overwrite; IE, to use this, explicitly delete the # contents of src/ first, in order to not lose any changes made in the src/ # directory and not yet reflected in the corresponding .epe import io, os, fnma...
2.5
2
src/selfcoin/node/ui/ui.py
wangyubin112/selfcoin
0
12772857
from tkinter import * from tkinter.font import Font from tkinter.ttk import * from tkinter.messagebox import * #import tkinter.filedialog as tkFileDialog #import tkinter.simpledialog as tkSimpleDialog #askstring() from node.ui.access import access from node.ui.trade import trade from node.ui.post import po...
2.578125
3
pyserial_util/clear_reload.py
DevOps4Networks/iox-utils
0
12772858
#! /usr/bin/env python # encoding: utf-8 """ This script is intended to be used to automate the process of clearing configurations and reloading, via a console connection, for devices that support Cisco's IOx platform. The outcome is a device that has no startup configuration, and which has been booted from rommon-2...
2.46875
2
ros/src/tl_detector/light_classification/tl_classifier.py
adityasiwan/system-integration
1
12772859
from styx_msgs.msg import TrafficLight import cv2 import numpy as np class TLClassifier(object): def __init__(self): pass def get_classification(self, image): """Determines the color of the traffic light in the image Args: image (cv::Mat): image containing the traffic ligh...
3.265625
3
tests/fixtures/messages.py
ExpressApp/pybotx
13
12772860
import pytest from botx import ( ChatCreatedEvent, InternalBotNotificationEvent, InternalBotNotificationPayload, Message, MessageBuilder, UserKinds, ) from botx.models.events import UserInChatCreated @pytest.fixture() def incoming_message(host, bot_id): builder = MessageBuilder() buil...
2.046875
2
plugins/fb-messenger-1-0-0/main.py
pr4xx/db-forensic-framework
1
12772861
<reponame>pr4xx/db-forensic-framework<gh_stars>1-10 import click from datetime import datetime from pony.orm import * from framework.Core import Core from framework.analysis.chat.Chat import Chat from framework.analysis.chat.Conversation import Conversation from framework.analysis.chat.Message import Message as Framewo...
1.945313
2
quiz/admin.py
Afnarel/django-quiz
5
12772862
<filename>quiz/admin.py from django.contrib import admin from quiz.models import Quiz, Category, Question, Answer from forms import QuizAdminForm class QuestionInline(admin.TabularInline): model = Question.quiz.through filter_horizontal = ('content',) class AnswerInline(admin.TabularInline): model = Ans...
2.1875
2
tests/test_utils/test_bot_info.py
vitaliy-ukiru/math-bot
1
12772863
<reponame>vitaliy-ukiru/math-bot import unittest from datetime import timedelta from time import monotonic as time import sys from aiogram import Bot from .dataset import CustomSysInfo, UptimeTimer from app.misc import colorize from app.utils.bot_info import format_sys_info, calc_ping, get_uptime def _set_ms(td: ti...
2.53125
3
dependencynet/core/datasource/levelsloader.py
cfalguiere/dependencynet
0
12772864
<reponame>cfalguiere/dependencynet<filename>dependencynet/core/datasource/levelsloader.py """ This module provides helpers to extract levels from source data """ import logging import pandas as pd class LevelsLoader: logger = logging.getLogger(__name__) @classmethod def __init__(self, schema, source_df)...
2.375
2
data_pipeline/testing_helpers/kafka_docker.py
poros/data_pipeline
110
12772865
# -*- coding: utf-8 -*- # Copyright 2016 Yelp Inc. # # 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...
2.25
2
src/neqsim/neqsimpython.py
equinor/neqsimpython
20
12772866
import jpype jpype.addClassPath('./lib/NeqSim.jar') if not(jpype.isJVMStarted()): jpype.startJVM(convertStrings =True) neqsim = jpype.JPackage('neqsim')
1.796875
2
LWOA.py
ZongSingHuang/L-vy-Whale-Optimization-Algorithm
4
12772867
<reponame>ZongSingHuang/L-vy-Whale-Optimization-Algorithm # -*- coding: utf-8 -*- """ Created on Thu Jul 16 21:59:58 2020 @author: ZongSing_NB https://doi.org/10.1109/ACCESS.2017.2695498 """ import math import numpy as np import matplotlib.pyplot as plt class LWOA(): def __init__(self, fitness, D=30, P=20, G=50...
2.328125
2
sales/migrations/0001_initial.py
GeekGuste/ecommerce-nuxtjs-djoser
0
12772868
# Generated by Django 4.0.1 on 2022-05-09 17:09 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
1.679688
2
tests/test_hello.py
smheidrich/lovely-pytest-docker
1
12772869
<reponame>smheidrich/lovely-pytest-docker from urllib.request import urlopen def test_hello_world(docker_hello_world): """Test if the container is reachable. The docker_hello_world fixture is used, so the container will start on test startup. Do a request to the docker service and read the body. """ ...
2.703125
3
portfolio/models.py
macmohan26/EagleFinancialServices
0
12772870
from django.db import models from django.utils import timezone from django.contrib.auth.models import User from yahoo_finance import Share class Customer(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=200) cust_number = models.IntegerField(blank=False, null=Fals...
2.4375
2
scrapy_do/client/webclient.py
umairwaheed/scrapy-do
64
12772871
#------------------------------------------------------------------------------- # Author: <NAME> <<EMAIL>> # Date: 22.01.2018 # # Licensed under the 3-Clause BSD License, see the LICENSE file for details. #------------------------------------------------------------------------------- import requests import urllib3...
2.609375
3
scripts/SolCalc/calculate_PS_rot_single_region.py
FMS-Mu2e/helicalc
0
12772872
<reponame>FMS-Mu2e/helicalc<gh_stars>0 import sys from time import time from datetime import datetime import argparse import numpy as np from helicalc import helicalc_dir, helicalc_data from helicalc.solcalc import * from helicalc.geometry import read_solenoid_geom_combined from helicalc.tools import generate_cartesian...
1.804688
2
ref/v1.1/opengl_test.py
vt-rocksat-2017/dashboard
1
12772873
#!/usr/bin/env python from OpenGL.GLUT import * from OpenGL.GLU import * from OpenGL.GL import * import sys name = 'ball_glut' def main(): glutInit(sys.argv) glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH) glutInitWindowSize(400,400) glutCreateWindow(name) glClearColor(0.,0.,0.,1.) ...
2.703125
3
eval_dci.py
ratschlab/dgp-vae
5
12772874
""" Script to compute dci score of learned representation. """ import warnings warnings.simplefilter(action='ignore', category=FutureWarning) import numpy as np from absl import flags, app from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from disentanglement_lib.eva...
2.234375
2
jupyterlab_templates/tests/test_git_repos.py
AndersonReyes/jupyterlab_templates
0
12772875
import json import os import requests def test_server_loaded_notebooks(notebook_server): name = "/example-jupyter-notebooks.git/01-MPI-monte-carlo-pi.ipynb" resp = requests.get( "{}/templates/names".format(notebook_server), ) assert resp.status_code == 200, resp.content assert resp.json(...
2.515625
3
rustici_software_cloud_v2/models/xapi_activity_definition.py
ryanhope2/scormcloud-api-v2-client-python
0
12772876
# coding: utf-8 """ SCORM Cloud Rest API REST API used for SCORM Cloud integrations. OpenAPI spec version: 2.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class XapiActivityDefinition(obje...
1.703125
2
rsa/src/crypto/hash.py
rafaelcn/cryptography
0
12772877
<filename>rsa/src/crypto/hash.py """ This file contains hash functions to help in signature verfication. """ import hashlib def hashit(data): """ Hash function that returns a 32 byte digest of the application of SHA3 256 on data. """ return hashlib.sha3_256(data).digest()
2.4375
2
setup.py
emcek/ufc
0
12772878
import io from os.path import abspath, dirname, join from setuptools import setup, find_packages from dcspy.dcs_g13 import __version__ here = abspath(dirname(__file__)) with io.open(join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() with io.open(join(here, 'requirements.txt'), encodin...
1.359375
1
examples/pythonic++_list.py
HighCWu/tpythonpp
0
12772879
with c++: @module( mycppmodule ) def foo(a, o): std::cout << a << std::endl a.append( "world" ) a.append( std::string("mystdstring") ) a.append( o ) a.append( 1 ) a.append( 9.5 ) return None import mycppmodule x = ['hello'] b = 'bar' mycppmodule.foo( x, b ) print( x )
2.953125
3
aiozmq-guide/rrworker-aio.py
r-marques/aiozmq-guide
4
12772880
<filename>aiozmq-guide/rrworker-aio.py<gh_stars>1-10 import asyncio import aiozmq import zmq @asyncio.coroutine def go(): """ Request-reply service Connects REP socket to tcp://localhost:5560 Expects "Hello" from client, replies with "World" """ # create REP socket socket = yield from aio...
2.890625
3
movie/merge_results.py
andytorrestb/piv_routines
1
12772881
import os import save_figures as fig from data_reader import DataReader def merge_results(path): sorted_files = sorted(os.listdir(path + 'left')) rebuilt_img = [] dr = DataReader() for file_name in sorted_files: print('') l_img = dr.load_pandas(path + 'left/' + file_name) c_img = dr.lo...
2.78125
3
game03/satelliti.py
PythonBiellaGroup/LearningPythonWithGames
2
12772882
<reponame>PythonBiellaGroup/LearningPythonWithGames import pgzrun from random import randint from time import time TITLE = "🐍🐍 Connetti i satelliti 🐍🐍" WIDTH = 800 HEIGHT = 600 satelliti = [] linee = [] indice_prossimo_satellite = 0 tempo_iniziale = 0 tempo_totale = 0 tempo_finale = 0 NUM_SATELLITI = 8 def cre...
3.65625
4
ex087.py
danoliveiradev/PythonExercicios
0
12772883
matriz = [] valor = [] somaPar = somaColuna3 = maiorLinha2 = 0 #Gerador de matriz 3x3 for i in range(0, 3): for j in range(0, 3): valor.append(int(input(f'Digite um valor para [{i}, {j}]: '))) matriz.append(valor[:]) valor.clear() print('-='*30) for i in range(0, 3): for j in range(0, 3): ...
3.8125
4
mysite/benthic_photosynthesis_measurement.py
EggsWithCheese/WSU-PAL-PPC
0
12772884
''' Created on Jun 17, 2015 @author: cdleong ''' from photosynthesis_measurement import PhotosynthesisMeasurement class BenthicPhotosynthesisMeasurement(PhotosynthesisMeasurement): ''' classdocs ''' MAX_VALID_IK = 10.0 #Arbitrary value one order of magnitude greater than typical. According to Kalff's ...
2.34375
2
intg/src/main/python/apache_ranger/model/ranger_policy.py
Eroschang/ranger
11
12772885
#!/usr/bin/env python # # 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 to You under the Apache License, Version 2.0 # (the "Li...
2.109375
2
BandFilter.py
FullPint/Frequency-Filter-Server
0
12772886
import numpy as np import math as math import cv2 def get_ideal_low_pass_filter( shape, cutoff,width): [h, w] = shape mask_image = np.zeros((h, w)) for i in range(h): for j in range(w): distance = math.sqrt((i - (h / 2)) * (i - (h / 2)) + (j - (w / 2)) * (j - (w / 2))) if...
2.765625
3
website/products/index.py
zckoh/ecommerce-fullstack
1
12772887
from algoliasearch_django import AlgoliaIndex from algoliasearch_django.decorators import register from .models import Product @register(Product) class ProductIndex(AlgoliaIndex): fields = ('product_name', 'model_no', 'product_category', 'product_details', 'slug', 'main_product_image')
1.742188
2
iseeu/iseeu.py
overfree/ISeeU
20
12772888
<gh_stars>10-100 from keras.models import Model, load_model import matplotlib as mpl import matplotlib.cm as cm import matplotlib.pyplot as plt import numpy as np import pandas as pd import deeplift from deeplift.layers import NonlinearMxtsMode from deeplift.conversion import kerasapi_conversion as kc from deeplift.ut...
1.835938
2
dataset.py
Westerley/framework_event2vec
1
12772889
<reponame>Westerley/framework_event2vec import pandas as pd import networkx as nx import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--edges', type=str, help='input csv file') parser.add_argument('--sep', type=str, default='\t') parser.add_argument('--output', typ...
2.75
3
libaarhusxyz/__init__.py
emerald-geomodelling/libaarhusxyz
0
12772890
<filename>libaarhusxyz/__init__.py from .xyz import parse from .xyz import dump from .sr2 import parse as parse_sr2 from .gex import parse as parse_gex
1.03125
1
PySS/polygonal.py
manpan-1/steel_toolbox
2
12772891
<reponame>manpan-1/steel_toolbox # -*- coding: utf-8 -*- """ A framework for the study of polygonal profiles. """ import os import numpy as np import PySS.steel_design as sd import PySS.lab_tests as lt import PySS.analytic_geometry as ag import PySS.scan_3D as s3d import pickle from matplotlib import pyplot as plt fr...
2.625
3
problems/21.py
christofferaakre/project-euler
0
12772892
<gh_stars>0 #!/usr/bin/env python3 from main import Solver, list_divisors solver = Solver() def are_amicable(x: int, y: int) -> bool: sum_x = sum(list_divisors(x, proper=True)) sum_y = sum(list_divisors(y, proper=True)) if x != y and sum_x == y and sum_y == x: return True else: return ...
3.34375
3
data_structure/binary_search_tree/173. Binary Search Tree Iterator_medium.py
JunzhongLin/leetcode_practice
0
12772893
''' Implement the BSTIterator class that represents an iterator over the in-order traversal of a binary search tree (BST): BSTIterator(TreeNode root) Initializes an object of the BSTIterator class. The root of the BST is given as part of the constructor. The pointer should be initialized to a non-existent number small...
4.15625
4
2457.py
heltonricardo/URI
6
12772894
c = input().strip() fr = input().split() n = 0 for i in fr: if c in i: n += 1 print('{:.1f}'.format(n*100/len(fr)))
3.15625
3
setup.py
atkirtland/pyffe
8
12772895
from setuptools import setup setup(name='pyffe', version='0.1', description='Tools and utils for PyCaffe', # url='http://github.com/fabiocarrara/pyffe', author='<NAME>', author_email='<EMAIL>', license='MIT', packages=['pyffe', 'pyffe.models'], zip_safe=False, requ...
1.0625
1
dronecode/pruebas_vuelo.py
tomasjm/dronekit-ufro
3
12772896
""" dronekit-sitl copter --home=-38.7460967,-72.6154299,0,180 mavproxy.py --master tcp:127.0.0.1:5760 --out udp:127.0.0.1:14550 --out udp:127.0.0.1:14551 mission planner en puerto udp:14550 dronekit en puerto udp:14551 https://github.com/ArduPilot/MAVProxy/issues/543 """ # from pymavlink import mavutil """ -------...
2.578125
3
ComplementaryScripts/Step_03_Compare_Refine/Step_simulate_case02.py
HaoLuoChalmers/Lactobacillus_reuteri_MM41A_GEM
0
12772897
#!/usr/bin/env python # -*- coding: utf-8 -*- # Created by <NAME> at 2019-09-02 """Step_simulate.py :description : script :param : :returns: :rtype: """ import os import cobra import matplotlib.pyplot as plt import numpy as np os.chdir('../../ComplementaryData/Step_03_Compare_Refine/') print('----- loading model...
2.109375
2
src/pyTCP/server.py
nimpsch/pyTCP
0
12772898
import select import socketserver import threading from queue import Queue class ThreadedTCPServer(socketserver.ThreadingMixIn, socketserver.TCPServer): pass class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): """A threaded tcp request handler """ def handle(self): """ The ha...
3.40625
3
BITs/2014/Budashov_A_E/task_3_8.py
YukkaSarasti/pythonintask
0
12772899
#Задача N3. Вариант 8 #Напишите программу, которая выводит имя "<NAME>", и #запрашивает его псевдоним. Программа должна сцеплять две эти строки и #выводить полученную строку, разделяя имя и псевдоним с помощью тире. #<NAME> #03.03.2016 print("Герой нашей сегодняшней программы-<NAME>") psev=input("Под каким же псевдони...
3.953125
4
dao/FollowerDAO.py
iosTeamofFour/iAimeServer
0
12772900
<gh_stars>0 import traceback import pymysql from dao.DatabaseConfig import * from pojo.Follower import Follower class FollowerDAO: __db_host = host __db_admin = admin __db_password = password __db = database __port = port __charset = charset def retrieve(self, user_id): retrieve...
2.421875
2
stackless/threadscheduling.py
irr/python-labs
4
12772901
<filename>stackless/threadscheduling.py # # A demonstration of how each thread has its own scheduler. # # Author: <NAME> <<EMAIL>> # # This code was written to serve as an example of Stackless Python usage. # Feel free to email me with any questions, comments, or suggestions for # improvement. # # FURTHER DETA...
3.28125
3
bvspca/core/migrations/0017_auto_20171229_1052.py
rds0751/bvspca
10
12772902
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-29 17:52 from __future__ import unicode_literals from django.db import migrations import wagtail.core.blocks import wagtail.core.fields import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ('core', '0016_auto...
1.609375
2
lib/bindings/samples/server/debug/profiling_output.py
tlalexander/stitchEm
182
12772903
import threading import errors import vs import logging import gc from blinker import signal from utils import performance from output.output import Output # We need to be able to load (not run) vs_server on windows to generate the documentation. # So we're skipping non-windows imports try: import psutil except...
2.15625
2
examples/nonlinear_reg.py
xxao/miniml
0
12772904
import miniml import numpy as np # Adapted from: # https://lucidar.me/en/neural-networks/curve-fitting-nonlinear-regression/ # init data np.random.seed(3) X = np.linspace(-10, 10, num=1000) Y = 0.1*X*np.cos(X) + 0.1*np.random.normal(size=1000) X = X.reshape((len(X), 1)) Y = Y.reshape((len(Y), 1)) # create model mod...
3.296875
3
tests/test-permissions.py
maurice0918/aioftp
0
12772905
from common import * # noqa @aioftp_setup( server_args=([(aioftp.User( base_path="tests/foo", home_path="/", permissions=[aioftp.Permission(writable=False)], ),)], {})) @with_connection @expect_codes_in_exception("550") async def test_permission_denied(loop, client, server): awai...
2.015625
2
Lib/GenericWebpageParser.py
rtroper0/deep-learning-data-repo
0
12772906
# Library imports from bs4 import BeautifulSoup import requests # Generic web parser providing basic functionality to load a webpage # Use this as a base class for more specific webpage parsers class WebpageParser: # WebpageParser version version = '0.1' # Used to request web page headers = {'Use...
3.328125
3
plaso/parsers/utmp.py
CNR-ITTIG/plasodfaxp
1
12772907
<gh_stars>1-10 # -*- coding: utf-8 -*- """Parser for Linux UTMP files.""" import construct import logging import os import socket from plaso.events import time_events from plaso.lib import errors from plaso.lib import eventdata from plaso.parsers import interface from plaso.parsers import manager __author__ = '<NAM...
2.578125
3
算法设计与分析/作业/homework3T2.py
TD21forever/hdu-term-project-helper
17
12772908
<filename>算法设计与分析/作业/homework3T2.py # -*- coding: utf-8 -*- # @Author: TD21forever # @Date: 2019-05-25 00:18:44 # @Last Modified by: TD21forever # @Last Modified time: 2019-05-26 11:36:12 ''' 保证差距最远的两个磁道的概率最小 ''' def solution(k,alist): sumRate = sum(alist) rate = [i/sumRate for i in alist] rate.sort...
3.71875
4
freezerclient/tests/unit/test_shell.py
memogarcia/python-freezerclient
18
12772909
# (c) Copyright 2018 ZTE Corporation. # # 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 w...
1.84375
2
rekcurd_dashboard/logger/__init__.py
rekcurd/dashboard
19
12772910
<reponame>rekcurd/dashboard # -*- coding: utf-8 -*- from .logger_interface import SystemLoggerInterface from .logger_jsonlogger import JsonSystemLogger from .logger_fluent import FluentSystemLogger logger = JsonSystemLogger()
1.070313
1
tests_perf/main.py
fnrizzi/pressio-demoapps
2
12772911
#!/usr/bin/env python import pathlib, sys file_path = pathlib.Path(__file__).parent.absolute() from argparse import ArgumentParser import numpy as np import time import pressiodemoapps as pda def schemeStringToSchemeEnum(s): if s=="FirstOrder": return pda.InviscidFluxReconstruction.FirstOrder elif s=="Weno3"...
2.453125
2
tests/test_library.py
dtomlinson91/panaetius
0
12772912
import panaetius def test_set_config(header, shared_datadir): # arrange config_path = str(shared_datadir / "without_logging") # act config = panaetius.Config(header, config_path) panaetius.set_config(config, "some_top_string") # assert assert getattr(config, "some_top_string") == "some_t...
2.203125
2
buildup/fenics_/phase2/coupled_phie.py
macklenc/mtnlion
0
12772913
<filename>buildup/fenics_/phase2/coupled_phie.py<gh_stars>0 import sys import dolfin as fem import matplotlib.pyplot as plt import numpy as np import sympy as sym from buildup import common, utilities from mtnlion.newman import equations # NOTE: Deprecated def picard_solver(a, lin, estimated, previous, bc): ep...
2.296875
2
naszrzecznik2/signatures/apps.py
watchdogpolska/naszrzecznik2
0
12772914
<reponame>watchdogpolska/naszrzecznik2 from __future__ import unicode_literals from django.apps import AppConfig class SignaturesConfig(AppConfig): name = 'signatures'
1.148438
1
build/lib/ctrlengine/filters/__init__.py
0xJeremy/ctrl.engine
3
12772915
from .simple_moving_average import simple_moving_average simple_moving_average = simple_moving_average from .exponentially_weighted_moving_average import exponentially_weighted_moving_average exponentially_weighted_moving_average = exponentially_weighted_moving_average
1.4375
1
setup.py
guilledk/triopatterns
12
12772916
<filename>setup.py #!/usr/bin/env python3 from setuptools import setup, find_packages setup( name="triopatterns", packages=find_packages(), version="0.1.0", description="Useful async patterns I repeat everywere when using trio.", install_requires=[ "trio" ] )
1.359375
1
BPt/pipeline/ensemble_wrappers.py
sahahn/ABCD_ML
1
12772917
from copy import deepcopy from .helpers import set_n_jobs, replace_with_in_params from sklearn.ensemble import (StackingRegressor, StackingClassifier, VotingClassifier, VotingRegressor) from joblib import Parallel, delayed from sklearn.base import clone, is_classifier from sklearn.utils...
1.882813
2
v10b/client.py
gavinIRL/RHBotArray
0
12772918
<reponame>gavinIRL/RHBotArray import socket import select import errno import sys from win32gui import GetWindowText, GetForegroundWindow from win32api import GetSystemMetrics from windowcapture import WindowCapture import ctypes from pynput.keyboard import Key, Listener, KeyCode from pynput import mouse, keyboard from...
2.09375
2
dataList_fast.py
181654686/stoke_spider
2
12772919
import requests #导入requests包 import json import records import configparser import time from lxml import etree import xml.sax import time # sz000001 db = records.Database("mysql://root:123456@localhost:3306/gupiao?charset=utf8") # data = [ # {'name': 'Jiji', 'age': 23}, # {'name': 'Mini'...
2.75
3
wymeditor/widgets.py
mbi/django-wymeditor
1
12772920
<filename>wymeditor/widgets.py<gh_stars>1-10 from django import forms from django.conf import settings from django.contrib.admin import widgets class WYMEditorArea(forms.Textarea): def __init__(self, attrs={}): base_class = attrs.get("class", "") attrs['class'] = " ".join((base_class, "WYMEditor",...
2.03125
2
boosting_decision_making/boosting_featurizer.py
fossabot/service-auto-analyzer
0
12772921
<gh_stars>0 """ * Copyright 2019 EPAM Systems * * 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...
2.015625
2
src/leetcode_326_power_of_three.py
sungho-joo/leetcode2github
0
12772922
# @l2g 326 python3 # [326] Power of Three # Difficulty: Easy # https://leetcode.com/problems/power-of-three # # Given an integer n, return true if it is a power of three. Otherwise, return false. # An integer n is a power of three, if there exists an integer x such that n == 3x. # # Example 1: # Input: n = 27 # Output:...
4.28125
4
testing/CinemaBaseTest.py
JonasLukasczyk/workbench
0
12772923
<reponame>JonasLukasczyk/workbench import unittest import numpy import os import matplotlib.pyplot as plt from matplotlib.testing.compare import compare_images class CinemaBaseTest(unittest.TestCase): gold = "testing/gold" scratch = "testing/scratch" def __init__(self, *args, **kwargs): super(C...
2.484375
2
com/LimePencil/Q11866/Main.py
LimePencil/baekjoonProblems
2
12772924
import sys from collections import deque n, k = list(map(int,sys.stdin.readline().strip("\n").split(" "))) circle = deque(list(range(1, n+1))) order = [] for i in range(n): for j in range(k): if(k-1 !=j): circle.append(circle.popleft()) else: order.append(circle.popleft()) ...
3.34375
3
backend/cukiernia/serializers.py
MatMark/ZIwG
3
12772925
<filename>backend/cukiernia/serializers.py from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import Product, ProductPhoto, TextBox, ComboBox, ComboBoxValue, OrderStatus, Order, Decoration, Delivery from .models import Calendar, Category, Carousel, CarouselPhoto, Rela...
2.265625
2
cloudpathlib/local/__init__.py
kabirkhan/cloudpathlib
128
12772926
<filename>cloudpathlib/local/__init__.py """This module implements "Local" classes that mimic their associated `cloudpathlib` non-local counterparts but use the local filesystem in place of cloud storage. They can be used as drop-in replacements, with the intent that you can use them as mock or monkepatch substitutes i...
2.28125
2
lib/base/framework.py
dromero1452/shellsploit-framework
2
12772927
<gh_stars>1-10 from lib.core.base import Base from lib.payloads.shellcode import Shellcode class ShellsploitFramework(Base, Shellcode): def __init__(self): super(Base, self).__init__() super(Shellcode, self).__init__()
1.835938
2
tests/test_case_style.py
xkumiyu/case-style-changer
2
12772928
import pytest from case_style_changer.case_style import CamelCase from case_style_changer.case_style import CapitalCase from case_style_changer.case_style import Case from case_style_changer.case_style import ConstantCase from case_style_changer.case_style import KebabCase from case_style_changer.case_style import Pas...
2.546875
3
src/wai/annotations/core/component/_ProcessorComponent.py
waikato-ufdl/wai-annotations-core
0
12772929
from abc import ABC from ..stream import StreamProcessor, InputElementType, OutputElementType from ._Component import Component class ProcessorComponent( StreamProcessor[InputElementType, OutputElementType], Component, ABC ): """ Base class for plugin ISPs. """ pass
1.789063
2
kasuga/wordholder.py
hashimom/kasuga
3
12772930
<reponame>hashimom/kasuga # -*- coding: utf-8 -*- """ Copyright (c) 2018-2019 <NAME> <<EMAIL>> 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...
1.078125
1
planet_express.py
srobo/kit-packages
0
12772931
<reponame>srobo/kit-packages """Our crew is replaceable, your package isn't!""" import subprocess from pathlib import Path from shutil import move from typing import List # NB: These are manually dependency sorted! # TODO: Tree shaking or DAG or equivalent PACKAGES: List[str] = [ "python-dbus-next", "python-gm...
2.421875
2
built-in/PyTorch/Official/cv/image_object_detection/YoloV3_ID1790_for_PyTorch/configs/legacy_1.x/mask_rcnn_r50_fpn_1x_coco_v1.py
Ascend/modelzoo
12
12772932
# Copyright 2021 Huawei Technologies Co., Ltd # # 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.320313
1
tests/test_issues/test_issue_8.py
hsolbrig/pyjsg
3
12772933
import unittest class Issue8TestCase(unittest.TestCase): def test_none_as_string_instance(self): from pyjsg.jsglib import JSGString, JSGPattern class S(JSGString): pattern = JSGPattern(r'[a-zA-Z]+') self.assertTrue(isinstance('abc', S)) self.assertFalse(isinstance('...
2.953125
3
physionet-django/search/forms.py
Lucas-Mc/physionet-build
36
12772934
from django import forms class TopicSearchForm(forms.Form): topic = forms.CharField(max_length=50, required=False, label='') class ProjectOrderForm(forms.Form): ORDER_CHOICES = ( ('relevance-desc', 'Relevance'), ('publish_datetime-desc', 'Latest'), ('publish_datetime-asc', 'Oldest'), ...
2.296875
2
code/04-preictal_nmf.py
akashpattnaik/pre-ictal-similarity
0
12772935
''' This script plots spectrograms for pre-ictal periods. Then, it uses NMF to find subgraphs and expressions for pre-ictal periods. Finally, it calculates states as the subgraph with maximal expression at each time point and calculates the dissimilarity between states. Inputs: target-electrodes-{mode}.mat bandpower-...
2.53125
3
backdoor/dump.py
alu96/coastermelt
0
12772936
#!/usr/bin/env python import sys, struct, time # Use on the command line to interactively dump regions of memory. # Or import as a library for higher level dumping functions. __all__ = [ 'words_from_string', 'poke_words', 'poke_words_from_string', 'poke_bytes', 'read_block', 'scsi_read_buffer', 'hexdu...
3
3
nixnet/database/_collection.py
ni-ldp/nixnet-python
16
12772937
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import typing # NOQA: F401 import six from nixnet import _cprops from nixnet import _funcs from nixnet import constants # NOQA: F401 from nixnet.database import _database_object # NOQA...
2.046875
2
qgrad/tests/test_qgrad_qutip.py
quantshah/qgrad
37
12772938
<reponame>quantshah/qgrad """Tests for qgrad implementation of qutip functions""" from numpy.testing import ( assert_almost_equal, assert_array_equal, assert_array_almost_equal, assert_equal, assert_raises, ) from jax import grad import jax.numpy as jnp from jax.random import PRNGKey, split, uniform...
2.328125
2
ssrf-redis.py
kishorehariram/redis-ssrf
59
12772939
#!/usr/local/bin python #coding=utf8 try: from urllib import quote except: from urllib.parse import quote def generate_info(passwd): cmd=[ "info", "quit" ] if passwd: cmd.insert(0,"AUTH {}".format(passwd)) return cmd def generate_shell(filename,path,passwd,pay...
2.234375
2
rover/stats.py
wallarelvo/rover
1
12772940
import point import math class MonteCarloArea(object): def __init__(self, problem, num_sample_points): self.num_sample_points = num_sample_points self.problem = problem self.total_efficiency = 0.0 self.number_of_updates = 0 self.moving_average = 0.0 self.learning_...
3.09375
3
src/api/migrations/0003_auto_20220328_0004.py
IkramKhan-DevOps/cs-neuro-ai
0
12772941
<gh_stars>0 # Generated by Django 3.2.12 on 2022-03-27 19:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0002_auto_20220327_2250'), ] operations = [ migrations.AddField( model_name='predication', name=...
1.585938
2
src/btc/addr.py
ccebrecos/py-telegram-bot
2
12772942
""" https://rosettacode.org/wiki/Bitcoin/address_validation#Python """ # Libraries from hashlib import sha256 # Constants DIGITS_58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' def decode_base58(addr, length): n = 0 for char in addr: n = n * 58 + DIGITS_58.index(char) return n.t...
3.3125
3
cv07/obvody_a_obsahy.py
xtompok/uvod-do-prg_20
3
12772943
from obvody import obvod_ctverce, obvod_trojuhelnika, obvod_obdelnika, obvod_kruhu import obsahy as o # čtverec, obdélník, rovnostranný trojúhelník, kruh typ = input("Zadej typ útvaru: ") strana = int(input("Zadej délku strany / poloměr: ")) if typ == "ctverec": obvod = obvod_ctverce(strana) obsah = o.obsah_c...
3.21875
3
examples/read_array_out_arg.py
scopatz/PyTables
9
12772944
# This script compares reading from an array in a loop using the # tables.Array.read method. In the first case, read is used without supplying # an 'out' argument, which causes a new output buffer to be pre-allocated # with each call. In the second case, the buffer is created once, and then # reused. from __future_...
2.75
3
tlr/fixtures/temperature1.py
bpptkg/tlr
0
12772945
<filename>tlr/fixtures/temperature1.py raw_data = [ b'\x1cT#01 61.01,\r\nT#03 88.07,90.78,90.17,29.48,14.41\r\n \r\n \xae$\xe2\x02\xe0D\x143P\x02\xe0', b'T#01 56.92,\r\nT#03 88.10,90.62,90.42,29.68,14.39\r\n \r\n C \xfc', b'T#01 63.51,\r\nT#03 87.98,90.36,90.15,29.30,14.41\r\n \r\n \x03\x82\x01\x80$\x9f\xd8...
2.046875
2
lib2nbdev/convert.py
manisnesan/lib2nbdev
27
12772946
# AUTOGENERATED! DO NOT EDIT! File to edit: 00_convert.ipynb (unless otherwise specified). __all__ = ['code_cell', 'write_module_cell', 'init_nb', 'write_cell', 'write_nb', 'convert_lib'] # Cell import json from fastcore.basics import Path from fastcore.xtras import is_listy from fastcore.foundation import Config fr...
2.078125
2
train.py
SumitM0432/Explicit-Content-Classifier-using-ResNet
3
12772947
import torch import config import engine import dataset_prep import torch.nn as nn import model import metrics import matplotlib.pyplot as plt if __name__ == '__main__': # DataLoaders train_loader, val_loader = dataset_prep.tr_dataset(batch_size = config.BATCH_SIZE) classes = val_loader.dataset.dataset.c...
2.4375
2
pydc1394/ui/qt/display.py
joristork/milovision
8
12772948
#!/usr/bin/env python # encoding: utf-8 # # This file is part of pydc1394. # # pydc1394 is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ...
1.773438
2
scripts/build.py
1byte2bytes/SydChain
0
12772949
<reponame>1byte2bytes/SydChain import build_autoconf import build_automake import build_bison import build_libtool import build_m4 import build_make import build_cmake import build_git import build_mercurial import build_ccache import build_gawk import build_yasm import build_nasm import build_mono import build_rustc i...
0.863281
1
tools/paconn-cli/paconn/apimanager/iconuploader.py
Mounika-Chillamcherla/PowerPlatformConnectors
0
12772950
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- ""...
2.5
2