code
stringlengths
1
199k
''' Created on 26 sept. 2013 @author: fclemens ''' import abc import urllib.request from bs4 import BeautifulSoup class AbstractParser: __metaclass__ = abc.ABCMeta ''' classdocs ''' def retrieveOnlinePage(self, url): #TODO : improve using urllib3 or Requests which have a pool of connection....
""" filename.py: Filename class and methods for the MMGen suite """ import sys,os from .obj import * from .util import die,get_extension from .seed import * class Filename(MMGenObject): def __init__(self,fn,base_class=None,subclass=None,proto=None,write=False): """ 'base_class' - a base class with an 'ext_to_cls'...
from math import pi import curses import tank import world class Menuentry(): def __init__(self, key, name, conf, possible_values): self.key = key self.name = name self.possible_values = possible_values self.index = possible_values.index(conf[key]) def confmenu(con...
from django.contrib.auth import get_user_model from model_bakery import baker from tenant_schemas.test.cases import TenantTestCase from siteconfig.models import SiteConfig from announcements import tasks from announcements.models import Announcement User = get_user_model() class AnnouncementTasksTests(TenantTestCase): ...
"""conf - Sphinx configuration information.""" import os import sys from contextlib import suppress from subprocess import CalledProcessError, PIPE, run root_dir = os.path.dirname(os.path.dirname(__file__)) sys.path.insert(0, root_dir) import rdial # NOQA: E402 on_rtd = 'READTHEDOCS' in os.environ if not on_rtd: i...
bot_template = "BOT : {0}" user_template = "USER : {0}" def respond(message): # Concatenate the user's message to the end of a standard bot respone bot_message = "I can hear you! You said: " + message # Return the result return bot_message def send_message(message): # Print user_template including t...
from dwc.common import MappingError """ @TODO - update functions marked with # in col 1 to adapt to new style of dwca fields - figure out what to do with non-standard terms when using subset to build SDwCR - change arguments of certain functions to be dicts, not lists """ class RecordSet(): """ Class definition for...
from pyModeS import common from textwrap import wrap def uplink_icao(msg): """Calculate the ICAO address from a Mode-S interrogation (uplink message)""" p_gen = 0xFFFA0480 << ((len(msg) - 14) * 4) data = int(msg[:-6], 16) PA = int(msg[-6:], 16) ad = 0 topbit = 0b1 << (len(msg) * 4 - 25) for ...
from app import app app.run(debug=True)
from creature import Creature, Dragon from wizard import Wizard import random class Game: def __init__(self): self.creatures = [ Creature("Toad", 1), Creature("Frog", 3), Dragon("Dragon", 50), Creature("Lion", 10) ] self.wizard = Wizard('Gandol...
class Activity(object): #activityLimit: string -> int # retorna el limite de la actividad #activityMembers:string -> array string #retorna los miembros de la actividad def __init__(self): self.activityLimit = {} self.activityMembers = {} #addActivity: string, int -> void #agr...
import epics, time, math, numpy, sys sys.path.append('\\\fed.cclrc.ac.uk\\Org\NLab\\Projects\\Vela\\Software\\VELA_CLARA_PYDs\\bin\\stage') import VELA_CLARA_Scope_Control as vcsc s = vcsc.init() scopeController = s.physical_VELA_INJ_Scope_Controller() scope_name = "WVF01" channel_name = vcsc.SCOPE_PV_TYPE.TR3 while Tr...
"""autogenerated by genpy from RoboCompAGM2ROS/symbolsUpdateRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import RoboCompAGM2ROS.msg class symbolsUpdateRequest(genpy.Message): _md5sum = "561e2a3a991d76d8bea34e066a043366" _type = "RoboComp...
from os import popen from re import split f = popen('who', 'r') for eachLine in f.readlines(): print split('\s\s+|\t', eachLine.strip()) f.close()
""" Initializaition file for sub-package `gas_opacities`. """ from setuptools_scm import get_version as __get_version __version__ = __get_version(root='../..', relative_to=__file__) from . import semenov_opacity __all__ = ['semenov_opacity']
from . import locations, browser, message_boxes as messages from .dialogs import * from .main_window import MainWindow from .pages import *
from datetime import datetime, timezone from collections import namedtuple from sqlalchemy.orm import relationship, backref from sqlalchemy.schema import ForeignKeyConstraint from sqlalchemy import (Column, DateTime, Integer, String, ForeignKey, Float, Boolean, Text) from flask.ext.security impo...
from __future__ import division ''' Loads represented as vectors. ''' __author__= "Luis C. Pérez Tato (LCPT) , Ana Ortega (AO_O) " __copyright__= "Copyright 2018, LCPT, AO_O" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@ciccp.es, ana.ortega@ciccp.es " import geom import xc import vtk from miscUtils imp...
from sokoenginepy import AtomicMove, Direction, Tessellation from .autogenerated_tessellation import SokobanTessellationAutogeneratedSpecMixin from .tessellation_spec_mixin import TessellationSpecMixin class DescribeSokobanTessellation( TessellationSpecMixin, SokobanTessellationAutogeneratedSpecMixin ): illegal...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('pm', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( name='inventory', unique_together=set([('name', 'manufacturer', 'c...
''' Configuration builder. Generate a large number of valid configurations, build them concurrently, and report. ''' import argparse import itertools import multiprocessing import os import re import shutil import subprocess import sys import tempfile import pathlib def quote_if_needed(value): if not value.isdigit(...
import os from twisted.internet.interfaces import IReactorTime from zope.interface import implementer @implementer(IReactorTime) class PoisonReactor(object): """ A reactor which answers all requests with a `NotImplementedError`. It exists only to be importable as ``from twisted.internet import reactor`` to ...
import unittest import os import enhance_extract_text_tika_server class TestEnhanceExtractTextTikaServer(unittest.TestCase): # delete OCR cache entries for the images used in this test class def delete_ocr_cache_entries(self): filenames = [ '/var/cache/tesseract/eng-4c6bf51d4455e1cb58b7d8dd2...
''' s2qkd-sim.py: This interactive program estimates and visualizes Qubit error rate, classical communication rate and private key rate as a function of the Transmission rate and other parameters. input: Sliders are used to to variate the following parameters ...
from horton import * def test_becke_hartree_n2_hfs_sto3g(): fn_fchk = context.get_fn('test/n2_hfs_sto3g.fchk') mol = IOData.from_file(fn_fchk) grid = BeckeMolGrid(mol.coordinates, mol.numbers, mol.pseudo_numbers, random_rotate=False, mode='keep') er = mol.obasis.compute_electron_repulsion(mol.lf) ha...
from django.utils.translation import gettext as _ from rest_framework import viewsets, status, permissions from rest_framework.decorators import action, permission_classes from rest_framework.response import Response from ...utils import replace_keys from ...device.models import Device, Model @permission_classes((permi...
""" The `api.py` module defines an API that allows clients to interact with ROS over HTTP. It is accessible at `<hostname>:5984/_openag/` when the project is running. There should always be exactly one instance of this module in the system. """ import gevent.monkey; gevent.monkey.patch_all() import socket import rospy ...
import sys import os import time import subprocess import logging import xmlrpc.client import queue try: import pm2ml except: print("pm2ml not found. Aria2 download won't work.") _test = False class DownloadPackages(): def __init__(self, package_names, conf_file=None, cache_dir=None, callback_queue=None): ...
class F_c_d(FieldElem): def __init__(self, K, e): self.K = K self.e = PolyRing(e) def zero(self): # we call the additive identity "0" new_e = map(lambda x: F_p(x, self.K.char), [0]*self.K.deg) return F_c_d(self.K, new_e) def one(self): # we call the multiplicative identity "1" new_e = map(lambda x: F_p(x, ...
from typing import List __all__: List[str] = []
import os.path def getFirstLine(path): if os.path.exists(path): with open(path, 'r') as f: return f.readline() def confirmAction(): yes = set(['yes','y', 'ye', '']) choice = input("Confirm update (y/n):").lower() if not choice in yes: exit("Update cancled.") def prependToFile(...
import os import pygame from pygame.locals import * from pgu import engine import data from cnst import * import levels class Menu(engine.State): def __init__(self,game): self.game = game def init(self): self.font = self.game.font self.bkgr = pygame.image.load(data.filepath(os.path.join(...
from pysollib.mfxutil import Struct from pysollib.pysoltk import MfxCanvasText from pysollib.resource import CSI class _LayoutStack: def __init__(self, x, y, suit=None): self.x = int(round(x)) self.y = int(round(y)) self.suit = suit self.text_args = {} self.text_format = "%d"...
"""game_engine.py is the gummworld derived engine class for the ffmm """ import sys import cProfile, pstats import pygame from pygame.sprite import Sprite from pygame.locals import * import paths import gummworld2 from gummworld2 import context, data, model, geometry, toolkit,Engine, State, TiledMap, BasicMapRenderer, ...
import os import os.path import cv2 import pickle import numpy as np file_path = '/'.join(os.path.realpath(__file__).split("/")[:-2]) ''' Function: 1) Preprocessing of Celeb_A Datase - cropping into square - resizing to 64x64 - convert to grayscale - mapping them to interval [-1,1] - expanding their dimensio...
""" This file ... """ from libsignetsim.settings.Settings import Settings from libsignetsim.optimization.OptimizationException import OptimizationCompilationException, OptimizationExecutionException from time import time, sleep from os.path import join, getsize, isfile from os import getcwd, setpgrp, mkdir from subpro...
from default import * from library import * import tools sys.path.append(os.path.join(CWD, 'external')) from BeautifulSoup import BeautifulSoup from urllib import quote_plus class Module(BARTSIDEE_MODULE): def __init__(self, app): self.app = app BARTSIDEE_MODULE.__init__(self, app) ...
import time import os import logging.handlers as handlers import zipfile class CompressedSizedTimedRotatingFileHandler(handlers.TimedRotatingFileHandler): """ Handler for logging to a set of files, which switches from one file to the next when the current file reaches a certain size, or at certain timed...
import sys, re rapicorn_debug_items, rapicorn_debug_items_set = '', set() rapicorn_debug_keys, rapicorn_debug_keys_set = '', set() rapicorn_flippers, rapicorn_flippers_set = '', set() rapicorn_todo_lists = {} rapicorn_bug_lists = {} def process_start (): pass def process_comment (txt, lines): if not txt.startswith ...
class OSTLPayload(StandardPayload): pass
import os import zipfile import simplejson as json from cuddlefish.util import filter_filenames, filter_dirnames class HarnessOptionAlreadyDefinedError(Exception): """You cannot use --harness-option on keys that already exist in harness-options.json""" ZIPSEP = "/" # always use "/" in zipfiles def make_zipfile_...
import json import mock import os import shutil import sys import tempfile import unittest import mozinfo class TestMozinfo(unittest.TestCase): def setUp(self): reload(mozinfo) self.tempdir = os.path.abspath(tempfile.mkdtemp()) # When running from an objdir mozinfo will use a build generated...
import mixins import unittest from browser_test import SingleNodeBrowserTest, debug_on # NOQA class SingleBrowserTest(mixins.WithSingleBob, SingleNodeBrowserTest): def test_1_public_homepage(self): self.bob.get("http://127.0.0.1:3000/") self.bob.find_element_by_css_selector("button") def test_2...
from pyjamas.ui.Grid import Grid class Logger(Grid): instances = [] def __init__(self): Logger.instances.append(self) Grid.__init__(self, Visible=False) self.targets=[] self.targets.append("app") #self.targets.append("ui") self.resize(len(self.targets)+1, 2) ...
from django.conf.urls import url from .util import page from . import views from bedrock.redirects.util import redirect urlpatterns = ( url(r'^$', views.home_view, name='mozorg.home'), page('about', 'mozorg/about/index.html', ftl_files=['mozorg/about']), page('about/manifesto', 'mozorg/about/manifesto.html'...
import os, sys try: from MonetDBtesting import process except ImportError: import process dbfarm = os.getenv('GDK_DBFARM') tstdb = os.getenv('TSTDB') if not tstdb or not dbfarm: print 'No TSTDB or GDK_DBFARM in environment' sys.exit(1) dbname = tstdb + '-bug2875' if os.path.exists(os.path.join(dbfarm, d...
from fabric.colors import blue from fabric.tasks import execute from fabric.api import env, task from component import haproxy def vip_name(instance): """ Return kraken vip name based on our convention """ # ex.: UK-PRD-ENG, TEST-DEV-ENG return "{instance}-{env}-ENG" \ .format(instance=instance....
""" Unit tests for instructor.api methods. """ import datetime import functools import io import json import random import shutil import tempfile from unittest.mock import Mock, NonCallableMock, patch import ddt import pytest from boto.exception import BotoServerError from django.conf import settings from django.contri...
from kirin import db from kirin.utils import make_rt_update, str_to_date from kirin.core.model import VehicleJourney, TripUpdate, StopTimeUpdate import datetime def test_valid_date(): res = str_to_date("20151210") assert res == datetime.date(2015, 12, 10) def test_invalid_date(): res = str_to_date("aaaa") ...
from settings import * try: from secret_key import SECRET_KEY except ImportError: from django.utils.crypto import get_random_string chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' SECRET_KEY = get_random_string(50, chars) with open(os.path.join(DIR, 'secret_key.py'), 'w') as secret_key_...
import random import threading import logging import json import tornado.httpserver import tornado.websocket import tornado.ioloop import tornado.web from os.path import dirname, realpath, join, isfile LISTENERS = {} CALLBACKS = {} EVALUATIONS = {} RESULTS = {} OPEN_HANDLERS = {} STATIC_PATH = dirname(realpath(__file__...
from sst.actions import ( fails, ) from u1testutils import mail from u1testutils.sst import config from acceptance import helpers config.set_base_url_from_env() primary_email_id = mail.make_unique_test_email_address() secondary_email_id = mail.make_unique_test_email_address() helpers.register_account(primary_email_...
import html import logging import re from copy import deepcopy from datetime import datetime from textwrap import TextWrapper from urllib.parse import quote_plus as urlquote_plus from urllib.parse import urljoin import dateparser import lxml from dateutil.parser import parse as dateutil_parse from dateutil.tz import ge...
from xml.etree import ElementTree from xml.dom import minidom def prettify(elem): """Return a pretty-printed XML string for the Element. """ rough_string = ElementTree.tostring(elem, 'utf-8') reparsed = minidom.parseString(rough_string) return reparsed.toprettyxml(indent=" ")
import logging from django.db import transaction from twilio.base.exceptions import TwilioRestException from allauth.account.utils import send_email_confirmation from rest_framework.serializers import ValidationError from rest_framework.response import Response from rest_framework import status from rest_framework.gene...
from __future__ import unicode_literals from django.shortcuts import render, get_object_or_404 from django.views import generic from django.http import HttpResponseRedirect from django.urls import reverse_lazy, reverse from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.decorators import ...
from odoo.addons.sponsorship_compassion.tests \ .test_sponsorship_compassion import BaseSponsorshipTest import mock import datetime time_path = ('odoo.addons.sponsorship_switzerland.models.contracts' '.datetime') class TestContractsSwitzerland(BaseSponsorshipTest): def setUp(self): super(Te...
from . import mgmtsystem_action from . import mgmtsystem_action_stage
import sys if __name__ == '__main__': from system_setup.cmd.tui import main sys.exit(main())
from datetime import datetime from openerp import tools from openerp.osv import osv from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT import pytz class mail_compose_message(osv.osv): _name = 'mail.compose.message' _inherit = ['mail.compose.message', 'mail.message'] ...
"""Tests for the email opt-in list management command. """ from __future__ import absolute_import import csv import os.path import shutil import tempfile from collections import defaultdict import ddt import six from django.contrib.auth.models import User from django.core.management import call_command from django.core...
import argparse import os import sys import glob import shutil import json import urllib import csv import collections import zipfile import pprint # remove for production from xml.dom.minidom import parse, parseString def prepareOutputDir(outputDipDir, importMethod, dipUuid): outputDipDir = os.path.join(outputDipD...
from django.contrib import admin from .models import Team admin.site.register(Team)
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'juragan.db' # Or path to database file if using sqlite3. DATABASE_USE...
""" Application file for the user strike app. """ from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class UserStrikeConfig(AppConfig): """ Application configuration class for the user strike app. """ name = 'apps.userstrike' verbose_name = _('User strike')
''' USB Class definitions for FTDI FT232 Serial (UART) device ''' import struct from six.moves.queue import Queue from umap2.core.usb_device import USBDevice from umap2.core.usb_configuration import USBConfiguration from umap2.core.usb_interface import USBInterface from umap2.core.usb_endpoint import USBEndpoint from u...
import mock from odoo.addons.connector_carepoint.models import phone_store from ...unit.backend_adapter import CarepointCRUDAdapter from ..common import SetUpCarepointBase _file = 'odoo.addons.connector_carepoint.models.phone_store' class EndTestException(Exception): pass class PhoneStoreTestBase(SetUpCarepointBase...
class HelpHandler: def __init__(self, messages): self.messages = messages["yaml"] def privateMessage(self, client, name, message): nick = name.split("!")[0] if message.lower() == "help": client.msg(nick, "Topics: %s" % (", ".join(self.messages.keys()))) return True elif message.find("hel...
from openerp import models, fields class PartnerEthnicity(models.Model): _name = "partner.ethnicity" _description = "Ethnicity" name = fields.Char( string="Ethnicity", required=True, ) code = fields.Char( string="Code", ) note = fields.Text( string="Note", ...
"""Product licence interface.""" __metaclass__ = type __all__ = ['IProductLicense'] from zope.interface import ( Attribute, Interface, ) class IProductLicense(Interface): """A link between a product and a licence.""" product = Attribute("Product which has a licence") license = Attribute("Licence...
import re import tarfile from io import BytesIO, StringIO from typing import Dict from os.path import join, isdir, relpath from os import walk from django.template import Context from django.template import Template from nextcloudappstore.core.facades import resolve_file_relative_path from nextcloudappstore.settings.ba...
from __future__ import absolute_import, division, print_function, unicode_literals __author__ = "Gina Häußge <osd@foosel.net>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' __copyright__ = "Copyright (C) 2016 The OctoPrint Project - Released under terms of the AGPLv3 License" i...
""" Course API Views """ from rest_framework.exceptions import NotFound from rest_framework.views import APIView, Response from opaque_keys import InvalidKeyError from opaque_keys.edx.keys import CourseKey from openedx.core.lib.api.view_utils import view_auth_classes from .api import course_detail, list_courses @view_a...
from coalib.results.Result import Result from coalib.results.result_actions.ResultAction import ResultAction class PrintDebugMessageAction(ResultAction): @staticmethod def is_applicable(result, original_file_dict, file_diff_dict): return isinstance(result, Result) and result.debug_msg != "" def appl...
from rest_framework import serializers from ..models import ResultEncoder, ResultSprint class ResultEncoderSerializer(serializers.ModelSerializer): person = serializers.StringRelatedField() station = serializers.StringRelatedField() exercise = serializers.StringRelatedField() class Meta: model =...
import re WHITESPACE_RE = re.compile('\s+') def parse_querystring(querystring): """ Returns a ``(include_terms, exclude_terms)`` tuple. Currently extremely naive. """ terms = set(querystring.split()) exclude_terms = set((term for term in terms if term.startswith('-'))) include_terms = terms ...
__author__ = 'fki' from rest_framework.views import APIView from rest_framework.response import Response from .serializers import * from rest_framework.reverse import reverse from rest_framework import viewsets class PolicyDomainViewSet(viewsets.ReadOnlyModelViewSet): queryset = PolicyDomain.objects.all() seria...
import logging import time from threading import Lock from gateway.models import Valve from ioc import INJECTED, Inject if False: # MYPY from typing import Optional, Any from gateway.output_controller import OutputController logger = logging.getLogger(__name__) @Inject class ValveDriver(object): def __init...
""" Copyright (c) 2002 Intel Corporation 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 list of conditions and the ...
import sys import urllib import urlparse import re import os.path import time import mx.DateTime import tempfile import BeautifulSoup import miscfuncs toppath = miscfuncs.toppath pwcmdirs = os.path.join(toppath, "cmpages") pwcmregmem = os.path.join(pwcmdirs, "regmem") pwldregmem = os.path.join(pwcmdirs, "ldregmem") tem...
"""ArchiveAuthToken interface.""" __metaclass__ = type __all__ = [ 'IArchiveAuthToken', 'IArchiveAuthTokenSet', ] from lazr.restful.fields import Reference from zope.interface import ( Attribute, Interface, ) from zope.schema import ( Datetime, Int, TextLine, ) from lp import _ f...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('commerce', '0019_auto_20150118_1448'), ] operations = [ migrations.AlterField( model_name='order', name='shipping_date', ...
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('memberships', '0013_application_group'), ] operations = [ migrations.AlterField( model_name='application', ...
import sys, os import essentia from essentia import * from essentia.streaming import * analysisSampleRate = 44100.0 def compute(filename, pool, startTime=0, endTime=1e6,\ sampleRate=analysisSampleRate): '''1st pass: get metadata and replay gain''' downmix = 'mix' tryReallyHard = True while t...
""" Test cases for UA API """ from unittest.mock import patch from django.test import TestCase from testserver.views import CANNED_TEST_PAYLOAD from edx_notifications import startup from edx_notifications.data import NotificationType, NotificationMessage from edx_notifications.lib.publisher import ( register_notifi...
__metaclass__ = type from datetime import datetime from operator import isSequenceType import re from iso8601 import ( parse_date, ParseError, ) import lazr.batchnavigator from lazr.batchnavigator.interfaces import IRangeFactory import simplejson from storm import Undef from storm.expr import ( And, ...
from opus_gui.main.opus_project import * from opus_core.tests import opus_unittest from lxml.etree import Element import shutil class OpusProjectTestCase(opus_unittest.OpusTestCase): TESTDATA = 'testdata' def _get_data_path(self, testdata): testdatapath = os.path.split(__file__)[0] testdatapath ...
from openerp.tests import common class TestL10nEsAeat(common.TransactionCase): def setUp(self): super(TestL10nEsAeat, self).setUp() self.export_model = self.env["l10n.es.aeat.report.export_to_boe"] def test_format_string(self): text = u" &'(),-./01:;abAB_ÇÑ\"áéíóúÁÉÍÓÚ+!" self.as...
""" science.py: Module containing functions to log performance for later statistical analysis. This is different than the normal logging module because we always want to save science information, but it's not really a log level like ERROR or WARNING. We also want the science information to be machine-parseable. Science...
from __future__ import print_function import string import random import os import re from datetime import datetime, timedelta import sys import time import dateutil.rrule, dateutil.parser from flask import g, current_app, Blueprint, render_template, request, flash, Response, json, url_for from flask.ext.login import l...
from openerp import api, exceptions, fields, models, _ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DF from datetime import datetime, date from dateutil.relativedelta import relativedelta from lxml import etree import csv import os from .product import GIFT_CATEGORY, SPONSORSHIP_CATEGORY, FUND_CATEGORY impor...
from sst.actions import ( assert_title, ) from u1testutils import mail from u1testutils.sst import config from acceptance import helpers config.set_base_url_from_env() PASSWORD = 'Admin007' primary_email_id = mail.make_unique_test_email_address() secondary_email_id = mail.make_unique_test_email_address() helpers.re...
from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'User.status' db.add_column(u'students_user', 'status', self.gf...
import logging import pytest_twisted from test.settings.mqttkit import settings, influx_sensors, PROCESS_DELAY from test.util import mqtt_json_sensor, sleep logger = logging.getLogger(__name__) @pytest_twisted.inlineCallbacks def test_timestamp_rfc3339(machinery, create_influxdb, reset_influxdb): """ Publish si...
import httplib import os import random import re import tweepy import config Nothing = None SendReply = 1 Retweet = 2 last_seen_path = os.path.join(os.path.dirname(__file__), 'last-seen') last_seen_search_path = os.path.join(os.path.dirname(__file__), 'last-seen-search') replies_this_round = 0 def too_many_replies(): ...
{ "name": "Management System - Review", "version": "8.0.1.0.0", "author": "Savoir-faire Linux, Odoo Community Association (OCA)", "website": "http://www.savoirfairelinux.com", "license": "AGPL-3", "category": "Management System", "depends": [ 'mgmtsystem_nonconformity', 'mgmt...
from openerp.addons.mozaik_coordinate.tests.test_bounce import test_bounce from anybox.testing.openerp import SharedSetupTransactionCase class test_email_bounce(test_bounce, SharedSetupTransactionCase): _data_files = ( '../../mozaik_base/tests/data/res_partner_data.xml', 'data/email_data.xml', )...
"""Helpers for printing out credits for software use""" """ This file is part of RAPD Copyright (C) 2017-2018, Cornell University All rights reserved. RAPD 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, ve...
import base64 import csv import functools import glob import itertools import jinja2 import logging import operator import datetime import hashlib import os import re import json import sys import time import zlib from xml.etree import ElementTree from cStringIO import StringIO import babel.messages.pofile import werkz...
import os from subiquitycore.tests import SubiTestCase, populate_dir from subiquitycore.netplan import configs_in_root class TestConfigsInRoot(SubiTestCase): def test_masked_true(self): """configs_in_root masked=False should not return masked files.""" my_dir = self.tmp_dir() unmasked = ['ru...