text
stringlengths
2
999k
from os.path import splitext import numpy as np import matplotlib.pylab as plt import seaborn as sbn # enumerate results files result_files = np.loadtxt('result_filenames.np', dtype=str) model_tech_time = {} # plot and save results to png for result_filename in result_files: # save ave k-fold cpu time to diction...
# USAGE # python load_display_save.py --image ../images/trex.png # Import the necessary packages from __future__ import print_function import argparse import cv2 # Construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-i", "--image", required = True, help = "Path to t...
""" About this library ================== Go is a continuous delivery system - http://www.go.cd/ The goal of this python library is to be an easy interface for the Go server. This project was inspirated in the jenkinsapi library - https://github.com/salimfadhley/jenkinsapi This library can help you: * Ability to lis...
# quality.py - functions for measuring partitions of a graph # # Copyright 2015 NetworkX developers. # # This file is part of NetworkX. # # NetworkX is distributed under a BSD license; see LICENSE.txt for more # information. """Functions for measuring the quality of a partition (into communities). """ from __future__ ...
#!/usr/bin/env python """ Extracts data from XNAT archive folders into a few well-known formats. Usage: dm_xnat_extract.py [options] <study> [-t <tag>]... dm_xnat_extract.py [options] <study> <experiment> [-t <tag>]... Arguments: <study> Nickname of the study to process <experiment> ...
import os import time import numpy as np from autopylot.actuators import Actuator from autopylot.cameras import Camera from autopylot.controllers import Controller from autopylot.datasets import preparedata, transform from autopylot.models import utils from autopylot.utils import io, logger, memory, settings, state_sw...
# Copyright (C) 2007-2017, Raffaele Salmaso <raffaele@salmaso.org> # # 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, cop...
# # This file is part of Orchid and related technologies. # # Copyright (c) 2017-2020 Reveal Energy Services. All Rights Reserved. # # LEGAL NOTICE: # Orchid contains trade secrets and otherwise confidential information # owned by Reveal Energy Services. Access to and use of this information is # strictly limited and...
import os import tempfile import unittest import filecmp import sbol3 import paml import tyto # import paml_md import uml ############################################# # set up the document print("Setting up document") doc = sbol3.Document() sbol3.set_namespace("https://bbn.com/scratch/") ##########################...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-07-31 10:26 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('plea', '0037_auto_20170614_1124'), ] operations = [ migrations.AlterField( ...
""" RenderPipeline Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the right...
import sys, os try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() requirements = [ # TODO: put package requirements here ] test_requirements = [ 'nose' # TODO: put package test requirements here ] setup( name='difflib2', ...
from sqlalchemy import Column, Integer, DateTime from alchemist_stack.repository.models import Base __author__ = 'H.D. "Chip" McCullough IV' class TestTable(Base): __tablename__ = 'test' primary_key = Column('id', Integer, primary_key=True) timestamp = Column(DateTime(timezone=True), nullable=Fa...
# !/usr/bin/python3 # -*- coding: utf-8 -*- from graphviz import Digraph def build_graph(usercase, lintents): """ Build the graph based on a list of Intent Objects (from api_ai_graph.intent) :type lintents: list :type usercase: str :param lintents: list of all intents from usercase :param usercase: name of the...
import os import time import numpy as np import torch import gym import gym_cabworld from algorithms.a2c_model import PolicyNetwork from common.features import clip_state, cut_off_state from common.logging import create_log_folder, get_last_folder from common.logging import Tracker def train_a2c(n_episodes): f...
from datetime import datetime from application.auth import encrypt from repository import transaction from domain.models import User from repository.user_repo import get_user_by_username from repository.session_repo import logout, fail_login, login as login_db from domain.constants import WRONG_USERNAME_PASSWORD, MUST...
import idc import ida_idaapi import ida_search import ida_bytes import ida_funcs import ida_gdl import ida_ua import ida_segment import os import json class notable_inst_t(object): def __init__(self, frules=os.path.join(os.path.dirname(__file__),"notable_insts.json"), show_high_ent=False, cmt_prefix=...
from __future__ import print_function import math, json, os, pickle, sys import keras from keras.callbacks import CSVLogger, EarlyStopping, ModelCheckpoint from keras.layers import Dense, Dropout, Flatten from keras.layers import Convolution2D, MaxPooling2D, ZeroPadding2D from keras.layers import Conv2D, MaxPooling2D ...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from typing import Dict, Optional from pytext.common.constants import BatchContext from .metric_reporter import MetricReporter AVRG_LOSS = "_avrg_loss" class DisjointMultitaskMetricReporter(MetricReporter): lower_is_...
from theming.styles import globalStyles from PyQt5 import QtCore, QtGui, QtWidgets from sites.walmart import Walmart from sites.bestbuy import BestBuy from sites.target import Target from sites.gamestop import GameStop from sites.newegg import NewEgg from pages.createdialog import CreateDialog from pages.pollbrowser im...
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/joseph/other_research/crazyflie_ros/devel/include;/home/joseph/other_research/crazyflie_ros/src/hector_quadrotor/hector_uav_msgs/include".split(';') if "/home/joseph/other_research/crazyflie_ros/...
'''Copyright 2018 KNet Solutions, India, http://knetsolutions.in 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 ap...
""" Plot multiple datasets ---------------------- This is an example of how to download and plot multiple datasets at a time. """ import matplotlib.pyplot as plt import os import act # Place your username and token here username = os.getenv('ARM_USERNAME') token = os.getenv('ARM_PASSWORD') # Get data from the web...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import cgi import os import re import shutil from pathlib import Path from astropy import units as u from astroquery.utils import commons from astroquery import log from astroquery.exceptions import LoginError from astroquery.query import BaseQuery from ...
####################################################################### # Implements a topological sort algorithm. # # Copyright 2014 True Blade Systems, 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 ...
from PreprocessData.all_class_files.GeoShape import GeoShape import global_data class GeoCircle(GeoShape): def __init__(self, additionalType=None, alternateName=None, description=None, disambiguatingDescription=None, identifier=None, image=None, mainEntityOfPage=None, name=None, potentialAction=None, sameAs=...
""" Heroku manager for your userbot """ import heroku3 import asyncio import os import requests import math from userbot.utils import register from userbot.utils import admin_cmd Heroku = heroku3.from_key(Var.HEROKU_API_KEY) heroku_api = "https://api.heroku.com" @register(outgoing=True, pattern=r"^\.(set|get|de...
import os from pathlib import Path from unittest.mock import Mock from panoramic.cli.local.reader import FilePackage, FileReader from panoramic.cli.paths import FileExtension, Paths, PresetFileName, SystemDirectory def test_reader_get_packages(tmp_path: Path): # scanned directory scanned_dir = tmp_path / Sys...
# coding=utf-8 #exec(open('setup.py').read()) import sys from yacryptopan import CryptoPAn def getFile(): datContent = [i.strip().split() for i in open(sys.argv[1]).readlines()] for x in datContent: x[4] = getCryptopan(x[4]) x[5] = getCryptopan(x[5]) return datContent def getCryptopan(addr...
#! /usr/bin/env python #-----------------------------------------# # Copyright [2015] [Kelcey Jamison-Damage] # 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.or...
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import re import sys import uuid import json import time import getpass...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.9.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
""" This file was generated with the customdashboard management command and contains the class for the main dashboard. To activate your index dashboard add the following to your settings.py:: GRAPPELLI_INDEX_DASHBOARD = 'hispaniae.dashboard.CustomIndexDashboard' """ from django.utils.translation import ugettext_...
from x_rebirth_station_calculator.station_data import modules from x_rebirth_station_calculator.station_data.station_base import Station names = {'L044': 'Plankton Tankfarm', 'L049': 'Plankton-Tankfarm'} smodules = [modules.PlanktonTank(production_method='ar', efficiency=196), modules.PlanktonTan...
#!/usr/bin/env python3 # Copyright 2013-2016 The Meson development team # 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...
''' A salt module for SSL/TLS. Can create a Certificate Authority (CA) or use Self-Signed certificates. :depends: - PyOpenSSL Python module :configuration: Add the following values in /etc/salt/minion for the CA module to function properly:: ca.cert_base_path: '/etc/pki' ''' # pylint: disable=C0103 # ...
import argparse, os, sys, json from pathlib import Path from datetime import datetime from urllib.request import Request, urlopen from inc.shared.inc.helpers.log_helpers import log_message ojp_api_key = '57c5dbbbf1fe4d000100001842c323fa9ff44fbba0b9b925f0c052d1' request_url = 'https://api.opentransportdata.swiss/gtfs...
""" Adlibre Deployment Script for CentOS / EL 5/6 / Amazon AMI All commands should be idempotent """ from fabric.api import env, run, put, sudo, prefix from fabric.contrib.files import append, comment, exists, sed def _get_os_major_version(): """ Helper function to determine OS major version """ if exists(...
import os import numpy as np import javabridge as jv import bioformats as bf from collections import namedtuple ShapeTZCYX = namedtuple("Shape", ["T", "Z", "C", "Y", "X"]) """5D shape object""" class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: ...
import torch from collections import OrderedDict, Mapping, Sequence def merge_distributed(data_list, max_len=None): if torch.distributed.is_initialized() and torch.distributed.get_world_size()>1: world_size = torch.distributed.get_world_size() else: world_size = 1 merged = [] def gather(data): data...
__author__ = 'prempal' import serial import csv import matplotlib.pyplot as plt import matplotlib.animation as animation import math SERIAL_PORT = '/dev/ttyUSB0' BAUD_RATE = 9600 FILE_NAME = "CANSAT2015_TLM_<TEAM_ID>.csv" HEADER_ROW = ['TEAM_ID','MISSION_TIME','ALT_SENSOR','OUTSIDE_TEMP','INSIDE_TEMP', 'VOLTAGE','FSW...
"""Subsets ungridded predictions by space. Specifically, this script groups predictions into cells on an equidistant grid and writes one prediction file per grid cell. """ import argparse import numpy from gewittergefahr.gg_io import storm_tracking_io as tracking_io from gewittergefahr.gg_utils import grids from gewi...
#External Libraries import json, csv import os,sys import logging import argparse #internal libraries sys.path.insert(0, './lib') from scraperlibrary import ( soupedUp, cleanHeader, cleanData, ) from etllibrary import ETL parser = argparse.ArgumentParser() parser.add_argument("-o", "--output", ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-11 04:32 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('boards', '0005_game_date'), ] operations = [ m...
""" The MIT License (MIT) Copyright (c) 2018 Dave Astels 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, ...
import unittest from misc import printdoc from cloudfiles.utils import unicode_quote, parse_url @printdoc def test_parse_url(): """ Validate that the parse_url() function properly returns the hostname, port number, path (if any), and ssl boolean. Attempts several different URL permutation...
class Solution: def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]: h = [0] * 101 for num in nums: h[num] += 1 prev = 0 for i, num in enumerate(h): h[i] = prev prev += num return [h[num] for num in nums]
# A simple torch style logger # (C) Wei YANG 2017 from __future__ import absolute_import import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import os import sys import numpy as np __all__ = ['Logger', 'LoggerMonitor', 'savefig'] def savefig(fname, dpi=None): dpi = 150 if dpi == None else dpi...
from .helpers import get_object from werkzeug.exceptions import InternalServerError from kqueen.conftest import ClusterFixture import pytest class TestGetObject: def setup(self): self.test_cluster = ClusterFixture() self.cluster = self.test_cluster.obj self.cluster.save() def teardo...
# 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, software # d...
import os import numpy as np import sklearn from sklearn import preprocessing import torch from torch.utils.data import Dataset from torch.utils.data.sampler import Sampler from utils import load_w2v_feature import settings import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, f...
import unittest from homework.homework1.task1.vector import Vector class IntegerVectorTestCase(unittest.TestCase): def test_constructor_zero_length(self): with self.assertRaises(ValueError) as context: Vector() self.assertTrue("The vector must contain at least one element." in str(con...
TEST_OCF_ACCOUNTS = ( 'sanjay', # an old, sorried account with kerberos princ 'alec', # an old, sorried account with no kerberos princ 'guser', # an account specifically made for testing 'nonexist', # this account does not exist ) TESTER_CALNET_UIDS = ( 872544, # daradib 1034192, # ckueh...
""" """ from django.contrib.auth import get_user_model from django.utils.translation import gettext_lazy as _ from rest_framework import serializers # from rest_framework.authtoken.models import Token from rest_framework.reverse import reverse from policy.models import Quote, Policy, UserPolicyHistory Customer = get...
# # channel_islands_to_cct.py # # Convert the Channel Islands data set to a COCO-camera-traps .json file # # Uses the command-line tool ExifTool (exiftool.org) to pull EXIF tags from images, # because every Python package we tried failed to pull the "Maker Notes" field properly. # #%% Imports, constants, paths ## Imp...
SECRET_KEY = 'devkey'
import pytest import numpy as np import tensorflow as tf from fv3fit.emulation import layers _all_layers = [ layers.StandardNormLayer, layers.StandardDenormLayer, layers.MaxFeatureStdNormLayer, layers.MaxFeatureStdNormLayer, layers.MeanFeatureStdNormLayer, layers.MeanFeatureStdDenormLayer, ] ...
# -*- coding: utf-8 -*- import logging from unittest.mock import patch from click.testing import CliRunner from slow_start_rewatch.__main__ import main from slow_start_rewatch.exceptions import Abort, SlowStartRewatchException @patch("slow_start_rewatch.__main__.App") def test_run_successfully(mock_app): """Te...
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # 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...
""" Custom Recipe to extract Readability features from the text data ## About Readability Features ## References - https://github.com/shivam5992/textstat - http://www.readabilityformulas.com/free-readability-formula-tests.php """ from h2oaicore.transformer_utils import CustomTransformer import ...
# -*- coding: utf-8 -*- """ Created on Wed Aug 26 11:46:42 2020 @author: SELICLO1 """ from collections import defaultdict def RC_char(c): if c == 'A': return 'T' if c == 'C': return 'G' if c == 'G': return 'C' if c == 'T': return 'A' def ReverseComplement(string): rc = "" for c in reverse...
# encoding: utf-8 """ Miscellaneous functions. """ from __future__ import division import numpy as np __all__ = [ 'logspace_int' ] def logspace_int(limit, num=50): """ Returns integers spaced (approximately) evenly on a log scale. This means the integers are exponentially separated on a linear scal...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-01-12 19:39 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('references', '0042_toptieragency_fpds_code'), ] operations = [ migrations.AlterUniq...
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class ListRedislogRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The ke...
#!/usr/bin/env python # Copyright 2020 Stanford University # # 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 applicabl...
import os import sys CWD = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(CWD, '..', 'src')) from classes import * def ModelsDummy(): class Models(object): def __init__(self): self.Confidences = ConfidencesDummy() self.TrendStrengths = TrendStrengthsDummy() self.Posit...
FLASK_APP=run FLASK_DEBUG=1
from discord.ext import commands import discord from os import getenv import traceback import re bot = commands.Bot(command_prefix='/') guild = discord.Guild # Values from env token = getenv('DISCORD_BOT_TOKEN') botName = getenv('BOT_NAME') adminIds = getenv('ADMIN_IDS') target_channels = getenv('TARGET_CHANNEL_IDS')...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function from __future__ import division import numpy as np import torch from torch.autograd import Variable, gradcheck try: import tensorflow as tf except ImportError: tf = None from .crop_and_resize import CropAndResiz...
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
"""Generate html report from MNE database.""" # Authors: Alex Gramfort <alexandre.gramfort@telecom-paristech.fr> # Mainak Jas <mainak@neuro.hut.fi> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import os import os.path as op import fnmatch import re import codecs import time from...
from django import forms from django.forms import modelformset_factory from . import models from accounts.util import refresh_project_memberships class UpdateProjectForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if kwargs.get('instance'): ...
import gc import json import logging import socket import time import traceback from io import BytesIO from typing import List from PIL import Image from fastapi import FastAPI, File, UploadFile from prometheus_client import CollectorRegistry, multiprocess, generate_latest, Counter from redlock import Redlock from req...
""" Django settings for awards project. Generated by 'django-admin startproject' using Django 3.2.9. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib ...
for i in range(int(input())): n,p,k= list(map(int, input().split())) #n= int(n) #p=int(p) #k=int(k) ans=0 a=p%k - 1 b=((n-1)//k)*k b=n-1-b if (a>b): ans+=(b+1)*((n-1)//k + 1)+ (a-b)*((n-1)//k) else: ans+=((n-1)//k +...
import os from setuptools import setup, find_packages # Get the README.md text with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f: readme = f.read() # Parse vfxwindow/__init__.py for a version with open(os.path.join(os.path.dirname(__file__), 'vfxwindow/__init__.py'), 'r') as f: for li...
from django.conf import settings from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home...
from ui_automation_tests.pages.BasePage import BasePage class Shared(BasePage): ORG_NAME_HEADING_ID = "org_name" RADIO_BUTTONS = ".govuk-radios__label" # CSS ERROR_MESSAGES = ".govuk-error-summary__body" GOV_TABLE_BODY = ".govuk-table__body" GOV_TABLE = ".govuk-table" GOV_TABLE_ROW = ".govuk-...
from os import getenv from dotenv import load_dotenv load_dotenv() que = {} SESSION_NAME = getenv("SESSION_NAME", "session") BOT_TOKEN = getenv("BOT_TOKEN", "") BOT_NAME = getenv("BOT_NAME", "") admins = {} API_ID = int(getenv("API_ID")) API_HASH = getenv("API_HASH", "") BOT_USERNAME = int(getenv("BOT_USERNAME")) S...
import os import json import unittest from scrapy.crawler import CrawlerProcess from page_with_cycle_spider import PageWithCycleSpider from single_page_spider import SinglePageSpider from single_subpage_spider import SingleSubpageSpider class TestCrawling(unittest.TestCase): @classmethod def setUpClass(cls):...
import collections # An item can be represented as a namedtuple Item = collections.namedtuple('Item', ['weight', 'value']) def knapsack_max_value(knapsack_max_weight, items): """ Get the maximum value of the knapsack. """ # Initialize a lookup table to store the maximum value ($) memoization = ...
#!/usr/bin/env python """ Wrapper around pip to install python distributions within Homebrew. """ __version__ = '0.4.0' import re import os import shutil import argparse import tempfile HOMEBREW_CELLAR = os.environ.get("HOMEBREW_CELLAR") def main(args): for package in args.packages: # Just the name par...
import sys sys.path.append("..") import os import time import json import torch import argparse import numpy as np import torch.nn as nn from tqdm import tqdm from GNN.dataset import DataSet from itertools import product from gnn import HierarchicalGNN, MLP, Linear, CustomizedGNN from torch.nn import functional as F f...
from nltk import word_tokenize import string from nltk.stem import SnowballStemmer from tqdm import tqdm """ This file used to generate baseline paraphrases from ppdb. """ PPDB_DB = "./rep_ppdb/ppdb-2.0-tldr" ############ THIS IS THE NLTK-BASED PARAPHRASE GENERATOR !!!! ########## def add_to_dict_of_set(key, value, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function """ dlhn -- a Python CLI script to download my comments and submissions from the Hacker News API and generate a static HTML archive with a Jinja2 template TODO: - TODO: expand all / collapse all - TODO: favorites """ import codecs imp...
DB_USERNAME = "USERNAME" DB_PASSWORD = "PASSWORD" DB_PORT = "PORT" DB_HOST = "HOST" DB_NAME = "DB" DB_DRIVER_NAME = "DRIVER_NAME" CACHE_TYPE_REDIS = "REDIS" CACHE_TYPE_MEMCACHED = "MEMCACHED" CACHE_PASSWORD = "PASSWORD" CACHE_PORT = "PORT" CACHE_HOST = "HOST" ASSET_CLOUD_NAME = "CLOUD_NAME" ASSET_API_KEY = "API_KEY"...
import asyncio import typing import logging import binascii from lbry.dht.peer import make_kademlia_peer from lbry.error import DownloadSDTimeoutError from lbry.utils import resolve_host, lru_cache_concurrent from lbry.stream.descriptor import StreamDescriptor from lbry.blob_exchange.downloader import BlobDownloader i...
import tensorflow as tf import tensorflow.contrib.slim as slim import reader import losses import epn_test import os import numpy as np import scipy.io as sio flags = tf.flags FLAGS = flags.FLAGS flags.DEFINE_integer('origin_col', 32, 'origin column of data/target') flags.DEFINE_integer('origin_row', 32, 'origin row o...
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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,...
import bpy class MATERIAL_UL_matslots_example(bpy.types.UIList): # The draw_item function is called for each item of the collection that is visible in the list. # data is the RNA object containing the collection, # item is the current drawn item of the collection, # icon is the "computed" icon f...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
VERSION = (0, 96.1, None)
import sublime_plugin from ...settings import * class PhpactorSidebarClassInflectCommand(sublime_plugin.WindowCommand): def run(self, files): request = { 'action': 'class_inflect', 'parameters': { 'current_path': files[0] } } self.window.a...
import numpy as np import matplotlib.pyplot as plt import sklearn from sklearn.preprocessing import PolynomialFeatures def plot_data(X,y,xlabel,ylabel): fig = plt.figure() plt.plot(X,y,'bo') plt.xlabel(xlabel) plt.ylabel(ylabel) def plot_line(X,y,xlabel,ylabel): fig = plt.figure() plt.plot(X,...
from iree import runtime as ireert from iree.tf.support import module_utils from iree.compiler import tf as tfc from iree.compiler import compile_str from absl import app import time import numpy as np import os import tensorflow as tf from official.nlp.modeling import layers from official.nlp.modeling import network...
"""HomeKit session fixtures.""" from pyhap.accessory_driver import AccessoryDriver import pytest from homeassistant.components.homekit.const import EVENT_HOMEKIT_CHANGED from homeassistant.core import callback as ha_callback from tests.async_mock import patch @pytest.fixture def hk_driver(loop): """Return a cus...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 load("@//rules:opentitan.bzl", "opentitan_flash_binary", "opentitan_rom_binary") load("@bazel_skylib//lib:shell.bzl", "shell") _EXIT_SUCCESS = r"PASS.*\n" _EXIT_FAILURE = ...
""" Support for MQTT message handling. For more details about this component, please refer to the documentation at https://home-assistant.io/components/mqtt/ """ import logging import os import socket import time import voluptuous as vol from homeassistant.core import callback from homeassistant.bootstrap import pre...
# -*- coding: utf-8 -*- # 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...
# 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 ...