text
stringlengths
2
999k
from setuptools import setup requirements = ["requests>=2.20.0,<3.0"] with open("README.md") as f: readme = f.read() with open("CHANGELOG.md") as f: changelog = f.read() setup( name="googlemaps", version="4.4.4", description="Python client library for Google Maps Platform", long_descriptio...
#!/usr/bin/python """ Auto Mount Encrypted Drives on external Credentials @Author: oliver.blakeman@carbonprojectfinance.co.uk @Date: 2018-07-25 Shebangs: (amend #!/ path at top based on env and app) ferret: #!/usr/bin/python """ # Standard import import sys import os import pwd import time # other from subpro...
for n in range(int(input())): c=float(input()) aux=0 while c>1: c/=2 aux+=1 print(f"{aux} dias") aux=0
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
# -*- coding: utf-8 -*- # # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path...
from collections import deque, defaultdict from itertools import islice from functools import wraps from fuzzysearch.common import FuzzySearchBase, Match, \ count_differences_with_maximum, get_best_match_in_group, group_matches from fuzzysearch.compat import text_type from fuzzysearch.search_exact import search_ex...
import json from banal import ensure_list from functools import cache from pantomime.types import JSON from requests.exceptions import RequestException from opensanctions.core import Dataset, Context from opensanctions import helpers as h FORMATS = ["%d %b %Y", "%d %B %Y", "%Y", "%b %Y", "%B %Y"] @cache def deref_u...
# Copyright (C) 2018 Google 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 writing, ...
# Copyright 2021 The TensorFlow Probability Authors. # # 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 ...
# -*- coding: utf-8 -*- # """*********************************************************************************************""" # FileName [ expert.py ] # Synopsis [ the phone linear downstream wrapper ] # Author [ S3PRL ] # Copyright [ Copyleft(c), Speech Lab, NTU, Taiwan ] """******************...
# Copyright 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'targets': [ { 'target_name': 'refs_to_shard_external_lib', 'type': 'static_library', 'dependencies': [ # Make sure referenc...
from torch.optim.lr_scheduler import _LRScheduler from torch.optim.lr_scheduler import ReduceLROnPlateau from torch.optim.lr_scheduler import CosineAnnealingLR class GradualWarmupScheduler(_LRScheduler): """ Gradually warm-up(increasing) learning rate in optimizer. Proposed in 'Accurate, Large Minibatch SGD: T...
# coding: utf-8 from __future__ import division, print_function, unicode_literals, \ absolute_import import glob from pymatgen.analysis.elasticity.strain import Strain from pymatgen.io.vasp import Vasprun, zpath """ This module defines tasks that acts as a glue between other vasp Firetasks to allow communicatio...
#! /usr/bin/env python # -*- coding: utf-8 -*- from downward import suites import common_setup CONFIGS = { 'astar_ipdb': [ '--search', 'astar(ipdb())'], 'astar_pdb': [ '--search', 'astar(pdb())'], 'astar_gapdb': [ '--search', ...
from unittest import TestCase from unittest.mock import patch from django.utils import timezone from django.core import signing, mail from django.contrib.sites.shortcuts import get_current_site from django.contrib.auth.models import AnonymousUser from django.shortcuts import reverse from comment.conf import settings ...
from django.contrib import admin from .models import Cart, CartItem class CartItemInline(admin.TabularInline): model = CartItem @admin.register(Cart) class CartAdmin(admin.ModelAdmin): inlines = [CartItemInline]
import numpy as np from pyflux.arma import ARIMA from pyflux.families import Laplace noise = np.random.normal(0,1,100) data = np.zeros(100) for i in range(1,len(data)): data[i] = 0.9*data[i-1] + noise[i] def test_no_terms(): """ Tests an ARIMA model with no AR or MA terms, and that the latent variabl...
import pymel.core as pm s = pm.polySphere()[0] # second in list is the history node, if construction history is on c = pm.polyCube()[0] print c, s c.setTranslation( [0,2,0] ) s.setTranslation( [1,-2,0] ) g = pm.group( s, c, n='newGroup' ) print "The children of %s are %s" % (g, g.getChildren()) #print g.getChildren...
# Copyright 2021 Tianmian Tech. 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 la...
# -*- coding: utf-8 -*- from PyQt5.QtWidgets import QApplication from Page.page import Page class Attendance(Page): def __init__(self, parent=None): super(Page, self).__init__(parent) self.setupUi(self) self.getDataFromDB() self.setRowHeader(self.row_sum) self.field = ['编号', '姓名', '迟到', '早退', '病假'...
__version__ = "1.3.2"
import functools import time def timer(function): @functools.wraps(function) def wrapper(*args, **kwargs) -> float: time_list = [] ans = None for i in range(0, 10): start = time.perf_counter() ans = function(*args, **kwargs) end = time.perf_counter() ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple script to plot waveforms in one or more files. """ from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * # NOQA from argparse import ArgumentParser from obspy import Stream, _...
#!/usr/bin/env python3 # # Plots the power spectra and Fourier-space biases for the HI. # import numpy as np import os, sys import matplotlib.pyplot as plt from pmesh.pm import ParticleMesh from scipy.interpolate import InterpolatedUnivariateSpline as ius from nbodykit.lab import BigFileMesh, BigFileCatalog, FFTPower f...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Artom Lifshitz <artom.lifshitz@enovance.com> # # 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....
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ] operations = [ migrations.CreateModel( name='GenericLink', fields=...
"""Support for monitoring the local system for anomalous events.""" from __future__ import annotations import asyncio import time from dataclasses import dataclass import datetime import logging from typing import Any, Dict, Optional, List import pprint import voluptuous as vol from homeassistant.components import p...
import time from django.db import connections from django.db.utils import OperationalError from django.core.management.base import BaseCommand class Command(BaseCommand): """Django command to pause execution until the database is avaialable""" def handle(self, *args, **options): """Handle the comman...
import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt from sklearn.utils import shuffle import tensorflow as tf from tensorflow import keras from tensorflow.keras.models import Model from tensorflow.keras.layers import Input, Embedding, Dot, Add, Flatten from tensorflow.keras.regularize...
#coding:utf-8 class Config(object): init_scale = 0.04 learning_rate = 0.001 max_grad_norm = 15 num_layers = 3 num_steps = 25 # number of steps to unroll the RNN for hidden_size = 1000 # size of hidden layer of neurons iteration = 40 save_freq = 5 #The step (counted by the number of iter...
# -*- coding:utf-8 -*- __author__ = 'Randolph' import os import sys import time import logging sys.path.append('../') logging.getLogger('tensorflow').disabled = True import tensorflow as tf from utils import checkmate as cm from utils import data_helpers as dh from utils import param_parser as parser from sklearn.me...
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image from object_detection....
# Databricks notebook source import pandas as pd from os import listdir from os.path import join, basename import struct import pickle import json import os from scipy import misc import datetime as dt from pyspark.sql.types import * from pyspark.sql.functions import udf from pyspark.ml.evaluation import MulticlassCla...
from typing import Tuple, Optional, List, Union import torch from torch.nn import * import math def gmm(x: torch.Tensor, w: torch.Tensor) -> torch.Tensor: return torch.einsum('ndo,bnd->bno', w, x) class GraphLinear(Module): def __init__(self, in_features: int, out_features: int): super().__init__() ...
from htmltreediff.diff_core import Differ from htmltreediff.edit_script_runner import EditScriptRunner from htmltreediff.changes import ( split_text_nodes, sort_del_before_ins, _strip_changes_new, _strip_changes_old, ) from htmltreediff.util import ( minidom_tostring, node_compare, parse_min...
""" module SimPEG.electromagnetics.natural_source SimPEG implementation of the natural source problem (including magenetotelluric, tipper and ZTEM) """ from . import utils from . import sources as Src from . import receivers as Rx from .survey import Survey, Data from .fields import Fields1DPrimarySecondary, Field...
#!/usr/bin/env python # Copyright (c) 2016 The UUV Simulator 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...
# coding: utf-8 """ InfluxDB OSS API Service. The InfluxDB v2 API provides a programmatic interface for all interactions with InfluxDB. Access the InfluxDB API using the `/api/v2/` endpoint. # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa:...
from default_types_fwrap import * __doc__ = u''' >>> bar(100,200,300) == (1, 2.0, 3.0) True '''
from django.db import models class CapitalizeField(models.CharField): def __init__(self, *args, **kwargs): super(CapitalizeField, self).__init__(*args, **kwargs) def pre_save(self, model_instance, add): value = getattr(model_instance, self.attname, None) if value: value =...
# -*- coding: utf-8 -*- """ @Time : 2020/10/21 10:39 @Auth : Qi @IDE : PyCharm @Title: 6. Z 字形变换 @Link : https://leetcode-cn.com/problems/zigzag-conversion/ """ class Solution: def convert(self, s: str, numRows: int) -> str: if numRows <= 0: return '' if numRows == 1: retu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Based on Kenneth Reitz's setup.py: # https://github.com/kennethreitz/setup.py # Note: To use the 'upload' functionality of this file, you must: # $ pip install twine import io import os import sys from shutil import rmtree from setuptools import find_packages, setup...
from threading import Event class Message: def __init__(self, timeout=10): self._ready = Event() self._timeout = timeout self._response = None @property def result(self): received = self._ready.wait(timeout=self._timeout) if not received: raise MqttErro...
import numpy as np # from scipy.misc import imread, imresize from scipy import misc def preprocess_input(x, v2=True): x = x.astype('float32') x = x / 255.0 if v2: x = x - 0.5 x = x * 2.0 return x def _imread(image_name): return misc.imread(image_name) def _imresize(image_array,...
# 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.package import * class PyNeurolab(PythonPackage): """Simple and powerfull neural network library for pyth...
import unittest from conans.client.conf import get_default_settings_yml from conans.client.generators.pkg_config import PkgConfigGenerator from conans.model.build_info import CppInfo from conans.model.conan_file import ConanFile from conans.model.env_info import EnvValues from conans.model.ref import ConanFileReferenc...
from decisionengine.framework.modules import Source, SourceProxy BillingInfoSourceProxy = SourceProxy.SourceProxy Source.describe(BillingInfoSourceProxy)
"""Serialization tests."""
from dataclasses import dataclass, field from typing import Dict @dataclass class FooType: class Meta: name = "fooType" value: str = field( default="", metadata={ "required": True, } ) any_attributes: Dict[str, str] = field( default_factory=dict, ...
# Copyright The PyTorch Lightning 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 applicable law or agreed to i...
{ "targets": [ { "target_name": "modsecurity", "sources": [ "modsecurity_wrap.cxx" ], "include_dirs": ['/usr/include/modsecurity/',], "libraries": ['/usr/lib/libmodsecurity.a', '/usr/lib/libmodsecurity.so', '/usr/lib/libmodsecurity.a', '/usr/lib/libmodsecurity.so.3.0.0', ...
import tempfile import webbrowser import time import os import pygtk import gtk try: from StringIO import StringIO except ImportError: from io import StringIO from grab import Grab from .base import CaptchaBackend pygtk.require('2.0') class CaptchaWindow(object): def __init__(self, path, solution): ...
supported_archs = ["x86"] supported_bits = [32, 64]
#%% import numpy as np import pandas as pd import futileprot.viz import altair as alt import altair_saver import scipy.stats colors, palette = futileprot.viz.altair_style() # Add metadata DATE = '2021-08-14' RUN_NO = 1 STRAINS = 'DoubleKO' MEDIUM = 'acetate' # Load the measurement data data = pd.read_csv(f'./output...
# -*- coding: utf-8 -*- from . import wizard_wxwork_contacts_sync from . import wizard_wxwork_sync_tag from . import wizard_wxwork_sync_user
from __future__ import unicode_literals from django.db import models from django import forms from django.template.defaultfilters import slugify from django.contrib.auth.models import User from django.utils import timezone class Category(models.Model): name = models.CharField(max_length=128, unique=True) vie...
import matplotlib.colors import matplotlib.pyplot as plt import numpy as np from pcl_helper import * print('run features.py') def rgb_to_hsv(rgb_list): rgb_normalized = [1.0 * rgb_list[0] / 255, 1.0 * rgb_list[1] / 255, 1.0 * rgb_list[2] / 255] hsv_normalized = matplotlib.colors.rgb_to_hsv([[rgb_normalized]]...
from django.shortcuts import get_object_or_404, render_to_response from django.template import RequestContext from django.utils.translation import ugettext as _ from django.http import HttpResponseRedirect from django.conf import settings from django.contrib import messages from django.core.context_processors import cs...
#!/usr/bin/env python # Jonas Schnelli, 2013 # make sure the blackdiamondcoin-Qt.app contains the right plist (including the right version) # fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267) from string import Template from datetime import date bitcoinDir = "...
#!/usr/bin/env python3 # Copyright (c) 2018-2020 The Particl Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import os import json import configparser from test_framework.test_falcon import ( FalconTestFramewo...
from mmdet.apis import init_detector, inference_detector, show_result, draw_poly_detections import mmcv from mmcv import Config from mmdet.datasets import get_dataset import cv2 import os import numpy as np from tqdm import tqdm import DOTA_devkit.polyiou as polyiou import math import pdb def py_cpu_nms_poly_fast_np(d...
from __future__ import unicode_literals import ast from collections import OrderedDict import json import logging from django.contrib.auth import get_user_model from rest_framework import fields, serializers from rest_framework_bulk import BulkSerializerMixin, BulkListSerializer from . import auth from .. import exc,...
# coding: utf-8 import datetime import pytest import numpy as np from ...models.transition.linear import ConstantVelocity from ...predictor.kalman import ( KalmanPredictor, ExtendedKalmanPredictor, UnscentedKalmanPredictor, SqrtKalmanPredictor) from ...types.prediction import GaussianStatePrediction from ...ty...
import numpy as np import cv2 import imageMarker lucas_kanade_params = dict( winSize= (4, 4), maxLevel= 3, #level of pyramids used criteria= (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03) ) def mark_features_on_all_images(images, features_coordinates): marked_images = [] marked_frame_...
def handle(foo, **args, <error descr="multiple ** parameters are not allowed">**moreargs</error>): print(foo, args, moreargs) def handle(foo, **args: int, <error descr="multiple ** parameters are not allowed">**moreargs: int</error>): print(foo, args, moreargs)
""" ANN for evaluating model biases, differences, and other thresholds using explainable AI (add warmth/cool GFDL-CM3 model only) Reference : Barnes et al. [2020, JAMES] Author : Zachary M. Labe Date : 20 July 2021 Version : 4 - subsamples random weight class (#8) for mmmean """ ### Import packages imp...
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.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 # (a...
class _OBJECT_ATTRIBUTES(_OBJECT_ATTRIBUTES): @classmethod def from_string(cls, path, attributes=OBJ_CASE_INSENSITIVE): # Directly on constructor ? self = cls() self.Length = ctypes.sizeof(self) self.RootDirectory = 0 self.ObjectName = ctypes.pointer(LSA_UNICODE_STRING.from_strin...
import pytest from bitgesellx.lib.script import OpCodes, is_unspendable_legacy, is_unspendable_genesis @pytest.mark.parametrize("script, iug", ( (bytes([OpCodes.OP_RETURN]), False), (bytes([OpCodes.OP_RETURN]) + bytes([2, 28, 50]), False), (bytes([OpCodes.OP_0, OpCodes.OP_RETURN]), True), (bytes([OpC...
# -*- coding: utf-8 -*- import aiounittest from datetime import datetime from .fixtures_aio import fixture_data, Worker, Workers, Account from graphenecommon import exceptions class Testcases(aiounittest.AsyncTestCase): def setUp(self): fixture_data() async def test_worker(self): w = await Wo...
# pylint: disable=unused-import import os import docker import pytest from dagster_celery_k8s.launcher import CeleryK8sRunLauncher from dagster_k8s_test_infra.helm import TEST_AWS_CONFIGMAP_NAME from dagster_k8s_test_infra.integration_utils import image_pull_policy from dagster_test.test_project import build_and_tag_t...
""" File: __init__.py Author: Panyi Dong GitHub: https://github.com/PanyiDong/ Mathematics Department, University of Illinois at Urbana-Champaign (UIUC) Project: My_AutoML Latest Version: 0.2.0 Relative Path: /My_AutoML/_legacy/__init__.py File Created: Thursday, 7th April 2022 3:59:55 pm Author: Panyi Dong (panyid2@i...
from bokeh.io import show, output_notebook from bokeh.models import (CDSView, ColorBar, ColumnDataSource, CustomJS, CustomJSFilter, GeoJSONDataSource, HoverTool, LinearColorMapper, Slider) from bokeh.layouts import column, row, widgetbox # p...
# Copyright 2014 ksyun.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license" fil...
# 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 ...
import datetime from dimagi.ext.couchdbkit import (Document, StringProperty, ListProperty, DictProperty, DateProperty) from corehq.apps.groups.models import Group from .constants import * class LegacyWeeklyReport(Document): """ This doc stores the aggregate weekly results per site. Example: ...
# -*- 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...
__version__ = "0.7.1" from .vault_settings import VaultParameterError, vault_config_settings_source __all__ = ["vault_config_settings_source", "VaultParameterError"]
# Auto-generated at 2021-09-27T17:01:26.691956+08:00 # from: Justice Lobby Service (1.33.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylin...
#!/usr/bin/env python from Bio import SeqIO import argparse import pathlib def get_arguments(): parser = argparse.ArgumentParser(description='Extract CDS from a genbank to output a fasta', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('input', type=str, help='Path to input...
import logging import pandas as pd from stock.models import MyStock from stock.models import ValuationRatio from yahooquery import Ticker logger = logging.getLogger("stock") class MyValuationRatio: def __init__(self, symbol): self.stock = MyStock.objects.get(symbol=symbol) def get(self): s...
from six.moves.urllib_parse import urlparse import chardet import itertools import json import os import re import six from collections import OrderedDict, namedtuple from itertools import chain from scrapely.htmlpage import HtmlPage, HtmlTagType from scrapy.utils.misc import load_object from w3lib.encoding import ht...
# author: Justus Schock (justus.schock@rwth-aachen.de) import torch class CustomGroupNorm(torch.nn.Module): """ Custom Group Norm which adds n_groups=2 as default parameter """ def __init__(self, n_features, n_groups=2): """ Parameters ---------- n_features : int ...
# Copyright 2014-2015 Canonical Limited. # # 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 ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Timed calls to subprocess, so that real execution times can be obtained. """ __author__ = "Miguel Hernández Cabronero <miguel.hernandez@uab.cat>" __date__ = "23/05/2020" import os import subprocess import re import time import platform import shutil class InvocationE...
def _close_(fh): """Implementation of perl close""" global AUTODIE, TRACEBACK, OS_ERROR, TRACE_RUN try: if hasattr(fh, '_sp'): # issue 72: subprocess fh.flush() fh._sp.communicate() if TRACE_RUN: sp = subprocess.CompletedProcess(f"op...
import win32com.client as wc from utils import vstr from utils import vshort from utils import vstrarr from utils import check_error from bc import SiebelBusObject from ps import SiebelPropertySet from bs import SiebelService PROGID = 'SiebelDataServer.ApplicationObject' class SiebelApplication(object): def __...
from lxml import html import requests url = 'https://www.transfermarkt.com/ac-mailand/transfers/verein/5/saison_id/2017' headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0' } page = requests.get(url, headers=headers) tree = html.fromstring(page.content) pl...
def for_O(): """printing capital 'O' using for loop""" for row in range(5): for col in range(5): if col==0 and row not in(0,4) or col==4 and row not in(0,4) or row==0 and col in(1,2,3) or row==4 and col in(1,2,3) : print("*",end=" ") else: p...
#!/usr/bin/env python2 # -*- mode: python -*- # # Electrum - lightweight Bitcoin client # Copyright (C) 2016 The Electrum developers # # 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...
from __future__ import print_function import os import sys import argparse import torch import torch.backends.cudnn as cudnn import numpy as np from data import cfg_mnet, cfg_re50 from layers.functions.prior_box import PriorBox from utils.nms.py_cpu_nms import py_cpu_nms import cv2 from models.retinaface import RetinaF...
import os import hashlib from PyQt5 import uic from PyQt5.QtWidgets import QMainWindow, QMessageBox from internationalization import LANGUAGE from logic import Hash from windows.message import Message from databaseAccess import DbMethods class AddWindow(QMainWindow): def __init__(self, lang): QMainWindow._...
from __future__ import print_function import sys sys.path.insert(1,"../../../") from tests import pyunit_utils import h2o from h2o.utils.typechecks import assert_is_type from h2o.frame import H2OFrame def h2oparse_raw(): """ Python API test: h2o.parse_raw(setup, id=None, first_line_is_header=0) copied fro...
import json import boto3 import os client = boto3.client('dynamodb') CURRENT_COUNTS_TABLE_NAME = os.environ['CURRENT_COUNTS_TABLE_NAME'] AVERAGE_COUNTS_TABLE_NAME = os.environ['AVERAGE_COUNTS_TABLE_NAME'] def lambda_handler(event, context): if "getCurrentCounts" in event: response = client.scan(TableName=C...
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from typing import List, Tuple, Union, Optional from overrides import overrides, EnforceOverrides from torch.utils.data.dataset import Dataset import torchvision from torchvision.transforms import transforms from torch.utils.data impo...
# coding: utf-8 """ InsightVM API # Overview This guide documents the InsightVM Application Programming Interface (API) Version 3. This API supports the Representation State Transfer (REST) design pattern. Unless noted otherwise this API accepts and produces the `application/json` media type. This API uses ...
import sys from setuptools import setup if sys.version_info < (3, 5): print('rets requires Python 3.5 or later') sys.exit(1) long_desc = 'Python 3 client for the Real Estate Transaction Standard (RETS) Version 1.7.2' install_requires = [ 'requests>=2.12.3', 'requests-toolbelt>=0.7.0,!=0.9.0', '...
from logging import debug, info, warning, error, exception import re from datetime import datetime, timedelta from .. import AbstractServiceHandler from data.models import Episode, UnprocessedStream class ServiceHandler(AbstractServiceHandler): _show_url = "http://crunchyroll.com/{id}" _show_re = re.compile("crunch...
# Copyright 2013-2021 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 RMultcomp(RPackage): """Simultaneous tests and confidence intervals for general linear ...
""" Copyright (c) 2018-2019 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...