code
stringlengths
1
199k
from django.contrib import admin from ds.models import DService from ds.models import Action class DServiceAdmin(admin.ModelAdmin): list_display = ('DS_Type', 'DS_TiersDemandeur', 'DS_Sujet', 'statut') list_filter = ('DS_Type', 'DS_TiersDemandeur', 'DS_Sujet', 'statut') search_fields = ['DS_Type', 'DS_TiersDemandeur...
""" Hash scheduler pins resources to specific servers and connections. Stress test. Can't track server connections here, but real HTTP servers and clients are used. """ import sys from helpers import tempesta from testers import stress __author__ = 'Tempesta Technologies, Inc.' __copyright__ = 'Copyright (C) 2017 Tempe...
import time import bugzilla URL = "bugzilla.stage.redhat.com" bzapi = bugzilla.Bugzilla(URL) if not bzapi.logged_in: print("This example requires cached login credentials for %s" % URL) bzapi.interactive_login() bug = bzapi.getbug(427301) print("Bug id=%s original summary=%s" % (bug.id, bug.summary)) update = b...
import sys sys.path.append('../cypher_interface') from py2neo_cypher_interface import * from timeit import default_timer as timer def benchmark_collaborative(): userID_list = get_userID_list() total_time_taken = 0 for row in userID_list: userID = row[0] #print userID start = timer() ...
""" Freevo video module for MPlayer """ import logging logger = logging.getLogger("freevo.video.plugins.mplayer") import os, re import threading import popen2 import kaa.metadata as mmpython import config # Configuration handler. reads config file. import util # Various utilities import childapp # Handle ch...
import RPi.GPIO as GPIO import time from time import sleep import glob # only required for DS18B20 routines class DMS_PiLCD: LCD_RS = 20 # pin 38 LCD_E = 19 # pin 35 LCD_D4 = 16 # pin 36 LCD_D5 = 13 # pin 33 LCD_D6 = 12 # pin 32 LCD_D7 = 6 # pin 31 LCD_LEDR = 18 # pin 12 LCD_LEDG = 22 # pin 15 LCD_LEDB = 23 ...
from time import sleep from Adafruit_CharLCDPlate import Adafruit_CharLCDPlate from RaspiCorder import Menus from RaspiCorder import Recorder sleepTime = 0.25 lcd = Adafruit_CharLCDPlate.Adafruit_CharLCDPlate() lcd.begin(16,2) lcd.clear() lcd.message(" Introducing\n RaspiCorder") sleep(2) lcd.clear() def instrumentIn...
import sys from core import constants as C from core import logs from core.autonameow import Autonameow from core.exceptions import AWAssertionError from core.view import cli from util import process as ps DEFAULT_OPTIONS = { 'debug': False, 'verbose': False, 'quiet': False, 'show_version': False, '...
class UpcomingShiftsPageLocators(object): SHIFT_JOB_PATH = '//table//tbody//tr[1]//td[1]' SHIFT_DATE_PATH = '//table//tbody//tr[1]//td[2]' SHIFT_STIME_PATH = '//table//tbody//tr[1]//td[3]' SHIFT_ETIME_PATH = '//table//tbody//tr[1]//td[4]' SHIFT_CANCEL_PATH = '//table//tbody//tr[1]//td[6]' LOG_SH...
import pytest from pylato.exceptions import SelfConsistencyError from pylato.init_job import InitJob from pylato.self_consistency import PerformSelfConsistency @pytest.mark.parametrize( ("name", "scf_max_loops", "error_type"), [ ("Zero value", 0, AssertionError), ("Negative value", -1, Assertion...
__author__ = 'shane' ''' Marlborough Blenheim, Picton 1 November First Monday after Labour Day ''' from datetime import date, timedelta from New_Zealand import Labour_day def get_holiday(year): return Labour_day.get_holiday(year) + timedelta(days=7) def get_actual(year): NOVEMBER=11 return date(year, NOVEMB...
from django.db import models, migrations import blog.models.fields class Migration(migrations.Migration): dependencies = [ ('blog', '0001_initial'), ] operations = [ migrations.AddField( model_name='article', name='slug', field=blog.models.fields.AutoSlugF...
import click import cProfile import logging.config from es.es import ES from loggingconfig import LOGGING_CONFIG @click.group() @click.option('--debug', is_flag=True) @click.pass_context def cli(ctx, debug): ctx.obj['debug'] = debug @click.command() def rankings(): click.echo('rankings') from pocket_ranking...
import os.path import logging import unittest from deltarepo.updater_common import LocalRepo, OriginRepo, DRMirror, Solver, UpdateSolver from deltarepo.errors import DeltaRepoError from .fixtures import * class LinkMock(object): """Mock object""" def __init__(self, src, dst, type="sha256", mirrorurl="mockedlink...
from domainer import console from domainer.database import Database from domainer import checks import json import argparse parser = argparse.ArgumentParser() parser = argparse.ArgumentParser(prog="domainer", description='Domain check engine', formatter_class=argparse.RawTextHelpFormatter, ) parser.add_argu...
"""Add course type to database schema. Revision ID: e316df277b2f Revises: dc435d7f9239 Create Date: 2016-05-04 13:33:11.670160 """ revision = 'e316df277b2f' down_revision = 'dc435d7f9239' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### op...
from .spec import RPMSpec, RPMSpecError, parse_release __all__ = ["RPMSpec", "RPMSpecError", "parse_release"]
''' Created on Aug 19, 2014 @author: Grzegorz Pasieka (grz.pasieka@gmail.com) Copyright (C) 2014 Grzegorz Pasieka This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or ...
import sys import re target_file = sys.argv[1] figure_labels = ["figure", "fig"] caption = [] OUTPUT = True DEBUG = False debug_string = "DEBUG:" output_string = "" waiting_for_caption_to_end = False caption_lines = [] captions_captured = [] figure_number = "" with open(target_file) as f: for line in f: lin...
from os import fork, system, waitpid, path import sys class ProcessUpdate(): def db_islocked(self): """Check if we already have a db lock""" path_db = '/var/lib/pacman/db.lck' if path.isfile(path_db): return True def run_background(self,cmd): """ run_background(cmd) -...
import os, re from autotest_lib.client.bin import test, utils class iozone(test.test): version = 2 def initialize(self): self.job.require_gcc() # http://www.iozone.org/src/current/iozone3_283.tar def setup(self, tarball='iozone3_283.tar'): tarball = utils.unmap_url(self.bindir, tarball, ...
"""Global Plugin to provide a hotkey for unmuting and maximizing the system volume. """ import comtypes.client import winsound from winUser import VK_VOLUME_UP import globalPluginHandler class GlobalPlugin(globalPluginHandler.GlobalPlugin): def script_raiseVolume(self, gesture): shell = comtypes.client.CreateObject(...
"""Client blueprint used to handle OAuth callbacks.""" from __future__ import absolute_import from flask import Blueprint, abort, current_app, request, session, url_for from flask.ext.login import user_logged_out from itsdangerous import BadData, TimedJSONWebSignatureSerializer from werkzeug.local import LocalProxy fro...
import urllib2 from datetime import datetime def upload_vhi_data_by_region_id(id): url="http://www.star.nesdis.noaa.gov/smcd/emb/vci/gvix/G04/ts_L1/ByProvince/Mean/L1_Mean_UKR.R"+str(id).zfill(2)+".txt" vhi_url = urllib2.urlopen(url) out = open('uploads/vhi_id_'+str(id)+'_'+datetime.now().strftime('%Y-%m-%d_%H:%M:%S...
from nesoni import io, bio, grace, sam, config, legion, working_directory import os, sys, subprocess @config.help("""\ Align reads to a reference using SHRiMP. Paired end reads should either be given as two files in the "pairs" section, \ or as a single interleaved file in the "inerleaved" section. To increase sensitiv...
from __future__ import absolute_import __doc__ = 'Generate distribution packages from PyPI' __docformat__ = 'restructuredtext en' __author__ = 'Sascha Peilicke <saschpe@gmx.de>' __version__ = '0.4.10' import argparse import datetime import glob import os import pickle import pprint import pwd import re import sys impor...
import urllib import urllib2 import argparse import time import os def send(api_token, recipient, subject, message): msg = "<no text>" data = { 'token': api_token, 'user': args.recipient, 'priority': 1, 'sound': 'pushover', 'title': subject, 'message': message, } url = "https://api.pushover.net/1/messag...
from gi.repository import GObject, Gtk, Pango from gourmet.plugin import RecEditorModule, RecEditorPlugin, IngredientControllerPlugin from gourmet.plugin_loader import PRE,POST from gourmet.reccard import IngredientEditorModule, RecRef from . import keyEditorPluggable from gettext import gettext as _ ING = 0 ITM = 1 KE...
""" Get power consumption values of Edimax smartplugs 2020-08-19 thsell [FEATURE-ediplugs] plugs = [ [ip, user, password] ] """ import time from libs.smartplug import SmartPlug edi_last_update = 0 edi_debug = 0 edi_data=[] def run(emparts,config): global edi_debug global edi_last_update ...
import re PATTERN_BOLD_ITALIC_UNDERLINE = "(_\\*{3}|\\*{3}_)([^<>]+)(_\\*{3}|\\*{3}_)" PATTERN_BOLD_ITALIC = "(\\*{3})([^<>]+)(\\*{3})" PATTERN_BOLD_UNDERLINE = "(_\\*{2}|\\*{2}_)([^<>]+)(_\\*{2}|\\*{2}_)" PATTERN_ITALIC_UNDERLINE = "(_\\*{1}|\\*{1}_)([^<>]+)(_\\*{1}|\\*{1}_)" PATTERN_BOLD ...
import re import urlparse from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class UpleaCom(XFSHoster): __name__ = "UpleaCom" __type__ = "hoster" __version__ = "0.13" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?uplea\.com/dl/\w{15}' __description__ = """...
""" Module defining Gaussian process kernels for k2sc. Copyright (C) 2016 Suzanne Aigrain This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at y...
import os.path import sys from etl import ETL class Connector_File(ETL): def __init__(self, verbose=False, quiet=True): ETL.__init__(self, verbose=verbose) self.quiet = quiet self.set_configdefaults() self.read_configfiles() def set_configdefaults(self): # # Stand...
from __future__ import unicode_literals import django.utils.timezone from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('CTFmanager', '0007_auto_20160206_1957'), ] operations = [ migrations.AddField( model_name='event', n...
from ast import literal_eval from .linacAttr import LinacAttr from .LinacFeatures import Memorised from PyTango import AttrQuality from time import time __author__ = "Lothar Krause and Sergi Blanch-Torne" __maintainer__ = "Sergi Blanch-Torne" __copyright__ = "Copyright 2015, CELLS / ALBA Synchrotron" __license__ = "GPL...
from django.conf import settings from django.utils import timezone, translation from pootle.core.constants import CACHE_TIMEOUT from pootle_language.models import Language from pootle_project.models import Project local_now = timezone.localtime(timezone.now()) TZ_OFFSET = local_now.utcoffset().total_seconds() def _get_...
SQL = ( ("fond","""select SQL_CALC_FOUND_ROWS KOD as FOND_ID, FKOD,FNAME, A1,A6,A7,A9 FROM `af3_fond` where FKOD like '%%%(q)s%%' order by FKOD limit %(offset)d,%(limit)d;"""), ("achiv", "SELECT SQL_CALC_FOUND_ROWS ANAME,L1,L2,L3 FROM ARHIV limit 1;"), ) FOUND_ROWS = True ROOT = "list_fonds" ROOT_PREFIX = None ...
from os import path, mkdir from ConfigParser import ConfigParser import random import string from werkzeug import Local, LocalManager from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker ROOT_DIR = path.join(path.dirname(__file__), '..') local = Local() local_manager = LocalManag...
import Image import numpy import Quartz import Quartz.CoreGraphics as CG import objc from .base import ScreenManagerBase class ScreenManager(ScreenManagerBase): def __init__(self): super(ScreenManager, self).__init__() def grab_desktop(self, return_type=0): """ grab desktop screenshot. ...
from time import sleep from core.models.resources.http import HttpResource class WikipediaAPI(HttpResource): CONFIG_NAMESPACE = 'wikipedia' HEADERS = { "Content-Type": "application/json; charset=utf-8" } PARAMETERS = { "maxlag": "5", "format": "json", "continue": "" }...
"""Install password cracker John The Ripper This is based on http://pka.engr.ccny.cuny.edu/~jmao/node/26 Must be run as root or with sudo: sudo python install_password_cracker.py To run the cracker do sudo /usr/local/jrt/john /etc/shadow and sudo /usr/local/jrt/john --show /etc/shadow Modify /usr/local/jrt/john.conf to...
(S'90e66160c68288d2f864ee42c2e40256' p1 (ihappydoclib.parseinfo.moduleinfo ModuleInfo p2 (dp3 S'_namespaces' p4 ((dp5 (dp6 tp7 sS'_import_info' p8 (ihappydoclib.parseinfo.imports ImportInfo p9 (dp10 S'_named_imports' p11 (dp12 sS'_straight_imports' p13 (lp14 S'_pysssr' p15 asbsS'_filename' p16 S'../python/frowns/extens...
''' Duplicate blendshapes of the selected object and shift copies along X axis. Blendshapes should be keyed on an every frame and a timeline fit all keys. ''' import maya.cmds as cmds import sys def check_selection(): selection = cmds.ls(selection=True) if len(selection) > 1: sys.exit('more than one obj...
""" mmgen-addrimport: Import addresses into a MMGen coin daemon tracking wallet """ import time from .common import * from .addrlist import AddrList,KeyAddrList from .tw.common import TwLabel ai_msgs = lambda k: { 'rescan': """ WARNING: You've chosen the '--rescan' option. Rescanning the blockchain is necessary only ...
import subprocess import os import shutil import re import functools import stat def call_with_cache(func): @functools.wraps(func) def inner(*args): self = args[0] path = args[1] overlay_path = path+".empty" mount_path = path+".mount" work_path = path+".work" prin...
''' Created on 13.02.2017 @author: Paul ''' import sqlite3 import os import time from datetime import date import datetime from eezz.table import TDbTable from eezz.service import TBlackBoard from optparse import OptionParser class TChart(TDbTable): def __init__(self): self.mBlackboard = TB...
class TaskStatusCode(): """Task returned status code.""" SUCCESS = 1 ERROR = 2 ERROR_CP_APN0 = 3
import requests from bs4 import BeautifulSoup import re import funciones_bot import unittest import funciones_top20 class TestsBotTelegram(unittest.TestCase): def test_url(self): self.assertEqual(funciones_bot.buscadorJuegos('juego prueba test'), -1) self.assertEqual(funciones_bot.buscadorSeries('se...
from __future__ import print_function from keras.models import Sequential from keras.layers.core import Flatten, Dense, Dropout from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D from keras.optimizers import SGD import numpy as np def VGG_16(weights_path=None): model = Sequential() ...
import sys import gobject import pyatspi import dbus import dbus.service import dbus.mainloop import dbus.glib import logging from trackers import MousePositionTracker import settings BUS_NAME = "mousetracker.Daemon" dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) _log = logging.getLogger("mousetracker") _handler...
import struct class LZS11(object): def __init__(self): self.magic = 0x11 self.decomp_size = 0 self.curr_size = 0 self.compressed = True self.outdata = [] def Decompress11LZS(self , filein): offset = 0 # check that file is < 2GB assert len(filein) < ( 0x4000 * 0x4000 * 2 ) self.magic = struct.unpack(...
"""Converts an assembly program to an ElmGen java class. Usage: spn2java my_awesome_effect.spn MyAwesomeEffect.java """ import os import re import sys def strip_spaces(line): return ' '.join([x for x in re.split('[ \t \r\n]+', line) if x]) def output(code, class_name='MyEffect', source=None): yield 'import org.andr...
import tmdbsimple as tmdb from configparser import SafeConfigParser parser = SafeConfigParser() parser.read('config.ini') tmdb.API_KEY = parser.get('TMDb API Key','key') class Movie(): """ This class provides a way to store movie related information. Utilizes the tmdbsimple library, a wrapper for The Movie ...
""" This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ...
from django.conf.urls import url from simplemooc.core.views import * urlpatterns = [ url(r'^$', home, name='home'), url(r'^contato/$', contact, name='contact'), ]
from l5r.exporters.fdfexporter import * from l5r.exporters.npc import *
__author__="jim" __date__ ="$Jan 18, 2011 1:36:37 PM$" import procgame import locale from procgame import * base_path = config.value_for_key_path('base_path') game_path = base_path+"games/indyjones/" speech_path = game_path +"speech/" sound_path = game_path +"sound/" music_path = game_path +"music/" class Extra_Ball(ga...
from typing import Set, Optional from unrpa.versions.version import Version class UnRPAError(Exception): """Any error specific to unrpa.""" def __init__(self, message: str, cmd_line_help: Optional[str] = None): self.message = message self.cmd_line_help = cmd_line_help super().__init__(me...
from Hime import * from Hime import version as __version__ from collections import OrderedDict import datetime import json import os class VicProj(object): def __init__(self, proj_name="", proj_path="", create_proj=False): self.global_params = OrderedDict() self.proj_params = OrderedDict() g...
import smbus import time import math from LSM9DS0 import * import datetime bus = smbus.SMBus(1) RAD_TO_DEG = 57.29578 M_PI = 3.14159265358979323846 G_GAIN = 0.070 # [deg/s/LSB] If you change the dps for gyro, you need to update this value accordingly LP = 0.041 # Loop period = 41ms. This needs to match the time...
import config import logging import sys import os from logging.handlers import WatchedFileHandler def initialize_logging(name="unknown"): """Initializes the logging module. This initializes pythons logging module: * set loglevel (from nodes config) * set logfile * define new loglevel BAN...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('joins', '0004_join_ref_id'), ] operations = [ migrations.AlterUniqueTogether( name='join', unique_together=set([('email', 'ref_id')]), ...
from __future__ import unicode_literals import django.db.models.deletion from django.conf import settings from django.db import migrations, models from django.db.models.fields import GenericIPAddressField as IPAddressField import wiki.plugins.attachments.models class Migration(migrations.Migration): dependencies = ...
from __future__ import (absolute_import, division, print_function) import unittest from mantid.py3compat import mock from sans.algorithm_detail.centre_finder_new import centre_finder_new, centre_finder_mass from sans.common.enums import (SANSDataType, FindDirectionEnum, DetectorType) class CentreFinderNewTest(unittest....
""" Command design pattern implementation for cleaning """ import os import types import FileUtilities from sqlite3 import DatabaseError from Common import _ if 'nt' == os.name: import Windows else: from General import WindowsError def whitelist(path): """Return information that this file was whitelisted"""...
__author__ = 'romus' mapFunction = """ function map() { // В качестве глобольного параметра используется: // q - выражение с запросом [[слово1, слово2], [слово3, ...], ...], // type_q - тип поискового запроса - 0 - логический запрос, 1 - точный запрос, 2 - неточный запрос ...
from credentials import account_sid, auth_token, my_cell, my_twilio from flask import Flask, request, redirect from twilio.twiml.messaging_response import MessagingResponse import json, urllib from urllib.parse import urlencode import googlemaps import re app = Flask(__name__) @app.route("/sms", methods = ['GET', 'POST...
import pickle import sys import numpy as np from Polynomial import Polynomial ''' Creates our data creates and returns an array of data sets ''' def create_data(num_data_sets, max_degree): array_of_data_sets = np.ndarray((num_data_sets), dtype=np.object) for i in range(num_data_sets): array_of_data_sets...
from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x04\xa6\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x0f\x08\x06\x00\x00\x00\xfe\xa4\x0f\xdb\ \x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\ \x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x...
""" PySideを使ったスピード測定 """ import sys import os import time from PySide.QtGui import * from PySide.QtCore import * import numpy as np from lib.basedMainWindow import BasedMainWindow from figpyqtgraphs import FigWave, FigSpectrum, FigSpectrogram from microphonerecorder import MicrophoneRecorder class YourMainWindow(BasedM...
import os from setuptools import setup, find_packages with open("requirements.txt") as f: required = [l for l in f.read().splitlines() if not l.startswith("#")] setup( name = "Miracle Crafter Client", version = open("VERSION_NUMBER").read().strip(), author = "The Miracle Crafter Team", author_email ...
""" A generalised module to provide phase or the EField through a "Line Of Sight" Line of Sight Object ==================== The module contains a 'lineOfSight' object, which calculates the resulting phase or complex amplitude from propogating through the atmosphere in a given direction. This can be done using either ge...
"""set default encoding format""" from __future__ import print_function from __future__ import absolute_import from future.standard_library import install_aliases install_aliases() import apt import os import sys def exception(): """runs everytime an exception is caught""" print("Enter a valid language. For hel...
import numpy as np class AllData: def generate_data(): data_tr = np.random.rand(1000,2) data_val = np.random.rand(100,2) l_tr = np.zeros([1000,3]) l_val = np.zeros([100,3]) def sample_class(sample) : if (sample[0]*sample[0]+sample[1]*sample[1])<0.9: ...
import math import unittest from PySpice.Unit.Units import * class TestUnits(unittest.TestCase): ############################################## def __init__(self, method_name): super().__init__(method_name) ############################################## def _test_canonise(self, unit, string): ...
from __future__ import print_function from __future__ import division from __future__ import absolute_import from __future__ import unicode_literals from blueman.Constants import * from blueman.Functions import dprint from blueman.Sdp import * from gi.repository import Gtk class ManagerToolbar: def __init__(self, b...
__author__ = "William Batista Aguiar Motta" __email__ = "william.b.motta@aluno.unb.br" __license__ = "GPL" from subprocess import call call('git add *') call('git commit -m"Updates."') call('git push')
"""Module functions for converting object to EML """ import os import cherrypy from lmpy import Matrix from LmCommon.common.lm_xml import Element, SubElement, tostring from LmCommon.common.lmconstants import LMFormat, MatrixType from LmServer.base.layer import Raster, Vector from LmServer.legion.env_layer import EnvLay...
""" """ import re class Statement(object): """ This is a superclass for all types of OpenSesame statements It provides a get, append and debug print method """ def __init__(self, os_type, parameters, keywords=None, has_extra_attributes=False): """ Initialize this statement ...
from Tkinter import * class Text_Widget: def __init__(self, fNums=0): self.txtTracer_W = self.textVar.trace_variable('w', self.textPoll) self.txtTracer_R = self.textVar.trace_variable('r', self.textPoll) self.wrapTracer_W = self.wrapVar.trace_variable('w', self.wrapPoll) #se...
"""Pyplis introduction script 5 - Optical flow Farneback liveview using webcam. Create an OpticalFlowFarneback object and activate live view (requires webcam) """ from __future__ import (absolute_import, division) from SETTINGS import check_version import pyplis check_version() flow = pyplis.plumespeed.OptflowFarneback...
game = "" fichier = [] countX = 0 nb = 0 posOld=" " posMem=" " nbCol = 0 nbMem = 0 fLine = True def nbLine(): global nbCol, nbMem for k in fichier: global fLine nbCol+=1 if k=="\n" and fLine==True: nbMem = nbCol fLine=False def Move(nbdep): global nb, posMem, nb...
import shutil import fife import pychan import pychan.widgets as widgets from pychan.tools import callbackWithArguments as cbwa from scripts.filebrowser import FileBrowser from scripts.context_menu import ContextMenu from scripts import inventory from scripts.popups import ExaminePopup, ContainerGUI from scripts.dialog...
import sys if sys.version_info < (2, 5): print "Sorry, requires Python 2.5, 2.6 or 2.7." sys.exit(1) try: import Cheetah if Cheetah.Version[0] != '2': raise ValueError except ValueError: print "Sorry, requires Python module Cheetah 2.1.0 or newer." sys.exit(1) except: print "The Pyth...
from datetime import datetime, timedelta import uuid from django.conf import settings from django.contrib.auth.models import User from django.core.mail import EmailMultiAlternatives from django.shortcuts import get_object_or_404 from django.template.loader import render_to_string from django.template.defaultfilters imp...
""" Specialization of the AlienFxController class for the M14XR1 controller. This module provides the following classes: AlienFXControllerM14XR1 : M14XR1 controller """ import alienfx.core.controller as alienfx_controller class AlienFXControllerM14XR1(alienfx_controller.AlienFXController): """ Specialization of the...
""" .. currentmodule:: pygmin.optimize Optimizers (`pygmin.optimize`) ================================ This module contains all of the optimizers available in pygmin. There are so many available for testing purposes and because sometimes different optimizers are more appropriate in different circumstances. These opti...
from setuptools import setup, find_packages setup( name="schoolsoftapi", version="0.4.0.dev1", packages=find_packages(), install_requires=['requests', 'xlrd'], description="SchooSoft API", long_description=open('README.rst').read(), author="William Wu", author_email="william@pylabs.org",...
from flask import Blueprint, Response, render_template, request, redirect, send_from_directory, jsonify from functools import wraps from collections import defaultdict from datetime import datetime from . import rpcutils as rpc from . import core, monitor, slogging, backbone, seednodes, network_utils, feed_publish from...
import pygame from sys import stderr from sc8pr import Renderable, Image, Graphic, BaseSprite from sc8pr._cs import _lrbt, makeCS from sc8pr.shape.locus import locus, Locus as _Locus from sc8pr.util import rgba, rangef from sc8pr.geom import rotatedSize, transform2dGen from sc8pr.text import Text from sc8pr.plot.regres...
""" This module implements the backends for ArX. """ __docformat__ = 'reStructuredText' from vcpx.repository import Repository from vcpx.shwrap import ExternalCommand from vcpx.target import SynchronizableTargetWorkingDir, TargetInitializationFailure from vcpx.source import ChangesetApplicationFailure class ArxReposito...
""" Parse a Ruby file and retrieve classes, modules, methods and attributes. Parse enough of a Ruby file to recognize class, module and method definitions and to find out the superclasses of a class as well as its attributes. It is based on the Python class browser found in this package. """ from __future__ import unic...
from intelligence import chat_bot_reply print "Talk to Me:" while True: user_input = raw_input("\n[Your Reply]: ") print chat_bot_reply(user_input)
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': 'community', 'metadata_version': '1.1'} DOCUMENTATION = ''' --- module: fortios_system_replacemsg_utm short_description: Replacement ...
from django.core.urlresolvers import reverse from django.utils import unittest from django.contrib.auth.models import User from django.test.client import Client class AuthPagesTestCase(unittest.TestCase): def setUp(self): """ Initialize client to make get and post requests and create one user ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'AreaConfiguration.manual_value' db.delete_column('lizard_esf_areaconfiguration', 'manual_value') def backwards(se...
from .order import Order
<<<<<<< master ''' Created on 14.10.2016 @author: jvanderwoerd ''' from traits.api import \ Float, HasTraits, Property, cached_property, Int, \ Instance, Array import numpy as np from oricreate.api import MappingTask from oricreate.api import YoshimuraCPFactory, \ fix, link, r_, s_, t_, MapToSurface,\ G...
import logging import os import shlex import apsw from dataclasses import dataclass import mir.cp from animanager.anidb import TitleSearcher from animanager.cmd.results import AIDParseError, AIDResults, AIDResultsManager from animanager.cmdlib import CmdExit from animanager import commands from animanager.db import cac...
from ._entity import Entity class User(Entity): ''' :ivar str login: User login on |github|. :ivar str name: User name on |github|. :ivar str email: Primary email address on |github|. :ivar str gravatar_id: Avatar ID. :ivar bool is_syncing: Whether or not ...