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
ultracart/models/item_identifiers.py
UltraCart/rest_api_v2_sdk_python
1
1617189
<filename>ultracart/models/item_identifiers.py # coding: utf-8 """ UltraCart Rest API V2 UltraCart REST API Version 2 # noqa: E501 OpenAPI spec version: 2.0.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six...
[ 1, 529, 9507, 29958, 499, 945, 442, 29914, 9794, 29914, 667, 29918, 1693, 14903, 29889, 2272, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 15945, 29908, 13, 1678, 18514, 336, 25233, 11654, 3450, 478, 29906, 13, 13, 1678, 18514, ...
nuclear/types/time.py
igrek51/glue
6
166087
from datetime import datetime, date, time from typing import Callable from nuclear.parser.error import CliSyntaxError def datetime_format(*formats: str) -> Callable[[str], datetime]: """format: %Y-%m-%d %H:%M:%S""" def parser(arg: str): return _parse_date_formats(arg, *formats) return parser ...
[ 1, 515, 12865, 1053, 12865, 29892, 2635, 29892, 931, 13, 3166, 19229, 1053, 8251, 519, 13, 13, 3166, 20346, 29889, 16680, 29889, 2704, 1053, 315, 492, 16676, 2392, 13, 13, 13, 1753, 12865, 29918, 4830, 10456, 689, 1446, 29901, 851, 2989...
databricks/koalas/strings.py
mercileesb/koalas
1
15512
# # Copyright (C) 2019 Databricks, 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
[ 1, 396, 13, 29937, 14187, 1266, 313, 29907, 29897, 29871, 29906, 29900, 29896, 29929, 13373, 370, 29878, 7358, 29892, 9266, 29889, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1...
Binaryclassifier/slacked.py
Hritikbansal/RNNs_SVA_OOD
4
79980
<gh_stars>1-10 import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import numpy as np import math from numpy.random import binomial import sys _VF = torch._C._VariableFunctions device = torch.device("cuda" if torch.cuda.is_available() else "cpu") def rectif...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 4842, 305, 30004, 13, 5215, 4842, 305, 29889, 15755, 408, 302, 29876, 30004, 13, 5215, 4842, 305, 29889, 20640, 408, 5994, 30004, 13, 3166, 4842, 305, 29889, ...
app/__init__.py
clhayes/NEU-Senior-Thesis
0
131334
import os, sys, configparser, warnings from flask import (Flask, redirect, render_template, request, session, url_for) from app import consent, alert, experiment, complete, error from .io import write_metadata from .utils import gen_code __version__ = '1.0' ## Define root directory. ROOT_DIR = os.path.dirname(os.path....
[ 1, 1053, 2897, 29892, 10876, 29892, 2295, 16680, 29892, 18116, 13, 3166, 29784, 1053, 313, 8754, 1278, 29892, 6684, 29892, 4050, 29918, 6886, 29892, 2009, 29892, 4867, 29892, 3142, 29918, 1454, 29897, 13, 3166, 623, 1053, 20218, 29892, 6655...
Hackerrank/Python/triangle-quest-2.py
PROxZIMA/Competitive-Coding
1
82162
num = int(input()) for i in range(1, num+1): s = '' for j in range(1, i): s += str(j) for j in range(i, 0, -1): s += str(j) print(s)
[ 1, 954, 353, 938, 29898, 2080, 3101, 13, 13, 1454, 474, 297, 3464, 29898, 29896, 29892, 954, 29974, 29896, 1125, 13, 1678, 269, 353, 6629, 13, 1678, 363, 432, 297, 3464, 29898, 29896, 29892, 474, 1125, 13, 4706, 269, 4619, 851, 29898,...
jacket/drivers/openstack/compute_driver.py
bopopescu/jacket
0
52971
<gh_stars>0 # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 2178, 26863, 2538, 9841, 29889, 13, 29937, 13, 29937, 1678, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, ...
proxyclient/linux.py
modwizcode/m1n1
1
6370
<filename>proxyclient/linux.py #!/usr/bin/python from setup import * payload = open(sys.argv[1], "rb").read() dtb = open(sys.argv[2], "rb").read() if len(sys.argv) > 3: initramfs = open(sys.argv[3], "rb").read() initramfs_size = len(initramfs) else: initramfs = None initramfs_size = 0 compressed_size...
[ 1, 529, 9507, 29958, 14701, 4645, 29914, 9389, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 4691, 13, 13, 3166, 6230, 1053, 334, 13, 13, 23813, 353, 1722, 29898, 9675, 29889, 19218, 29961, 29896, 1402, 376, 6050, 2564, 949, ...
tests/test_base_class_erosion_model_output_writers_old_style.py
BCampforts/terrainbento
18
1616445
# coding: utf8 # !/usr/env/python # This file has tests for the old style output writers to ensure backwards # compatibility. All of the existing tests for output writers are kept as is. # There are a few new ones too. import glob import os import numpy as np from terrainbento import Basic, NotCoreNodeBaselevelHand...
[ 1, 396, 14137, 29901, 23616, 29947, 13, 29937, 1738, 29914, 4855, 29914, 6272, 29914, 4691, 13, 13, 29937, 910, 934, 756, 6987, 363, 278, 2030, 3114, 1962, 23550, 304, 9801, 28953, 13, 29937, 24521, 29889, 2178, 310, 278, 5923, 6987, 36...
src/glip/gl/input/__init__.py
anibali/glip
0
181481
<filename>src/glip/gl/input/__init__.py from .keyboard import Key, ModifierKey, KeyboardShortcut, Keyboard from .mouse import MouseButton, Mouse
[ 1, 529, 9507, 29958, 4351, 29914, 29887, 3466, 29914, 3820, 29914, 2080, 29914, 1649, 2344, 26914, 2272, 13, 3166, 869, 1989, 3377, 1053, 7670, 29892, 3382, 3709, 2558, 29892, 7670, 3377, 21322, 7582, 29892, 7670, 3377, 13, 3166, 869, 157...
model/criterions/__init__.py
UESTC-Liuxin/CVMI_Sementic_Segmentation
0
161563
<reponame>UESTC-Liuxin/CVMI_Sementic_Segmentation<filename>model/criterions/__init__.py ''' Author: <NAME> Date: 2021-11-18 09:58:40 LastEditors: <NAME> LastEditTime: 2021-11-29 22:50:42 Description: file content FilePath: /CVMI_Sementic_Segmentation/model/criterions/__init__.py ''' from model.criterions.ce_loss import...
[ 1, 529, 276, 1112, 420, 29958, 4462, 1254, 29907, 29899, 23410, 1314, 262, 29914, 29907, 9219, 29902, 29918, 29903, 882, 293, 29918, 17669, 358, 362, 29966, 9507, 29958, 4299, 29914, 29883, 5385, 1080, 29914, 1649, 2344, 26914, 2272, 13, ...
api/movie_database/movies/migrations/0001_initial.py
cocorocho/movie_database
0
124554
# Generated by Django 3.2.7 on 2022-02-04 13:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Director', fields=[ ...
[ 1, 396, 3251, 630, 491, 15337, 29871, 29941, 29889, 29906, 29889, 29955, 373, 29871, 29906, 29900, 29906, 29906, 29899, 29900, 29906, 29899, 29900, 29946, 29871, 29896, 29941, 29901, 29946, 29900, 13, 13, 3166, 9557, 29889, 2585, 1053, 9725, ...
tests/st/ops/cpu/test_minimum_op.py
PowerOlive/mindspore
3,200
192912
<gh_stars>1000+ # 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 ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29900, 29974, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29906, 29900, 379, 3357, 26599, 8364, 11763, 3189, 1696, 19806, 13, 29937, 13, 29937, 10413, 21144, 1090, 278, 13380, 19...
narnia/common.py
maisammusthafa/narnia
0
180444
<reponame>maisammusthafa/narnia<filename>narnia/common.py #!/usr/bin/env python3 """ common objects """ import argparse import configparser import curses import io import os import re import sys import narnia.pyaria2 as pyaria2 from narnia.colorstr import add_cstr from datetime import datetime class Globals: tt...
[ 1, 529, 276, 1112, 420, 29958, 655, 275, 4850, 504, 29882, 2142, 29874, 29914, 29876, 2753, 423, 29966, 9507, 29958, 29876, 2753, 423, 29914, 9435, 29889, 2272, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 15945, 299...
tests/aat/spec/modules_spec.py
DerangedMonkeyNinja/openperf
20
1604706
<filename>tests/aat/spec/modules_spec.py from mamba import description, before, after, it from expects import * import os import client.api import client.models from common import Config, Service from common.matcher import be_valid_module, raise_api_exception CONFIG = Config(os.path.join(os.path.dirname(__file__), o...
[ 1, 529, 9507, 29958, 21150, 29914, 29874, 271, 29914, 6550, 29914, 7576, 29918, 6550, 29889, 2272, 13, 3166, 286, 20027, 1053, 6139, 29892, 1434, 29892, 1156, 29892, 372, 13, 3166, 23347, 1053, 334, 13, 5215, 2897, 13, 13, 5215, 3132, 2...
utils/strings_util.py
ScriptHound/vk_schema_codegen
9
166878
<reponame>ScriptHound/vk_schema_codegen import json import re from keyword import kwlist def get_type_from_reference(str_ref, convert_to_calmel_case=True) -> str: pattern = r".*/(.*)" ref_type = re.search(pattern, str_ref).group(1) if convert_to_calmel_case: return snake_case_to_camel_case(ref_typ...
[ 1, 529, 276, 1112, 420, 29958, 4081, 29950, 618, 29914, 29894, 29895, 29918, 11010, 29918, 401, 1885, 13, 5215, 4390, 13, 5215, 337, 13, 3166, 13553, 1053, 9049, 1761, 13, 13, 13, 1753, 679, 29918, 1853, 29918, 3166, 29918, 5679, 29898,...
filer/server/backends/xsendfile.py
PeterW-LWL/django-filer
134
1609923
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.http import HttpResponse from .base import ServerBase class ApacheXSendfileServer(ServerBase): def serve(self, request, file_obj, **kwargs): response = HttpResponse() response['X-Sendfile'] = file_obj.path # This...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 3166, 4770, 29888, 9130, 1649, 1053, 8380, 29918, 5215, 13, 13, 3166, 9557, 29889, 1124, 1053, 9056, 5103, 13, 13, 3166, 869, 3188, 1053, 5656, 5160, 1...
app/auth/forms.py
AngelMunoz/FlaskBlueprintsDemo
2
1600536
<filename>app/auth/forms.py from flask_wtf import FlaskForm # , RecaptchaField from wtforms import StringField, PasswordField #, BooleanField from wtforms.validators import Required, Email, EqualTo class LoginForm(FlaskForm): email = StringField('Email Address', [Email(), Required(messag...
[ 1, 529, 9507, 29958, 932, 29914, 5150, 29914, 9514, 29889, 2272, 13, 3166, 29784, 29918, 29893, 13264, 1053, 2379, 1278, 2500, 396, 1919, 3599, 2156, 5815, 3073, 13, 3166, 281, 29873, 9514, 1053, 1714, 3073, 29892, 25280, 3073, 396, 29892...
chess.py
asomfai/pgn_compress
0
123096
from decimal import * import math import string import colorama import sys import copy colorama.init() # rows and columns are indexed by numbers [0:7] #DONE: fill default board #DONE: read a play from a file #DONE: castling #DONE: fix castling #DONE: play back and check every steps validity #DONE: generate numeric c...
[ 1, 515, 13677, 1053, 334, 13, 5215, 5844, 13, 5215, 1347, 13, 5215, 2927, 3304, 13, 5215, 10876, 13, 5215, 3509, 13, 13, 2780, 3304, 29889, 2344, 580, 13, 13, 29937, 4206, 322, 4341, 526, 27541, 491, 3694, 518, 29900, 29901, 29955, ...
Lectures/UAV_control/message_types/msg_map.py
donnel2-cooper/drone_control
0
182597
""" msg_map - messages type for map of the world part of mavsim_python - Beard & McLain, PUP, 2012 - Last update: 4/10/2019 - RWB """ import numpy as np import parameters.planner_parameters as PLAN class msgMap: def __init__(self): # flag to indicate if the map has changed ...
[ 1, 9995, 13, 7645, 29918, 1958, 13, 1678, 448, 7191, 1134, 363, 2910, 310, 278, 3186, 13, 268, 13, 1595, 310, 286, 485, 3601, 29918, 4691, 13, 1678, 448, 1522, 538, 669, 4052, 29931, 475, 29892, 349, 4897, 29892, 29871, 29906, 29900, ...
blog/services/main.py
JohannSuarez/fastapi_backend
0
90921
''' Services are defined in the services package. Each service is a subclass of AppService. The database session is passed down from the request dependency via an "interface-like" mixin utility class (other mixin classes may be added via multiple inheritance in order to extend available attributes) ''' from sqlalchemy...
[ 1, 14550, 13, 13779, 526, 3342, 297, 278, 5786, 3577, 29889, 7806, 2669, 13, 275, 263, 19481, 310, 2401, 3170, 29889, 450, 2566, 4867, 338, 4502, 1623, 13, 3166, 278, 2009, 10609, 3025, 385, 376, 13248, 29899, 4561, 29908, 6837, 262, ...
poezio/poezio.py
David96/poezio_lima-gold
0
147598
# Copyright 2010-2011 <NAME> <<EMAIL>> # # This file is part of Poezio. # # Poezio is free software: you can redistribute it and/or modify # it under the terms of the zlib license. See the COPYING file. """ Starting point of poezio. Launches both the Connection and Gui """ import sys import os import signal import l...
[ 1, 396, 14187, 1266, 29871, 29906, 29900, 29896, 29900, 29899, 29906, 29900, 29896, 29896, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 910, 934, 338, 760, 310, 3929, 6096, 601, 29889, 13, 29937, 13, 29937, 3929, 6096,...
config.py
DeflatedPickle/1984-chan
1
135112
import json from json import JSONDecodeError import simplejson def read_id(): with open("token.txt") as f: return f.readline().strip() def read_config(): with open("config.json", 'r+') as f: try: pre = json.load(f) except JSONDecodeError: write_config({}) ...
[ 1, 1053, 4390, 13, 3166, 4390, 1053, 4663, 2772, 401, 2392, 13, 13, 5215, 2560, 3126, 13, 13, 13, 1753, 1303, 29918, 333, 7295, 13, 1678, 411, 1722, 703, 6979, 29889, 3945, 1159, 408, 285, 29901, 13, 4706, 736, 285, 29889, 949, 1220...
scripts/generate_specializations.py
cxwx/VecGeom
1
162865
<filename>scripts/generate_specializations.py # Script to generate translation and rotation specializations of placed volumes, rotation = [0x1B1, 0x18E, 0x076, 0x16A, 0x155, 0x0AD, 0x0DC, 0x0E3, 0x11B, 0x0A1, 0x10A, 0x046, 0x062, 0x054, 0x111, 0x200] translation = ["translation::kGeneric", "translation::kI...
[ 1, 529, 9507, 29958, 16713, 29914, 17158, 29918, 18732, 17063, 29889, 2272, 13, 29937, 14415, 304, 5706, 13962, 322, 13733, 4266, 17063, 310, 7180, 18167, 29892, 13, 13, 5450, 362, 353, 518, 29900, 29916, 29896, 29933, 29896, 29892, 29871, ...
alipay/aop/api/domain/ReduceInfo.py
snowxmas/alipay-sdk-python-all
213
33975
<gh_stars>100-1000 #!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class ReduceInfo(object): def __init__(self): self._brand_name = None self._consume_amt = None self._consume_store_name = None self._payment_time = No...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, ...
pyning/tail_recursion/fibonacci_test.py
rkoyanagui/pyning
0
39189
<gh_stars>0 import unittest from pyning.tail_recursion.fibonacci import naive_fib from pyning.utils.testutils import BaseTest class FibonacciTailRecursionTest(BaseTest): def test_zero(self): self.check(f=naive_fib, xr=0, n=0) def test_one(self): self.check(f=naive_fib, xr=1, n=1) def t...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 443, 27958, 13, 13, 3166, 282, 948, 292, 29889, 18237, 29918, 3757, 1295, 291, 29889, 29888, 747, 265, 21566, 1053, 1055, 573, 29918, 29888, 747, 13, 3166, 282, 948, 292, 29889, ...
python/tests/test_auxdata.py
clayne/gtirb
230
123523
<gh_stars>100-1000 import unittest from unittest import mock import gtirb class AuxDataTest(unittest.TestCase): def setUp(self): self.fake_ir = mock.MagicMock() self.fake_ir.get_by_uuid = None def test_lazy(self): ad1 = gtirb.AuxData("test1", "string") self.assertEqual(ad1.da...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29900, 29899, 29896, 29900, 29900, 29900, 13, 5215, 443, 27958, 13, 3166, 443, 27958, 1053, 11187, 13, 13, 5215, 330, 29873, 381, 29890, 13, 13, 13, 1990, 319, 1314, 1469, 3057, 2989...
tool/pypoc/kubecfg/commands/jsonnet.py
ant31/kubecfg
0
147767
import os import json from kubecfg.render_jsonnet import RenderJsonnet from kubecfg.commands.command_base import CommandBase, LoadVariables class JsonnetCmd(CommandBase): name = 'jsonnet' help_message = "Resolve a jsonnet file with the kubecfgstd available" def __init__(self, options): super(Json...
[ 1, 1053, 2897, 13, 5215, 4390, 13, 3166, 413, 431, 687, 16434, 29889, 9482, 29918, 3126, 1212, 1053, 26000, 8148, 1212, 13, 3166, 413, 431, 687, 16434, 29889, 26381, 29889, 6519, 29918, 3188, 1053, 10516, 5160, 29892, 16012, 10444, 1849, ...
tests/test_connections.py
iparaskev/py_connect
5
29380
<filename>tests/test_connections.py """test_connections.py""" import unittest import os from py_connect import ConnectionsHandler from py_connect import Board, Peripheral, SensorTypes cons_path = \ "/".join(os.path.abspath(__file__).split("/")[:-2]) + "/test_connections/" class TestConnection(unittest.TestCase...
[ 1, 529, 9507, 29958, 21150, 29914, 1688, 29918, 11958, 1953, 29889, 2272, 13, 15945, 29908, 1688, 29918, 11958, 1953, 29889, 2272, 15945, 29908, 13, 13, 5215, 443, 27958, 13, 5215, 2897, 13, 3166, 11451, 29918, 6915, 1053, 1281, 484, 1953...
tests/v1/test_logs_status_remapper.py
MichaelTROEHLER/datadog-api-client-python
0
143221
<reponame>MichaelTROEHLER/datadog-api-client-python # coding: utf-8 # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. from __future__ i...
[ 1, 529, 276, 1112, 420, 29958, 24083, 29911, 1672, 29923, 15444, 1001, 29914, 4130, 328, 468, 29899, 2754, 29899, 4645, 29899, 4691, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 13, 29937, 25870, 9479, 8703, 6467, 599, 2066, 297, 445...
yatube/posts/migrations/0011_auto_20220127_2115.py
Andr3w-k/yatube_final
0
183154
<reponame>Andr3w-k/yatube_final # Generated by Django 2.2.16 on 2022-01-27 21:15 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('posts', '0010_follow'), ] operations = [ migrations.AlterModelOptions( ...
[ 1, 529, 276, 1112, 420, 29958, 2855, 29878, 29941, 29893, 29899, 29895, 29914, 29891, 271, 4003, 29918, 8394, 13, 29937, 3251, 630, 491, 15337, 29871, 29906, 29889, 29906, 29889, 29896, 29953, 373, 29871, 29906, 29900, 29906, 29906, 29899, ...
Session_01/koch.py
UP-RS-ESP/GEW-DAP05-2018
2
13614
<gh_stars>1-10 import sys import numpy as np from matplotlib import pyplot as pl def koch(x0, y0, rho, phi, order): global xr, yr x1, y1 = x0 + rho * np.cos(phi), y0 + rho * np.sin(phi) if order: x, y = x0, y0 for angle in [0, np.pi/3, 5*np.pi/3, 0]: x, y = koch(x, y, rho / 3.0...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 10876, 13, 5215, 12655, 408, 7442, 13, 3166, 22889, 1053, 11451, 5317, 408, 715, 13, 13, 1753, 413, 2878, 29898, 29916, 29900, 29892, 343, 29900, 29892, 364, ...
Codes/Liam/001_two_sum.py
liuxiaohui1221/algorithm
256
28809
<reponame>liuxiaohui1221/algorithm # 执行用时 : 348 ms # 内存消耗 : 13 MB # 方案:哈希表 class Solution(object): def twoSum(self, nums, target): """ :type nums: List[int] :type target: int :rtype: List[int] """ # 创建哈希表{value:idx} record = {} # 遍数组 for idx...
[ 1, 529, 276, 1112, 420, 29958, 492, 1314, 423, 1148, 1481, 29896, 29906, 29906, 29896, 29914, 20567, 13, 29937, 29871, 233, 140, 170, 30448, 30406, 30594, 584, 29871, 29941, 29946, 29947, 10887, 13, 29937, 29871, 30728, 30946, 31276, 235, ...
pysan/multi/attributes.py
pysan-dev/pysan
4
147695
<gh_stars>1-10 # AUTOGENERATED! DO NOT EDIT! File to edit: 21_multi_attributes.ipynb (unless otherwise specified). __all__ = ['are_recurrent', 'get_summary_statistic', 'get_routine_scores', 'get_synchrony', 'get_sequence_frequencies'] # Cell def are_recurrent(sequences): "Returns true if any of the sequences in a...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 26524, 29949, 24647, 1001, 3040, 29928, 29991, 11662, 6058, 11488, 29991, 3497, 304, 3863, 29901, 29871, 29906, 29896, 29918, 9910, 29918, 15697, 29889, 666, 948, ...
tirelire-account/app/views/__init__.py
AgRenaud/tirelire
0
172999
from app.views import account from app.views import holder
[ 1, 515, 623, 29889, 7406, 1053, 3633, 13, 3166, 623, 29889, 7406, 1053, 19464, 13, 2 ]
clip_finder_camera.py
leventerevesz/tomato-clips
0
74868
<reponame>leventerevesz/tomato-clips import cv2 as cv import numpy as np import matplotlib.pyplot as plt def clip_finder_camera(): cap = cv.VideoCapture(1) i=0 while True: # Read the camera in color mode. _, img = cap.read() #img = cv.imread('images/tomato1.jpg', cv.IMREAD_COLOR) ...
[ 1, 529, 276, 1112, 420, 29958, 280, 794, 406, 1960, 29920, 29914, 15135, 1219, 29899, 11303, 567, 13, 5215, 13850, 29906, 408, 13850, 13, 5215, 12655, 408, 7442, 13, 5215, 22889, 29889, 2272, 5317, 408, 14770, 13, 13, 1753, 20102, 29918...
make_training_data/fetch_training_data.py
tanhanliang/ml-deviant-subgraph-detection
1
181216
""" This module contains functions to fetch data from the database according to particular rules (e.g. process downloaded a file from the internet, then executed it). Each function corresponds to one rule. """ from data_processing.neo4j_interface_fns import execute_query def get_train_3_node_simple(): """ Get...
[ 1, 9995, 13, 4013, 3883, 3743, 3168, 304, 6699, 848, 515, 278, 2566, 5034, 304, 3153, 6865, 13, 29898, 29872, 29889, 29887, 29889, 1889, 16532, 263, 934, 515, 278, 8986, 29892, 769, 8283, 372, 467, 13, 9760, 740, 16161, 304, 697, 5751...
make_prg/io_utils.py
mbhall88/make_prg
10
56475
import logging import re import gzip from pathlib import Path from argparse import ArgumentParser from Bio import AlignIO from make_prg.from_msa import MSA from make_prg.prg_encoder import PrgEncoder, PRG_Ints def load_alignment_file(msa_file: str, alignment_format: str) -> MSA: msa_file = str(msa_file) log...
[ 1, 1053, 12183, 13, 5215, 337, 13, 5215, 330, 7554, 13, 3166, 2224, 1982, 1053, 10802, 13, 3166, 1852, 5510, 1053, 23125, 11726, 13, 13, 3166, 21184, 1053, 838, 647, 5971, 13, 13, 3166, 1207, 29918, 558, 29887, 29889, 3166, 29918, 151...
skbot/ignition/sdformat/bindings/v15/physics.py
FirefoxMetzger/ropy
6
13913
from dataclasses import dataclass, field from typing import Optional __NAMESPACE__ = "sdformat/v1.5/physics.xsd" @dataclass class Physics: """ The physics tag specifies the type and properties of the dynamics engine. Parameters ---------- max_step_size: Maximum time step size at which every syst...
[ 1, 515, 848, 13203, 1053, 848, 1990, 29892, 1746, 13, 3166, 19229, 1053, 28379, 13, 13, 1649, 5813, 5550, 11538, 1649, 353, 376, 4928, 4830, 29914, 29894, 29896, 29889, 29945, 29914, 25105, 29889, 19168, 29908, 13, 13, 13, 29992, 1272, ...
server/routes/courses/courses_auth.py
giuseppe998e/unito-ium
0
77891
#!/usr/bin/python3 import sqlite3 from flask import Blueprint, request, abort, make_response from modules import simple_jwt from modules.database import get_db_conn from modules.utils import logged_before_request, get_role_perms from server_error import server_error route_courses_auth = Blueprint('route_courses_auth...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 29941, 13, 5215, 21120, 29941, 13, 13, 3166, 29784, 1053, 10924, 2158, 29892, 2009, 29892, 27450, 29892, 1207, 29918, 5327, 13, 13, 3166, 10585, 1053, 2560, 29918, 29926, 14554, 13, 3166, 10585, 2...
players/human.py
pikatyuu/deep-learning-othello
0
14339
class Human(): def __init__(self, name="Human"): self.name = name def action(self, game): safe_input = False while not safe_input: pos = input("choose a position: ") if pos == "draw": game.draw() elif pos == "exit": imp...
[ 1, 770, 12968, 7295, 13, 1678, 822, 4770, 2344, 12035, 1311, 29892, 1024, 543, 29950, 7889, 29908, 1125, 13, 4706, 1583, 29889, 978, 353, 1024, 13, 13, 1678, 822, 3158, 29898, 1311, 29892, 3748, 1125, 13, 4706, 9109, 29918, 2080, 353, ...
octopus/blocktopus/blocks/machines.py
richardingham/octopus
12
1608389
# Package Imports from ..workspace import Block, Disconnected, Cancelled # Twisted Imports from twisted.internet import reactor, defer, task from twisted.python import log # Octopus Imports from octopus import data from octopus.constants import State import octopus.transport.basic # Do not auto-register these classe...
[ 1, 396, 22029, 1954, 4011, 13, 3166, 6317, 1287, 3493, 1053, 15658, 29892, 3295, 18045, 29892, 1815, 2242, 839, 13, 13, 29937, 8168, 12652, 1954, 4011, 13, 3166, 3252, 12652, 29889, 14168, 300, 1053, 337, 7168, 29892, 316, 571, 29892, 3...
shapely/tests/geometry/test_multipoint.py
whophil/shapely
0
89551
<filename>shapely/tests/geometry/test_multipoint.py import numpy as np import pytest from shapely.errors import EmptyPartError from shapely.geometry import MultiPoint, Point from shapely.geometry.base import dump_coords from .test_multi import MultiGeometryTestCase class TestMultiPoint(MultiGeometryTestCase): d...
[ 1, 529, 9507, 29958, 845, 481, 873, 29914, 21150, 29914, 19156, 29914, 1688, 29918, 18056, 2461, 29889, 2272, 13, 5215, 12655, 408, 7442, 13, 5215, 11451, 1688, 13, 13, 3166, 528, 481, 873, 29889, 12523, 1053, 2812, 2349, 7439, 2392, 13...
beta/nncf/tensorflow/graph/patterns.py
xiao1228/nncf
0
87207
""" Copyright (c) 2020 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
[ 1, 9995, 13, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29906, 29900, 18555, 15025, 13, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 13, 366, 1122, 451, ...
slcyGeneral.py
mirrorcoloured/slcypi
0
9350
# Python 2.7.1 import RPi.GPIO as GPIO from twython import Twython import time import sys import os import pygame APP_KEY='zmmlyAJzMDIntLpDYmSH98gbw' APP_SECRET='<KEY>' OAUTH_TOKEN='<KEY>' OAUTH_TOKEN_SECRET='<KEY>' applepislcy = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET) ### GENERAL ### def Clea...
[ 1, 396, 5132, 29871, 29906, 29889, 29955, 29889, 29896, 13, 13, 5215, 390, 12197, 29889, 29954, 2227, 29949, 408, 402, 2227, 29949, 13, 3166, 3252, 1656, 1053, 8168, 1656, 13, 5215, 931, 13, 5215, 10876, 13, 5215, 2897, 13, 5215, 22028,...
syntactic_complexity.py
volkancirik/synlana
1
54402
'''ORIGINAL file:https://github.com/neubig/util-scripts/blob/master/syntactic-complexity.py ''' #!/usr/bin/env python ''' A program to calculate syntactic complexity of parse trees. (Relies on NLTK) This is an implementation of some of the methods in: Syntactic complexity measures for detecting Mild Cognitive Impairm...
[ 1, 14550, 1955, 6259, 1177, 1964, 934, 29901, 991, 597, 3292, 29889, 510, 29914, 484, 431, 335, 29914, 4422, 29899, 16713, 29914, 10054, 29914, 6207, 29914, 29879, 3903, 17911, 29899, 19676, 537, 29889, 2272, 13, 12008, 13, 29937, 14708, ...
ex02_randomness_test/tests/test_main.py
ittigorn-tra/exercises
0
32288
from logging import getLogger from lottery_config import LotteryConfig from main import draw_lottery logger = getLogger() def test_draw_lottery(): for test_count in range(10000): draw_results = draw_lottery() logger.info(f'Test #{str(test_count).ljust(4)} Draw Results : {draw_results}') ...
[ 1, 515, 12183, 1053, 679, 16363, 13, 13, 3166, 3287, 22005, 29918, 2917, 1053, 20815, 22005, 3991, 13, 3166, 1667, 1053, 4216, 29918, 8276, 22005, 13, 13, 21707, 353, 679, 16363, 580, 13, 13, 13, 1753, 1243, 29918, 4012, 29918, 8276, ...
Qt_interface/add_subject.py
kithsirij/NLP-based-Syllabus-Coverage-Exam-paper-checker-Tool
1
44
<reponame>kithsirij/NLP-based-Syllabus-Coverage-Exam-paper-checker-Tool # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'add_subject.ui' # # Created by: PyQt4 UI code generator 4.11.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: ...
[ 1, 529, 276, 1112, 420, 29958, 29895, 389, 1039, 4927, 29914, 29940, 13208, 29899, 6707, 29899, 29903, 15114, 370, 375, 29899, 29907, 957, 482, 29899, 1252, 314, 29899, 19773, 29899, 3198, 261, 29899, 12229, 13, 29937, 448, 29930, 29899, ...
opennem/utils/scrapyd.py
paulculmsee/opennem
22
8687
<reponame>paulculmsee/opennem #!/usr/bin/env python """ Srapyd control methods """ import logging from typing import Any, Dict, List from urllib.parse import urljoin from opennem.settings import settings from opennem.utils.http import http from opennem.utils.scrapy import get_spiders logger = logging.getLogger("scra...
[ 1, 529, 276, 1112, 420, 29958, 3274, 352, 1810, 29885, 4149, 29914, 459, 2108, 331, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 13, 29903, 336, 2272, 29881, 2761, 3519, 13, 13, 15945, 29908, 13, 5215, 12183...
WordRPG/systems/character/slot.py
ChristopherLBruce/WordRPG
2
114664
<reponame>ChristopherLBruce/WordRPG class Slot: def __init__(name, _type=None, item=None): self.name = name, if _type is not None: self.type = _type else: self.type = name self.item = item, def equip(self): pass def unequip(se...
[ 1, 529, 276, 1112, 420, 29958, 18687, 13434, 29931, 29933, 582, 346, 29914, 14463, 29934, 16903, 13, 1990, 317, 8276, 29901, 13, 1678, 822, 4770, 2344, 12035, 978, 29892, 903, 1853, 29922, 8516, 29892, 2944, 29922, 8516, 1125, 13, 4706, ...
config_manager.py
jbytes1027/notify-mirror
0
31569
import pathlib import configparser class ConfigManager: DEFAULT_CONFIG_PATH = "~/.config/notify-sync.ini" SETTING_NOTIFICATION_ICON = "icon" SETTING_NOTIFICATION_TIMEOUT = "timeout" # in ms # SETTING_NOTIFICATION_URGENCY = "urgency" # 0,1,2 low, avg, urgent SETTING_NOTIFICATION_EXEC = "exec_on...
[ 1, 1053, 2224, 1982, 13, 5215, 2295, 16680, 13, 13, 13, 1990, 12782, 3260, 29901, 13, 1678, 22236, 29918, 25903, 29918, 10145, 353, 376, 30022, 6294, 2917, 29914, 25140, 29899, 16593, 29889, 2172, 29908, 13, 1678, 11368, 29911, 4214, 2991...
doc/source/code/tut3.py
FernandoSBorges/netpyne
0
1609171
from netpyne import specs, sim # Network parameters netParams = specs.NetParams() # object of class NetParams to store the network parameters ## Cell types PYRcell = {'secs': {}} PYRcell['secs']['soma'] = {'geom': {}, 'mechs': {}} PYRcell['secs']['soma']['geom'] = {'diam': 18.8, 'L': 18.8, 'Ra': 123.0} PYRcell...
[ 1, 515, 7787, 2272, 484, 1053, 1580, 29879, 29892, 1027, 13, 13, 29937, 8527, 4128, 13, 1212, 9629, 353, 1580, 29879, 29889, 6779, 9629, 580, 29871, 396, 1203, 310, 770, 12670, 9629, 304, 3787, 278, 3564, 4128, 13, 13, 13, 2277, 19413...
setup.py
andrewdodd/docopt_uc
6
91929
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name="docopt-uc", description="A docopt library suitable for microcontrollers.", license="MIT", version="1.0.2", author="<NAME>", author_email="<EMAIL>", maintainer="<NAME>", maintainer_ema...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 13, 3166, 731, 21245, 8789, 1053, 6230, 29892, 1284, 29918, 8318, 13, 13, 14669, 29898, 13, 1678, 1024...
source/_sample/networkx/drawing_tree.py
showa-yojyo/notebook
14
93905
<reponame>showa-yojyo/notebook #!/usr/bin/env python """drawing_tree.py: draw a tree graph with pydot_layout. """ import colorsys import networkx as nx import matplotlib.pyplot as plt # A tree graph is given. branching = 2 height = 5 G = nx.balanced_tree(branching, height) #pos = nx.spring_layout(G) # default; bad #...
[ 1, 529, 276, 1112, 420, 29958, 4294, 29874, 29899, 29891, 3848, 9029, 29914, 1333, 19273, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, 4012, 292, 29918, 8336, 29889, 2272, 29901, 4216, 263, 5447, 3983, 411, 28...
tracker/urls.py
sansaralab/shiva-dropped
0
159326
from django.conf.urls import url from .views import tracker_serve, track, attach_contact, send_event, attach_data urlpatterns = [ url(r'shiva.js$', tracker_serve), url(r'track$', track), url(r'attach$', attach_contact), url(r'data$', attach_data), url(r'event$', send_event), ]
[ 1, 515, 9557, 29889, 5527, 29889, 26045, 1053, 3142, 13, 3166, 869, 7406, 1053, 1020, 4937, 29918, 16349, 29892, 5702, 29892, 10641, 29918, 12346, 29892, 3638, 29918, 3696, 29892, 10641, 29918, 1272, 13, 13, 13, 2271, 11037, 29879, 353, 5...
old/SimpleElectroSim/python/electro_sim.py
0xDBFB7/Nyion
0
196110
<filename>old/SimpleElectroSim/python/electro_sim.py #imports from shapely.geometry import Point import numpy as np import random import math from decimal import * from time import sleep import copy try: from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * except: print "OpenGL wra...
[ 1, 529, 9507, 29958, 1025, 29914, 15427, 29923, 781, 307, 8942, 29914, 4691, 29914, 15436, 307, 29918, 3601, 29889, 2272, 13, 29937, 326, 4011, 13, 3166, 528, 481, 873, 29889, 19156, 1053, 8984, 13, 5215, 12655, 408, 7442, 13, 5215, 403...
Aeneas/aeneas/aeneas/synthesizer.py
yalhaizaey/Dreich
25
110783
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, <NAME> (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, <NAME> (www...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29922, 9420, 29899, 29947, 13, 13, 29937, 263, 1600, 294, 338, 263, 5132, 29914, 29907, 3489, 322, 263, 731, 310, 8492, 13, 29937, 304, 3345, 351, 1711, 12231, 675, 10348...
Gerador_de_Senha.py
Jhon-Dx/Program
0
40053
import Gerador_de_senhas.Defs as ge import PySimpleGUI as sg class Gerador: sg.theme('DarkPurple1') def __init__(self): layout = [ [sg.Checkbox('Numeros', key='sonumeros'), sg.Text(size=(3, 1)), sg.Checkbox('Letras', key='soletras'), sg.Text(size=(3, 1)), sg.Checkbox('Simbolos...
[ 1, 1053, 5681, 3136, 29918, 311, 29918, 4881, 5349, 29889, 3206, 29879, 408, 1737, 13, 5215, 10772, 15427, 29954, 3120, 408, 269, 29887, 13, 13, 13, 1990, 5681, 3136, 29901, 13, 1678, 269, 29887, 29889, 18193, 877, 29928, 935, 29925, 33...
apps/users/views.py
madjaqk/puzzle_master_v2
0
114086
<filename>apps/users/views.py from django.contrib import messages from django.contrib.auth import authenticate, login, logout, update_session_auth_hash from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import AuthenticationForm, UserCreationForm, AdminPasswordChangeForm, PasswordC...
[ 1, 529, 9507, 29958, 13371, 29914, 7193, 29914, 7406, 29889, 2272, 13, 3166, 9557, 29889, 21570, 1053, 7191, 13, 3166, 9557, 29889, 21570, 29889, 5150, 1053, 15585, 403, 29892, 6464, 29892, 1480, 449, 29892, 2767, 29918, 7924, 29918, 5150, ...
puzzle_captcha/management/commands/load_images.py
MegaMark16/django-puzzle-captcha
4
72464
import os from django.core.management.base import BaseCommand, CommandError from django.core.files.uploadedfile import SimpleUploadedFile from puzzle_captcha.models import Puzzle class Command(BaseCommand): args = '<path_to_images_folder ...>' help = 'Loads all the images from the folder specified into the Puz...
[ 1, 1053, 2897, 13, 3166, 9557, 29889, 3221, 29889, 21895, 29889, 3188, 1053, 7399, 6255, 29892, 10516, 2392, 13, 3166, 9557, 29889, 3221, 29889, 5325, 29889, 9009, 287, 1445, 1053, 12545, 3373, 15638, 2283, 13, 3166, 20285, 280, 29918, 17...
shareloc/geofunctions/rectification.py
CNES/shareloc
10
197458
<reponame>CNES/shareloc<gh_stars>1-10 #!/usr/bin/env python # coding: utf8 # # Copyright (c) 2022 Centre National d'Etudes Spatiales (CNES). # # This file is part of Shareloc # (see https://github.com/CNES/shareloc). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except ...
[ 1, 529, 276, 1112, 420, 29958, 13778, 2890, 29914, 13653, 2029, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 29937, 14137, 29901, 23616, 29947, 13, 29937, 13,...
logical_backup/pretty_print.py
ammesonb/logical-backup
0
1611141
<gh_stars>0 """ Some pretty-printing stuff """ from __future__ import annotations from enum import Enum CHECK_UNICODE = "\u2714" CROSS_UNICODE = "\u274c" class Color(Enum): """ Contains foreground colors for the command line """ BLACK = "\033[30m" RED = "\033[31m" PURPLE = "\033[35m" CY...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 15945, 29908, 13, 9526, 5051, 29899, 2158, 292, 6433, 13, 15945, 29908, 13, 3166, 4770, 29888, 9130, 1649, 1053, 25495, 13, 13, 3166, 14115, 1053, 1174, 398, 13, 13, 3210, 16658, 29918,...
courses/data_analysis/deepdive/composer-exercises/subdag_example_solution.py
pranaynanda/training-data-analyst
0
26650
"""Solution for subdag_example.py. Uses a factory function to return a DAG that can be used as the subdag argument to SubDagOperator. Notice that: 1) the SubDAG's dag_id is formatted as parent_dag_id.subdag_task_id 2) the start_date and schedule_interval of the SubDAG are copied from the parent DAG. """ from airflo...
[ 1, 9995, 13296, 918, 363, 1014, 24157, 29918, 4773, 29889, 2272, 29889, 13, 13, 15922, 267, 263, 12529, 740, 304, 736, 263, 360, 10051, 393, 508, 367, 1304, 408, 278, 1014, 24157, 2980, 13, 517, 3323, 29928, 351, 26486, 29889, 16393, ...
core-python/Core_Python/exception/ExceptionMethods.py
theumang100/tutorials-1
9
140078
<filename>core-python/Core_Python/exception/ExceptionMethods.py ''' e. and use all methods ''' ''' also try different exception like java file,array,string,numberformat ''' ''' user define exception ''' try: raise Exception('spam,','eggs') except Exception as inst: print("Type of instance : ",type(inst)) # the...
[ 1, 529, 9507, 29958, 3221, 29899, 4691, 29914, 9203, 29918, 11980, 29914, 11739, 29914, 2451, 26112, 29889, 2272, 13, 12008, 321, 29889, 322, 671, 599, 3519, 14550, 13, 12008, 884, 1018, 1422, 3682, 763, 2115, 934, 29892, 2378, 29892, 180...
DB_Repository_Subscriber.py
twelveand0/github-crawler
3
1610771
#!/usr/bin/python # -*- coding: UTF-8 -*- import github import db_operation import datetime class DB_Repository_Subscriber: """ This class represents DB_Repository_Subscriber as a class describles subscription-ship between \ github.Repository.Repository and github.NamedUser.NamedUser ...
[ 1, 18787, 4855, 29914, 2109, 29914, 4691, 30004, 13, 29937, 448, 29930, 29899, 14137, 29901, 18351, 29899, 29947, 448, 29930, 29899, 30004, 13, 30004, 13, 5215, 18546, 30004, 13, 5215, 4833, 29918, 16453, 30004, 13, 5215, 12865, 30004, 13, ...
tests/auto/bindings/python/moleculetest.py
quizzmaster/chemkit
34
103884
<filename>tests/auto/bindings/python/moleculetest.py<gh_stars>10-100 ############################################################################### ## ## Copyright (C) 2009-2012 <NAME> <<EMAIL>> ## All rights reserved. ## ## This file is a part of the chemkit project. For more information ## see <http://www.chemkit.or...
[ 1, 529, 9507, 29958, 21150, 29914, 6921, 29914, 5355, 886, 29914, 4691, 29914, 29885, 1772, 4979, 1026, 342, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 13383, 13383, 13383, 13383, 7346, ...
ckan_cloud_operator/drivers/kubectl/driver.py
MuhammadIsmailShahzad/ckan-cloud-operator
14
32763
from ckan_cloud_operator import kubectl def get(what, *args, required=True, namespace=None, get_cmd=None, **kwargs): return kubectl.get(what, *args, required=required, namespace=namespace, get_cmd=get_cmd, **kwargs)
[ 1, 515, 274, 11052, 29918, 9274, 29918, 6891, 1053, 413, 431, 522, 29880, 13, 13, 13, 1753, 679, 29898, 5816, 29892, 334, 5085, 29892, 3734, 29922, 5574, 29892, 7397, 29922, 8516, 29892, 679, 29918, 9006, 29922, 8516, 29892, 3579, 19290, ...
python/testData/resolve/multiFile/keywordArgument/KeywordArgument.py
jnthn/intellij-community
2
1616609
from a import A print(A()) # <ref>
[ 1, 515, 263, 1053, 319, 13, 13, 2158, 29898, 29909, 3101, 13, 29937, 268, 529, 999, 29958, 13, 13, 2 ]
python/database/recover_database.py
coreyjadams/harvard_production
0
1616918
#!/usr/bin/env python import glob import os from database import DBUtil # This script traverses a list of files and recovers the sqlite3 database # It's not meant as a permanent solution, just a quick fix to a problem # that should go away soon. def recover_stage(top_dir, stage_name, dataset_name, ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 13, 13, 5215, 13149, 13, 5215, 2897, 13, 13, 3166, 2566, 1053, 6535, 7270, 13, 13, 29937, 910, 2471, 13310, 267, 263, 1051, 310, 2066, 322, 337, 1111, 874, 278, 21120, 29941, 2566, 13, ...
openstack_dashboard/dashboards/admin/group_types/specs/tests.py
nicozhang/horizon
1
84844
<gh_stars>1-10 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # dist...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 10413, 21144, 1090, 278, 13380, 19245, 29892, 10079, 29871, 29906, 29889, 29900, 313, 1552, 376, 29931, 293, 1947, 1496, 366, 1122, 13, 29937, 451, 671, 445, 9...
update.py
spascou/ps2.liquidwarp.net
4
81990
<gh_stars>1-10 import os from typing import Optional from generate import ( clean_bucket, clean_site, copy_misc, copy_statics, generate_css, generate_pages, update_all_data_files, upload_to_bucket, ) BUCKET_NAME = "ps2.liquidwarp.net" CENSUS_SERVICE_ID: Optional[str] = os.environ.get(...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 5215, 2897, 13, 3166, 19229, 1053, 28379, 13, 13, 3166, 5706, 1053, 313, 13, 1678, 5941, 29918, 21454, 29892, 13, 1678, 5941, 29918, 2746, 29892, 13, 1678, 3509, 29...
examples/example2.py
robinechuca/ContextPrinter
1
180408
#!/usr/bin/env python3 """ Example of a section shared between several methods and modules. Example2 is doing stuff █ Example1 is starting to do stuff █ █ Example1 is done doing stuff █ Example2 is done doing stuff """ from context_printer import ContextPrinter as Ctp from example1 import Example1 class Example2: ...
[ 1, 18787, 4855, 29914, 2109, 29914, 6272, 3017, 29941, 13, 13, 15945, 29908, 13, 14023, 310, 263, 4004, 7258, 1546, 3196, 3519, 322, 10585, 29889, 13, 13, 14023, 29906, 338, 2599, 6433, 13, 30208, 8741, 29896, 338, 6257, 304, 437, 6433,...
code/test.py
saedrna/DA-U-Net
7
135560
<gh_stars>1-10 # -*- coding: utf-8 -*- """ Created on Mon Jan 14 2020 @author: Chenlin """ import os import cv2 import numpy as np import tensorflow as tf from model import da_u_net # os.environ["CUDA_VISIBLE_DEVICES"] = "3" # if test image size= 512* 512, size= 512 over_lap= 0 # if test image size=1024*1024, size=...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 29937, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 15945, 29908, 13, 20399, 373, 2598, 2627, 29871, 29896, 29946, 29871, 29906, 29900, ...
examples/wait_for_tokens.py
tarunbhardwaj/limitlion
17
169539
<filename>examples/wait_for_tokens.py<gh_stars>10-100 #!/usr/bin/env python """ Waiting throttle example. Uses the throttle_wait helper that will sleep until work is allowed. """ import datetime import redis from limitlion import throttle_configure, throttle_wait redis = redis.Redis('localhost', 6379) throttle_co...
[ 1, 529, 9507, 29958, 19057, 29914, 10685, 29918, 1454, 29918, 517, 12360, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29900, 29899, 29896, 29900, 29900, 13, 29937, 14708, 4855, 29914, 2109, 29914, 6272, 3017, 13, 15945, 29908, ...
hio-yocto-bsp/sources/poky/scripts/lib/mic/3rdparty/pykickstart/commands/group.py
qiangzai00001/hio-prj
0
101839
# # <NAME> <<EMAIL>> # # Copyright 2009 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be useful, but WITHOUT A...
[ 1, 396, 13, 29937, 529, 5813, 29958, 3532, 26862, 6227, 6778, 13, 29937, 13, 29937, 14187, 1266, 29871, 29906, 29900, 29900, 29929, 4367, 25966, 29892, 9266, 29889, 13, 29937, 13, 29937, 910, 3509, 1266, 287, 5518, 338, 1754, 3625, 304, ...
month02/day11/exer_tcp_server2.py
Amiao-miao/all-codes
1
106191
""" 练习4: 自动对话 客户端可以向服务端发送问题 服务端扮演机器客服角色,根据客户端的提问 回复相应的答案 要求可以同时多个客户端提问 """ from socket import * qus_dict={ "你好":"你好啊", "叫什么":"我叫小美", "几岁":"我2岁啦", "男生女生":"我是机器人" } def response(connfd): data = connfd.recv(1024).decode() #遍历字典,查看关键词是否在问题中 for key in qus_dict: if key in data: ...
[ 1, 9995, 13, 234, 190, 134, 231, 188, 163, 29946, 30383, 29871, 30688, 30846, 30783, 31852, 13, 31915, 31229, 234, 174, 178, 30682, 30651, 31331, 31520, 31358, 234, 174, 178, 30910, 31545, 31658, 31596, 13, 31520, 31358, 234, 174, 178, ...
src/baseboard/helpers.py
cmheisel/django-baseboard
1
155118
"""Common functions shared across the baseboard project.""" import socket from baseboard.models import Project, RSSFeed def run_instance_update_method(queryset, method_name, debug, timeout=20): """Loops through every object in queryset, and calls method_name. If debug is true, it prints error messages to stdo...
[ 1, 9995, 18877, 3168, 7258, 4822, 278, 2967, 3377, 2060, 1213, 15945, 13, 5215, 9909, 13, 13, 3166, 2967, 3377, 29889, 9794, 1053, 8010, 29892, 390, 1799, 29737, 13, 13, 1753, 1065, 29918, 8758, 29918, 5504, 29918, 5696, 29898, 1972, 84...
114_Flatten_Binary_Tree_to_Linked_List.py
joshlyman/Josh-LeetCode
0
190037
<reponame>joshlyman/Josh-LeetCode # refer from: # https://leetcode.com/problems/flatten-binary-tree-to-linked-list/solution/ # 2. Iterative Morris traversal class Solution: def flatten(self, root: TreeNode) -> None: """ Do not return anything, modify root in-place instead. """ ...
[ 1, 529, 276, 1112, 420, 29958, 29926, 10578, 368, 1171, 29914, 29967, 10578, 29899, 3226, 300, 3399, 13, 29937, 2737, 515, 29901, 13, 29937, 2045, 597, 280, 300, 401, 29889, 510, 29914, 17199, 29879, 29914, 1579, 8606, 29899, 19541, 29899...
qbot/plugins/cmc_xkcd.py
landmaj/qbot
3
113871
import logging from qbot.core import registry from qbot.db import plugin_storage from qbot.message import Image, OutgoingMessage, Text, send_message from qbot.plugins.cmc import comic PLUGIN_NAME = "xkcd" LATEST_COMIC_KEY = "latest_comic" logger = logging.getLogger(__name__) @comic async def xkcd(): last_seen_...
[ 1, 1053, 12183, 13, 13, 3166, 3855, 7451, 29889, 3221, 1053, 21235, 13, 3166, 3855, 7451, 29889, 2585, 1053, 7079, 29918, 12925, 13, 3166, 3855, 7451, 29889, 4906, 1053, 7084, 29892, 4451, 17696, 3728, 29892, 3992, 29892, 3638, 29918, 490...
django_de/news/views.py
django-de/django-de-v3
1
157746
<filename>django_de/news/views.py<gh_stars>1-10 from django.db.models.query import Q from django.http import HttpResponseRedirect from django.shortcuts import render, get_object_or_404 from . import models def news_list(request, year=None, month=None, day=None): """ A simple index view that can be restricted...
[ 1, 529, 9507, 29958, 14095, 29918, 311, 29914, 15753, 29914, 7406, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, 13, 3166, 9557, 29889, 2585, 29889, 9794, 29889, 1972, 1053, 660, 13, 3166, 9557, 29889, 1124...
sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/operation_status.py
pjquirk/azure-sdk-for-python
1
64917
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
[ 1, 396, 14137, 29922, 9420, 29899, 29947, 13, 29937, 448, 2683, 2683, 2683, 2683, 1378, 29899, 13, 29937, 14187, 1266, 313, 29883, 29897, 7783, 15025, 29889, 2178, 10462, 21676, 29889, 13, 29937, 10413, 21144, 1090, 278, 341, 1806, 19245, ...
silx/gui/plot/test/testPlotTools.py
PiRK/silx
0
97273
<gh_stars>0 # coding: utf-8 # /*########################################################################## # # Copyright (c) 2016-2017 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Soft...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 29937, 14137, 29901, 23616, 29899, 29947, 13, 29937, 4949, 13383, 13383, 13383, 13383, 7346, 2277, 13, 29937, 13, 29937, 14187, 1266, 313, 29883, 29897, 29871, 29906, 29900, 29896, 29953, 2...
scronsole/widgets/main_screen.py
bastianh/screeps_console_mod
2
18131
import urwid from scronsole.config_manager import ConfigManager from scronsole.plugin_manager import PluginManager from scronsole.widgets.main_menu import MainMenu from scronsole.widgets.server_screen import ServerScreen class MainScreen(urwid.WidgetPlaceholder): def __init__(self): super().__init__(urwi...
[ 1, 1053, 5065, 9163, 13, 13, 3166, 885, 1617, 2170, 29889, 2917, 29918, 12847, 1053, 12782, 3260, 13, 3166, 885, 1617, 2170, 29889, 8582, 29918, 12847, 1053, 1858, 3851, 3260, 13, 3166, 885, 1617, 2170, 29889, 8030, 29879, 29889, 3396, ...
python_modules/libraries/dagster-gcp/dagster_gcp/gcs/object_store.py
bitdotioinc/dagster
1
193744
import logging import sys from io import BytesIO, StringIO from google.api_core.exceptions import TooManyRequests from google.cloud import storage from dagster import check from dagster.core.storage.object_store import ObjectStore from dagster.core.types.marshal import SerializationStrategy from dagster.utils.backoff...
[ 1, 1053, 12183, 13, 5215, 10876, 13, 3166, 12013, 1053, 2648, 2167, 5971, 29892, 1714, 5971, 13, 13, 3166, 5386, 29889, 2754, 29918, 3221, 29889, 11739, 29879, 1053, 1763, 29877, 14804, 3089, 29879, 13, 3166, 5386, 29889, 9274, 1053, 8635...
api/views.py
rukbotto/reviews-django
0
27725
<gh_stars>0 from django.http import Http404 from django.shortcuts import render from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.views import APIView from api.models import Review from api.serializers import Review...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 9557, 29889, 1124, 1053, 9056, 29946, 29900, 29946, 13, 3166, 9557, 29889, 12759, 7582, 29879, 1053, 4050, 13, 3166, 1791, 29918, 4468, 1053, 4660, 13, 3166, 1791, 29918, 4468, 2988...
Python/CCC - Mouse Move.py
RobinNash/Solutions-to-Competition-Problems
0
192569
<reponame>RobinNash/Solutions-to-Competition-Problems # Mouse Move # # November 12, 2018 # By <NAME> [c,r] = [int(i) for i in input().split(" ") if i != " "] x,y = 0,0 while True: pair = [int(i) for i in input().split(" ") if i != " "] if pair == [0,0]: break x += pair[0] y += pair...
[ 1, 529, 276, 1112, 420, 29958, 21860, 262, 29940, 1161, 29914, 13296, 17925, 29899, 517, 29899, 6843, 300, 654, 29899, 26604, 29879, 13, 29937, 25992, 25249, 396, 30004, 13, 29937, 3979, 29871, 29896, 29906, 29892, 29871, 29906, 29900, 2989...
ocr.py
tunc2112/uet-img-processing
0
17795
<gh_stars>0 from PIL import Image import cv2 import pytesseract import tesserocr from pyocr import pyocr from pyocr import builders import sys import os def get_image_filename(img_id): filename = "img_src/src{0:0>3}".format(img_id) for ext in [".png", ".jpg", ".jpeg"]: if os.path.exists(os.path.join(o...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 3166, 349, 6227, 1053, 7084, 13, 5215, 13850, 29906, 13, 5215, 282, 3637, 16136, 627, 13, 5215, 260, 16136, 8415, 13, 3166, 11451, 8415, 1053, 11451, 8415, 13, 3166, 11451, 8415, 1053, ...
Handling Images and Pixels/Image processing - sharpen operation.py
ahmadhabib5/Computer_Vision_Bootcamp_with_Python_OpenCV_YOLO_SSD
0
64955
import numpy as np import cv2 image = cv2.imread('images/unsharp_bird.jpg') kernel = np.array([ [0, -1, 0], [-1, 5, -1], [0, -1, 0] ]) sharpen_iamge = cv2.filter2D(image, -1, kernel) cv2.imshow("original image", image) cv2.imshow("sharpen image", sharpen_iamge) cv2.wait...
[ 1, 1053, 12655, 408, 7442, 13, 5215, 13850, 29906, 13, 13, 3027, 353, 13850, 29906, 29889, 326, 949, 877, 8346, 29914, 348, 22064, 29918, 18513, 29889, 6173, 1495, 13, 13, 17460, 353, 7442, 29889, 2378, 4197, 13, 9651, 518, 29900, 29892...
scrapy_tfg/scrapy_tfg/spiders/mdeportivo_spider.py
jochoaserna/footballnews
0
98699
# -*- coding: utf-8 -*- import scrapy import re import json import urllib.parse import datetime import random class MundodeportivoSpider(scrapy.Spider): name = "md" start_urls = [ 'http://www.mundodeportivo.com/futbol/atletico-madrid', 'http://www.mundodeportivo.com/futbol/real-madrid', ...
[ 1, 396, 448, 29930, 29899, 14137, 29901, 23616, 29899, 29947, 448, 29930, 29899, 13, 5215, 24559, 2272, 13, 5215, 337, 13, 5215, 4390, 13, 5215, 3142, 1982, 29889, 5510, 13, 5215, 12865, 13, 5215, 4036, 13, 13, 1990, 341, 870, 356, 63...
ged2json.py
FlominatorTM/tam
1
154329
""" converts a GEDCOM file into a JSON file for use in Topographic Attribute Maps (https://github.com/rpreiner/tam) this is just a proof of concept and might contain serious mistakes and problems """ import argparse import json import re __author__ = "<NAME>" def add_child(parentId, childId, idsWithNodes, nodesWithF...
[ 1, 9995, 29436, 263, 402, 3352, 19795, 934, 964, 263, 4663, 934, 363, 671, 297, 7488, 12122, 23833, 25846, 29871, 13, 29898, 991, 597, 3292, 29889, 510, 29914, 29878, 1457, 4983, 29914, 29873, 314, 29897, 13, 13, 1366, 338, 925, 263, ...
mtl/extractors/lbirnn.py
vandurme/TFMTL
10
176763
<reponame>vandurme/TFMTL<filename>mtl/extractors/lbirnn.py<gh_stars>1-10 # Copyright 2018 Johns Hopkins University. 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 # # ...
[ 1, 529, 276, 1112, 420, 29958, 29894, 392, 332, 1004, 29914, 8969, 11490, 29931, 29966, 9507, 29958, 4378, 29880, 29914, 21111, 943, 29914, 29880, 20397, 15755, 29889, 2272, 29966, 12443, 29918, 303, 1503, 29958, 29896, 29899, 29896, 29900, ...
featurize/__init__.py
featurize/featurize-cli
0
101372
<gh_stars>0 import sys import os from json import JSONDecodeError from .featurize_client import FeaturizeClient def _find_token(): token_from_env = os.getenv('FEATURIZE_API_TOKEN') cfg_file = os.getenv('FEATURIZE_CFG_FILE', '/etc/featurize_token.txt') if token_from_env: return token_from_env t...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 5215, 10876, 13, 5215, 2897, 13, 3166, 4390, 1053, 4663, 2772, 401, 2392, 13, 3166, 869, 1725, 1337, 675, 29918, 4645, 1053, 5169, 1337, 675, 4032, 13, 13, 13, 1753, 903, 2886, 29918,...
python/0258. addDigits.py
whtahy/leetcode
1
157654
<reponame>whtahy/leetcode class Solution: def addDigits(self, num: int) -> int: while num > 9: num = sum(int(ch) for ch in str(num)) return num
[ 1, 529, 276, 1112, 420, 29958, 29893, 400, 801, 29891, 29914, 280, 300, 401, 13, 1990, 24380, 29901, 13, 1678, 822, 788, 14991, 1169, 29898, 1311, 29892, 954, 29901, 938, 29897, 1599, 938, 29901, 13, 4706, 1550, 954, 1405, 29871, 29929,...
motor_watch/status.py
pcdshub/motor_watch
0
137463
def process(status): status_info = {} status_info['name'] = status.pos.name status_info['target'] = status.target return status_info
[ 1, 822, 1889, 29898, 4882, 1125, 13, 1678, 4660, 29918, 3888, 353, 6571, 13, 1678, 4660, 29918, 3888, 1839, 978, 2033, 353, 4660, 29889, 1066, 29889, 978, 13, 1678, 4660, 29918, 3888, 1839, 5182, 2033, 353, 4660, 29889, 5182, 13, 1678, ...
flask-gunicorn-mysql-nginx-compose/gunicorn.conf.py
xmmmmmovo/docker-config
0
1614212
import multiprocessing workers = multiprocessing.cpu_count() * 2 + 1 worker_class = "gevent" bind = "0.0.0.0:8888"
[ 1, 1053, 6674, 307, 985, 292, 13, 13, 1287, 414, 353, 6674, 307, 985, 292, 29889, 21970, 29918, 2798, 580, 334, 29871, 29906, 718, 29871, 29896, 13, 24602, 29918, 1990, 353, 376, 479, 794, 29908, 13, 5355, 353, 376, 29900, 29889, 2990...
O365/calendar.py
PhoenixAlx/py-o365
0
189296
import logging from enum import Enum from dateutil.parser import parse import datetime as dt import pytz import calendar from bs4 import BeautifulSoup as bs from O365.utils import Pagination, NEXT_LINK_KEYWORD, ApiComponent, Attachments, Attachment, \ AttachableMixin, ImportanceLevel, TrackerSet from O365.message ...
[ 1, 1053, 12183, 13, 3166, 14115, 1053, 1174, 398, 13, 3166, 2635, 4422, 29889, 16680, 1053, 6088, 13, 5215, 12865, 408, 11636, 13, 5215, 282, 3637, 29920, 13, 5215, 17684, 13, 3166, 24512, 29946, 1053, 25685, 29903, 1132, 408, 24512, 13...
axelrod/tests/strategies/test_gambler.py
nandhinianandj/Axelrod
596
130818
<filename>axelrod/tests/strategies/test_gambler.py """Test for the Gambler strategy. Most tests come from the LookerUp test suite. """ import copy import unittest import axelrod as axl from axelrod.load_data_ import load_pso_tables from axelrod.strategies.lookerup import create_lookup_table_keys from .test_evolvable_...
[ 1, 529, 9507, 29958, 1165, 295, 5964, 29914, 21150, 29914, 710, 1845, 583, 29914, 1688, 29918, 29887, 1117, 1358, 29889, 2272, 13, 15945, 29908, 3057, 363, 278, 402, 1117, 1358, 13705, 29889, 7849, 6987, 2041, 515, 278, 7419, 261, 3373, ...
replay_buffer.py
zhihanyang2022/pytorch-a2c
0
180804
from collections import namedtuple import random import numpy as np import torch # very exhaustive but as a result code is very easy to read ;) Transition = namedtuple('Transition', 's a r done') Transitions = namedtuple('Transitions', 's a r done') # functionally the same as Transition NStepTransitions = namedtuple...
[ 1, 515, 16250, 1053, 4257, 23583, 13, 5215, 4036, 13, 5215, 12655, 408, 7442, 13, 5215, 4842, 305, 13, 13, 29937, 1407, 27096, 573, 541, 408, 263, 1121, 775, 338, 1407, 4780, 304, 1303, 15718, 13, 13, 4300, 654, 353, 4257, 23583, 87...
0_numpy_lineare_algebra/assignments/learntools/challenges/challenge2.py
layerwise/training
0
41754
<filename>0_numpy_lineare_algebra/assignments/learntools/challenges/challenge2.py import pandas as pd import os import numpy as np from learntools.core import * class Evaluation(CodingProblem): show_solution_on_correct = False _vars = ["data_path", "results"] _hints = [ """Checking your solution ...
[ 1, 529, 9507, 29958, 29900, 29918, 23749, 29918, 1220, 598, 29918, 15742, 29914, 16645, 1860, 29914, 19668, 8504, 29914, 305, 16047, 267, 29914, 305, 11768, 29906, 29889, 2272, 13, 5215, 11701, 408, 10518, 13, 5215, 2897, 13, 5215, 12655, ...
apps/core/views/ServerEditView.py
Couapy/mc-manager
0
85462
<gh_stars>0 from core.exceptions import NotRunningError from core.forms import ServerForm from core.models import Server from django.contrib import messages from django.contrib.auth.decorators import login_required from django.shortcuts import (HttpResponseRedirect, get_object_or_404, render, ...
[ 1, 529, 12443, 29918, 303, 1503, 29958, 29900, 13, 13, 3166, 7136, 29889, 11739, 29879, 1053, 2216, 27795, 2392, 13, 3166, 7136, 29889, 9514, 1053, 5656, 2500, 13, 3166, 7136, 29889, 9794, 1053, 5656, 13, 3166, 9557, 29889, 21570, 1053, ...