content
stringlengths
5
1.05M
from manga_download import * download(TOONILY, 'happening', (0,86), overridePages= False, downloadImages= True, overrideImages= False)
from holder import Holder import PySimpleGUIQt as sg import yaml import multiprocessing sg.theme('Dark2') layout = [[sg.Text('HolderMC - your crossbow user')], [sg.Text('Delay (in seconds):'), sg.InputText()], [sg.Button('Run'), sg.Button('Stop')]] window = sg.Window('HolderMC', layout, no_titlebar...
import torch import torch.nn as nn import torch.nn.functional as F __all__ = ['DDSConv'] class route_func(nn.Module): def __init__(self, in_channels, out_channels, num_experts=3, reduction=16, mode='out'): super().__init__() # Global Average Pool self.gap1 = nn.AdaptiveAvgPool2d(1) ...
from ad_api.base import Client, sp_endpoint, fill_query_params, ApiResponse class BidRecommendations(Client): @sp_endpoint('/v2/sp/adGroups/{}/bidRecommendations', method='GET') def get_ad_group_bid_recommendations(self, adGroupId, **kwargs) -> ApiResponse: r""" get_ad_group_bid_recommendation...
import pytest from joffrey import CLI, Group @pytest.fixture def cli(): return CLI() def test_empty_flag_prefix(): with pytest.raises(ValueError): CLI(flag_prefix='') def test_underscore_kwarg(cli): @cli.flag() def oh_hi(): pass assert 'oh_hi' in cli.parse('--oh-hi') def tes...
from setuptools import find_packages, setup with open("README.md", mode="r", encoding="utf-8") as f: readme = f.read() with open("LICENSE", mode="r", encoding="utf-8") as f: license_text = f.read() setup( name="diptych", version="0.0.1", description=( "Detect multiple pages in image scann...
# -*- coding: utf-8 -*- u"""Utils for SecureTea Auto Server Patcher Project: ╔═╗┌─┐┌─┐┬ ┬┬─┐┌─┐╔╦╗┌─┐┌─┐ ╚═╗├┤ │ │ │├┬┘├┤ ║ ├┤ ├─┤ ╚═╝└─┘└─┘└─┘┴└─└─┘ ╩ └─┘┴ ┴ Author: Abhishek Sharma <abhishek_official@hotmail.com> , Jun 20 2019 Version: 1.4 Module: SecureTea """ import platform import os ...
import random pc = random.randint(0,10) print('Sou seu computador...Acabei de pensar em um numero de 0 a 10.') print('Consegue adivinhar qual foi?') count = 0 acertou = False while not acertou: guess = int(input('Qual e seu palpite? ')) count = count + 1 if guess == pc: acertou = True else: ...
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Lice...
import numpy as np import basico_forward def h(x, pre, c): return (x**pre).prod(1) * c def gillespie(x, c, pre, post, max_t): """ Gillespie simulation Parameters ---------- x: 1D array of size n_species The initial numbers. c: 1D array of size n_reactions The reaction r...
"""Hide-and-Seek Privacy Challenge Codebase. Reference: James Jordon, Daniel Jarrett, Jinsung Yoon, Ari Ercole, Cheng Zhang, Danielle Belgrave, Mihaela van der Schaar, "Hide-and-Seek Privacy Challenge: Synthetic Data Generation vs. Patient Re-identification with Clinical Time-series Data," Neural Information Process...
# # PySNMP MIB module INTEL-ES480-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/INTEL-ES480-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:54:07 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27...
b = [22, 25, 28, 28, 33, 36, 37, 41, 41, 41, 47, 48, 52, 55, 55, 60, 60] def new_list(a): new_list = [] for i in a: if i not in new_list: new_list.append(i) print(new_list) new_list(b)
import numpy as np import cv2 import vispy import vispy.scene from vispy.scene import visuals import tensorflow as tf import src.config import sys from absl import flags from src.util import image as img_util from src.RunModel import RunModel import datetime def inside(r, q): rx, ry, rw, rh = r qx, qy, ...
# panxapi.py after command must be double quotation marks import subprocess from lxml import etree # cmd = "panxapi.py -xs \"/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vsys1']/address-group\"" cmd = "panxapi.py -xs \"/config/devices/entry[@name='localhost.localdomain']/vsys/entry[@name='vs...
import numpy as np from math import pi def binned_profile(y, x, bins=20): '''Create a profile of y(x) in the specified bins. Parameters ---------- y : array_like The y-coordinates of the data points. This should be 1-dimensional. x : array_like The x-coordinates of the data points. This should be 1-dimension...
from datetime import datetime import pytest from pytz import utc from api.files.serializers import FileSerializer from api_tests import utils from osf_tests.factories import ( UserFactory, NodeFactory, ) from tests.utils import make_drf_request_with_version @pytest.fixture() def user(): return UserFacto...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v5/proto/resources/bidding_strategy.proto from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from go...
from __future__ import absolute_import import env import envplus.pathfile import envplus.helpers VERSION_TUPLE = (0, 0, 1) VERSION = ".".join(map(str, VERSION_TUPLE))
# -*- coding: utf-8 -*- ''' ############################# Acme::MetaSyntactic::pause_id ############################# **** NAME **** Acme::MetaSyntactic::pause_id - The PAUSE id theme *********** DESCRIPTION *********** This is the list of all PAUSE (Perl Authors Upload SErver) user id (slightly transmogrified ...
""" Programming for linguists Implementation of the class Triangle """ from math import sqrt from shapes.shape import Shape class Triangle(Shape): """ A class for triangles """ def __init__(self, uid: int, first_edge: int, second_edge: int, third_edge: int): super().__init__(uid) sel...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose import astropy.units as u from gammapy.irf import Background2D, Background3D from gammapy.utils.testing import requires_data @pytest.fixture(scope="session") def bkg_3d(): """...
def sum(arr): if len(arr) == 1: return arr[0] return arr[0] + sum(arr[1:]) print(sum([2, 2, 4, 6])) # 14
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2016 Andrew Savonichev # # 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...
"""Common imports for generated deploymentmanager client library.""" # pylint:disable=wildcard-import import pkgutil from googlecloudapis.apitools.base.py import * from googlecloudapis.deploymentmanager.v2beta1.deploymentmanager_v2beta1_client import * from googlecloudapis.deploymentmanager.v2beta1.deploymentmanager_...
from typing import Optional from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from .routers import recommandation app = FastAPI() version = "v1" # Bonne pratique pour API-REST/Microservices : préfixe de version pour facilement migrer vers d'autres versions du back route_prefix= "/API/...
from Task_1 import * def TestPointLocation(): point = Point(3,4) center = Point(0,0) circle = Circle(center,5) assert circle.pointLocation(point) == "On Circle" circle.radius = 6 assert circle.pointLocation(point) == "In Circle" circle.radius = 2 assert circle.pointLocation(point) == "O...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'section_input.ui' # # Created by: PyQt5 UI code generator 5.15.6 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore...
''' Register modules here. Module-specific parameters in the config .ini file can be added under a section with the same name as the module. 2019-2020 Benjamin Kellenberger ''' # set up Celery configuration import celery_worker from .LabelUI.app import LabelUI from .Database.app import Database from .Fil...
# Copyright 2019 Ali (@bincyber) # # 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 abc import ABC import json import logging import os import ast import torch from transformers import ( AutoModelForSequenceClassification, AutoTokenizer, AutoModelForQuestionAnswering, AutoModelForTokenClassification, ) from ts.torch_handler.base_handler import BaseHandler from captum.attr import L...
############################################################################### # # Tests for libxlsxwriter. # # Copyright 2014-2019, John McNamara, jmcnamara@cpan.org # import base_test_class class TestCompareXLSXFiles(base_test_class.XLSXBaseTest): """ Test file created with libxlsxwriter against a file cre...
#!/usr/bin/env python """ Emulated QPD functionality Hazen 04/17 """ import math import random import time from PyQt5 import QtCore import storm_control.hal4000.halLib.halMessage as halMessage import storm_control.sc_hardware.baseClasses.hardwareModule as hardwareModule import storm_control.sc_hardware.baseClasses....
import os import sys # import transaction from sqlalchemy import create_engine from .models import Idea, Author, Base from .session import DBSession def usage(argv): cmd = os.path.basename(argv[0]) print('usage: %s <database_uri>\n' '(example: "%s sqlite:///agora.sqlite")\n' 'to seed the...
# Copyright 2017. Allen Institute. All rights reserved # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the follow...
from enum import auto from sqlglot.helper import AutoName class ErrorLevel(AutoName): IGNORE = auto() WARN = auto() RAISE = auto() class SqlglotError(Exception): pass class UnsupportedError(SqlglotError): pass class ParseError(SqlglotError): pass class TokenError(SqlglotError): pa...
from random import randint num = randint(0, 5) print('='*100) print('Olá! Vamos nos divertir. Vou pensar em um número de 0 a 5, e você tentar adivinhar...') print('='*100) n = int(input('Em que número eu pensei? ')) if n == num: print('Parabéns! Você conseguiu, eu pensei no número {}, o mesmo que o seu {}.'.format(...
"""Functions to support MedPhys Taught Module workshop on calibration and tracking """ import math import numpy as np from sksurgerycore.algorithms.procrustes import orthogonal_procrustes from sksurgerycore.algorithms.errors import compute_tre_from_fle, \ compute_fre_from_fle class PointBasedRegistr...
# import libraries import sys import pandas as pd import numpy as np from sqlalchemy import create_engine import re import pickle import nltk nltk.download('stopwords') from nltk import word_tokenize from nltk.corpus import stopwords from nltk.stem import WordNetLemmatizer from sklearn.pipeline import Pipeline from s...
# -*- coding: utf-8 -*- """ Created on Mon Feb 28 14:18:51 2022 @author: Yang """ """ This is some tools for analyzing the simulation result from AtomECS (SimECS). """ import scipy.constants as cts import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib #matplotlib.rc...
""" [ #480390 ] main() does not throw exceptions """ import support support.compileJPythonc("test340c.py", core=1, jar="test340.jar", output="test340.err") support.compileJava("test340j.java") rc = support.runJava("test340j", classpath=".", expectError=1) if rc != 42: support.TestError("...
#!/usr/bin/env python # -*- coding: utf-8 -*- """core/__init__.py """
#Nama : #NIM : #Tanggal : #Deskripsi : #DefSpek #type PohonBiner : < A: elemen, L: PohonBiner, R: PohonBiner> #<A,L,R> adalah type bentukan pohon biner dimana A adalah akar, L adalah daun kiri, dan R adalah daun kanan class PohonBiner: def __init__(self,A,L,R): self.A = A self.L = L self.R = R...
class Dog: def __init__(self,name,posx,posy): self.name=name self.posx=posx self.posy=posy self.awaken=False self.hungry=False self.counter=0 def awake(self): if self.awaken: print(self.name+' is already awaken') else: self....
# mypy: ignore-errors from .. import fixtures from ..assertions import eq_ from ..schema import Column from ..schema import Table from ... import Integer from ... import select from ... import testing from ... import union class DeprecatedCompoundSelectTest(fixtures.TablesTest): __backend__ = True @classmet...
# -*- coding: utf-8 -*- """ This module is for demonstration purposes only and the integrators here are not meant for production use. Consider them provisional, i.e., API here may break without prior deprecation. """ import math import warnings import numpy as np from .util import import_ lu_factor, lu_solve = impor...
from graphene_federation import build_schema from .mutation import Mutation from .query import Query schema = build_schema(query=Query, mutation=Mutation)
import argparse from glob import glob import importlib import hashlib import logging import os from typing import Optional from pydantic import BaseModel import re from sqlalchemy import create_engine, text import sqlalchemy from sqlalchemy import exc from sqlalchemy.exc import InternalError, OperationalError from sqla...
# -*- coding: utf-8 -*- """ Created on Tue Nov 17 17:41:47 2020 @author: Koustav """ import os import glob import math import matplotlib.pyplot as plt import seaborn as sea import numpy as np import pandas as pan from scipy.optimize import curve_fit import matplotlib.ticker as mtick ''' This is a script that is speci...
# !/usr/bin/python # 中文映射为英文 from pypinyin import lazy_pinyin _map = { "姓名": "name", "名字": "name", "昵称": "nickname", "用户名": "username", "联系人": "contact_name", "联系方式": "tel", "座机电话": "phone", "企业名称": "company_name", "企业地址": "company_address", "省份城市": "province_and_city", "省份":...
"""Python neurology toolbox Subpackages ----------- analysis specialized neuroscience analysis functions (gridness score, place maps, e.t.c.) general general signal processing function (smoothing, correlation, e.t.c.) defaults default values for keyword analysis parameters """ from . import defaults fro...
from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import login, authenticate from django.contrib.auth.models import User from django.http import JsonResponse #################### # IMPORT OTHER LIBS ################...
# HiQ version 1.0. # # Copyright (c) 2022, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ # import os import json import syslog import time import requests import urllib3 from hiq.utils import read_file import queue urllib3.disa...
from testxsendfile import app as application
def studianumero1(numero1,kk,calcolo,discretizzaarchicerchi,traslax,traslay): from calcolatrice.misuras import size2, transponi,UnireMatriciRig,UnireMatriciCol,EstraiUnPezzo,ScalarXMatr #print("numero1 333", numero1) #print(size2(numero1,1)) #print(size2(numero1,2)) printa=0 enne=6 #il n...
#O(nlog(n)) time and O(n) space def sortedSquaredArrayLambda(array): lst = list(map(lambda x: x ** 2, array )) return sorted(lst) def sortedSquaredArrayLoopSquaresPythonic(array): lst2 = [i**2 for i in array] return sorted(lst2) #O(n) both time and Space def sortedSquaredArray(array): sampleList ...
import torch from torch.utils.data import DataLoader, TensorDataset import numpy as np class IIDBatchSampler: def __init__(self, dataset, minibatch_size, iterations): self.length = len(dataset) self.minibatch_size = minibatch_size self.iterations = iterations def __iter__(self): ...
import numpy as np from sklearn.cluster import DBSCAN from grouping import remove_outliers, helper_object_points, max_min from data import input_nn, flat_input # Using the DB Scan of scikit learn for segmenting the data, take in the dataframe and return the labeled_df # This DB scan is sensitive to starting point # Co...
import json import click from ml_project.data import read_data, split_train_val_data from ml_project.entities.train_pipeline_params import read_training_pipeline_params from ml_project.features import make_features from ml_project.features.build_features import extract_target, build_transformer from ml_project.models...
from donk.dynamics.dynamics import DynamicsModel from donk.dynamics.linear_dynamics import LinearDynamics from donk.dynamics.utils import to_transitions __all__ = [ "DynamicsModel", "LinearDynamics", "to_transitions", ]
############################################################################## # # The MIT License (MIT) # # Copyright (c) 2015 Eric F Sorton # # 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...
def format_money(n): return "$%.2f" % n
#!/usr/bin/env python import sys #to get argument import unittest import unitstyle #collect all of our test scripts as a test suite my_tests = unittest.TestLoader().discover("tests/") # get command-line output format if provided try: output_format = sys.argv[1] except IndexError: #nothing provided output_format ...
import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5 import uic class MainWindow(QtWidgets.QMainWindow): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) uic.loadUi('mainwindow.ui', self) app = QtWidgets.QApplication(sys.argv) window = MainWindow() window.show()...
from dataclasses import dataclass from config import Config import numpy as np from messages.generic_api import GenericApi from messages.discord_embeds import DiscordEmbeds class Messenger: def __init__(self, api_type: str = None): if api_type is not None: if api_type == "generic_api": ...
class Interpreter(object): def __init__(self, analyzed_tree): self.analyzed_tree = analyzed_tree def interpret(self, world_state): for element in self.analyzed_tree: element.interpret(world_state)
class Generator: def __init__(self, generator): self._generator = generator self._receivers = set() self.intensity = 0 self.request_count = 0 def add_receiver(self, receiver): self._receivers.add(receiver) def remove_receiver(self, receiver): try: ...
import logging from fastapi import FastAPI logger = logging.getLogger(__name__) def init_sentry(): """Initialize sentry on application startup""" from .config import settings if settings.SENTRY_DSN is not None and len(settings.SENTRY_DSN) > 0: logger.info("Initializing Sentry") import ...
import mimetypes class MimeType(object): _initiated = False @staticmethod def guess_type(filename): """ Guess type :param filename: File name :return: tuple(type, encoding) """ MimeType._initiate() return mimetypes.guess_type('dumm...
''' HOBNOB BY ARYAN BHAJANKA REFER THE 'README.MD' FILE FOR DETAILS ''' #main.py, HobNob from re import template from flask import Flask,render_template, request,redirect from flask_login import login_required, current_user, login_user, logout_user from models import UserModel,PostModel, ProfileModel, Foll...
from deepnet import *
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license. """ import logging from projects.api import ProjectNextTaskAPI logger = logging.getLogger(__name__) def next_task(project, queryset, **kwargs): ...
import os, yaml from pathlib import Path from click.testing import CliRunner from luna.radiology.cli.window_volume import cli import medpy.io import numpy as np def test_cli_window(tmp_path): runner = CliRunner() result = runner.invoke(cli, [ 'pyluna-radiology/tests/luna/testdata/data/2.000000-CTAC...
"""Add support for OAuth to let users to connect the bot various services.""" from plumeria.command import commands from plumeria.core.storage import pool, migrations from plumeria.core.webserver import app, render_template from plumeria.message import Message, Response from plumeria.perms import direct_only from plum...
# Copyright (c) 2016-2021 Renata Hodovan, Akos Kiss. # # Licensed under the BSD 3-Clause License # <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. # This file may not be copied, modified, or distributed except # according to those terms. import json import logging import os import pkgutil import signal ...
#[0] is ours ##whole_level[1] calais #[2] ritter #[3] stanford import datetime from threading import Thread import random import math from queue import Queue import pandas as pd import warnings import numpy as np import time import pickle import matplotlib.pyplot as plt import copy import matplotlib.ticker as ticker...
# Pipenv modules from typer import BadParameter # Global configuration variables ENDPOINT = "https://app.api.surehub.io" PORT = None CORS = None EMAIL = None PASSWORD = None LOGLEVEL = None def validate_loglevel(value: str): loglevel_values = ['critical', 'error', 'warning', 'info', 'debug', 'trace'] if valu...
import dumper def qdump__thrust__device_vector(d, value): innerType = value.type[0] size = int(value["m_size"]) start = value["m_storage"]["m_begin"]["m_iterator"]["m_iterator"].pointer() d.putItemCount(size) d.putPlotData(start, size, innerType)
from operator import itemgetter import py from rply.utils import IdentityDict class TestIdentityDict(object): def test_create(self): IdentityDict() def test_get_set_item(self): d = IdentityDict() x = [] d[x] = "test" assert d[x] == "test" def test_delitem(self):...
# coding=utf8 from interfacebdd.Connexion import Connexion from interfacebdd.QualificationDAO import QualificationDAO from flask import Blueprint, request, json import pymysql qualification_api = Blueprint('qualification_api', __name__ ) @qualification_api.route('/qualification/all/') def allQualifications(): """...
"""Base class for AWS organizations resources.""" from typing import Type from botocore.client import BaseClient from altimeter.aws.resource.resource_spec import ScanGranularity, AWSResourceSpec class OrganizationsResourceSpec(AWSResourceSpec): """Base class for AWS organizations resources.""" service_name...
import os import click from flask_migrate import Migrate from app import create_app, db from app.models import User #创建flaskapp实例 app = create_app('default') #创建数据库 @app.before_first_request def create_db(): db.create_all() if __name__ == '__main__': app.run()
from __future__ import absolute_import from django import VERSION as DJANGO_VERSION def get_user_model(): if DJANGO_VERSION >= (1, 5): from django.contrib.auth import get_user_model as gum return gum() else: from django.contrib.auth.models import User return User
from django.apps import AppConfig class MpesaWebhooksConfig(AppConfig): name = 'mpesa_proxy'
import unittest from .general_tests import GeneralTests from mldictionary import Portuguese class TestGeneralPortuguese(GeneralTests, unittest.TestCase): word = 'palavra' def setUp(self): return super().setUp(Portuguese) class TestPortuguese(unittest.TestCase): def setUp(self): self.po...
import os import platform import requests import json from flask import Flask from flask import request from flask import jsonify from flask import render_template from version import app_version app = Flask(__name__) # Initialization debug = bool(os.getenv('DEBUG')) print(debug) #Main page @app.route('/') def main...
from __future__ import annotations import asyncio import math import json import threading from sphero.sphero_bolt import SpheroBolt import numpy as np from cv2 import cv2 from typing import List # CAP = None CURRENT_COORDINATES = {} def get_json_data(file: str) -> List[dict[str, str]]: """Reads json file and re...
class BattleObject(): def __init__(self, hp, mp, str, dex, int,agi, wis, luk): self.name = None self.job = None self.hp = hp self.mp = mp self.str = str self.dex = dex self.int = int self.agi = agi self.wis = wis self.luk = luk de...
from canaille.apputils import obj_to_b64 from canaille.flaskutils import permissions_needed from canaille.mails import profile_hash from canaille.mails import send_invitation_mail from flask import Blueprint from flask import current_app from flask import flash from flask import request from flask import url_for from f...
#Copyright 2014 MathWorks, Inc. class RejectedExecutionError(Exception): """Exception raised from MATLAB engine""" def __init__(self, message): self.message = message def __repr__(self): return self.message
import pygame class Block: def __init__(self, size = (30, 10), position = (100, 100), hits_to_dissaper = 1, image = None): self.image = image self.image = self.image.subsurface((513, 612, 1681 - 513, 1334 - 612)) self.image = pygame.transform.scale(self.image, ...
import dash import dash_table import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc from dash.dependencies import Input, Output import plotly.graph_objs as go import pandas as pd from numpy import nan from province_names import prov_names from get_covid_data_from...
import bpy from gpu_extras.batch import batch_for_shader from bpy.types import Operator, GizmoGroup, Gizmo import bmesh import bgl import gpu from math import sin, cos, pi from gpu.types import ( GPUBatch, GPUVertBuf, GPUVertFormat, ) from mathutils import Matrix, Vector import mat...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from nmtlab.models import EncoderDecoderModel import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.utils.rnn import...
import curses def color(): curses.init_pair(1, curses.COLOR_RED, curses.COLOR_BLACK) curses.init_pair(2, curses.COLOR_GREEN, curses.COLOR_BLACK) curses.init_pair(3, curses.COLOR_YELLOW, curses.COLOR_BLACK) curses.init_pair(4, curses.COLOR_BLUE, curses.COLOR_BLACK) curses.init_pair(5, curses.COLOR_...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal from UM.Application import Application class OperationStackProxy(QObject): def __init__(self, parent = None): super().__init__(parent) ...
#!/usr/bin/env python import rospy from uav_geometric_controller.msg import states, trajectory from geometry_msgs.msg import PoseStamped, TwistStamped, AccelStamped from tf.transformations import quaternion_from_euler desiredPoseTopic = 'desired_pose' desiredTwistTopic = 'desired_twist' desiredAccelTopic = 'desired_ac...
# coding: utf-8 # flake8: noqa """ Idfy.Validation In this API you can validate signatures from the following electronic IDs (e-ID)<br/><br/> &bull; Norwegian BankId (SDO)<br/> ## Last update [LastUpdate] ## Last update Last build date for this endpoint: 12.03.2018 # noqa: E501 """ from __future__ imp...
from django.apps import AppConfig from django.core.exceptions import ImproperlyConfigured from django.urls import URLPattern, reverse_lazy from oscar.core.loading import feature_hidden class OscarConfigMixin(object): """ Base Oscar app configuration mixin, used to extend :py:class:`django.apps.AppCo...
import FWCore.ParameterSet.Config as cms source = cms.Source ("PoolSource", fileNames = cms.untracked.vstring( '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/123/596/00D8AF8D-36E2-DE11-BEC4-001D09F24303.root', '/store/express/BeamCommissioning09/ExpressPhysics/FEVT/v2/000/123/596/021BEBFC-5AE2-DE11-B1FF...