content
stringlengths
5
1.05M
import psiturk.experiment_server as exp exp.launch()
DATE_PATTERN = r'%d/%m/%Y' DOUBT_NOTATION_PATTERN = r'(\(\?\))' SPEECH_SPEAKER_PATTERN = ( r'''((?:\(NÃO IDENTIFICADO\))|(?:\(Não identificado\))|(?:(?:[AO]\s(?:(?''' r''':SR\.?A?\.?\s)|(?:DR\.?A?\.?\s)|(?:SR\.?A?\.?\sDR\.?A?\.?\s)))(?:(?:''' r'''[A-ZA-Ú´'\-\s\|\\\)]+(?:J[rR]\.)?(?:\(\?\)[A-ZA-Ú´'\-\s\|\\...
import subprocess import os,sys import matplotlib.pyplot as plt max = 0 Task1 = [] Task2 = [] Task3 = [] Task4 = [] for i in range(1,int(sys.argv[2])+1): filename= "Task"+str(i)+"_"+sys.argv[1]+"/logs" grep = subprocess.Popen( ["grep", "Validation accuracy" ,filename], stdout=subprocess.PIPE, ) awk = ...
from typing import Any, Optional, Tuple, List, Set, Dict from sts_inquiry import app, cache from sts_inquiry.forms import SearchForm _ROWS_PER_PAGE = app.config["ROWS_PER_PAGE"] _PER_INST_COL_NAMES = ["instance", "nghbr_occupants", "region_occupants"] def search(form: SearchForm, page: int, highlight_cluster_aids: ...
# -*- coding: utf-8 -*- """ Created on Fri Feb 22 14:39:58 2019 @author: bjwil """ import itertools fin = open('dataset_203_7.txt', 'r') fout=open('genome1.txt', 'w') for line in fin.readlines(): n = line lst = list(itertools.product([0, 1], repeat=n)) new_lst = [''.join(str(i) for i in entry) for entry in lst...
from django.shortcuts import render def connectionView(request): return render(request, 'connections/main.html')
# Copyright 2020-2022 OpenDR European 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 required by applicable law or agree...
# -*- coding: utf-8 -*- # # Copyright 2020 Data61, CSIRO # # 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...
from __future__ import annotations import itertools import numpy from typing import Sequence, Iterator, Tuple, Union, cast, Iterable, Optional from .minecraft_types import Point class SubSelectionBox: """ A SubSelectionBox is a box that can represent the entirety of a Selection or just a subsection of ...
import os import tensorflow as tf os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' with tf.Session() as sess: print("Hello World!")
import sys, os currentdir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(currentdir) from CTD_Composition import CTD_Composition from CTD_Distribution import CTD_Distribution from CTD_Transition import CTD_Transition from PreprocessUtils import LDEncode10 from PreprocessUtils import STDecode ...
from usuarios import * def buscar_usuario(conexao, sql, usuario): procurar = input('Digite o ID do usuario a pesquisar: ') c = conexao.cursor() c.execute(sql) resultado = c.fetchall() identificado = False for i, l, s, n, e, p in resultado: if str(i) == procurar and usuario.nomeclass ==...
import numpy as np from .utils import average_path_length from .calc_mean_paths import calc_mean_paths # noqa class ForestEvaluator: selector_dtype = np.dtype([('feature', np.int32), ('left', np.int32), ('value', np.double), ('right', np.int32)]) def __init__(self, samples, selectors, indices): """ ...
""" Initializes directory for Flask app """ from .app import create_app APP = create_app()
"""Module managing starting and stopping the application """ from julesTk import ThreadSafeObject import sys if sys.version_info[0] < 3: import Tkinter as tk else: import tkinter as tk __author__ = "Joeri Jongbloets <joeri@jongbloets.net>" class Application(ThreadSafeObject): """Manage the application ...
from django.conf.urls import include, url from rest_framework.routers import DefaultRouter from . import views router = DefaultRouter() router.register(r"trades", views.TradeViewSet) urlpatterns = [ url(r"^", include(router.urls)) ]
message = "Python \"Programming" print(message) # #==>Comments # \" # \'==>For Using Quotes in String # \\==>For Using Backslash in string # \n==>New Line # """==>Multiline Strings
DESCRIPTION = "It's paddy, not patty" def autocomplete(shell, line, text, state): return None def help(shell): pass def execute(shell, cmd): print(open("data/shamrock.txt", "rb").read().decode("unicode_escape"))
# # PySNMP MIB module ECHN-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ECHN-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:59:13 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:1...
from django.test import Client, TestCase from django.urls import reverse, resolve from .models import Review class ReviewTests(TestCase): def setUp(self): pass def test_book_listing(self): pass def test_book_list_view(self): pass def test_book_detail_view(self): pas...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function from astropy.io import fits import numpy as np import glob def main(): root_dir = "/Users/jonatanselsing/Work/work_rawDATA/Crab_Pulsar/" arms = ["UVB"] # ["UVB", "VIS", "NIR"] # OBs = ["OB1", "OB2", "OB3", "...
from rest_framework import status from .base_test import BaseTest from rest_framework.response import Response import mock from .data import Data class SocialLoginTest(BaseTest): """ Test suite for the social login """ def setUp(self): """ Define the test client and required test variables. ""...
""" antlr_grammar.py Created on 4 sept. 2010 @author: luca Submitted by Luca DallOlio, September, 2010 (Minor updates by Paul McGuire, June, 2012) (Code idiom updates by Paul McGuire, April, 2019) """ from mo_parsing import ( Word, ZeroOrMore, printables, Suppress, OneOrMore, Group, LineE...
#!/usr/bin/env python # -*- coding: utf-8 -*- from db.common import Base from db.common import session_scope class SpecificEvent(): @classmethod def find_by_event_id(self, event_id): # retrieving table name for specific event table_name = self.__tablename__ # finding class associate...
from OOP_exam_15_08_21.project.baked_food.baked_food import BakedFood from OOP_exam_15_08_21.project.bakery import Bakery bakery = Bakery("Gusto") print(bakery.add_food("Bread", "Baguette", 15)) print(bakery.add_food(" ", "Bague", 15)) print(bakery.add_food("Cake", "Garaj", 10)) print(bakery.add_food("Cake", "Garaj"...
# Generated by Django 3.2.5 on 2021-08-11 05:23 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0015_alter_profile_osu_id'), ] operations = [ migrations.AlterField( model_name='profile', name='discord', ...
# Created byMartin.cz # Copyright (c) Martin Strohalm. All rights reserved. import pero import numpy # init size width = 400 height = 300 padding = 50 # init data x_data = numpy.linspace(-numpy.pi, numpy.pi, 50) y_data = numpy.sin(x_data) # init scales x_scale = pero.LinScale( in_range = (min...
from typing import DefaultDict from patient_abm import PATIENT_ABM_DIR from patient_abm.agent.environment import EnvironmentAgent from patient_abm.agent.patient import PatientAgent from patient_abm.utils import string_to_datetime TEST_DATA_DIR = PATIENT_ABM_DIR / "tests" / "data" def test_initialise_environment_age...
import io2 import pandas as pd import itertools as itl import numpy as np from lmfit import minimize, Parameters from scipy.optimize import curve_fit from aqml.cheminfo.core import * import scipy.spatial.distance as ssd import aqml.cheminfo.molecule.core as cmc import numpy as np T, F = True, False def initb(_mo...
from pyreeEngine.textures import Texture from viddecoder.viddecoder import VidDecoder from pathlib import Path from OpenGL.GL import * import numpy as np class VideoTexture(Texture): def __init__(self, path: Path): super(VideoTexture, self).__init__() self.decoder = VidDecoder(path) if...
"""Helper module for validating required function parameters. 05.16.2017 tps Created. Python 2.7. """ ######## Custom Validation Exceptions ########## class MissingParameterException(Exception): pass class ParameterTypeException(Exception): pass ######## Validation Functions ########## def validate(parame...
from .blueprint import coordinator_api # Make sure views are registered from . import compilation from . import coordinator from . import matchmaking from . import storage
import sys import pytest import smartsim from smartsim import Experiment, status from smartsim._core.utils import installed_redisai_backends from smartsim.error.errors import SSUnsupportedError should_run = True try: import tensorflow.keras as keras from tensorflow.keras.layers import Conv2D, Input except I...
#!/usr/bin/env python3 import asyncio, aiofiles, pathlib, aiohttp import re, json, traceback import random ids_map = { "⿰": {"k": 's', "n": 2}, "⿱": {"k": 'd', "n": 2}, "⿲": {"k": 't', "n": 3}, "⿳": {"k": 'y', "n": 3}, "⿴": {"k": 'q', "n": 2}, "⿵": {"k": 'w', "n": 2}, "⿶": {"k": 'e', "n": ...
# # Copyright (c) SAS Institute 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 applicable law or agreed to in w...
import random n = 0 mas = [] # массив целых чисел для отгадывания for i in range(50): randomNumber = random.randint(0, 100) mas.append(randomNumber) print(mas)
# coding: utf-8 """ TileDB Storage Platform API TileDB Storage Platform REST API # noqa: E501 The version of the OpenAPI document: 2.2.19 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import tiledb.cloud.rest_api from tiledb.cloud.rest_ap...
# -*- coding: utf-8 -*- import ast import os import re from setuptools import find_packages, setup setup( name='hailstorms', version='1.0.5', description="Distributed load testing framework", long_description="""Hailstorm is a simplified config based, distributed load testing framework""", classif...
import time from django.contrib.auth.models import User from django.contrib.staticfiles.testing import StaticLiveServerTestCase from selenium import webdriver from seleniumlogin import force_login from ..models import NewsPost class Test_Functionnal_App_Main_News(StaticLiveServerTestCase): """Test for read a ne...
# coding: utf-8 # # Pipeline processing using Dask import os import sys from data_models.parameters import arl_path results_dir = arl_path('test_results') dask_dir = arl_path('test_results/dask-work-space') from data_models.polarisation import PolarisationFrame from data_models.data_model_helpers import import_blo...
import salt.modules.virt as virt from salt._compat import ElementTree as ET from tests.support.mock import MagicMock, patch from .test_helpers import append_to_XMLDesc def test_update_xen_disk_volumes(make_mock_vm, make_mock_storage_pool): xml_def = """ <domain type='xen'> <name>my_vm</name> ...
#!/usr/bin/env python # coding: utf-8 import os import shutil import tempfile import unittest from mkdocs import config from mkdocs.compat import PY2, zip from mkdocs.exceptions import ConfigurationError from mkdocs.tests.base import dedent def ensure_utf(string): return string.encode('utf-8') if PY2 else strin...
#!/usr/bin/env python3 # Copyright (c) 2020 Xiaomi Corporation (authors: Daniel Povey, Haowen Qiu) # 2021 Johns Hopkins University (author: Desh Raj) # Apache 2.0 import logging import math import numpy as np import os import sys import torch import torch.optim as optim from datetime import datetime...
import gzip import json inputs = ['postseason.gz', 'season.gz'] for gz_file in inputs: with gzip.open(gz_file, 'r') as fin: json_bytes = fin.read() json_str = json_bytes.decode('utf-8') data = json.loads(json_str)
def main(request, response): headers = [("Content-Type", "text/javascript")] body = "test2_token = \"script executed\";" return 200, headers, body
from dataclasses import dataclass from random import random, choice from .. import database as db @dataclass class Location: longitude: float latitude: float def random_location() -> Location: """Returns random location (lon, lat) while prioritizing (95% chance) areas with a lot of objects to export.""...
""" Format hypoDD output: hyp to csv """ from obspy import UTCDateTime import config # read fpha with evid def read_pha(fpha): evid = 0 pha_dict = {} f=open(fpha); lines=f.readlines(); f.close() for line in lines: codes = line.split(',') if len(codes)==5: evid += 1 ...
#!/usr/bin/python3 # Copyright David Miller. Used under the MIT License. import igraph # load data into a graph g = igraph.Graph.Read_Ncol('net.txt', names=True, weights=True) for v in g.vs: v['size'] = 35 v['label'] = v['name'] if v['name'] in ['age','clF','clN','pNS','pES','dsF','dsN','Hgr','dFB','dBB']: v['c...
"""Abstraction for health check target, to be reconstructed from Avro messages polled from Kafka topic. SQL query template is defined here to be used for persisting the instances in a PostgreSQL database. url (str): URL to send a GET request to. needle (str): Unparsed regex pattern to search for in the HTML content re...
from src.db_languageListener import db_languageListener from antlr4 import * from antlr4.error.ErrorListener import ErrorListener from antlr4.tree.Trees import Trees from .db_languageLexer import db_languageLexer from .db_languageParser import db_languageParser class AntlrDBGrammarParser(): def __init__(self, pat...
hsdjhf = 'sdkjf' # shjfkh
from __future__ import annotations import datetime as dt from dataclasses import asdict, is_dataclass from pathlib import Path from tempfile import NamedTemporaryFile, TemporaryDirectory from typing import Any, Optional, Union import dbt.flags as flags from airflow import AirflowException from airflow.models.baseoper...
import logging import json from pathlib import Path dictionary = {} DICTIONARY_FILE_NAME = "sudoku_dictionary.json" # TODO we are saving dictionary to file which does not handle multiple requests # we shall probably use some lite SQL like SQLite def load_dictionary()->dict: if Path(DICTIONARY_FILE_NAME).is_file...
#!/usr/bin/python3 import os import sys import re import logging import traceback try: import requests except: os.system("sudo pip install requests") import requests try: import ping3 except: os.system("sudo pip install ping3") import ping3 sys_type = sys.getfilesystemencoding() # 判断数据文件是否存在...
import os, sys, subprocess # move to source directory os.chdir(os.path.dirname(os.path.abspath(__file__))) from bindings import define, math, tool, input, core, graphics, io, logger, sound, tool, window, common from bindings.CppBindingGenerator import BindingGeneratorRust, CacheMode args = sys.argv lang = 'ja' if le...
class MyForms(): pass
"""YOLO Head module test. - Author: Jongkuk Lim - Contact: lim.jeikei@gmail.com """ import os import random import torch from torch import nn from kindle.model import YOLOModel def test_yolo_head_initialize_bias_class_probability(n_test: int = 5): for n in range(n_test): model = YOLOModel( ...
############################################################################### # # correct.py # # Created by Jonathan J. P. Peters # # Script used to apply the corretion to an image # ############################################################################### from utils import DM3 from unbenders import UnbendManu...
# -*- coding: utf-8 *-* from bson.objectid import ObjectId from collections import OrderedDict from pyflybase import cursor, helpers class Collection(object): """For instance this class, you needs an instance of :class:`pyflybase.database.Database` and the name of your collection. Example usage: .. ...
########## # USACO CONTEST 1 PROBLEM 3 # SOLUTION BY BRANDON LIN # PYTHON 2.7.6 ########## def readin(): f = open("cowjog.in",'r') s = f.read().split("\n") f.close() return s f = readin() if f[-1] == "": l = f[:-1] else: l = f l.pop(0) print l cows = [] for el in l: cows.append(int(el.spl...
import numpy import numpy as np import os import struct from struct import unpack import matplotlib.pyplot as plt import matplotlib.patches as patches import pickle import pathlib import cv2 import random class Item(object): __slots__ = ['x', 'y', 'id', 'cn'] def __init__(self, x, y, id, cn): self.x ...
from io import StringIO import subprocess as sp import os list1 = ["boat", "tiger", "lion"] list2 = ["airplane", "octopus", "item"] list3 = ["kangaroo", "banana", "leopard"] list4 = ["car", "taxi", "van"] help_flags = ["-h", "--help"] def test_one_item(): for item in list1: python_run_line = "python picn...
import requests import random import time import json """Simple timer script to test larkm's performance. Usage: python performance.py""" number_requests = 10 # Create some ARKs. start_create_timer = time.perf_counter() ark_strings = [] for create in range(number_requests): url = f'http://localhost:8000/larkm' ...
import unittest import comma.cpp_bindings class test(unittest.TestCase): def test_size(self): self.assertEqual(comma.cpp_bindings.csv.format('d,2ub,s[5]').size(), 15) if __name__ == '__main__': unittest.main()
import unittest from io import StringIO import numpy as np import pandas from app.utils.frames import (center_and_scale_rows, find_index, merge, sort_by_variance) from app.utils.vulcanize import Vulcanizer class TestDataFrames(unittest.TestCase): def assertEqualDataFrames(self, a,...
#!/usr/bin/env python from __future__ import print_function import atexit import os import sys import re import gc import heapq import locale import shutil import time import unittest import doctest import operator import subprocess import tempfile import traceback import warnings import zlib import glob from context...
try: from django.conf.urls.defaults import patterns, url except ImportError: # Django 1.6 from django.conf.urls import patterns, url from openvas.openvas_reports import views urlpatterns = patterns('', url(r'^$', views.IndexView.as_view(), name='index'), url(r'^r...
from setuptools import find_packages, setup from pathlib import Path this_directory = Path(__file__).parent long_description = (this_directory / "README.rst").read_text() project_urls={ 'Homepage': 'https://github.com/AkshayGhatul/input-sanitizer', } setup( name='input sanitizer', packages=find_packages(i...
from big_ol_pile_of_manim_imports import * from eola.chapter1 import plane_wave_homotopy V_COLOR = YELLOW class Jennifer(PiCreature): CONFIG = { "color" : PINK, "start_corner" : DOWN+LEFT, } class You(PiCreature): CONFIG = { "color" : BLUE_E, "start_corner" : DOWN+RIGHT, ...
#!/usr/bin/env python ## Copyright 2017 Eugenio Gianniti ## ## 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 app...
# -*- coding: utf-8 -*- """This module defines some functions for handling atomic classes and data.""" from textwrap import wrap from numpy import load, savez, zeros from prody.utilities import openFile, rangeString from prody import LOGGER from . import flags from . import select from .atomgroup import AtomGroup ...
from django.urls import path, include from .views import comment_create_view app_name = 'comments' urlpatterns = [ path('create/', comment_create_view, name='create') ]
class Queue: __slots__= '_length', '_data' def __init__(self): self._length = 0 self._data = [] def __len__(self): return self._length def is_empty(self): return self._length == 0 def first(self): if self.is_empty(): print('Queue is ...
# **************************************************************************** # # # # ::: :::::::: # # test_describe.py :+: :+: :+: ...
from setuptools import setup setup( name="django_vote_system", version='0.0.3', description='A django application to vote any model', author='hakancelik96', author_email='hakancelik96@outlook.com', packages=["django_vote_system"], include_package_data=True, install_requires=[], url=...
#! /usr/bin/env python3 """Epub 2 to Epub 3 conversion workflow. """ # # Copyright (C) 2021, Johan van der Knijff, Koninklijke Bibliotheek # National Library of the Netherlands # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You m...
# -*- coding: utf-8 -*- __author__ = "Konstantin Klementiev", "Roman Chernikov" __date__ = "07 Jan 2016" PI = 3.1415926535897932384626433832795 PI2 = 6.283185307179586476925286766559 SQRT2PI = PI2**0.5 # =2.5066282746310002 SQ3 = 1.7320508075688772935274463415059 SQ2 = 2**0.5 # =1.4142135623730951 SQPI = PI**0.5 # ...
# #coding=utf-8 # ''' # Created on 2015-11-30 # # @author: zhangtiande # ''' # # from django.contrib.auth.decorators import login_required # from django.http import HttpResponse # from django.shortcuts import redirect,render_to_response # # from doraemon.administrate.pagefactory.admin_user_group_pageworker import Adm...
import argparse import datetime import time import os import sys import numpy as np import torch from torch import nn from models import load_ckpt, get_model, save_ckpt from myutils.common import file_util, yaml_util from utils import data_util, main_util, misc_util from models.slimmable.slimmable_ops import USConv2d, ...
#!/usr/bin/env python """PIQS: Permutational Invariant Quantum Solver PIQS is an open-source Python solver to study the exact Lindbladian dynamics of open quantum systems consisting of identical qubits. """ DOCLINES = __doc__.split('\n') CLASSIFIERS = """\ Development Status :: 3 - Alpha Intended Audience :: Science...
from uuoskit import chainapi, config, wallet from uuoskit import test_helper async def update_code_auth(uuosapi): a = { "account": test_account1, "permission": "active", "parent": "owner", "auth": { "threshold": 1, "keys": [ { ...
import json import matplotlib.pyplot as plt from collections import Counter label_mapping = { "/people/deceased_person/place_of_death": "Place of death", "/people/person/place_of_birth": "Place of birth", "/people/person/education./education/education/institution": "Person-Institution", "/people/person...
''' A simple echo server Waits for data from anyone, then echoes it back. Debug messages are on in this example. ''' from __future__ import print_function import socket from gtudp import GTUDP # create your socket like normal server = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) server....
###################################### # # NC100_GC_Compare.py # By: Chris Downing # Email: downing.chris@gmail.com # Date Created: 06/13/2019 # Date Modified: 06/19/2019 # Python Version: 3.7.3 # MIT License # Copyright (c) 2019 Chris Downing # ####################################### import csv import os import datet...
import re from django.core.exceptions import ValidationError from django.contrib.auth.password_validation import CommonPasswordValidator from django.utils.translation import ugettext as _ class MinMaxPasswordValidator(object): def __init__(self, min_length=6, max_length=20): self.regex = r'(^.*(?=.{6,})(...
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # This file is part of Ansible # # Ansible 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 License, or # (at your option) any late...
# By Jyong-Jhih Lin # Software Testing Project 2021 Aumumn period 2: itertools, python=3.9.7 # count(), blackbox from itertools import count import pytest import sys import decimal # check "count()" type def test_count_type(): assert str(type(count())) == "<class 'itertools.count'>" # check default value def t...
# Copyright 2016-2018, Pulumi 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 law or agreed t...
import os from collections import namedtuple import nasbench301 as nb from torch import ge, normal download_dir = './301model' version = '0.9' def init_model(version=0.9, download_dir="./301model"): # Note: Uses 0.9 as the default models, switch to 1.0 to use 1.0 models models_0_9_dir = os.path.join(downlo...
from abc import ABC from collections import OrderedDict import torch class ValidationStepVariations(ABC): """ Houses all variations of validation steps """ def validation_step(self, batch, batch_idx, *args, **kwargs): """ Lightning calls this inside the validation loop :param ...
## # Copyright (c) 2006-2016 Apple 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 by applicable l...
from django.contrib import admin from .models import Position, Bestellung admin.site.register(Position) admin.site.register(Bestellung)
from artemis.general.mymath import cosine_distance from pdnn.helpers.pid_encoder_decoder import lowpass_random, pid_encode, pid_decode, Herder from matplotlib import pyplot as plt import numpy as np def demo_visualize_k_effects( kps = [0., 0.01, .1, 2.], kds = [0, 1., 4.], cutoff=0.005, ...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import os import sys import pkg_resources version = pkg_resources.require("openmetadata-ingestion")[0].version def get_metadata_version() -> str: metadata_pkg_dir = os.path.join(os.path.dirname(__file__), "..", "..") metadata_pkg_dir = os.path.abspath(metadata_pkg_dir) return "metadata {} from {} (pyth...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.ads.google_ads.v2.proto.resources import search_term_view_pb2 as google_dot_ads_dot_googleads__v2_dot_proto_dot_resources_dot_search__term__view__pb2 from google.ads.google_ads.v2.proto.services import search_term_view_servic...
# Copyright 2020 Makani Technologies 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 agreed to...
# Read svg file and convert splines to arcs # Read SVG into a list of path objects and list of dictionaries of attributes import sys import os import argparse import numpy as np import svgpathtools as spt import logging import warnings import ezdxf from ezdxf import units import cmath from scipy.optimize import fminbo...
# 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. import argparse import os import pickle from typing import cast import numpy as np import torch import activemri.baselines as baselines impo...
# -*- coding: utf-8 -*- """Responses. responses serve both testing purpose aswell as dynamic docstring replacement. """ responses = { "_v3_User": { "url": "/openapi/root/v1/user", "response": { "AccessRights": { "CanManageCashTransfers": True, "CanTakePrice...