text
stringlengths
2
999k
# -*-coding utf-8 -*- ########################################################################## # # Copyright (c) 2022 Baidu.com, 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 th...
""" Aim of this program: Get announcements and news from https://ogrisl.erciyes.edu.tr And send mail to given e-mail address that the latest announcement. """ #date: 3 march 2022 #author: BurakEselik import news import mail from news import BASE_URL from time import sleep import json import datetime from plyer import...
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
''' Module containing the lint command group, and all its subcommands ''' import logging import click from jira_offline.cli.params import CliParams, filter_option, global_options from jira_offline.jira import jira from jira_offline.linters import fix_versions as lint_fix_versions from jira_offline.linters import issu...
# 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. # -----------------------------------------------------...
from datetime import datetime import unittest from stuff.core import Stuff, Coordinates from stuff.maps import Charter class StuffCharterTestCase(unittest.TestCase): def setUp(self): self.stuffs = [ Stuff( url="https://newyork.craigslist.org/brk/zip/d/free-couch/1234556.html",...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** # Export this package's modules as members: from .StorageClass import * from .StorageClassList import * from .VolumeAttachment import * from ...
import abc from dockstream.containers.target_preparation_container import TargetPreparationContainer from dockstream.utils.enums.target_preparation_enum import TargetPreparationEnum from dockstream.loggers.target_preparation_logger import TargetPreparationLogger from dockstream.loggers.blank_logger import BlankLogger...
from mlx.hw_i2c_hal import HwI2cHalMlx90640 import mlx.pympt as pympt from mlx.pympt.core import * import serial.tools.list_ports import sys import time import struct from math import ceil USB_VID = 1001 USB_PID = 32 class Mlx90640Commands: CMD_ResetHardware = bytes([0]) CMD_GetHardwareID = bytes([1]) ...
''' lambdata - a collection of data science helper functions ''' import pandas as pd import numpy as np # # sample code # ONES = pd.DataFrame(np.ones(10)) # ZEROS = pd.DataFrame(np.zeros(50)) # helper functions
from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from {{cookiecutter.package_dir}}.api import api_router from {{cookiecutter.package_dir}}.config import settings app = FastAPI(title=settings.PROJECT_NAME, openapi_url="/openapi.json") # Set all CORS enabled origins if settings.BACKEND_...
# This script performs various tests on Result objects import numpy as np import atomica as at import matplotlib.pyplot as plt import os import sciris as sc import pytest testdir = at.parent_dir() tmpdir = testdir / "temp" def test_export(): P = at.demo("tb", do_run=False) P.run_sim(parset="default", resul...
from typing import List from fastapi import FastAPI, Query from pydantic import BaseModel from starlette.responses import JSONResponse from joblib import load import pandas as pd from enum import Enum # Setup a variable to introduce and describe the projectDescription = """ The **Beer Type Prediction Project** uses a ...
# -*- coding: utf-8 -*- """ zju_news_alerts.wrapper ~~~~~~~~~~~~~~~~~~~~~ Here lies all the decorators. :author: qwezarty :date: 11:41 am Aug 8 2019 :email: qwezarty@gmail.com """ import os import smtplib from email.message import EmailMessage def mail_errors(func): def mail_errors_wrappe...
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.multi_map_message_type import * from hazelcast.six.moves import range REQUEST_TYPE = MULTIMAP_REMOVE RESPONSE_TYPE = 106 RETRYABLE = Fals...
#!/usr/bin/env python3 import os from slack_sdk import WebClient from slack_sdk.errors import SlackApiError import sys import requests import json import time import datetime if __name__ == "__main__": # state_name = str(input("Enter the state name: ")) # district_name = str(input("Enter the district name:...
from simglucose.patient.t1dpatient import Action from simglucose.analysis.risk import risk_index import pandas as pd from datetime import timedelta import logging from collections import namedtuple from simglucose.simulation.rendering import Viewer try: from rllab.envs.base import Step except ImportError: _Ste...
#!/usr/bin/env python3 import sys genomes = [] for line in open(sys.argv[1], "r"): #use sys library to read in a single file entry genomes.append(line.strip()) #assumes a single column of unique identifiers added to search list bigdict = {} for line in open("assembly_summary_genbank.txt", "r"): #parse the GenBank...
import unittest from SimulaQron.cqc.pythonLib.cqc import CQCConnection, qubit, CQCUnsuppError class TestRestrictedTopology(unittest.TestCase): @classmethod def setUpClass(cls): nodes = ["Alice", "Bob", "Charlie"] cls.edges = [("Alice", "Bob"), ("Bob", "Charlie")] cls.non_edges = [(node...
from insertion_sort.insertion_sort import insertion_sort # test 0 one two and many def test_zero(): z = [] actual = insertion_sort(z) expected = "Not a valid input" assert actual == expected def test_one(): z = [1] actual = insertion_sort(z) expected = [1] assert actual == expected...
""" The interface for select statements """ def select(statement): pass
"""YOLO_v3 Model Defined in Keras.""" from functools import wraps import tensorflow as tf from keras import backend as K from keras.layers import Conv2D, Add, ZeroPadding2D, UpSampling2D, Concatenate from keras.layers.advanced_activations import LeakyReLU from keras.layers.normalization import BatchNormalization from...
from heatmiserV3.config import Config from heatmiserV3.devices import Device, Master import unittest class TestDevices(unittest.TestCase): def test_request_all(self): tm1 = Device("tm1", "Boat Timer", 1) master = Master(0x81) msg = master.build_command(tm1, False, Config.ALL_F...
# _experimental_design/__init__.py __module_name__ = "__init__.py" __author__ = ", ".join(["Michael E. Vinyard"]) __email__ = ", ".join(["vinyard@g.harvard.edu",]) from ._funcs._identify_overlapping_fragments import _OverlappingFragments as OverlappingFragments from ._funcs._get_chromosome_sequence import _get_chrom...
from abc import ABC, abstractmethod from functools import lru_cache from vispy.app import Canvas from vispy.gloo import gl from vispy.visuals.transforms import STTransform class VispyBaseLayer(ABC): """Base object for individual layer views Meant to be subclassed. Parameters ---------- layer : n...
#!/usr/bin/env python3 # This scripts attempts to generate massive design of experiment runscripts. # and save it into a "runMassive.sh" and "doe.log". #------------------------------------------------------------------------------- import os, sys import os.path import re import itertools import glob PUBLIC = ['...
from app import app from flask import request, redirect, url_for, session, flash, render_template @app.route('/save_to_local_storage') def save_to_local_storage(): access_token = request.args.get('access_token', '') user_id = request.args.get('user_id', '') redirect_location = request.args.get('redirect',...
"""Manages movement of packets through the faucet pipeline.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2018 The Contributors...
# revlog.py - storage back-end for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """Storage back-end for Mercurial. This provides efficient delta storage with O(1...
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
#!/usr/bin/env python # Copyright 2019 Scott Wales # author: Scott Wales <scott.wales@unimelb.edu.au> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Indictrans and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class RequestCategory(Document): pass
import random import numpy as np from bo.run import run_bo if __name__ == '__main__': seed = 0 random.seed(seed) np.random.seed(seed) best_robot, best_fitness = run_bo( experiment_name='test_bo', structure_shape=(5, 5), pop_size=3, max_evaluations=6, train_iter...
import sys from awsglue.transforms import * from awsglue.utils import getResolvedOptions from pyspark.context import SparkContext from awsglue.context import GlueContext from awsglue.job import Job sc = SparkContext() glueContext = GlueContext(sc) spark = glueContext.spark_session job = Job(glueContext) job.commit() ...
import unittest from datetime import datetime from src.backup.dataset_id_creator import DatasetIdCreator from src.commons.exceptions import ParameterValidationException class TestDatasetIdCreator(unittest.TestCase): def test_create_happy_path(self): # given date = datetime(1901, 12, 21) l...
# coding: utf-8 """ No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.1.1+01d50e5 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you m...
# ----------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ----------------------------------------------------------------------------- im...
from django.contrib import messages from django.shortcuts import render, get_object_or_404, redirect from django.utils import timezone from .forms import PublisherForm, ReviewForm, SearchForm from .models import Book, Contributor, Publisher, Review from .utils import average_rating def index(request): return ren...
import json import unittest from os.path import join as path_join import numpy as np from numpy.testing import assert_almost_equal from pkg_resources import resource_filename from pymatgen.io.vasp import Vasprun from sumo.electronic_structure.optics import calculate_dielectric_properties, kkr class AbsorptionTestCa...
from django.apps import AppConfig class RudumbappConfig(AppConfig): name = 'rudumbapp'
import logging import time import struct _logger = logging.getLogger(__name__) SR = int(182) CR = int(13) class Request: def __init__(self, cmd, charmber_index, *args): """ args is param_1, 2, 3...up to 4 """ self.cmd = cmd self.charmber_index = charmber_index sel...
n = int(input()) termo_atual = 1 termo_anterior = 0 cont = 2 if n == 1 or n == 2: seq = 1 else: while cont <= n: seq = termo_atual + termo_anterior termo_anterior = termo_atual termo_atual = seq cont += 1 fatorial = x = 1 for _ in range(n): fatorial *= x x += 1 print(f'{seq} {fatorial}', end...
from django.db import models class Service(models.Model): name = models.CharField(max_length=40, unique=True) price = models.IntegerField() master = models.ForeignKey("Master", on_delete=models.SET_NULL, null=True, related_name='services') def __str__(self): return self.name class Master(mo...
# 定时任务和邮件发送 import smtplib from email.mime.text import MIMEText # send email def send_email(): # 接受方邮箱地址 receivers = ['bestwishfang@foxmail.com'] # 发送方邮箱地址 msg_from = 'bestwishfang@126.com' password = 'continue00' # 邮箱授权码 # 邮件内容 # 主题 subject = "Do you know?" # 正文 # content = ...
# Copyright 2021 Dynatrace 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 in writing, s...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test PrioritiseTransaction code # from test_framework.test_framework import FujicoinTestFramework f...
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
# Electrum - Lightweight Bitcoin Client # Copyright (c) 2011-2016 Thomas Voegtlin # # 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 rig...
import mock import testtools from shakenfist import net class NetTestCase(testtools.TestCase): def setUp(self): super(NetTestCase, self).setUp() self.ipmanager_persist = mock.patch( 'shakenfist.db.persist_ipmanager') self.mock_ipmanager_persist = self.ipmanager_persist.start...
#._cv_part guppy.etc.KanExtension class LeftKanExtension: # Implementation of algorithms described by Brown and Heyworth (ref.251) # and Heyworth (ref.253). def __init__(self, mod, A, B, R, X, F): # External subsystem dependencies # mod.KnuthBendix # mod.FiniteAutomaton # mod.SolveFSA # ...
from math import radians from typing import Any, Dict, Optional, Set, Tuple import bpy from mathutils import Matrix from . import migration from .template_mesh_maker import IcypTemplateMeshMaker class ICYP_OT_make_armature(bpy.types.Operator): # type: ignore[misc] # noqa: N801 bl_idname = "icyp.make_basic_arma...
import argparse import operator parser = argparse.ArgumentParser("convert dicom files to nii.gz") parser.add_argument("db", help="location of the csv create by the create_csv_db command") # TODO def group_by_correct_volumes(slices_mdatas): """Correctly group slices to obtain 3D volume. More specifically, t...
import errno import math import os import sys from .. import _core, _subprocess from .._sync import CapacityLimiter, Event from .._threads import to_thread_run_sync try: from os import waitid def sync_wait_reapable(pid): waitid(os.P_PID, pid, os.WEXITED | os.WNOWAIT) except ImportError: # pypy d...
#!/usr/bin/python # -*- coding: utf-8 -*- import networkx as nx import numpy as np class SolutionNotFound(Exception): pass def solve_it(input_data): # parse the input lines = input_data.split('\n') first_line = lines[0].split() node_count = int(first_line[0]) edge_count = int(first_line[1]...
import aiohttp import jinja2 import aiohttp_jinja2 import router import os port = 80 os.chdir(os.path.dirname(os.path.realpath(__file__))) app = aiohttp.web.Application() templates = aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader("assets/html")) app.router.add_static("/assets/", path="./assets/", name="as...
# File: sentinelone_connector.py # Copyright (c) 2018-2020 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) # import phantom.app as phantom from phantom.base_connector import BaseConnector from phantom.action_result import ActionResult import requests import json from bs4 imp...
from collections import deque import argparse import keras.backend as K import numpy as np import os import pickle from argparse import ArgumentParser from glob import glob from keras import Input, Model from keras.callbacks import ReduceLROnPlateau, EarlyStopping, ModelCheckpoint, Callback from keras.layers import De...
# Copyright 2017 Or Ozeri # # 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, soft...
"""Constants for the Verisure integration.""" from datetime import timedelta import logging from homeassistant.const import ( STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_HOME, STATE_ALARM_DISARMED, STATE_ALARM_PENDING, ) DOMAIN = "verisure" LOGGER = logging.getLogger(__package__) CONF_GIID = "giid" CO...
import humanize import typer from docker.models.containers import Container from rich import print from rich.console import Console from rich.table import Table from rich.prompt import Prompt from datetime import datetime import docker import subprocess app = typer.Typer() @app.command() def ls(): """ List a...
#!/usr/bin/env python # coding: utf-8 # In[1]: #Lara Betül Arslantaş-180401024 def polinoma_cevirme(derece,veriler): matris = [] a = 0 for i in range(derece+1): satir = [] for j in range(derece+1): toplam = 0 for k in range(1,len(veriler)+1): topl...
"""Minor optimization routines.""" from prysm.conf import config from prysm.mathops import np from . import raygen, spencer_and_murty from scipy import optimize def _intersect_lines(P1, S1, P2, S2): """Find the slerp along the line (P1, S1) that results in intersection with the line (P2, S2). P = posi...
# -*- coding: utf-8 -*- """ @author: marcoguerro @title: EMNIST - Support Vector Machine """ import scipy import random import matplotlib.pyplot as plt import matplotlib import sklearn.svm as svm import sklearn.metrics as metrics import numpy as np import pandas as pd import time #file in matlab format data = scipy....
# Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import gc import collections import warnings from coremltools import ComputeUnit as _ComputeUnit from co...
from nose.tools import eq_, ok_, raises, assert_true from wtforms import fields, validators from flask_admin import form from flask_admin._compat import as_unicode from flask_admin._compat import iteritems from flask_admin.contrib.sqla import ModelView, filters, tools from flask_babelex import Babel from sqlalchemy....
""" Implementation of the forest model for classification in Deep Forest. This class is modified from: https://github.com/scikit-learn/scikit-learn/blob/main/sklearn/ensemble/_forest.py """ __all__ = ["RandomForestClassifier", "ExtraTreesClassifier"] import numbers from warnings import warn import threading fro...
from chia.protocols.protocol_message_types import ProtocolMessageTypes as pmt, ProtocolMessageTypes NO_REPLY_EXPECTED = [ # full_node -> full_node messages pmt.new_peak, pmt.new_transaction, pmt.new_unfinished_block, pmt.new_signage_point_or_end_of_sub_slot, pmt.request_mempool_transactions, ...
################################################################################ # Example : perform live fire detection in video using superpixel localization # and the superpixel trained version of the InceptionV1-OnFire CNN # Copyright (c) 2017/18 - Andrew Dunnings / Toby Breckon, Durham University, UK # License ...
import sys import msgpack import json with open(sys.argv[1], mode='rb') as msgpack_data: data = msgpack.unpackb(msgpack_data.read()) print(json.dumps(data, indent=4))
__version__ = "1.3.21"
from .batch_norm import BatchNorm from .instance_norm import InstanceNorm from .layer_norm import LayerNorm from .graph_size_norm import GraphSizeNorm from .pair_norm import PairNorm from .msg_norm import MessageNorm __all__ = [ 'BatchNorm', 'InstanceNorm', 'LayerNorm', 'GraphSizeNorm', 'PairNorm',...
from utils import StrDictMixin class LivingPlace: pass class House(StrDictMixin, LivingPlace): def __init__(self, floors_count, has_garage, has_electricity, rooms_count, balconies_count, has_pool, town): self.floors_count = floors_count self.has_garage = has_garage self.has_electrici...
# built-ins import os import json from os.path import split as split_path, join as join_path from fnmatch import filter as fnfilter import logging import itertools as it import subprocess import tempfile as tmp # libraries import h5py from PIL import Image from scipy.ndimage.measurements import label from numpy impo...
from hashlib import md5 import string from threading import Event, RLock import json import uuid as UUID import ssl import random import copy import time from meross_iot.cloud.timeouts import SHORT_TIMEOUT from meross_iot.cloud.exceptions.CommandTimeoutException import CommandTimeoutException from meross_iot.logger imp...
from django.conf.urls import url, include from django.conf.urls.static import static from .import views urlpatterns = [ url(r'^register/', views.register_customer, name='registercustomer'), ]
import diff_match_patch import re from contextlib import suppress import ghdiff from funcy.seqs import first, rest def resolve_identifier(identifier): match = re.match("@?([\w\-\.]*)/([\w\-]*)", identifier) if not hasattr(match, "group"): raise ValueError("Invalid identifier") return match.group(...
from elasticsearch import Elasticsearch from elasticsearch_dsl import Search, Q from collections import OrderedDict from itertools import product import json from pandas.io.json import json_normalize import copy import pandas as pd CLIENT = Elasticsearch() INDEX = 'associations' EXPECTED_CGI_EVIDENCE_COUNT = 1347 E...
from .browser import Browser def _jupyter_server_extension_paths(): return [{ "module": "igv" }] def _jupyter_nbextension_paths(): return [dict( section="notebook", # the path is relative to the `igv` directory src="static", # directory in the `nbextension/` namesp...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018, 2019. # # 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...
# MIT License # # Copyright (c) 2018 # # 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, dis...
from django.contrib import admin from .models import * # Register your models here. admin.site.register(UserInfo) admin.site.register(ReceiveInfo)
''' Correlation loss, 2 to 1 ''' import numpy as np import os import tensorflow as tf import sys sys.path.append('tfutils') sys.path.append('curiosity') import numpy as np from tfutils import base, optimizer from curiosity.data.short_long_sequence_data import ShortLongSequenceDataProvider import curiosity.models.je...
import scrapy from selenium import webdriver import re import json import requests import os from kototo.items import KototoItem import pymysql class KototoSpider(scrapy.Spider): name = 'kototo' start_urls = [] # 指定的需要爬取的up主的b站投稿页面 space_url = 'https://space.bilibili.com/17485141/video' def __ini...
import os, sys, time path = os.path.join(os.path.dirname(__file__), '../lib/') sys.path.insert(0, path) from thrift.transport import THttpClient from thrift.protocol import TCompactProtocol from curve import LineService from curve.ttypes import * class Poll: client = None auth_query_path = "/api/v4/TalkService...
import re from collections.abc import Sequence from numbers import Integral from urllib.parse import urlparse from django.conf import settings from django.core import checks from corsheaders.conf import conf re_type = type(re.compile("")) def check_settings(app_configs, **kwargs): errors = [] if not is_se...
# Copyright 2015 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...
from setuptools import setup, find_packages if __name__ == "__main__": setup(name='wtfpython', version='0.2', description='What the f*ck Python!', author="Satwik Kansal", maintainer="Satwik Kansal", maintainer_email='satwikkansal@gmail.com', url='https://...
# Lint as: python3 # Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# -*- coding: utf-8 -*- # File: crop.py import numpy as np import cv2 from ...utils.argtools import shape2d from .base import ImageAugmentor from .transform import CropTransform, TransformAugmentorBase from .misc import ResizeShortestEdge __all__ = ['RandomCrop', 'CenterCrop', 'RandomCropRandomShape', 'GoogleNetRand...
import json,time import numpy as np import pandas as pd import os, subprocess import argparse from collections import OrderedDict import operator parser = argparse.ArgumentParser(description='Shape the answer') parser.add_argument('--nbest_path', type=str, help='location of nbest_predictions.json') parser.add_argumen...
from unittest import TestCase from pytezos import pytezos class CallbackViewTestCase(TestCase): def test_balance_of(self): usds = pytezos.using('mainnet').contract('KT1REEb5VxWRjcHm5GzDMwErMmNFftsE5Gpf') res = usds.balance_of(requests=[ {'owner': 'tz1PNsHbJRejCnnYzbsQ1CR8wUdEQqVjWen1...
# 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 may ...
#!/usr/bin/python #================================================================================# # ADS-B FEEDER PORTAL # # ------------------------------------------------------------------------------ # # Copyright and Licensing Information: ...
# Copyright 2019 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...
#!/usr/bin/env python3 # Copyright (c) 2014-2017 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. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
# Generated by Django 2.1.7 on 2020-06-12 02:05 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0002_speech2text'), ('api', '0002_project_single_class_classification'), ] operations = [ ]
from emmental._version import __version__ from emmental.meta import Meta, init __all__ = ["__version__", "Meta", "init"]
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Recurring Documents', 'category': 'Extra Tools', 'description': """ Create recurring documents. =========================== This module allows to create new documents and add subscriptions on tha...
import numpy as np import os # try to load io libraries (h5py and z5py) try: import h5py WITH_H5PY = True except ImportError: WITH_H5PY = False try: import z5py WITH_Z5PY = True except ImportError: WITH_Z5PY = False from ..core.base import SyncableDataset from ..core.base import IndexSpec fro...
# # Copyright (c) 2019, NVIDIA 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 ...