gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- import os import logging import uuid from inspect import ismethod, getmembers import tornado.ioloop import tornado.web from tornado.escape import json_decode, json_encode import sockjs.tornado # TODO: write some abc for minimal queue and Session store subclassing class EventQueue(object): ...
from __future__ import division, print_function, absolute_import import math import numpy as np from scipy._lib.six import xrange from scipy._lib.six import string_types __all__ = ['tri', 'tril', 'triu', 'toeplitz', 'circulant', 'hankel', 'hadamard', 'leslie', 'kron', 'block_diag', 'companion', ...
## parsing.py # RFC1459 parsing and construction. import collections import pydle.protocol from . import protocol class RFC1459Message(pydle.protocol.Message): def __init__(self, command, params, source=None, _raw=None, _valid=True, **kw): self._kw = kw self._kw['command'] = command self._k...
# Copyright 2011 Nicholas Bray # # 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 (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib import itertools...
"""This module contains the "Viz" objects These objects represent the backend of all the visualizations that Superset can render. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import hashlib import l...
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd. # All rights reserved; available under the terms of the BSD License. """ esky.finder: VersionFinder implementations for esky This module provides the default VersionFinder implementations for esky. The abstract base class "VersionFinder" defines the expected inte...
import copy from errors import SyntaxError import utils import scss import tree import selector class CSS(object): def __init__(self,template,**options): if isinstance(template,file): template = template.read() self.options = copy.deepcopy(options) self.template = template def render(self,fmt = 'sass'):...
import oauth2 as oauth import json from urllib import urlencode from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect, HttpResponseForbidden from django.v...
#!/usr/bin/env python3 # # Copyright (c) 2018, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
# coding=utf-8 """Interface to Processing Block (PB) data objects.""" import ast import datetime from random import randint from typing import List, Union from ._keys import PB_KEY from ._scheduling_object import SchedulingObject from .dependency import Dependency from .resource import Resource from .workflow_stage im...
import urllib2 from django.contrib import admin from django.db.models import Count from django.core.urlresolvers import reverse from django import forms from taggit.models import TaggedItem from taggit.forms import TagField from .models import Vlan,DnsARecord,DnsCName,DhcpEntry,Network,DnsDomain, NetworkSummary, Vla...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "John Kirkham <kirkhamj@janelia.hhmi.org>" __date__ = "$Oct 02, 2016 15:38:07 EDT$" import doctest import itertools import math import operator import sys import unittest from kenjutsu import kenjutsu try: irange = xrange except NameError: irang...
# -*- coding: utf-8 -*- # # Flocker documentation build configuration file, created by # sphinx-quickstart on Mon Apr 28 14:54:33 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
"""A simple HTTP client which mixes httplib with gevent and PayPal protecteds. It provides convenience functions for the standard set of `HTTP methods`_: >>> http_client.get('http://example.com/foo') # doctest: +SKIP which are just shortcuts for the corresponding :py:func:`request` call: >>> http_client.request("ge...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Convenience functions for photometric data.""" import copy from collections import OrderedDict import numpy as np from astropy.table import Table from .bandpasses import get_bandpass from .magsystems import get_magsystem from .utils import alias_map ...
#!/usr/bin/env python3 # Copyright 2021 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. r'''Finds which build target(s) contain a particular Java class. This is a utility script for finding out which build target dependenc...
import numpy as np import pandas as pd from helpers import d2df import datetime as dt import preprocessingO as ppo def auxPowerAnalysis(processed, CONSTANTS, dict_structure, dataset_raw, header_names): # Calculating the total auxiliary power demand processed = auxPowerTotalDemand(processed) processed = pr...
import os import time import datetime import uuid import logging import platform import requests from requests.exceptions import HTTPError from bdbag import bdbag_api as bdb, bdbag_ro as ro, BAG_PROFILE_TAG, BDBAG_RO_PROFILE_ID from deriva.core import ErmrestCatalog, HatracStore, format_exception, get_credential, forma...
#! /usr/bin/python from __future__ import absolute_import as _absolute_import from __future__ import print_function ''' Copyright 2015 Tim Nonner Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional informatio...
# Copyright 2020 Tensorforce Team. 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 la...
# # 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...
#!/usr/bin/python -u # -*- coding: utf-8 -*- import urllib2 import sys import json import argparse from argparse import RawTextHelpFormatter import socket import re import os # remember the ending "/" # eg: PHOTO_DEST_DIR = "/home/user/photos/" PHOTO_DEST_DIR = "" # GR_HOST is FIXED. DO NOT CHANGE!! GR_HOST = "http:...
#!/usr/bin/env python # Calculate principal component analysis on multivariate data stored in a .csv # file and display it in a 2D plot (optional 3D) # # https://github.com/thomas-coudrat/pca_analysis # Thomas Coudrat <thomas.coudrat@gmail.com> # from __future__ import unicode_literals, print_function import pandas a...
# web.py -- WSGI smart-http server # Copyright (C) 2010 Google, Inc. # # This program 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; version 2 # or (at your option) any later version of the License. # # This ...
from functools import update_wrapper from django.http import Http404, HttpResponseRedirect from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.auth import logout as auth_logout, REDIRECT_FIELD_NAME from django.contrib.contenttypes impor...
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Bitcoin test...
# 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...
################################################################# ## ## Modification of soil_moisture_field.py to accomodate ## multiple Plant Functional Types (PFTs) ## ## Sai Nudurupati and Erkan Istanbulluoglu - 31Oct2014 ################################################################# GRASS = 0 SHRUB = 1 TREE =...
#!/usr/bin/env python ############################################################################### # Copyright 2019 The Apollo 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 ...
# Copyright (C) 2016 Niklas Rosenstein # # 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, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
import asyncio import json import logging from math import ceil import aiohttp import requests from .error import AssertionException, TimeoutException from .model import GroupInfo, UsersInfo, DetailedUserInfo, GroupsInfo, UserGroupsInfo, JSONEncoder, DetailedGroupInfo, UserStateInfo class SignClient: _endpoint...
import os import unittest import logging from cmath import isclose from decimal import Decimal from unittest import TestCase import pandas as pd from pandas import DataFrame from supplychainpy import model_inventory from supplychainpy._helpers._config_file_paths import ABS_FILE_PATH_APPLICATION_CONFIG from supplychain...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains functions for serializing core astropy objects via the YAML protocol. It provides functions `~astropy.io.misc.yaml.dump`, `~astropy.io.misc.yaml.load`, and `~astropy.io.misc.yaml.load_all` which call the corresponding functions in...
# 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...
# -*- 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...
""" Efficiently compute the approximate statistics over an SArray. """ ''' Copyright (C) 2015 Dato, Inc. All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. ''' from .. import connect as _mt from ..connect import main as glconnect fr...
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import datasets import datasets.ilsvrc #import datasets.pascal_voc impo...
#!/usr/bin/python #===-- x86_64_target_definition.py -----------------------------*- C++ -*-===// # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===---------------------------------------------...
#!/usr/bin/env python # coding: utf-8 # # Author: Kazuto Nakashima # URL: https://github.com/kazuto1011 # Created: 2016-07-05 import os import os.path as osp import sys if 'FRCN_ROOT' not in os.environ: print "Could not find $FRCN_ROOT." sys.exit(1) FRCN_ROOT = os.environ['FRCN_ROOT'] print "FRCNN=" ...
from collections import OrderedDict, defaultdict from jsonobject import ( BooleanProperty, DictProperty, JsonObject, ListProperty, ObjectProperty, StringProperty, ) from corehq.apps.app_manager.app_schemas.app_case_metadata import ( AppCaseMetadata, FormQuestionResponse, LoadSavePr...
import unittest from unittest.mock import ( call, _Call, create_autospec, MagicMock, Mock, ANY, _CallList, patch, PropertyMock ) from datetime import datetime class SomeClass(object): def one(self, a, b): pass def two(self): pass def three(self, a=None): pass class AnyT...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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...
# 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...
import logging import MySQLdb from wsd.database import MySQLDatabase from graph_tool.all import * from conf import * import cPickle import os __author__ = 'dimitrovdr' db = MySQLDatabase(DATABASE_HOST, DATABASE_USER, DATABASE_PASSWORD, DATABASE_NAME) db_work_view = db.get_work_view() def build_article_features_tabl...
""" Copyright 2020 Google LLC Copyright 2020 PerfectVIPs Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed t...
# Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 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...
import numpy as np from scipy.special import gammaln, psi from scipy.misc import logsumexp from joblib import Parallel, delayed from pybasicbayes.distributions import GibbsSampling, MeanField, MeanFieldSVI from pyhawkes.internals.distributions import Bernoulli, Gamma from pyhawkes.utils.utils import logistic, logit ...
from .core import (istask, get_dependencies, subs, toposort, flatten, reverse_dict, add, inc, ishashable) from toolz import identity def cull(dsk, keys): """ Return new dask with only the tasks required to calculate keys. In other words, remove unnecessary tasks from dask. ``keys`` may...
"""Support for interfacing with Monoprice Blackbird 4k 8x8 HDBaseT Matrix.""" import logging import socket from pyblackbird import get_blackbird from serial import SerialException import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.component...
import datetime import json import furl import responses from django.utils import timezone from nose.tools import * # noqa: from framework.auth.core import Auth from addons.github.models import GithubFolder from addons.github.tests.factories import GitHubAccountFactory from api.base.settings.defaults import API_BAS...
import os import requests from requests.auth import HTTPBasicAuth from qubell.api.private.exceptions import ApiUnauthorizedError from qubell.api.provider import route, play_auth, basic_auth class Router(object): def __init__(self, base_url, verify_ssl=False, verify_codes=True): self.base_url = base_url ...
import asyncio import functools import re __all__ = 'Bot', 'Line' class Bot: def __init__(self, app, index: int): self.reader = None self.writer = None self.app = app self.index = index self.config = app.config['CONNECTIONS'][index] @asyncio.coroutine def connec...
# Copyright (c) 2009, 2011 Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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...
# Imports, sorted alphabetically. # Python packages # Nothing for now... import struct # Third-party packages # Nothing for now... # Modules from this project # Nothing for now... import globals as G from physics import physics_manager from utils import make_nbt_from_dict __all__ = ( 'Entity', 'TileEntity', 'C...
"""Gaussian Mixture Model.""" # Author: Wei Xue <xuewei4d@gmail.com> # Modified by Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clause import numpy as np from scipy import linalg from .base import BaseMixture, _check_shape from ..externals.six.moves import zip from ..utils import check_arra...
He = (24.98, 54.33) assert len(He) == 2 Li = (5.343, 74.45, 121.9) assert len(Li) == 3 Be = (8.417, 18.69, 146.3, 214.9) assert len(Be) == 4 B = (8.431, 25.81, 29.58, 249.3, 332.9) assert len(B) == 5 C = (10.60, 26.05, 50.40, 67.59, 374.2, 475.6) assert len(C) == 6 N = (13.37, 32.02, 51.55, 82.57, 103.1, 524.0, 64...
# encoding: utf-8 # module _collections # from (built-in) # by generator 1.130 """ High performance data structures. - deque: ordered collection accessible from endpoints only - defaultdict: dict subclass with a default value factory """ # no imports # no functions # classes class defaultdict(dict): """ ...
import threading import requests from bs4 import BeautifulSoup import uuid, base64 import io import xlsxwriter from .tree import Tree from .webpage_classifier import WebpageClassifier from .steady_state_genetic import SteadyStateGenetic from .general_regression_neural_network import GeneralRegressionNeuralNetwork impor...
# Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
"""Support for TP-Link routers.""" import base64 from datetime import datetime import hashlib import logging import re from aiohttp.hdrs import ( ACCEPT, COOKIE, PRAGMA, REFERER, CONNECTION, KEEP_ALIVE, USER_AGENT, CONTENT_TYPE, CACHE_CONTROL, ACCEPT_ENCODING, ACCEPT_LANGUAGE) import requests import voluptuous...
#!/usr/bin/env python # Copyright (c) 2013, AT&T Labs, Yun Mao <yunmao@gmail.com> # 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...
# -*- coding: utf-8 -*- # # score_fun.py # # Copyright 2020 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. # You may obtain a copy of the License at # # http://www.apache....
from __future__ import print_function import os import sys import collections import numpy as np import flopy import matplotlib.pyplot as plt # --modify default matplotlib settings updates = {'font.family': ['Univers 57 Condensed', 'Arial'], 'mathtext.default': 'regular', 'pdf.compression': 0...
# 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 unde...
from contextlib import contextmanager import logging import re import sys import time from unittest import skipUnless import warnings from functools import wraps from xml.dom.minidom import parseString, Node from django.apps import apps from django.conf import settings, UserSettingsHolder from django.core import mail ...
# Copyright (c) 2021, Manfred Moitzi # License: MIT License import pytest import ezdxf from ezdxf import gfxattribs from ezdxf.gfxattribs import GfxAttribs from ezdxf.entities import factory class TestDefaultGfxAttribs: def test_default_init(self): attribs = GfxAttribs() assert attribs.layer ==...
import sys import os import re import time import base64 import tempfile import subprocess import threading if __name__ == '__main__': print 'Please do not launch this file directly.' sys.exit(0) def module_path(): if hasattr(sys, "frozen"): return os.path.dirname(sys.executable) return os.path.dirname(__file__...
from django.db import models class Tract(models.Model): state = models.CharField(max_length=2) county = models.CharField(max_length=3) tract = models.CharField(max_length=12) B01001_001E = models.DecimalField(max_digits=12, decimal_places=2, blank=True, null=True) B01001_002E = models.DecimalFie...
import hashlib import logging import os import re import tempfile import bb.data logger = logging.getLogger('BitBake.SigGen') try: import cPickle as pickle except ImportError: import pickle logger.info('Importing cPickle failed. Falling back to a very slow implementation.') def init(d): siggens = [o...
import numpy as np from math import log, floor, ceil from os import path, makedirs from collections import namedtuple, defaultdict, OrderedDict from collections.abc import Mapping from devito.logger import info, warning try: import matplotlib as mpl import matplotlib.pyplot as plt # The below is needed on...
import re import json import random import requests from werkzeug.datastructures import MultiDict class Struct: def __init__(self, **entries): self.__dict__.update(entries) class Duolingo(object): def __init__(self, username, password=None): self.username = username self.password =...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# 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 by applicable law or agreed to in w...
# -*- coding: utf-8 -*- #from django.conf import settings from django.core.cache import cache from django.db.models.signals import ( pre_delete, #post_save ) from django.db.utils import DatabaseError from publication_backbone.utils.dispatch import make_dispatch_uid from publication_backbone.models import Rubr...
# # CanvasRenderGL.py -- for rendering into a OpenGL widget # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import time import os.path import numpy as np import ctypes import threading from distutils.version import LooseVersion from OpenGL import GL as gl...
"""Defines ORM models for interactions with the DB.""" from typing import Optional, Text import datetime import enum import sqlalchemy from sqlalchemy.ext import declarative Base = declarative.declarative_base() def _is_last_n_days( timestamp_column: sqlalchemy.orm.attributes.InstrumentedAttribute, days: in...
from __future__ import unicode_literals import pytz from django.contrib.auth.models import User from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from djblets.datagrid.grids import (CheckboxColumn, Column, DateTimeColumn, DataGrid) from djblets...
""" Some utility functions that are only used for unittests. Placing them in test/ directory seems to be against convention, so they are part of the library. """ from __future__ import print_function, division, absolute_import import random import copy import warnings import tempfile import shutil import re import sy...
# Copyright (c) 2010-2012 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 # # Unless required by applicable law or agreed to ...
# Copyright 2011 Eldar Nugaev # 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 """Run a YOLO_v2 style detection model on test images.""" import colorsys import imghdr import os import random import numpy as np from keras import backend as K from keras.models import load_model from PIL import Image, ImageDraw, ImageFont from yolo.yad2k.models.keras_yolo import yolo_eval, y...
import os from importlib import import_module from django.core.exceptions import ImproperlyConfigured from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig: """ Class representing a Django application and its configuration. """ def __init__(self,...
#!/usr/bin/env python3 # Project : From geodynamic to Seismic observations in the Earth's inner core # Author : Marine Lasbleis """ Define classes for geodynnamical models combining growth, translation and rotation. """ from __future__ import division from __future__ import absolute_import import numpy as np import ...
from docutils import nodes, transforms from docutils.parsers.rst import directives from sphinx import addnodes from sphinx.domains import Domain, ObjType from sphinx.locale import l_, _ from sphinx.roles import XRefRole from sphinx.util.compat import Directive from pybtex.database.input import bibtex import pybtex.st...
## @mainpage Poisson Disk Sampling ## ## Contains functions for Poisson disk sampling, and the classes and functions ## that support it. The code can be downloaded from http://www.luma.co.za/labs/2008/02/27/poisson-disk-sampling. ## ## @version 0.1 (last updated 16 Dec 2007) ## @author Herman Tulleken (herman@luma.co.z...
import functions # Contains helper functions. import itertools import math import functools import fractions import string class Floroid(object): def __init__(self, sourceCode): self.sourceCode = sourceCode def source(self, code): self.sourceCode = code def parse(self): mappings =...
# Copyright (c) 2013 Intel, Inc. # Copyright (c) 2013 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/li...
""" Implementation of `nbio_interface.AbstractIOServices` on top of a selector-based I/O loop, such as tornado's and our home-grown select_connection's I/O loops. """ import abc import logging import socket import threading from pika.adapters.utils import nbio_interface, io_services_utils from pika.adapters.utils.io_...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2010-2018 (ita) """ Classes and functions enabling the command system """ import os, re, imp, sys from waflib import Utils, Errors, Logs import waflib.Node # the following 3 constants are updated on each new release (do not touch) HEXVERSION=0x2000f00 """Constan...
#!/usr/bin/env python3 # ----------------------------------------------------------------------- # BLOKUS Copyright 2015, Stephen Gould <stephen.gould@anu.edu.au> # ----------------------------------------------------------------------- # Code for playing a game of Blokus, a game developed by Bernard # Tavitian and now...
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) an...
""" Visualize Test Plots This script will go through all the plots in the ``mpld3/test_plots`` directory, and save them as D3js to a single HTML file for inspection. """ import os import glob import sys import gc import traceback import itertools import json import contextlib import matplotlib MPLBE = os.environ.get...
from __future__ import absolute_import import mock import unittest import bs4 import bokeh.embed as embed from bokeh.resources import CDN, INLINE, Resources, JSResources, CSSResources from bokeh.plotting import figure from jinja2 import Template from six import string_types _embed_test_plot = None def setUpModule(...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains the classes and utility functions for distance and cartesian coordinates. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from .. import units a...
#!/usr/bin/env python3 """ Load the Session.sublime_session file from either the Sublime Text or Sublime Merge data directory and perform a cleanup operation to remove all of the recent workspaces, folders/git repositories, and files that are in the list of recently accessed items if they no longer exist on disk. The i...
# Copyright 2012 NTT Data. All Rights Reserved. # Copyright 2012 Yahoo! 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/li...
# 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. import random import unittest import telemetry.timeline.async_slice as tracing_async_slice import telemetry.timeline.bounds as timeline_bounds from telemetr...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import os import subprocess import sys import shutil import re import json import tarfile import zipfile from . import package_root, build_root, other_packages from ._pep425 import _pep425tags, _pep425_implementation i...