text
stringlengths
2
999k
# Copyright 2013-2021 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) import re class Cmake(Package): """A cross-platform, open-source build system. CMake is a family of tools design...
from .math import reduce_any_nan from .utils import export from .types import TensorRef import tensorflow as tf import pandas as pd from tqdm import tqdm from typing import Tuple, Sequence, List, Optional, Union, Callable, Dict, Any import abc from datetime import datetime from itertools import chain import itertools...
""" This part of experiment which checks and normalizes confidences of outputs in different engines. This shows how histograms can look like to determine scalings. (main is test_pandas_normalization_experiment_database.py) This could be used in future implementations to improve results, at the moment the confidence s...
import argparse import numpy as np import os import shutil import time import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.distributed as dist import torch.optim import torch.utils.data import torch.utils.data.distributed import torchvision.transforms as transf...
from pyolin.utils import hill_derivative from pyolin.utils import normalise from pyolin.analysis import frechet import numpy from numpy.linalg import norm from numpy import array from numpy import exp from math import log as ln from similaritymeasures import frechet_dist def max_y_displacement(A, B): """ C...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # """RAMSES RF - a RAMSES-II protocol decoder & analyser. Decode/process a message (payload into JSON). """ import logging from .const import DONT_CREATE_ENTITIES, DONT_UPDATE_ENTITIES, __dev_mode__ from .devices import Device # , HgiGateway from .protocol import ( ...
# 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.package import * class PyChardet(PythonPackage): """Universal encoding detector for Python 2 and 3""" ...
#!/usr/bin/env python """ downloaded from http://xbmc-addons.googlecode.com/svn/addons/ """ """ This is a modded version of the original addons.xml generator """ """ Put this version in the root folder of your repo and it will """ """ zip up all add-on folders, create a new zip in your zips folder """ """ and then upd...
input = """ q(1). p(1,2). %s(1..3). r(Z) :- q(X), Z=X+Y, #count{H: s(H), p(H,Z)}=Y. %#count{H: s(H), not p(H,Z)}=Y.""" output = """ q(1). p(1,2). %s(1..3). r(Z) :- q(X), Z=X+Y, #count{H: s(H), p(H,Z)}=Y. %#count{H: s(H), not p(H,Z)}=Y."""
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Guido Lemoine # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD import time import sys import os import io import json import psycop...
"""Allow to set up simple automation rules via the config file.""" from __future__ import annotations import logging from typing import Any, Awaitable, Callable, Dict, cast import voluptuous as vol from voluptuous.humanize import humanize_error from homeassistant.components import blueprint from homeassistant.const ...
from geopy.distance import vincenty import xml.etree.ElementTree as ET def process_tcx(filename): tree = ET.parse(filename) root = tree.getroot() latlongs = [] prev_latlong = () for child in root.find('{http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2}Courses'). \ find('{htt...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
__________________________________________________________________________________________________ sample 24 ms submission class Solution: def nearestPalindromic(self, S: str) -> str: K = len(S) candidates = [str(10**k + d) for k in (K-1, K) for d in (-1, 1)] prefix = S[:(K+1)//2] P ...
""" Extracts a subset of clean ships into ais_extended tables """ import logging import time import threading import psycopg2 import queue from pyrate.utils import interpolate_passages, valid_imo, detect_location_outliers EXPORT_COMMANDS = [('run', 'Extract a subset of clean ships into ais_extended tables')] INPUTS =...
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
from typing import Tuple, Dict, List import numpy as np import logging from pyobs.object import get_object from pyobs.images.processors.detection import SourceDetection from .base import FocusSeries from pyobs.utils.curvefit import fit_hyperbola from pyobs.images import Image log = logging.getLogger(__name__) cla...
""" Indexed minimum priority queue """ class IndexedMinPQ: """ Heap storage for an indexed min priority queue. Attributes ---------- size - available storage (note 0th index unused) N - Number of (value, priority) pairs in the PQ values - stores the ith value ...
import torchvision.transforms as standard_transforms from torch.utils.data import DataLoader import misc.transforms as own_transforms from .SHHA import SHHA from .setting import cfg_data import torch import random def get_min_size(batch): min_ht = cfg_data.TRAIN_SIZE[0] min_wd = cfg_data.TRAIN_SIZE[1] ...
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # Copyright (C) Mike Ryan <mikeryan@lacklustre.net> # This program is published under a GPLv2 license """ Bluetooth layers, sockets and send/receive functions. """ import ctyp...
from flask import Flask, jsonify, abort, make_response, request, url_for from flask_httpauth import HTTPBasicAuth app = Flask(__name__) auth = HTTPBasicAuth() tasks = [ { 'id': 1, 'title': u'Buy groceries', 'description': u'Milk, Cheese, Pizza, Fruit', 'done': False }, { 'id': 2, 'title': u'Learn Pyt...
#import module from tkinter for UI from tkinter import * from playsound import playsound import os from datetime import datetime; #creating instance of TK root=Tk() root.configure(background="white") #root.geometry("300x300") def function1(): os.system("\"C:/Program Files/Python3/python.exe\" dataset_captur...
import clr clr.AddReference('RevitAPI') clr.AddReference('RevitAPIUI') from Autodesk.Revit.DB import * app = __revit__.Application doc = __revit__.ActiveUIDocument.Document t = Transaction(doc, 'Print family parameters') t.Start() #define parameter variables height = [a for a in doc.FamilyManager.Parameters ...
# -*- coding: utf-8 -*- ''' Logging and debuging facility ============================= Levels: DEBUG Detailed information, typically of interest only when diagnosing problems. INFO Confirmation that things are working as expected. WARNING An indication that something unexpected happened, ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
""" This file is part of pyS5p https://github.com/rmvanhees/pys5p.git Definition of colour schemes for lines and maps that also work for colour-blind people. See https://personal.sron.nl/~pault/ for background information and best usage of the schemes. Reference --------- https://personal.sron.nl/~pault/ Copyrig...
import json import sys from pathlib import Path import weather.yahoo_weather as yahoo_weather from weather.models import TVersion, load_source_version def run_in(version: TVersion, input_dir: str) -> None: base_path = Path(input_dir) base_path.mkdir(parents=True, exist_ok=True) weather_file = base_path ...
# Generated by Django 2.0.4 on 2018-04-26 18:41 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('chat', '0001_initial'), ...
webhook_url = "https://" p_config = ""
import url_parser urls = ['http://www.foo.com/bar?a=b&c=d', 'http://www.foo.com:80/bar?c=d;a=b', 'http://www.foo.com/bar/?c=d', 'http://www.foo.com:80/bar?c=d#comments', 'http://www.foo.com:80/bar/?c=d#comments', 'http://foo.com:80/bar?c=d', 'https://foo.com/bar/', '//foo.com/bar', 'foo.com/bar' ] def main()...
""" Enumerated values for working with the storage implementations. """ from sleekxmpp.plugins.xep_0004 import FormField from enum import Enum, unique from rdflib.namespace import RDF import json class Flag: """ Mixin that will provide a means to retrieve the values from the data type. """ def __init...
def is_openmm_GromacsTopFile(item): item_fullname = item.__class__.__module__+'.'+item.__class__.__name__ output = (item_fullname == 'openmm.GromacsTopFile') return output
# 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...
import pytest import numpy as np from numpy.testing import assert_array_almost_equal from pylops.utils import dottest from pylops.utils.wavelets import ricker from pylops.waveeqprocessing.lsm import _identify_geometry, \ _traveltime_table, Demigration, LSM PAR = {'ny': 10, 'nx': 12, 'nz': 20, 'nt': 50, 'dy...
import json import jsonpath import torch import numpy as np import pickle import os, sys import argparse import copy import numpy as np def from_system_bin(dir_json, dir_binfile, dir_output): def getNonRepeatList(data): new_data = [] for i in range(len(data)): if data[i] n...
# Standard Library import datetime import os # Third Party Code from dateutil.tz import tzutc import responses # Supercell Code from supercell.breezometer.air_quality import ( air_quality_forecast_hourly, current_air_quality, historical_air_quality_hourly, ) from supercell.breezometer.air_quality.models.a...
''' A Recurrent Neural Network (LSTM) implementation example using TensorFlow.. Next word prediction after n_input words learned from text file. A story is automatically generated if the predicted word is fed back as input. Author: Rowel Atienza Project: https://github.com/roatienza/Deep-Learning-Experiments ''' from...
import cv2 import numpy as np import tensorflow.lite as tflite font = cv2.FONT_HERSHEY_SIMPLEX bottomLeftCornerOfText = (20,160) fontScale = .9 fontColor = (255 ,0,100) thickness = 2 lineType = 1 CLASSIFIER_LABELS = ("A", "T", "W", "X", "Y") ...
# (c) Copyright IBM Corporation 2020. # LICENSE: Apache License 2.0 (Apache-2.0) # http://www.apache.org/licenses/LICENSE-2.0 import abc import functools import logging import os from enum import Enum from typing import Dict, Mapping, Sequence import lrtc_lib.definitions as definitions from lrtc_lib.train_and_infer...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.11.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
import json import logging with open('eth_settings_mainnet.json') as f: config = json.load(f) blockchain = config['blockchain'] blockchain_type = blockchain['type'] contract_owner = blockchain['contract_owner'] private_key = blockchain['private_key'] contract_owner_hex = blockchain['contract_owner_hex'] contract...
import os from typing import List import subprocess import pytest from tools import utils, paths, constants from tools.constants import PROTO_DEMO_NOOPS, PROTO_GENESIS from client.client import Client @pytest.fixture(scope="class") def clients(sandbox): """Launches 3 nodes in sandbox mode (genesis, doesn't activa...
# -*- coding: utf-8 -*- import time import threading import os from FluOpti import pi_pwm #from FluOpti import pi_adc MODE_MANUAL = 1 MODE_AUTO = 2 MODE_DEBUGG = 3 class FluOpti(): _default_modules = { #MODULE #CHANNEL 'LED_1':{ 'chan':0, 'value': 0, 'time':0}, 'LED_2':{ 'chan':1, 'value': 0, 'time...
""" Copyright (c) 2020, VRAI Labs and/or its affiliates. All rights reserved. This software is licensed under the Apache License, Version 2.0 (the "License") as published by the Apache Software Foundation. You may not use this file except in compliance with the License. You may obtain a copy of the License at http://...
import random class Die: def __init__(self, sides=2, value=0): if not sides >= 2: raise ValueError("Must set more than one side.") if not isinstance(sides, int): raise ValueError("Must set a whole number without decimals for number of sides.") self.value = value or ...
import torch from mmdet.core import force_fp32 from mmdet.models.builder import ROI_EXTRACTORS from .base_roi_extractor import BaseRoIExtractor @ROI_EXTRACTORS.register_module() class SingleRoIExtractor(BaseRoIExtractor): """Extract RoI features from a single level feature map. If there are multiple input f...
import configparser import os from compute import Config_ini from train.utils import TrainConfig class StatusUpdateTool(object): @classmethod def clear_config(cls): config_file = os.path.join(os.path.dirname(__file__), 'global.ini') config = configparser.ConfigParser() config.read(con...
# Generated by Django 2.1.5 on 2019-04-26 06:23 from django.db import migrations, models import django_boost.models.fields import django_boost.models.mixins class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Cus...
# -*- coding: utf-8 -*- import tkinter as tk from tkinter import messagebox, filedialog import sys import ctypes import time import os from view import Common from controller import LogController class ShowVersion: def __init__(self): pass def __call__(self): with open(Common.resource_path('...
import sys import time from importlib import import_module from django.apps import apps from django.core.management.base import ( BaseCommand, CommandError, no_translations, ) from django.core.management.sql import ( emit_post_migrate_signal, emit_pre_migrate_signal, ) from django.db import DEFAULT_DB_ALIAS, c...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals # This file is only used if you use `make publish` or # explicitly specify it as your config file. import os import sys sys.path.append(os.curdir) from pelicanconf import * SITEURL = 'http://theperformanceofopensourcesoftware.com...
# Copyright David Abrahams 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ''' >>> from bienstman4_ext import * >>> t1 = T1() >>> e = Expression() >>> e.add(t1) ''' def run(args = None): import sys impor...
#!/usr/bin/env python """ Written by nickcooper-zhangtonghao Github: https://github.com/nickcooper-zhangtonghao Email: nickcooper-zhangtonghao@opencloud.tech Note: Example code For testing purposes only This code has been released under the terms of the Apache-2.0 license http://opensource.org/licenses/Apache-2.0 """ ...
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # 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, m...
"""social_distribution URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name=...
#!/usr/bin/env python from splparser.parsetree import * from splparser.exceptions import SPLSyntaxError from splparser.lexers.auditlexer import tokens start = 'cmdexpr' def p_cmdexpr_audit(p): """cmdexpr : auditcmd""" p[0] = p[1] def p_cmdexpr_audit_debug(p): """auditcmd : AUDIT""" p[0] = ParseTree...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/lib/torch/size.proto """Generated protocol buffer code.""" # third party from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import sy...
#!/usr/bin/env python3 #****************************************************************************** # (C) 2018, Stefan Korner, Austria * # * # The Space Python Library is free software; you can redi...
from .linear_model import LinearRegression from .mlp import MLP
from urllib.parse import urljoin import requests class BaseClient(object): """ Common class for sending request to server """ def __init__(self, *, address, protocol='http', port=80): self.address = address self.protocol = protocol self.port = port self.base_url = f"{p...
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import textwrap # Specifying default mapping for elasticsearch index # Documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html # Setting type to "text" for all fields that would be used in searc...
from pgu import gui _transDct= {'left' : 'button0', 'middle' : 'button1', 'right' : 'button2', 'button0': 'left', 'button1': 'middle', 'button2': 'right', 'button3': 'right', 'button4': 'right', 'button5': 'right', ...
from builtins import range import FWCore.ParameterSet.Config as cms # define binning for efficiency plots # pt import itertools effVsPtBins=list(itertools.chain(range(0, 30, 1), range(30, 50, 2), range(50, 70, 5), range(70, 100, 10), range(100, 200, 2...
#!/usr/bin/env jython # -*- coding: utf-8 -*- from platform import python_implementation if python_implementation() == 'Jython': import import_site_packages from io import open as iopen from sys import argv from nltk.stem.snowball import RussianStemmer from nltk import FreqDist from analysis.corpus_analysis import ...
## @package download # Module caffe2.python.models.download from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import argparse import os import sys import signal import re # Import urllib try: import urllib.error as u...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
""" A line chart showing the sale price per sq. ft. relative to the citywide median, as a function of the distance from """ from .. import datasets as gv_data from ..modeling import get_sale_price_psf_from_homicide from . import default_style, palette, digital_standards import numpy as np from matplotlib import pyplo...
from .FogifySDK import FogifySDK
# -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2013 AKFish <akfish@gmail.com> ...
from flask import Flask from flask_bootstrap import Bootstrap from flask_login import LoginManager from flask_sqlalchemy import SQLAlchemy from flask_uploads import IMAGES, UploadSet, configure_uploads from config import config_options login_manager = LoginManager() login_manager.session_protection = 'strong' login_m...
import os from dash.dependencies import Input, Output, State from dash.exceptions import PreventUpdate import dash_html_components as html import dash_core_components as dcc import dash_daq as daq import dash_bio # running directly with Python if __name__ == '__main__': from utils.app_standalone import run_standa...
import operator import pickle import sys import numpy as np import pytest import scipy.sparse import scipy.stats import sparse from sparse import COO from sparse.utils import assert_eq, random_value_array @pytest.fixture(scope='module', params=['f8', 'f4', 'i8', 'i4']) def random_sparse(request): dtype = reques...
# -*- coding:utf-8 -*- """ The MIT License (MIT) Copyright (c) 2016 Mervin <mofei2816@gmail.com> 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 ...
from flask_restly._storage import push_mapping import wrapt def delete(path, serialize=None): def decorator(func): @wrapt.decorator def wrapper(wrapped, _, args, kwargs): result = wrapped(*args, **kwargs) return ('', 204) if result is None else (result, 200) wrapp...
from django.contrib.auth.models import User, Group from rest_framework import viewsets from quickstart.serializers import UserSerializer, GroupSerializer class UserViewSet(viewsets.ModelViewSet): """ API endpoint that allows users to be viewed or edited. """ queryset = User.objects.all().order_by('-da...
# 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...
import FWCore.ParameterSet.Config as cms process = cms.Process("SKIM") process.configurationMetadata = cms.untracked.PSet( version = cms.untracked.string('$Revision: 1.2 $'), name = cms.untracked.string('$Source: /cvs/CMSSW/CMSSW/DPGAnalysis/Skims/python/MinBiasPDSkim_ONLYHSCP_cfg.py,v $'), annotation = c...
from django.contrib.auth.models import AbstractUser from django.db import models from django.urls import reverse class Location(models.Model): name = models.CharField(max_length=100) is_active = models.BooleanField(default=True) def __str__(self): return self.name class Meta: db_tabl...
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-03-18 13:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('book', '0041_auto_20180318_2117'), ] operations = ...
class FieldWrapperRenderableChildMixin(object): """ Mixin class for renderables that are children of :class:`.FieldWrapper`. """ @property def field_wrapper_renderable(self): return self.properties['field_wrapper_renderable'] class FieldChildMixin(FieldWrapperRenderableChildMixin): """...
from os import getcwd import pytest from click.testing import CliRunner from cicdctl import cli from cicdctl.commands import commands packer_outputs = [(command, '') for command in commands('packer')] @pytest.mark.parametrize('command,output', packer_outputs) def test_command(runner, command, output): result =...
# 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...
""" Demonstration of Tube """ import sys from vispy import scene from vispy.geometry.torusknot import TorusKnot from colorsys import hsv_to_rgb import numpy as np canvas = scene.SceneCanvas(keys='interactive') view = canvas.central_widget.add_view() points1 = TorusKnot(5, 3).first_component[:-1] points1[:, 0] -= 20...
# -*- coding: utf-8 -*- # Copyright (c) 2018-2021, earthobservations developers. # Distributed under the MIT License. See LICENSE for more info. from datetime import datetime import numpy as np import pandas as pd import pytest import pytz from pandas._libs.tslibs.timestamps import Timestamp from pandas._testing impor...
import configparser from discord.ext import commands import os from src.Cleanup import Cleanup from src.Commands import Commands from src.PostsStream import PostsStream from src.ReportsStream import ReportsStream class Bot: def __init__(self): config = configparser.ConfigParser() config.read(os.en...
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton yes_no_choice_kb = InlineKeyboardMarkup() yes_no_choice_kb.add( InlineKeyboardButton(text='давай включим и погоду!', callback_data='weather_add'), InlineKeyboardButton(text='не, пока не надо', callback_data='cancel') )
import elist.elist as elel import estring.estring as eses import numpy as np from sldghmmr4nut.lines import fmt def txt2ndarr(s,**kwargs): if('line_sp' in kwargs): line_sp = kwargs['line_sp'] else: line_sp = fmt.LINE_SP if('null' in kwargs): null = kwargs['line_sp'] else: ...
from django.shortcuts import render from django.http import HttpResponse, JsonResponse from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator import os, requests, uuid, json import pandas as pd import numpy as np from io import BytesIO,StringIO import xlsxwriter i...
import pstats import sys stats = pstats.Stats(sys.argv[1]) #s=stats.strip_dirs() s=stats s=s.sort_stats('time') s.print_stats(0.03)
# Copyright 2015 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. import unittest import mock from dashboard.services import gerrit_service from dashboard.services import gitiles_service class GitilesTest(unittest.TestC...
import time from rpi_ws281x import ws, Color, Adafruit_NeoPixel led_count = 30 # Per strip fps = 60 freq = 800000 # LED strip configuration: LED_1_COUNT = led_count * 8 # Number of LED pixels. LED_1_PIN = 12 # GPIO pin connected to the pixels LED_1_FREQ_HZ = freq # LED signal frequency in hertz LED_1...
"""Implementation of connector from Composite Structures and Components. Only assembly connector (see chapter Components in UML specification) is supported at the moment. The implementation is based on `ConnectorItem` class and `InterfaceItem` class in assembly connector mode. Assembly Connector ================== To...
# -*- coding: utf-8 -*- # @Author: Anderson # @Date: 2018-09-01 22:04:38 # @Last Modified by: Anderson # @Last Modified time: 2019-03-10 23:46:10 class Node: def __init__(self, data, par=None): # print ("Node __init__: " + str(data)) self.data = list([data]) self.parent = par sel...
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
# 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...
# Copyright (c) 2016 Mirantis, Inc. # 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 requir...
# coding=utf-8 # Copyright 2022 The Fiddle-Config 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...
import numpy as np import random import os import time import importlib import cv2 from PIL import Image import math import pickle import torch from torch import distributed as dist from torch.utils.data.sampler import Sampler def load_module(module_type, module_name): m = importlib.import_module(f'{module_typ...
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
# -*- coding: utf-8 -*- # Copyright 2021 Cohesity Inc. class UdaSourceCapabilities(object): """Implementation of the 'UdaSourceCapabilities' model. Attributes: auto_log_backup (bool): TODO: Type description here. full_backup (bool): TODO: Type description here. incr_backup (bool): TO...