text
stringlengths
12
6.59M
from django.contrib.auth.decorators import login_required from core.models import * from django.shortcuts import render_to_response, redirect from django.template import Context, loader, RequestContext from core.services import watch_services from core.services.mail_services import notify_admin def feedback(request): ...
from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template from userprofile.views import * from django.conf import settings urlpatterns = patterns('', # Private profile url(r'^profile/$', overview, name='profile_overview'), url(r'^profile/edit/location/$', location,...
# Copyright (C) 2009-2014, Quentin "mefyl" Hocquet # # This software is provided "as is" without warranty of any kind, # either expressed or implied, including but not limited to the # implied warranties of fitness for a particular purpose. # # See the LICENSE file for more information. _OS = __import__('os') import a...
# Copyright (C) 2009-2013, Quentin "mefyl" Hocquet # # This software is provided "as is" without warranty of any kind, # either expressed or implied, including but not limited to the # implied warranties of fitness for a particular purpose. # # See the LICENSE file for more information. _OS = __import__('os') import a...
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel # # License: BSD Style. """Utilities to build dense feature vectors from text documents""" from operator import itemgetter import re import unicodedata import numpy as np from ...base import BaseEstimator ENGLISH_STOP_WORDS = set([ "a...
""" Vector Autoregression (VAR) processes References ---------- Lutkepohl (2005) New Introduction to Multiple Time Series Analysis """ from __future__ import division from collections import defaultdict from cStringIO import StringIO import numpy as np import numpy.linalg as npl import numpy.ma as ma from numpy.lin...
""" Vector Autoregression (VAR) processes References ---------- Lutkepohl (2005) New Introduction to Multiple Time Series Analysis """ from __future__ import division from collections import defaultdict from cStringIO import StringIO import numpy as np import numpy.linalg as npl from numpy.linalg import cholesky as...
import logging from base64 import b64encode from datetime import date from flask import url_for from flask_login import current_user from scout.constants import ( ACMG_COMPLETE_MAP, ACMG_CRITERIA, ACMG_MAP, ACMG_OPTIONS, CANCER_SPECIFIC_VARIANT_DISMISS_OPTIONS, CANCER_TIER_OPTIONS, CLINVAR...
from PIL import Image from base64 import b64encode import datetime import logging import mimetypes import os.path import xlrd # http://www.lexicon.net/sjmachin/xlrd.html logger = logging.getLogger('encoded') logger.setLevel(logging.WARNING) #doesn't work to shut off sqla INFO TYPE_URL = { # TODO This has appears...
from django.core.management.base import BaseCommand from django.utils import timezone from tykurllog.models import IrcNetwork, LoggedUrl import asyncio, irc3, random, yurl class Command(BaseCommand): args = 'none' help = 'Run IRC bots' def handle(self, *args, **options): ### get asyncio loop ...
import re import math from pyramid.view import view_config from snovault import ( AbstractCollection, TYPES, ) from snovault.elasticsearch import ELASTIC_SEARCH from snovault.resource_views import collection_view_listing_db from elasticsearch.helpers import scan from elasticsearch_dsl import Search from pyramid...
import re import math from pyramid.view import view_config from snovault import ( AbstractCollection, TYPES, ) from snovault.elasticsearch import ELASTIC_SEARCH from snovault.resource_views import collection_view_listing_db from snovault.fourfront_utils import get_jsonld_types_from_collection_type from elastics...
# # 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 us...
# # 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 us...
############################################################################ ## ## Copyright (C) 2006-2007 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundat...
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
from vlcp.scripts.script import ScriptModule from vlcp.server.module import depend, callAPI from vlcp.service.kvdb import objectdb from vlcp.utils.networkmodel import PhysicalNetworkMap, PhysicalNetworkSet @depend(objectdb.ObjectDB) class RepairPhyMapDB(ScriptModule): """ before version 317b31130794650a9392e...
# -*- coding: utf-8 -*- """ MCLevel interfaces Sample usage: import mclevel # Call mclevel.fromFile to identify and open any of these four file formats: # # Classic levels - gzipped serialized java objects. Returns an instance of MCJavalevel # Indev levels - gzipped NBT data in a single file. Returns an MCIndevLev...
# -*- coding: utf-8 -*- # Copyright (c) 2015, MIT Probabilistic Computing Project # # 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...
#! /usr/bin/env python3 # Mcmahon pairing for MGA tournament import unittest import yaml class Player(object): def __init__(self, name, rank, aga_id, mm_score): self.name = name self.rank = rank self.aga_id = aga_id self.mm_score = mm_score def __repr__(self): retu...
#!/usr/bin/env python2.7 import socket, struct, time, sys, traceback from Queue import Queue from threading import Thread, RLock from binascii import hexlify import mcpackets, nbt, hooks, items, commands class FowardingBuffer(): def __init__(self, insocket, outsocket, *args, **kwargs): self.inbuff = insocket.makef...
""" megacli is an abstraction layer to the IBM MegaCli utility. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WARNING: Some methods are destructive and do NOT prompt for confirmation before executing. Understand what you are doing before you call instance methods. ~~~~~~~~~~~~~~~~~~~~~...
from collections import MutableMapping import sqlite3, pickle, os, functools, inspect class PersistentDict(MutableMapping): ''' From https://stackoverflow.com/questions/9320463/persistent-memoization-in-python ''' def __init__(self, dbpath, iterable=None, **kwargs): self.dbpath = os.path.j...
# -*- coding: utf-8 -*- """This module contains the parser/generators (or coders/encoders if you prefer) for the classes/datatypes that are used in iCalendar: ########################################################################### # This module defines these property value data types and property parameters 4.2 D...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import platform from . import parser, tools __version__ = "0.19" Log = tools.minimal_logger(__name__) #: Module instance properties, can be mocked for testing distro = platform.system() def get_parser_class(): """ Returns the pars...
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-09-24 13:48 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('shuup', '0060_supplier_deleted'), ] operations = [ ...
#!/usr/bin/env python #Copyright (C) 2011 by Benedict Paten (benedictpaten@gmail.com) # #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 rig...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/python """ Santa repeatedly sleeps until wakened by either all of his nine reindeer, back from their holidays, or by a group of three of his ten elves. If awakened by the reindeer he harnesses each of them to his sleigh, delivers toys with them and finally unharnesses them (...
"""Manage, delete, order compute instances.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers from SoftLayer.CLI import template from SoftLaye...
""" This experiment instruments the parent if any given SCoP and prints the reason why the parent is not part of the SCoP. """ import glob import logging import os from plumbum import local import benchbuild.experiment as exp import benchbuild.extensions as ext import benchbuild.experiments.polyjit as pj from benchbu...
""" SoftLayer.ticket ~~~~~~~~~~~~~~~~ Ticket Manager/helpers :license: MIT, see LICENSE for more details. """ from SoftLayer import utils class TicketManager(utils.IdentifierMixin, object): """Manages SoftLayer support tickets. See product information here: http://www.softlayer.com/support ...
''' ==================================================================== Copyright (c) 2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ===========================================================...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Django from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse # AWX from awx.main.fields import ImplicitRoleField from awx.main.cons...
# general settings #conf.interval = 10 #conf.threads = None # ==> use the number of sources conf.set_loglevel("INFO") conf.add_logfile("/var/log/dashboard/dash.log", "WARNING") # defaultss conf.defaults["snmp port"] = 161 conf.defaults["snmp version"] = 2 conf.defaults["snmp community"] = "public" conf.defaults["dat...
#!/usr/bin/env python2 import json import dbutil class JSONData: def __init__(self, filename): self.filename = filename print "Loading data" self.loadJSONData() print "Loading Columns" self.loadColumns() print "Loading rows" self.loadRows() # Returns JSO...
from billing.integration import Integration from django.conf import settings from boto.fps.connection import FPSConnection from django.conf.urls.defaults import patterns from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import req...
# # Boot Manager support # # Mark Huang <mlhuang@cs.princeton.edu> # Copyright (C) 2007 The Trustees of Princeton University # # $Id$ # from PLC.Faults import * from PLC.Debug import log from PLC.Messages import Message, Messages from PLC.Persons import Person, Persons from PLC.Sites import Site, Sites from PLC.sendma...
from sqlalchemy import func, and_, or_ from datetime import datetime from flask import Blueprint, request, make_response, render_template, flash, g, session, redirect, url_for, jsonify, abort, current_app from flask.ext.babel import gettext from dataviva import db from dataviva.attrs.models import Bra, Wld from datavi...
class ListCompresnsion(object): def __init__(self, a, b): """ this function takes in list length and step(difference between consecutive values and process a list) """ self.a = a self.b = b self.my_list =[] """ processing a list """ ...
bind = 'unix://${prefix}/var/run/${sites}.socket' workers = 3 # environment raw_env = ["HOME=${prefix}/var/lib/pywps", "PYWPS_CFG=${prefix}/etc/pywps/${sites}.cfg", "PATH=${bin_dir}:${prefix}/bin:/usr/bin:/bin:/usr/local/bin", ] ...
import collections try: import unittest2 as unittest except ImportError: import unittest # NOQA import base64 import six import webtest from daybed.backends.exceptions import UserAlreadyExist class BaseWebTest(unittest.TestCase): """Base Web Test to test your cornice service. It setups the databas...
#!/usr/bin/python # 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 app...
from datetime import datetime import re import json class DateTimeEncoder(json.JSONEncoder): """ custom datetime encoder for json output. """ def default(self, obj): if isinstance(obj, datetime): return obj.isoformat() return json.JSONEncoder.default(self, obj) class LogLine(objec...
!#/bin/python3 import csv import fractions #read in file data to memory def fileto_memory(): data = [] with open('rawdata.csv', 'r') as file: reader = csv.reader(file, delimiter=',') for row in reader: data += row # data in row appears as: # timestamp, then # data, then...
#!/usr/bin/env python3 ''' Pipelign.py A python based program to align virus sequences. The program takes as input a single FASTA formatted file Returns a FASTA formatted alignment file Different flavours are present: - GNU Parallel for Linux and MacOS - Joblib for Linux, MacO...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('organizations', '0001_initial'), ('geo', '0001_initial'), ) def forwards(self, orm): # Adding mod...
"""Celery Tasks for the FOIA application""" from celery.signals import task_failure from celery.schedules import crontab from celery.task import periodic_task, task from django.core import management from django.core.files.base import ContentFile from django.core.mail import send_mail from django.template.loader impor...
################################################################################ # # MRC FGU Computational Genomics Group # # $Id$ # # Copyright (C) 2009 Andreas Heger # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publish...
"""Celery Tasks for the FOIA application""" from celery.signals import task_failure from celery.schedules import crontab from celery.task import periodic_task, task from django.contrib.auth.models import User from django.core.mail import send_mail from django.template.defaultfilters import slugify from django.template...
import numpy as np import time import subprocess import zbar import cv2 from PIL import Image from PIL import ImageEnhance import cv2 import math from threading import Thread import bot.lib.lib as lib from bot.hardware.qr_code import QRCode from bot.hardware.complex_hardware.QRCode2 import QRCode2 from bot.hardware...
import sys import matplotlib.pyplot as plt import numpy import HelperFunctions if __name__ == "__main__": fileList = [] tellurics = False normalize = False byorder = False # Plots one order at a time pixelscale = False oneplot = False errors = False for arg in sys.argv[1:]: ...
from __future__ import unicode_literals import gc import importlib import logging import sys import ipdb from django.contrib.contenttypes.models import ContentType from addons.wiki.models import NodeWikiPage from django.apps import apps from django.contrib.contenttypes.fields import GenericForeignKey from django.cor...
## # Copyright (c) 2008-2010 Sprymix Inc. # All rights reserved. # # See LICENSE for details. ## import py import re from semantix.utils.debug import highlight from semantix.utils import markup def format_code_context(lines, lineno, window_size=4, colorize=False): lines = list(lines) result = [] star...
from batch_iv_analysis.batch_iv_analysis_UI import Ui_batch_iv_analysis from batch_iv_analysis.prefs_UI import Ui_prefs # for performance tuning #import cProfile, pstats, io #pr = cProfile.Profile() # needed for file watching import time #TODO: make area editable from collections import OrderedDict from io import ...
## # Copyright (c) 2016 MagicStack Inc. # All rights reserved. # # See LICENSE for details. ## import re from edgedb.lang.common.datastructures import xvalue from edgedb.lang.common import lexer from .keywords import edge_schema_keywords __all__ = ('EdgeSchemaLexer', 'EdgeIndentationError') class EdgeIndentatio...
# -*- coding: utf-8 -*- # MIT license # # Copyright (C) 2017 by XESS Corp. # # 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...
"""Renderer za XHTML dokumente koji sadrže samo liste. Kolokvij 2. veljače 2015. (Puljić)""" from pj import * class T(TipoviTokena): HTML, HEAD, BODY = '<html>', '<head>', '<body>' ZHTML, ZHEAD, ZBODY = '</html>', '</head>', '</body>' OL,ZOL,UL,ZUL,LI,ZLI = '<ol>','</ol>','<ul>','</ul>','<li>','</li>' ...
from behave import step @step(u'the home directory is "{dir}"') def home_directory(context, dir): import os os.environ['HOME'] = dir assert os.path.isdir(dir), "Home directory exists" @step(u'I run "{command}"') def run_command(context, command): assert False @step(u'I see "{text}"') def i_see_tex...
from mysite.base.tests import make_twill_url, TwillTests import mysite.base.unicode_sanity import mysite.account.tests from mysite.profile.models import Person import mysite.profile.models import mysite.search.controllers from mysite.search.models import Project, Bug, HitCountCache, \ ProjectInvolvementQuestio...
import requests from slackbot.bot import respond_to from db import Session from beproudbot.plugins.redmine_models import RedmineUser, ProjectRoom HELP = ''' ''' @respond_to('^#(\d+)') @respond_to('^t(\d+)') def show_ticket_information(message, ticket_id): """現在の水の在庫本数を返すコマンド :param message: slackbotの各種パラ...
""" This class encapsulates the interactions with the SWS Enrollment resource. """ import logging from myuw.logger.timer import Timer from myuw.logger.logback import log_resp_time, log_exception, log_info from datetime import date from uw_sws.enrollment import enrollment_search_by_regid from myuw.dao.pws import get_re...
import os import sys sys.path.append('..') import subprocess from ovf2vtk import __version__ as version from ovf2vtk import winovf2vtk_new as nwin nwin.__doc__ = bytearray(nwin.__doc__) """all the tests developed for the winovf2vtk.py script for ovf2vtk stored in one place. By Harry Wilson. Last updated 15/04/16"...
"""Beautiful and helpful exceptions Just `import better_exceptions` somewhere. It handles the rest. Name: better_exceptions Author: Josh Junon Email: josh@junon.me URL: github.com/qix-/better-exceptions License: Copyright (c) 2017 Josh Junon, licensed under the MIT license """ from __future__ import absol...
TASTYPIE_ABSTRACT_APIKEY = True SRID = { 'default': 4326, # WGS84, stored in database 'projected': 900913, # for Spatialite distance calculation } # Fill the fields below for facebook auth to work SOCIAL_AUTH_FACEBOOK_KEY = NotImplemented SOCIAL_AUTH_FACEBOOK_SECRET = NotImplemented POSTGIS_TEMPLATE = 'tem...
from django.test import Client from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model import datetime from core.tests.base import BaseTestCase from profiles.utils import set_expiration_date class ProfileViewTestCase(BaseTestCase): def setUp(self): super(ProfileViewTe...
from sklearn.naive_bayes import GaussianNB import numpy as nu import sys from sklearn import cross_validation as cv from sklearn import metrics class naiveBayes: gnb = None x = [] y = [] labels = [] def __init__(self,filename): self.gnb = GaussianNB() with open(filename) as f: for line in f: if line[0]>...
import threading, time from .. import log class BaseAnimation(object): def __init__(self, led): self._led = led self.thread_strategy = led.thread_strategy self.thread_strategy.set_animation(self) self.animComplete = False self._step = 0 self._timeRef = 0 s...
from django.test import TestCase from django.test.utils import override_settings from django_dynamic_fixture import N, G from mock import patch from entity_event import context_loader from entity_event import models from entity_event.tests import models as test_models class TestGetDefaultRenderingStyle(TestCase): ...
# -*- coding: utf-8 -*- ''' This module implements :class:`BaseSignal`, an array of signals. This is a parent class from which all signal objects inherit: :class:`AnalogSignal` and :class:`IrregularlySampledSignal` :class:`BaseSignal` inherits from :class:`quantities.Quantity`, which inherits from :class:`numpy.ar...
from envisionpy.utils.exceptions import * import inviwopy.glm as glm import h5py import numpy as np from .AtomPositions import AtomPositions from .PartialChargeDensity import PartialChargeDensity from .ChargeDensity import ChargeDensity from .ELFVolume import ELFVolume from .FermiSurface import FermiSurface from .Bands...
# -*- coding: utf-8 -*- """ This module defines :class:`DataObject`, the abstract base class used by all :module:`neo.core` classes that can contain data (i.e. are not container classes). It contains basic functionality that is shared among all those data objects. """ import copy import warnings import quantities as ...
# -*- coding: utf-8 -*- """ Reading and writing from KlustaKwik-format files. Ref: http://klusters.sourceforge.net/UserManual/data-files.html Supported : Read, Write Author : Chris Rodgers TODO: * When reading, put the Unit into the RCG, RC hierarchy * When writing, figure out how to get group and cluster if those a...
# -*- coding: utf-8 -*- """ ========================================================== File: WakaTime.py Description: Automatic time tracking for Sublime Text 2 and 3. Maintainer: WakaTime <support@wakatime.com> License: BSD, see LICENSE for more details. Website: https://wakatime.com/ =================...
import cPickle import json import logging import logging.handlers import os import platform import re import shutil import socket import struct import subprocess import sys import time import urllib import psutil from buildtools import * from buildtools import os_utils from buildtools.bt_logging import IndentLogger fr...
import time from django.test import TestCase from .decorators import enable class AfterResponseTest(TestCase): def test_execution(self): self.executed = 0 @enable def func(val): if val: self.executed += 1 self.assertEqual(self.executed, 0) se...
import unittest import os import databaseservice class DatabaseServiceTest(unittest.TestCase): def setUp(self): self.database_file = 'test.db' with open('schema.sql') as schema: databaseservice.initialize_database(self.database_file, schema) self.database_cursor = \ databaseservice.connect_...
from django.db import transaction from django.utils.translation import ugettext_lazy as _ from rest_framework.serializers import ValidationError from waldur_mastermind.marketplace import processors from waldur_mastermind.marketplace import models as marketplace_models from .utils import TimePeriod, is_interval_in_sch...
from decimal import Decimal from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.postgres.fields import JSONField as BetterJSONField from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.core.validators import MaxValueValidator, MinValueValida...
# -*- coding: utf-8 -*- # Copyright (c) 2013 Conwet Lab., Universidad Politécnica de Madrid # This file is part of Wirecluod. # Wirecloud 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 ...
# -*- coding: utf-8 -*- # Copyright 2011-2012 Universidad Politécnica de Madrid # This file is part of Wirecluod. # Wirecloud 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,...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
""" Sphinx plugins for Django documentation. """ import json import os import re from sphinx import addnodes, __version__ as sphinx_ver from sphinx.builders.html import StandaloneHTMLBuilder from sphinx.writers.html import SmartyPantsHTMLTranslator from sphinx.util.console import bold from sphinx.util.compat import Di...
""" Example generation for the scikit learn Generate the rst files for the examples by iterating over the python example files. Files that generate images should start with 'plot' """ from time import time import os import re import shutil import traceback import glob import sys from StringIO import StringIO import ...
""" Tests for discrete models Notes ----- DECIMAL_3 is used because it seems that there is a loss of precision in the Stata *.dta -> *.csv output, NOT the estimator for the Poisson tests. """ import os import numpy as np from numpy.testing import * from statsmodels.discrete.discrete_model import (Logit, Probit, MNLogi...
""" Tests for discrete models Notes ----- DECIMAL_3 is used because it seems that there is a loss of precision in the Stata *.dta -> *.csv output, NOT the estimator for the Poisson tests. """ # pylint: disable-msg=E1101 import os import numpy as np from numpy.testing import (assert_, assert_raises, assert_almost_equa...
# -*- coding: utf-8 -*- # Copyright 2017 Eficent Business and IT Consulting Services S.L. # (http://www.eficent.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT from datetime import datetime, ti...
# Copyright 2020 Matt Taylor # Copyright 2016-17 Eficent Business and IT Consulting Services S.L. # (http://www.eficent.com) # Copyright 2016 Serpent Consulting Services Pvt. Ltd. # (<http://www.serpentcs.com>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Inventory Rev...
from majorityredis import (MajorityRedis, retry_condition) from majorityredis.exceptions import Timeout import redis import threading import random import os import sys import signal import time from stolos import get_NS from stolos import argparse_shared as at from stolos import util from stolos import log import sto...
from ..base import StoredMessagesBackend from ..exceptions import MessageTypeNotSupported, MessageDoesNotExist from ...models import Inbox, Message, MessageArchive from django.db import models from django.contrib.contenttypes.models import ContentType class DefaultBackend(StoredMessagesBackend): """ """ d...
# $Id$ # Copyright (C) 1998-2003 Michael Haggerty <mhagger@alum.mit.edu> # # This file is licensed under the GNU Lesser General Public License # (LGPL). See LICENSE.txt for details. """_Gnuplot.py -- An object that represents a running gnuplot process. This file implements the Gnuplot plotter object, which is an ab...
""" Point defects ============= Identify point defects in the lattice by comparison to a reference lattice... """ import numpy as np from . import base from . import _defects from . import acnaFilter from .. import clusters from ...algebra import vectors class PointDefectsFilterSettings(base.BaseSettings): ""...
import SCons.Builder import SCons.Errors import SCons.Scanner import SCons.Script import SCons.Util import os import subprocess as subp from itertools import izip # TODO: write tests _ad_valid_backends = frozenset(( "docbook45", "docbook", "xhtml11", "html", "html4", "html5", "slidy", ...
"""SConsProject The SConsProject module proposes a way to easily create the compilation system of your project with the minimum of information. It's an helper around SCons. """ from SCons.Environment import * from SCons.Script import * import sys from time import * import atexit import os import socket import strin...
import os, requests, validation, config from flask import Flask, redirect, request, render_template, send_from_directory, escape from flask_mail import Mail, Message app = Flask (__name__) app.config.from_object(config.BaseConfig) mail = Mail(app) version = "2.1.1" @app.route("/") def index(): return render_temp...
import time, math import numpy as np def resample(ts, values, num_samples=None): """Convert a list of times and a list of values to evenly spaced samples with linear interpolation""" if num_samples == None: num_samples = math.ceil((ts[-1] - ts[0]) / guess_period(ts)) * 2 ts = normalize(ts) ret...
# -*- coding: utf-8 -*- # A SCons tool to simplify pkg-config usage on SCons # # Copyright (c) 2015 Naranjo Manuel Francisco < naranjo dot manuel at gmail dot 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 ...
## Copyright (c) 2009-2011, Florian Finkernagel. 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 li...
#! /usr/bin/env python """WSDL parsing services package for Web Services for Python.""" ident = "$Id$" import WSDLTools import XMLname from logging import getLogger as _getLogger import logging.config as _config LOGGING = 'logging.txt' DEBUG = True # # If LOGGING configuration file is not found, turn off logging # ...