gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python ''' Evaluate VCFs against BAMSurgeon "Truth" VCFs Adam Ewing, adam.ewing@mater.uq.edu.au Requires PyVCF (https://github.com/jamescasbon/PyVCF) and PySAM ''' import sys, os import vcf import argparse import pysam from collections import OrderedDict def match(subrec, trurec, vtype='SNV'): ass...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: tcav_results/results.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google...
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc try: from StringIO import StringIO except ImportError: from io import StringIO from warnings import warn class Reader(object): """A line-based string reader. """ def __init...
# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests the network latency of a Firecracker guest.""" import logging import platform import re import pytest import host_tools.network as net_tools from conftest import ARTIFACTS_COLLECTION from framework....
# util/deprecations.py # Copyright (C) 2005-2019 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Helpers related to deprecation of functions, methods, classes, other functio...
from urllib import quote_plus from django.contrib import messages from django.http import HttpResponse, HttpResponseRedirect, Http404, JsonResponse try: from django.utils import simplejson as json except ImportError: import json from django.shortcuts import render, get_object_or_404, redirect from django.utils ...
# 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...
# # The Python Imaging Library. # $Id$ # # Windows Icon support for PIL # # History: # 96-05-27 fl Created # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1996. # # See the README file for information on usage and redistribution. # # This plugin is a refactored version of Win32IconImageP...
'''Wrapper for the github API. This maintains an on-disk cache of API calls and maps github API calls onto Python functions. ''' import sys import logging import json import re import os import hashlib import cPickle import requests GITHUB_API_ROOT = 'https://api.github.com' WHITESPACE_RE = re.compile(r'^[ \t\n\r...
# Copyright 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. # TODO(nduca): Rewrite what some of these tests to use mocks instead of # actually talking to the device. This would improve our coverage quite # a bit. imp...
# # GtkHelp.py -- customized Gtk widgets # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import print_function import time import math from ginga.gtkw ...
import json import requests import pytest import demistomock as demisto # Disable insecure warnings requests.packages.urllib3.disable_warnings() BASE_URL = 'https://localhost:6078' API_TOKEN = 'apitoken' params = { 'base_url': BASE_URL, 'token': API_TOKEN, 'insecure': True, 'mirror_direction': 'Both...
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""Subprocesses with ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
#!/usr/bin/env python """ MHC Epitope analysis Created September 2013 Copyright (C) Damien Farrell """ import sys, os, shutil, string, types import csv, glob, pickle, itertools import re import time, random from collections import OrderedDict from operator import itemgetter #import matplotlib #matplotlib....
#!/usr/bin/python2.7 # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
import collections import string import numpy import six import cupy from cupy import carray from cupy import elementwise from cupy import util six_range = six.moves.range six_zip = six.moves.zip _broadcast = elementwise._broadcast _check_args = elementwise._check_args _decide_params_type = elementwise._decide_par...
""" parser.http package (imdb package). This package provides the IMDbHTTPAccessSystem class used to access IMDb's data through the web interface. the imdb.IMDb function will return an instance of this class when called with the 'accessSystem' argument set to "http" or "web" or "html" (this is the default). Copyright...
from collections import Iterable import copy from numbers import Real, Integral import sys import numpy as np from openmc import Mesh from openmc.summary import Summary import openmc.checkvalue as cv if sys.version_info[0] >= 3: basestring = str _FILTER_TYPES = ['universe', 'material', 'cell', 'cellborn', 'su...
""" .. _tut_erp: EEG processing and Event Related Potentials (ERPs) ================================================== .. contents:: Here we cover the specifics of EEG, namely: :local: :depth: 1 """ import mne from mne.datasets import sample from mne.channels import combine_channels #########################...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
# Copyright 2012 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/LICENSE-2.0 # # Unless requ...
import zmq import Queue import threading import msgpack import snappy import traceback import time def _unpack(str) : if str[0] == 'S': tmp = snappy.uncompress(str[1:]) obj = msgpack.loads(tmp) elif str[0] == '\0': obj = msgpack.loads(str[1:]) else: return None #print ...
""" Bundle subcommands. """ import logging import sys import typing as ty import click from git_pw import api from git_pw import utils LOG = logging.getLogger(__name__) _list_headers = ('ID', 'Name', 'Owner', 'Public') _sort_fields = ('id', '-id', 'name', '-name') def _get_bundle(bundle_id: str) -> dict: """...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import libvirt import logging from ovm.configuration import Configuration from ovm.utils.logger import logger from ovm.vmcli.management import * # noqa def add_subparsers(parser): subparsers = parser.add_subparsers() # console subcommand =...
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http...
import weakref from twisted.internet import task from twisted.trial import unittest from axiom import store from imaginary import iimaginary, objects, events, action from imaginary.test import commandutils from examplegame import mice from examplegame import japanese class MouseChallengeMixin(object): """ ...
# Copyright 2013 the Neutrino authors (see AUTHORS). # Licensed under the Apache License, Version 2.0 (see LICENSE). # Neutrino syntax tree definitions from abc import abstractmethod import data import plankton # Syntax tree visitor. The default behavior of each visit method is to apply # the visitor recursively. cl...
# Copyright 2013 Rackspace Hosting Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# -*- coding: utf-8 -*- from scipy.interpolate import griddata import numpy as np import logging from .helpers import get_latex_table_frame class Comparison(object): def __init__(self, parent): self.parent = parent self._logger = logging.getLogger("chainconsumer") def dic(self): r"""...
from __future__ import print_function, absolute_import from ctypes import (c_char_p, byref, POINTER, c_bool, create_string_buffer, c_void_p, c_size_t, cast, string_at) from . import ffi from .linker import link_modules from .common import _decode_string, _encode_string from .value import ValueRef ...
# Copyright 2014 Netflix, 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...
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np import matplotlib from matplotlib.testing.decorators import image_comparison, knownfailureif, cleanup import matplotlib.pyplot as plt from matplotlib import patches, path, transf...
""" work queue specification """ import re import types from six import iteritems from pandaserver.taskbuffer.GlobalShares import Share RESOURCE = 'Resource' ACTIVE_FUNCTIONS = [RESOURCE] class WorkQueue(object): # attributes _attributes = ('queue_id', 'queue_name', 'queue_type', 'VO', 'queue_share', 'qu...
# encoding=utf8 """ Module for computing various vector and matrix norms. Vector norms define a measure of distance for vectors. Matrix norms are measures of distance in the space of the matrix. The most common vector norm is the 2-norm, the equivalent matrix norm is the Frobenius norm. """ import numpy as np impor...
#!/usr/bin/env python """Convert SeqAn profiling information into PDF graphic. USAGE: profile2pdf.py <program.profile.txt> <out.pdf> """ from __future__ import with_statement __author__ = 'Manuel Holtgrewe <manuel.holtgrewe@fu-berlin.de>' import math import sys import cairo IGNORE_LIMIT = 0.00001 # Automatic le...
############################################################################### # # Copyright (c) 2011 Ruslan Spivak # # 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, inc...
import json import boto3 import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError import pytest from moto import mock_iam, mock_ec2, mock_s3, mock_sts, mock_elbv2, mock_rds from moto.core import set_initial_no_auth_action_count from moto.core import ACCOUNT_ID from uuid import ...
import json import os from subprocess import PIPE from subprocess import Popen from time import sleep from unittest import TestCase import requests from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from api.decorator import threaded, retry_on_fail from database.dictionary import Base, Defin...
# 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. #----------------------------------------------------------------------...
#===----------------------------------------------------------------------===## # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # #===----------------------------------...
#!/usr/bin/env python import os.path import argparse import math import random import numpy as np import sympy as sp import matplotlib.pyplot as plt plt.rc('text', usetex=True) plt.rc('font', family='serif') import stats.methods as methods from stats.utils import * ################ # Declarations # ################...
""" Selective Kernel Networks (ResNet base) Paper: Selective Kernel Networks (https://arxiv.org/abs/1903.06586) This was inspired by reading 'Compounding the Performance Improvements...' (https://arxiv.org/abs/2001.06268) and a streamlined impl at https://github.com/clovaai/assembled-cnn but I ended up building somet...
""" .. module:: pdf :synopsis: This module implements Probability Density Functions (PDFs)." .. moduleauthor:: Martin Hunt <mmh@Purdue.edu> This file is part of PUQ Copyright (c) 2013 PUQ Authors See LICENSE file for terms. """ from __future__ import absolute_import, division, print_function import numpy as np i...
# 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 # # Unless required by applicable law or agree...
from __future__ import unicode_literals import logging from PIL import Image from os import path import os.path try: from io import BytesIO except ImportError: from cStringIO import StringIO as BytesIO from django.db import models from django.db.models import signals from django.utils.translation import uget...
# -*- coding: utf-8 -*- # # Copyright 2012 Canonical Ltd. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # W...
# Copyright 2014 The Oppia 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 applicable ...
""" HTML Widget classes """ from __future__ import unicode_literals import copy import datetime import re from itertools import chain from django.conf import settings from django.forms.utils import flatatt, to_current_timezone from django.utils import datetime_safe, formats, six from django.utils.datastructures impo...
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify from flask_pagination import Pagination from db import * from flask_login import LoginManager, login_user import consts import md5 # system consts records_per_page = 10 md5_salt = 'coersive control' app = Flask(__name__) app.secret_...
from __future__ import absolute_import, unicode_literals import datetime import os from decimal import Decimal from django import forms from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import ValidationError from django.db import connection from django.forms.models import mode...
''' Alternate strategies to find IAC+SE in a bytestring. The payload looks like a 4+ byte blob: IAC SB <zero or more payload bytes> IAC SE The tricky part is that an IAC in the payload is escaped to IAC IAC. So the terminting IAC+SE is really the first SE that is preceded by an *odd* number of IACs. These function...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
# -*- coding: utf-8 -*- """ celery.backends.base ~~~~~~~~~~~~~~~~~~~~ Result backend base classes. - :class:`BaseBackend` defines the interface. - :class:`KeyValueStoreBackend` is a common base class using K/V semantics like _get and _put. """ from __future__ import absolute_import import...
# adding this to suppress sklearn DeprecationWarnings... def warn(*args, **kwargs): pass import warnings warnings.warn = warn import numpy as np import os import time import pickle import datetime from datetime import timedelta from optparse import OptionParser from sklearn.model_selection import cross_val_score, ...
# 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 conditions and the ...
# swift_build_support/cmake.py - Detect host machine's CMake -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt f...
"""Support for UK public transport data provided by transportapi.com.""" from datetime import datetime, timedelta import logging import re import requests import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import CONF_MODE, HTTP_OK, TIME_MINUTES...
#!/usr/bin/env """ Based on waveletanalysis.py For P. Stabeno Using Anaconda packaged Python modifications for confidence intervals based on wave_matlab at http://paos.colorado.edu/research/wavelets/ ### License ### The MIT License (MIT) Copyright (c) 2013 Aaron O'Leary (dev@aaren.me) Permission...
import scores_db import mock import redis_client import control from twisted.internet import defer import yaml # Unit tests ## ScoresDB access def test_set_scores(): fake_connection = mock.Mock() fake_connection.set = mock.Mock() with mock.patch('redis_client.connection', fake_connection): scores...
import mock import os import pytest import tempfile from datetime import datetime from django.conf import settings from django.core import mail from django.test.utils import override_settings from freezegun import freeze_time from olympia import amo from olympia.activity.models import ActivityLog from olympia.addons...
# -*- coding: utf-8 - # # This file is part of restkit released under the MIT license. # See the NOTICE for more information. import base64 import urllib import time import random import urlparse import hmac import binascii try: from urlparse import parse_qs, parse_qsl except ImportError: from cgi import par...
#!/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 "License")...
# Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, m...
# -*- test-case-name: pyflakes -*- # (c) 2005-2010 Divmod, Inc. # See LICENSE file for details import __builtin__ import os.path import _ast import re from pyflakes import messages interpol = re.compile(r'%(\([a-zA-Z0-9_]+\))?[-#0 +]*([0-9]+|[*])?' r'(\.([0-9]+|[*]))?[hlL]?[diouxXeEfFgGcrs%]') ...
"""Storage for auth models.""" import asyncio from collections import OrderedDict from datetime import timedelta import hmac from logging import getLogger from typing import Any, Dict, List, Optional from homeassistant.auth.const import ACCESS_TOKEN_EXPIRATION from homeassistant.core import HomeAssistant, callback fro...
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
''' 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 use this ...
"""Adds support for generic hygrostat units.""" import asyncio import logging from homeassistant.components.humidifier import PLATFORM_SCHEMA, HumidifierEntity from homeassistant.components.humidifier.const import ( ATTR_HUMIDITY, DEVICE_CLASS_DEHUMIDIFIER, DEVICE_CLASS_HUMIDIFIER, MODE_AWAY, MODE_...
#!/usr/bin/env python # 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 (the # "License"); you ma...
"""Tests of http client with custom Connector""" import asyncio import http.cookies import gc import socket import unittest import ssl import tempfile import shutil import os.path from unittest import mock import aiohttp from aiohttp import web from aiohttp import client from aiohttp import helpers from aiohttp.clien...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Author: Travis Oliphant 2001 # Author: Nathan Woods 2013 (nquad &c) import sys import warnings from functools import partial from . import _quadpack import numpy from numpy import Inf __all__ = ['quad', 'dblquad', 'tplquad', 'nquad', 'quad_explain', 'IntegrationWarning'] error = _quadpack.error class ...
# encoding: utf-8 import socket from functools import partial from pprint import pformat from marrow.server.http.testing import HTTPTestCase, CRLF, EOH from marrow.util.compat import unicode log = __import__('logging').getLogger(__name__) from applications import * class TestHTTP11Protocol(HTTPTestCase): ...
import sys, re, os, time, math from datetime import datetime from dateutil.parser import parse as dtparse import pickle, json from pprint import pformat import asyncio from functools import partial import biothings.utils.mongo as mongo import biothings.utils.aws as aws from biothings.utils.common import timesofar fro...
""" Test module for Flask-htpasswd extension """ from __future__ import absolute_import, unicode_literals import base64 import os import unittest from flask import request, Flask, g from itsdangerous import JSONWebSignatureSerializer as Serializer import mock from flask_htpasswd import HtPasswdAuth class TestAuth(u...
#!/usr/bin/env python """ Integration (not unit) tests for pylast.py """ import time import unittest import pylast from .test_pylast import TestPyLastWithLastFm class TestPyLastNetwork(TestPyLastWithLastFm): def test_scrobble(self): # Arrange artist = "test artist" title = "test title" ...
############################################################################ # Copyright (c) Wolf Vollprecht, Johan Mabille and Sylvain Corlay # # Copyright (c) QuantStack # # # # Distribute...
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
#!/usr/bin/env python3 # Written by Devon Mack April-May 2017 # This program takes a 5 parameters in the config file and runs a SNVPhyl in galaxy fully automatically # Parameters (when it doubt, delete the config.json file and the program will create it for you with defaults): # config.json # api_key: The API key wh...
__author__ = 'woolly_sammoth' from kivy.config import Config Config.set('graphics', 'borderless', '0') Config.set('graphics', 'resizable', '1') Config.set('graphics', 'fullscreen', '0') Config.set('input', 'mouse', 'mouse,disable_multitouch') from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kiv...
# 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...
# -*- coding: utf-8 -*- # Copyright (c) 2014, 2015 Mitch Garnaat # # 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 appl...
'''tzinfo timezone information for Africa/Cairo.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Cairo(DstTzInfo): '''Africa/Cairo timezone definition. See datetime.tzinfo for details''' zone = 'Africa/Cairo' _utc_tr...
#this python file runs the non-iterative and iterative versions of #the A and B versions of the trace simplification algorithm, #where: # A - Blocks are considered alone # B - Blocks of like thread segments are condensed into single blocks # this aims to simplify even in the case of incremental failure import ...
# Copyright 2015 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...
# (C) Datadog, Inc. 2013-2017 # (C) Brett Langdon <brett@blangdon.com> 2013 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import re import time import urllib import urlparse from collections import defaultdict # 3p import requests from requests.exceptions import RequestException...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2012 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 file...
import json import locale import logging import os import re import string from zipfile import ZipFile, ZipInfo from tarfile import TarFile, TarInfo from pyp2rpm import utils logger = logging.getLogger(__name__) def generator_to_list(fn): """This decorator is for flat_list function. It converts returned ge...
import calendar import time from dataclasses import dataclass from typing import Any, Dict, List, Optional, Tuple from django.conf import settings from django.http import HttpRequest from django.utils import translation from two_factor.utils import default_device from zerver.context_processors import get_apps_page_ur...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import logging import os import re from datetime import datetime import cPickle import tempfile from contextlib import closing from string import Template import wsgiref.util import cgi from urllib import quote_plus, unquote_plus import hashlib import random class Request...
""" The contents of this file are taken from https://github.com/niwinz/django-jinja/blob/master/django_jinja/management/commands/makemessages.py Jinja2's i18n functionality is not exactly the same as Django's. In particular, the tags names and their syntax are different: 1. The Django ``trans`` tag is replaced by a...
# SPDX-FileCopyrightText: 2015 Eric Larson # # SPDX-License-Identifier: Apache-2.0 """ The httplib2 algorithms ported for use with requests. """ import logging import re import calendar import time from email.utils import parsedate_tz from pip._vendor.requests.structures import CaseInsensitiveDict from .cache import...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Test QiPkg """ from __future__ import absolute_import from __future__ import unicode_literals from __future__ import pr...
# Copyright (c) 2015 Xilinx Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
import collections import copy import multiprocessing as mp from operator import gt, lt import random from random import randint, uniform, shuffle import pysal as ps from pysal.region.components import check_contiguity import numpy as np from numpy.random import RandomState class LocalSearch(mp.Process): """ ...
"""A multi-producer, multi-consumer queue.""" from _pydev_imps._pydev_time import time as _time from _pydev_imps import _pydev_thread try: from _pydev_imps import _pydev_threading as _threading except ImportError: import dummy_threading as _threading from collections import deque import heapq __all__ = ['Empt...
# $Id: TemplateExpand.py 1053 2008-07-30 12:03:29Z landrgr1 $ # # Created by Greg Landrum August, 2006 # # from __future__ import print_function from rdkit import RDLogger as logging logger = logging.logger() logger.setLevel(logging.INFO) from rdkit import Chem from rdkit.Chem import Crippen from rdkit.Chem import All...