text
stringlengths
2
999k
""" Command-line program for quality controlling BioModels and converting entries to alternative formats :Author: Jonathan Karr <karr@mssm.edu> :Date: 2021-04-24 :Copyright: 2021, BioSimulations Team :License: MIT """ from .convert import convert_entry, AltSbmlFormat from .utils import build_combine_archive from .val...
import numpy as np from utime.io.channels import ChannelMontageTuple from utime.io.header import extract_header from utime.errors import ChannelNotFoundError def filter_non_available_channels(channel_groups, psg_file_path=None, available_channels=Non...
from unittest import TestCase from arpeggio import NoMatch from arpeggio import ParserPython from arpeggio import visit_parse_tree from assertpy import assert_that class TestDefeasibleVisitor(TestCase): @staticmethod def process(scope, content) -> dict: from depysible.language.visitor import Defeasib...
# Write a program to print the series : s=1+x^2/2!+x^3/3!+.........+x^n/n! def factorial(n): if n == 0: return 1 else: return n * factorial(n-1) n = int(input("Enter the number of terms: ")) print('\n1') x = 2 s = 1 while x <= n: t = x**x/factorial(x) s = s + t print(t) x+=1 pr...
#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2019, Linaro Limited # from __future__ import print_function from __future__ import division import argparse import sys try: from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection from e...
# Use shebang here #Import the necessary methods from tweepy library from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import time import csv import sys import json class StdOutListener(StreamListener): def __init__(self, api = None): self.api = api ...
from sympy import (Basic, Symbol, sin, cos, exp, sqrt, Rational, Float, re, pi, sympify, Add, Mul, Pow, Mod, I, log, S, Max, symbols, oo, zoo, Integer, sign, im, nan, Dummy, factorial, comp, refine ) from sympy.core.compatibility import long, range from sympy.core.expr import unchanged from sympy.utilit...
from app import create_app,db from flask_script import Manager,Server from app.models import User,Blog from flask_migrate import Migrate, MigrateCommand # Creating app instance app = create_app('production') manager = Manager(app) manager.add_command('server',Server) migrate = Migrate(app,db) manager.add_com...
#creating a node class Node: def __init__(self,data): self.value=data self.next=None #creating LinearQueue class class LinearQueue: def __init__(self): self.front=None self.rear=None def enqueue(self, newelement): newnode=Node(newelement) if(self.rear...
""" RecordingManager class definition. """ from six import iteritems import time import numpy as np from openmdao.utils.mpi import MPI class RecordingManager(object): """ Object that routes function calls to all attached recorders. Attributes ---------- _recorders : list of <BaseRecorder> ...
from collections import Counter import numpy as np from typing import Dict, Any, List, Iterable, Optional, Tuple import random import re from utils.bpevocabulary import BpeVocabulary from utils.tfutils import convert_and_pad_token_sequence import tensorflow as tf from dpu_utils.codeutils import split_identifier_into_...
# 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 import * class Rendercheck(AutotoolsPackage, XorgPackage): """rendercheck is a program to test a Render e...
# 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 collections import numpy import six import chainer from chainer.backends import cuda from chainer.backends import intel64 from chainer import function_node from chainer.utils import type_check def _get_indices_or_sections(indices_or_sections): """Checks and convert ``indices_or_sections`` argument C...
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType def fetch_content_objects(tagged_items, select_related_for=None): """ Retrieves ``ContentType`` and content objects for the given list of ``TaggedItems``, grouping the retrieval of content objects by model ...
from rest_framework import serializers from posts.models import Post class PostSerializer(serializers.ModelSerializer): owner = serializers.SlugRelatedField( many=False, read_only=True, slug_field='username' ) class Meta: model = Post fields = ["description", "owner"...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import random import torch import torchvision from torchvision.transforms import functional as F class Compose(object): def __init__(self, transforms): self.transforms = transforms def __call__(self, image): for t in sel...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved. # from collections import namedtuple import time from datetime import timedelta, datetime, date from .compat import TO_UNICODE ZERO_TIMEDELTA = timedelta(0) ElementType = { u'Year2digit_Element...
from hgicommon.data_source.common import DataSource from hgicommon.data_source.basic import ListDataSource, MultiDataSource from hgicommon.data_source.static_from_file import FilesDataSource, SynchronisedFilesDataSource from hgicommon.data_source.dynamic_from_file import register, unregister, registration_event_listena...
from dataclasses import (dataclass, field) from typing import Optional from mcpack import (Function, FunctionTag) from .items import * @dataclass class Trade: template = get_pkg_data('villager.json')['templates']['Trade'] buy: Item sell: Item buyB: Optional[Item] = None rewardExp: Optional[int] ...
from random import randint try: import random N = int(input('строки -> ')) M = int(input('столбцы -> ')) c = int(input('начало диапазона целых чисел -> ')) d = int(input('конец диапазона целых чисел -> ')) lst = [[randint(c, d) for i in range(N)] for i in range(M)] for i in lst: ...
#!/usr/bin/python import os import sys def convert(ttl_file): print('Processing %s...' % ttl_file) if ttl_file.endswith('.ttl'): tsv_file = ttl_file.replace('.ttl', '.tsv') elif ttl_file.endswith('.nt'): tsv_file = ttl_file.replace('.nt', '.tsv') else: raise RuntimeError("File...
#!/usr/bin/python3 -i # # Copyright (c) 2015-2018 The Khronos Group Inc. # Copyright (c) 2015-2018 Valve Corporation # Copyright (c) 2015-2018 LunarG, Inc. # Copyright (c) 2015-2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
import json import time from sqlalchemy import Column, Integer, String, BigInteger, DateTime, Enum import anchore_engine.db.entities.common import anchore_engine.subsys.object_store.manager from anchore_engine.db.entities.common import StringJSON import anchore_engine.common.helpers from anchore_engine.db.entities.exc...
from collections import defaultdict import param import numpy as np from bokeh.models import HoverTool, FactorRange from ...core import util from .element import ElementPlot, ColorbarPlot, line_properties, fill_properties from .util import expand_batched_style class PathPlot(ElementPlot): show_legend = param....
from aiodataloader import DataLoader from src.request import requestApiRows RARITY_KEYS = { 1: "ONE_STAR", 2: "TWO_STAR", 3: "THREE_STAR", 4: "FOUR_STAR", 5: "FIVE_STAR", } async def batch_get_base_stats(keys): # Fetch base stats for all heroes and then filter by provided keys. # This i...
import csv class Data(): def CargarArchivo(self,pathCSV): archivo=open(pathCSV,"r") datos="" for linea in archivo.readlines(): print (linea) datos+=linea datos+="\n" archivo.close() return datos def CargarCSV(self,pathCSV): ...
from __future__ import absolute_import import wx from wx.lib.pubsub import pub from matplotlib.patches import Rectangle from matplotlib import cm import numpy as np from astropy.stats import sigma_clipped_stats import sys from .ztv_wx_lib import set_textctrl_background_color, validate_textctrl_str, textctrl_output_only...
# Unit tests import os import sys import unittest import pygame # Change directory to that of the main path sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from classes import * class ImageObjectTest(unittest.TestCase): def setUp(self): return super().setUp() def tearD...
import tensorflow as tf from tensorflow import keras from tensorflow.keras import regularizers, initializers from tensorflow.python.framework import tensor_shape from tensorflow.python.keras.engine.input_spec import InputSpec from tensorflow.python.keras import constraints import numpy as np from scipy.optimize import ...
class myError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) try: raise myError('2/0 is illegal!') except myError as e: # 赋值 异常 给 e print('My exception occured: ', e.value) # print('My exception occured 2: ',...
#! /usr/bin/env python # -*- coding:utf-8 -*- # 网友的建议:https://github.com/VictorZhang2014/free-google-translate/issues/6 # import urllib.parse import requests import json import re import ssl import ctypes ssl._create_default_https_context = ssl._create_unverified_context class GoogleTrans(object): def __init__(...
import taichi as ti import numpy as np from taichi import approx import operator import pytest operation_types = [operator.add, operator.sub, operator.matmul] test_matrix_arrays = [ np.array([[1, 2], [3, 4]]), np.array([[5, 6], [7, 8]]), np.array([[2, 8], [-1, 3]]) ] vector_operation_types = [operator.add...
# Lower-level functionality for build config. # The functions in this file might be referred by tensorflow.bzl. They have to # be separate to avoid cyclic references. def tf_cuda_tests_tags(): return ["local"] def tf_sycl_tests_tags(): return ["local"] def tf_additional_plugin_deps(): return select({ "//...
import torch import torch.nn as nn import torch.nn.functional as F from model.general.attention.multihead_self import MultiHeadSelfAttention from model.general.attention.additive import AdditiveAttention device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") class TextEncoder(torch.nn.Module): d...
# coding: utf-8 # Modified Work: Copyright (c) 2016, 2020, 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...
import unittest import json from bitmovin import Bitmovin, Response, FTPOutput from bitmovin.errors import BitmovinApiError from tests.bitmovin import BitmovinTestCase class FTPOutputTests(BitmovinTestCase): @classmethod def setUpClass(cls): super().setUpClass() @classmethod def tearDownClas...
# Copyright 2020, 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 agreed to in writing...
from time import sleep from git_inspector.reports import Report, GIT_REPORT_LEVEL_HINT from git_inspector.reports.dirty import dirty_report from git_inspector.reports.merged import merged_report from git_inspector.reports.unpushed import unpushed_report from git_inspector.reports.untracked import untracked_report from...
from tempita import Template from .utils.copydir import copy_dir import os class GearBoxTemplate(object): def template_renderer(self, content, vars, filename=None): tmpl = Template(content, name=filename) return tmpl.substitute(vars) def pre(self, template_dir, output_dir, vars): pass...
# 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...
from aws_cdk import ( Stack, CfnOutput, aws_cloudfront as cloudfront, aws_cloudfront_origins as origins, aws_s3 as s3, aws_lambda as _lambda ) from constructs import Construct class CloudfrontLambdaEdgeCdkPythonStack(Stack): def __init__(self, scope: Construct, construct_id: str, **kwargs)...
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.abspath(path.dirname(__file__)) ABOUT = {} with open(path.join(HERE, "datadog_checks", "base"...
# -*- coding: utf-8 -*- ''' Compendium of generic DNS utilities # Examples: dns.lookup(name, rdtype, ...) dns.query(name, rdtype, ...) dns.srv_rec(data) dns.srv_data('my1.example.com', 389, prio=10, weight=100) dns.srv_name('ldap/tcp', 'example.com') ''' # Import Python libs import base64 import binascii import hash...
from django.core.exceptions import ValidationError from django.db import models from model_utils.fields import StatusField from model_utils.models import TimeStampedModel from model_utils import Choices from .behaviors import Payable, Permalinkable class Event(Permalinkable, TimeStampedModel): # status: open or ...
# Copyright (c) 2010-2019 openpyxl #standard lib imports from copy import copy from .worksheet import Worksheet class WorksheetCopy(object): """ Copy the values, styles, dimensions, merged cells, margins, and print/page setup from one worksheet to another within the same workbook. """ def _...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the tag_linux.txt tagging file.""" import unittest from plaso.containers import events from plaso.lib import definitions from plaso.parsers import bash_history from plaso.parsers import dpkg from plaso.parsers import selinux from plaso.parsers import syslog ...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import time from typing import TYPE_CHECKING from .aad_client_base import AadClientBase from .._internal.pipeline import build_pipeline if TYPE_CHECKING: # pylint:...
import subprocess import sysv_ipc import time import os sem = sysv_ipc.Semaphore(None, sysv_ipc.IPC_CREX, initial_value = 1) print("Parent: created semaphore {}.".format(sem.key)) sem.acquire() # Spawn a child that will wait on this semaphore. path, _ = os.path.split(__file__) print("Parent: spawning child process.....
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_security import Security from flask_security import SQLAlchemyUserDatastore from flask_mail import Mail # Create app app = Flask(__name__, instance_relative_config=True) app.config.from_object('config') app.config.from_pyfile('config.py') # Cr...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- print("hello world")
# Copyright The IETF Trust 2015-2020, All Rights Reserved # -*- coding: utf-8 -*- from tqdm import tqdm import django django.setup() from django.apps import apps from django.core.management.base import BaseCommand #, CommandError from django.db import IntegrityError from django.db.models.fields.related import Forei...
""" flaskbb.manage ~~~~~~~~~~~~~~~~~~~~ This script provides some easy to use commands for creating the database with or without some sample content. You can also run the development server with it. Just type `python manage.py` to see the full list of commands. :copyright: (c) 2014 by the ...
# -*- coding: utf-8 -*- from pip_services3_commons.refer import Descriptor from pip_services3_grpc.services.CommandableGrpcService import CommandableGrpcService class EntitiesCommandableGrpcServiceV1(CommandableGrpcService): def __init__(self): super().__init__('v1.entities') self._dependency_res...
import torch.nn as nn import torch.utils.checkpoint as cp from mmcv.cnn import (ConvModule, NonLocal3d, build_activation_layer, constant_init, kaiming_init) from mmcv.runner import _load_checkpoint, load_checkpoint from mmcv.utils import _BatchNorm from torch.nn.modules.utils import _ntuple, _trip...
# -*- coding: utf-8 -*- """ Created on Tue Mar 24 15:10:06 2015 @author: funkyman """ for s in specs: spectracer.remove_spec(s) chart1 = add_spec() origChart = chart1.addPlot("Original spectrum") source = dataSourceFactory.randomStream(1000) source.updated.connect(origChart.onInput) source.start() chart2 = add_sp...
# 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 ...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pycocotools.coco as coco from pycocotools.cocoeval import COCOeval import numpy as np import json import os import torch.utils.data as data class COCOHP(data.Dataset): num_classes = 1 num_joints = ...
""" Code to draw plot for the documentation. This plots an example of an stable steady state. The code should match the reference code in the documentation. """ import matplotlib.pyplot as plt import numpy as np import nashpy as nash A = np.array([[4, 3], [2, 3]]) game = nash.Game(A) y0 = np.array([1 / 2, 1 / 2]) t...
from .exceptions import InvalidDodoFile from .cmdparse import TaskParse, CmdOption from .cmd_base import DoitCmdBase HELP_TASK = """ Task Dictionary parameters -------------------------- Tasks are defined by functions starting with the string ``task_``. It must return a dictionary describing the task with the follo...
# 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. from yacs.config import CfgNode as CN from config import get_cfg_defaults _C = get_cfg_defaults() _ARMC = _C.ARM # individual joint motor co...
from setuptools import setup, find_packages import sys, os.path # Don't import gym module here, since deps may not be installed sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'gym')) from version import VERSION # Environment-specific dependencies. extras = { 'atari': ['atari_py>=0.1.1', 'Pillow', 'PyOpe...
#!/usr/bin/env python3 """ polar_progress.py queries flow.polar.com and reports your progress towards this years goal. Requires a setting file with the following contents: { "login": "FLOW_USERNAME", "password": "FLOW_PASSWORD", "goal": 1000 } """ import argparse import datetime import json import re i...
""" Module description: """ __version__ = '0.1' __author__ = 'Vito Walter Anelli, Claudio Pomo, Daniele Malitesta' __email__ = 'vitowalter.anelli@poliba.it, claudio.pomo@poliba.it, daniele.malitesta@poliba.it' import os import numpy as np import tensorflow as tf from tqdm import tqdm from elliot.dataset.samplers i...
""" Tests for the client """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import json import mock import requests import tests import ga4gh.client as client import ga4gh.protocol as protocol class DummyRequest(protocol.ProtocolElemen...
############################################################################### # Imports ############################################################################### import pathlib import numpy as np ############################################################################### # Constant Values #######...
from django.db import models from shop.models import Product # Template Database Design for Order,OrderItems # http://techstream.org/Bits/Model-Design-for-Orders-in-Django # Create your models here. class Order(models.Model): first_name = models.CharField(max_length=50) last_name = models.CharField(max_lengt...
import seldom if __name__ == '__main__': seldom.main(path="./test_dir", browser="chrome", title="百度测试用例", description="测试环境:Firefox", rerun=0) ''' 说明: path : 指定测试目录。 browser: 指定浏览,默认chrome。 title : 指定测试项目标题。 description : 指定测试环境描述。 debug : debug模式,设置...
from django.conf.urls import url from . import views from django.conf.urls import include from django_weixin.views import basic urlpatterns = [ url(r'^$', views.wechat, name='wechat'), #url(r'^$', basic.index, name='wechat'), url(r'^bind_wechat/$', views.bind_wechat, name='bind_wechat'), url(r'^bind_im...
# _*_ coding: utf-8 _*_ """ util_funcs.py by xianhu """ import re import urllib.parse from .util_config import CONFIG_URL_RE_LEGAL, CONFIG_ERROR_MESSAGE_RE __all__ = [ "check_url_legal", "get_url_legal", "get_url_params", "get_string_num", "get_string_strip", "get_dict_buildin", "parse_er...
""" Copyright (c) 2015 Microsoft Open Technologies, Inc. All rights reserved. MIT License 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 ri...
from logging.config import dictConfig FORMAT = "[%(asctime)s] %(levelname)s: %(module)s: %(filename)s: %(funcName)s() : L%(lineno)s %(message)s" dictConfig({ 'version': 1, 'formatters': {'default': { 'format': FORMAT, #'[%(asctime)s] %(levelname)s : %(funcName)20s() : %(module)s: %(message)s', }}, ...
"""portfolio URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""Test the Griddy Power config flow.""" import asyncio from homeassistant import config_entries, setup from homeassistant.components.griddy.const import DOMAIN from tests.async_mock import MagicMock, patch async def test_form(hass): """Test we get the form.""" await setup.async_setup_component(hass, "persi...
from django.db import models from .project import Project from . import util import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%a, %d %b %Y %H:%M:%S', filename='log', filemode='a') MAX_NAME_LENGTH = 50 class Subnet(mod...
import pytest from tomial_tooth_collection_api import model from tomial_clicky_tooth._ui import main, UI from tests import CloseBlockingDialog pytestmark = pytest.mark.order(8) def test_main(): """Test the CLI. To be expanded when we actually have a significant CLI.""" with CloseBlockingDialog(type=UI): ...
# 2022-03-16, RRWMC import math import struct from PIL import Image SCALE = 1 def clamp(x: float) -> float: """Clamps x to [0.0, 1.0]""" if x < 0: return 0 elif x > 1: return 1 else: return x def ease_in_out_quad(x: float) -> float: """https://easings.net/#easeInOutQua...
# -*- coding: utf-8 -*- """ Created on Mon Oct 11 02:33:42 2018 @author: Jingjing Luo, Wenjie Yin cICA: X: input matrix, array? Reference: [1] Wei Lu, Jagath C. Rajapakse: ICA with reference. ICA 2001 [2] Zhi-Lin Zhang, Morphologically Constrained ICA for Extracting Weak Temporally Co...
""" PEP386-version comparison algorithm. (c) Tarek Ziade and others extracted unmodified from https://bitbucket.org/tarek/distutilsversion licensed under the PSF license (i guess) UPDATE 2017-09-06: removed suggest_normalized_version function as it is not needed by the project """ import re class IrrationalVersionE...
import typing as t from craftr.build.lib import ExecutableInfo, IExecutableProvider from craftr.core.base import Action from craftr.core.impl.actions.CommandAction import CommandAction from craftr.core.impl.PropertiesTask import PropertiesTask from craftr.core.project import Project from craftr.core.property import P...
# Se importa la clase Vehiculo from vehiculo import Vehiculo class Camion(Vehiculo): # Definicion de __init__ y atributos de la clase Camion def __init__(self, marca, modelo, color, transmision, cilindros, precio, motor, existencia, ejes, potencia): # Con super se llama a __init__ de la clase padre y ...
import os from django import dispatch from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.forms.fields import CharField from django import forms from django.core.mail import EmailMessage from django.template.loader import render_to_string, select_template from django.htt...
import hashlib import json from time import time from uuid import uuid4 from flask import Flask, jsonify, request class Blockchain(object): def __init__(self): self.chain = [] self.current_transactions = [] # Create the genesis block --> first in the chain...the origin self.new_b...
import builtins import functools from typing import NoReturn, Optional, Mapping, Any from dbt.events.functions import fire_event, scrub_secrets, env_secrets from dbt.events.types import GeneralWarningMsg, GeneralWarningException from dbt.node_types import NodeType from dbt import flags from dbt.ui import line_wrap_mes...
import tkinter as _TK from tkmacosx.basewidget import _Frame, _Canvas, Widget class SFrame(_Frame): """### Scrollable Frame Widget. (Only supports vertical scrolling) #### Agrs: Sames as tkinter Frame. These are some extra resources. 1. `scrollbarwidth`: Set the width of scrollbar. 2. `mou...
# # Copyright (c) 2020 Juniper Networks, Inc. All rights reserved. # import logging import unittest import six from vnc_api.exceptions import RefsExistError # Pawel Z.: I decided to import with an asterisk because in this file # I need all available vnc_api objects. Importing hundreds of objects # line by line isn't e...
# 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 __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from distutils.spawn import find_executable from distutils import sysconfig, log import setuptools import setuptools.command.build_py import setuptools.command.develop im...
# Generated by Django 3.1.7 on 2021-03-25 03:08 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('speedcheck', '0002_auto_20210325_0906'), ] operations = [ migrations.AlterField( model_name='userscore', name='type_...
#!/usr/bin/env python """ Sample code to use with ServiceClient.pde """ import roslib; roslib.load_manifest("rosserial_arduino") import rospy from rosserial_arduino.srv import * def callback(req): print("The arduino is calling! Please send it a message:") t = TestResponse() t.output = raw_input() re...
from __future__ import annotations from typing import Any from .publickey import PublicKey from .core.http import AsyncHTTPClient from .core.types import RPCResponse from .transaction import Transaction ENDPOINTS = ( "https://api.mainnet-beta.solana.com", "https://api.devnet.solana.com", "https://api.test...
""" Manage communications between the PC and the device. Requirements: * pyserial * continuous_threading """ import sys import time import serial import functools import contextlib import continuous_threading from pybk8500.parser import Parser __all__ = ['CommunicationManager', 'send_msg', 'main'] def pop...
import json from redis import Redis from flask import current_app as app from .exceptions import BatchException cache = Redis(host='redis', db=0, decode_responses=True, socket_connect_timeout=2, socket_timeout=2) def create_jobid(user, project): counter = f'counter:{user}:{project}' n = cache.incr(counter) ...
from __future__ import absolute_import, division, print_function from mmtbx import monomer_library import mmtbx.monomer_library.server from mmtbx.monomer_library import pdb_interpretation import cctbx.adp_restraints from libtbx.test_utils import approx_equal from libtbx.utils import format_cpu_times import libtbx.load_...
from ranger.api.commands import Command class fzf_select(Command): """ :fzf_select Find a file using fzf. With a prefix argument to select only directories. See: https://github.com/junegunn/fzf """ def execute(self): import subprocess import os from ranger.ext.get_...
from ._base import * DEBUG = False WEBSITE_URL = "https://example.com" # without trailing slash
import os import tempfile from os import path from unittest.mock import MagicMock import cloudpickle import pytest import yaml import prefect from prefect.environments import DaskKubernetesEnvironment from prefect.environments.storage import Docker, Local from prefect.utilities.configuration import set_temporary_conf...
"""ShopStop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/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='home') Class-base...
# multiplicationTable.py takes a number N from the command line # and creates an N×N multiplication table in an Excel spreadsheet. from openpyxl import Workbook import sys # take N number argument from command line. if len(sys.argv) > 1: # Get number from command line. numN = int(sys.argv[1:][0]) else: pr...