text
stringlengths
1
927k
from flask import url_for from flask_wtf import Form from wtforms import ValidationError from wtforms.fields import ( BooleanField, PasswordField, StringField, SubmitField, ) from wtforms.fields.html5 import EmailField from wtforms.validators import Email, EqualTo, InputRequired, Length from app.models...
import sublime, sublime_plugin, os import subprocess class MavenCompileOnSave(sublime_plugin.EventListener): def on_post_save(self, view): folder = view.window().folders()[0] os.chdir(folder) maven_compile_on_save_settings = view.settings().get('maven_compile_on_save') file_extension = view.file_name().split...
from datetime import datetime, timedelta from typing import Dict from discord import Embed from discord.ext import commands from .debug import generate_debug_embed from .hyperion import ( currency_details, hyperion_base_url, hyperion_session, resolve_account_id, ) for name, id_ in [("Reoccuring Payou...
"""Distributed executor infrastructure to scale up the tuning""" from .measure import MeasureInput, MeasureResult, MeasureErrorNo, measure_option from .measure_methods import request_remote, create_measure_batch, use_rpc from .local_executor import LocalExecutor from .executor import Future, Executor
import os import typing from importlib import util from Site_NeonOcean_NOC_Mods_Distribution.Tools import Formatting from Site_NeonOcean_NOC_Mods_Distribution import Paths class FormattingDict(dict): def __missing__ (self, key): return "{" + key + "}" def BuildModIndex (modNamespace: str) -> str: automationModul...
''' 25th April 2018 Group Members: Kevin Burke (14155893) Paul Lynch (16123778) Ciaran Carroll (13113259) Qicong Zhang (16069978) Project 2: Research and Implement Harris Corner Detection using Python/Numpy Investigating the behaviour of the algorithm. Aims: - Find corners in each image ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-08-10 20:09 from __future__ import unicode_literals import bluebottle.utils.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
""" Check if containers can be stored in the database, i.e. the ORM model is working. """ import datetime import unittest from conflowgen.domain_models.factories.vehicle_factory import UnrealisticValuesException, VehicleFactory from conflowgen.domain_models.data_types.mode_of_transport import ModeOfTransport from con...
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/turtlebot/catkin_ws/install/include".split(';') if "/home/turtlebot/catkin_ws/install/include" != "" else [] PROJECT_CATKIN_DEPENDS = "roscpp".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX =...
# Copyright 2015 Hewlett-Packard Development Company, L.P. # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/11/4 18:48 # @Author : DaiPuWei # E-Mail : 771830171@qq.com # blog : https://blog.csdn.net/qq_30091945 # @Site : 中国民航大学北教25实验室506 # @File : Other.py # @Software: PyCharm import pandas as pd import numpy as np def Merge(data,row,col): """...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
# connectors/mxodbc.py # Copyright (C) 2005-2018 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Provide a SQLALchemy connector for the eGenix mxODBC commercial Python adap...
from django.contrib.auth.models import User from django.db import models class LearnerProfile(models.Model): user = models.OneToOneField(User, unique=True, related_name='learner_profile') active = models.BooleanField(default=True) def __str__(self): return "LearnerProfile: {name}".format(name=sel...
import tensorflow as tf import tensorflow.contrib.slim as slim import numpy as np import os from tensorflow.python.framework import ops import warnings warnings.filterwarnings("ignore") os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' ops.reset_default_graph() class contextualBandit(): def __init__(self): ''' ...
lis = [2,"tres",True,["uno",10,"Hola"],2,"Miau"] rec = lis[2] print(lis) print(rec) print(lis[3][2]) #Acceder a un lista dentro de una lista lis[0] = "zero" lis2 = lis[1:3]#copiar datos de otro array a un nuevo array lis3 = lis[0::2]#Va intercalando dependiendo de lo deseado lis24 = lis[1:3]# print(lis) print(lis2...
def init(job): service = job.service if service.model.data.type.upper() not in ["D", "B"]: raise j.exceptions.Input("disk.ovc's type must be data (D) or boot (B) only")
from pathlib import Path import pytest from genpinctrl import ( validate_config_entry, format_mode, format_mode_f1, format_remap, get_gpio_ip_afs, get_mcu_signals, main, ) def test_validate_config_entry(): """Check that config entries are validated correctly""" # no name ent...
# Copyright (C) 2013-2016 Martin Vejmelka, UC Denver # # 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, mer...
__Author__ = "noduez" import sys import pygame from pygame.sprite import Group from settings import Settings from game_stats import GameStats from scoreboard import Scoreboard from button import Button from ship import Ship import game_functions as gf def run_game(): # 初始化游戏并创建一个屏幕对象 pygame.init() ai_se...
from rest_framework.views import APIView from rest_framework import status from rest_framework.response import Response from django.http import HttpResponse from xhtml2pdf import pisa import datetime from django.db import connection import pandas as pd import requests import json from django.conf import settings import...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modif...
from setuptools import setup APP = ['hivebar.py'] DATA_FILES = [] OPTIONS = { 'argv_emulation': True, 'plist': { 'LSUIElement': True, }, 'packages': ['rumps'], 'iconfile':'hivebar.icns', } setup( app=APP, data_files=DATA_FILES, options={'py2app': OPTIONS}, setup_requires=[...
# top down, classic 2D O(mn) time, O(mn) space # top down, 1-D O(mn) time, O(n) space # top down, O(mn) time, O(1) space # bottom up, classic 2D O(mn) time, O(mn) space # bottom up, 1-D O(mn) time, O(n) space # bottom up, O(mn) time, O(1) space # left-right, classic 2D O(mn) time, O(mn) space # left-right, 1-D O(mn) ti...
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
#### 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/creature/npc/droid/crafted/shared_imperial_probot_advanced.iff" result.attri...
{ 'targets': [ { 'target_name': 'binding', 'sources': [ 'src/binding.cc', ], "include_dirs" : [ '<!(node -e "require(\'nan\')")' ], 'dependencies': [ 'deps/mpg123/mpg123.gyp:output' ], } ] }
import unittest import sys import warnings warnings.simplefilter('ignore', FutureWarning) sys.path.append("../") # Import import ecdfo_on_cuter_equalities_test #import ecdfo_main_test loader = unittest.TestLoader() # Tests suite = loader.loadTestsFromTestCase(ecdfo_on_cuter_equalities_test.Test_ecdfo_on_cuter_equa...
from setuptools import setup # from blog.csdn.net/tcy23456/article/details/91886555 with open('README.md') as f: long_des=f.read() with open('requirements.txt') as f: reqs = f.read().strip().split() setup( name = 'imdata', author = 'Jeef', version = '0.0.3', packages = ['imda...
""" Profile ../profile-datasets-py/standard54lev_o3/004.py file automaticaly created by prof_gen.py script """ self["ID"] = "../profile-datasets-py/standard54lev_o3/004.py" self["Q"] = numpy.array([ 1.39778500e+00, 2.03490900e+00, 2.66179600e+00, 3.22653400e+00, 3.85400000e+00, 4.3405080...
#!/usr/bin/env python # # assa-2020.py # Search SHODAN for Cisco ASA CVE-2020-3452 # # Author: random_robbie import shodan import sys import re import requests from time import sleep from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarnin...
# # ================================================================= # ================================================================= from nova import utils from nova.openstack.common import log as logging from powervc_nova.network.powerkvm.agent import commandlet from powervc_nova.network.powerkvm.agent import mu...
import argparse import os import torch from tinynn.converter import TFLiteConverter from tinynn.util.converter_util import export_converter_files, parse_config CURRENT_PATH = os.path.abspath(os.path.dirname(__file__)) def export_files(): from models.cifar10.mobilenet import DEFAULT_STATE_DICT, Mobilenet mo...
from collections import OrderedDict from ConvRNN import CGRU_cell, CLSTM_cell # build model # in_channels=v[0], out_channels=v[1], kernel_size=v[2], stride=v[3], padding=v[4] convlstm_encoder_params = [ [ OrderedDict({'conv1_leaky_1': [1, 16, 3, 1, 1]}), OrderedDict({'conv2_leaky_1': [64, 64, 3, 2...
import datetime import functools import json import urllib.parse import pytz from django.conf import settings from django.contrib.staticfiles import finders from django.urls import reverse, reverse_lazy from django.db import models from django.utils.timezone import make_naive from django.utils.translation import get_...
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-08-08 20:50 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('ruleCategories', '__first__'), ...
import pandas from sklearn import model_selection from sklearn.linear_model import LogisticRegression import pickle import codecs import json import gensim import numpy as np import math import random import numpy import operator import scipy import Queue from heapq import nlargest import sys start = int(sys.argv[1]) ...
import matplotlib.pyplot as plt import matplotlib matplotlib.rcParams['font.sans-serif'] = ['SimHei'] matplotlib.rcParams['axes.unicode_minus'] = False fig = plt.figure() # 模拟数据 x = [1, 2, 3, 4, 5, 6, 7, 8] y = [1, 2, 3, 1, 6, 3, 5, 9] left, bottom, width, height = 0.1, 0.1, 0.8, 0.8 x1 = fig.add_axes([left, bottom...
from distutils.core import setup setup( name="uoyweek", version="1.1", description="Calculate and print formatted University of York term dates", author="Luke Moll", url="https://github.com/LukeMoll/pyuoyweek", packages=["uoyweek"], python_requires=">3.6", # for fstrings entry_points={ ...
from src.harness.agentThread import AgentThread class Task: def __init__(self): self.loc = None self.assignId = None self.taskId = None class DefaultName(AgentThread): def __init__(self, config, motion_config): super(DefaultName, self).__init__(config, motion_config) ...
import mock from django.contrib.auth import get_user_model from django.contrib.auth.models import Group from django.test import TestCase from wagtail.images.models import Image from wagtail.images.tests.utils import get_test_image_file from wagtail.tests.modeladmintest.models import Author, Book, Publisher, Token from...
__author__ = "The One & Only Javi" __version__ = "1.0.0" __start_date__ = "25th July 2020" __end_date__ = "5th August 2020" __maintainer__ = "me" __email__ = "little_kh@hotmail.com" __requirements__ = "Bento4 tools, subprocess" __status__ = "Production" __description__ = """ This is the Video Operations module. It can ...
import atexit import logging import os import subprocess import time from future.standard_library import install_aliases from .exception import PyngrokNgrokError, PyngrokSecurityError install_aliases() from urllib.request import urlopen, Request try: from http import HTTPStatus as StatusCodes except ImportErro...
# Copyright (c) 2017 Linaro Limited. # Copyright (c) 2019 Nordic Semiconductor ASA. # # SPDX-License-Identifier: Apache-2.0 '''Runner for flashing with nrfjprog.''' import os import shlex import subprocess import sys from re import fullmatch, escape from runners.core import ZephyrBinaryRunner, RunnerCaps, BuildConfi...
from PyMdlxConverter.common.binarystream import BinaryStream from PyMdlxConverter.parsers.mdlx.tokenstream import TokenStream from PyMdlxConverter.parsers.mdlx.animatedobject import AnimatedObject from PyMdlxConverter.parsers.errors import TokenStreamError filter_map_mdx = {'None': 0, 'Transparent': 1, ...
# !/usr/bin/env python3 # -*- encoding: utf-8 -*- """ ERP+ """ __author__ = 'António Anacleto' __credits__ = [] __version__ = "1.0" __maintainer__ = "António Anacleto" __status__ = "Development" __model_name__ = 'rh_contrato_funcionario.RHContratoFuncionario' import auth, base_models from orm import * from form import ...
import unittest from app import db from app.models import Posts, User, Comments class TestComment(unittest.TestCase): """ Class that holds all test cases for the Comment model """ def setUp(self): self.new_comment = Comments(comment='awesome') def test_instance(self): ...
#!/usr/bin/env python3 # 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. import unittest from unittest.mock import patch from fbpcp.entity.container_instance import ContainerInstanceStatus, C...
# Copyright 1997 - 2018 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish,...
import os import sys import string import codecs import ttfquery.ttffiles import ttfquery.describe import ttfquery.glyphquery from clockface import decodeLetters import Simulate def wtffiles(wtfdir): """list wtffiles in folder""" wtffiles = [] for path,dirs,files in os.walk(wtfdir): for f in fi...
'''Test regression in Matcher introduced in v2.0.6.''' from __future__ import unicode_literals import pytest from ...vocab import Vocab from ...tokens import Doc from ...matcher import Matcher def test_issue1945(): text = "a a a" matcher = Matcher(Vocab()) matcher.add('MWE', None, [{'orth': 'a'}, {'orth'...
from __future__ import unicode_literals from django.db import models #FIXME: Should be made more generic and probably pre-populated supported list # but for now, since we only have a ZM400, this will do. PRINTER_MODELS=[ ('Zebra ZM400', 'Zebra ZM400'), ('Zebra ZM600', 'Zebra ZM600')] LABEL_SHAPES ...
#1 given_dict = {} result_set = set() #2 total_values = int( input("Enter total no of key-value pairs of the dictionary : ")) #3 for i in range(total_values): #4 key_value_str = input( "Enter key and value for index {} separated by ',' : ".format(i)) #5 key_value = key_value_str.split(',')...
import unittest from statistics import mean from package1.subpackage1_1 import num from package2 import expo from package2.subpackage2_1 import stat class TestPackag2(unittest.TestCase): a = 0 b = 0 def setUp(self): global a, b a = num.give_number() b = num.give_number() def...
import weakref from kivy.uix.label import Label from kivy.uix.image import Image from kivy.uix.button import Button from kivy.uix.behaviors import ButtonBehavior from kivy.graphics import Color, Ellipse, Line, Rectangle, BorderImage __all__ = ('SelectableButton', 'KeyboardButton', 'RectShadowButton', 'ImageBu...
#!/usr/bin/python3 import functools import itertools import io import math import sys def manhattanDistance(p1, p2=(0,0)): return abs(p2[0] - p1[0]) + abs(p2[1] - p1[1]) def walkWire(wire, posFn, stepCountSearchFn=False): currentPos = (0,0) stepCount = 0 for (dir, steps) in wire: delta = (...
import time import os import sys import pyntcloud import yaml import copy from open3d.cuda.pybind.geometry import PointCloud from open3d.cuda.pybind.pipelines.registration import Feature, RegistrationResult from typing import NamedTuple, List, Tuple, Optional from tqdm import tqdm import numpy as np import pandas as...
import time from bitarray import bitarray from huffman import freq_string, huffCode def traverse(it, tree): """ return False, when it has no more elements, or the leave node resulting from traversing the tree """ try: subtree = tree[next(it)] except StopIteration: return False ...
#import xlrd, matplotlib.pyplot, and math libraries import xlrd import matplotlib.pyplot as plt import math from xlrd import open_workbook #open Gaia data .xlsx file from computer bench = open_workbook('/Users/adbreeze13/Desktop/UNCResearch/Test/finaldata.xlsx',on_demand=True) #declare arrays for apparent magnitude,...
# encoding: utf-8 import random import torch from torch import nn import torch.nn.functional as F def topk_mask(input, dim, K = 10, **kwargs): index = input.topk(max(1, min(K, input.size(dim))), dim = dim, **kwargs)[1] return torch.autograd.Variable(torch.zeros_like(input.data)).scatter(dim, index, 1.0) def p...
''' Given a string s and an integer k, reverse the first k characters for every 2k characters counting from the start of the string. If there are fewer than k characters left, reverse all of them. If there are less than 2k but greater than or equal to k characters, then reverse the first k characters and left the othe...
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------ # # Created by Martin J. Laubach on 2011-08-01 # Copyright (c) 2011 Martin J. Laubach. All rights reserved. # # --------------------------------------------------------...
""" Django settings for julo_doc project. Generated by 'django-admin startproject' using Django 2.0.4. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os i...
# 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...
#!/usr/bin/env python3 ## ## def sshnodes(ip, username, password, nodename): print('param1 is:', nodename) print('param2 is:', ip) print('param3 is:', username) print('param4 is:', password) nodedict = {'nodename':'rtr002','ip':'10.0.0.200','username':'admin','password':'cisco'} sshnodes(**nodedict) ...
# -*- coding: utf-8 -*- # 内部库 import time from collections import OrderedDict # 第三方库 from pymongo import MongoClient from scrapy.conf import settings from scrapy.exceptions import DropItem class BusinessDataSpiderPipeline(object): def __init__(self): # 连接到MongoDB数据库 _conn = MongoClient(host=set...
""" ******************************************************* * * AlignFaces - INIT FILE * * Version: Version 1.0 * License: Apache 2.0 * Written by: Carl Michael Gaspar * Created on: March 14, 2019 * Last updated: March 14, 2019 * ******************************************************* """ from .mak...
import numpy as np import numba from _loop_hafnian_subroutines import ( precompute_binoms, nb_ix, matched_reps, find_kept_edges, f_loop, f_loop_odd, get_submatrices, get_submatrix_batch_odd0, eigvals ) @numba.jit(nopython=True, parallel=True, cache=True) def _calc_loop_hafnian...
from django.contrib import admin from .models import * # Register your models here. admin.site.register(Userprofile) admin.site.register(MainClass) admin.site.register(SubClass) admin.site.register(Lesson) admin.site.register(Grade) admin.site.register(Event) admin.site.register(Request) admin.site.register(Archive)
"""Filters for Zinnia admin""" from django.db.models import Count from django.utils.encoding import smart_text from django.contrib.admin import SimpleListFilter from django.utils.translation import ungettext_lazy from django.utils.translation import ugettext_lazy as _ from zinnia.models.author import Author from zinni...
from . import db from flask_login import UserMixin from sqlalchemy.sql import func class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) email = db.Column(db.String(400), unique=True) password = db.Column(db.String(400)) first_name = db.Column(db.String(400)) usertype = db....
from flask import Flask from optparse import OptionParser import api from app import config def create_app(): app = Flask(__name__, static_folder='static') app.register_blueprint( api.bp, url_prefix='') app.config['SECRET_KEY'] = config.SECRET_KEY return app def new_app(*args, **kw...
# KicadModTree 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) any later version. # # KicadModTree is distributed in the hope that it will be useful, # bu...
############################################################################### # File Name : jackhmmer_runner.py # Created By : Qing Ye # Creation Date : [2016-04-17 22:30] # Last Modified : [2017-11-15 18:54] # Description : ############...
# Copyright 2018 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 o...
from ..utility.Uint8Tensor import * from .color2float import * def black(): """ Returns the black RGB tensor Returns ------- Tensor the (1,3,) black tensor """ return torch.zeros(1, 3) def white(): """ Returns the white RGB tensor Returns ------- T...
""" opensea.io Model """ import logging from datetime import datetime import pandas as pd import requests from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) API_URL = "https://api.opensea.io/api/v1" @log_start_end(log=logger) def get_collection_stats(slug: str) -> pd.Dat...
def selectionsort(L): n = len(L) for i in range(n-1): max_index=0 for index in range(n - i): if L[index] > L[max_index]: max_index = index L[n-i-1], L[max_index] = L[max_index], L[n-i-1]
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2017 Alex Forencich 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...
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse from django.http import Http404 from django.template import Context, loader from polls.models import Poll #~ def index(request): #~ return HttpResponse("Hello, world. You're at the poll index.") #~ def index(request):...
# coding: utf-8 """ CryptoWeather OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.private_trend_tabular_response_data_trend_tabular import PrivateTr...
# -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2019-11-05 20:53 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('django_airavata_wagtail_base', ...
# -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2022 all rights reserved # # externals from .. import tracking # superclass from ..patterns.AttributeClassifier import AttributeClassifier # class declaration class Requirement(AttributeClassifier): """ Metaclass that enables the harve...
# Copyright 2021 solo-learn development team. # 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, publ...
# -*- coding: utf8 -*- # Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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...
""" Copyright (C) 2006 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, softwa...
from logging import error from dotenv import dotenv_values from main import father import json import discord config = dotenv_values(".env") # SECRET_KEY = os.getenv("TOKEN") SECRET_KEY = config["TOKEN"] params = None countries = None # with open("./../../params.json", "r") as read_file: with open("params.json", ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Page.title_en' db.add_column(u'web_page', 'title_en', ...
#!/usr/bin/python3 # # Copyright (C) 2019 Oleg Shnaydman # # 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...
from core.himesis import Himesis class HeattributelefteAnnotationsSolveRefEAttributeEAnnotationEAttributeEAnnotation(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HeattributelefteAnnotationsSolveRefEAttributeEAnnotationEAttributeEAnnotation. """ ...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 0, transform = "None", sigma = 0.0, exog_count = 0, ar_order = 0);
# 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"); y...
# ./pyxb/bundles/wssplat/raw/soap12.py # -*- coding: utf-8 -*- # PyXB bindings for NM:d8b77ba08b421cd2387db6ece722305a4cdf2cdc # Generated 2013-09-18 10:35:50.958395 by PyXB version 1.2.3 # Namespace http://www.w3.org/2003/05/soap-envelope import pyxb import pyxb.binding import pyxb.binding.saxer import io import pyxb...
# Copyright 2021 Dynatrace 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 agreed t...
import sys import argparse import cv2 import editdistance from DataLoader import DataLoader, Batch from Model import Model, DecoderType from SamplePreprocessor import preprocess class FilePaths: "filenames and paths to data" fnCharList = '../model/charList.txt' fnAccuracy = '../model/accuracy.txt' fnTrain = '../d...
from ._tests import IndexerTestCase
# Note: # Taking time and space complexity into consideration, # this implementation is not good enough. # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def removeLeafNodes(self, roo...
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.TDT/Sans_16/udhr_Latn.TDT_Sans_16.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))