text
stringlengths
1
927k
""" A dictionary-like object of read-only facts about the Junos device. These facts are accessed as the `facts` attribute of a `Device` object instance. For example, if `dev` is an instance of a `Device` object, the hostname of the device can be accessed with:: dev.facts['hostname'] Force a refresh of all facts ...
# 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 # d...
# -*- coding: utf-8 -*- from django.apps import apps from django.test import TestCase # from django.core.management import call_command from django_extensions.management.commands.sqldiff import SqliteSQLDiff, Command class SqlDiffTests(TestCase): def _include_proxy_models_testing(self, should_include_proxy_model...
from dagster import fs_io_manager, graph from dagster.core.storage.file_manager import local_file_manager from dagster_aws.s3 import s3_file_manager from hacker_news.ops.comment_stories import build_comment_stories from hacker_news.ops.recommender_model import ( build_component_top_stories, build_recommender_mo...
_base_ = [ '../../../../_base_/default_runtime.py', '../../../../_base_/datasets/posetrack18.py' ] load_from = 'https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth' # noqa: E501 checkpoint_config = dict(interval=1) evaluation = dict(interval=1, metric='mAP', save_b...
#!/Users/nikhilivannan/Programs/d2socials/env/bin/python3 # When the django-admin.py deprecation ends, remove this script. import warnings from django.core import management try: from django.utils.deprecation import RemovedInDjango40Warning except ImportError: raise ImportError( 'django-admin.py was d...
from django.urls import path from .import views from .feeds import LatestReferencesFeed app_name = 'reference' urlpatterns = [ path('', views.ReferenceListView.as_view(), name='reference_list'), # path('reference/<int:pk>-<slug:slug>/', views.ReferenceDetailView.as_view(), name='reference_detail'), path('f...
from django.conf import settings from rest_framework import fields from rest_framework.exceptions import PermissionDenied from rest_framework.mixins import RetrieveModelMixin, UpdateModelMixin from rest_framework.viewsets import GenericViewSet from rest_framework.serializers import ModelSerializer from social_django.mo...
import logging from contextlib import contextmanager from collections import defaultdict from peewee import fn from data import database from data import model from data.cache import cache_key from data.model import oci, DataModelException from data.model.oci.retriever import RepositoryContentRetriever from data.data...
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
from seabreeze.pyseabreeze.features._base import SeaBreezeFeature # Definition # ========== # # TODO: This feature needs to be implemented for pyseabreeze # class SeaBreezeFastBufferFeature(SeaBreezeFeature): identifier = 'fast_buffer' def get_buffering_enable(self): raise NotImplementedError("imple...
""" Module : symbol_table Function : Contains class and function definitions used to implement a symbol table """ import ir_generation as IR class SymTabEntry(object): SCALAR, ARRAY, HASH = range(3) def __init__(self, variable): self.scopeNum = -1 # Indicates the fact that it has not ...
# pylint: disable=E1101 from __future__ import division import operator import warnings from datetime import time, datetime from datetime import timedelta import numpy as np from pandas.core.base import _shared_docs from pandas.types.common import (_NS_DTYPE, _INT64_DTYPE, is_object_dt...
pai = input("genótipo do pai: ") mae = input("genótipo da mãe: ") if pai="AA": print("dominante")
from python_app.actions.action_dispatcher import ActionDispatcher def main(): try: action_dispatcher = ActionDispatcher() action_dispatcher.process_application() except ImportError as err: print(err) exit(1) if __name__ == '__main__': main()
import warnings import numpy as np from .. import coding, conventions from ..core import indexing from ..core.pycompat import integer_types from ..core.utils import FrozenDict, HiddenKeyDict from ..core.variable import Variable from .common import AbstractWritableDataStore, BackendArray, _encode_variable_name # need...
"""Root package info.""" __version__ = '0.6.1.dev' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ __homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' # this has to be simple string,...
from enum import IntFlag, unique # cmyui hey, how are you? Add me in friends in discord ;-; __author__ = "cmyui" @unique class Mods(IntFlag): NoMod = 0 NoFail = 1 << 0 Easy = 1 << 1 TouchDevice = 1 << 2 Hidden = 1 << 3 HardRock = 1 << 4 SuddenDeath = 1 << 5 DoubleTime = 1 << 6 Rel...
import sys import subprocess import shlex args = sys.argv if len(args) < 2: sys.exit(0) commands = args[1] commands = shlex.split(commands) code = subprocess.call(commands) sys.exit(code)
import csv def exportar_questions_csv(questions, path_arquivo_csv): path_arquivo_csv += "\\questions_stackoverflow.csv" with open(path_arquivo_csv, mode='w+') as arquivo_csv: csv_writer = csv.writer(arquivo_csv, quotechar='"') header = (["Question ID", "Quant. views", "Quant. answers"...
#!/usr/bin/env python3 # JN 2015-07-29 """ Log file parser for Cheetah by Johannes Niediek This script reads out the reference settings by sequentially following all crs, rbs, and gbd commands. Please keep in mind that the following scenario is possible with Cheetah: Start the recording Stop the recording Change the...
# -*- coding: utf-8 -*- from tortilla.formatters import hyphenate, mixedcase, camelcase def test_hyphenate(api, endpoints): assert 'hyphenated-endpoint' == hyphenate('hyphenated_endpoint') api.config.formatter = hyphenate assert api.hyphenated_endpoint.get() == \ endpoints['/hyphenated-endpoint'...
import datetime import json from typing import Dict import asyncpg import pandas as pd from liualgotrader.common import config from liualgotrader.common.database import fetch_as_dataframe from liualgotrader.common.tlog import tlog class Accounts: @classmethod async def create( cls, balance: ...
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport ...
from collections import defaultdict from Utils.Array import input_array def get_frequencies_in_integer_array(arr: list) -> dict: """ Given an integer list, this method will return a dictionary (map), representing the frequencies of each of the elements in the list """ # default dictionary fr...
# Copyright 2020 The Couler Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------...
import json import os import connexion import pytest from config import my_app from db_config import db flask_app = connexion.FlaskApp(__name__) # setting in memory database for testing SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(my_app.root_path, 'database/test.db') flask_app.app.config['SQLALCHEMY_DATABAS...
from game import Game def main(): game = Game(800, 600, "DevDudes - PyWeek 33") game.run() if __name__ == "__main__": main()
import copy import logging from typing import List, Optional from great_expectations.core.batch import BatchDefinition, BatchRequestBase from great_expectations.core.batch_spec import BatchSpec, PathBatchSpec from great_expectations.datasource.data_connector.file_path_data_connector import ( FilePathDataConnector,...
# import the necessary packages from keras.preprocessing.image import img_to_array from keras.models import load_model import tensorflow as tf import numpy as np import imutils import time import cv2 import os import pyttsx3 frameWidth= 640 # CAMERA RESOLUTION frameHeight = 480 brightness = 180 threshold = 0.9...
import tensorflow as tf import numpy as np tf.enable_eager_execution() class Node(object): def __init__(self, observation, action, reward, clock): self.observation = observation self.action = action self.reward = reward self.clock = clock class RLAlgorithm(object): def __init...
import torchvision import os import pandas as pd from easydl.datasets import ImageLoader import numpy as np from torchvision.transforms import ToTensor, Resize, Normalize _default_image_transformer = torchvision.transforms.Compose([ Resize((224, 224)), ToTensor(), Normalize(0.45, 0.22), # simple vers...
from http.server import BaseHTTPRequestHandler, HTTPServer # from wireguard import Peer import argparse, ast, platform, re, subprocess parser = argparse.ArgumentParser() parser.add_argument('-p', '--port', type=int, help='HTTPServer hosting port') # parser.add_argument("config", help="Path of WireGuard Interface confi...
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
# # Copyright (C) 2020 GreenWaves Technologies # # 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 agre...
# The Twitter API keys needed to send tweets CONSUMER_KEY = "enter your consumer key here" CONSUMER_SECRET = "enter your secret consumer key here" ACCESS_TOKEN = "enter your access token here" ACCESS_TOKEN_SECRET = "enter your secret access token here" # What's the part of your twitter name that comes after the @ # (...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
class Account: # Constructor untuk akun def __init__(self, initial_balance): self._initial_balance = initial_balance if self._initial_balance < 0: raise ValueError("Saldo awal harus lebih besar atau sama dengan 0") # Getter untuk akun @property def initial_balance(self): return self._initial_balance # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from lib import * def test_ead(): eads = { (21, 10): 10, (21, 20): 20, (21, 30): 30, (21, 75): 75, (28, 20): 18, (28, 30): 27, (28, 40): 36, (28, 50): 45 } for (fo2, depth), expecte...
# -*- coding: utf-8 -*- # ---------------------------------------------------------------------- # AS discovery job # ---------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # -------------------------------------------------------------...
from django.db import models from django.contrib.auth.models import User from martor.models import MartorField class Challenge(models.Model): id = models.AutoField( primary_key=True, help_text="A challenge ID, automatically generated by Postgres.", ) class ChallengeType(models.TextChoices...
# -*- coding: utf-8 -*- ''' Tests for the file state ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import errno import glob import logging import os import re import sys import shutil import stat import tempfile import textwrap import filecmp log = logging.getLogge...
#!/usr/bin/python2.4 # Copyright (c) 2006-2008 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. '''Fast and efficient parser for XTB files. ''' import xml.sax import xml.sax.handler class XtbContentHandler(xml.sax.handl...
import tempfile from pathlib import Path import iondrive import ufoLib2.objects tmp = Path(tempfile.gettempdir()) u = iondrive.load(ufoLib2.objects, str(tmp / "NotoSans-Bold.ufo")) for g in u: pass u = iondrive.load(ufoLib2.objects, str(tmp / "NotoSans-CondensedBold.ufo")) for g in u: pass u = iondrive.load(...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyIsodate(PythonPackage): """This module implements ISO 8601 date, time and duration parsi...
import curses from castero import helpers from castero.config import Config from castero.menu import Menu from castero.menus.chronomenu import ChronoMenu from castero.perspective import Perspective from castero.player import Player class ChronoPerspective(Perspective): """The chronological perspective. This...
""" MIT License Copyright (c) 2016-2018 Madcore Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
""" ASGI config for marion project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application from configurations import importer ...
import contextlib import sys # Python 2 support. if sys.version_info < (3,): from StringIO import StringIO else: from io import StringIO @contextlib.contextmanager def capture_stdout(target=None): original = sys.stdout if target is None: target = StringIO() sys.stdout = target yield t...
# Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 OpenStack Foundation # 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....
# -*- coding: utf-8 -*- """ Extension that creates a base structure for the project using django-admin.py. Warning: *Deprecation Notice* - In the next major release the Django extension will be extracted into an independent package. After PyScaffold v4.0, you will need to explicitly install ``pyscaffol...
import os, json, yaml from py2neo import Graph with open("./AWSNEoConfig.json") as c: conf = json.load(c) print(conf[0]["AccountsFilepath"]) print(conf[0]["NeoParametes"][0]["Url"]) c.close graph = Graph(conf[0]["NeoParametes"][0]["Url"], auth=(conf[0]["NeoParametes"][0]["Username"], conf[0]["NeoParametes...
#!/usr/bin/env python """ .. py:currentmodule:: FileFormat.SimulationInputs .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> MCXRay simulation inputs file. """ # Script information for the file. __author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)" __version__ = "" __date__ = "" __copyright__ ...
from distutils.core import setup setup( name='ciqueue', version='1.0.0', description='Closable, interruptable queue', author='Brian Sherson', author_email='caretaker82@gmail.com', url='https://github.com/shersonb/python-ciqueue', py_modules=['ciqueue'] )
import datetime import logging import tornado.escape import tornado.web from icubam.backoffice.handlers import base, home, icus, users from icubam.db import store from icubam.messaging import client class ListMessagesHandler(base.AdminHandler): ROUTE = "list_messages" def initialize(self): super().initiali...
# Copyright 2020 TestProject (https://testproject.io) # # 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 ...
import click from flask.cli import AppGroup from friday import storage from friday.models import Recipe, RecipeImage from friday.schemas import Recipe as RecipeSchema recipe_group = AppGroup("recipe") @recipe_group.command("new") @click.argument("itemname") @click.option("--name", "-n", multiple=True) @click.option...
import abc import errno import os import platform import socket import threading import time import traceback import urlparse import mozprocess __all__ = ["SeleniumServer", "ChromeDriverServer", "GeckoDriverServer", "InternetExplorerDriverServer", "ServoDriverServer", "WebDriverServer"] class...
#-*- coding: utf-8 -*- # https://gist.github.com/114831 # recursive_dictionary.py # Created 2009-05-20 by Jannis Andrija Schnitzer. # # Copyright (c) 2009 Jannis Andrija Schnitzer # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (t...
#!/usr/bin/env python3 # Copyright (C) 2022 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
from schematics.types import ModelType, StringType, PolyModelType from spaceone.inventory.model.snapshot.data import Snapshot from spaceone.inventory.libs.schema.metadata.dynamic_field import TextDyField, DateTimeDyField, EnumDyField, ListDyField, SizeField from spaceone.inventory.libs.schema.metadata.dynamic_layout i...
__version__ = '9999+managed.by.hatchery' __version_info__ = '.'.split(__version__) for i in range(len(__version_info__)): if __version_info__[i].isdigit(): __version_info__[i] = int(__version_info__[i])
import os from PyQt5 import QtWidgets, uic from PyQt5.QtCore import pyqtSignal from PyQt5 import QtCore from PyQt5.QtGui import QColor, QPixmap, QIcon, QBrush import os.path import logging import sys import traceback import time # Import PyQt5 from PyQt5.QtWidgets import QTableWidgetItem, QMessageBox # Import qgis ...
""" Requires: Python 3 github3.py==1.0.0a4 semver==2.6.0 tabulate==0.7.5 """ import functools import json import sys import github3 import semver from tabulate import tabulate app_repos = set([ "atom-format", "django-bookmarks", "django-flag", "django-forms-bootstrap", "django-fr...
""" Utilities for submitting grades and comments throught the Canvas API. Documentation here: https://canvas.beta.instructure.com/doc/api/submissions.html#method.submissions_api.update """ import sys import urllib from urllib.parse import urlencode from urllib.request import Request,urlopen from urllib.error import...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup( name="django-full-serializer", classifiers=[ 'Topic :: Utilities', 'Development Status :: 4 - Beta', "Framework :: Django", 'Environment :: Web Environment', "Intended Audience :: Develop...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json class JIRAError(Exception): """General error raised for all problems in operation of the client.""" def __init__(self, status_code=None, text=None, url=None): self.status_code = status_code self.text = text s...
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@id='basic-modal']/p[@class='all']/span/strong", 'price' : "//div[@id='basic-modal']/p[@class='all']/strong", 'category' : "...
import mimetypes import typing as t from email import charset as Charset from email import encoders as Encoders from email import generator, message_from_string from email.errors import HeaderParseError from email.header import Header from email.headerregistry import Address, parser from email.message import Message fr...
#!/usr/bin/env python # # Copyright 2015-2016 Flavio Garcia # # 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...
# External Import from django.db import models from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin, ) from rest_framework_simplejwt.tokens import RefreshToken # Internal Import from subscription.models import Subscription class UserManager(BaseUserManager): ""...
import re instr = {} starting = [] #outputs are negative - 1 operatives = {} queue = [] while True: try: line = input() except: break if line[:3] == "bot": a, x, b, y, c = re.match(r"bot (\d*) gives low to (.*) (\d*) and high to (.*) (\d*)", line).groups() instr[int(a)] ...
#!/usr/bin/env python #coding: utf- import sys import uuid from kombu import Exchange, Connection from kombu.pools import producers #### Purger # KEY = 'download_task' # EXCHANGE = 'download_task' # EXCHANGE_TYPE = 'direct' # MQ_URL = 'amqp://guest:guest@127.0.0.1:5672//' # #### Cleaner # KEY...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Java locale differences from JDK 9 onwards, and locale variation on # developer machines, break test_strptime tests. This manifests more on Windows. # Rather than diverge from the Python source, this overrides with extra locale # setup. # Merging back into CPython is desirable, but is a bigger discussion around # lib...
# Initialising from poluk.process import process # Recalculations from poluk.alliance import alliance from poluk.forecast import forecast from poluk.not_standing import not_standing # Images from poluk.battleground import battleground from poluk.constituency_map import constituency_map from poluk.swingometer import s...
#!/usr/bin/env python3 #! coding:utf-8 ''' Picomotor Power Control MEIKO WATCH BOOT nino RPC-MCS Usage: pico_power_control.py [TARGET] [ON or OFF] ex. pico_power_controls.py TEST ON ''' import sys import getpass import telnetlib import time import subprocess from datetime import...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class SpiderItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass #teacher class teacher_item(scrapy....
import os import pytest import tempfile import shutil from unittest import mock, TestCase from unittest.mock import MagicMock, patch, call from zerorobot import config, template_collection from zerorobot.template_uid import TemplateUID from JumpscaleZrobot.test.utils import ZrobotBaseTest from zerorobot.template.state ...
""" lec 2 """ #print("hello world") # this is a single line comment #print ( type (123) ) #print( type (123.) ) #print( type ("123") ) #print(" Hello " + "World ") #print(2*4) ##print(my_int+1) #my_int=121 #print(my_int) my_str = 'hello world' print(my_str.upper())
# This file is part of beets. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribu...
def length_of_longest_substringi(string): if not string: return 0 char_map = {} start = 0 max_sub = 0 for i, c in enumerate(string): if c in char_map: start = max(start, char_map[c] + 1) else: start = max(start, 0) # start = max(start, char_...
from models.tridentnet.builder import TridentFasterRcnn as Detector from models.tridentnet.builder import TridentMXNetResNetV2 as Backbone from models.tridentnet.builder import TridentRpnHead as RpnHead from models.tridentnet.builder import process_branch_outputs, process_branch_rpn_outputs from symbol.builder import N...
# Copyright 2003-2008 by Leighton Pritchard. All rights reserved. # Revisions copyright 2008-2009 by Peter Cock. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # # Contact: Leighton Pritchard,...
from __future__ import annotations import datetime import itertools import json from abc import abstractmethod from ravendb.documents.operations.executor import OperationExecutor from ravendb.documents.session.misc import ( SessionOptions, TransactionMode, SessionInfo, ForceRevisionStrategy, Docum...
import numpy as np import torch from mmdet3d.core import limit_period from mmdet.core import images_to_levels, multi_apply class AnchorTrainMixin(object): """Mixin class for target assigning of dense heads.""" def anchor_target_3d(self, anchor_list, gt_bboxe...
from .backend_qt5cairo import _BackendQT5Cairo, FigureCanvasQTCairo @_BackendQT5Cairo.export class _BackendQT4Cairo(_BackendQT5Cairo): class FigureCanvas(FigureCanvasQTCairo): required_interactive_framework = "qt4"
# coding: utf-8 """ finAPI RESTful Services finAPI RESTful Services # noqa: E501 OpenAPI spec version: v1.42.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from swagger_client.models.transaction_data_with_identifier im...
""" """ # Native import time import pprint from collections import OrderedDict import json # 3rd-Party from sqlalchemy import Table, Column, ForeignKey, Integer, String, Boolean, Float from sqlalchemy.orm import relationship, backref import pydash # from foe.request import Request from foe.models.model import Model...
""" 2016 Day 24 https://adventofcode.com/2016/day/24 """ from collections import deque from dataclasses import dataclass from itertools import combinations, permutations from typing import Dict, Iterator, Sequence, Tuple import aocd # type: ignore @dataclass(frozen=True) class Point: """ A two-dimensional l...
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-14 13:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('goods', '0019_auto_20171214_1158'), ] operations =...
# Counting Sundays # Problem 19 # You are given the following information, but you may prefer to do some research for yourself. # 1 Jan 1900 was a Monday. # Thirty days has September, # April, June and November. # All the rest have thirty-one, # Saving February alone, # Which has twenty-eight, rain or shine. # And on ...
from flask import jsonify class JSONResponseBuilder(object): @staticmethod def build_response(**kwargs): response = {} response['data'] = kwargs.get('data', []) response['success'] = kwargs.get('success', True) response['messages'] = kwargs.get('messages', []) return js...
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets 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/LI...
"""MusicController: Orchestrates all data from music providers and sync to internal database.""" from __future__ import annotations import asyncio import statistics from typing import TYPE_CHECKING, Dict, List, Optional, Tuple, Union from music_assistant.controllers.music.albums import AlbumsController from music_ass...
import subprocess import importlib import sys from pathlib import Path from unittest.mock import Mock, MagicMock import jupytext import nbformat import pytest from ploomber.cli import plot, build, parsers, task, report, status, interact from ploomber.cli.cli import cmd_router from ploomber.cli.parsers import _custom_...
import datetime print('Hello it is {}'.format(str(datetime.date.today())))
import itertools import string import pytest from heapq import heappush, heappop def get_map_items(mmap, items): return {v: k for k, v in mmap.items() if v in items} def build_map(lines): data = dict() for j, line in enumerate(lines): for i, ch in enumerate(line): data[(i, j)] = ch ...