text
stringlengths
17
737k
#! /usr/bin/env python2.7 import json import logging import os import socket import time import queries class DBConfig(object): def __init__(self, dev, db_url): if dev == "development": self.dev = True else: self.dev = False self.db_url = db_url def initial_r...
# pylint: disable=too-many-lines """Tests for ``checker`` module.""" import os import pathlib import re import sys from inspect import isfunction import docutils.io import docutils.nodes import docutils.utils import pytest from rstcheck import _extras, checker, config, types def test_check_file(monkeypatch: pytest....
from datetime import timedelta import os import json from celery.schedules import crontab from kombu import Exchange, Queue if os.environ.get('VCAP_SERVICES'): # on cloudfoundry, config is a json blob in VCAP_SERVICES - unpack it, and populate # standard environment variables from it from app.cloudfoundry...
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutAsserts(Koan): def test_assert_truth(self): """ We shall contemplate truth by testing reality, via asserts. """ # Confused? This video should help: # # http://bit.ly/about_asserts...
from .. import Server import logging class MongoArbiterNode(Server): log = logging.getLogger('Servers.MongoArbiterNode') log.setLevel(logging.DEBUG) ch = logging.StreamHandler() ch.setLevel(logging.DEBUG) formatter = logging.Formatter( '%(asctime)s [%(name)s] %(levelname)s: %(message)s...
''' Copyright (c) 2018 Elliott Pardee <vypr [at] vypr [dot] space> This file is part of BibleBot. BibleBot 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 ...
import unittest from generic_mailpile import MailPileUnittest import mailpile class TestCommands(MailPileUnittest): def test_index(self): res = self.mp.rescan() self.assertEqual(res.as_dict()["result"], True) def test_search(self): # A random search must return results in less than 0.2 seconds. r...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
from toolz import curry from objtoolz.metas.curried import Curried from objtoolz.metas import with_metaclass class Dummy(with_metaclass(Curried)): accessible = True def __init__(self, a, b, c): self.a, self.b, self.c = a, b, c @classmethod def clsmethod(cls): return True def test_a...
# -*- coding: utf-8 -*- import datetime import unittest from pvl.encoder import PVLEncoder, ODLEncoder, PDSLabelEncoder from pvl._collections import Units, PVLModule, PVLGroup, PVLObject class TestDecoder(unittest.TestCase): def setUp(self): self.e = PVLEncoder() def test_format(self): s =...
""" Django settings for kraang_api project. """ import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = os.environ['KRAANG_SECRET_KEY'] def bool_env(val): """Replaces string based environment values with Python booleans""" return True if os.environ.get(val, False) == 'True' else False D...
""" JupyterHub Spawner to spawn user notebooks on a Kubernetes cluster. This module exports `KubeSpawner` class, which is the actual spawner implementation that should be used by JupyterHub. """ import asyncio import os import string import sys import warnings from functools import partial, wraps from urllib.parse imp...
from allauth.account.adapter import DefaultAccountAdapter, get_adapter from allauth.exceptions import ImmediateHttpResponse from allauth.socialaccount.adapter import DefaultSocialAccountAdapter from allauth.socialaccount.models import SocialLogin from django import forms from django.contrib import messages from django....
""" Copyright 2017 Deepgram 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 agreed to in writing, software distri...
import psv import unittest from hypothesis.strategies import text, integers, lists, floats from hypothesis import given, settings import string from random import randint import os filenames = ["tests/dataset-folder/", "tests/dataset-only-one/"] for filename in filenames: if not os.path.exists(os.path.dirname(fil...
from __future__ import print_function import unittest import os import select import sys import subprocess import traceback import socket import fcntl import errno import time import logging import re import atexit import signal from contextlib import contextmanager, closing try: from cStringIO import StringIO exce...
from __future__ import print_function import atexit import errno import imp import logging import os import re import select import signal import socket import sys import time import unittest from contextlib import closing from process_tests import dump_on_error from process_tests import setup_coverage from process_t...
import pytest import testUtil as ipwbTest from ipwb import replay from ipwb import indexer from ipwb import __file__ as moduleLocation from time import sleep import os import subprocess import urllib2 import random import string import re from multiprocessing import Process p = Process() def getURIMsFromTimeMapInWA...
#!/usr/bin/env python3.5 from tools.column import Column from tools.field import String,Int,Float,Text,Boolean from tools.model import Model from tools.database import * from tools.log import * import time class User(Model): __table__='users' id=Column(Int(4,unsigned=True),primary_key=True,...
import pathlib import pytest import stagpy.error, stagpy.parfile @pytest.fixture def par_nml(example_dir): return stagpy.parfile.readpar(example_dir / 'par') def test_section_present(par_nml): for section in stagpy.parfile.PAR_DEFAULT.keys(): assert section in par_nml def test_section_case_insensitiv...
# Copyright (C) 2010-2013 Cuckoo Sandbox Developers. # Copyright (C) 2013 Christopher Schmitt <cschmitt@tankbusta.net> # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import libvirt from lib.cuckoo.common.abstracts import LibVir...
import os import ldap import time import base64 import bcrypt import urlparse import itertools import traceback import onetimepass from datetime import datetime from distutils.version import StrictVersion from flask_login import AnonymousUserMixin from app import app, db from lib import utils from lib.log import logg...
from datetime import datetime import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from markdown import markdown import bleach from flask import current_app, request, url_for from flask_login import UserMixin, Ano...
# Name: PartyLaps for Assetto Corsa # Version: v1.1 # Anthor: Rob Haswell # Contact: me@robhaswell.co.uk # Date: 01.05.2016 # Original: Sylvlain Villet <sylvain.villet@gmail.com> # Desc.: This app provides a list of the last "N" laps # done, the current lap projection and...
from django.db import models from django.contrib.auth.models import AbstractBaseUser class User(AbstractBaseUser): first_name = models.CharField(max_length=30, blank=False) middle_name = models.CharField(max_length=25, blank=True) last_name = models.CharField(max_length=30, blank=True) phone_num = mo...
"""Test functions for deliver_cute project.""" from __future__ import unicode_literals, absolute_import import random from string import ascii_letters, digits from itertools import product, chain from django.test import TestCase from django.core import mail from django.core.urlresolvers import reverse from nose_parame...
import glob import os import random import shutil from mayavi import mlab from tvtk.api import tvtk from tvtk.tools import visual from camera import Camera class AnimationException(Exception): def __init__(self): raise self class StopAnimation(AnimationException): """Stop the animation. C...
"""Unified interface to SciPy function fitting routines. This module provides a unified interface to function fitting. All interpolation routines conform to the following simple method interface: - __init__(p) : set parameters of interpolation function, e.g. polynomial degree - fit(x, y) : fit given input-output data...
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
""" Functions to interrogate and extract CTD data from the ctd.db SQLite3 database. """ from __future__ import print_function from pathlib import Path from warnings import warn from datetime import datetime import numpy as np from netCDF4 import Dataset from PyFVCOM.utilities.general import split_string, ObjectFro...
import os from conda_concourse_ci import uploads import yaml from conda_build import conda_interface from .utils import test_config_dir, default_worker def test_base_task(): task = uploads._base_task('steve') assert task['task'] == 'steve' assert 'run' in task['config'] assert len(task['config']['i...
#!/usr/bin/python import os import sys from klampt import * from klampt.glprogram import * import importlib from klampt.simlog import * class MyGLViewer(GLRealtimeProgram): def __init__(self,world): GLRealtimeProgram.__init__(self,"SimTest") self.world = world #Put your initialization code ...
''' Channels is where we store information for mapping virtual (qubit) channel to real channels. Split from Channels.py on Jan 14, 2016. Moved to SQLAlchemy ORM from atom 2018 Original Author: Colm Ryan Modified By: Graham Rowlands Copyright 2016-2018 Raytheon BBN Technologies Licensed under the Apache License, Ver...
from unittest import TestCase import ml.views import pandas as pd # import logging # import json class TestLinearRegression(TestCase): def ml_object(self): mli = ml.views.MachineLearning( request=None, query_id=1, target_column='a', model_type='linear' ...
__author__ = 'tg' from util.arrays import format_2d_array import sys def align_strings(s1, s2): pass def lavenshtein_matrix(s1, s2): ''' Computes Minimum Lavenshtein Distance matrixtwo strings. This implementation uses dynamic programming approach. :param s1: string 1 :param s2: string 2 ...
# This file is part of Moksha. # Copyright (C) 2008-2010 Red Hat, 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 b...
from eulxml.xmlmap import ( StringField, XmlObject, IntegerField, NodeListField, NodeField, load_xmlobject_from_string ) from lxml import etree class XPathField(StringField): """ A string field that is supposed to contain an arbitrary xpath expression """ pass class OrderedXmlObject(XmlObje...
from collections import namedtuple from itertools import groupby import itertools from django.db.models import Q from casexml.apps.case.const import UNOWNED_EXTENSION_OWNER_ID, CASE_INDEX_EXTENSION from casexml.apps.case.signals import cases_received from casexml.apps.case.util import validate_phone_datetime, prune_pr...
import os import unittest from functools import partial from time import sleep from kivy.app import App from kivy.clock import Clock from kivy.uix.gridlayout import GridLayout from cobiv.modules.browser.browser import Browser from cobiv.modules.browser.eolitem import EOLItem from cobiv.modules.session.Session import ...
# Copyright (c) 2011 gocept gmbh & co. kg # See also LICENSE.txt import zeit.cms.testing import zeit.newsletter.testing import zope.testbrowser.testing import unittest2 as unittest class EditorTest(unittest.TestCase, zeit.cms.testing.BrowserAssertions): layer = zeit.newsletter.testing.TestBrows...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains a helper function to fill erfa.astrom struct and a ScienceState, which allows to speed up coordinate transformations at the expense of accuracy. """ import warnings import numpy as np import erfa from ..time import Time from ..ut...
# Copyright 2019 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 agreed to in writing,...
__version__ = "0.3.6"
from __future__ import print_function from __future__ import absolute_import from __future__ import division import compas_rhino from ._primitiveartist import PrimitiveArtist __all__ = ['PolygonArtist'] class PolygonArtist(PrimitiveArtist): """Artist for drawing polygons. Parameters ---------- pri...
# Built-in import os import itertools as itt # Common import numpy as np from scipy.interpolate import BSpline import matplotlib.pyplot as plt import matplotlib.lines as mlines import matplotlib.patches as mpatches import matplotlib.colors as mcolors from matplotlib.colors import ListedColormap import matplotlib.gri...
# -*- coding: utf-8 -*- from physical.models import Instance from base import BaseTopology, InstanceDeploy class MongoDBSingle(BaseTopology): def get_upgrade_steps_extra(self): return ('workflow.steps.mongodb.upgrade.vm.ChangeBinaryTo36',) + \ super(MongoDBSingle, self).get_upgrade_steps_extr...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Perform DNA-DNA alignment using BLAST, NUCMER and BLAT. Keep the interface the same and does parallelization both in core and on grid. """ import os.path as op import sys import shutil import logging from jcvi.utils.cbook import depends from jcvi.apps.base import Opt...
import constants from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django_fsm import FSMField, transition from core.models import BaseModel from core.utils import percentage from source.models ...
import logging import numpy as np from numpy.linalg.linalg import LinAlgError import pandas as pd from tardis.plasma.properties.base import ProcessingPlasmaProperty from tardis.plasma.exceptions import PlasmaConfigError logger = logging.getLogger(__name__) __all__ = ['LevelBoltzmannFactorLTE', 'LevelBoltzmannFactor...
#Depends on web.py, psycopg2, PyYaml, pytz, python-dateutil import web, psycopg2 import json, yaml, xmlrpclib import datetime, pytz import skysql from dateutil.parser import parse as datetimeparse from dblogin import dbname, dbuser, dbpass categories = {} #The temptation to name this cat_herder was extraordinary def c...
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 appl...
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
#!/usr/bin/env python2.7 """ This module provides an abstraction for a receipt and several basic conversion functions. """ from builtins import int import base64 import binascii import datetime from six import string_types import algorithms import utils class ReceiptException(Exception): """ An exception r...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 Richard Hull and contributors # See LICENSE.rst for details. import re import time import argparse from luma.led_matrix.device import max7219 from luma.core.serial import spi, noop from luma.core.render import canvas from luma.core.virtual import view...
#!/usr/bin/env python """This program is a five in row game, which is used for the coding camp 2015 in WindRiver.com""" import os import sys, getopt import pygame as pg import threading import json from toolbox import button from toolbox import tools # Cloud API from node import Node from config import * # ...
#!/usr/bin/env python # $Id$ # the current main release version DEVIDE_VERSION = 'ng1phase1 6.9.18T' # standard Python imports import getopt import mutex import os import re import stat import string import sys import time import traceback # we need these explicit imports for cx_Freeze #import encodings #import enco...
# -*- coding: utf-8 -*- # __author__ = chenchiyuan from __future__ import division, unicode_literals, print_function from bs4 import BeautifulSoup from django.core.management import BaseCommand from applications.jiong.models import Post import requests import time headers = { "referer": "http://weixin.sogou.com...
#!/usr/bin/env python2.5 # # Copyright 2008 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...
from django import template from django.template.loader import render_to_string from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from modoboa.extensions.sievefilters import views from modoboa.lib.webutils import render_actions register = template.Library() from modoboa.l...
from django.utils.html import conditional_escape from django.forms.widgets import RadioInput from django.forms.widgets import RadioFieldRenderer from django.utils.datastructures import SortedDict from django.forms import ( Form, ModelForm, BaseForm, Field, CharField, URLField, ChoiceField, Textarea, Int...
import argparse import copy from distutils import ccompiler from distutils import errors from distutils import msvccompiler from distutils import sysconfig from distutils import unixccompiler import os from os import path import shutil import sys import pkg_resources import setuptools from setuptools.command import bu...
from __future__ import print_function, absolute_import # import pyximport; pyximport.install() from cyhdfs3.cyhdfs3 import HDFSClient, File, FileInfo, BlockLocation from ._version import get_versions __version__ = get_versions()['version'] del get_versions
from __future__ import unicode_literals from datetime import datetime import hashlib from tempfile import TemporaryFile from django.core.files import File from django.utils.six.moves import html_parser from django.utils.timezone import utc from PIL import Image import requests from .models import Hashtag, Like, Phot...
# -*- coding: UTF-8 -*- from PySide import QtGui, QtCore import SettingsWidget, ScenarioData from ImageCache import ImageCache from os.path import dirname, abspath # TODO: Keeping mouse down and moving it around in item combo shows items # one step behind class Editor(QtGui.QMainWindow): def __init__(self, parent=...
import os import networkx as nx import warnings from pymatgen.analysis.graphs import StructureGraph from pymatgen.core.structure import Structure from pymatgen.analysis.local_env import CrystalNN from pymatgen.analysis.dimensionality import ( get_dimensionality_gorai, get_dimensionality_cheon, get_dimensionalit...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END from importlib import import_module from urllib.parse import urlparse import copy import json import inspect import ipaddress import datetime from foglamp.common.storage_client.payload_builder import PayloadBuilder from fogla...
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. """Base Widget class. Allows user to create widgets in the back-end that render in the Jupyter notebook front-end. """ import os from contextlib import contextmanager from collections.abc import Iterable from IPython...
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2015--, Evguenia Kopylova. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------------...
import os, sh from pythonforandroid.toolchain import CompiledComponentsPythonRecipe, warning from pythonforandroid.util import (urlretrieve, current_directory, ensure_dir) from pythonforandroid.logger import (logger, info, warning, error, debug, shprint, info_main) class ReportLabRecipe(CompiledComponentsPythonRecipe):...
import numpy as np import scipy.special import multiprocessing import sys import json import os import struct import itertools from distutils.version import LooseVersion from ._explainer import Explainer from ..utils import assert_import, record_import_error, safe_isinstance from ..utils._legacy import DenseData from ....
#!/usr/bin/env python ### # Copyright (c) 2002, Jeremiah Fincher # 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, # ...
# Copyright 2011 Gregory Haynes <greg@greghaynes.net> # Licensed under the MIT license. See LICENSE for more information. import select import heapq import logging import time import collections import os import fcntl class TimerQueue(object): def __init__(self): self._p_queue = [] def insert(self, d...
#!/usr/bin/env python import unittest from StringIO import StringIO import sys sys.path += [ ".", "..", ] from commander import Commander from command_output_pipe_base import CommandOutputPipeBase, OutputError class CommanderTester(unittest.TestCase): # Test run_command ...
# -*- coding: utf-8 -*- # # Copyright (c) 2008-2009, European Space Agency & European Southern Observatory (ESA/ESO) # Copyright (c) 2008-2009, CRS4 - Centre for Advanced Studies, Research and Development in Sardinia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modific...
from src.recursion import calculate_power_set from src.recursion import generate_subsets class TestTowerOfHanoi(object): """ Question 16.1 """ def test_small_input(self): pass class TestNQueens(object): """ Question 16.2 """ def test_four_queen_solutions(self): pass...
import requests import json import urllib import urllib.request from hashlib import sha256 from hmac import HMAC from datetime import datetime, tzinfo, timedelta from . import resources from types import ModuleType import xml.etree.ElementTree as ET from .errors import BaseError from http_request_randomizer.requests.pr...
# -*- coding: utf-8 -*- # Chicago Tribune News Applications fabfile # Copying encouraged import os import subprocess import urllib from time import strftime, localtime from fabric.api import * from fabric.contrib.console import confirm from fabric.context_managers import cd from getpass import getpass, getuser fro...
# Copyright 2016 James Hensman, alexggmatthews # # 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 agreed t...
#!/bin/env python # Copyright (c) 2002-2014, California Institute of Technology. # All rights reserved. Based on Government Sponsored Research under contracts NAS7-1407 and/or NAS7-03001. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following co...
#!/usr/bin/env python r""" Parse biological sequences (:mod:`skbio.parse.sequences`) ========================================================= .. currentmodule:: skbio.parse.sequences This module provides functions for parsing sequence files. Functions --------- .. autosummary:: :toctree: generated/ parse_f...
"""A Python module for interacting with Slack's Web API.""" import asyncio import copy import hashlib import hmac import io import json import logging import mimetypes import os import platform import sys import uuid import warnings from http.client import HTTPResponse from typing import BinaryIO, Dict, List from typi...
# (c) 2014, James Tanner <tanner.jc@gmail.com> # # Ansible 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. # # Ansible is distributed i...
# # Description: # This module implements classes and functions to parse # the condor log files. # # Author: # Igor Sfiligoi (Feb 1st 2007) # # NOTE: # Inactive files are log files that have only completed or removed entries # Such files will not change in the future # import os,os.path,stat import re,mmap impo...
import requests from pyquery import PyQuery as pq def find_last_between( source, start_sep, end_sep ): result=[] tmp=source.split(start_sep) for par in tmp: if end_sep in par: result.append(par.split(end_sep)[0]) if len(result) == 0: return None else: return result[len(result)-1] # Return last item de...
from django.http import HttpResponse, HttpResponseRedirect from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth import authenticate, login, logout from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm from django.core.urlresolvers imp...
''' ==================================================================== Copyright (c) 2003-2016 Barry A Scott. All rights reserved. This software is licensed as described in the file LICENSE.txt, which you should have received as part of this distribution. ======================================================...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap from mpl_toolkits.basemap import __version__ as basemap_version # Tissot's Indicatrix (http://en.wikipedia.org/wiki/Tissot's_Indicatrix). # These diagrams illustrate the distortion inherent in all map projections. # In confor...
from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.utils.html import escape from django_fixmystreet.fixmystreet.models import ( Report, ReportCategory, OrganisationEntity, FMSUser, ...
from __future__ import with_statement import sys from optparse import make_option from datetime import datetime, timedelta from django.core.management.base import NoArgsCommand from django.db.models import Q from django.utils import timezone from djangofeeds.tasks import refresh_feed from djangofeeds.models import F...
import logging import os import subprocess from snaptastic import exceptions from snaptastic.freeze import freeze logger = logging.getLogger(__name__) class FILESYSTEMS: class XFS: name = "xfs" freeze_cmd = "xfs_freeze" format_cmd = 'mkfs.xfs' class JFS: name = "jfs" ...
#!/usr/bin/python import sys import argparse parser = argparse.ArgumentParser() parser.add_argument("-d", "--database", help="database name", default="nms") args = parser.parse_args() if __name__ == '__main__': f = sys.stdout f.write("drop schema if exists {};\n".format(args.database)) f.write("create s...
from __future__ import absolute_import, print_function import sys import pytest class TestImportModules: @pytest.mark.tryfirst def test_import_all(self): module_name='pyautoupdate' submodules=['launcher'] modulelist=[module_name] for submodule in submodules: modulel...
from django.conf.urls import patterns, url urlpatterns = patterns('core.views', url(r'^$', 'home_page', name='home-page'), url(r'^(?P<slug>contribute)/?$', 'contribute', name='contribute'), url(r'^contribute/(?P<slug>guidelines)/$', 'static_page', name='static_page'), url(r'^(?P<slug>about)/$', 'sta...
# -*- coding: utf-8 -*- from DuralexTestCase import DuralexTestCase import duralex.alinea_parser as parser class ParseEditTest(DuralexTestCase): def test_delete_article(self): self.assertEqualAST( self.call_parse_func( parser.parse_edit, "l'article 42 est abrog...
from __future__ import print_function from __future__ import absolute_import from Components.config import config, configfile from Screens.MessageBox import MessageBox from enigma import eTimer from .RadioTimesEmulator import RadioTimesEmulator from time import localtime, time, strftime, mktime autoScheduleTimer =...
#!/usr/bin/env python3 # Call addr2line as needed to resolve addresses in a stack trace. The addresses # will be replaced if they can be resolved into file and line numbers. The # executable must include debugging information to get file and line numbers. # # Two ways to call: # 1) Execute binary as a subprocess: st...
""" Plot class. $Id$ """ __version__='$Revision$' from colorsys import hsv_to_rgb from Numeric import zeros, ones, Float, divide, ravel,clip,array from topo.base.topoobject import TopoObject from topo.base.parameter import Dynamic from topo.base.sheet import submatrix, bounds2slice, bounds2shape from bitmap impor...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils import getdate,today from frappe import _ from frappe.desk.form.linked_...
import json import os import os.path import shutil import sys import unittest import datetime from collections import OrderedDict from time import sleep from typing import Union, List, Optional from unittest import TestCase from cate.cli import main from cate.core.ds import DATA_STORE_REGISTRY from cate.core.op import...
import json import spacy import copy import itertools FLAG_DICT = { "18": spacy.attrs.FLAG18, "19": spacy.attrs.FLAG19, "20": spacy.attrs.FLAG20, "21": spacy.attrs.FLAG21, "22": spacy.attrs.FLAG22, "23": spacy.attrs.FLAG23, "24": spacy.attrs.FLAG24, "25": spacy.attrs.FLAG25, "26": s...