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
modoboa_public_api/views.py
tonioo/modoboa-public-api
2
155773
<gh_stars>1-10 """API views.""" from django.conf import settings from rest_framework import decorators, mixins, response, status, viewsets from rest_framework.views import APIView from .models import ModoboaInstance, ModoboaExtension from .forms import ClientVersionForm from . import constants from . import models f...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 8787, 8386, 1213, 15945, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 13, 3166, 1791, 29918, 4468, 1053, 10200, 4097, 29892, 6837, 1144, 29892, 2933, 29...
trifacta-dbt/main.py
trifacta/trifacta-dbt-core-profiler
0
189307
import sys import logging import argparse from dbt.config import PROFILES_DIR as DBT_PROFILES_DIR from trifacta.util.tfconfig import TRIFACTA_CONFIG_PATH import os from _version import __version__ from task.diagnostics import DiagnosticsTask from task.profile import ProfileTask from task.clean import CleanTask def ma...
[ 1, 1053, 10876, 13, 5215, 12183, 13, 5215, 1852, 5510, 13, 3166, 270, 3116, 29889, 2917, 1053, 13756, 24483, 29918, 9464, 408, 6535, 29911, 29918, 8618, 24483, 29918, 9464, 13, 3166, 534, 7060, 29874, 29889, 4422, 29889, 13264, 2917, 1053...
pysmore/test_optimizer.py
RainBoltz/pySmore
0
43832
<gh_stars>0 from libs.optimizer import get_dotproduct_loss import numpy as np a = np.array([0.1,0.2,0.3]) b = np.array([0,0.2,0]) L = get_dotproduct_loss(a, b, 1.0) print(L)
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4303, 29879, 29889, 20640, 3950, 1053, 679, 29918, 6333, 4704, 29918, 6758, 13, 5215, 12655, 408, 7442, 13, 13, 29874, 353, 7442, 29889, 2378, 4197, 29900, 29889, 29896, 29892, 2990...
tests/test_decorator.py
beproud/django-newauth
3
1610066
<reponame>beproud/django-newauth<filename>tests/test_decorator.py<gh_stars>1-10 #:coding=utf-8: from urllib.parse import urlparse import pytest from django.test import TestCase as DjangoTestCase from django.conf import settings __all__ = ( 'DecoratorTest', ) @pytest.mark.django_db class DecoratorTest(DjangoTest...
[ 1, 529, 276, 1112, 420, 29958, 915, 558, 2736, 29914, 14095, 29899, 1482, 5150, 29966, 9507, 29958, 21150, 29914, 1688, 29918, 19557, 1061, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 29901, 29...
sklearn/linear_model/tests/test_sgd.py
SteveKola/scikit-learn
2
130059
import pickle import pytest import numpy as np import scipy.sparse as sp import joblib from sklearn.utils._testing import assert_array_equal from sklearn.utils._testing import assert_almost_equal from sklearn.utils._testing import assert_array_almost_equal from sklearn.utils._testing import assert_raises_regexp from ...
[ 1, 1053, 5839, 280, 13, 5215, 11451, 1688, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 4560, 2272, 29889, 29879, 5510, 408, 805, 13, 5215, 4982, 1982, 13, 13, 3166, 2071, 19668, 29889, 13239, 3032, 13424, 1053, 4974, 29918, 2378, 29918, ...
stars.py
hezsystemscorporation/py-turtle-graphs
0
1602624
<reponame>hezsystemscorporation/py-turtle-graphs from turtle import * from random import random,randint screen = Screen() width ,height = 800,600 screen.setup(width,height) screen.bgcolor("black") screen.mode("logo") screen.delay(0)#这里要设为0,否则很卡 t = Turtle(visible = False,shape='circle') t.pencolor("white") t....
[ 1, 529, 276, 1112, 420, 29958, 22923, 5205, 1557, 272, 1971, 362, 29914, 2272, 29899, 29873, 4227, 280, 29899, 4262, 29879, 13, 3166, 260, 4227, 280, 1053, 334, 30004, 13, 3166, 4036, 1053, 4036, 29892, 9502, 524, 30004, 13, 10525, 353,...
docs/assets/update_formats.py
Kronuz/Xapiand
370
127720
<filename>docs/assets/update_formats.py #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import json import msgpack from collections import OrderedDict def main(): if len(sys.argv) != 2: print("usage: {} <file.json>".format(sys.argv[0])) sys...
[ 1, 529, 9507, 29958, 2640, 29914, 16596, 29914, 5504, 29918, 689, 1446, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770,...
kAFL-Fuzzer/fuzzer/technique/interesting_values.py
SafeBreach-Labs/hAFL2
102
188784
<reponame>SafeBreach-Labs/hAFL2<filename>kAFL-Fuzzer/fuzzer/technique/interesting_values.py # Copyright (C) 2017-2019 <NAME>, <NAME>, <NAME> # Copyright (C) 2019-2020 Intel Corporation # # SPDX-License-Identifier: AGPL-3.0-or-later """ AFL-style 'interesting values' mutations (deterministic stage). """ from fuzzer.te...
[ 1, 529, 276, 1112, 420, 29958, 17618, 1725, 20130, 496, 29899, 29931, 6897, 29914, 29882, 5098, 29931, 29906, 29966, 9507, 29958, 29895, 5098, 29931, 29899, 29943, 3365, 3298, 29914, 29888, 3365, 3298, 29914, 371, 6387, 802, 29914, 1639, 34...
tests/unit/test_convert_from_notebook.py
peopledoc/ml-versioning-tools
36
1616448
<filename>tests/unit/test_convert_from_notebook.py from os.path import realpath, dirname, join, exists import pytest from pytest import fixture from mlvtools.conf.conf import MlVToolConf from mlvtools.docstring_helpers.parse import parse_docstring from mlvtools.exception import MlVToolException from mlvtools.ipynb_to...
[ 1, 529, 9507, 29958, 21150, 29914, 5441, 29914, 1688, 29918, 13441, 29918, 3166, 29918, 1333, 19273, 29889, 2272, 13, 3166, 2897, 29889, 2084, 1053, 1855, 2084, 29892, 4516, 978, 29892, 5988, 29892, 4864, 13, 13, 5215, 11451, 1688, 13, 31...
jmilkfansblog/controllers/v1/__init__.py
xiaoyh121/program
176
90605
<gh_stars>100-1000 from pecan import rest from wsme import types as wtypes from jmilkfansblog.api.expose import expose as wsexpose from jmilkfansblog.controllers.v1 import users from jmilkfansblog.controllers.v1 import posts class V1(wtypes.Base): id = wtypes.text """The ID of the version, also acts as the r...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 3166, 13209, 273, 1053, 1791, 13, 3166, 16904, 1004, 1053, 4072, 408, 281, 8768, 13, 13, 3166, 432, 23853, 29895, 29888, 550, 7312, 29889,...
scripts/data-preparation/ch-sy-datatset.py
wannaphong/attacut
54
153894
<reponame>wannaphong/attacut import fire import numpy as np from attacut import preprocessing, utils DATA_PATH = "../slim-cut/data/best" SYALLABLE_TOKENIZED_DATA = "./data/best-syllabled-tokenized" CHARACTER_DICT = "./attacut/artifacts/attacut-sc/characters.json" SYLLABLE_DICT = "./attacut/artifacts/attacut-sc/sylla...
[ 1, 529, 276, 1112, 420, 29958, 29893, 812, 12451, 549, 29914, 1131, 562, 329, 13, 5215, 3974, 13, 5215, 12655, 408, 7442, 13, 13, 3166, 1098, 562, 329, 1053, 758, 19170, 29892, 3667, 29879, 13, 13, 14573, 29918, 10145, 353, 376, 6995,...
server/src/tests/samples/generators2.py
mewbak/pyright
0
81381
# This sample tests various type checking operations relating to # generator functions that use the "yield from" clause. from typing import Iterator class ClassA(): pass class ClassB(): def shouldContinue(self): return True class ClassC(): pass def generator1() -> Iterator[ClassA]: yield fr...
[ 1, 396, 910, 4559, 6987, 5164, 1134, 8454, 6931, 1104, 1218, 304, 13, 29937, 15299, 3168, 393, 671, 278, 376, 29891, 969, 515, 29908, 11845, 29889, 13, 13, 3166, 19229, 1053, 20504, 1061, 13, 13, 1990, 4134, 29909, 7295, 13, 1678, 120...
RS_scpFile.py
Ryodor/PythonThiefOfPhotos
2
146975
<filename>RS_scpFile.py<gh_stars>1-10 import paramiko #hostname = '10.57.29.175' hostname = '10.57.29.175' password = '<PASSWORD>' username = "coding4" port = 22 mypath='/Users/alan/Desktop/my_file' remotepath='/Users/coding4/my_file' t = paramiko.Transport((hostname, 22)) t.connect(username=username, password=pass...
[ 1, 529, 9507, 29958, 12445, 29918, 1557, 29886, 2283, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 1828, 10349, 13, 13, 29937, 28988, 353, 525, 29896, 29900, 29889, 29945, 29955, 29889, 29906, 29...
custom_components/mojio/device_tracker.py
GSzabados/mojio-home-assistant
1
151692
"""Support for Mojio Platform.""" import logging from mojio_sdk.api import API import requests import voluptuous as vol from homeassistant.components.device_tracker import PLATFORM_SCHEMA from homeassistant.const import ( CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_DOMAIN, CONF_PASSWORD, CONF_USERNAM...
[ 1, 9995, 14039, 363, 341, 3848, 601, 28096, 1213, 15945, 13, 5215, 12183, 13, 13, 3166, 2730, 29926, 601, 29918, 15348, 29889, 2754, 1053, 3450, 13, 5215, 7274, 13, 5215, 1700, 21245, 17269, 408, 1700, 13, 13, 3166, 3271, 465, 22137, ...
scripts/pipeline/a06a_submission.py
Iolaum/Phi1337
0
9833
import pandas as pd import numpy as np import pickle from sklearn.cross_validation import train_test_split from sklearn.linear_model import LinearRegression from sklearn.metrics import mean_squared_error from math import sqrt from sklearn.svm import SVR from sklearn.svm import LinearSVR from sklearn.preprocessing imp...
[ 1, 1053, 11701, 408, 10518, 13, 5215, 12655, 408, 7442, 13, 5215, 5839, 280, 13, 13, 3166, 2071, 19668, 29889, 19128, 29918, 18157, 1053, 7945, 29918, 1688, 29918, 5451, 13, 3166, 2071, 19668, 29889, 10660, 29918, 4299, 1053, 22985, 4597,...
features/steps/backup.py
Zierman/tabsave
0
41079
<gh_stars>0 from io import StringIO from behave import * import tabsave from features.environment import * @given(u'there was no game save named "{game_save:w}"') def step_impl(context, game_save): remove_game_saves(game_save) assert not game_save_exists(game_save), f'Expected {game_save} not to exist, but ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 12013, 1053, 1714, 5971, 13, 13, 3166, 23389, 1053, 334, 13, 13, 5215, 4434, 7620, 13, 3166, 5680, 29889, 20944, 1053, 334, 13, 13, 13, 29992, 29887, 5428, 29898, 29884, 29915, ...
lambda/lambda_read_pdf_s3_trigger.py
srcecde/aws-tutorial-code
105
1609386
<filename>lambda/lambda_read_pdf_s3_trigger.py # -*- coding: utf-8 -*- __author__ = "<NAME> (Srce Cde)" __license__ = "MIT" __email__ = "<EMAIL>" __maintainer__ = "<NAME> (Srce Cde)" import json import boto3 import fitz def lambda_handler(event, context): """Read file from s3 on trigger.""" # boto3 client ...
[ 1, 529, 9507, 29958, 2892, 29914, 2892, 29918, 949, 29918, 5140, 29918, 29879, 29941, 29918, 21001, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 1649, 8921, 1649, 353, 9872, 5813, 2995...
catalog/bindings/gmd/linear_ring.py
NIVANorge/s-enda-playground
0
104072
<gh_stars>0 from dataclasses import dataclass from bindings.gmd.linear_ring_type import LinearRingType __NAMESPACE__ = "http://www.opengis.net/gml" @dataclass class LinearRing(LinearRingType): """A LinearRing is defined by four or more coordinate tuples, with linear interpolation between them; the first and ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 848, 13203, 1053, 848, 1990, 13, 3166, 7868, 886, 29889, 29887, 3487, 29889, 10660, 29918, 5393, 29918, 1853, 1053, 22985, 29934, 292, 1542, 13, 13, 1649, 5813, 5550, 11538, 1649, ...
plumcot_prodigy/entity.py
julietteBergoend/plumcot-prodigy
1
28637
<filename>plumcot_prodigy/entity.py<gh_stars>1-10 import prodigy from prodigy.components.preprocess import add_tokens, split_sentences from plumcot_prodigy.custom_loaders import * import requests from plumcot_prodigy.video import mkv_to_base64 from typing import Dict, List, Text, Union from typing_extensions import Lit...
[ 1, 529, 9507, 29958, 572, 398, 26235, 29918, 771, 7501, 29891, 29914, 10041, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 410, 7501, 29891, 13, 3166, 410, 7501, 29891, 29889, 14036, 29889, 1457, ...
streams/binary.py
kevdes/videoparser
0
83012
""" Class to read binary information using various predefined types. """ # # Copyright (c) 2007 <NAME> <<EMAIL>> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of s...
[ 1, 9995, 4134, 304, 1303, 7581, 2472, 773, 5164, 758, 12119, 4072, 29889, 9995, 13, 13, 29937, 13, 29937, 29871, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29900, 29955, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 2987...
netbox_tunnels/views.py
sourcery-ai-bot/netbox-tunnels-plugin
21
96756
"""Django views for network tunnels. (c) 2020 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wr...
[ 1, 9995, 29928, 5364, 8386, 363, 3564, 260, 5963, 1379, 29889, 13, 13, 29898, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 529, 5813, 29958, 13, 29931, 293, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, ...
jifen/fuhe.py
Tigeraus/MA
0
1607570
<filename>jifen/fuhe.py #coding: utf-8 import math def int_NC(xlrange,ylist): sum = xlrange[1]-xlrange[0] n = len(ylist) if n == 2: xishulist=[0.5,0.5] elif n == 3: xishulist=[1.0/6.0,2.0/3.0,1.0/6.0] elif n == 4: xishulist=[1.0/8.0,3.0/8.0,3.0/8.0,1.0/8.0] elif n == ...
[ 1, 529, 9507, 29958, 29926, 26651, 29914, 21154, 354, 29889, 2272, 13, 29937, 29883, 3689, 29901, 23616, 29899, 29947, 13, 13, 5215, 5844, 13, 13, 13, 1753, 938, 29918, 15868, 29898, 15524, 3881, 29892, 29891, 1761, 1125, 13, 1678, 2533, ...
tests/test_mr_homologs.py
rigdenlab/MrParse
0
69679
<filename>tests/test_mr_homologs.py #!/usr/bin/env ccp4-python import set_mrparse_path import pytest import logging from mrparse.mr_sequence import Sequence from mrparse.mr_hkl import HklInfo from mrparse.mr_homolog import homologs_from_hits, calculate_ellg, ellg_data_from_phaser_log logging.basicConfig(level=logging...
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 29885, 29878, 29918, 9706, 1189, 29879, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 274, 6814, 29946, 29899, 4691, 13, 5215, 731, 29918, 29885, 29878, 5510, 29918, 2084, 13,...
src/crawler.py
GamjaPower/berlinstartupjobs
0
97147
# -*- coding: utf-8 -*- ''' Created on 2018. 9. 17. @author: jason96 ''' from selenium import webdriver from pyutil.fileutil import write_file import time def crawl(): target_urls = [] try: for page in range(1, 18): base_url = 'http://berlinstartupjobs.com/engineering/' if ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 12008, 13, 20399, 373, 29871, 29906, 29900, 29896, 29947, 29889, 29871, 29929, 29889, 29871, 29896, 29955, 29889, 13, 13, 29992, 8921, 29901, 432, 1658...
cmds/clear_spam.py
Asperger/PCRD-DiscordBot
2
49835
<reponame>Asperger/PCRD-DiscordBot from utils.log import FileLogger from utils.spammer import clear_spammer, get_spammer from utils.cmds_registry import register register(cmd="clear_spam", alias="clear_spam") register(cmd="clear_spam", alias="cs") class clear_spam: def __init__(self): self.usage = '!clear...
[ 1, 529, 276, 1112, 420, 29958, 2887, 546, 914, 29914, 9026, 29934, 29928, 29899, 4205, 16090, 29933, 327, 13, 3166, 3667, 29879, 29889, 1188, 1053, 3497, 16363, 13, 3166, 3667, 29879, 29889, 1028, 28527, 1053, 2821, 29918, 1028, 28527, 29...
src/importer/excel/excelImporter.py
HenrikPilz/BMEcatConverter
1
189207
''' Created on 11.05.2017 @author: henrik.pilz ''' import logging from openpyxl import load_workbook import regex from datamodel import Feature from datamodel import FeatureSet from datamodel import Mime from datamodel import Price from datamodel import PriceDetails from datamodel import Product fr...
[ 1, 14550, 30004, 13, 20399, 373, 29871, 29896, 29896, 29889, 29900, 29945, 29889, 29906, 29900, 29896, 29955, 30004, 13, 30004, 13, 29992, 8921, 29901, 19061, 5357, 29889, 29886, 309, 29920, 30004, 13, 12008, 30004, 13, 30004, 13, 5215, 121...
pdil/core/findNode.py
patcorwin/fossil
41
97321
<gh_stars>10-100 ''' These function find different nodes, but generally will NOT make any if they do not exist, the `getNodes` does that. This lets all the lib modules find if needed, and only the portions that actually need to make objects can do so. ''' from __future__ import print_function, absolute_import import ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 12008, 13, 1349, 968, 740, 1284, 1422, 7573, 29892, 541, 6892, 674, 6058, 1207, 738, 565, 896, 437, 451, 1863, 29892, 13, 1552, 421, 657, 20284, 29952...
Qasc.py
atranel/resqdb
0
183943
<gh_stars>0 from resqdb.Connection import Connection from resqdb.functions import save_file from datetime import datetime import pandas as pd import logging import os from pptx import Presentation from pptx.util import Cm, Pt from pptx.enum.text import PP_ALIGN, MSO_ANCHOR, MSO_AUTO_SIZE from pptx.chart.data import Ch...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 620, 29939, 2585, 29889, 5350, 1053, 15160, 13, 3166, 620, 29939, 2585, 29889, 12171, 1053, 4078, 29918, 1445, 13, 3166, 12865, 1053, 12865, 13, 5215, 11701, 408, 10518, 13, 5215, ...
day23-2.py
AnthonyFloyd/2017-AdventOfCode-Python
0
181430
<reponame>AnthonyFloyd/2017-AdventOfCode-Python counter = 0 b = 106700 c = 123700 step = 17 for target in range(b, c + step, step): flag = False d = 2 while d != target: e = target // d if e < d: break if target % d == 0: flag = True #print("d: {0:d} e: {1:d} b: {...
[ 1, 529, 276, 1112, 420, 29958, 2744, 386, 2592, 29943, 18966, 29914, 29906, 29900, 29896, 29955, 29899, 3253, 794, 2776, 3399, 29899, 11980, 13, 11808, 353, 29871, 29900, 13, 13, 29890, 353, 29871, 29896, 29900, 29953, 29955, 29900, 29900, ...
leds/jars/model.py
FlamingLotusGirls/Serenity
2
102698
<filename>leds/jars/model.py<gh_stars>1-10 import json import numpy as np class Model(object): """ Minimal base class for a model describing the layout of the LEDs in physical space. """ def __init__(self, num_leds): self.numLEDs = num_leds class JarModel(Model): """ The model has th...
[ 1, 529, 9507, 29958, 839, 29879, 29914, 29926, 1503, 29914, 4299, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4390, 13, 5215, 12655, 408, 7442, 13, 13, 1990, 8125, 29898, 3318, 1125, 13, 1678,...
controllers/task_handler.py
MuhammadWaleedUsman/PythonTornadoDockerTraefikMySql
0
35235
from .db_handler import cursor from tornado import concurrent import tornado.web executor = concurrent.futures.ThreadPoolExecutor(8) def start_task(arg): print("The Task has started") # Async task return True def stop_task(arg): print("The Task has stopped") # Async task return True class Handler...
[ 1, 515, 869, 2585, 29918, 13789, 1053, 10677, 13, 3166, 10146, 912, 1053, 21984, 13, 5215, 10146, 912, 29889, 2676, 13, 4258, 3406, 353, 21984, 29889, 29888, 329, 1973, 29889, 23574, 13366, 29898, 29947, 29897, 13, 13, 13, 1753, 1369, 2...
feed.py
rlexmann/CatFeeder
0
42210
import os import sys import fcntl fh=0 def run_once(): global fh fh=open(os.path.realpath(__file__),'r') try: fcntl.flock(fh,fcntl.LOCK_EX|fcntl.LOCK_NB) except: os._exit(0) run_once()
[ 1, 1053, 2897, 13, 5215, 10876, 13, 5215, 285, 20047, 29880, 13, 29888, 29882, 29922, 29900, 13, 1753, 1065, 29918, 10646, 7295, 13, 1678, 5534, 285, 29882, 13, 1678, 285, 29882, 29922, 3150, 29898, 359, 29889, 2084, 29889, 6370, 2084, ...
aurorae/cnab240/v10_7/types.py
vintasoftware/aurorae
9
126975
<filename>aurorae/cnab240/v10_7/types.py<gh_stars>1-10 # pylint: disable=unsubscriptable-object from datetime import datetime from decimal import Decimal from enum import Enum, IntEnum from typing import ClassVar, Union from pydantic import BaseModel, conint, constr, validator STR_FILL_VALUE = " " INT_FILL_VALUE = "...
[ 1, 529, 9507, 29958, 6698, 2207, 29872, 29914, 29883, 7183, 29906, 29946, 29900, 29914, 29894, 29896, 29900, 29918, 29955, 29914, 8768, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 282, 2904, 524,...
my_wallet/apiv1/__init__.py
ibolorino/wallet-backend
0
77630
default_app_config = "my_wallet.apiv1.apps.ApiV1Config"
[ 1, 2322, 29918, 932, 29918, 2917, 353, 376, 1357, 29918, 14625, 1026, 29889, 481, 440, 29896, 29889, 13371, 29889, 11713, 29963, 29896, 3991, 29908, 13, 2 ]
src/wavestate/iirrational/annotate/markdown.py
wavestate/wavestate-iirrational
0
192456
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology. # SPDX-FileCopyrightText: © 2021 <NAME> <<EMAIL>> # NOTICE: authors should document their contributions in concisely in NOTICE # with details inline in source files...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 10937, 29928, 29990, 29899, 29931, 293, 1947, 29899, 12889, 29901, 13380, 29899, 29906, 29889, 2990...
data_models/aws_cloudtrail_data_model.py
panther-labs/panther-cli
4
131659
<reponame>panther-labs/panther-cli<gh_stars>1-10 import ipaddress import panther_event_type_helpers as event_type from panther_base_helpers import deep_get def get_event_type(event): # currently, only tracking a few event types if ( event.get("eventName") == "ConsoleLogin" and deep_get(event,...
[ 1, 529, 276, 1112, 420, 29958, 8357, 721, 29899, 29880, 6897, 29914, 8357, 721, 29899, 11303, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 10377, 7328, 13, 13, 5215, 7243, 721, 29918, 3696, 29918, 1853, 299...
xquant/engine/commission.py
wbpyer/wbpyer
2
88250
<reponame>wbpyer/wbpyer<filename>xquant/engine/commission.py # -*- coding: utf-8 -*- """ Commission 佣金+费税模型 New in V0.3.4 @author: @version: 0.4 """ from abc import ABCMeta, abstractmethod import math class Commission(object): """ 佣金和费税 """ __metaclass__ = ABCMeta @abstractmethod def get_c...
[ 1, 529, 276, 1112, 420, 29958, 29893, 29890, 2272, 261, 29914, 29893, 29890, 2272, 261, 29966, 9507, 29958, 29916, 12150, 29914, 10599, 29914, 2055, 2333, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29...
tests/test_import.py
buzzjmd/keld-python-cli
1
111134
# -*- coding: utf-8 -*- import keldcli def test_import(): assert keldcli assert keldcli.__title__ assert keldcli.__version__
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 413, 2495, 11303, 13, 13, 13, 1753, 1243, 29918, 5215, 7295, 13, 1678, 4974, 413, 2495, 11303, 13, 1678, 4974, 413, 2495, 11303, 17255, 3257,...
Python/zzz_training_challenge/UdemyPythonPro/Chapter5_Functions/Functions/command_line_arguments2.py
Kreijeck/learning
0
125381
<filename>Python/zzz_training_challenge/UdemyPythonPro/Chapter5_Functions/Functions/command_line_arguments2.py import argparse def main(): # erstellt parser parser = argparse.ArgumentParser() # Argumente hinzufügen: # Name: default mit '--' <- Konvention # help: Optional als Hilfe # type: Optio...
[ 1, 529, 9507, 29958, 11980, 29914, 5617, 29920, 29918, 26495, 29918, 305, 11768, 29914, 29965, 311, 1357, 11980, 1184, 29914, 1451, 3314, 29945, 29918, 6678, 29879, 29914, 6678, 29879, 29914, 6519, 29918, 1220, 29918, 25699, 29906, 29889, 227...
run_es_repo_mgr.py
wjimenez5271/curator
0
41600
<reponame>wjimenez5271/curator #!/usr/bin/env python """Wrapper for running es_repo_mgr from source.""" from curator.es_repo_mgr import main if __name__ == '__main__': main()
[ 1, 529, 276, 1112, 420, 29958, 29893, 29926, 326, 10281, 29945, 29906, 29955, 29896, 29914, 2764, 1061, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 15945, 29908, 15646, 363, 2734, 831, 29918, 20095, 29918, 29885, 629, ...
tests/test_coverage_map.py
LSSTDESC/healsparse
8
123501
from __future__ import division, absolute_import, print_function import unittest import numpy.testing as testing import numpy as np import healpy as hp import healsparse class CoverageMapTestCase(unittest.TestCase): def test_coverage_map_float(self): """ Test coverage_map functionality for floats...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 8542, 29892, 8380, 29918, 5215, 29892, 1596, 29918, 2220, 13, 13, 5215, 443, 27958, 13, 5215, 12655, 29889, 13424, 408, 6724, 13, 5215, 12655, 408, 7442, 13, 5215, 540, 284, 2272, 408, 298, 29886, ...
PyFSM/pyfsm/elements/state_unit_tests.py
wafec/wafec-py-fsm
0
24773
<gh_stars>0 import unittest from pyfsm.elements import * class StateUnitSimpleFsmTests(unittest.TestCase): def setUp(self): self.fsm = StateUnit() self.state1 = StateUnit() self.state2 = StateUnit() self.link1 = LinkElement() self.fsm.starters = [self.state1] self....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 13, 3166, 11451, 29888, 3844, 29889, 17664, 1053, 334, 13, 13, 13, 1990, 4306, 8325, 15427, 29943, 3844, 24376, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 167...
project_postgresql/tests/test_db.py
righ/djangomodel2alchemymap
17
1608822
<reponame>righ/djangomodel2alchemymap import pytest from sqlalchemy import ( select, insert, delete, update, func, ) @pytest.fixture(scope='function') def author_model(): from models_sqla import Author return Author @pytest.fixture(scope='function') def author_table(author_model): re...
[ 1, 529, 276, 1112, 420, 29958, 29878, 1141, 29914, 19776, 574, 290, 27224, 29906, 284, 14969, 962, 481, 13, 5215, 11451, 1688, 13, 3166, 4576, 284, 305, 6764, 1053, 313, 13, 1678, 1831, 29892, 13, 1678, 4635, 29892, 13, 1678, 5217, 29...
qtui.py
kwdgwl/mzlnmsl
1
136466
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mzlnmsl.ui' # # Created by: PyQt5 UI code generator 5.15.4 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGu...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 3812, 5314, 5759, 515, 5183, 14313, 934, 525, 29885, 29920, 3083, 1516, 29880, 29889, 1481, 29915, 13, 29937, 13, 29937, 6760, 630, 491, 29901...
grammar.py
prtx/SLR-Parser-Implementation
0
143129
<reponame>prtx/SLR-Parser-Implementation from context_free_grammar import Context_Free_Grammar def Grammar(): grammar = Context_Free_Grammar() grammar.add_terminal('+', '*', '(', ')', 'id') grammar.add_non_terminal('E', 'T', 'F') grammar.set_start_symbol('E') grammar.add_production_rule('E', ['E', '+', 'T'...
[ 1, 529, 276, 1112, 420, 29958, 558, 7508, 29914, 12750, 29934, 29899, 11726, 29899, 1888, 14607, 13, 3166, 3030, 29918, 9021, 29918, 1393, 3034, 1053, 15228, 29918, 20475, 29918, 29954, 2572, 3034, 13, 13, 13, 1753, 16878, 3034, 7295, 13,...
comments/models.py
chench53/jquery-comments-server
2
44163
from django.db import models from django.utils import timezone # Create your models here. class Creator(models.Model): fullname = models.CharField(max_length=30) profile_picture_url = models.URLField() def __str__(self): return self.fullname class Customer(models.Model): pass class File(m...
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 13239, 1053, 29431, 13, 13, 29937, 6204, 596, 4733, 1244, 29889, 13, 13, 1990, 6760, 1061, 29898, 9794, 29889, 3195, 1125, 13, 1678, 2989, 978, 353, 4733, 29889, 27890, 29898...
accounts/tests/mixins_tests.py
ygrass/handsome
0
112407
# -*- coding: utf-8 -*- from django import forms from django.test.testcases import TestCase from accounts.mixins import PhoneFormMixin class PhoneFormMixinTests(TestCase): """ Tests for PhoneFormMixin """ def test_clean_username(self): """ Check username as phone number """ ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 9557, 1053, 7190, 13, 3166, 9557, 29889, 1688, 29889, 1688, 11436, 1053, 4321, 8259, 13, 13, 3166, 15303, 29889, 28084, 1144, 1053, 24323, 2500, 29...
survae/data/loaders/image/celeba.py
robert-giaquinto/survae_flows
2
190332
from survae.data.datasets.image import SuperResolutionCelebA32Dataset, UnsupervisedCelebA32Dataset from survae.data.datasets.image import SuperResolutionCelebA64Dataset, UnsupervisedCelebA64Dataset from survae.data.datasets.image import SuperResolutionCelebA128Dataset, UnsupervisedCelebA128Dataset from torchvision.tran...
[ 1, 515, 1190, 1564, 29872, 29889, 1272, 29889, 14538, 1691, 29889, 3027, 1053, 5670, 12375, 918, 29907, 6146, 29890, 29909, 29941, 29906, 16390, 24541, 29892, 853, 9136, 11292, 29907, 6146, 29890, 29909, 29941, 29906, 16390, 24541, 13, 3166, ...
transphire_transform/dump_load/tests/test_util.py
MPI-Dortmund/transphire_transform
2
111083
<gh_stars>1-10 """ MIT License Copyright (c) 2018 <NAME> Institute of Molecular Physiology 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 ri...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 15945, 29908, 13, 26349, 19245, 13, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29947, 529, 5813, 29958, 8907, 310, 341, 1772, 16637, 11661, 29875, ...
vectorizing.py
ramankh/multi-digit-recognition
0
93453
import cv2 import numpy as np import pickle import h5py number_of_images = 13068 #33402 # #dic_pick = pickle.load( open( "train_metadata.pickle", "rb" ) ) dic_pick = pickle.load( open( "test_metadata.pickle", "rb" ) ) length = [len(x) for x in dic_pick["label"]] inpt= np.ndarray((number_of_images,784)) labels = np.n...
[ 1, 1053, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 5215, 5839, 280, 13, 5215, 298, 29945, 2272, 13, 13, 4537, 29918, 974, 29918, 8346, 353, 29871, 29896, 29941, 29900, 29953, 29947, 396, 29941, 29941, 29946, 29900, 29906, 259, 396, ...
app/waterQual/legacy/extractForcingBuffer.py
fkwai/geolearn
0
1603036
<filename>app/waterQual/legacy/extractForcingBuffer.py import ee ee.Initialize() import os import time import numpy as np import pandas as pd import datetime as dt from hydroDL.data import usgs, gee workDir = r'C:\Users\geofk\work\waterQuality' # siteNo = '04086120' siteNo = '053416972' # find out site dfSite = usgs....
[ 1, 529, 9507, 29958, 932, 29914, 13405, 24399, 29914, 1397, 4135, 29914, 21111, 2831, 3277, 7701, 29889, 2272, 13, 5215, 321, 29872, 13, 3905, 29889, 6644, 6646, 580, 13, 5215, 2897, 13, 5215, 931, 13, 5215, 12655, 408, 7442, 13, 5215, ...
slam/slamBase.py
TimeEscaper/rl_data_association
3
136625
""" <NAME> <EMAIL> 24-Apr-2018 <NAME> <EMAIL> 26-Nov-2018 """ import numpy as np from abc import ABC, abstractmethod class SlamBase(ABC): def __init__(self, slam_type, data_association, update_type, Q): """ :param slam_type: Which SLAM algorithm to run: ONLINE SLAM (ekf) or smoothing the full t...
[ 1, 9995, 13, 29966, 5813, 29958, 13, 29966, 26862, 6227, 29958, 13, 29906, 29946, 29899, 29909, 558, 29899, 29906, 29900, 29896, 29947, 13, 13, 29966, 5813, 29958, 13, 29966, 26862, 6227, 29958, 13, 29906, 29953, 29899, 25363, 29899, 29906,...
protoflow/applications/__init__.py
theblackfly/protoflow
3
103531
from .glvq import GLVQ from .deeplvq import DeepLVQ from .gmlvq import GMLVQ # from .knn import KNN # from .lvq1 import LVQ1 from .lvqmln import LVQMLN from .network import Network __all__ = [ 'GLVQ', 'DeepLVQ', 'GMLVQ', # 'KNN', # 'LVQ1', 'LVQMLN', 'Network', ]
[ 1, 515, 869, 3820, 29894, 29939, 1053, 12729, 29963, 29984, 13, 3166, 869, 311, 29872, 572, 29894, 29939, 1053, 21784, 29931, 29963, 29984, 13, 3166, 869, 29887, 828, 29894, 29939, 1053, 402, 1988, 29963, 29984, 13, 29937, 515, 869, 3959,...
node.py
niki4etoo/WSN
1
98596
<gh_stars>1-10 class Node: starting = True ending = False name = "" weight = [1, 20] active = True edge_length = 0 nodes = [] def __init__(self, name, grid, posX, posY, active): self.name = name # Name of the node self.grid = grid # Which grid the node will be placed self.posX = posX # Position X ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 1990, 9071, 29901, 13, 12, 2962, 292, 353, 5852, 13, 12, 2548, 353, 7700, 13, 12, 13, 12, 978, 353, 5124, 13, 12, 7915, 353, 518, 29896, 29892, 29871, 29906, 29...
PythonAndroid/youtube-dl/lib/python3.5/youtube_dl/extractor/zippcast.py
jianglei12138/python-3.5.1
10
1604964
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, str_to_int, ) class ZippCastIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?zippcast\.com/(?:video/|videoview\.php\?.*\bvplay=)(?P<id>[0-9a-zA-Z]+)' _TESTS = [{ # m3u...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 5215, 337, 13, 13, 3166, 869, 9435, 1053, 22140, 5647, 28891, 13, 3166, 6317, 13239, 1053, 313, 13, 1678, 8161, 29918, 1062, 29892, 13, 1678, 851, 29918, 517, 2...
pytest_statsd/plugin.py
jlane9/pytest-statsd
4
171579
<reponame>jlane9/pytest-statsd<filename>pytest_statsd/plugin.py """pytest_statsd.plugin .. codeauthor:: <NAME> <<EMAIL>> """ from __future__ import absolute_import import time import statsd def pytest_addoption(parser): """ :param parser: :return: """ group = parser.getgroup('terminal reporti...
[ 1, 529, 276, 1112, 420, 29958, 29926, 25821, 29929, 29914, 2272, 1688, 29899, 16202, 29881, 29966, 9507, 29958, 2272, 1688, 29918, 16202, 29881, 29914, 8582, 29889, 2272, 13, 15945, 29908, 2272, 1688, 29918, 16202, 29881, 29889, 8582, 13, 1...
tools/yaml_config.py
brahim17/bud
0
113244
<gh_stars>0 import confuse as cf def configure(): config = cf.Configuration('bud', __name__) config.set_file('./config.yaml') return config def get_path(): cfg = configure() return str(cfg["directory_path"])
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 1970, 1509, 408, 274, 29888, 13, 13, 13, 1753, 10822, 7295, 13, 1678, 2295, 353, 274, 29888, 29889, 8614, 877, 15841, 742, 4770, 978, 1649, 29897, 13, 1678, 2295, 29889, 842, 29...
analysis/Hayward/Scripts/.ipynb_checkpoints/project_functions-checkpoint.py
data301-2020-winter2/course-project-group_1000
0
162875
import numpy as np import pandas as pd import seaborn as sns import pandas_profiling as pdp import matplotlib.pyplot as plt def load_and_process(csv): # Method Chain 1 (load data, rename columns, round values to 2 d.p. and sort 'Charges' descending) df1 = ( pd.read_csv('Medical_Cost.csv') .rena...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 11701, 408, 10518, 13, 5215, 409, 370, 1398, 408, 269, 1983, 13, 5215, 11701, 29918, 771, 1777, 292, 408, 282, 6099, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 1753, 2254, 29918, 392, ...
tests/python/pants_test/backend/jvm/tasks/jvm_compile/java/test_cache_compile_integration.py
qma/pants
0
156424
<gh_stars>0 # coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import o...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29945, 349, 1934, 2060, 17737, 29560, 313, 4149, 8707, 29911, 3960, 29933, 2692, 24125, 29889, 3...
cumulusci/robotframework/locators_53.py
davisagli/CumulusCI
0
188320
<gh_stars>0 import copy from cumulusci.robotframework import locators_52 lex_locators = copy.deepcopy(locators_52.lex_locators) lex_locators["object_list"] = { # Note: this matches the <td> with the checkbutton, not the inner checkbutton # This is because clicking the actual checkbutton will throw an error th...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 3509, 13, 13, 3166, 13299, 14999, 455, 29889, 307, 7451, 4468, 1053, 1180, 4097, 29918, 29945, 29906, 13, 13, 2506, 29918, 2029, 4097, 353, 3509, 29889, 24535, 8552, 29898, 2029, ...
backend/admin/views/__init__.py
gsw945/flask-bigger
29
41709
# -*- coding: utf-8 -*- '''admin视图'''
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 12008, 6406, 31568, 30861, 12008, 2 ]
tests/test_pinblock.py
adelosa/cardutil
0
29684
<gh_stars>0 import unittest from cardutil import pinblock class PinblockTestCase(unittest.TestCase): def test_pin_block_Iso0(self): self.assertEqual( b'\x04\x12\x26\xcb\xa9\x87\x6f\xed', pinblock.Iso0PinBlock(pin='1234', card_number='4441234567890123').to_bytes()) def test_vi...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 13, 3166, 5881, 4422, 1053, 12534, 1271, 13, 13, 13, 1990, 17434, 1271, 3057, 8259, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 12687, ...
terrarium/adapters/accumulator.py
dredington/terrarium
0
58394
#!/usr/bin/env python3 from sentinel import DataAdapter class Accumulator(DataAdapter): def __init__(self): self.data = [] def publish(self, data): self.data.append(data)
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 3166, 2665, 262, 295, 1053, 3630, 6168, 13, 13, 1990, 4831, 398, 9183, 29898, 1469, 6168, 1125, 13, 29871, 822, 4770, 2344, 12035, 1311, 1125, 13, 1678, 1583, 29889, 1272, ...
osme/migrations/0002_auto_20210316_1627.py
infolabs/django-osme
0
162972
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2021-03-16 13:27 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osme', '0001_initial'), ] operations = [ migrations.RemoveField( ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29937, 3251, 630, 491, 15337, 29871, 29896, 29889, 29896, 29896, 29889, 29906, 29947, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29900, 29941, 29899, 298...
apps/requestlogger/urls.py
commtrack/commtrack-old-to-del
1
199531
<reponame>commtrack/commtrack-old-to-del from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^requestlog/?$', 'requestlogger.views.list'), (r'^requestlog/demo/?$', 'requestlogger.views.demo'), )
[ 1, 529, 276, 1112, 420, 29958, 2055, 11294, 29914, 2055, 11294, 29899, 1025, 29899, 517, 29899, 6144, 13, 3166, 9557, 29889, 5527, 29889, 26045, 29889, 4381, 29879, 1053, 334, 13, 13, 2271, 11037, 29879, 353, 15038, 877, 742, 462, 4706, ...
betterLogger/formatter.py
GreenJon902/BetterLogger
0
47677
<reponame>GreenJon902/BetterLogger<filename>betterLogger/formatter.py import copy from logging import Formatter as _Formatter from betterLogger import colors from betterLogger import config from betterLogger.format_funcs import colored_format class Formatter(_Formatter): def __init__(self, use_color=False): ...
[ 1, 529, 276, 1112, 420, 29958, 24599, 29967, 265, 29929, 29900, 29906, 29914, 29933, 19036, 16363, 29966, 9507, 29958, 6878, 357, 16363, 29914, 689, 2620, 29889, 2272, 13, 5215, 3509, 13, 3166, 12183, 1053, 3812, 2620, 408, 903, 18522, 13...
setuper desktop app/gui/dialogs/weblogindialog.py
dragondjf/CloudSetuper
22
126497
#!/usr/bin/python # -*- coding: utf-8 -*- import os from PyQt5 import QtGui from PyQt5 import QtCore from PyQt5 import QtWidgets import requests from dataBase import signal_DB import threading from Crypto.Hash import MD5 if __name__ == '__main__': from basedialog import BaseDialog else: from .basedialog import ...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 2897, 13, 3166, 10772, 17303, 29945, 1053, 14705, 28707, 13, 3166, 10772, 17303, 29945, 1053, 14705, 920...
PDaS/TreeNode.py
Seenivasanseeni/PyDas
0
90781
""" The TreeNode represents node in a Tree. This module is perfect for Binary Tree but their implementation needs restructuring of the TreeNode for other Tree types. """ class TreeNode(object): """ Node in a Tree has arguments data,link[0]-leftlink,link[0]-right link emptiness of a TreeNode is indicated by self...
[ 1, 9995, 13, 1576, 15472, 4247, 11524, 2943, 297, 263, 15472, 29889, 13, 4013, 3883, 338, 4922, 363, 29479, 15472, 541, 1009, 5314, 4225, 1791, 1247, 3864, 310, 278, 15472, 4247, 13, 1454, 916, 15472, 4072, 29889, 13, 15945, 29908, 13, ...
Models_training/PCA_reduction.py
Nagisa-sys/WriterIdentification
2
164345
import pickle from sklearn.decomposition import PCA import numpy as np class PCA_reduction: def __init__(self, pca_path): self.pca_reload = pickle.load(open(pca_path,'rb')) def reduce_size(self, vector): return self.pca_reload.transform([vector])[0] @staticmethod def create_new_pca_model(vectors, path_to_sa...
[ 1, 1053, 5839, 280, 13, 3166, 2071, 19668, 29889, 311, 510, 3283, 1053, 349, 5454, 13, 5215, 12655, 408, 7442, 13, 13, 1990, 349, 5454, 29918, 9313, 428, 29901, 13, 12, 1753, 4770, 2344, 12035, 1311, 29892, 282, 1113, 29918, 2084, 112...
index.py
StarSky1/microsoft-python-study
0
3797
name=input('input your name:'); print('hello'); print(name.capitalize());
[ 1, 1024, 29922, 2080, 877, 2080, 596, 1024, 29901, 2157, 13, 2158, 877, 12199, 2157, 13, 2158, 29898, 978, 29889, 5030, 2410, 675, 3310, 2 ]
members/forms.py
deadbeatfour/reg-form
0
158682
from django import forms from .models import member class MemberForm(forms.ModelForm): class Meta: model = member exclude = ['timestamp'] labels = { 'name':"<NAME>", 'course':"COURSE", 'year':"YEAR", 'phone_number':"PHONE NUMBER", ...
[ 1, 515, 9557, 1053, 7190, 13, 3166, 869, 9794, 1053, 4509, 13, 13, 1990, 19495, 2500, 29898, 9514, 29889, 3195, 2500, 1125, 13, 1678, 770, 20553, 29901, 13, 4706, 1904, 353, 4509, 13, 4706, 19060, 353, 6024, 16394, 2033, 13, 4706, 110...
app/mlp/test_mlp_evaluate-race.py
jingjieli95/UnarySim
17
150922
# %% %load_ext autoreload %autoreload 2 # %% import torch import torch.nn as nn import torch.nn.functional as F import torchvision import torchvision.transforms as transforms from torchsummaryX import summary import matplotlib.pyplot as plt import time import os from UnarySim.kernel.utils import * from UnarySim.kerne...
[ 1, 396, 17806, 13, 29995, 1359, 29918, 1062, 8478, 7078, 328, 13, 29995, 8309, 7078, 328, 29871, 29906, 13, 13, 29937, 17806, 13, 5215, 4842, 305, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 13, 5215, 4842, 305, 29889, 15755, ...
dotsandboxes/pit-dotsandboxes.py
user01/alpha-zero-general
2,836
178784
<reponame>user01/alpha-zero-general<gh_stars>1000+ import os import numpy as np import Arena from MCTS import MCTS from utils import dotdict from dotsandboxes.DotsAndBoxesGame import DotsAndBoxesGame from dotsandboxes.DotsAndBoxesPlayers import HumanDotsAndBoxesPlayer, RandomPlayer, GreedyRandomPlayer from dotsandboxes...
[ 1, 529, 276, 1112, 420, 29958, 1792, 29900, 29896, 29914, 2312, 29899, 9171, 29899, 17492, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29900, 29974, 13, 5215, 2897, 13, 5215, 12655, 408, 7442, 13, 5215, 26053, 13, 3166, 34...
Part 3/batch_VS_stochastic.py
m9psy/neural_network_habr_guide
20
10679
import numpy as np import matplotlib.pyplot as plt TOTAL = 200 STEP = 0.25 EPS = 0.1 INITIAL_THETA = [9, 14] def func(x): return 0.2 * x + 3 def generate_sample(total=TOTAL): x = 0 while x < total * STEP: yield func(x) + np.random.uniform(-1, 1) * np.random.uniform(2, 8) x += STEP def...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 29911, 2891, 1964, 353, 29871, 29906, 29900, 29900, 13, 1254, 15488, 353, 29871, 29900, 29889, 29906, 29945, 13, 29923, 7024, 353, 29871, 29900, 29889, 298...
tests/mlmax/test_local_deployments.py
yinsong1986/mlmax
56
40705
<gh_stars>10-100 import datatest as dt import pytest from sagemaker.processing import ProcessingInput, ProcessingOutput from sagemaker.sklearn.estimator import SKLearn from sagemaker.sklearn.processing import SKLearnProcessor # These tests are skipped unless pytest is run with the `--smlocal` flag. # These tests will ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 5215, 1418, 271, 342, 408, 11636, 13, 5215, 11451, 1688, 13, 3166, 269, 13904, 5790, 29889, 19170, 1053, 10554, 292, 4290, 29892, 10554, 292, 6466, 13, ...
venv/lib/python3.7/site-packages/datalad/interface/utils.py
emmetaobrien/dats-validator
0
196611
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
[ 1, 396, 953, 16815, 29901, 448, 29930, 29899, 4464, 29901, 3017, 29936, 11451, 29899, 12860, 29899, 10289, 29901, 29871, 29946, 29936, 4434, 29899, 2103, 29901, 29871, 29946, 29936, 29536, 29899, 21175, 29899, 8513, 29901, 4263, 448, 29930, 2...
genes/templatetags/gene_grid_tags.py
SACGF/variantgrid
5
84898
<gh_stars>1-10 from django.conf import settings from django.db.models.query_utils import Q from django.template import Library from genes.forms import GeneListCategoryAutocompleteForm, NamedCustomGeneListForm, GeneSymbolForm, \ GeneAnnotationReleaseForm, panel_app_server_autocomplete_form_factory from genes.models...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 3166, 9557, 29889, 2585, 29889, 9794, 29889, 1972, 29918, 13239, 1053, 660, 13, 3166, 9557, 29889, 6886, 1053, 9538, 13, 13, ...
src/tutorial/scripts/publisher.py
swapnilsurdi/race-on-ros
0
116257
#!/usr/bin/env python import rospy from std_msgs.msg import Float32 import math RATE = 10 # Publishing rate of new data per second FREQ = 1 # Frequency of the sinusoidal signal # Execute this when run as a script if __name__ == '__main__': rospy.init_node('publisher') pub = rospy.Publisher('data', Fl...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 696, 1028, 29891, 13, 3166, 3659, 29918, 1516, 3174, 29889, 7645, 1053, 27842, 29941, 29906, 13, 13, 5215, 5844, 13, 13, 29934, 3040, 353, 29871, 29896, 29900, 29871, 396, 19...
Lab4/sigmoidGradient.py
A2Zntu/ML_HW
0
116627
from sigmoid import sigmoid import numpy as np def sigmoidGradient(z): #SIGMOIDGRADIENT returns the gradient of the sigmoid function #evaluated at z # g = SIGMOIDGRADIENT(z) computes the gradient of the sigmoid function # evaluated at z. This should work regardless if z is a matrix or a # vector. In particular,...
[ 1, 515, 4365, 29885, 3398, 1053, 4365, 29885, 3398, 13, 5215, 12655, 408, 7442, 29871, 13, 13, 1753, 4365, 29885, 3398, 25584, 993, 29898, 29920, 1125, 13, 29937, 5425, 29954, 6720, 1367, 14345, 3035, 29902, 3919, 3639, 278, 16030, 310, ...
evap/evaluation/templatetags/navbar_templatetags.py
felixrindt/EvaP
29
152725
from django.template import Library from evap.evaluation.models import Semester from evap.settings import DEBUG, LANGUAGES register = Library() @register.inclusion_tag("navbar.html") def include_navbar(user, language): return { "user": user, "current_language": language, "languages": LAN...
[ 1, 515, 9557, 29889, 6886, 1053, 9538, 13, 13, 3166, 3415, 481, 29889, 24219, 362, 29889, 9794, 1053, 9444, 4156, 13, 3166, 3415, 481, 29889, 11027, 1053, 21681, 29892, 365, 19453, 29965, 10461, 29903, 13, 13, 9573, 353, 9538, 580, 13, ...
plotext/plot.py
asartori86/plotext
0
163528
# /usr/bin/env python3 # -*- coding: utf-8 -*- ############################################## ############## Importing ############### ############################################## import utility as _utility import docstrings as _docstrings import subprocess as _subprocess #####################################...
[ 1, 396, 847, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 13383, 13383, 7346, 4136, 2277, 13, 7346, 4136, 2277, 1678, 16032, 292, 1678, 835, 7346,...
apps/users/migrations/0017_auto_20200807_1727.py
lucasjaroszewski/incremental-game
0
175008
<reponame>lucasjaroszewski/incremental-game # Generated by Django 3.0.6 on 2020-08-07 20:27 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('users', '0016_auto_20200807_1719'), ] operations = [ migrations.RenameField( model_name='fis...
[ 1, 529, 276, 1112, 420, 29958, 29880, 1682, 294, 4758, 13165, 809, 2574, 29914, 25629, 284, 29899, 11802, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29900, 29889, 29953, 373, 29871, 29906, 29900, 29906, 29900, 29899, 29900, 2994...
utils/functions.py
Roozbeh-Bazargani/CPSC-533R-project
0
6382
<filename>utils/functions.py import torch from torch import nn import math #0 left hip #1 left knee #2 left foot #3 right hip #4 right knee #5 right foot #6 middle hip #7 neck #8 nose #9 head #10 left shoulder #11 left elbow #12 left wrist #13 right shoulder #14 right elbow #15 right wrist def random_rotation(J3d): ...
[ 1, 529, 9507, 29958, 13239, 29914, 12171, 29889, 2272, 13, 5215, 4842, 305, 13, 3166, 4842, 305, 1053, 302, 29876, 13, 5215, 5844, 13, 13, 29937, 29900, 2175, 21464, 13, 29937, 29896, 2175, 17905, 29872, 13, 29937, 29906, 2175, 3661, 13...
main.py
mrinalghosh/dijkstra-heap-compare
0
170453
<reponame>mrinalghosh/dijkstra-heap-compare import sys sys.path.append(".") import time import networkx as nx import matplotlib.pyplot as plt import csv from hwcounter import count, count_end from statistics import mean from test_graphs.graph_generator import * from heaps.fibonacci import FibHeap from heaps.violation...
[ 1, 529, 276, 1112, 420, 29958, 29885, 29878, 979, 12443, 10578, 29914, 29881, 13535, 4151, 29899, 354, 481, 29899, 18307, 13, 5215, 10876, 13, 13, 9675, 29889, 2084, 29889, 4397, 17350, 1159, 13, 5215, 931, 13, 5215, 3564, 29916, 408, 3...
tests/endpoints/v1/test_accounts.py
jamesonl/sdk-py
1
133402
<reponame>jamesonl/sdk-py import unittest from predicthq.endpoints.v1.accounts.schemas import Account from tests import with_mock_client, with_mock_responses, with_client class AccountsTest(unittest.TestCase): @with_mock_client() def test_self_params(self, client): client.accounts.self() cli...
[ 1, 529, 276, 1112, 420, 29958, 29926, 1280, 265, 29880, 29914, 15348, 29899, 2272, 13, 5215, 443, 27958, 13, 13, 3166, 4450, 293, 386, 29939, 29889, 355, 9748, 29889, 29894, 29896, 29889, 10149, 29879, 29889, 11993, 1053, 16535, 13, 3166,...
omicron/dal/__init__.py
evimacs/omicron
4
61180
from omicron.dal.cache import cache from omicron.dal.postgres import db, init __all__ = ["init", "db", "cache"]
[ 1, 515, 2703, 293, 1617, 29889, 12293, 29889, 8173, 1053, 7090, 13, 3166, 2703, 293, 1617, 29889, 12293, 29889, 2490, 7201, 1053, 4833, 29892, 2069, 13, 13, 1649, 497, 1649, 353, 6796, 2344, 613, 376, 2585, 613, 376, 8173, 3108, 13, 2...
tests/dgds_functions_test.py
openearth/hydro-engine-service
4
11796
import logging import pytest from . import auth from hydroengine_service import dgds_functions logger = logging.getLogger(__name__) class TestDGDSFunctions: @pytest.mark.parametrize('source, start_date, end_date, limit', [ ('projects/dgds-gee/bathym...
[ 1, 1053, 12183, 13, 5215, 11451, 1688, 13, 13, 3166, 869, 1053, 4817, 13, 13, 3166, 17546, 10599, 29918, 5509, 1053, 270, 29887, 6289, 29918, 12171, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 22168, 978, 1649, 29897, 13, 13, 1990, ...
openGaussBase/testcase/AI/AI_INDEXADV/Opengauss_Function_Ai_Indexadv_Case0015.py
opengauss-mirror/Yat
0
110585
<filename>openGaussBase/testcase/AI/AI_INDEXADV/Opengauss_Function_Ai_Indexadv_Case0015.py """ Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: ...
[ 1, 529, 9507, 29958, 3150, 29954, 11214, 5160, 29914, 1688, 4878, 29914, 23869, 29914, 23869, 29918, 27992, 3035, 29963, 29914, 11746, 996, 11214, 29918, 6678, 29918, 29909, 29875, 29918, 3220, 17263, 29918, 8259, 29900, 29900, 29896, 29945, ...
demo_pulse.py
gexpander/demo-py-examples
0
118111
#!/bin/env python3 import gex import time # generating a pulse on gpio, test of the unit with gex.Client(gex.TrxRawUSB()) as client: out = gex.DOut(client, 'out') out.pulse_us([0], 20) out.pulse_us([3], 10)
[ 1, 18787, 2109, 29914, 6272, 3017, 29941, 13, 5215, 330, 735, 13, 5215, 931, 13, 13, 29937, 14655, 263, 9505, 344, 373, 330, 16168, 29892, 1243, 310, 278, 5190, 13, 13, 2541, 330, 735, 29889, 4032, 29898, 5082, 29889, 2308, 29916, 221...
models/temporal_link/temporal_weights.py
zankner/DNC
3
155152
import tensorflow as tf def temporal_weights(temporal_links, read_weights): forward_weights = tf.matmul(read_weights, temporal_links, transpose_b = True) backward_weights = tf.matmul(read_weights, temporal_links) return forward_weights, backward_weights
[ 1, 1053, 26110, 408, 15886, 13, 13, 1753, 25406, 29918, 705, 5861, 29898, 1356, 1971, 284, 29918, 4965, 29892, 1303, 29918, 705, 5861, 1125, 13, 29871, 6375, 29918, 705, 5861, 353, 15886, 29889, 2922, 16109, 29898, 949, 29918, 705, 5861, ...
dag/ecs-hybrid-ec2.py
094459/blogpost-airflow-hybrid
1
1611066
from airflow import DAG from datetime import datetime, timedelta from airflow.providers.amazon.aws.operators.ecs import ECSOperator default_args = { 'owner': 'ubuntu', 'start_date': datetime(2019, 8, 14), 'retry_delay': timedelta(seconds=60*60) } with DAG('hybrid_airflow_ec2_dag', catchup=False, default_...
[ 1, 515, 4799, 1731, 1053, 360, 10051, 13, 3166, 12865, 1053, 12865, 29892, 5335, 287, 2554, 13, 3166, 4799, 1731, 29889, 771, 29454, 29889, 17260, 29889, 10467, 29889, 3372, 4097, 29889, 687, 29879, 1053, 17522, 6156, 546, 1061, 13, 13, ...
custom_components/tahoma/config_flow.py
MatthewFlamm/ha-tahoma
0
162973
<filename>custom_components/tahoma/config_flow.py """Config flow for TaHoma integration.""" import logging from aiohttp import ClientError from homeassistant import config_entries from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import callback from homeassistant.helpers import conf...
[ 1, 529, 9507, 29958, 6341, 29918, 14036, 29914, 29873, 801, 4125, 29914, 2917, 29918, 1731, 29889, 2272, 13, 15945, 29908, 3991, 4972, 363, 10523, 29950, 4125, 13465, 1213, 15945, 13, 5215, 12183, 13, 13, 3166, 263, 601, 1124, 1053, 12477...
examples/i2b2/i2b2.py
sean-dingxu/sciwing
0
1615958
from sciwing.modules.lstm2seqencoder import Lstm2SeqEncoder from sciwing.models.rnn_seq_crf_tagger import RnnSeqCrfTagger from sciwing.modules.embedders.trainable_word_embedder import TrainableWordEmbedder from sciwing.modules.embedders.bow_elmo_embedder import BowElmoEmbedder from sciwing.modules.embedders.concat_embe...
[ 1, 515, 4560, 16958, 29889, 7576, 29889, 20155, 29885, 29906, 11762, 3977, 6119, 1053, 365, 303, 29885, 29906, 23718, 8566, 6119, 13, 3166, 4560, 16958, 29889, 9794, 29889, 29878, 15755, 29918, 11762, 29918, 7283, 29888, 29918, 4039, 914, 1...
minecraft_launcher_lib/fabric.py
bopchik/Simple-minecraft-mod-launcher
1
7627
<filename>minecraft_launcher_lib/fabric.py from .helper import download_file, get_user_agent from .install import install_minecraft_version from typing import List, Dict, Union from xml.dom import minidom import subprocess import requests import tempfile import random import os def get_all_minecraft_versions() -> List...
[ 1, 529, 9507, 29958, 24669, 17293, 29918, 15343, 261, 29918, 1982, 29914, 16582, 2200, 29889, 2272, 13, 3166, 869, 20907, 1053, 5142, 29918, 1445, 29892, 679, 29918, 1792, 29918, 14748, 13, 3166, 869, 6252, 1053, 2601, 29918, 24669, 17293, ...
src/tasks/aws_audit_vpc_flow_logs_task.py
jezd-axyl/platsec-aws-scanner
0
173754
from dataclasses import dataclass from typing import Any, Dict from src.clients.composite.aws_vpc_client import AwsVpcClient from src.data.aws_organizations_types import Account from src.tasks.aws_vpc_task import AwsVpcTask @dataclass class AwsAuditVPCFlowLogsTask(AwsVpcTask): def __init__(self, account: Account...
[ 1, 515, 848, 13203, 1053, 848, 1990, 13, 3166, 19229, 1053, 3139, 29892, 360, 919, 13, 13, 3166, 4765, 29889, 11303, 1237, 29889, 22410, 568, 29889, 10467, 29918, 29894, 6739, 29918, 4645, 1053, 319, 5652, 29963, 6739, 4032, 13, 3166, 4...
nipy/utils/__init__.py
neurospin/nipy
1
1605596
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Package containing both generic configuration and testing stuff as well as general purpose functions that are useful to a broader community and not restricted to the neuroimaging community. This package...
[ 1, 396, 953, 16815, 29901, 448, 29930, 29899, 4464, 29901, 3017, 29936, 11451, 29899, 12860, 29899, 10289, 29901, 29871, 29946, 29936, 29536, 29899, 21175, 29899, 8513, 29901, 4263, 448, 29930, 29899, 13, 29937, 3516, 29901, 731, 11791, 29922...
lib/concurrence/_threading/__init__.py
concurrence/concurrence
27
116696
# Copyright (C) 2009, Hyves (Startphone Ltd.) # # This module is part of the Concurrence Framework and is released under # the New BSD License: http://www.opensource.org/licenses/bsd-license.php def disable_threading(): import sys import thread sys.modules['thread'] = thread import threading sys.m...
[ 1, 396, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29900, 29929, 29892, 9665, 1960, 313, 4763, 6710, 19806, 1846, 13, 29937, 13, 29937, 910, 3883, 338, 760, 310, 278, 1281, 21962, 663, 16657, 322, 338, 5492, 1090, 13, 29937, 2...
calculate_fCOS/calc_fCOS_C4pct_run_driver.py
Timothy-W-Hilton/COS_Spatial_Analyses
0
141243
<reponame>Timothy-W-Hilton/COS_Spatial_Analyses<filename>calculate_fCOS/calc_fCOS_C4pct_run_driver.py<gh_stars>0 #!/usr/bin/env python # the above shebang uses a virtualenv if one is running, otherwise the # system python """Short example of using python to perform the environment variable management, etc. needed to ...
[ 1, 529, 276, 1112, 420, 29958, 13711, 20336, 29899, 29956, 29899, 29950, 309, 880, 29914, 3217, 29903, 29918, 29903, 5031, 616, 29918, 21067, 952, 267, 29966, 9507, 29958, 15807, 403, 29918, 29888, 3217, 29903, 29914, 28667, 29918, 29888, 3...
networkapi/api_network/tests/v3/unit/networkipv6/async/test_delete.py
vinicius-marinho/GloboNetworkAPI
73
115803
# -*- coding: utf-8 -*- import logging from django.test.client import Client from mock import patch from networkapi.api_network.tasks import delete_networkv6 from networkapi.api_network.tasks import undeploy_networkv6 from networkapi.ip.models import NetworkIPv6 from networkapi.test.test_case import NetworkApiTestCas...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 12183, 13, 13, 3166, 9557, 29889, 1688, 29889, 4645, 1053, 12477, 13, 3166, 11187, 1053, 13261, 13, 13, 3166, 3564, 2754, 29889, 2754, 29918, 11618...
tradingview_fxcross.py
project-k-0-1/project-k
1
128644
""" Tradingview FXcross """ from sa_func import get_broker_affiliate_link def get_tradingview_fxcross(width, height): """ Get Tradingview FXcross """ return_data = '' #theme = get_sa_theme() url = get_broker_affiliate_link('Tradingview', 'baseurl') if str(width) == '0': width = '"100%"' ...
[ 1, 9995, 1605, 9382, 1493, 383, 29990, 19128, 9995, 13, 3166, 872, 29918, 9891, 1053, 679, 29918, 6729, 3946, 29918, 3470, 2638, 403, 29918, 2324, 13, 13, 1753, 679, 29918, 509, 9382, 1493, 29918, 11093, 19128, 29898, 2103, 29892, 3171, ...