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
app.py
Ator97/dataMiningDataviz
0
30000
<reponame>Ator97/dataMiningDataviz import base64 import datetime import io import dash from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components as html import dash_table import pandas as pd import plotly.express as px from apyori import apriori from scipy.spatia...
2.21875
2
pepys_import/file/highlighter/support/export.py
debrief/pepys-import
4
30001
import html from tqdm import tqdm from .color_picker import color_for, html_color_for, mean_color_for def export_report(filename, chars, dict_colors, include_key=False): """ Export a HTML report showing all the extraction usages for the file. :param filename: Output filename :param chars: Character...
3.140625
3
Task 4/scripts/utilities_activity7.py
gourab337/Technocolab_DL_Internship
1
30002
"""Utility functions used in Activity 7.""" import random import numpy as np from matplotlib import pyplot as plt from keras.callbacks import TensorBoard def create_groups(data, group_size=7): """Create distinct groups from a continuous series. Parameters ---------- data: np.array Series of...
3.5625
4
pygenenet/CausalNetwork.py
ttdtrang/pygenenet
0
30003
import pandas as pd import numpy as np import itertools __metaclass__ = type def prob_incr(species, proj_compressed_data, min_occurences = 10): p = proj_compressed_data['count_incr']/ proj_compressed_data['count'] p[proj_compressed_data['count'] < min_occurences] = -1 return p def score(species,IV, G, ex...
2.109375
2
animation_retarget/animation_retarget_mh.py
curmil/makehuman-utils
3
30004
<reponame>curmil/makehuman-utils<gh_stars>1-10 #!/usr/bin/python """ **Project Name:** MakeHuman **Product Home Page:** http://www.makehuman.org/ **Code Home Page:** https://bitbucket.org/MakeHuman/makehuman/ **Author:** <NAME>, <NAME> **Copyright(c):** MakeHuman Team 2001-2015 **Licensing...
1.953125
2
Python/Config.py
mariocar/Nerf_Aimbot
13
30005
<gh_stars>10-100 """ MECHANICAL PARAMETERS """ s0_step_per_rev = 27106 s1_step_per_rev = 27106 pitch_travel_rads = 0.5 yaw_travel_rads = 1.2 pitch_center_rads = 0.21 yaw_center_rads = 0.59 default_vel_radps = 2.5 default_accel_radps2 = 20 trigger_min_pwm = 40 trigger_max_pwm = 120 trigger_hold_s = 0.5 """ PI PINOU...
1.648438
2
solum-6.0.0/solum/objects/sqlalchemy/execution.py
scottwedge/OpenStack-Stein
39
30006
# Copyright 2014 - Rackspace Hosting # # 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 ...
2.203125
2
cryptopunks/utils.py
tesla809/colorpunx
1
30007
"""Tools for working with Cryptopunk NFTs; this includes utilities for data analysis and image preparation for training machine learning models using Cryptopunks as training data. Functions: get_punk(id) pixel_to_img(pixel_str, dim) flatten(img) unflatten(img) sort_dict_by_function_of_value(d, f) ...
3
3
newspaper/articles/admin.py
Krishna-Patil/Newspaper_app
0
30008
<filename>newspaper/articles/admin.py from django.contrib import admin from .models import * # Register your models here. class CommentInLine(admin.TabularInline): model = Comment class ArticleAdmin(admin.ModelAdmin): inlines = [ CommentInLine, ] admin.site.register(Article, ArticleAdmin) admi...
1.8125
2
GUI/Generic/GTasks.py
gcewing/PyGUI
9
30009
# # PyGUI - Tasks - Generic # from GUI.Properties import Properties, overridable_property class Task(Properties): """A Task represents an action to be performed after a specified time interval, either once or repeatedly. Constructor: Task(proc, interval, repeat = False, start = True) Creates a task to cal...
3.515625
4
presentingfeatures/forms.py
fahimfarhan/cancer-web-app
0
30010
<reponame>fahimfarhan/cancer-web-app<gh_stars>0 from django import forms from presentingfeatures.models import Status, Investigation class StatusForm(forms.ModelForm): class Meta: model = Status fields = ('details', 'advice') class UploadForm(forms.ModelForm): type_choice = [ ('Othe...
1.992188
2
mundo2/parte3/partea/ex058.py
fcdennis/CursoPython
0
30011
<reponame>fcdennis/CursoPython from random import randint computador = randint(0, 10) print('Sou seu computador...\nAcabei de pensar e um número entre 0 e 10.') print('Será que você consegue adivinhar qual foi?') palpite = int(input('Qual é o seu palpite? ')) contador = 1 while palpite != computador: contador += 1 ...
3.765625
4
June-17-2020/Managing-the-Full-API-Lifecycle/servers/production.py
Nirothipan/labs
2
30012
<gh_stars>1-10 #!/usr/bin/env python3 import json from http import server, HTTPStatus import socketserver import ssl import datetime import uuid import time class EndpointHandler(server.BaseHTTPRequestHandler): def do_GET(self): self.common_handler() def do_POST(self): self.common_handler() ...
2.59375
3
tilemapbase/__init__.py
Simage/TileMapBase
0
30013
<reponame>Simage/TileMapBase __version__ = "0.4.6" from .tiles import init, get_cache from .mapping import project, to_lonlat, Extent, Plotter, extent_from_frame from .utils import start_logging from . import tiles from . import mapping from . import utils from . import ordnancesurvey
1.1875
1
src/bpp/migrations/0232_auto_20210101_1751.py
iplweb/django-bpp
1
30014
# Generated by Django 3.0.11 on 2021-01-01 16:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bpp", "0231_ukryj_status_korekty"), ] operations = [ migrations.AlterField( model_name="autor", name="pseudonim", ...
1.695313
2
Tensorflow_2X_PythonFiles/demo51_texttokenizer.py
mahnooranjum/Tensorflow_DeepLearning
0
30015
<gh_stars>0 # -*- coding: utf-8 -*- """Demo51_TextTokenizer.ipynb # **Spit some [tensor] flow** We need to learn the intricacies of tensorflow to master deep learning `Let's get this over with` ## So we OHE the last NLP problem, why not do the same and feed it to the neural network? Well because, features in a lang...
3.625
4
floodsystem/flood.py
Manz2TheMax/1A_FloodWarning_Group2
0
30016
"""This module provides tools for assessing flood risk """ from datetime import timedelta from floodsystem.datafetcher import fetch_measure_levels import numpy as np from floodsystem.analysis import polyfit from matplotlib import dates as date def stations_level_over_threshold(stations, tol): """For a list of Mon...
3.59375
4
Visualization_with_PyGal.py
rocketpy/data_profiling
0
30017
# A python svg graph plotting library and creating interactive charts ! # PyPi: https://pypi.org/project/pygal/ # Docs: http://www.pygal.org/en/stable/index.html # Chart types: http://www.pygal.org/en/stable/documentation/types/index.html # Maps: http://www.pygal.org/en/stable/documentation/types/maps/pygal_maps_wor...
3.296875
3
robogen/rgkit/backup bots/Dulladob01.py
andrewgailey/robogen
0
30018
<reponame>andrewgailey/robogen # Dulladob 0.1 by <NAME> # http://robotgame.net/viewrobot/7641 import rg spawn_param = 8 #which turn to we begin bouncing? suicide_param = 6 #when to blow ourselves up (param*surrounders>hp)? suicide_fear_param = 6 #which to fear enemies blowing up? staying_still_bonus = 0.34 #points ...
2.921875
3
telestream_cloud_qc_sdk/test/test_video_config.py
pandastream/telestream-cloud-python-sdk
0
30019
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import datetime import telestream_cloud_qc from telestream_cloud_qc.models.video_...
1.796875
2
topics/topic_1/9square_of_number.py
VladBaryliuk/my_trainings
0
30020
<gh_stars>0 def square_of_number(): number = "179" number_for_sum = "179" for i in range (49): number = number + number_for_sum number = int(number) number = number ** 2 print(number) square_of_number()
3.828125
4
scannerProyecto2Tejada.py
tej17584/proyecto2DisenoLenguajes
0
30021
<filename>scannerProyecto2Tejada.py # Nombre: <NAME> # Curso: Diseño lenguajes de programacion # Fecha: Abril 2021 # Programa: scannerProyecto2Tejada.py # Propósito: Este programa tiene como fin leer el file de entrada # V 1.0 # imports import pickle from pprint import pprint as pp class Scanner(): def __init__...
3.796875
4
.tox/scenario/lib/python2.7/site-packages/oslo_middleware/__init__.py
bdrich/neutron-lbaas
0
30022
<filename>.tox/scenario/lib/python2.7/site-packages/oslo_middleware/__init__.py<gh_stars>0 # 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/LI...
1.398438
1
programmers/lv2_review/openchat.py
mrbartrns/swacademy_structure
0
30023
<gh_stars>0 # [카카오] 오픈채팅방 def solution(record): answer = [] id_dict = {} for query in record: q = query.split(" ") if len(q) >= 3: id_dict[q[1]] = q[2] for query in record: q = query.split(" ") if q[0] == "Enter": answer.append(f"{id_dict[q[1]]}님...
3.53125
4
chanjet_openapi_python_sdk/exception/serialize_response_exception.py
Chanjet/chanjet-openapi-python-sdk-
2
30024
# -*- coding: utf-8 -*- # @Time : 2021/8/6 15:01 # @Author : zc # @Desc : json格式的response序列化成实例对象异常 class SerializeResponseException(Exception): def __init__(self, err_msg): super().__init__(self, err_msg)
2.0625
2
scrud_django/decorators.py
Django-Stack-Backend/Django-backend-React-frontend
1
30025
from datetime import timezone from functools import partial, update_wrapper from django.utils.cache import get_conditional_response from django.utils.http import http_date, quote_etag from rest_framework import status from rest_framework.metadata import BaseMetadata from rest_framework.response import Response from re...
1.96875
2
cloud/scripts/estudos/fiis_ifix_gestores.py
codennine/trendfii
0
30026
#coding=utf-8 import os from bs4 import BeautifulSoup files = [] gestores = { 'EDY11': {'fiis': [], 'vacancia':0} } for r,d,f in os.walk('../gestores_ifix'): for file in f: handle = open(os.path.join(r, file), 'r') html = handle.read() soup = BeautifulSoup(html, 'html.parser') ...
2.875
3
RL/Custom-env/Custom-env/envs/__init__.py
Poppins001/Projects
1
30027
from Custom-env.envs.Env1 import ENV1_NAME from Custom-env.envs.Env2 import ENV2_NAME
1.257813
1
Trie/14. Longest Common Prefix/solution.py
Shalini180/LeetCode-Solutions
9
30028
''' Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "". Example 1: Input: strs = ["flower","flow","flight"] Output: "fl" Constraints: 1 <= strs.length <= 200 0 <= strs[i].length <= 200 strs[i] consists of only lower-case En...
3.8125
4
uresnet/iotools/__init__.py
NuTufts/uresnet_pytorch
0
30029
<gh_stars>0 from .iotools import io_factory
1.03125
1
model_selection.py
elalamik/Regression_Project_Predicting_Age_of_Abalones
0
30030
import statsmodels.api as sm import statsmodels.formula.api as smf import numpy as np import pandas as pd from mlxtend.feature_selection import ExhaustiveFeatureSelector as EFS from sklearn.linear_model import LinearRegression import sys; import re def AIC(data,model,model_type,k=2): if model_type=='linear': return...
2.8125
3
play.py
amm042/pyMonty
0
30031
<gh_stars>0 """ Montey hall client <NAME> 2019 """ import logging import socket import time import argparse def main(addr, port, delay): log = logging.getLogger() server_port = (addr, port) log.info("Starting game with {}".format(server_port)) #for k in range(10): while True: with socket....
3.03125
3
publishing_boy/tests/utils.py
przemekkot/publishing-boy
0
30032
import os import tempfile from django.core.files.storage import FileSystemStorage import django.core.files.storage # dummy django.conf.settings class Settings(): MEDIA_ROOT = os.path.dirname(os.path.abspath(__file__)) MEDIA_URL = 'http://local/' FILE_UPLOAD_PERMISSIONS = 0o777 FILE_UPLOAD_DIRECTORY_PE...
2.359375
2
app/report/models/call_table_model.py
michaelscales88/mWreporting_final
2
30033
# data/models.py import datetime from sqlalchemy.ext.hybrid import hybrid_property from app.extensions import db class CallTableModel(db.Model): __tablename__ = 'c_call' __repr_attrs__ = ['call_id', 'calling_party_number', 'dialed_party_number', 'start_time', 'end_time', 'caller_id'] ...
2.265625
2
dataentry/models.py
abrehman90/Integrate-SummerNote-in-Django
1
30034
from django.db import models # Create your models here. class user(models.Model): name = models.CharField(max_length=25) phone = models.CharField(max_length=25,default='+92') email = models.EmailField() city = models.CharField(max_length=20) content = models.TextField() def __str__(self): ...
2.578125
3
dotfiles/common/.gdbinit.d/eigen.py
HaoZeke/Dotfiles
14
30035
# Eigen pretty printer __import__('eigengdb').register_eigen_printers(None)
1.054688
1
sv/loading.py
thalesians/bayestsa
18
30036
from collections import OrderedDict import numpy as np from pandas import DataFrame from sv import SVData, CorTiming def loadSVDataFromBUGSDataset(filepath, logreturnforward, logreturnscale, dtfilepath=None): dts = None if dtfilepath is not None: with open(dtfilepath) as f: content = f.re...
2.578125
3
sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link.py
iscai-msft/azure-sdk-for-python
8
30037
<filename>sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/models/virtual_network_link.py # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root f...
1.890625
2
13_while_loops_challenges/58_guess_my_word.py
r7asmu7s/art_of_doing_python
0
30038
<filename>13_while_loops_challenges/58_guess_my_word.py import random print('Welcome to the GUESS MY WORD APP.') game_dict = {"sports": ['basketball', 'baseball', 'soccer', 'football', 'tennis', 'curling'], "colors": ['orange', 'yellow', 'purple', 'aquamarine', 'violet', 'gold'], "fruits": ['apple', 'banana', 'waterm...
4.3125
4
crunch-shake/parse.py
zhiyanfoo/crunch-shake
1
30039
from utils import get_matcher from lookup import ROMAN_TO_INT from lines import Dialogue, Character, Instruction, Act, Scene def get_speaking_characters(raw_play_lines, character_matcher): """ Return a set of all character names Parameters ---------- raw_play_lines : list of str lines of th...
3.734375
4
backend/schemas/comment.py
golani04/bug-tracker
0
30040
<reponame>golani04/bug-tracker from datetime import datetime from uuid import UUID from typing import Optional from pydantic import BaseModel, Field class CommentBase(BaseModel): text: str commenter: UUID reply_to: Optional[int] = Field(None, description="Replying to the previous comment") class Comment...
2.8125
3
videos_to_images.py
hikaruya8/dimotion
0
30041
<filename>videos_to_images.py import os import subprocess # ターミナルで実行するコマンドを実行できる # 動画が保存された「MELD.Raw」内にある、train_splits, test_splits, dev_splitsそれぞれで実行 dir_path = './MELD/MELD.Raw/dev_splits/' # class_list = os.listdir(path=dir_path) # print(class_list) # 各クラスの動画ファイルを画像ファイルに変換する # for class_list_i in (class_list): ...
2.5625
3
ur_driver/src/ur_driver/deserializeRT.py
Hugal31/universal_robot
749
30042
from __future__ import print_function import struct import copy #this class handles different protocol versions class RobotStateRT(object): @staticmethod def unpack(buf): rs = RobotStateRT() (plen, ptype) = struct.unpack_from("!IB", buf) if plen == 756: return RobotStateRT_V...
2.578125
3
Data-Science/code.py
shikharratna/ga-learner-dsmp-repo
0
30043
# -------------- #Header files import pandas as pd import numpy as np import matplotlib.pyplot as plt data=pd.read_csv(path) #path of the data file- path #Code starts here data.Gender.replace('-','Agender',inplace=True) gender_count=data.Gender.value_counts() gender_count.plot(kind='bar') # ----------...
2.96875
3
stupidb/core.py
mrcrnkovich/stupidb
43
30044
<reponame>mrcrnkovich/stupidb<gh_stars>10-100 """StupiDB. The stupidest database you'll ever come across. This is project designed to illustate the concepts that underly a typical relational database implementation, starting at naive execution of table-stakes features up to rule-based query optimization. .. warning::...
2.765625
3
www/aeki/cgi/aeki_config.py
otuk/aeki
0
30045
<filename>www/aeki/cgi/aeki_config.py<gh_stars>0 aeki_config = { "AEKI_HOST": "localhost", # rename to hostname for cgi if you like "IOT_HOST":"localhost" # assumes iot test device is also on local host }
1.734375
2
Baseline/NABA/naba.py
sarthak-chakraborty/PARIMA
13
30046
import numpy as np import math import pickle def get_data(data, frame_nos, dataset, topic, usernum, fps, milisec, width, height, view_width, view_height): """ Read and return the viewport data """ VIEW_PATH = '../../Viewport/' view_info = pickle.load(open(VIEW_PATH + 'ds{}/viewport_ds{}_topic{}_user...
2.78125
3
python/primes.py
matheuskiser/pdx_code_guild
0
30047
""" User picks number n and program returns all prime number from 0 until n. """ def is_prime(num): for i in range(2, num): if (num % i) == 0: return False return True number_picked = int(raw_input("Pick a number: ")) print 2 for i in range(3, number_picked, 2): if is_prime(i): ...
4
4
gateway/settings.py
42cc/dashr-gw
2
30048
""" Django settings for gateway project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os...
1.75
2
basics-data-structure/array/processQueries.py
nishantml/Data-Structure-And-Algorithms
0
30049
""" Given the array queries of positive integers between 1 and m, you have to process all queries[i] (from i=0 to i=queries.length-1) according to the following rules: In the beginning, you have the permutation P=[1,2,3,...,m]. For the current i, find the position of queries[i] in the permutation P (indexing from 0) ...
3.71875
4
setup.py
david26694/sktools
10
30050
<reponame>david26694/sktools #!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = ['scikit-learn', 'pandas', 'scipy...
1.4375
1
test_autogalaxy/util/test_error_util.py
caoxiaoyue/PyAutoGalaxy
7
30051
<reponame>caoxiaoyue/PyAutoGalaxy from autofit.non_linear.samples.pdf import quantile import autogalaxy as ag import numpy as np def test__quantile_1d_profile(): profile_1d_0 = np.array([1.0, 2.0, 3.0]) profile_1d_1 = np.array([1.0, 2.0, 3.0]) profile_1d_list = [profile_1d_0, profile_1d_1] ...
1.773438
2
src/whereshallwemeet/caller.py
bizzinho/whereShallWeMeet
0
30052
<reponame>bizzinho/whereShallWeMeet<filename>src/whereshallwemeet/caller.py<gh_stars>0 import os import pathlib import sys import googlemaps from datetime import datetime as dt from typing import Union, Tuple, List class WhereShallWeMeet: def __init__(self, configPath: str = None, friendsFile: str = None): ...
2.84375
3
iCount/plotting/plot_rnamap.py
genialis/iCount
0
30053
""".. Line to protect from pydocstyle D205, D400. Plot distribution RNA-map ------------------------- Plot distribution of crosslinks relative to landmark of specific type. """ import os import pandas as pd import iCount # pylint: disable=wrong-import-order import matplotlib # Force matplotlib to not use any Xwind...
2.3125
2
search_and_change/search_and_change_num.py
physics-sp/frida-tools
5
30054
<reponame>physics-sp/frida-tools<filename>search_and_change/search_and_change_num.py #! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import time try: import frida except ImportError: sys.exit('install frida\nsudo pip3 install frida') # number of times that 'old_value' was find in memory matches = None d...
2.234375
2
text_extensions_for_pandas/jupyter/span.py
ZachEichen/text-extensions-for-pandas
193
30055
# # Copyright (c) 2021 IBM Corp. # 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 writi...
2.125
2
Comprehensions/05. Filter Numbers.py
milenpenev/Python_Advanced
0
30056
<reponame>milenpenev/Python_Advanced<filename>Comprehensions/05. Filter Numbers.py def is_divisible(number): divisible = [num for num in range(2, 11) if number % num == 0] return True if divisible else False start = int(input()) end = int(input()) print([int(_) for _ in range(start, end + 1) if is_divisible(...
4.125
4
src/plugins/hk_reporter/platform/__init__.py
panda361/nonebot-hk-reporter
0
30057
<reponame>panda361/nonebot-hk-reporter from .bilibili import Bilibili from .rss import Rss from .weibo import Weibo from .utils import check_sub_target from .platform import PlatformNoTarget from .utils import platform_manager
0.953125
1
Decision_Maker-Temp_Humid/Temp_Humid_Mqtt_Controller.py
cantiusdeepan/Cadrea
0
30058
<reponame>cantiusdeepan/Cadrea ####### File will publish a score between 0-5 on how good an idea # (0- Don't open, 5 - Very good conditions for opening window) # it is to open the window to clear the room given the current internal and external weather conditions # Factors considered - ________ # Internal temperature ...
2.765625
3
pynagios/perf_data.py
jimbrowne/pynagios
0
30059
<gh_stars>0 """ Tools for creating performance data for Nagios plugin responses. If you're adding performance data to a :py:class:`~pynagios.response.Response` object, then :py:func:`~pynagios.response.Response.set_perf_data` can be called instead of having to create an entire :py:class:`PerfData` object. """ import r...
2.546875
3
py/priq.py
frasertweedale/drill
1
30060
<gh_stars>1-10 import heap class _PriQ(object): def insert(self, x): self.heap.insert(x) def delete(self): return self.heap.delete() def __nonzero__(self): return bool(self.heap) class Max(_PriQ): def __init__(self): self.heap = heap.Max() class Min(_PriQ): de...
3.125
3
report/api/app.py
Aaron-DH/openstack_sample_project
0
30061
<reponame>Aaron-DH/openstack_sample_project from wsgiref import simple_server import os from oslo_config import cfg from oslo_log import log as logging from paste import deploy import pecan from report.api import hooks from report.agent import rpcapi LOG = logging.getLogger(__name__) CONF = cfg.CONF pecan_opts = [ ...
2.046875
2
cahoots/parsers/email.py
SerenitySoftwareLLC/cahoots
8
30062
<reponame>SerenitySoftwareLLC/cahoots<gh_stars>1-10 """ The MIT License (MIT) Copyright (c) Serenity Software, LLC 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 w...
1.828125
2
src/praxxis/model/update_model.py
blimongi/praxxis
9
30063
""" This file requests a new model from the storage pool. """ import os import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) import requests from requests.auth import HTTPBasicAuth from src.praxxis.sqlite import sqlite_telemetry def update_model(): """TODO: implement this""" ...
1.960938
2
Process_Data/audio_processing.py
Wenhao-Yang/DeepSpeaker-pytorch
8
30064
<reponame>Wenhao-Yang/DeepSpeaker-pytorch #!/usr/bin/env python # encoding: utf-8 import os import pathlib import traceback <<<<<<< HEAD ======= import random >>>>>>> Server/Server import librosa import numpy as np import soundfile as sf import torch import torch.nn.utils.rnn as rnn_utils from pydub import AudioSegmen...
2.078125
2
gamestonk_terminal/stocks/dark_pool_shorts/stockgrid_model.py
minhhoang1023/GamestonkTerminal
1
30065
""" Stockgrid View """ __docformat__ = "numpy" import logging from typing import List, Tuple import pandas as pd import requests from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) @log_start_end(log=logger) def get_dark_pool_short_positions(sort_field: str, ascending: boo...
2.921875
3
Communal.Network.v.py
HolocronFoundation/Communal.Network
1
30066
item: event({channel_index: indexed(uint256), reply_to_index: indexed(uint256), metadata: indexed(uint256)}) # item_index is the index of the sent item in C.N. # TODO: Implement channeling # Channel management struct channel: owner: address name_display: bytes32 name_unique: bytes32 # TODO: finish impleme...
1.84375
2
floodsystem/geo.py
Ericsong2333/partia-flood-warning-system
0
30067
# Copyright (C) 2018 <NAME> # # SPDX-License-Identifier: MIT """This module contains a collection of functions related to geographical data. """ from floodsystem.utils import sorted_by_key # noqa import math def hav(theta): return math.sin(theta*0.5)**2 def r(theta): return math.radians(theta)...
3.6875
4
codes/Constant.py
YasserDaho/Saliency-3DSal
2
30068
""""" Path to the Image Dataset directories """"" TR_IMG_DIR = './WORKSPACE/DATASET/annotation/' GT_IMG_DIR = './WORKSPACE/DATASET/annotation/' """"" Path to Numpy Video directories """"" TR_VID_DIR = './WORKSPACE/DATA/TR_DATA/' GT_VID_DIR = './WORKSPACE/DATA/GT_DATA/' """"" Path to Numpy batches directories """"...
2.296875
2
cannlytics/lims/qc.py
mindthegrow/cannlytics
7
30069
<gh_stars>1-10 """ Quality Control Tools | Cannlytics Author: <NAME> <<EMAIL>> Created: 2/6/2021 Updated: 6/23/2021 License: MIT License <https://opensource.org/licenses/MIT> Perform various quality control checks and analyses to ensure that your laboratory is operating as desired. TODO: - Trend analyte ...
1.914063
2
containershare/validator/__init__.py
vsoch/containershare-python
0
30070
<filename>containershare/validator/__init__.py<gh_stars>0 from .library import LibraryValidator from .runtime import RuntimeValidator
1.15625
1
packages/pyright-internal/src/tests/samples/genericTypes1.py
sransara/pyright
1
30071
<reponame>sransara/pyright<filename>packages/pyright-internal/src/tests/samples/genericTypes1.py # This sample tests that the type analyzer flags as an error # an attempt to assign to or delete a generic type. from typing import Dict # This should generate an error because assignment # of generic types isn't allowed....
1.71875
2
extras/scripts/test-client.py
claudiosv/unisparks
0
30072
#!/usr/bin/python import socket import sys import time import struct MCADDR = '239.255.223.01' PORT = 0xDF0D s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((MCADDR, PORT)) mreq = struct.pack("4sl", socket.inet_aton(MCADDR), socket.INADDR_ANY) s.sets...
2.0625
2
algorithms/bfs/levelorder.py
hariharanragothaman/pymaster
10
30073
""" Breadth-First Search - Implemented using queues This can be implemented for both Trees / Graphs Here, we will use Trees as examples. """ from collections import deque class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.ri...
3.96875
4
setup.py
mariocesar/boot.py
2
30074
<reponame>mariocesar/boot.py<filename>setup.py #!/usr/bin/env python3 import sys from setuptools import find_packages, setup if sys.version_info < (3, 6): sys.exit('Python 3.6 is the minimum required version') description, long_description = ( open('README.rst', 'rt').read().split('\n\n', 1)) setup( nam...
1.382813
1
salesforce_api/models/__init__.py
octopyth/python-salesforce-api
25
30075
<filename>salesforce_api/models/__init__.py from . import bulk, deploy, retrieve, tooling __all__ = [ 'bulk', 'deploy', 'retrieve', 'tooling', 'shared' ]
1.335938
1
radioactivedecay/plots.py
BGameiro2000/radioactivedecay
16
30076
<reponame>BGameiro2000/radioactivedecay """ The plots module defines functions used for creating decay chain diagrams via the Nuclide class ``plot()`` method, and activity decay graphs via the Inventory class ``plot()`` method. """ from typing import List, Set, Optional, Tuple import matplotlib import matplotlib.pypl...
3.046875
3
quests/models.py
donvvo/questr-master
0
30077
#All Django Imports from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils import timezone #All local imports (libs, contribs, models) from users.models import * #All external imports (libs, packages) import hashlib i...
2.234375
2
game/base_game.py
hilearn/ai-game
0
30078
<filename>game/base_game.py import time import random from enum import Enum from dataclasses import dataclass from .gameobject import Action, GameObject, Player, Weapon from .map import Cell, Map class Direction(Enum): LEFT = 1 RIGHT = 2 UP = 3 DOWN = 4 def to_action(self): if self is sel...
2.9375
3
AgendaContato/lib.py
jooaomarcos/Projeto-Agenda-de-Contato-em-Python
0
30079
from banco import con from time import sleep import os # Validação de Valor Inteiro def leiaint(valor): while True: try: ent = int(input(valor)) except: print('\033[1;33mDigite um valor inteiro\033[m') else: break return ent # Validação ...
3.78125
4
demos/reusable/hello/src/hello/web/tests/test_views.py
akornatskyy/wheezy.web
17
30080
<reponame>akornatskyy/wheezy.web<filename>demos/reusable/hello/src/hello/web/tests/test_views.py import unittest from app import main from wheezy.http.functional import WSGIClient path_for = main.options["path_for"] class HelloTestCase(unittest.TestCase): def setUp(self): self.client = WSGIClient(main) ...
2.546875
3
support/distribute/binbuild/build/make_cert_links.py
rknop/amuse
131
30081
import os import os.path import subprocess import sys if __name__ == "__main__": dirname = sys.argv[1] for x in os.listdir(dirname): if x.endswith('.crt'): try: filename = os.path.join(dirname, x) filehash = subprocess.check_output(['openssl', 'x509', '-noout...
2.921875
3
tests/pipeline/nodes/augment/test_contrast.py
ericleehy/PeekingDuck
1
30082
# Copyright 2022 AI Singapore # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
2.4375
2
DeformationLearningSolver/scripts/DLS/core/fnData.py
WebberHuang/DeformationLearningSolver
160
30083
<reponame>WebberHuang/DeformationLearningSolver<gh_stars>100-1000 __author__ = "<NAME>" __contact__ = "<EMAIL>" __website__ = "http://riggingtd.com" import maya.cmds as cmds import maya.OpenMaya as om import maya.OpenMayaAnim as oma from DLS.core import utils class FnSkinCluster(object): def __init__(self, ski...
2.0625
2
src/dump1090exporter/__init__.py
bgulla/dump1090-exporter
60
30084
<filename>src/dump1090exporter/__init__.py from .exporter import Dump1090Exporter __version__ = "21.10.0"
1.234375
1
sample_data/make_sample_data.py
mhernan88/reshape_tools
0
30085
<filename>sample_data/make_sample_data.py import pandas as pd from datetime import datetime def sample_data1() -> pd.DataFrame: times = [ datetime(year=2020, month=11, day=1), datetime(year=2020, month=11, day=2), datetime(year=2020, month=11, day=3), datetime(year=2020, month=11, ...
3.1875
3
chatrender/celery.py
The-Politico/django-politico-slackchat-renderer
2
30086
# flake8: noqa from chatrender.tasks.publish import publish_slackchat
1.070313
1
disentanglement_lib/methods/unsupervised/unsupervised_train.py
erow/disentanglement_lib
0
30087
# coding=utf-8 # Copyright 2018 The DisentanglementLib 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 # # Un...
1.492188
1
chat/models.py
horsehair/unimate
0
30088
from django.db import models from django.db.models import Model, TextField, DateTimeField, ForeignKey, CASCADE from accounts.models import User from rooms.models import Room # Create your models here. class MessageModel(Model): """ This class represents a chat message. It has a owner (user), timestamp and ...
2.78125
3
tests/test_replica/test_factory.py
maxipavlovic/django-cqrs
52
30089
# Copyright © 2021 Ingram Micro Inc. All rights reserved. from dj_cqrs.constants import SignalType from dj_cqrs.controller.consumer import route_signal_to_replica_model from dj_cqrs.mixins import ReplicaMixin import pytest def test_bad_model(caplog): route_signal_to_replica_model(SignalType.SAVE, 'invalid', {}...
2.046875
2
openff/interchange/components/smirnoff.py
openforcefield/openff-interchange
10
30090
"""Models and utilities for processing SMIRNOFF data.""" import abc import copy import functools from collections import defaultdict from typing import ( TYPE_CHECKING, Any, DefaultDict, Dict, List, Tuple, Type, TypeVar, Union, ) import numpy as np from openff.toolkit.topology impor...
1.898438
2
homeworks/HW5/task1_tkinter_sympy.py
vzavadskyi/made-robotics
0
30091
<filename>homeworks/HW5/task1_tkinter_sympy.py from tkinter import * import math import heapq from sympy import Point, Polygon # from shapely.geometry import Point, Polygon '''================= Your classes and methods =================''' ids = [] class PriorityQueue: def __init__(self): self.heap = [] ...
3.203125
3
net/views/enhance.py
spake/astrometry.net
1
30092
from __future__ import print_function import pylab as plt import numpy as np from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, QueryDict from django.shortcuts import render_to_response, get_object_or_404, redirect, render from django.template import Context, RequestContext, loader fr...
2.21875
2
libpycr/editor.py
JcDelay/pycr
1
30093
<reponame>JcDelay/pycr<gh_stars>1-10 """This module provides convenient use of EDITOR""" import os import subprocess import tempfile from libpycr.config import Config def get_editor(): """Return the user's editor, or vi if not defined :rtype: str """ return os.environ.get('EDITOR') or os.environ.g...
2.953125
3
xin-era/foundation/segment_tree/main.py
fan-weiwei/algo-prep
0
30094
<filename>xin-era/foundation/segment_tree/main.py # Goal: # # Find the sums of subsections of an array # Change an element of the array and don't recalculate everything if __name__ == '__main__': arr = [1,2,3,4,5] print('here')
2.765625
3
Python/visualization.py
richieliuse/SegmentationCNN
54
30095
# encoding: utf-8 """ Visualization functions for features and predictions. Copyright 2016 <NAME> """ import numpy as np from feature_extraction import load_raw_features from evaluation import post_processing import matplotlib.pyplot as plt import pickle def visualize_predictions(): """ Visualize pr...
3.09375
3
python/edgeauth/token_builder.py
ian-ross/EdgeAuth
3
30096
<reponame>ian-ross/EdgeAuth<gh_stars>1-10 from time import time from datetime import datetime from .digest_tokens import DigestTokens class TokenBuilder: application_id = None secret = None token = {} def __init__(self): """Token builder helper class to create digest tokens that c...
2.984375
3
myhood/migrations/0010_remove_neighborhood_occupants_count.py
kiptoo-rotich/neighborhood
0
30097
# Generated by Django 3.2.5 on 2021-07-26 18:46 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('myhood', '0009_business_created_on'), ] operations = [ migrations.RemoveField( model_name='neighborhood', name='occupants_co...
1.421875
1
modules/blog.py
rdelfin/personal-site
0
30098
<gh_stars>0 from flask import Blueprint, Response, abort, render_template from utils import blog as blog_utils from utils import tags as tag_utils bp = Blueprint("blog", __name__) @bp.route("/", methods=["GET"]) def blog(): return blog_utils.respond_blog_list() @bp.route("/post_<post_name>", methods=["GET"]) ...
2.34375
2
autolint/runners.py
fmontoto/autolint
0
30099
import collections import subprocess class Runner(object): """Base object to run linters.""" _runners = collections.defaultdict(lambda: ByFileRunner) def __init__(self): """Runner constructor""" pass @classmethod def new_runner(cls, name): """Return an instance of a Runn...
2.703125
3