text
stringlengths
2
999k
import ast from py2many.context import add_variable_context, add_list_calls from py2many.scope import add_scope_context def parse(*args): source = ast.parse("\n".join(args)) add_scope_context(source) add_variable_context(source, (source,)) return source class TestListCallTransformer: def test_ca...
import pandas as pd import pyodbc data = pd.read_csv (r'C:\Users\Nikhil\Desktop\ags_intern\dataset.csv') studio = pyodbc.connect('Driver={SQL Server};''Server=DESKTOP-9T4GEVI;''Database=patil;''Trusted_Connection=yes;') cursor = studio.cursor() #data = pd.DataFrame(data, columns= ['ID','Name'] ) for row in data.ite...
#!/usr/bin/env python3 # # This script is kept here for a record. It tries to generate new "foreground" # domain from an existing domain. # # This is abandonned because of the unreliability of "converting" domain. # Libvirt XML interface is too low-level for this kind of operation. # import libvirt import lxml.etree ...
from django.conf import settings import jinja2 from jingo import register from amo.utils import urlparams from amo.urlresolvers import reverse from addons.helpers import persona_preview @register.function @jinja2.contextfunction def disco_persona_preview(context, persona, size='large', linked=True, ...
# Generated by Django 2.2.24 on 2021-08-02 20:12 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('task_profile', '0001_initial'), ('task_category', '0001_initial'), ] operations = [ ...
"""Provides the User class.""" from typing import TYPE_CHECKING, Dict, Iterator, List, Optional, Union from warnings import warn from ..const import API_PATH from ..exceptions import ReadOnlyException from ..models import Preferences from ..util.cache import cachedproperty from .base import PRAWBase from .listing.gene...
med = 0 h = '' m = 0 hi = 0 for c in range(1, 5): n = input(f'Qual o nome da {c}ª pessoa? ') s = input(f'Qual o sexo da {c}ª pessoa [M/F]? ').strip().lower() i = int(input(f'Qual a idade da {c}ª pessoa? ')) if s in 'f' and i < 20: m += 1 if s in 'm' and i > hi: hi = i h = n ...
# Copyright 2011 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 a...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import numpy as np from scipy.stats import norm from scipy.optimize import fminbound __all__ = ["polyserial_correlation"] def polyserial_correlation(continuous, ordinal): """Computes the polyserial correlation. Estimates the correlation value based on a bivariate normal distribution. Args:...
# import databases import os from datetime import date, datetime, time, timedelta from typing import Optional from fastapi import Request from fastapi_users import FastAPIUsers, models from fastapi_users.authentication import CookieAuthentication from fastapi_users.db import SQLAlchemyUserDatabase from fastapi.respo...
# -*- coding: utf-8 -*- """Create an application instance.""" from flask.helpers import get_debug_flag from {{cookiecutter.app_name}}.app import create_app from {{cookiecutter.app_name}}.settings import DevConfig, ProdConfig CONFIG = DevConfig if get_debug_flag() else ProdConfig app = create_app(CONFIG)
from .figure import Figure from .traces import Scatter, ErrorBand, Histogram, Heatmap, Contour, KDE import plotly.graph_objects as go import plotly import numpy as np import warnings class PlotlyFigure(Figure): def __init__(self): super().__init__() self.plotly_figure = go.Figure() # Methods that must be overr...
# -*- coding: utf-8 -*- import unittest from pathlib import Path from starlette.testclient import TestClient from src.main import app client = TestClient(app) directory_to__files: str = "data" class Test(unittest.TestCase): # xml endpoint test def test_xml_four_hundred(self): file_directory = f"{d...
class Pessoa: olhos = 2 def __init__(self, *filhos, nome=None, idade=43): self.idade = idade self.nome = nome self.filhos = list(filhos) def cumprimentar(self): return f'Olá {id(self)}' if __name__ == '__main__': fernando = Pessoa(nome='Fernando') cesar = Pessoa(f...
import os import subprocess #import deeplabcut import sys import tkinter from tkinter import ttk from tkinter.filedialog import askopenfilename,askdirectory # from tkinter_functions import greyscale,downsamplevideo,superimposeframe,colorized,shortenvideos,convertavitomp4,convertpowerpoint,extract_allframescommand,merge...
print("importing") from datasets import load_dataset from datasets import load_metric from transformers import AutoTokenizer, AutoModelForSequenceClassification from transformers import TrainingArguments, DefaultFlowCallback, PrinterCallback from transformers import Trainer import torch from torch import nn import num...
from tkinter import * from tkinter.font import BOLD from algoritmos.checksum import * from algoritmos.noise_1_bits import * ###################################################################################################### # Pagina 4 def tab4(root, common_img, bit_n, bits_p): pagina4 = Toplevel(root) pagin...
import numpy as np a = np.array([1,2,3,4,5]) b = np.argmax(a[1:2]) b
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen...
# Find All Possible Recipes from Given Supplies """ toughest part was to handle cycles, which I assumed wouldn't exist in the test cases but did """ from typing import List class Solution: def findAllRecipes(self, recipes: List[str], ingredients: List[List[str]], supplies: List[str]) -> List[str]: """ ...
""" Dummy conftest.py for urban_backscatter. If you don't know what this is for, just leave it empty. Read more about conftest.py under: - https://docs.pytest.org/en/stable/fixture.html - https://docs.pytest.org/en/stable/writing_plugins.html """ # import pytest
"""friends.py: Implementation of class AbstractTwitterFriendCommand and its subclasses. """ from . import AbstractTwitterCommand from ..parsers import ( parser_user_single, parser_count_users, parser_count_users_many, parser_cursor, parser_skip_status, parser_include_user_entities) # GET frien...
from __future__ import absolute_import, division, print_function import time import mmtbx.refinement.real_space.fit_residues import mmtbx.refinement.real_space from mmtbx.rotamer.rotamer_eval import RotamerEval rotamer_eval = RotamerEval() pdb_poor = """\ CRYST1 36.039 33.133 33.907 90.00 90.00 90.00 P 1 ATOM...
# Copyright 2012 IBM Corp. # 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 app...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="secret-server-sdk-client", version="1.0", author="Paulo Dorado", author_email="support@thycotic.com", description="Thycotic python client that uses the Thycotic SDK to get secrets from sec...
# -*- coding: utf-8 -*- """ Class definition of YOLO_v3 style detection model on image and video """ import colorsys import os from timeit import default_timer as timer import numpy as np from keras import backend as K from keras.models import load_model from keras.layers import Input from PIL import Image, ImageFont...
import os import sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))))) import server # ref : https://cloud.kt.com/portal/openapi-guide/computing_enterprise-Server-server_api_make # Zone parameter : Mandatory # 1) KR-CA : KOR-Central A Zone # ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0053_merge'), ] operations = [ migrations.AddField( model_name='userdevice', name='is_de...
# Movie Trailers project main function: # - define a list of movies, # - open the "Fresh Tomatoes" web site to view list and trailers. import fresh_tomatoes import media import turtle movies = [ media.Movie( "Toy Story", "A story of a boy and his toys that come to life.", "https://uplo...
import os.path import sys SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) def get_include(): return os.path.abspath(os.path.join(SCRIPT_DIR, '..', 'include')) def print_include(): sys.stdout.write(get_include()) def get_lib(): return os.path.abspath(os.path.join(SCRIPT_DIR, '..', 'lib')) def p...
from dimagi.ext.jsonobject import JsonObject, StringProperty, ListProperty, DictProperty from jsonobject.base import DefaultProperty from corehq.apps.userreports.exceptions import BadSpecError from corehq.apps.userreports.expressions.getters import getter_from_property_reference from corehq.apps.userreports.operators i...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Este programa es sólo el comienzo de un ping-pong muy simple pong02.py ''' # Imports generales import pygame import sys from pygame.locals import * # Inicialización entorno pygame.init() # Definiciones de colores BLANCO = (255,255,255) NEGRO = (0,0,0) # Inicializac...
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for r in orm.Repute.objects.all(): r.value = r.positive + r.negative r.user_previous_rep = r.reputa...
import inspect import os.path as op import re import sys from unittest import SkipTest import warnings from pkgutil import walk_packages from inspect import getsource import celer # copied from sklearn.fixes if hasattr(inspect, 'signature'): # py35 def _get_args(function, varargs=False): params = inspec...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2018, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import torch from torch.distributions import constraints from torch.nn import Parameter import pyro import pyro.distributions as dist from pyro.contrib.gp.parameterized import Parameterized from pyro.nn.module import PyroParam, Py...
# # Copyright 2013 Red Hat, 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 writi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Dec 14 13:31:04 2020 @author: jacopop """ # Class to scroll the atlas slices (coronal, sagittal and horizontal) class IndexTracker(object): def __init__(self, ax, X, pixdim, p, S=None): self.ax = ax self.plane = p.lower() ...
import time import pytest from .pages.product_page import ProductPage from .pages.basket_page import BasketPage from .pages.login_page import LoginPage link0 = "http://selenium1py.pythonanywhere.com/" link1 = "http://selenium1py.pythonanywhere.com/catalogue/the-shellcoders-handbook_209/?promo=newYear" link2 = "http://...
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # from __future__ import absolute_import from cfgm_common.utils import CacheContainer from .neutron_plugin_db import DBInterface from pysandesh.sandesh_logger import * from pysandesh.sandesh_base import * from six.moves import configparser import six f...
# Copyright 2021 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import setuptools from importlib.machinery import SourceFileLoader version = SourceFileLoader( 'onair.version', 'onair/version.py' ).load_module() with open('README.md', 'r') as fdesc: long_description = fdesc.read() if __name__ == "__main__": setuptools.setup( # Name of the project nam...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from ..company import Provider as CompanyProvider class Provider(CompanyProvider): formats = ("{{company_prefix}}{{company_suffix}}", ) company_prefixes = ( "品王餐飲", "一統企業", "品誠", "台灣電信", "Goagle", "一統星巴克", "台日積體電路", "榮長航空", ...
sa,sg=0,0 ans='' for _ in range(int(input())): a,g=map(int,input().split()) if sa-sg+a<=500: ans+='A' sa+=a else: ans+='G' sg+=g print(ans)
# -*- coding: utf-8 -*- # Copyright: 2015 Bastian Blank # License: MIT, see LICENSE.txt for details. import array import struct import time from uuid import uuid4 class VHDFooter: _struct = struct.Struct('>8sLLQL4sL4sQQ4sLL16sB427x') size = _struct.size vhd_timestamp_base = 946684800 def __init__(...
import digit_detector.file_io as file_io import numpy as np import os import cv2 import digit_detector.preprocess as preproc #import digit_detector.train as train_ import digit_detector.train_inceptionv3 as train_ DIR = '../train' NB_FILTERS = 32 NB_EPOCH = 30 DETECTOR_FILE = 'detector_model.hdf5' RECOGNIZER_FILE = ...
import re from qtpy import QT_VERSION from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from logger import logger import utils QT5 = QT_VERSION[0] == "5" # TODO(unknown): # - Calculate optimal position so as not to go out of screen area. class LabelQLineEdit(QtWidgets.QLineEdit): def...
# -*- coding: utf-8 -*- ############################################################################ # # Copyright © 2014, 2015 E-Democracy.org and contributors # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this...
# ---------------------------------------------------------------------- # Test sync-mibs # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Third-party m...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf NUM_CLASSES = 6 IMAGE_SIZE = 144 IMAGE_PIXELS = 500 def _variable_summaries(var, name): with tf.variable_scope('summaries'): mean = tf.reduce_mean(var) tf.scal...
# # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # import pandas as pd from mlos.Logger import create_logger from mlos.Optimizers.BayesianOptimizerConfigStore import bayesian_optimizer_config_store from mlos.Optimizers.BayesianOptimizerConvergenceState import BayesianOptimizerConver...
# coding=UTF8 from mercurial_reviewboard import reviewboard SAMPLE_DIFF='''diff -r 000000000000 -r 95a59137df3f file_with_special_char.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/file_with_special_char.txt Thu Feb 03 15:38:42 2011 -0600 @@ -0,0 +1,1 @@ +Look it up in the encyclopædia. \ No newline at end o...
#!/usr/bin/env python3 import argparse import pandas as pd import numpy as np from glob import iglob from os.path import join # desired output for branches # dataframe columns: HUC, branch_id, exit status, ,time, ram, def compile_summary(gms_output_dir,ouput=None): unit_summary = join(gms_output_dir,logs, 'sum...
#!/usr/bin/env python # -*- coding: utf-8 -*- from .dependency import Dependency from ..model.target import WPSState from ..util.process import Process import re class Tshark(Dependency): ''' Wrapper for Tshark program. ''' dependency_required = False dependency_name = 'tshark' dependency_url = 'apt-g...
"""Utilities shared by unit tests""" import sys import numpy as np import numbers import functools import types from contextlib import contextmanager import os import warnings from pathlib import Path from unittest import mock from tempfile import TemporaryDirectory import unittest def needs_cvxpy(fn): """Shortcu...
# # PySNMP MIB module HPN-ICF-AAL5-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HPN-ICF-AAL5-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:25:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar ...
# -*- coding: utf-8 -*- # (c) The James Hutton Institute 2019 # (c) University of Strathclyde 2019 # Author: Leighton Pritchard # # Contact: # leighton.pritchard@strath.ac.uk # # Leighton Pritchard, # Strathclyde Institute for Pharmacy and Biomedical Sciences, # Cathedral Street, # Glasgow, # G1 1XQ # Scotland, # UK # ...
class Solution: def intersection(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: List[int] """ return list(set(nums1) & set(nums2)) if __name__ == '__main__': solution = Solution() print(solution.intersection([1, 2,...
import iris def irisversion(): print(f"{iris.__version__=}")
""" Django settings for darularkam project. Generated by 'django-admin startproject' using Django 2.2.7. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os...
# -*- coding: utf-8 -*- from payment.settings.base import * DEBUG = False TEMPLATE_DEBUG = False SESSION_COOKIE_SECURE = True CSRF_COOKIE_SECURE = True ALLOWED_HOSTS = ["*"]
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=3 # total number=47 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode from cirq.contrib.svg import SVGCircuit # Symbols for...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # XCode Project Creator # import os, sys, re, shutil, codecs from shutil import copyfile from os.path import join, splitext, split, exists from datetime import date template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) fileTargets = ['.c...
from ._version import get_versions __version__ = get_versions()['version'] del get_versions from .utils import set_default_palette set_default_palette() from .tearsheet import Tearsheet from .perf import DailyPerformance, AggregateDailyPerformance from .paramscan import ParamscanTearsheet from .shortfall import Short...
#coding=utf-8 from __future__ import division from math import pi, radians, degrees, tan, hypot, atan2, cos, sin """ Custom Robofab pens — Loïc Sander, june 2015. The MIT License (MIT) Copyright (c) 2014 Loïc Sander Permission is hereby granted, free of charge, to any person obtaining a copy of this software and as...
from functools import wraps from webob import Request def robot(adapterModule, **kwargs): def wrapper(func): assert hasattr(adapterModule, 'Adapter') bot = adapterModule.Adapter(func, **kwargs) return wraps(func)(bot) return wrapper
# -*- coding: utf-8 -*- from setuptools import setup, find_packages # import sphinx_pypi_upload import sys if sys.version_info[0] < 3: import codecs with codecs.open('README.md', 'r', 'utf-8') as f: readme = f.read() else: import io with io.open('README.md', 'r', 'utf-8') as f: readm...
import os import posixpath import mimetypes from gzip import GzipFile import datetime from tempfile import SpooledTemporaryFile import re try: from cStringIO import StringIO except ImportError: try: from StringIO import StringIO # noqa except ImportError: from io import StringIO # noqa f...
"""Test modules for all the functions."""
import json import requests from time import sleep from datetime import datetime with open('/home/msnow/site_configs/secrets.json', 'r') as fp: secrets = json.load(fp) client_id = secrets['board_game_atlas']['client_id'] with open('/home/msnow/git/bgg/src/data/bga_games_190511.json', 'r') as fp: gam...
#!/usr/bin/env python3 """The setup script.""" from setuptools import find_packages, setup with open("README.rst") as readme_file: readme = readme_file.read() with open("requirements.txt", "r") as f: requirements = list(map(str.strip, f.read().split("\n")))[:-1] setup_requirements = ["pytest-runner"] test...
"Sorteando um aluno" import random n1 = str(input('Digite o nome: ')) n2 = str(input('Digite o nome: ')) n3 = str(input('Digite o nome: ')) lista = [n1, n2, n3] print("O aluno escolhido foi, {}".format(random.choice(lista)))
from __future__ import annotations from pathlib import Path import logging import numpy as np from .. import read from .plot import plotdiff from .utils import err_pct, load_tol from .precip import compare_precip from .efield import compare_Efield def compare_input( new_dir: Path, refdir: Path, *, ...
from operator import or_ from functools import reduce from flask_login import UserMixin from libgravatar import Gravatar from sqlalchemy.ext.hybrid import hybrid_property from flaskshop.database import Column, Model, db from flaskshop.extensions import bcrypt from flaskshop.constant import Permission class User(Mod...
# -*- coding: utf-8 -*- # File generated according to Generator/ClassesRef/Simulation/FluxLinkFEMM.csv # WARNING! All changes made in this file will be lost! """Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Simulation/FluxLinkFEMM """ from os import linesep from sys imp...
#!/usr/bin/env python3 import time import machinepark as mp import boto3 import json import threading iot = boto3.client('iot') iot_data = boto3.client('iot-data') def update(machine_id, data_payload): # print(machine_id, data_payload) res = iot_data.update_thing_shadow(thingName = machine_id, ...
import FWCore.ParameterSet.Config as cms # helper fuctions from HLTrigger.Configuration.common import * # add one customisation function per PR # - put the PR number into the name of the function # - add a short comment # for example: # CCCTF tuning # def customiseFor12718(process): # for pset in process._Proces...
# Helper functions import os import glob # library for loading images from a directory import cv2 # This function loads in images and their labels and places them in a list # The list contains all images and their associated labels # For example, after data is loaded, im_list[0][:] will be the first image-label pair ...
# SPDX-License-Identifier: Apache-2.0 from .....proto import helper from .....proto import onnx_proto from ....common._registration import register_converter from ....common._apply_operation import apply_constant def convert_load_constant(scope, operator, container): params = operator.raw_operator.loadConstant ...
import doctest import gong_xi_fa_cai if __name__ == "__main__": doctest.testmod(gong_xi_fa_cai)
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or 'gimmegimmegimme' SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ 'sqlite:///' + os.path.join(basedir, 'todo.db') SQLALCHEMY_TRACK_MODIFICATIONS = False ...
# check utils lsvd def izmat_lsvd(): import numpy as np from limetr.special_mat import izmat ok = True tol = 1e-10 # problem 1, tall matrix # ------------------------------------------------------------------------- n, k = 6, 3 z = np.random.randn(n, k) tr_u, tr_s, tr_vt = np.lina...
#!/usr/bin/env python from kivy.app import App from kivy.uix.behaviors import ButtonBehavior from kivy.uix.button import Button from kivy.uix.image import Image from kivy.uix.pagelayout import PageLayout from kivy.uix.boxlayout import BoxLayout from kivy.properties import StringProperty from kivy.properties i...
"""almacen URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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-bas...
# The MIT License (MIT) # # Copyright (c) 2015 Geoffroy Givry # # 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, c...
''' XbrlDpmEbaDB.py implements an SQL database interface for Arelle, based on the DPM EBA database. This is a semantic data points modeling representation of EBA's XBRL information architecture. This module may save directly to a Postgres, MySQL, SEQLite, MSSQL, or Oracle server. This module provides the execution...
from appengine_django.models import BaseModel from google.appengine.ext import db from site_settings.models import Establishment class Order(BaseModel): #user = db.ReferenceProperty(User, required=True) ordered_at = db.DateTimeProperty(required=True) status = db.StringProperty(required=True, choices=["PEND...
import pdf_to_json as p2j import json url = "file:data/multilingual/Deva.SAN/Sun-ExtA_12/udhr_Deva.SAN_Sun-ExtA_12.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))
from all_complex_arrays_fwrap import * import numpy as np n1, n2 = 3, 4 ain = np.empty((n1,n2), dtype=np.complex64, order='F') aout = ain.copy('F') ainout = ain.copy('F') ano = ain.copy('F') aout_ = aout.copy('F') ainout_ = ainout.copy('F') ano_ = ano.copy('F') def init(ain, aout, ainout, ano, aout_, ainout_, ano_):...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import sklearn.preprocessing as prep import tensorflow as tf from autoencoder_models.VariationalAutoencoder import VariationalAutoencoder from tensorflow.examples.tutorials.mnist import input...
# coding=utf-8 # Copyright 2019 Facebook AI Research and the HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 Licens...
# Copyright 2019 Google LLC. # # 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 following disclaimer. # #...
from django.core.management.base import BaseCommand, CommandError from optparse import make_option from tourney.tournament.models import Player, Tournament class Command(BaseCommand): args = '' help = 'Lists all players with their options' option_list = BaseCommand.option_list + ( make_option('-...
from __future__ import division, print_function from builtins import object, zip import pandas as pd import xarray as xr from dask.diagnostics import ProgressBar from numpy import array from past.utils import old_div # This file is to deal with CAMx code - try to make it general for CAMx 4.7.1 --> 5.1 ProgressBar(...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from optparse import make_option from django.core.files.base import ContentFile from django.db.models.fields import FieldDoesNotExist from django.db.models.loading import get_model from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): option_list = BaseCommand.option_list ...
# Generated by Django 2.1.7 on 2020-08-21 23:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('home', '0006_auto_20200820_0156'), ] operations = [ migrations.CreateModel( name='SiparisKayitlari', f...
from piny import YamlLoader, StrictMatcher config = YamlLoader(path="config.yaml", matcher=StrictMatcher).load()
#! /usr/bin/env python # $Id: test_targets.py 7998 2016-12-16 03:45:07Z goodger $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Tests for states.py. """ from __init__ import DocutilsTestSupport def suite(): s = DocutilsTestSupport.ParserTestSuite...