text
stringlengths
12
6.59M
from django.conf import settings from django.conf.urls import patterns, include, url from ratelimitbackend import admin from django.conf.urls.static import static import django.contrib.auth.views from microsite_configuration import microsite import auth_exchange.views # Uncomment the next two lines to enable the admi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # libsubmit documentation build configuration file, created by # sphinx-quickstart on Mon Oct 2 13:39:42 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # ...
""" URLs for LMS """ from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic.base import RedirectView from ratelimitbackend import admin from django.conf.urls.static import static from microsite_configuration import microsite import auth_exchange.views from conf...
# -*- coding: utf-8 -*- # Configuration file for the Sphinx documentation builder. # -- Path setup -------------------------------------------------------------- # Set up import path to allow the autodoc extension to find the local module code. import os import sys sys.path.insert(0, os.path.abspath('..')) # -- Pro...
""" URLs for LMS """ from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib.admin import autodiscover as django_autodiscover from django.utils.translation import ugettext_lazy as _ from django.views.generic import TemplateView from djan...
# -*- coding: utf-8 -*- # # open-data-etl-tool-kit documentation build configuration file, created by # sphinx-quickstart on Tue Sep 23 23:41:13 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenera...
# -*- coding: utf-8 -*- import sys import os # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. sys.path.append(os.path.join(os.pardir, 'tests')) import kombu # noqa from django.conf import...
# -*- coding: utf-8 -*- # # Confire documentation build configuration file, created by # sphinx-quickstart on Sun Jul 20 13:23:44 2014. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
# -*- coding: utf-8 -*- # # pylinkwrapper documentation build configuration file, created by # sphinx-quickstart on Tue Oct 20 11:24:52 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Blender NIF Scripts documentation build configuration file, created by # sphinx-quickstart on Sat Jul 23 19:47:06 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import errno import os import subprocess import sys # Append src directory to path so that autodoc can find the python module sys.path.append("src") extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', '...
# -*- coding: utf-8 -*- # # Argyle documentation build configuration file, created by # sphinx-quickstart on Mon Oct 10 20:14:48 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default; value...
# -*- coding: utf-8 -*- # # Oraide documentation build configuration file, created by # sphinx-quickstart on Sat Jun 8 14:30:41 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
# -*- coding: utf-8 -*- # # JuliaFEM documentation build configuration file, created by # sphinx-quickstart on Fri Jul 3 22:25:04 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
# -*- coding: utf-8 -*- # # Flask-Perm documentation build configuration file, created by # sphinx-quickstart on Thu Jan 28 17:29:15 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
# -*- coding: utf-8 -*- # # probablepeople documentation build configuration file, created by # sphinx-quickstart on Mon Mar 16 16:19:31 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
# -*- coding: utf-8 -*- # # Kafka Connect JDBC documentation build configuration file, created by # sphinx-quickstart on Wed Dec 17 14:17:15 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
# -*- coding: utf-8 -*- # # . documentation build configuration file, created by # sphinx-quickstart on Fri Jan 8 15:13:53 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All con...
# -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals from datetime import datetime from recommonmark.parser import CommonMarkParser extensions = ['sphinx_js'] js_source_path = '../provider' primary_domain = 'js' templates_path = ['templates', '_templates', '.templates'] source_s...
# -*- coding: utf-8 -*- # # Silo documentation build configuration file, created by # sphinx-quickstart on Thu Aug 16 19:55:05 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Sphinx configuration.""" from __future__ import print_function import os # -- G...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst # # Astropy documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this file. # # All configurati...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pyActLearn documentation build configuration file, created by # sphinx-quickstart on Mon Nov 14 10:34:33 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/stable/config # -- Path setup ------------------------------------------------------------...
# -*- coding: utf-8 -*- # # Swift documentation build configuration file. # # This file is execfile()d with the current directory set to its containing # dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commen...
# -*- coding: utf-8 -*- # # PyEnchant documentation build configuration file, created by # sphinx-quickstart on Thu Apr 28 20:41:16 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
# -*- coding: utf-8 -*- # # Read the Docs Template documentation build configuration file, created by # sphinx-quickstart on Tue Aug 26 14:19:49 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenera...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ssbio documentation build configuration file, created by # sphinx-quickstart on Mon Oct 10 16:46:45 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
# -*- coding: utf-8 -*- # # pymicro documentation build configuration file, created by # sphinx-quickstart on Tue Oct 22 11:17:23 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
# -*- coding: utf-8 -*- # # City Energy Analyst documentation build configuration file, created by # sphinx-quickstart on Tue Jan 31 15:57:58 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
# -*- coding: utf-8 -*- # # world_engine documentation build configuration file, created by # sphinx-quickstart on Thu Aug 20 03:27:07 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # -- Hack for ...
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable (module imports are okay, they're removed automatically). # # All configuration values have a default; value...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.coverage', 'sphinx.ext.doctest', 'sphinx.ext.extlinks', 'sphinx.ext.ifconfig', 'sphinx.ext.napoleon', 'sphinx.ext.todo', 'sphinx.ext....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import setuptools_scm extensions = [ 'sphinx.ext.autodoc', 'rst.linker', ] # General information about the project. project = 'pytest-runner' copyright = '2015,2016 Jason R. Coombs' # The short X.Y version. version = setuptools_scm.get_version(root='..', relati...
# -*- coding: utf-8 -*- # # Flask-RESTful documentation build configuration file, created by # sphinx-quickstart on Fri Sep 28 15:16:53 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
# encoding: utf-8 """Mopidy documentation build configuration file""" from __future__ import unicode_literals import os import sys # -- Read The Docs configuration ---------------------------------------------- RTD_NEW_THEME = True # -- Workarounds to have autodoc generate API docs ---------------------------- ...
# -*- coding: utf-8 -*- # # Should-DSL documentation build configuration file, created by # sphinx-quickstart on Wed Jun 23 10:10:24 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
# -*- coding: utf-8 -*- """ developer convenience functions for ibs TODO: need to split up into sub modules: consistency_checks feasibility_fixes move the export stuff to dbio python -m utool.util_inspect check_module_usage --pat="ibsfuncs.py" then there are also convineience functions that need ...
# -*- coding: utf-8 -*- import os import sys import sphinx_rtd_theme from pingparsing import __author__, __copyright__, __name__, __version__ sys.path.insert(0, os.path.abspath('../pingparsing')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sp...
from mpi4py import MPI from cuttsum.misc import enum tags = enum("READY", "DONE", "STOP", "ADD_JOB", "WORKER_START", "WORKER_STOP") def start_manager(jobs): comm = MPI.COMM_WORLD #.Accept(port, info, 0) status = MPI.Status() # get MPI status object #info = MPI.INFO_NULL #port = MPI.Open_port(info) ...
# -*- coding: utf-8 -*- """ Dependencies: flask, tornado SeeAlso: routes.turk_identification """ from __future__ import absolute_import, division, print_function, unicode_literals from ibeis.control import accessor_decors, controller_inject from ibeis.algo.hots import pipeline from flask import url_for, request, c...
#! /usr/bin/env python3 # Requires Python 3.6+ # pylint: disable=invalid-name """Configuration of Sphinx documentation generator.""" extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.extlinks', 'sphinx.ext.intersphinx', 'jaraco.packaging.sphinx', 'sphinx_tabs.tabs', 'scm_tag_titles_ext', ] mast...
from django.shortcuts import render from rest_framework import status, generics from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.pagination import LimitOffsetPagination from django.contrib.auth.models import AnonymousUser from django.contrib.auth import get...
import sys import struct import socket from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4.QtNetwork import * from proto.grSim_Packet_pb2 import grSim_Packet from proto.grSim_Commands_pb2 import grSim_Commands, grSim_Robot_Command #This can act as a template for later. udpsocket = socket.socket(socket.AF...
#!/usr/local/bin/python3 """ This is a utility script to help set up some accounts for testing and development. It create a registered, manager and root account for every country currently under active development. NOTE: the passwords for every account is just 'password'. Run: `local_db.py --clear` (To get rid of ...
import sys import itertools import os import argparse import re import datetime import requests import json # Do not download files over 100 MB by default ATTACHMENT_BYTE_LIMIT = 100000000 ATTACHMENT_REQUEST_TIMEOUT = 30 # 30 seconds FILE_NAME_MAX_LENGTH = 100 FILTERS = ['open', 'all'] API = 'https://api.trello.com/...
# -*- coding: utf-8 -*- # # arcs-gsi documentation build configuration file, created by # sphinx-quickstart on Fri Jul 3 10:23:35 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickle...
# coding=utf-8 import sys import os import misc import warnings from PyQt4 import QtGui, QtCore from Queue import Queue from OpenSSL import SSL from twisted.python import log from twisted.internet import ssl from twisted.internet.ssl import ClientContextFactory from twisted.internet.protocol import ReconnectingClie...
''' Create a SCP side-channel to transfer a file to remote network device. SCP requires a separate SSH connection. Currently only supports Cisco IOS. ''' from __future__ import print_function from __future__ import unicode_literals import re import os import hashlib import paramiko import scp class SCPConn(objec...
# -*- coding: utf-8 -*- # Built-in # Common import numpy as nip import scipy.sparse as scpsp # tofu from . import _inversions_checks # ############################################################################# # ############################################################################# # ...
import os.path as op import io import tempfile from functools import wraps from flask import Flask, render_template, send_file, request, redirect, url_for, Response, jsonify from werkzeug.exceptions import NotFound from PIL import Image from werkzeug.utils import secure_filename from flask.ext.restful import Api, Reso...
#!/usr/bin/env python __author__ = 'Brian K. Jones (bkjones@gmail.com)' __credits__ = ["Doug Hellmann", "Kent Johnson"] __version__ = 0.91 __license__ = "BSD" __maintainer__ = "Brian K. Jones" __email__ = "bkjones@gmail.com" # stdlib imports import cgi import operator import re import sys import time import urlparse i...
"""Sensor to monitor incoming/outgoing phone calls on a Fritz!Box router.""" from __future__ import annotations from datetime import datetime, timedelta import logging import queue from threading import Event as ThreadingEvent, Thread from time import sleep from fritzconnection.core.fritzmonitor import FritzMonitor i...
from __future__ import absolute_import import __init__ import wx, threading, re, subprocess, sys, os from wx.lib import buttons from gui import machineCom from gui import icon from util import profile from util import gcodeInterpreter printWindowMonitorHandle = None def printFile(filename): global pr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # tracer documentation build configuration file, created by # sphinx-quickstart on Sat Dec 10 17:00:10 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # aut...
from __future__ import unicode_literals import collections import datetime import hashlib import itertools import os.path import re import time from . import ( commands, helper, sheet, student, sendmail, ) Submission = collections.namedtuple( 'Submission', ['id', 'sheet_id', 'student_id',...
# -*- coding: utf-8 -*- # # File: models/account_move_line.py # Module: l10n_ch_hr_payroll # # Created by cyp@open-net.ch # # Copyright (c) 2015-TODAY Open-Net Ltd. ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-...
# coding=utf-8 """ Factories using factory boy. Using a silly module name as I don't want to mix the old and new implementations of factories, but I do want to allow importing both from the same place. In 2020, when all tests use the new factory-boy factories, we can rename this module to factories.py and drop the ol...
#!/usr/bin/env python import numpy as np from distance_matrix import DistanceMatrix from scipy.cluster.hierarchy import linkage, fcluster, dendrogram try: from Bio.Cluster import kmedoids Biopython_Unavailable = False except ImportError: print "Biopython unavailable - kmedoids clustering disabled" Biop...
# -*- coding: utf-8 -*- import datetime from xml.etree import ElementTree import urllib import json TITLE = 'Sarpurinn' PREFIX = '/video/sarpurinn' ART = 'art-default.jpg' ICON = 'icon-default.png' STREAM_URL = 'http://smooth.ruv.cache.is/' INFO_URL = "http://ruv.is/sarpurinn" SARP_STOR_DAYS = 31 def S...
from framework.log import log class Project(): def __init__(self, db, projectId): self.id = projectId self.db = db self.data = self.populateProjectData() def populateProjectData(self): sql = """ select p.project_id ,p.title ,p.description ,p.keywords ,p...
""" MachineCom handles communication with GCode based printers trough (USB) serial ports. For actual printing of objects this module is used from Cura.serialCommunication and ran in a separate process. """ __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License" import os import gl...
# -*- coding: utf-8 -*- # # google-cloud-bigtable documentation build configuration file # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values ...
from rest_framework import exceptions, serializers from core.models import ApplicationVersion, ProviderMachine, Group, BootScript, Provider, License, Instance, MachineRequest, Identity, AtmosphereUser as User, IdentityMembership from core.models.status_type import StatusType from api.v2.serializers.summaries import ( ...
#!/usr/bin/env python import os import sys import keystoneclient.v2_0.client as ksclient import neutronclient.v2_0.client as nclient def usage(): print "listorphans.py <object> where object is one or more of", print "'networks', 'routers', 'subnets', 'floatingips' or 'all'" def get_credentials(): d = {} ...
import sys import atomset import glob import numpy as np import os import blockNames from sklearn.cluster import AffinityPropagation class Clusters: def __init__(self): self.clusters = [] def addCluster(self, cluster): self.clusters.append(cluster) def printClusters(self, verbose=False): ...
class NaiveSolution(object): @staticmethod def merge_two(left, right): nums3 = [] idx_left = 0 idx_right = 0 while idx_left < len(left) or idx_right < len(right): if idx_right == len(right): nums3.append(left[idx_left]) idx_left += 1 ...
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from mock import Mock from mock import patch from diamond.collector import Collector from jsoncommon import JSONCommonCollector ####...
''' Created on Feb 26, 2011 @author: Shreyas Joshi @contact: shreyasj@gatech.edu ''' import numpy as np import pandas as pa import os import re import pickle as pkl import time import datetime as dt import dircache class Exchange (object): AMEX=1 NYSE=2 NYSE_ARCA=3 OTC=4 DELISTED=5 NASDAQ=6 ...
""" The plugin module contains information about the plugins found for Cura. It keeps track of a list of installed plugins and the information contained within. """ __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License" import os import sys import traceback import platform import...
# -*- coding: utf-8 -*- # # napi documentation build configuration file, created by # sphinx-quickstart on Wed Oct 30 16:51:31 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
load("@io_bazel_rules_go//go:def.bzl", _go_test="go_test") def go_test(name, library=None, **kwargs): """This macro wraps the go_test rule provided by the Bazel Go rules to silence a deprecation warning for use of the "library" attribute. It is otherwise equivalent in function to a go_test. """ if not librar...
#!/usr/bin/env python # -*- coding: utf-8 -*- """An authenticator that doesn't rely on any existing server program, but instead creates its own ephemeral TCP listener on the specified port in order to respond to incoming DVSNI challenges from the certificate authority.""" import zope.interface import zope.component f...
# HDHR Viewer V2 v0.9.16 import time import string from datetime import datetime import urllib import os from lxml import etree DEBUGMODE = True TITLE = 'HDHR Viewer 2 (0.9.16)' PREFIX = '/video/hdhrv2' VERSION = '0.9.16' #GRAPHICS ART ...
""" This module is for scriptCtx based tools """ import maya.cmds as cmds import maya.mel import mGui.runtimeCommands as rtc from mGui.scriptJobs import SelectionChanged from mGui.events import Event class ToolEvent(Event): REGISTRY = {} @classmethod def create(cls, name, *args, **kwargs): cls....
import traci import numpy as np from pandas import Panel from VariableDictionary import VariableDictionary class DataBuffer(): ''' Buffers to hold simulation data ''' def __init__(self, buffer_length, domain=None attributes=None, dumpfile=None, id_update_frequency=None): self.domai...
# # Cython Top Level # import os, sys, re, codecs if sys.version_info[:2] < (2, 3): sys.stderr.write("Sorry, Cython requires Python 2.3 or later\n") sys.exit(1) try: set except NameError: # Python 2.3 from sets import Set as set from time import time import Code import Errors import Parsing imp...
#! /usr/bin/env python3 from __future__ import print_function import json import os import glob import sys import argparse import string class QueryInfo: pass def tokenize(text): """Strip punctuation from free text sentences and split into tokens.""" table = {ord(punc): None for punc in string.punctuati...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Flask-Swag documentation build configuration file, created by # sphinx-quickstart on Tue Feb 2 14:19:01 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
### class InvalidArgumentsError(ValueError): """InvalidArgumentsError - The driver arguments are invalid or inconsistent.""" class MissingArgumentError(ValueError): """MissingArgumentError - An option required an argument but none was given.""" ### class Option(object): """Option - Root option ...
#import configuration gpkg to postgis #pages query for page in result: #prepare poly file for clip polyfile = os.path.join(datadir,'roi.poly') cmd = 'ogr2ogr -where "map_id={map_id}" ' cmd = cmd.format(map_id=page['map_id']) print cmd os.system(cmd) cmd = 'ogr2poly.py' cmd =...
import hashlib, base64, urllib2 TITLE = 'MYTF1' ART = 'art-default.jpg' ICON = 'icon-default.png' PREFIX = '/video/mytf1' BASE_URL = 'http://www.tf1.fr' PROGRAMS = '%s/programmes-tv' % BASE_URL VIDEOS = '%s/%s/videos' RE_MEDIA_ID = Regex('www.wat.tv/embedframe/(?P<media_id>[^"]+)"') ################################...
"""Module for conducting standard macroecological plots and analyses""" from __future__ import division import numpy as np import matplotlib.pyplot as plt import colorsys def get_rad_from_cdf(cdf, S): """Return a predicted rank-abundance distribution from a theoretical CDF Keyword arguments: cdf -- a...
from armstrong.utils.backends import GenericBackend from django.db import models from django.template import Template try: from django.utils.text import slugify except ImportError: from django.template.defaultfilters import slugify from . import utils class NamedSlugMixin(object): @property def slug...
# # Cython Top Level # import os, sys, re, codecs if sys.version_info[:2] < (2, 3): sys.stderr.write("Sorry, Cython requires Python 2.3 or later\n") sys.exit(1) try: set except NameError: # Python 2.3 from sets import Set as set from time import time import Code import Errors import Parsing imp...
import re import unicodedata RE_NUMERICAL_SUFFIX = re.compile(r'^[\w-]*-(\d+)+$') from gitmodel import fields, models class FilterMixin(object): @classmethod def filter(cls, **fields): items = list(cls.all()) for field, value in fields.items(): if hasattr(cls, field): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # pymoskito documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # a...
# nhlib: A New Hazard Library # Copyright (C) 2012 GEM 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, or (at your option) any later versio...
from itertools import cycle def detect(time_series, threshold): """ take in a series of time and power readings and return a list of events :param time_series: a generator created by the retrieve_within_filters function contains dates and power readings :param threshold: the threshold value for event detec...
#!/usr/bin/python ABOUT="""\ Mailpile.py a tool Copyright 2011, Bjarni R. Einarsson for searching and <http://bre.klaki.net/> organizing piles of e-mail This program is free software: you can redistribute it and/or modify it under the terms of the ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from tempfile import mkdtemp gettext = lambda s: s HELPER_SETTINGS = { 'NOSE_ARGS': [ '-s', ], 'ROOT_URLCONF': 'tests.test_utils.urls', 'INSTALLED_APPS': [ 'admin_enhancer', 'filer', 'parler', 'taggit', ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Tangelo Web Framework documentation build configuration file, created by # sphinx-quickstart on Thu Apr 11 11:42:23 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present ...
import sys, re import os def main(): os.chdir("..") os.system("python setup.py sdist") os.system("python setup.py bdist --formats=msi") os.system("python25 setup.py bdist --formats=msi") os.system("python setup.py bdist --formats=wininst") print(""" Remember (before runnin...
# -*- coding: utf-8 -*- # Copyright 2015 Google 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 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 CERN. # # Invenio 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 2 of the # License, or (at your option) any...
import sys, os, string import vtkCommonCorePython def vtkLoadPythonTkWidgets(interp): """vtkLoadPythonTkWidgets(interp) -- load vtk-tk widget extensions This is a mess of mixed python and tcl code that searches for the shared object file that contains the python-vtk-tk widgets. Both the python path a...