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
setup.py
monoidic/intelmq-manager
0
12793551
<reponame>monoidic/intelmq-manager """ Setup file for intelmq-manager SPDX-FileCopyrightText: 2020 IntelMQ Team <<EMAIL>> SPDX-License-Identifier: AGPL-3.0-or-later """ from setuptools import find_packages, setup import pathlib import shutil from mako.lookup import TemplateLookup from intelmq_manager.version import ...
1.984375
2
models/deepWalk.py
nicolas-racchi/hpc2020-graphML
0
12793552
<reponame>nicolas-racchi/hpc2020-graphML import time import pandas as pd import numpy as np import stellargraph as sg from gensim.models import Word2Vec import matplotlib.pyplot as plt from utils.visualization import get_TSNE def sg_DeepWalk(v_sets, e_sets, v_sample, e_sample): G = sg.StellarDiGraph(v_sets, e_sets...
2.65625
3
2017/10_Oct/11/04-isnumeric.py
z727354123/pyCharmTest
0
12793553
myStr = '' print(myStr.isalnum()) # False 不支持空 myStr = 'abCC' print(myStr.isalpha()) # True 支持大写 myStr = 'abc*' print(myStr.isalpha()) # False 不支持 符号 myStr = 'abc1' print(myStr.isalpha()) # False 不支持 包含num print(myStr.isalnum()) # True 支持 包含num myStr = '123' print(myStr.isnumeric()) # True ...
3.984375
4
tex/poster/make_comparative_figure.py
se4u/mvlsa
12
12793554
<reponame>se4u/mvlsa from __future__ import division conditions="Glove W2Vec(Skipgram) MVLSA(Glove+W2Vec) MVLSA(Wiki) MVLSA(Allviews) MVLSA(Allviews+Glove+W2Vec)".split() viewperf=r""" MEN & 70.4 & 73.9 & 76.0 & 71.4 & 71.2 & 75.8 RW & 28.1 & 32.9 & 37.2 & 29.0 & 41.7 & 40.5 SCWS & 54.1 & 65.6 & 60.7 & 6...
1.953125
2
dbaas/tsuru/admin/__init__.py
jaeko44/python_dbaas
0
12793555
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.contrib import admin from .. import models from .bind import BindAdmin admin.site.register(models.Bind, BindAdmin)
1.195313
1
ops.py
Forty-lock/Inpainting_AIHub
0
12793556
import torch import torch.nn as nn import torch.nn.functional as F from torch.nn import utils import math class conv5x5(nn.Module): def __init__(self, in_channels, out_channels, stride=1, dilation=1): super(conv5x5, self).__init__() self.conv = nn.Conv2d(in_channels, out_channels, kernel_size=5, s...
2.46875
2
wiske/event.py
jthistle/wiskesynth
0
12793557
from enum import Enum class EventType(Enum): NOTE_ON = 1 NOTE_OFF = 2 class Event: def __init__(self, etype): self.type = etype class EventNoteOn(Event): def __init__(self, midi_note, velocity): super().__init__(EventType.NOTE_ON) self.note = midi_note self.veloci...
3.046875
3
long-exp.py
nmiculinic/python-hello-world
0
12793558
<gh_stars>0 #!/usr/bin/python import time for i in range(2 * 3600): print(f"hello world {i}", flush=True) with open(f"artifacts-{i}.txt", "w") as f: print("Hello mother, hello father, I'm here!", file=f) time.sleep(1)
2.8125
3
tests/unit/test_lockfile.py
indhupriya/dvc
1
12793559
import pytest from dvc.dvcfile import Lockfile, LockfileCorruptedError from dvc.stage import PipelineStage from dvc.utils.serialize import dump_yaml def test_stage_dump_no_outs_deps(tmp_dir, dvc): stage = PipelineStage(name="s1", repo=dvc, path="path", cmd="command") lockfile = Lockfile(dvc, "path.lock") ...
2.171875
2
datapypes/pype.py
msmathers/datapypes
1
12793560
<filename>datapypes/pype.py from set import Set from model import Model from source import Source from store import Store class Pype(object): @property def set(self): raise NotImplementedError() @property def source(self): raise NotImplementedError() @property def store(self...
2.59375
3
xdd-7.0.0.rc-ramses3/contrib/buildbot_master_xdd.py
eunsungc/gt6-RAMSES_8_5
1
12793561
<reponame>eunsungc/gt6-RAMSES_8_5 #!/usr/bin/python # # The buildbot settings for XDD. We assume the following build slaves are # defined in the master.cfg: # # c['slaves'] = [] # c['slaves'].append(BuildSlave("pod9", "banana")) # c['slaves'].append(BuildSlave("pod7", "banana")) # c['slaves'].append(BuildSlave("pod10...
1.992188
2
python/f-gradf.py
blazej-bucha/physical-geodesy-lecture-notes
0
12793562
# Import modulov import numpy as np import matplotlib.pyplot as plt from matplotlib import rc rc('text', usetex=True) # Výpočtová oblasť xmin = -1.0 xmax = 1.0 xn = 101 # Počet vzorkovacích bodov funkcie "f" na intervale "[xmin, xmax]" ymin = xmin ymax = xmax yn = xn # Počet vzorkovacích bodov funkc...
2.390625
2
GetIcons.py
MrJustPeachy/Font-Awesome-Icon-Scraper
2
12793563
import requests from bs4 import BeautifulSoup from selenium import webdriver # url = 'https://fontawesome.com/cheatsheet/pro' # req = requests.get(url) # markup = req.text # print(markup) from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expe...
2.921875
3
mimic/utils/exceptions.py
Jimmy2027/MoPoE-MIMIC
1
12793564
class NaNInLatent(Exception): pass class CudaOutOfMemory(Exception): pass
1.265625
1
h1st/core/__init__.py
Shiti/h1st
0
12793565
<reponame>Shiti/h1st from .dataclass import NodeInfo, GraphInfo
1.101563
1
ml_api/request_cloud_function.py
r-matsuzaka/mlops-example
0
12793566
import requests result = requests.post( "https://asia-northeast1-mlops-331003.cloudfunctions.net/function-1", json={"msg": "Hello from cloud functions"}, ) print(result.json())
2.46875
2
utils/start_server.py
FGAUnB-REQ-GM/2021.2-PousadaAnimal
0
12793567
<filename>utils/start_server.py from os import system # Database system('python3 manage.py makemigrations users pets hosting services message payment host') system('python3 manage.py migrate') # Server system('python3 manage.py runserver localhost:8000')
1.914063
2
lib/config.py
GraciousGpal/Colony-Server
1
12793568
<reponame>GraciousGpal/Colony-Server from configparser import ConfigParser config = ConfigParser() config.read('config.ini') def get_config(): """ Loads the configuration file config.ini and returns a dictionary with keys and its values. :return: """ sections = config.sections() config_dict =...
2.953125
3
tests/test_parser.py
alisonrclarke/raga-pose-estimation-1
1
12793569
<reponame>alisonrclarke/raga-pose-estimation-1 import pandas as pd from raga_pose_estimation.openpose_json_parser import OpenPoseJsonParser from raga_pose_estimation.openpose_parts import ( OpenPoseParts, OpenPosePartGroups, ) def test_parser(): parser = OpenPoseJsonParser( "example_files/example...
2.578125
3
news_outlet/settings.py
dmahon10/django-tiered-membership-web-app
0
12793570
import os from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.environ.get('SECRET_KEY') ALLOWED_HOSTS = ['.herokuapp.com', 'localhost', '127.0.0.1'] ENIVRONMENT = os.environ.get('ENVIRONMENT', default='development...
1.84375
2
Misc Learning/HackerRank 30 Days of Code/14 - Scopes.py
hamil168/Learning-Data-Science
0
12793571
<reponame>hamil168/Learning-Data-Science<gh_stars>0 # -*- coding: utf-8 -*- """ Hacker Rank 30 Days of Code 14 - Scope Created on Sun Jul 22 23:53:27 2018 @author: DRB4 Task: complete Difference class - class constructor that takes an array of integers and saves it to an instance variable named elements - compute...
3.859375
4
dsatools/operators/_ecdf.py
diarmaidocualain/dsatools
31
12793572
import numpy as np import scipy from ._hist import take_bins __all__ = ['ecdf'] __EPSILON__ = 1e-8 #-------------------------------------------------------------------- def ecdf(x,y=None): ''' Empirical Cumulative Density Function (ECDF). Parameters ----------- * x,y: 1d ndarrays, if y ...
2.921875
3
nevernoip/P1422.py
GalvinGao/2019-ProgrammingCourse
0
12793573
def main(x): if x <= 150: return x * .4463 elif x <= 400: return (x - 150) * .4663 + 150 * .4463 else: return 250 * .4663 + 150 * .4463 + (x - 400) * .5663 print("{0:.2f}".format(main(int(input()))))
3.421875
3
Directory-observer/test/__init__.py
hiroki8080/MyPythonLibrary
0
12793574
<filename>Directory-observer/test/__init__.py #!/usr/bin/env python # -*- coding: utf-8 -*- import test_engine __author__ = 'Shishou'
0.945313
1
server/apps/devicelocation/tests/test_device_location.py
iotile/iotile_cloud
0
12793575
import datetime import json import dateutil.parser from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from django.utils import timezone from rest_framework import status from apps.physicaldevice.models import Device from apps.streamfilter.models import * ...
2.203125
2
accounts/utils.py
shunnyjang/SM-ChooIT-DRF
0
12793576
<filename>accounts/utils.py from random import choice from accounts.models import Nickname, NicknameArchive def get_nickname(): nickname = "" count = 1 adj_list = Nickname.objects.filter(part='a').values_list('content') adj = choice(adj_list)[0] noun_list = Nickname.objects.filter(part='n').value...
2.421875
2
_setup/management/commands/setup.py
marcoEDU/HackerspaceWebsiteTemplate
9
12793577
<reponame>marcoEDU/HackerspaceWebsiteTemplate<filename>_setup/management/commands/setup.py<gh_stars>1-10 from django.core.management.base import BaseCommand from _setup.models import Setup class Command(BaseCommand): help = "start the setup" def handle(self, *args, **options): Setup()._menu()
1.617188
2
python/frost_rcmrd.py
vightel/FloodMapsWorkshop
24
12793578
#!/usr/bin/env python # # From <NAME>, <EMAIL> # RCMRD Nairobi, Kenya # Minor teaks for MacOSX Pat Cappelaere - Vightel Corporation # # Here is the link where you can get the original hdfs and the resulting tif files # http://172.16.17.32/frostmaps/ # http://172.16.17.32/frostmaps/ import time import datetime impor...
2.140625
2
Receive.py
jackSN8/Jack_Hydrogen_line_software
0
12793579
import operator import math import numpy as np from rtlsdr import RtlSdr import matplotlib.pyplot as plt # Available sample rates ''' 3200000Hz 2800000Hz 2560000Hz 2400000Hz 2048000Hz 1920000Hz 1800000Hz 1400000Hz 1024000Hz 900001Hz 250000Hz ''' # Receiver class. This needs receiving parameters and will receive data ...
3.015625
3
experiments/3.py
seyfullah/stockprediction
0
12793580
from bindsnet.network.nodes import Input, LIFNodes from bindsnet.network.topology import Connection from bindsnet.learning import PostPre source_layer = Input(n=100, traces=True) target_layer = LIFNodes(n=1000, traces=True) connection = Connection( source=source_layer, target=target_layer, update_rule=Pos...
2.046875
2
ext/candc/src/api/nlp/__init__.py
TeamSPoon/logicmoo_nlu
6
12793581
# C&C NLP tools # Copyright (c) Universities of Edinburgh, Oxford and Sydney # Copyright (c) <NAME> # # This software is covered by a non-commercial use licence. # See LICENCE.txt for the full text of the licence. # # If LICENCE.txt is not included in this distribution # please email <EMAIL> to obtain a copy. from bas...
2.375
2
blog/models.py
minielectron/portfolio
0
12793582
from django.db import models # Create your models here. class Blog(models.Model): """ Represents a project model in home page. """ title = models.CharField(max_length=50) description = models.CharField(max_length=150) date = models.DateField() def __str__(self): return self.tit...
2.703125
3
simple_client.py
stefmarais/haas-ngc-simulator
0
12793583
import telnetlib import time tn = telnetlib.Telnet('192.168.137.226', 5051) #tn.write(b"Client") time.sleep(1) for i in range(5): print("Now writing ?Q102") tn.write(b"?Q102\n") status = tn.read_until(b"\n",timeout=1).decode("utf-8") print(f"Data received: {status}") print("Now writing ?Q104") ...
2.84375
3
src/main.py
SantaSpeen/CLI-in-Python
3
12793584
<filename>src/main.py import getpass import logging import os import platform from console import Console, ConsoleIO # Init modules cli = Console(prompt_in=">", prompt_out="]:", not_found="Command \"%s\" not found in alias.", file=ConsoleIO, debug=False) logging...
3.78125
4
src/pypiserver_testing/_version.py
pypiserver/pypiserver-testing-common
0
12793585
"""Define version constants.""" import re __version__ = '1.0.0' __version_info__ = tuple(re.split('[.-]', __version__))
1.96875
2
tests/__init__.py
mportesdev/handpick
0
12793586
<filename>tests/__init__.py def is_even(n): return n % 2 == 0 def is_positive(n): return n > 0 # basic sequences (tuple, list, str, bytes, bytearray) SEQUENCES = ( [ [ "hand", ], b"pick", ( 42, b"hand", ), ], ( ...
3.234375
3
solr-admin-app/config.py
sumesh-aot/namex
4
12793587
<filename>solr-admin-app/config.py import os import dotenv dotenv.load_dotenv(dotenv.find_dotenv(), override=True) CONFIGURATION = { 'development': 'config.DevConfig', 'testing': 'config.TestConfig', 'production': 'config.Config', 'default': 'config.Config' } class Config(object): SECRET_KEY = ...
2.1875
2
python/testData/inspections/PyDictDuplicateKeysInspection/test.py
teddywest32/intellij-community
2
12793588
<filename>python/testData/inspections/PyDictDuplicateKeysInspection/test.py<gh_stars>1-10 dict = {<warning descr="Dictionary contains duplicate keys key_1">key_1</warning> : 1, key_2: 2, <warning descr="Dictionary contains duplicate keys key_1">key_1</warning> : 3} dict = {'key_1' : 1, <warning descr="Dictionary contai...
2.875
3
tests/test_node.py
jherland/browson
0
12793589
<filename>tests/test_node.py<gh_stars>0 import textwrap from browson.node import Node class TestNode_build: def verify_scalar(self, n, expect_kind, expect_value, expect_name=""): assert n.name == expect_name assert n.kind is expect_kind assert n.value == expect_value assert n.is_l...
2.515625
3
scripts/parse_kif.py
SakodaShintaro/Miacis
10
12793590
<gh_stars>1-10 #!/usr/bin/env python3 import glob import codecs import numpy as np import matplotlib.pyplot as plt import japanize_matplotlib from natsort import natsorted # もし序盤が弱い→序盤から悪くしてそのまま負ける # もし終盤が弱い→序盤・中盤は良いのに終盤で負ける turns = list() BIN_SIZE = 31 BIN_WIDTH = 2 / BIN_SIZE result_points = [list() for _ in range(...
3.09375
3
staging/commands/dev/repos/push.py
cligraphy/cligraphy
5
12793591
#!/usr/bin/env python # Copyright 2013 Netflix """Push all repos to stash """ from nflx_oc.commands.dev.repos import run_for_all_repos def main(): run_for_all_repos('git push origin master')
1.5625
2
lace/integrity.py
bodylabs/lace
2
12793592
from __future__ import print_function import numpy as np def faces_with_repeated_vertices(f): if f.shape[1] == 3: return np.unique(np.concatenate([ np.where(f[:, 0] == f[:, 1])[0], np.where(f[:, 0] == f[:, 2])[0], np.where(f[:, 1] == f[:, 2])[0], ])) else: ...
2.671875
3
src/lab3/infer_resnet50_loadtest.py
aws-samples/aws-inf1-gcr-workshop
2
12793593
<reponame>aws-samples/aws-inf1-gcr-workshop import os import time import torch import torch_neuron import json import numpy as np from concurrent import futures from urllib import request from torchvision import models, transforms, datasets ## Create an image directory containing a small kitten os.makedirs("./torch_n...
2.5
2
services/cal/test/test_service.py
Ovakefali13/buerro
2
12793594
import unittest import os from icalendar import Calendar import random import string from datetime import timedelta, datetime as dt import pytz from util import Singleton from .. import CalService, CalRemote, iCloudCaldavRemote, Event @Singleton class CalMockRemote(CalRemote): def create_calendar(self): ...
2.546875
3
catkin_ws/src:/opt/ros/kinetic/lib/python2.7/dist-packages:/home/bala/duckietown/catkin_ws/src:/home/bala/duckietown/catkin_ws/src/lib/python2.7/site-packages/geometry/manifolds/tests/__init__.py
johnson880319/Software
0
12793595
# coding=utf-8 import itertools from contracts.utils import raise_wrapped from nose.tools import nottest from geometry import MatrixLieGroup, RandomManifold, all_manifolds, logger from .checks_generation import * def list_manifolds(): return all_manifolds @nottest def get_test_points(M, num_random=2): int...
2.65625
3
Graph/Solutions_Four.py
daniel-zeiler/potential-happiness
0
12793596
import collections import heapq from typing import List def find_town_judge(n: int, trust: List[List[int]]) -> int: trusts = {i + 1: 0 for i in range(n)} outgoing = {i + 1 for i in range(n)} for origin, destination in trust: if origin in outgoing: outgoing.remove(origin) trust...
3.359375
3
Basic Algorithms/Basic Algorithms/heap_introduction_2_solution.py
michal0janczyk/udacity_data_structures_and_algorithms_nanodegree
1
12793597
<reponame>michal0janczyk/udacity_data_structures_and_algorithms_nanodegree class Heap: def __init__(self, initial_size=10): self.cbt = [None for _ in range(initial_size)] # initialize arrays self.next_index = 0 # denotes next index where new element should go def _down_heapify(self): ...
3.921875
4
src/apps/about/models/katalog.py
rko619619/Skidon
0
12793598
<reponame>rko619619/Skidon from django.db import models as m class Katalog(m.Model): title = m.TextField(unique=True) content = m.TextField(unique=True) media = m.URLField(unique=True) adress = m.TextField(null=True, blank=True) class Meta: verbose_name_plural = "katalog" ordering...
2.171875
2
printer/mean_printer.py
kuanhsunchen/Suspension
1
12793599
<reponame>kuanhsunchen/Suspension import matplotlib matplotlib.use('Agg') import matplotlib.patches as mpatches import random import math import sys import numpy as np import matplotlib.pyplot as plt import itertools from matplotlib import rcParams from matplotlib.backends.backend_pdf import PdfPages from scipy.stats.m...
1.765625
2
yt_dlp/WS_Extractor/arte.py
evolution-ant/local-youtube-dl
0
12793600
# encoding: utf-8 import re import base64 from ..utils import int_or_none from ..extractor.arte import ArteTVBaseIE from ..compat import ( compat_str, ) from ..utils import ( ExtractorError, int_or_none, qualities, try_get, unified_strdate, ) def _extract_from_json_url(self, json_url, video_...
2.046875
2
mlapp/MLAPP_CODE/MLAPP-C4-Code/GaussInterpDemo.py
xishansnow/MLAPP
0
12793601
<filename>mlapp/MLAPP_CODE/MLAPP-C4-Code/GaussInterpDemo.py<gh_stars>0 """根据已有观察值,对函数进行插值处理""" import numpy as np from functools import reduce from scipy.sparse import spdiags import matplotlib.pyplot as plt from scipy import stats np.random.seed(1) # 设置随机种子 D = 150 # 数据的总量(含观测和未观测到的值) n_obs = 10 ...
2.0625
2
eval_covid20cases_timm-regnetx_002_CoarseDropout.py
BrunoKrinski/segtool
0
12793602
import os ls=["python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_0_CoarseDropout.yml", "python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_1_CoarseDropout.yml", "python main.py --configs configs/eval_covid20cases_unetplusplus_timm-regnetx_002_2_CoarseDropout...
1.554688
2
predict.py
cswin/CADA
5
12793603
import argparse import numpy as np from packaging import version import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="2,3" from PIL import Image import matplotlib.pyplot as plt import cv2 from skimage.transform import rotate import torch from torch.autograd import Variable impo...
2.234375
2
paper2tmb/tests/test_manipulator.py
sotetsuk/paper2img
1
12793604
import os import unittest import subprocess from paper2tmb.manipulator import Manipulator class TestManipulator(unittest.TestCase): def test_init(self): with Manipulator('test.pdf') as m: self.assertTrue(os.path.isdir(m.dirname)) def test_pdf2png(self): with Manipulator("paper2t...
2.6875
3
py-simspark/effectors.py
edison-moreland/py-simspark
2
12793605
<gh_stars>1-10 # TODO(MESSAGES) Turn into actual classes the parse_preceptors can return def message_factory(effector_string): """Makes messages easy to define""" def message(**kwargs): return effector_string.format(**kwargs) return message create = message_factory("(scene {filename})") hinge_j...
2.46875
2
analysis/example_utils.py
liuzh91/DEVELOP
73
12793606
from rdkit import Chem def mol_with_atom_index(mol): atoms = mol.GetNumAtoms() tmp_mol = Chem.Mol(mol) for idx in range(atoms): tmp_mol.GetAtomWithIdx(idx).SetProp('molAtomMapNumber', str(tmp_mol.GetAtomWithIdx(idx).GetIdx())) return tmp_mol def unique_mols(sequence): seen = set() retu...
2.65625
3
external/frozendict.py
MPvHarmelen/MarkdownCiteCompletions
0
12793607
# The frozendict is originally available under the following license: # # Copyright (c) 2012 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without li...
1.96875
2
stream_alert_cli/manage_lambda/rollback.py
opsbay/streamalert
0
12793608
""" Copyright 2017-present, Airbnb 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 agreed to in writing, sof...
1.820313
2
gtc-model-using-SCIP.py
mgorav/linear-programing
1
12793609
from ortools.linear_solver import pywraplp from ortools.sat.python import cp_model def main(): solver = pywraplp.Solver.CreateSolver('SCIP') infinity = solver.infinity() # wrenches wrenches = solver.IntVar(0.0, infinity, 'wrenches') # pliers pliers = solver.IntVar(0.0, infinity, 'pliers') ...
2.703125
3
urls.py
j-ollivier/sonov-main
0
12793610
from django.urls import path, include from . import views urlpatterns = [ path('accounts/', include('registration.backends.simple.urls')), path('', views.FrontPage, name='FrontPage'), path('tags', views.TagList, name='TagList'), path('clips', views.ClipList, name='ClipList'), path('playlist/...
1.71875
2
Data_Science/chatbotPreprocessing.py
BasilcM/Short_URL
0
12793611
# -*- coding: utf-8 -*- import os import json import nltk import gensim import numpy as np from gensim import corpora, models, similarities import pickle os.chdir("D:\semicolon\Deep Learning\chatbot"); model = gensim.models.Word2Vec.load('word2vec.bin'); path2="corpus"; file=open(path2+'/conversation.j...
2.5
2
itg-tests/es-it/TraceContainers.py
Hemankita/refarch-kc
0
12793612
''' Trace container events to validate, events are published ''' import sys,os import time,json import signal,asyncio from confluent_kafka import KafkaError, Consumer try: KAFKA_BROKERS = os.environ['KAFKA_BROKERS'] except KeyError: print("The KAFKA_BROKERS environment variable needs to be set.") exit try...
2.328125
2
scrapers/competitor_prices/models.py
vlandham/social_shopper
0
12793613
<filename>scrapers/competitor_prices/models.py from sqlalchemy import create_engine, Column, Integer, String, Numeric from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.engine.url import URL import settings DeclarativeBase = declarative_base() def create_competitor_prices_table(engine): Declar...
2.890625
3
winery/dead_seg.py
H-B-P/DURKON
0
12793614
import pandas as pd import numpy as np import math import util def gimme_pseudo_winsors(inputDf, col, pw=0.05): return util.round_to_sf(inputDf[col].quantile(pw),3), util.round_to_sf(inputDf[col].quantile(1-pw),3) def gimme_starting_affect(inputDf, col, segs): x = inputDf[col] x1 = float(segs[0]) x2 = float(segs[...
2.65625
3
dsf_utils/evaluation.py
ltsaprounis/dsf-ts-forecasting
18
12793615
<reponame>ltsaprounis/dsf-ts-forecasting """Evaluation Functions""" import pandas as pd import numpy as np from sktime.forecasting.model_evaluation import evaluate from sktime.forecasting.model_selection import ( CutoffSplitter, SlidingWindowSplitter, ExpandingWindowSplitter, SingleWindowSplitter, ) fro...
2.625
3
app/core/tests/test_models.py
georgecretu26/recipe-app-api
0
12793616
<reponame>georgecretu26/recipe-app-api from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): """Test creating new user with an email is successful""" email = "<EMAIL>" password = "<PASS...
2.953125
3
project/20-custom-training-loops.py
marknhenry/tf_starter_kit
0
12793617
<reponame>marknhenry/tf_starter_kit import tensorflow as tf from tensorflow import keras from tensorflow.keras import layers, regularizers from tensorflow.keras.datasets import mnist import tensorflow_datasets as tfds from tensorflow.keras import Input from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten,...
2.609375
3
13_multiprocessing/05_remote_server.py
varshashivhare/Mastering-Python
30
12793618
<filename>13_multiprocessing/05_remote_server.py constants = __import__('05_remote_processor') import multiprocessing from multiprocessing import managers queue = multiprocessing.Queue() manager = managers.BaseManager(address=('', constants.port), authkey=constants.password) manager.re...
2.09375
2
catkin_ws_assignments/src/week2/src/Scripts/surname.py
ritvik506/Robotics-Automation-QSTP-2021
0
12793619
<gh_stars>0 #!/usr/bin/env python2 import rospy from std_msgs.msg import String rospy.init_node("surname") pub=rospy.Publisher("surname",String) rate=rospy.Rate(3) surname="Puranik" while not rospy.is_shutdown(): pub.publish(surname) rate.sleep()
2.359375
2
threedod/benchmark_scripts/utils/box_utils.py
Levintsky/ARKitScenes
237
12793620
# TODO: Explain 8 corners logic at the top and use it consistently # Add comments of explanation import numpy as np import scipy.spatial from .rotation import rotate_points_along_z def get_size(box): """ Args: box: 8x3 Returns: size: [dx, dy, dz] """ distance = scipy.spatial.dist...
3.8125
4
merc/features/rfc1459/motd.py
merc-devel/merc
4
12793621
from merc import config from merc import feature from merc import message class MotdFeature(feature.Feature): NAME = __name__ CONFIG_SECTION = 'motd' install = MotdFeature.install @MotdFeature.register_config_checker def check_config(section): return config.validate(section, str) class MotdReply(message.R...
2.3125
2
app.py
jessicagtz/Project-2-Chicago-Communities
0
12793622
<reponame>jessicagtz/Project-2-Chicago-Communities import datetime as dt import numpy as np import pandas as pd from flask import ( Flask, render_template, jsonify, request, redirect) import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalche...
2.96875
3
src/launch/scenario_simulator_launch/launch/autoware_auto_perception.launch.py
ruvus/auto
19
12793623
# Copyright 2021 the Autoware Foundation # # 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 ...
1.90625
2
peon/src/lint/principles/definition/no_public_methods_without_a_contract_interface.py
roch1990/peon
32
12793624
"""Nothing to do here...."""
1.070313
1
AlphaPose/Alphapose.py
Nadern96/Realtime-Action-Recognition
0
12793625
<reponame>Nadern96/Realtime-Action-Recognition import os import json path = r"../data/source_images3" # f= open("../data_proc/raw_skeletons/skeletons_info.txt", 'w+') count = 0 couldRename = 0 Classes = {'clap':1, 'hit':2, 'jump':3, 'kick':4, 'punch':5, 'push':6, ...
2.421875
2
src/fal/cli/fal_runner.py
emekdahl/fal
360
12793626
<gh_stars>100-1000 import argparse from pathlib import Path from typing import Any, Dict, List import os from dbt.config.profile import DEFAULT_PROFILES_DIR from fal.run_scripts import raise_for_run_results_failures, run_scripts from fal.fal_script import FalScript from faldbt.project import DbtModel, FalDbt, FalGene...
2.078125
2
Compute resonances/calc_cxroots.py
zmoitier/Asymptotic_metacavity
0
12793627
""" Compute resonances using the cxroots library (contour integration techniques) Authors: <NAME>, <NAME> Karlsruhe Institute of Technology, Germany University of California, Merced Last modified: 20/04/2021 """ from sys import argv import matplotlib.pyplot as plt import numpy as np ...
2.828125
3
wolk/interfaces/OutboundMessageFactory.py
iperformance/WolkConnect-Python
0
12793628
# Copyright 2018 WolkAbout Technology s.r.o. # # 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 l...
2.140625
2
Ilya and Bank Account.py
mdhasan8/Problem_Solving
0
12793629
<reponame>mdhasan8/Problem_Solving<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Mon Sep 13 20:23:31 2021 @author: Easin """ in1 = input() in1 = int(in1) list1 = [] if in1 >= 0: print(in1) else: x = abs(in1)//10 list1.append(-x) y = abs(in1) % 10 #print(y) z = abs(in1)//10...
3.328125
3
Chapter 2/wall_time.py
indrag49/Computational-Stat-Mech
19
12793630
from sympy import oo def wall_time(pos, vel, radius): return (1.0-radius-pos)/vel if vel>0.0 else (pos-radius)/abs(vel) if vel<0.0 else float(oo)
2.890625
3
users/migrations/0002_auto_20150708_1621.py
moshthepitt/answers
6
12793631
<filename>users/migrations/0002_auto_20150708_1621.py # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.CreateModel( ...
1.796875
2
swagger_marshmallow_codegen/tests/dst/00default.py
dotness/swagger-marshmallow-codegen
0
12793632
<reponame>dotness/swagger-marshmallow-codegen<filename>swagger_marshmallow_codegen/tests/dst/00default.py from marshmallow import ( Schema, fields ) import datetime from collections import OrderedDict class X(Schema): string = fields.String(missing=lambda: 'default') integer = fields.Integer(missing=l...
2.21875
2
app/modules/typos.py
Centaurus-dj/Calculonv
0
12793633
#!/usr/bin/env python3 # -*- coding: utf-8 -*- try: import modules.typo_colors as c; except Exception as e: print(e) ############################################################################## #### #### CLASS OF TYPOS USED FOR WRITING #### ########################################################################...
3.90625
4
2020/04_2/solution.py
budavariam/advent_of_code
0
12793634
""" Advent of code 2020 day 4/2 """ import logging import math from os import path import re record_splitter = re.compile(' |\n') # Field info: # byr (Birth Year) - four digits; at least 1920 and at most 2002. # iyr (Issue Year) - four digits; at least 2010 and at most 2020. # eyr (Expiration Year) - four digits; at...
3.34375
3
src/storage-preview/azext_storage_preview/_help.py
mboersma/azure-cli-extensions
1
12793635
<reponame>mboersma/azure-cli-extensions # coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------...
1.601563
2
gencode/python/udmi/schema/reflect_config.py
johnrandolph/udmi
1
12793636
<filename>gencode/python/udmi/schema/reflect_config.py<gh_stars>1-10 """Generated class for reflect_config.json""" class SetupReflectorConfig: """Generated schema class""" def __init__(self): self.last_state = None self.deployed_at = None @staticmethod def from_dict(source): if not source: ...
2.015625
2
lib/scRNA/clonotype_split.py
shengqh/ngsperl
6
12793637
<filename>lib/scRNA/clonotype_split.py import argparse import logging import os import os.path import sys import re import json import pandas as pd from collections import OrderedDict def initialize_logger(logfile, args): logger = logging.getLogger('clonotype_split') loglevel = logging.INFO logger.setLevel(logle...
2.40625
2
week 12/w12_group.py
belarminobrunoz/BYUI-CSE-110
0
12793638
with open("week 12/books_and_chapters.txt") as scripture_list: largest_book = 0 largest_book_name = "" chosen_b_section = "" user_choice = input(""" What volume of scripture do you want to look at? 1. Old Testament 2. New Testament 3. Book of Mormon 4. Doctrine and Covenants ...
3.859375
4
smpl/exec.py
robertblackwell/smpl
0
12793639
import os import sys import subprocess from typing import Union, TextIO, List, AnyStr import smpl.log_module as logger # # This module executes commands, manages output from those commands and provides a dry-run capability. # # The primary function is # # def run(cmd, where) # # dry-run and output options are c...
2.609375
3
src/backend/connector/server.py
JDaniloC/Electronpy
0
12793640
<reponame>JDaniloC/Electronpy from .handler import connect_websocket, spawn, _javascript_call from bottle.ext import websocket as bottle_websocket import bottle def start(port = 4949, block = True, quiet = True): def run_server(): return bottle.run( port = port, quiet = quiet, ...
2.328125
2
lightbus/utilities/io.py
gcollard/lightbus
178
12793641
import logging logger = logging.getLogger(__name__) def make_file_safe_api_name(api_name): """Make an api name safe for use in a file name""" return "".join([c for c in api_name if c.isalpha() or c.isdigit() or c in (".", "_", "-")])
2.90625
3
dependencies/svgwrite/tests/test_clock_val_parser.py
charlesmchen/typefacet
21
12793642
#!/usr/bin/env python #coding:utf-8 # Author: mozman --<<EMAIL>> # Purpose: test clock_val_parser # Created: 03.11.2010 # Copyright (C) 2010, <NAME> # License: GPLv3 import sys import unittest PYTHON3 = sys.version_info[0] > 2 if PYTHON3: import svgwrite.data.pyparsing_py3 as pp else: import...
2.625
3
manager.py
zhangmingkai4315/Flask-Web-App
0
12793643
<reponame>zhangmingkai4315/Flask-Web-App #!/usr/bin/env python import os from app import create_app,db from app.models import User,Role from flask.ext.script import Manager,Shell from flask.ext.migrate import Migrate,MigrateCommand app=create_app(os.getenv('FLASK_CONFIG') or 'default') manager=Manager(app) migrate=Mig...
2.0625
2
ssguan/ignitor/etl/service.py
samuelbaizg/ssguan
1
12793644
# -*- coding: utf-8 -*- # Copyright 2015 www.suishouguan.com # # Licensed under the Private License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://github.com/samuelbaizg/ssguan/blob/master/LICENSE # # Unless ...
1.804688
2
tests/_async/test_client_with_auto_confirm_enabled.py
zodman/gotrue-py
13
12793645
<filename>tests/_async/test_client_with_auto_confirm_enabled.py from typing import AsyncIterable, Optional import pytest from faker import Faker from gotrue import AsyncGoTrueClient from gotrue.exceptions import APIError from gotrue.types import Session, User, UserAttributes GOTRUE_URL = "http://localhost:9998" TEST...
2.03125
2
CodeChef/COMPETE/ZCO Practice Contest - ZCOPRAC/Covering - ZCO15003.py
IshanManchanda/competitive-python
6
12793646
<gh_stars>1-10 # https://www.codechef.com/ZCOPRAC/problems/ZCO15003 def main(): from sys import stdin, stdout rl = stdin.readline n = int(rl()) a = [[int(x) for x in rl().split()] for _ in range(n)] a.sort() i = s = 0 while i < n: end = a[i][1] while i < n and end >= a[i][0]: i += 1 end = min(end, a[...
2.640625
3
controllers/accounting_controllers.py
rbaylon/ngi
0
12793647
from models import ChapterPayments from baseapp import db class ChapterPaymentsController: def __init__(self): pass def add(self, payment): existing = False payments = ChapterPayments.query.filter_by(received_date=payment['received_date']).all() for existing_payment in payment...
2.46875
2
src/fhir_types/FHIR_DataRequirement.py
anthem-ai/fhir-types
2
12793648
from typing import Any, List, Literal, TypedDict from .FHIR_canonical import FHIR_canonical from .FHIR_code import FHIR_code from .FHIR_CodeableConcept import FHIR_CodeableConcept from .FHIR_DataRequirement_CodeFilter import FHIR_DataRequirement_CodeFilter from .FHIR_DataRequirement_DateFilter import FHIR_DataRequirem...
1.65625
2
gateways/cms_gateway.py
project-lolquiz/the-backend
0
12793649
import requests import json from requests.adapters import HTTPAdapter from requests.packages.urllib3.util.retry import Retry LOLQUIZ_CMS_URL = 'https://lolquiz-cms.herokuapp.com/questions?_sort=id&_limit={}&_start={}' HTTP_STATUS_ERROR_CODES = [408, 502, 503, 504] TOTAL_QUESTIONS = 100 INIT_OFFSET = 0 def get_quest...
2.953125
3
hitblow/hitblow_solo_manual.py
HayatoNatural/NEDO-Hit-Blow-teamF
1
12793650
<reponame>HayatoNatural/NEDO-Hit-Blow-teamF # coding : UTF-8 """ File Name: hitblow_solo_manual.py Description: Hit&Blowの手動一人対戦モード Created on october 13,2021 Created by <NAME>, <NAME>, <NAME> """ import random import argparse import time from PIL import Image import streamlit as st import pygame st.set_page_config(layo...
2.234375
2