max_stars_repo_path
stringlengths
4
237
max_stars_repo_name
stringlengths
6
117
max_stars_count
int64
0
95.2k
id
stringlengths
1
7
content
stringlengths
12
593k
input_ids
listlengths
7
549k
flask_atomic/ext.py
kmjbyrne/flask-kbpc
0
103791
<reponame>kmjbyrne/flask-kbpc from datetime import datetime from flask import Flask from flask import Response from flask import jsonify from flask.json import JSONEncoder from sqlalchemy.orm.collections import InstrumentedList from sqlalchemy_blender import serialize from sqlalchemy_blender import iserialize from h...
[ 1, 529, 276, 1112, 420, 29958, 8848, 29926, 1609, 29878, 484, 29914, 1579, 1278, 29899, 21066, 6739, 13, 3166, 12865, 1053, 12865, 13, 13, 3166, 29784, 1053, 2379, 1278, 13, 3166, 29784, 1053, 13291, 13, 3166, 29784, 1053, 4390, 1598, 1...
chapter7/exercises/EG7-09 get_value investigation 2.py
munnep/begin_to_code_with_python
0
191459
<gh_stars>0 # EG7-09 get_value investigation 2 def get_value(prompt, value_min, value_max): return ride_number=get_value(prompt='Please enter the ride number you want:',value_min=1,value_max=5) print('You have selected ride:',ride_number)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 382, 29954, 29955, 29899, 29900, 29929, 679, 29918, 1767, 22522, 29871, 29906, 13, 1753, 679, 29918, 1767, 29898, 14032, 415, 29892, 995, 29918, 1195, 29892, 995, 29918, 3317, 1125, ...
boned_html/__init__.py
alexgarel/boned-html
0
1608097
<gh_stars>0 from .version import __version__ # noqa: F401 from .boner import HtmlBoner # noqa: F401
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 869, 3259, 1053, 4770, 3259, 1649, 29871, 396, 694, 25621, 29901, 383, 29946, 29900, 29896, 13, 3166, 869, 6718, 261, 1053, 24726, 29933, 265, 261, 29871, 396, 694, 25621, 29901, ...
trainer.py
thedesertm/leapmotion_training_svm
0
18431
import pandas as pd import os from sklearn.svm import SVC from sklearn.preprocessing import StandardScaler from sklearn.metrics import classification_report, confusion_matrix from sklearn.model_selection import train_test_split import pickle BASE_PATH = os.path.join(os.getcwd() , "dataset") df = None i = 0 for file_na...
[ 1, 1053, 11701, 408, 10518, 13, 5215, 2897, 13, 3166, 2071, 19668, 29889, 4501, 29885, 1053, 317, 8257, 13, 3166, 2071, 19668, 29889, 1457, 19170, 1053, 10117, 29636, 261, 13, 3166, 2071, 19668, 29889, 2527, 10817, 1053, 12965, 29918, 122...
pythia/opal/content/KeyboardAttributes.py
willic3/pythia
1
47028
<filename>pythia/opal/content/KeyboardAttributes.py #!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # <NAME> # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {Lic...
[ 1, 529, 9507, 29958, 29886, 1541, 423, 29914, 459, 284, 29914, 3051, 29914, 2558, 3377, 15801, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 13, 29937, 3695, 26594, 26594, 26594, 26594, 26594, 26594, 26594,...
classes/aSimple.py
IMTorgTestCode/testprj_Python_aSimple
0
1617897
<filename>classes/aSimple.py import Animal, Dog, Cat if __name__ == '__main__': print "Hello World!" dogName = raw_input("\nWhat is your dog's name?" ) if dogName: Fido = Dog.Dog(dogName) Fido.getSound() Fluffy = Cat.Cat("Fluffy") Fluffy.getSound()
[ 1, 529, 9507, 29958, 13203, 29914, 29874, 15427, 29889, 2272, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 5215, 22809, 29892, 18776, 29892, 10459, 12, 12, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, 30004, 13, ...
medtrialextractor/formatting/read_annotations.py
juanmoo/MedTrialExtractor
1
41636
<filename>medtrialextractor/formatting/read_annotations.py ''' Read Annotations file and save in struct ''' import pandas as pd import json import codecs import multiprocessing from contextlib import contextmanager # Utils def match_ids_by_filename(ann, struct): fname_to_id = {} for doc_id in pd.unique(ann['...
[ 1, 529, 9507, 29958, 2168, 3626, 744, 486, 28891, 29914, 689, 23980, 29914, 949, 29918, 6735, 800, 29889, 2272, 13, 12008, 13, 6359, 530, 1333, 800, 934, 322, 4078, 297, 2281, 13, 12008, 13, 13, 5215, 11701, 408, 10518, 13, 5215, 4390...
event.py
Wired-Square/homeassistant-twc-director
0
112142
"""The Tesla Wall Charger Director integration.""" import logging from homeassistant.core import HomeAssistant from homeassistant.const import CONF_EVENT, CONF_ID, CONF_DEVICE_ID from twcdirector.device import TWCPeripheral from .const import ( DOMAIN_EVENT ) from .device import ( TWCDeviceEntity ) _LOGGER...
[ 1, 9995, 1576, 323, 267, 433, 14406, 2896, 914, 15944, 13465, 1213, 15945, 13, 5215, 12183, 13, 13, 3166, 3271, 465, 22137, 29889, 3221, 1053, 8778, 7900, 22137, 13, 3166, 3271, 465, 22137, 29889, 3075, 1053, 8707, 29943, 29918, 22240, ...
data_access/qso_data.py
yishayv/lyacorr
2
149840
<filename>data_access/qso_data.py """ Helper classes for encapsulating QSO metadata and spectrum data. """ import astropy.table as table class QSORecord: def __init__(self, index, spec_obj_id, z, ra, dec, plate, mjd, fiber_id, extinction_g): self.index = index self.specObjID = spec_obj_id ...
[ 1, 529, 9507, 29958, 1272, 29918, 5943, 29914, 29939, 578, 29918, 1272, 29889, 2272, 13, 15945, 29908, 13, 10739, 4413, 363, 2094, 2547, 18099, 660, 6156, 15562, 322, 18272, 848, 29889, 13, 15945, 29908, 13, 13, 5215, 8717, 14441, 29889, ...
bin/foldx_tsv.py
allydunham/mutfunc_sars_cov_2
1
148693
<reponame>allydunham/mutfunc_sars_cov_2 #!/usr/bin/env python3 """ Generate overall table of FoldX results across all genes """ import argparse import logging from pathlib import Path def get_template(path, model): """ Identify template for a given model based on the model table """ with open(path, 'r'...
[ 1, 529, 276, 1112, 420, 29958, 635, 29881, 348, 3391, 29914, 6149, 9891, 29918, 29879, 1503, 29918, 24542, 29918, 29906, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 15945, 29908, 13, 5631, 403, 12463, 1591, 310, 383...
grievance/urls.py
AdarshNandanwar/CMS
0
31166
from django.urls import path from django.conf.urls import url from django.urls import path,include import grievance.views as VIEWS from django.conf.urls.static import static from django.conf import settings app_name = 'grievance' urlpatterns =[ # path('', VIEWS.HomeView.as_view()) path('level1/', VIEWS.level1HomeVi...
[ 1, 515, 9557, 29889, 26045, 1053, 2224, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 3166, 9557, 29889, 26045, 1053, 2224, 29892, 2856, 13, 5215, 867, 10384, 749, 29889, 7406, 408, 5473, 29923, 7811, 13, 3166, 9557, 29889, ...
backend/Day.py
tkyaw1/lotus
0
116318
from Block import * """ This is the class for the day view of the journal. Each day will contain multiple blocks """ class Day: def __init__(self): self.blocks = [] self.date = "" #YYYYMMDD self.weather = "" self.heading = "" # not too sure what will populate this ...
[ 1, 515, 15658, 1053, 334, 30004, 13, 30004, 13, 15945, 29908, 910, 338, 278, 770, 363, 278, 2462, 1776, 310, 278, 8955, 29889, 7806, 2462, 674, 1712, 2999, 10930, 30004, 13, 15945, 19451, 13, 1990, 8373, 29901, 30004, 13, 1678, 822, 4...
src/training/experiments_ecfp_linearModel_MLP_only/experiments_ecfp_linearModel_MLP_molnet_NS.py
XieResearchGroup/PLANS
0
174696
from ...models.linear import Linear_S, Linear_M, Linear_L from ..experiment_base import ExperimentBase from ..train_model import ns_linear_teacher_model, ns_linear_student_model from ..train_model import predict_and_mix from ..training_args import LMMixupArgs from ...utils.training_utils import init_model, callback_lis...
[ 1, 515, 2023, 9794, 29889, 10660, 1053, 22985, 29918, 29903, 29892, 22985, 29918, 29924, 29892, 22985, 29918, 29931, 13, 3166, 6317, 735, 15362, 29918, 3188, 1053, 1222, 15362, 5160, 13, 3166, 6317, 14968, 29918, 4299, 1053, 17534, 29918, 1...
bin/nf.genome.py
orionzhou/nf
0
188562
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import os.path as op import sys import pandas as pd import logging #import simplejson as json import yaml from jcvi.apps.base import sh, mkdir def get_gsize(fs): cl = pd.read_csv(fs, sep="\t", header=None, names=['chrom','size']) return sum(cl['size']) ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 2897, 13, 5215, 2897, 29889, 2084, 408, 1015, 13, 5215, 10876, 13, 5215, 11701, 408, 10518, ...
Other groups/Owlolf/Yuuki Yuuna wa Yuusha de Aru Churutto!/churuttoo_06.py
Ichunjo/encode-script
36
133285
"""YuYuYu Churutto script""" # noqa from __future__ import annotations __author__ = 'Vardë' import G41Fun as gf import havsfunc as hvf import lvsfunc as lvf import vardefunc as vdf import xvs from vardautomation import FileInfo, PresetEAC3, PresetWEB from vsutil import depth, get_y from churutto_common import Encod...
[ 1, 9995, 29979, 29884, 29979, 29884, 29979, 29884, 678, 332, 17317, 2471, 15945, 29908, 29871, 396, 694, 25621, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 1649, 8921, 1649, 353, 525, 29963, 538, 30083, 29915, 13, 13, 5215, ...
custom_addons/books_log/models/quotations.py
MonwarAdeeb/Bista_Solutions
0
92870
from odoo import _, api, fields, models class Quotations(models.Model): _inherit = "sale.order" note_on_customer = fields.Text("Note on Customer", help="Add Notes on Customers!")
[ 1, 515, 288, 1867, 29877, 1053, 17117, 7882, 29892, 4235, 29892, 4733, 13, 13, 13, 1990, 751, 327, 800, 29898, 9794, 29889, 3195, 1125, 13, 1678, 903, 262, 27069, 353, 376, 29879, 744, 29889, 2098, 29908, 13, 13, 1678, 4443, 29918, 26...
topicextractor/__init__.py
kjchung495/topicextractor
0
31900
<gh_stars>0 import nltk from nltk.tokenize import word_tokenize #nltk.download('punkt') #nltk.download('averaged_perceptron_tagger') from collections import Counter def extract_noun_counts(doc_list): nouns_pdoc = [] for i in range(len(doc_list)): pos = nltk.pos_tag(nltk.word_tokenize(doc_li...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 302, 1896, 29895, 13, 3166, 302, 1896, 29895, 29889, 6979, 675, 1053, 1734, 29918, 6979, 675, 13, 29937, 29876, 1896, 29895, 29889, 10382, 877, 19294, 1495, 13, 29937, 29876, 1896, ...
StockAndFlowInPython/depreciated/SFD_display_0.py
Rutherford1895/SFD_Canvas
3
54899
<reponame>Rutherford1895/SFD_Canvas import math from tkinter import * # matplotlib.use('TkAgg') from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from StockAndFlowInPython.depreciated.classes import global_model as glbele class SFDCanvas(Frame): def __init__(self, master, stocks, flows, auxs, conn...
[ 1, 529, 276, 1112, 420, 29958, 29934, 14107, 4006, 29896, 29947, 29929, 29945, 29914, 20322, 29928, 29918, 21960, 13, 5215, 5844, 13, 3166, 18883, 1639, 1053, 334, 13, 13, 29937, 22889, 29889, 1509, 877, 29911, 29895, 29909, 1505, 1495, 1...
ingenico/connect/sdk/param_request.py
festicket/connect-sdk-python3
12
194710
<filename>ingenico/connect/sdk/param_request.py class ParamRequest(object): """ Represents a set of request parameters. """ def to_request_parameters(self): """ :return: list[:class:`ingenico.connect.sdk.RequestParam`] representing the HTTP request parameters """ raise N...
[ 1, 529, 9507, 29958, 4289, 1417, 29914, 6915, 29914, 15348, 29914, 3207, 29918, 3827, 29889, 2272, 13, 1990, 12662, 3089, 29898, 3318, 1125, 13, 1678, 9995, 13, 1678, 830, 4569, 1237, 263, 731, 310, 2009, 4128, 29889, 13, 1678, 9995, 13...
scripts/8-pacotes-modulos-python/ex107/teste.py
dev-alissonalves/python-codes
1
110049
import moeda p = float(input("Informe um valor qualquer: ")) print("\n") print("-=-=-=-=- INÍCIO =-=-=-=") print(f"A metade do valor {p:.2f} é: {moeda.metade(p)}") print(f"O dobro do valor {p:.2f} é: {moeda.dobro(p)}") print(f"Aumentando 10%, temos: {moeda.aumentar(p, 10)}") print(f"Diminuindo 10%, temos: {moeda.dim...
[ 1, 1053, 2730, 8710, 13, 29886, 353, 5785, 29898, 2080, 703, 797, 689, 29872, 1922, 16497, 4021, 7808, 29901, 376, 876, 13, 2158, 14182, 29876, 1159, 13, 2158, 703, 29899, 10457, 10457, 10457, 10457, 2672, 30175, 29907, 5971, 353, 29899, ...
transfer_learning/data_handling.py
E-Fumi/VariationalAutoEncoder
1
188939
<filename>transfer_learning/data_handling.py import hyperparameters as hp import tensorflow as tf from tensorflow.keras.preprocessing.image import ImageDataGenerator data_augmenter = ImageDataGenerator( rescale=1.0/255, horizontal_flip=True, rotation_range=25, brightness_range=[0.8, 1.2], ...
[ 1, 529, 9507, 29958, 3286, 571, 29918, 21891, 29914, 1272, 29918, 3179, 1847, 29889, 2272, 13, 5215, 11266, 16744, 408, 298, 29886, 30004, 13, 5215, 26110, 408, 15886, 30004, 13, 3166, 26110, 29889, 3946, 294, 29889, 1457, 19170, 29889, 3...
excel_with_python.py
wahidupal/excel_with_python
1
154158
<reponame>wahidupal/excel_with_python import dash import plotly.express as px import pandas as pd # Data exploration with Pandas #----------------------------- df = pd.read_csv("vgsales.csv") # print(df[:5]) #print(df.iloc[:5, [2,3,5,10]]) # print(df.Genre.nunique()) # print(df.Genre.unique()) # print(sorted(df.Year...
[ 1, 529, 276, 1112, 420, 29958, 29893, 801, 333, 786, 284, 29914, 24633, 29918, 2541, 29918, 4691, 13, 5215, 12569, 13, 5215, 6492, 368, 29889, 17073, 408, 282, 29916, 13, 5215, 11701, 408, 10518, 13, 13, 29937, 3630, 3902, 12418, 411, ...
src/systemmanager.py
WinterLicht/Chaos-Projectile
59
149276
<filename>src/systemmanager.py """ .. module:: systemmanager :Platform: Unix, Windows :Synopsis: system manager contains all game systems. """ import rendersystem import collisionsystem import inputsystem import animationsystem import combatsystem import statesystem import soundsystem class SystemManager(objec...
[ 1, 529, 9507, 29958, 4351, 29914, 5205, 12847, 29889, 2272, 13, 15945, 29908, 13, 636, 3883, 1057, 1788, 12847, 13, 259, 584, 21889, 29901, 26663, 29892, 3852, 13, 259, 584, 29216, 15368, 29901, 1788, 8455, 3743, 599, 3748, 6757, 29889, ...
desktop/core/ext-py/SQLAlchemy-1.3.16/examples/elementtree/optimized_al.py
e11it/hue-1
2
152222
"""Uses the same strategy as ``adjacency_list.py``, but associates each DOM row with its owning document row, so that a full document of DOM nodes can be loaded using O(1) queries - the construction of the "hierarchy" is performed after the load in a non-recursive fashion and is more efficient. """ # PART...
[ 1, 9995, 15922, 267, 278, 1021, 13705, 408, 13, 29871, 4954, 26859, 562, 3819, 29918, 1761, 29889, 2272, 29952, 1673, 541, 4067, 1078, 1269, 259, 12369, 1948, 411, 967, 8152, 1076, 13, 29871, 1842, 1948, 29892, 577, 393, 263, 2989, 1842...
sem/features/arityfeatures.py
YoannDupont/SEM
22
165125
<filename>sem/features/arityfeatures.py<gh_stars>10-100 # -*- coding: utf-8 -*- """ file: arityfeatures.py Description: features that could not be categorized and are thus defined by the number of arguments they take (their arity). author: <NAME> MIT License Copyright (c) 2018 <NAME> Permission is hereby granted,...
[ 1, 529, 9507, 29958, 12846, 29914, 22100, 29914, 279, 537, 22100, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899...
src/platforms/platform_abs.py
Brickyblossom/DT2021
1
155766
<filename>src/platforms/platform_abs.py<gh_stars>1-10 '''Abstract class for platform''' from abc import ABC from typing import Dict import disnake from src import cfg class PlatForm(ABC): '''Abstract base class for a platform''' RANKCOLOR = {} PLATFORM_NAME = "Nothing" HANDLE_FILE_NAME = "/abc" def...
[ 1, 529, 9507, 29958, 4351, 29914, 12120, 29879, 29914, 12120, 29918, 6897, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 12008, 9118, 770, 363, 7481, 12008, 13, 3166, 25638, 1053, 16417, 13, 3166, 19229...
Image_detection_codes/Keras_training/test2.py
pasadyash/CitizenServiceApp
0
12732
import numpy as np np.random.seed(123) # for reproducibility from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.utils import np_utils from dataset_pothole import pothole from keras.models import model_from_j...
[ 1, 1053, 12655, 408, 7442, 13, 9302, 29889, 8172, 29889, 26776, 29898, 29896, 29906, 29941, 29897, 29871, 396, 363, 9483, 455, 29890, 1793, 13, 29871, 13, 3166, 13023, 294, 29889, 9794, 1053, 922, 339, 2556, 13, 3166, 13023, 294, 29889, ...
pulse2percept/datasets/tests/test_nanduri2012.py
narenberg/pulse2percept
40
29857
<reponame>narenberg/pulse2percept import pandas as pd import numpy.testing as npt from pulse2percept.datasets import load_nanduri2012 def test_load_nanduri2012(): data = load_nanduri2012(shuffle=False) npt.assert_equal(isinstance(data, pd.DataFrame), True) columns = ['subject', 'implant', 'electrode', '...
[ 1, 529, 276, 1112, 420, 29958, 29876, 8326, 2552, 29914, 29886, 19994, 29906, 546, 1547, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 29889, 13424, 408, 302, 415, 13, 13, 3166, 9505, 344, 29906, 546, 1547, 29889, 14538, 1691, 1053, 225...
src/notelist/schemas/search.py
jajimenez/notelist
1
114418
<gh_stars>1-10 """Search schemas module.""" from marshmallow import Schema from marshmallow.fields import Str from marshmallow.validate import Length class SearchSchema(Schema): """Search schema.""" search = Str( validate=Length(min=2, max=200), required=True, error_messages={"requir...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 7974, 1364, 8609, 3883, 1213, 15945, 13, 13, 3166, 1766, 845, 29885, 9536, 1053, 1102, 2603, 13, 3166, 1766, 845, 29885, 9536, 29889, 9621, 1053, 3767, ...
test/test_notification_target_api.py
chbndrhnns/ahoi-client
0
186576
# coding: utf-8 """ [AHOI cookbook](/ahoi/docs/cookbook/index.html) [Data Privacy](/sandboxmanager/#/privacy) [Terms of Service](/sandboxmanager/#/terms) [Imprint](https://sparkassen-hub.com/impressum/) &copy; 2016&dash;2017 Starfinanz - Ein Unternehmen der Finanz Informatik # noqa: E501 OpenAPI sp...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 15945, 29908, 13, 268, 13, 13, 1678, 518, 29909, 8187, 29902, 7984, 2909, 26909, 801, 7768, 29914, 2640, 29914, 15108, 2909, 29914, 2248, 29889, 1420, 29897, 29871, 518, 1469, 18936, 4135...
internetradio.py
pathakraul/internetradio-client
0
116085
<reponame>pathakraul/internetradio-client #!/usr/bin/python # Internet Radio Client using Shoutcast service # to search and play random channels with genre search # Usage ./internetradio.py --genre <GENRE> import os import logging import argparse import requests as rq import xml.etree.ElementTree as et #-----------...
[ 1, 529, 276, 1112, 420, 29958, 2084, 557, 336, 352, 29914, 14168, 300, 13399, 29899, 4645, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 29937, 4685, 9204, 12477, 773, 1383, 449, 4384, 2669, 13, 29937, 304, 2740, 322, 1708, ...
larpWikiAnomalyScanner.py
AllanWegan/larpWikiAnomalyScanner
0
46081
#!/usr/bin/env python3 import time import re import glob import os import platform import sys import unicodedata import urllib.parse import codecs import queue from multiprocessing import Process, Event, Queue from collections import Counter baseDir = os.path.dirname(__file__) sourceDir = os.path.join(baseDir, 'back...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 931, 13, 5215, 337, 13, 5215, 13149, 13, 5215, 2897, 13, 5215, 7481, 13, 5215, 10876, 13, 5215, 443, 293, 6797, 532, 13, 5215, 3142, 1982, 29889, 5510, 13, 5215, 7...
discord/ext/vbu/cogs/utils/converters/filtered_user.py
6days9weeks/Novus
2
17850
from discord.ext import commands class FilteredUser(commands.UserConverter): """ A simple :class:`discord.ext.commands.UserConverter` that doesn't allow bots or the author to be passed into the function. """ def __init__(self, *, allow_author: bool = False, allow_bots: bool = False): supe...
[ 1, 515, 2313, 536, 29889, 1062, 1053, 8260, 13, 13, 13, 1990, 19916, 287, 2659, 29898, 26381, 29889, 2659, 18545, 1125, 13, 1678, 9995, 13, 1678, 319, 2560, 584, 1990, 18078, 2218, 16090, 29889, 1062, 29889, 26381, 29889, 2659, 18545, 2...
fold_cur_trans.py
lucasforever24/arcface_noonan
0
5358
import cv2 from PIL import Image import argparse from pathlib import Path from multiprocessing import Process, Pipe,Value,Array import torch from config import get_config from mtcnn import MTCNN from Learner_trans_tf import face_learner from utils import load_facebank, draw_box_name, prepare_facebank, save_label_score,...
[ 1, 1053, 13850, 29906, 13, 3166, 349, 6227, 1053, 7084, 13, 5215, 1852, 5510, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 6674, 307, 985, 292, 1053, 10554, 29892, 7362, 412, 29892, 1917, 29892, 2588, 13, 5215, 4842, 305, 13, 3166, 22...
hood/urls.py
wadi-1000/Vicinity
0
3242
<reponame>wadi-1000/Vicinity from django.urls import path,include from . import views urlpatterns = [ path('home/', views.home, name = 'home'), path('add_hood/',views.uploadNeighbourhood, name = 'add_hood'), path('viewhood/',views.viewHood, name = 'viewhood'), path('hood/<int:pk>/',views.hood, name = '...
[ 1, 529, 276, 1112, 420, 29958, 29893, 10129, 29899, 29896, 29900, 29900, 29900, 29914, 29963, 293, 13593, 13, 3166, 9557, 29889, 26045, 1053, 2224, 29892, 2856, 13, 3166, 869, 1053, 8386, 13, 13, 2271, 11037, 29879, 353, 518, 13, 1678, ...
setup.py
jacobschaer/qt_compat
0
13246
<filename>setup.py<gh_stars>0 from setuptools import setup, find_packages setup( name="QtCompat", version="0.1", packages=find_packages(), scripts=[], # Project uses reStructuredText, so ensure that the docutils get # installed or upgraded on the target machine install_requires=[], pac...
[ 1, 529, 9507, 29958, 14669, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 14669, 29898, 13, 1678, 1024, 543, 17303, 14644, 613, 13, 1678, 1873, 543, 29900,...
examples/simple_example.py
alexkyllo/torch-wtte
1
100975
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.11.4 # kernelspec: # display_name: wtte-dev # language: python # name: wtte-dev # --- # %% [markdown] # # WTTE-RNN in PyTorch # # <NAME> ...
[ 1, 396, 11474, 13, 29937, 432, 786, 25547, 29901, 13, 29937, 259, 432, 786, 29891, 726, 29901, 13, 29937, 268, 1426, 29918, 276, 26081, 29901, 13, 29937, 539, 6081, 29901, 869, 2272, 13, 29937, 539, 3402, 29918, 978, 29901, 10151, 13, ...
tests/test_solver/test_sensitivities.py
dbankmann/python-mloc
0
118749
<reponame>dbankmann/python-mloc # # Copyright (c) 2019-2020 # # @author: <NAME> # @company: Technische Universität Berlin # # This file is part of the python package pymloc # (see https://gitlab.tubit.tu-berlin.de/bankmann91/python-mloc ) # # License: 3-clause BSD, see https://opensource.org/licenses/BSD-3-Clause # fro...
[ 1, 529, 276, 1112, 420, 29958, 2585, 804, 4403, 29914, 4691, 29899, 29885, 2029, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29929, 29899, 29906, 29900, 29906, 29900, 13, 29937, 13, 29937, 732, 8921, ...
tests/test_node.py
flipcoder/qork
3
168303
#!/usr/bin/env pytest import pytest import sys sys.path.append("..") from glm import vec3 from qork.util import * from qork.node import Node from qork.minimal import MinimalCore from qork.util import walk def test_node(): world = Node() # move/position assert fcmp(world.position, vec3(0)) world.mov...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 11451, 1688, 13, 5215, 11451, 1688, 13, 5215, 10876, 13, 13, 9675, 29889, 2084, 29889, 4397, 703, 636, 1159, 13, 13, 3166, 3144, 29885, 1053, 9649, 29941, 13, 3166, 3855, 548, 29889, 4422, 1053,...
Media/common/Build/build_assets.py
dmacka/MultiverseClientServer
5
149341
import sha import time from patch_tool import * def add_assets(asset_tree): asset_tree.add_ignore("mv.patch") asset_tree.add_ignore("mv.patch.cur") # Directories for main assets asset_tree.add_asset_path("Base", "Fonts") asset_tree.add_asset_path("Base", "GpuPrograms") asset_tree.add_asset_pa...
[ 1, 1053, 528, 29874, 13, 5215, 931, 13, 13, 3166, 13261, 29918, 10154, 1053, 334, 13, 13, 1753, 788, 29918, 16596, 29898, 24129, 29918, 8336, 1125, 13, 1678, 24342, 29918, 8336, 29889, 1202, 29918, 17281, 703, 29324, 29889, 5041, 1159, ...
Easy/1018-binary-prefix-divisible-by-5.py
sandychn/LeetCode-Solutions
0
94899
<gh_stars>0 class Solution: def prefixesDivBy5(self, A: List[int]) -> List[bool]: val = 0 res = [None] * len(A) for i, v in enumerate(A): val = ((val << 1) + v) % 5 res[i] = (val == 0) return res
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1990, 24380, 29901, 30004, 13, 1678, 822, 10944, 267, 12596, 2059, 29945, 29898, 1311, 29892, 319, 29901, 2391, 29961, 524, 2314, 1599, 2391, 29961, 11227, 5387, 30004, 13, 4706, 659, 353...
attributes_and_methods/lab/project/hotel.py
BoyanPeychinov/object_oriented_programming
0
1610794
<reponame>BoyanPeychinov/object_oriented_programming class Hotel: def __init__(self, name): self.name = name self.rooms = [] self.guests = 0 @staticmethod def find_room(rooms, room_number): return list(filter(lambda room: room.number == room_number, rooms))[0] @classmet...
[ 1, 529, 276, 1112, 420, 29958, 8431, 10094, 29925, 1032, 24338, 586, 29914, 3318, 29918, 12236, 287, 29918, 28426, 13, 1990, 16923, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1024, 1125, 13, 4706, 1583, 29889, 978, 353, 1024, ...
day2/demo1.py
PickHeBin/2020-2-25
0
125620
#!/usr/bin/env python # -*- coding: utf-8 -*- # File : demo1.py # Author: MuNian # Date : 2020-01-08 ''' Python爬虫假装浏览器 ''' import requests proxie = { 'http':'http://localhost:5555/random' } print(proxie) url = 'https://www.baidu.com' response = requests.get(url, proxies=proxie) print(response)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3497, 29871, 584, 13455, 29896, 29889, 2272, 13, 29937, 13361, 29901, 8229, 29940, 713, 13, 29937...
libcst/codemod/tests/test_codemod_cli.py
lpetre/LibCST
2
142100
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # import subprocess import sys from pathlib import Path from libcst.testing.utils import UnitTest class TestCodemodCLI(UnitTest): def ...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 13327, 29892, 9266, 29889, 322, 967, 23736, 1078, 29889, 13, 29937, 13, 29937, 910, 2752, 775, 338, 7794, 21144, 1090, 278, 341, 1806, 19405, 1476, 297, 278, 13, 29937, 365, 2965, 1430, 1660, 934,...
lib/bes/text/text_fit.py
reconstruir/bes
0
51321
<gh_stars>0 #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- from .string_lexer import string_lexer as lexer from bes.compat.StringIO import StringIO class text_fit(object): 'Fit text into bounded areas keeping words intact.' @classmethod def fit_text(clazz, text, widt...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 29899, 29930, 29899, 14137, 29901, 9420, 29899, 29947, 29936, 4464, 29901, 4691, 29936, 29536, 29899, 21175, 29899, 8513, 29901, 4263, 29936, 274, 29899, 16121, 29899, 10289, 29901, 29...
reverse-string/reverse_string.py
Kalpavrikshika/Exercism-tests
0
77619
<filename>reverse-string/reverse_string.py def reverse(input): #reverse as string return input[::-1] #An alternative approach I wass using - string to list '''myinput = input mylist = list(myinput) #print (mylist) mylist.reverse() return (mylist)''' '''while True: if inpu...
[ 1, 529, 9507, 29958, 24244, 29899, 1807, 29914, 24244, 29918, 1807, 29889, 2272, 13, 13, 1753, 11837, 29898, 2080, 1125, 13, 268, 13, 1678, 396, 24244, 408, 1347, 13, 1678, 736, 1881, 29961, 1057, 29899, 29896, 29962, 13, 13, 29937, 274...
subparsers/list_custom_images.py
dman777/image_share
1
59033
<reponame>dman777/image_share # List custom images def list_custom_images_subparser(subparser): list_images = subparser.add_parser( 'list-custom-images', description=('***List custom' ' ...
[ 1, 529, 276, 1112, 420, 29958, 29881, 1171, 29955, 29955, 29955, 29914, 3027, 29918, 13653, 13, 29937, 2391, 2888, 4558, 13, 1753, 1051, 29918, 6341, 29918, 8346, 29918, 1491, 16680, 29898, 1491, 16680, 1125, 13, 1678, 1051, 29918, 8346, ...
python/ack.py
catseye/Dipple
5
42633
#!/usr/bin/env python import sys def ack(m, n): if m == 0: return n + 1 elif n == 0: return ack(m-1, 1) else: return ack(m-1, ack(m, n-1)) sys.setrecursionlimit(12000) for m in range(0, 4): for n in range(0, 10): print "ack(%s,%s)=%s" % (m, n, ack(m, n)) m = 4 n = 0 print ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 10876, 13, 13, 1753, 263, 384, 29898, 29885, 29892, 302, 1125, 13, 1678, 565, 286, 1275, 29871, 29900, 29901, 13, 4706, 736, 302, 718, 29871, 29896, 13, 1678, 25342, 302, 1...
src/Diagnostics.AIProjects/SearchAPI/SearchModule/TfIdfSearchModel.py
yiningwei/Azure-AppServices-Diagnostics
0
86060
<reponame>yiningwei/Azure-AppServices-Diagnostics<filename>src/Diagnostics.AIProjects/SearchAPI/SearchModule/TfIdfSearchModel.py import json, os from SearchModule.ModelInfo import ModelInfo from SearchModule.TokenizerModule import getAllNGrams from gensim.models import TfidfModel from gensim import corpora, similaritie...
[ 1, 529, 276, 1112, 420, 29958, 29891, 2827, 26599, 29914, 28413, 29899, 2052, 13779, 29899, 12130, 20921, 29966, 9507, 29958, 4351, 29914, 12130, 20921, 29889, 23869, 25119, 29914, 7974, 8787, 29914, 7974, 7355, 29914, 29911, 29888, 1204, 298...
python/errnames.py
amirgeva/redrobot
1
123789
<gh_stars>1-10 import errno def get_error_name(e): if e==errno.EPERM: return 'Operation not permitted' if e==errno.ENOENT: return 'No such file or directory' if e==errno.ESRCH: return 'No such process' if e==errno.EINTR: return 'Interrupted system call' if e==errno.E...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4589, 1217, 13, 13, 1753, 679, 29918, 2704, 29918, 978, 29898, 29872, 1125, 13, 1678, 565, 321, 1360, 3127, 1217, 29889, 29923, 13171, 29924, 29901, 13, 4706, ...
bin/calc_post_prob_codivergence.py
phyletica/gekgo
1
196643
<filename>bin/calc_post_prob_codivergence.py #! /usr/bin/env python """ Calculate the posterior probability that the Gekko pairs Panay-Masbate and Sabtang-Batan co-diverged. """ import os import sys import glob import logging import gekgo_util import pycoevolity _LOG = gekgo_util.RunLogger(name=__file__, l...
[ 1, 529, 9507, 29958, 2109, 29914, 28667, 29918, 2490, 29918, 22795, 29918, 19284, 2147, 10238, 29889, 2272, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 15945, 29908, 13, 27065, 403, 278, 13446, 6976, 393, 278, 402...
python/after/banking/controller.py
vritb/command-pattern-undo-redo
5
98853
from dataclasses import dataclass, field from banking.transaction import Transaction @dataclass class BankController: undo_stack: list[Transaction] = field(default_factory=list) redo_stack: list[Transaction] = field(default_factory=list) def execute(self, transaction: Transaction) -> None: trans...
[ 1, 515, 848, 13203, 1053, 848, 1990, 29892, 1746, 13, 13, 3166, 9124, 292, 29889, 20736, 1053, 4103, 2467, 13, 13, 13, 29992, 1272, 1990, 13, 1990, 10253, 2956, 29901, 13, 1678, 563, 29877, 29918, 1429, 29901, 1051, 29961, 12460, 29962,...
data/tools/replay/ui.py
ASGuard-UCI/ld-metric
0
66438
<gh_stars>0 #!/usr/bin/env python import argparse import os import sys os.environ["OMP_NUM_THREADS"] = "1" import cv2 import numpy as np import pygame import zmq from common.basedir import BASEDIR from common.transformations.camera import FULL_FRAME_SIZE, eon_intrinsics from common.transformations.model import (MODE...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 5215, 1852, 5510, 13, 5215, 2897, 13, 5215, 10876, 13, 13, 359, 29889, 21813, 3366, 29949, 3580, 29918, 13967, 29918, 4690, 16310, ...
ecom/prep.py
leocnj/ecom-rakuten
23
150223
<reponame>leocnj/ecom-rakuten #!/usr/bin/env python from . import data, vocab import collections import pandas as pd from sklearn.model_selection import train_test_split def char_encoder(items): freq = collections.Counter(ch for item in items for ch in item) itos = [o for o, c in freq.most_common() if c >=...
[ 1, 529, 276, 1112, 420, 29958, 280, 542, 29876, 29926, 29914, 29872, 510, 29899, 4442, 6935, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 3166, 869, 1053, 848, 29892, 7931, 370, 13, 13, 5215, 16250, 13, 5215, 11701, ...
tests/r/test_utilities2.py
hajime9652/observations
199
97811
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.utilities2 import utilities2 def test_utilities2(): """Test module utilities2.py by downloading utilities2.csv and testing shape of extrac...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 13, 5215, 528, 4422, 13, 5215, 10876, 13, 5215, 5694, 1445, 13, 1...
log/image_log.py
HELLORPG/GraduationProjec
1
1613475
""" 该文件中包括了一些图像输出的调试信息 例如,输出生成图像和原始图像的对比等等 """ import matplotlib.pyplot as plt import torchvision.transforms as transforms import log.tb_log as tb_log import torchvision.utils from config.trecgnet_config import TRECGNET_CONFIG import os class ImageLog: def __init__(self): return @classmethod de...
[ 1, 9995, 13, 31751, 30333, 30631, 30275, 31473, 233, 142, 175, 30743, 30287, 31959, 30861, 31551, 31573, 30544, 30210, 31268, 31787, 30689, 31021, 13, 31507, 30847, 30214, 31573, 30544, 30486, 30494, 30861, 31551, 30503, 30667, 31020, 30861, ...
Store/Store/settings/dev.py
BreezeDawn/DjangoStore
0
135493
""" Django settings for Store project. Generated by 'django-admin startproject' using Django 1.11.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import date...
[ 1, 9995, 13, 29928, 5364, 6055, 363, 14491, 2060, 29889, 13, 13, 24565, 491, 525, 14095, 29899, 6406, 1369, 4836, 29915, 773, 15337, 29871, 29896, 29889, 29896, 29896, 29889, 29896, 29896, 29889, 13, 13, 2831, 901, 2472, 373, 445, 934, ...
web_app/services/bascilica_services2.py
worldwidekatie/flask_app
0
86464
import basilica import os from dotenv import load_dotenv load_dotenv() BASCILICA_API_KEY=os.getenv("BASCILICA_API_KEY", default="oops") sentences = [ "This is a sentence!", "This is a similar sentence!", "I don't think this sentence is very similar at all...", ] with basilica.Connection(BASCILICA_API_KEY)...
[ 1, 1053, 2362, 309, 983, 13, 13, 5215, 2897, 13, 3166, 8329, 6272, 1053, 2254, 29918, 6333, 6272, 13, 1359, 29918, 6333, 6272, 580, 13, 13, 29933, 28599, 6227, 2965, 29909, 29918, 8787, 29918, 10818, 29922, 359, 29889, 657, 6272, 703, ...
proj4/part2/train.py
chengxuxin/CS194_projects
0
148717
import os import time import cv2 import matplotlib.pyplot as plt import numpy as np import png import torch import torch.nn as nn import torch.optim as optim import torchvision from colormap.colors import Color, hex2rgb from sklearn.metrics import average_precision_score as ap_score from torch.utils.data import DataLo...
[ 1, 1053, 2897, 13, 5215, 931, 13, 13, 5215, 13850, 29906, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 5215, 12655, 408, 7442, 13, 5215, 282, 865, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5...
cadet_app/views/text.py
standoff-nlp/cadet
0
125472
<gh_stars>0 from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth import authenticate, login, logout from django.contrib import messages from django.contrib.admin.views.decorators import staff_member_requi...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29892, 679, 29918, 3318, 29918, 272, 29918, 29946, 29900, 29946, 29892, 6684, 13, 3166, 9557, 29889, 21570, 29889, 5150, 29889, 19557, 409...
chromium/tools/telemetry/telemetry/internal/image_processing/video.py
wedataintelligence/vivaldi-source
925
12138
<gh_stars>100-1000 # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import subprocess from catapult_base import cloud_storage from telemetry.core import platform from telemetry.util import image_util from ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29946, 450, 678, 456, 1974, 13189, 943, 29889, 2178, 10462, 21676, 29889, 13, 29937, 4803, 3...
standards/_dev_/regex.py
CambridgeSemiticsLab/nena_data
3
190153
""" version 0.04 beta This module contains standard regex patterns and functions for handling strings in the NENA text corpus. """ import unicodedata def normalize_string(string): """Normalize string for tokenization and matching. Characters can come in composed or decomposed varieties. We normaliz...
[ 1, 9995, 13, 3259, 29871, 29900, 29889, 29900, 29946, 21762, 13, 13, 4013, 3883, 3743, 3918, 6528, 15038, 322, 3168, 363, 29871, 13, 3179, 1847, 6031, 297, 278, 405, 1430, 29909, 1426, 1034, 13364, 29889, 13, 15945, 29908, 13, 13, 5215,...
PP4E/Examples/PP4E/Gui/Intro/defaults.py
BeacherHou/Python-_Markdown-
0
1612553
def simple(): spam = 'ni' def action(): print(spam) # name maps to enclosing function return action act = simple() # make and return nested function act() # then call it: prints 'ni' def normal(): def action(): return spam ...
[ 1, 822, 2560, 7295, 30004, 13, 1678, 805, 314, 353, 525, 1240, 29915, 30004, 13, 1678, 822, 3158, 7295, 30004, 13, 4706, 1596, 29898, 1028, 314, 29897, 308, 396, 1024, 11053, 304, 427, 11291, 292, 740, 30004, 13, 1678, 736, 3158, 3000...
nq_eval.py
Franck-Dernoncourt/natural-questions
0
78415
<reponame>Franck-Dernoncourt/natural-questions<filename>nq_eval.py # coding=utf-8 # Copyright 2018 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 # # ...
[ 1, 529, 276, 1112, 420, 29958, 7675, 384, 29899, 29928, 824, 24746, 14316, 29914, 25047, 29899, 2619, 29966, 9507, 29958, 29876, 29939, 29918, 14513, 29889, 2272, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 29871, 2...
examples/matmul/matmul_automatic.py
UTexas-PSAAP/Parla.py
0
142453
""" Multi-device matrix multiplication using parla with cupy as the kernel engine. """ import sys import time import numpy as np import cupy as cp from parla import Parla, get_all_devices from parla.array import copy, clone_here from parla.cpu import cpu from parla.cuda import gpu from parla.function_decorators impo...
[ 1, 9995, 13, 15329, 29899, 10141, 4636, 21666, 773, 610, 433, 411, 18002, 29891, 408, 278, 8466, 6012, 29889, 13, 13, 15945, 29908, 13, 5215, 10876, 13, 5215, 931, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 18002, 29891, 408, 21447, 13...
components/elm/src/external_models/fates/functional_unit_testing/hydro/HydroUTestDriver.py
meng630/GMD_E3SM_SCM
0
113703
<filename>components/elm/src/external_models/fates/functional_unit_testing/hydro/HydroUTestDriver.py # ======================================================================================= # # For usage: $python HydroUTestDriver.py --help # # This script runs unit tests on the hydraulics functions. # # # ============...
[ 1, 529, 9507, 29958, 14036, 29914, 16422, 29914, 4351, 29914, 23176, 29918, 9794, 29914, 29888, 1078, 29914, 2220, 284, 29918, 5441, 29918, 13424, 29914, 29882, 11279, 29914, 29950, 11279, 2692, 342, 12376, 29889, 2272, 13, 29937, 1275, 9166,...
viz/view.py
LynnHongLiu/replayed_distillation
79
138465
import numpy as np import cv2 # This file is a set of commonly used functions by the viz scripts. It # is not meant to be run on its own def unblockshaped(arr, h, w, rgb=False): if rgb: n, nrows, ncols, nchannels = arr.shape return (arr.reshape(h//nrows, -1, nrows, ncols, nchannels) ...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 13850, 29906, 13, 13, 29937, 910, 934, 338, 263, 731, 310, 15574, 1304, 3168, 491, 278, 25294, 12078, 29889, 739, 13, 29937, 338, 451, 6839, 304, 367, 1065, 373, 967, 1914, 13, 13, 1753, 443, 127...
mplcyberpunk/__init__.py
story645/mplcyberpunk
1
102596
"""mplcyberpunk - A new Python package""" __version__ = '0.1.0' __author__ = '<NAME> <<EMAIL>>' __all__ = [] import matplotlib as mpl import pkg_resources from .core import add_glow_effects, make_lines_glow, add_underglow # register the included stylesheet in the mpl style library data_path = pkg_resources.resourc...
[ 1, 9995, 29885, 572, 1270, 495, 29886, 2960, 448, 319, 716, 5132, 3577, 15945, 29908, 13, 13, 1649, 3259, 1649, 353, 525, 29900, 29889, 29896, 29889, 29900, 29915, 13, 1649, 8921, 1649, 353, 12801, 5813, 29958, 3532, 26862, 6227, 6778, ...
example/simple.py
xiaodongxiexie/log2db
1
153393
# -*- coding: utf-8 -*- # @Author: xiaodong # @Date : 2021/4/17 import logging from log2db import init, Proxy, LoggingMQHandler Proxy.DBURL = "sqlite:///{}".format("mylogger.db") _ = init() logger = logging.getLogger("log2db") logger.parent = None handler = LoggingMQHandler(logging.INFO) logger.addHandler(handler...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 732, 13720, 29901, 921, 423, 397, 549, 13, 29937, 732, 2539, 29871, 584, 29871, 29906, 29900, 29906, 29896, 29914, 29946, 29914, 29896, 29955, 13, ...
scanner3d/metrics/__init__.py
Belval/Scanner3D
1
184192
<reponame>Belval/Scanner3D """ Raise classes to top-level """ from .base_metric import BaseMetric from .fitness import Fitness from .rmse import RMSE
[ 1, 529, 276, 1112, 420, 29958, 21140, 791, 29914, 4421, 7310, 29941, 29928, 13, 15945, 29908, 13, 29934, 29874, 895, 4413, 304, 2246, 29899, 5563, 13, 15945, 29908, 13, 13, 3166, 869, 3188, 29918, 16414, 1053, 7399, 10095, 2200, 13, 316...
complex_performance_metrics/solvers/multiclass/coco_qmean_nae.py
hnarasimhan/constrained-classification
9
118432
import numpy as np from copy import copy from complex_performance_metrics.models.plugin import MulticlassPluginClassifier from complex_performance_metrics.utils import nae """ This module implements the COCO algorithm for: minimizing the (multiclass) Q-mean loss subject to (multiclass) Normalized Absolute Error ...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 3509, 1053, 3509, 13, 3166, 4280, 29918, 546, 13390, 29918, 2527, 10817, 29889, 9794, 29889, 8582, 1053, 9683, 293, 605, 16288, 2385, 3709, 13, 3166, 4280, 29918, 546, 13390, 29918, 2527, 10817, 29889,...
pip_packages/setup.py
Stonepia/model-gardens
0
82037
## Modified from https://github.com/tensorflow/models/blob/master/official/pip_package/setup.py """Sets up TensorFlow Official Models.""" import datetime import os import sys from setuptools import find_packages from setuptools import setup version = '2.5.0' project_name = 'tf-models-official' long_description = "...
[ 1, 444, 3382, 2164, 515, 2045, 597, 3292, 29889, 510, 29914, 29056, 29914, 9794, 29914, 10054, 29914, 6207, 29914, 29877, 7880, 29914, 13096, 29918, 5113, 29914, 14669, 29889, 2272, 13, 13, 15945, 29908, 29903, 1691, 701, 323, 6073, 17907, ...
gorillabot/plugins/connection.py
pep7/GorillaBot
21
164254
# Copyright (c) 2013-2016 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software # and associated documentation files (the "Software"), to deal in the Software without # restriction, including without limitation the rights to use, copy, modify, merge, publish, # distrib...
[ 1, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29941, 29899, 29906, 29900, 29896, 29953, 529, 5813, 29958, 13, 29937, 13, 29937, 20894, 2333, 338, 1244, 1609, 16896, 29892, 3889, 310, 8323, 29892, 304, 738, 2022, 4017, ...
data/databases/create_dataset_from_mongodb_collection.py
james94/driverlessai-recipes
194
129527
"""Create dataset from MonogDB""" # Author: <NAME> # Created: 31/01/2020 # Last Updated: 20/02/2020 import datatable as dt import pandas as pd from h2oaicore.data import CustomData _global_modules_needed_by_name = ["pymongo", "dnspython"] # Please fill before usage # Note that this information is logged in Driverle...
[ 1, 9995, 4391, 8783, 515, 2598, 468, 4051, 15945, 29908, 13, 13, 29937, 13361, 29901, 529, 5813, 29958, 13, 29937, 6760, 630, 29901, 29871, 29941, 29896, 29914, 29900, 29896, 29914, 29906, 29900, 29906, 29900, 13, 29937, 9208, 25723, 29901,...
records/urls.py
Glucemy/Glucemy-back
0
9680
from rest_framework.routers import DefaultRouter from records.views import RecordViewSet router = DefaultRouter() router.register('', RecordViewSet, basename='records') urlpatterns = router.urls
[ 1, 515, 1791, 29918, 4468, 29889, 27537, 2153, 1053, 13109, 23971, 13, 13, 3166, 6475, 29889, 7406, 1053, 14164, 1043, 2697, 13, 13, 15140, 353, 13109, 23971, 580, 13, 15140, 29889, 9573, 877, 742, 14164, 1043, 2697, 29892, 2362, 3871, ...
src/sage/modules/module_functors.py
bopopescu/sage
1,742
160594
""" Module Functors AUTHORS: - <NAME> (2017-10): Initial implementation of :class:`QuotientModuleFunctor` """ #***************************************************************************** # Copyright (C) 2017 <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it unde...
[ 1, 9995, 13, 7355, 13811, 14359, 13, 13, 20656, 29950, 24125, 29901, 13, 13, 29899, 529, 5813, 29958, 313, 29906, 29900, 29896, 29955, 29899, 29896, 29900, 1125, 17250, 5314, 310, 13, 29871, 584, 1990, 18078, 2182, 327, 993, 7355, 25394, ...
SAC2018/SAC.py
Wen2chao/RL-Algorithm-
19
192737
<reponame>Wen2chao/RL-Algorithm- import gym import torch import random import torch.nn as nn import collections import numpy as np import torch.nn.functional as F import torch.optim as optim import matplotlib.pyplot as plt from torch.distributions import Normal class ReplayBeffer(): def __init__(self...
[ 1, 529, 276, 1112, 420, 29958, 29956, 264, 29906, 5815, 29877, 29914, 2241, 29899, 22461, 4540, 29899, 13, 5215, 330, 962, 30004, 13, 5215, 4842, 305, 30004, 13, 5215, 4036, 30004, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 300...
hera_notebook_templates/utils_h1c.py
HERA-Team/hera_notebook_templates
0
125478
<filename>hera_notebook_templates/utils_h1c.py # -*- coding: utf-8 -*- # Copyright 2020 the HERA Project # Licensed under the MIT License import matplotlib import matplotlib.pyplot as plt from matplotlib.ticker import FormatStrFormatter import matplotlib.patches as mpatches import matplotlib.gridspec as gridspec impor...
[ 1, 529, 9507, 29958, 29882, 1572, 29918, 1333, 19273, 29918, 20943, 29914, 13239, 29918, 29882, 29896, 29883, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 14187, 1266, 29871, 2990...
my_drawing/my_drawing.py
steven3614/MystanCodeprojects
0
149831
<filename>my_drawing/my_drawing.py<gh_stars>0 """ File: my_drawing Name: 張文銓 ---------------------- TODO: This function is my drawing about the famous show "squid game" including the killer and the invitation card in the story. """ from campy.graphics.gobjects import GOval, GRect, GLabel from campy.graphics.gwindow i...
[ 1, 529, 9507, 29958, 1357, 29918, 4012, 292, 29914, 1357, 29918, 4012, 292, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 2283, 29901, 590, 29918, 4012, 292, 13, 1170, 29901, 29871, 31504, 30333, 236, 14...
src/predectorutils/analyses/localizer.py
ccdmb/predector-utils
0
71913
<filename>src/predectorutils/analyses/localizer.py #!/usr/bin/env python3 import re from typing import Optional from typing import TextIO from typing import Iterator from typing import Tuple from predectorutils.higher import fmap from predectorutils.gff import GFFRecord, GFFAttributes, Strand from predectorutils.anal...
[ 1, 529, 9507, 29958, 4351, 29914, 1457, 311, 2801, 13239, 29914, 7054, 952, 267, 29914, 2997, 3950, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 337, 13, 3166, 19229, 1053, 28379, 13, 3166, 1...
tests/deprecated/fastplt.py
davtoh/RRTools
1
151114
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function import matplotlib.pyplot as plt import matplotlib.axes import matplotlib.figure from multiprocessing import Process from RRtoolbox.lib.config import FLAG_DEBUG wins = [0] # keeps track of image number through different process...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8542, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13...
website/migrations/0002_auto_20210205_1929.py
TAS-7/KDY-SITE
1
123943
# Generated by Django 3.1.2 on 2021-02-05 19:29 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29906, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29900, 29906, 29899, 29900, 29945, 29871, 29896, 29929, 29901, 29906, 29929, 13, 13, 3166, 9557, 29889, 5527, 1053, 6055, ...
mf2cCommsLib/mf2cComms/channel/msg/__init__.py
cketley/acsl
0
86512
<gh_stars>0 from mf2cComms.channel.msg import message
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 286, 29888, 29906, 29883, 1523, 1516, 29889, 12719, 29889, 7645, 1053, 2643, 2 ]
pytorch/.circleci/cimodel/data/pytorch_build_definitions.py
raghavnauhria/whatmt
0
85804
#!/usr/bin/env python3 from collections import OrderedDict from cimodel.data.pytorch_build_data import TopLevelNode, CONFIG_TREE_DATA import cimodel.data.dimensions as dimensions import cimodel.lib.conf_tree as conf_tree import cimodel.lib.miniutils as miniutils import cimodel.lib.visualization as visualization from...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 13, 3166, 274, 326, 27224, 29889, 1272, 29889, 2272, 7345, 305, 29918, 4282, 29918, 1272, 1053, 7488, 10108, 4247, 29892, 8707, 18667,...
jax_dft/jax_dft/losses_test.py
deepneuralmachine/google-research
23,901
159153
<filename>jax_dft/jax_dft/losses_test.py # coding=utf-8 # Copyright 2021 The Google Research 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.org/licenses/LI...
[ 1, 529, 9507, 29958, 6487, 29918, 29881, 615, 29914, 6487, 29918, 29881, 615, 29914, 6758, 267, 29918, 1688, 29889, 2272, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29896, 450, 5087, 105...
setup.py
EncoreTechnologies/py-menandmice
1
48039
# Licensed to the Encore Technologies ("Encore") under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use...
[ 1, 396, 10413, 21144, 304, 278, 1174, 3221, 8364, 11763, 4852, 2369, 3221, 1159, 1090, 697, 13, 29937, 470, 901, 17737, 3406, 19405, 8571, 4110, 29889, 29871, 2823, 278, 6058, 12107, 934, 13, 29937, 13235, 411, 445, 664, 363, 5684, 2472...
blocks/bricks/bn.py
janchorowski/blocks
3
199455
<gh_stars>1-10 import collections import numpy from picklable_itertools.extras import equizip import theano from theano import tensor from theano.tensor.nnet import bn from ..graph import add_annotation from ..initialization import Constant from ..roles import (BATCH_NORM_POPULATION_MEAN, BATCH_N...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 16250, 13, 13, 5215, 12655, 13, 3166, 5839, 29880, 519, 29918, 1524, 8504, 29889, 1062, 3417, 1053, 1592, 466, 666, 13, 5215, 278, 1562, 13, 3166, 278, 1562, ...
.tox/scenario/lib/python2.7/site-packages/pycadf/measurement.py
bdrich/neutron-lbaas
0
122430
<reponame>bdrich/neutron-lbaas # Copyright 2013 IBM Corp. # # 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 ...
[ 1, 529, 276, 1112, 420, 29958, 6448, 4018, 29914, 17821, 1617, 29899, 29880, 2291, 294, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29941, 27955, 2994, 29886, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892...
Problems/5_best_sum.py
v4n5h4j/dynamic-programming-python
0
152091
def bestSum(t, arr, memo=None): """ m: target sum, t n: len(arr) time = O(n^m*m) space = O(m*m) [in each stack frame, I am storing an array, which in worst case would be m] // Memoized complexity time = O(n*m*m) space = O(m*m) """ if memo is None: memo = {} if t in memo: return memo[t] if t == 0: r...
[ 1, 822, 1900, 11139, 29898, 29873, 29892, 3948, 29892, 2626, 29877, 29922, 8516, 1125, 13, 12, 15945, 29908, 13, 12, 29885, 29901, 3646, 2533, 29892, 260, 13, 12, 29876, 29901, 7431, 29898, 2749, 29897, 13, 12, 2230, 353, 438, 29898, 29...
model/VAE.py
y-x-c/electricauth
1
169447
""" PyTorch implementation of VAE found at: https://github.com/pytorch/examples/tree/master/vae. """ import torch from torch import nn import torch.nn.functional as F class VAE(nn.Module): def __init__(self, input_length, n_sensor_channel, n_hidden = 400, n_latent_features=20, no_variational=False...
[ 1, 9995, 13, 19737, 29911, 25350, 5314, 310, 478, 16036, 1476, 472, 29901, 2045, 597, 3292, 29889, 510, 29914, 2272, 7345, 305, 29914, 19057, 29914, 8336, 29914, 6207, 29914, 1564, 29872, 29889, 13, 15945, 29908, 13, 13, 5215, 4842, 305, ...
training_scripts/main.py
grantsrb/planet
0
63132
<gh_stars>0 import numpy as np import os import torch import pickle import time from planet.training import * from planet.experience import ExperienceReplay from planet.agents import * from planet.models import * from planet.game_envs import GameEnv import planet.prep_fxns as prep_fxns from planet.utils import try_key ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12655, 408, 7442, 13, 5215, 2897, 13, 5215, 4842, 305, 13, 5215, 5839, 280, 13, 5215, 931, 13, 3166, 15754, 29889, 26495, 1053, 334, 13, 3166, 15754, 29889, 735, 546, 5597, 1053...
prettyfigure/__init__.py
lue/prettyfigure
2
182459
<gh_stars>1-10 __author__ = 'sasha'
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 1649, 8921, 1649, 353, 525, 29879, 26840, 29915, 13, 2 ]
qube/postprocess/postprocess.py
ClementGeffroy/qube
1
163901
import numpy as np from scipy.signal import savgol_filter from qube.postprocess.dataset import Axis def create_name(name, suffix=None, prefix=None): elements = [] if prefix: elements.append(str(prefix)) elements.append(str(name)) if suffix: elements.append(str(suffix)) name = '_'.j...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 4560, 2272, 29889, 25436, 1053, 4048, 29887, 324, 29918, 4572, 13, 13, 3166, 439, 915, 29889, 2490, 5014, 29889, 24713, 1053, 319, 11497, 13, 13, 1753, 1653, 29918, 978, 29898, 978, 29892, 25557, 299...
picoCTF/cryptography/credstuff/examplecode.py
Estheryu991/CaptureTheFlag
0
161337
#this code is just an example from 2018 nur luege / from flask import Flask, request, render_template, abort import os, requests app = Flask(__name__) class user: def __init__(self, username, password): self.username = username self.__password = password self.files = [] def getPass(se...
[ 1, 396, 1366, 775, 338, 925, 385, 1342, 515, 29871, 29906, 29900, 29896, 29947, 5595, 8092, 26103, 847, 29871, 13, 3166, 29784, 1053, 2379, 1278, 29892, 2009, 29892, 4050, 29918, 6886, 29892, 27450, 13, 5215, 2897, 29892, 7274, 13, 13, ...
example/openpose/pose-paf-master/tf_data_aug.py
boldjoel/tensorlayer
0
75725
import math ####### import random import cv2 import numpy as np import matplotlib.pyplot as plt from tensorpack.dataflow.imgaug.geometry import RotationAndCropValid def crop_meta_image(image,annos,mask): _target_height=368 _target_width =368 if len(np.shape(image))==2: image = cv2.cvtColor(image, c...
[ 1, 1053, 5844, 13, 4136, 2277, 29937, 13, 5215, 4036, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 3166, 12489, 4058, 29889, 1272, 1731, 29889, 2492, 2987, 29889, 19156, 1053, 9...
website/addons/dataverse/views/widget.py
bdyetton/prettychart
0
140569
<gh_stars>0 import httplib as http from website.addons.dataverse.client import connect_from_settings_or_401, \ get_dataverse, get_dataset from website.project.decorators import must_be_contributor_or_public, \ must_have_addon @must_be_contributor_or_public @must_have_addon('dataverse', 'node') def dataverse_...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 1732, 1982, 408, 1732, 13, 13, 3166, 4700, 29889, 1202, 787, 29889, 1272, 3901, 29889, 4645, 1053, 4511, 29918, 3166, 29918, 11027, 29918, 272, 29918, 29946, 29900, 29896, 29892, 32...
_internal/generate.py
damz/gopherjs-feather-icons
0
183393
<reponame>damz/gopherjs-feather-icons import os import glob import lxml.etree import subprocess if __name__ == "__main__": parser = lxml.etree.XMLParser(remove_blank_text=True) def normalize_xml(data): root = lxml.etree.XML(data, parser=parser) root.insert( 0, root.make...
[ 1, 529, 276, 1112, 420, 29958, 16846, 29920, 29914, 29887, 13434, 1315, 29899, 1725, 1624, 29899, 27078, 13, 5215, 2897, 13, 5215, 13149, 13, 5215, 301, 3134, 29889, 300, 929, 13, 5215, 1014, 5014, 13, 13, 361, 4770, 978, 1649, 1275, ...
tests/test_conveniences.py
CSC-DPR/eopf-cpm
0
34346
import datetime import os import sys from cmath import inf from typing import Any import hypothesis.extra.numpy as xps import hypothesis.strategies as st import numpy import pytest from hypothesis import assume, given from eopf.product.utils import ( apply_xpath, conv, convert_to_unix_time, is_date, ...
[ 1, 1053, 12865, 13, 5215, 2897, 13, 5215, 10876, 13, 3166, 274, 755, 1053, 3041, 13, 3166, 19229, 1053, 3139, 13, 13, 5215, 20051, 29889, 17833, 29889, 23749, 408, 921, 567, 13, 5215, 20051, 29889, 710, 1845, 583, 408, 380, 13, 5215, ...
bin/import_guest.py
GOMYWAY-NETWORKS-LLC/karesansui
54
111697
<gh_stars>10-100 #!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2012 HDE, Inc. # # 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 ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 299...
Outputs_win_app.py
stfbnc/mtsa_py
0
197740
import sys if sys.version_info[0] == 2: import Tkinter as tk from tkFileDialog import askdirectory else: import tkinter as tk from tkinter.filedialog import askdirectory import numpy as np import matplotlib matplotlib.use("TkAgg") import matplotlib.pyplot as plt from matplotlib.figure import Figure from...
[ 1, 1053, 10876, 13, 361, 10876, 29889, 3259, 29918, 3888, 29961, 29900, 29962, 1275, 29871, 29906, 29901, 13, 1678, 1053, 323, 29895, 1639, 408, 18883, 13, 1678, 515, 18883, 2283, 7647, 1053, 2244, 12322, 13, 2870, 29901, 13, 1678, 1053, ...