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
research/recommend/Fat-DeepFFM/eval310.py
leelige/mindspore
77
29700
<reponame>leelige/mindspore # Copyright 2021 Huawei Technologies Co., Ltd # # 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...
2.078125
2
organized/cli.py
lukeplausin/organised
0
29701
<gh_stars>0 import click import logging from . import logger, log_handler from .organize import main, ORGANIZER_NAMES from .storage.amazon_s3_storage import AWS_CLI_PARAMETERS @click.group() @click.option('--debug/--no-debug', default=False) def organize(debug=False): if debug: logger.setLevel(logging.DEB...
2.25
2
scripts/msresults.py
aw32/sched
0
29702
#!/usr/bin/env python3 # Copyright 2019, <NAME> <<EMAIL>>, <NAME> <<EMAIL>> # SPDX-License-Identifier: BSD-2-Clause # Reads ms task measurement results from CSV files. # # If the path to the results is not given it is read from the following environment variables: # * SCHED_MSRESULTS # * SCHED_RESULTS and SCHED_HOST...
2.578125
3
py_temper_exporter/main.py
srl295/py-temper-exporter
0
29703
import time from prometheus_client import start_http_server, Gauge, Enum from temper import Temper def main(): port = 9204 t = Temper() label_names = ['vendorid','productid','busnum','devnum'] temp_c = Gauge('temper_internal_temperature_celsius', 'Temperature in °C', label_names) humid = Gauge('tem...
2.75
3
test/test_mssql.py
samirsilwal/pyodbc
20
29704
<gh_stars>10-100 ''' Tests for MSSQL. ''' from util import exec_query, MSSQL def test_connection(): ''' Test connection to MSSQL Server. ''' result = exec_query(MSSQL, "SELECT 'It works!'") assert result == 'It works!'
2.296875
2
fraunhofer/specfit.py
dnidever/fraunhofer
0
29705
#!/usr/bin/env python """SPECFIT.PY - Generic stellar abundance determination software """ from __future__ import print_function __authors__ = '<NAME> <<EMAIL>>' __version__ = '20200711' # yyyymmdd import os import shutil import contextlib, io, sys import numpy as np import warnings from astropy.io import fits fr...
2.171875
2
src/split_data.py
sunsiche/DSCI522-2020-g22
0
29706
# author: <NAME> # date: 2020-11-25 """ This script Splits the raw cleaned data to train and test splits based on the user input and saves them into two separate csv files Usage: clean_data.py --input_file_path=<input_file_path> --saving_path_train=<saving_path_train> --saving_path_test=<saving_path_test> --test_s...
3.734375
4
minerva/controllers/dataset.py
takuseno/minerva
68
29707
import base64 import json import os import tempfile import uuid import zipfile from io import BytesIO import werkzeug from flask import Blueprint, jsonify, request from ..config import get_config from ..dataset import convert_ndarray_to_image, import_csv_as_mdp_dataset from ..models.dataset import Dataset, DatasetSch...
2.390625
2
onos_ric_sdk_py/__init__.py
MatthewWEdwards/onos-ric-sdk-py
0
29708
<reponame>MatthewWEdwards/onos-ric-sdk-py<filename>onos_ric_sdk_py/__init__.py # SPDX-FileCopyrightText: © 2021 Open Networking Foundation <<EMAIL>> # SPDX-License-Identifier: Apache-2.0 from __future__ import absolute_import from .e2 import E2Client, Subscription from .sdl import SDLClient
1.15625
1
bump_release/__init__.py
frague59/bump-release
0
29709
""" Update release numbers in various places, according to a release.ini file places at the project root """ import configparser import logging import sys from configparser import ConfigParser from pathlib import Path from typing import Optional, Tuple import click from bump_release import helpers from bump_release.h...
2.5
2
sense/core.py
pygeo/sense
1
29710
<reponame>pygeo/sense import numpy as np import matplotlib.pyplot as plt class Fresnel0(object): def __init__(self, e): """ calculate the Nadir Fresnel reflectivity e.g. Ulaby (2014), eq. 10.36 Parameters ---------- e : complex complex relative d...
2.796875
3
src/cs_519_files/ML_Project_v1.0.py
CJCascalheira/ml-gender-dysphoria
0
29711
import numpy as np import pandas as pd import nltk from nltk.corpus import stopwords from nltk.tokenize import word_tokenize import matplotlib.pyplot as plt import contractions # Expanding contractions from nltk.stem.wordnet import WordNetLemmatizer from sklearn.model_selection import tr...
2.828125
3
applications/startupconfort/templatetags/item_extra.py
guinslym/python-color-palette
0
29712
<gh_stars>0 from django import template import datetime from applications.startupconfort.models import CartItem #https://github.com/guinslym/mywadiyabi/blob/master/applications/wadiyabi/templatetags/registration.py register = template.Library() @register.filter def replace_commas(string): return string.replace...
2.359375
2
main.py
artin222/Password-generator
1
29713
from csv import reader , writer from random import randrange #These are lists of characters that program can use to generate password smlLetters = ["a" , "b" , "c" , "d" , "e" , "f" , "g" , "h" , "i" , "j" , "k" , "l" , "m" , "n" , "o" , "p" , "q" , "r" , "s" , "t" , "u" , "v" , "w" , "x" , "y" , "z"] capLetters = [...
3.890625
4
prefect/token_test.py
kvnkho/demos
13
29714
from prefect import task, Flow, Parameter from prefect.tasks.prefect import StartFlowRun from prefect.storage import GitHub with Flow("token-test") as flow: StartFlowRun(project_name="testing", flow_name="flow_must_fail")() flow.storage = GitHub(repo="kvnkho/demos", path="/prefect/token_test.py") flow.register("t...
1.734375
2
setup.py
turbolent/spacy-thrift
5
29715
<reponame>turbolent/spacy-thrift #!/usr/bin/env python from setuptools import setup with open('README.md') as f: long_description = f.read() setup(name='spacy-thrift', version='0.5.0', description='spaCy-as-a-service using Thrift', long_description=long_description, long_description_conte...
1.359375
1
swexpert/d3/sw_2817_1.py
ruslanlvivsky/python-algorithm
3
29716
<reponame>ruslanlvivsky/python-algorithm<filename>swexpert/d3/sw_2817_1.py<gh_stars>1-10 test_cases = int(input().strip()) def sum_sub_nums(idx, value): global result if value == K: result += 1 return if value > K or idx >= N: return sum_sub_nums(idx + 1, value) sum_sub_nu...
3.25
3
data_action/data_loader.py
namanshrimali/simplif-ai
0
29717
from data_action.transformations import * class Data_Loader: def __init__(self, device, batch_size, dataset, mean, std, transform_type='pmda'): self.device = device self.batch_size = batch_size self.transform_type = transform_type self.dataset = dataset self.kwargs = {'num_w...
2.375
2
src/dots/token.py
Mokin711/dots-python
1
29718
import base64 import dots def get_auth_token(): if dots.client_id == None or dots.api_key == None: raise AssertionError('api_key and/or client_id not set') token = base64.b64encode(bytes(dots.client_id + ':' + dots.api_key, 'utf-8')).decode('utf-8') return token
2.453125
2
setup.py
ctsit/lineman
0
29719
<reponame>ctsit/lineman<gh_stars>0 from setuptools import setup #bring in __version__ from sourcecode #per https://stackoverflow.com/a/17626524 #and https://stackoverflow.com/a/2073599 with open('lineman/version.py') as ver: exec(ver.read()) setup(name='lineman', version=__version__, description='Lin...
1.59375
2
main.py
a2824256/pyrealsense_collection
0
29720
<gh_stars>0 import png import pyrealsense2 as rs import logging logging.basicConfig(level=logging.INFO) import numpy as np import cv2 import os def make_directories(): if not os.path.exists("JPEGImages/"): os.makedirs("JPEGImages/") if not os.path.exists("depth/"): os.makedirs("depth/") if ...
2.40625
2
VoC/Librispeech_enhancement/use_model.py
dugudongfangshuo/DeepLearn
1
29721
import torch import speechbrain as sb from hyperpyyaml import load_hyperpyyaml hparams_file, overrides = 'train.yaml','' PATH = './results/4234/save/CKPT+2021-04-17+16-05-06+00/model.ckpt' # 加载超参数文件 with open(hparams_file) as fin: hparams = load_hyperpyyaml(fin, overrides) # 加载模型 model=hparams["model"] model=mode...
2.390625
2
vit_jax/inference_time.py
fensence/Mixup-VT
4,825
29722
<reponame>fensence/Mixup-VT<gh_stars>1000+ # Copyright 2021 Google LLC. # # 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 ...
1.734375
2
vpos/exceptions.py
txiocoder/django-vpos
3
29723
class VposConfigurationError(Exception): pass
1.1875
1
PythonExercicios/ex039.py
lordvinick/Python
0
29724
<filename>PythonExercicios/ex039.py print('\033[36m='*12, '\033[32mAlistamento Militar', '\033[36m='*12) from datetime import date ano = int(input('Em que ano você nasceu? ')) atual = date.today().year idade = atual - ano print(f'Você tem \033[32m{idade} \033[36manos em \033[32m{atual}.') if idade == 18: print('\03...
3.796875
4
code/stats/dim_reduction.py
wethepeopleonline/law-net
17
29725
import numpy as np from scipy import stats import pandas as pd from sklearn.cross_decomposition import PLSRegression def standardize_vector(v, center=True, scale=False): if center: v = v - np.mean(v) if scale: if np.std(v) == 0: return v else: return (v + 0.0)...
3.34375
3
cloudmarker/test/test_azwebapphttp20event.py
TinLe/cloudmarker
208
29726
"""Tests for AzWebAppHttp20Event plugin.""" import copy import unittest from cloudmarker.events import azwebapphttp20event base_record = { 'ext': { 'record_type': 'web_app_config', 'cloud_type': 'azure', 'http20_enabled': True }, 'com': { 'cloud_type': 'azure' } }...
2.359375
2
build/pomdog.gyp
bis83/pomdog
0
29727
{ 'includes': ['common.gypi'], 'conditions': [ ['OS == "win"', { 'variables': { 'application_platform%': 'Win32', 'renderers%': ['Direct3D11', 'GL4'], 'audio%': 'XAudio2', 'input_devices%': ['DirectInput'], }, }], ['OS == "mac"', { 'variables': { ...
1.164063
1
pythonforandroid/recipes/android/__init__.py
inclement/p4a-experiment
1
29728
<gh_stars>1-10 from pythonforandroid.toolchain import CythonRecipe, shprint, ensure_dir, current_directory, ArchAndroid, IncludedFilesBehaviour import sh from os.path import exists, join class AndroidRecipe(IncludedFilesBehaviour, CythonRecipe): # name = 'android' version = None url = None depends = ...
1.890625
2
sportcred/backend/resources/userComments.py
aviral25/SportCredAPP
0
29729
from flask_restful import Resource from flask import request, Blueprint, jsonify from models import db, Post, Comment from datetime import datetime commentBp = Blueprint('commentBp', __name__) class UserComments(): @commentBp.route("/addComment", methods=['POST']) def addComment(): json_data = re...
2.75
3
poetry/console/commands/cache/__init__.py
hongquan/poetry
1
29730
<reponame>hongquan/poetry from .cache import CacheCommand
0.960938
1
aalpy/utils/AutomatonGenerators.py
MDrey101/AALpy
61
29731
<filename>aalpy/utils/AutomatonGenerators.py import random from aalpy.automata import Dfa, DfaState, MdpState, Mdp, MealyMachine, MealyState, \ MooreMachine, MooreState, OnfsmState, Onfsm, MarkovChain, McState from aalpy.utils.HelperFunctions import random_string_generator def generate_random_mealy_machine(num_s...
3.015625
3
tools/_init.py
zhengshou/AutoLoc
84
29732
import os import sys import os.path as osp from contextlib import contextmanager ############################################################ # Setup path def add_path(path): if path not in sys.path: sys.path.insert(0, path) curdir = osp.dirname(__file__) lib_path = osp.join(curdir, '..', 'lib') add_...
1.789063
2
chap4/exchange_keys_and_values.py
marble-git/python-laoqi
0
29733
#coding:utf-8 ''' filename:exchange_keys_and_values.py chap:4 subject:10 conditions:a dict solution:exchanged keys and values ''' origin_dict = {'book':['python','djang','data'],'author':'laoqi','publisher':'phei'} def ishashable(obj): try: hash(obj) return True exce...
3.171875
3
datadog_checks_dev/tests/test_subprocess.py
seants/integrations-core
4
29734
<filename>datadog_checks_dev/tests/test_subprocess.py # (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os import sys from datadog_checks.dev.subprocess import run_command class TestRunCommand: def test_output(self): result = run_command( ...
2.109375
2
output/models/ms_data/datatypes/facets/any_uri/any_uri_b002_xsd/__init__.py
tefra/xsdata-w3c-tests
1
29735
<reponame>tefra/xsdata-w3c-tests from output.models.ms_data.datatypes.facets.any_uri.any_uri_b002_xsd.any_uri_b002 import ( Bar, Ct, Root, St, ) __all__ = [ "Bar", "Ct", "Root", "St", ]
1.101563
1
tests/fixtures/statement_lists.py
TylerYep/wolfbot
3
29736
<filename>tests/fixtures/statement_lists.py import pytest from wolfbot.enums import Role, SwitchPriority from wolfbot.statements import Statement @pytest.fixture(scope="session") def example_statement() -> Statement: return Statement( "test", ((2, frozenset({Role.ROBBER})), (0, frozenset({Role.SE...
2.359375
2
ranking/migrations/0056_auto_20201128_2316.py
horacexd/clist
166
29737
<gh_stars>100-1000 # Generated by Django 2.2.13 on 2020-11-28 23:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ranking', '0055_auto_20201009_0735'), ] operations = [ migrations.AddIndex( model_name='statistics', ...
1.421875
1
aioboto3/resources/base.py
dacevedo12/aioboto3
0
29738
<filename>aioboto3/resources/base.py import logging import warnings from boto3.resources.base import ServiceResource logger = logging.getLogger(__name__) class AIOBoto3ServiceResource(ServiceResource): async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): ...
1.929688
2
AdvBox/examples/utils.py
Tough2011/PaddleSleeve
2
29739
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
2.1875
2
shield.com/metahumans/validators.py
euribates/curso-django
1
29740
<gh_stars>1-10 #!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from django.core.exceptions import ValidationError def between_zero_and_one_hundred(value): if value < 0 or...
2.109375
2
api/tiposrefeicao.py
Guergeiro/bd2-group2
0
29741
from flask import Blueprint, request import json import databaseutils as utils tiposrefeicao = Blueprint("tiposrefeicao", __name__) tiposrefeicaoColumns = ["cod_tiporefeicao", "designacao"] @tiposrefeicao.route("/api/tiposrefeicao", methods=["GET"]) @tiposrefeicao.route("/api/tiposrefeicao/", methods=["GET"]) def g...
2.515625
3
environment/postgresql_backups/scripts/insert.py
DarkSideMoon/metrics-dotnet-samples
0
29742
#!/usr/bin/env /usr/local/opt/python@3.9/bin/python3.9 import sys import psycopg2 from faker import Faker from contextlib import closing from random import randint import time if __name__ == "__main__": total = 10 batch_size = 1000 if len(sys.argv) > 1: total = int(sys.argv[1]) if len(sys....
2.71875
3
DataVis/faradaysky_disp.py
EmmaAlexander/possum-tools
5
29743
import os import sys import matplotlib.pyplot as plt import numpy as np import cmasher as cmr import astropy.units as u import astropy.coordinates as coord from astropy.io import ascii from astropy.io import fits from astropy.wcs import WCS from functions import * plt.rcParams['mathtext.fontset'] = 'cm' plt.rcParams[...
2.3125
2
ty.py
IsSveshuD/lab_2_12
0
29744
<reponame>IsSveshuD/lab_2_12 import re def c(text, chars=" !?"): rx = re.compile(f'{chars}') text = rx.sub(r'-', text) print(text) a = 'dsf !?#' c(a)
3.140625
3
polyA/fill_confidence_matrix.py
TravisWheelerLab/polyA
3
29745
from typing import Dict, List, Tuple from .confidence_cm import confidence_cm from .matrices import ConfidenceMatrix from .performance import timeit @timeit() def fill_confidence_matrix( column_count: int, subfam_counts: Dict[str, float], subfams: List[str], active_cells: Dict[int, List[int]], al...
2.9375
3
website/articles.py
ceyeoh/fyp_doppler
0
29746
from flask import Blueprint, render_template from flask_login import login_required, current_user articles = Blueprint( "articles", __name__, ) @articles.route("/intro-fgr") @login_required def intro(): return render_template("article-intro-fgr.html", user=current_user) @articles.route("/causes-fgr") @...
2.40625
2
src/main.py
neeraj310/DLfM_BrandManagement
0
29747
from flask import Flask, render_template, request, redirect, url_for import tensorflow as tf from keras.models import load_model from keras.backend import set_session from src.utils import image_preprocessing from src.utils import overall_class_label from src.utils import infinite_scraper # sessions and default graphs...
2.890625
3
rvaconnect/circles/migrations/0001_initial.py
rva-data/rvaconnect
1
29748
<filename>rvaconnect/circles/migrations/0001_initial.py # -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Group' db.create_table(u'circles_gro...
2.21875
2
PythonExercicios/ex017.py
gabjohann/python_3
0
29749
# Faça um programa que leia o comprimento do cateto oposto e a do cateto adjacente de um triângulo retângulo. # Calcule e mostre o comprimento da hipotenusa. from math import hypot catoposto = float(input('Cateto oposto: ')) catadjacente = float(input('Cateto adjacente: ')) print(hypot(catoposto, catadjacente)) ''' ...
4.03125
4
code/tmp_rtrip/tkinter/messagebox.py
emilyemorehouse/ast-and-me
24
29750
from tkinter.commondialog import Dialog ERROR = 'error' INFO = 'info' QUESTION = 'question' WARNING = 'warning' ABORTRETRYIGNORE = 'abortretryignore' OK = 'ok' OKCANCEL = 'okcancel' RETRYCANCEL = 'retrycancel' YESNO = 'yesno' YESNOCANCEL = 'yesnocancel' ABORT = 'abort' RETRY = 'retry' IGNORE = 'ignore' OK = 'ok' CANCEL...
3.078125
3
models/tree.py
pigaov10/tree_manager
0
29751
<filename>models/tree.py from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def configure(app): db.init_app(app) app.db = db class Tree(db.Model): __tablename__ = 'tree' id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(50), nullable=False) description...
2.984375
3
plugin.video.youtube/resources/lib/youtube_plugin/kodion/impl/xbmc/xbmc_progress_dialog.py
akuala/REPO.KUALA
2
29752
<reponame>akuala/REPO.KUALA # -*- coding: utf-8 -*- """ Copyright (C) 2014-2016 bromix (plugin.video.youtube) Copyright (C) 2016-2018 plugin.video.youtube SPDX-License-Identifier: GPL-2.0-only See LICENSES/GPL-2.0-only for more information. """ from six import string_types import xbmcgui from ..abst...
1.914063
2
settings.py
vboginskey/cribfinder
0
29753
import os CRAIGSLIST_SITE = 'newjersey' CRAIGSLIST_CATEGORY = 'apa' MIN_FT2 = 900 MIN_PRICE = 1500 MAX_PRICE = 3000 MAX_TRANSIT_DISTANCE = 0.75 BOXES = { "Hoboken": [40.734966101, -74.0439891815, 40.7529789172, -74.0192699432], "The Heights": [40.7332100782, -74.0573787689, 40.7615609255, -74.0378093719], ...
1.96875
2
examples/black_lives/create_progmem.py
fejiso/PxMatrix
599
29754
#!/usr/bin/python import binascii import sys import glob, os import pdb file_no=0; file_names=[]; RGB565=1; out_string=""; def printrgb565(red, green, blue): x1 = (red & 0xF8) | (green >> 5); x2 = ((green & 0x1C) << 3) | (blue >> 3); #pdb.set_trace() this_string="0x" + str(binascii.hexlify(chr(x2))) + ","; this_...
2.671875
3
q5.py
fairoz-ahmed/Python_Practice
0
29755
class Input_data(): def __init__(self): self.s='' def getString(self): self.s = input() def printString(self): print(self.s.upper()) strobj=Input_data() strobj.getString() strobj.printString()
3.171875
3
SP/Modul_02/skrypt_01.py
edu-sense-com/OSE-Python-Course
0
29756
<gh_stars>0 print("To jest pierwsza linia.") print("To jest druga linia.") print("To jest trzecia linia.")
1.546875
2
lisa_flexbe_states_flexbe_behaviors/src/lisa_flexbe_states_flexbe_behaviors/test_multiple_sm.py
lawrence-iviani/lisa-flexbe-states
0
29757
<filename>lisa_flexbe_states_flexbe_behaviors/src/lisa_flexbe_states_flexbe_behaviors/test_multiple_sm.py<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################### # WARNING: Generated code! # # **********************...
1.601563
2
data_preparation/jobScreening_cvpr17/extract_spectograms.py
segurac/richEmbeddings
0
29758
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import pickle import numpy as np from scipy.io import wavfile import python_speech_features as fextract audio_filename = sys.argv[1] features_filename = sys.argv[2] rate, sig = wavfile.read(audio_filename) fbank_feat = fextract.logfbank(sig,samplerate=r...
2.6875
3
1.3.BayesianInference/exercises/srcs/5/connected_waxman.py
mihaighidoveanu/machine-learning-examples
0
29759
import numpy as np import pymc as pm import networkx as nx from matplotlib import pyplot as plt alpha = 0.5 beta = 0.1 L= 9.0 G0 = nx.Graph() for i in range(1, 10): for j in range(i + 1, 11): G0.add_edge(i, j) #G0.add_path(range(1, 11)) #G0.add_path(range(1, 11)) #G0.remove_edge(2, 3)...
3
3
urls.py
markbate/whiskerboard
20
29760
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from board.feeds import EventFeed from board.views import IndexView, ServiceView admin.autodiscover() urlpatterns = patterns('', url(r'^$', IndexView.as_view(), name='index'), url(r'^services/(?P<slug>[-\w]+)$', Serv...
1.625
2
antipetros_discordbot/cogs/general_cogs/image_manipulation_cog.py
Giddius/Antipetros_Discord_Bot
0
29761
# region [Imports] # * Standard Library Imports ----------------------------------------------------------------------------> import os import asyncio from io import BytesIO from pathlib import Path from datetime import datetime from tempfile import TemporaryDirectory from textwrap import dedent # * Third Party Impo...
1.65625
2
sdk/python/pulumi_gcp/iam/workload_identity_pool_provider.py
sisisin/pulumi-gcp
121
29762
<filename>sdk/python/pulumi_gcp/iam/workload_identity_pool_provider.py # 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 ...
1.8125
2
python/get_pj_urls.py
cookie1986/csa-chat-predict
0
29763
import requests from bs4 import BeautifulSoup as soup import pandas as pd # PJ chatlog archive url_main = 'http://perverted-justice.com/?archive=byName' # get list of chat URLs req_main = requests.get(url_main) main_soup = soup(req_main.text, "html.parser") # list to store URLs url_link = [] for link in main_soup.fin...
3.234375
3
mtpipeline/ephem/mt_logging.py
STScI-Citizen-Science/MTPipeline
4
29764
""" This module contains the basic logging setup for the project. """ import datetime import logging import os def setup_logging(module): """Set up the logging.""" log_file = os.path.join('/astro/3/mutchler/mt/logs/', module, module + '_' + datetime.datetime.now().strftime('%Y-%m-%d-%H-%M') + '.log')...
2.59375
3
clone/views.py
kurian-thomas/neuralcloning
9
29765
from django.shortcuts import render, HttpResponse from django.views.decorators.csrf import csrf_exempt import os import base64 # from .celery_test import test # from clone_script import clone def index(request): return render(request, 'clone/index.html') def results(request): return render(request, 'clone/results....
2
2
wis2box/metadata/base.py
webb-ben/wis2node
7
29766
<reponame>webb-ben/wis2node ############################################################################### # # 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 ownershi...
2.03125
2
packages/core/minos-microservice-common/minos/common/setup.py
minos-framework/minos-python
247
29767
from __future__ import ( annotations, ) import logging import warnings from pathlib import ( Path, ) from typing import ( TYPE_CHECKING, Optional, Type, TypeVar, Union, ) from .object import ( Object, ) if TYPE_CHECKING: from .config import ( Config, ) logger = loggin...
2.171875
2
addons/base_address_extended/models/res_partner.py
SHIVJITH/Odoo_Machine_Test
0
29768
<filename>addons/base_address_extended/models/res_partner.py # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import api, fields, models, _ from odoo.exceptions import UserError class Partner(models.Model): _inherit = ['res.partner'] str...
2.390625
2
third_party/aten/src/ATen/gen.py
AIHGF/caffe2
58
29769
from optparse import OptionParser import yaml import cwrap_parser import nn_parse import native_parse import preprocess_declarations import function_wrapper import dispatch_macros import copy_wrapper from code_template import CodeTemplate parser = OptionParser() parser.add_option('-s', '--source-path', help='path t...
2.09375
2
tests/mock_module.py
nullpsifer/cryptosploit
0
29770
from modules.abstract_module import * class MockModule(AbstractModule): executed = False name = "mock_module" description = "Module for testing purposes." arguments = [ ModuleArgumentDescription("Arg1", "Argument 1", True), ModuleArgumentDescription("Arg2", "Argument 2",...
3.03125
3
kornia/augmentation/_3d/intensity/__init__.py
Ishticode/kornia
418
29771
<gh_stars>100-1000 from kornia.augmentation._3d.intensity.equalize import RandomEqualize3D from kornia.augmentation._3d.intensity.motion_blur import RandomMotionBlur3D
1.210938
1
tmtrader/exchange_for_backtest/position_manager.py
reouno/tomatorader
0
29772
from logging import getLogger from typing import Dict, List, Optional from tmtrader.entity.order import FilledBasicOrder from tmtrader.entity.position import ClosedPosition, Position, Positions, \ PositionsRef from tmtrader.exchange_for_backtest.usecase.order_to_share import from_order logger = getLogger(__name__...
2.125
2
service/server.py
IsraelAbebe/fake-news-classification
0
29773
import grpc from concurrent import futures import time import sys sys.path.insert(0, 'service/') from service_spec import fake_news_pb2 from service_spec import fake_news_pb2_grpc import json import test class fake_news_classificationServicer(fake_news_pb2_grpc.fake_news_classificationServicer): def classify...
2.421875
2
authorization/models.py
Joost-dm/jooster
1
29774
from io import BytesIO from PIL import Image from django.contrib.auth.models import AbstractUser from django.core.files.uploadedfile import InMemoryUploadedFile from django.core.mail import send_mail from django.db import models from resizeimage import resizeimage from rest_framework.authtoken.models import Token from ...
2.15625
2
mapnik_style_generator/utils/PandasMerge.py
sjsafranek/GeoTileServer
1
29775
#table join #<NAME> import csv, os, sys, time import pandas as pd start_time = time.time() #start time #File 1 IMPORT_FILE = "Burns_wO_LnLID.csv" SAVE_FILE = IMPORT_FILE.replace('.csv','') + " MATCHED.csv" df1 = pd.read_csv("Burns HD 58.csv", index_col=None, usecols=[0,1,2,4], parse_dates=True) df2 = ...
2.75
3
arcticdem/ee_setsm_meta2file.py
whyjz/ArcticDEM-Batch-Pipeline
0
29776
<gh_stars>0 import csv from itertools import islice import os from glob import glob import time def demmeta(folder,mfile,errorlog): metasource = [y for x in os.walk(folder) for y in glob(os.path.join(x[0], '*.txt'))] with open(mfile,'wb') as csvfile: writer=csv.DictWriter(csvfile,fieldnames=["id_no", "s...
2.421875
2
ai/bertpredict/urls.py
thdwlsgus0/relay_15
3
29777
<gh_stars>1-10 from django.urls import path from . import views app_name = 'bertpredict' urlpatterns = [ path('bertpredict/', views.BertPredictView.as_view()), ]
1.5
2
examples/eager_examples/scripts/example_custom_env.py
eager-dev/eager
16
29778
<filename>examples/eager_examples/scripts/example_custom_env.py<gh_stars>10-100 #!/usr/bin/env python3 # ROS packages required import rospy from eager_core.eager_env import BaseEagerEnv from eager_core.objects import Object from eager_core.wrappers.flatten import Flatten from eager_bridge_webots.webots_engine import W...
2.078125
2
DataFormats/FWLite/test/RefTest_cfg.py
ckamtsikis/cmssw
852
29779
<reponame>ckamtsikis/cmssw<gh_stars>100-1000 # Configuration file for RefTest_t import FWCore.ParameterSet.Config as cms process = cms.Process("TEST") process.load("FWCore.Framework.test.cmsExceptionsFatal_cff") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(2) ) process.source = cms.So...
1.375
1
keycards/urls.py
oangervuori/namubufferi
2
29780
from django.urls import path from . import views app_name = "keycards" urlpatterns = [ path(f"", views.KeycardLoginFormView.as_view(), name="login"), ]
1.71875
2
src/drias2020/__init__.py
jpvergnes/pybrgmlib
0
29781
from drias2020.extract_drias2020 import extract_drias2020 from drias2020.convert_drias2020 import convert_drias2020 alls_models = [ ('CNRM-CM5-LR', 'ALADIN63', 'historical'), ('CNRM-CM5-LR', 'ALADIN63', 'rcp2.6'), ('CNRM-CM5-LR', 'ALADIN63', 'rcp4.5'), ('CNRM-CM5-LR', 'ALADIN63', 'rcp8.5'), ('CNRM-...
1.195313
1
userbot/plugins/_light.py
justteen/BUZZ-USERBOT
0
29782
# Rewritten by @keinshin import io from userbot import CMD_LIST, ALIVE_NAME, bot as light from userbot import CMD_HELP from userbot.utils import lightning_cmd import asyncio from var import Var DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "Pls Go To Heroku Vars Then in `ALIVE_NAME`place You Telegram `Your Desire...
2.140625
2
model/regressors/Hourglass.py
meansnothing/Deep-vSlam
0
29783
import torch import torch.nn as nn from torchvision import models import torch.nn.functional as F def model_parser(model, sum_mode=False, dropout_rate=0.0, bayesian=False): base_model = None if model == 'Resnet': base_model = models.resnet34(pretrained=True) network = HourglassNet(base_model, ...
2.375
2
data/faces.py
FabianSchuetze/ssd.pytorch
0
29784
<reponame>FabianSchuetze/ssd.pytorch<filename>data/faces.py r""" Class to the python faces """ from typing import List, Tuple import xml.etree.ElementTree as ET import torch import torch.utils.data as data import cv2 import numpy as np from PIL import Image from torchvision.transforms import functional as F class Fa...
2.921875
3
exchanges/okex.py
soulmachine/crypto-market-data
0
29785
from typing import Any, Dict, List from .utils import get_json def fetch_markets(market_type: str) -> List[Dict[str, Any]]: '''Fetch all trading markets from a crypto exchage.''' if market_type == 'future': return _fetch_future_markets() elif market_type == 'option': return _fetch_option_...
2.828125
3
client/netmgr.py
kendase3/every
1
29786
from twisted.internet import defer, reactor from twisted.protocols import basic from twisted.internet.protocol import Protocol, ReconnectingClientFactory from time import sleep # local import screen import stevent class NetMgr: """ new abstraction: 1) this module receives the latest screen from the server. 2)...
2.625
3
dataplaybook/tasks/io_mongo.py
kellerza/data-playbook
3
29787
"""MongoDB IO tasks.""" import logging from typing import List, Optional, Sequence from urllib.parse import urlparse import attr from icecream import ic # noqa pylint: disable=unused-import from pymongo import MongoClient from pymongo.errors import ServerSelectionTimeoutError import voluptuous as vol from dataplaybo...
2.390625
2
Lista 1/exe8.py
jesset27/Listas-de-exercicios-python
1
29788
<reponame>jesset27/Listas-de-exercicios-python '''8. Faça um programa que receba o valor de um depósito e o valor da taxa de juros, calcule e mostre o valor do rendimento e o valor total depois do rendimento de um mês.''' #entrada deposito = float(input('valor de deposito: ')) juros = float(input("Taxa de juros: ")) ...
3.8125
4
tests/test_patterns.py
golly-splorts/golly-maps
0
29789
<reponame>golly-splorts/golly-maps import os import unittest from golly_maps.patterns import ( get_patterns, get_pattern, get_pattern_size, get_grid_pattern, pattern_union, ) HERE = os.path.split(os.path.abspath(__file__))[0] ALL_PATTERNS = [ "78p70", "acorn", "airforce", "backrak...
2.3125
2
leetcode/1986.py
Cannizza-zzk/python_review
0
29790
<filename>leetcode/1986.py<gh_stars>0 class Solution: def minSessions(self, tasks: List[int], sessionTime: int) -> int: n = len(tasks) initial_state = int('0b'+'1'*n,2) dp = {} def find_dp(state): if state in dp: return dp[state] if state == ...
3.046875
3
spimstitch/commands/stitch_cmd.py
chunglabmit/spimstitch
1
29791
import argparse import json import numpy as np import typing from blockfs.directory import Directory import logging from precomputed_tif.blockfs_stack import BlockfsStack from precomputed_tif.ngff_stack import NGFFStack import os import sys from spimstitch.ngff import NGFFDirectory from ..stitch import get_output_siz...
2.421875
2
set_input.py
oinu32/discordpy-startup
1
29792
#AGNET # 該当のチャンネルのID ID_CHANNEL_README = 771383900814573598 #たすきる ID_ROLE_TSKL = 671354476044615680 #たすきる用ちゃんねるID(とつかんり) ID_TSKILL = 624668843444273164 #とつ予定(とつかんり) ID_totu = 739498595329376487 #とつ予定じゃり ID_totu2 = 750321508219355227 #さーばーID ID_SRV = 539773033724772362 #agnet ID_agnet = 549971775828656168 ID_alist =...
1.34375
1
src/issues/search_indexes.py
ofirr/OpenCommunity
0
29793
from haystack import indexes from issues.models import Issue, Proposal from haystack.fields import IntegerField, CharField, BooleanField, DateField, DateTimeField from datetime import date, datetime, timedelta class IssueIndex(indexes.ModelSearchIndex, indexes.Indexable): community = IntegerField(model_attr='comm...
2.265625
2
options/opts.py
apple/ml-cvnets
209
29794
# # For licensing see accompanying LICENSE file. # Copyright (C) 2022 Apple Inc. All Rights Reserved. # import argparse from typing import Optional from data.sampler import arguments_sampler from data.collate_fns import arguments_collate_fn from options.utils import load_config_file from data.datasets import argument...
2.09375
2
grokking-the-coding-interview/dfs/Path-for-Max-Sum-(medium).py
huandrew99/LeetCode
36
29795
<reponame>huandrew99/LeetCode """ Given a binary tree, find the root-to-leaf path with the maximum sum. """ class TreeNode: def __init__(self, val, left=None, right=None): self.val = val self.left = left self.right = right def find_paths(root): res = [] cur_path = [] find_max(root, res, cur_path...
3.703125
4
django-ng/django_ng_project/django_ng_app/views.py
bounouhmahmoud/ensi
1
29796
<reponame>bounouhmahmoud/ensi<gh_stars>1-10 # coding=utf-8 from django.shortcuts import render from rest_framework import viewsets, generics, status from .serializers import ClientSerializer, MessageSerializer, SearchSerializer, ManageSearchSerializer, PreferenceSerializer from .models import Client, Message, Search, M...
2.078125
2
migration/management/commands/migratedata.py
dixonary/uwcs-zarya
7
29797
from django.core.management.base import BaseCommand from django.contrib.auth import get_user_model from django.template.defaultfilters import slugify, linebreaks, date, truncatechars from wagtail.core.models import Page from wagtail.core.rich_text import RichText from migration.models import * from accounts.models im...
2.09375
2
env/Lib/site-packages/countdowntimer_model/apps.py
gtkacz/fantasytrashtalk
4
29798
<reponame>gtkacz/fantasytrashtalk from django.apps import AppConfig class CountdowntimerModelConfig(AppConfig): name = 'countdowntimer_model'
1.320313
1
restea/adapters/flaskwrap.py
kkszysiu/restea
0
29799
import flask import restea.formats as formats from restea.adapters.base import ( BaseResourceWrapper, BaseRequestWrapper, ) class FlaskRequestWrapper(BaseRequestWrapper): ''' Object wrapping Flask request context. ''' @property def data(self): ''' Returns a payload sent to...
2.578125
3