text
stringlengths
12
6.59M
from ..base import OptionsGroup, ParametrizedValue from .logging_loggers import * from .logging_encoders import * from ..utils import listify, string_types class Logging(OptionsGroup): """Logging. * http://uwsgi.readthedocs.io/en/latest/Logging.html * http://uwsgi-docs.readthedocs.io/en/latest/LogFormat....
import sys import six from .core import _validate_int, _validate_bool _undefined = object() def _try_contextualize_exception(context): """ Attempts to re-raise a `TypeError` or `ValueError` with a description of the context. If the original error does not match the expected form, will simply retu...
class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Keylogger', # list of one or more authors for the module ...
# ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2008,2009,2010 Contributor # # This program is free software; you can redistribute it and/or modify # it under the terms of the EU DataGrid Software License. You should # have received a copy of the li...
import requests import json import os from time import sleep from pprint import pprint # Read token from untracked credentials file. # We wouldn't want this on Github now, would we? f = open("creds.txt") lines = f.readlines() f.close token = lines[0].strip() print "Token loaded" # If it exists, read the previous last...
from unlock.util import TrialTimeState, Trigger from model import UnlockModel from random import Random class RandomCueStateMachine(UnlockModel): def __init__(self, rand, trials, cue_states, rest_state, indicate_state): super(UnlockModel, self).__init__() self.cue_states = cue_states self.r...
import random import os import sys import socket import select import time from tools import algos from tools import parser as pparser from tools import communication as ccommunication from tools import situation as ssituation from tools import tools from tools import think import tensorflow as tf import random impor...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # by Erik Osheim # # Reads README.md, and writes a README.md.new. If the format of # README.md changes, this script may need modifications. # # Currently it rewrites each section, doing the following: # 1. alphabetizing # 2. querying GitHub for stars and days since acti...
import json import pymongo import re import uuid import time from searchVotes import query client = pymongo.MongoClient() dbConf = json.load(open("./model/db.json","r")) db = client[dbConf["dbname"]] # Swear filter is a combination of: # https://gist.github.com/jamiew/1112488 # https://gist.github.com/tjrobinson/2366...
# The MIT License # # Copyright 2008 William T Katz # # 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, me...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
import bs import os import urllib2, httplib, urllib import json import random import time from md5 import md5 from bsUI import * SUPPORTS_HTTPS = False quittoapply = None checkedMainMenu = False # TODO: remove mm_uniqueID checks if 'mm_uniqueID' in bs.getConfig(): uniqueID = bs.getConfig().pop('mm_uniqueID') if n...
####################################################### ## Browser ## Abstracts querying and scraping web pages, and parsing APIs. ####################################################### import sys sys.path.append( '../' ) sys.path.append( './modules' ) from BeautifulSoup import BeautifulSoup as htmldom import mechani...
#!/usr/bin/python import os import sys import functools import thread import atexit import os.path import subprocess toepython_pipe_name="toepython" fromepython_pipe_name="fromepython" popen=None ePythonFunctionTable=None number_of_cores=0 activeCores=None thisCore=0 def executeOnEpiphany(): global popen for line i...
"""RSS News Sopel Module This module will get the latest from RSS Feeds. Usage: .rssnews <category> Example: .rssnews hack or .rssnews tech News.... Written by TylerCode Released under WTFPL v2 """ import feedparser import sopel.module # You can customize these both intro = "Here is the latest news on that topi...
import re import math import os from django.contrib.contenttypes.models import ContentType from r3d.models import * import settings import logging metrics_log = logging.getLogger('metrics') metrics_log.setLevel(logging.DEBUG) handler = logging.FileHandler(os.path.join(settings.LOG_PATH, 'metrics.log')) handler.setFor...
from __future__ import unicode_literals from distutils.version import StrictVersion as SV import sys import warnings import pykka if not (2, 7) <= sys.version_info < (3,): sys.exit( 'Mopidy requires Python >= 2.7, < 3, but found %s' % '.'.join(map(str, sys.version_info[:3]))) if (isinstance(pyk...
from __future__ import print_function, unicode_literals import logging import os import signal import sys import gobject gobject.threads_init() try: # Make GObject's mainloop the event loop for python-dbus import dbus.mainloop.glib dbus.mainloop.glib.threads_init() dbus.mainloop.glib.DBusGMainLoop(se...
""" Available settings and their default values. .. warning:: Do *not* change settings directly in :mod:`mopidy.settings`. Instead, add a file called ``~/.mopidy/settings.py`` and redefine settings there. """ #: List of playback backends to use. See :mod:`mopidy.backends` for all #: available backends. #: #:...
# -*- coding: utf-8 -*- import re # TODO cron order already! class Parser: def __init__(self): self.thangs = [Feature, Scenario, Step, Given, When, Then, And] self.steps = [] def parse_file(self, filename): prose = ope...
from __future__ import unicode_literals import copy import itertools from collections import defaultdict from datetime import datetime import re import six import boto from boto.ec2.instance import Instance as BotoInstance, Reservation from boto.ec2.blockdevicemapping import BlockDeviceMapping, BlockDeviceType from bo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ SeedEditor for organ segmentation Example: $ seed_editor_qp.py -f head.mat """ # import unittest from optparse import OptionParser from scipy.io import loadmat import numpy as np import sys from scipy.spatial import Delaunay import PyQt4 from PyQt4.QtCore import Qt...
########################################################################## # Copyright (c) 2012-2016 ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstr 6, CH...
class Queue(object): def __init__(self): """ initialize your data structure here. """ self.instck=[] self.outstck=[] def push(self, x): """ :type x: int :rtype: nothing """ self.instck.append(x) def pop(self): """ ...
from __future__ import unicode_literals import base64 import hashlib import os import random import string import sys from datetime import datetime import json import re from cryptography import x509 from cryptography.hazmat.backends import default_backend from six.moves.urllib.parse import urlparse from uuid import u...
############################################################################### # MIT License # # Copyright (c) 2017 Hajime Nakagami # # 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 ...
''' Created on 02/02/2014 @author: Miguel Otero ''' from lpentities.user import User from lpentities.data_source import DataSource class Organization(object): ''' classdocs ''' def __init__(self, chain_for_id, name=None, url=None, description_en=None, description_es=None, descripti...
import importlib import os import pkgutil from flask import Flask, jsonify from flask_redis import FlaskRedis from flask_security import Security, SQLAlchemyUserDatastore from APITaxi_models2 import db, Role, User from . import views __author__ = 'Julien Castets' __contact__ = 'julien.castets@beta.gouv.fr' __homep...
from .irc_message import IRCMessage from .irc_level import IRCLevel from .database import Database from socket import create_connection from importlib import import_module, reload from pkgutil import iter_modules from time import sleep import re import traceback class IRCBot: """ IRCBot class, plug in and go! ""...
#!/usr/bin/env python """ Minibook: the Facebook(TM) status updater (C) 2009 Gergely Imreh <imrehg@gmail.com> """ VERSION = '0.1.0' APPNAME = 'minibook' MIT = """ Copyright (c) 2009 Gergely Imreh <imrehg@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and assoc...
"""(disabled by default) support for testing pytest and pytest plugins.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import codecs import distutils.spawn import gc import os import platform import re import subprocess import sys import time import trac...
import numpy as np from openpnm.core import LabelMixin, ParamMixin, ModelsDict, ModelWrapper, ParserMixin from openpnm.utils import Workspace, SettingsAttr, PrintableList from openpnm.utils import parse_mode from copy import deepcopy import inspect import numpy.lib.recfunctions as rf ws = Workspace() __all__ = [ ...
# coding=utf-8 """ Wrapper classes for API models. Most of these are thin wrappers over lxml objectified versions of API responses. """ import lxml.etree from openprovider.util import camel_to_snake, snake_to_camel class Model(object): """ Superclass for all models. Delegates attribute access to a wrapped c...
#!/usr/bin/env python # Environment.py # Copyright (C) 2006 CCLRC, Graeme Winter # # This code is distributed under the BSD license, a copy of which is # included in the root directory of this package. # # 18th September 2006 # # A handler for matters of the operating environment, which will impact # on data harv...
from openerp.osv import fields,osv import time from datetime import datetime from dateutil.relativedelta import relativedelta from dateutil import parser from openerp.tools.translate import _ import re # from PyPDF import PdfFileReader, PdfFileWriter class kw_freight(osv.osv_memory): _name="kw.freight" _column...
import tempfile import commands from math import * from openeye.oechem import * from openeye.oeomega import * from openeye.oeiupac import * from openeye.oeshape import * try: from openeye.oequacpac import * #DLM added 2/25/09 for OETyperMolFunction; replacing oeproton except: from openeye.oeproton import * #GJR t...
## # See the file COPYRIGHT for copyright information. # # 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...
# # Copyright (c) 2004-2005 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/...
import argparse import re import sys import abc from junitparser import JUnitXml DOXYGEN_WARNING_REGEX = r"(?:(?:((?:[/.]|[A-Za-z]:).+?):(-?\d+):\s*([Ww]arning|[Ee]rror)|<.+>:-?\d+(?::\s*([Ww]arning|[Ee]rror))?): (.+(?:\n(?!\s*(?:[Nn]otice|[Ww]arning|[Ee]rror): )[^/<\n][^:\n][^/\n].+)*)|\s*([Nn]otice|[Ww]arning|[Ee]rr...
# -*- coding: utf-8 -*- """Classes for handling input/output prompts. Authors: * Fernando Perez * Brian Granger * Thomas Kluyver """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # Copyright (C) 2001-2007 Fernando Per...
import datetime import ephem # dnf install python3-pyephem import math import navpy import numpy as np import re # find our custom built opencv first import sys sys.path.insert(0, "/usr/local/opencv3/lib/python2.7/site-packages/") import cv2 sys.path.append('../lib') import transformations import ...
"""Utility functions for finding modules Utility functions for finding modules on sys.path. """ #----------------------------------------------------------------------------- # Copyright (c) 2011, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
from __future__ import division import numpy as np import ROOT from matplotlib import pyplot as plt def single_fit( spec, fix=list(), scales=list(), values=list(), randomize=False, nmax=100, tol=1e-2): """ Perform a single fit using TMinuit. ...
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # """ Classes for version structures. All of these types (except the abstract ones) are hashable and implement __eq__(). """ import copy import time class AbstractVersion(object): """ Ancestor class for all versions (as opposed to branches) """...
# -*- coding: utf-8 -*- """Release data for the IPython project.""" #----------------------------------------------------------------------------- # Copyright (c) 2008, IPython Development Team. # Copyright (c) 2001, Fernando Perez <fernando.perez@colorado.edu> # Copyright (c) 2001, Janko Hauser <jhauser@zscout.de>...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
## # Copyright (C) 2013 Jessica Tallon & Matt Molyneaux # # This file is part of Inboxen front-end. # # Inboxen front-end is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version...
__version__ = '0.10' from mptypes import ( mpnumeric, mpf, mpc, mpi, convert_lossless, make_mpf, make_mpc, make_mpi, mp, extraprec, extradps, workprec, workdps, eps, j, inf, nan, isnan, isinf, isint, nstr, nprint, fraction, almosteq, arange, linspace, rand, absmin, absmax ) from fun...
# encoding: utf-8 """ Extra capabilities for IPython """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2009 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this ...
from __future__ import print_function import json import sys from collections import defaultdict, OrderedDict args = sys.argv[1:] stats_dest = args.pop(0) marctype = args.pop(0) if args else 'bib' def parse_record(line, lineno=-1): tab1 = line.find('\t') try: data = line[tab1:line.index('\t', tab1 +...
#!/usr/bin/env python """ @author Luke Campbell <LCampbell@ASAScience.com> @file ion/services/dm/inventory/dataset_management_service.py @date Tue Jul 24 08:59:29 EDT 2012 @brief Dataset Management Service implementation """ from pyon.public import PRED, RT from pyon.core.exception import BadRequest, NotFound, Conflict...
from lazy import lazy from mr.awsome.common import BaseMaster, FabricMixin, yesno import getpass import logging import os import sys log = logging.getLogger('mr.awsome') class InstanceFormattingWrapper(object): def __init__(self, instance): self.instance = instance def __getattr__(self, name): ...
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response from django.http import Http404,HttpResponseRedirect from django.contrib.auth.decorators import login_required from Instanssi.ext_blog.models import BlogEntry, BlogComment from Instanssi.kompomaatti.models import Event from forms import BlogEntryF...
""" JSON serializers for Part app """ import imghdr from decimal import Decimal from django.urls import reverse_lazy from django.db import models, transaction from django.db.models import ExpressionWrapper, F, Q, Func from django.db.models import Subquery, OuterRef, FloatField from django.db.models.functions import ...
# Mrs # Copyright 2008-2011 Brigham Young University # # This file is part of Mrs. # # Mrs 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 later # versi...
""" JSON serializers for Part app """ import imghdr from decimal import Decimal import os import tablib from django.urls import reverse_lazy from django.db import models, transaction from django.db.models import Q from django.db.models.functions import Coalesce from django.utils.translation import ugettext_lazy as _ ...
# Universal Subtitles, universalsubtitles.org # # Copyright (C) 2010 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divisio...
import itertools from collections import defaultdict from cuuats.datamodel.exceptions import ObjectDoesNotExist, \ MultipleObjectsReturned from cuuats.datamodel.field_values import DeferredValue from cuuats.datamodel.domains import D class SQLCondition(object): OPERATORS = { 'contains': 'LIKE', ...
#!/usr/bin/env python from __future__ import print_function import re import os import os.path from sys import argv EXCLUDES = ['implementation', 'testbench'] BASIC_ID_REGEX = ( r'[a-z]' # a basic identifier starts with an alphabetic char r'[a-z0-9]*' # it can contain alphanumerics r'(...
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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 later version. CVXPY is distributed i...
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobilit...
#!/usr/bin/env python # -*- coding: utf-8 -*- import copy from saml2 import samlp from saml2 import NAMEID_FORMAT_EMAILADDRESS from saml2 import BINDING_HTTP_REDIRECT from saml2 import BINDING_HTTP_POST from saml2.s_utils import rndstr from saml2.saml import SCM_BEARER from saml2.saml import Condition from saml2.saml...
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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 later version. CVXPY is distributed i...
#!/opt/external_reporting/flask/bin/python from json import loads, dumps import MySQLdb as mysql from boto3 import client import os from datetime import datetime from matplotlib import pyplot, figure import numpy as np from sys import exit def write_json(JSON,file,indent=True): if indent: string = dumps...
import smtplib import socket from django.conf import settings from govuk_utils.email import TemplateAttachmentEmail from .models import CourtEmailPlea, CourtEmailCount def send_plea_email(context_data, plea_email_to=settings.PLEA_EMAIL_TO): """ Sends a plea email. All addresses, content etc. are defined in ...
""" squash_tweets.py USAGE: squash_tweets.py [-h] [--delete] path Squash multiple jsons into one positional arguments: path path to directory containing tweet jsons. Needs trailing "/" optional arguments: -h, --help show this help message and exit --delete delete old JSONs after squashing """ impo...
import codecs from subprocess import call import os from collections import defaultdict from marmot.features.feature_extractor import FeatureExtractor from marmot.util.ngram_window_extractor import extract_window, left_context, right_context from marmot.experiment.import_utils import mk_tmp_dir # Class that extracts...
""" Tools for managing a Cyanite cluster. """ __version_info__ = ('0', '0', '13') __version__ = '.'.join(__version_info__) class CyaniteException(Exception): pass
from connection import _get_db import pprint import pymongo import pymongo.code import pymongo.dbref import pymongo.objectid import re import copy import itertools __all__ = ['queryset_manager', 'Q', 'InvalidQueryError', 'InvalidCollectionError', 'DO_NOTHING', 'NULLIFY', 'CASCADE', 'DENY'] # The maximum ...
import docker import io import json import os import re import tarfile import time from hashlib import sha256 from jinja2 import Template from pathlib import Path from subprocess import check_output from subprocess import CalledProcessError from pip._internal.network.session import PipSession from pip._internal.req im...
# Copyright 2008-2012 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2011 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2009 Nokia Siemens Networks Oyj # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
from __future__ import absolute_import, unicode_literals import json import redis import urllib from mock import patch, Mock from smartmin.tests import SmartminTest from temba_client import __version__ as client_version from temba_client.client import TembaClient from temba_client.types import Geometry, Boundary fro...
# Copyright 2008-2011 Nokia Siemens Networks Oyj # # 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...
suite = { "mxversion" : "5.35.2", "name" : "sulong", "imports" : { "suites" : [ { "name" : "graal-core", "version" : "e8656a2a6674f662ba2568e10327c55153d61f12", "urls" : [ {"url" : "https://github.com/graalvm/graal-core", "kind" : "git"}, ...
from collections import OrderedDict import os import random from . import corpusdir from .article_class import Article from .transformations import filename_to_doi, doi_to_path class Corpus(): """A collection of PLOS articles.""" def __init__(self, directory=corpusdir, plos_network=False, extension='.xml')...
"""Operations governing the creation and destruction of user facing alerts.""" import binascii import boto3 import datetime import json import logging import os import requests from boto3.dynamodb.conditions import Attr from faker import Faker fake = Faker() logger = logging.getLogger(__name__) class Feedback(obj...
"""Operations governing the creation and destruction of user facing alerts.""" import binascii import boto3 import datetime import json import logging import os import requests from boto3.dynamodb.conditions import Attr from faker import Faker fake = Faker() logger = logging.getLogger(__name__) class Feedback(obj...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Laurent Mignon # Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pub...
"""Sampling selection module The module has one main class called *SampleSelection* which provides a number of random selection methodsand associated probability of selection. All the samping techniques implemented in this modules are discussed in the following reference book: Cochran, W.G. (1977) [#c1977]_, Kish, L...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
""" Predict whether a company supports a cause based on its web presence. We train a model based on the data at milliondollarlist.org, which posts donations of $1M or more from companies to causes.""" # FIXME: remove company names from web text to make this generalize. import argparse from collections import default...
from itertools import count from collections import Iterator from math import ceil from toolz import merge, accumulate, merge_sorted import toolz from operator import getitem, setitem import pandas as pd import numpy as np from .. import threaded from ..optimize import cull from .core import DataFrame, Series, get, _F...
# -*- coding: utf-8 -*- import warnings import hashlib import json import jsonschema import six import pandas as pd from .schema import core, channels, mixins, Undefined, SCHEMA_URL from .data import data_transformers, pipe from ... import utils, expr from .display import renderers, VEGALITE_VERSION, VEGAEMBED_VERS...
#!/bin/python # -*- coding: UTF-8 -*- ## Copyright (C) 2009-2012 Assem Chelli <assem.ch [at] gmail.com> ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Public License as published by ## the Free Software Foundation, either versio...
from django.contrib import admin from .forms import BaseForm from .models import ( Concept, ConceptGraph, Lesson, ConceptLink, UnitLesson, Unit, Response, StudentError, Course, CourseUnit, Role ) MODELS = ( Concept, ConceptGraph, Lesson, ConceptLink, Un...
import time import paho.mqtt.client as mqtt class MQTTException(Exception): def __init__(self, message, value): super().__init__(message) self.value = value class BaseClient(): # initialize client def __init__(self, broker, stdout, ...
""" Django settings for mysite project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # HEROKU PRODUCTION import os BASE_DIR = os.path.dirname(os.path.dirname...
#!/usr/bin/python # # Copyright (c) SAS Institute 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...
# -*- coding: utf-8 -*- # # Poio Tools for Linguists # # Copyright (C) 2009-2013 Poio Project # Author: António Lopes <alopes@cidles.eu> # URL: <http://media.cidles.eu/poio/> # For license information, see LICENSE.TXT """This module contains classes to access excel data. """ from __future__ import absolute_import i...
#!/usr/bin/env python3 import logging from collections import defaultdict from errno import ENOENT from stat import S_IFDIR, S_IFLNK, S_IFREG, S_ISDIR, S_ISREG from sys import argv, exit from time import time, sleep from fuse import FUSE, FuseOSError, Operations, LoggingMixIn import socket import sys import select im...
import boto from amslib.core.manager import BaseManager import pprint pp = pprint.PrettyPrinter(indent=4) class Route53Manager(BaseManager): def __get_boto_conn(self): if 'rout53' not in self.boto_conns: self.boto_conns["route53"] = boto.connect_route53(aws_access_key_id=self.settings.AWS_ACC...
class ECG_Class(object): """This class treats a file containing ECG data as an object It has many associated methods that process and display this data""" def __init__(self, filename, avemins=1,outName="None",lowerThresh=60,upperThresh=100): from load_data import load_data from HRinst imp...
""" Django settings for mysite project. Generated by 'django-admin startproject' using Django 1.11. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os im...
from viz import terminal from viz.text import format_float from viz.stats import normalize import numpy as np def format_number_line(cells, left, right, margin=0): return '%s[%s]%s' % ( format_float(left, margin).rjust(margin), u''.join(cells), format_float(right, margin).ljust(margin)) ...
import copy import json from contextlib import contextmanager from django import forms from django.conf import settings from django.core.serializers.json import DjangoJSONEncoder from django.db.models import Model, QuerySet, TextField from django.forms import BaseModelFormSet from django.utils import translation from ...
from django.conf.urls import * urlpatterns = patterns('analisis.analisis.views', url(r'^$', 'inicio', name="inicio"), #url(r'^salidas/$', 'post', name='salidas'), url(r'^salida1/$', 'salida1', name='salida1'), url(r'^salida2/$', 'salida2', name='salida2'), url(r'^salida3/$', 'salida3', name='salida3')...