content
stringlengths
5
1.05M
from .helper import dict_char_to_huoxing_lang, dict_char_to_phonetic, dict_char_to_shape_closed, list_junk_charaters __all__ = [ 'dict_char_to_huoxing_lang', 'dict_char_to_phonetic', 'dict_char_to_shape_closed', 'list_junk_charaters' ]
import os import sys import pandas as pd import re import numpy as np import pickle import codecs import torch import torch.nn as nn import torch.optim as optim import torch.utils.data as D from torch.autograd import Variable import torch.nn.functional as F from models.BiLSTM_ATT import BiLSTM_ATT from models.PCNN_ATT ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #------------------------------------------------------ # @ File : f_score.py # @ Description: # @ Author : Alex Chung # @ Contact : yonganzhong@outlook.com # @ License : Copyright (c) 2017-2018 # @ Time : 2020/12/4 上午10:18 # @ Software : PyCharm #...
""" Features The objective of this task is to explore the corpus, deals.txt. The deals.txt file is a collection of deal descriptions, separated by a new line, from which we want to glean the following insights: 1. What is the most popular term across all the deals? 2. What is the least popular term across all the ...
import config import argparse import logging import sys import zeroconf import sys import pychromecast from pychromecast.controllers.youtube import YouTubeController import logging import time logging.basicConfig(level=logging.INFO) formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') fh = loggi...
# Copyright 2016 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, ...
from typing import Callable, Optional from simphony.netlist import Subcircuit from gdsfactory.simulation.simphony.components.mmi1x2 import mmi1x2 from gdsfactory.simulation.simphony.components.straight import ( straight as straight_function, ) def mzi( delta_length: float = 10.0, length_y: float = 4.0, ...
# -*- coding: utf-8 -*- """ Created on Sun Jul 01 15:29:15 2018 @author: pp34747 """ import random import numpy as np import math import candidates import graphs import matplotlib.pyplot as plt import os import psutil import time from itertools import chain, izip import graph_tool.all as gt import dynamic_connectivity ...
from PyQt5.QtWidgets import QApplication, QMainWindow, QSizePolicy import xtd_ui import rospy from geometry_msgs.msg import Twist, PoseStamped, TwistStamped from std_msgs.msg import String from multiprocessing import Process,Queue from PyQt5.QtCore import * from receive import Ros2Gui from PIL import Image import rando...
import discord from discord.ext import commands import time import datetime import asyncio import requests import json import sys import os client = commands.Bot(command_prefix = '?') pingEveryXMinutes = 6 live_status = 2 # Preset status #Youtube data api payload payload = { 'part' : 'snippet', ...
import os import shutil from setuptools import setup, find_packages, Command from certbuilder import version class CleanCommand(Command): user_options = [ ('all', 'a', '(Compatibility with original clean command)') ] def initialize_options(self): self.all = False def finalize_optio...
"""Hook utils.""" import collections import logging import os import sys from runway.util import load_object_from_string from runway.variables import Variable, resolve_variables from ..exceptions import FailedVariableLookup LOGGER = logging.getLogger(__name__) def full_path(path): """Return full path.""" r...
# Resample TIFF image to a higher resolution import arcpy arcpy.env.parallelProcessingFactor = "100%" arcpy.env.workspace = r"S:/Jorddjup" print('Resampling Jorddjup') arcpy.Resample_management("jorddjup_10x10.tif", "resample2m.tif", "2", "NEAREST")
from django.contrib.auth.forms import UserCreationForm from core.BootstrapFormMixin import BootstrapFormMixin class SignUpForm(UserCreationForm, BootstrapFormMixin): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.setup_form()
# coding: UTF-8 import urllib.request as req import discord from discord.ext import tasks, commands import datetime import customFunc class periodic(commands.Cog): def __init__(self, bot): self.bot = bot self.minloop.start() print('Inf: Class "periodic" is instantiated.') @tasks.loop...
import pytest from trio_vis.registry import * from trio_vis.trio_fake import FakeTrioNursery, FakeTrioTask @pytest.fixture def drawer() -> SerialNumberGen: return SerialNumberGen() @pytest.fixture def registry() -> SCRegistry: return SCRegistry() def test_drawer(drawer: SerialNumberGen): assert drawe...
from re import fullmatch from api import api_call from config import SETTINGS from helpers import create_embed, LetterboxdError async def film_embed(keywords, with_mkdb=False): input_year = __check_year(keywords) lbxd_id = __check_if_fixed_search(keywords) film_json = await __search_request(keywords, inp...
''' DictAdapter =========== .. versionadded:: 1.5 .. warning:: This code is still experimental, and its API is subject to change in a future version. A :class:`~kivy.adapters.dictadapter.DictAdapter` is an adapter around a python dictionary of records. It extends the list-like capabilities of the :class:`~k...
import ipdb import yaml import os import sys from shutil import rmtree import argparse from time import sleep from subprocess import Popen, PIPE from pathlib import Path from typing import List from e3sm_to_cmip import resources DESC = '''test the output of the e3sm_to_cmip package from two git branches and run a...
import configparser from datetime import datetime import os from pyspark.sql import SparkSession from pyspark.sql.functions import udf, col from pyspark.sql.functions import year, month, dayofmonth, hour, weekofyear, date_format from pyspark.sql.functions import monotonically_increasing_id from pyspark.sql.types import...
import os from os.path import basename, normcase, splitext import click from packaging.version import Version SHELLS = ["bash", "zsh", "fish"] @click.command("shell-completion") @click.option( "-s", "--shell", type=click.Choice(["auto"] + SHELLS), default="auto", show_default=True, help="The...
import json import logging import os import joblib import pytest from prediction_service.prediction import validate_input import prediction_service input_data = { "incorrect_range": { "tenure" : 76, "MonthlyCharges":5 }, "correct_range": { "tenure" : 66, "MonthlyCharges":105 ...
import pytest day09 = __import__("day-09") process = day09.process_gen def builder(): with open('day-19.txt', 'r') as f: text = f.read().strip() idata = [int(x) for x in text.split(',')] def get_value(x, y): assert x >= 0, y >= 0 inp = [y, x] v = next(process(idata, inp))...
import time import platform import datetime import argparse from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium.webdriver.firefox.service import Service url = "https://web.whatsapp.com/" browser_binary = "C:\\...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
import shutil import os import cv2 import matplotlib.pyplot as plt import errno import pathlib rootdir = "./af2019-cv-testA-20190318/" patha = "./a/" pathb = "./b/" pathc = "./c/" pathout = "./merged_test/" def mkdir_p(path): try: os.makedirs(path) except OSError as exec: if exec.errno == errn...
#!/usr/bin/env python3 # Copyright (c) 2019 The Unit-e developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Replaces CamelCase with snake_case in symbols like m_helloWorld -> m_hello_world. One-liner: for f in $(find sr...
#Answer = 6857 #cost = 0.017s import time import math start = time.time() def is_prime(num): if num == 1 or num == 0: return False for x in range(2, int(math.sqrt(num)) + 1): if num % x == 0: return False return True num = 600851475143 limit = 10000 L = [0] ...
import re from pddl import Utils, PDDLPart, fluenttree, Operator class Domain(PDDLPart.PDDLPart): def __init__(self, dom_string): if dom_string is not None: super().__init__(dom_string) self.prelude = "" self.actions = [] for child in self.children: ...
# -*- coding: utf-8 -*- """ MATPOWER module in `psst` Copyright (C) 2016 Dheepak Krishnamurthy """ from __future__ import print_function, absolute_import import re import logging import os import pandas as pd from .reader import parse_file, find_attributes, find_name from .utils import COLUMNS
from constants import dictionary_of_display_formats def number_to_lcd_representation(number): return [dictionary_of_display_formats.get(number_to_look_up) for number_to_look_up in map(int, str(number))] def print_number_from_representation(list_representation_of_number): for representation in zip(*list_repr...
# Copyright 2014-2017 F5 Networks 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 ...
# -*- coding: utf-8 -*- """The Custom lifeform allows you to easily pass any arbitrary array as a :obj:`seagull.lifeforms.base.Lifeform` to the Board. However, it is important that the array passes two conditions: * It must be a 2-dimensional array. For lines such as Blinkers, we often use an array of shape :code...
import unittest from weather import read_config_file, get_coordinates, get_current_weather class TestWeather(unittest.TestCase): CONFIG_FILE_PATH = 'config.ini' def test_config_content(self): config = read_config_file(cfg_path=self.CONFIG_FILE_PATH) self.assertIn('GEOLOCALIZATION', config) ...
from django.forms import ModelChoiceField from django.contrib import admin from django.forms import ModelForm, ModelChoiceField, ModelMultipleChoiceField #from django.utils.translation import ugettext as _ from cms.admin.placeholderadmin import PlaceholderAdminMixin #from cms.admin.placeholderadmin import FrontendEdit...
from app import app app.run(debug=True,host='127.0.0.1',port=8080)
#!/usr/bin/env python3 from mendeleev import element # For looking up atomic numbers, etc import numpy as np from base_pot import PotProvider # Scaling factor for ZBL potential in our units a_0 = 0.5292 # fundamental charge squared in our units esqr = 14.398 def a_ij_func(Z_i, Z_j): 'ZBL Length function' a...
# Pythono3 code to rename multiple # files in a directory or folder # importing os module import os dirpath = "C:/Users/Shweta/Documents/MCA/SEM6/Zargun/Datasets/PET" # Function to rename multiple files def main(): i = 1 for filename in os.listdir(dirpath): dst ="pet...
L = [100, 200] L.remove(200) print L
import nltk output = nltk.TextTilingTokenizer().tokenize(nltk.brown.raw()[0:10000])
import random from typing import Optional from hathor.simulator import FakeConnection, MinerSimulator, RandomTransactionGenerator, Simulator from tests import unittest class HathorSimulatorTestCase(unittest.TestCase): seed_config: Optional[int] = None def setUp(self): super().setUp() self.c...
""" ----------------------------------------------------------------------------------------------------------- Package: AequilibraE Name: Traffic assignment Purpose: Loads GUI to perform traffic assignment procedures Original Author: Pedro Camargo (c@margo.co) Contributors: Pedro Camargo Last e...
# -*- coding: utf-8 -*- """ThreatConnect Batch Import Module.""" import hashlib import json import math import os import re import shelve import time import uuid from .tcex_ti_indicator import ( custom_indicator_class_factory, Indicator, Address, ASN, CIDR, EmailAddress, File, Host, ...
""" High level interface to PyTables for reading and writing pandas data structures to disk """ from __future__ import annotations from contextlib import suppress import copy from datetime import ( date, tzinfo, ) import itertools import os import re from textwrap import dedent from typing import ( TYPE_CH...
class script(object): START_MSG = """ <b>ʜᴇʟʟᴏ {} ʏᴏᴜ ᴄᴀɴ ᴄᴀʟʟ ᴛʜɪꜱ ᴀꜱ ᴀɴ ᴀᴜᴛᴏ ꜰɪʟᴛᴇʀ ʙᴏᴛ ɪꜰ ʏᴏᴜ ʟɪᴋᴇ :ᴅ ᴛʜɪꜱ ɪꜱ ᴠᴇʀꜱɪᴏɴ 2 ᴏꜰ ᴀᴜᴛᴏ ꜰɪʟᴛᴇʀ ʙᴏᴛ ʙᴏᴛ ɢɪᴠᴇꜱ ʙᴜᴛᴛᴏɴ ʟɪɴᴋ ᴛᴏ ꜰɪʟᴇꜱ ɪɴ ᴄᴏɴɴᴇᴄᴛᴇᴅ ᴄʜᴀɴɴᴇʟꜱ ᴏɴ Qᴜᴇʀʏ ! ɴᴏ ɴᴇᴇᴅ ᴛᴏ ᴀᴅᴅ ꜰɪʟᴛᴇʀꜱ ꜰᴏʀ ʏᴏᴜʀ ꜰɪʟᴇꜱ ᴏʀ ᴍᴏᴠɪᴇꜱ ꜰʀᴏᴍ ɴᴏᴡ ᴏɴ! ꜰᴏʀ ᴍᴏʀᴇ ᴄʟɪᴄᴋ <i>/help</i></b>""" HELP_M...
# Generated with InnerPipeLoading # from enum import Enum from enum import auto class InnerPipeLoading(Enum): """""" EXPOSED = auto() SHELTERED_CLOSED = auto() def label(self): if self == InnerPipeLoading.EXPOSED: return "Exposed" if self == InnerPipeLoading.SHELTERED_CLOS...
import boto3 import yaml import os import argparse cloudwatch = boto3.client("cloudwatch") logs = boto3.client("logs") # Arguments Engine parser = argparse.ArgumentParser(description="OverWatch Rules Validator") parser.add_argument( "rules_folder_path", metavar="path", type=str, nargs="?", default...
""" Code for prednet_run model : adapted from red (https://github.com/una-dinosauria/human-motion-prediction) """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import random import numpy as np import tensorflow as tf from tensorflow.python.ops ...
from digi.xbee.io import IOLine, IOMode from pyhap.accessory import Accessory from pyhap.const import CATEGORY_SWITCH from PHAS.RFHandler import RFHandler import time, threading import asyncio import concurrent.futures import logging POWER_ON_SAFETY_DELAY = 20.0 #Delay in s after a shutdown before powering back up ...
import os import re import time from pathlib import Path from flask import current_app import shutil class SessionFileSystem: def __init__(self, filesystem): self.filesystem = filesystem def get_data_path(self): path = Path(current_app.root_path) return os.path.join(str(...
import logging from django.contrib.auth.models import User from unplugged import RelatedPluginField, Schema, fields from wampyre.realm import realm_manager from ...plugins import ConfigPlugin, NotifierPlugin logger = logging.getLogger(__name__) class WAMPSchema(Schema): config = RelatedPluginField(plugin_type=...
from django.conf.urls import url from fundoonotes.views import FundooNotesListCreateAPIView, FundooNotesDetailAPIView app_name = 'fundoonotes' urlpatterns = [ url(r'^$', FundooNotesListCreateAPIView.as_view(), name="list"), url(r'^(?P<pk>[0-9]+)/$', FundooNotesDetailAPIView.as_view(), name="detail"), ]
""" Account related functions. These account related functions generally align one-for-one with published API calls categorized in the account category API v1 - https://t3n.zendesk.com/forums/21509857-Account API v2 - https://t3n.zendesk.com/forums/21645944-Account """ import clc class Account: account_status_i...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import numpy as np import time import os from six.moves import cPickle import opts import models from dataloader import * from dataloaderraw import * import eval_utils import argparse import misc....
"""Import required losses.""" from .regression_loss_functions import ( LogCoshLoss, SPELoss, ) __all__ = [ "LogCoshLoss", "SPELoss", ]
import sys import cv2 import imutils from itertools import combinations import numpy as np from numba import njit import time """ Check whether two lines defined by their Hough angle are parallel. """ @njit def are_parallel(θ1, θ2): return np.abs(θ1-θ2) < np.pi/8 or np.abs(np.abs(θ1-θ2)-np.pi) < np.pi/8 """ Ch...
from rest_framework.authentication import SessionAuthentication class CsrfExemptSessionAuthentication(SessionAuthentication): def enforce_csrf(self, request): return # disable all CSRF protections locally - DO NOT DO THIS IN PRODUCTION
""" Unit tests of functions within :mod:`weaver.processes.convert`. """ # pylint: disable=R1729 # ignore non-generator representation employed for displaying test log results from collections import OrderedDict from copy import deepcopy import pytest from pywps.inout.formats import Format from pywps.inout.inputs imp...
import tkinter as tk import tkinter.font as font from in_out import in_out from motion import noise from rect_noise import rect_noise from record import record from PIL import Image, ImageTk window = tk.Tk() window.title("Smart cctv") window.iconphoto(False, tk.PhotoImage(file='mn.png')) window.geometry('1080x760') ...
from .enums import TextChoices, IntegerChoices from .fields import Field
import os os.system("python seg_rgbd_flexible.py -i ./pc5 -th 2700 -s 860 -e 1900 -o ./pc5/nxp") os.system("python seg_rgbd_flexible.py -i ./pc6 -th 2700 -s 500 -e 1900 -o ./pc6/nxp") os.system("python seg_rgbd_flexible.py -i ./zmq1_6 -th 2900 -s 514 -e 1900 -o ./zmq1_6/nxp") os.system("python seg_rgbd_flexible.py -i ....
#!/usr/bin/env python3 # Copyright (c) 2021 The MicroBitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ This checks that all files in the repository have correct filenames and permissions """ import os im...
#!/usr/bin/env python3 # Beerware Licence # <louis@gatin.me> wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a beer in return. import socket from argparse import ArgumentParser from scapy.all...
import codecs import spacy import sys def main(argv): #input_filename = argv[1] input_filename = "data/Corpus.DEV.txt" output_filename = "data/output" relation_type = "Live_In" entity_types = (["PERSON"], ["GPE", "LOC"]) threshold = 0.7 nlp = spacy.load('en') output_file = open(output_filename, '...
from codecs import* def encriptar(texto,clave="1234"): # aC=clave.encode('utf-8') # bC=aC.hex() # bC=int(bC,16) paso1=texto.encode('utf-8') paso2=paso1.hex() paso3=int(paso2,16) return paso3 def desencriptar(texto,clave="1234"): # aC=clave.encode('utf-8') # bC=aC.hex() # bC=int(bC,16) ...
import frappe @frappe.whitelist() def get_sales_order_items(doctype, txt, searchfield, start, page_len, filters): return frappe.db.sql("""select si.item_code from `tabSales Order Item` si, `tabSales Order` s where s.name = si.parent and si.parenttype = 'Sales Order' and s.docstatus = 1 and si.item...
# # PySNMP MIB module EXPAND-NETWORKS-SMI (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EXPAND-NETWORKS-SMI # Produced by pysmi-0.3.4 at Mon Apr 29 18:52:49 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default...
import cv2 import numpy as np def add_border(img, width,color): h,w = img.shape w += width * 2 h += width * 2 img_with_border = np.zeros((h, w), dtype=np.uint8) img_with_border = img_with_border + color img_with_border[width:h - width, width:w - width] = img.copy() return img_with_border ...
import braintree from braintree.resource import Resource class UnknownPaymentMethod(Resource): def image_url(self): return "https://assets.braintreegateway.com/payment_method_logo/unknown.png"
import folium from folium.plugins import MarkerCluster from glob import glob from numpy import NaN from pandas import to_numeric from pandas import read_csv import streamlit as st from streamlit_folium import folium_static stations = read_csv('inventario.csv', header=0, delimiter=',') stations = stations.replace('#R...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="EXCAT-Sync", version="0.0.15", author="Christian Marzahl", author_email="christian.marzahl@gamil.com", description="A package to download images and annotations from the EXACT Server http...
#!/usr/bin/env python """ This script demonstrates how to read in data from a sqlite3 database file that is output from a PyMC simulation. The resulting object is a numpy array. """ from __future__ import division import matplotlib matplotlib.use("Agg") import numpy as np import sqlite3 from pylab import * # Init...
import os import numpy as np from urllib.request import urlopen from PIL import Image, ImageDraw, ImageFont from cv2 import resize import sys from vgg16_places_365 import VGG16_Places365 import logging class SceneSettingDetector: """ Detect scenes setting (place detection using places365) """ logger = None ...
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
import pandas as pd from sklearn.preprocessing import LabelEncoder import numpy as np import torch UCI_datafolder = "../data/UCI/" def dummy_encode(df): """ Auto encodes any dataframe column of type category or object. """ columnsToEncode = list(df.select_dtypes(include=['category', 'object'])) le ...
################################################################################ # Simple(st) example for sending a notification. ################################################################################ import aamnotifs n = aamnotifs.Notifs("amqps://user:password@domain.tld:5673/%2F") # The routing_name is t...
import json import mimetypes import os import tempfile import flask import cauldron as cd from cauldron import cli from cauldron import writer from cauldron.cli import sync from cauldron.cli.commands import create as create_command from cauldron.cli.commands.open import opener as project_opener from cauldron.cli.serv...
from __future__ import unicode_literals import logging from allauth.account.adapter import DefaultAccountAdapter from invite_only.models import InviteCode logger = logging.getLogger(__name__) class InviteOnlyAccountAdapter(DefaultAccountAdapter): def is_open_for_signup(self, request): if request.metho...
import os import os.path from io import BytesIO import archi from .constants import sub_format_list, supportted_compression_extension from .sys_global_var import prefix from .utils import get_best_subtitle def extract_subtitle( v_name, v_path, archive_name, sub_data_b, v_info_d, rename, ...
from javadoc import *
from django.utils.translation import gettext_lazy as _ class CartAddProhibited(Exception): """Raised when a `signals.satchmo_cart_add_verify` listener vetoes adding an item to the cart. Params: - product: item which was being added - message: veto message """ def __init__(self, produc...
from django.shortcuts import render from django.views.generic import ListView, DetailView from carts.models import Cart from .models import Product class HomeListView(ListView): model = Product template_name = 'pages/index.html' context_object_name = 'products' # paginate_by = 8 #laptop category cl...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from .dualbeam import * # noqa from ._dualbeam_utils import estimate_dxdy, match_pairs # noqa
""" flask-dependency性能测试 结果: normal: 0.210586 proxy: 2.427060 """ from timeit import timeit from flask_dependency import Dependency class Service(object): def __init__(self, name): self.name = name def get_name(self): return self.name normal = Service('normal') proxy, init_proxy...
import unittest try: from typing import Any except ImportError: pass # only needed to check type annotations class Py23TestCase(unittest.TestCase): def __init__(self, *args, **kwargs): # type: (Any, Any) -> None super(Py23TestCase, self).__init__(*args, **kwargs) try: self....
# -*- coding: utf-8 -*- """ commah version ============== Stores the version of the *commah* package. """ # %% VERSIONS # Default/Latest/Current version version = '0.3'
from django.urls import path from . import views from .views import CarList, CreateCar urlpatterns = [ path('owner_info', views.info, name = 'info'), path('owner/<int:ownership_id>', views.detail, name = 'detail'), path('owners_list', views.owners_list), path('car_list', CarList.as_view()), path('', views.create_...
import six import json import Utils import Model from GeoAnimation import GpsPoint, GeoTrack from BatchPublishAttrs import batchPublishRaceAttr class Template( object ): templateAttributes = set.union( { 'distanceUnit', 'rule80MinLapCount', 'isTimeTrial', 'roadRaceFinishTimes', 'estimateLapsDownFinis...
# # Copyright (c) 2020-2021 Project CHIP 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 # ...
import numpy as np def depth(vector): z=np.zeros([168,168]) return z
# # Copyright 2021 Digital.ai # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, subl...
"""Support for getting temperature from TEMPer devices.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import CONF_NAME, DEVICE_DEFAULT_NAME, TEMP_FAHRENHEIT from homeassistant.helpers.entity import Entity _LOGGER = logging.getLogger(__n...
# Copyright 2020 Saarland University, Spoken Language Systems LSV # Author: Michael A. Hedderich, Lukas Lange, Dietrich Klakow # # 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...
from __future__ import print_function from CGAL.CGAL_Kernel import Point_3 from CGAL.CGAL_Kernel import Segment_3 from CGAL.CGAL_Kernel import Triangle_3 from CGAL.CGAL_Polyhedron_3 import Polyhedron_3 from CGAL.CGAL_AABB_tree import AABB_tree_Polyhedron_3_Facet_handle from CGAL.CGAL_AABB_tree import AABB_tree_Triangle...
# Generated by Django 3.1.2 on 2020-10-22 16:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('bomberbot', '0003_auto_20201018_2352'), ] operations = [ migrations.AddField( model_name='teacher', name='city', ...
#!/usr/bin/env python3 import os import sys import argparse import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib.lines as mlines import matplotlib.colors as mcol import matplotlib.collections as mc import matplotlib.transforms as mtrans import matplotlib.ticker as mtick from itertools...
import torch import torch.nn as nn from tqdm import tqdm import math import os import copy import numpy as np from .seg import get_coord from mmdet.models.builder import SAR_MODULES @SAR_MODULES.register_module() class SpatialRelationModule(nn.Module): def __init__(self, img_prefix, d_model, pretrainedPSPNet, batc...
# coding:utf-8 from django.db import models # Create your models here. class AmazonComment(models.Model): isbn13 = models.CharField(max_length=200, default=None) author = models.TextField(default=None) content = models.TextField(default=None) class AmazonInfo(models.Model): """ 亚马逊基本信...
""" Copyright 2013 Rackspace 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 dist...
import sys from setuptools import setup, find_packages assert sys.version_info.major == 3 and sys.version_info.minor >= 6, \ "Bullet-Safety-Gym uses Python 3.6 and above. " with open('README.md', 'r') as f: # description from readme file long_description = f.read() setup( name='bullet_safety_gym', ...