text
stringlengths
12
6.59M
#!/usr/bin/env python # -*- coding: utf-8 -*- import gc import unittest from llist import SLList from llist import SLListNode from llist import DLList from llist import DLListNode gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_STATS) class testSLList(unittest.TestCase): def testSll_append_left(self): ll ...
#!/usr/bin/env python # Syminfo.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. # # 13th June 2006 # # A handler singleton for the information in the CCP4 symmetry library # syminfo.lib. # import...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2015, GEM Foundation # OpenQuake 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 Licen...
# Highly Optimized Object-Oriented Molecular Dynamics (HOOMD) Open # Source Software License # Copyright (c) 2008 Ames Laboratory Iowa State University # All rights reserved. # Redistribution and use of HOOMD, in source and binary forms, with or # without modification, are permitted, provided that the following # cond...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2014, GEM Foundation. # # OpenQuake 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 Lice...
# -*- coding: utf-8 -*- """ Tests for the page module. """ # # (C) Pywikipedia bot team, 2008 # # Distributed under the terms of the MIT license. # __version__ = '$Id$' import unittest import pywikibot import pywikibot.page site = pywikibot.Site('en', 'wikipedia') mainpage = pywikibot.Page(pywikibot.page.Link("Main...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' ===================================================================================== Copyright (c) 2016-2019 Université de Lorraine or Luleå tekniska universitet Author: Luca Di Stasio <luca.distasio@gmail.com> <luca.distasio@ingpec.eu> Redistribu...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2013, GEM Foundation. # # OpenQuake 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 Lice...
#!/usr/bin/env python ### # Copyright (c) 2002-2004, Tamer Fahmy <tamer@tammura.at> # 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 co...
""" This script generates both the decoder and the multiplexing tables used for opcode disassembly. """ import argparse import os import re import logging from ARMv7DecodingSpec import instructions DEBUG = False def instruction_decoder_name(instruction): """ Given an instruction with the format specified in ...
from machinery.ci_task import CiTask siconos_default = CiTask( ci_config='default', distrib='ubuntu:14.04', pkgs=['build-base', 'gcc', 'gfortran', 'gnu-c++', 'atlas-lapack']) siconos_default_profiling = siconos_default.copy()( build_configuration='Profiling') siconos_debian_latest = siconos_default.c...
""" Django settings for ed_reviews project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2013, GEM Foundation. # # OpenQuake 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 Lice...
import datetime import os import re from peewee import * from playhouse.reflection import * from .base import IS_SQLITE_OLD from .base import ModelTestCase from .base import TestModel from .base import db from .base import requires_sqlite from .base import skip_if from .base_models import Tweet from .base_models impo...
""" Module for reading out CO2Meter USB devices via a hidraw device under Linux """ import sys import fcntl import threading import weakref CO2METER_CO2 = 0x50 CO2METER_TEMP = 0x42 CO2METER_HUM = 0x41 HIDIOCSFEATURE_9 = 0xC0094806 def _co2_worker(weak_self): """ Worker thread that constantly reads from the u...
import csv import json from StringIO import StringIO from .. import ControllerTestCase, url, helpers as h from openspending.model import Dataset, Source, meta as db class TestEditorController(ControllerTestCase): def setup(self): h.skip_if_stubbed_solr() super(TestEditorController, self).setup()...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import sys try: import urllib.parse as urllib_parse except ImportError: import urllib as urllib_parse from . import appmanager from . import util setup_module, teardown_module = appmanager.setup(('app', 8380)) class Re...
import unittest import numpy as np from op_test import OpTest class TestAccuracyOp(OpTest): def setUp(self): self.op_type = "accuracy" n = 8192 infer = np.random.random((n, 1)).astype("float32") indices = np.random.randint(0, 2, (n, 1)) label = np.random.randint(0, 2, (n, 1...
r""" Metadata template objects (:mod: `qiita_db.metadata_template) ============================================================= ..currentmodule:: qiita_db.metadata_template This module provides the MetadataTemplate base class and the subclasses SampleTemplate and PrepTemplate. Classes ------- ..autosummary:: :...
''' Channels is where we store information for mapping virtual (qubit) channel to real channels. Created on Jan 19, 2012 Original Author: Colm Ryan Copyright 2013 Raytheon BBN Technologies Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License...
# Import smorgasbord from __future__ import print_function import pdb import sys import os import copy import dill import re import gc from difflib import SequenceMatcher import multiprocessing as mp import numpy as np import scipy.stats import scipy.interpolate import scipy.optimize import scipy.ndimage import pandas ...
# Import smorgasbord from __future__ import print_function import pdb import sys import os import copy import dill import re import gc import warnings warnings.filterwarnings('ignore') from difflib import SequenceMatcher import multiprocessing as mp import numpy as np import scipy.stats import scipy.interpolate import ...
import requests import os import shelve from bs4 import BeautifulSoup from bs4.element import Tag from urllib.parse import urlparse from zipfile import ZipFile from json import loads from pathlib import Path from urllib.parse import unquote from sys import stdout from MultiMC import InstanceCfg, ForgePatch from shutil...
''' Copyright 2015 OneRTeam (Edgar Kaziahmedov, Klim Kireev, Artem Yashuhin) 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 Un...
import PersistentDict import collections import copy import uuid import time class Database: KEYS = { 'manufacturerPartNumber': {'type': str, 'default': '', 'help': 'Part number specified by the manufacturer.', 'argument': '-p'}, 'manufacturerName': {'type': str, 'default': '', 'help': 'Name of th...
# -*- coding: utf-8 -*- # # Python documentation build configuration file # # 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). ...
# vim:ai:et:ff=unix:fileencoding=utf-8:sw=4:ts=4: # conveyor/src/main/python/conveyor/client/__init__.py # # conveyor - Printing dispatch engine for 3D objects and their friends. # Copyright © 2012 Matthew W. Samsonoff <matthew.samsonoff@makerbot.com> # # This program is free software: you can redistribute it and/or mo...
#!usr/bin/env python """ Version : 0.1.0 Date : 14th March 2017 Author : Pierre-Yves Lablanche Email : plablanche@aims.ac.za Affiliation : African Institute for Mathematical Sciences - South Africa Stellenbosch University - South Africa License : MIT Status : Under Development Description : Implementa...
""" Date : 13th March 2017 Author : Pierre-Yves Lablanche Affiliation : African Institute for Mathematical Sciences - South Africa Stellenbosch University - South Africa License : Status : Under Development Description : Implementation of the gcForest algorithm in python3. Uses the scikit learn syntax ....
# Name: GoldFact (/u/GoldFact) # Author: Saroekin (/u/Saroekin) # Version: Python 3.4.3 #Files or importations that are used elsewhere in program. import os import praw import time import sqlite3 from random import randint from random import choice print ("\n\nOpening database...") #SQL database setup/ignition. sql ...
# coding: utf-8 # # Copyright 2014 The Oppia Authors. 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 requi...
import signal import sys import traceback from math import floor from datetime import datetime, timedelta from bus import Bus from messages import read_messages, subscribe_to_cmd from outbound import request_sensor_data, CMD_RETURN_SENSOR_DATA, \ set_motor_speed, set_right_motor_speed, set_left_motor_speed bus = ...
from django.core.management.base import BaseCommand, CommandError from core import models as cm from django.contrib.auth.models import User, Permission import argparse import datetime import sys class Command(BaseCommand): help = """ Authorize user to administer an app usage: python manage.py authorize_...
import asyncio import wave import functools import io import numpy import psutil, os import time import scipy.signal as signal from multiprocessing import Value from threading import Thread import pygame import alsaaudio import threading from pydub import AudioSegment import common def audio_loop(wav_data, ratio, sto...
""" picture.py Author: Dina Credit: <list sources used, if any> Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. One (or more)...
""" picture.py Author: <your name here> Credit: <list sources used, if any> Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. O...
""" picture.py Author: <your name here> Credit: <list sources used, if any> Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. O...
""" picture.py Author: <your name here> Credit: <list sources used, if any> Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. O...
""" picture.py Author: Ryan Kynor Credit: <list sources used, if any> Assignment: Use the ggame library to "paint" a graphical picture of something (e.g. a house, a face or landscape). Use at least: 1. Three different Color objects. 2. Ten different Sprite objects. 3. One (or more) RectangleAsset objects. 4. One (or...
import os, sys, time, re import concurrent.futures from datetime import date, timedelta as td import xml.etree.cElementTree as ET from urllib.parse import urljoin import requests from bs4 import BeautifulSoup def dl_pitchfx_data(startdate, enddate, loc): '''Download all regular season pitch f/x data f...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Priit Laes, Povi Software LLC # (C) 2014 Onestein BV # (C) 2014 Therp BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
# # Created as part of the StratusLab project (http://stratuslab.eu), # co-funded by the European Commission under the Grant Agreement # INFSO-RI-261552." # # Copyright (c) 2010, SixSq Sarl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
#!/usr/bin/env python # # VM Backup extension # # Copyright 2014 Microsoft Corporation # # 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 # # ...
import corehq.apps.app_manager.util as util from corehq.apps.app_manager.models import ( Module, AdvancedModule, FormSchedule, ScheduleVisit ) from corehq.apps.app_manager.tests.app_factory import AppFactory from corehq.apps.app_manager.tests.util import TestXmlMixin from django.test.testcases import Si...
#!/usr/bin/env python3 # Copyright (c) 2018-2019 The Bitcoin Core developers # Copyright (c) 2018-2019 The Ion Core Developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # how to use and guide: https://github.com/ioncoincore/...
""" A set of wrappers that return the JSON bodies you use to interact with the formplayer backend for various sets of tasks. This API is currently highly beta and could use some hardening. """ import json import socket from django.conf import settings from django.http import Http404 import requests from requests imp...
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget'] if args.kvm: programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils'] elif args.docker: dockers = ['docker.io',...
# Authors: Alexandre Gramfort <gramfort@nmr.mgh.harvard.edu> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD (3-clause) import os import copy from math import ceil import numpy as np from scipy import linalg, sparse from scipy.sparse import ...
from _collections import defaultdict import datetime from urllib import urlencode import dateutil from django.core.urlresolvers import reverse import math from django.db.models.aggregates import Max, Min, Avg, StdDev, Count import numpy import operator import pytz from corehq.apps.es.forms import FormES from corehq.app...
import os.path as op from nose.tools import assert_true import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal from mne.fiff import Raw, pick_types from mne import compute_proj_epochs, compute_proj_evoked, compute_proj_raw from mne.fiff.proj import make_projector, activate_proj fro...
from collections import defaultdict, namedtuple import datetime from urllib import urlencode import math import operator from pygooglechart import ScatterChart from corehq.util.quickcache import quickcache import pytz from corehq import toggles from corehq.apps.es import filters from corehq.apps.es import cases as cas...
#!/usr/local/bin/python3 """ created_by: Aninda Manocha created_date: 3/4/2015 last_modified_by: Aninda Manocha last_modified date: 3/6/2015 """ # imports from sql.user import User from sql.question import Question from sql.answer import Answer from sql.session import Session #Format of JSON -AM #req...
import socket import threading import sys import logging from pknx.core import KNXException, ValueCache from pknx.helper import * is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue import SocketServer else: import queue as queue import socketserver as SocketServer class KNXIPFrame(): ...
import json from flask import Flask, jsonify, request app = Flask(__name__) VERB_TOKENS = frozenset(['am', 'eat']) ADJ_TOKENS = frozenset(['funny', 'yellow']) @app.route('/') def hello(): return jsonify({'yo': 'face'}) @app.route('/annotation/', methods=['POST']) def annotation(): """ Takes in an object re...
# Copyright 2015 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
from collections import namedtuple from datetime import datetime import hashlib from itertools import islice import os import tempfile from urllib2 import URLError from dimagi.ext.couchdbkit import Document, DictProperty,\ DocumentSchema, StringProperty, SchemaListProperty, ListProperty,\ StringListProperty, Da...
""" mock_django.signals ~~~~~~~~~~~~~~~~ :copyright: (c) 2012 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ import contextlib import mock @contextlib.contextmanager def mock_signal_receiver(signal, wraps=None, **kwargs): """ Temporarily attaches a receiver to the provided ``signal``...
from __future__ import absolute_import from __future__ import unicode_literals import six from dimagi.ext import jsonobject from django.conf import settings from copy import copy, deepcopy from datetime import datetime from elasticsearch import TransportError from pillowtop import get_all_pillow_classes from pillowtop...
from corehq.util.es.interface import ElasticsearchInterface from dimagi.ext import jsonobject from django.conf import settings from copy import copy, deepcopy from datetime import datetime from corehq.util.es.elasticsearch import TransportError from pillowtop.logger import pillow_logging def _get_analysis(*names): ...
#!/usr/bin/env python #----------------------------------------------------------------------- # # Core video, sound and interpreter loop for Gigatron TTL microcomputer # #----------------------------------------------------------------------- # # Main characteristics: # # - 6.25 MHz clock # - Rendering 160x120 pix...
import os import shutil import tempfile import datetime import mock from django.test import TestCase from django.conf import settings from crashstats.crashstats import models class Response(object): def __init__(self, content=None, status_code=200): self.content = content self.status_code = status...
from __future__ import unicode_literals from datetime import datetime from django.core.management import call_command from django.core.management.base import BaseCommand from django.utils.text import slugify from gzip import GzipFile from tempfile import NamedTemporaryFile from optparse import make_option from remote...
""" Django settings for janus project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # B...
""" XML utils """ from __future__ import print_function try: import lxml.etree as ET def output_xml(xml, filename): ET.ElementTree(xml).write(filename, encoding='utf-8', xml_declaration=True, pretty_print=True) except ImportError: #noinspection PyRedeclaration import xml.etree.cElementTree as...
import collections import json import time import isoweek from django.http import HttpResponse from django.views.decorators.cache import cache_page, cache_control from django.shortcuts import get_object_or_404 from packages.models import Package, Release, DownloadDelta def fetch_stats(package): releases = list...
#!/usr/bin/env python ''' This module contains printer/plotter functions for the EV3 components. I/O ports: - A: Large motor, plotter rail - B: Medium motor, plotter head - D: Large motor, roller - 1: Touch sensor, plotter rail reset sensor - 2: Color sensor, paper feed detector - /dev/video0: USB webcam ''' import ...
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Test application to display live images from an Allied Vision camera using OpenCV 3 # # External dependencies import cv2 import Vimba # Image callback function def ProcessImage( frame ) : # Check the frame if not frame.is_valid : return # Resize image for display ...
from threading import Thread import time import logging import psutil import os from abstracthealthstatisticspublisher import * from ..databridge.agent import * from ..config.cartridgeagentconfiguration import CartridgeAgentConfiguration from ..util import cartridgeagentutils, cartridgeagentconstants class HealthSta...
#!/usr/bin/env python3 import os import re import sys import logging import datetime import requests from lxml import etree sys.path.append('addURI/assets/') import clean_up import lc_vocab from pymods import mods, fsudl LOC_try_index = 0 error_log = False def get_subject_list(record): # ...
# -*- encoding: utf-8 -*- from openerp.osv import fields, osv import time from datetime import datetime, date from dateutil.relativedelta import relativedelta from openerp.tools.translate import _ import calendar import openerp.addons.decimal_precision as dp import psycopg2 from openerp.addons.analytic_structure.MetaA...
import os from datetime import datetime import numpy as np from keras import Input from keras.callbacks import TensorBoard, EarlyStopping from keras.engine import Model from keras.layers import LSTM, Dense, LeakyReLU, TimeDistributed, Flatten from keras.optimizers import Adam from matplotlib import pyplot as plt from ...
import os from datetime import datetime import numpy as np from keras import Input from keras.callbacks import TensorBoard, EarlyStopping from keras.engine import Model from keras.layers import LSTM, Dense, LeakyReLU, TimeDistributed, Flatten from keras.optimizers import Adam from matplotlib import pyplot as plt from ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. import numpy as np def _max_bounding_box(a, b): (xmin_a, xmax_a, ymin_a, ymax_a) = a (xmin_b, xmax_b, ymin_b, ymax_b) = b return (np.nanmin((xmin_a, xmin_b)), np.nanmax((xmax_a, xmax_b)), n...
# MIT License # # Copyright (c) 2017 Jonatan Almén, Alexander Håkansson, Jesper Jaxing, Gmal # Tchaefa, Maxim Goretskyy, Axel Olivecrona # # 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 with...
import re import sublime from sublime_plugin import WindowCommand from ..git_command import GitCommand, GitSavvyError from ..runtime import enqueue_on_worker from ...common import util from ..ui_mixins.quick_panel import show_branch_panel __all__ = ( "gs_delete_branch", ) MYPY = False if MYPY: from typing ...
from __future__ import unicode_literals from django.db import models from django.core.exceptions import FieldError class FieldInstanceTracker(object): def __init__(self, instance, fields, field_map): self.instance = instance self.fields = fields self.field_map = field_map def get_fiel...
import os import sublime from sublime_plugin import WindowCommand, TextCommand from sublime_plugin import EventListener from ..git_command import GitCommand from ...common import util from ...core.settings import SettingsMixin COMMIT_HELP_TEXT_EXTRA = """## ## You may also reference or close a GitHub issue with thi...
import os import sublime from sublime_plugin import WindowCommand, TextCommand from sublime_plugin import EventListener from ..git_command import GitCommand from ...common import util from ...core.settings import SettingsMixin COMMIT_HELP_TEXT_EXTRA = """## ## You may also reference or close a GitHub issue with thi...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Walk the NIS Created on 29. August 2014 @author: mahvi@kms.dk / Martin@Hvidberg.net ''' strName = "WalkNIS" strVer = "1.0.0" strBuild = "'140830xxxx" ### History # Ver. 1.0.0 - First working version ### To do # Look for XXX in the code import sys...
#!/usr/bin/python2.5 # # Copyright 2009 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 or ...
#!/usr/bin/env python """ Created by stevertaylor Copyright (c) 2014 Stephen R. Taylor Code contributions by Rutger van Haasteren (piccard) and Justin Ellis (PAL/PAL2). """ import numpy as np import sys, os, glob import libstempo as T2 import ephem import NX01_utils as utils from collections import OrderedDict impo...
#!/usr/bin/python2.5 # # Copyright 2009 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 or ...
#!/usr/bin/python from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor # Invented by Kiki Jewell with a little help from Spaceman Sam, May 6, 2016 import time import csv import atexit ####### Temp code to test interrupts from twisted.internet import task from twisted.internet import reactor def runEve...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pandas from pandas import compat from .dataframe import DataFrame from .series import Series def concat( objs, axis=0, join="outer", join_axes=None, ignore_index=False, keys=Non...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import pandas from pandas import compat from .dataframe import DataFrame def concat( objs, axis=0, join="outer", join_axes=None, ignore_index=False, keys=None, levels=None, nam...
# coding: utf-8 """Custom views.""" import re import time from itertools import chain from django.shortcuts import render from django.utils.translation import ugettext as _ from django.contrib.auth.decorators import ( login_required, user_passes_test, permission_required ) from modoboa.admin.models import Doma...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ 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 pro...
import MySQLdb import re import sys import json import os from subprocess import call # These four libraries define the Bookworm-specific methods. from bookworm.MetaParser import * from bookworm.CreateDatabase import * from bookworm.WordsTableCreate import * from bookworm.tokenizeAndEncodeFiles import bookidlist # P...
import time import datetime import itertools import requests import re import logging import os import copy import pprint import wd_property_store import json import PBB_fastrun """ Authors: Sebastian Burgstaller (sebastian.burgstaller' at 'gmail.com Andra Waagmeester (andra' at ' micelio.be) This file is part...
#!usr/bin/env python # -*- coding: utf-8 -*- """ Authors: Sebastian Burgstaller (sebastian.burgstaller' at 'gmail.com Andra Waagmeester (andra' at ' micelio.be) This file is part of ProteinBoxBot. ProteinBoxBot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public ...
import sys, pygame, math, random from PlayerPaddle import * from Ball import * pygame.init() clock = pygame.time.Clock() width = 900 height = 700 size = width, height bgColor = r,b,g = 120,0,56 screen = pygame.display.set_mode(size) player = PlayerPaddle( ["pRainbow.png"], [10,10], [850, 600]) player2 = PlayerPadd...
"""This module features classes and interfaces to track references and loaded data and manipulate it. It is the main lib for the reference workflow of the pipeline. It revoles around a :class:`Reftrack` object. Each :class:`Reftrack` instance is responsible for one entity. It holds information about the entity, can qu...
# -*- coding: utf-8 -*- """ Created on Wed Apr 26 10:57:10 2017 @author: Gonxo """ import os import time import pandas as pd import numpy as np import mlfunctions as mlf import featuresGenerator as ft from sklearn.ensemble import RandomForestRegressor from sklearn import neighbors as knn from sklearn import neural_ne...
################################################################################ # # 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...
# -*- encoding: utf-8 -*- ''' couchdb.py ========== Classes for working with CouchDB or BigCouch instances which store email alias maps, user UUIDs, and GPG keyIDs. @authors: Isis Agora Lovecruft @version: 0.0.1-beta @license: see included LICENSE file ''' try: from paisley import client except ImportError: p...
import subprocess class SetupNetworkMixin(object): def _setup_hostname(self): with self.get_attachment().attach(): subprocess.check_call(['hostname', self.hostname]) def _setup_virtual_ethernet(self): veth_name = 'veth-{hostname}'.format(hostname=self.hostname) veth_host_n...
def features_nav(): return [ { "name": "Features", "link": "main.features", "sub_navigation_items": [ { "name": "Emails", "link": "main.features_email", }, { "name"...
#!/usr/bin/env python2.5 # # Copyright 2011 the Melange authors. # # 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 applic...
try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages setup( name='LR', version='0.1', description='', author='', author_email='', url='', install_requires=[ ...
from pprint import pprint from django.shortcuts import render from django.views import View from fo2.connections import db_cursor_so from utils.views import group_rowspan import lotes.classes import lotes.queries from lotes.forms import OpForm class OpCaixa(View): Form_class = OpForm template_name = 'lote...