gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib import xml.etree.ElementTree as ET from ftplib import FTP from tempfile import NamedTemporaryFile from django.utils.text import slugify from base import BaseProcessor from efe import iptc class EFEXMLProcessor(BaseProcessor): def connect(self): s...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
from datetime import datetime import re from django.conf import settings import olympia.core.logger from olympia import amo from olympia.activity import log_create from olympia.constants.blocklist import REMOTE_SETTINGS_COLLECTION_LEGACY from olympia.lib.remote_settings import RemoteSettings from olympia.users.utils ...
""" Several basic tests for hierarchical clustering procedures """ # Authors: Vincent Michel, 2010, Gael Varoquaux 2012, # Matteo Visconti di Oleggio Castello 2014 # License: BSD 3 clause from tempfile import mkdtemp import shutil from functools import partial import numpy as np from scipy import sparse from...
# -*- coding: utf-8 -*- __doc__ = """ WebSocket within CherryPy is a tricky bit since CherryPy is a threaded server which would choke quickly if each thread of the server were kept attached to a long living connection that WebSocket expects. In order to work around this constraint, we take some advantage of some inter...
#!/usr/bin/env python # # This library is free software, distributed under the terms of # the GNU Lesser General Public License Version 3, or any later version. # See the COPYING file included in this archive # # The docstrings in this module contain epytext markup; API documentation # may be created by processing this...
__author__ = 'aarongary' import sys import pymongo import requests import MyGeneInfo from itertools import islice from app.util import set_status, create_edges_index from app.status import Status from bson.json_util import dumps from models.TermResolver import TermAnalyzer import ElasticSearch import os from sklearn.l...
from multiprocessing import Value import pytest import time from selenium.webdriver.common.keys import Keys import dash from dash import Dash, Input, Output, State, MATCH, dcc, html, dash_table as dt from dash_test_components import MyPersistedComponent from dash_test_components import MyPersistedComponentNested @...
from nltk.tree import * import os from parsed_tree_loader import * from dep_tree_loader import * class ConllTreeGenerator(): def __init__(self, conll_path, tree_path, dump_path, section_list=[], is_rm_none_word=True, is_lossy=False, is_short_tag=True): self.section_list = section_list; self.conll_p...
#!/usr/bin/env python3 __author__ = 'Bieliaievskyi Sergey' __credits__ = ["Bieliaievskyi Sergey"] __license__ = "Apache License" __version__ = "1.0.1" __maintainer__ = "Bieliaievskyi Sergey" __email__ = "magelan09@gmail.com" __status__ = "Release" import curses import curses.panel import itertools import os import su...
from enerdata.profiles.profile import * from enerdata.contracts.tariff import * from expects import * import vcr from decimal import Decimal with description('A profile with gaps'): with before.all: import random measures = [] start = TIMEZONE.localize(datetime(2015, 3, 1, 1)) end =...
#!/usr/bin/env python from __future__ import print_function import argparse import csv import os.path import re import sys from collections import defaultdict from collections import namedtuple from collections import OrderedDict __author__ = "Eldar Abusalimov" def outerr(*args, **kwargs): kwargs.setdefault('f...
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.storage import Storage def config(settings): """ Template settings for RGIMS: Relie...
from pprint import pformat import sys from threading import Lock try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import socket from django import http from django.core import signals from django.core.handlers import base from django.core.urlresolvers import set_script_pref...
import copy import re from io import BytesIO from itertools import chain from urllib.parse import quote, urlencode, urljoin, urlsplit from django.conf import settings from django.core import signing from django.core.exceptions import ( DisallowedHost, ImproperlyConfigured, RequestDataTooBig, ) from django.core.fil...
# ##### BEGIN MIT LICENSE BLOCK ##### # # Copyright (c) 2015 - 2021 Pixar # # 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 u...
''' Defines the manager for global hot keys. @author: Eitan Isaacson @organization: IBM Corporation @copyright: Copyright (c) 2006, 2007 IBM Corporation @license: BSD All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribution, an...
# -*- coding: utf-8 -*- import io import operator import os import re import sys import signal import tempfile import subprocess import argparse try: import psutil except ImportError: psutil = None def _log_info(msg, **kwds): if kwds: msg = msg.format(**kwds) sys.stdout.write(msg) sys.st...
import os import re import threading from xml.dom import minidom from lib import cover_creator as cover_creator_module from lib import data_manager as data_manager_module from lib import description_page as description_page_module from lib import epub_zip as epub_zip_module from lib import story_json as story_json_mod...
# -*- coding: utf-8 -*- from unicodedata import normalize from flask import Flask, render_template, request, abort, session, flash, redirect, url_for, Response, g from flaskext.markdown import Markdown from werkzeug.contrib.atom import AtomFeed from werkzeug import secure_filename from urlparse import urljoin from pymo...
<<<<<<< HEAD <<<<<<< HEAD import unittest from test import support # Skip this test if the _testcapi module isn't available. support.import_module('_testcapi') from _testcapi import getargs_keywords, getargs_keyword_only try: from _testcapi import getargs_L, getargs_K except ImportError: getargs_L = None # PY_L...
# -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission to use, copy, modify,...
from typing import List, Iterable, Sequence, ByteString import sdl2 from sdl2.ext import Color from sdl2 import ( SDL_CreateRGBSurfaceWithFormatFrom, SDL_ConvertSurfaceFormat, SDL_FreeSurface, SDL_Error ) def ltorgba(c, alpha=0xff): return (c << 24) | (c << 16) | (c << 8) | alpha def rgbafrom2bit...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # 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.apach...
# Copyright (c) 2013 Mirantis 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 writ...
#from http://bookworm-project.github.io/Docs/input.txt.html import os import xml.dom.minidom import urllib import sys import magic import re import wget #from https://github.com/euske/pdfminer/tree/b0e035c24fa062cd55cfd55ffc12bc3aa60a4ef6 download the zip and python setup.py install from cStringIO import Strin...
"""A fast, lightweight, and secure session WSGI middleware for use with GAE.""" from Cookie import CookieError, SimpleCookie from base64 import b64decode, b64encode import datetime import hashlib import hmac import logging import pickle import os import threading import time from google.appengine.api import memcache f...
# -*- coding: UTF-8 -*- # Copyright 2013-2018 Luc Saffre # License: BSD (see file COPYING for details) from builtins import str from builtins import object import logging logger = logging.getLogger(__name__) from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.transla...
# Copyright (c) 2012 OpenStack Foundation. # # 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...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring, long, unicode import functools from collections import Mapping from datetime import datetime from sqlalchemy import extract, func fro...
""" Changed from Ed Barosh algorithm. Stable Adapted Global Market Rotation Strategy This strategy rotates between six global market ETFs on a monthly basis. Each month the performance and mean 20-day volitility over the last 13 weekds are used to rank which ETF should be invested in for the coming month. """ impor...
from __future__ import print_function, unicode_literals import os import subprocess import sys import textwrap import time import traceback from collections import OrderedDict from fnmatch import fnmatch import py import pytest import six import tox import tox.session from tox import venv from tox.config import pars...
from __future__ import unicode_literals from boto.ec2.blockdevicemapping import BlockDeviceType, BlockDeviceMapping from moto.core import BaseBackend from moto.ec2 import ec2_backends from moto.elb import elb_backends from moto.elb.exceptions import LoadBalancerNotFoundError # http://docs.aws.amazon.com/AutoScaling/la...
# SUN """ 0000 0010 0000 = 0x020 0100 0010 0010 = 0x422 0010 0000 0100 = 0x204 0000 1111 0000 = 0x0F0 0001 1111 1000 = 0x1F8 1101 1111 1000 = 0xDF8 0001 1111 1011 = 0x1FB 0001 1111 1000 = 0x1F8 0000 1111 0000 = 0x0F0 0010 0000 0100 = 0x204 0100 0100 0010 = 0x442 0000 0100 0000 = 0x040 """ """ [ ] airplane [ ] alarm_c...
# -*- coding: utf-8 -*- # pylint: disable=C0103 """ Unconstrained optimization tools to minimize or maximize an objective function. """ # Author: bertrand-l # License: BSD from __future__ import absolute_import, division, print_function, unicode_literals from copy import copy import numpy as np from warnings import w...
''' TUIO Input Provider =================== TUIO is the de facto standard network protocol for the transmission of touch and fiducial information between a server and a client. To learn more about TUIO (which is itself based on the OSC protocol), please refer to http://tuio.org -- The specification should be of specia...
# -*- coding: utf-8 -*- from datetime import timedelta import numpy as np import pytest from pandas import Timedelta, offsets, to_timedelta def test_construction(): expected = np.timedelta64(10, 'D').astype('m8[ns]').view('i8') assert Timedelta(10, unit='d').value == expected assert Timedelta(10.0, unit...
#!/usr/bin/env python # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL, md5 from youtube_dl.extractor import ( YoutubeIE, DailymotionIE, TEDIE, ) class BaseTestSubtitles(unittes...
# -*- coding: utf-8 -*- #_____________________________________________________________________________ # # Copyright (c) 2012 Berlin Institute of Technology # All rights reserved. # # Developed by: Philipp Meier <pmeier82@gmail.com> # Neural Information Processing Group (NI) # School for Ele...
#!/usr/bin/env python3 # # Copyright (c) 2016-2021, Babak Farrokhi # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this...
import os import numpy as np import sys import cStringIO import re import scipy.io as sio import copy def cell2strtable(celltable, delim='\t'): ''' convert a cell table into a string table that can be printed nicely Parameters: celltable - array-like, ndarray with rows and columns in desired order...
# Here's a probably-not-very-good port of the Adafruit Arduino library for # this sensor. The Adafruit library is located here: # https://github.com/adafruit/Adafruit_TCS34725 # This port is for the Beaglebone Black and the Adafruit_BBIO and Adafruit_I2C # libraries. By AKA MEDIA SYSTEM from Adafruit_I2C import Adafru...
#!/usr/bin/env python2.7 import os import sys import tempfile import shutil from subprocess import call, check_output, CalledProcessError import tarfile from gzip import GzipFile import StringIO import argparse NODEJS_DIST = 'http://nodejs.org/dist' PLATFORM = sys.platform def download(url, filename, verbose=True): ...
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import json import copy import requests from sixgill.sixgill_request_classes.sixgill_auth_request import SixgillAuthRequest from sixgill.sixgill_actionable_alert_client import SixgillActionableAlertCli...
# coding=utf-8 """Link together information on examples, models and evaluation for easier queries.""" from itertools import izip import re from numba import jit import os.path as op import numpy as np import pandas as pd from pandas.core.index import MultiIndex from sklearn.decomposition import NMF from whatami import...
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os.path import requests import cStringIO import PIL.Image import numpy as np import scipy.misc import math from . import is_url, HTTP_TIMEOUT, errors # Library defaults: # PIL.Image: # size -- (width, height) # np.array: # s...
import re import string import unicodedata ALPHANUMERIC = set(string.ascii_letters + string.digits) PUNCTUATION = set(string.punctuation) STRING_TYPES = (bytes, str) DEFAULT_ENCODING = 'UTF-8' _TO_CAMEL_REGEX = re.compile(r'_+([a-zA-Z0-9])') _TO_SNAKE_REGEX_1 = re.compile(r'(.)([A-Z][a-z]+)') _TO_SNAKE_REGEX_2 = re...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import socket import re from functools import reduce def ip2int(ip): return reduce(lambda a,b: a*256+b, map(int, ip.split('.')), 0) def int2ip(ip): if not 0 <= ip <= 0xffffffff: raise ValueError('long ip must be between 0 and 0xfffffff...
""" Utils. """ import copy from collections import OrderedDict import inflection from django.conf import settings from django.utils import six from django.utils.module_loading import import_string as import_class_from_dotted_path from django.utils.translation import ugettext_lazy as _ from rest_framework.exceptions im...
# do not pre-load # Import any DAObject classes that you will need from docassemble.base.util import Individual, Person, DAObject # Import the SQLObject and some associated utility functions from docassemble.base.sql import alchemy_url, connect_args, upgrade_db, SQLObject, SQLObjectRelationship # Import SQLAlchemy name...
import os, sys, re # import hou main = __import__('__main__') hou = main.__dict__['hou'] import hqt reload (hqt) from managers.completeWidget import contextCompleterClass path = os.path.join(os.path.dirname(__file__), 'houdini') main = __import__('__main__') ns = main.__dict__ for mod in [os.path.splitext(x)[0] for x...
"""Testacases for functionality involving items.""" from tests.base_test import BaseTest import json from bucketlist.models import Item from bucketlist.item_routes import get_item_by_id class TestItem(BaseTest): """Test items routes.""" def get_token(self): """Return authentication token.""" ...
"""Support for Tado sensors for each zone.""" import logging from homeassistant.const import ATTR_ID, ATTR_NAME, TEMP_CELSIUS from homeassistant.helpers.entity import Entity from . import DATA_TADO _LOGGER = logging.getLogger(__name__) ATTR_DATA_ID = "data_id" ATTR_DEVICE = "device" ATTR_ZONE = "zone" CLIMATE_HEAT...
from pysb.simulator.base import Simulator, SimulationResult, SimulatorException from pysb.bng import BngFileInterface, load_equations, generate_hybrid_model import numpy as np import logging from pysb.logging import EXTENDED_DEBUG from pysb.core import as_complex_pattern, Parameter, \ InvalidComplexPatternException...
# -*- coding: utf-8 -*- import os from Summarizer.polish_summaries_corpus_reader import read_psc_file from Summarizer.summarization.summarizer import Summarizer class EvaluatorWrapper(): def __init__(self, model, features, config): self.summarizer = Summarizer.Instance() self.summarizer.set_model(...
# Copyright (c) 2014. Mount Sinai School of Medicine # # 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...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, print_function, unicode_literals) from collections imp...
# -*- coding: UTF-8 -*- """ Provides a summary after each test run. """ from __future__ import absolute_import, division, print_function import sys from time import time as time_now from behave.model import Rule, ScenarioOutline # MAYBE: Scenario from behave.model_core import Status from behave.reporter.base import R...
"""Module for scheduling profiles through egtaonline""" import asyncio import contextlib import logging from gameanalysis import paygame from gameanalysis import rsgame from gameanalysis import utils as gu from egta import profsched from egta import utils as eu class _EgtaOnlineScheduler( profsched._AOpenableSc...
# # This file is part of pysnmp software. # # Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com> # License: http://snmplabs.com/pysnmp/license.html # # ASN.1 source file:///usr/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt # Produced by pysmi-0.4.0 at Sat Feb 16 12:12:15 2019 # if 'mibBuilder' not in globals(): ...
import os import collections import datetime import shutil import subprocess from uitools.qt import Qt, QtCore, QtGui PlayblastInfo = collections.namedtuple('PlayblastInfo', ( 'name', 'directory', 'first_frame', 'user_category', 'created_at', 'audio', 'maya_file' )) def parse_audio_txt(pa...
import copy import unittest import warnings import mock import numpy as np import pytest import chainer from chainer import backend from chainer.backends import cuda from chainer import optimizer from chainer import optimizers from chainer import serializer from chainer import testing from chainer.testing import attr...
import os import re import datetime from django.conf import settings from django.contrib.sites.models import Site from django.core.urlresolvers import reverse as urlreverse from django.template.loader import render_to_string from ietf.idtracker.models import (InternetDraft, PersonOrOrgInfo, IETFWG, ...
import numpy as np from ..core import * from ..distributions import * from ..tuning.starting import find_MAP import patsy import theano import pandas as pd from collections import defaultdict from statsmodels.formula.api import glm as glm_sm import statsmodels.api as sm from pandas.tools.plotting import scatter_matrix ...
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Tests for memory related flows.""" import copy import json import os import socket import threading from grr.client import vfs from grr.client.client_actions import grr_rekall_test from grr.lib import action_mocks from grr.lib import aff4 from grr.lib...
# Copyright 2008 Divmod, Inc. See LICENSE file for details # -*- test-case-name: xmantissa.test.test_webapp.AuthenticatedWebViewerTests,xmantissa.test.test_publicweb.AnonymousWebViewerTests -*- """ A collection of fake versions of various objects used in tests. There are a lot of classes here because many of them have...
from django.contrib.contenttypes.models import ContentType from django.core.exceptions import PermissionDenied from django.core.paginator import Paginator from django.db import transaction from django.db.models.functions import Lower from django.http import Http404, HttpResponseBadRequest from django.shortcuts import g...
import os from cuttsum.data import get_resource_manager from cuttsum.salience import SaliencePredictionAggregator import gzip import numpy as np import re from sklearn.metrics.pairwise import cosine_similarity from sklearn.preprocessing import MinMaxScaler, StandardScaler from sklearn.cluster import AffinityPropagation...
# -*- coding: utf-8 -*- from django.conf import settings from django.http import HttpResponse from django.test import TestCase, override_settings from django_auth_ldap.backend import _LDAPUser from django.test.client import RequestFactory from typing import Any, Callable, Dict, Optional, Text from builtins import objec...
import urllib.request from pykml import parser import pdb import os import sys import time import json import math scriptDir=os.path.dirname(os.path.realpath(__file__)) sys.path.append(scriptDir) sys.path.append(os.path.join(scriptDir,'..','lib','python-zeromq-pubsub','src')) import processNode UPDATE_INTERVAL_SECS = ...
import boto3 import logging import requests from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from indra import get_config, has_config from indra.util.nested_dict import NestedDict logger = logging.getLogger(__name__) def kill_all(job_queue, reason='None given', states=None): """Terminates/cance...
import copy import os import platform from conans.client import join_arguments from conans.client.build.compiler_flags import (architecture_flag, format_libraries, format_library_paths, format_defines, sysroot_flag, format_...
""" Provides abstraction over low level coap protocol data structures(Option and Message). """ import struct import gevent.event import random from enum import Enum from datetime import datetime from message_format import CoapMessage, CoapOption from code_registry import MessageType, OptionNumber COAP_VERSION = 1 COA...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.words.protocols.jabber.jid}. """ from twisted.python.compat import unicode from twisted.trial import unittest from twisted.words.protocols.jabber import jid class JIDParsingTests(unittest.TestCase): def test_parse(se...
# coding: utf-8 from __future__ import unicode_literals from collections import OrderedDict from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.core.urlresolvers import ( NoReverseMatch, Resolver404, get_script_prefix, resolve ) from django.db.models import Manager from django....
import webapp2 import jinja2 import logging import json import urllib2 import os from google.appengine.api import urlfetch from google.appengine.api import mail from user.models import User from lib import tools, handlers, conf from github.github import latestChanges urlfetch.set_default_fetch_deadline(60) JINJA_EN...
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" import configparser from enum import Enum import argparse import loggi...
import datetime import json import re from flask_jwt import current_identity, jwt_required from flask_restplus import Namespace, Resource, fields, reqparse from packr.models import (Address, Contact, DangerClass, Order, OrderStatus, Package, ServiceType, StatusType) api = Namespace('book', ...
import logging import json import pygame from knuckle import Window, GameState from battle import BattleState from scene import Scene from texts import Texts import stats import ascii logging.basicConfig(level=logging.INFO) class Caucuses(GameState): def __init__(self, window, *args, **kwargs): super(C...
import calendar import re from time import struct_time from datetime import date, datetime from operator import add, sub from dateutil.relativedelta import relativedelta from edtf import appsettings from edtf.convert import dt_to_struct_time, trim_struct_time, \ TIME_EMPTY_TIME, TIME_EMPTY_EXTRAS EARLIEST = 'ear...
from django import forms from django.conf import settings try: from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation except ImportError: from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from ...
"""Various high level TF models.""" # Copyright 2015-present The Scikit Flow 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/lice...
from octopus.modules.es import dao class SpreadsheetJobDAO(dao.ESDAO): __type__ = 'spreadsheet' @classmethod def list_by_status(cls, status): q = SpreadsheetStatusQuery(status) return cls.object_query(q.query()) @classmethod def query_by_filename(cls, filename): return cls...
#!/usr/bin/env python import os import subprocess import re import logging __all__ = ['NanoCA'] __version__ = '0.8' __author = 'Moritz Moeller <mm@mxs.de>' openssl_cnf_template = """ RANDFILE = $ENV::ROOT/private/.rnd [ ca ] default_ca = CA_default [ CA_default ] dir = $ENV::ROOT certs ...
import unittest import types import datetime from flask import Flask from pprint import pprint from sqlalchemy import (Column, create_engine, DateTime, Date, Float, ForeignKey, Integer, Boolean, Unicode, create_engine) from lever import API, preprocess, postprocess, ModelBasedACL, ImpersonateM...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import shutil import os from os.path import join import logging from .input import pdftotext from .input import pdfminer_wrapper from .input import tesseract from .input import tesseract4 from .input import gvision from invoice2data.extract.loader import ...
# -:- coding:utf8 -:- """ Customer Parser """ import functools import inspect from datetime import datetime from decimal import Decimal import flask_restful.fields from flask_kits.restful import post_parameter from flask_restful import abort from flask_restful.reqparse import Argument from flask_restful.reqparse impor...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
# 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 ...
# 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 # distributed under the...
# Copyright (c) 2010-2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
# Copyright 2018 Rackspace, US 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...
try: import ujson as json except: import json from JumpScale import j import re #@review [kristof,incubaid] name:codereviewtools tools for codereview, check all new code class CodeManager(): def __init__(self): self.ignoreDirs=["/.hg*"] self.users={} self.groups={} ...
import os import sys import CPUtimer from sys import argv, exit class Vertex: def __init__(self, node): self.id = node self.adjacent = {} self.predecessor = {} self.position_in_buckets = -1 self.distance_from_source = -1 def __str__(self): return str(self.id) +...
# Copyright 2016 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...
import json import os import random import time from contextlib import contextmanager from datetime import datetime, timedelta from decimal import Decimal from functools import partial from urlparse import SplitResult, urlsplit, urlunsplit from django import forms, test from django.db import connections, transaction, ...
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC # 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 n...
# Copyright (c) 2012 NetApp, Inc. All rights reserved. # Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Andrew Ker...
# pylint: disable=missing-docstring, invalid-name import unittest import numpy as np from obsoper.horizontal import UnitSquare from obsoper import (horizontal, tripolar, corners) class TestHorizontal(unittest.TestCase): def setUp(self): # Trapezoid 2x2 grid represents most of the issues encountered with ...
""" Huffman coding is an efficient method of compressing data without losing information. This algorithm analyzes the symbols that appear in a message. Symbols that appear more often will be encoded as a shorter-bit string while symbols that aren't used as much will be encoded as longer strings. """ from collections i...