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
hard-gists/6532185/snippet.py
jjhenkel/dockerizeme
21
189767
<gh_stars>10-100 #!/usr/bin/env python # September 2013 # by <NAME>, @bordignon on Twitter # # Simple Python script (v2.7x) that subscribes to a MQTT broker topic and inserts the topic into a mysql database # This is designed for the http://mqttitude.org/ project backend # import MySQLdb import mosquitto import json i...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 3839, 29871, 29906, 29900, 29896, 29941, 13, 29937, 491, 529, 5813, 10202, 732, 29890, 536,...
textadapter/tests/data/benchmarks.py
ContinuumIO/TextAdapter
22
52358
import timeit import os def timeFunction(function, setup): print 'timing', function t = timeit.Timer(stmt=function, setup=setup) times = [] for i in range(0,3): os.system('sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"') times.append(str(t.timeit(number=1))) return min(times)...
[ 1, 1053, 931, 277, 13, 5215, 2897, 13, 13, 13, 1753, 931, 6678, 29898, 2220, 29892, 6230, 1125, 13, 1678, 1596, 525, 9346, 292, 742, 740, 13, 1678, 260, 353, 931, 277, 29889, 14745, 29898, 17868, 29922, 2220, 29892, 6230, 29922, 14669...
neutronpy/instrument/chopper.py
neutronpy/neutronpy
14
176213
<gh_stars>10-100 # -*- coding: utf-8 -*- r"""Chopper class for Time of Flight instrument """ import numpy as np from .exceptions import ChopperError class Chopper(object): r"""Class defining a chopper object for using Time of Flight spectrometer resolution calculations. Parameters ---------- di...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 29878, 15945, 29908, 15954, 2496, 770, 363, 5974, 310, 2379, 523, 1139...
reproducer/reproduced_results_analyzer.py
BugSwarm/bugswarm
18
143052
<reponame>BugSwarm/bugswarm import getopt import logging import os import sys import time from typing import List from typing import Tuple from bugswarm.analyzer import analyzer from bugswarm.common import log from bugswarm.common.json import read_json from bugswarm.common.json import write_json from bugswarm.common....
[ 1, 529, 276, 1112, 420, 29958, 29933, 688, 10840, 2817, 29914, 6152, 2774, 2817, 13, 5215, 679, 3670, 13, 5215, 12183, 13, 5215, 2897, 13, 5215, 10876, 13, 5215, 931, 13, 13, 3166, 19229, 1053, 2391, 13, 3166, 19229, 1053, 12603, 552,...
dashPages/value_boxes/callbacks.py
jinniuai/dash-fasta
0
198724
<reponame>jinniuai/dash-fasta from main import app from dash.dependencies import Input, Output, State
[ 1, 529, 276, 1112, 420, 29958, 28789, 21399, 1794, 29914, 14592, 29899, 29888, 5427, 13, 3166, 1667, 1053, 623, 13, 3166, 12569, 29889, 22594, 418, 1053, 10567, 29892, 10604, 29892, 4306, 13, 13, 2 ]
public_plugins/portals/portals.py
Infinity-LTD/discord_gradiusbot
10
115622
<reponame>Infinity-LTD/discord_gradiusbot import asyncio import logging logger = logging.getLogger('gradiusbot') logger.info("[Public Plugin] <portals.py>: This plugin allows you to use portals to move your messages around!") portal_dict = {} @asyncio.coroutine async def action(**kwargs): message = kwargs['mes...
[ 1, 529, 276, 1112, 420, 29958, 797, 4951, 537, 29899, 5850, 29928, 29914, 2218, 16090, 29918, 5105, 2482, 7451, 13, 5215, 408, 948, 3934, 13, 5215, 12183, 13, 13, 21707, 353, 12183, 29889, 657, 16363, 877, 5105, 2482, 7451, 1495, 13, ...
Problem 10/advent10b.py
mankybansal/advent-of-code-2020
0
41664
from collections import Counter adapters = [] for line in open('input.txt', 'r').readlines(): adapters.append(int(line.strip())) adapters = sorted(adapters) device_joltage = adapters[-1] + 3 adapters.append(device_joltage) dp = Counter() dp[0] = 1 for adapter in adapters: dp[adapter] = dp[adapter - 3] + dp[adapte...
[ 1, 515, 16250, 1053, 315, 5336, 13, 13, 328, 481, 2153, 353, 5159, 13, 1454, 1196, 297, 1722, 877, 2080, 29889, 3945, 742, 525, 29878, 2824, 949, 9012, 7295, 13, 12, 328, 481, 2153, 29889, 4397, 29898, 524, 29898, 1220, 29889, 17010, ...
claims_to_quality/lib/teradata_methods/sql_formatting.py
CMSgov/qpp-claims-to-quality-public
13
61960
<filename>claims_to_quality/lib/teradata_methods/sql_formatting.py """SQL formatting for Teradata queries.""" class SQLFormattingError(Exception): """Custom Exception handling for empty SQL lists.""" pass def to_sql_list(iterable): """ Transform a Python list to a SQL list. input = [a1, a2] ...
[ 1, 529, 9507, 29958, 29883, 8342, 29879, 29918, 517, 29918, 29567, 29914, 1982, 29914, 357, 7221, 29918, 23515, 29914, 2850, 29918, 689, 23980, 29889, 2272, 13, 15945, 29908, 4176, 15998, 363, 5061, 7221, 9365, 1213, 15945, 13, 13, 13, 19...
zapbot.py
fernandoepm1/zapbot
0
91129
<reponame>fernandoepm1/zapbot<filename>zapbot.py<gh_stars>0 from selenium import webdriver from time import sleep import os class Zapbot: dir_path = os.getcwd() chromedriver = os.path.join(dir_path, "chromedriver_linux64") profile = os.path.join(dir_path, "profile", "wpp") def __init__(self): self.options...
[ 1, 529, 276, 1112, 420, 29958, 24023, 1743, 1022, 29885, 29896, 29914, 29920, 481, 7451, 29966, 9507, 29958, 29920, 481, 7451, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 18866, 1053, 1856, 9465, 13, 3166, 931, 10...
louis/webdev/myblog/blog/admin.py
GadinganJayHarley06/intern-blog
0
35293
<filename>louis/webdev/myblog/blog/admin.py from django.contrib import admin from .models import Index, Tag, Category, Post # Register your models here. admin.site.register(Index) admin.site.register(Tag) admin.site.register(Category) admin.site.register(Post)
[ 1, 529, 9507, 29958, 23581, 275, 29914, 2676, 3359, 29914, 1357, 7312, 29914, 7312, 29914, 6406, 29889, 2272, 13, 3166, 9557, 29889, 21570, 1053, 4113, 13, 13, 3166, 869, 9794, 1053, 11374, 29892, 10522, 29892, 17943, 29892, 4918, 13, 13,...
scholarly_citation_finder/apps/parser/Parser.py
citationfinder/scholarly_citation_finder
1
111599
<reponame>citationfinder/scholarly_citation_finder #!/usr/bin/python # -*- coding: utf-8 -*- import logging from django.db import connections from django.db.utils import IntegrityError, DataError, ProgrammingError from .AuthorParser import AuthorParser from .Exceptions import ParserRollbackError, ParserDataError from ...
[ 1, 529, 276, 1112, 420, 29958, 29883, 7018, 2886, 261, 29914, 816, 10170, 368, 29918, 29883, 7018, 29918, 2886, 261, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 2...
{{cookiecutter.project_slug}}/sources/app/config/settings/components/security.py
AsheKR/cookiecutter-django
0
14607
<filename>{{cookiecutter.project_slug}}/sources/app/config/settings/components/security.py # https://docs.djangoproject.com/en/dev/ref/settings/#secure-proxy-ssl-header SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") # https://docs.djangoproject.com/en/dev/ref/settings/#secure-ssl-redirect SECURE_SSL_REDI...
[ 1, 529, 9507, 29958, 6224, 15108, 21199, 6463, 29889, 4836, 29918, 29517, 930, 29914, 29879, 2863, 29914, 932, 29914, 2917, 29914, 11027, 29914, 14036, 29914, 8926, 29889, 2272, 13, 29937, 2045, 597, 2640, 29889, 19776, 574, 26555, 622, 298...
scanner/chair_sqlite.py
NNMartin/ChairDetector
0
128173
<gh_stars>0 import sqlite3 as sql from pandas import DataFrame from typing import List, Tuple def sqlfstr(s: str): """ Returns the string <s> as string format used for SQL parameter input. :param s: String to reformat. :return: str """ return s.replace('"', '""') def open_conn(db_name="scan...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 21120, 29941, 408, 4576, 13, 3166, 11701, 1053, 3630, 4308, 13, 3166, 19229, 1053, 2391, 29892, 12603, 552, 13, 13, 13, 1753, 4576, 29888, 710, 29898, 29879, 29901, 851, 1125, 13,...
apps/recipes/management/commands/import_ingredients_csv.py
AleksandrTka4uk/foodgram-project
0
121546
import csv from django.core.management.base import BaseCommand from apps.recipes.models import Ingredient class Command(BaseCommand): help = 'Import data from ingredients.csv' def handle(self, *args, **options): with open('ingredients.csv', newline='', encoding='utf-8') as csvfile: read...
[ 1, 1053, 11799, 13, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 13, 13, 3166, 11446, 29889, 4361, 5547, 29889, 9794, 1053, 22607, 1127, 993, 13, 13, 13, 1990, 10516, 29898, 5160, 6255, 1125, 13, 1678, 1371,...
tree.py
s-gehring/modules
0
146727
import network import string import io import pdf_files as pdf global_leaves= 0 global_nodes = 0 global_lectures=0 def get_tree(link, deep_search=False, first_iteration=True): global global_leaves, global_nodes c = network.get_content(link) #print c.prettify() if is_leaf(c): #leaf glo...
[ 1, 1053, 3564, 13, 5215, 1347, 13, 5215, 12013, 13, 5215, 13552, 29918, 5325, 408, 13552, 13, 13, 10945, 29918, 280, 5989, 29922, 29871, 29900, 13, 10945, 29918, 18010, 353, 29871, 29900, 13, 10945, 29918, 781, 1973, 29922, 29900, 13, 1...
typarser/_base_optarg.py
ermishechkin/typarser
0
27542
from __future__ import annotations import typing from typing import Callable, Generic, Iterable, Literal, Optional, Tuple, Union from ._base import RESULT, TYPE, BaseComponent from ._internal_namespace import set_value if typing.TYPE_CHECKING: from ._base import Namespace from .action import Action NARGS...
[ 1, 515, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 5215, 19229, 13, 3166, 19229, 1053, 8251, 519, 29892, 3251, 293, 29892, 20504, 519, 29892, 5449, 284, 29892, 28379, 29892, 12603, 552, 29892, 7761, 13, 13, 3166, 869, 29918, 3188, 10...
tests/test_angular_style.py
rainchen/git-changelog
1
68128
from git_changelog.build import Commit from git_changelog.style import AngularStyle def test_angular_style_breaking_change(): subject = "feat: this is a new breaking feature" body = ["BREAKING CHANGE: there is a breaking feature in this code"] commit = Commit(hash="aaaaaaa", subject=subject, body=body, au...
[ 1, 515, 6315, 29918, 305, 9477, 468, 29889, 4282, 1053, 1876, 277, 13, 3166, 6315, 29918, 305, 9477, 468, 29889, 3293, 1053, 11575, 5568, 13, 13, 13, 1753, 1243, 29918, 6825, 29918, 3293, 29918, 1030, 5086, 29918, 3167, 7295, 13, 1678, ...
src/class_1/code.py
byteEpoch/python_course
1
166971
# Esto es un comentario # enteros - int my_int = 42 # reales - float my_float = 3.14 # strings - str my_str = 'string con comilla simple' my_str_2 = "string con comilla doble" my_str_3 = """string multilinea""" """Los strings multilinea pueden servir para poner comentarios de varias líneas""" # booleans - bool my...
[ 1, 396, 2661, 29877, 831, 443, 419, 296, 2628, 13, 13, 29937, 3896, 359, 448, 938, 13, 1357, 29918, 524, 353, 29871, 29946, 29906, 13, 13, 29937, 1855, 267, 448, 5785, 13, 1357, 29918, 7411, 353, 29871, 29941, 29889, 29896, 29946, 13,...
pip_services3_prometheus/count/__init__.py
pip-services-python/pip-services-prometheus-python
0
34907
<filename>pip_services3_prometheus/count/__init__.py # -*- coding: utf-8 -*- __all__ = ['PrometheusCounterConverter', 'PrometheusCounters'] from .PrometheusCounterConverter import PrometheusCounterConverter from .PrometheusCounters import PrometheusCounters
[ 1, 529, 9507, 29958, 13096, 29918, 9916, 29941, 29918, 14032, 23043, 375, 29914, 2798, 29914, 1649, 2344, 26914, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 1649, 497, 1649, 353, 6024, ...
3.py
hubieva-a/lab5
0
45866
# Дано предложение. Удалить из него все буквы о, стоящие на нечетных местах. # !/usr/bin/env python3 # -*- coding: utf-8 -*- if __name__ == '__main__': n = str(input("Предложение - ")) m = len(n) for i in range(1, m): i = str(i) if n.find(i) % 2 == 1: n = n.replace('...
[ 1, 396, 8371, 570, 4570, 843, 11567, 29889, 2014, 840, 644, 1413, 1866, 20507, 6495, 3180, 29951, 4938, 614, 29892, 29871, 6428, 2837, 29919, 665, 1538, 1093, 26063, 27596, 29988, 22993, 13, 30004, 13, 29937, 1738, 29914, 4855, 29914, 210...
binding.gyp
epsitec-sa/node-darwin-ipc
0
102912
{ "targets": [ { "target_name": "sharedMemory", "include_dirs": [ "<!(node -e \"require('napi-macros')\")" ], "sources": [ "./src/sharedMemory.cpp" ], "libraries": [], }, { "target_name": "messaging", "include_dirs": [ "<!(node -e \"require('na...
[ 1, 426, 13, 29871, 376, 5182, 29879, 1115, 518, 13, 1678, 426, 13, 418, 376, 5182, 29918, 978, 1115, 376, 12366, 16015, 613, 13, 418, 376, 2856, 29918, 3972, 29879, 1115, 518, 13, 3986, 9872, 13311, 3177, 448, 29872, 13218, 12277, 877...
src/zen_nas/PlainNet/SuperResK1KXK1.py
Adlik/zen_nas
7
77250
''' Copyright (C) 2010-2021 Alibaba Group Holding Limited. ''' # pylint: disable=invalid-name,too-many-branches,too-many-statements import os import sys import uuid from torch import nn sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) try: import PlainNet from PlainNet import _get_ri...
[ 1, 14550, 13, 11882, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29900, 29899, 29906, 29900, 29906, 29896, 319, 1982, 5363, 6431, 21771, 292, 28873, 29889, 13, 12008, 13, 29937, 282, 2904, 524, 29901, 11262, 29922, 20965, 29899, 97...
attic/wpfrontman/wp_frontman/templatetags/wpf_sb_tags.py
ludoo/wpkit
0
179450
<reponame>ludoo/wpkit<filename>attic/wpfrontman/wp_frontman/templatetags/wpf_sb_tags.py from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django import template from django.db import models from wp_frontman.lib.utils import make_tree, prune_tree, s2i from wp_frontman.blog impo...
[ 1, 529, 276, 1112, 420, 29958, 29880, 566, 3634, 29914, 11912, 7354, 29966, 9507, 29958, 1131, 293, 29914, 11912, 8862, 1171, 29914, 11912, 29918, 8862, 1171, 29914, 1356, 572, 271, 300, 810, 29914, 29893, 7810, 29918, 20778, 29918, 11338, ...
update_thing.py
djfurman/example-db-app
0
142648
<reponame>djfurman/example-db-app import os import pymysql # Environment variables can be set on the client or server # You can also run `cp .env.example .env` and set them locally # The .env file will be ignored by version control # This creates a convenient way to test and transports to prod settings # Intentionall...
[ 1, 529, 276, 1112, 420, 29958, 19776, 22613, 1171, 29914, 4773, 29899, 2585, 29899, 932, 13, 5215, 2897, 13, 13, 5215, 282, 962, 952, 1519, 13, 13, 29937, 16738, 3651, 508, 367, 731, 373, 278, 3132, 470, 1923, 13, 29937, 887, 508, 8...
python/chronos/src/bigdl/chronos/autots/model/auto_prophet.py
Laniakea94/BigDL
3
2588
# + # # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 1, 396, 718, 13, 29937, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 450, 7997, 19558, 13189, 943, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, ...
rollout.py
knowledgetechnologyuhh/hipss
0
170567
import numpy as np class RolloutWorker: def __init__(self, env, policy, cfg, env_params, language_conditioned=False): self.env = env self.policy = policy self.cfg = cfg self.env_params = env_params self.language_conditioned = language_conditioned self.timestep_cou...
[ 1, 1053, 12655, 408, 7442, 13, 13, 13, 1990, 21809, 449, 16164, 29901, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 8829, 29892, 8898, 29892, 274, 16434, 29892, 8829, 29918, 7529, 29892, 4086, 29918, 16122, 287, 29922, 8824, 1125, ...
python/taichi/dynamics/__init__.py
gonnavis/taichi
2
119397
from .mpm import MPM from .simulation import Simulation __all__ = ['MPM']
[ 1, 515, 869, 1526, 29885, 1053, 341, 13427, 13, 3166, 869, 3601, 2785, 1053, 3439, 2785, 13, 13, 1649, 497, 1649, 353, 6024, 3580, 29924, 2033, 13, 2 ]
main/SimulationSettings/FluctuationAmplitudePython/Simulation/FluctuationAmplitude.py
JulianoGianlupi/nh-cc3d-4x-base-tool
0
53081
<gh_stars>0 from cc3d import CompuCellSetup from .FluctuationAmplitudeSteppables import FluctuationAmplitude CompuCellSetup.register_steppable(steppable=FluctuationAmplitude(frequency=100)) CompuCellSetup.run()
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 21759, 29941, 29881, 1053, 422, 3746, 4617, 26947, 13, 3166, 869, 8754, 5313, 29884, 362, 6833, 2830, 1151, 7789, 407, 1849, 1053, 2379, 5313, 29884, 362, 6833, 2830, 1151, 13, 13...
aws_topology/tests/test_autoscaling.py
Mathieu-Dirkx/stackstate-agent-integrations
2
1600031
<gh_stars>1-10 from stackstate_checks.base.stubs import topology as top from .conftest import BaseApiTest, set_cloudtrail_event class TestAutoScaling(BaseApiTest): def get_api(self): return "autoscaling" def get_account_id(self): return "731070500579" def get_region(self): return...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 5096, 3859, 29918, 3198, 29879, 29889, 3188, 29889, 303, 23954, 1053, 20159, 408, 2246, 13, 3166, 869, 535, 615, 342, 1053, 7399, 11713, 3057, 29892, 731, 29918...
quantumGAN/qgan.py
tomiock/qGAN
1
1602312
<filename>quantumGAN/qgan.py import glob import os import json import random from datetime import datetime from typing import List import imageio import matplotlib.pyplot as plt import numpy as np from quantumGAN.discriminator import ClassicalDiscriminator from quantumGAN.functions import fechet_distance, minimax, im...
[ 1, 529, 9507, 29958, 12150, 398, 29954, 2190, 29914, 29939, 6249, 29889, 2272, 13, 5215, 13149, 13, 5215, 2897, 13, 5215, 4390, 13, 5215, 4036, 13, 3166, 12865, 1053, 12865, 13, 3166, 19229, 1053, 2391, 13, 13, 5215, 1967, 601, 13, 52...
location_booking/models.py
reload/Web-Based-Info-Screen
0
102378
from django.db import models import requests, icalendar, re from datetime import datetime, date from dateutil.tz import tzlocal def localize_timezones(event): '''Makes sure all date and datetimes are in the local timezone.''' for field_name, field_value in event.items(): if isinstance(field_value, ical...
[ 1, 515, 9557, 29889, 2585, 1053, 4733, 13, 5215, 7274, 29892, 29871, 936, 6486, 29892, 337, 13, 3166, 12865, 1053, 12865, 29892, 2635, 13, 3166, 2635, 4422, 29889, 17559, 1053, 260, 29920, 2997, 13, 13, 1753, 1887, 675, 29918, 2230, 299...
orangecontrib/esrf/xoppy/widgets/extension/Transfocator_test.py
oasys-esrf-kit/OASYS1-ESRF-Extensions
0
130339
import sys import numpy from PyQt5.QtWidgets import QApplication, QMessageBox, QSizePolicy from orangewidget import gui from orangewidget.settings import Setting from oasys.widgets import gui as oasysgui, congruence from oasys.widgets.exchange import DataExchangeObject from orangecontrib.xoppy.util.xoppy_xraylib_util ...
[ 1, 1053, 10876, 13, 5215, 12655, 13, 3166, 10772, 17303, 29945, 29889, 17303, 8801, 29879, 1053, 660, 4873, 29892, 660, 3728, 3313, 29892, 660, 3505, 15644, 13, 13, 3166, 24841, 8030, 1053, 1410, 29875, 13, 3166, 24841, 8030, 29889, 11027...
setup.t9-exec-server.py
AlumCC/T9
3
198186
from setuptools import setup setup( name='t9-exec-server', version='0.1.0', author='<NAME>', author_email='<EMAIL>', url='https://github.com/ashafer01/t9', license='MIT', description='T9 Exec Server', long_description='This package runs on the docker exec container', packages=[ ...
[ 1, 515, 731, 21245, 8789, 1053, 6230, 13, 13, 14669, 29898, 13, 1678, 1024, 2433, 29873, 29929, 29899, 4258, 29899, 2974, 742, 13, 1678, 1873, 2433, 29900, 29889, 29896, 29889, 29900, 742, 13, 1678, 4148, 2433, 29966, 5813, 29958, 742, ...
load.py
GaniAliguzhinov/LowResImageClassifier
0
175177
<filename>load.py from imports import * MEAN = 0.5 STD = 0.2 def load_data(): if not FROM_FILE: (Xtrain, Ytrain), (Xtest, Ytest) = tf.keras.datasets.mnist.load_data() Xtrain, Xtest = Xtrain.reshape(-1, INPUT_WIDTH, INPUT_HEIGHT, CHANNELS), \ Xtest.reshape(-1, INPUT_WIDTH, IN...
[ 1, 529, 9507, 29958, 1359, 29889, 2272, 13, 3166, 24802, 1053, 334, 13, 13, 2303, 2190, 353, 29871, 29900, 29889, 29945, 13, 1254, 29928, 353, 29871, 29900, 29889, 29906, 13, 1753, 2254, 29918, 1272, 7295, 13, 1678, 565, 451, 3895, 2991...
app/api/user_routes.py
nappernick/envelope
2
10308
from datetime import datetime from werkzeug.security import generate_password_hash from flask import Blueprint, jsonify, request from sqlalchemy.orm import joinedload from flask_login import login_required from app.models import db, User, Type from app.forms import UpdateUserForm from .auth_routes import authenticate, ...
[ 1, 515, 12865, 1053, 12865, 13, 3166, 23085, 13289, 29889, 8926, 1053, 5706, 29918, 5630, 29918, 8568, 13, 3166, 29784, 1053, 10924, 2158, 29892, 4390, 1598, 29892, 2009, 13, 3166, 4576, 284, 305, 6764, 29889, 555, 1053, 8772, 1359, 13, ...
scripts/mnpr_system.py
semontesdeoca/MNPR
218
39390
""" @license: MIT @repository: https://github.com/semontesdeoca/MNPR _ _ __ ___ _ __ _ __ _ __ ___ _ _ ___| |_ ___ _ __ ___ | '_ ` _ \| '_ \| '_ \| '__| / __| | | / __| __/ _ \ '_ ` _ \ | | | | | | | | | |_) | | \__ \ |_| \__ \ || __/ | | | | ...
[ 1, 9995, 13, 29992, 506, 1947, 29901, 539, 341, 1806, 13, 29992, 19033, 29901, 1678, 2045, 597, 3292, 29889, 510, 29914, 12846, 609, 267, 311, 6400, 29914, 29924, 29940, 10593, 13, 462, 462, 1669, 903, 13, 29871, 903, 4770, 903, 1649, ...
src/data_management/dto/Data.py
chrissteffen98/KraftKonnect
0
77386
<filename>src/data_management/dto/Data.py from dataclasses import dataclass from time import time_ns @dataclass class Data: __slots__ = ['key', 'time', 'value'] key: int time: int value: str
[ 1, 529, 9507, 29958, 4351, 29914, 1272, 29918, 21895, 29914, 29881, 517, 29914, 1469, 29889, 2272, 13, 3166, 848, 13203, 1053, 848, 1990, 13, 3166, 931, 1053, 931, 29918, 1983, 13, 13, 13, 29992, 1272, 1990, 13, 1990, 3630, 29901, 13, ...
algorithm/hash/horner_hash.py
joway/PyAlgorithm
1
190480
from algorithm.calculation.horner import horner def horner_hash(key, size): _BASE = 32 return horner(key, _BASE) % size if __name__ == '__main__': print(horner_hash('test', 10))
[ 1, 515, 5687, 29889, 15807, 362, 29889, 2015, 1089, 1053, 4029, 1089, 13, 13, 13, 1753, 4029, 1089, 29918, 8568, 29898, 1989, 29892, 2159, 1125, 13, 1678, 903, 25416, 353, 29871, 29941, 29906, 13, 1678, 736, 4029, 1089, 29898, 1989, 298...
telegrampy/ext/commands/help.py
Fyssion/telegram.py
0
32155
<filename>telegrampy/ext/commands/help.py<gh_stars>0 """ MIT License Copyright (c) 2020-2021 ilovetocode 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 lim...
[ 1, 529, 9507, 29958, 15494, 629, 1160, 29891, 29914, 1062, 29914, 26381, 29914, 8477, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 26349, 19245, 13, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900...
PyCAD/GraphicsCanvas.py
danheeks/HeeksCAM
5
74649
import wx from wx import glcanvas import sys import math import os full_path_here = os.path.abspath( __file__ ) full_path_here = full_path_here.replace("\\", "/") slash = full_path_here.rfind("/") res_folder = full_path_here if slash != -1: res_folder = full_path_here[0:slash] class GraphicsCanvas(gl...
[ 1, 1053, 26437, 30004, 13, 3166, 26437, 1053, 3144, 15257, 30004, 13, 5215, 10876, 30004, 13, 5215, 5844, 30004, 13, 30004, 13, 5215, 2897, 30004, 13, 8159, 29918, 2084, 29918, 4150, 353, 2897, 29889, 2084, 29889, 370, 1028, 493, 29898, ...
src/legohdl/workspace.py
c-rus/legoHDL
6
14983
# ------------------------------------------------------------------------------ # Project: legohdl # Script: workspace.py # Author: <NAME> # Description: # The Workspace class. A Workspace object has a path and a list of available # vendors. This is what the user keeps their work's scope within for a given # "or...
[ 1, 396, 448, 2683, 2683, 2683, 2683, 9072, 29899, 13, 29937, 8010, 29901, 2814, 1148, 11671, 13, 29937, 14415, 29901, 664, 3493, 29889, 2272, 13, 29937, 13361, 29901, 529, 5813, 29958, 13, 29937, 12953, 29901, 13, 29937, 259, 450, 5244, ...
Sorting/insertion_sort.py
lakshyarawal/pythonPractice
0
3711
<filename>Sorting/insertion_sort.py """ Insertion Sort Algorithm:""" """Implementation""" def insertion_sort(arr) -> list: n = len(arr) for i in range(1, n): swap_index = i for j in range(i-1, -1, -1): if arr[swap_index] < arr[j]: arr[swap_index], arr[j] = arr[j],...
[ 1, 529, 9507, 29958, 13685, 292, 29914, 7851, 291, 29918, 6605, 29889, 2272, 13, 15945, 29908, 24505, 291, 20025, 29068, 6160, 15945, 13, 13, 13, 15945, 29908, 1888, 14607, 15945, 29908, 13, 13, 13, 1753, 4635, 291, 29918, 6605, 29898, ...
routemaster/migrations/versions/4ff14db28f2d_rename_labels_table.py
thread/routemaster
13
181287
""" Rename labels table Revision ID: <KEY> Revises: 3d0b226940eb """ import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '3d0b226940eb' branch_labels = None depends_on = None def upgrade(): op.ren...
[ 1, 9995, 13, 29934, 3871, 11073, 1591, 13, 13, 1123, 4924, 3553, 29901, 529, 10818, 29958, 13, 1123, 1730, 267, 29901, 29871, 29941, 29881, 29900, 29890, 29906, 29906, 29953, 29929, 29946, 29900, 774, 13, 15945, 29908, 13, 5215, 4576, 284...
experiments/testing_env/ppo_baseline.py
michalnand/reinforcement_learning_experiments
0
145401
<gh_stars>0 import numpy import time from tunnel_env import * import RLAgents import models.ppo_baseline.model.src.model as Model import models.ppo_baseline.model.src.config as Config path = "models/ppo_baseline/model/" config = Config.Config() envs = TunnelEnv(config.actors) agent = RL...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 12655, 13, 5215, 931, 13, 3166, 26086, 29918, 6272, 1053, 334, 13, 13, 5215, 390, 4375, 29887, 1237, 13, 13, 5215, 4733, 29889, 9759, 29918, 6500, 5570, 29889, 4299, 29889, 4351, ...
tradingTest/__init__.py
brtkev/trading-strategy-tester
0
191797
from os import close, truncate from app import trades_analitics from . import utils, strategy, technicalAnalisys as ta class TradingTest(): def __init__(self): self.trades = [] self.position = None def test(self, props : dict) : import time # get symbol data data = u...
[ 1, 515, 2897, 1053, 3802, 29892, 21022, 403, 13, 13, 3166, 623, 1053, 534, 3076, 29918, 7054, 277, 1199, 13, 3166, 869, 1053, 3667, 29879, 29892, 13705, 29892, 16905, 2744, 5711, 952, 408, 11062, 13, 13, 13, 1990, 1605, 9382, 3057, 72...
examples/python/partner_data.py
linways/SSO-with-JWT
0
156782
<filename>examples/python/partner_data.py<gh_stars>0 # For demonstration this will serve as the database of partners # For real implementation this will come from a database. # Both partnerId and key should be shared between services. partners = { 'abcd123' : { # this is partner ssoId (abcd123) 'name'...
[ 1, 529, 9507, 29958, 19057, 29914, 4691, 29914, 1595, 1089, 29918, 1272, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 29937, 1152, 9004, 362, 445, 674, 9080, 408, 278, 2566, 310, 22056, 13, 29937, 1152, 1855, 5314, ...
mycarehub/screeningtools/management/commands/load_screeningquestions.py
savannahghi/mycarehub-backend
1
155003
import json import os import sys from pathlib import Path from django.core.management.base import BaseCommand from django.db import transaction from mycarehub.screeningtools.models import ScreeningToolsQuestion class Command(BaseCommand): help = "Loads the screening tool questions to the database" @transac...
[ 1, 1053, 4390, 13, 5215, 2897, 13, 5215, 10876, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 13, 3166, 9557, 29889, 2585, 1053, 10804, 13, 13, 3166, 590, 18020, 29882, ...
code4/Item.py
weijie88/spider_files
0
92048
<reponame>weijie88/spider_files<filename>code4/Item.py<gh_stars>0 class Stock(): def __init__(self,code,name,price): self.code = code self.name = name self.price = price def __str__(self): return 'code{},name{},price{}'.format(self.code,self.name,self.price)
[ 1, 529, 276, 1112, 420, 29958, 705, 823, 347, 29947, 29947, 29914, 1028, 1241, 29918, 5325, 29966, 9507, 29958, 401, 29946, 29914, 2001, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 1990, 10224, 7295, 13, 1678, 822, 4770...
abc_anno/attempt01.py
Preocts/python_play_carton
0
132106
<reponame>Preocts/python_play_carton<gh_stars>0 from __future__ import annotations from abc import ABC from abc import abstractmethod class Parent(ABC): @abstractmethod def method_string(self) -> str: raise NotImplementedError() class ChildOne(Parent): def method_string(self) -> str: re...
[ 1, 529, 276, 1112, 420, 29958, 6572, 20082, 29879, 29914, 4691, 29918, 1456, 29918, 13823, 265, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 3166, 25638, 1053, 16417, 13, 3166, 2563...
tcfcli/libs/tcsam/events.py
dorasang/tcfcli
0
1615774
<filename>tcfcli/libs/tcsam/events.py from tcfcli.libs.tcsam.model import * class Timer(ProperModel): PROPER = { "CronExpression": { MUST: True, TYPE: mstr, VALUE: None }, "Enable": { MUST: False, TYPE: mstr, VALUE: ["...
[ 1, 529, 9507, 29958, 29873, 6854, 11303, 29914, 10254, 29914, 29873, 2395, 314, 29914, 13604, 29889, 2272, 13, 3166, 260, 6854, 11303, 29889, 10254, 29889, 29873, 2395, 314, 29889, 4299, 1053, 334, 13, 13, 13, 1990, 29168, 29898, 1184, 54...
contractor/tscript/runner_test.py
T3kton/contractor
5
1601633
import pytest import pickle import time from contractor.tscript.parser import parse from contractor.tscript.runner import Runner, ExecutionError, UnrecoverableError, ParamaterError, NotDefinedError, Timeout, Pause # TODO: test the assignment deepcopy, ie: a = {}, b = a make sure changes to b are not reflected in a ...
[ 1, 1053, 11451, 1688, 13, 5215, 5839, 280, 13, 5215, 931, 13, 13, 3166, 8078, 272, 29889, 1372, 924, 29889, 16680, 1053, 6088, 13, 3166, 8078, 272, 29889, 1372, 924, 29889, 27492, 1053, 7525, 1089, 29892, 11080, 918, 2392, 29892, 853, ...
jp.atcoder/abc055/abc055_a/8213706.py
kagemeka/atcoder-submissions
1
1602121
meals = int(input()) x = 800 * meals y = 200 * (meals // 15) print(x - y)
[ 1, 592, 1338, 353, 938, 29898, 2080, 3101, 30004, 13, 29916, 353, 29871, 29947, 29900, 29900, 334, 592, 1338, 30004, 13, 29891, 353, 29871, 29906, 29900, 29900, 334, 313, 1004, 1338, 849, 29871, 29896, 29945, 8443, 13, 2158, 29898, 29916,...
src/processTypes/bind.py
Razikus/TotallyDockerVolumeBackuper
0
49277
<gh_stars>0 from docker.types import Mount import datetime def processMount(mount): result = dict() result["type"] = mount["Type"] result["source"] = mount["Source"] return result def getMountType(mount, target): return Mount(type=mount["type"], source=mount["source"], target=target) def getBacku...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 10346, 29889, 8768, 1053, 8040, 13, 5215, 12865, 13, 13, 1753, 1889, 27648, 29898, 16476, 1125, 13, 1678, 1121, 353, 9657, 580, 13, 1678, 1121, 3366, 1853, 3108, 353, 5766, 3366, ...
vega/report/__init__.py
jie311/vega
724
80649
from .report_server import ReportServer from .report_client import ReportClient from .record import ReportRecord from .nsga_iii import NonDominatedSorting, SortAndSelectPopulation
[ 1, 515, 869, 12276, 29918, 2974, 1053, 13969, 6004, 13, 3166, 869, 12276, 29918, 4645, 1053, 13969, 4032, 13, 3166, 869, 11651, 1053, 13969, 9182, 13, 3166, 869, 1983, 3249, 29918, 25609, 1053, 10050, 29928, 5817, 630, 13685, 292, 29892, ...
source/code/build-instance-scheduler-template.py
liangruibupt/aws-instance-scheduler
0
4620
###################################################################################################################### # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # ...
[ 1, 835, 13383, 13383, 13383, 13383, 13383, 13383, 13383, 2277, 29937, 13, 29937, 29871, 14187, 1266, 29871, 29906, 29900, 29896, 29929, 16631, 29889, 510, 29892, 9266, 29889, 470, 967, 23736, 1078, 29889, 2178, 26863, 2538, 9841, 29889, 462, ...
openspectra/ui/imagedisplay.py
pblottiere/openspectra
8
1616698
<gh_stars>1-10 # Developed by <NAME> and <NAME> on 1/21/19 6:29 PM. # Last modified 1/21/19 6:29 PM # Copyright (c) 2019. All rights reserved. import itertools import time from enum import Enum from math import floor from typing import List from PyQt5.QtCore import pyqtSignal, Qt, QEvent, QObject, QTimer, QSize, p...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 29871, 10682, 287, 491, 529, 5813, 29958, 322, 529, 5813, 29958, 373, 29871, 29896, 29914, 29906, 29896, 29914, 29896, 29929, 29871, 29953, 29901, 29906, 29929, ...
src/minah/explicit.py
chohanjoo/VOICE-CATCHER
1
97312
from datetime import datetime import re __formatted_date_regex__ = "(\d{2,4}[\/|.|\-])?\d{1,2}(\/|\.|-)\d{1,2}( \d{1,2}:\d{1,2}(:\d{1,2})?)?" __formatted_date_pattern__ = re.compile(__formatted_date_regex__) __DATETIME__ = 0 __YEAR__ = 1 __DELIMITER__ = 2 __TIME__ = 3 __SECOND__ = 4 def parse(sentence)...
[ 1, 515, 12865, 1053, 12865, 13, 5215, 337, 13, 13, 1649, 689, 19667, 29918, 1256, 29918, 13087, 1649, 353, 376, 1194, 29881, 29912, 29906, 29892, 29946, 4400, 25558, 29989, 29889, 4295, 29899, 2314, 29973, 29905, 29881, 29912, 29896, 29892,...
geotrek/trekking/__init__.py
pierreloicq/Geotrek-admin
50
91775
<filename>geotrek/trekking/__init__.py default_app_config = 'geotrek.trekking.apps.TrekkingConfig'
[ 1, 529, 9507, 29958, 479, 327, 22218, 29914, 2484, 6859, 292, 29914, 1649, 2344, 26914, 2272, 13, 4381, 29918, 932, 29918, 2917, 353, 525, 479, 327, 22218, 29889, 2484, 6859, 292, 29889, 13371, 29889, 29911, 276, 6859, 292, 3991, 29915, ...
src/apps/startposes/models/__init__.py
sanderland/katago-server
27
21054
<filename>src/apps/startposes/models/__init__.py<gh_stars>10-100 from .startpos import StartPos, StartPosCumWeightOnly
[ 1, 529, 9507, 29958, 4351, 29914, 13371, 29914, 2962, 10590, 29914, 9794, 29914, 1649, 2344, 26914, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 3166, 869, 2962, 1066, 1053, 7370, 9135, 29892, 7...
datalite3/constraints.py
afdaniele/datalite3
0
95137
""" datalite3.constraints module introduces constraint types that can be used to hint field variables, that can be used to signal datalite decorator constraints in the database. """ from typing import TypeVar, Union, Tuple, List T = TypeVar('T') # TODO: starting with Python 3.9 the Annotated type is avai...
[ 1, 9995, 13, 29881, 2075, 568, 29941, 29889, 13646, 29879, 3883, 4547, 778, 7276, 13, 1678, 4072, 393, 508, 367, 1304, 304, 13182, 1746, 3651, 29892, 13, 1678, 393, 508, 367, 1304, 304, 7182, 1418, 284, 568, 10200, 1061, 13, 1678, 119...
29 Execution_Time/time123.py
codewithsandy/Python-Basic-Exp
3
125178
import time initial = time.time() #print(initial) k = 0 while(k<10): print("This is sandy program") k+=1 print("while loop execution time: ", time.time() - initial, "Seconds") initial2 = time.time() for i in range(1000000): print("T") print("for loop execution time: ", time.time() - initial2, "Seconds") ...
[ 1, 1053, 931, 13, 13, 11228, 353, 931, 29889, 2230, 580, 13, 29937, 2158, 29898, 11228, 29897, 13, 29895, 353, 29871, 29900, 13, 8000, 29898, 29895, 29966, 29896, 29900, 1125, 13, 1678, 1596, 703, 4013, 338, 11982, 29891, 1824, 1159, 13...
aprsmon.py
ZigmundRat/weakmon
0
174044
<reponame>ZigmundRat/weakmon<filename>aprsmon.py #!/usr/local/bin/python # # decode APRS packets. # # needs a sound card connected to a radio # tuned to 144.390 in FM. # # to read from a .wav file, use ./aprsrecv.py -file xxx.wav # import aprsrecv import weakargs import weakaudio import weakcat import sys def cb(fat...
[ 1, 529, 276, 1112, 420, 29958, 29999, 335, 15282, 29934, 271, 29914, 25129, 3712, 29966, 9507, 29958, 481, 2288, 3712, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2997, 29914, 2109, 29914, 4691, 13, 13, 29937, 13, 29937, 21822, 319, 10593...
recipes_api/app/recipe/views.py
maransowthri/django_rest_udemy
0
185220
<gh_stars>0 from rest_framework import viewsets, mixins, status from rest_framework.response import Response from rest_framework.decorators import action from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from recipe.models import Tag, Ingredient, Recip...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 1791, 29918, 4468, 1053, 1776, 7224, 29892, 6837, 1144, 29892, 4660, 13, 3166, 1791, 29918, 4468, 29889, 5327, 1053, 13291, 13, 3166, 1791, 29918, 4468, 29889, 19557, 4097, 1053, 31...
fabfile.py
hirokazumiyaji/blue-green-sample
0
47430
# coding: utf-8 from __future__ import absolute_import, print_function, unicode_literals from datetime import datetime import time from fabric.api import cd, sudo, run as fabrun, env, settings, abort, hide env.use_ssh_config = True env.ssh_config_path = "ssh.config" CONTAINER_PORT = { "blue": "4567", "green...
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 29892, 1596, 29918, 2220, 29892, 29104, 29918, 20889, 1338, 13, 13, 3166, 12865, 1053, 12865, 13, 5215, 931, 13, 13, 3166, 18187, 29889...
utils.py
iqDF/tsn-pytorch
2
69405
import os import glob from pathlib import Path #----------------------- # Write #----------------------- def safe_mkdir(directory): try: os.mkdir(directory) except (FileExistsError, OSError): pass # folder has been created previously return os.path.abspath(directory) #--------------...
[ 1, 1053, 2897, 13, 5215, 13149, 13, 13, 3166, 2224, 1982, 1053, 10802, 13, 13, 13, 29937, 2683, 26589, 13, 29937, 14350, 13, 29937, 2683, 26589, 13, 13, 1753, 9109, 29918, 11256, 3972, 29898, 12322, 1125, 13, 1678, 1018, 29901, 29871, ...
Data Analysis/csv remove other label.py
byew/python-do-differernt-csv
0
18492
import pandas as pd exa = pd.read_csv('en_dup.csv') exa.loc[exa['label'] =='F', 'label']= 0 exa.loc[exa['label'] =='T', 'label']= 1 exa.loc[exa['label'] =='U', 'label']= 2 #不读取label2, 只读取0,1标签 exa0 = exa.loc[exa["label"] == 0] exa1 = exa.loc[exa["label"] == 1] exa = [exa0, exa1] exa = pd.concat(exa) exa.to_csv('...
[ 1, 1053, 11701, 408, 10518, 13, 13, 13, 735, 29874, 353, 10518, 29889, 949, 29918, 7638, 877, 264, 29918, 20908, 29889, 7638, 1495, 13, 13, 735, 29874, 29889, 2029, 29961, 735, 29874, 1839, 1643, 2033, 1275, 29915, 29943, 742, 525, 1643...
Solutions/346.py
ruppysuppy/Daily-Coding-Problem-Solutions
70
23193
""" Problem: You are given a huge list of airline ticket prices between different cities around the world on a given day. These are all direct flights. Each element in the list has the format (source_city, destination, price). Consider a user who is willing to take up to k connections from their origin city A to thei...
[ 1, 9995, 13, 26604, 29901, 13, 13, 3492, 526, 2183, 263, 12176, 1051, 310, 4799, 1220, 23381, 26094, 1546, 1422, 14368, 2820, 278, 13, 11526, 373, 263, 2183, 2462, 29889, 4525, 526, 599, 1513, 1652, 5861, 29889, 7806, 1543, 297, 278, ...
ui/aura_extra/aura_extra.gyp
hefen1/chromium
0
79614
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { # GN version: //ui/aura_extra 'target_name': 'aura_extra', 'type': '<(...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29945, 450, 678, 456, 1974, 13189, 943, 29889, 2178, 10462, 21676, 29889, 13, 29937, 4803, 310, 445, 2752, 775, 338, 4095, 287, 491, 263, 350, 7230, 29899, 3293, 19405, 393, 508, 367, 13,...
bsp_for_art-badge/rtconfig.py
Rbb666/SDK
0
143508
import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='gcc' # bsp lib config BSP_LIBRARY_TYPE = None if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if os.getenv('RTT_ROOT'): RTT_ROOT = os.getenv('RTT_ROOT') RTT_ROOT = os.path.normpath(os.getcwd() + '../../rt-thread') # cross_tool p...
[ 1, 1053, 2897, 13, 13, 29937, 5780, 305, 2708, 3987, 13, 1718, 3210, 2433, 2817, 29915, 13, 6271, 29965, 2433, 2616, 4776, 29899, 29885, 29946, 29915, 13, 29907, 1672, 1799, 29918, 4986, 5607, 2433, 19644, 29915, 13, 13, 29937, 289, 102...
sdk/python/gittaggers.py
coolmaksat/arvados
1
86102
<reponame>coolmaksat/arvados # Copyright (C) The Arvados Authors. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 from setuptools.command.egg_info import egg_info import subprocess import time class EggInfoFromGit(egg_info): """Tag the build with git commit timestamp. If a build tag has already ...
[ 1, 529, 276, 1112, 420, 29958, 1111, 324, 29885, 10327, 271, 29914, 279, 29894, 2255, 13, 29937, 14187, 1266, 313, 29907, 29897, 450, 826, 29894, 2255, 13189, 943, 29889, 2178, 10462, 21676, 29889, 13, 29937, 13, 29937, 10937, 29928, 2999...
clastic/tests/test_obj_browser.py
mahmoud/clastic
140
43708
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys import pytest from clastic.contrib.obj_browser import create_app _IS_PYPY = '__pypy__' in sys.builtin_module_names @pytest.mark.skipif(_IS_PYPY, reason='pypy gc cannot support obj browsing') def test_flaw_basic(): app = create_app() ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 29104, 29918, 20889, 1338, 13, 13, 5215, 10876, 13, 13, 5215, 11451, 1688, 13, 13, 3166, 1067, 6288, 29889, 21570, ...
cinder/tests/volume/drivers/netapp/eseries/test_iscsi.py
kazum/cinder
0
109701
# Copyright (c) 2014 <NAME>. All rights reserved. # 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, 396, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29946, 529, 5813, 15513, 29871, 2178, 10462, 21676, 29889, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 298...
nrftool/command/erase.py
pauloborges/nrftool
7
186411
# coding: utf-8 """ Copyright (c) 2014 <NAME> Check LICENSE for details. """ from .jlink import ExecJLinkScriptCommand class Erase(ExecJLinkScriptCommand): SCRIPT = "erase.jlink" def execute(self): return super(Erase, self).execute(self.SCRIPT)
[ 1, 396, 14137, 29901, 23616, 29899, 29947, 13, 13, 15945, 29908, 13, 11882, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29946, 529, 5813, 29958, 13, 13, 5596, 365, 2965, 1430, 1660, 363, 4902, 29889, 13, 15945, 29908, 13, 13, 3...
visualization/extract_slice.py
d-v-b/CNNectome
0
141603
<filename>visualization/extract_slice.py import h5py import matplotlib.image import numpy as np def extract_slice(data_file, dataset, slice_, target): hf = h5py.File(data_file, "r") print(hf.keys()) # [dataset] hf_ds = hf[dataset] img_slice = hf_ds[:, slice_, :].squeeze() print(np.sum(img_slice))...
[ 1, 529, 9507, 29958, 20119, 2133, 29914, 21111, 29918, 18337, 29889, 2272, 13, 5215, 298, 29945, 2272, 13, 5215, 22889, 29889, 3027, 13, 5215, 12655, 408, 7442, 13, 13, 13, 1753, 6597, 29918, 18337, 29898, 1272, 29918, 1445, 29892, 8783, ...
xmmdet/__init__.py
www516717402/edgeai-mmdetection
0
91057
<reponame>www516717402/edgeai-mmdetection<filename>xmmdet/__init__.py import mmcv from mmdet import * from .ops import * from .core import * from .datasets import * from .models import * from .utils import * from .apis import *
[ 1, 529, 276, 1112, 420, 29958, 1636, 29945, 29896, 29953, 29955, 29896, 29955, 29946, 29900, 29906, 29914, 12864, 1794, 29899, 29885, 3487, 2650, 428, 29966, 9507, 29958, 29916, 29885, 3487, 300, 29914, 1649, 2344, 26914, 2272, 13, 5215, 56...
1d/stencil.py
hertzsprung/high-order-transport
0
89143
import numpy as np class Stencil: ''' Initialise a Stencil instance with relative cell indices where -1 and 0 are the adjacent cells upwind and downwind of the target face respectively. ''' def __init__(self, indices): self.indices = np.array(indices) def cellCentres(self, mesh, in...
[ 1, 1053, 12655, 408, 7442, 13, 13, 1990, 624, 3977, 309, 29901, 13, 1678, 14550, 13, 1678, 17250, 895, 263, 624, 3977, 309, 2777, 411, 6198, 3038, 16285, 988, 13, 1678, 448, 29896, 322, 29871, 29900, 526, 278, 20114, 9101, 701, 14800,...
deprecated/nexus_server/nexus_db.py
utarsuno/quasar_source
7
28870
# coding=utf-8 """This module, nexus_db.py, defines a basic started database for the Nexus Server.""" import pika import json import time from scripts.docker.wait_for_rabbit_host import WaitForRabbitMQHost from libraries.database_abstraction.sql.sqlite import sqlite_db from libraries.database_abstraction.sql.sqlite i...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 13, 15945, 29908, 4013, 3883, 29892, 452, 29916, 375, 29918, 2585, 29889, 2272, 29892, 17645, 263, 6996, 4687, 2566, 363, 278, 405, 735, 375, 5656, 1213, 15945, 13, 13, 5215, 282, 4106, 13, ...
stellar/simulation/data.py
strfx/stellar
0
20450
from typing import Tuple import numpy as np import png from skimage.transform import resize def load_world(filename: str, size: Tuple[int, int], resolution: int) -> np.array: """Load a preconstructred track to initialize world. Args: filename: Full path to the track file (png). ...
[ 1, 515, 19229, 1053, 12603, 552, 13, 13, 5215, 12655, 408, 7442, 13, 5215, 282, 865, 13, 3166, 2071, 3027, 29889, 9067, 1053, 19490, 13, 13, 13, 1753, 2254, 29918, 11526, 29898, 9507, 29901, 851, 29892, 2159, 29901, 12603, 552, 29961, ...
report/migrations/0005_auto_20210907_1232.py
maverick-labs-pune/wikirumours
0
62163
<gh_stars>0 # Generated by Django 3.1.4 on 2021-09-07 12:32 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('report', '00...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 3251, 630, 491, 15337, 29871, 29941, 29889, 29896, 29889, 29946, 373, 29871, 29906, 29900, 29906, 29896, 29899, 29900, 29929, 29899, 29900, 29955, 29871, 29896, 29906, 29901, 29941, 29...
assemtools/core/setup.py
xmyeen/assemtools
0
48962
# -*- coding:utf-8 -*- #!/usr/bin/env python import os, typing, datetime, glob, warnings, pathlib, pkg_resources from setuptools import setup as setuptools_setup from .cmd import bdist_app,cleanup from ..utility.os import walk_relative_file from ..utility.pkg import cov_to_program_name, cov_program_name_to_module_name...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 9420, 29899, 29947, 448, 29930, 29899, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 2897, 29892, 19229, 29892, 12865, 29892, 13149, 29892, 18116, 29892, 2224, 1982, 29892, 28...
bin/fmtutil/utils.py
incognitoRepo/youtube-dl
0
129737
class hof(object): def __init__(self, file_name, method): self.file_obj = open(file_name, method) def __enter__(self): return self.file_obj def __exit__(self, type, value, traceback): self.file_obj.close() from contextlib import contextmanager from operator import methodcaller @con...
[ 1, 770, 298, 974, 29898, 3318, 1125, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 934, 29918, 978, 29892, 1158, 1125, 13, 4706, 1583, 29889, 1445, 29918, 5415, 353, 1722, 29898, 1445, 29918, 978, 29892, 1158, 29897, 13, 1678, 822, 477...
wpclient/api/sync/posts.py
rguillermo/wpclient
0
126928
<reponame>rguillermo/wpclient from typing import Literal, Optional from .crud import CRUD from wpclient.models.post import Post, PostFilter class Posts(CRUD): endpoint = "/wp/v2/posts" def filter(self, filter: PostFilter) -> list[Post]: """ Retrieve all posts matching the filter """ ...
[ 1, 529, 276, 1112, 420, 29958, 29878, 2543, 453, 20772, 29914, 11912, 4645, 13, 3166, 19229, 1053, 5449, 284, 29892, 28379, 13, 3166, 869, 7283, 566, 1053, 15600, 15789, 13, 3166, 19247, 4645, 29889, 9794, 29889, 2490, 1053, 4918, 29892, ...
packages/nusoft/bzip2.py
pgjones/nusoft
1
80721
#!/usr/bin/env python # # Bzip2 # # Bzip2 packages and versions # # Author <NAME> - 2014-08-15 <<EMAIL>> : New file. #################################################################################################### import nusoft.package.conditional as conditional_package import os class Bzip2(conditional_package.Co...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 13, 29937, 350, 7554, 29906, 13, 29937, 13, 29937, 350, 7554, 29906, 9741, 322, 6910, 13, 29937, 13, 29937, 13361, 529, 5813, 29958, 448, 29871, 29906, 29900, 29896, 29946, 29899,...
my_site/objects.py
mequetrefe-do-subtroco/web_constel_cont_ext
1
29935
<filename>my_site/objects.py class Button(object): def __init__(self, url, label, get=''): self.url = url self.label = label self.get = get
[ 1, 529, 9507, 29958, 1357, 29918, 2746, 29914, 12650, 29889, 2272, 13, 13, 13, 1990, 11025, 29898, 3318, 1125, 13, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 3142, 29892, 3858, 29892, 679, 2433, 29374, 13, 4706, 1583, 29889, 2271, 3...
tests/ut/datavisual/data_transform/loader_generators/test_data_loader_generator.py
fapbatista/mindinsight
216
169764
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 379, 3357, 26599, 8364, 11763, 3189, 1696, 19806, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 194...
tests/ignite/metrics/test_mean_absolute_error.py
miguelvr/ignite
5
154172
<reponame>miguelvr/ignite from ignite.exceptions import NotComputableError from ignite.metrics import MeanAbsoluteError import pytest import torch def test_zero_div(): mae = MeanAbsoluteError() with pytest.raises(NotComputableError): mae.compute() def test_compute(): mae = MeanAbsoluteError() ...
[ 1, 529, 276, 1112, 420, 29958, 29885, 335, 2491, 13416, 29914, 647, 568, 13, 3166, 5330, 568, 29889, 11739, 29879, 1053, 2216, 20606, 519, 2392, 13, 3166, 5330, 568, 29889, 2527, 10817, 1053, 16316, 4920, 14977, 2392, 13, 5215, 11451, 1...
src/main.py
tylerkramlich/readme-analyzer
0
77204
# TODO: Argparse main from readme_analyzer import ReadmeAnalyzer analyzer = ReadmeAnalyzer('src/readme_analyzer_config.cfg') analyzer.runAll()
[ 1, 396, 14402, 29901, 11842, 5510, 1667, 13, 3166, 1303, 1004, 29918, 24209, 3298, 1053, 7523, 1004, 2744, 14997, 3298, 13, 13, 24209, 3298, 353, 7523, 1004, 2744, 14997, 3298, 877, 4351, 29914, 949, 1004, 29918, 24209, 3298, 29918, 2917,...
src/train_setup.py
achariso/gans-thesis
2
117185
<reponame>achariso/gans-thesis import argparse import os import sys import torch from IPython import get_ipython from utils.data import ManualSeedReproducible from utils.dep_free import in_notebook from utils.filesystems.gdrive.colab import ColabFilesystem, ColabFolder, ColabCapsule from utils.filesystems.gdrive.remo...
[ 1, 529, 276, 1112, 420, 29958, 496, 279, 10718, 29914, 29887, 550, 29899, 26533, 13, 5215, 1852, 5510, 13, 5215, 2897, 13, 5215, 10876, 13, 13, 5215, 4842, 305, 13, 3166, 5641, 1656, 1053, 679, 29918, 666, 1656, 13, 13, 3166, 3667, ...
algo/test/test_maximum_cut.py
ssavinash1/Algorithm_stanford
24
3553
# -*- coding: utf-8 -*- import unittest from src.graph import Graph from src.maximum_cut import maximum_cut, maximum_cut_for_bipartite_graph class MaximumCut(unittest.TestCase): def test_maximum_cut_for_bipartite_graphs(self): """ Given the following bipartite graph. (a)-----(b) ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 443, 27958, 13, 13, 3166, 4765, 29889, 4262, 1053, 12367, 13, 3166, 4765, 29889, 27525, 398, 29918, 7582, 1053, 7472, 29918, 7582, 29892, 7472,...
backoffice/business_logic/group.py
MedPy-C/backend
0
123178
from django.forms import model_to_dict from backoffice import models from backoffice.utils.constant import Status, RoleLevel from backoffice.utils.exceptions import EntityNotFound, UnAuthorized, IsNotOwner class GroupLogic(): """ Group business logic. Methods: create(): create a new group ...
[ 1, 515, 9557, 29889, 9514, 1053, 1904, 29918, 517, 29918, 8977, 13, 13, 3166, 1250, 20205, 1053, 4733, 13, 3166, 1250, 20205, 29889, 13239, 29889, 23362, 1053, 16034, 29892, 1528, 280, 10108, 13, 3166, 1250, 20205, 29889, 13239, 29889, 11...
tests/previs/test_track.py
MehmetErer/anima
101
85958
<filename>tests/previs/test_track.py # -*- coding: utf-8 -*- import unittest from anima.edit import Track, Clip, File class TrackTestCase(unittest.TestCase): """tests the anima.previs.Track class """ def test_to_xml_method_is_working_properly(self): """testing if the to xml method is working pro...
[ 1, 529, 9507, 29958, 21150, 29914, 1457, 1730, 29914, 1688, 29918, 11294, 29889, 2272, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 5215, 443, 27958, 13, 3166, 385, 2946, 29889, 5628, 1053, 1...
functions.py
QijingMa/COGS18-Final-Project
0
45429
"""A collection of function for doing my project.""" import time import random #Background Introduction def Intro(): print("Hello, how are you doing after the long journey? ") time.sleep(2) print("You are now at Pallet Town,Kanto.") time.sleep(2) print("A place where is abounded with amazing...
[ 1, 9995, 29909, 4333, 310, 740, 363, 2599, 590, 2060, 1213, 15945, 13, 13, 5215, 931, 29871, 13, 5215, 4036, 13, 13, 29937, 10581, 27576, 13, 1753, 3159, 307, 7295, 13, 268, 13, 1678, 1596, 703, 10994, 29892, 920, 526, 366, 2599, 11...
Cogs/CheckRoles.py
MrAngelDo6pa/MedBotS
0
1617645
<filename>Cogs/CheckRoles.py<gh_stars>0 import asyncio import discord from discord.ext import commands from Cogs import Settings from Cogs import DisplayName from Cogs import Nullify def setup(bot): # This module isn't actually a cog return async def checkroles(user, channel, settings, bot, suppress :...
[ 1, 529, 9507, 29958, 29907, 12099, 29914, 5596, 29934, 6544, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 408, 948, 3934, 13, 5215, 2313, 536, 13, 3166, 259, 2313, 536, 29889, 1062, 1053, 8260, 13, 3166, 259, 315...
Python/visualization.py
richieliuse/SegmentationCNN
54
30095
# encoding: utf-8 """ Visualization functions for features and predictions. Copyright 2016 <NAME> """ import numpy as np from feature_extraction import load_raw_features from evaluation import post_processing import matplotlib.pyplot as plt import pickle def visualize_predictions(): """ Visualize pr...
[ 1, 396, 8025, 29901, 23616, 29899, 29947, 13, 15945, 29908, 13, 1678, 9249, 2133, 3168, 363, 5680, 322, 27303, 29889, 13, 13, 1678, 14187, 1266, 29871, 29906, 29900, 29896, 29953, 529, 5813, 29958, 13, 15945, 29908, 13, 13, 5215, 12655, ...
misc/KeyTypes.py
sethr07/surveys
2
73758
#!/usr/bin/python # Copyright (C) 2018 <NAME>, <EMAIL> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify,...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 13, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29947, 529, 5813, 10202, 529, 26862, 6227, 29958, 13, 29937, 29871, 13, 29937, 20894, 2333, 338, 1244, 1609, 16896, 29892, ...
grove/alpha/jordan_gradient/jordan_gradient.py
mkeshita/grove
229
31427
import numpy as np from pyquil import Program from pyquil.api import QuantumComputer, get_qc from grove.alpha.jordan_gradient.gradient_utils import (binary_float_to_decimal_float, measurements_to_bf) from grove.alpha.phaseestimation.phase_estimation import phase_...
[ 1, 1053, 12655, 408, 7442, 13, 3166, 11451, 339, 309, 1053, 7835, 13, 3166, 11451, 339, 309, 29889, 2754, 1053, 22746, 398, 20606, 261, 29892, 679, 29918, 29939, 29883, 13, 13, 3166, 4071, 345, 29889, 2312, 29889, 29926, 536, 273, 29918...
OPENAI/NER.py
F2210/C2R-Anonimize
0
157993
<filename>OPENAI/NER.py import openai openai.api_key = "<KEY>" restart_sequence = "\n" primer = open("primer.txt").read() labels = ["person", "organisation", "location"] labels = "".join([i + ", " for i in labels]) sentences = [ "Jacco is studying at Utrecht University.", "Dan is an old friend from my time at...
[ 1, 529, 9507, 29958, 4590, 1430, 23869, 29914, 13865, 29889, 2272, 13, 5215, 1722, 1794, 13, 13, 3150, 1794, 29889, 2754, 29918, 1989, 353, 9872, 10818, 11903, 13, 13, 5060, 442, 29918, 16506, 353, 6634, 29876, 29908, 13, 13, 558, 4193,...
src/model/game/agent/manualagent.py
Jagermeister/expeditions
0
150903
from .agent import Agent class ManualAgent(Agent): name = 'Manual' def move_from_state(self): self.model.state_display() return int(input())
[ 1, 515, 869, 14748, 1053, 28330, 13, 13, 1990, 2315, 950, 19661, 29898, 19661, 1125, 13, 1678, 1024, 353, 525, 2517, 950, 29915, 13, 13, 1678, 822, 4337, 29918, 3166, 29918, 3859, 29898, 1311, 1125, 13, 4706, 1583, 29889, 4299, 29889, ...
src/looper.py
darklab8/darklab_darkbot
1
25496
<reponame>darklab8/darklab_darkbot "module for background tasks in the loop" import datetime import discord from discord.ext import commands, tasks from threading import Thread import asyncio import time from src.views import View from src.data_model import DataModel import src.settings as settings from src.storage i...
[ 1, 529, 276, 1112, 420, 29958, 26031, 8205, 29947, 29914, 26031, 8205, 29918, 26031, 7451, 13, 29908, 5453, 363, 3239, 9595, 297, 278, 2425, 29908, 13, 5215, 12865, 13, 13, 5215, 2313, 536, 13, 3166, 2313, 536, 29889, 1062, 1053, 8260, ...
Python_libraries/const.py
dorucioclea/Elrond-NFT-Trading
3
68341
DECIMALS = {"GNG-8d7e05" : 1000000000000000000, "MEX-4183e7" : 1000000000000000000, "LKMEX-9acade" : 1000000000000000000, "WATER-104d38" : 1000000000000000000} TOKEN_TYPE = {"G<PASSWORD>" : "token", "ME<PASSWORD>" : "token", "<PASSWORD>": "NFT", ...
[ 1, 5012, 29907, 2260, 8547, 353, 8853, 29954, 9312, 29899, 29947, 29881, 29955, 29872, 29900, 29945, 29908, 29871, 584, 29871, 29896, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900, 29900...