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
option.py
ujiro99/python_cli_sample
0
18300
#!/usr/bin/env python # -*- coding: utf-8 -*- import click @click.command() @click.option('-n', '--name', default='World', help='Greeting partner') def cmd(name): """ Show greeting message. :type name: str """ msg = 'Hello, {name}!'.format(name=name) click.echo(msg) def main(): cmd() ...
3.390625
3
itsnp/__init__.py
CaffeineDuck/itsnp-discord-bot
0
18301
<filename>itsnp/__init__.py from .bot import ItsnpBot
1.164063
1
mojo/public/tools/bindings/pylib/parse/mojo_lexer_unittest.py
Acidburn0zzz/chromium-1
0
18302
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mojo_lexer import unittest # Try to load the ply module, if not, then assume it is in the third_party # directory. try: # Disable lint check which ...
1.953125
2
glue/admin.py
Valchris/AngularJS-Django-Template
1
18303
from django.contrib import admin from glue.models import *
1.09375
1
qmt/geometry/geo_data_base.py
basnijholt/qmt
0
18304
<gh_stars>0 from typing import Any, Dict, List from qmt.infrastructure import WithParts class GeoData(WithParts): def __init__(self, lunit: str = "nm"): """Base class for geometry data objects. Parameters ---------- lunit : str, optional Length unit for this ge...
2.4375
2
ANSIBLE/library/eos_routemap.py
ayosef/pynet_test
0
18305
#!/usr/bin/python # # Copyright (c) 2015, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # t...
1.0625
1
setup.py
colinfrei/furystoolbox
1
18306
"""Setup configuration.""" import setuptools from furystoolbox import __version__ with open("README.md", "r") as fh: LONG = fh.read() REQUIRES = ['click>=7.0', 'requests>=2.21.0', 'PyGithub>=1.43.4'] setuptools.setup( name="furystoolbox", version=__version__, author="<NAME>", ...
1.507813
2
pythran/tests/cases/sobelfilter.py
SylvainCorlay/pythran
1
18307
<filename>pythran/tests/cases/sobelfilter.py #skip.runas import Image; im = Image.open("Scribus.gif"); image_list = list(im.getdata()); cols, rows = im.size; res = range(len(image_list)); sobelFilter(image_list, res, cols, rows) #runas cols = 100; rows = 100 ;image_list=[x%10+y%20 for x in xrange(cols) for y in xrange(...
2.828125
3
occam_utils/occam_datasets.py
dschinagl/occam
1
18308
<gh_stars>1-10 import numpy as np import torch from spconv.pytorch.utils import PointToVoxel from scipy.spatial.transform import Rotation from pcdet.datasets import DatasetTemplate class BaseDataset(DatasetTemplate): """ OpenPCDet dataset to load and preprocess the point cloud """ def __init__(self,...
2.3125
2
utils/calibration_module.py
choushunn/holography_test
0
18309
""" This is the script containing the calibration module, basically calculating homography matrix. This code and data is released under the Creative Commons Attribution-NonCommercial 4.0 International license (CC BY-NC.) In a nutshell: # The license is only for non-commercial use (commercial licenses can be obtain...
2.9375
3
Main/apps.py
Naretto95/Django-Vault
0
18310
<filename>Main/apps.py from django.apps import AppConfig from django.contrib.admin.apps import AdminConfig class AdminSiteConfig(AdminConfig): default_site = 'Main.admin.MyAdminSite' class MainConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'Main'
1.507813
2
researchutils/task/__init__.py
yuishihara/researchutils
1
18311
<reponame>yuishihara/researchutils from researchutils.task import plotter
0.957031
1
venv/lib/python3.8/site-packages/aws_cdk/aws_kinesis/__init__.py
harun-vit/aws-cdk-pipelines-demo
0
18312
''' # Amazon Kinesis Construct Library <!--BEGIN STABILITY BANNER-->--- ![cfn-resources: Stable](https://img.shields.io/badge/cfn--resources-stable-success.svg?style=for-the-badge) ![cdk-constructs: Stable](https://img.shields.io/badge/cdk--constructs-stable-success.svg?style=for-the-badge) --- <!--END STABILITY B...
2.3125
2
model.py
nupurbaghel/Image_Captioning_CV
0
18313
import torch import torch.nn as nn import torchvision.models as models from torch.nn.utils.rnn import pack_padded_sequence class EncoderCNN(nn.Module): def __init__(self, embed_size): super(EncoderCNN, self).__init__() resnet = models.resnet50(pretrained=True) for param in resnet.parameters...
2.59375
3
BaseTest/click_button_chrome.py
lloydtawanda/AzurePriceListWebScrapper
2
18314
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jul 16 14:36:46 2019 @author: Tawanda """ import sys import argparse from selenium import webdriver from selenium.common.exceptions import NoSuchElementException if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_arg...
3
3
hymo/swmmreport.py
lucashtnguyen/hymo
4
18315
<gh_stars>1-10 from .base_reader import BaseReader import pandas as pd class SWMMReportFile(BaseReader): """ A class to read a SWMM model report file. """ def __init__(self, path): """ Requires: - path: str, the full file path to the existing SWMM model .inp. """ ...
2.6875
3
tbip.py
n-longuetmarx/tbip
0
18316
"""Learn ideal points with the text-based ideal point model (TBIP). Let y_{dv} denote the counts of word v in document d. Let x_d refer to the ideal point of the author of document d. Then we model: theta, beta ~ Gamma(alpha, alpha) x, eta ~ N(0, 1) y_{dv} ~ Pois(sum_k theta_dk beta_kv exp(x_d * eta_kv). We perform...
2.34375
2
calc/gui.py
tatarskiy-welder/tax_calc
0
18317
from tkinter import * from tax_profiler import TaxProfile from tkinter import messagebox as mb class Example(Frame, TaxProfile): def __init__(self, parent): TaxProfile.__init__(self) Frame.__init__(self, parent, background="lightblue") parent.minsize(width=500, height=200) parent.m...
2.703125
3
lms_python/lms_app/admin.py
gabrielmdsantos/LMSBD
0
18318
from django.contrib import admin from lms_app.models import Professor admin.site.register(Professor) # Register your models here.
1.34375
1
pymedextcore/normalize.py
equipe22/pymedext_core
1
18319
<gh_stars>1-10 #!/usr/bin/env python3 from .document import Document from intervaltree import Interval,IntervalTree # from .annotationGraph import AnnotationGraph import logging logger = logging.getLogger(__name__) class normalize: def __setSentencesAndRawText(Document,rootNode): """Build an intervalTre...
2.671875
3
phr/dnireniec/apps.py
richardqa/django-ex
0
18320
from django.apps import AppConfig class DnireniecConfig(AppConfig): name = 'dnireniec'
1.039063
1
Exercício feitos pela primeira vez/ex004colorido.py
Claayton/pythonExerciciosLinux
1
18321
#Ex004b algo = (input('\033[34m''Digite algo: ''\033[m')) print('São letras ou palavras?: \033[33m{}\033[m'.format(algo.isalpha())) print('Está em maiúsculo?: \033[34m{}\033[m'.format(algo.isupper())) print('Está em minúsculo?: \033[35m{}\033[m'.format(algo.islower())) print('Está captalizada?: \033[36m{}\033[m'.format...
3.328125
3
utilities_common/util_base.py
pettershao-ragilenetworks/sonic-utilities
0
18322
<filename>utilities_common/util_base.py<gh_stars>0 import os import sonic_platform # Constants ==================================================================== PDDF_SUPPORT_FILE = '/usr/share/sonic/platform/pddf_support' # Helper classs class UtilHelper(object): def __init__(self): pass # try ...
2.21875
2
consensus_engine/tests/test_view_create_proposal.py
jonsaunders-git/consensus_engine
0
18323
<gh_stars>0 from django.test import TestCase, RequestFactory from .mixins import TwoUserMixin, ProposalGroupMixin, ViewMixin from django.utils import timezone from consensus_engine.views import CreateProposalView from consensus_engine.forms import ProposalForm from consensus_engine.models import Proposal from django.c...
2.171875
2
tests/jdi_uitests_webtests/main/page_objects/w3c_site/w3c_site.py
jdi-testing/jdi-python
5
18324
from JDI.web.selenium.elements.composite.web_site import WebSite from tests.jdi_uitests_webtests.main.page_objects.w3c_site.frame_page import FramePage class W3cSite(WebSite): domain = "https://www.w3schools.com" frame_page = FramePage(url="/tags/tag_button.asp", domain=domain)
1.9375
2
tests/scrapers/test_scraper_composite.py
oluiscabral/stockopedia-scraper
0
18325
<gh_stars>0 ''' @author: oluiscabral ''' import unittest from creationals.scraper_factory import ScraperFactory from helpers.webdriver_factory import WebdriverFactory from actioners.login_control import LoginControl from ui.login_ui import LoginUI from data_structure.data_ref import DataRef class Test(unittest.TestCas...
2.34375
2
deepx/backend/tensorflow.py
sharadmv/deepx
74
18326
import copy import logging import numpy as np import six import tensorflow as tf from functools import wraps from contextlib import contextmanager from .backend_base import BackendBase, FunctionBase, DeviceDecorator try: from tensorflow.contrib.distributions import fill_triangular except: print("Cannot find fi...
2.203125
2
netharn/util/mplutil.py
JoshuaBeard/netharn
0
18327
from __future__ import absolute_import, division, print_function import cv2 import pandas as pd import numpy as np import six import ubelt as ub from six.moves import zip_longest from os.path import join, dirname import warnings def multi_plot(xdata=None, ydata=[], **kwargs): r""" plots multiple lines, bars, ...
2.828125
3
mmdeploy/codebase/mmdet/models/roi_heads/test_mixins.py
zhiqwang/mmdeploy
746
18328
<reponame>zhiqwang/mmdeploy<filename>mmdeploy/codebase/mmdet/models/roi_heads/test_mixins.py<gh_stars>100-1000 # Copyright (c) OpenMMLab. All rights reserved. import torch from mmdeploy.core import FUNCTION_REWRITER @FUNCTION_REWRITER.register_rewriter( 'mmdet.models.roi_heads.test_mixins.BBoxTestMixin.simple_te...
2.015625
2
examples/props.py
SandNerd/notional
23
18329
<reponame>SandNerd/notional #!/usr/bin/env python3 """This script demonstrates setting properties on a page manually. The script accepts a single command line option, which is a page ID. It will then display information about the properties and update a few of them. Note that this script assumes the database has al...
2.453125
2
retroroot.py
retroroot-linux/retroroo
0
18330
<filename>retroroot.py #!/usr/bin/env python3 """Use this file to setup a build environment.""" import os import argparse from support.linux.log import Log from support.docker_wrapper.retroroot import RetrorootDocker CWD = os.getcwd() def parse_args(args): """Parse arguments. :return: The argument object. ...
2.46875
2
grr/test_bench.py
kecho/grr
8
18331
<gh_stars>1-10 import coalpy.gpu as g import numpy as np import math import functools from . import prefix_sum as gpu_prefix_sum def prefix_sum(input_data, is_exclusive = False): accum = 0 output = [] for i in range(0, len(input_data), 1): if is_exclusive: output.append(accum) ...
2.234375
2
code/train.py
ty-on-h12/srgan-pytorch
0
18332
from torchvision.transforms import transforms from torch.utils.data import DataLoader from torchvision.datasets import ImageFolder import torch as T import torch.optim as optim from model import Generator, Discriminator from loss_fn import GeneratorLoss, TVLoss from utils import show_progress, save import datetime impo...
2.328125
2
utils/Formatting.py
levindoneto/lmGen
5
18333
import re ''' Function for Formatting n-grams. @Parameters: Tuple: n-gram to be formatted. @Return: String: formatted gram. ''' def formatGram(ngram): return re.sub("[(',)]", '', str(ngram)) ''' Function for Formatting sentences. @Parameters: Sentence: unformatted sentence. @Return: String: format...
3.75
4
mkt/users/tasks.py
ngokevin/zamboni
0
18334
<filename>mkt/users/tasks.py from datetime import timedelta import commonware.log from celeryutils import task from django.utils.encoding import force_text from tower import ugettext_lazy as _ from mkt.account.utils import fxa_preverify_url from mkt.site.mail import send_html_mail_jinja from mkt.users.models import...
1.9375
2
examples/plot_voronoi.py
smsaladi/msmexplorer
6
18335
<gh_stars>1-10 """ Voronoi Plot ============ """ import numpy as np from sklearn.cluster import KMeans import msmexplorer as msme # Create a random dataset across several variables rs = np.random.RandomState(42) n, p = 1000, 2 d = rs.normal(0, 2, (n, p)) d += np.log(np.arange(1, p + 1)) * -5 + 10 # Cluster data usin...
3.03125
3
algo_sherbend.py
ymoisan/GeoSim
0
18336
"""This algorithm implements the Wang Generalization algotithm with constraint checking This algorithm simplifies lines. It detects for each line the bends. It analyze the bend and remove the bends that are below a certain diameter. The point and lines that do not need to be simplified are still used to...
2.703125
3
src/Server/Py_Easy_TCP_Server.py
Moguf/Py_Network
0
18337
#!/usr/bin/env python3 import socket port = 12345 MAX_SIZE = 65535 target_address = '127.0.0.1' s = socket.socket(socket.AF_INET,socket.SOCK_STREAM) s.bind((target_address,port)) s.listen(2) conn, addr = s.accept() # conn: socket is the client socket. print(addr, "Now Connected") text = "Thank you for connecting fro...
3.28125
3
empyric/collection/controllers.py
dmerthe/empyric
3
18338
from empyric.adapters import * from empyric.collection.instrument import * class OmegaCN7500(Instrument): """ Omega model CN7500 PID temperature controller """ name = 'OmegaCN7500' supported_adapters = ( (Modbus, {'slave_mode': 'rtu', 'baud_rate': 38400, ...
2.71875
3
bot/main.py
the-rango/Discord-Python-Bot-Tutorial
0
18339
<reponame>the-rango/Discord-Python-Bot-Tutorial # APACHE LICENSE # Copyright 2020 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
3.265625
3
src/main.py
LucidtechAI/auth_example
0
18340
<reponame>LucidtechAI/auth_example import argparse import json import requests import pathlib from urllib.parse import urlparse from auth import AWSSignatureV4 def create_auth(): return AWSSignatureV4( region='eu-west-1', service='execute-api', aws_access_key=args.access_key_id, a...
2.234375
2
examples/set_holidaydates.py
ultratolido/ekmmetters
0
18341
<filename>examples/set_holidaydates.py """ Simple example set holiday dates (c) 2016 EKM Metering. """ import random from ekmmeters import * #port setup my_port_name = "COM3" my_meter_address = "300001162" #log to console ekm_set_log(ekm_print_log) # init port and meter port = SerialPort(my_port_name) if (port.initP...
3.046875
3
FCN.py
alexandrefelipemuller/timeseries_shapelet_transferlearning
0
18342
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Oct 30 20:11:19 2016 @author: stephen """ from __future__ import print_function from keras.models import Model from keras.utils import np_utils import numpy as np import os from keras.callbacks import ModelCheckpoint import pandas as pd import sys i...
1.96875
2
localpackage/calcs.py
chapmanwilliam/Ogden8
0
18343
import os indentSize=1 #size of the indent class calcs(): def __init__(self): self.indent=0 self.txt=[] #text for each line def clear(self): self.txt.clear() self.indent=0 def addCalcs(self,calc): s=[' ' * self.indent+ t for t in calc.txt] self.txt += s ...
3.671875
4
src/cops_and_robots/fusion/probability.py
COHRINT/cops_and_robots
3
18344
#!/usr/bin/env python from __future__ import division """MODULE_DESCRIPTION""" __author__ = "<NAME>" __copyright__ = "Copyright 2015, Cohrint" __credits__ = ["<NAME>", "<NAME>"] __license__ = "GPL" __version__ = "1.0.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __status__ = "Development" import logging from cop...
2.390625
2
vulnman/tests/mixins.py
blockomat2100/vulnman
0
18345
<filename>vulnman/tests/mixins.py from django.contrib.auth.models import User, Group from django.utils import timezone from django.conf import settings from django.urls import reverse_lazy from apps.projects.models import Project, Client, ProjectContributor from ddf import G from guardian.shortcuts import assign_perm ...
2.296875
2
StateTracing/tester_helper.py
junchenfeng/diagnosis_tracing
0
18346
<reponame>junchenfeng/diagnosis_tracing<gh_stars>0 # -*- coding: utf-8 -*- import numpy as np from torch import load as Tload from torch import tensor from dataloader import read_data,DataLoader,load_init from cdkt import CDKT if 'model' not in dir(): model = CDKT() model.load_state_dict(Tload('...
2.0625
2
grpc-errors/stub/hello_pb2.py
twotwo/tools-python
0
18347
<reponame>twotwo/tools-python # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: hello.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _mess...
1.421875
1
ckanext-sitemap/ckanext/sitemap/plugin.py
alexandru-m-g/hdx-ckan
1
18348
<reponame>alexandru-m-g/hdx-ckan ''' Sitemap plugin for CKAN ''' from ckan.plugins import implements, SingletonPlugin from ckan.plugins import IRoutes class SitemapPlugin(SingletonPlugin): implements(IRoutes, inherit=True) def before_map(self, map): controller='ckanext.sitemap.controller:SitemapContr...
1.523438
2
experiment_wrapper/__init__.py
stonkens/experiment_wrapper
2
18349
<reponame>stonkens/experiment_wrapper<filename>experiment_wrapper/__init__.py from typing import Any, Dict, List class Dynamics: """Provides a template for the functionality required from a dynamics class to interface with the experiment wrapper functionality. A dynamics class must implement the followin...
3.015625
3
Figure_2/panel_a_Count_mC_bin.py
Wustl-Zhanglab/Placenta_Epigenome
2
18350
#!/usr/bin/python # programmer : Bo # usage: Count_Reads_bin.py file_list import sys import re import random import string import time def main(X): try: print 'opening file :',X infile = open(X,"r").readlines() print 'Total ',len(infile),' lines.' return infile except IOError...
2.65625
3
slm_lab/agent/memory/replay.py
jmribeiro/SLM-Lab
1,074
18351
<reponame>jmribeiro/SLM-Lab from collections import deque from copy import deepcopy from slm_lab.agent.memory.base import Memory from slm_lab.lib import logger, math_util, util from slm_lab.lib.decorator import lab_api import numpy as np import pydash as ps logger = logger.get_logger(__name__) def sample_next_states...
1.820313
2
misc/docker/GenDockerfile.py
Wheest/atJIT
47
18352
<reponame>Wheest/atJIT<filename>misc/docker/GenDockerfile.py import yaml import sys Head = "# Dockerfile derived from easy::jit's .travis.yml" From = "ubuntu:latest" Manteiner = "<NAME> <EMAIL>" base_packages = ['build-essential', 'python', 'python-pip', 'git', 'wget', 'unzip', 'cmake'] travis = yaml.load(open(sys.ar...
1.992188
2
howareyoutwitter/api/tasks.py
tyheise/how-are-you-twitter
1
18353
<gh_stars>1-10 from api import models from api.twitter_tools.tweet_seeker import TweetSeeker def retrieve_tweets(): tokens = models.Token.objects.all() try: token = tokens[0] except IndexError: token = None t_s = TweetSeeker(token) t_s.run('#vancouver')
2.40625
2
examples/example1.py
wallrj/twisted-names-talk
2
18354
from twisted.internet import task from twisted.names import dns def main(reactor): proto = dns.DNSDatagramProtocol(controller=None) reactor.listenUDP(0, proto) d = proto.query(('8.8.8.8', 53), [dns.Query('www.example.com', dns.AAAA)]) d.addCallback(printResult) return d def printResult(res): ...
2.640625
3
utility.py
ying-wen/pmln
1
18355
from __future__ import print_function import numpy as np import pandas as pd from sklearn import metrics class Options(object): """Options used by the model.""" def __init__(self): # Model options. # Embedding dimension. self.embedding_size = 32 # The initial learning rate. ...
2.671875
3
setup.py
jeremycline/crochet
0
18356
try: from setuptools import setup except ImportError: from distutils.core import setup import versioneer def read(path): """ Read the contents of a file. """ with open(path) as f: return f.read() setup( classifiers=[ 'Intended Audience :: Developers', 'License ::...
1.578125
2
polling_test.py
ngocdh236/pypusu
0
18357
<reponame>ngocdh236/pypusu from __future__ import division from __future__ import print_function from builtins import range from past.utils import old_div from pypusu.polling import PuSuClient from time import sleep, time if __name__ == "__main__": print("Connecting") c = PuSuClient("ws://127.0.0.1:55000") ...
2.453125
2
tests/test_nacl.py
intangere/NewHope_X25519_XSalsa20_Poly1305
0
18358
<reponame>intangere/NewHope_X25519_XSalsa20_Poly1305 # Import libnacl libs import libnacl import libnacl.utils # Import python libs import unittest class TestPublic(unittest.TestCase): ''' Test public functions ''' def test_gen(self): pk1, sk1 = libnacl.crypto_box_keypair() pk2, sk2 =...
2.34375
2
gui.py
flifloo/PyTchat
1
18359
from tkinter import Tk, Frame, Scrollbar, Label, Text, Button, Entry, StringVar, IntVar, TclError from tkinter.messagebox import showerror, showwarning from client import Client from threading import Thread from socket import error as socket_error destroy = False def on_closing(): global destroy destroy = Tr...
3.328125
3
nautobot_secrets_providers/urls.py
jifox/nautobot-plugin-secrets-providers
6
18360
<gh_stars>1-10 """Django urlpatterns declaration for nautobot_secrets_providers plugin.""" from django.urls import path from nautobot_secrets_providers import views app_name = "nautobot_secrets_providers" urlpatterns = [ path("", views.SecretsProvidersHomeView.as_view(), name="home"), ]
1.46875
1
nadlogar/quizzes/views.py
LenartBucar/nadlogar
0
18361
<reponame>LenartBucar/nadlogar from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404, redirect, render from .forms import QuizForm from .models import Quiz def _get_quiz_if_allowed(request, quiz_id): quiz = get...
2.15625
2
cogs/vote.py
FFrost/CBot
4
18362
<reponame>FFrost/CBot<gh_stars>1-10 import discord from discord.ext import commands import asyncio import time from enum import Enum class VoteType(Enum): POLL = 1 MUTE = 2 class Vote(commands.Cog): def __init__(self, bot): self.bot = bot self.emojis = { "yes": "\N{WHITE HEAV...
2.765625
3
async_limits/storage/memcached.py
anomit/limits
1
18363
import inspect import threading import time from six.moves import urllib from ..errors import ConfigurationError from ..util import get_dependency from .base import Storage class MemcachedStorage(Storage): """ Rate limit storage with memcached as backend. Depends on the `pymemcache` library. """ ...
2.34375
2
floreal/views/view_purchases.py
caracole-io/circuitscourts
0
18364
<reponame>caracole-io/circuitscourts<filename>floreal/views/view_purchases.py #!/usr/bin/python # -*- coding: utf-8 -*- import os from django.http import HttpResponse, HttpResponseForbidden from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required from caracole import ...
1.976563
2
hack_today_2017/web/web_time_solver.py
runsel/CTF_Writeups
4
18365
<filename>hack_today_2017/web/web_time_solver.py import requests charset = "abcdefghijklmnopqrstuvwxyz0123456789_{}" password = "<PASSWORD>{" url = "http://sawah.ittoday.web.id:40137/" while(password[-1]!="}"): for i in charset: r = requests.get(url) payload = {'password': <PASSWORD>, 'submit': 'S...
3.125
3
mayan/__init__.py
sneha-rk/drawings-version-control
1
18366
<reponame>sneha-rk/drawings-version-control<gh_stars>1-10 from __future__ import unicode_literals <<<<<<< HEAD __title__ = 'Mayan EDMS' __version__ = '2.7.3' __build__ = 0x020703 ======= __title__ = 'IITH DVC' __version__ = '2.7.2' __build__ = 0x020702 >>>>>>> 4cedd41ab6b9750abaebc35d1970556408d83cf5 __author__ = '<NA...
0.882813
1
ldt/utils/usaf/bcsd_preproc/lib_bcsd_metrics/BCSD_function.py
rkim3/LISF
67
18367
from __future__ import division import pandas as pd import numpy as np import calendar import os.path as op import sys from datetime import datetime from dateutil.relativedelta import relativedelta from scipy.stats import percentileofscore from scipy.stats import scoreatpercentile, pearsonr from math import * import t...
2.59375
3
charybde/parsers/dump_parser.py
m09/charybde
1
18368
<filename>charybde/parsers/dump_parser.py from bz2 import BZ2File from pathlib import Path from queue import Queue from threading import Thread from typing import Any, Callable, Dict, Iterator, List, Tuple from xmltodict import parse as xmltodict_parse def parse(dump: Path) -> Iterator[Dict[str, Any]]: def filte...
2.796875
3
server/py/camera.py
sreyas/Attendance-management-system
0
18369
import cv2 import sys,json,numpy as np import glob,os import face_recognition import datetime from pathlib import Path from pymongo import MongoClient from flask_mongoengine import MongoEngine from bson.objectid import ObjectId face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') client = MongoCl...
2.734375
3
scgrn/src/utils.py
Fassial/nibs-intern
0
18370
################################### # Created on 22:20, Nov. 16th, 2020 # Author: fassial # Filename: utils.py ################################### # dep import os import pandas as pd import scanpy as sp from collections import defaultdict # local dep # macro # def get_data_lm func def get_data_lm(sce_fname, sparse = ...
2.296875
2
PQencryption/pub_key/pk_signature/quantum_vulnerable/signing_Curve25519_PyNaCl.py
OleMussmann/PQencryption
0
18371
<filename>PQencryption/pub_key/pk_signature/quantum_vulnerable/signing_Curve25519_PyNaCl.py #! /usr/bin/env python # -*- coding: utf-8 -*- """ Created on Mon Jul 10 16:26:41 CEST 2017 @author: BMMN """ import gc # garbage collector import nacl.signing import nacl.encoding def sign(signing_key, message): return ...
2.6875
3
app.py
otsaloma/bort-proxy
2
18372
# -*- coding: utf-8 -*- # Copyright (c) 2016 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
1.398438
1
apps/comments/migrations/0001_initial.py
puertoricanDev/horas
10
18373
# Generated by Django 1.10.6 on 2017-03-13 04:46 # Modified by <NAME> on 2019-06-22 16:48 import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models import apps.core.models class Migration(migrations.Migration): initial = True de...
1.84375
2
IRIS_data_download/IRIS_download_support/obspy/io/nied/knet.py
earthinversion/Fnet_IRIS_data_automated_download
2
18374
# -*- coding: utf-8 -*- """ obspy.io.nied.knet - K-NET/KiK-net read support for ObsPy ========================================================= Reading of the K-NET and KiK-net ASCII format as defined on http://www.kyoshin.bosai.go.jp. """ from __future__ import (absolute_import, division, print_function, ...
2.34375
2
great_expectations/dataset/__init__.py
avanderm/great_expectations
1
18375
from .base import Dataset from .pandas_dataset import MetaPandasDataset, PandasDataset from .sqlalchemy_dataset import MetaSqlAlchemyDataset, SqlAlchemyDataset
1.21875
1
app/main/routes.py
theambidextrous/digitalemployeeapp
0
18376
from flask import Blueprint, jsonify, request, redirect, abort, url_for, render_template main = Blueprint('main', __name__) # routes @main.route('/', methods = ['GET']) def Abort(): return redirect(url_for('main.index')) # abort(403) @main.route('/default.tpl', methods = ['GET']) def index(): title = 'DE A...
2.3125
2
python/jittor/test/test_grad.py
llehtahw/jittor
1
18377
<reponame>llehtahw/jittor # *************************************************************** # Copyright (c) 2020 Jittor. Authors: <NAME> <<EMAIL>>. All Rights Reserved. # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # **********************...
2.125
2
mre/helper/Range.py
alvarofpp/mre
7
18378
from typing import Union from mre.Regex import Regex class Range(Regex): def __init__(self, minimum: Union[str, int] = 0, maximum: Union[str, int] = 9): super().__init__('{}-{}'.format(minimum, maximum)) @staticmethod def digits(minimum: int = 0, maximum: int = 9): return Range(minimum, ...
3.765625
4
tests/python/unittest/test_tir_transform_remove_weight_layout_rewrite_block.py
driazati/tvm
1
18379
<gh_stars>1-10 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License")...
1.78125
2
CS1/Ch11/Artwork.py
DoctorOac/SwosuCsPythonExamples
1
18380
from Artist import Artist class Artwork: def __init__(self, title='None', year_created=0,\ artist=Artist()): self.title = title self.year_created = year_created self.artist = artist def print_info(self): self.artist.print_info() print('Title: %s, %d' % (self.title,...
3.546875
4
nearproteins/__init__.py
audy/nearproteins
0
18381
<filename>nearproteins/__init__.py #!/usr/bin/env python from collections import defaultdict from itertools import product import json import random import sys from annoy import AnnoyIndex from Bio import SeqIO import numpy as np class FeatureGenerator: def __init__(self, k=2): ''' ''' self.k...
2.59375
3
arm_control/src/orientation.py
ALxander19/zobov_arm
0
18382
<reponame>ALxander19/zobov_arm<filename>arm_control/src/orientation.py # tf.transformations alternative is not yet available in tf2 from tf.transformations import quaternion_from_euler if __name__ == '__main__': # RPY to convert: 90deg, 0, -90deg q = quaternion_from_euler(1.5707, 0, -1.5707) print "The quate...
2.40625
2
django_server/fvh_courier/rest/tests/base.py
ForumViriumHelsinki/CityLogistics
1
18383
import datetime from django.contrib.auth.models import User, Group from django.utils import timezone from rest_framework.test import APITestCase import fvh_courier.models.base from fvh_courier import models class FVHAPITestCase(APITestCase): def assert_dict_contains(self, superset, subset, path=''): for...
2.1875
2
pynoorm/binder.py
jpeyret/pynoorm
2
18384
<reponame>jpeyret/pynoorm<filename>pynoorm/binder.py """ Binder classes perform two functions through their format method - given a query template with %(somevar)s python substition class MyClass(object): pass arg1 = MyClass() arg1.customer = 101 default = MyClass() default.customer = 2...
3.34375
3
parselglossy/documentation.py
dev-cafe/parseltongue
5
18385
# -*- coding: utf-8 -*- # # parselglossy -- Generic input parsing library, speaking in tongues # Copyright (C) 2020 <NAME>, <NAME>, and contributors. # # This file is part of parselglossy. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
1.53125
2
functions/print_initial_values.py
CINPLA/edNEGmodel_analysis
0
18386
<reponame>CINPLA/edNEGmodel_analysis import numpy as np def print_initial_values(init_cell): phi_sn, phi_se, phi_sg, phi_dn, phi_de, phi_dg, phi_msn, phi_mdn, phi_msg, phi_mdg = init_cell.membrane_potentials() E_Na_sn, E_Na_sg, E_Na_dn, E_Na_dg, E_K_sn, E_K_sg, E_K_dn, E_K_dg, E_Cl_sn, E_Cl_sg, E_Cl_...
2.03125
2
anyway/parsers/cbs.py
edermon/anyway
0
18387
# -*- coding: utf-8 -*- import glob import os import json from collections import OrderedDict import itertools import re from datetime import datetime import six from six import iteritems from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import or_ from .. import field_names, localization from ..models impo...
2.46875
2
src/tests/test_pagure_flask_api_project_delete_project.py
yifengyou/learn-pagure
0
18388
<filename>src/tests/test_pagure_flask_api_project_delete_project.py # -*- coding: utf-8 -*- """ (c) 2020 - Copyright Red Hat Inc Authors: <NAME> <<EMAIL>> """ from __future__ import unicode_literals, absolute_import import datetime import json import unittest import shutil import sys import tempfile import os...
1.992188
2
06_reproducibility/workflow_pipeline/my_pipeline/pipeline/configs.py
fanchi/ml-design-patterns
1,149
18389
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
1.882813
2
tests/test_vcf_info_annotator.py
apaul7/VAtools
15
18390
<filename>tests/test_vcf_info_annotator.py import unittest import sys import os import py_compile from vatools import vcf_info_annotator import tempfile from filecmp import cmp class VcfInfoEncoderTests(unittest.TestCase): @classmethod def setUpClass(cls): base_dir = os.path.abspath(os.path.jo...
2.453125
2
tests/basic_test.py
c0fec0de/anycache
13
18391
<gh_stars>10-100 from pathlib import Path from tempfile import mkdtemp from nose.tools import eq_ from anycache import AnyCache from anycache import get_defaultcache from anycache import anycache def test_basic(): """Basic functionality.""" @anycache() def myfunc(posarg, kwarg=3): # count the n...
2.28125
2
self-paced-labs/vertex-ai/vertex-pipelines/tfx/tfx_taxifare_tips/model_training/model_runner.py
Glairly/introduction_to_tensorflow
2
18392
"""A run_fn method called by the TFX Trainer component.""" import os import logging from tfx import v1 as tfx from tfx_taxifare_tips.model_training import defaults from tfx_taxifare_tips.model_training import model_trainer from tfx_taxifare_tips.model_training import model_exporter # TFX Trainer will call ...
2.78125
3
main.py
Lorn-Hukka/academy-record-sender
0
18393
import random, os, string, subprocess, shutil, requests from discord import Webhook, RequestsWebhookAdapter, Embed from dotenv import dotenv_values import argparse, colorama from colorama import Fore class Settings(): def __init__(self): for k, v in dotenv_values(".settings").items(): setattr(...
2.46875
2
src/__init__.py
w9PcJLyb/GFootball
0
18394
<filename>src/__init__.py<gh_stars>0 from .board import Board from .slide import slide_action from .corner import corner_action from .control import control_action from .penalty import penalty_action from .throwin import throwin_action from .kickoff import kickoff_action from .goalkick import goalkick_action from .free...
1.320313
1
tests/bin/test_tcex_list.py
phuerta-tc/tcex
0
18395
"""Bin Testing""" # standard library from importlib.machinery import SourceFileLoader from importlib.util import module_from_spec, spec_from_loader from typing import List # third-party from typer.testing import CliRunner # dynamically load bin/tcex file spec = spec_from_loader('app', SourceFileLoader('app', 'bin/tce...
2.0625
2
sdk/python/pulumi_aws/ec2/managed_prefix_list.py
jen20/pulumi-aws
0
18396
<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload fr...
1.890625
2
scripts/ann_architectures/mnist/lenet5.py
qian-liu/snn_toolbox
0
18397
<reponame>qian-liu/snn_toolbox # coding=utf-8 """LeNet for MNIST""" import os from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPooling2D from keras.utils import np_utils from keras.callbacks import ModelCheckpoint, TensorBoard from snnt...
2.34375
2
class_exercises/using_numpy.py
Eddz7/astr-19
0
18398
<filename>class_exercises/using_numpy.py import numpy as np x = 1.0 #define a float y = 2.0 #define another float #trigonometry print(f"np.sin({x}) = {np.sin(x)}") #sin(x) print(f"np.cos({x}) = {np.cos(x)}") #cos(x) print(f"np.tan({x}) = {np.tan(x)}") #tan(x) print(f"np.arcsin({x}) = {np.arcsin(x)}") #arcsin(x...
3.6875
4
log_parser/single_hand_efficiency_training_data.py
xinranhe/mahjong
0
18399
<gh_stars>0 import argparse from mahjong.shanten import Shanten from multiprocessing import Pool import os import sys from log_parser.discard_prediction_parser import parse_discard_prediction SHANTEN = Shanten() INPUT_DATA_FOLDER = "data/raw" OUTPUT_DATA_DIR = "data/single_hand_efficiency" def tiles34_to_list(tiles...
2.3125
2