text
stringlengths
2
999k
# coding=utf-8 # # This file is part of Hypothesis, which may be found at # https://github.com/HypothesisWorks/hypothesis-python # # Most of this work is copyright (C) 2013-2018 David R. MacIver # (david@drmaciver.com), but it contains contributions by others. See # CONTRIBUTING.rst for a full list of people who may ho...
#! /usr/bin/env python """ Functions for IO, mostly wrapped around GDAL Note: This was all written before RasterIO existed, which might be a better choice. """ import os import subprocess import numpy as np from osgeo import gdal, gdal_array, osr #Define drivers mem_drv = gdal.GetDriverByName('MEM') gtif_drv = gda...
# check if the list contains 1 or more nodes def getLink(head): temp = head while temp is not None and temp.next is not None: temp = temp.next return temp #initialize the pivot ,newHead and newLink to the partition function def quickSortRec(head, link): if head is None or head == link: ...
"""Support for Hass.io.""" from datetime import timedelta import logging import os import voluptuous as vol from homeassistant.auth.const import GROUP_ID_ADMIN from homeassistant.components.homeassistant import SERVICE_CHECK_CONFIG import homeassistant.config as conf_util from homeassistant.const import ( ATTR_NA...
# coding: utf-8 """ Gate API v4 Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501 Contact: support@mail.gate.io Gen...
def spam(): pass # Unicode test: Ã after. def eggs(): pass
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
import os from PIL import Image import numpy as np def get_files(folder, name_filter=None, extension_filter=None): """Helper function that returns the list of files in a specified folder with a specified extension. Keyword arguments: - folder (``string``): The path to a folder. - name_filter (```...
# -*- coding: utf-8 -*- __author__ = 'pengg' from datetime import date from tqsdk import TqApi, TqAuth, TqReplay ''' 复盘模式示例: 指定日期行情完全复盘 复盘 2020-05-26 行情 ''' # 在创建 api 实例时传入 TqReplay 就会进入复盘模式 api = TqApi(backtest=TqReplay(date(2020, 10, 15)), auth=TqAuth("aimoons", "112411")) quote = api.get_quote("SHFE.cu2101") whi...
#!/usr/bin/env python import ast import re from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('pipeline_live/_version.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) with open('README.md') as ...
import pytest from dolib.client import AsyncClient, Client from dolib.models import Domain @pytest.mark.vcr @pytest.mark.block_network() def test_crud_domains(client: Client) -> None: domain = Domain(name="test.dolib.io") # create domain created_domain = client.domains.create(domain=domain) assert c...
import logging from django.db import transaction from wagtail.wagtailcore.models import Page, Site from v1.models import BrowsePage, LandingPage, SublandingPage from v1.tests.wagtail_pages.helpers import save_new_page logger = logging.getLogger(__name__) @transaction.atomic def run(): default_site = Site.obj...
"""Defines a Request Forward Message.""" # System imports from enum import IntEnum # Local source tree imports from pyof.foundation.base import GenericMessage from pyof.v0x05.common.header import Header,Type # Enums class RequestForwardReason(IntEnum): """ Request Forward Reason """ #: Forward Group...
#!/usr/bin/python3 import json,datetime,time,argparse,logging,sys,os sys.path.append(os.path.join(os.path.dirname(__file__), "libs")) from boto3.dynamodb.conditions import Attr import general_storage,sqs,utils,query,general_storage_mysql from progress.bar import Bar from pprint import pprint class Normalizer(): ## ...
""" Png to Ico """ import toga from toga.style import Pack from toga.style.pack import COLUMN, ROW from PIL import Image import random import os class Png2Ico(toga.App): def startup(self): self.msg = '请开始操作' main_box = toga.Box(style=Pack(direction=COLUMN)) img_path_box = toga.Box(style=P...
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.DYU/Sun-ExtA_16/udhr_Latn.DYU_Sun-ExtA_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('contenttypes', '0001_initial'), ] operations = [ migrations.Cre...
from __future__ import print_function from __future__ import absolute_import from __future__ import division from copy import deepcopy from compas.geometry import cross_vectors from compas.geometry import length_vector from compas.geometry import centroid_points from compas.geometry import norm_vector from compas_tn...
from .builder import build_dataset from .cityscapes import CityscapesDataset from .coco import CocoDataset from .custom import CustomDataset from .dataset_wrappers import ConcatDataset, RepeatDataset from .loader import DistributedGroupSampler, GroupSampler, build_dataloader from .registry import DATASETS from .voc imp...
from anuvaad_auditor.loghandler import log_info, log_exception from utilities import MODULE_CONTEXT def logs_book(entity,value,message): ''' Captures specific entity to keep track of logs at various level ''' try: log_info("{} || {} || {}".format(entity,value,message),MODULE_CONTEXT) except Exception a...
#!/usr/bin/python """ (C) Copyright 2020 Intel Corporation. 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...
#!python import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) import util def test_delete(): util.copy_file('a.txt', 'a.txt.bak') util.copy_dir('d1', 'd1_bak') util.delete('a.txt') util.delete('d1', force=True) return 'delete OK' def main(): s = test_delete() util.sen...
# coding: utf-8 import pprint import re import six class VersionMediatypes: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and the value ...
#!/usr/bin/env python3 """ Chain models. Masking. Show output of layer. """ import numpy as np from tensorflow.keras import Input from tensorflow.keras.layers import Masking, Dense from tensorflow.keras.regularizers import l2 from tensorflow.keras.models import Sequential, Model X_train = np.random.rand(4,3,2) Den...
""" Calculate coverage statistics, cf. https://github.com/lexibank/abvdoceanic/issues/3 """ from pathlib import Path from cltoolkit import Wordlist from pycldf import Dataset from pyclts import CLTS from tabulate import tabulate from cldfbench.cli_util import with_dataset, get_dataset def run(args): path = (Path...
import hail as hl from hail.typecheck import typecheck from hail.expr.expressions import expr_call, expr_numeric, expr_array, \ check_entry_indexed, check_row_indexed @typecheck(call_expr=expr_call, loadings_expr=expr_array(expr_numeric), af_expr=expr_numeric) def pc_project(call_expr, loadi...
""" This demo shows how to use the `experiment` package to log both to `Visdom` and `mlflow`. """ from experiment import MLflowExperiment from experiment import VisdomExperiment from experiment.visdom import create_parameters_windows, Line, Window import logging import mlflow from traitlets import Enum, Float, Int, Uni...
from typing import Any, Union, Callable import biorbd_casadi as biorbd from casadi import horzcat, vertcat, Function, MX, SX import numpy as np from .penalty_node import PenaltyNodeList from ..misc.enums import Node, PlotType, ControlType, ConstraintType, IntegralApproximation from ..misc.mapping import Mapping, BiMa...
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -* # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License from __future__ import absolute_import, division, print_function import argparse import os.path as op from pyuvdata import UVData parser = argparse.ArgumentParser(...
import torch from torch.utils.data import DataLoader, Dataset from tqdm import tqdm class Simple_Trans(Dataset): def __init__(self, data, transform=None): # [reps, labels] self.reps = data[0] self.labels = data[1] # print(self.reps.shape, self.labels.shape) # torch.Size([60...
# Import libraries from arcgis import gis import logging import json #carole was here again #Kerry test secrets = r"H:\secrets\maphub_config.json" # this is one method to def readConfig(configFile): # returns list of parameters # with key 'name' """ reads the config file to dictionary """ log...
from datetime import datetime from datetime import date date_format = "%m/%d/%Y" def comparedate(start,end,now): a = datetime.strptime(start, date_format) b = datetime.strptime(now, date_format) c = datetime.strptime(end, date_format) delta1 = b - a delta2 = c - b delta3 = a - a days=c-a ...
from factory import vectorizer_factory from sklearn.base import TransformerMixin from sklearn.pipeline import make_pipeline from lime.lime_text import LimeTextExplainer class VectorTransformer(TransformerMixin): def __init__(self, vectorizer_name): self.vectorizer_name = vectorizer_name def fit(self,...
from fsapi import FSAPI URL = 'http://192.168.1.39:80/device' PIN = 1234 TIMEOUT = 1 # in seconds fs = FSAPI(URL, PIN, TIMEOUT) print('Name: %s' % fs.friendly_name) print('Mute: %s' % fs.mute) print('Mode: %s' % fs.mode) print('Modes: %s' % fs.modes) print('Power: %s' % fs.power) print('Volume steps: %s' % fs.volume_...
# Generated by Django 2.2.16 on 2020-10-27 09:10 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('organizations', '0017_add_organizationaltname'), ('scheduler', '0003_harvest'), ] operations = [ m...
import os import sys import subprocess from contextlib import contextmanager import argparse import glob ENV_ROOT = 'test_ambertools' AMBER_VERSION = 'amber17' def is_conda_package(package_dir): basename = os.path.basename(package_dir) return not (basename.startswith('osx') or basename.startswith('linux')) ...
# -*- coding: utf-8 -*- import datetime as dt from flask import json, render_template from inspectors.database import ( Column, db, Model, ReferenceCol, relationship, SurrogatePK, ) REPR_DATE_FMT = "%Y/%m/%d" class Supervisor(Model): """A person who supervises building inspectors""" ...
# coding: utf-8 # pynput # Copyright (C) 2015-2017 Moses Palmér # # This program 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 3 of the License, or (at your option) any # later version....
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the following...
from django.urls import re_path from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from django.contrib.auth import views as auth_views from django.views.generic.base import TemplateView from eTone import views as eTone_views urlpatterns = [ re_path(r'^admin...
from __future__ import division, absolute_import, print_function import copy import pickle import sys import platform import gc import warnings import tempfile from os import path from io import BytesIO from itertools import chain import numpy as np from numpy.testing import ( run_module_suite,...
#!/usr/bin/env python # Copyright 2018 Google 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 required...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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...
""" main page """ #import os #os.chdir("C:/Users/Mostafa/Desktop/My Files/thesis/My Thesis/Data_and_Models/Interface/Distributed_Hydrological_model") import sys sys.path.append("HBV_distributed/function") #%% Library import numpy as np import pandas as pd import time import datetime as dt #import gdal from math import ...
from management.config import config_api_setup from management.database import Database class Price_Policies: """price_policies class model.""" def __init__(self): config, config_file = config_api_setup() config.read(config_file) self.db = Database( connector=config['datab...
## @ ifwi_utility.py # # copyright (c) 2019, intel corporation. all rights reserved.<BR> # SPDX-license-identifier: BSD-2-clause-patent # ## import sys import os import argparse from ctypes import Structure, c_char, c_uint32, c_uint8, c_uint64, c_uint16, sizeof, ARRAY sys.dont_write_bytecode = True from ...
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
import inspect import typing from abc import ABC import builtins def get_builtins(): return list(filter(lambda x: not x.startswith('_'), dir(builtins))) class ITypeChecker(ABC): def is_class(self, obj): if inspect.isclass(obj) and not self.is_primitive(obj): return True return Fals...
import torchbearer from torchbearer.callbacks import Callback import torch class WeightDecay(Callback): """Create a WeightDecay callback which uses the given norm on the given parameters and with the given decay rate. If params is None (default) then the parameters will be retrieved from the model. Exa...
""" This module implements the Rubik's Cube formulae. You can deal with Rubik's Cube formulae easily with Step and Formula. Usage: >>> a = Formula("R U R' U'") >>> a R U R' U' >>> a.reverse() >>> a U R U' R' >>> a.mirror() >>> a U' L' U L >>> a *= 3 >>> a U' L' U L U...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative t...
# 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 ...
# -*- coding: utf-8 -*- """ models.py Provides the various model wrapper objects for scrapbook """ from __future__ import unicode_literals import os import copy import nbformat import collections import pandas as pd from six import string_types from collections import OrderedDict from IPython.display import display a...
import os basedir = os.path.abspath(os.path.dirname(__file__)) imagesdir = os.path.join(os.path.dirname(basedir),'uploads') """Constants used throughout the application. All hard coded settings/data that are not actual/official configuration options for Flask and their extensions goes here. """ class Confi...
# coding: utf-8 from __future__ import unicode_literals import itertools import re from .common import ( InfoExtractor, SearchInfoExtractor ) from ..compat import ( compat_HTTPError, compat_kwargs, compat_str, compat_urlparse, ) from ..utils import ( error_to_compat_str, ExtractorError...
"""Vizio SmartCast API commands and class for device inputs.""" from typing import Any, Dict, List, Optional from pyvizio.api._protocol import ResponseKey from pyvizio.api.item import Item, ItemCommandBase, ItemInfoCommandBase from pyvizio.helpers import dict_get_case_insensitive class InputItem(Item): """Input...
# -*- coding: utf-8 -*- """ @author: abhilash """ import numpy as np import cv2 #get the webcam video stream file_video_stream = cv2.VideoCapture('images/testing/video_sample2.mp4') #create a while loop while (file_video_stream.isOpened): #get the current frame from video stream ret,current_frame = file_v...
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, ...
import numpy as np import datetime as dt import pandas as pd import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func, inspect from flask import Flask, jsonify ################################################# # Database Setup ##...
# from urllib import urlopen import random # got the list from here, no point grabbing it each time though... # webpage = urlopen('http://dictionary-thesaurus.com/wordlists/Nouns%285,449%29.txt').read() # word_list = webpage.splitlines() word_list = ['abbreviation', 'abbreviations', 'abettor', 'abettors', 'abilities...
#!/usr/bin/python3 # Copyright 2021 FBK # 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 w...
from {{ cookiecutter.project_name_snake_case }} import {{ cookiecutter.project_name_snake_case }} def test_add_integration(): res = {{ cookiecutter.project_name_snake_case }}.add(2, 3) assert res == 5
# -*- coding: utf-8 -*- from tespy.networks import Network from tespy.components import ( Sink, Source, Splitter, Compressor, Condenser, Pump, HeatExchangerSimple, Valve, Drum, HeatExchanger, CycleCloser ) from tespy.connections import Connection, Ref from tespy.tools.characteristics import CharLine from tespy....
#!/usr/bin/env python from __future__ import absolute_import, print_function import sys import pytest class Collector(object): RUN_INDIVIDUALLY = ['tests/test_pex.py'] def __init__(self): self._collected = set() def iter_collected(self): for collected in sorted(self._collected): yield collect...
from django.http import HttpResponse def index(request): return HttpResponse("<h1> This is the music app homepage </h1>")
# -*- coding: utf-8 -*- from keras_bert import Tokenizer class TokenizerReturningSpace(Tokenizer): """ """ def _tokenize(self, text): R = [] for c in text: if c in self._token_dict: R.append(c) elif self._is_space(c): R.append('[un...
#!/usr/bin/env python3 import json from app.lib.utils.request import request from app.lib.utils.common import get_useragent class CVE_2017_8046_BaseVerify: def __init__(self, url): self.info = { 'name': 'CVE-2017-8046漏洞', 'description': 'CVE-2017-8046漏洞可执行任意命令,执行的命令:/usr/bin/touch ...
""" This script is used to generate simulated count data based on a Mantid script. """ import os import numpy def VariableStatsData(N, A0, omega, phi, sigma, bg): x = numpy.linspace(start=0.0, stop=32.0, num=2001) y = (1+A0*numpy.cos(omega*x+phi)*numpy.exp(-(sigma*x)**2)) * \ numpy.exp(-x/2.197)+bg ...
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- # pylint: d...
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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/lice...
from precisely import all_of, assert_that, contains_exactly, equal_to, has_attrs, has_feature, is_instance import graphlayer as g from graphlayer import graphql from graphql import GraphQLError def test_execute(): Root = g.ObjectType("Root", fields=( g.field("value", g.String), )) root_resolver ...
import pytest from IPython.testing.globalipapp import start_ipython @pytest.fixture(scope="session") def session_ip(): return start_ipython() @pytest.fixture(scope="function") def ip(session_ip): session_ip.run_line_magic(magic_name="load_ext", line="jupyter_spaces") yield session_ip session_ip.run_...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
import threading import binascii from time import sleep from utils import * ############################################################################ import base64 import io from PIL import Image def img_to_txt(filename): msg = b"<plain_txt_msg:img>" with open(filename, "rb") as ima...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup( name='meta-scraper', version='0.0.1', description='Facebook (Meta) Scraper', long_description=readme(), classifiers = ['Programming Language :: Python', 'License :: OSI...
import numpy as np import numba import umap.distances as dist from umap.utils import tau_rand_int @numba.njit() def clip(val): """Standard clamping of a value into a fixed range (in this case -4.0 to 4.0) Parameters ---------- val: float The value to be clamped. Returns ------- ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from .utils import Asn1ToolsBaseTest import asn1tools import sys from copy import deepcopy sys.path.append('tests/files') sys.path.append('tests/files/3gpp') sys.path.append('tests/files/oma') from rrc_8_6_0 import EXPECTED as RRC_8_6_0 from s1ap_14_4_0 i...
import abc import typing import sqlalchemy.orm import mlrun.api.db.session import mlrun.api.schemas import mlrun.utils.singleton from mlrun.utils import logger class Member(abc.ABC): @abc.abstractmethod def initialize(self): pass @abc.abstractmethod def shutdown(self): pass def...
import os import sys sys.path.insert(0, os.path.abspath('../..')) from algolib.disjoint_set import DisjointSet
# Copyright 2020 Google LLC 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 ag...
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. class ColorSpace: """ A color space is the state of an image in terms of colorimetry and color encoding. I.e., it defines how an image's color information needs to be interpreted. Transforming images b...
# -*- coding: utf-8 -*- import bisect from cms.models import Title, Page, EmptyTitle from cms.utils import get_language_list from cms.utils.compat import DJANGO_1_5 from cms.utils.conf import get_cms_setting from cms.utils.permissions import get_user_sites_queryset from django.contrib.admin.views.main import ChangeList...
from typing import Callable, List, Dict, Union import atexit from collections.abc import Sequence from copy import deepcopy import os from PIL import Image from fastapi import FastAPI, UploadFile, File, Request from fastapi.templating import Jinja2Templates from pydantic import BaseModel from datetime import datetime ...
# Unsure majority of time but more correct then wrong when thinking of # Requires more data for training from data import * from tkinter import * from keras.models import load_model import numpy as np import threading import time # Time variables start_wait = 10000 wait = 2100 # Set dimensions w = 900 h = 556 root =...
import json from Function.Symbol_ReplaceController import * from Function.Position_strController import * from Function.initdate_ReplaceController import * from Function.Date_ReplaceController import * from JsonReplace import JsonReplace def get_new_json(file_path): # 打开json文件 file = open(file_path, encoding='...
""" Documents Distributor - CallStreet Events CallStreet Events contains all the Documents Distributor APIs that provide events data such as Events Audio and Near Real-Time Transcripts The Events Audio API provides access to all audio recordings to various company events covered by FactSet. The events includ...
from dowel import logger import numpy as np from garage.sampler.utils import truncate_paths from tests.fixtures.logger import NullOutput class TestSampler: def setup_method(self): logger.add_output(NullOutput()) def teardown_method(self): logger.remove_all() def test_truncate_paths(se...
import flask import itertools from . import tag_validation from .entities import Entity, entities_blueprint from ..api import AlmacenAPI, api from datetime import datetime from data_layer import Redshift as SQL from typing import List, Dict, Optional from subir import Tagger time_format = '%Y-%m-%d %H:%M:%S' tags_blu...
#! /usr/bin/python """ boilerplate_sparkbot This is a sample boilerplate application that provides the framework to quickly build and deploy an interactive Spark Bot. There are different strategies for building a Spark Bot. You can either create a new dedicated Spark Account for the bot, or creat...
# /////////////////////////////////////////////////////////////// # # BY: WANDERSON M.PIMENTA # PROJECT MADE WITH: Qt Designer and PySide6 # V: 1.0.0 # # This project can be used freely for all uses, as long as they maintain the # respective credits only in the Python scripts, any information in the visual # interface ...
# ============ FIRST ALGORITHM ============ class Circles(object): test_img = "cargo1.jpeg" rescale_size = 0.4 circles_dp = 2.2 circles_minDist = 180 circles_param1 = 75 circles_param2 = 90 circles_minRadius = 10 circles_maxRadius = 500 circle_color = (150, 55, 0) rect...
import cryptops class Crypto: def __init__(self, key): self.key = key def apply(self, msg, func): return func(self.key, msg) crp=Crypto('secretkey') encrypted=crp.apply('hello world', cryptops.encrypt) decrypted=crp.apply(encrypted, cryptops.decrypt)
import os import wx import wx.aui import time import pcbnew import textwrap import threading import subprocess import configparser import re # Remove java offending characters def search_n_strip(s): s = re.sub('[Ωµ]', '', s) return s # # FreeRouting round trip invocation: # * export board.dsn file from pcbnew...
from rest_framework.viewsets import ModelViewSet from rest_framework.generics import ( ListAPIView, CreateAPIView, UpdateAPIView, DestroyAPIView, ) from .models import Team from .serializers import TeamSerializer from utils.pagination import PaginationPageNumberPagination class TeamListAPIView(ListA...
/home/runner/.cache/pip/pool/b7/df/1e/7980259571f5a43b5ac0c36215dfc4b1485986d14af13b40a821ae930f
import pybullet as p from pyrosim.nndf import NNDF from pyrosim.linksdf import LINK_SDF from pyrosim.linkurdf import LINK_URDF from pyrosim.model import MODEL from pyrosim.sdf import SDF from pyrosim.urdf import URDF from pyrosim.joint import JOINT SDF_FILETYPE = 0 URDF_FILETYPE = 1 NNDF_FILETYPE = 2 ...
from synergine.lib.process.processmanager import KeepedAliveProcessManager from synergine.core.cycle.PipePackage import PipePackage from synergine.core.simulation.EventManager import EventManager from synergine.core.Signals import Signals from synergine.synergy.event.exception.ActionAborted import ActionAborted class...
import numpy as np from numpy.testing import (assert_allclose, assert_equal, assert_almost_equal, assert_array_equal, assert_array_almost_equal) from scipy.ndimage import convolve1d from scipy.signal import savgol_coeffs, savgol_filter from scipy.signal._savitzky_...
import unittest2 from lldbsuite.test.decorators import * from lldbsuite.test.concurrent_base import ConcurrentEventsBase from lldbsuite.test.lldbtest import TestBase @skipIfWindows class ConcurrentCrashWithSignal(ConcurrentEventsBase): mydir = ConcurrentEventsBase.compute_mydir(__file__) # Atomic sequence...