content
stringlengths
5
1.05M
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from filetool.backup import backup_dir def test_backup_dir(): root_dir = __file__.replace("test_backup.py", "testdir") ignore_ext = [".txt", ] backup_filename = "testdir-backup" backup_dir(backup_filename, root_dir, ignore_ext=ignore_ext) ...
#! /usr/bin/env python3 """ ONTAP REST API Python Sample Scripts This script was developed by NetApp to help demonstrate NetApp technologies. This script is not officially supported as a standard NetApp product. Purpose: THE FOLLOWING SCRIPT SHOWS VOLUME OPERATIONS USING REST API PCL usage: python3 interface_operat...
#!/usr/bin/env python import sys input = sys.stdin.readline print = sys.stdout.write if __name__ == '__main__': for _ in range(int(input())): index = {} g = {} for _ in range(int(input())): u, v = input().strip().split() if u != v: if u not in inde...
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.authentication import TokenAuthentication from rest_framework import filters from profiles_api import serializers from rest_framework import status from rest_framework import viewsets from profiles_api import model...
""" discord-styled-text - test_codeblock.py --- Copyright 2021 classabbyamp, 0x5c Released under the terms of the BSD 3-Clause license. """ from pytest import param, mark from discord_styler import CodeBlock CodeBlock_test_cases = [ param("", None, "```\n\n```", id="empty_no_lang"), param("", "py", "```py\...
''' This function is to test the program functions of the smart alarm Each function is tested with a single test case and the result is printed to the user in the stdout''' from weather_api import get_weather def test_weather(): ''' test get weather function of the module ''' weather_return = get_w...
""" dataset: openml- MagicTelescope number of instances: 19020 number of features: 10 duab: execution time: 36s cross-validition accuracy(5-fold): 0.87 best model: gbdt greedy search: execution time: 150s cross-validition accuracy(5-fold): 0.87 best model: gbdt """ import numpy as np import pandas as pd from time ...
from starlette.datastructures import Secret from .. import config CACHE_DB_NAME = config("CACHE_DB_NAME", default="redis") CACHE_DB_HOST = config("CACHE_DB_HOST", default="localhost") CACHE_DB_PORT = config("CACHE_DB_PORT", cast=int, default=6379) CACHE_DB_PASSWORD = config("CACHE_DB_PASSWORD", cast=Secret, default...
from typing import Optional from flask import jsonify, request, current_app as app from flask_api import status from rest.decorators import handle_errors from service.quote_service import QuoteService @app.route("/api/quote", methods=["GET"], defaults={"quote_id": None}) @app.route("/api/quote/<quote_id>", methods=...
from enum import Enum class Scalar(Enum): is_standard = 1 is_minmax = 2 class EModel(Enum): isSVC = 1 isMLP = 2 class Hyper: scalar_type = Scalar.is_standard model_type = EModel.isMLP is_correlation = True plot = True print_results=True
"""merge migrations Revision ID: e2abdf81151f Revises: b9c0f72bc63a, b6a7221990ba Create Date: 2021-04-06 19:50:04.064091 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "e2abdf81151f" down_revision = ("b9c0f72bc63a", "b6a7221990ba") branch_labels = None depend...
from setuptools import setup md = [] with open('/Users/SchoolOfficial/Desktop/influence/README.rst', 'r') as f: for line in f: md.append(str(line)) ld = '' for i in md: ld += i + "\n" setup( name = 'influence', # How you named your package folder (MyLib) packages = [ 'influence', ...
from typing import List class Solution: def orangesRotting(self, grid: List[List[int]]) -> int: n, m = len(grid), len(grid[0]) que = [] count = 0 for i in range(n): for j in range(m): if grid[i][j] == 1: count += 1 if...
#!/bin/env python3 # Author: ph-u # Script: boilerplate.py # Desc: minimal python script sample # Input: python3 boilerplate.py # Output: two-lined python interpreter output # Arguments: 0 # Date: Oct 2019 """Description of this program or application. You can use several lines""" __appname__='[application name here...
from aiocodeforces.enum import ProblemResultType class ProblemResult: __slots__ = ["points", "penalty", "rejected_attempt_count", "type", "best_submission_time_seconds"] def __init__(self, dic): self.points: float = dic["points"] self.penalty: int = dic["penalty"] self.rejected_attem...
# -*- encoding: utf-8 -*- """ Created by eniocc at 11/10/2020 """ from py_dss_interface.models.Bus.BusF import BusF from py_dss_interface.models.Bus.BusI import BusI from py_dss_interface.models.Bus.BusS import BusS from py_dss_interface.models.Bus.BusV import BusV class Bus(BusS, BusI, BusV, BusF): """ Thi...
import sys import lockfile.linklockfile import lockfile.mkdirlockfile import lockfile.pidlockfile import lockfile.symlinklockfile from compliancetest import ComplianceTest class TestLinkLockFile(ComplianceTest): class_to_test = lockfile.linklockfile.LinkLockFile class TestSymlinkLockFile(ComplianceTest): ...
#!/usr/bin/env python3 if __name__ == '__main__': val = list(map(int, input().split())) x, k = val[0], val[1] P = input().split() res = 0 flag = '+' for i, p in enumerate(P): if i % 2 == 1: flag = p else: if p.find('**') != -1: e = p.split...
n = 53 abc = 10 xxx = 10 def f(a, x, y, z): global n, abc b = a b = 10 n = 35 lst = [2] lst[0] = 1 for j in lst: pass return b while abc < n: a = 10 b = 10 b_ = (a + 1) b_ = 10 n = 35 lst = [2] lst[0] = 1 for j in lst: pass c = 1 + ...
import argparse import random def generate_graph(nrnodes, nrextraedges, minedgecost, maxedgecost): start_priority = random.randint(1, 25) priorities = [10*(k+start_priority) for k in range(nrnodes)] random.shuffle(priorities) for k in range(len(priorities)): priorities[k] = [k, priori...
# # -*- coding: utf-8 -*- # # This file is part of reclass (http://github.com/madduck/reclass) # # Copyright © 2007–14 martin f. krafft <[email protected]> # Released under the terms of the Artistic Licence 2.0 # from __future__ import absolute_import from __future__ import division from __future__ import print_funct...
""" oops """ print(0, 1 == 1, 0)
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-02-20 18:22 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('travelling', '0032_auto_20190219_1939'), ] operations = [ migrations.Alter...
# coding=utf-8 # Copyright 2019 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
a=input() a=int(a) if 90<=a<=100: print('A') elif 80<=a<=89: print('B') elif 70<=a<=79: print('C') elif 60<=a<=69: print('D') else: print('F')
'''Config file.''' from kivy.config import Config # HD 1920x1080 Config.set('graphics', 'width', 1920) Config.set('graphics', 'height', 1080)
import os, sys, math, argparse # python modules import bpy, mathutils # blender modules sys.path.append(os.path.dirname(os.path.abspath(__file__))) import myutil # my functions def main(): parser = argparse.ArgumentParser() parser.add_argument("--render", action='store_true') if '--' in sys.argv: ...
""" cubic spline planner Author: Atsushi Sakai """ import math import numpy as np import bisect class Spline: u""" Cubic Spline class """ def __init__(self, x, y): self.b, self.c, self.d, self.w = [], [], [], [] self.x = x self.y = y self.nx = len(x) # dimension o...
import exp1 print('i am in exp2.py ')
from abc import abstractmethod class Logger: @abstractmethod def log(self, x): pass class WandBLogger(Logger): def log(self, x): import wandb wandb.log(x)
# -*- coding: utf-8 -*- # # Copyright (C) 2020 CERN. # # CDS-ILS is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. from flask import url_for from invenio_accounts.testutils import login_user_via_session from invenio_indexer.api import Re...
################ """ sb_distributeObjects Simon Bjork May 2014 Version 1.1 (August 2014) [email protected] Synopsis: Create a number of evenly distributed 3d objects between two (selected) 3d objects. OS: Windows/OSX/Linux To install the script: - Add the script to your Nuke pluginPath. - Add the follo...
import os import shutil import cv2 import torch from PIL import Image from tqdm import tqdm import numpy as np import torchvision.transforms as transform_lib import matplotlib.pyplot as plt from utils.util import download_zipfile, mkdir from utils.v2i import convert_frames_to_video class OPT(): pass class DVP():...
import os import sys if os.path.realpath(os.getcwd()) != os.path.dirname(os.path.realpath(__file__)): sys.path.append(os.getcwd()) import deephar from deephar.config import mpii_dataconf from deephar.config import pennaction_dataconf from deephar.config import ModelConfig from deephar.data import MpiiSinglePers...
import numpy as np import inspect def start_indices(maximum: int, n: int): ''' e[0] is the starting coordinate e[1] is the ending coordinate Args: maximum: max integer to draw a number from n: how many numbers to draw Returns: starting index of the events to be inserted ''...
"""Auto-generated file, do not edit by hand. BS metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_BS = PhoneMetadata(id='BS', country_code=1, international_prefix='011', general_desc=PhoneNumberDesc(national_number_pattern='[2589]\\d{9}', possible_number_pattern='\...
import json from unittest import mock, TestCase VALID_REQUEST_DATA = { 'data': '{"contact_name": "Test", "marketing_source_bank": "", ' '"website": ''"example.com", "exporting": "False", "phone_number": "",' ' ''"marketing_source": "Social media", "opt_in": true, ''"marketing_s' 'ource_other": "", "em...
import importlib import logging import time import torch from omegaconf import DictConfig from ...pl_utils.model import Model as PlModel from ..utils.gaze import compute_angle_error, get_loss_func from ..utils.optimizer import configure_optimizers from ..utils.utils import initialize_weight, load_weight logger = log...
class Tiger: def __init__(self, name): self.t_name = name def name(self): return self.t_name def greet(self): return "roar" def menu(self): return "zebre" def create(name): return Tiger(name)
#!/usr/bin/env python # -*- coding: utf-8 -*- # 脚本的整执行流程: # 1. 先实现一个request来完成harbor的登录,获取session # 2. 获取所有的project # 3. 循环所有的project,获取所有的repositories # 4. 获取repositories的所有tag # 5. 根据repositories和tag拼接完整的镜像名称 # 6. 连接两边的harbor,通过docker pull的方式从原harbor中拉取镜像,再通过docker push的方式将镜像推送到新harbor当中,然后删除本地镜像。 # 7. 在上面的过程...
import time from typing import List from behave import given, then from test.integrationtests.voight_kampff import ( emit_utterance, format_dialog_match_error, wait_for_dialog_match, ) CANCEL_RESPONSES = ( "no-active-timer", "cancel-all", "cancelled-single-timer", "cancelled-timer-named",...
from util import clean_string from bs4 import NavigableString from typing import List import activity from common import Choice class Vote: def __init__(self, meeting_topic, vote_number: int, yes: int): """A Vote represents a single vote in a meeting. Args: meeting_topic (MeetingTopic...
from django.contrib import admin from admin_ordering.admin import OrderableAdmin from testapp import models class Child1Inline(OrderableAdmin, admin.TabularInline): model = models.Child1 fk_name = 'parent' ordering_field = 'ordering' admin.site.register( models.Parent1, inlines=[ Child...
import create import time ROOMBA_PORT="/dev/ttyUSB0" robot = create.Create(ROOMBA_PORT) #robot.printSensors() # debug output wall_fun = robot.senseFunc(create.WALL_SIGNAL) # get a callback for a sensor. #print (wall_fun()) # print a sensor value. robot.toSafeMode() #cnt = 0 robot.go(0,90) #while cnt < 10 : # robot...
def linear_search(list, target): """ Return the index position of the target if found, else returns None """ for i in range(0, len(list)): if list[i] == target: return i return None def verify_linear_search(value): if value is not None: print("Target found at index: ", value) else: print("Target not f...
from __future__ import annotations import fnmatch import os import pathlib import platform import shutil import subprocess import sys from typing import Optional import xappt import xappt_qt ROOT_PATH = pathlib.Path(__file__).absolute().parent SPEC_PATH = ROOT_PATH.joinpath("build.spec") DIST_PATH = ROOT_PATH.joinp...
# Heap queue algorithm import heapq as hq def main(): a = [1,2,3,4,5,6,7,8] hq.heapify(a) print("heapq.heapify({})".format(a)) hq.heappush(a, 9) print("heapq.heappush('heap', 9) = {}".format(a)) hq.heappop(a) print("heapq.heappop('heap') = {}".format(a)) y = hq.heappu...
import torchelie.loss.gan.hinge import torchelie.loss.gan.standard import torchelie.loss.gan.penalty import torchelie.loss.gan.ls
from socketsocketcan import TCPBus import can from datetime import datetime from time import sleep bus = TCPBus(5000) print("socket connected!") #create a listener to print all received messages listener = can.Printer() notifier = can.Notifier(bus,(listener,),timeout=None) try: msg = can.Message( is_extended...
#!/usr/bin/env python3 # Converts NumPy format files to image files, using whatever image format is specified # default = jpeg # does not remove old extension, i.e. new file is ____.npy.jpeg (no reason other than laziness) # Runs in parallel # TODO: if <file> is actually a directory, then it should greate a new <dire...
import os from base64 import b64encode from pathlib import Path import magic def load_noimage_app(): """アプリのNoImage画像を取得します""" noimage_app_path = ( Path(os.path.dirname(__file__)) / "app/static/noimage_app.png" ) with open(noimage_app_path, "rb") as f: noimage_app = f.read() retur...
#!/usr/bin/env python3 import logging from . import serverconf from . import benchmark from dateutil.parser import parse def get_constraint(cursor, table_name): if table_name is not None: query = "SELECT TABLE_NAME, TABLE_SCHEMA, COLUMN_NAME, " \ "CONSTRAINT_NAME FROM " \ ...
from tangram_app.exceptions import InvalidModeException from tangram_app.tangram_game import tangram_game from tangram_app.metrics import get_classification_report_pics from tangram_app.predictions import get_predictions_with_distances, get_predictions from tangram_app.processing import preprocess_img, preprocess_img_2...
# coding: utf-8 """ multi-translate Multi-Translate is a unified interface on top of various translate APIs providing optimal translations, persistence, fallback. # noqa: E501 The version of the OpenAPI document: 0.7.0 Generated by: https://openapi-generator.tech """ import pprint import re # noq...
# BeatSaber Ogg Onset Detection # 2/16/2019 # David Haas, Ian Boll, Josh Mosier, Michael Keays import numpy as np import h5py # for saving the model from tensorflow.python.lib.io import file_io # for better file I/O import tensorflow as tf from datetime import datetime import pickle from keras.models import Sequenti...
# -*- coding: utf-8 -*- import unittest import openrtb import openrtb.base BRQ = { 'id': u'testbrqid', 'tmax': 100, 'at': 2, 'app': { 'id': u'appid', 'name': u'appname', 'cat': [u'IAB1', u'IAB2-2'], 'publisher': { 'id': u'pubid', 'cat': [u'IAB3'...
import sys sys.path.append('../../') import constants as cnst import tqdm import numpy as np from my_utils.visualize_flame_overlay import OverLayViz from my_utils.generic_utils import save_set_of_images import constants import torch from my_utils.eye_centering import position_to_given_location import os from my_utils.p...
# -*- coding: utf-8 -*- """Dynamic inventories of Docker containers, served up fresh just for Ansible.""" import json from docker import DockerClient DEFAULT_DOCKER_OPTS = { 'base_url': 'unix:///var/run/docker.sock', 'version': 'auto', 'timeout': 5, 'tls': True } def format_containers(containers, js...
from selenium.webdriver.common.by import By from webdriver_test_tools.pageobject import * from webdriver_test_tools.webdriver import actions, locate from no_yaml_example.config import SiteConfig class FullURLExampleWebPage(prototypes.WebPageObject): """Non-YAML WebPageObject example (full URL)""" # Full URL ...
import random import bpy from mathutils import Matrix, Vector import os import numpy as np import math from functools import reduce def normalize(vec): return vec / (np.linalg.norm(vec, axis=-1, keepdims=True) + 1e-9) # All the following functions follow the opencv convention for camera coordinates. def look_at(...
#Faça um programa que mostre na tela um contagem regressiva para o estouro de fogos de artifício, indo de 10 até 0, com uma pausa de 1 segundo entre eles. from time import sleep import emoji for c in range (10, -1, -1): print(c) sleep(1) print(emoji.emojize('💥')*3)
# -*- coding: utf-8 -*- ############################################################################## # # twitteroauth.py # A module to provide auth handler of Twitter OAuth, # stores user data in memcache. # # Copyright (c) 2010 Webcore Corp. All Rights Reserved. # ########################...
import re from collections import defaultdict def parse_line(line): subjectRegex = r"(?P<color>\w+ \w+) bags contain" dependencyRegex = r"(?P<number>\d) (?P<color>\w+ \w+) bags?" subject = re.match(subjectRegex, line)["color"] dependencyMatches = [(m["number"], m["color"]) for m in re.finditer(depende...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Events module puppeteer equivalent: Events.js """ class Events: class Page: Close = 'close' Console = 'console' Dialog = 'dialog' DOMContentLoaded = 'domcontentloaded' Error = 'error' # Can't use just 'error' due t...
_base_ = '../../../../base.py' # model settings model = dict(type='SelectiveSearch') # dataset settings data_source_cfg = dict( type='COCOSelectiveSearchJson', memcached=True, mclient_path='/mnt/lustre/share/memcached_client') data_train_json = 'data/coco/annotations/instances_train2017.json' data_train_r...
import datetime import boto3 from botocore.exceptions import ClientError SENDER = "[email protected]" AWS_REGION = "us-east-1" SUBJECT = "Alerta de evento" CHARSET = "UTF-8" def send_email(recipient, event, cam_id, cam_name, cam_address, frame64): body_html = """ <html> <head></head> <body> ...
#- # Copyright (c) 2011 Robert N. M. Watson # Copyright (c) 2013 Robert M. Norton # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @...
""" Packages Module -> many functions Package -> many collection of modules OBS: Python 2.X needs __init__.py, Python 3.X not obligation from test_yumi import yumi1, yumi2 from test_yumi.test_yumi2 import yumi3, yumi4 print(yumi1.function1(4, 5)) # 9 print(yumi2.course) # Python program print(yumi2.function2()...
import os.path import csv from config_helper import * plugin_name = "CSV" plugin_type = "output" csv_logger = logging.getLogger('csv-plugin:') invalidConfig = False try: config = ConfigParser.ConfigParser(allow_no_value=True) config.read('config.ini') filename = config.get("Csv", "filename") csv_d...
import unittest import json from app import create_app from app.models.v2 import Business class DeleteBusinessTestCase(unittest.TestCase): """This class represents the api test case""" def setUp(self): """ Will be called before every test """ self.app = create_app('testing') ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Get, create, update, and delete schedules for notifications. """ from . import _query_nodeping_api, _utils, config API_URL = "{0}schedules".format(config.API_URL) def get_schedule(token, schedule=None, customerid=None): """ Get existing schedules in NodePing ac...
"""Public protocol run data models.""" from pydantic import BaseModel from typing import List, Optional from datetime import datetime from ..errors import ErrorOccurrence from ..types import ( EngineStatus, LoadedLabware, LabwareOffset, LoadedModule, LoadedPipette, ) class StateSummary(BaseModel)...
import time import html # NOTE: we'll probably want to replace this with something that keeps the original mapping intact def two_way_map(mapping): mapping.update({value: key for key, value in mapping.items()}) return mapping def read_u32(byte_stream): return int.from_bytes(byte_stream.read(4), 'little'...
from statuspageio.errors import ConfigurationError class PageService(object): """ :class:`statuspageio.PageService` is used by :class:`statuspageio.Client` to make actions related to Page resource. Normally you won't instantiate this class directly. """ OPTS_KEYS_TO_PERSIST = ['name', 'url'...
import os import pandas as pd import numpy as np import logging import wget import time import pickle from src.features import preset from src.features import featurizer from src.data.utils import LOG from matminer.data_retrieval.retrieve_MP import MPDataRetrieval from tqdm import tqdm from pathlib import Path from s...
DEBUG = True DATABASES = dict( default=dict( ENGINE='django.db.backends.sqlite3', NAME='example.db', USER='', PASSWORD='', HOST='', PORT='', ) ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', '...
from enum import Enum, auto from typing import Any, Callable, Dict, List, Optional, Union from ray.autoscaler._private.cli_logger import cli_logger class CreateClusterEvent(Enum): """Events to track in ray.autoscaler.sdk.create_or_update_cluster. Attributes: up_started : Invoked at the beginning of ...
import picamera import datetime import os delcount = 2 def check_fs(): global delcount st = os.statvfs('/') pct = 100 - st.f_bavail * 100.0 / st.f_blocks print pct, "percent full" if pct > 90: # less than 10% left, delete a few minutes files = os.listdir('.') files.so...
from classes.pokemon import * from classes.pokemon_planta import * from classes.pokemon_electrico import * from classes.pokemon_agua import * from classes.pokemon_fuego import * from combate import * from listas_datos import * import pandas as pd lista_pokemon = pd.read_csv("pokemon_stats (1).csv", header=0) def ele...
# Copyright 2017 SAP SE # 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 applic...
from Prediction_Raw_Data_Validation.predictionDataValidation import Prediction_Data_validation from DataTypeValidation_Insertion_Prediction.DataTypeValidationPrediction import dBOperation from DataTransformation_Prediction.DataTransformationPrediction import dataTransformPredict from application_logging import logge...
import os import site import sys import glob from cx_Freeze import setup, Executable siteDir = site.getsitepackages()[1] includeDllPath = os.path.join(siteDir, "gnome") # missingDll = glob.glob(includeDllPath + "\\" + '*.dll') missingDLL = ['libffi-6.dll', 'libgirepository-1.0-1.dll', 'li...
import numpy as np import pytest from PermutationImportance.scoring_strategies import verify_scoring_strategy, VALID_SCORING_STRATEGIES, argmin_of_mean, indexer_of_converter from PermutationImportance.error_handling import InvalidStrategyException def test_valid_callable(): assert np.argmin == verify_scoring_str...
import os import numpy as np import cv2 import matplotlib.pyplot as plt from clustering import cluster def save_image_overlay(valid_image, valid_label): assert len(valid_image.shape)==3 and len(valid_label.shape)==2, \ 'input dimensions should be [h,w,c]' num_unique = np.unique(valid_label) blend...
import numpy as np from numpy import newaxis as na from matplotlib import pyplot as plt from os.path import join, dirname, isfile from pyhsmm import models, distributions from pyhsmm.util.general import sgd_passes, hold_out, get_file from pyhsmm.util.text import progprint_xrange, progprint np.random.seed(0) datapath ...
import numpy as np import matplotlib.pyplot as plt import time import random import bisect import json import sys from numpy import linalg as alg from scipy import sparse from sklearn import cross_validation as cv from itertools import product from collections import defaultdict from functools import partial from multi...
### rel tools module. ### (mostly rel example code) import rel try: from subprocess import getoutput # py3 except: from commands import getoutput # py2 ### helper functions def notice(*lines): print("") print("\n".join(lines)) def exit(): notice("goodbye") if rel.running: rel.abort()...
# Generated by Django 3.2 on 2021-04-25 17:44 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max...
from datetime import datetime import logging from bs4 import BeautifulSoup from db.models import Victim from net.proxy import Proxy from .sitecrawler import SiteCrawler import time class Nefilim(SiteCrawler): actor = "Nefilim" def _handle_page(self, soup): victim_list = soup.find_all("header", ...
import pytest import numpy as np from manim import CoordinateSystem as CS from manim import Axes, ThreeDAxes, NumberPlane, ComplexPlane from manim import config, tempconfig, ORIGIN, LEFT def test_initial_config(): """Check that all attributes are defined properly from the config.""" cs = CS() assert cs.x_...
from telegrambot.bot_views.login import LoginBotView # NOQA
import dataclasses from dataclasses import dataclass, fields, replace import collections import enum import hashlib import itertools import json import logging import re import shlex from abc import ABC, abstractmethod from contextlib import asynccontextmanager from datetime import timedelta from functools import lru_...
data ={'12.04.2021, 00:00 Uhr': {'AdmUnitId': 3351, 'BEZ': 'Landkreis', 'GEN': 'Celle', 'OBJECTID': 34, 'cases': 3813, 'cases7_bl': 8217, 'cases7_bl_per_100k'...
# Generated by Django 4.0.1 on 2022-02-21 18:19 import ckeditor.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0013_alter_project_content_upload'), ] operations = [ migrations.AlterField( model_name='project', ...
from setuptools import setup setup(name="epp_project_sven_jacobs", version="0.0.1")
"""create dimension and fact Revision ID: 15d6a161a32b Revises: c9311744ef3c Create Date: 2022-02-11 21:49:44.152019 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "15d6a161a32b" down_revision = "c9311744ef3c" branch_labels = None depends_on = None def upgra...
#copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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 l...
_base_ = 'faster_rcnn_r50_caffe_fpn_1x_coco.py' # learning policy lr_config = dict( policy='step', warmup='linear', warmup_iters=500, warmup_ratio=0.001, step=[60000, 80000]) # Runner type runner = dict(_delete_=True, type='IterBasedRunner', max_iters=90000) checkpoint_config = dict(...
#!/usr/bin/python import argparse import textwrap import socket import os import subprocess import logging import logging.config import logutils.dictconfig import yaml from jinja2 import Environment, FileSystemLoader, Template import utils verbose = True def create_log( logdir ): if not os.path.exists( logdir ): ...
""" .. _CubeSpectrum-at-api: **CubeSpectrum_AT** --- Cuts one or more spectra through a cube. ---------------------------------------------------------------- This module defines the CubeSpectrum_AT class. """ from admit.AT import AT import admit.util.bdp_types as bt from admit.bdp.Image_BDP import Im...