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 |
|---|---|---|---|---|---|
python/207.py | kylekanos/project-euler-1 | 0 | 162926 | #!/usr/bin/env python
from math import log
def x1(u): return 4*u + 1
def y1(u): return 4*u*u + 2*u
def x2(u): return 4*u + 3
def y2(u): return 4*u*u + 6*u + 2
def nextk():
u1, u2 = 1, 0
while True:
if y1(u1)<y2(u2):
yield (y1(u1),(x1(u1)+1)/2)
u1 += 1
else:
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
3166,
5844,
1053,
1480,
13,
13,
1753,
921,
29896,
29898,
29884,
1125,
736,
29871,
29946,
29930,
29884,
718,
29871,
29896,
13,
1753,
343,
29896,
29898,
29884,
1125,
736,
29871,
29946,
299... |
setup.py | aarentai/pytorch_sym3eig | 15 | 138137 | from setuptools import setup, find_packages
import torch
from torch.utils.cpp_extension import CppExtension, CUDAExtension, CUDA_HOME
ext_modules = [
CppExtension('sym3eig_cpu', ['cpu/sym3eig.cpp']),
]
cmdclass = {'build_ext': torch.utils.cpp_extension.BuildExtension}
if CUDA_HOME is not None:
ext_modules += ... | [
1,
515,
731,
21245,
8789,
1053,
6230,
29892,
1284,
29918,
8318,
13,
5215,
4842,
305,
13,
3166,
4842,
305,
29889,
13239,
29889,
8223,
29918,
17588,
1053,
315,
407,
17657,
29892,
315,
29965,
7698,
17657,
29892,
315,
29965,
7698,
29918,
1735... |
CH_12_performance/T_15_garbage_collector_viewing.py | mastering-python/code_2 | 0 | 97135 | <filename>CH_12_performance/T_15_garbage_collector_viewing.py
import gc
import collections
if __name__ == '__main__':
objects = collections.Counter()
for object_ in gc.get_objects():
objects[type(object_)] += 1
print(f'Different object count: {len(objects)}')
for object_, count in objects.mos... | [
1,
529,
9507,
29958,
3210,
29918,
29896,
29906,
29918,
546,
13390,
29914,
29911,
29918,
29896,
29945,
29918,
5397,
17807,
29918,
15914,
272,
29918,
1493,
292,
29889,
2272,
13,
5215,
330,
29883,
13,
5215,
16250,
13,
13,
13,
361,
4770,
978,... |
peer/thread/UpdaterThread.py | xBlue0/BugTorrent | 5 | 123907 | #!/usr/bin/env python
from threading import Thread, Event
import time
import socket
import random
from peer.LocalData import LocalData
from utils import Logger
from utils import net_utils
class UpdaterThread(Thread):
def __init__(self, file_md5: str, part_list_length: int, update_event: Event, log: Logger.Logger):
... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
13,
3166,
3244,
292,
1053,
10480,
29892,
6864,
13,
5215,
931,
13,
5215,
9909,
13,
5215,
4036,
13,
3166,
23533,
29889,
7717,
1469,
1053,
9959,
1469,
13,
3166,
3667,
29879,
1053,
28468,
... |
detecting-invisible-people/deep_sort/tracker_mask.py | lv1turtle/Occlusion-object-tracking | 26 | 65704 | <reponame>lv1turtle/Occlusion-object-tracking<filename>detecting-invisible-people/deep_sort/tracker_mask.py
# vim: expandtab:ts=4:sw=4
from __future__ import absolute_import
import numpy as np
from skimage.filters import threshold_otsu
import os
from . import kalman_filter
from . import linear_assignment
from . import ... | [
1,
529,
276,
1112,
420,
29958,
28463,
29896,
29873,
4227,
280,
29914,
22034,
29880,
3958,
29899,
3318,
29899,
11294,
292,
29966,
9507,
29958,
4801,
522,
292,
29899,
262,
12872,
29899,
25719,
29914,
24535,
29918,
6605,
29914,
3018,
4937,
299... |
cdc/src/NoteDeid.py | ZebinKang/cdc | 0 | 21648 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
The MIT License (MIT)
Copyright (c) 2016 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation th... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
13,
12008,
13,
1576,
341,
1806,
19245,
313,
26349,
29897,
13,
13,
11882,
1266,
313,
29883,
29897,
29871,
299... |
src/data/build_dataset.py | Jesse989/game-design | 4 | 157859 | <reponame>Jesse989/game-design
from steam_crawl import SteamCrawl
sc = SteamCrawl()
sc.crawl()
| [
1,
529,
276,
1112,
420,
29958,
29967,
5340,
29929,
29947,
29929,
29914,
11802,
29899,
13892,
13,
3166,
21837,
29918,
29883,
1610,
29880,
1053,
2443,
314,
29907,
1610,
29880,
13,
13,
1557,
353,
2443,
314,
29907,
1610,
29880,
580,
13,
1557,... |
sktime/classification/feature_based/_summary_classifier.py | Rubiel1/sktime | 1 | 9108 | <filename>sktime/classification/feature_based/_summary_classifier.py
# -*- coding: utf-8 -*-
"""Summary Classifier.
Pipeline classifier using the basic summary statistics and an estimator.
"""
__author__ = ["MatthewMiddlehurst"]
__all__ = ["SummaryClassifier"]
import numpy as np
from sklearn.ensemble import RandomFo... | [
1,
529,
9507,
29958,
808,
2230,
29914,
1990,
2450,
29914,
14394,
29918,
6707,
19891,
7727,
29918,
1990,
3709,
29889,
2272,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
26289,
4134,
37... |
test/test_button_antialiasing.py | pythub-project/CustomTkinter | 0 | 95334 | <reponame>pythub-project/CustomTkinter
import customtkinter
import tkinter
customtkinter.CTkSettings.preferred_drawing_method = "font_shapes"
customtkinter.set_default_color_theme("blue")
customtkinter.set_appearance_mode("dark")
app = customtkinter.CTk()
app.geometry("600x800")
app.grid_columnconfigure(0, weight=1)... | [
1,
529,
276,
1112,
420,
29958,
29886,
1541,
431,
29899,
4836,
29914,
7281,
29911,
29895,
1639,
13,
5215,
2888,
11178,
1639,
13,
5215,
18883,
1639,
13,
13,
6341,
11178,
1639,
29889,
1783,
29895,
9585,
29889,
1457,
14373,
29918,
4012,
292,
... |
qgisserver/migrations/0012_auto_20190305_1011.py | aroiginfraplan/giscube-admin | 5 | 45193 | <gh_stars>1-10
# Generated by Django 2.1.7 on 2019-03-05 10:11
from django.db import migrations, models
import qgisserver.models
class Migration(migrations.Migration):
dependencies = [
('qgisserver', '0011_auto_20180803_0824'),
]
operations = [
migrations.AlterField(
model_n... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
3251,
630,
491,
15337,
29871,
29906,
29889,
29896,
29889,
29955,
373,
29871,
29906,
29900,
29896,
29929,
29899,
29900,
29941,
29899,
29900,
29945,
29871,
29896,
29... |
credentials_test.py | mi-ano/mi | 0 | 1616615 | import unittest
from credentials import Credentials
class TestUser(unittest.TestCase):
'''
Test class that defines the test cases for user class
behaviours
'''
def setUp(self):
'''
Setup method to run before each test cases
'''
self.new_credential = Credentials("Acco... | [
1,
1053,
443,
27958,
13,
3166,
16140,
1053,
24596,
9409,
13,
13,
1990,
4321,
2659,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
14550,
13,
1678,
4321,
770,
393,
17645,
278,
1243,
4251,
363,
1404,
770,
13,
1678,
4010,
29875,
2... |
deep_bsde/main.py | iLampard/deep_bsde | 5 | 175991 | <reponame>iLampard/deep_bsde<gh_stars>1-10
""" A script to run the model """
import os
import sys
CUR_PATH = os.path.abspath(os.path.dirname(__file__))
ROOT_PATH = os.path.split(CUR_PATH)[0]
sys.path.append(ROOT_PATH)
from absl import app
from absl import flags
from deep_bsde.model_runner import ModelRunner
from dee... | [
1,
529,
276,
1112,
420,
29958,
29875,
29931,
1160,
538,
29914,
24535,
29918,
5824,
311,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
15945,
29908,
319,
2471,
304,
1065,
278,
1904,
9995,
13,
13,
5215,
2897,
13,
... |
resources/lib/state.py | CPVprogrammer/hyperion.kodi | 6 | 97063 | '''
Kodi video capturer for Hyperion
Copyright (c) 2013-2016 Hyperion Team
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 th... | [
1,
14550,
13,
1678,
476,
12143,
4863,
4332,
9945,
363,
26078,
291,
13,
13,
1678,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29941,
29899,
29906,
29900,
29896,
29953,
26078,
291,
8583,
13,
13,
1678,
20894,
2333,
338,
1244,... |
wexcon/tests/test_account.py | rafael-valera/Wexcon | 2 | 100942 | <gh_stars>1-10
import unittest
from wexcon.account import Account
class TestAccount(unittest.TestCase):
def setUp(self):
self.get_info_response = {
"success": 1,
"return": {
"funds": {
"usd": 325,
"btc": 23.998,
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
5215,
443,
27958,
13,
13,
3166,
591,
29916,
535,
29889,
10149,
1053,
16535,
13,
13,
13,
1990,
4321,
10601,
29898,
348,
27958,
29889,
3057,
8259,
1125,
13,
1678,
822... |
main_model_hpOpt.py | zhangruochi/Mol-HGT | 3 | 1616949 | import core.molPred.init
from models import models
from core.molPred.molPred_datas_hpOpt import main
if __name__ == '__main__':
main(models)
| [
1,
1053,
7136,
29889,
29885,
324,
23084,
29889,
2344,
13,
3166,
4733,
1053,
4733,
13,
3166,
7136,
29889,
29885,
324,
23084,
29889,
29885,
324,
23084,
29918,
14538,
29918,
28887,
20624,
1053,
1667,
13,
13,
361,
4770,
978,
1649,
1275,
525,
... |
Solutions/077.py | ruppysuppy/Daily-Coding-Problem-Solutions | 70 | 5398 | <gh_stars>10-100
"""
Problem:
Given a list of possibly overlapping intervals, return a new list of intervals where
all overlapping intervals have been merged.
The input list is not necessarily ordered in any way.
For example, given [(1, 3), (5, 8), (4, 10), (20, 25)], you should return
[(1, 3), (4, 10), (20, 25)].
"... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
15945,
29908,
13,
26604,
29901,
13,
13,
29954,
5428,
263,
1051,
310,
10075,
975,
433,
3262,
18747,
29892,
736,
263,
716,
1051,
310,
18747,
988,
13,
49... |
ads/feature_engineering/adsstring/parsers/base.py | oracle/accelerated-data-science | 20 | 14186 | <gh_stars>10-100
#!/usr/bin/env python
# -*- coding: utf-8 -*--
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
class Parser:
@property
def pos(self):
raise NotImplementedError()
@pr... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
489,
13,
13,
29937,
14187... |
app/cli.py | Jiyvn/pyautotest | 0 | 30963 | import argparse
class appOptions:
show_devices = '--show-devices'
clean_report = '--clean-report'
device_config = '--device-config'
global_config = '--global-config'
test_case = '--test-case'
tests_dir = '--tests-dir'
device = '--device'
test = '--test'
service_address = '--ser... | [
1,
1053,
1852,
5510,
13,
13,
13,
1990,
623,
5856,
29901,
13,
13,
1678,
1510,
29918,
3359,
1575,
353,
525,
489,
4294,
29899,
3359,
1575,
29915,
13,
1678,
5941,
29918,
12276,
353,
525,
489,
14941,
29899,
12276,
29915,
13,
13,
1678,
4742... |
readthedocs/projects/migrations/0057_add_page_rank.py | alanadiprastyo/readthedocs.org | 0 | 184387 | # Generated by Django 2.2.12 on 2020-06-25 18:44
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0056_add_disable_analytics'),
]
operations = [
migrations.AddField(
model_name='impor... | [
1,
396,
3251,
630,
491,
15337,
29871,
29906,
29889,
29906,
29889,
29896,
29906,
373,
29871,
29906,
29900,
29906,
29900,
29899,
29900,
29953,
29899,
29906,
29945,
29871,
29896,
29947,
29901,
29946,
29946,
13,
13,
5215,
9557,
29889,
3221,
29889... |
famille/utils/context_processors.py | huguesmayolle/famille | 0 | 164487 | from famille.models import has_user_related, get_user_related
from famille.utils import get_context
def related_user(request):
"""
A context processor that returns the related user from a request.user.
:param request: the request to be processed
"""
if not has_user_related(request.user):
... | [
1,
515,
11449,
29889,
9794,
1053,
756,
29918,
1792,
29918,
12817,
29892,
679,
29918,
1792,
29918,
12817,
13,
3166,
11449,
29889,
13239,
1053,
679,
29918,
4703,
13,
13,
13,
1753,
4475,
29918,
1792,
29898,
3827,
1125,
13,
1678,
9995,
13,
... |
backend-project/small_eod/autocomplete/tests/test_views.py | merito/small_eod | 64 | 505 | from test_plus.test import TestCase
from ...administrative_units.factories import AdministrativeUnitFactory
from ...cases.factories import CaseFactory
from ...channels.factories import ChannelFactory
from ...events.factories import EventFactory
from ...features.factories import FeatureFactory, FeatureOptionFactory
fro... | [
1,
515,
1243,
29918,
11242,
29889,
1688,
1053,
4321,
8259,
13,
13,
3166,
2023,
6406,
2132,
1230,
29918,
348,
1169,
29889,
17028,
3842,
1053,
24510,
1230,
8325,
5126,
13,
3166,
2023,
11436,
29889,
17028,
3842,
1053,
11733,
5126,
13,
3166,
... |
examples/regression/survival_prediction/extract_patch_feature.py | Starrah/THU-SuperMoon | 64 | 36255 | <filename>examples/regression/survival_prediction/extract_patch_feature.py
import openslide
import torch
from tqdm import tqdm
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
from SuperMoon.models import ResNetFeature
def extract_ft(slide_dir: str, patch_coors, depth=34, batch_siz... | [
1,
529,
9507,
29958,
19057,
29914,
276,
11476,
29914,
7610,
29894,
2561,
29918,
11965,
2463,
29914,
21111,
29918,
5041,
29918,
14394,
29889,
2272,
13,
5215,
13246,
7459,
13,
5215,
4842,
305,
13,
3166,
260,
29939,
18933,
1053,
260,
29939,
... |
calamari_ocr/ocr/savedmodel/migrations/loadweights.py | jacektl/calamari | 922 | 158657 | <filename>calamari_ocr/ocr/savedmodel/migrations/loadweights.py
def load_and_convert_weights(ckpt, dry_run=True):
import tensorflow as tf
tf.compat.v1.reset_default_graph()
with tf.compat.v1.Session() as sess:
available_vars = tf.compat.v1.train.list_variables(ckpt)
available_var_names = [v... | [
1,
529,
9507,
29958,
1052,
314,
1306,
29918,
8415,
29914,
8415,
29914,
17314,
4299,
29914,
26983,
800,
29914,
1359,
705,
5861,
29889,
2272,
13,
1753,
2254,
29918,
392,
29918,
13441,
29918,
705,
5861,
29898,
384,
415,
29892,
15589,
29918,
... |
my_hello_world_app/web_api/router.py | gsjay980/data-science-IP | 5 | 15043 | from os import getenv
from typing import Optional, Dict
from flask import Flask
TestConfig = Optional[Dict[str, bool]]
def create_app(test_config: TestConfig = None) -> Flask:
""" App factory method to initialize the application with given configuration """
app: Flask = Flask(__name__)
if test_config ... | [
1,
515,
2897,
1053,
679,
6272,
13,
13,
3166,
19229,
1053,
28379,
29892,
360,
919,
13,
3166,
29784,
1053,
2379,
1278,
13,
13,
3057,
3991,
353,
28379,
29961,
21533,
29961,
710,
29892,
6120,
5262,
13,
13,
13,
1753,
1653,
29918,
932,
2989... |
tests/test_example/test_example/app.py | Chise1/fastapi-cli | 5 | 1608343 | import os
os.environ.setdefault("FASTAPI_SETTINGS_MODULE", "test_example.settings")
from test_example.factory import create_app
app = create_app()
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, debug=True, port=8000, lifespan="on")
| [
1,
1053,
2897,
13,
13,
359,
29889,
21813,
29889,
842,
4381,
703,
4519,
1254,
8787,
29918,
10490,
29911,
4214,
29903,
29918,
6720,
14849,
1307,
613,
376,
1688,
29918,
4773,
29889,
11027,
1159,
13,
3166,
1243,
29918,
4773,
29889,
14399,
105... |
app/helper.py | mnadev/Muezzin | 2 | 161296 | import datetime
def celcius_to_fahrenheit(celsius):
"""
Converts a temperature from celcius to fahrenheit
:param celsius: The temperature in Celcius
:return: The converted fahrenheit temperature
"""
return round((celsius * 9 / 5) + 32, 2)
def get_tomorrow_date():
"""
Creates and retu... | [
1,
1053,
12865,
13,
13,
13,
1753,
6432,
16102,
29918,
517,
29918,
19243,
6884,
29898,
2242,
1039,
375,
1125,
13,
1678,
9995,
13,
1678,
1281,
369,
1372,
263,
10430,
515,
6432,
16102,
304,
285,
21446,
6884,
13,
1678,
584,
3207,
6432,
10... |
BioSTEAM 2.x.x/biorefineries/oilcane/_uncertainty_plots.py | yoelcortes/Bioindustrial-Complex | 2 | 31053 | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 5 01:34:00 2021
@author: yrc2
"""
import biosteam as bst
import biorefineries.oilcane as oc
from biosteam.utils import CABBI_colors, colors
from thermosteam.utils import set_figure_size, set_font, roundsigfigs
from thermosteam.units_of_measure import format_units
from co... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
13,
20399,
373,
11169,
2864,
259,
29945,
29871,
29900,
29896,
29901,
29941,
29946,
29901,
29900,
29900,
29871,
29906,
29900,
29906,
29896,
13,
... |
py/2019/day22/day22.py | cs-cordero/advent-of-code | 0 | 108736 | from typing import List
def solution1(data: List[str]) -> str:
# https://codeforces.com/blog/entry/72593
a = 1
b = 0
m = 10007
for instruction in data:
if instruction == "deal into new stack":
a *= -1
b *= -1
b -= 1
elif "cut" in instruction:
... | [
1,
515,
19229,
1053,
2391,
13,
13,
13,
1753,
1650,
29896,
29898,
1272,
29901,
2391,
29961,
710,
2314,
1599,
851,
29901,
13,
1678,
396,
2045,
597,
401,
1454,
778,
29889,
510,
29914,
7312,
29914,
8269,
29914,
29955,
29906,
29945,
29929,
2... |
examples/pylot/control_operator.py | yujialuo/erdos | 0 | 123700 | from erdos.data_stream import DataStream
from erdos.message import Message
from erdos.op import Op
from erdos.utils import setup_logging
import planner.planner_operator
# Constants Used for the high level commands
REACH_GOAL = 0.0
GO_STRAIGHT = 5.0
TURN_RIGHT = 4.0
TURN_LEFT = 3.0
LANE_FOLLOW = 2.0
class ControlOpe... | [
1,
515,
604,
29881,
359,
29889,
1272,
29918,
5461,
1053,
3630,
3835,
13,
3166,
604,
29881,
359,
29889,
4906,
1053,
7777,
13,
3166,
604,
29881,
359,
29889,
459,
1053,
6461,
13,
3166,
604,
29881,
359,
29889,
13239,
1053,
6230,
29918,
2102... |
jupyterhub_http_authenticator/httpauthenticator.py | clockfly/jupterhub_http_authenticator | 0 | 4739 | import json
import urllib
import os
import jupyterhub
from tornado.httpclient import HTTPRequest, AsyncHTTPClient
from traitlets import Unicode
from jupyterhub.auth import Authenticator
from tornado import gen
class HttpAuthenticator(Authenticator):
server = Unicode(
None,
allow_none=True,
... | [
1,
1053,
4390,
13,
5215,
3142,
1982,
13,
5215,
2897,
13,
5215,
432,
786,
25547,
29882,
431,
13,
3166,
10146,
912,
29889,
1124,
4645,
1053,
7331,
3089,
29892,
20688,
10493,
4032,
13,
3166,
22917,
10376,
1053,
23862,
13,
3166,
432,
786,
... |
raiden_contracts/tests/utils/__init__.py | karlb/raiden-contracts | 49 | 61469 | # flake8: noqa
from .address import *
from .channel import *
from .constants import *
from .contracts import *
from .mock import *
| [
1,
396,
17422,
446,
29947,
29901,
694,
25621,
13,
13,
3166,
869,
7328,
1053,
334,
13,
3166,
869,
12719,
1053,
334,
13,
3166,
869,
3075,
1934,
1053,
334,
13,
3166,
869,
1285,
1461,
29879,
1053,
334,
13,
3166,
869,
17640,
1053,
334,
1... |
pytorch_ares/third_party/free_adv_train/multi_restart_pgd_attack.py | thu-ml/realsafe | 107 | 28064 | <reponame>thu-ml/realsafe
"""
Implementation of attack methods. Running this file as a program will
evaluate the model and get the validation accuracy and then
apply the attack to the model specified by the config file and store
the examples in an .npy file.
"""
from __future__ import absolute_import
from __futu... | [
1,
529,
276,
1112,
420,
29958,
386,
29884,
29899,
828,
29914,
276,
1338,
29874,
1725,
13,
15945,
19451,
13,
1888,
14607,
310,
5337,
3519,
29889,
19509,
445,
934,
408,
263,
1824,
674,
30004,
13,
24219,
403,
278,
1904,
322,
679,
278,
88... |
test/crossrunner/compat.py | BluechipSystems/thrift | 0 | 900 | import os
import sys
if sys.version_info[0] == 2:
_ENCODE = sys.getfilesystemencoding()
def path_join(*args):
bin_args = map(lambda a: a.decode(_ENCODE), args)
return os.path.join(*bin_args).encode(_ENCODE)
def str_join(s, l):
bin_args = map(lambda a: a.decode(_ENCODE), l)
b = s.decode(_ENCODE)... | [
1,
1053,
2897,
13,
5215,
10876,
13,
13,
361,
10876,
29889,
3259,
29918,
3888,
29961,
29900,
29962,
1275,
29871,
29906,
29901,
13,
29871,
903,
1430,
16524,
353,
10876,
29889,
657,
5325,
973,
22331,
580,
13,
13,
29871,
822,
2224,
29918,
7... |
astropy/utils/compat/numpycompat.py | bastianbeischer/astropy | 2 | 104318 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This is a collection of monkey patches and workarounds for bugs in
earlier versions of Numpy.
"""
from astropy.utils import minversion
__all__ = ['NUMPY_LT_1_17', 'NUMPY_LT_1_18', 'NUMPY_LT_1_19']
# TODO: It might also be nice to have aliases to the... | [
1,
396,
10413,
21144,
1090,
263,
29871,
29941,
29899,
16398,
1509,
350,
7230,
3114,
19405,
448,
1074,
365,
2965,
1430,
1660,
29889,
29878,
303,
13,
15945,
29908,
13,
4013,
338,
263,
4333,
310,
1601,
1989,
13261,
267,
322,
664,
279,
3885... |
jwttoken.py | liuyinsi111/ck | 0 | 61365 | <gh_stars>0
import json
import base64
import hmac,hashlib
# token如何签发
# 头信息
header = {
'typ': 'JWT',
'alg': 'HS256'
}
# 把字典数据转化成字符串
header = json.dumps(header) # string
# 把json格式字符串经过base64编码得出token值的头部
header = base64.b64encode(header.encode()) # bytes
# header: b'<KEY>'
print("header: ", header)
# 载荷
payl... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
13,
13,
5215,
4390,
13,
5215,
2967,
29953,
29946,
13,
5215,
298,
8628,
29892,
8568,
1982,
13,
13,
29937,
5993,
30847,
31502,
234,
176,
193,
30910,
13,
13,
29937,
29871,
31584,
30689,
... |
jump.py | xiaochuan-cd/leetcode | 0 | 1612926 | class Solution:
def jump(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
jumps, start, end, far = 0, 0, 0, 0
while end < len(nums) - 1:
jumps += 1
for i in range(start, end+1):
far = max(far, nums[i]+i)
start... | [
1,
770,
24380,
29901,
13,
1678,
822,
12500,
29898,
1311,
29892,
954,
29879,
1125,
13,
4706,
9995,
13,
4706,
584,
1853,
954,
29879,
29901,
2391,
29961,
524,
29962,
13,
4706,
584,
29878,
1853,
29901,
938,
13,
4706,
9995,
13,
13,
4706,
4... |
src/utils.py | lubianat/complex_bot | 1 | 25606 | # Code modified from original by @jvfe (BSD2)
# Copyright (c) 2020, jvfe
# https://github.com/jvfe/wdt_contribs/tree/master/complex_portal/src
import math
import re
from collections import defaultdict
from ftplib import FTP
from functools import lru_cache, reduce
from time import gmtime, strftime
import pandas as pd
f... | [
1,
396,
5920,
9120,
515,
2441,
491,
732,
29926,
29894,
1725,
313,
29933,
7230,
29906,
29897,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29906,
29900,
29892,
432,
29894,
1725,
13,
29937,
2045,
597,
3292,
29889,
510,
29... |
main_sequence/scripts/library/AziFromPos.py | matreshka15/uas-raspi-ros | 4 | 72185 | <gh_stars>1-10
'''Copyright 2019 李东豫<<EMAIL>>
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 agr... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
11882,
1266,
29871,
29906,
29900,
29896,
29929,
29871,
30864,
30979,
235,
180,
174,
9314,
26862,
6227,
6778,
13,
13,
259,
10413,
21144,
1090,
278,
13380,
19245,
... |
program_functions/settings_bot.py | gorpoorko/Manicomio-Bot-GUI | 0 | 192536 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#███╗ ███╗ █████╗ ███╗ ██╗██╗ ██████╗ ██████╗ ███╗ ███╗██╗ ██████╗
#████╗ ████║██╔══██╗████╗ ██║██║██╔════╝██╔═══██╗████╗ ████║██║██╔═══██╗
#██╔████╔██║███████║██╔██╗ ██║██║██║ ██║ ██║██╔████╔██║██║██║ ██║
#██║╚██╔╝██║██╔══██║██║╚██╗██║██║██║ ██║ ██║██║... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
30208,
30208,
30208,
31215,
1678,
30208,
30208,
30208,
31215,
29871,
30208,
30208,
30208,
30208,
30... |
Python/find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree.py | sm2774us/leetcode_interview_prep_2021 | 0 | 77849 | # Time: O(n)
# Space: O(h)
import itertools
# Definition for a binary tree node.
class TreeNode(object):
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution(object):
def getTargetCopy(self, original, cloned, target):
"""
:type origi... | [
1,
396,
5974,
29901,
29871,
438,
29898,
29876,
29897,
13,
29937,
14121,
29901,
438,
29898,
29882,
29897,
13,
13,
5215,
4256,
8504,
13,
13,
13,
29937,
21940,
363,
263,
7581,
5447,
2943,
29889,
13,
1990,
15472,
4247,
29898,
3318,
1125,
13... |
flask/flask_app/run.py | Moremar/py-library-tuto | 0 | 189184 | <filename>flask/flask_app/run.py
from myblog import create_app
# For a better split of the code, we run the webapp from this run.py script.
# The actual webapp code is in its own package.
# The "db" and "app" variable are defined in the __init__.py of the package so they are accessible to
# the outside (like this scri... | [
1,
529,
9507,
29958,
1579,
1278,
29914,
1579,
1278,
29918,
932,
29914,
3389,
29889,
2272,
13,
3166,
590,
7312,
1053,
1653,
29918,
932,
13,
13,
29937,
1152,
263,
2253,
6219,
310,
278,
775,
29892,
591,
1065,
278,
1856,
932,
515,
445,
10... |
mypy/test/data/fixtures/bool.py | silky/mypy | 1 | 140966 | <filename>mypy/test/data/fixtures/bool.py
# builtins stub used in boolean-related test cases.
class object:
def __init__(self) -> None: pass
class type: pass
class bool: pass
class int: pass
| [
1,
529,
9507,
29958,
1357,
2272,
29914,
1688,
29914,
1272,
29914,
7241,
486,
1973,
29914,
11227,
29889,
2272,
13,
29937,
4240,
1144,
19281,
1304,
297,
7223,
29899,
12817,
1243,
4251,
29889,
13,
13,
1990,
1203,
29901,
13,
1678,
822,
4770,
... |
niftymic/validation/slice_acquisition.py | martaranzini/NiftyMIC | 86 | 90560 | <reponame>martaranzini/NiftyMIC<gh_stars>10-100
##
# \file slice_acquisition.py
# \brief Based on a given volume, this class aims to simulate the slice
# acquisition.
#
# \author <NAME> (<EMAIL>)
# \date May 2016
#
# Import libraries
import itk
import SimpleITK as sitk
import numpy as np
im... | [
1,
529,
276,
1112,
420,
29958,
28402,
279,
4096,
2172,
29914,
29940,
361,
1017,
29924,
2965,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
2277,
13,
29937,
320,
1445,
22780,
29918,
562,
23493,
29889,
... |
python/mxnet/initializer.py | bearsroom/mxnet-augmented | 1 | 138021 | # coding: utf-8
# pylint: disable=too-many-branches
"""Initialization helper for mxnet"""
from __future__ import absolute_import
import re
import logging
import numpy as np
from .base import string_types
from .ndarray import NDArray, load
from . import random
class Initializer(object):
"""Base class for Initializ... | [
1,
396,
14137,
29901,
23616,
29899,
29947,
13,
29937,
282,
2904,
524,
29901,
11262,
29922,
517,
29877,
29899,
13011,
29899,
17519,
267,
13,
15945,
29908,
15514,
2133,
16876,
363,
286,
29916,
1212,
15945,
29908,
13,
3166,
4770,
29888,
9130,
... |
set4/26.py | dineshkumarc987/matasano-crypto | 25 | 54451 | from common import randstr, AES_CTR, xor_str
from random import randint
oracle_key = randstr(16)
oracle_nonce = randint(0, (1 << 64) - 1)
def encryption_oracle(data):
data = data.replace(';', '').replace('=', '')
data = "comment1=cooking%20MCs;userdata=" + data
data = data + ";comment2=%20like%20a%20poun... | [
1,
515,
3619,
1053,
20088,
710,
29892,
319,
2890,
29918,
1783,
29934,
29892,
921,
272,
29918,
710,
13,
3166,
4036,
1053,
20088,
524,
13,
13,
11347,
29918,
1989,
353,
20088,
710,
29898,
29896,
29953,
29897,
13,
11347,
29918,
5464,
346,
3... |
filer_celery/utils.py | nephila/django-filer-celery | 3 | 96650 | <reponame>nephila/django-filer-celery
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from easy_thumbnails.alias import aliases
def load_aliases():
"""
Load ThumbnailOption as easy-thumbnails aliases
"""
def _load_aliases():
try:
from cmsplugin_fil... | [
1,
529,
276,
1112,
420,
29958,
484,
561,
4233,
29914,
14095,
29899,
1777,
261,
29899,
2242,
708,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
521... |
boto3_type_annotations_with_docs/boto3_type_annotations/datapipeline/paginator.py | cowboygneox/boto3_type_annotations | 119 | 70175 | <filename>boto3_type_annotations_with_docs/boto3_type_annotations/datapipeline/paginator.py<gh_stars>100-1000
from typing import Dict
from typing import List
from botocore.paginate import Paginator
class DescribeObjects(Paginator):
def paginate(self, pipelineId: str, objectIds: List, evaluateExpressions: bool = N... | [
1,
529,
9507,
29958,
29890,
3747,
29941,
29918,
1853,
29918,
6735,
800,
29918,
2541,
29918,
2640,
29914,
29890,
3747,
29941,
29918,
1853,
29918,
6735,
800,
29914,
4130,
481,
23828,
29914,
13573,
262,
1061,
29889,
2272,
29966,
12443,
29918,
... |
py-data/plugin.video.arteplussept/problems/api-related/1/correct-usages/get_last7days.py | ualberta-smr/NFBugs | 3 | 37326 | <reponame>ualberta-smr/NFBugs<filename>py-data/plugin.video.arteplussept/problems/api-related/1/correct-usages/get_last7days.py
from xbmcswift2 import Plugin
from xbmcswift2 import actions
import requests
import os
import urllib2
import time
import datetime
def get_last7days():
return flatten([get_day(date) for ... | [
1,
529,
276,
1112,
420,
29958,
950,
19954,
29899,
3844,
29878,
29914,
29940,
18426,
16926,
29966,
9507,
29958,
2272,
29899,
1272,
29914,
8582,
29889,
9641,
29889,
11908,
11242,
344,
415,
29914,
17199,
29879,
29914,
2754,
29899,
12817,
29914,
... |
dyce/symmetries.py | posita/dyce | 18 | 117986 | <reponame>posita/dyce
# ======================================================================================
# Copyright and other protections apply. Please see the accompanying LICENSE file for
# rights and restrictions governing use of this software. All rights not expressly
# waived or licensed are reserved. If th... | [
1,
529,
276,
1112,
420,
29958,
1066,
2028,
29914,
4518,
346,
13,
29937,
1275,
9166,
9166,
9166,
9166,
9166,
2751,
13,
29937,
14187,
1266,
322,
916,
3279,
1953,
3394,
29889,
3529,
1074,
278,
10259,
1384,
292,
365,
2965,
1430,
1660,
934,
... |
IT77A _assistant.py | JasinAlAmin/Owl-Chatbot | 0 | 40943 | import speech_recognition as sr
import pyttsx3
import pywhatkit
import datatime
import wikipedia
import pyjokes
from googlesearch import search
listener = sr.Recognizer()
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setPropert('voice',voices[1].id)
def talk(text)
engine.say(text)
engine... | [
1,
1053,
12032,
29918,
29423,
654,
408,
27236,
13,
5215,
11451,
698,
29879,
29916,
29941,
13,
5215,
11451,
5816,
7354,
13,
5215,
1418,
271,
603,
13,
5215,
281,
638,
4652,
13,
5215,
11451,
29926,
23195,
29871,
13,
3166,
27304,
793,
2842,... |
CMS_Profile/97-user.py | yugangzhang/GitTest | 0 | 166039 | <reponame>yugangzhang/GitTest
#!/usr/bin/python
# -*- coding: utf-8 -*-
# vi: ts=4 sw=4
################################################################################
# Short-term settings (specific to a particular user/experiment) can
# be placed in this file. You may instead wish to make a copy of this file in... | [
1,
529,
276,
1112,
420,
29958,
29891,
688,
574,
29920,
11895,
29914,
28712,
3057,
13,
29937,
14708,
4855,
29914,
2109,
29914,
4691,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
29937,
3516,
29901,
... |
dart/build_rules/common/path.bzl | nickclmb/rules_dart | 0 | 164026 | """Common utilities for dealing with paths."""
def filter_files(filetypes, files):
"""Filters a list of files based on a list of strings."""
filtered_files = []
for file_to_filter in files:
for filetype in filetypes:
filename = file_to_filter if type(file_to_filter) == "string" else file_to_filter.base... | [
1,
9995,
18877,
3667,
1907,
363,
16743,
411,
10898,
1213,
15945,
13,
13,
1753,
4175,
29918,
5325,
29898,
1445,
8768,
29892,
2066,
1125,
13,
29871,
9995,
3434,
2153,
263,
1051,
310,
2066,
2729,
373,
263,
1051,
310,
6031,
1213,
15945,
13,... |
para_batch.py | Licht-T/Ant-Cuda | 0 | 1615484 | <reponame>Licht-T/Ant-Cuda
import os
import subprocess
make_cmd = "make"
# dists = [30,]
# angles = [10,]
dists = [50, 45, 40, 30,]
angles = [10, 45, 90,]
flag_win = False
try:
os.uname()
except AttributeError:
flag_win = True
if flag_win:
make_cmd = "mingw32-make"
for dist in dists:
for angle in an... | [
1,
529,
276,
1112,
420,
29958,
29931,
1428,
29899,
29911,
29914,
13448,
29899,
29907,
6191,
13,
5215,
2897,
13,
5215,
1014,
5014,
13,
13,
5675,
29918,
9006,
353,
376,
5675,
29908,
13,
29937,
1320,
29879,
353,
518,
29941,
29900,
26073,
1... |
red_githubbot/routers/auto_apply_changelog_entry_pending.py | Cog-Creators/Red-GitHubBot | 0 | 195419 | <filename>red_githubbot/routers/auto_apply_changelog_entry_pending.py<gh_stars>0
from gidgethub import sansio
from .. import utils
from . import gh_router
@gh_router.register("pull_request", action="closed")
async def auto_apply_changelog_entry_pending(event: sansio.Event) -> None:
pr_data = event.data["pull_req... | [
1,
529,
9507,
29958,
1127,
29918,
3292,
7451,
29914,
27537,
2153,
29914,
6921,
29918,
7302,
29918,
305,
9477,
468,
29918,
8269,
29918,
29886,
2548,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
330,
333,
29887,
621,
... |
roles/enable_sriov/library/enable_compute_sriov.py | EndeavorYen/container-experience-kits | 1 | 59326 | #!/usr/bin/python
# Copyright (c) 2016-2017, Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of cond... | [
1,
18787,
4855,
29914,
2109,
29914,
4691,
13,
13,
29937,
14187,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
29953,
29899,
29906,
29900,
29896,
29955,
29892,
18555,
15025,
29889,
13,
29937,
13,
29937,
4367,
391,
3224,
322,
671,
297,... |
ormcache/managers.py | educreations/django-ormcache | 5 | 84886 | <filename>ormcache/managers.py<gh_stars>1-10
from django.db.models.signals import class_prepared, post_delete, post_save
from django.utils.functional import cached_property
from ormcache.queryset import CachedQuerySet
class CachedManagerMixin(object):
@cached_property
def __cache_enabled(self):
retu... | [
1,
529,
9507,
29958,
555,
8173,
29914,
1171,
18150,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
3166,
9557,
29889,
2585,
29889,
9794,
29889,
4530,
1338,
1053,
770,
29918,
15287,
1965,
29892,
1400,
299... |
tasks/sum_indivisible.py | pwlodarczyk92/python-problems | 0 | 178030 | <filename>tasks/sum_indivisible.py
# write program reading an integer from standard input - a
# printing sum of all numbers indivisible by 3, smaller than a
# for example, for a=10, result = 1 + 2 + 4 + 5 + 7 + 8 = 27
a = int(input("pass a - "))
element = 1
result = 0
while element < a:
if element % 3 != 0 :
resu... | [
1,
529,
9507,
29958,
20673,
29914,
2083,
29918,
513,
440,
275,
1821,
29889,
2272,
13,
29937,
2436,
1824,
5183,
385,
6043,
515,
3918,
1881,
448,
263,
13,
29937,
14010,
2533,
310,
599,
3694,
1399,
440,
275,
1821,
491,
29871,
29941,
29892,... |
sinfer/dataset/writer/ganwriter.py | geoyee/SlideInfer | 4 | 181270 | import numpy as np
from typing import List, Dict
from .base import BaseWriter
try:
from osgeo import gdal
except:
import gdal
class GanWriter(BaseWriter):
def __init__(self, config: Dict, scale: int) -> None:
super(GanWriter, self).__init__(config, "tif")
driver = gdal.GetDri... | [
1,
1053,
12655,
408,
7442,
30004,
13,
3166,
19229,
1053,
2391,
29892,
360,
919,
30004,
13,
3166,
869,
3188,
1053,
7399,
10507,
30004,
13,
30004,
13,
2202,
29901,
30004,
13,
1678,
515,
2897,
24756,
1053,
330,
12293,
30004,
13,
19499,
299... |
exareme-tools/madis/src/functionslocal/aggregate/toarray.py | HBPSP8Repo/exareme | 0 | 162096 | import math
from array import array
import cPickle
class convertcovariancetabletoarray:
registered = True #Value to define db operator
def __init__(self):
self.n = 0
self.data = {}
self.mydata1D = []
self.headers = []
self.flag = True
def step(self, *args):
... | [
1,
1053,
5844,
13,
3166,
1409,
1053,
1409,
13,
5215,
274,
29925,
860,
280,
13,
13,
1990,
3588,
24542,
13956,
29883,
300,
519,
517,
2378,
29901,
13,
13,
1678,
15443,
353,
5852,
396,
1917,
304,
4529,
4833,
5455,
13,
13,
1678,
822,
477... |
src/losses.py | ThorstenBuss/jet-inn | 4 | 190828 | <reponame>ThorstenBuss/jet-inn
import torch
import torch.nn as nn
class INN_loss(nn.Module):
def __init__(self, num_dim):
super(INN_loss, self).__init__()
self.num_dim = num_dim
def forward(self, Z, log_jac_det):
losses = 0.5*torch.sum(Z**2, 1) - log_jac_det
loss = losses.mean... | [
1,
529,
276,
1112,
420,
29958,
1349,
272,
3510,
29933,
1558,
29914,
4026,
29899,
2559,
13,
5215,
4842,
305,
13,
5215,
4842,
305,
29889,
15755,
408,
302,
29876,
13,
13,
1990,
2672,
29940,
29918,
6758,
29898,
15755,
29889,
7355,
1125,
13,... |
telemetry/telemetry/internal/platform/tracing_agent/chrome_report_events_tracing_agent.py | BearerPipelineTest/catapult | 0 | 198898 | # Copyright 2020 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.
from __future__ import absolute_import
from telemetry.internal.platform.tracing_agent import chrome_tracing_agent
# A class that uses ReportEvents mode for... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29906,
29900,
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,... |
bplrh_helpers/credits.py | ganoninc/flowtos | 1 | 151833 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Build credits / models section for the about page"""
import os
import glob
import shutil
from progress.bar import Bar
from PIL import Image
import bplrh_helpers.tools
def reset(config):
models_path = config['plr']['main_folder_path'] + config['plr']['models_folde... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
29908,
8893,
6625,
1169,
847,
4733,
4004,
363,
278,
1048,
1813,
15945,
29908,
13,
13,
13,
5215,... |
kite_runner/models/article.py | thinhnguyenuit/kite_runner | 0 | 117883 | <filename>kite_runner/models/article.py
from django.db import models
from django.template.defaultfilters import slugify
class Article(models.Model):
slug = models.SlugField(max_length=255, unique=True, db_index=True)
title = models.CharField(max_length=255)
description = models.TextField()
body = mode... | [
1,
529,
9507,
29958,
29895,
568,
29918,
27492,
29914,
9794,
29914,
7914,
29889,
2272,
13,
3166,
9557,
29889,
2585,
1053,
4733,
13,
3166,
9557,
29889,
6886,
29889,
4381,
26705,
1053,
2243,
688,
1598,
13,
13,
13,
1990,
21746,
29898,
9794,
... |
ane/2_compile/struct_recover.py | el-iot/tinygrad | 5,578 | 194937 | #!/usr/bin/env python3
from ane import ANE
ane = ANE()
lens = {}
dat = b"\xff"*0x300
ret = ane.debug(dat, 16)
for k,v in ret.items():
found = None
for i in range(33):
#print(v, (1 << i) - 1)
if v == (1 << i) - 1:
found = i
break
#print(k, hex(v), found)
lens[k] = found
pos = []
dat = b"\x... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
3166,
385,
29872,
1053,
319,
8186,
13,
1662,
353,
319,
8186,
580,
13,
13,
29880,
575,
353,
6571,
13,
13,
4130,
353,
289,
26732,
29916,
600,
29908,
29930,
29900,
29916,
29941,
... |
cli/run_model.py | TomGoBravo/covid-data-model | 0 | 113690 | #!/usr/bin/env python
import pathlib
import datetime
import logging
import click
from libs.datasets import data_version
from libs.pipelines import can_model_pipeline
_logger = logging.getLogger(__name__)
@click.group('model')
def main():
"""Run models"""
pass
@main.command("county")
@click.option("--state"... | [
1,
18787,
4855,
29914,
2109,
29914,
6272,
3017,
13,
5215,
2224,
1982,
13,
5215,
12865,
13,
5215,
12183,
13,
5215,
2828,
13,
3166,
4303,
29879,
29889,
14538,
1691,
1053,
848,
29918,
3259,
13,
3166,
4303,
29879,
29889,
13096,
24210,
1053,
... |
datadog_checks_base/tests/test_metadata.py | tony612/integrations-core | 0 | 75340 | # (C) Datadog, Inc. 2019
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import json
import logging
import re
from collections import OrderedDict
import mock
import pytest
from datadog_checks.base import AgentCheck
pytestmark = pytest.mark.metadata
SET_CHECK_METADATA_METHOD = 'data... | [
1,
396,
313,
29907,
29897,
13373,
328,
468,
29892,
9266,
29889,
29871,
29906,
29900,
29896,
29929,
13,
29937,
2178,
10462,
21676,
13,
29937,
10413,
21144,
1090,
263,
29871,
29941,
29899,
16398,
1509,
350,
7230,
3114,
19405,
313,
4149,
365,
... |
src/geometry_transferring/perspective_transformation.py | Tim-eyes/example_driven_guide_opencv | 0 | 123465 | <filename>src/geometry_transferring/perspective_transformation.py<gh_stars>0
import cv2
import numpy as np
from matplotlib import pyplot as plot
img=cv2.imread('must_logo.png')
rows,cols,ch=img.shape
pts1 = np.float32([[56,65],[368,52],[28,387],[389,390]])
pts2 = np.float32([[0,0],[300,0],[0,300],[300,300]])
M=cv2.ge... | [
1,
529,
9507,
29958,
4351,
29914,
19156,
29918,
3286,
571,
5393,
29914,
6774,
12645,
29918,
3286,
5404,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
3166,
22889,
1053,
... |
eznlp/vectors.py | syuoni/eznlp | 9 | 26241 | <reponame>syuoni/eznlp
# -*- coding: utf-8 -*-
from typing import Union, List
import os
import tqdm
import logging
import torch
logger = logging.getLogger(__name__)
def _parse_line(line: bytes):
w, *vector = line.rstrip().split(b" ")
return w, [float(v) for v in vector]
def _infer_shape(path: str, skiprows... | [
1,
529,
276,
1112,
420,
29958,
29879,
29891,
29884,
5271,
29914,
29872,
3749,
22833,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
19229,
1053,
7761,
29892,
2391,
13,
5215,
2897,
13,
5215,
2... |
l0bnb/_third_party.py | rahulmaz/L0BnB | 1 | 45960 | import sys
import numpy as np
def l0gurobi(x, y, l0, l2, m, lb, ub, relaxed=True):
try:
from gurobipy import Model, GRB, QuadExpr, LinExpr
except ModuleNotFoundError:
raise Exception('Gurobi is not installed')
model = Model() # the optimization model
n = x.shape[0] # number of sampl... | [
1,
1053,
10876,
13,
13,
5215,
12655,
408,
7442,
13,
13,
13,
1753,
301,
29900,
29887,
2192,
5365,
29898,
29916,
29892,
343,
29892,
301,
29900,
29892,
301,
29906,
29892,
286,
29892,
27981,
29892,
13069,
29892,
26681,
287,
29922,
5574,
1125,... |
src/degrees/major.py | RaylaKurosaki1503/Student_Information_System | 1 | 108887 | """
Author: <NAME>
File: major.py
Description: This file contains the functionality to represent a major.
"""
import __utils__ as utils
class Major:
def __init__(self, name, degree):
"""
Create an instance of a major.
"""
self.name = name
self.degree = degree
sel... | [
1,
9995,
13,
13720,
29901,
529,
5813,
29958,
13,
13,
2283,
29901,
4655,
29889,
2272,
13,
13,
9868,
29901,
910,
934,
3743,
278,
9863,
304,
2755,
263,
4655,
29889,
13,
15945,
29908,
13,
13,
5215,
4770,
13239,
1649,
408,
3667,
29879,
13,... |
preprocess.py | dreamgonfly/Porto-Seguro-Safe-Driver-Prediction | 1 | 186629 | from argparse import ArgumentParser
import pandas as pd
parser = ArgumentParser()
parser.add_argument('--split', action='store_true')
parser.add_argument('--cv', type=int, default=10)
def split_cross_validation_data(raw_filepath='data/train.csv', cv=10):
raw_data = pd.read_csv(raw_filepath)
raw_data_shuffled... | [
1,
515,
1852,
5510,
1053,
23125,
11726,
13,
5215,
11701,
408,
10518,
13,
13,
16680,
353,
23125,
11726,
580,
13,
16680,
29889,
1202,
29918,
23516,
877,
489,
5451,
742,
3158,
2433,
8899,
29918,
3009,
1495,
13,
16680,
29889,
1202,
29918,
2... |
social_network/__init__.py | diana-gv/django-social-network | 3 | 186510 | # coding=utf-8
import logging
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from social_graph import Graph
from .signals import (
follower_relationship_created,
follower_relationship_destroyed,
friendship_c... | [
1,
396,
14137,
29922,
9420,
29899,
29947,
13,
5215,
12183,
13,
3166,
9557,
29889,
21570,
29889,
5150,
1053,
679,
29918,
1792,
29918,
4299,
13,
3166,
9557,
29889,
21570,
29889,
16315,
29889,
9794,
1053,
10781,
13,
3166,
9557,
29889,
13239,
... |
tempest/api/compute/servers/test_instance_actions.py | Hybrid-Cloud/hybrid-tempest | 3 | 67595 | # Copyright 2013 NEC Corporation
# 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 ... | [
1,
396,
14187,
1266,
29871,
29906,
29900,
29896,
29941,
405,
11206,
15025,
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,
37... |
src/pyfmodex/sound.py | Loodoor/UnamedPy | 1 | 11331 | from .fmodobject import *
from .fmodobject import _dll
from .structures import TAG, VECTOR
from .globalvars import get_class
class ConeSettings(object):
def __init__(self, sptr):
self._sptr = sptr
self._in = c_float()
self._out = c_float()
self._outvol = c_float()
ckresult(... | [
1,
515,
869,
29888,
1545,
3318,
1053,
334,
13,
3166,
869,
29888,
1545,
3318,
1053,
903,
12396,
13,
3166,
869,
4984,
1973,
1053,
323,
10051,
29892,
478,
13845,
1955,
13,
3166,
869,
10945,
16908,
1053,
679,
29918,
1990,
13,
13,
13,
1990... |
tests/example/startup.py | felixludos/omni-f | 1 | 94677 | <reponame>felixludos/omni-f
import omnifig as fig
@fig.Component('cmp1')
class Cmpn1:
def __init__(self, A):
self.a = A.pull('simple')
self.b = A.pull('default', 'worked')
self.c = A.pull('not_there', '<>alias_option')
self.d = A.pull('n1', '<>n2', True)
self.e = A.pull('unseen', silent=True)
... | [
1,
529,
276,
1112,
420,
29958,
13287,
861,
29880,
566,
359,
29914,
290,
1240,
29899,
29888,
13,
30004,
13,
5215,
2703,
29876,
361,
335,
408,
2537,
30004,
13,
30004,
13,
29992,
1003,
29889,
5308,
877,
21058,
29896,
1495,
30004,
13,
1990,... |
analysisCodes/hotrgFlow.py | brucelyu/tensorRGflow | 12 | 51540 | <filename>analysisCodes/hotrgFlow.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 4 15:06:00 2020
Anlysis of the flow of 1) norm of the tensor, 2) singular value spectrum of
the tensor, and 3) norm of the difference of the two tensors in adjacent RG step
@author: brucelyu
"""
from HOTRG imp... | [
1,
529,
9507,
29958,
15916,
29907,
2631,
29914,
8711,
11007,
17907,
29889,
2272,
13,
29937,
14708,
4855,
29914,
2109,
29914,
6272,
3017,
29941,
13,
29937,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
15945,
2... |
rclpy_tutorials/setup.py | AndyBlightLeeds/tutorials | 30 | 83475 | <reponame>AndyBlightLeeds/tutorials<gh_stars>10-100
from setuptools import setup
setup(
name='rclpy_tutorials',
version='0.0.0',
packages=[],
py_modules=[
'topics.listener_py', 'topics.talker_py',
'topics.listener_qos_py', 'topics.talker_qos_py',
'services.add_two_ints_client_py... | [
1,
529,
276,
1112,
420,
29958,
2855,
29891,
29933,
4366,
3226,
5779,
29914,
12631,
29879,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29900,
29899,
29896,
29900,
29900,
13,
3166,
731,
21245,
8789,
1053,
6230,
13,
13,
14669,
29898,
13,
1... |
guildwatcher.py | Galarzaa90/GuildWatcher | 5 | 86212 | <reponame>Galarzaa90/GuildWatcher
"""
The MIT License (MIT)
Copyright (c) 2019 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights t... | [
1,
529,
276,
1112,
420,
29958,
29954,
284,
279,
1362,
29874,
29929,
29900,
29914,
9485,
789,
24709,
261,
13,
15945,
29908,
13,
1576,
341,
1806,
19245,
313,
26349,
29897,
13,
11882,
1266,
313,
29883,
29897,
29871,
29906,
29900,
29896,
2992... |
config.py | HansonSun/FaceRecognition_TF | 4 | 105967 | <reponame>HansonSun/FaceRecognition_TF
from easydict import EasyDict as edict
import os
def get_config( ):
conf = edict()
##-----------------train process parameter-----------------------##
#training dataset path list,if the input dataset is image dataset ,you needn't set the nrof_classes
conf.traini... | [
1,
529,
276,
1112,
420,
29958,
29950,
16307,
29903,
348,
29914,
23360,
23122,
654,
29918,
8969,
13,
3166,
2240,
2941,
919,
1053,
382,
8995,
21533,
408,
1226,
919,
259,
13,
5215,
2897,
13,
13,
1753,
679,
29918,
2917,
29898,
29871,
1125,
... |
hail/python/test/hailtop/utils/test_utils.py | vrautela/hail | 0 | 3241 | <reponame>vrautela/hail<gh_stars>0
from hailtop.utils import (partition, url_basename, url_join, url_scheme,
url_and_params, parse_docker_image_reference)
def test_partition_zero_empty():
assert list(partition(0, [])) == []
def test_partition_even_small():
assert list(partition(3,... | [
1,
529,
276,
1112,
420,
29958,
29894,
336,
329,
3100,
29914,
29882,
737,
29966,
12443,
29918,
303,
1503,
29958,
29900,
13,
3166,
447,
2782,
459,
29889,
13239,
1053,
313,
16707,
29892,
3142,
29918,
6500,
3871,
29892,
3142,
29918,
7122,
298... |
SimModel_Python_API/simmodel_swig/Release/SimFlowEnergyTransfer_ConvectiveHeater_Water.py | EnEff-BIM/EnEffBIM-Framework | 3 | 183160 | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.7
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2, 6, 0):
def swig_import_helper():
from os.path imp... | [
1,
396,
910,
934,
471,
6336,
5759,
491,
25289,
6259,
313,
1124,
597,
1636,
29889,
2774,
335,
29889,
990,
467,
13,
29937,
10079,
29871,
29941,
29889,
29900,
29889,
29955,
13,
29937,
13,
29937,
1938,
451,
1207,
3620,
304,
445,
934,
6521,
... |
cogs/error.py | Kumarozh/Modration_bot | 0 | 163375 | <gh_stars>0
import discord
from discord.ext import commands
from discord import Member,Embed
class error(commands.Cog):
def __init__(self,client):
self.client=client
self._last_member = None
@commands.Cog.listener()
async def on_command_error(self, ctx, error):
async with ctx.typing(... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
2313,
536,
13,
3166,
2313,
536,
29889,
1062,
1053,
8260,
13,
3166,
2313,
536,
1053,
19495,
29892,
6026,
2580,
13,
1990,
1059,
29898,
26381,
29889,
29907,
468,
1125,
13,
1678,
822,... |
eval/app.py | Smixi/ineficient-calculator | 0 | 92233 | import ast
import json
import redis
import requests
from flask import Flask, request
from os import environ
from opentelemetry.instrumentation.flask import FlaskInstrumentor
from opentelemetry.instrumentation.requests import RequestsInstrumentor
from opentelemetry.instrumentation.redis import RedisInstrumentor
from ope... | [
1,
1053,
8717,
13,
5215,
4390,
13,
5215,
29825,
13,
5215,
7274,
13,
3166,
29784,
1053,
2379,
1278,
29892,
2009,
13,
3166,
2897,
1053,
12471,
13,
3166,
1015,
2016,
2409,
27184,
29889,
2611,
15461,
362,
29889,
1579,
1278,
1053,
2379,
1278... |
utests/test_dataset_image.py | previsionio/prevision-python | 7 | 180453 | import os
import previsionio as pio
from .utils import get_testing_id
TESTING_ID = get_testing_id()
PROJECT_NAME = "sdk_test_dataset_image_" + str(TESTING_ID)
PROJECT_ID = ""
pio.config.zip_files = False
pio.config.default_timeout = 1000
test_datasets = {}
dataset_name = 'cats_and_dogs_train'
dataset_test_name = TES... | [
1,
1053,
2897,
13,
5215,
758,
4924,
601,
408,
282,
601,
13,
3166,
869,
13239,
1053,
679,
29918,
13424,
29918,
333,
13,
13,
18267,
4214,
29918,
1367,
353,
679,
29918,
13424,
29918,
333,
580,
13,
13,
8618,
17637,
29918,
5813,
353,
376,
... |
sensorAtlas/__init__.py | iosefa/pyMatau | 2 | 16096 | <reponame>iosefa/pyMatau<gh_stars>1-10
# app config
default_app_config = 'sensorAtlas.apps.sensorAtlasConfig'
| [
1,
529,
276,
1112,
420,
29958,
601,
344,
5444,
29914,
2272,
29924,
532,
29884,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
29937,
623,
2295,
13,
4381,
29918,
932,
29918,
2917,
353,
525,
29879,
6073,
27753,
29889... |
bank_bot/banking_system/exceptions.py | Tengro/larp_bankbot | 3 | 171427 | <gh_stars>1-10
class TransactionError(Exception):
def __init__(self, message):
self.message = message
# Call the base class constructor with the parameters it needs
super().__init__(message)
class UserError(Exception):
def __init__(self, message):
self.message = message
... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
1990,
4103,
2467,
2392,
29898,
2451,
1125,
13,
1678,
822,
4770,
2344,
12035,
1311,
29892,
2643,
1125,
13,
4706,
1583,
29889,
4906,
353,
2643,
13,
4706,
396,
8251,
2... |
visualize_labels.py | thimabru1010/ssd-thermal-face-detection | 1 | 192158 | import cv2
import os
import numpy as np
import pandas as pd
from scipy.ndimage import zoom
#from matplotlib import pyplot as plt
def clipped_zoom(img, zoom_factor, **kwargs):
h, w = img.shape[:2]
# For multichannel images we don't want to apply the zoom factor to the RGB
# dimension, so instead we create... | [
1,
1053,
13850,
29906,
13,
5215,
2897,
13,
5215,
12655,
408,
7442,
13,
5215,
11701,
408,
10518,
13,
3166,
4560,
2272,
29889,
299,
3027,
1053,
19342,
13,
29937,
3166,
22889,
1053,
11451,
5317,
408,
14770,
13,
13,
1753,
9335,
2986,
29918,... |
wot-bans/utils/__init__.py | Buster-2002/WoT-Bans | 0 | 55979 | from .utils import *
from .enums import * | [
1,
515,
869,
13239,
1053,
334,
13,
3166,
869,
264,
6762,
1053,
334,
2
] |
run.py | moonR2/GippsTrafficSimulation | 0 | 56826 | <gh_stars>0
import matplotlib.pyplot as plt
from simulation import Simulation
import sys
import numpy as np
import networkx as nx
"""
This file plots trajectory, acceleration vs speed, speed vs simulation time
speed vs simulation times with bracking and vehicle location vs simulation time
wiht bracking vehicle. Also... | [
1,
529,
12443,
29918,
303,
1503,
29958,
29900,
13,
5215,
22889,
29889,
2272,
5317,
408,
14770,
13,
3166,
17402,
1053,
3439,
2785,
13,
5215,
10876,
29871,
13,
5215,
12655,
408,
7442,
29871,
13,
5215,
3564,
29916,
408,
302,
29916,
13,
159... |
tests/test_ddm_solver.py | htool-ddm/htool_python | 0 | 99567 | <filename>tests/test_ddm_solver.py
import Htool
import numpy as np
from mpi4py import MPI
import math
import struct
import os
import mpi4py
import pytest
class GeneratorCoef(Htool.ComplexIMatrix):
def __init__(self,matrix):
super().__init__(matrix.shape[0],matrix.shape[1])
self.matrix=matrix
... | [
1,
529,
9507,
29958,
21150,
29914,
1688,
29918,
1289,
29885,
29918,
2929,
369,
29889,
2272,
13,
5215,
379,
10154,
13,
5215,
12655,
408,
7442,
13,
3166,
286,
1631,
29946,
2272,
1053,
341,
2227,
13,
5215,
5844,
13,
5215,
2281,
13,
5215,
... |
proxy_switcher/chain.py | spumer/ProxySwitcher | 1 | 47806 | # encoding: utf-8
import os
import re
import sys
import gzip
import time
import json
import socket
import random
import weakref
import datetime
import functools
import threading
import collections
import urllib.error
import urllib.parse
import urllib.request
import collections.abc
import json_dict
from . import util... | [
1,
396,
8025,
29901,
23616,
29899,
29947,
13,
13,
5215,
2897,
13,
5215,
337,
13,
5215,
10876,
13,
5215,
330,
7554,
13,
5215,
931,
13,
5215,
4390,
13,
5215,
9909,
13,
5215,
4036,
13,
5215,
8062,
999,
13,
5215,
12865,
13,
5215,
2090,
... |
telethon/tl/custom/conversation.py | megansquire/Telethon | 2 | 195249 | import asyncio
import itertools
import time
from .chatgetter import ChatGetter
from ... import helpers, utils, errors
from ...events.common import EventCommon
# Sometimes the edits arrive very fast (within the same second).
# In that case we add a small delta so that the age is older, for
# comparision purposes. This... | [
1,
1053,
408,
948,
3934,
13,
5215,
4256,
8504,
13,
5215,
931,
13,
13,
3166,
869,
13496,
657,
357,
1053,
678,
271,
2577,
357,
13,
3166,
2023,
1053,
1371,
414,
29892,
3667,
29879,
29892,
4436,
13,
3166,
2023,
13604,
29889,
9435,
1053,
... |
test/__init__.py | pieter-hendriks/STL-monitoring | 0 | 43693 | """ STL Tool tests module """
from . import fullSystemTests, unitTests
| [
1,
9995,
6850,
29931,
21704,
6987,
3883,
9995,
13,
3166,
869,
1053,
2989,
3924,
24376,
29892,
5190,
24376,
13,
2
] |
trading/users/forms.py | volkandkaya/trading | 0 | 191505 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django import forms
from .models import User
class UserForm(forms.ModelForm):
class Meta:
# Set this form to use the User model.
model = User
# Constrain the UserForm to just these fields.
fie... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
13,
3166,
4770,
29888,
9130,
1649,
1053,
8380,
29918,
5215,
29892,
29104,
29918,
20889,
1338,
13,
13,
3166,
9557,
1053,
7190,
13,
13,
3166,
869,
9794,
1053,
... |
gidconfig/experimental/experimental_abstract.py | Giddius/Gidconfig | 0 | 111405 | <filename>gidconfig/experimental/experimental_abstract.py
# region [Imports]
# * Standard Library Imports -->
import re
from abc import ABC, abstractmethod
# * Gid Imports -->
import gidlogger as glog
# endregion[Imports]
__updated__ = '2020-11-14 15:58:38'
# region [AppUserData]
# endregion [AppUserData]
# regi... | [
1,
529,
9507,
29958,
29887,
333,
2917,
29914,
735,
27910,
29914,
735,
27910,
29918,
16595,
29889,
2272,
13,
29937,
5120,
518,
1888,
4011,
29962,
13,
13,
29937,
334,
10117,
9538,
1954,
4011,
6660,
13,
5215,
337,
13,
3166,
25638,
1053,
16... |
Python/code case/code case 79.py | amazing-2020/pdf | 3 | 44277 | class Test:
def ptr(self):
print(self)
print(self.__class__)
class Test2:
def ptr(baidu):
print(baidu)
print(baidu.__class__)
class people:
name = ''
age = 0
__weight = 0
def __init__(self, n, a, w):
self.name = n
self.age = a
self.__w... | [
1,
770,
4321,
29901,
13,
1678,
822,
23246,
29898,
1311,
1125,
13,
4706,
1596,
29898,
1311,
29897,
13,
4706,
1596,
29898,
1311,
17255,
1990,
1649,
29897,
13,
13,
13,
1990,
4321,
29906,
29901,
13,
1678,
822,
23246,
29898,
2291,
333,
29884... |
swaping 2.py | aash-gates/aash-python-babysteps | 7 | 13716 | <filename>swaping 2.py<gh_stars>1-10
'''
practice qusestion from chapter 1 Module 5 of IBM Digital Nation Courses
by <NAME>/<NAME>
'''
x = 10
y = "ten"
#step 1
x,y = y,x
#printing on next line
print(x)
print(y)
#end of the program | [
1,
529,
9507,
29958,
2774,
21430,
29871,
29906,
29889,
2272,
29966,
12443,
29918,
303,
1503,
29958,
29896,
29899,
29896,
29900,
13,
12008,
13,
29886,
1461,
625,
439,
29879,
602,
515,
16385,
29871,
29896,
15591,
29871,
29945,
310,
27955,
159... |
practice/2008/qualification/C-Fly_swatter/c.py | victorWeiFreelancer/CodeJam | 0 | 1576 | import sys
sys.dont_write_bytecode = True
def hitP(f, R, t, r, g):
if f>=g/2 :
return 0.0
missArea = 0.0
gridL = g+2*r
nGrids = (R - t) // gridL
missGridSideLength = g - 2*f
print("gridL %.12f; nGrids %d" %(gridL, nGrids) )
indentSquareLength = nGrids*gridL
remain = (R - t) - in... | [
1,
1053,
10876,
13,
9675,
29889,
29881,
609,
29918,
3539,
29918,
10389,
401,
353,
5852,
13,
13,
1753,
7124,
29925,
29898,
29888,
29892,
390,
29892,
260,
29892,
364,
29892,
330,
1125,
13,
1678,
565,
285,
18572,
29887,
29914,
29906,
584,
... |
examples/face_detection/main.py | Ishticode/kornia | 418 | 183480 | """Script that finds faces and blurs using FaceDetection and blurring APIs."""
import argparse
import cv2
import numpy as np
import torch
import kornia as K
from kornia.contrib import FaceDetector, FaceDetectorResult, FaceKeypoint
def draw_keypoint(img: np.ndarray, det: FaceDetectorResult, kpt_type: FaceKeypoint) -... | [
1,
9995,
4081,
393,
14061,
17240,
322,
1999,
1295,
773,
10635,
29928,
2650,
428,
322,
1999,
1038,
292,
23649,
1213,
15945,
13,
5215,
1852,
5510,
13,
13,
5215,
13850,
29906,
13,
5215,
12655,
408,
7442,
13,
5215,
4842,
305,
13,
13,
5215... |
meraki_sdk/models/update_organization_branding_policies_priorities_model.py | meraki/meraki-python-sdk | 37 | 133778 | # -*- coding: utf-8 -*-
"""
meraki_sdk
This file was automatically generated for meraki by APIMATIC v2.0 ( https://apimatic.io ).
"""
class UpdateOrganizationBrandingPoliciesPrioritiesModel(object):
"""Implementation of the 'updateOrganizationBrandingPoliciesPriorities' model.
TODO: t... | [
1,
396,
448,
29930,
29899,
14137,
29901,
23616,
29899,
29947,
448,
29930,
29899,
30004,
13,
30004,
13,
15945,
19451,
13,
1678,
2778,
9940,
29918,
15348,
30004,
13,
30004,
13,
1678,
910,
934,
471,
6336,
5759,
363,
2778,
9940,
491,
3450,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.