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
zendesk_tickets/client.py
ibrechin/django-zendesk-tickets
4
28400
import json from urllib.parse import urljoin from django.conf import settings import requests def get_ticket_endpoint(): return urljoin(settings.ZENDESK_BASE_URL, '/api/v2/tickets.json') def zendesk_auth(): return ( '{username}/token'.format(username=settings.ZENDESK_API_USERNAME), settings...
2.296875
2
pravash/servicenowplugin/xlr-servicenow-plugin-master/src/main/resources/servicenow/RequestApproval.py
amvasudeva/rapidata
0
28401
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # import sys, string, time import c...
2.046875
2
migrations/versions/5f810254fdd4_initial_migration7.py
moha-abdul/minute-pitch
0
28402
<reponame>moha-abdul/minute-pitch """Initial Migration7 Revision ID: 5f810254fdd4 Revises: <PASSWORD> Create Date: 2018-09-17 20:20:59.265902 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5f810254fdd4' down_revision = 'c<PASSWORD>' branch_labels = None depen...
1.65625
2
config/api_router.py
Kubiniet/Mailing-messages
1
28403
from django.conf import settings from rest_framework.routers import DefaultRouter, SimpleRouter from message_service.mailing.api.views import ( ClientsViewSet, MailingViewSet, MessageViewSet, ) from message_service.users.api.views import UserViewSet if settings.DEBUG: router = DefaultRouter() else: ...
1.84375
2
fts/backends/xapian.py
filwaitman/django-fts
0
28404
<filename>fts/backends/xapian.py<gh_stars>0 from fts.backends.base import InvalidFtsBackendError raise InvalidFtsBackendError("Xapian FTS backend not yet implemented")
1.414063
1
Lab2/Exercise3.py
alex99q/python3-lab-exercises
0
28405
<gh_stars>0 import random secret_num = random.randrange(1, 11, 1) player_num = int(input("Guess a number from 1 to 10: ")) list_of_player_nums = [player_num] while player_num != secret_num: if player_num > secret_num: print("Too high!") elif player_num < secret_num: print("Too low!...
3.921875
4
rotor_tm_traj/traj/Optimization/entire_path/generate_poly.py
xl2623/RotorTM
1
28406
#! /usr/bin/env python from math import factorial import numpy as np # test passed def generate_poly(max_exponent,max_diff,symbol): f=np.zeros((max_diff+1, max_exponent+1), dtype=float) for k in range(max_diff+1): for i in range(max_exponent+1): if (i - k) >= 0: f[k,i] = factorial(i)*symbol**(i-k)/facto...
3.359375
3
tests/train.py
lbaret/pytorch_functions
1
28407
# --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.11.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- import torch def train...
2.53125
3
openmv_cam/sensors.py
Adridri24/Robocup
1
28408
<reponame>Adridri24/Robocup import ustruct as struct import sensor import pyb import ulogging as logging logger = logging.Logger(__name__) class Sensor: """A class that represent the Arduino-controlled sensors Offers an interface for ultrasonics sensors and line sensors (IR). """ PIN = 2 SLAVE...
3.09375
3
dmutils/__init__.py
robot2051/dto-digitalmarketplace-utils
0
28409
<reponame>robot2051/dto-digitalmarketplace-utils from . import logging, config, proxy_fix, formats, request_id from .flask_init import init_app, init_frontend_app, init_manager import flask_featureflags __version__ = '24.4.1'
0.953125
1
withings_data/views.py
MPikDev/withings_weight_display
0
28410
<filename>withings_data/views.py from django.http import HttpResponse from django.shortcuts import render, redirect from models import User from django.contrib.auth import authenticate, login from django.conf import settings from django.contrib.auth.decorators import login_required def login(request): username = req...
2.375
2
backend/models/__init__.py
hajajmaor/e_commerce_website
0
28411
from .cart import receipt_col as receipt_collection
1.03125
1
wwzplotter.py
skiehl/wwz
0
28412
<reponame>skiehl/wwz # -*- coding: utf-8 -*- #!/usr/bin/env python """A class for plotting results of the weighted wavelet z-transform analysis. """ import matplotlib.gridspec as gs import matplotlib.pyplot as plt from matplotlib.ticker import LogLocator import numpy as np import os import sys __author__ = "<NAME>" _...
2.484375
2
preprocessing/emotic/load_data_from_numpy.py
GKalliatakis/DisplaceNet
7
28413
<filename>preprocessing/emotic/load_data_from_numpy.py """Python utilities required to load data (image & their annotations) stored in numpy arrays. Functions `load_numpy_arrays_single_output` & `load_numpy_arrays_emotions_age_only` are deprecated. Use either the main function `load_data_from_numpy` to load all...
2.5625
3
services/core/Ambient/ambient/agent.py
gnmerritt/volttron
406
28414
<gh_stars>100-1000 # -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright (c) 2017, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
0.867188
1
process.py
imdeepmind/AmazonReview-LanguageGenerationDataset
3
28415
import sqlite3 import pandas as pd import re import random from bs4 import BeautifulSoup class Process: SEQ_LENGTH = 40 sql_transaction = [] dataset = [] cursor_train = None cursor_validation = None cursor_test = None # I know in advance that there are 199819620 rows NUM_ROWS = 19...
2.953125
3
src/torchphysics/utils/data/__init__.py
uwe-iben/torchphysics
203
28416
from .dataloader import PointsDataset, PointsDataLoader
1.15625
1
src/panel/urls.py
cybekRT/DJPajton2
0
28417
from django.conf.urls import url from . import views urlpatterns = [ #url(r'^view/(?P<pk>[0-9]+)', views.ArticleDetailView.as_view(), name = "detail"), #url(r'', views.ArticleIndexView.as_view(), name = "index"), url(r'login', views.Login.as_view()), url(r'logout', views.Logout.as_view()), ...
1.796875
2
Gems/WhiteBox/Editor/Scripts/WhiteBox.py
aaarsene/o3de
1
28418
""" Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution. SPDX-License-Identifier: Apache-2.0 OR MIT """ # setup path import azlmbr.legacy.general as general import azlmbr.bus as bus import azlmbr.editor as editor im...
1.734375
2
src/analysis/analysis.py
rcgonzalez9061/m2v-adversarial-hindoird
0
28419
from dask.distributed import Client import dask.dataframe as dd import pandas as pd import numpy as np import os import matplotlib.pyplot as plt import matplotlib.cm as cm from sklearn.manifold import TSNE from sklearn.decomposition import PCA from IPython.display import display, HTML from sklearn.cluster import KMeans...
2.3125
2
common/sqlmanager.py
ntcat/tilde
1
28420
#!/usr/bin/env python # -*- coding: utf-8 -*- """ __title__ = '' __author__ = 'shen.bas' __time__ = '2018-01-26' """ import pymysql class SQLManager: def __init__(self, dbCnfig): self.DB_CONFIG = dbCnfig self.conn = None self.cursor = None self.msg = '' self.affect_rows = 0 if not self.connect(): exit(...
2.84375
3
rls/algorithms/single/ddqn.py
StepNeverStop/RLs
371
28421
#!/usr/bin/env python3 # encoding: utf-8 import torch.nn.functional as F from rls.algorithms.single.dqn import DQN from rls.common.decorator import iton from rls.utils.torch_utils import n_step_return class DDQN(DQN): """ Double DQN, https://arxiv.org/abs/1509.06461 Double DQN + LSTM, https...
2.328125
2
blockChain/modularDivision.py
slowy07/pythonApps
10
28422
<filename>blockChain/modularDivision.py from typing import Tuple def modular_division(a: int, b: int, n: int) -> int: assert n > 1 and a > 0 and greatest_common_divisor(a, n) == 1 (d, t, s) = extend_gcd(n, a) return x def invert_modulo(a: int, n: int) -> int: (b, x) = extend_euclid(a ,n) if b < 0...
3.1875
3
arekit/contrib/networks/context/architectures/cnn.py
nicolay-r/AREk
18
28423
<filename>arekit/contrib/networks/context/architectures/cnn.py<gh_stars>10-100 import tensorflow as tf from collections import OrderedDict from arekit.contrib.networks.context.architectures.base.base import SingleInstanceNeuralNetwork from arekit.contrib.networks.context.configurations.cnn import CNNConfig from arekit....
2.578125
3
data/hospital_level/raw/hifld_hospital/download.py
csinva/covid-19-analysis
2
28424
#!/usr/bin/python3 import os os.system('wget \ https://opendata.arcgis.com/datasets/6ac5e325468c4cb9b905f1728d6fbf0f_0.csv \ -O hifld_hospital.csv')
1.6875
2
src/helper.py
yiuc/azure-aud
2
28425
import argparse import subprocess import sys import logging logger = logging.getLogger("helper") def azcli(command): process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out,err = process.communicate() logger.debug(str(out,"utf-8")) exit_code = process.returncode if ...
2.484375
2
044_wildcat_matching.py
gengwg/leetcode
2
28426
# 44. Wildcard Matching # # Implement wildcard pattern matching with support for '?' and '*'. # # '?' Matches any single character. # '*' Matches any sequence of characters (including the empty sequence). # # The matching should cover the entire input string (not partial). # # The function prototype should be: # bool i...
4.09375
4
einsteinsolid.py
SNOlson/MyCodes
0
28427
<filename>einsteinsolid.py """Table for 200 and 100 oscillators with 100 units of energy""" import math import matplotlib.pyplot as plt import numpy as np import pandas as pd def mult(n, r): return math.factorial(n) / (math.factorial(r) * math.factorial(n-r)) nA = 200 nB = 100 qA = np.arange(0,101,1) ...
3.0625
3
Grid.py
KeilonRobertson/Pathfinding-Visualizer
5
28428
from Vertex import Vertex import pygame from Colours import Colours class Grid: def createGrid(self, rows, width): grid = [] space = width // rows for x in range(rows): grid.append([]) for i in range(rows): vertex = Vertex(space, rows, x, i...
3.1875
3
improver_tests/precipitation_type/shower_condition_probability/test_ShowerConditionProbability.py
thbom001/improver
0
28429
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown copyright. The Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are me...
1.421875
1
controllers/vessel/file/upload.py
gbf-labs/rh-api
0
28430
# pylint: disable=no-member, too-many-locals, no-self-use """Vessels File Upload """ import time from flask import request # from library.couch_database import CouchDatabase from library.postgresql_queries import PostgreSQL from library.couch_queries import Queries from library.common import Common from library...
2.515625
3
graphgallery/gallery/gallery_model/pytorch/__init__.py
Aria461863631/GraphGallery
0
28431
from .gcn import GCN, DenseGCN from .gat import GAT from .clustergcn import ClusterGCN from .fastgcn import FastGCN from .dagnn import DAGNN from .pairnorm import * from .simpgcn import SimPGCN from .mlp import MLP from .tagcn import TAGCN from .appnp import APPNP, PPNP # experimantal model from .experimental.median_g...
0.886719
1
tests/test_vims_pixel.py
seignovert/pyvims
4
28432
<reponame>seignovert/pyvims<gh_stars>1-10 """Test VIMS image module.""" from numpy.testing import assert_array_almost_equal as assert_array from pytest import approx, fixture, raises from pyvims import VIMS from pyvims.errors import VIMSError @fixture def img_id(): """Testing image ID.""" return '173145641...
2.21875
2
Project2/system.py
KristianWold/FYS4410
1
28433
import tensorflow as tf import numpy as np from tqdm.notebook import tqdm class System(): def __init__(self, num_part, dim, Ansatz=None, External=None, Internal=None, Sampler=None ): self...
2.34375
2
contrib/heat_docker/heat_docker/tests/test_docker_container.py
redhat-openstack/heat
0
28434
<gh_stars>0 # # Copyright (c) 2013 Docker, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
1.851563
2
apistar/exceptions.py
sylwekb/apistar
0
28435
class SchemaError(Exception): def __init__(self, schema, code): self.schema = schema self.code = code msg = schema.errors[code].format(**schema.__dict__) super().__init__(msg) class NoCurrentApp(Exception): pass class ConfigurationError(Exception): pass
2.484375
2
pyslam/thirdparty/disk/submodules/torch-dimcheck/setup.py
dysdsyd/VO_benchmark
2
28436
from setuptools import setup setup( name='torch-dimcheck', version='0.0.1', description='Dimensionality annotations for tensor parameters and return values', packages=['torch_dimcheck'], author='<NAME>', author_email='<EMAIL>', )
1.117188
1
retropath2_wrapper/__main__.py
brsynth/RetroPath2-wrapper
4
28437
#!/usr/bin/env python from os import ( path as os_path, mkdir as os_mkdir, getcwd ) from argparse import ArgumentParser from logging import ( Logger, getLogger ) from glob import glob from typing import ( Dict, ) from colored import fg, bg, attr from brs_utils import ( create_logger ) from...
2.484375
2
tests/api/length_dist_api_test.py
himanshur-dev/ribopy
4
28438
<gh_stars>1-10 # -*- coding: utf-8 -*- import unittest import os from io import StringIO, BytesIO import h5py from ribopy import Ribo from ribopy import create from ribopy.merge import merge_ribos from ribopy.settings import * from ribopy.core.exceptions import * import sys test_dir_1 = os.path.dirname(os.path.realp...
2.140625
2
task_management/urls.py
AbdelrahmanRabiee/ayenapp
0
28439
<reponame>AbdelrahmanRabiee/ayenapp from django.urls import path from rest_framework import routers from task_management import viewsets app_name = "task_management" urlpatterns = [ ] task_router = routers.SimpleRouter() task_router.register(r'tasks', viewsets.TasksViewSet, base_name='tasks')
1.65625
2
core/parsers/__init__.py
andrewisakov/taximaster
0
28440
from .parsers import request_parser
1.085938
1
pytils/clock.py
d33jiang/pytils
0
28441
import functools import heapq import logging from collections import deque from threading import Condition, RLock from typing import Any, Callable, List, NamedTuple, Optional from pytils.mixins import DaemonHandler from ._config.time import DEFAULT_TIME_SUPPLIER, TimeSupplier, TimeType, ZERO_DURATION __all__ = [ ...
2.203125
2
audtool/__init__.py
Guaxinim5573/audacious-player
0
28442
<reponame>Guaxinim5573/audacious-player import subprocess import logging logger = logging.getLogger(__name__) # Run a command line command and returns stdout def _run(command): result = subprocess.run(command, check=True, stdout=subprocess.PIPE, text=True) result.stdout = result.stdout[:-1] return result.stdout d...
2.53125
3
hyperglass/execution/drivers/agent.py
blkmajik/hyperglass
298
28443
"""Execute validated & constructed query on device. Accepts input from front end application, validates the input and returns errors if input is invalid. Passes validated parameters to construct.py, which is used to build & run the Netmiko connections or hyperglass-frr API calls, returns the output back to the front e...
2.765625
3
GiftUi.py
DrPleaseRespect/GiftBox
0
28444
<reponame>DrPleaseRespect/GiftBox # -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'GiftUi.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recomp...
2.03125
2
telegram_coin_bot/__init__.py
sigmaister/telegram-coin-bot
17
28445
__author__ = "Wild Print" __maintainer__ = __author__ __email__ = "<EMAIL>" __license__ = "MIT" __version__ = "0.0.1" __all__ = ( "__author__", "__email__", "__license__", "__maintainer__", "__version__", )
1.023438
1
tests/backend/message.py
IronMeerkat/genesis
0
28446
import test_agent print('Logging in') Meerkat = test_agent.TestAgent(username='meerkat', password='<PASSWORD>', endpoint='/messages/') Pangolin = test_agent.TestAgent(username='pangolin', password='<PASSWORD>', endpoint='/messages/') Badger = test_agent.TestAgent(username='badger', password='<PASSWORD>', endpoint='/me...
2.484375
2
contact/urls.py
BobsProgrammingAcademy/Portfolio-Website-Deployment
0
28447
from django.urls import path from .views import ContactListView urlpatterns = [ path('', ContactListView.as_view()), ]
1.53125
2
src/sentry/integrations/github/client.py
detouched/sentry
1
28448
<reponame>detouched/sentry from __future__ import absolute_import from datetime import datetime from sentry.integrations.github.utils import get_jwt from sentry.integrations.client import ApiClient class GitHubClientMixin(ApiClient): allow_redirects = True base_url = 'https://api.github.com' def get_j...
2.25
2
data/tokens.py
account77/mendax_py
1
28449
TT_INT = 'INT' # int TT_FLOAT = 'FLOAT' # float TT_STRING = 'STRING' # string TT_IDENTIFIER = 'IDENTIFIER' # 变量 TT_KEYWORD = 'KEYWORD' # 关键字 TT_PLUS = 'PLUS' # + TT_MINUS = 'MINUS' # - TT_MUL = 'MUL' # * TT_DIV = 'DIV' # / TT_POW = 'POW' # ^ TT_EQ = 'EQ' # = TT_LPAREN = 'LPAREN' # ( TT_RPAREN = 'RPAREN' # ...
2.671875
3
server/tree_gen/tree_gen.py
patrickferner/Lo-Finity
1
28450
<reponame>patrickferner/Lo-Finity import requests import json import pdb import time #url_string = "https://api.hooktheory.com/v1/trends/nodes?cp=1" response = requests.get("https://api.hooktheory.com/v1/trends/nodes?cp=1", headers={'Authorization': "Bearer <KEY>"}) hook_result = json.loads(response.text) json_result ...
2.546875
3
rapt/GuidingCenter.py
mkozturk/rapt
1
28451
<gh_stars>1-10 # -*- coding: utf-8 -*- """ GuidingCenter class definition AUTHOR: <NAME> <<EMAIL>> 2016, Rice University """ import numpy as np from scipy.integrate import ode import pickle import rapt.utils as ru import rapt.flutils as rfu from rapt import c, params, NonAdiabatic class GuidingCenter: ...
3.03125
3
tests/hospital_resident/test_solver.py
drvinceknight/matching
0
28452
""" Unit tests for the HR solver. """ import pytest from matching import Matching from matching import Player as Resident from matching.games import HospitalResident from matching.players import Hospital from .params import HOSPITAL_RESIDENT, make_game, make_prefs @HOSPITAL_RESIDENT def test_init(resident_names, h...
3.234375
3
build/lib/rqalpha/data/dtsk_python_interface/utility/tdtsk.py
kinglogxzl/rqalpha
0
28453
import date import os def get_time_delta(kline_type = '1_day'): if kline_type.lower() == '1_day'.lower(): return 0 kline_array = kline_type.split("_") if len(kline_array) != 2: raise ValueError('KLine_type {0} not supported'.format(kline_type)) if kline_array[1].lower() == 'min'.lower()...
2.890625
3
2021/4/solution1.py
frenzymadness/aoc
2
28454
from collections import defaultdict def check_winner(cards): for card_index, card in cards.items(): for index in range(5): complete_line = all([x[1] for x in card[index]]) complete_column = all([card[x][index][1] for x in range(5)]) if complete_line or complete_column: ...
3.515625
4
djshed/__init__.py
carthage-college/django-djshed
0
28455
<filename>djshed/__init__.py from djshed.constants import *
1.140625
1
examples/hover_example.py
kail85/mpldatacursor
165
28456
""" Demonstrates the hover functionality of mpldatacursor as well as point labels and a custom formatting function. Notice that overlapping points have both labels displayed. """ import string import matplotlib.pyplot as plt import numpy as np from mpldatacursor import datacursor np.random.seed(1977) x, y = np.random....
3.75
4
FilterResponseNorm.py
PanTongLin/Filter_Response_Norm
1
28457
import torch import torch.nn as nn class FilterResponseNorm(nn.Module): def __init__(self, num_features, eps=1e-6, use_TLU=True): super(FilterResponseNorm, self).__init__() self.num_features = num_features self.eps = eps self.use_TLU = use_TLU self.weight = nn.Parameter(t...
2.625
3
tapas/utils/attention_utils_test.py
apurvak/tapas
816
28458
<filename>tapas/utils/attention_utils_test.py # coding=utf-8 # Copyright 2019 The Google AI Language Team Authors. # # 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.or...
2.0625
2
backend/src/application.py
rpenna/post-scheduler
0
28459
<reponame>rpenna/post-scheduler<filename>backend/src/application.py from flask import Flask from flask_mongoengine import MongoEngine from src.controllers.user_controller import UserController db_host = { 'production': 'mongodb://localhost/posts', 'test': 'mongomock://localhost/posts' } def create_app(db_host...
2.328125
2
Curso-em-video-Python3-mundo2/ex058.py
bernardombraga/Solucoes-exercicios-cursos-gratuitos
0
28460
<filename>Curso-em-video-Python3-mundo2/ex058.py import random pc = random.randint(0, 10) print('''Sou seu computador... Acabei de pensar em um número entre 0 e 10. Será que você consegue adivinhar qual foi?''') player = int(input('Qual é seu palpite? ')) # print(pc, player) tentativas = 1 while pc != player: if pc...
3.765625
4
mumblr/templatetags/mumblr_tags.py
hmarr/django-mumblr
35
28461
<reponame>hmarr/django-mumblr from django.template import Library, Node, TemplateSyntaxError import re from mumblr.entrytypes import EntryType register = Library() class LatestEntriesNode(Node): def __init__(self, num, var_name): self.num = int(num or 10) self.var_name = var_name def rend...
2.21875
2
funcional.py
renzon/novatec
0
28462
from time import time def profile(funcao): def funcao_wrapper(*args, **kwargs): inicio = time() resultado = funcao(*args, **kwargs) fim = time() print(fim - inicio) return resultado return funcao_wrapper @profile def f(n): return 'Executei f {}'.format(n) print(f...
2.703125
3
bf_smb_tmux.py
BadNameException/SambaBF
0
28463
<filename>bf_smb_tmux.py #!/usr/bin/env python # coding=utf-8 from subprocess import Popen, PIPE, check_output p = 1 USERNAME = "sigurdkb" IP = "172.16.0.30" PORT = "445" new_results = [] correct_pw = "" cracked = bool(False) counter = 0 guess_result = ((),) pw = '' def connect_smb(): global correct_pw global cra...
2.609375
3
VA/main/utils/cluster.py
YuJaceKim/Activity-Recognition-with-Combination-of-Deeply-Learned-Visual-Attention-and-Pose-Estimation
343
28464
import numpy as np # import matplotlib.pyplot as plt from scipy.cluster.vq import kmeans # def plothist(x): # vmin = x.min()-1 # vmax = x.max()+1 # bins = np.arange(vmin, vmax, (vmax - vmin)/50) # plt.hist(x, bins=bins) # plt.show() # def scatterpred(pred): # plt.scatter(pred[:,0], pred[:,1]) ...
2.765625
3
isdbeads/__init__.py
michaelhabeck/bayesian-random-tomography
2
28465
<filename>isdbeads/__init__.py from .universe import ( Universe, Particle ) from .probability import ( Probability ) from .likelihood import ( Likelihood, Normal, Exponential, LowerUpper, Logistic, GaussianMixture, Relu ) from .model import ( ModelDistances, ModelIma...
1.414063
1
ag-res.py
Murilodsv/py-jules
0
28466
# -*- coding: utf-8 -*- """ Created on Tue Apr 20 13:32:20 2021 #--- ag csv results to single file based on dashboard_dbs #--- <NAME> (<EMAIL>) #--- Jul, 2021. #--- Dev-log in: https://github.com/Murilodsv/py-jules @author: muril """ # DEBUG import os; os.chdir('C:/Murilo/py-jules') #---------------...
2.21875
2
gui/Color.py
brianjimenez/emol
0
28467
''' Created on Oct 10, 2012 @author: <NAME> @contact: <EMAIL> ''' class Color: def __init__(self, red=0., green=0., blue=0., alpha=1.0): self.__red = red self.__green = green self.__blue = blue self.__alpha = alpha def get_rgba(self): return self.__red, se...
3.1875
3
pnc_cli/pnc_help_formatter.py
vibe13/pnc-cli
2
28468
import argparse __author__ = 'aabulawi' class PNCFormatter(argparse.ArgumentDefaultsHelpFormatter, argparse.RawDescriptionHelpFormatter): def _expand_help(self, action): params = dict(vars(action), prog=self._prog) for name in list(params): if params[name] is argpar...
2.59375
3
Spell Compendium/scr/Spell1148 - Nimbus of Light.py
Sagenlicht/ToEE_Mods
1
28469
<reponame>Sagenlicht/ToEE_Mods from toee import * def OnBeginSpellCast(spell): print "Nimbus of Light OnBeginSpellCast" print "spell.target_list=", spell.target_list print "spell.caster=", spell.caster, " caster.level= ", spell.caster_level def OnSpellEffect(spell): print "Nimbus of Light OnSpellEffec...
2.34375
2
pyBAScloudAPI/examples/main.py
bascloud/BASCloudAPI
3
28470
<reponame>bascloud/BASCloudAPI # -*- coding: utf-8 -*- import datetime import pyBAScloudAPI as api def printErrorHandler(exception, json): print("\t\tException occured in request: ", exception, json) print("Testing util functions.") print("\t2021-04-26T10:56:58.000Z = ", api.Util.parseDateTimeString(dateTim...
2.375
2
zeus/util/tests/output.py
ZachAnders/OPLabs
1
28471
<gh_stars>1-10 __COL_GOOD = '\033[32m' __COL_FAIL = '\033[31m' __COL_INFO = '\033[34m' __COL_BOLD = '\033[1m' __COL_ULIN = '\033[4m' __COL_ENDC = '\033[0m' def __TEST__(status, msg, color, args): args = ", ".join([str(key)+'='+str(args[key]) for key in args.keys()]) if args: args = "(" + args + ")" ...
2.359375
2
Chapter02/05_embossing_advance.py
yanboyang713/OpenCV-3-x-with-Python-By-Example
0
28472
<reponame>yanboyang713/OpenCV-3-x-with-Python-By-Example<gh_stars>0 import cv2 import numpy as np img = cv2.imread('./images/geometrics_input.png', cv2.IMREAD_GRAYSCALE) rows, cols = img.shape # It is used depth of cv2.CV_64F. sobel_horizontal = cv2.Sobel(img, cv2.CV_64F, 1, 0, ksize=5) # Kernel size can be: 1,...
3.3125
3
dataladmetadatamodel/text.py
yarikoptic/metadata-model
0
28473
<reponame>yarikoptic/metadata-model """ Instances of the Text class just contain text. Their main use is as dummy-element during model development. """ from dataclasses import dataclass from dataladmetadatamodel.connector import ConnectedObject @dataclass class Text(ConnectedObject): content: str
2.140625
2
server/apps/bot/views.py
LowerDeez/movies_finder
0
28474
<reponame>LowerDeez/movies_finder<filename>server/apps/bot/views.py from rest_framework.views import APIView from rest_framework.permissions import AllowAny from rest_framework.response import Response from .registry import registry from .services.webhook import process_webhook_event __all__ = ( 'WebhookView', ) ...
2.015625
2
subject/tests/functional/v2/test_images.py
laoyigrace/subject
0
28475
<reponame>laoyigrace/subject # Copyright 2012 OpenStack Foundation # 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/L...
1.710938
2
pyfantasy/__init__.py
markwhat1/pyfantasy
0
28476
<reponame>markwhat1/pyfantasy from .pyfantasy import Connection from .pyfantasy import League, Team, Player from .yahoo_oauth import OAuth2
1.210938
1
examples/hello_world/python/django_amf_example/urls.py
limscoder/amfast
4
28477
import os from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^django_amf_example/', include('django_amf_example.foo.urls')), # Uncomment the admin/doc line below ...
1.953125
2
mm_power_sdk_python/models/private_trial.py
MolecularMatch/mm-power-sdk-python
0
28478
# coding: utf-8 """ MolecularMatch MMPower MMPower API # noqa: E501 OpenAPI spec version: 1.0.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class PrivateTrial(object): """NOTE: This class is auto g...
1.484375
1
play_heuristic_agent.py
Jueun-Park/gym-module-select
0
28479
import argparse import gym import gym_module_select from stable_baselines.common.vec_env import DummyVecEnv def init_parse_argument(): parser = argparse.ArgumentParser() parser.add_argument('-e', '--num-exp', help='num experiment episode', type=int, default=10) args = parser.parse_args() return args ...
2.390625
2
01_Python_Basico_Intermediario/Aula030/aula30.py
Joao-Inacio/Curso-de-Python3
1
28480
<reponame>Joao-Inacio/Curso-de-Python3 """ Funções (def) - *args **kwargs """ # def func(a1, a2, a3, a4, a5, nome=None, a6=None): # print(a1, a2, a3, a4, a5, nome, a6) def func(*args, **kwargs): print(args, kwargs) lista = [1, 2, 3, 4, 5] func(*lista, nome='João')
3.390625
3
lib/rucio/daemons/conveyor/utils.py
brianv0/rucio
0
28481
# Copyright European Organization for Nuclear Research (CERN) # # 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 # # Authors: # - <NAME>, <<EMAIL>>, 20...
1.71875
2
list_images.py
mrowacz/digital_api_scripts
0
28482
<gh_stars>0 import os import json import requests url = "https://api.digitalocean.com/v2/images?per_page=999" headers = {"Authorization" : "Bearer " + os.environ['DIGITALOCEAN_ACCESS_TOKEN']} r = requests.get(url, headers=headers) distros = {} for entry in r.json()["images"]: s = "(" + str(entry["id"]) + ") " + ...
2.671875
3
custom_components/journey/__init__.py
intrinseca/journey-custom-component
0
28483
<filename>custom_components/journey/__init__.py """ Custom integration to integrate Journey with Home Assistant. For more details about this integration, please refer to https://github.com/intrinseca/journey """ import asyncio from dataclasses import dataclass from datetime import timedelta import logging import math ...
2.390625
2
acpki/models/Contract.py
sigurd120/acpki
0
28484
class Contract: """ Model class representing a Cisco ACI Contract """ def __init__(self, uid, name, dn): self.uid = uid self.name = name self.dn = dn def equals(self, con): return self.dn == con.dn
3.015625
3
setup.py
debugtalk/hdiff
1
28485
<filename>setup.py #encoding: utf-8 import os import re from setuptools import setup, find_packages # parse version from xdiff/__init__.py with open(os.path.join(os.path.dirname(__file__), 'xdiff', '__init__.py')) as f: version = re.compile(r"__version__\s+=\s+'(.*)'", re.I).match(f.read()).group(1) with open('RE...
1.671875
2
recommendations/kujikatsu/249/c.py
takelifetime/competitive-programming
0
28486
a, b, n = map(int, input().split()) x = min(b - 1, n) print(a * x // b - a * (x // b))
2.65625
3
docs/source/conf.py
ducouloa/ml4ir
70
28487
<reponame>ducouloa/ml4ir # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup ----------------------------------------------...
1.359375
1
manage.py
ishiland/ArcGIS-License-Tracker
3
28488
import unittest from flask_script import Manager, Shell, Server from app import app, db from app.fake_populate import populate manager = Manager(app) def make_shell_context(): return dict(app=app) @manager.command def recreate_db(): """ Create the SQL database. """ db.drop_all() db.create_all...
2.609375
3
learning_journal/routes.py
hcodydibble/pyramid-learning-journal
0
28489
"""Routes and URIs.""" def includeme(config): """Add routes and their URIs.""" config.add_static_view('static', 'static', cache_max_age=3600) config.add_route('home', '/') config.add_route('about', '/about') config.add_route('details', '/journal/{id:\d+}') config.add_route('create', '/journal/...
2.171875
2
moto/logs/metric_filters.py
gtourkas/moto
5,460
28490
def find_metric_transformation_by_name(metric_transformations, metric_name): for metric in metric_transformations: if metric["metricName"] == metric_name: return metric def find_metric_transformation_by_namespace(metric_transformations, metric_namespace): for metric in metric_transformatio...
2.6875
3
bin/helper/evaluation_config_mixin.py
rubienr/dirindex
1
28491
<reponame>rubienr/dirindex from configparser import ConfigParser from .databases_config_mixin import get_configured_db_file_path ################################################################################################## class EvaluationConfigMixin(object): ################################################...
2.171875
2
backend/api/room/urls.py
jeraldlyh/HoloRPG
0
28492
<reponame>jeraldlyh/HoloRPG<filename>backend/api/room/urls.py<gh_stars>0 from django.urls import path, include from rest_framework.routers import DefaultRouter from .views import DungeonViewSet, RoomViewSet router = DefaultRouter() router.register(r"dungeon", DungeonViewSet, basename="dungeon") router.register(r"room...
1.976563
2
makememe/generator/prompts/types/waiting.py
joshbickett/makememe_ai
37
28493
from makememe.generator.prompts.prompt import Prompt import datetime from PIL import Image from makememe.generator.design.image_manager import Image_Manager class Waiting(Prompt): name = "Waiting" description = "waiting" def __init__(self): self.instruction = """ ### Message:I've been waiting for...
3.234375
3
ubermag/tests/test_basic_logging.py
ubermag/ubermag
20
28494
<reponame>ubermag/ubermag import ubermag import logging def check_levels(level=logging.WARNING, per_package=None): packages = [ 'discretisedfield', 'mag2exp', 'micromagneticdata', 'micromagneticmodel', 'micromagnetictests', 'oommfc', 'ubermagtable', ...
2.265625
2
python_framework/api/test/api/src/annotation/GlobalExceptionAnnotationTest.py
SamuelJansen/python_framework
5
28495
from python_helper import log, Test, SettingHelper, RandomHelper, ObjectHelper, TestHelper, ReflectionHelper, Constant from python_framework import EncapsulateItWithGlobalException, GlobalException, ExceptionHandler, HttpStatus LOG_HELPER_SETTINGS = { log.LOG : False, log.INFO : True, log.SUCCESS : True, ...
2.28125
2
src/Pybind11Wraps/Neighbor/TreeNeighbor.py
markguozhiming/spheral
1
28496
#------------------------------------------------------------------------------- # TreeNeighbor #------------------------------------------------------------------------------- from PYB11Generator import * from Neighbor import * from NeighborAbstractMethods import * @PYB11template("Dimension") class TreeNeighbor(Neigh...
2.25
2
hardhat/recipes/tkdiff.py
stangelandcl/hardhat
0
28497
<gh_stars>0 from .base import GnuRecipe class TkDiffRecipe(GnuRecipe): def __init__(self, *args, **kwargs): super(TkDiffRecipe, self).__init__(*args, **kwargs) self.sha256 = '734bb417184c10072eb64e8d27424533' \ '8e41b7fdeff661b5ef30e89f3e3aa357' self.name = 'tkdiff' ...
2.171875
2
profiles_app/serializers.py
foropolo/task
0
28498
<reponame>foropolo/task from rest_framework import serializers class HelloSerializer(serializers.Serializer): """Serializes a name field for testing out APIView""" city_name = serializers.CharField(max_length=30)
2.015625
2
tests/__init__.py
johnsca/charm-helpers
0
28499
<filename>tests/__init__.py<gh_stars>0 import sys import mock sys.modules['yum'] = mock.MagicMock()
1.382813
1