gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
""" report test results in JUnit-XML format, for use with Jenkins and build integration servers. Based on initial code from Ross Lawley. """ # Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/ # src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd import functoo...
# -*- coding: utf-8 -*- import logging import random import time from collections import namedtuple, defaultdict import gevent from gevent.queue import Empty from ethereum import slogging from raiden.network.channelgraph import ( get_best_routes, ) from raiden.tasks import Task from raiden.messages import ( M...
# Copyright The PyTorch Lightning team. # # 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 i...
#!/usr/bin/env python import numpy as np import math def read_ASF(filename): '''Read an ASF file from disk. Returns a bone dict.''' return decode_ASF(parse_ASF(open(filename,'r').readlines())) def parse_ASF(asfLines): '''Parse an ASF file into a dict of str:one of (str,list of dict(str:str),dict(str:str)).''' as...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from datetime import datetime import pytest from unittest.mock import Mock from channelarchiver import Archiver, codes, utils, exceptions from channelarchiver.models import ChannelData, ArchiveProperties from mock_archiver import MockArchiver utc = utils.UTC() local_tz = utils.local_tz @pytest.fixture def archiver...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import os import io import gzip import sys import bz2 import zipfile from contextlib import contextmanager import subprocess import logging from petl.errors import ArgumentError from petl.compat import urlopen, StringIO, BytesI...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ sessions2trash.py Run this script in a web2py environment shell e.g. python web2py.py -S app If models are loaded (-M option) auth.settings.expiration is assumed for sessions without an expiration. If models are not loaded, sessions older than 60 minutes are removed. U...
''' Created on Mar 18, 2013 @author: Gooch ''' import re,os import Pipeline.settings.BiotoolsSettings as BiotoolsSettings from Pipeline.core.PipelineTemplate import PipelineTemplate import Pipeline.core.PipelineUtil as PipelineUtil from Pipeline.core.PipelineError import PipelineError from Pipeline.core.PipelineSample...
""" Sandbox Panel Estimators References ----------- Baltagi, Badi H. `Econometric Analysis of Panel Data.` 4th ed. Wiley, 2008. """ from scikits.statsmodels.tools.tools import categorical from scikits.statsmodels.regression.linear_model import GLS, WLS import numpy as np __all__ = ["PanelModel"] try: from pand...
""" Read/write tools for nonuniform electric field .grd format. Matthew Grawe, grawe2 (at) illinois.edu January 2017 """ import numpy as np def next_line(grd_file): """ next_line Function returns the next line in the file that is not a blank line, unless the line is '', which is a typical EOF marker. """ done...
# -*- coding: utf-8 -*- """ babel.messages.pofile ~~~~~~~~~~~~~~~~~~~~~ Reading and writing of files in the ``gettext`` PO (portable object) format. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import os import ...
# # 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 # ...
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Nils Weiss <nils@we155.de> # This program is published under a GPLv2 license # scapy.contrib.description = Unified Diagnostic Service (UDS) # scapy.contrib.status = loads import struct import time from iterto...
from collections import deque ### parent and children should be made private so don't mess up linking ### parent() and children() will return their data ### but to change parent, graft/trim should be used. same for children ### check all cases of parent/children to make sure can be replaced. class TreeNode(): """...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by applicable law or a...
from copy import copy import six from . import ast from .visitor_meta import QUERY_DOCUMENT_KEYS, VisitorMeta class Falsey(object): def __nonzero__(self): return False def __bool__(self): return False BREAK = object() REMOVE = Falsey() class Stack(object): __slots__ = 'in_array', '...
from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test.client import Client from django.utils.unittest import TestCase from django_extensions.db.fields import json from nose.tools import eq_, ok_ from .fixtures import create_project, create_user, create_template from ...
# encoding: utf-8 # Copyright 2013 maker # License # encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Add currencies to financial items" try: currency = orm...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import os import shutil import sys import tempfile import time import unittest import ray from ray.rllib import _register_all from ray import tune from ray.tune import Trainable, TuneError from ra...
from denorm.fields import SumField import django from django.db import models from django.contrib.contenttypes.generic import GenericForeignKey, GenericRelation from django.contrib.contenttypes.models import ContentType from denorm import denormalized, depend_on_related, CountField, CacheKeyField, cached from django.co...
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import os import sys import asyncio import logging import functools import traceback import contextlib import synapse.exc as s_exc import synapse.common as s_common import synapse.glob as s_glob import synapse.telepath as s_telepath import synapse.lib.cmd as s_cmd import synapse.lib.output as s_output import synapse....
from __future__ import unicode_literals, division, absolute_import import copy from datetime import datetime, timedelta, time as dt_time import fnmatch from hashlib import md5 import logging import Queue import threading import time import sys from sqlalchemy import Column, String, DateTime from flexget.config_schema...
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
import urllib2 import os.path import sys import re default_encoding = sys.getfilesystemencoding() if default_encoding.lower() == 'ascii': default_encoding = 'utf-8' def to_native_string(s): if type(s) == unicode: return s.encode(default_encoding) else: return s def r1(pattern, text): m = re.search(pattern, ...
# Copyright (c) 2014 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...
from iam_syncr.errors import SyncrError, BadConfiguration, InvalidConfiguration, NoConfiguration from iam_syncr.amazon.base import Amazon from iam_syncr.syncer import Sync from iam_syncr import VERSION from rainbow_logging_handler import RainbowLoggingHandler import argparse import logging import fnmatch import yaml i...
# WARNING: Do not edit by hand, this file was generated by Crank: # # https://github.com/gocardless/crank # import json import requests import responses from nose.tools import ( assert_equal, assert_is_instance, assert_is_none, assert_is_not_none, assert_not_equal, assert_raises ) from gocardless_pro.e...
from .AbstractAction import * from .Logger import * from .Range import Range, Position from .Buffer import LastLinebreakLostExecption from .Interpreter import Interpreter, InterpreterActionManager class Idle(AbstractAction): def act(self, callback = None): operator = self.command.lpOperator() retur...
#!/usr/bin/env python2 from __future__ import division import sys import itertools import re import warnings from statepoint import StatePoint alphanum = re.compile(r"[\W_]+") err = False ################################################################################ def parse_options(): """Process command lin...
# -*- coding: utf-8 -*- """ Core client, used for all API requests. """ import os import platform from collections import namedtuple from plivo.base import ResponseObject from plivo.exceptions import (AuthenticationError, InvalidRequestError, PlivoRestError, PlivoServerError, ...
import re from functools import partial from inspect import signature from typing import Any, Dict, List, Optional from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request_v...
import os import socket import StringIO import traceback import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from kombu import Connection from PIL import Image import redis as redislib import olympia.core.logger from olympia.amo import search from olympia.amo.temp...
# -*- coding: utf-8 -*- """ Unit tests for the neo_tools module. :copyright: Copyright 2014-2016 by the Elephant team, see `doc/authors.rst`. :license: Modified BSD, see LICENSE.txt for details. """ from __future__ import division, print_function, unicode_literals from itertools import chain import unittest from ne...
# Copyright 2014 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. DEPS = [ 'bot_update', 'gclient', 'gerrit', 'tryserver', 'recipe_engine/buildbucket', 'recipe_engine/json', 'recipe_engine/path', 'recipe_eng...
keysyms = { 'XF86AudioLowerVolume': 0x1008ff11, 'XF86AudioMute': 0x1008ff12, 'XF86AudioRaiseVolume': 0x1008ff13, 'XF86AudioPlay': 0x1008ff14, 'XF86AudioStop': 0x1008ff15, 'XF86AudioPrev': 0x1008ff16, 'XF86AudioNext': 0x1008ff17, 'VoidSymbol': 0xffffff, 'BackSpace': 0xff08, 'Tab':...
# -*- coding: utf-8 -*- """ Role ==== The ``PluginFileLocator`` locates plugins when they are accessible via the filesystem. It's default behaviour is to look for text files with the '.yapsy-plugin' extensions and to read the plugin's decription in them. Customization ------------- The behaviour of a ``PluginFil...
#!/usr/bin/env python """ Copyright (c) 2018 Alex Forencich 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, merg...
""" :class:`.Bing` geocoder. """ from geopy.compat import urlencode from geopy.geocoders.base import Geocoder, DEFAULT_FORMAT_STRING, \ DEFAULT_TIMEOUT, DEFAULT_SCHEME from geopy.location import Location from geopy.exc import ( GeocoderAuthenticationFailure, GeocoderQuotaExceeded, GeocoderInsufficientP...
import pygame, sys, picamera, time, pyImgShow from pygame.locals import * from pyImgShow import * from png_overlay import * def text_screencenter( show_text, text_color,screen_info, DISPLAYSURF): if len(show_text) < 2: varfontObj= pygame.font.Font('freesansbold.ttf', int(screen_info.current_w / 2 )) else: ...
# -*- 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): # Adding model 'Country' db.create_table('website_country', ( ('id', self.gf('django.db.models.f...
import re from django.contrib.auth.models import User from django.test import TestCase from ...core import models, testhelper from ....simplified import PermissionDenied, FilterValidationError, InvalidNumberOfResults from ....simplified.utils import modelinstance_to_dict, fix_expected_data_missing_database_fields fro...
# -*- coding: utf-8 -*- """ This is an example of VAE, whose p(z) is a mixture of Gaussian: .. math:: p(z) = \\sum_{k=1}^K \\pi(k) p_{k}(z) """ import functools import sys from argparse import ArgumentParser import tensorflow as tf from pprint import pformat from tensorflow.contrib.framework import arg_scope, ...
# coding: utf-8 # # Accessing ERDDAP from Python # # ERDDAP rich responses and RESTful API is makes it **THE** most convenient way to serve data. # # One can build URLs manually or programmatically like: # # <small>`https://erddap-uncabled.oceanobservatories.org/uncabled/erddap/tabledap/CP05MOAS-GL336-02-FLORTM000...
import argparse from collections import OrderedDict import matplotlib.pyplot as plt import seaborn as sns from aod_cells.schemata import * # plot_params = dict(cmap=plt.cm.gray, vmin=0, vmax=1) plot_params = dict(cmap=plt.cm.gray) plot_paramsP = dict(cmap=sns.blend_palette(['yellow', 'deeppink'], as_cmap=True), zord...
#!/usr/bin/env python """Registry for filters and abstract classes for basic filter functionality.""" import collections import glob import itertools import os import yaml import logging from grr.lib import config_lib from grr.lib import rdfvalue from grr.lib import registry from grr.lib.aff4_objects import collecti...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'LinkedInfo.user_pk' db.add_column(u'accounting_tools_link...
import os import pytest from unittest.mock import Mock from django.conf import settings from django.core.files.storage import default_storage as storage from django.test.utils import override_settings from olympia import amo from olympia.addons.models import Addon from olympia.amo import models as amo_models from oly...
#/u/GoldenSights import traceback from dateutil.parser import parse as dateparse import string import datetime import time import praw import sqlite3 import re """ USER CONFIG """ USERAGENT = "" #Describe the bot and what it does. Include your username APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRESH = "" # https...
import os import re import glob import logging import pattern.web import pages_scrape import mongo_connection from goose import Goose from pymongo import MongoClient from ConfigParser import ConfigParser from multiprocessing import Pool # Initialize Logger logger = None def scrape_func(website, lang, address, COLL, ...
from construct import * from construct import adapters from sflow.protocol import utils class IPv4Header(object): def __init__(self, data): ip = Struct("ip_header", EmbeddedBitStruct( Const(Nibble("version"), 4), Nibble("header_length"), ), ...
"""Allow to set up simple automation rules via the config file.""" import asyncio import importlib import logging from typing import Any, Awaitable, Callable, List, Optional, Set import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_NAME, CONF_DEVICE_ID, CONF_ENTITY_ID, C...
# Copyright (C) 2011 Midokura KK # Copyright (C) 2011 Nicira, Inc # 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 # # ...
import numpy as np from multiprocessing import Process import logging_utils import tensorflow as tf import ctypes import pyximport; pyximport.install() from hogupdatemv import copy, apply_grads_mom_rmsprop, apply_grads_adam import time import utils CHECKPOINT_INTERVAL = 500000 logger = logging_utils.getLogger('acto...
import collections import contextlib import cProfile import inspect import gc import multiprocessing import os import random import sys import time import unittest import warnings from io import StringIO from unittest import result, runner, signals, suite, loader, case from .loader import TestLoader from numba.core i...
import itertools import pickle import numpy as np from numpy.testing import assert_array_almost_equal import pytest from scipy.spatial.distance import cdist from sklearn.neighbors import DistanceMetric from sklearn.neighbors import BallTree from sklearn.utils import check_random_state from sklearn.utils._testing imp...
# 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...
"""The tests for the Tasmota fan platform.""" import copy import json from unittest.mock import patch from hatasmota.utils import ( get_topic_stat_result, get_topic_tele_state, get_topic_tele_will, ) import pytest from voluptuous import MultipleInvalid from homeassistant.components import fan from homeass...
# 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. """Client configuration management. This module holds the code for detecting and configuring the current client and it's output directories. It is responsib...
#!/usr/bin/python import getopt import sys from Bio import SeqIO import time import os import shutil import pandas from Bio.SeqRecord import SeqRecord from Bio.Seq import Seq __author__ = "Andriy Sheremet" #Helper functions definitions def genome_shredder(input_dct, shear_val): shredded = {} for key, v...
from datetime import date from pywps.Process import WPSProcess from flyingpigeon.datafetch import _PRESSUREDATA_ from flyingpigeon.log import init_process_logger import logging logger = logging.getLogger(__name__) class AnalogsProcess(WPSProcess): <<<<<<< HEAD def __init__(self): # definition of this proces...
# Copyright 2017 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...
from __future__ import unicode_literals import hashlib from django.conf import settings try: from django.contrib.auth import get_user_model # Django 1.5 except ImportError: from postman.future_1_5 import get_user_model from django.core.exceptions import ValidationError from django.core.urlresolvers import rev...
from canvas_sdk import client, utils def delete_assignment(request_ctx, course_id, id, **request_kwargs): """ Delete the given assignment. :param request_ctx: The request context :type request_ctx: :class:RequestContext :param course_id: (required) ID :type course_id: string ...
from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import Q from django.db.models.query import QuerySet class GFKOptimizedQuerySet(QuerySet): def __init__(self, *args, **kwargs): # ...
""" ******************************************************************************** * Name: StreamNetworkModel * Author: Nathan Swain * Created On: May 12, 2013 * Copyright: (c) Brigham Young University 2013 * License: BSD 2-Clause ******************************************************************************** """ fr...
#!/usr/bin/env python # # Copyright 2012, 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...
# # 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 # ...
import datetime from django.conf import settings from django.core.files.base import File from django.core.urlresolvers import reverse from django.http import HttpResponse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from djangohelpers import allow_http from djangohelpers i...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet.stdio}. """ from __future__ import absolute_import, division import os import sys import itertools from twisted.trial import unittest from twisted.python import filepath, log from twisted.python.reflect import r...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import numpy as np from pymatgen.core.operations import MagSymmOp, SymmOp from pymatgen.electronic_structure.core import Magmom from pymatgen.util.testing import PymatgenTest class SymmOpTestCase(PymatgenTest): def set...
# 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 # distribu...
# MAKE NUMPY RUNNER make x 3D def tfg_days_3d( x, err='off' ): ''' calculate DOF/DOT/LOGS for a vector of 12 chronological monthly values ''' import itertools import numpy as np # filter the div by zero and comparison with np.nan warnings from numpy if err == 'off': np.warnings.filterwarni...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
import numpy as np import matplotlib import os import pandas as pd from astropy.io import fits import subprocess import cosmics import shlex import sys #from pisco_lib import * # edited 5/9/17 """ pisco_combine: run pisco pipeline to reduce the raw data to clean data with correct WCS The pipeline is a combination of ...
# 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 agreed to in writing, ...
import numpy as np import numpy.linalg as la from pysal.spreg.utils import RegressionPropsY, spdot import pysal.spreg.user_output as USER from utils import cache_readonly from base import LikelihoodModelResults import family from iwls import iwls __all__ = ['GLM'] class GLM(RegressionPropsY): """ Generalised...
# =================================================================== # # Copyright (c) 2014, Legrandin <helderijs@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributio...
""" The OGRGeometry is a wrapper for using the OGR Geometry class (see http://www.gdal.org/classOGRGeometry.html). OGRGeometry may be instantiated when reading geometries from OGR Data Sources (e.g. SHP files), or when given OGC WKT (a string). While the 'full' API is not present yet, the API is "pythonic" unlik...
from django import forms from django.contrib.admin.util import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.admin.templatetags.admin_static import static from django.contrib.contenttypes.models import ContentType from django.core.exceptions import Ob...
# # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
import re from django.db.backends import BaseDatabaseIntrospection, FieldInfo, TableInfo field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$') def get_field_size(name): """ Extract the size number from a "varchar(11)" type name """ m = field_size_re.search(name) return int(m.group(1)) i...
import os import sys import subprocess from time import sleep from os.path import exists, join, abspath from shutil import rmtree from tempfile import mkdtemp from twisted.trial import unittest from scrapy.utils.python import retry_on_eintr from scrapy.utils.test import get_testenv class ProjectTest(unittest.TestCas...
# Copyright 2014 Cloudbase Solutions Srl # # 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 ...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from __future__ import absolute_import import urwid import urwid.util import os from netlib.http import CONTENT_MISSING import netlib.utils from .. import utils from ..models import decoded from . import signals try: import pyperclip except: pyperclip = False VIEW_FLOW_REQUEST = 0 VIEW_FLOW_RESPONSE = 1 ...
from django.db import models from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save from fields import PositiveSmallIntegerRangeField import django.utils.timezone CARD_KIND_WEAPON = 0 CARD_KIND_POTION = 1 CARD_KIND_MONSTER = 2 CARD_KIND_SCRAP =...
""" #;+ #; NAME: #; lls_literature #; Ordered by publication date #; Version 1.0 #; #; PURPOSE: #; Module for loading up literature data on Lyman Limit Systems #; 29-Jun-2015 by JXP #;- #;------------------------------------------------------------------------------ """ from __future__ import print_function...
from importlib import import_module import itertools import os import re from django.conf import global_settings, settings from django.contrib.sites.models import Site, RequestSite from django.contrib.admin.models import LogEntry from django.contrib.auth.models import User from django.core import mail from django.core...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib import atexit import cStringIO as StringIO from collections import namedtuple from functools import partial import glob try: import grp except ImportError: # The module only exists on Unix platfor...
# Copyright 2019 The dm_control 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 applicable law or agreed to i...
#!/usr/bin/env python # Build or install Shapely distributions # # This script has two different uses. # # 1) Installing from a source distribution, whether via # # ``python setup.py install`` # # after downloading a source distribution, or # # ``pip install shapely`` # # on a platform for which pip ca...
from collections import namedtuple import os import errno import threading import time import uuid import struct from nose import SkipTest from nose.tools import eq_ from nose.tools import raises import mock from kazoo.exceptions import ConnectionLoss from kazoo.protocol.serialization import ( Connect, int_st...
"""Create a local Vitess database for testing.""" import glob import logging import os import random import re from vttest import environment from vttest import vt_processes class LocalDatabase(object): """Set up a local Vitess database.""" def __init__(self, topology, schema_dir,...
""" A simple vtkTkRenderWidget for Tkinter. Created by David Gobbi, April 1999 May ??, 1999 - Modifications peformed by Heather Drury, to rewrite _pan to match method in TkInteractor.tcl May 11, 1999 - Major rewrite by David Gobbi to make the interactor bindings identical to the TkIn...
#!/usr/bin/env python """Tests for approval_checks module.""" from unittest import mock from absl import app from grr_response_core.lib import rdfvalue from grr_response_server import access_control from grr_response_server import data_store from grr_response_server.authorization import client_approval_auth from grr...