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
utils/data_preparation.py
hkailee/Quant-Finance
1
111967
<reponame>hkailee/Quant-Finance # importing library packages import os, pickle, requests import bs4 as bs import numpy as np import pandas as pd import pandas_market_calendars as mcal import re from alpha_vantage.timeseries import TimeSeries from datetime import datetime, timedelta from pandas.tseries.holida...
[ 1, 529, 276, 1112, 420, 29958, 29882, 1335, 488, 29872, 29914, 22930, 29899, 12881, 749, 13, 29937, 28348, 3489, 9741, 30004, 13, 5215, 2897, 29892, 5839, 280, 29892, 7274, 30004, 13, 5215, 24512, 29946, 408, 24512, 30004, 13, 5215, 12655...
pymatgen/core/__init__.py
miaoliu/pymatgen
0
112037
""" This package contains core modules and classes for representing structures and operations on them. """ __author__ = "<NAME>" __date__ = "Dec 15, 2010 7:21:29 PM" from .periodic_table import * from .composition import * from .structure import * from .structure_modifier import * from .bonds import * from .lattice i...
[ 1, 9995, 13, 4013, 3577, 3743, 7136, 10585, 322, 4413, 363, 15783, 12286, 322, 13, 3372, 800, 373, 963, 29889, 13, 15945, 29908, 13, 13, 1649, 8921, 1649, 353, 9872, 5813, 11903, 13, 1649, 1256, 1649, 353, 376, 6185, 29871, 29896, 299...
api/data_explorer/models/__init__.py
karamalhotra/data-explorer
0
22127
<gh_stars>0 # coding: utf-8 # flake8: noqa from __future__ import absolute_import # import models into model package from data_explorer.models.dataset_response import DatasetResponse from data_explorer.models.facet import Facet from data_explorer.models.facet_value import FacetValue from data_explorer.models.facets_re...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 17422, 446, 29947, 29901, 694, 25621, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 29937, 1053, 4733, 964, 1904...
trading_api_wrappers/buda/client_public.py
delta575/trading-api-wrappers
44
80830
<filename>trading_api_wrappers/buda/client_public.py from datetime import datetime from . import constants as _c from . import models as _m from ..base import Client, ModelMixin class BudaPublic(Client, ModelMixin): base_url = "https://www.buda.com/api/v2/" error_keys = ["message"] def markets(self): ...
[ 1, 529, 9507, 29958, 509, 9382, 29918, 2754, 29918, 29893, 336, 22437, 29914, 29890, 6191, 29914, 4645, 29918, 3597, 29889, 2272, 13, 3166, 12865, 1053, 12865, 13, 13, 3166, 869, 1053, 17727, 408, 903, 29883, 13, 3166, 869, 1053, 4733, ...
chia_tea/discord/commands/test_wallets.py
Tea-n-Tech/chia-tea
6
1069
<gh_stars>1-10 import os import tempfile import unittest from datetime import datetime from google.protobuf.json_format import ParseDict from ...monitoring.MonitoringDatabase import MonitoringDatabase from ...protobuf.generated.computer_info_pb2 import ADD, UpdateEvent from ...protobuf.generated.monitoring_service_pb...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 5215, 5694, 1445, 13, 5215, 443, 27958, 13, 3166, 12865, 1053, 12865, 13, 13, 3166, 5386, 29889, 17529, 9721, 29889, 3126, 29918, 4830, 1053, 20969, ...
flowpatrolcore/templatetags/flowpatrol_tags.py
chrxr/flowpatrol_old
0
162221
<gh_stars>0 from django import template from django.conf import settings from flowpatrolcore.models import * register = template.Library() # settings value @register.assignment_tag def get_googe_maps_key(): return getattr(settings, 'GOOGLE_MAPS_KEY', "") @register.assignment_tag(takes_context=True) def get_si...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 1053, 4472, 13, 3166, 9557, 29889, 5527, 1053, 6055, 13, 13, 3166, 4972, 5031, 1467, 3221, 29889, 9794, 1053, 334, 13, 13, 9573, 353, 4472, 29889, 12284, 580, 13, 13, 13, ...
tests/test_rw_minio.py
gva-jjoyce/mabel
0
1617451
import os import sys sys.path.insert(1, os.path.join(sys.path[0], "..")) from mabel.adapters.minio import MinIoWriter, MinIoReader from mabel.operators.minio import MinIoBatchWriterOperator from mabel.data import BatchWriter from mabel.data import Reader from rich import traceback traceback.install() BUCKET_NAME = ...
[ 1, 1053, 2897, 13, 5215, 10876, 13, 13, 9675, 29889, 2084, 29889, 7851, 29898, 29896, 29892, 2897, 29889, 2084, 29889, 7122, 29898, 9675, 29889, 2084, 29961, 29900, 1402, 376, 636, 5783, 13, 3166, 286, 1107, 29889, 328, 481, 2153, 29889, ...
muz/beatmap/formats/osu.py
Akaricchi/muz
9
184777
<filename>muz/beatmap/formats/osu.py from __future__ import absolute_import from __future__ import print_function from __future__ import division from __future__ import unicode_literals import re import muz import muz.beatmap import muz.util import math name = "osu! beatmap" extensions = ["osu"] inferExtensions = ex...
[ 1, 529, 9507, 29958, 2589, 29920, 29914, 915, 271, 1958, 29914, 689, 1446, 29914, 359, 29884, 29889, 2272, 13, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 3166, 4770, 29888, 9130, 1649, 1053, 1596, 29918, 2220, 13, 3...
example_site/address/__init__.py
gnipp/django-address
0
87812
default_app_config = "address.apps.AddressConfig"
[ 1, 2322, 29918, 932, 29918, 2917, 353, 376, 7328, 29889, 13371, 29889, 7061, 3991, 29908, 13, 2 ]
bayern/ffb.py
risklayer/corona-landkreis-crawler
12
115722
<filename>bayern/ffb.py #!/usr/bin/python3 from botbase import * _ffb_c = re.compile(r"Stand\s\w+,\s(\d\d?\.\d\d?.20\d\d)\s\((\d\d?:\d\d)\sUhr\),\sgibt\ses\sinsgesamt\s+([0-9.]+)\s*(?:Infektionen|Corona-Infizierte)", re.U) _ffb_d = re.compile(r"Todesfälle insgesamt mit Covid-19-Befund und Wohnsitz im Landkreis Fürsten...
[ 1, 529, 9507, 29958, 27495, 824, 29914, 600, 29890, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 29941, 13, 3166, 9225, 3188, 1053, 334, 13, 13, 29918, 600, 29890, 29918, 29883, 353, 337, 29889, 12198, 29898, 29878, 2990...
bot.py
ShawnQiang1/QQ-GitHub-Bot
0
1616624
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @Author : yanyongyu @Date : 2020-09-10 17:12:05 @LastEditors : yanyongyu @LastEditTime : 2021-01-01 17:57:10 @Description : Entry File of the Bot @GitHub : https://github.com/yanyongyu """ __author__ = "yanyongyu" import nonebot from ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 29992, 13720, 308, 584, 343, 1384, 549, 29891, 29884, 13, 29992, 2539, 965, 5...
solvcon/parcel/bulk/material.py
j8xixo12/solvcon
16
175822
# -*- coding: UTF-8 -*- # # Copyright (c) 2014, <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: # # - Redistributions of source code must retain the above copyright notice, this...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29946, 29892, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937...
pycad/py_src/transformations.py
markendr/esys-escript.github.io
0
2264
############################################################################## # # Copyright (c) 2003-2020 by The University of Queensland # http://www.uq.edu.au # # Primary Business: Queensland, Australia # Licensed under the Apache License, version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # # Development unt...
[ 1, 29871, 13, 13383, 13383, 13383, 13383, 7346, 4136, 2277, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29900, 29941, 29899, 29906, 29900, 29906, 29900, 491, 450, 3014, 310, 25195, 13, 29937, 1732, 597, 1636, ...
stagecraft/apps/datasets/admin/data_type.py
alphagov-mirror/stagecraft
3
72262
<gh_stars>1-10 from __future__ import unicode_literals from django.contrib import admin from reversion.admin import VersionAdmin from stagecraft.apps.datasets.models.data_set import DataSet from stagecraft.apps.datasets.models.data_type import DataType class DataSetInline(admin.StackedInline): model = DataSet ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 3166, 337, 3259, 29889, 6406, 1053, 10079, 12754, 13...
tests/test_number.py
marcodeangelis/intervals
6
104073
import unittest import logging import sys import numpy from intervals.number import Interval as I from intervals.methods import (intervalise,lo,hi) from .interval_generator import pick_endpoints_at_random_uniform class TestIntervalArithmetic(unittest.TestCase): def test_addition_by_endpoints_analysis(self): ...
[ 1, 1053, 443, 27958, 13, 13, 5215, 12183, 13, 5215, 10876, 13, 13, 5215, 12655, 13, 13, 3166, 18747, 29889, 4537, 1053, 4124, 791, 408, 306, 13, 3166, 18747, 29889, 23515, 1053, 313, 19207, 895, 29892, 417, 29892, 2918, 29897, 13, 316...
foxylib/tools/auth/auth0/application/machine_to_machine/foxylib_auth0app_m2m.py
foxytrixy-com/foxylib
0
1612925
import logging import os from dataclasses import dataclass, asdict from functools import reduce, lru_cache from typing import Optional from urllib.parse import urlencode import requests from dacite import from_dict from nose.tools import assert_is_not_none, assert_equal from foxylib.singleton.env.foxylib_env import F...
[ 1, 1053, 12183, 13, 5215, 2897, 13, 3166, 848, 13203, 1053, 848, 1990, 29892, 408, 8977, 13, 3166, 2090, 312, 8789, 1053, 10032, 29892, 301, 582, 29918, 8173, 13, 3166, 19229, 1053, 28379, 13, 3166, 3142, 1982, 29889, 5510, 1053, 3142, ...
test/test_basic.py
CivicKnowledge/metapack-db
0
93049
import unittest from metapack import MetapackDoc from metapack_db import Database, MetatabManager from metapack_db.document import Document from metapack_db.term import Term from os import remove from os.path import exists from sqlalchemy.exc import IntegrityError def test_data(*paths): from os.path import dirn...
[ 1, 1053, 443, 27958, 13, 13, 13, 3166, 1539, 481, 547, 1053, 4737, 481, 547, 14526, 13, 3166, 1539, 481, 547, 29918, 2585, 1053, 5470, 29892, 4737, 271, 370, 3260, 13, 3166, 1539, 481, 547, 29918, 2585, 29889, 3225, 1053, 10854, 13, ...
osbs/tekton.py
tkdchen/osbs-client
0
1611779
""" Copyright (c) 2015, 2019, 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import json import time import logging import base64 import os import requests import copy from osbs.exceptions import OsbsRespon...
[ 1, 9995, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29945, 29892, 29871, 29906, 29900, 29896, 29929, 29892, 29871, 29906, 29900, 29906, 29896, 4367, 25966, 29892, 9266, 13, 3596, 10462, 21676, 29889, 13, 4013, 7047, 1122,...
src/ga4gh/vrs/_internal/models.py
GenomicMedLab/vrs-python
1
66937
<reponame>GenomicMedLab/vrs-python<filename>src/ga4gh/vrs/_internal/models.py """Generate VRS models at runtime from the json schema **This module should not be imported directly.** Instead, users should use one of the following: * `from ga4gh.vrs import models`, and refer to models with the abbreviated name, ...
[ 1, 529, 276, 1112, 420, 29958, 15462, 25426, 19302, 28632, 29914, 29894, 2288, 29899, 4691, 29966, 9507, 29958, 4351, 29914, 3249, 29946, 12443, 29914, 29894, 2288, 19891, 7564, 29914, 9794, 29889, 2272, 13, 15945, 29908, 5631, 403, 478, 12...
tests/test_counters.py
automerge/automerge-py
11
174901
import json import unittest from automerge import doc from automerge.datatypes import Counter class TestCounters(unittest.TestCase): def test_make_counters_behave_like_primitive_numbers(self): d0 = doc.Doc(initial_data={"birds": Counter(3)}) self.assertEqual(d0["birds"], 3) self.assertTrue...
[ 1, 1053, 4390, 13, 5215, 443, 27958, 13, 3166, 3345, 261, 479, 1053, 1574, 13, 3166, 3345, 261, 479, 29889, 4130, 271, 7384, 1053, 315, 5336, 13, 13, 13, 1990, 4321, 29907, 1309, 2153, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, ...
env/lib/python3.4/site-packages/django_extensions/management/signals.py
dj-amadeous/deficit
11
194925
<filename>env/lib/python3.4/site-packages/django_extensions/management/signals.py """ signals we use to trigger regular batch jobs """ from django.dispatch import Signal run_minutely_jobs = Signal() run_quarter_hourly_jobs = Signal() run_hourly_jobs = Signal() run_daily_jobs = Signal() run_weekly_jobs = Signal() run_m...
[ 1, 529, 9507, 29958, 6272, 29914, 1982, 29914, 4691, 29941, 29889, 29946, 29914, 2746, 29899, 8318, 29914, 14095, 29918, 24299, 29914, 21895, 29914, 4530, 1338, 29889, 2272, 13, 15945, 29908, 13, 4530, 1338, 591, 671, 304, 7135, 4943, 9853,...
tools/BlenderProc/src/object/ObjectPoseSampler.py
GeorgSchenzel/pose-detector
0
33811
import bpy import mathutils from src.main.Module import Module from src.utility.BlenderUtility import check_intersection, check_bb_intersection, get_all_mesh_objects class ObjectPoseSampler(Module): """ Samples positions and rotations of selected object inside the sampling volume while performing mesh and ...
[ 1, 1053, 289, 2272, 13, 5215, 5844, 13239, 13, 13, 3166, 4765, 29889, 3396, 29889, 7355, 1053, 15591, 13, 3166, 4765, 29889, 329, 1793, 29889, 10358, 1581, 7270, 537, 1053, 1423, 29918, 1639, 2042, 29892, 1423, 29918, 1327, 29918, 1639, ...
swift/common/ring/__init__.py
vvechkanov/SwiftUml
1
47662
<gh_stars>1-10 from ring import RingData, Ring from builder import RingBuilder __all__ = [ 'RingData', 'Ring', 'RingBuilder', ]
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 9228, 1053, 17716, 1469, 29892, 17716, 13, 3166, 12856, 1053, 17716, 5627, 13, 13, 1649, 497, 1649, 353, 518, 13, 1678, 525, 29934, 292, 1469, 742, 13, 1678, ...
swaglyrics/__init__.py
chriswang030/SwagLyrics-For-Spotify
1
128004
name = 'swaglyrics'
[ 1, 1024, 353, 525, 2774, 351, 368, 10817, 29915, 13, 2 ]
api/battle_client.py
MUzzell/the_pokemon_api
0
57703
from base_client import BaseClient, format_query class BattleClient(BaseClient): retries = 3 def do_battle(self, ident): return self._send_request(format_query("BATTLE", ident))
[ 1, 29871, 13, 3166, 2967, 29918, 4645, 1053, 7399, 4032, 29892, 3402, 29918, 1972, 13, 13, 13, 1990, 12788, 4032, 29898, 5160, 4032, 1125, 13, 1678, 3240, 2722, 353, 29871, 29941, 13, 13, 1678, 822, 437, 29918, 29890, 5315, 29898, 1311,...
apps/usuarios/models.py
RagAndRoll/BlueList
0
83051
<filename>apps/usuarios/models.py # from django.db import models # Create your models here. # comentarios, sera un capo de texto mas relacion comentario a comentario # los itens que pueden ser comentados tendran la llave foranea # el delete no en casacada
[ 1, 529, 9507, 29958, 13371, 29914, 375, 29884, 8596, 29914, 9794, 29889, 2272, 13, 29937, 515, 9557, 29889, 2585, 1053, 4733, 13, 13, 29937, 6204, 596, 4733, 1244, 29889, 13, 29937, 419, 296, 8596, 29892, 16933, 443, 2117, 29877, 316, 1...
osd/classes/blank.py
bmeyers/optimal-signal-decomposition
9
1611835
<filename>osd/classes/blank.py<gh_stars>1-10 # -*- coding: utf-8 -*- ''' Gaussian Noise Component This module contains the class for Gaussian Noise Author: <NAME> ''' import cvxpy as cvx import numpy as np from osd.classes.component import Component class Blank(Component): def __init__(self, **kwargs): ...
[ 1, 529, 9507, 29958, 359, 29881, 29914, 13203, 29914, 19465, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 12008, 22477,...
tests/services/alertrules/test_exfiltration.py
ryanvanasse/py42
0
159571
from py42.services.alertrules import ExfiltrationService class TestExfiltrationClient(object): def test_get_by_id_posts_expected_data_for_exfiltration_type(self, mock_connection): alert_rule_client = ExfiltrationService(mock_connection, u"tenant-id") alert_rule_client.get(u"rule-id") asse...
[ 1, 515, 11451, 29946, 29906, 29889, 9916, 29889, 18362, 509, 2540, 1053, 1222, 1777, 509, 362, 3170, 13, 13, 13, 1990, 4321, 1252, 1777, 509, 362, 4032, 29898, 3318, 1125, 13, 1678, 822, 1243, 29918, 657, 29918, 1609, 29918, 333, 29918,...
unbrake-api/unbrake_api/management/commands/_script.py
fga-eps-mds/2019.1-Simulador-de-Frenagem
9
81220
<gh_stars>1-10 ''' General helper module for running scripts ''' import os from django.core.management import CommandError def run_script(script, error_message=''): ''' General function for running scripts ''' return_code = os.system(script) if return_code: if not error_message: ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 12008, 13, 15263, 16876, 3883, 363, 2734, 12078, 13, 12008, 13, 13, 5215, 2897, 13, 3166, 9557, 29889, 3221, 29889, 21895, 1053, 10516, 2392, 13, 13, 13, 1753, 1065...
12_mrna/solution2_rev_dict.py
ilaydabozan/biofx_python
74
131891
#!/usr/bin/env python3 """ Infer mRNA from Protein """ import argparse import os import math from typing import NamedTuple class Args(NamedTuple): """ Command-line arguments """ protein: str modulo: int # -------------------------------------------------- def get_args() -> Args: """ Get command-lin...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 15945, 29908, 512, 571, 286, 29934, 3521, 515, 14409, 262, 9995, 13, 13, 5215, 1852, 5510, 13, 5215, 2897, 13, 5215, 5844, 13, 3166, 19229, 1053, 405, 2795, 23215, 552, 13, 13...
traceback_with_variables/global_hooks.py
cclauss/traceback_with_variables
550
51147
import sys from typing import NoReturn, Optional, Type from traceback_with_variables.print import print_exc, Format def global_print_exc(fmt: Optional[Format] = None) -> NoReturn: sys.excepthook = lambda e_cls, e, tb: print_exc(e=e, fmt=fmt) def global_print_exc_in_ipython(fmt: Optional[Format] = Non...
[ 1, 1053, 10876, 30004, 13, 3166, 19229, 1053, 1939, 11609, 29892, 28379, 29892, 5167, 30004, 13, 30004, 13, 3166, 9637, 1627, 29918, 2541, 29918, 20897, 29889, 2158, 1053, 1596, 29918, 735, 29883, 29892, 19191, 30004, 13, 30004, 13, 30004, ...
quantiphyse_basil/oxasl_process.py
physimals/quantiphyse-asl
1
94387
""" QP-BASIL - Quantiphyse processes for ASL data These processes use the ``oxasl`` and `fslpyt` python libraries which involves the following key mappings between Quantiphyse concepts and oxasl concepts. - ``quantiphyse.data.QpData`` <-> ``fsl.data.image.Image`` Quantiphyse data objects can be transformed to and ...
[ 1, 9995, 13, 29984, 29925, 29899, 29933, 3289, 6227, 448, 751, 3656, 11461, 344, 10174, 363, 3339, 29931, 848, 13, 13, 1349, 968, 10174, 671, 278, 4954, 2251, 294, 29880, 16159, 322, 421, 29888, 2536, 2272, 29873, 29952, 3017, 9562, 607...
Exercicios/ex063.py
vincytarsis/Python
0
149187
""" Escreva um programa que leia um número n inteiro qualquer e mostre na tela os n primeiros elementos de uma sequência de Fibonacci. Ex: 0 → 1 → 1 → 2 → 3 → 5 → 8 """ n = int(input('Entre com um número:')) a = 0 b = 1 c = 0 count = 1 print('Sequencia de Fibonacci: ', end=' ') while count <= n: print(c, end=' ...
[ 1, 9995, 3423, 1037, 1564, 1922, 16914, 712, 454, 423, 1922, 13831, 302, 2293, 3350, 4021, 7808, 321, 1556, 276, 1055, 260, 3100, 2897, 302, 6019, 17177, 29290, 316, 13, 10859, 8617, 10544, 316, 383, 747, 265, 21566, 29889, 1222, 29901,...
ratings.py
parappayo/rank-em
0
1601265
<reponame>parappayo/rank-em import math class InvalidEventTypeError(Exception): """Raised when event type is unrecognized.""" def __init__(type): self.message = 'type is ' + type class PlayerRegisteredEvent: def __init__(self, player): self.type = 'PlayerRegistered' self.player =...
[ 1, 529, 276, 1112, 420, 29958, 862, 932, 388, 29877, 29914, 10003, 29899, 331, 13, 5215, 5844, 13, 13, 13, 1990, 21403, 2624, 1542, 2392, 29898, 2451, 1125, 13, 1678, 9995, 29934, 1759, 287, 746, 1741, 1134, 338, 443, 29423, 1891, 121...
sdk/python/pulumi_aws_native/pinpoint/get_apns_sandbox_channel.py
pulumi/pulumi-aws-native
29
86114
<reponame>pulumi/pulumi-aws-native<filename>sdk/python/pulumi_aws_native/pinpoint/get_apns_sandbox_channel.py # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulu...
[ 1, 529, 276, 1112, 420, 29958, 29886, 352, 15547, 29914, 29886, 352, 15547, 29899, 10467, 29899, 11487, 29966, 9507, 29958, 15348, 29914, 4691, 29914, 29886, 352, 15547, 29918, 10467, 29918, 11487, 29914, 12687, 3149, 29914, 657, 29918, 481, ...
webhooksocket/models.py
ToxicFrazzles/django-webhooksocket
0
108044
<gh_stars>0 from django.db import models from django.urls import reverse import secrets def random_ident(): characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" return "".join(secrets.choice(characters) for i in range(64)) class Bridge(models.Model): name = models.CharField(max_...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 2585, 1053, 4733, 13, 3166, 9557, 29889, 26045, 1053, 11837, 13, 5215, 22183, 1372, 13, 13, 13, 1753, 4036, 29918, 1693, 7295, 13, 1678, 4890, 353, 376, 10736, 1753, ...
dependencyinjection/internal/param_type_resolver.py
Cologler/dependencyinjection-python
0
12820
<reponame>Cologler/dependencyinjection-python<filename>dependencyinjection/internal/param_type_resolver.py<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2017~2999 - cologler <<EMAIL>> # ---------- # # ---------- import typing import inspect from .errors import ParameterTypeResolveError cl...
[ 1, 529, 276, 1112, 420, 29958, 29907, 1189, 1358, 29914, 10836, 262, 6929, 29899, 4691, 29966, 9507, 29958, 10836, 262, 6929, 29914, 7564, 29914, 3207, 29918, 1853, 29918, 9778, 369, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900...
feed/models.py
Lisgevan/DJANGO-101-PROJECT-COPY
0
14920
from django.db import models from sorl.thumbnail import ImageField # Create your models here. class Post(models.Model): text = models.CharField(max_length=140, blank=False, null=False) image = ImageField() def __str__(self): return self.text
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 3166, 7319, 29880, 29889, 386, 21145, 1053, 7084, 3073, 13, 13, 29937, 6204, 596, 4733, 1244, 29889, 13, 1990, 4918, 29898, 9794, 29889, 3195, 1125, 13, 1678, 1426, 353, 4733, 29889, 27890, 298...
curso/PY2/condicao_aninhada/ex4.py
smrsassa/Studying-Python
1
189781
<reponame>smrsassa/Studying-Python idade = int(input('digite sua idade: ')) if idade < 18: tf = 18 - idade print ('Ainda não é hora de fazer o alistamento') print ('O alistamento será necessario daqui {} anos'.format(tf)) elif idade == 18: print ('Esta na hora de se alistar') else: tf = idade - 18 ...
[ 1, 529, 276, 1112, 420, 29958, 3844, 2288, 24573, 29914, 855, 566, 5414, 29899, 11980, 13, 5558, 353, 938, 29898, 2080, 877, 7501, 568, 4171, 1178, 1943, 29901, 525, 876, 13, 361, 1178, 1943, 529, 29871, 29896, 29947, 29901, 13, 1678, ...
docs.bak/test.py
goujou/CompartmentalSystems
0
17386
<reponame>goujou/CompartmentalSystems<gh_stars>0 from CompartmentalSystems import smooth_reservoir_model from CompartmentalSystems import smooth_model_run from CompartmentalSystems import start_distributions
[ 1, 529, 276, 1112, 420, 29958, 29887, 283, 20551, 29914, 1523, 8076, 284, 3924, 29879, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 422, 8076, 284, 3924, 29879, 1053, 10597, 29918, 690, 261, 7869, 29918, 4299, 13, 3166, 422, ...
distance_travelled.py
maria-kuruvilla/temp_collective_new
0
160140
""" Goal - Calculate distance travelled by each fish Date - Mar 11 2021 """ import os import pathlib from pprint import pprint import numpy as np from scipy import stats from scipy.spatial import distance import matplotlib.pyplot as plt from matplotlib.pyplot import figure import trajectorytools as tt import trajec...
[ 1, 9995, 13, 8120, 284, 448, 20535, 403, 5418, 9850, 839, 491, 1269, 9427, 29871, 13, 2539, 448, 1085, 29871, 29896, 29896, 29871, 29906, 29900, 29906, 29896, 13, 15945, 29908, 13, 13, 5215, 2897, 13, 5215, 2224, 1982, 13, 3166, 282, ...
experiments/timit/config.py
mdenil/parameter_prediction
7
115984
import numpy as np import os import sys data_dir = "/global/scratch/bshakibi/data/timit" base_dir = "scratch_space_COV" template_dir = "templates/COV" NVIS = 429 # This dictionary is available to all templates. # You can add parameters here. global_template_params = { } def _n_atoms_per_column(n_vis, n_columns, ...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 2897, 13, 5215, 10876, 13, 13, 1272, 29918, 3972, 353, 5591, 10945, 29914, 10526, 905, 29914, 29890, 845, 557, 747, 29875, 29914, 1272, 29914, 9346, 277, 29908, 13, 3188, 29918, 3972, 353, 376, 10526...
tools/zoom_flamegraph.py
allevo/rust-advent
16
128850
import fileinput import io from html import escape from html.entities import name2codepoint from html.parser import HTMLParser class MyHTMLParser(HTMLParser): script = False in_a_g = False record_next_y = False g_buffer = None y_limit = None g_current_y = None g_dict = dict() def _pri...
[ 1, 1053, 934, 2080, 13, 5215, 12013, 13, 3166, 3472, 1053, 10169, 13, 3166, 3472, 29889, 296, 1907, 1053, 1024, 29906, 401, 3149, 13, 3166, 3472, 29889, 16680, 1053, 4544, 11726, 13, 13, 13, 1990, 1619, 7020, 11726, 29898, 7020, 11726, ...
py300/py300To120.py
metacogpe/python
0
1617846
# # 사용자 입력 # data = input("") # print(data*2) # # 숫자 입력 + 식 # data = input("숫자를 입력하세요 : ") # print(int(data) + 10) # # 짝수 홀수 판별 # data = input(">> ") # data = int(data) # if data % 2 == 0: # print("짝수") # else: # print("홀수") # 200 # # 255를 초과하는지 여부 # data = input("입력값 : ") # data = int(data) # data = data ...
[ 1, 396, 396, 29871, 30791, 31737, 31013, 29871, 239, 161, 136, 238, 163, 168, 13, 29937, 848, 353, 1881, 703, 1159, 13, 29937, 1596, 29898, 1272, 29930, 29906, 29897, 13, 13, 29937, 396, 29871, 239, 139, 174, 31013, 29871, 239, 161, 1...
state-of-the-data-for-webgis/completeness.py
twever/state-of-the-data
18
1616035
<filename>state-of-the-data-for-webgis/completeness.py """----------------------------------------------------------------------------- Name: completeness.py Purpose: Creates the completness indicator from two caomparable feature classes. Description: This tool calculates the completeness score of a curve featu...
[ 1, 529, 9507, 29958, 3859, 29899, 974, 29899, 1552, 29899, 1272, 29899, 1454, 29899, 2676, 29887, 275, 29914, 5729, 841, 404, 29889, 2272, 13, 15945, 29908, 2683, 2683, 2683, 2683, 9072, 29899, 13, 1170, 29901, 1614, 841, 404, 29889, 2272...
test/functional/test_framework/beerchainconfig.py
beerchainproject/beerchain
0
68906
<filename>test/functional/test_framework/beerchainconfig.py COINBASE_MATURITY = 500 INITIAL_BLOCK_REWARD = 20000 INITIAL_HASH_UTXO_ROOT = 0x21b463e3b52f6201c0ad6c991be0485b6ef8c092e64583ffa655cc1b171fe856 INITIAL_HASH_STATE_ROOT = 0x9514771014c9ae803d8cea2731b2063e83de44802b40dce2d06acd02d0ff65e9 MAX_BLOCK_BASE_SIZE = ...
[ 1, 529, 9507, 29958, 1688, 29914, 2220, 284, 29914, 1688, 29918, 4468, 29914, 915, 261, 14153, 2917, 29889, 2272, 13, 3217, 1177, 25416, 29918, 29924, 1299, 4574, 11937, 353, 29871, 29945, 29900, 29900, 13, 26019, 25758, 29918, 29933, 21339...
app/tests/test_validators.py
ogambakerubo/StackOverflow-lite
0
189520
#StackOverflow-lite/app/tests/test_validators.py """Tests for validators run with pytest""" import unittest from app.api.validators import validate_string class ValidatorsTestCase(unittest.TestCase): def test_for_strings(self): with self.assertRaises(ValueError): validate_string("@##$$Hel...
[ 1, 396, 7264, 23773, 29899, 29880, 568, 29914, 932, 29914, 21150, 29914, 1688, 29918, 3084, 4097, 29889, 2272, 13, 15945, 29908, 24376, 363, 2854, 4097, 1065, 411, 11451, 1688, 15945, 29908, 13, 5215, 443, 27958, 13, 3166, 623, 29889, 275...
rtmbot/app/test_rtmbot.py
narunask/silly_chatbot
0
69779
#!/usr/bin/env python3 # coding: utf-8 from unittest.mock import create_autospec from slackclient import SlackClient, _channel, _server, _util from rtmbot.core import RtmBot from testfixtures import LogCapture from plugins.chatbot import Reply def init_rtmbot(): ''' Initializes an instance of RTMBot with some d...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 3166, 443, 27958, 29889, 17640, 1053, 1653, 29918, 1300, 359, 3135, 13, 3166, 269, 2364, 4645, 1053, 317, 2364, 4032, 29892, 903,...
App/components/entradas.py
Alexfm101/automata
0
156813
<filename>App/components/entradas.py<gh_stars>0 import sys from PyQt5.QtWidgets import * from PyQt5.QtGui import * from PyQt5.QtCore import * dato_entrada = [2,3,4,1] class entradas(QDialog): def __init__(self): super(entradas ,self).__init__() layout = QGridLayout() self.setLayout(layout...
[ 1, 529, 9507, 29958, 2052, 29914, 14036, 29914, 296, 3665, 294, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 10876, 13, 3166, 10772, 17303, 29945, 29889, 17303, 8801, 29879, 1053, 334, 13, 3166, 10772, 17303, 29945, ...
datapackage_pipelines/generators/utilities.py
gperonato/datapackage-pipelines
109
17848
def arg_to_step(arg): if isinstance(arg, str): return {'run': arg} else: return dict(zip(['run', 'parameters', 'cache'], arg)) def steps(*args): return [arg_to_step(arg) for arg in args]
[ 1, 822, 1852, 29918, 517, 29918, 10568, 29898, 1191, 1125, 13, 1678, 565, 338, 8758, 29898, 1191, 29892, 851, 1125, 13, 4706, 736, 11117, 3389, 2396, 1852, 29913, 13, 1678, 1683, 29901, 13, 4706, 736, 9657, 29898, 7554, 18959, 3389, 742...
ThingsConnectorTests/ThingsConnectorBaseTests.py
huvermann/MyPiHomeAutomation
0
52616
import unittest import sys import json sys.path.append("..\ThingsConnector") from ThingsConnectorBase import ThingsConectorBase #from .. import module # Import module from a higher directory. from ThingsItemBase import ThingsItemBase class FunctionMock(object): def __init__(self, ): self.mockCalled = Fals...
[ 1, 29871, 30143, 5215, 443, 27958, 13, 5215, 10876, 13, 5215, 4390, 13, 9675, 29889, 2084, 29889, 4397, 703, 636, 29905, 1349, 886, 20971, 2801, 1159, 13, 3166, 28706, 20971, 2801, 5160, 1053, 28706, 1168, 3019, 5160, 13, 29937, 3166, 6...
ArkDiscordBot/__init__.py
Jackybeat/ArkDiscordBot
1
167560
<reponame>Jackybeat/ArkDiscordBot default_app_config = 'ArkDiscordBot.apps.MyAppConfig'
[ 1, 529, 276, 1112, 420, 29958, 27006, 29891, 915, 271, 29914, 1433, 29895, 4205, 16090, 29933, 327, 13, 4381, 29918, 932, 29918, 2917, 353, 525, 1433, 29895, 4205, 16090, 29933, 327, 29889, 13371, 29889, 3421, 2052, 3991, 29915, 2 ]
setup.py
IvanProgramming/dnevnik_mos_ru
19
47980
<gh_stars>10-100 from setuptools import setup, find_packages from dnevnik import __version__ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup( name='dnevnik-mos-ru', version=__version__, description="This package is kind of wrapper for dnevnik.mos.ru API service"...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 3166, 270, 484, 29894, 5585, 1053, 4770, 3259, 1649, 13, 13, 2541, 1722, 703, 16310, ...
hknweb/events/views/event_transactions/show_event.py
jyxzhang/hknweb
0
18905
from django.shortcuts import render, redirect, reverse from django.contrib import messages from django.shortcuts import get_object_or_404 from django.core.paginator import Paginator from hknweb.utils import markdownify from hknweb.utils import allow_public_access from hknweb.events.constants import ( ACCESSLEVEL_...
[ 1, 515, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29892, 6684, 29892, 11837, 13, 3166, 9557, 29889, 21570, 1053, 7191, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 679, 29918, 3318, 29918, 272, 29918, 29946, 29900, 29946, 13, 3166, ...
graphql_utilities/__init__.py
melvinkcx/graphql-utils
17
108206
from .decorators import run_only_once from .directives import GraphQLCostDirective, schema_with_cost_directive, cost_directive_source_doc from .execution import ExtendedExecutionContext from .utilities import build_schema_with_cost __version__ = "0.4.0" __all__ = [ "run_only_once", "ExtendedExecutionContext",...
[ 1, 515, 869, 19557, 4097, 1053, 1065, 29918, 6194, 29918, 10646, 13, 3166, 869, 11851, 3145, 1053, 12367, 2239, 25733, 17392, 573, 29892, 10938, 29918, 2541, 29918, 18253, 29918, 11851, 573, 29892, 3438, 29918, 11851, 573, 29918, 4993, 2991...
index_creation/pq_index.py
lukasstracke/postgres-word2vec
131
191036
<filename>index_creation/pq_index.py #!/bin/python3 from scipy.cluster.vq import kmeans from scipy.spatial.distance import sqeuclidean from scipy.spatial.distance import cdist import sys import numpy as np import faiss import time import psycopg2 import pickle from config import * from logger import * from vector_feed...
[ 1, 529, 9507, 29958, 2248, 29918, 1037, 362, 29914, 29886, 29939, 29918, 2248, 29889, 2272, 13, 29937, 14708, 2109, 29914, 4691, 29941, 13, 3166, 4560, 2272, 29889, 19594, 29889, 29894, 29939, 1053, 413, 1004, 550, 13, 3166, 4560, 2272, 2...
processing/views.py
Nivocse/notam
0
187252
<gh_stars>0 import io, csv import requests import datetime from . import util from django.shortcuts import render, redirect from django.urls import reverse_lazy from django.views import View from django.http import JsonResponse from django.views.generic import FormView, ListView, CreateView, UpdateView, DeleteView fr...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12013, 29892, 11799, 13, 5215, 7274, 13, 5215, 12865, 13, 3166, 869, 1053, 3667, 13, 13, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 29892, 6684, 13, 3166, 9557, 29889,...
shunt/shunt/hmap.py
velezj/project-manager
0
106668
<gh_stars>0 import logging logger = logging.getLogger( __name__ ) ## # Interface functions for Hiearchichal Maps (hmaps) # which are jsut dictionaries-of-dictionaries :) ##============================================================================ ## # Returns true iff the given object is a structured key with # g...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12183, 13, 21707, 353, 12183, 29889, 657, 16363, 29898, 4770, 978, 1649, 1723, 13, 13, 13, 2277, 13, 29937, 25796, 3168, 363, 379, 347, 1279, 436, 284, 25846, 313, 29882, 10339, ...
eval/run_eval.py
lintool/MSMARCO-Document-Ranking-Archive
2
91689
import argparse import bz2 import gzip import json import re import os import shutil import subprocess from urllib.request import urlretrieve def evaluate_run_with_qrels(run, qrels): output = subprocess.check_output( f'python eval/ms_marco_eval.py {run} eval/{qrels}', shell=True).decode('utf-8') pri...
[ 1, 1053, 1852, 5510, 13, 5215, 289, 29920, 29906, 13, 5215, 330, 7554, 13, 5215, 4390, 13, 5215, 337, 13, 5215, 2897, 13, 5215, 528, 4422, 13, 5215, 1014, 5014, 13, 13, 3166, 3142, 1982, 29889, 3827, 1053, 3142, 276, 509, 2418, 13, ...
async/netdev-async.py
caputomarcos/network-programmability-stream
120
163691
<reponame>caputomarcos/network-programmability-stream import asyncio from datetime import datetime from typing import List, Dict, Any, Iterable, Tuple import netdev import colorama HOSTS = { "R1": "198.18.1.101", "R2": "198.18.1.102", "R3": "198.18.1.103", "R4": "198.18.1.104", "R5": "198.18.1.105...
[ 1, 529, 276, 1112, 420, 29958, 5030, 329, 290, 279, 3944, 29914, 11618, 29899, 8860, 29885, 3097, 29899, 5461, 13, 5215, 408, 948, 3934, 13, 3166, 12865, 1053, 12865, 13, 3166, 19229, 1053, 2391, 29892, 360, 919, 29892, 3139, 29892, 205...
tests.py
Shetty4L/mnist-pytorch
0
45363
if __name__ == '__main__': assert True == True
[ 1, 565, 4770, 978, 1649, 1275, 525, 1649, 3396, 1649, 2396, 13, 1678, 4974, 5852, 1275, 5852, 13, 2 ]
src/api/recorded.py
what-ewer/tuner-backend
0
107527
from flask import Response import json from src.database.db_model import RecordInformation class RecordedAPI: def __init__(self, db_manager, heartbeat_api): self.db_manager = db_manager self.heartbeat = heartbeat_api def get_recorded(self, id): query = """SELECT ri.order_id, ...
[ 1, 515, 29784, 1053, 13291, 13, 5215, 4390, 13, 3166, 4765, 29889, 9803, 29889, 2585, 29918, 4299, 1053, 14164, 20350, 13, 13, 13, 1990, 14164, 287, 8787, 29901, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 4833, 29918, 12847, 29892, ...
app.py
hans00/gitlab-telegram-bot
0
100651
<gh_stars>0 #!/usr/bin/env python3 import os import json import logging from flask import ( Flask, render_template, request, jsonify, g ) from teleflask import Teleflask from teleflask.messages import MarkdownMessage from hashlib import sha1 import requests import dataset import shlex import random...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 5215, 2897, 13, 5215, 4390, 13, 5215, 12183, 13, 3166, 29784, 1053, 313, 13, 1678, 2379, 1278, 29892, 13, 1678, 4050, ...
test/test_rpq_manual.py
6851-2021/retroactive-priority-queue
0
198301
import unittest from retropq import RetroactivePriorityQueue class PriorityQueueManualTest(unittest.TestCase): def test_simple(self): queue = RetroactivePriorityQueue() self.assertEqual([], list(queue)) queue.add_insert(0, 5) self.assertEqual([5], list(queue)) queue.add_in...
[ 1, 1053, 443, 27958, 13, 3166, 3240, 1336, 29939, 1053, 4649, 307, 4925, 29925, 21766, 10620, 13, 13, 1990, 22096, 537, 10620, 2517, 950, 3057, 29898, 348, 27958, 29889, 3057, 8259, 1125, 13, 1678, 822, 1243, 29918, 12857, 29898, 1311, ...
Jumping around and changing speed.py
Toulik1729231/Python3.7
0
143986
import turtle ninja = turtle.Turtle() ninja.speed(10) for i in range(180): ninja.forward(100) ninja.right(30) ninja.forward(20) ninja.left(60) ninja.forward(50) ninja.right(30) ninja.penup() ninja.setposition(0, 0) ninja.pendown() ninja.right(2) ...
[ 1, 1053, 260, 4227, 280, 6756, 13, 30004, 13, 29876, 262, 1764, 353, 260, 4227, 280, 29889, 29911, 4227, 280, 26471, 13, 30004, 13, 29876, 262, 1764, 29889, 19322, 29898, 29896, 29900, 8443, 13, 30004, 13, 1454, 474, 297, 3464, 29898, ...
tests/integration/hub_usage/dummyhub_slow/__init__.py
abreu4/jina
2
7781
import time from jina.executors.crafters import BaseCrafter from .helper import foo class DummyHubExecutorSlow(BaseCrafter): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) time.sleep(15) foo()
[ 1, 1053, 931, 13, 3166, 432, 1099, 29889, 4258, 29560, 29889, 26844, 906, 29879, 1053, 7399, 29907, 336, 906, 13, 13, 3166, 869, 20907, 1053, 7953, 13, 13, 13, 1990, 360, 11770, 16046, 13366, 29903, 677, 29898, 5160, 29907, 336, 906, ...
Auto2DSelect/train.py
MPI-Dortmund/sphire_classes_autoselect
3
1616723
<gh_stars>1-10 #! /usr/bin/env python """ Automatic 2D class selection tool. MIT License Copyright (c) 2019 <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 Softwa...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 29991, 847, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 28451, 2454, 29871, 29906, 29928, 770, 9262, 5780, 29889, 13, 13, 26349, 19245, 13, 13,...
bloodhound_search/bhsearch/query_suggestion.py
HelionDevPlatform/bloodhound
0
89055
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache L...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 13, 13, 29937, 29871, 10413, 21144, 304, 278, 13380, 18540, 10606, 313, 3289, 29943, 29897, 1090, 697, 13, ...
code/Experiments/neon-master/neon/data/datasets.py
matthijsvk/convNets
53
88335
<reponame>matthijsvk/convNets # ---------------------------------------------------------------------------- # Copyright 2014-2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lice...
[ 1, 529, 276, 1112, 420, 29958, 2922, 386, 823, 4501, 29895, 29914, 20580, 29940, 1691, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 5634, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29946, 29899, 29906, 29900, 29896, 29953, 405, ...
anyway/parsers/cbs.py
edermon/anyway
0
18387
# -*- coding: utf-8 -*- import glob import os import json from collections import OrderedDict import itertools import re from datetime import datetime import six from six import iteritems from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import or_ from .. import field_names, localization from ..models impo...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 13149, 13, 5215, 2897, 13, 5215, 4390, 13, 3166, 16250, 1053, 8170, 287, 21533, 13, 5215, 4256, 8504, 13, 5215, 337, 13, 3166, 12865, 1053, 12865...
http.py
Senarc-Studios/Semethon
2
54770
import requests import cool_utils from typing import Union cache = {} cool_utils.JSON.open("config") class HTTPClient: def __init__(self): self.username = None self.token = None self.BASE = cool_utils.JSON.get_data("server") @classmethod def create_request( self, t...
[ 1, 1053, 7274, 13, 5215, 12528, 29918, 13239, 13, 3166, 19229, 1053, 7761, 13, 13, 8173, 353, 6571, 13, 1111, 324, 29918, 13239, 29889, 7249, 29889, 3150, 703, 2917, 1159, 13, 13, 1990, 7331, 4032, 29901, 13, 1678, 822, 4770, 2344, 12...
src/opendr/control/mobile_manipulation/mobileRL/envs/eeplanner.py
makistsantekidis/opendr
3
38120
# Copyright 2020-2021 OpenDR European Project # # 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 agree...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 29899, 29906, 29900, 29906, 29896, 4673, 8353, 7824, 8010, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, ...
scripts/ssc/models/Competitors/test_competitors.py
MrBellamonte/MT-VAEs-TDA
0
112736
<gh_stars>0 from scripts.ssc.models.Competitors.config_libraries.umap_mnist import ( umap_mnist_test_local, umap_mnist_euler_1) from src.competitors.train_engine import simulator_competitor if __name__ == "__main__": for config in umap_mnist_test_local.configs_from_grid(): print(config) sim...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 12078, 29889, 893, 29883, 29889, 9794, 29889, 6843, 300, 17259, 29889, 2917, 29918, 492, 8464, 29889, 398, 481, 29918, 23521, 391, 1053, 313, 13, 1678, 1922, 481, 29918, 23521, 391,...
dataset_split.py
Complicateddd/Complicateddd-ROITransformer
0
116027
import os import random import shutil file=os.listdir("/media/ubuntu/data/huojianjun/科目四热身赛数据/labelTxt") tv=int(len(file)*0.8) list_one=list(range(1,len(file)+1)) trainval=random.sample(list_one,tv) for i in list_one: if i in trainval: shutil.copy(os.path.join('/media/ubuntu/data/huojianjun/科目四热身赛数据/images/{}.tif...
[ 1, 1053, 2897, 13, 5215, 4036, 13, 5215, 528, 4422, 13, 13, 1445, 29922, 359, 29889, 1761, 3972, 11974, 9799, 29914, 8767, 29914, 1272, 29914, 6905, 3848, 713, 29926, 348, 29914, 31030, 30895, 30928, 234, 134, 176, 31687, 235, 184, 158,...
Task/urls.py
DudaEugen/JustTesting
0
129585
<reponame>DudaEugen/JustTesting<gh_stars>0 from django.conf.urls import url from .views import * urlpatterns = [ url(r'^lists$', TaskListView.as_view(), name='task lists'), url(r'^list=(?P<task_list_pk>\d+)/multiple_choice_tests', MultipleChoiceTestsOfTaskLisk.as_view(), name="multiple choice tests o...
[ 1, 529, 276, 1112, 420, 29958, 29928, 6191, 29923, 10214, 29914, 14084, 3057, 292, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 13, 3166, 869, 7406, 1053, 334, 13, 13, 2271, 11...
last_time/noise_utils.py
abdelabdalla/deepmind-research
0
66928
<reponame>abdelabdalla/deepmind-research # Lint as: python3 # pylint: disable=g-bad-file-header # Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a c...
[ 1, 529, 276, 1112, 420, 29958, 370, 6144, 370, 29881, 9864, 29914, 24535, 24021, 29899, 690, 2842, 13, 29937, 365, 524, 408, 29901, 3017, 29941, 13, 29937, 282, 2904, 524, 29901, 11262, 29922, 29887, 29899, 12313, 29899, 1445, 29899, 6672...
model.py
andriikushch/CarND-Behavioral-Cloning-P3
1
29498
<gh_stars>1-10 import csv from math import ceil import cv2 import numpy as np from sklearn.model_selection import train_test_split import sklearn from keras.models import Sequential from keras.layers import Flatten, Dense, Lambda, BatchNormalization, Dropout, Cropping2D from keras.layers.convolutional import Convoluti...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 11799, 13, 3166, 5844, 1053, 2257, 309, 13, 13, 5215, 13850, 29906, 13, 5215, 12655, 408, 7442, 13, 3166, 2071, 19668, 29889, 4299, 29918, 21731, 1053, 7945, ...
dinamics/pieces/bishop.py
RiccardoTancredi/Chess
1
89726
<reponame>RiccardoTancredi/Chess from dinamics.piece import Piece from dinamics.constants import ROWS, COLS class Bishop(Piece): def __init__(self, color): super().__init__(color) def get_movements(self): count = min(ROWS, COLS) moves = set() for k in range(-count, count): ...
[ 1, 529, 276, 1112, 420, 29958, 29934, 293, 29883, 6491, 29911, 273, 1037, 6051, 29914, 1451, 404, 13, 3166, 4538, 314, 1199, 29889, 12343, 346, 1053, 26005, 346, 13, 3166, 4538, 314, 1199, 29889, 3075, 1934, 1053, 16641, 7811, 29892, 48...
extract.py
facebookresearch/banmo
201
1611344
<reponame>facebookresearch/banmo # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. from absl import flags, app import sys sys.path.insert(0,'third_party') import numpy as np import torch import os import glob import pdb import cv2 import trimesh from scipy.spatial.transform import Rotation as R i...
[ 1, 529, 276, 1112, 420, 29958, 15445, 690, 2842, 29914, 2571, 4346, 13, 29937, 14187, 1266, 313, 29883, 29897, 13327, 29892, 9266, 29889, 322, 967, 23736, 1078, 29889, 2178, 10462, 21676, 29889, 13, 13, 3166, 633, 2536, 1053, 13449, 29892...
PersonalSite/projects/scripts/sudoku3.py
joeyuan19/flaming-bear
0
94497
<reponame>joeyuan19/flaming-bear<gh_stars>0 #!/bin/sh # sudoku3.py # SudokuSolver # # Created by <NAME> on 3/6/11. # Copyright 2011 __MyCompanyName__. All rights reserved. import time import sys def rowbyrow(): d = [] for i in range(9): x = INPUT_PROCESS(i) d.append(x) for k,i in enumerat...
[ 1, 529, 276, 1112, 420, 29958, 2212, 1032, 12323, 29896, 29929, 29914, 1579, 11500, 29899, 29890, 799, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 2109, 29914, 845, 13, 13, 29937, 5053, 9154, 29941, 29889, 2272, 13, 29...
classical/socialforce.py
JosephGesnouin/Asymmetrical-Bi-RNNs-to-encode-pedestrian-trajectories
9
105724
<reponame>JosephGesnouin/Asymmetrical-Bi-RNNs-to-encode-pedestrian-trajectories<filename>classical/socialforce.py import numpy as np from scipy.interpolate import interp1d import trajnetplusplustools import socialforce from socialforce.potentials import PedPedPotential from socialforce.fieldofview import FieldOfView ...
[ 1, 529, 276, 1112, 420, 29958, 26473, 561, 29954, 267, 22897, 262, 29914, 2887, 962, 2527, 16888, 29899, 20517, 29899, 29934, 10262, 29879, 29899, 517, 29899, 12508, 29899, 9795, 342, 6392, 29899, 3018, 622, 3842, 29966, 9507, 29958, 1990, ...
pygem/openfhandler.py
endelgado/PyGeM
2
75454
""" Derived module from filehandler.py to handle OpenFOAM files. """ import numpy as np import pygem.filehandler as fh class OpenFoamHandler(fh.FileHandler): """ OpenFOAM mesh file handler class. :cvar string infile: name of the input file to be processed. :cvar string outfile: name of the output fil...
[ 1, 9995, 13, 15383, 2347, 3883, 515, 934, 13789, 29889, 2272, 304, 4386, 4673, 5800, 5194, 2066, 29889, 13, 15945, 29908, 13, 5215, 12655, 408, 7442, 13, 5215, 19484, 331, 29889, 1445, 13789, 408, 285, 29882, 13, 13, 13, 1990, 4673, 2...
exercise/newfile45.py
LeeBeral/python
0
23077
<filename>exercise/newfile45.py<gh_stars>0 show databases; show tables desc table名 use database名 delete from 库名.表名 where id=5; select * from 表名 where id=5; update 表名 set age=15,home='北京' where id=5
[ 1, 529, 9507, 29958, 735, 6269, 895, 29914, 1482, 1445, 29946, 29945, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 4294, 21218, 2104, 13, 4294, 6131, 30004, 13, 14273, 1591, 30548, 30004, 13, 1509, 2566, 30548, 30004, 13...
fast_home_api/routes/auth.py
DevN00bs/FastHomeNextAPI
0
1614065
<gh_stars>0 from apiflask import APIBlueprint, input, output, abort, doc import fast_home_api.controllers.auth as auth import fast_home_api.controllers.mail as mail import fast_home_api.models.auth as models from ..utils.enums import ControllerStatus router = APIBlueprint("auth", __name__, "Authentication", url_prefi...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 3095, 361, 29880, 1278, 1053, 3450, 21319, 2158, 29892, 1881, 29892, 1962, 29892, 27450, 29892, 1574, 13, 13, 5215, 5172, 29918, 5184, 29918, 2754, 29889, 1285, 11897, 29889, 5150, ...
models/vit_utils/layers/norm_act.py
Kanaricc/M3TR
3
135128
<filename>models/vit_utils/layers/norm_act.py """ Normalization + Activation Layers """ import torch from torch import nn as nn from torch.nn import functional as F from .create_act import get_act_layer class BatchNormAct2d(nn.BatchNorm2d): """BatchNorm + Activation This module performs BatchNor...
[ 1, 529, 9507, 29958, 9794, 29914, 29894, 277, 29918, 13239, 29914, 29277, 29914, 12324, 29918, 627, 29889, 2272, 13, 15945, 29908, 21981, 2133, 718, 21775, 362, 365, 388, 414, 30004, 13, 15945, 19451, 13, 5215, 4842, 305, 30004, 13, 3166,...
nappy/nc_interface/na_content_collector.py
ahurka/nappy
0
73600
# Copyright (C) 2004 CCLRC & NERC( Natural Environment Research Council ). # This software may be distributed under the terms of the # Q Public License, version 1.0 or later. http://ndg.nerc.ac.uk/public_docs/QPublic_license.txt """ na_content_collector.py ======================= Holds the class NAContentCollec...
[ 1, 396, 259, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29900, 29946, 315, 6154, 10363, 669, 405, 1001, 29907, 29898, 18385, 16738, 10550, 8831, 13742, 13, 29937, 259, 910, 7047, 1122, 367, 13235, 1090, 278, 4958, 310, 278, 13, ...
nowcasting_dataset/data_sources/fake.py
vnshanmukh/nowcasting_dataset
0
151346
""" To make fake Datasets Wanted to keep this out of the testing frame works, as other repos, might want to use this """ from typing import List import numpy as np import pandas as pd import xarray as xr from nowcasting_dataset.consts import NWP_VARIABLE_NAMES, SAT_VARIABLE_NAMES from nowcasting_dataset.data_sources...
[ 1, 9995, 1763, 1207, 25713, 13373, 294, 1691, 13, 13, 29956, 9714, 304, 3013, 445, 714, 310, 278, 6724, 3515, 1736, 29892, 408, 916, 17573, 29892, 1795, 864, 304, 671, 445, 13, 15945, 29908, 13, 3166, 19229, 1053, 2391, 13, 13, 5215, ...
ronin_3d/source/ronin_lstm_tcn.py
zju3dv/rnin-vio
10
37782
import json import os import sys import time from os import path as osp from pathlib import Path from shutil import copyfile import numpy as np import torch from torch.optim.lr_scheduler import ReduceLROnPlateau from torch.utils.data import DataLoader from tqdm import tqdm from model_temporal import LSTMSeqNetwork, B...
[ 1, 1053, 4390, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 931, 13, 3166, 2897, 1053, 2224, 408, 288, 1028, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 528, 4422, 1053, 3509, 1445, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305...
scripts/build_LSTM_features.py
bhigy/zr-2021vg_baseline
6
83880
<reponame>bhigy/zr-2021vg_baseline # Based on https://github.com/bootphon/zerospeech2021_baseline/blob/master/scripts/build_LSTM_features.py import os import sys import json import argparse import progressbar from pathlib import Path from time import time import numpy as np from copy import deepcopy import torch from...
[ 1, 529, 276, 1112, 420, 29958, 29890, 29882, 335, 29891, 29914, 29920, 29878, 29899, 29906, 29900, 29906, 29896, 29894, 29887, 29918, 6500, 5570, 13, 29937, 16564, 373, 2045, 597, 3292, 29889, 510, 29914, 4777, 17607, 29914, 3298, 359, 412,...
zvmsdk/vmops.py
jasealpers/python-zvm-sdk
9
15658
<gh_stars>1-10 # Copyright 2017 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, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29955, 27955, 2994, 29886, 29889, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, ...
test/test_all_contacts.py
Sergggio/python_training
0
1765
import re from model.contact import Contact def test_all_contacts(app, db): contacts_from_db = db.get_contact_list() phone_list_from_db = db.phones_from_db() #email_liset_from_db = db.emails_from_db() phone_list = [] for phone in phone_list_from_db: phone_list.append(merge_phones_like_on_h...
[ 1, 1053, 337, 13, 3166, 1904, 29889, 12346, 1053, 22387, 13, 13, 13, 1753, 1243, 29918, 497, 29918, 12346, 29879, 29898, 932, 29892, 4833, 1125, 13, 1678, 25957, 29918, 3166, 29918, 2585, 353, 4833, 29889, 657, 29918, 12346, 29918, 1761, ...
jina/drivers/helper.py
boussoffara/jina
0
131504
<gh_stars>0 __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import mimetypes import os import urllib.parse import urllib.request from typing import Dict, Any, Iterable, Tuple, Union, List import numpy as np from ..proto import jina_pb2 def pb2array(blob: 'jina_...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 1649, 8552, 1266, 1649, 353, 376, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 435, 1099, 319, 29902, 28873, 29889, 2178, 10462, 21676, 1213, 13, 1649, 506, 1947, 16...
core/domain/html_domain_test.py
mehrdad-shokri/oppia
0
101797
<gh_stars>0 # coding: utf-8 # # Copyright 2020 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 29937, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 450, 438, 407, 423, 13189, 943, 29889, 2178, 26863, 2538, 9841, 29889, ...
mnist/replay/train_gan.py
limberc/hypercl
0
55642
<gh_stars>0 #!/usr/bin/env python3 # Copyright 2019 <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 ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29929, 529, 5813, 29958, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380,...
api/flags/migrations/0010_flaggingrule_excluded_values.py
django-doctor/lite-api
0
186849
# Generated by Django 2.2.16 on 2021-01-04 15:57 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("flags", "0009_auto_20201229_1454"), ] operations = [ migrations.AddField( model_name="fla...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29896, 29953, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29900, 29896, 29899, 29900, 29946, 29871, 29896, 29945, 29901, 29945, 29955, 13, 13, 5215, 9557, 29889, 21570, 2988...
mat3json.py
tienhaophung/poseval
0
30763
<gh_stars>0 import os # import json from scipy.io import loadmat import argparse import mat4py import h5py import json_tricks as json parser = argparse.ArgumentParser(description="Convert .mat to .json file") parser.add_argument("-ddir", "--data_dir", type=str, default="", help="Data directory of ....
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 2897, 13, 29937, 1053, 4390, 13, 3166, 4560, 2272, 29889, 601, 1053, 2254, 2922, 13, 5215, 1852, 5510, 13, 5215, 1775, 29946, 2272, 13, 5215, 298, 29945, 2272, 13, 5215, 4390, 2...
code/char_histo.py
tumuum/prog-book
0
177149
""" In this problem, we need a structure to store which character occurs how many times. It is best to use a dict object; but here we will use only lists. We will keep counts in a list of two element lists. For example: [["a",3],["b",5],["z",3]] """ def add_char(store,char): """add a character to the count store"...
[ 1, 9995, 13, 797, 445, 1108, 29892, 591, 817, 263, 3829, 304, 3787, 607, 2931, 10008, 920, 1784, 13, 3706, 29889, 739, 338, 1900, 304, 671, 263, 9657, 1203, 29936, 541, 1244, 591, 674, 671, 871, 8857, 29889, 1334, 674, 13, 17462, 18...
lists/stocks.py
migueldv90/stock-analysis
0
108846
<filename>lists/stocks.py tickers = [ 'aapl', 'tsla', ]
[ 1, 529, 9507, 29958, 21513, 29914, 17712, 29879, 29889, 2272, 13, 24667, 414, 353, 518, 13, 1678, 525, 29874, 481, 29880, 742, 13, 1678, 525, 1372, 433, 742, 13, 29962, 13, 2 ]
src/decode_data.py
andersberliner/decoder-ring
2
123867
<reponame>andersberliner/decoder-ring """ Module to decode byte-stream """ import os import pandas as pd import numpy as np from copy import deepcopy from warnings import warn # Relative imports from .lib import DATA_TYPES, DecoderRingError, cast_from_bytes, get_nbytes, get_filesize # Number of bytes in the packet PA...
[ 1, 529, 276, 1112, 420, 29958, 392, 414, 495, 1915, 261, 29914, 7099, 6119, 29899, 5393, 13, 15945, 29908, 13, 7355, 304, 21822, 7023, 29899, 5461, 13, 15945, 29908, 13, 5215, 2897, 13, 5215, 11701, 408, 10518, 13, 5215, 12655, 408, 7...
barcode.py
kallangerard/grocery-barcode-scanner
0
2709
import logging import groceries.api as groceries import barcodescanner.scan as barcode def main(): grocy = groceries.GrocyAPIClient() while True: scanner = barcode.Scan() line = scanner.PollScanner() if line != None: response = grocy.consume_barcode(line) loggin...
[ 1, 1053, 12183, 13, 5215, 4071, 2265, 583, 29889, 2754, 408, 4071, 2265, 583, 13, 5215, 2594, 18137, 29883, 7310, 29889, 16192, 408, 2594, 401, 13, 13, 13, 1753, 1667, 7295, 13, 1678, 4071, 1270, 353, 4071, 2265, 583, 29889, 29954, 30...