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
parameters_8001.py
sanket0211/courier-portal
0
14500
password="<PASSWORD>(1<PASSWORD>,20,sha512)$8a062c206755a51e$df13c5122a621a9de3a64d39f26460f175076ca0"
1.054688
1
TheKinozal/custom_storages/async_s3_video.py
R-Mielamud/TheKinozal
1
14501
<reponame>R-Mielamud/TheKinozal<filename>TheKinozal/custom_storages/async_s3_video.py import os from TheKinozal import settings from storages.backends.s3boto3 import S3Boto3Storage from helpers.random_string import generate_random_string from helpers.chunked_upload import ChunkedS3VideoUploader class AsyncS3VideoStora...
1.921875
2
bh_tsne/prep_result.py
mr4jay/numerai
306
14502
import struct import numpy as np import pandas as pd df_train = pd.read_csv('../data/train_data.csv') df_valid = pd.read_csv('../data/valid_data.csv') df_test = pd.read_csv('../data/test_data.csv') with open('result.dat', 'rb') as f: N, = struct.unpack('i', f.read(4)) no_dims, = struct.unpack('i', f.read(4)) ...
2.546875
3
moca/urls.py
satvikdhandhania/vit-11
1
14503
from django.conf.urls.defaults import patterns, url, include # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', (r'^log/', include('requestlog.urls')), (r'^admin/', include(admin.site.urls)), # Pass anything that does...
1.554688
2
tests/template_tests/filter_tests/test_unordered_list.py
DasAllFolks/django
1
14504
<gh_stars>1-10 import warnings from django.test import SimpleTestCase from django.utils.deprecation import RemovedInDjango20Warning from django.utils.safestring import mark_safe from ..utils import render, setup class UnorderedListTests(SimpleTestCase): @setup({'unordered_list01': '{{ a|unordered_list }}'}) ...
2.453125
2
models/train_classifier.py
jcardenas14/Disaster-Response
0
14505
<reponame>jcardenas14/Disaster-Response import numpy as np import nltk import re import pandas as pd import sys import pickle from sklearn.pipeline import Pipeline from sklearn.metrics import classification_report from sklearn.model_selection import train_test_split from sklearn.multioutput import MultiOutputClassifier...
2.875
3
getauditrecords.py
muzznak/pyviyatools
25
14506
<gh_stars>10-100 #!/usr/bin/python # -*- coding: utf-8 -*- # # getauditrecords.py January 2020 # # Extract list of audit records from SAS Infrastructure Data Server using REST API. # # Examples: # # 1. Return list of audit events from all users and applications # ./getauditrecords.py # # Change History # # 10JA...
2.3125
2
async_blp/handlers.py
rockscie/async_blp
12
14507
""" File contains handler for ReferenceDataRequest """ import asyncio import uuid from typing import Dict from typing import List from .base_handler import HandlerBase from .base_request import RequestBase from .requests import Subscription from .utils.blp_name import RESPONSE_ERROR from .utils.log import get_logger ...
2
2
cytochrome-b6f-nn-np-model-kinetics.py
vstadnyt/cytochrome
0
14508
import cytochrome_lib #This is a cytochrome library import matplotlib.pyplot as plt import numpy as np version = "Last update: Aug 8, 2017" desription = "This code calculates population distribution in the cytochrome b6f protein and plots kinetic profiles for two different models: \n'nn' and 'np' models \n The outpu...
3.1875
3
moderation/models.py
raja-creoit/django-moderation
0
14509
<reponame>raja-creoit/django-moderation from __future__ import unicode_literals from django.conf import settings try: from django.contrib.contenttypes.fields import GenericForeignKey except ImportError: from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models im...
1.773438
2
hygnd/munge.py
thodson-usgs/hygnd
2
14510
from math import floor import pandas as pd def filter_param_cd(df, code): """Return df filtered by approved data """ approved_df = df.copy() params = [param.strip('_cd') for param in df.columns if param.endswith('_cd')] for param in params: #filter out records where param_cd doesn't cont...
2.921875
3
get_stock_data.py
jeremychonggg/Alpaca-Trading-Bot
0
14511
import json import requests import pandas as pd import websocket # Get Alpaca API Credential endpoint = "https://data.alpaca.markets/v2" headers = json.loads(open("key.txt", 'r').read()) def hist_data(symbols, start="2021-01-01", timeframe="1Hour", limit=50, end=""): """ returns historical b...
2.84375
3
yaps/server/subscription.py
victorhook/vqtt
0
14512
import asyncio from yaps.api import protocol from yaps.utils.log import Log SLEEP_SLOT_TIME = 1 # In seconds. class State: PING_PONG = 1 PING_PONG_1_MISS = 2 PING_PONG_2_MISS = 3 class Subscription: """ Abstraction for handling a subscription. This class has utilites that ...
3.0625
3
processing/1_comset.py
acleclair/ICPC2020_GNN
58
14513
<filename>processing/1_comset.py<gh_stars>10-100 import pickle bad_fid = pickle.load(open('autogenfid.pkl', 'rb')) comdata = 'com_pp.txt' good_fid = [] outfile = './output/dataset.coms' fo = open(outfile, 'w') for line in open(comdata): tmp = line.split(',') fid = int(tmp[0].strip()) if bad_fid[fid]: ...
2.484375
2
shibuya/cubesym.py
Parcly-Taxel/Shibuya
0
14514
<filename>shibuya/cubesym.py<gh_stars>0 """ Cubic symmetric graphs. Most of the embeddings realised here were taken from MathWorld. """ from mpmath import * from functools import reduce from shibuya.generators import cu, star_radius, ring_edges, lcf_edges from shibuya.generators import all_unit_distances, circumcentre ...
2.125
2
src/create_scatterplot.py
djparente/coevol-utils
1
14515
#!/cygdrive/c/Python27/python.exe # <NAME>, Ph.D. # Swint-Kruse Laboratory # Physician Scientist Training Program # University of Kansas Medical Center # This code is adapted from the example available at # http://pandasplotting.blogspot.com/2012/04/added-kde-to-scatter-matrix-diagonals.html # Creates a scatterplot ...
2.9375
3
core/perspective_projection.py
sam-lb/python-grapher
2
14516
import pygame; import numpy as np; from math import sin, cos; pygame.init(); width, height, depth = 640, 480, 800; camera = [width // 2, height // 2, depth]; units_x, units_y, units_z = 8, 8, 8; scale_x, scale_y, scale_z = width / units_x, height / units_y, depth / units_z; screen = pygame.display.set_mode((width, he...
3.40625
3
manu_sawyer/src/tensorflow_model_is_gripping/grasp_example.py
robertocalandra/the-feeling-of-success
10
14517
import grasp_net, grasp_params, h5py, aolib.img as ig, os, numpy as np, aolib.util as ut net_pr = grasp_params.im_fulldata_v5() net_pr = grasp_params.gel_im_fulldata_v5() checkpoint_file = '/home/manu/ros_ws/src/manu_research/manu_sawyer/src/tensorflow_model_is_gripping/training/net.tf-6499' gpu = '/gpu:0' db_file = ...
1.84375
2
API/models/models.py
Rkanehisa/Stone_Projeto
0
14518
from API.db import db from datetime import datetime from passlib.apps import custom_app_context as pwd_context class User(db.Model): __tablename__ = "users" def __init__(self, username, password): self.username = username self.password = pwd_context.hash(password) self.limit = 0 ...
2.578125
3
src/TestDice.py
Yamanama/CodeMonkeyApplication
0
14519
import unittest from Dice import Dice class TestDice(unittest.TestCase): def setUp(self): self.sides = 8 self.dice = Dice(self.sides) def test_roll(self): for i in range(1000): self.assertLessEqual(self.dice.roll(), self.sides) def test_error(self): self.asse...
3.53125
4
accProcess.py
CASSON-LAB/BiobankActivityCSF
3
14520
"""Command line tool to extract meaningful health info from accelerometer data.""" import accelerometer.accUtils import argparse import collections import datetime import accelerometer.device import json import os import accelerometer.summariseEpoch import sys import pandas as pd import numpy as np import matplotlib.p...
3.21875
3
VetsApp/views.py
Sabrinax3/Pet-Clinic-1
2
14521
from django.shortcuts import render from .models import VetsInfoTable # Create your views here. def home(request): context = { "name": "Home" } return render(request, 'index.html', context) def view_vets(request): obj = VetsInfoTable.objects.all() context = { "vets_data": obj...
1.96875
2
generate.py
IsaacPeters/Closest-Pair-of-Points
1
14522
import sys import math import random # Figure out what we should name our output file, and how big it should be if len(sys.argv) != 3: # Make sure we get a file argument, and only that print("Incorrect number of arguments found, should be \"generate <file> 10^<x>\"") for i in range(10): with open("./gen/%s%d"...
3.828125
4
wagtail/snippets/urls.py
brownaa/wagtail
2
14523
<gh_stars>1-10 from django.urls import path from wagtail.snippets.views import chooser, snippets app_name = 'wagtailsnippets' urlpatterns = [ path('', snippets.index, name='index'), path('choose/', chooser.choose, name='choose_generic'), path('choose/<slug:app_label>/<slug:model_name>/', chooser.choose,...
2
2
ding/envs/env/tests/test_env_implementation_check.py
jayyoung0802/DI-engine
1
14524
import pytest from easydict import EasyDict import numpy as np import gym from copy import deepcopy from ding.envs.env import check_array_space, check_different_memory, check_all, demonstrate_correct_procedure from ding.envs.env.tests import DemoEnv @pytest.mark.unittest def test_an_implemented_env(): demo_env =...
2.46875
2
tests/evergreen/metrics/test_buildmetrics.py
jamesbroadhead/evergreen.py
0
14525
<reponame>jamesbroadhead/evergreen.py<filename>tests/evergreen/metrics/test_buildmetrics.py<gh_stars>0 # -*- encoding: utf-8 -*- """Unit tests for src/evergreen/metrics/buildmetrics.py.""" from __future__ import absolute_import from unittest.mock import MagicMock import pytest import evergreen.metrics.buildmetrics a...
2.09375
2
tools_d2/convert-pretrain-model-to-d2.py
nguyentritai2906/panoptic-deeplab
506
14526
<filename>tools_d2/convert-pretrain-model-to-d2.py #!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import pickle as pkl import sys import torch """ Usage: # download your pretrained model: wget https://github.com/LikeLy-Journey/SegmenTron/releases/download/v0.1.0/tf-xc...
2.25
2
test_geo.py
OrrEos/IA-Flood-Warning-Project
0
14527
import random from floodsystem.utils import sorted_by_key # noqa from floodsystem.geo import stations_by_distance, stations_within_radius, rivers_with_station, stations_by_river,rivers_by_station_number from floodsystem.stationdata import build_station_list '''def test_geo(): #Task 1A #does the function ...
3.296875
3
app.py
aws-samples/aws-cdk-service-catalog-pipeline
0
14528
<reponame>aws-samples/aws-cdk-service-catalog-pipeline #!/usr/bin/env python3 import os import aws_cdk as cdk # For consistency with TypeScript code, `cdk` is the preferred import name for # the CDK's core module. The following line also imports it as `core` for use # with examples from the CDK Developer's Guide, wh...
1.875
2
Generator/Sheet3/PDF.py
trngb/watools
11
14529
# -*- coding: utf-8 -*- """ Authors: <NAME> UNESCO-IHE 2017 Contact: <EMAIL> Repository: https://github.com/wateraccounting/wa Module: Generator/Sheet3 """ import os def Create(Dir_Basin, Basin, Simulation, Dir_Basin_CSV_a, Dir_Basin_CSV_b): """ This functions create the monthly and yearly sheet 3 in ...
2.9375
3
bonita/commands/user.py
dantebarba/bonita-cli
2
14530
<filename>bonita/commands/user.py """The user command.""" from json import dumps from .base import Base from bonita.api.bonita_client import BonitaClient class User(Base): """Manage user""" def run(self): # bonita process [deploy <filename_on_server>|get <process_id>|enable <process_id>|disable <pr...
2.5625
3
pyActionRec/action_flow.py
Xiatian-Zhu/anet2016_cuhk
253
14531
<reponame>Xiatian-Zhu/anet2016_cuhk from config import ANET_CFG import sys sys.path.append(ANET_CFG.DENSE_FLOW_ROOT+'/build') from libpydenseflow import TVL1FlowExtractor import action_caffe import numpy as np class FlowExtractor(object): def __init__(self, dev_id, bound=20): TVL1FlowExtractor.set_dev...
2.3125
2
aqme/qdesc.py
patonlab/aqme
0
14532
<gh_stars>0 #####################################################. # This file stores all the functions # # used for genrating all parameters # #####################################################. from rdkit.Chem import AllChem as Chem from rdkit.Chem import rdMolTransforms import os i...
2.34375
2
googlecode-issues-exporter/generate_user_map.py
ballschin52/support-tools
41
14533
<filename>googlecode-issues-exporter/generate_user_map.py # Copyright 2014 Google Inc. 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/licen...
2.71875
3
apps/auth/views/wxlogin.py
rainydaygit/testtcloudserver
349
14534
from flask import Blueprint from apps.auth.business.wxlogin import WxLoginBusiness from apps.auth.extentions import validation, parse_json_form from library.api.render import json_detail_render wxlogin = Blueprint("wxlogin", __name__) @wxlogin.route('/', methods=['POST']) @validation('POST:wx_user_code') def wxuser...
2.5625
3
servidor/jornada_teorica.py
angeloide78/wShifts
3
14535
# -*- coding: utf-8 -* # ALGG 03-01-2017 Creación de módulo jornada_teorica. class JornadaTeorica(object): def __init__(self, conn): '''Constructor''' # Conexión. self.__conn = conn def get_jt(self, centro_fisico_id = None, anno = None): '''Devuelve: (...
2.71875
3
app.py
jasoncordis/spotify-flask
58
14536
<filename>app.py ''' This code was based on these repositories, so special thanks to: https://github.com/datademofun/spotify-flask https://github.com/drshrey/spotify-flask-auth-example ''' from flask import Flask, request, redirect, g, render_template, session from spotify_requests import spot...
2.953125
3
ckanext-datagathering/ckanext/datagathering/commands/migrate.py
smallmedia/iod-ckan
4
14537
<reponame>smallmedia/iod-ckan from ckan import model from ckan.lib.cli import CkanCommand from ckan.lib.munge import munge_title_to_name, substitute_ascii_equivalents from ckan.logic import get_action from ckan.lib.helpers import render_markdown from ckan.plugins import toolkit import logging log = logging.getLogger(...
2.375
2
run.py
openmg/mg-phm
0
14538
# -*- coding: utf-8 -*- import numpy as np import cv2 from scipy.misc import imsave import matplotlib.pyplot as plt import analysis import imageprocess import datainterface import imagemosaicking town_names = ['昂素镇', '敖勒召其镇', '布拉格苏木', '城川镇', '二道川乡', \ '毛盖图苏木', '三段地镇', '上海庙镇', '珠和苏木'] for index in rang...
2.171875
2
tests/tests_lambda.py
schwin007/Lambda-Metric-Shipper
0
14539
<reponame>schwin007/Lambda-Metric-Shipper import logging import os import unittest from logging.config import fileConfig from src.lambda_function import validate_configurations as validate # create logger assuming running from ./run script fileConfig('tests/logging_config.ini') logger = logging.getLogger(__name__) ...
2.546875
3
script/QA_LSTM.py
xjtushilei/Answer_Selection
4
14540
<reponame>xjtushilei/Answer_Selection import numpy as np import tensorflow from keras import Input, optimizers from keras import backend as K from keras.engine import Model from keras import layers from keras.layers import Bidirectional, LSTM, merge, Reshape, Lambda, Dense, BatchNormalization K.clear_session() print("...
2.5625
3
lib/mysocket.py
vanphuong12a2/pposter
0
14541
from flask_socketio import SocketIO NOTI = 'notification' class MySocket(): def __init__(self, app, async_mode): self.socketio = SocketIO(app, async_mode=async_mode) def get_socketio(self): return self.socketio def noti_emit(self, msg, room=None): if room: self.soc...
2.53125
3
server/tests/steps/sql_translator/test_filter.py
davinov/weaverbird
54
14542
import pytest from weaverbird.backends.sql_translator.metadata import SqlQueryMetadataManager from weaverbird.backends.sql_translator.steps import translate_filter from weaverbird.backends.sql_translator.types import SQLQuery from weaverbird.pipeline.conditions import ComparisonCondition from weaverbird.pipeline.steps...
2.015625
2
nose2/plugins/loader/testcases.py
leth/nose2
0
14543
<gh_stars>0 """ Load tests from :class:`unittest.TestCase` subclasses. This plugin implements :func:`loadTestsFromName` and :func:`loadTestsFromModule` to load tests from :class:`unittest.TestCase` subclasses found in modules or named on the command line. """ # Adapted from unittest2/loader.py from the unittest2 plu...
2.46875
2
todo/main.py
shuayb/simple-todo
0
14544
<reponame>shuayb/simple-todo from app import app, db import models import views if __name__ == '__main__': app.run() # No need to do (debug=True), as in config.py, debug = true is already set. # app.run(debug=True) # app.run(debug=True, use_debugger=False, use_reloader=False)
1.789063
2
Libraries/DUTs/Community/di_vsphere/pysphere/revertToNamedSnapshot.py
nneul/iTest-assets
10
14545
<filename>Libraries/DUTs/Community/di_vsphere/pysphere/revertToNamedSnapshot.py import sys sys.path.append("./pysphere") from pysphere import VIServer from pysphere.resources.vi_exception import VIException, VIApiException, \ FaultTypes import sys if len(sys.argv) != 6:...
2.34375
2
easy_rec/python/utils/fg_util.py
xia-huang-411303/EasyRec
61
14546
<filename>easy_rec/python/utils/fg_util.py<gh_stars>10-100 import json import logging import tensorflow as tf from easy_rec.python.protos.dataset_pb2 import DatasetConfig from easy_rec.python.protos.feature_config_pb2 import FeatureConfig from easy_rec.python.utils.config_util import get_compatible_feature_configs f...
2.046875
2
modules/api/functional_test/live_tests/conftest.py
exoego/vinyldns
0
14547
<reponame>exoego/vinyldns import pytest @pytest.fixture(scope="session") def shared_zone_test_context(request): from shared_zone_test_context import SharedZoneTestContext ctx = SharedZoneTestContext() def fin(): ctx.tear_down() request.addfinalizer(fin) return ctx @pytest.fixture(scop...
1.976563
2
calculate_best_ball_scores.py
arnmishra/sleeper-best-ball
0
14548
<gh_stars>0 from enum import Enum import requests import argparse import nflgame def get_user_id_to_team_name(league_id): """ Gets a map of fantasy player user id to their team name """ user_id_to_team_name = {} r = requests.get("https://api.sleeper.app/v1/league/%s/users" % league_id) user_dat...
3.015625
3
Kelp/kelp.py
trondkr/particleDistributions
0
14549
#!/usr/bin/env python from datetime import datetime, timedelta import numpy as np from opendrift.readers import reader_basemap_landmask from opendrift.readers import reader_ROMS_native from kelp.kelpClass import PelagicPlanktonDrift from opendrift.readers import reader_netCDF_CF_generic import logging import gdal imp...
2.578125
3
evernotebot/bot/storage.py
AuroraDysis/evernote-telegram-bot
1
14550
import json import sqlite3 import typing from typing import Optional, Dict from copy import deepcopy from contextlib import suppress from bson.objectid import ObjectId from pymongo import MongoClient from pymongo.errors import ConfigurationError class MongoStorageException(Exception): pass class Mongo: def...
2.8125
3
tests/models/programdb/opstress/opstress_integration_test.py
TahaEntezari/ramstk
26
14551
<reponame>TahaEntezari/ramstk # pylint: skip-file # type: ignore # -*- coding: utf-8 -*- # # tests.models.opstress.opstress_integration_test.py is part of The RAMSTK Project # # All rights reserved. # Copyright since 2007 Doyle "weibullguy" Rowland doyle.rowland <AT> reliaqual <DOT> com """Class for testing opera...
1.757813
2
rssant_async/views.py
landlordlycat/rssant
0
14552
<gh_stars>0 import os from validr import T from aiohttp.web import json_response from aiohttp.web_request import Request from rssant_common import timezone from rssant_common.image_token import ImageToken, ImageTokenDecodeError from rssant_config import CONFIG from .rest_validr import ValidrRouteTableDef from .image_...
2.078125
2
tests/test_matching.py
grickly-nyu/grickly
3
14553
from testing_config import BaseTestConfig from application.models import User from application.models import Chatroom import json from application.utils import auth class TestMatch(BaseTestConfig): test_group = { "name": "test_group", "tag": "Poker", } test_group2 = { "name": "test...
2.453125
2
examples/pycaffe/layers/aggregation_cross_entropy_layer.py
HannaRiver/all-caffe
0
14554
import sys sys.path.insert(0, '/home/hena/caffe-ocr/buildcmake/install/python') sys.path.insert(0, '/home/hena/tool/protobuf-3.1.0/python') import caffe import math import numpy as np def SoftMax(net_ans): tmp_net = [math.exp(i) for i in net_ans] sum_exp = sum(tmp_net) return [i/sum_exp for i in tmp_net] ...
2.265625
2
pyroms/sta_hgrid.py
ChuningWang/pyroms2
0
14555
""" Tools for creating and working with Line (Station) Grids """ from typing import Union import pyproj import numpy as np _atype = Union[type(None), np.ndarray] _ptype = Union[type(None), pyproj.Proj] class StaHGrid: """ Stations Grid EXAMPLES: -------- >>> x = arange(8) >>> y = arange(8...
3.140625
3
lstchain/visualization/camera.py
misabelber/cta-lstchain
0
14556
import numpy as np from ..reco.disp import disp_vector import astropy.units as u import matplotlib.pyplot as plt from ctapipe.visualization import CameraDisplay __all__ = [ 'overlay_disp_vector', 'overlay_hillas_major_axis', 'overlay_source', 'display_dl1_event', ] def display_dl1_event(event, camera_...
2.28125
2
QFlow-2.0/QFlow/Process_Data.py
jpzwolak/QFlow-suite
0
14557
import numpy as np import random from scipy.stats import skew as scipy_skew from skimage.transform import resize as skimage_resize from QFlow import config ## set of functions for loading and preparing a dataset for training. def get_num_min_class(labels): ''' Get the number of the minimum represented class i...
3.171875
3
vimfiles/bundle/vim-python/submodules/pylint/tests/functional/s/star/star_needs_assignment_target_py35.py
ciskoinch8/vimrc
463
14558
""" Test PEP 0448 -- Additional Unpacking Generalizations https://www.python.org/dev/peps/pep-0448/ """ # pylint: disable=superfluous-parens, unnecessary-comprehension UNPACK_TUPLE = (*range(4), 4) UNPACK_LIST = [*range(4), 4] UNPACK_SET = {*range(4), 4} UNPACK_DICT = {'a': 1, **{'b': '2'}} UNPACK_DICT2 = {**UNPACK_D...
2.46875
2
src/ikazuchi/errors.py
t2y/ikazuchi
0
14559
# -*- coding: utf-8 -*- class IkazuchiError(Exception): """ ikazuchi root exception """ pass class TranslatorError(IkazuchiError): """ ikazuchi translator exception """ pass class NeedApiKeyError(TranslatorError): pass
1.6875
2
engine/resources.py
gerizim16/MP2_GRP19
1
14560
import pyglet print('Loading resources') def center_image(image): """Sets an image's anchor point to its center""" image.anchor_x = image.width / 2 image.anchor_y = image.height / 2 # Tell pyglet where to find the resources pyglet.resource.path = ['./resources', './resources/backgrounds'] pyglet.resource...
3.328125
3
search_for_similar_images__perceptual_hash__phash/ui/SelectDirBox.py
DazEB2/SimplePyScripts
117
14561
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' # SOURCE: https://github.com/gil9red/VideoStreamingWithEncryption/blob/37cf7f501460a286ec44a20db7b2403e8cb05d97/server_GUI_Qt/inner_libs/gui/SelectDirBox.py import os from PyQt5.QtWidgets import QWidget, QLineEdit, QLabel, QPushButton, QHBoxLa...
2.25
2
ImageStabilizer.py
arthurscholz/UMN-AFM-Scripts
0
14562
import numpy as np import picoscript import cv2 import HeightTracker import atexit print "Setting Parameters..." zDacRange = 0.215 # Sensor specific number windowSize = 3e-6 # window size in meters windowBLHCX = 3.5e-6 # window bottom left hand corner X-axis in meters windowBLHCY = 3.5e-6 # window bottom left hand c...
2.421875
2
Twitter Data Extraction.py
scottblender/twitter-covid-19-vaccine-analysis
0
14563
<gh_stars>0 import snscrape.modules.twitter as sntwitter import pandas as pd # Creating list to append tweet data to tweets_list2 = [] # Using TwitterSearchScraper to scrape data and append tweets to list for i,tweet in enumerate(sntwitter.TwitterSearchScraper('covid vaccine until:2021-05-24').get_items()): if i>1...
2.984375
3
hugs/__init__.py
Bogdanp/hugs
22
14564
from .repository import Repository from .manager import Manager __all__ = ["Manager", "Repository", "__version__"] __version__ = "0.2.0"
1.101563
1
Source/Git/wb_git_project.py
barry-scott/git-workbench
24
14565
''' ==================================================================== Copyright (c) 2016-2017 <NAME>. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. =============================================================...
1.890625
2
stackflowCrawl/spiders/stackoverflow/constants/consult.py
matheuslins/stackflowCrawl
0
14566
<gh_stars>0 XPAHS_CONSULT = { 'jobs_urls': '//div[contains(@class, "listResults")]//div[contains(@data-jobid, "")]//h2//a/@href', 'results': '//span[@class="description fc-light fs-body1"]//text()', 'pagination_indicator': '//a[contains(@class, "s-pagination--item")][last()]//span[contains(text(), "next")]...
1.515625
2
mainSample.py
snipeso/sample_psychopy
0
14567
import logging import os import random import time import datetime import sys import math from screen import Screen from scorer import Scorer from trigger import Trigger from psychopy import core, event, sound from psychopy.hardware import keyboard from pupil_labs import PupilCore from datalog import Datalog from conf...
2.21875
2
src/commercetools/services/inventory.py
labd/commercetools-python-sdk
15
14568
<gh_stars>10-100 # DO NOT EDIT! This file is automatically generated import typing from commercetools.helpers import RemoveEmptyValuesMixin from commercetools.platform.models.inventory import ( InventoryEntry, InventoryEntryDraft, InventoryEntryUpdate, InventoryEntryUpdateAction, InventoryPagedQuer...
1.875
2
qmla/remote_model_learning.py
flynnbr11/QMD
9
14569
<gh_stars>1-10 from __future__ import print_function # so print doesn't show brackets import copy import numpy as np import time as time import matplotlib.pyplot as plt import pickle import redis import qmla.model_for_learning import qmla.redis_settings import qmla.logging pickle.HIGHEST_PROTOCOL = 4...
2.671875
3
pylinex/quantity/CompiledQuantity.py
CU-NESS/pylinex
0
14570
<gh_stars>0 """ File: pylinex/quantity/CompiledQuantity.py Author: <NAME> Date: 3 Sep 2017 Description: File containing a class representing a list of Quantities to be evaluated with the same (or overlapping) arguments. When it is called, each underlying Quantity is called. """ from ..util im...
2.75
3
Desafios/desafio48.py
ArthurBrito1/MY-SCRIPTS-PYTHON
1
14571
s = 0 cont = 0 for c in range(1, 501, 2): if c % 3 == 0: s = s + c cont = cont + 1 print('A soma de todos os {} valores solicitados é {}'.format(cont, s))
3.609375
4
tests/test_k8s_cronjob.py
riconnon/kubernetes-py
0
14572
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # import time import uuid from kubernetes.K8sCronJob import K8sCronJob from kubernetes.K8sPod import K8sPod from kubernetes.models.v2alpha1.Cro...
2.015625
2
code/nn/optimization.py
serced/rcnn
372
14573
''' This file implements various optimization methods, including -- SGD with gradient norm clipping -- AdaGrad -- AdaDelta -- Adam Transparent to switch between CPU / GPU. @author: <NAME> (<EMAIL>) ''' import random from collections import OrderedDict import numpy as np i...
2.09375
2
projectlaika/looseWindow.py
TheSgtPepper23/LaikaIA
0
14574
import sys from PyQt5.QtWidgets import QMainWindow from PyQt5.QtGui import QPixmap, QIcon from PyQt5 import uic from internationalization import LANGUAGE class Loose(QMainWindow): def __init__(self, lang): QMainWindow.__init__(self) uic.loadUi("windows/Looser.ui", self) self.lang = lang ...
2.6875
3
messenger/helper/http/post.py
gellowmellow/python-messenger-bot
0
14575
<reponame>gellowmellow/python-messenger-bot<gh_stars>0 import requests class Post: def __init__(self, page_access_token, **kwargs): self.page_access_token = page_access_token return super().__init__(**kwargs) def send(self, url, json): try: request_session = reque...
2.765625
3
scripts/Feature_Generation/calculateSREstrengthDifferenceBetweenWTandMUT_perCluster.py
JayKu4418/Computational-Experimental-framework-for-predicting-effects-of-variants-on-alternative-splicing
0
14576
<gh_stars>0 import argparse import Functions_Features.functionsToDetermineMotifStrength as fdm import pandas as pd parser = argparse.ArgumentParser() parser.add_argument("-w","--tmpfolder",type=str,help="Input the upperlevel folder containing folder to Write to") parser.add_argument("-t","--foldertitle",type=str,help=...
2.453125
2
asciinema/asciicast.py
alex/asciinema
1
14577
import os import subprocess import time class Asciicast(object): def __init__(self, env=os.environ): self.command = None self.title = None self.shell = env.get('SHELL', '/bin/sh') self.term = env.get('TERM') self.username = env.get('USER') @property def meta_data(...
2.421875
2
software_engineering-project/project/admin.py
mahdiieh/software_engineering_PROJECT
0
14578
<gh_stars>0 from django.contrib import admin from .models import Movie admin.site.register(Movie)
1.109375
1
datasets/alt/alt.py
NihalHarish/datasets
9
14579
<reponame>NihalHarish/datasets #!/usr/bin/env python # -*- coding: utf-8 -*- """Asian Language Treebank (ALT) Project""" from __future__ import absolute_import, division, print_function import os import datasets _CITATION = """\ @inproceedings{riza2016introduction, title={Introduction of the asian language treeb...
1.929688
2
setup.py
whistlebee/awis-py
1
14580
<filename>setup.py<gh_stars>1-10 from setuptools import setup, find_packages setup( name='awis-py', version='0.0.2', url='https://github.com/whistlebee/awis-py', packages=find_packages(), install_requires=['requests', 'lxml'], python_requires='>=3.6' )
1.625
2
src/validation/aux_functions.py
christianhilscher/dynasim
0
14581
import sys from pathlib import Path import numpy as np import pandas as pd from bokeh.models import ColumnDataSource from bokeh.io import export_png from bokeh.plotting import figure def plot_lifetime(df, type, path): df = df.copy() palette = ["#c9d9d3", "#718dbf", "#e84d60", "#648450"] ylist = [] ...
2.78125
3
test.py
krithikV/vaccineregistration
0
14582
<gh_stars>0 from multiprocessing import Process server = Process(target=app.run)# ... server.terminate()
1.515625
2
deep-rl/lib/python2.7/site-packages/OpenGL/GLES2/vboimplementation.py
ShujaKhalid/deep-rl
210
14583
from OpenGL.arrays import vbo from OpenGL.GLES2.VERSION import GLES2_2_0 from OpenGL.GLES2.OES import mapbuffer class Implementation( vbo.Implementation ): """OpenGL-based implementation of VBO interfaces""" def __init__( self ): for name in self.EXPORTED_NAMES: for source in [ GLES2_2_0, m...
2.65625
3
tests/test_model.py
zeta1999/OpenJij
0
14584
import unittest import numpy as np import openjij as oj import cxxjij as cj def calculate_ising_energy(h, J, spins): energy = 0.0 for (i, j), Jij in J.items(): energy += Jij*spins[i]*spins[j] for i, hi in h.items(): energy += hi * spins[i] return energy def calculate_qubo_energy(Q, ...
2.703125
3
src/bgp-acl-agent/bgp-acl-agent.py
jbemmel/srl-bgp-acl
1
14585
<reponame>jbemmel/srl-bgp-acl #!/usr/bin/env python # coding=utf-8 import grpc from datetime import datetime import sys import logging import socket import os from ipaddress import ip_network, ip_address, IPv4Address import json import signal import traceback import re from concurrent.futures import ThreadPoolExecutor...
1.734375
2
tests/test_35_cfgrib_.py
shoyer/cfgrib
0
14586
from __future__ import absolute_import, division, print_function, unicode_literals import os.path import pytest xr = pytest.importorskip('xarray') # noqa from cfgrib import cfgrib_ SAMPLE_DATA_FOLDER = os.path.join(os.path.dirname(__file__), 'sample-data') TEST_DATA = os.path.join(SAMPLE_DATA_FOLDER, 'era5-level...
1.914063
2
apps/stream_ty_gn_threaded/camera_processor.py
MichelleLau/ncappzoo
1
14587
<gh_stars>1-10 #! /usr/bin/env python3 # Copyright(c) 2017 Intel Corporation. # License: MIT See LICENSE file in root directory. # NPS # pulls images from camera device and places them in a Queue # if the queue is full will start to skip camera frames. #import numpy as np import cv2 import queue import threading imp...
3.328125
3
examples/domainby.py
ipfinder/ip-finder-python
8
14588
<gh_stars>1-10 import ipfinder con = ipfinder.config('f67f788f8a02a188ec84502e0dff066ed4413a85') # YOUR_TOKEN_GOES_HERE # domain name by = 'DZ'; dby = con.getDomainBy(by) print(dby.all)
2.03125
2
manager.py
thangbk2209/pretraining_auto_scaling_ng
0
14589
""" Author: bkc@data_analysis Project: autoencoder_ng Created: 7/29/20 10:51 Purpose: START SCRIPT FOR AUTOENCODER_NG PROJECT """
0.859375
1
netvisor_api_client/schemas/sales_payments/__init__.py
kiuru/netvisor-api-client
5
14590
<filename>netvisor_api_client/schemas/sales_payments/__init__.py from .list import SalesPaymentListSchema # noqa
1.09375
1
derive_cubic.py
vuonglv1612/page-dewarp
9
14591
<filename>derive_cubic.py import numpy as np from matplotlib import pyplot as plt from sympy import symbols, solve a, b, c, d, x, α, β = symbols("a b c d x α β") # polynomial function f(x) = ax³ + bx² + cx + d f = a * x ** 3 + b * x ** 2 + c * x + d fp = f.diff(x) # derivative f'(x) # evaluate both at x=0 and x=1 ...
3.71875
4
test/test_admin.py
image72/browserscope
22
14592
#!/usr/bin/python2.5 # # Copyright 2009 Google 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 ...
1.960938
2
ml/rl/models/example_sequence_model.py
ccphillippi/Horizon
1
14593
<reponame>ccphillippi/Horizon<gh_stars>1-10 #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging from dataclasses import dataclass from typing import Dict, List import torch import torch.nn as nn from ml.rl import types as rlt from ml.rl.models.base import Mode...
2.359375
2
compuG/transformacionesPCarte copia.py
alejoso76/Computaci-n-gr-fica
0
14594
<reponame>alejoso76/Computaci-n-gr-fica import pygame import math #Dibuja triangulo y lo escala con el teclado ANCHO=600 ALTO=480 def dibujarPlano(o, pantalla): pygame.draw.line(pantalla, [0, 255, 0], [o[0], 0], [o[0], 480] ) pygame.draw.line(pantalla, [0, 255, 0], [0, o[1]], [640, o[1]] ) def dibujarTriangul...
3.296875
3
eval.py
CLT29/pvse
119
14595
from __future__ import print_function import os, sys import pickle import time import glob import numpy as np import torch from model import PVSE from loss import cosine_sim, order_sim from vocab import Vocabulary from data import get_test_loader from logger import AverageMeter from option import parser, verify_input...
2.125
2
paddlex/ppdet/modeling/heads/detr_head.py
xiaolao/PaddleX
3,655
14596
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
2.53125
3
python/raspberryPi.py
FirewallRobotics/Vinnie-2019
0
14597
<gh_stars>0 #!/usr/bin/env python3 import json import time import sys #import numpy as np import cv2 from cscore import CameraServer, VideoSource, CvSource, VideoMode, CvSink, UsbCamera from networktables import NetworkTablesInstance def Track(frame, sd): Lower = (0,0,0) Upper = (0,0,0) if sd.getNumber("T...
2.46875
2
soccer_stats_calc/soccer_var_ana.py
steffens21/diesunddas
0
14598
import sys from collections import deque import soccer_toolbox import csv_tools def fileToStats(csvfile, stat, nbrAgg): header, listRawData = csv_tools.loadData(csvfile) dictCol = csv_tools.getColumns(header) setTeams = csv_tools.getTeams(listRawData, dictCol['nColHomeTeam'], dictCol['nColAwayTeam']) ...
2.859375
3
HelloWorldWebsite/searchTest/views.py
404NotFound-401/DjangoTutorial
0
14599
<filename>HelloWorldWebsite/searchTest/views.py from __future__ import unicode_literals from django.shortcuts import render, redirect from django.template import loader from django.http import HttpResponse from django.views import generic from .models import Movie from . import searchapi from django.urls import revers...
2.359375
2