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
client/paddleflow/pipeline/dsl/io_types/parameter.py
HaozhengAN/PaddleFlow
0
12778751
<reponame>HaozhengAN/PaddleFlow #!/usr/bin/env python3 """ Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. Licensed under the Apache License, Version 2.0 (the "License"); param = Parameter()you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www...
2.859375
3
backend/api/models.py
jzrlza/plant-soil-buddy
0
12778752
from django.db import models from rest_framework import serializers from django.contrib import auth from django.core.validators import MaxValueValidator, MinValueValidator from datetime import datetime class Message(models.Model): subject = models.CharField(max_length=200) body = models.TextField() class Mes...
2.0625
2
recipe/run_test.py
jschueller/suitesparse-feedstock
1
12778753
import os import re import sys from subprocess import check_output def check_install_name(name): """Verify that the install_name is correct on mac""" libname = "lib" + name + ".dylib" path = os.path.join(sys.prefix, "lib", libname) otool = check_output(["otool", "-L", path]).decode("utf8") self_li...
2.375
2
neuralnetwork.py
entrepreneur07/seassignment
0
12778754
from keras.models import Sequential from keras.layers import Dense, Activation from keras.optimizers import SGD def createModel(totalPlayers): cp =[] for i in range(totalPlayers): model = Sequential() model.add(Dense(input_dim=3,units=7)) model.add(Activation("sigmoid")) model....
2.65625
3
backend/histocat/api/analysis/controller.py
BodenmillerGroup/histocat-web
4
12778755
<reponame>BodenmillerGroup/histocat-web<gh_stars>1-10 import logging import os from typing import Sequence import cv2 import numpy as np import scanpy as sc from fastapi import APIRouter, Depends, HTTPException from fastapi.responses import ORJSONResponse from imctools.io.ometiff.ometiffparser import OmeTiffParser fro...
2.171875
2
fabfile.py
stianjensen/wikipendium.no
19
12778756
<filename>fabfile.py import time import getpass from fabric.api import * from fabric.contrib.console import confirm import subprocess class Site(object): def __init__(self, **kwargs): self.__dict__.update(kwargs) def run(self, cmd): with cd(self.dir): sudo(cmd, user=self.user_id) ...
2.234375
2
remote_image/example_forms.py
LucasCTN/django-remote-image
1
12778757
from django import forms from django.forms import ModelForm from .fields import RemoteImageField class ExampleForm(forms.Form): remote_image = RemoteImageField(required=True) class ExampleWhitelistedPNGForm(forms.Form): remote_image = RemoteImageField(required=True, ext_whitelist=['png']) class ExampleB...
2.234375
2
test_db.py
timothyhalim/Render-Manager
0
12778758
import os from db import Controller db_path = os.path.join( __file__, "..", "RenderManager.db" ) Controller.init(db_path) # Create Job job = Controller.create_job( r"J:\UCG\Episodes\Scenes\EP100\SH002.00A\UCG_EP100_SH002.00A_CMP.nk", "WRITE_IMG", r"J:\UCG\UCG_Nuke10.bat", "renderN...
2.328125
2
bus/solution.py
thegilm/bcn-feb-2019-prework
0
12778759
<gh_stars>0 numberOfStops = 0 stops = [(10,0), (2,4), (5,2)] for stop in stops: numberOfStops += 1 print("There are "+str(numberOfStops)+" stops") pagsPerStop = [] currentPassengers = 0 for stop in stops: currentPassengers = currentPassengers + stop[0] - stop[1] pagsPerStop.append(currentPassengers) #pri...
3.421875
3
create_index_export_js.py
lyf-coder/nodejs-tool
0
12778760
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 根据传入的文件夹地址遍历下面的js文件,生成统一导出的index.js,需要注意的是重名的模块 # 获取目录下文件 import os file_name_list = [] file_rel_path_dict = {} def handle_dir(path): if os.path.isdir(path): dir_files = os.listdir(path) for dir_file in dir_files: handle_dir(os.path.j...
2.828125
3
shawty/shawtier/admin.py
SimeonAleksov/shawty
0
12778761
from django.contrib import admin from .models import URL admin.site.register(URL)
1.304688
1
pyradur/__init__.py
JPEWdev/pyradur
0
12778762
<reponame>JPEWdev/pyradur<gh_stars>0 # MIT License # # Copyright (c) 2018-2019 Garmin International or its subsidiaries # # 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, ...
1.851563
2
store/models.py
mahinm20/techcastle
1
12778763
from django.db import models from django.contrib.auth.models import User class Customer(models.Model): user = models.OneToOneField(User,null=True,blank=True,on_delete=models.CASCADE) name= models.CharField(max_length=200,null=True) email = models.CharField(max_length=200) def __str__(self): ...
2.34375
2
MakeAutoContainTrials/TopoModels/model.py
kasmith/cbmm-project-christmas
0
12778764
<gh_stars>0 from constants import * from config import * from parse_walls import trial_segmentation from scene_graph import SceneGraph from physicsTable import * from physicsTable.constants import * import geometry import numpy as np # Helpers for drawing if this is allowed if USE_PG: import pygame as pg from ...
2.203125
2
torch_geometric/transforms/spherical.py
cysmnl/geometric_cognition
62
12778765
from math import pi as PI import torch class Spherical(object): r"""Saves the globally normalized three-dimensional spatial relation of linked nodes as spherical coordinates (mapped to the fixed interval :math:`[0, 1]`) in its edge attributes. Args: cat (bool, optional): Concat pseudo-coordi...
2.734375
3
Cartwheel/cartwheel-3d/Python/tests/test_ArmaProcess.py
MontyThibault/centre-of-mass-awareness
0
12778766
import unittest from ArmaProcess import ArmaProcess import time class ArmaProcessTestCase(unittest.TestCase): def testGenSamples(self): params = [3.75162180e-04, 1.70361201e+00, -7.30441228e-01, -6.22795336e-01, 3.05330848e-01] fps = 100 ap = ArmaProcess(pa...
2.53125
3
tests/test_skiprows.py
timcera/tstoolbox
5
12778767
# -*- coding: utf-8 -*- from unittest import TestCase import pandas from pandas.testing import assert_frame_equal from tstoolbox import tstoolbox, tsutils class TestRead(TestCase): def setUp(self): dr = pandas.date_range("2000-01-01", periods=2, freq="D") ts = pandas.Series([4.5, 4.6], index=d...
2.484375
2
TestBenchGenerator/tbgen.py
anuragnatoo/ELE301P
1
12778768
<reponame>anuragnatoo/ELE301P import os import re import sys def decimalToBinary(x, bits, binary): for i in range(bits-1,-1,-1): k=x>>i if k&1: binary.append("1") else: binary.append("0") vinput=sys.argv[1] vfilename = vinput tbfilename=vfilename[:-2] + "_tb.v" vcdfilename=vfilename[:-2] + ".vcd" print(...
2.609375
3
src/user.py
osuuster/Ward
0
12778769
class User: """User info""" def __init__(self, email, first, last, device): self.email = email self.first = first.lower() self.last = last.lower() self.device = device.lower() def fullname(self): return ('{} {}'.format(self.first, self.last).title())
3.40625
3
app.py
janZub-AI/flask-video-streaming
0
12778770
<gh_stars>0 #!/usr/bin/env python from importlib import import_module import os from flask import Flask, render_template, Response import imagiz import cv2 from EmotionDetection.face_detection import FaceClass app = Flask(__name__) server=imagiz.TCP_Server(8095) server.start() face_class = FaceClass() @a...
2.640625
3
openbb_terminal/dashboards/widget_helpers.py
tehcoderer/GamestonkTerminal
255
12778771
"""Widgets Helper Library. A library of `ipywidgets` wrappers for notebook based reports and voila dashboards. The library includes both python code and html/css/js elements that can be found in the `./widgets` folder. """ import os from jinja2 import Template def stylesheet(): """Load a default CSS stylesheet f...
2.875
3
Schedule/Stats.py
mprego/NBA
0
12778772
import pandas as pd import numpy as np class Stats(object): ''' Produces stats given a schedule ''' def __init__(self, games, agg_method, date_col, h_col, a_col, outcome_col, seg_vars = []): self.games = games self.agg_method = agg_method self.date_col = date_col self.h_...
3.171875
3
dataset_builder.py
philippspohn/TTS-dataset-tools
0
12778773
import math from pydub import AudioSegment, silence from pydub.utils import mediainfo from dearpygui.core import * import os import csv import re import shutil from google.cloud import storage from google.cloud import speech_v1p1beta1 as speech import config_helper import time import silence_cut def ...
2.515625
3
examples/explain_helper.py
pinjutien/DeepExplain
0
12778774
<gh_stars>0 import pandas as pd import PIL import tensorflow as tf import numpy as np from sklearn.neighbors import KernelDensity from scipy.signal import argrelextrema from scipy.stats import iqr from utils import plot, plt import glob import sys, os sys.path.insert(0, os.path.abspath('..')) from deepexplain.tensorflo...
2.140625
2
tests/tagopsdb/database/test_connection.py
ifwe/tagopsdb
0
12778775
# Copyright 2016 Ifwe 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, so...
2.546875
3
rocket_casadi_solution.py
bvermeulen/Rocket-and-gravity-turn
1
12778776
''' Based on: Gravity Turn Maneuver with direct multiple shooting using CVodes (c) <NAME> https://mintoc.de/index.php/Gravity_Turn_Maneuver_(Casadi) https://github.com/zegkljan/kos-stuff/tree/master/non-kos-tools/gturn ---------------------------------------------------------------- ''' import sys from pathlib ...
2.859375
3
src/GenomeBaser/genomebaser.py
mscook/GenomeBaser
3
12778777
<filename>src/GenomeBaser/genomebaser.py #!/usr/bin/env python """ Genomebaser is a tool to manage complete genomes from the NCBI """ __title__ = 'GenomeBaser' __version__ = '0.1.2' __description__ = "GenomeBaser manages complete (bacterial) genomes from NCBI" __author__ = '<NAME>' __author_email__ = '<EMAIL>' __url_...
2.46875
2
python_tc_api/setup.py
imec-ilabt/terms-cond-demo-site
0
12778778
<reponame>imec-ilabt/terms-cond-demo-site<gh_stars>0 from setuptools import setup, find_packages import tcapi setup( name="T&C API", version=tcapi.__version__, description="Terms & Conditions Web API", long_description="Terms & Conditions Web API", url="https://github.com/imec-ilabt/terms-cond-dem...
1.039063
1
Common/DataModel/Testing/Python/SelectionLoop.py
jasper-yeh/VtkDotNet
3
12778779
<reponame>jasper-yeh/VtkDotNet<filename>Common/DataModel/Testing/Python/SelectionLoop.py #!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() def GetRGBColor(colorName): ''' Return the red, green and blue components for a ...
2.03125
2
pythonCore/ch02/E15.py
Furzoom/learnpython
0
12778780
#!/usr/bin/env python # -*- coding: utf-8 -*- n1 = int(raw_input('No.1: ')) n2 = int(raw_input('No.2: ')) n3 = int(raw_input('No.3: ')) if n1 < n2: if n1 < n3: pass else: n1, n3 = n3, n1 elif n2 < n3: n2, n1 = n1, n2 else: n1, n3 = n3, n1 if n2 > n3: n2, n3 = n3, n2 print n1, n2, ...
3.828125
4
Module 3/Chapter 4/ch4_21.py
PacktPublishing/Natural-Language-Processing-Python-and-NLTK
50
12778781
<filename>Module 3/Chapter 4/ch4_21.py import nltk from nltk.tag import BigramTagger, TrigramTagger from nltk.corpus import treebank testing = treebank.tagged_sents()[2000:] training= treebank.tagged_sents()[:7000] bigramtag = BigramTagger(training) print(bigramtag.evaluate(testing)) trigramtag = TrigramTagger(training...
2.640625
3
src/infi/recipe/console_scripts/__init__.py
Infinidat/infi.recipe.console_scripts
1
12778782
__import__("pkg_resources").declare_namespace(__name__) from contextlib import contextmanager from .minimal_packages import MinimalPackagesWorkaround, MinimalPackagesMixin from .windows import WindowsWorkaround, is_windows from .virtualenv import VirtualenvWorkaround from .egg import Scripts class AbsoluteExecutable...
2.125
2
pib-crawler-type3/run_pdf_downloader.py
PromodhPinto/anuvaad-corpus-tools
6
12778783
<reponame>PromodhPinto/anuvaad-corpus-tools ############################################################################### # AUTHOR : <NAME> # AIM : Code to download contents of PIB website in PDF format, # whose textual content is previously available in same directory # USAGE : python3 ./run_pdf_dow...
2.734375
3
edm_web1/script/stat_log.py
zhouli121018/nodejsgm
0
12778784
#!/usr/local/pyenv/versions/edm_web/bin/python # -*- coding: utf-8 -*- # """ 每隔一小时执行 1. 腾讯企业邮箱:获取发送失败和不存在的地址。 2. 真实成功率统计 3. 统计客户10个任务的平均发送成功率 """ from gevent import monkey monkey.patch_all() import gevent import gevent.pool import os import re import sys import time import datetime import redis import traceback import...
1.742188
2
chatbot_2/inference.py
gustasvs/AI
1
12778785
# https://github.com/tensorflow/examples/blob/master/community/en/transformer_chatbot.ipynb import tensorflow as tf # assert tf.__version__.startswith('2') tf.random.set_seed(1234) import tensorflow_datasets as tfds import os import re import numpy as np import matplotlib.pyplot as plt import pickle from functions i...
2.9375
3
tests/test_cli_bulk.py
eyeseast/sqlite-utils
0
12778786
<filename>tests/test_cli_bulk.py from click.testing import CliRunner from sqlite_utils import cli, Database import pathlib import pytest import subprocess import sys import time @pytest.fixture def test_db_and_path(tmpdir): db_path = str(pathlib.Path(tmpdir) / "data.db") db = Database(db_path) db["example...
2.28125
2
output/models/nist_data/atomic/positive_integer/schema_instance/nistschema_sv_iv_atomic_positive_integer_white_space_1_xsd/__init__.py
tefra/xsdata-w3c-tests
1
12778787
<gh_stars>1-10 from output.models.nist_data.atomic.positive_integer.schema_instance.nistschema_sv_iv_atomic_positive_integer_white_space_1_xsd.nistschema_sv_iv_atomic_positive_integer_white_space_1 import NistschemaSvIvAtomicPositiveIntegerWhiteSpace1 __all__ = [ "NistschemaSvIvAtomicPositiveIntegerWhiteSpace1", ]...
1.148438
1
Part1_Classification_VectorSpaces/C1_W2_lecture_nb_01_visualizing_naive_bayes.py
picsag/NLP
0
12778788
#!/usr/bin/env python # coding: utf-8 # # Visualizing Naive Bayes # # In this lab, we will cover an essential part of data analysis that has not been included in the lecture videos. As we stated in the previous module, data visualization gives insight into the expected performance of any model. # # In the following...
4.34375
4
scripts/csv2json.py
C0deAi/parkfinder-backend
2
12778789
import sys import csv import json def main(data_csv, outfile='out.json'): with open(data_csv, 'r', encoding='utf-8-sig') as datafile: reader = csv.DictReader(datafile) output = { 'parks': [dict(row) for row in reader], } with open(outfile, 'w') as out: json....
3.390625
3
src/301-350/P323.py
lord483/Project-Euler-Solutions
0
12778790
<reponame>lord483/Project-Euler-Solutions import numpy as np from time import time from numba import jit # @jit def solve(times): upper = 2**32 - 1 cnts = 0 m = 0 for _ in range(times): cnt = 0 r = 0 random_block = np.random.randint( low=0, high=upper, size=40, dtyp...
3.109375
3
setup.py
thierry-tct/muteria
1
12778791
<reponame>thierry-tct/muteria # #> python3 -m pip install --user --upgrade setuptools wheel #> python3 -m pip install --user --upgrade twine # #> python3 setup.py sdist bdist_wheel #> python3 -m twine upload dist/muteria-<version>.tar.gz #> rm -rf dist build muteria.egg-info __pycache__/ # import os from setuptools im...
1.703125
2
attendance_generator.py
innovator-creator-maker/Face-Recognition-Attendance-System
0
12778792
# Recognise Faces using some classification algorithm - like Logistic, KNN, SVM etc. # 1. load the training data (numpy arrays of all the persons) # x- values are stored in the numpy arrays # y-values we need to assign for each person # 2. Read a video stream using opencv # 3. extract faces out of it # 4. use...
3.625
4
structuralglass/__init__.py
normanrichardson/StructGlassCalcs
9
12778793
import pint from . import resources try: import importlib.resources as pkg_resources except ImportError: # Try backported to PY<37 `importlib_resources`. import importlib_resources as pkg_resources # Load the file stream for the units file unit_file = pkg_resources.open_text(resources, "unit_def.txt") #...
2.4375
2
qiling/qiling/os/posix/stat.py
mrTavas/owasp-fstm-auto
2
12778794
<gh_stars>1-10 #!/usr/bin/env python3 # # Cross Platform and Multi Architecture Advanced Binary Emulation Framework # import os class StatBase: def __init__(self): self._stat_buf = None # Never iterate this object! def __getitem__(self, key): if type(key) is not str: raise Ty...
2.515625
3
corehq/apps/sms/tests/opt_tests.py
akashkj/commcare-hq
471
12778795
from django.test import TestCase from corehq.apps.accounting.models import SoftwarePlanEdition from corehq.apps.accounting.tests.utils import DomainSubscriptionMixin from corehq.apps.accounting.utils import clear_plan_version_cache from corehq.apps.domain.models import Domain from corehq.messaging.smsbackends.test.mod...
1.851563
2
torchir/regularization.py
BDdeVos/TorchIR
9
12778796
import torch from torch import Tensor from torchir.utils import identity_grid def bending_energy_3d( coord_grid: Tensor, vector_dim: int = -1, dvf_input: bool = False ) -> Tensor: """Calculates bending energy penalty for a 3D coordinate grid. For further details regarding this regularization please read...
2.90625
3
codeforces/600C_palindrom.py
snsokolov/contests
1
12778797
#!/usr/bin/env python3 # 600C_palindrom.py - Codeforces.com/problemset/problem/600/C by Sergey 2015 import unittest import sys ############################################################################### # Palindrom Class (Main Program) ##############################################################################...
3.671875
4
MnistClassifier/DataSetImageView.py
Ingener74/Nizaje
0
12778798
<reponame>Ingener74/Nizaje #!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np from matplotlib.backends.backend_qt5agg import FigureCanvas from matplotlib.figure import Figure class DataSetImageView(FigureCanvas): def __init__(self, parent=None, width=5, height=5, dpi=100): self.figure = F...
2.609375
3
py2latex/markdown_parser/__init__.py
domdfcoding/py2latex
1
12778799
<gh_stars>1-10 #!/usr/bin/env python # # __init__.py # # Copyright © 2020 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
1.507813
2
vesicashapi/__init__.py
vesicash/vesicash-python-sdk
0
12778800
import os """Script used to define constants""" PRIVATE_KEY = os.getenv( 'VESICASH_PRIVATE_KEY', '<KEY>' ) HEADERS = {'V-Private-Key': PRIVATE_KEY} api_url = '' mode = os.getenv('VESICASH_MODE') if(mode == 'sandbox'): API_URL = 'https://sandbox.api.vesicash.com/v1/' else: API_URL = 'https://api.vesic...
2.203125
2
projects/avatar_cropping/main.py
IDilettant/training-mini-projects
0
12778801
<gh_stars>0 from PIL import Image def cropp_avatar(): image_monroe = Image.open('monro.jpg') red_channel, green_channel, blue_channel = image_monroe.split() cutting_width = 50 red_channel_1 = red_channel.crop((cutting_width, 0, red_channel.width, red_channel.height)) red_channel_2 = red_channel.c...
2.609375
3
tests/conftest.py
kostya-ten/iperon
1
12778802
<filename>tests/conftest.py import asyncio from http.cookies import SimpleCookie import httpx import pytest from fastapi import Response from httpx import AsyncClient from tortoise import Tortoise from iperon import services, store, typeof, redis from iperon.app import app as iperon_app from iperon.app import startup...
1.8125
2
src/finance_stats/hedge_calculator/__init__.py
pralphv/hkportfolioanalysis-backend
0
12778803
from .api import calculate_hedge
1.085938
1
fastapi-alembic-sqlmodel-async/app/crud/crud_hero.py
jonra1993/fastapi-alembic-sqlmodel-async
15
12778804
from app.schemas.hero import IHeroCreate, IHeroUpdate from app.crud.base_sqlmodel import CRUDBase from app.models.hero import Hero class CRUDHero(CRUDBase[Hero, IHeroCreate, IHeroUpdate]): pass hero = CRUDHero(Hero)
1.945313
2
ecobee_classes_creator/constants.py
sfanous/EcobeeClassesCreator
0
12778805
<filename>ecobee_classes_creator/constants.py<gh_stars>0 import os import sys if getattr(sys, 'frozen', False): directory_containing_script = os.path.dirname(sys.executable) else: directory_containing_script = sys.path[0] DEFAULT_LOGGING_CONFIGURATION = { 'version': 1, 'disable_existing_loggers': True...
1.945313
2
nbprocess/maker.py
fastai/nbprocess
15
12778806
<filename>nbprocess/maker.py # AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/01_maker.ipynb. # %% auto 0 __all__ = ['find_var', 'read_var', 'update_var', 'ModuleMaker', 'retr_exports', 'make_code_cell', 'make_code_cells', 'relative_import', 'update_import', 'basic_export_nb2'] # %% ../nbs/01_maker.ipynb...
2.25
2
lib/cnn.py
zhenghuazx/toxic-comment
1
12778807
<filename>lib/cnn.py ''' # Created by hua.zheng on 3/8/18. ''' import tensorflow.contrib.keras as keras from keras.engine import Layer, InputSpec, InputLayer from keras.engine import Layer, InputSpec import tensorflow as tf from keras.models import Model, Sequential from keras.utils import multi_gpu_model from keras....
2.265625
2
main.py
ulianaami/tele_bot
0
12778808
import telebot from settings import TOKEN from telebot import types import random bot = telebot.TeleBot(TOKEN) file = open('affirmations.txt', 'r', encoding='UTF-8') affirmations = file.read().split('\n') file.close() @bot.message_handler(content_types=['text']) def get_text_messages(message): username = messag...
2.5625
3
gears/geometry/arc.py
gfsmith/gears
1
12778809
from point import Point from affinematrix import AffineMatrix from math import pi, sin, cos, atan2, acos from polyline import Polyline # To do: # create arcs in other ways (3 points?) # blow arc into line segments? # fix "area" function to work with direction EPS = 1.0e-6 class Arc(object): ''' an arc in a ...
3.6875
4
datasets/custom_data_loader.py
wymGAKKI/saps
0
12778810
<gh_stars>0 import torch.utils.data def customDataloader(args): args.log.printWrite("=> fetching img pairs in %s" % (args.data_dir)) datasets = __import__('datasets.' + args.dataset) dataset_file = getattr(datasets, args.dataset) train_set = getattr(dataset_file, args.dataset)(args, args.data_dir, 'tra...
2.453125
2
criteria_comparing_sets_pcs/jsd_calculator.py
VinAIResearch/PointSWD
4
12778811
<filename>criteria_comparing_sets_pcs/jsd_calculator.py import os.path as osp import sys import torch import torch.nn as nn sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__)))) from metrics_from_point_flow.evaluation_metrics import jsd_between_point_cloud_sets class JsdCalculator(nn.Module): def __...
2.328125
2
Testing/publications/calendars/__init__.py
freder/PageBotExamples
5
12778812
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # # P A G E B O T # # Copyright (c) 2016+ <NAME> + <NAME> # www.pagebot.io # Licensed under MIT conditions # # Supporting DrawBot, www.drawbot.com # Supporting Flat, xxyxyz.org/flat # --------...
1.945313
2
migrations/0001_initial.py
bm424/churchmanager
0
12778813
<filename>migrations/0001_initial.py # -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-05 22:59 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] oper...
1.882813
2
kokki/cookbooks/apache2/recipes/default.py
samuel/kokki
11
12778814
<gh_stars>10-100 from kokki import Package, Directory, Service, File, StaticFile, Execute, Template PLATFORM_CONFIGS = dict( centos = "httpd", redhat = "httpd", fedora = "httpd", suse = "httpd", debian = "apache2", ubuntu = "apache2", ) Package("apache2", package_name = "httpd" if env.sys...
1.945313
2
core/forms.py
uktrade/directory-ui-supplier
2
12778815
from django.forms import Select from django.utils import translation from django.utils.translation import ugettext as _ from directory_components import forms, fields from directory_constants import choices class SearchForm(forms.Form): term = fields.CharField( max_length=255, required=False, ...
2.0625
2
epi_judge_python/search_frequent_items.py
shobhitmishra/CodingProblems
0
12778816
<filename>epi_judge_python/search_frequent_items.py from typing import Iterator, List from test_framework import generic_test, test_utils # Finds the candidates which may occur > n / k times. def search_frequent_items(k: int, stream: Iterator[str]) -> List[str]: # TODO - you fill in here. return [] def sea...
2.75
3
Part_1_beginner/17_For_in_range_loop/solutions_for_in_range/exercise_1.py
Mikma03/InfoShareacademy_Python_Courses
0
12778817
<filename>Part_1_beginner/17_For_in_range_loop/solutions_for_in_range/exercise_1.py # Poproś użytkownika o podanie numeru telefonu. # Następnie wypisz informacje ile razy występuje w nim każda cyfra. phone_number = input("Podaj numer telefonu: ") for digit in range(10): digit_times_in_number = phone_number.count(s...
4.1875
4
codegen_mat24.py
Martin-Seysen/mmgroup
14
12778818
r"""Generation of C code dealing with the Mathieu group Mat24 Generating the ``mmgroup.mat24`` extension .......................................... Function ``mat24_make_c_code()`` generates C code for basic computations in the Golay code, its cocode, and the Mathieu group Mat24. It also generates code for computati...
2.625
3
app/models.py
dzendjo/aimagicbot
6
12778819
<gh_stars>1-10 from motor.motor_asyncio import AsyncIOMotorClient from umongo import Instance, Document, fields, Schema, ValidationError import asyncio from bson.objectid import ObjectId import pymongo import datetime import pytz from collections import OrderedDict import os import data from pprint import pprint db =...
2.296875
2
src/grab/__init__.py
Boomatang/git-grab
2
12778820
<filename>src/grab/__init__.py<gh_stars>1-10 # -*- coding: utf-8 -*- """Top-level package for grab.""" __version__ = "0.4.0" __releases__ = ["0.4.0", "0.3.0", "0.2.0", "0.1.2", "0.1.1"] from .api import * # noqa
1.28125
1
algorithms/distribution_based/column_model.py
Soton-Song/valentine
0
12778821
<filename>algorithms/distribution_based/column_model.py import numpy as np import pickle from data_loader.data_objects.column import Column from utils.utils import convert_data_type class CorrelationClusteringColumn(Column): """ A class used to represent a column of a table in the Correlation Clustering algo...
3.265625
3
moto/redshift/exceptions.py
EvaSDK/moto
1
12778822
from __future__ import unicode_literals import json from werkzeug.exceptions import BadRequest class RedshiftClientError(BadRequest): def __init__(self, code, message): super(RedshiftClientError, self).__init__() self.description = json.dumps({ "Error": { "Code": code,...
2.328125
2
scripts/run-nb-experiment.py
yzhan298/radossim
1
12778823
import argparse import json import papermill as pm parser = argparse.ArgumentParser() parser.add_argument("input", help="input Jupyter notebook") parser.add_argument("output", help="output Jupyter notebook") parser.add_argument("parameters", help="parameter file in JSON") args = parser.parse_args() parameters = json.l...
2.609375
3
subt/ros/robot/src/laserscan_to_pointcloud.py
robotika/osgar
12
12778824
<filename>subt/ros/robot/src/laserscan_to_pointcloud.py #!/usr/bin/python import rospy from sensor_msgs.msg import PointCloud2, LaserScan from laser_geometry import LaserProjection class LaserScanToPointCloud: def __init__(self): self.laserProj = LaserProjection() self.pointCloudPublisher = rospy....
2.265625
2
pcg_gazebo/parsers/urdf/inertial.py
TForce1/pcg_gazebo
40
12778825
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
2.078125
2
event/example.py
BrickOzp/TrainController
3
12778826
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Copyright 2018 <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 Unless required by applicable law ...
2.765625
3
tfx/orchestration/kubeflow/utils.py
jolks/tfx
1
12778827
# Lint as: python2, python3 # Copyright 2019 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 req...
1.882813
2
app/auth/__init__.py
bluethon/flasky-learn
1
12778828
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2016-04-25 23:12:05 # @Author : Bluethon (<EMAIL>) # @Link : http://github.com/bluethon from flask import Blueprint auth = Blueprint('auth', __name__) # noinspection PyUnresolvedReferences from . import views
1.398438
1
app/tests/test_crawler.py
gontarz/image-crawler
0
12778829
# -*- coding: utf-8 -*- """ description: """ import unittest import os from bs4 import BeautifulSoup from app.crawler import visible, extract_images_links, extract_text from app.settings import BASE_DIR class TestCrawler(unittest.TestCase): def test_visible(self): """ in test_crawler.html all vi...
2.703125
3
detectors/eighteen/ensemble.py
zhampel/FakeFinder
0
12778830
<reponame>zhampel/FakeFinder import cv2 import numpy as np import copy import math import torch import torch.nn as nn import torch.backends.cudnn as cudnn import torchvision from face_detect_lib.models.retinaface import RetinaFace from face_detect_lib.layers.functions.prior_box import PriorBox from face_detect_lib.ut...
1.734375
2
gists/python-threading-example/threading-example.py
Senzing/knowledge-base
1
12778831
#! /usr/bin/env python3 import random import threading import time class TestThread(threading.Thread): def run(self): for loop_number in range(10): print("{0} Loop: {1}".format(self.name, loop_number)) time.sleep(random.randint(1, 5)) # Construct threads. threads = [] for thr...
3.65625
4
ytelapi/controllers/conference_controller.py
Ytel-Inc/YtelAPI-Python
0
12778832
# -*- coding: utf-8 -*- """ ytelapi This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). """ from .base_controller import BaseController from ..api_helper import APIHelper from ..configuration import Configuration from ..http.auth.basic_auth import BasicAuth class Con...
2.515625
3
app/tasks.py
tristan-c/FancyTest
0
12778833
from carotte import Carotte from app.connector import * my_app = Carotte() @my_app.task def refreshYoutube(author=None): youtube = youtubeConnector(username="") log = youtube.check() return log
1.773438
2
sphinx/util/stemmer/__init__.py
danieleades/sphinx
0
12778834
"""Word stemming utilities for Sphinx.""" import warnings import snowballstemmer from sphinx.deprecation import RemovedInSphinx70Warning class PorterStemmer: def __init__(self): warnings.warn(f"{self.__class__.__name__} is deprecated, use " "snowballstemmer.stemmer('porter') inste...
2.609375
3
test/00_unit_test/TestHectareVhdlGen.py
MicroTCA-Tech-Lab/hectare
5
12778835
#! /usr/bin/env python3 """ Copyright (c) 2020 Deutsches Elektronen-Synchrotron DESY See LICENSE.txt for license details. """ import enum import sys import unittest from systemrdl.rdltypes import AccessType from hectare._hectare_types import Field, Register from hectare._HectareVhdlGen import HectareVhdlGen clas...
2.4375
2
tests/test_rfc9092.py
CBonnell/pyasn1-alt-modules
2
12778836
# # This file is part of pyasn1-alt-modules software. # # Created by <NAME> # Copyright (c) 2020-2022, Vigil Security, LLC # License: http://vigilsec.com/pyasn1-alt-modules-license.txt # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as...
2.140625
2
cogs/fire.py
NieR1711/Fire
0
12778837
""" MIT License Copyright (c) 2019 GamingGeek 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, merge, publi...
1.609375
2
test_sql.py
konstdimasik/python_code
0
12778838
<filename>test_sql.py<gh_stars>0 import sqlite3 from random import randint global db global sql db = sqlite3.connect('test_server.db') sql = db.cursor() sql.execute("""CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, login TEXT, password TEXT, cash BIGINT )""") db.commit() def reg(): u...
3.46875
3
openspeech/modules/add_normalization.py
CanYouImagine/openspeech
207
12778839
<filename>openspeech/modules/add_normalization.py # MIT License # # Copyright (c) 2021 <NAME> and <NAME> and <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, incl...
2.140625
2
find_missing_files_in_sequence.py
neilrjones/DevOps-Python-tools
1
12778840
#!/usr/bin/env python # coding=utf-8 # vim:ts=4:sts=4:sw=4:et # # Author: <NAME> # Date: 2020-07-31 11:03:17 +0100 (Fri, 31 Jul 2020) # # https://github.com/harisekhon/pytools # # License: see accompanying Hari Sekhon LICENSE file # # If you're using my code you're welcome to connect with me on LinkedIn # and o...
2.953125
3
start.py
aragaer/partner
1
12778841
#!/usr/bin/env python3 # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 from dbus.mainloop.glib import DBusGMainLoop from gi.repository import GObject from partner import PartnerService def main(): """ Entry point. """ DBusGMainLoop(set_as_default=True) PartnerService() GObject.Mai...
1.648438
2
tworaven_apps/api_docs/urls.py
TwoRavens/TwoRavens
20
12778842
from django.conf.urls import url from tworaven_apps.api_docs import views, views_swagger urlpatterns = ( url(r'^grpc-test-form$', views.view_test_form, name='view_test_form'), #url(r'^v1/swagger.yml$', # views_swagger.view_swagger_doc_v1, # name='view_swagger_doc_v1'), )
1.476563
1
processing.py
summa-platform/summa-deeptagger
0
12778843
<filename>processing.py #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import pickle import json import numpy as np from nltk.tokenize import sent_tokenize, word_tokenize from keras.utils.np_utils import to_categorical import gzip embeddings_folder = "word_vector...
2.578125
3
wordlist/cpf_tools.py
andradjp/tools
0
12778844
""" Authon: <NAME> Data: 12/05/2018 """ import random def gera_cpf():#Função para gerar CPF cpf = list(random.choices([0,1,2,3,4,5,6,7,8,9], k=9))#Gera o CPF Aleatório #Cálculo do primeiro digito verificador pesos = [10, 9, 8, 7, 6, 5, 4, 3, 2] primeiro_digito = [] for idx,i in enumerate(cpf): ...
3.546875
4
actions/cloudbolt_plugins/power_off_expired_servers/power_off_expired_servers.py
p6knewman/cloudbolt-forge
34
12778845
<reponame>p6knewman/cloudbolt-forge from utilities import events def run(job, logger=None, **kwargs): """ A post-expire hook that, given a list of expired servers, powers off any that are not off yet. The expiration_date parameter is used to determine whether a server is expired. Also updates their ...
2.90625
3
UI/Container.py
FearlessClock/RobotFactory
0
12778846
import pygame from pygame.math import Vector2 from pygame.rect import Rect from UI.Button import Button class Container: """ Position in screen space menuSize in screen space""" def __init__(self, position: Vector2, menuSize: Vector2): self.size = menuSize self.position = position ...
3.625
4
app/migrations/0006_auto_20200530_1922.py
fluix-dev/cloak
3
12778847
# Generated by Django 3.0.6 on 2020-05-30 23:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0005_formfield_multiple_choices'), ] operations = [ migrations.AlterModelOptions( name='formfield', options={...
1.648438
2
db_storage/urls.py
jskopek/frame
0
12778848
from django.conf.urls import patterns, include, url from db_storage.views import ImageView urlpatterns = patterns('', url(r'^(?P<file_name>[^/]+)$', ImageView.as_view(), name='db_storage_image'), )
1.84375
2
readtagger/cli/findcluster.py
bardin-lab/read_tagger
3
12778849
<gh_stars>1-10 import logging import click from readtagger.findcluster import ClusterManager from readtagger import VERSION import multiprocessing_logging @click.command() @click.option('-i', '--input_path', help='Find cluster in this BAM file.', type=click.Path(exists=True),...
2.34375
2
docs/api-references/conf.py
bayeshack2016/icon-service
52
12778850
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config import os import sys # -- Path setup --------------------------------------...
1.539063
2