gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- ####################################################################################### # # # This file is part of the updater4pyi Project. # # ...
""" DNF plugin for getting the Python 3 porting status. Put this in your DNF plugin directory, then run: $ dnf --enablerepo=rawhide --enablerepo=rawhide-source py3query -o fedora.json This will give you a file "fedora.json" with information for portingdb. """ from __future__ import print_function import sys im...
import os import shutil import re from fontInfoData import getAttrWithFallback, intListToNum, normalizeStringForPostscript from outlineOTF import OutlineOTFCompiler from featureTableWriter import FeatureTableWriter, winStr, macStr from kernFeatureWriter import KernFeatureWriter try: sorted except NameError: def...
import os import re import logging from pegasus.models import ( TargetPlatform, Architecture, ProductType, Language, Executor, LibraryInfo ) from pegasus.util import ( push_working_directory, pop_working_directory, find_path_in_list ) class Linux(TargetPlatform): # tuple: (prefix, extension) product_type_dat...
#!/usr/bin/env python # Copyright (c) 2013 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 argparse import errno import json import os import re import sys import urllib import urllib2 # Where all the data lives. R...
#!/usr/bin/env python3 from sympy import * from mpmath import * from matplotlib.pyplot import * import numpy as np #init_printing() # make things prettier when we print stuff for debugging. # ************************************************************************** # # Magnetic field inside copper coil with ho...
from . import _dbg from . import gs, gsq, sh from .margo_agent import MargoAgent from .margo_common import OutputLogger, TokenCounter, Mutex from .margo_render import render from .margo_state import State, actions, client_actions, Config, _view_scope_lang, view_is_9o, MgView from base64 import b64decode from collection...
#!/usr/bin/python # File created on 27 Jan 2012. from __future__ import division __author__ = "Kishori M Konwar" __copyright__ = "Copyright 2013, MetaPathways" __credits__ = ["r"] __version__ = "1.0" __maintainer__ = "Kishori M Konwar" __status__ = "Release" try: from os import makedirs, sys, remove, rename ...
import os import sys import virtualenv import py import pytest import pytest_cov pytest_plugins = 'pytester', 'cov' SCRIPT = ''' import sys def pytest_generate_tests(metafunc): for i in range(10): metafunc.addcall() def test_foo(): assert True if sys.version_info[0] > 5: assert False...
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import time import numpy as np from scipy.sparse import issparse from sklearn.multiclass import OneVsRestClassifier from sklearn import svm from sklearn.preprocessing import normalize from reveal_graph_embedding.datautil.snow_datautil import snow_read_data from reve...
# Natural Language Toolkit: Dependency Grammars # # Copyright (C) 2001-2017 NLTK Project # Author: Jason Narad <jason.narad@gmail.com> # # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # from __future__ import print_function import math import logging from six.moves import range from nltk.parse....
import collections import os import random from artificialproject.random import weighted_choice class GenerationFailedException(Exception): pass GeneratedField = collections.namedtuple('GeneratedField', [ 'value', 'deps', ]) class NullableGenerator: def __init__(self, value_generator): se...
#!/usr/bin/env python import datetime import logging import os from urllib.parse import urljoin from utils import utils, inspector, admin # http://www.fmc.gov/bureaus_offices/office_of_inspector_general.aspx archive = 2005 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's...
#!/usr/bin/python import os, sys # low level handling, such as command line stuff from low import write_to_file import string # string methods available import re # regular expressions import getopt # comand line argument handling import math # match functions from low import * # custom functions, written...
#!/usr/bin/env python3.9 import os, sys, re, time, io, configparser, imaplib, html.parser, base64 import email.parser, email.header, email.utils import tkinter, tkinter.font, tkinter.messagebox, PIL.Image, PIL.ImageTk class HTMLNoteParser(html.parser.HTMLParser): style_tag = "" style_num = 0 textField = N...
import os import numpy as np import pandas as pd import matplotlib from matplotlib import pyplot as plt from mpl_toolkits.axes_grid1.inset_locator import inset_axes from matplotlib.backends.backend_pdf import PdfPages from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg matpl...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
from collections import OrderedDict from enum import IntEnum from math import log, exp from django.contrib.staticfiles.templatetags.staticfiles import static from django.db import models from django.db.models import Q from django.utils.safestring import mark_safe from django.utils.text import slugify from . import ba...
from . import ast from ..compat import str_type from .error import LanguageError from .lexer import Lexer, TokenKind, get_token_desc, get_token_kind_desc from .source import Source __all__ = ['parse'] def parse(source, **kwargs): """Given a GraphQL source, parses it into a Document.""" options = {'no_locatio...
#!/usr/bin/env python # # Copyright 2007 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 o...
# -*- coding: utf-8 -*- """ banner Description goes here... :copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ import unittest from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException...
# 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 ...
#!/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...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
#!/usr/bin/env python # -- coding: utf-8 -- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (th...
# -*- coding: utf-8 -*- import pytest import sqlparse from sqlparse import sql, tokens as T def test_grouping_parenthesis(): s = 'select (select (x3) x2) and (y2) bar' parsed = sqlparse.parse(s)[0] assert str(parsed) == s assert len(parsed.tokens) == 7 assert isinstance(parsed.tokens[2], sql.Par...
#!/usr/bin/env python ''' brozzler/cli.py - brozzler command line executables Copyright (C) 2014-2019 Internet Archive 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/lic...
import numpy as np import theano import theano.tensor as T floatX = theano.config.floatX from keras.layers.recurrent import Recurrent, GRU, LSTM from keras import backend as K from seya.utils import rnn_states tol = 1e-4 def _wta(X): M = K.max(X, axis=-1, keepdims=True) R = K.switch(K.equal(X, M), X, 0.) ...
# Subset of test.support from CPython 3.5, just what we need to run asyncio # test suite. The code is copied from CPython 3.5 to not depend on the test # module because it is rarely installed. # Ignore symbol TEST_HOME_DIR: test_events works without it import functools import gc import os import platform import re im...
import time from datetime import datetime from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tokens import default_token_generator from django.contrib.contenttypes.models import ContentType from django.contrib.sites.models import Site from django.core.urlresolvers imp...
import functools from .errors import ClaripyOperationError from .backend_object import BackendObject def compare_bits(f): @functools.wraps(f) def compare_guard(self, o): if self.bits != o.bits: raise TypeError("bitvectors are differently-sized (%d and %d)" % (self.bits, o.bits)) ret...
""" Copyright 2015 Austin Ankney, Ming Fang, Wenjun Wang and Yao Zhou 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 ...
# 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"); you may not u...
""" Summary: Ief file data holder. Contains the functionality for loading ISIS .ief files from disk. Author: Duncan Runnacles Created: 01 Apr 2016 Copyright: Duncan Runnacles 2016 TODO: Updates: """ import os from ship.utils import utilfunctions as uf from ship.utils i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.forms import (CharField, DateField, FileField, Form, IntegerField, SplitDateTimeField, ValidationError, formsets) from django.forms.formsets import BaseFormSet, formset_factory from django.forms.utils import ErrorList from...
''' StreamingExtensions is a plug-in to both GUI menu and command line/web service that provides an alternative approach to big instance documents without building a DOM, to save memory footprint. lxml iterparse is used to parse the big instance. ModelObjects are specialized by features for efficiency and to avoid de...
import argparse from pathlib import Path import sys import os from platform import platform import traceback import astunparse from mochi import __version__, IS_PYPY, GE_PYTHON_34, GE_PYTHON_33 from mochi.parser import lex, REPL_CONTINUE, ParsingError from .builtins import current_error_port, eval_sexp_str, eval_toke...
# Copyright 2017 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...
# Copyright 2018 DeepMind Technologies Limited. 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 a...
"""Unit test for treadmill.cli.allocation """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import click import click.testing import mock import treadmill from treadmill import plugin_manager clas...
"""Support for FFmpeg.""" from __future__ import annotations import asyncio import re from haffmpeg.tools import IMAGE_JPEG, FFVersion, ImageFrame import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, CONTENT_TYPE_MULTIPART, EVENT_HOMEASSISTANT_START, EVENT_HOMEASSISTANT_STOP, ) ...
""" parentfit.py ParentFit is the parent class for various Fit implementations. """ import numpy as np import os import sys import logging from distutils.dir_util import mkpath import random import uuid #~ from emcee.utils import MPIPool from multiprocessing import Pool from multiprocessing import cpu_count sys.pa...
#!/usr/bin/python # Copyright (C) 2013 Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of c...
# 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 to the StackStorm, Inc ('StackStorm') 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"); you may not use th...
''' Author: Andres Andreu < andres at neurofuzzsecurity dot com > Company: neuroFuzz, LLC Date: 7/21/2016 Last Modified: 08/18/2018 neurofuzz security SSH config hardening ###### LICENSE ########### BSD 3-Clause License Copyright (c) 2016 - 2018, Andres Andreu, neuroFuzz LLC All r...
"""Module mimics some of the behaviors of the builtin :mod:`shutil`. It adds logging to all operations and abstracting some other useful shell commands (functions). """ import os import io import glob import shlex import shutil import fnmatch import logging import contextlib logger = logging.getLogger(__name__) d...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
from __future__ import division, print_function import imp import os import sys import shutil import pickle import copy import warnings import re from os.path import join from numpy.distutils import log from distutils.dep_util import newer from distutils.sysconfig import get_config_var from setup_common import * # S...
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
"""Parse Python source and extract unresolved symbols.""" import ast import sys from contextlib import contextmanager from itertools import chain from importmagic.six import string_types from importmagic.util import parse_ast try: import builtins as __builtin__ except: import __builtin__ class _InvalidSym...
from nanpy.memo import memoized from nanpy.pwm import ArduinoPwmPin import sys LOW, HIGH = 0, 1 INPUT, OUTPUT = 0, 1 # from six PY3 = sys.version_info[0] == 3 if PY3: string_types = str, else: string_types = basestring, class PinError(Exception): pass def to_pin_number(pin_name, A0=None): try: ...
""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, ...
from __future__ import unicode_literals from psycopg2.extras import Inet from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations class DatabaseOperations(BaseDatabaseOperations): def unification_cast_sql(self, output_field): internal_type = output_field.get...
"""Server-side implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. .. warning:: The WebSocket protocol was recently finalized as `RFC 6455 <http://tools.ietf.org/html/rfc6455>`_ and is not yet suppor...
from cuttsum.data import get_resource_manager import re from itertools import izip import scipy.cluster.hierarchy as hac import fastcluster from sklearn.preprocessing import Normalizer import numpy as np import os import gzip from datetime import datetime, timedelta from cuttsum.misc import ProgressBar from sklearn.met...
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
import hashlib from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.query import QuerySet from generic_aggregation import generic_annotate from .utils i...
# Copyright 2015 Cisco Systems # 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...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script fetches and prepares an SDK chroot. """ import os import sys import urlparse from chromite.buildbot import cons...
# -*- coding: UTF-8 -*- import sys import time from vulkan import * from PySide2 import (QtGui, QtCore) import numpy as np from PIL import Image import glm validationLayers = [ 'VK_LAYER_LUNARG_standard_validation' ] deviceExtensions = [ VK_KHR_SWAPCHAIN_EXTENSION_NAME ] enableValidationLayers = True cl...
# 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 ...
import os import time from datetime import datetime import posixpath from dotenv import set_key from invoke import task from setuptools_scm import get_version from .base import LOCAL_PREFIX, REMOTE_PREFIX, do, env from .notify import send_alert from .wrap import compose, docker, git, python, s3cmd @task def test(ct...
import logging import xml.etree.ElementTree as ET import re import gzip import io import shutil import csv import urllib.parse from dipper.sources.OMIMSource import OMIMSource from dipper.models.assoc.G2PAssoc import G2PAssoc from dipper.models.assoc.D2PAssoc import D2PAssoc from dipper.models.Genotype import Genotype...
# This file is part of curious. # # curious is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
# -*- coding: utf-8 -*- from string import ascii_letters, ascii_uppercase from random import choice class Word(object): ''' Word class for managing relationships to other words ''' def __init__(self, word): self.word = word self.befores = dict() self.afters = dict() de...
import Pieces import larv import PymunkCollisions import XMLParser import pymunk import helper from Globals import * class LevelEngine: """ Supports a playable level loaded from a xml file. """ def __init__(self, filename): # Initialize the framework self.entity_factory = Pieces.LevelE...
"""Sparse Equations and Least Squares. The original Fortran code was written by C. C. Paige and M. A. Saunders as described in C. C. Paige and M. A. Saunders, LSQR: An algorithm for sparse linear equations and sparse least squares, TOMS 8(1), 43--71 (1982). C. C. Paige and M. A. Saunders, Algorithm 583; LSQR: Sparse...
""" fs.s3fs ======= **Currently only avaiable on Python2 due to boto not being available for Python3** FS subclass accessing files in Amazon S3 This module provides the class 'S3FS', which implements the FS filesystem interface for objects stored in Amazon Simple Storage Service (S3). """ import os import datetime...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import """ test_flatson ---------------------------------- Tests for `flatson` module. """ import json import os import skinfer import unittest from flatson import Flatson import tempfile EMPTY_SCHEMA =...
## @file # # This file is the main entry for UPT # # Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The full text of the l...
import json import yaml from conda_build_missing import build, find_all_recipes, sort_dependency_order import os from conda_build.config import config as conda_bld_config import conda_build import conda.api from conda.utils import url_path from contextlib import contextmanager import logging import conda_manifest....
# -*- coding: utf-8 -*- """Tests for the replace script and ReplaceRobot class.""" # # (C) Pywikibot team, 2015-2020 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, division, unicode_literals import pywikibot from pywikibot import fixes from pywikibot.tools import suppres...
""" Collects information from TekkenGameState over time in hopes of synthesizing it and presenting it in a more useful way. """ from MoveInfoEnums import AttackType from MoveInfoEnums import ThrowTechs from MoveInfoEnums import ComplexMoveStates from TekkenGameState import TekkenGameState import time from enum import...
# -*- coding: ISO-8859-15 -*- # ============================================================================= # Copyright (c) 2009 Tom Kralidis # # Authors : Tom Kralidis <tomkralidis@hotmail.com> # # Contact email: tomkralidis@hotmail.com # ============================================================================= ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack 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 ...
# -*- coding: utf-8 -*- import urllib import re from django.conf import settings from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe fro...
# -*- coding: utf-8 -*- from collections import deque from nereid import render_template, route from nereid.globals import session, request, current_app from nereid.helpers import slugify, url_for from nereid import jsonify, Markup, current_locale from nereid.contrib.pagination import Pagination from nereid.contrib.si...
#!/usr/bin/env python from __future__ import division import argparse import cPickle as pickle import codecs import collections import logging import os import random import sys import time from sklearn import svm, tree from sklearn.dummy import DummyClassifier from sklearn.ensemble import RandomForestClassifier from ...
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # from twisted.cred import portal from twisted.python import components, log from twisted.internet.process import ProcessExitedAlready from zope import interface from ssh import session, forwarding, filetransfer from ssh.filetransfer im...
#!/usr/bin/env python # # This code is a part of `ardrone_autopilot` project # which is distributed under the MIT license. # See `LICENSE` file for details. # """UI node for visualizing the drone state This node provides the QT user interface and keyboard input. Inputs ------ * /ardrone/navdata -- information about...
# Copyright 2013: Mirantis 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 b...
"""Module for random variables. This module contains classes for random variables and exceptions. Classes: ParameterException: Exception for invalid parameters. RandomVariable: Abstract class for random variables. Discrete: Class for discrete random variables. Gaussian: Class for Gaussian random varia...
#-*- coding: utf-8 -*- from bs4 import BeautifulSoup from unittest import TestCase __all__ = ['TestWithBonitaServer','TestWithMockedServer', 'build_dumb_bonita_error_body','build_bonita_user_xml', 'build_bonita_group_xml','build_bonita_role_xml', 'build_bonita_membership_xml','build_xml_set','build_xml_lis...
"""Tests for hyp2f1 for complex values. Author: Albert Steppi, with credit to Adam Kullberg (FormerPhycisist) for the implementation of mp_hyp2f1 below, which modifies mpmath's hyp2f1 to return the same branch as scipy's on the standard branch cut. """ import pytest import numpy as np from typing import NamedTuple fr...
# coding: utf-8 import datetime import json from base64 import b64encode from django.conf import settings from django.http import HttpRequest from djoauth2.models import AccessToken from djoauth2.models import AuthorizationCode from djoauth2.models import Client from djoauth2.models import Scope from djoauth2.signals...
import tempfile import unittest import itertools import nltk from gensim import corpora import numpy as np from orangecontrib.text import preprocess from orangecontrib.text.corpus import Corpus from orangecontrib.text.preprocess import Preprocessor def counted(f): def wrapped(*args, **kwargs): wrapped.c...
import pytz from django.contrib.postgres.fields import ArrayField from django.db import models from django.db.models import Q from django.utils import timezone from osf.models import Node from osf.models import NodeLog from osf.models.base import GuidMixin, Guid, BaseModel from osf.models.mixins import CommentableMixi...
# Copyright 2015, Google 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct from . i...
from __future__ import absolute_import, unicode_literals import unittest import mock from mopidy import backend, core from mopidy.internal import deprecation from mopidy.models import Image, Ref, SearchResult, Track class BaseCoreLibraryTest(unittest.TestCase): def setUp(self): # noqa: N802 dummy1_ro...
# 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 # distrib...
#!/usr/bin/env python __author__ = 'waroquiers' import unittest import os import numpy as np from pymatgen.util.testing import PymatgenTest from pymatgen.analysis.chemenv.coordination_environments.coordination_geometry_finder import LocalGeometryFinder from pymatgen.analysis.chemenv.coordination_environments.coordi...
'''Multimethods (generic functions) ''' from __future__ import absolute_import import sys from compiler import parse as py_compiler_parse from compiler.ast import Keyword as AstKeyword from ..bases import CachingBase from ..collections import OrderedDict from ..fakeatypes import (as_optimized_type, type_name, compo...
# Copyright (c) 2016 Universidade Federal Fluminense (UFF) # Copyright (c) 2016 Polytechnic Institute of New York University. # This file is part of noWorkflow. # Please, consult the license terms in the LICENSE file. """Helpers for AST analysis""" from __future__ import (absolute_import, print_function, ...
#!/usr/bin/env python # Copyright (c) 2008 Qtrac Ltd. All rights reserved. # This program or module 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 2 of the License, or # version 3 of the Licens...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, ...
# -*- coding: utf-8 -*- from __future__ import absolute_import import os import httplib as http from flask import request from flask import send_from_directory from django.core.urlresolvers import reverse from geoip import geolite2 from framework import status from framework import sentry from framework.auth import ...
# Copyright 2011 Grid Dynamics # Copyright 2011 OpenStack Foundation # 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...
# -*- coding: utf-8 -*- import logging import itertools import math import httplib as http from modularodm import Q from flask import request from framework import utils from framework import sentry from framework.auth.core import User from framework.flask import redirect # VOL-aware redirect from framework.routing ...