CombinedText
stringlengths
4
3.42M
from sympy import (symbols, factorial, sqrt, Rational, atan, I, log, fps, O, Sum, oo, S, pi, cos, sin, Function, exp, Derivative, asin, airyai, acos, acosh, gamma, erf, asech) from sympy.series.formal import (rational_algorithm, FormalPowerSeries, r...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest _TRACING_DIR = os.path.abspath(os.path.join( os.path.dirname(__file__), os.path.pardir)) def IsTestExpectedToFail(test_f...
""" Models for notifications app. """ import json import jsonpickle import six from django.conf import settings from django.db import models from django.utils.module_loading import import_string @six.python_2_unicode_compatible class SentNotification(models.Model): """ Stores info on the notification that w...
"""An improved base task implementing easy (and explicit) saving of outputs.""" import os import logging from inspect import getfullargspec import numpy as np from caput import pipeline, config, memh5 class MPILogFilter(logging.Filter): """Filter log entries by MPI rank. Also this will optionally add MPI ...
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
# Copyright 2009-present MongoDB, 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 wri...
# coding=utf-8 # noinspection PyUnresolvedReferences from chatcommunicate import add_room, block_room, CmdException, command, get_report_data, is_privileged, message, \ tell_rooms, tell_rooms_with, get_message # noinspection PyUnresolvedReferences from globalvars import GlobalVars import findspam # noinspection PyU...
""" :Copyright: 2006-2018 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from unittest.mock import patch from byceps.blueprints.shop_order.signals import order_canceled from byceps.services.shop.order import service as order_service from tests.helpers import current_party_set, current_user...
#!/usr/bin/env python import lxml import sys from lxml import etree class XMLTranslator: def __init__(self): self.constructs = { "PrimAct": self.handle_action, "PrimBr": self.handle_branch, "PrimIter": self.handle_iteration, "PrimSeln": self.handle_selection...
from radosgw_agent.util import obj class Empty(object): def __init__(self, **kw): for k, v in kw.items(): setattr(self, k, v) class TestToDict(object): def test_underscores_are_ignored(self): fake = Empty(a=1, _b=2) result = obj.to_dict(fake) assert result.get('...
from django.db import models class Board(models.Model): created = models.DateTimeField(auto_now_add=True) name = models.CharField(max_length=64, unique=True, blank=False) description = models.CharField(max_length=712, blank=False) slug = models.SlugField() def __str__(self): return self.na...
from django.views.decorators.csrf import csrf_exempt from rest_framework.exceptions import NotFound from rest_framework.response import Response from rest_framework import status from rest_framework.views import APIView from cognitive.settings import graph import cognitive.apps.atlas.query as query from .forms import ...
import json import logging from django.views.generic import View from arches.app.models.models import ETLModule from arches.app.utils.response import JSONResponse logger = logging.getLogger(__name__) class ETLManagerView(View): """ to get the ETL modules from db """ def get(self, request): e...
""" @file @brief Overwrites unit test class with additional testing functions. """ import os import sys import unittest import warnings import decimal import cProfile import pstats import site from .ci_helper import is_travis_or_appveyor from ..loghelper import fLOG try: from io import StringIO except ImportError:...
added Vote.vote_status, Nominee.get_judge_ranks() and Nominee.get_votes()
import sys import os import json import requests from parse_uri import ParseUri from string import Template import collections import itertools import datetime class Artifact: def exists(self): raise Exception("not implemented") def delete(self): raise Exception("not implemented") class SSHArtifact(Art...
from app import app, db, utils from utils import * from models import * from forms import * from flask import render_template, flash, redirect, session, url_for, request, \ g, jsonify, current_app, Response from flask.ext.login import login_user, logout_user, current_user, \ login_required from variables import * fro...
#!/usr/bin/env python # # 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 # "...
from django.http import Http404, HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required from django.template.context import RequestContext from django.template.defaultfilters import slugify...
# This file is part of allegedb, an object-relational mapper for versioned graphs. # Copyright (C) Zachary Spector. public@zacharyspector.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundat...
from sqlalchemy import create_engine, Column, func, BIGINT, BigInteger, BINARY, Binary,\ BOOLEAN, Boolean, DATE, Date, DATETIME, DateTime, FLOAT, Float,\ INTEGER, Integer, VARCHAR, String, TEXT, Text, MetaData from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declara...
from backend.pg import PGBackend ''' @author: anant bhardwaj @date: Oct 3, 2013 DataHub DB wrapper for backends (only postgres implemented) Any new backend must implement the DataHubConnection interface ''' class DataHubConnection: def __init__(self, user, password, repo_base=None): self.backend = PGBa...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Token.seed' db.alter_column(u'two_factor_token', 'seed', self.gf('django.db.models.fields...
from __future__ import print_function from functools import wraps import itertools import time import logging import os import uuid import warnings from . import browserlib from . import _glyph_functions as gf from .document import Document from .embed import notebook_div, file_html, autoload_server from .objects imp...
#!/usr/bin/env python # Copyright 2017, 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 ...
from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import Context, loader from django.utils import simplejson as json import psycopg2 import psycopg2.extras def main_page( request ): return render_to_response( "databrowser.html" ) def first_table( request ...
# ----------- # User Instructions # # Modify the previous code to adjust for a highly # confident last measurement. Do this by adding a # factor of 5 into your Omega and Xi matrices # as described in the video. from math import * import random # =============================================================== # # S...
#!/bin/env python from __future__ import division, print_function import os.path import sys import time import pstats import argparse import pprint import runpy from struct import Struct from hashlib import sha1 from functools import partial from collections import Counter from xml.sax.saxutils import escape from cPr...
from nodes import RootNode, create_node class Compiler: def process(self, raw_text): split_text = raw_text.strip().split('\n') return self.process_lines(split_text) def process_lines(self, haml_lines): root = RootNode() for line in haml_lines: haml_node = c...
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The Initia...
""" 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 ...
from itertools import product as cartes from sympy import ( limit, exp, oo, log, sqrt, Limit, sin, floor, cos, acos, ceiling, atan, gamma, Symbol, S, pi, Integral, cot, Rational, I, zoo, tan, cot, integrate, Sum, sign, Function, subfactorial, PoleError) from sympy.series.limits import heuristics from symp...
import os from tempfile import mkdtemp from shutil import rmtree from nipype.testing import assert_equal, assert_true import nipype.pipeline.engine as pe from nipype.interfaces.utility import Function def dummyFunction(filename): ''' This function writes the value 45 to the given filename. ''' j = 0 ...
from django.db import models from django.contrib.auth.models import Group, Permission from django.utils.translation import ugettext_lazy as _ from django.db.models.signals import post_save, post_delete, pre_save from django.dispatch import receiver from django.core import exceptions from django.conf import settings fr...
# -*- coding: utf-8 -*- import re import logging from collections import OrderedDict logger = logging.getLogger(__name__) try: from simple_salesforce import Salesforce as SimpleSalesforce from simple_salesforce.api import (SalesforceError) enabled = True except ImportError as e: logger.info(str(e)) ...
from typing import Set, Tuple, Union from great_expectations.data_context.data_context_variables import ( DataContextVariableSchema, ) from great_expectations.data_context.store.configuration_store import ConfigurationStore from great_expectations.data_context.types.base import DataContextConfig class DataContex...
""" All location related functions and converters. The main entry point is `location_processing` which gets `location` and `source_ip_address` and basing on this information generates precise location description. """ from __future__ import print_function import os import json import socket import requests import ge...
############################################################################## # The MIT License (MIT) # # Copyright (c) 2016-2019 Hajime Nakagami<nakagami@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), ...
# -*- coding: utf-8 -*- import status class GmapException(BaseException): """Base exception for all python-gmap exceptions""" class NoResults(GmapException): """Raised when api returned no results""" class RequestDenied(GmapException): """Raised when request to API was denied""" EXCEPTION_MAPPING = { ...
# Copyright (c) 2010-2020 Manfred Moitzi # License: MIT License import pytest import random from ezdxf.math import ( cubic_bezier_interpolation, Vec3, Vec2, Bezier3P, quadratic_to_cubic_bezier, Bezier4P, have_bezier_curves_g1_continuity, bezier_to_bspline, split_bezier, quadrati...
#!/usr/bin/env python from subprocess import Popen, PIPE from os import path, makedirs from shutil import rmtree from Queue import Queue, Empty from threading import Thread from random import choice import json import re def enter_line(stream, line): stream.write(line + '\n') def process_lines(lines, dir_path...
from unittest import TestCase from mock import patch from django.core.files.storage import Storage, FileSystemStorage from django.core.files.base import ContentFile from os.path import join from ..management.commands.collectstatic import Command, cache class BotolikeStorage(Storage): location = None def _no...
update numpy package and fix errors
''' datasets.py Represent each parsed dataset as an object. This is really just a wrapper to the underlying dictionaries, but it also provides some useful functions that assist in the namespacing and equivalencing process. ''' import os.path import time from common import get_citation_info from collections im...
""" IMAPClient wrapper for Inbox. Unfortunately, due to IMAP's statefulness, to implement connection pooling we have to shunt off dealing with the connection pool to the caller or we'll end up trying to execute calls with the wrong folder selected some amount of the time. That's why functions take a connection argumen...
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2012 Associazione OpenERP Italia # (<http://www.openerp-italia.org>). # Copyright(c)2008-2010 SIA "KN dati".(http://kndati.lv) All Rights Reserved. # Ge...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('structure', '0011_customer_registration_code'), ] operations = [ migrations.AddField( model_name='customer', ...
import os import subprocess __all__ = ['__author__', '__author_email__', '__version__', '__git_uri__', '__dependencies__', '__optional_dependencies__'] __author__ = "Erik Ritter (maintainer), Serena Jiang, John Bodley, Bill Ulammandakh, Naoya Kanai, Robert Chang, Dan Frank, Chetan Sharma, Matthew Wardrop" __author_...
import sys import subprocess sys.path.insert(0, '../../../../optimizer') sys.path.insert(0, '../../../../frontend') from Compiler import * from Constructs import * def cCompile(inFile, outFile, cCompiler=None): if cCompiler == None or cCompiler == "intel": cxx = "icpc" opt = "-openmp -xhost -O3...
# coding: utf-8 from flask import Blueprint from flask import request, render_template, render_template_string, Flask from flask import jsonify import json import random from ..decorators.crossdomain import crossdomain __all__ = ['bp'] bp = Blueprint('demo_handler', __name__) @bp.route('/', methods=['G...
# https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=608&page=show_problem&problem=1055 import fileinput with fileinput.input() as f: while True: line = next(f).split(' ') duration, down_pay, load, depr_nel = int(line[0]), float(line[1]), float(line[2]), int(line[3]) ...
""" The set of classes used to model the 3 'partitions' for N3 assertions. There is a top level class which implements operations common to all partitions as well as a class for each partition. These classes are meant to allow the underlying SQL schema to be completely configurable as well as to automate the generatio...
import logging import os from typing import Text, Tuple import warnings from rasa.constants import ( ENV_GPU_CONFIG, ENV_CPU_INTER_OP_CONFIG, ENV_CPU_INTRA_OP_CONFIG, ) from tensorflow import config as tf_config logger = logging.getLogger(__name__) def setup_gpu_environment() -> None: """Set configur...
# Tai Sakuma <tai.sakuma@gmail.com> import math import collections import logging from .ReturnTrue import ReturnTrue ##__________________________________________________________________|| class Round(object): def __init__(self, width=1, aboundary=None, min=None, underflow_bin=None, ...
import io from fontTools.misc.py23 import tobytes, tostr from fontTools.misc.testTools import getXML from fontTools import subset from fontTools.fontBuilder import FontBuilder from fontTools.pens.ttGlyphPen import TTGlyphPen from fontTools.ttLib import TTFont, newTable from fontTools.ttLib.tables import otTables as ot ...
# -*- coding: utf-8 -*- """ linegen ~~~~~~~ An advanced line generation tool using a HarfBuzz for proper text shaping. """ from __future__ import absolute_import, division, print_function from future import standard_library standard_library.install_aliases() from builtins import range from builtins import object fro...
KIBOM_VERSION = "1.51" KIBOM_DATE = "2018-8-10" Update version.py KIBOM_VERSION = "1.52" KIBOM_DATE = "2018-9-16"
import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter import matplotlib as mpl import matplotlib.dates as mdates import bench_util as bu import shutil import os # Set the matplotlib settings (eventually this will go at the top of the graph_util) mpl.rcParams...
from django.conf import settings from django.contrib.sites.models import Site def get_site_id(request): if hasattr(request, 'site') and isinstance(request.site, Site): return request.site.pk try: return Site.objects.get(pk=settings.SITE_ID).pk except Site.DoesNotExist: return None ...
# -*- coding: utf-8 -*- # Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U # # This file is part of FIWARE project. # # 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://w...
#!/usr/bin/env python # coding=utf-8 # # Copyright 2012 F2E.im # Do have a faith in what you're doing. # Make your life a story worth telling. import uuid import hashlib import Image import StringIO import time import json import re import urllib2 import tornado.web import lib.jsonp import pprint import math import da...
import json import emoji import requests from collections import defaultdict from holster.enum import Enum from disco.types.message import MessageEmbed from rowboat.plugins import RowboatPlugin as Plugin from rowboat.redis import rdb from rowboat.models.guild import Guild from rowboat.types.plugin import PluginConfi...
__author__ = 'Bohdan Mushkevych' import calendar import collections from synergy.system import time_helper from synergy.system.time_qualifier import * class TimeperiodDict(collections.MutableMapping): def __init__(self, time_qualifier, grouping=1, *args, **kwargs): assert time_qualifier in [QUALIFIER_HO...
import openpnm as op from openpnm.phases import mixtures import numpy as np ws = op.Workspace() proj = ws.new_project() # ws.settings['loglevel'] = 20 """ Details about the continum and numerical model equations can be found on: Agnaou, M., Sadeghi, M. A., Tranter, T. G., & Gostick, J. (2020). Modeling tr...
# coding=utf-8 # Filename: test_config.py """ Test suite for configuration related functions and classes. """ from __future__ import division, absolute_import, print_function from km3pipe.testing import TestCase, StringIO, patch from km3pipe.config import Config __author__ = "Tamas Gal" __copyright__ = "Copyright 20...
import functools import itertools import operator import xp einsum_symbols = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' einsum_symbols_set = set(einsum_symbols) options = { 'sum_ellipsis': False, } def _concat(lists): return sum(lists, []) def _prod(xs): return functools.reduce(operator...
#!/usr/bin/env python3 # Copyright (C) 2017-2020 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
#!/usr/bin/env python # (C) 2004 British Broadcasting Corporation and Kamaelia Contributors(1) # All Rights Reserved. # # You may only modify and redistribute this under the terms of any of the # following licenses(2): Mozilla Public License, V1.1, GNU General # Public License, V2.0, GNU Lesser General Public Lice...
from projectname.lib.base import * class SampleController(BaseController): def index(self): return Response('basic index page') def session_increment(self): session.setdefault('counter', -1) session['counter'] += 1 session.save() return Response('session incrementer...
import time import config import accounts fields = 'photo_50,country,last_seen' s = open(accounts.getFile('allowed.txt'), encoding='utf-8').readlines() noadd = set(map(int, open(accounts.getFile('noadd.txt')).read().split())) allowed = set(s[0] + ' ') s = s[1].split() offline_allowed = config.get('check_friend.offli...
import pygame import sys #Command Line options #First argv[1] is game board width in pixels. 300 is default #tSecond argv[2] is game board height in pixels. 300 is default #the .py file is consider an arg in len(sys.argv) #Check if there is a first argument passed in '''Open with 800 640 after .py script''' if len...
auto-commit
# -*- coding: utf-8 -*- from qtpy import QtGui, QtCore, QtWidgets import pyqtgraph as pg from pyqtgraph.graphicsItems.ROI import Handle from skimage.draw import polygon, line import numpy as np import os from scipy.ndimage.interpolation import rotate from . import global_vars as g from .utils.misc import random_color, ...
import hal from wpilib.iterativerobot import IterativeRobot from wpilib.command.scheduler import Scheduler from wpilib.livewindow import LiveWindow class CommandBasedRobot(IterativeRobot): ''' The base class for a Command-Based Robot. To use, instantiate commands and trigger them. ''' def startC...
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
from django.shortcuts import render, render_to_response from django.template import RequestContext from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from django.db import transaction from django.con...
import random from django.test import TestCase from nodeconductor.openstack import models as openstack_models from nodeconductor.openstack.tests import factories as openstack_factories class QuotaModelMixinTest(TestCase): def test_quotas_sum_calculation_if_all_values_are_positive(self): # We have 3 lin...
import os import subprocess __all__ = ['__author__', '__author_email__', '__version__', '__git_uri__', '__dependencies__', '__optional_dependencies__'] __author__ = "Erik Ritter (maintainer), Serena Jiang, John Bodley, Bill Ulammandakh, Robert Chang, Dan Frank, Chetan Sharma, Matthew Wardrop" __author_email__ = "er...
import os import time from datetime import date import cluster from cluster import PBS import XnatUtils from constant import RESULTS_DIR # Job Statuses NEED_TO_RUN='NEED_TO_RUN' # assessor that is ready to be launch on the cluster (ACCRE). All the input data for the process to run are there. NEED_INPUTS='NEED_INPUTS...
#copyright ReportLab Inc. 2000-2001 #see license.txt for license details #history http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/reportlab/graphics/charts/axes.py?cvsroot=reportlab #$Header: /tmp/reportlab/reportlab/graphics/charts/axes.py,v 1.40 2001/09/27 18:10:49 rgbecker Exp $ """Collection of axes for charts. The ...
""" HTMLParser-based link extractor """ from HTMLParser import HTMLParser from six.moves.urllib.parse import urljoin from w3lib.url import safe_url_string from scrapy.link import Link from scrapy.utils.python import unique as unique_list class HtmlParserLinkExtractor(HTMLParser): def __init__(self, tag="a", at...
import jinja2 import os from datetime import datetime from .utils import construct_function_call, Variable OBJECT_TEMPLATE = '''# {{ cls.filename }} # Auto-generated by altair_parser {{ date }} {%- for import in cls.imports %} {{ import }} {%- endfor %} class {{ cls.classname }}({{ cls.baseclass }}): """{{ cls....
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class Libqglviewer(QMakePackage): """libQGLViewer is a C++ library based on Qt that eases the creation of OpenGL ...
# -*- coding: utf-8 -*- from __future__ import with_statement import os import sys from fabric import api as fab from fabric.contrib import files as fab_files from fabric.contrib.files import exists from fab_deploy.utils import run_as from ..base import _, Daemon, Debian, RedHat from ..deployment import command from...
import constants, pandas, pdb, os, fnmatch, logging, pdb, numpy, datetime, re, StringIO from sqlalchemy import create_engine dd = 'C:\\Users\\ritvik\\Documents\\PhD\\Projects\\Lake_States\\EPIC\\OpenLands_LS\\simulations\\LS_2013_10_25_2015_21h_51m\\0.ACN' import re def GetTheSentences(infile): with open(infile)...
""" nbttreewidget """ from __future__ import absolute_import, division, print_function, unicode_literals import logging from PySide import QtGui, QtCore from PySide.QtCore import Qt from mcedit2.command import SimpleRevisionCommand from mcedit2.util.lazyprop import weakrefprop from mcedit2.widgets.nbttree.nbttree...
# -*- coding: utf-8 -*- """ Created on Tue Sep 5 11:33:04 2017 @author: Jackson """ import sys import pandas as pd class File(): ''' Implements a csv type file instance. ''' def __init__(self,path,sep='\t',comment='#'): super().__init__() self.path=path self.file=open(pat...
""" Custom spectrogram function. Returned values are different than scipy. (c) Cassio Amador 2015 TODO: DECIDE IF CUTTING FREQUENCY SHOULD RETURN A FULL MATRIX WITH NaNS, OR JUST A PARTIAL ONE. """ import numpy as np from scipy import signal, fftpack def spectrogram(sig, window_size=256, step_scale=4, zer_pad=2, tim...
""" Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they re...
"""Materialized Path Trees""" import sys import operator if sys.version_info >= (3, 0): from functools import reduce from django.core import serializers from django.db import models, transaction, connection, IntegrityError from django.db.models import F, Q from django.utils.translation import ugettext_noop as _ ...
# Copyright (c) 2003, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of # any required approvals from the U.S. Dept. of Energy). All rights # reserved. # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is ...
import datetime import json import logging import re from BeautifulSoup import BeautifulSoup as soup from xml.sax.saxutils import escape as xhtml_escape import tornado.web from handlers.oauth import OAuth2Handler from util import dateutils from util.cache import Cache from util.config import Config from util.route im...
# -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio 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; ei...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import unicode_literals import json import logging import requests from requests.exceptions import HTT...
import functools import itertools import operator import xp from einsum_opt import _greedy_path, _optimal_path options = { 'sum_ellipsis': False, 'broadcast_diagonal': False, } einsum_symbols = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' def _concat(lists): return sum(lists, []) def _pr...
import unittest import logging import Queue import pika import esgfpid.rabbit.asynchronous.thread_feeder from esgfpid.rabbit.asynchronous.exceptions import OperationNotAllowed LOGGER = logging.getLogger(__name__) LOGGER.addHandler(logging.NullHandler()) # Test resources: from resources.TESTVALUES import * import reso...
__author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.0.1' __url__ = 'https://github.com/kore-plugins/kore-plugins-ini' version 0.0.2 __author__ = 'Artur Maciąg' __email__ = 'maciag.artur@gmail.com' __version__ = '0.0.2' __url__ = 'https://github.com/kore-plugins/kore-plugins-ini'
# standard python imports import os import time import json import logging import datetime import subprocess from dateutil.parser import parse import numbers # external imports import hjson import gevent from PIL import Image from rhizo.main import c from rhizo.extensions.camera import encode_image import requests # ...
"""Implementation of Valve learning layer 2/3 switch.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # # Licensed under the Apache License, Version 2....
#!/usr/bin/env python """ This script reformats each file supplied on the command line according to the Google Java style (by calling out to the google-java-format program, https://github.com/google/google-java-format), but with improvements to the formatting of annotations in comments. """ from __future__ import prin...