text
stringlengths
2
999k
""" Rare category exploration based on the side information. """ import numpy as np import seaborn as sns import pandas as pd import matplotlib.pyplot as plt from sklearn import preprocessing import sklearn.datasets as database import sklearn.cluster as cluster from models.rarefunctions import RareFunc from search.grad...
# # 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 # ...
# coding: utf-8 from pathlib import Path import pandas as pd from sklearn.metrics import mean_squared_error import lightgbm as lgb print('Loading data...') # load or create your dataset regression_example_dir = Path(__file__).absolute().parents[1] / 'regression' df_train = pd.read_csv(str(regression_example_dir / 'r...
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from c7n.provider import clouds, Provider from collections import Counter, namedtuple import contextlib import copy import datetime import itertools import logging import os import operator import sys import time import threading import tr...
# Numpy/gdalnumeric - Read an image, extract a band, save a new image # https://github.com/GeospatialPython/Learning/raw/master/SatImage.zip from osgeo import gdalnumeric srcArray = gdalnumeric.LoadFile("SatImage.tif") band1 = srcArray[0] gdalnumeric.SaveArray(band1, "band1.jpg", format="JPEG")
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ File for miscellaneous utility functions and constants. """ from collections import deque import math import random ...
# 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, overload from ... import _utilities fro...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 18 17:28:58 2020 @author: usingh """ from pyrpipe import sra,qc,mapping,assembly from testingEnvironment import testSpecs import os testVars=testSpecs() fq1=testVars.fq1 fq2=testVars.fq2 rRNAfasta=testVars.rRNAfa srr='ERR3770564' #single end arab...
""" DEPRECATED. Moved to kwcoco.data """ def main(): """ Dump the paths to the coco file to stdout By default these will go to in the path: ~/.cache/netharn/camvid/camvid-master The four files will be: ~/.cache/kwcoco/camvid/camvid-master/camvid-full.mscoco.json ~/.cache/kwco...
""" Description: Wallet Usage: from neo.Wallets.Wallet import Wallet """ import traceback import hashlib from itertools import groupby from base58 import b58decode from decimal import Decimal from Crypto import Random from Crypto.Cipher import AES from threading import RLock from neo.Core.TX.Transaction import ...
""" WSGI config for nameless_smoke_29209 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault(...
from Stream import Stream from Stream import _no_value, _multivalue from Agent import Agent from Operators import stream_agent from MakeNetworkNew import make_network, network_data_structures from multiprocessing import Process, Queue from components_test import * def make_input_manager(input_queue, input_stream_dict...
import os import sys import time from input import Get, input_to from creator import grid_bg, grid_print from classes import * from colorama import * from generator import * while m.level!= '1' and m.level != '2' and m.level != '3': print("Input level of difficulty required [1, 2, 3]") m.level = input() m.le...
import json from shlex import split as shlex_split from distutils.spawn import find_executable as which # pylint: disable=import-error,no-name-in-module from subprocess import run, PIPE from ocrd_utils import getLogger, parse_json_string_or_file, set_json_key_value_overrides # from collections import Counter from ocrd...
# Copyright 2014 Intel Corp. # # 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,...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Can be multiple prefixes, like this: ("!", "?") BOT_PREFIX = ("jojo!") TOKEN = "ODEzNjEyMDY2NjU2MDkyMTcx.YDR1SA.enAbTeGk4nc4PWD1DUlXPzWQo10" APPLICATION_ID = "813612066656092171" OWNERS = [813643509088780319] BLACKLIST = [] # Default cogs that I have created for the template STARTUP_COGS = [ "cogs.general", "cog...
''' Created on Jan 23, 2016 @author: hanhanwu Note: have to use eBay Product AppID here, NOT the Sandbox AppID ''' import datetime from ebaysdk.exception import ConnectionError from ebaysdk.finding import Connection import KNN import json import optimization def get_items(appid, search_keyword, categoryId): resul...
# This code is part of Qiskit. # # (C) Copyright IBM 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivative wo...
from ConfigSpace.configuration_space import ConfigurationSpace from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \ CategoricalHyperparameter, Constant from ConfigSpace.forbidden import ForbiddenEqualsClause, \ ForbiddenAndConjunction from autosklearn.pipeline.components.base import AutoSklear...
#!/usr/bin/env python ''' tags_generator.py Copyright 2017 Long Qian Contact: lqian8@jhu.edu This script creates tags for your Jekyll blog hosted by Github page. No plugins required. ''' import glob import os post_dir = '../_posts/' tag_dir = '../tag/' filenames = glob.glob(post_dir + '*md') total_tags = [] for fi...
import numpy as np # requiers version 1.12+ import os import math dat = """RawFile: {file} Resolution: {x} {y} {z} Format: {format} ByteOrder: {byteorder} """ ivf = """<?xml version="1.0" ?> <InviwoTreeData version="1.0"> <RawFile content="{file}" /> <Format content="{format}" /> <Dimension x="{x}" y="{y...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#! /usr/bin/env python # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
import re from functools import partial from typing import Callable, Dict, List, Mapping, Optional, Pattern, Set, Union, cast from lisa import schema from lisa.testsuite import TestCaseMetadata, TestCaseRuntimeData, get_cases_metadata from lisa.util import LisaException, constants, set_filtered_fields from lisa.util.l...
""" Tutorial: 1. Use CCPPOCurriculum 2. Use ChangeNCallback """ from copo.algo_ippo.ippo import IPPOTrainer, validate_config_add_multiagent, PPO_valid, PPOTFPolicy from copo.callbacks import MultiAgentDrivingCallbacks from copo.train.train import train from copo.train.utils import get_train_parser from ray imp...
from .CFRPlus import CFRPlus from .LinearCFR import LinearCFR from .VanillaCFR import VanillaCFR from .DCFR import DCFR from .DCFRPlus import DCFRPlus from .AutoCFR4 import AutoCFR4 from .AutoCFRS import AutoCFRS
# First using the normal function using def keyword def cube(n): return n**3 print(cube(2)) # Using the lambda function and storing it in a variable and then using the variable as the function. f = lambda n: n**3 print(f(2))
# model settings norm_cfg = dict(type='SyncBN', requires_grad=True) model = dict( type='MaskRCNN', pretrained='modelzoo://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, style='pytorch', gcb=...
import os.path import torchvision.transforms as transforms from data.base_dataset import BaseDataset, get_transform from data.image_folder import make_dataset from PIL import Image import PIL from pdb import set_trace as st import numpy as np import random class DepthDataset(BaseDataset): def initialize(self, opt...
from couchdbkit.ext.django.schema import ( Document, StringProperty, DecimalProperty, DictProperty, BooleanProperty, DateTimeProperty, ) from datetime import datetime from decimal import Decimal from django.db import models from django.utils.translation import ugettext as _ import json_field # ...
import numpy as np import numpy.random as npr import os import argparse def args(): parser = argparse.ArgumentParser(description="generate Pnet train data") parser.add_argument('--data_dir',type=str,default="./24",\ help='annotation file saved dir') parser.add_argument('--out_dir',t...
import numpy as np import pandas as pd from scipy import stats, integrate import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter from matplotlib.dates import DateFormatter, HourLocator, MinuteLocator, AutoDateLocator import seaborn as sns import csv import sys from datetime import datetime,date,tim...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
# -*- coding: utf-8 -*- # # Copyright (c) 2017-2019 VMware, Inc. All Rights Reserved. # SPDX-License-Identifier: BSD-2-Clause """ Functions to generate content for the report """ from tern.command_lib import command_lib from tern.report import formats from tern.utils.general import get_git_rev_or_version def get_la...
# coding: utf-8 """ CloudEndure API documentation © 2017 CloudEndure All rights reserved # General Request authentication in CloudEndure's API is done using session cookies. A session cookie is returned upon successful execution of the \"login\" method. This value must then be provided within the request hea...
#!/usr/bin/python # -*- coding: utf-8 -*- import os from os import path from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__),...
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import random import string import txnats from twisted.logger import globalLogPublisher from simple_log_observer import simpleObserver from twisted.logger import Logger log = Logger() from twisted.internet import reactor from twisted.internet import defe...
from userbot import CMD_LIST @command(pattern="^.help ?(.*)") async def cmd_list(event): if not event.text[0].isalpha() and event.text[0] not in ("/", "#", "@", "!"): tgbotusername = Var.TG_BOT_USER_NAME_BF_HER input_str = event.pattern_match.group(1) if tgbotusername is None or inpu...
#!/usr/bin/env python3 import sys import random import datetime import re # # # NAME = '' PREAMBLE = 'A novel for NaNoGenMo 2017' AUTHORED_BY = 'Andrew Zyabin' # # # GRAMMAR = { '*': [] } # # # def para(*objects, sep=' ', flush=False): print(*objects, sep=sep, end='\n\n', file=sys.stdout, flush=flush) # # # ...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# ## Project Demo # Just run through these to watch breakout run! We handle processing the frame input and rewards. We then make the environment and model then run the demo. # #### Imports as needed: from PIL import Image import numpy as np import gym from keras.models import Sequential from keras.layers import Dens...
# -*- coding: utf-8 -*- """Top-level package for Yarn Kernel Provider.""" __author__ = """Jupyter Development Team""" __email__ = 'jupyter@googlegroups.com' __version__ = '0.1.0'
"""Tests for using subprocesses in tests.""" import asyncio.subprocess import sys import pytest if sys.platform == "win32": # The default asyncio event loop implementation on Windows does not # support subprocesses. Subprocesses are available for Windows if a # ProactorEventLoop is used. @pytest.yield...
# coding: utf-8 """ reproducible code for EIT2016 """ # Copyright (c) Benyuan Liu. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import absolute_import, division, print_function # import matplotlib # matplotlib.rcParams.update({'font.size': 3}) import ma...
import shutil import subprocess from pathlib import Path import pytest from bldr.bldr import BLDR @pytest.fixture def git_project_path(tmp_path: Path, asset_dir: Path) -> Path: git_project_dir = tmp_path.joinpath('git_project') shutil.copytree( asset_dir.joinpath('test-git-proj'), git_projec...
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import uuid from elasticsearch import Elasticsearch from pyhocon import ConfigFactory from databuilder.extractor.atlas_search_data_extractor import AtlasSearchDataExtractor from databuilder.job.job import DefaultJob from databuil...
import os from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.client import Client class BaseModule(AnsibleModule): def __init__(self, argument_spec): """ Initialize a new SecretHub module. This class can be extended to create an Ansible module that uses a Sec...
#!/usr/bin/env python # Copyright 2018 Division of Medical Image Computing, German Cancer Research Center (DKFZ). # # 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...
#!/usr/bin/env python3 """Calculates the Frechet Inception Distance (FID) to evalulate GANs The FID metric calculates the distance between two distributions of images. Typically, we have summary statistics (mean & covariance matrix) of one of these distributions, while the 2nd distribution is given by a GAN. When run...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models # Create your models here. class AccountView(models.Model): def account_view(self): pass
import math import time from collections import defaultdict, OrderedDict from enum import Enum import os from typing import Any, Callable, Dict, List, Optional, Tuple import ray from ray import cloudpickle, ObjectRef from ray.actor import ActorHandle from ray.serve.async_goal_manager import AsyncGoalManager from ray.s...
#! /usr/bin/env python3 # Program to depict the RSA Encryption/Decryption scheme # Taken from the wikipedia page for RSA import random def gcd(a, b): if a == 0: return b return gcd(b % a, a) def enc_key(modulus, totient): # The only requirement for the encryption key(e) is for it # to be coprime to t...
# -*- coding: utf-8 -*- from preprocessing.tweet import TweetCleaner from analyzer.sentiment import TweetAnalyzer # ============================================================================== # GLOBAL # ============================================================================== tweet_clean = TweetCleaner( la...
from cvpods.layers import ShapeSpec from cvpods.modeling.backbone import Backbone from cvpods.modeling.backbone import build_resnet_backbone from cvpods.modeling.meta_arch import SemanticSegmentor from cvpods.modeling.meta_arch import FCNHead def build_backbone(cfg, input_shape=None): if input_shape is None: ...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "urbinsight.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. A...
# Copyright (c) 2014 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.0 # # Unless required by applicable law or agreed ...
import json import logging import sys import click from click import Context from click.testing import CliRunner import pytest import rasterio from rasterio.rio import info from rasterio.rio.main import main_group logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) def test_edit_nodata_err(data): runn...
"""Trains CNN for use with upconvnet. In other words, the CNN will be the encoder and the upconvnet will be the decoder. However, the two are trained separately, and the upconvnet is *not* trained by this script. The CNN is trained to optimize front detection (specifically, to minimize cross-entropy between the true...
# Generated by Django 3.1.3 on 2021-04-16 02:57 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Customer', fields=[ ...
from ..gates import * # A sample simulation # The following procedure, which places a ``probe'' on a wire, shows the simulator in action. The probe tells the wire # that, whenever its signal changes value, it should print the new signal value, together with the current time and a # name that identifies the wire: # (...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2018, G.A. vd. Hoorn # # 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 # # Unle...
# (C) Datadog, Inc. 2019 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import pytest from . import common pytestmark = pytest.mark.integration CHECK_ID = 'test:123' @pytest.mark.usefixtures("dd_environment") def test_check(aggregator, check, instance): check = check(instanc...
import matplotlib.pyplot as plt import pandas as pd from tabulate import tabulate import functions as fn import numpy as np # Функция формирования таблицы. def create_table_final(_data): pd.set_option('display.width', None) table = pd.DataFrame(data=_data) print(tabulate(table, tablefmt='psql'), end='\n\n...
from django.db import models as md class Upload(md.Model): attachment = md.FileField(upload_to=get_filename) def __str__(self): return self.attachment.name
""" Helper for loading ``Trading History`` dataset from a file **Supported environment variables** :: # to show debug, trace logging please export ``SHARED_LOG_CFG`` # to a debug logger json file. To turn on debugging for this # library, you can export this variable to the repo's # included file with...
import pyxhook import time #This function is called every time a key is presssed def kbevent( event ): #print key info print event #If the ascii value matches spacebar, terminate the while loop if event.Ascii == 32: global running running = False def main(): #Create hookmanage...
# -*- coding: utf-8 -*- import scrapy from scrapy import Selector import time import re from ljcrawl.items import LjcrawlItem class LianjiacrawlSpider(scrapy.Spider): name = "lianjiacrawl" allowed_domains = ["bj.lianjia.com","bj.zu.ke.com"] # start_urls = ['http://bj.lianjia.com/'] #lianjia start_urls...
''' Accelerate demo with fp16 and multi-gpu support. Single CPU: python accelerate_demo.py --cpu 16-bit Floating Point: python accelerate_demo.py --fp16 Model from timm: python accelerate_demo.py --timm Singe-GPU: python accelerate_demo.py Multi-GPU or Multi-CPU: accelerate config accelerat...
""" PandaDoc Public API PandaDoc Public API documentation # noqa: E501 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from pandadoc_client.model_utils import ( # noqa: F401 ApiTypeError, ModelComposed, ModelNormal, ModelSimple, ca...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from africanus.util.docs import DocstringTemplate from africanus.util.numba import jit @jit(nopython=True, nogil=True, cache=True) def _fit_spi_components_impl(data, weights, freqs, freq0, out, jac, ncomps, nfreqs, tol, m...
import sys sys.path.insert(0, "../") import aiml # The Kernel object is the public interface to # the AIML interpreter. k = aiml.Kernel() # Use the 'learn' method to load the contents # of an AIML file into the Kernel. k.learn("cn-startup.xml") # Use the 'respond' method to compute the response # to a user's in...
# # Copyright (C) 2018 ETH Zurich, University of Bologna and # 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 # # U...
__author__ = 'patras' from domain_springDoor import * from timer import DURATION from state import state, rv DURATION.TIME = { 'unlatch1': 5, 'unlatch2': 5, 'holdDoor': 2, 'passDoor': 3, 'releaseDoor': 2, 'closeDoors': 3, 'move': 7, 'take': 2, 'put': 2, } DURATION.COUNTER = { ...
# The MIT License (MIT) # Copyright (c) 2019 by the xcube development team and contributors # # 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...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import unittest import torch from detectron2.structures import Instances class TestInstancesIndexing(unittest.TestCase): def test_int_indexing(self): attr1 = torch.tensor([[0.0, 0.0, 1.0], [0.0, 0.0, 0.5], [0.0, 0.0, 1.0], [0.0, 0.5, ...
# Copyright 2013 Donald Stufft and individual contributors # # 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 asyncssh import shlex import time import json from gconstant import VFS, PLUGIN from vfssh.vfs.error import VFSError import gconstant as gc class CyderSSHSession(asyncssh.SSHServerSession): def __init__(self, client): super().__init__() self.client = client self.command = PLUGIN.co...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 20 21:31:04 2019 @author: dvdgmf """ # https://www.tensorflow.org/tutorials/keras/basic_regression #------------------------------------------------------------------------------ #---------------------------------------------------------------------...
import os import json import grpc import pytest import requests import time import numpy as np import ray from ray.core.generated import node_manager_pb2 from ray.core.generated import node_manager_pb2_grpc from ray.core.generated import reporter_pb2 from ray.core.generated import reporter_pb2_grpc from ray.dashboard....
#!/usr/bin/python from model import Table def t_print(table, \ table_name = None, \ footer_str = None, \ corner = '+', \ column_sep = '|', \ row_sep = '-', \ box_width = 0, \ col_width_adjust = 2, \ title_row_sep = '=', \ ...
# Copyright (c) 2012 Spotify AB # # 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, s...
# Copyright 2013-2019 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 PyMaestrowf(PythonPackage): """A general purpose workflow conductor for running multi-step...
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
#!/usr/bin/env python3 from functools import lru_cache def get_input() -> list[str]: with open('./input', 'r') as f: return [v for v in [v.strip() for v in f.readlines()] if v] lines = get_input() visited_locs_set = set() rip = 0 acc = 0 while True: icode, iargs = lines[rip].split(' ') new_r...
#!/usr/bin/env python from setuptools import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() setup( name='ncs', version='0.1.0', description="NCS<->RGB color database for Python", long_descriptio...
# Data models relating to Jobs from datetime import timedelta import logging import os import uuid from celery import schedules from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.core.serialize...
"""Utils for testing pysiaalarm.""" from binascii import hexlify from Crypto import Random from Crypto.Cipher import AES def create_test_items(key, content): """Create encrypted content.""" encrypter = AES.new( key.encode("utf8"), AES.MODE_CBC, Random.new().read(AES.block_size) ) extra = len...
# 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, overload from ... import _utilities fro...
class Node(object): """Node containing data, pointers to previous and next node.""" def __init__(self, data): self.data = data self.prev = None self.next = None class DoublyLinkedList(object): def __init__(self): self.head = None self.tail = None # Number o...
import re from django.utils import datetime_safe from django.template import loader, Context from haystack.exceptions import SearchFieldError class NOT_PROVIDED: pass DATETIME_REGEX = re.compile('^(?P<year>\d{4})-(?P<month>\d{2})-(?P<day>\d{2})(T|\s+)(?P<hour>\d{2}):(?P<minute>\d{2}):(?P<second>\d{2}).*?$') #...
import bpy from bpy.props import * from bpy.types import Node, NodeSocket from arm.logicnode.arm_nodes import * class GetVelocityNode(Node, ArmLogicTreeNode): '''Get velocity node''' bl_idname = 'LNGetVelocityNode' bl_label = 'Get Velocity' bl_icon = 'QUESTION' def init(self, context): sel...
# Generated by Django 2.0.5 on 2018-06-14 11:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('student', '0033_auto_20180614_1118'), ] operations = [ migrations.AlterField( model_name='student', name='student_pa...
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'quiet_resonance_30073.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: ...
from hummingbot.client.config.config_var import ConfigVar from hummingbot.client.config.config_validators import validate_decimal from decimal import Decimal def new_fee_config_var(key): return ConfigVar(key=key, prompt=None, required_if=lambda x: x is not None, ...
import argparse import sys from typing import List import aec.command.ami as ami import aec.command.compute_optimizer as compute_optimizer import aec.command.ec2 as ec2 import aec.command.ssm as ssm import aec.util.cli as cli import aec.util.config as config import aec.util.configure as configure import aec.util.displ...
"""Support for Ambient Weather Station binary sensors.""" from __future__ import annotations from dataclasses import dataclass from typing import Literal from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_CONNECTIVITY, BinarySensorEntity, BinarySensorEntityDescript...
import FWCore.ParameterSet.Config as cms from RecoTracker.SpecialSeedGenerators.SimpleCosmicBONSeeder_cfi import * import RecoTracker.TkSeedingLayers.seedingLayersEDProducer_cfi as _mod simpleCosmicBONSeedingLayers = _mod.seedingLayersEDProducer.clone( layerInfo, layerList = cms.vstring(*layerList), )