gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericRelation from django.db import models from django.urls import reverse from django.utils.html import escape from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from tagging...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ramuda. Commands to deploy Lambda functions to AWS """ from __future__ import unicode_literals, print_function import sys from clint.textui import colored from . import gcdt_lifecycle from . import utils from .gcdt_cmd_dispatcher import cmd from .gcdt_defaults impor...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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 # # Unle...
# -*- coding: utf-8 -*- import json try: from urllib import urlencode # python2 except ImportError: from urllib.parse import urlencode # python3 import mock import pytest import tornado.web import tornado.httputil import tornado.httpserver import tornado.http1connection import tornado.concurrent import tor...
from lib import * #from keras.layers.merge import Concatenate from keras.layers import Merge import copy from collections import Counter from sklearn.metrics import confusion_matrix from sklearn.metrics import f1_score import math word2topic = pickle.load(open("word2topic", "r")) embedding = pickle.load(open("word2top...
import os.path import struct import keyword from math import ceil from collections import namedtuple, OrderedDict from xml.etree.ElementTree import parse, tostring class Basic(object): def __init__(self, name): self.name = name def clone(self, name): return self.__class__(name) class Simpl...
# Copyright 2015 Cisco Systems # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
#!/usr/bin/python3 # -*- coding_ utf-8 -*- """ This program implements a parser and data structure for Petri net files. Original author: Copyright (c) 2015 Thomas Irgang see MIT license: https://github.com/irgangla/pntools/blob/master/LICENSE This program implements an XML parser and a python data structure for Petr...
# Copyright 2014 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 ...
import numpy as np import pandas as pd from lifetimes.utils import coalesce, calculate_alive_path, expected_cumulative_transactions from scipy import stats __all__ = [ 'plot_period_transactions', 'plot_calibration_purchases_vs_holdout_purchases', 'plot_frequency_recency_matrix', 'plot_probability_alive...
""" Modified and extended from https://github.com/camsaul/django-rest-params/blob/master/django_rest_params/decorators.py """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys from functools import wraps from django.utils.cache import patch...
""" Sphinx plugin to run example scripts and create a gallery page. Lightly modified from the mpld3 project. """ import os import os.path as op import re import glob import token import tokenize import shutil import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt # noqa: E402 # Python 3 has no ex...
# coding=UTF-8 from django.db import models from django.contrib.sites.models import Site from django.contrib.auth.models import User from django.template.defaultfilters import slugify from django.utils.translation import ugettext as _ from django.template import loader, Context from django.core.urlresolvers import reve...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
# -*- py-indent-offset:2 -*- import zmq import time import json import threading from collections import defaultdict import logging import sys import os import os.path import urllib from urlparse import urlparse, parse_qs import socket from Crypto.Cipher import DES import base64 import re import contextlib import de...
#!/usr/bin/env python import os import base64 import copy import httplib import logging import re import simplejson as json import string import sys import threading import time import urlparse import zlib import platform import subprocess import couchbaseConstants from cbcollections import defaultdict from cbqueue i...
# coding: utf-8 from __future__ import absolute_import from .error import YAMLError from .compat import nprint, DBG_NODE, dbg, string_types, nprintf # NOQA from .util import RegExp from .events import ( StreamStartEvent, StreamEndEvent, MappingStartEvent, MappingEndEvent, SequenceStartEvent, ...
from functools import wraps import mimetypes from boto.s3.connection import S3Connection, SubdomainCallingFormat from boto.exception import S3ResponseError, S3CreateError from boto.s3.key import Key from flask import current_app from .base import ( FileNotFoundError, Storage, StorageException, Storag...
# Copyright 2018 Google LLC. # # 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 notice, # this list of conditions and the following disclaimer. # #...
''' Native support for Multitouch devices on Linux, using libmtdev. =============================================================== The Mtdev project is a part of the Ubuntu Maverick multitouch architecture. You can read more on http://wiki.ubuntu.com/Multitouch To configure MTDev, it's preferable to use probesysfs p...
import zmq import datetime import logging import yaml from http_comp_env import HttpComputingEnvironmentProxy from idomaar_data_source import IdomaarDataSource from recommendation_manager import RecommendationManager from util import timed_exec from zmq_comp_env import ZmqComputingEnvironmentProxy import os.path from ...
import rpy2.robjects.packages as rpackages import rpy2.robjects as ro import click import csv import sys from typing import List from typing import Dict from ..get_stats.util import * def revcomp(nuc: str) -> str: if nuc.upper() == 'A': return 'T' if nuc.upper() == 'T': return 'A' if nuc.upper() == 'C': retu...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future import standard_library standard_library.install_aliases() import os import math import numpy as np import scipy.sparse as sparse import warnings import inspe...
"""``tornado.gen`` implements generator-based coroutines. .. note:: The "decorator and generator" approach in this module is a precursor to native coroutines (using ``async def`` and ``await``) which were introduced in Python 3.5. Applications that do not require compatibility with older versions of Pytho...
"""Http related parsers and protocol.""" import collections import functools import http.server import itertools import re import string import sys import zlib from wsgiref.handlers import format_date_time import aiohttp from . import errors, hdrs from .multidict import CIMultiDict from .log import internal_logger _...
#!/usr/bin/env python # # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=F0401 import distutils.dir_util import optparse import os import shutil import sys import zipfile from common_func...
# 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 ...
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 # # ...
""" Context-dependent integration task, loosely based on Context-dependent computation by recurrent dynamics in prefrontal cortex. V. Mante, D. Sussillo, K. V. Shinoy, & W. T. Newsome, Nature 2013. http://www.nature.com/nature/journal/v503/n7474/full/nature12742.html """ from __future__ import division import...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This software is licensed under the Apache 2 license, quoted below. Copyright 2014 Xiao Wang <wangxiao8611@gmail.com, http://fclef.wordpress.com/about> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with ...
import sublime, sublime_plugin def clean_layout(layout): row_set = set() col_set = set() for cell in layout["cells"]: row_set.add(cell[1]) row_set.add(cell[3]) col_set.add(cell[0]) col_set.add(cell[2]) row_set = sorted(row_set) col_set = sorted(col_set) rows =...
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2018-09-26 19:17 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Cre...
import argparse from ihex import IHex from parts import Parts from pgm_error import PgmError from operations import Operations from serial_io import SerialIO import time class BatchISP: def __init__(self): parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatt...
"""Support for Wireless Sensor Tags.""" import logging from requests.exceptions import ConnectTimeout, HTTPError import voluptuous as vol from wirelesstagpy import NotificationConfig as NC, WirelessTags, WirelessTagsException from homeassistant import util from homeassistant.const import ( ATTR_BATTERY_LEVEL, ...
#!/usr/bin/env python3 # # Copyright (c) 2020, 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 -*- # 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...
# Berkeley DB # Cody Ingram # Aaron Tse # Chris Li import bsddb3 as db3 import sys import random import datetime as dt import subprocess import btreeCreatePopDB import indexfileCreatePopDB DA_FILE = "/tmp/cdingram_db/291_db.db" def main(): arg = sys.argv[1].lower() inpList = ['btree', 'hash', 'indexfile'] db...
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
#/******************************************************************************* #* Portions Copyright (C) 2008 Novell, 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: #* #* - Redistributi...
from uuid import uuid4 from flask import (Blueprint, render_template, current_app, request, flash, url_for, redirect, session, abort) from flask.ext.mail import Message from flaskext.babel import gettext as _ from flask.ext.login import login_required, login_user, current_user, logout_user, confirm_...
# -*- coding: utf-8 -*- import re import nltk.data from nltk.tokenize import RegexpTokenizer from iepy.preprocess.pipeline import BasePreProcessStepRunner, PreProcessSteps from iepy.utils import DIRS class TokenizeSentencerRunner(BasePreProcessStepRunner): """Does Tokenization and segmentation togheter over IED...
# -*- coding: utf-8 -*- """ Presence analyzer unit tests. """ import os.path import json import datetime import unittest from lxml import etree import mock from requests import ConnectionError from presence_analyzer import main, utils, views from presence_analyzer.utils import cache_data TEST_DATA_CSV = os.path.joi...
############################################################################### # # The MIT License (MIT) # # Copyright (c) Crossbar.io Technologies GmbH # # 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 ...
import json import re from StringIO import StringIO from urlparse import urlparse from datetime import timedelta from urlparse import urlsplit from django.contrib.auth import get_user_model, authenticate from django.conf import settings from django.core import mail from django.core.management import call_command from d...
#!/usr/bin/env python import unittest import xml.dom.minidom import xpath class TestAbbreviations(unittest.TestCase): """Section 2.5: Abbreviated Syntax""" def test_para_children(self): doc = xml.dom.minidom.parseString(""" <doc> <para id="1" /> <div id="2"...
# -*- 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 from django.utils.text import slugify class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Theme.slug' db.add_c...
#!/usr/bin/env python """ Create and install a Let's Encrypt cert for an API Gateway. This file is a descendant of @diafygi's 'acme-tiny', with http-01 replaced with dns-01 via AWS Route 53. You must generate your own account.key: openssl genrsa 2048 > account.key # Keep it secret, keep safe! """ import base64 impo...
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Free University # Berlin, 14195 Berlin, Germany. # 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 ...
""" The RPyC protocol """ import sys import weakref import itertools import socket import time import gc from threading import Lock, RLock, Event from rpyc.lib.compat import pickle, next, is_py3k, maxint, select_error from rpyc.lib.colls import WeakValueDict, RefCountingColl from rpyc.core import consts, brine, vinega...
# -*- coding: utf-8 -*- """ Copyright (c) 2012 University of Oxford 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, modif...
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import sys from mixbox.binding_utils import * from . import cybox_common class DeviceObjectType(cybox_common.ObjectPropertiesType): """The DeviceObjectType type is intended to characterize a specific Devi...
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** In earlier versions of Python (up to 1.5a3), scripts or...
""" This paver file is intented to help with the release process as much as possible. It relies on virtualenv to generate 'bootstrap' environments as independent from the user system as possible (e.g. to make sure the sphinx doc is built against the built numpy, not an installed one). Building a fancy dmg from scratch...
from abc import ABC, abstractmethod import typing from typing import Union, Optional, Any import gym import numpy as np from stable_baselines.common.callbacks import BaseCallback from stable_baselines.common.vec_env import VecEnv if typing.TYPE_CHECKING: from stable_baselines.common.base_class import BaseRLModel...
from nilearn import plotting import nilearn import os.path as osp from glob import glob import matplotlib from nistats.thresholding import map_threshold from matplotlib import pyplot as plt from IPython.display import display_html plt.rcParams.update({'figure.max_open_warning': 0}) import nibabel as nib import numpy as...
import os import outer_packages import json import pprint from elasticsearch import Elasticsearch from pprint import pprint from elasticsearch import helpers import random import datetime # one object example for perf def create_one_object (build_id): d={}; sim_date=datetime.datetime.now()-datetime.timedelta...
from datetime import datetime import urllib from django import http, test from django.conf import settings from django.core.cache import cache from django.core import mail import commonware.log from lxml import etree import mock from mock import patch, Mock from nose.tools import eq_ from pyquery import PyQuery as pq...
import bisect import json import re import os.path def do_set_base(dia, settings_file, args): try: with open(settings_file, 'r') as fp: projects = json.load(fp) except (json.JSONDecodeError, FileNotFoundError): projects = {} path, run_ctags = args path = os.path.realpath(p...
from __future__ import absolute_import from __future__ import division from __future__ import print_function """Objects for storing configuration and passing config into binaries. Config class stores settings and hyperparameters for models, data, and anything else that may be specific to a particular run. """ import...
from sympy import (log, sqrt, Rational as R, Symbol, I, exp, pi, S, cos, sin, Mul, Pow, cse, O) from sympy.simplify.simplify import expand_numer, expand from sympy.core.function import ( expand_power_base, expand_multinomial) from sympy.utilities.pytest import raises from sympy.core.function import expand_powe...
from ..vendor.lexicon import Lexicon from .argument import Argument def to_flag(name): name = name.replace('_', '-') if len(name) == 1: return '-' + name return '--' + name def sort_candidate(arg): names = arg.names # TODO: is there no "split into two buckets on predicate" builtin? s...
# # Copyright 2012-2016 University of Southern California # # 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...
import json from django import forms from corehq.apps.locations.models import Location from django.template.loader import get_template from django.template import Context from corehq.apps.locations.util import load_locs_json, allowed_child_types, location_custom_properties, lookup_by_property from django.utils.safestri...
# Copyright 2012 IBM Corp. # 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 app...
# Copyright (c) 2011 Tencent Inc. # All rights reserved. # # Author: Huan Yu <huanyu@tencent.com> # Feng Chen <phongchen@tencent.com> # Yi Wang <yiwang@tencent.com> # Chong Peng <michaelpeng@tencent.com> # Date: October 20, 2011 """ This is the scons rules genearator module which invokes al...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (2019) The Electrum Developers # # 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 w...
# (c) 2012, 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) any lat...
""" util tests """ import os import stat import sys import shutil import tempfile import pytest from mock import Mock, patch from pip.exceptions import BadCommand from pip.util import (egg_link_path, Inf, get_installed_distributions, find_command, untar_file, unzip_file) class Tests_EgglinkPa...
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfgen/textobject.py __version__=''' $Id: textobject.py 3610 2009-12-08 09:53:56Z rgbecker $ ''' __doc__=""" PDFTextObject is an efficient way to add t...
#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility for dart_pkg and dart_pkg_app rules""" import argparse import errno import json import os import shutil import subprocess...
import os, math, floppyforms as forms from django.core.exceptions import ValidationError from django.core.files import File from django.core.files.storage import default_storage from .widgets import MultiFileWidget, AddFilesWidget, ClearFilesWidget ASSERT_FILE_CHOICES = '"files" argument must be a list of django Fi...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import numpy as np from pymatgen.optimization.linear_assignment import LinearAssignment # type: ignore class LinearAssignmentTest(unittest.TestCase): def test(self): w0 = np.ar...
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
import os from ddapp import lcmUtils import ddapp.objectmodel as om import ddapp.applogic as app from ddapp import transformUtils from ddapp.debugVis import DebugData from ddapp import ioUtils from ddapp import filterUtils from ddapp.shallowCopy import shallowCopy from ddapp import vtkAll as vtk from ddapp import visu...
# 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...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import glob import hashlib import json import os import random import re import shutil import sys import bb_uti...
""" Implementation of Spatial Transformer Networks References ---------- [1] Spatial Transformer Networks Max Jaderberg, Karen Simonyan, Andrew Zisserman, Koray Kavukcuoglu Submitted on 5 Jun 2015 [2] https://github.com/tensorflow/models/tree/master/transformer/transformerlayer.py [3] https://github.com/davi...
""" .. module:: hypervisor_mock_test :platform: Linux, Windows :synopsis: Unit tests for hypervisor module that are fully stubbed and mocked. This allows the the tests to be ran in any environment. :license: BSD, see LICENSE for more details. .. moduleauthor:: Ryan Gard <ryan.a.gard@outlook.com> """ __...
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Joe H. Rahme <joe.hakim.rahme@enovance.com> # # 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://...
""" This module implements VideoClip (base class for video clips) and its main subclasses: - Animated clips: VideofileClip, DirectoryClip - Static image clips: ImageClip, ColorClip, TextClip, """ import os import subprocess as sp import multiprocessing import tempfile from copia import copia from tqdm import tqdm...
import re import datetime from django.conf import settings from logging import getLogger from django.utils.timezone import utc from sis_provisioner.dao.user import valid_net_id, valid_gmail_id from sis_provisioner.dao.group import get_effective_members, is_member from sis_provisioner.dao.course import group_section_sis...
""" >>> flix.request('/catalog/titles/', term="$9.99") [<CatalogTitle u'$9.99', u'http://api.netflix.com/catalog/titles/movies/70108543'>] """ import logging import time import itertools from os import path from netflix import Netflix, TooManyRequestsPerDayError from django.core.exceptions import Improperly...
# Create your views here. from datetime import date from history.models import GoverningDocumentType from event_cal.models import GoogleCalendar from mig_main.models import AcademicTerm, TBPChapter, OfficerPosition, Status, Standing, ShirtSize, Major, OfficerTeam,CurrentTerm from requirements.models import SemesterTy...
# Copyright 2014 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 ag...
#!/usr/bin/env python # # Check Docker container stats via cAdvisor HTTP API # === # # Checks CPU or Memory Usage status inside given container # via cAdvisor API # # Copyright 2015 Alexander Bulimov <lazywolf0@gmail.com> # # Released under the MIT license, see LICENSE for details. from __future__ import unicode_liter...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
#!/usr/bin/python from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.exc import SQLAlchemyError import sys, sqlalchemy, datetime, os, stat from log import * """ Author: Diego da Hora email: diego.da-hora@lip6.fr Date: 01/06/2013 Author: An...
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
## views.py ## ## Django 'views.py' file for CIVET system ## ## Error handling: ## Errors are reported in the 'output' string: they are prefixed with '~Error~' and terminate with '\n'. ## These are reported to the user via the template_error.html page, which is rendered by read_template() ## ## PROVENANCE: ## Program...
"""`main` is the top level module for your Flask application.""" # Mobile Byte Version 1 # # Copyright 1/2016 Jennifer Mankoff # # Licensed under GPL v3 (http://www.gnu.org/licenses/gpl.html) # # Imports import os import jinja2 import webapp2 import logging import json import urllib import MySQLdb import math JINJA...
# Copyright (c) 2012 - 2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from scipy.special import gammaln, digamma from ...util.linalg import pdinv from .domains import _REAL, _POSITIVE import warnings import weakref class Prior(object): domain ...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Base class for RPC testing import logging import optparse import os import sys import shutil import te...
""" Description: This provides a VTK widget for pyGtk. This embeds a vtkRenderWindow inside a GTK widget. This is based on GtkVTKRenderWindow.py. The extensions here allow the use of gtkglext rather than gtkgl and pygtk-2 rather than pygtk-0. It requires pygtk-2.0.0 or later. There is a working example ...
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re import threading from...
# -*- coding: utf-8 -*- # # 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 ...
""" Copyright 2014 Sotera Defense Solutions, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
# -*- coding: utf-8 -*- """ babel.messages.mofile ~~~~~~~~~~~~~~~~~~~~~ Writing of files in the ``gettext`` MO (machine object) format. :copyright: (c) 2013 by the Babel Team. :license: BSD, see LICENSE for more details. """ import array import struct from babel.messages.catalog import Catalog, ...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
"""Kazoo Zookeeper Client""" import inspect import logging import os import re import warnings from collections import defaultdict, deque from functools import partial from os.path import split from kazoo.exceptions import ( AuthFailedError, ConfigurationError, ConnectionClosedError, ConnectionLoss, ...