text
stringlengths
1
927k
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AdvertItem import AdvertItem class Advert(object): def __init__(self): self._advert_id = None self._advert_items = None @property def advert_id(self)...
first_list = ["O","X","A","C","D","K"] second_list = ['1','2','3','4','5','6'] zipped_pairs = zip(first_list,second_list) sorted_pairs = sorted(zipped_pairs) result = [item[1] for item in sorted_pairs] print(result)
from src.utilities.parser.parse import ParseFileName from src.utilities.database.query import QueryExtractedMovies from src.utilities.database.insert import InsertTransformedMovies class ParseExtractedMovies: Parser = ParseFileName() @classmethod def process(cls): for movie in QueryExtractedMov...
#!M:\Code\Github\PRAW-KeyWord-Searcher\venv\Scripts\python.exe import argparse import code import sys import threading import time import ssl import gzip import zlib import six from six.moves.urllib.parse import urlparse import websocket try: import readline except ImportError: pass def get_encoding(): ...
# Built from the SKLearn basic text processing pipeine # https://scikit-learn.org/stable/auto_examples/model_selection/grid_search_text_feature_extraction.html """ ========================================================== Sample pipeline for text feature extraction and evaluation =====================================...
#!/usr/bin/env python import rospy from std_msgs.msg import Int32 from geometry_msgs.msg import PoseStamped, Pose from styx_msgs.msg import TrafficLightArray, TrafficLight from styx_msgs.msg import Lane from sensor_msgs.msg import Image from cv_bridge import CvBridge from light_classification.tl_classifier import TLCla...
# -*- coding: UTF-8 -*- """ Providing a progress writer for scp.SCPClient """ from sys import stderr from tqdm import tqdm try: from typing import Tuple, Optional # pylint: disable=unused-import except ImportError: pass __author__ = {"github.com/": ["schwaneberg"]} __all__ = ['ScpProgressWriter'] class ScpP...
#!/usr/bin/python # -*- coding: utf-8 -*- # imports from . import encoding import importlib importlib.reload(encoding) from .encoding import chars2psnames # diacritics per language # source: Diacritics Project # http://diacritics.typo.cz/index.php?id=49 diacritics_chars = { 'albanian' : [ 'ç ë', ...
import os import pytest from pytest_mock import MockerFixture from ddb.__main__ import main, load_registered_features from ddb.feature import features from ddb.feature.core import CoreFeature from ddb.feature.shell import ShellFeature from ddb.feature.smartcd import SmartcdFeature, SmartcdAction, WindowsProjectActiva...
# flake8: noqa try: from distributed import * except ImportError: msg = ( "Dask's distributed scheduler is not installed.\n\n" "Please either conda or pip install dask distributed:\n\n" " conda install dask distributed # either conda install\n" " python -m pip install ...
import os import logging import contextlib from PIL import Image import streamlit as st logger = logging.getLogger(__name__) module_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) local_save_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) state_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: Maurizio Ferrari Dacrema, Massimo Quadrana """ import numpy as np import unittest class Metrics_Object(object): """ Abstract class that should be used as superclass of all metrics requiring an object, therefore a state, to be computed """ d...
""" Profile ../profile-datasets-py/standard54lev_nogas/005.py file automaticaly created by prof_gen.py script """ self["ID"] = "../profile-datasets-py/standard54lev_nogas/005.py" self["Q"] = numpy.array([ 1.42240500e+00, 2.29300200e+00, 3.06243300e+00, 3.78981700e+00, 4.34807300e+00, 4.7...
"""contours.py: Module is used to implement edge detection tecqniues using CV2 and apply Kernel estimations on the regions""" __author__ = "Chakraborty, S." __copyright__ = "" __credits__ = [] __license__ = "MIT" __version__ = "1.0." __maintainer__ = "Chakraborty, S." __email__ = "shibaji7@vt.edu" __status__ = "Resear...
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import onnx import numpy as np from onnx.helper import make_graph, make_model, make_tensor_value_info import pytest from ngraph.frontend import FrontEndManager from tests.runtime import get_runtime def create_onnx_model(): ad...
import requests import json test_sample = json.dumps({'data': [ [1,2,3,4,54,6,7,8,88,10], [10,9,8,37,36,45,4,33,2,1] ]}) test_sample = str(test_sample) def test_ml_service(scoreurl, scorekey): assert scoreurl != None if scorekey is None: headers = {'Content-Type':'application/json'} else...
n = int(input()) l = 0 r = n-1 print(l) seet = input() if seet == 'Vacant': exit(0) for _ in range(19): q = (l+r)//2 # 区間が2つの時 # 0-1 1//2=0 if l == q: print(l+1) exit(0) print(q) tmp = input() if ((q-l) & 1 == 0 and tmp == seet) or ((q-l) & 1 == 1 and tmp != seet): ...
import math e = 1.60218e-19 # Electron charge c = 299792458 eps0 = 8.85419e-12 mu0 = 4.*math.pi*10**(-7) Z0 = 377.0
"""Support for Nest thermostats.""" import logging from nest.nest import APIError import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateDevice from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CU...
"""taskbuster 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...
from django import forms from django.forms import ModelForm, Textarea from django.contrib.auth.models import User from .models import Comment class AddComment(ModelForm): class Meta: model = Comment fields = [ "conference_name", "type_of_comment", "text", ...
# Copyright 2014 The Bazel 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 la...
#!/usr/bin/env python # encoding: utf-8 """ remove_element.py Created by Shengwei on 2014-07-15. """ # https://oj.leetcode.com/problems/remove-element/ # tags: easy, array, pointer """ Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be cha...
from rest_framework.views import APIView from rest_framework.response import Response from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from bims.api_views.search_version_2 import MAX_PAGINATED_SITES from bims.models.search_process import SearchProcess class SiteSearchResult(APIView): """ ...
# 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...
# pylint: disable=protected-access,,attribute-defined-outside-init import re from celery import Celery from loguru import logger from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram from .http_server import start_http_server class Exporter: state = None def __init__(self, buckets=None...
# Generated by Django 3.0.2 on 2020-01-22 07:46 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
import os import re import struct import sys import textwrap sys.path.insert(0, os.path.dirname(__file__)) import ufunc_docstrings as docstrings sys.path.pop(0) Zero = "PyLong_FromLong(0)" One = "PyLong_FromLong(1)" True_ = "(Py_INCREF(Py_True), Py_True)" False_ = "(Py_INCREF(Py_False), Py_False)" None_ = object() Al...
from itertools import product as iterproduct from pylab import *;ion() from sklearn.decomposition import PCA from sklearn.externals import joblib from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, confusion_matrix from sklearn.preprocessing import StandardScaler from tqdm...
import setuptools from v2sub import __version__ with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="v2sub", version=__version__, author="airborne007", author_email="huangtao0202@gmail.com", description="A v2ray subscriber written in python3", long_descri...
""" Utility dialogs for starcheat itself """ import os import sys import hashlib import webbrowser from PyQt5.QtWidgets import QDialog from PyQt5.QtWidgets import QFileDialog from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QProgressDialog from PyQt5 import QtCore from urllib.request import urlope...
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ impor...
x = 5 y = x print(x, y) x = 3 print(x, y)
# coding=utf-8 import os from bs4 import BeautifulSoup # 从网页中解析学生信息 def getStudentInfor(response): html = response.content.decode("gb2312") soup = BeautifulSoup(html.decode("utf-8"), "html.parser") d = {} d["studentnumber"] = soup.find(id="xh").string d["idCardNumber"] = soup.find(id="lbl_sfzh")...
# pysqlite2/test/regression.py: pysqlite regression tests # # Copyright (C) 2006-2010 Gerhard Häring <gh@ghaering.de> # # This file is part of pysqlite. # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use o...
"""This file contains all supported python constructions.""" # Variables: def test_variables(): a = 1 b: int = 2 c: int c = 3 print('test variables:', a, b, c) test_variables() # Strings: def test_strings(): a = 'hi' e = f'{a}' b: str = 'there' c = f'{a}' d = f'{a} {b}!' ...
# coding: utf-8 import base_64 copyright = 'Copyright (c) 2012 Doucube Inc. All rights reserved.' def main(): bytesString = copyright.encode(encoding="utf-8") print(bytesString) # base64 加密 encodestr = base_64.b64encode(bytesString) print(encodestr) # base64 解密 decodestr = base_64.b64de...
#!/usr/bin/python # Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Certificate chain where the target certificate has a smaller validity range than the other certificates, making it easy to violate j...
import os TOKEN = os.environ.get("2066417340:AAERvi25V1oe1iV_chpl1VF44Q7FyUHS-xk") API_HASH = os.environ.get("6ac53d0c86a0afb6c3f1d956304912e0") API_ID = int(os.environ.get("8973350")) START_MESSAGE = os.environ.get("START_MESSAGE", "<b>Hi ! I am a simple torrent searcher using @chirag's Torrent Searcher api.\n\n\nMad...
from collections import defaultdict from datetime import ( datetime, timedelta, ) from io import StringIO import math import re import numpy as np import pytest from pandas.compat import ( IS64, np_datetime64_compat, ) from pandas.util._test_decorators import async_mark import pandas as pd from panda...
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
import numpy as np import cv2 import os from topological_nav.reachability.planning import NavGraph, update_nav_graph, NavGraphSPTM from rmp_nav.simulation.gibson_map import MakeGibsonMap from rmp_nav.common.utils import get_gibson_asset_dir, pprint_dict def _make_maps(map_names): def load_maps(datadir, map_names,...
from ophyd.sim import (SynGauss, Syn2DGauss, SynAxis, make_fake_device, FakeEpicsSignal, FakeEpicsSignalRO, FakeEpicsSignalWithRBV, clear_fake_device, instantiate_fake_device, SynSignalWithRegistry) from ophyd.device import (Device, Component as Cpt, ...
""" WSGI config for serenity-escrow project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLIC...
#!/usr/bin/env python """Time humanizing functions. These are largely borrowed from Django's `contrib.humanize`. """ import datetime as dt import math from enum import Enum from functools import total_ordering from .i18n import gettext as _ from .i18n import ngettext __all__ = [ "naturaldelta", "naturaltim...
import os import argparse import datetime import random from functools import partial import numpy as np import matplotlib.pyplot as plt from lib.pyeasyga import GeneticAlgorithm from env import Env def create_individual(action_space, *args): high = action_space.high low = action_space.low return [random....
"""Exercício Python 088: Faça um programa que ajude um jogador da MEGA SENA a criar palpites. O programa vai perguntar quantos jogos serão gerados e vai sortear 6 números entre 1 e 60 para cada jogo, cadastrando tudo em uma lista composta.""" print('-=' * 25) print(f'{"JOGO DA MEGA SENA":^50}') print('-=' * 25) total_j...
# # 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 us...
from unittest.mock import patch, call, ANY from collections import defaultdict import pytest from filestack import Security from filestack.uploads.intelligent_ingestion import upload_part, upload from tests.helpers import DummyHttpResponse @patch('filestack.uploads.intelligent_ingestion.requests.put') @patch('file...
from enum import Enum from typing import List from latexexam import LatexExamPaper, LatexExamAnswer, LatexExamSolution from latexpaper import LatexPaper from question import Question import random class LatexExamBuilder: """Builder class to create exam,answer and solution paper""" def __init__(self): ...
#!/usr/bin/env python3 -u # -*- coding: utf-8 -*- # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) __author__ = ["Markus Löning"] __all__ = ["ESTIMATOR_TEST_PARAMS", "EXCLUDE_ESTIMATORS", "EXCLUDED_TESTS"] import numpy as np from hcrystalball.wrappers import HoltSmoothingWrapper from sklearn.l...
""" Copyright (c) 2022 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 in writin...
import requests as re from bs4 import BeautifulSoup class Weather(object): def __init__(self, unit='F', cords=None): """ :param unit: F for Fahrenheit, C for Celsius :param cords: Weather of the passed Geocordinates is fetched, If none,automatic Coordinates are fetched by ip. ...
# 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 platforms import local registered_platforms = {'local': local.Platform} def get(name): return registered_platforms[name]
# -*- coding: utf-8 -*- ''' Decorators for salt.state :codeauthor: :email:`Bo Maryniuk (bo@suse.de)` ''' from __future__ import absolute_import, unicode_literals import traceback from salt.exceptions import SaltException class OutputUnifier(object): def __init__(self, *policies): self.policies = [] ...
import io from nose.tools import assert_equal from tests.shared import SampleFlatConfiguration CONFIGURATION_FULL_DATA = io.StringIO(""" [app_config] required_str_param: spam optional_str_param: eggs default_str_param: sausage required_int_param: 42 """) CONFIGURATION_PARTIAL_DATA = io.StringIO(""" [app_config] re...
# Mesh Generation Net: model loader # author: ynie # date: Feb, 2020 from models.registers import METHODS, MODULES, LOSSES from models.network import BaseNetwork import torch from torch import nn @METHODS.register_module class MGNet(BaseNetwork): def __init__(self, cfg): ''' load submodules for t...
import datetime import logging import math import os import time import traceback from typing import Dict, Optional, Tuple, Union, Iterable, Any import torch import torch.distributed as dist import torch.optim.lr_scheduler from torch.nn.parallel import DistributedDataParallel from allennlp.common import Params from a...
import logging import argparse import os from rrmng.rrmngmnt.host import Host from rrmng.rrmngmnt.user import RootUser import helpers import global_helpers import config LOCAL_HOST = Host("127.0.0.1") # set up logging to file logging.basicConfig( level=logging.INFO, format='[%(asctime)s] {%(pathname)s:%(lin...
from logger import coil_logger import torch.nn as nn import torch import importlib from configs import g_conf from coilutils.general import command_number_to_index from .building_blocks import Conv from .building_blocks import Branching from .building_blocks import FC from .building_blocks import Join from .building_...
# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Provides functions for Findit's special operations on test results.""" import base64 def GetFailedTestsInformationFromTestResult(test_results_object): ...
# coding: utf-8 import tensorflow as tf import numpy as np import os import time import datetime import manage_data from text_network import TextNetwork from tensorflow.contrib import learn # ### Set Params # Eval Parameters tf.flags.DEFINE_integer("batch_size", 64, "Batch Size (default: 64)") tf.flags.DEFINE_stri...
r"""``sphobjinv`` *package execution module*. ``sphobjinv`` is a toolkit for manipulation and inspection of Sphinx |objects.inv| files. **Author** Brian Skinn (bskinn@alum.mit.edu) **File Created** 17 May 2016 **Copyright** \(c) Brian Skinn 2016-2020 **Source Repository** https://github.com/bskinn/...
# -*- coding: utf-8 -*- #This is a script to add newly genotyped individuals and downloaded GeneSeek zip file (Final Reports) #to the existing database of the latest genotypes #Pipeline: #1)define chip, dictionary, dictionary to hold chip: genotype package: animal ids, dictionary to hold genotype package : download da...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ **Project Name:** MakeHuman **Product Home Page:** http://www.makehumancommunity.org/ **Github Code Home Page:** https://github.com/makehumancommunity/ **Authors:** Jonas Hauquier **Copyright(c):** MakeHuman Team 2001-2019 **Licensing:** ...
import os # noinspection PyPackageRequirements import cv2 import numpy as np import json import config_main from Utils.log_handler import log_setup_info_to_console, log_error_to_console, log_benchmark_info_to_console from Benchmarking.Util.image_parsing import find_img_extension def sb_iou(box1, box2) -> float: ...
# Generated by Django 3.2.5 on 2021-09-14 19:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('data', '0060_alter_dataset_data_license'), ] operations = [ migrations.AlterField( model_name='dataset', name='dwc_c...
# Copyright 2015 Kevin B Jacobs # # 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 wr...
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_noble_naboo_twilek_male_01.iff" result.attribute_templ...
# -*- coding: utf-8 -*- """ Regression tests for the Test Client, especially the customized assertions. """ import os from django.conf import settings from django.core.exceptions import SuspiciousOperation from django.core.urlresolvers import reverse from django.template import (TemplateDoesNotExist, TemplateSyntaxErr...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test new Yodycoin multisig prefix functionality. # from test_framework.test_framework import Bitcoin...
import json import os if __name__ == '__main__': s = json.loads('''{ "changes": [ {"time": 0, "bw": 9, "rtt": 70} ] }''') for idx, bw in enumerate(range(14, 131)): path = os.path.join('/', 'vagrant', 'scripts', 'bws', f'network_config_{idx+1}.json') with open(pa...
from terminus.version import version_str __version__ = version_str
from setuptools import find_packages, setup from moonstream.version import MOONSTREAM_CLIENT_VERSION long_description = "" with open("README.md") as ifp: long_description = ifp.read() setup( name="moonstream", version=MOONSTREAM_CLIENT_VERSION, packages=find_packages(), package_data={"moonstream"...
from openpyxl import load_workbook def iterating_over_values(path): workbook = load_workbook(filename=path) sheet = workbook.active for value in sheet.iter_rows(min_row=1, max_row=3, min_col=1, max_col=3, values_only=True): print(va...
from twisted.trial import unittest from eridanus import errors from eridanus.ieridanus import (ICommand, IEridanusPluginProvider, IEridanusPlugin, IEridanusBrokenPlugin, IEridanusBrokenPluginProvider) from eridanus.plugin import (safePluginImport, MethodCommand, rest, IncrementalArguments) # Make pyflakes ha...
r""" Manage the Windows registry =========================== Many python developers think of registry keys as if they were python keys in a dictionary which is not the case. The windows registry is broken down into the following components: Hives ----- This is the top level of the registry. They all begin with HKEY....
import nose import sys sys.argv.append("--verbosity=3") nose.main()
#coding:utf-8 # Copyright (c) 2019 PaddlePaddle 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 requ...
from core.himesis import Himesis, HimesisPreConditionPatternLHS class HM3ThenClausePart1CompleteLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HM3ThenClausePart1CompleteLHS. """ # Flag this instance as compiled now ...
import os import sys from distutils.core import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.pat...
import distro import logging import os import subprocess import tempfile from lxml import etree from . import meta from . import template log = logging.getLogger(__name__) def generate_meta_iso( name, fp, meta_data, user_data, ): def gentemp(prefix): return tempfile.NamedTemporaryFil...
# 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...
meusanjos = ["dgou", "leandro", "bilada"] print("A posição de leandro na lista é: ", meusanjos.index("leandro"))
from django.conf.urls import re_path from events import views app_name = 'events' urlpatterns = [ re_path(r'^events/$', views.events, name='events'), re_path(r'^event/(?P<slug>[\w-]+)/$', views.event, name='event'), re_path(r'^event/(?P<slug>[\w-]+)/result/(?P<name>[^/]+)/$', views.result, name='result')...
"""Test different accessory types: Lights.""" from pyhap.const import HAP_REPR_AID, HAP_REPR_CHARS, HAP_REPR_IID, HAP_REPR_VALUE import pytest from homeassistant.components.homekit.const import ATTR_VALUE from homeassistant.components.homekit.type_lights import Light from homeassistant.components.light import ( A...
def O_get_new_image_path(): from src.scripts.load_image import get_new_image_path new_image_path = get_new_image_path() return new_image_path def O_load_photo(path): from src.scripts.load_image import get_photo photo = get_photo(path) return photo def O_caption_image(image_name): from src....
from sqs_workers.backoff_policies import ( DEFAULT_BACKOFF, IMMEDIATE_RETURN, ConstantBackoff, ExponentialBackoff, ) from sqs_workers.exceptions import SQSError from sqs_workers.memory_sqs import MemorySession from sqs_workers.queue import JobQueue, RawQueue from sqs_workers.sqs_env import SQSEnv from s...
#!/usr/bin/env python3 print('[]')
from builtins import next from builtins import str import sys import unittest import re import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..')) import gc from itertools import islice from tempfile import mkdtemp from shutil import rmtree from Exscript.logger import Log, Logger from LogTest im...
# Generated by Django 4.0.4 on 2022-05-15 13:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0004_rename_club_ceo_club_ceo_rename_club_name_club_name'), ] operations = [ migrations.AddField( model_name='club', ...
#!/usr/bin/env python """ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. 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 ...
import json import io import sys from six import text_type import debugger import httpd import process_model import thread_analyzer def main(): p = process_model.Process(None) dbg = debugger.Debugger(debuglog=io.open(sys.argv[1], encoding='utf8').readlines(), proc=p) dbg.parse() thread_analyzer.clea...
import os,glob import sys import argparse import numpy as np from scipy.io import savemat,loadmat import torch from torch.autograd import Variable import struct from shutil import rmtree from matplotlib import pyplot as plt from numpy import * def testing(): recon = np.zeros((512,512)) for ...
import torch ori = torch.load('/Users/ibobby/Dataset/model_weights/BasicVSR/v-bi.pth') ori = ori['state_dict'] new = {} for k in ori.keys(): new[k.replace('generator.', '')] = ori[k] # Rename m = list() u = list() # PixelShufflePack m += ["upsample1.main.0.weight", "upsample1.main.0.bias", "upsample2.main.0.weight"...
# automatically generated by the FlatBuffers compiler, do not modify # namespace: tflite import flatbuffers class ResizeNearestNeighborOptions(object): __slots__ = ['_tab'] @classmethod def GetRootAsResizeNearestNeighborOptions(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uof...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url from django.contrib.sitemaps import views as sitemap_views from opps.core.cache import cache_page from opps.sitemaps.sitemaps import GenericSitemap, InfoDict from opps.sitemaps.views import sitemap sitemaps = { 'containers':...
''' ver 0.1, namera@ , initial-release, Oct26'17 ver 0.2, namera@ , included execution id for traceability, Nov3'17 ver 0.3, shawo@ , Corrected typos in variable names, Apr23'18 ver 0.4, angelaw@ , Added S3 upload flag, removed risk calculations, Oct17'18 Hedge Your Own Funds: Running Monte Carlo Simulations on AWS...
import cv2 import numpy as np from maskrcnn_benchmark.utils.miscellaneous import mkdir import tifffile as tiff from inference.cell_predictor import CellDemo from maskrcnn_benchmark.modeling.detector import build_detection_model import os from inference.metrics import mask2out, removeoverlap def select_test_folder...
import logging from django.conf import settings from django.contrib.auth import get_user_model from django.core.paginator import Paginator from django.shortcuts import render from django.utils.decorators import method_decorator from django.views.generic import TemplateView from ...decorators import permission_require...