content
stringlengths
4
20k
from .fetchers import NUMetadatasFetcher from .fetchers import NUGlobalMetadatasFetcher from bambou import NURESTObject class NUIPv6FilterProfile(NURESTObject): """ Represents a IPv6FilterProfile in the VSD Notes: 7x50 IPv6 Filter profile """ __rest_name__ = "ipv6filterprofile" ...
""" Code to send fms messages pillaged from hg infocalypse codebase. Copyright (C) 2011 Darrell Karbott This library 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.0 of the ...
""" Utilities for importing data See example usage at the bottom. """ import json, numbers import os import psycopg2 import mysql.connector import re try: import vertica_python except: pass try: import pyaccumulo except: pass from Util import Util supportedTypes = ['PostgreSQL', 'MySQL', 'Vertica'...
import os from django.template.defaultfilters import slugify class AssetCollection(object): def __init__(self, base_path): self.base_path = base_path self.files = {} def add_files(self, files): for (asset_id, file_path) in files.iteritems(): self.files[asset_id] = AssetFi...
""" Support for Google Actions Smart Home Control. For more details about this component, please refer to the documentation at https://home-assistant.io/components/google_assistant/ """ import asyncio import logging from typing import Any, Dict # NOQA from aiohttp.hdrs import AUTHORIZATION from aiohttp.web import R...
import re import sys from optparse import OptionParser from ..old_extractors import features from ..old_extractors.features import tokenizer from ..util import file_handling as fh, defines def main(): # Handle input options and arguments usage = "%prog string_features.json" parser = OptionParser(usage=us...
from django.core.management.base import BaseCommand, CommandError from ...models import Run from django.contrib.contenttypes.models import ContentType from ...serializers import ContentTypeIdField from ...backends import immediate from rest_framework.exceptions import ValidationError from django.contrib.auth import get...
class NumMatrix(object): def __init__(self, matrix): """ :type matrix: List[List[int]] """ self.matrix = matrix ROWS = len(matrix) if not ROWS: return COLS = len(matrix[0]) self.dp = dp = [ [0] * COLS for _ in xrange(ROWS) ] for row in xrange(ROWS): for col in xrange(COLS): v = matrix[ro...
""" For parsing objdump files. """ import re from collections import namedtuple INSTRUCTION_SET = ['%al', '%bl', '%dl', 'add', 'addw', 'and', 'callq', 'cmovbe', 'cmove', 'cmovge', 'cmovne', 'cmp', 'cmpb', 'cmpq', 'cmpsb', 'data32', 'ja', 'ja', 'jae', 'jb', 'jb', 'jbe', 'je', 'je', 'jg', 'jg', 'jle', 'jmp', 'jmpq', 'jn...
from south.db import db from django.db import models from d51.django.apps.logger.models import * class Migration: def forwards(self, orm): # Adding model 'UserAction' db.create_table('logger_useraction', ( ('id', models.AutoField(primary_key=True)), ('action', ...
from __future__ import absolute_import import os from django.conf import settings from django import template from django.core.mail import send_mail, EmailMultiAlternatives from yell import Notification class EmailBackend(Notification): """ Send emails via :attr:`django.core.mail.send_mail` """ subj...
"""Tests for pyani package intermediate file parsing. These tests are intended to be run from the repository root using: pytest -v """ from pyani.anim import parse_delta def test_anim_delta(dir_anim_in): """Test parsing of NUCmer delta file.""" aln, sim = parse_delta(dir_anim_in / "NC_002696_vs_NC_011916.d...
# encoding: utf-8 """ setup.py Created by Thomas Mangin on 2014-12-23. Copyright (c) 2014-2014 Exa Networks. All rights reserved. """ from exabgp.configuration.environment import environment from exabgp.version import version environment.application = 'exabgp' environment.configuration = { 'profile' : { 'enable' ...
import optparse import sys import pandas as pd import matplotlib.pyplot as plt import numpy as np # Class that parses a file and plots several graphs class Plotter: def __init__(self): plt.style.use('ggplot') pd.set_option('display.width', 1000) pass def theory(self, p): mu = ...
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-WinEnum', 'Author': ['@xorrior'], 'Description': ('Collects revelant information about a host and the current user context.'), 'Background...
import os import random random.seed(int(os.getenv("SEED"), 16)) from prjxray import util from prjxray.db import Database def gen_sites(): db = Database(util.get_db_root(), util.get_part()) grid = db.grid() for tile_name in sorted(grid.tiles()): loc = grid.loc_of_tilename(tile_name) gridinf...
from tempest.api.compute import base from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc class ImagesMetadataNegativeTestJSON(base.BaseV2ComputeTest): @classmethod def setup_clients(cls): super(ImagesMetadataNegativeTestJSON...
import sys import os import re if sys.version_info[:2] < (3, 3): raise SystemExit("Python >=3.3 required") from distutils.core import setup # Determine version number. text = open(os.path.join(os.path.dirname(sys.argv[0]), "libpcron/__init__.py")).read() match = re.search(r'^__version__ = "([^"]+)"', text, re.M)...
from rest_framework import viewsets import kolibri from .models import PingbackNotification from .models import PingbackNotificationDismissed from .serializers import PingbackNotificationDismissedSerializer from .serializers import PingbackNotificationSerializer from kolibri.core.auth.api import KolibriAuthPermissions...
import numpy as np import traitlets import vaex.ml.state import logging import vaex import vaex.serialize from numba import jit from . import generate # vaex.set_log_level_debug() logger_km = logging.getLogger('vaex.ml.kmeans') def Matrix(type=traitlets.CFloat): return traitlets.List(traitlets.List(type())) # ...
from PyQt5.QtCore import pyqtSlot, Qt from PyQt5.QtWidgets import QDialog, QLabel, QRadioButton from urh import settings from urh.signalprocessing.Filter import Filter from urh.ui.ui_filter_bandwidth_dialog import Ui_DialogFilterBandwidth class FilterBandwidthDialog(QDialog): def __init__(self, parent=None): ...
#! /usr/bin/python3 import sys import tool sys.path.append('../python/') import neurolab as nl import pylab as plb import numpy as np import csv import datetime as dt from scipy import signal class Test(): def load(self): with open(self.fileName, 'rt') as csvdata: date = [] value = [...
import os from WebIDL import IDLExternalInterface, IDLSequenceType, IDLWrapperType, WebIDLError class Configuration: """ Represents global configuration state based on IDL parse data and the configuration file. """ def __init__(self, filename, parseData): # Read the configuration file. ...
#!/usr/bin/env python import os import Pegasus.DAX3 as peg import lsst.daf.persistence as dafPersist import lsst.log import lsst.utils from lsst.obs.test.testMapper import TestMapper logger = lsst.log.Log.getLogger("workflow") logger.setLevel(lsst.log.DEBUG) # hard-coded output repo # A local output repo is written ...
"""Compare the speed of exact one-norm calculation vs. its estimation. """ from __future__ import division, print_function, absolute_import import time import numpy as np from numpy.testing import (Tester, TestCase, assert_allclose) import scipy.sparse class BenchmarkOneNormEst(TestCase): def bench_onenormes...
# -*- coding: utf-8 -*- import unittest import six from scrapy.spiders import Spider from scrapy.utils.url import (url_is_from_any_domain, url_is_from_spider, canonicalize_url, add_http_if_no_scheme) __doctests__ = ['scrapy.utils.url'] class UrlUtilsTest(unittest.TestCase): def te...
from django.forms.models import model_to_dict from django.utils.crypto import get_random_string import pytest from form_designer.models import FormDefinition @pytest.mark.django_db def test_admin_list_view_renders(admin_client, greeting_form): assert greeting_form.name in admin_client.get("/admin/form_designer/f...
import argparse import shapely.geometry def frange(start, stop, step=None): """A float-capable 'range' replacement""" step = step or 1.0 assert start <= stop cur = start while cur < stop: yield min(cur, stop) cur += step def box_coords(top, bottom, left, right, increment): """...
import socket from multiprocessing import Process import ipc import os import math def fg_proc(cfg): fg_ipc = ipc.udp_ipc(cfg); fg_ipc.publish('fg2ap') port = cfg['ipc_udp_starting_port'] sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) while True: try: sock.bind(('127.0...
# This file was automatically created by FeynRules $Revision: 364 $ # Mathematica version: 7.0 for Mac OS X x86 (64-bit) (November 11, 2008) from object_library import all_parameters, Parameter from function_library import complexconjugate, re, im, csc, sec, acsc, asec cabi = Parameter(name = 'cabi', ...
# coding: utf8 import mido from loop import Loop, loop_from_dna from Bio import SeqIO from Bio.Data import CodonTable from pprint import pprint from time import sleep from tkinter import * from tkinter import ttk from tkinter.filedialog import askopenfilename def read_seq(*args): fname = askopenfilename() ...
class memoized (object): """Decorator that caches a function's return value each time it is called. If called later with the same arguments, the cached value is returned, and not re-evaluated.""" def __init__(self, func): """Store function and initialize the cache.""" self.func = func ...
__all__ = ['PyJsParser', 'Node', 'WrappingNode', 'node_to_dict', 'parse', 'translate_js', 'translate', 'syntax_tree_translate', 'DEFAULT_HEADER'] __author__ = 'Piotr Dabkowski' __version__ = '2.2.0' from salts_lib.pyjsparser import PyJsParser from .translator import translate_js, trasnlate, syntax_tree_trans...
"""empty message Revision ID: 23c645b021fe Revises: b0a274ca5378 Create Date: 2016-09-05 11:47:13.592568 """ # revision identifiers, used by Alembic. revision = '23c645b021fe' down_revision = 'b0a274ca5378' from alembic import op import sqlalchemy as sa def upgrade(): op.create_table( 'contracts', ...
from __future__ import print_function from keyboard_reader import * import sensel exit_requested = False; def keypress_handler(ch): global exit_requested if ch == 0x51 or ch == 0x71: #'Q' or 'q' print("Exiting Example...", end="\r\n"); exit_requested = True; def openSensorReadContacts(): ...
"""Input preprocessors tests.""" from lingvo import compat as tf from lingvo.core import py_utils from lingvo.core import schedule from lingvo.core import test_utils from lingvo.tasks.car import input_preprocessors import numpy as np FLAGS = tf.flags.FLAGS class InputPreprocessorsTest(test_utils.TestCase): def t...
#!/usr/bin/env python """ Last.fm scrobbling for Pianobar, the command-line Pandora client. Copyright (c) 2011 Jon Pierce <<EMAIL>> 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 without restri...
""" This is your project's main settings file that can be committed to your repo. If you need to override a setting locally, use local.py """ import os import logging # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.excepti...
from django.http import JsonResponse from django.db import connection from django.views.decorators.csrf import csrf_exempt @csrf_exempt def clear(request): if not request.method == 'POST': return JsonResponse({ 'code': 2, 'response': 'Method in not supported' }) cursor...
from FillParameters import FillParameters from HatchParameters import HatchParameters class Parameters(object): def __init__(self,graph=None): # These are the "bracket" attributes, that is the ones that are # subject to be put there : \draw [ *here* ] (...) # See the code position 19358...
import uuid # django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models import ForeignKey from django.db.models.fields import FieldDoesNotExist, DateField from django.template.defaultfilters import slugify as django_slugify try: # i18n-friendly approach ...
""" Tests for the Sending activation email celery tasks """ import mock from django.conf import settings from django.test import TestCase from six.moves import range from edx_ace.errors import ChannelError, RecoverableChannelDeliveryError from lms.djangoapps.courseware.tests.factories import UserFactory from student...
from __future__ import unicode_literals import re from requests.compat import urljoin from requests.utils import dict_from_cookiejar from sickbeard import logger, tvcache from sickrage.helper.common import convert_size, try_int from sickrage.providers.torrent.TorrentProvider import TorrentProvider class TorrentDay...
"""This module contains a Google PubSub sensor.""" import warnings from typing import Any, Callable, Dict, List, Optional, Sequence, Union from google.cloud.pubsub_v1.types import ReceivedMessage from airflow.providers.google.cloud.hooks.pubsub import PubSubHook from airflow.sensors.base import BaseSensorOperator fro...
"""Test class for Sync Plan UI""" from ddt import ddt from datetime import datetime, timedelta from fauxfactory import gen_string from robottelo import entities from robottelo.common.constants import SYNC_INTERVAL from robottelo.common.decorators import data, skip_if_bug_open from robottelo.common.helpers import gener...
from SpecImports import * from toontown.toonbase import ToontownGlobals CogParent = 100007 CogParent1 = 100009 BattlePlace1 = 100004 BattlePlace2 = 100005 BattleCellId = 0 BattleCellId1 = 1 BattleCells = {BattleCellId: {'parentEntId': BattlePlace1, 'pos': Point3(0, 0, 0)}, BattleCellId1: {'parentEntId'...
from __future__ import absolute_import, division, print_function import tube import mantid.simpleapi as mantid filename = 'WISH00017701.raw' # Calibration run ( found in \\isis\inst$\NDXWISH\Instrument\data\cycle_11_1 ) rawCalibInstWS = mantid.Load(filename) #'raw' in 'rawCalibInstWS' means unintegrated. CalibInstWS...
""" Test functions for linalg module """ import sys import numpy as np from numpy.testing import (TestCase, assert_, assert_equal, assert_raises, assert_array_equal, assert_almost_equal, run_module_suite) from numpy import array, single, double, csingle, cdouble, d...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys #try: # import setuptools #except ImportError: # pass metadata = {} if (len(sys.argv) >= 2 and ('--help' in sys.argv[1:] or sys.argv[1] in ('--help-commands', 'egg_info', '--version', 'clean'))): # For these actions, NumPy is not re...
# -*- coding: utf-8 -*- """ *************************************************************************** ConcaveHull.py --------------------- Date : May 2014 Copyright : (C) 2012 by Piotr Pociask Email : piotr dot pociask at gis-support dot pl **************...
""" AppVeyor will at least have few Pythons around so there's no point of implementing a bootstrapper in PowerShell. This is a port of https://github.com/pypa/python-packaging-user-guide/blob/master/source/code/install.ps1 with various fixes and improvements that just weren't feasible to implement in PowerShell. """ f...
# -*-coding:utf-8-*- # Paikannimien yhtenäistäminen - testailua # Aleksi Pekkala import urllib import urllib2 from lxml import html import json from henkiloauto_scraper.auto_scraper import AutoScraper from vr_scraper.vr_scraper import VRScraper from mh_raaputin.raaputin_alpha import MHScraper URL_MH = "http://matkah...
import time from tempest.api.object_storage import base from tempest.lib import exceptions as lib_exc from tempest import test class ObjectExpiryTest(base.BaseObjectTest): @classmethod def resource_setup(cls): super(ObjectExpiryTest, cls).resource_setup() cls.container_name = cls.create_conta...
from greenlet import greenlet import json import logging from socketIO_client import SocketIO, BaseNamespace import unittest from six.moves.urllib.request import Request, urlopen from ..model.graph import Attr_Diff from ..model.graph import Topo_Diff from . import neo4j_test_util from ..neo4j_util import generate_rand...
import uuid import csv from unittest import mock from django.core.urlresolvers import reverse from taiga.base.utils import json from taiga.projects.tasks import services from .. import factories as f import pytest pytestmark = pytest.mark.django_db def test_get_tasks_from_bulk(): data = """ Task #1 Task #2 "...
import os import pytest from mapproxy.script.grids import grids_command from mapproxy.test.helper import capture FIXTURE_DIR = os.path.join(os.path.dirname(__file__), "fixture") GRID_NAMES = ["global_geodetic_sqrt2", "grid_full_example", "another_grid_full_example"] UNUSED_GRID_NAMES = ["GLOBAL_GEODETIC", "GLOBAL_M...
"""bravyi_kitaev_fast transform on fermionic operators.""" from __future__ import absolute_import import networkx import numpy from openfermion.ops import InteractionOperator, QubitOperator from openfermion.utils import count_qubits def bravyi_kitaev_fast(operator): """ Find the Pauli-representation of Inte...
import os import sys import argparse import yaml import shutil from xosgenx.generator import XOSProcessor, XOSProcessorArgs from xosconfig import Config from multistructlog import create_logger REPO_ROOT = "~/cord" def get_abs_path(dir_): """ Convert a path specified by the user, which might be relative or based...
import json from django.http import Http404 from django.shortcuts import render, redirect from django.core.urlresolvers import reverse_lazy, reverse from django.core.serializers import serialize from django.contrib import messages from django.contrib.auth import get_user_model, login from django.contrib.auth.decorators...
# import matplotlib.pyplot as plt import pandas as pd import numpy as np from sklearn import model_selection from sklearn.ensemble import RandomForestClassifier as RFC from sklearn.model_selection import GridSearchCV as GS from sklearn.metrics import accuracy_score, log_loss import os import sys eps = sys.float_info....
# encoding=utf8 import jenkins_job_wrecker.modules.base class Buildwrappers(jenkins_job_wrecker.modules.base.Base): component = 'buildwrappers' def gen_yml(self, yml_parent, data): wrappers = [] for child in data: object_name = child.tag.split('.')[-1].lower() self.reg...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
from collections import deque from time import time from twisted.application.service import Service from twisted.internet import reactor from twisted.internet.defer import Deferred, DeferredList from twisted.internet.protocol import ReconnectingClientFactory from twisted.protocols.basic import Int32StringReceiver from...
from wader.common.consts import WADER_CONNTYPE_EMBEDDED from core.hardware.option import OptionHSOWCDMADevicePlugin class OptionHSOGTM380(OptionHSOWCDMADevicePlugin): """ :class:`~core.plugin.DevicePlugin` for Option's GTM380 """ name = "Option GT M380" version = "0.1" author = "Andrew Bird" ...
from scapy.all import Ether import re from veripy.networking.link_layers.abstract import LinkLayer class Ethernet(LinkLayer): DefaultSrc = '00:00:00:00:00:00' DefaultDst = 'ff:ff:ff:ff:ff:ff' frame = Ether max_mtu = 1500 min_mtu = 46 mtu = 1500 def __init__(self): self....
#!/usr/bin/python3 from sys import argv from os import remove from subprocess import Popen, PIPE, call from io import BytesIO from gi import require_version use_inkscape = False disable_svg2png = False try: require_version('Rsvg', '2.0') from cairosvg import svg2png from gi.repository import Rsvg impor...
# noqa: D100 import pytest from click.testing import CliRunner import birdy.cli.run from .common import EMU_CAPS_XML, URL_EMU cli = birdy.cli.run.cli cli.url = URL_EMU cli.caps_xml = EMU_CAPS_XML @pytest.mark.online def test_help(): # noqa: D103 runner = CliRunner() result = runner.invoke(cli, ["--help"]...
import os from os.path import join as pjoin from setuptools import setup from distutils.extension import Extension from distutils.command.build_ext import build_ext import subprocess import numpy import sys using_python3 = sys.version_info[0] == 3 def print_python_version(): if using_python3: print("Usin...
"""Tests for Islamic Prayer Times init.""" from datetime import timedelta from prayer_times_calculator.exceptions import InvalidResponseError from homeassistant import config_entries from homeassistant.components import islamic_prayer_times from homeassistant.setup import async_setup_component from . import ( N...
import uuid from lxml import etree from oslo_utils import timeutils import six import webob from cinder.api.v2 import types from cinder.api.v2.views import types as views_types from cinder import exception from cinder import test from cinder.tests.unit.api import fakes from cinder.volume import volume_types def stu...
from rx.observable import Producer import rx.linq.sink class ToDictionary(Producer): def __init__(self, source, keySelector, elementSelector): self.source = source self.keySelector = keySelector self.elementSelector = elementSelector def run(self, observer, cancel, setSink): sink = self.Sink(self...
from typing import List, Dict, Iterable, Set, Tuple from automata.automata_classifier import is_final_sink from automata.final_sccs_finder import build_state_to_final_scc from interfaces.automaton import Node, Label, Automaton from interfaces.expr import Signal from interfaces.func_description import FuncDesc from syn...
from ordereddict import OrderedDict builtin_types = [ 'str', 'int', 'number', 'bool', 'int8', 'int16', 'int32', 'int64', 'uint8', 'uint16', 'uint32', 'uint64' ] def tokenize(data): while len(data): ch = data[0] data = data[1:] if ch in ['{', '}', ':', ',', '[', ']']: ...
""" Author: Kelly Chan Date: July 14 2014 """ import re import time import urllib2 from bs4 import BeautifulSoup import csv def getHTML(url): time.sleep(1.00) html = urllib2.urlopen(url,timeout=10).read() urllib2.urlopen(url).close() soup = BeautifulSoup(html) return soup def extractAttribu...
import sys import traceback import weka.core.jvm as jvm import wekaexamples.helper as helper from weka.core.converters import Loader from weka.classifiers import Classifier def main(args): """ Trains a J48 classifier on a training set and outputs the predicted class and class distribution alongside the ac...
"""Test the cloud component.""" import asyncio import json from unittest.mock import patch, MagicMock, mock_open import pytest from homeassistant.components import cloud from homeassistant.util.dt import utcnow from tests.common import mock_coro @pytest.fixture def mock_os(): """Mock os module.""" with pat...
from __future__ import print_function import boto from gzip import GzipFile from boto.s3.key import Key from io import BytesIO from builtins import ( # noqa bytes, str, open, super, range, zip, round, input, int, pow, object ) __all__ = [ 'S3Remote', ] class S3Remote(object): def __init__(self, bu...
from django.contrib import admin from portfolio.models import * class ProjectImageInline(admin.StackedInline): model = ProjectImage extra = 1 class ProjectAdmin(admin.ModelAdmin): list_display = ('name', 'tagline', 'category', 'featured', 'site_link') search_fields = ('name', 'tagline', 'short_descri...
""" Book: Building RESTful Python Web Services Chapter 4: Throttling, Filtering, Testing and Deploying an API with Django Author: Gaston C. Hillar - Twitter.com/gastonhillar Publisher: Packt Publishing Ltd. - http://www.packtpub.com """ from games.models import GameCategory from games.models import Game from games.mode...
# -*- coding: utf-8 -*- """ Created on Thu May 11 11:46:27 2017 """ from array import array import math class Vector2d: typecode = 'd' def __init__(self, x, y): self.x = float(x) self.y = float(y) def __iter__(self): return (i for i in (self.x, self.y)) def __repr__...
import unittest from unittest.mock import Mock, patch from blivet.formats.luks import LUKS2PBKDFArgs from blivet.size import Size from pyanaconda.core.configuration.storage import PartitioningType from pyanaconda.modules.common.structures.validation import ValidationReport from pyanaconda.modules.storage.partitioning...
import numpy as np import os ############################################################################################################################# # Calculate the Integrated Autocorrlation Time (TODO: Debug) #######################################################################################################...
""" Django settings for BuyBitcoin project. Generated by 'django-admin startproject' using Django 1.9.8. 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...
import logging from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from scrapy.xlib.pydispatch import dispatcher from scrapy import signals from product...
""" Views which allow users to create and activate accounts. """ from django.conf import settings from django.contrib.auth import login, authenticate from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import R...
import logging from wazo_admin_ui.helpers.confd import confd logger = logging.getLogger(__name__) class BaseConfdService(): resource_confd = None def list(self, limit=None, order=None, direction=None, offset=None, search=None, **kwargs): resource_client = getattr(confd, self.resource_confd) ...
AMP = "http://jabber.org/protocol/amp" BYTESTREAMS = 'http://jabber.org/protocol/bytestreams' CHAT_STATES = 'http://jabber.org/protocol/chatstates' CAPS = "http://jabber.org/protocol/caps" DISCO_INFO = "http://jabber.org/protocol/disco#info" DISCO_ITEMS = "http://jabber.org/protocol/disco#items" FEATURE_NEG = 'http://j...
import os from container import make_container, inspect_container from runners.common import * prog_image_name = "gcc:latest" wrapper_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin-interact", "run-test.sh") svc_wrapper_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bin-intera...
""" This module replicates the miislita vector spaces from "A Linear Algebra Approach to the Vector Space Model -- A Fast Track Tutorial" by Dr. E. Garcia, <EMAIL> See http://www.miislita.com for further details. """ from __future__ import division # always use floats from __future__ import with_statement import l...
""" fabcloudkit :copyright: (c) 2013 by Rick Bohrer. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import # standard pass # pypi from fabric.operations import reboot, run, sudo # package from fabcloudkit import cfg from fabcloudkit.host_vars import has_yum from fabclou...
import os import glob import pyproj import datetime from geobricks_common.core.log import logger from geobricks_common.core.filesystem import get_filename, get_file_extension from geobricks_common.core.date import get_daterange from geobricks_common.core.filesystem import sanitize_name from geobricks_data_scripts.utils...
import sys from splinter.driver.webdriver.firefox import WebDriver as FirefoxWebDriver from splinter.driver.webdriver.remote import WebDriver as RemoteWebDriver from splinter.driver.webdriver.chrome import WebDriver as ChromeWebDriver from splinter.driver.webdriver.phantomjs import WebDriver as PhantomJSWebDriver from...
"""@package src.wi.views.user.key @author Krzysztof Danielowski @author Piotr Wójcik """ import urllib from django.http import HttpResponse from django.shortcuts import redirect from django.template import RequestContext from django.template.loader import render_to_string from django.utils.translation import ugettext...
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python import os import shutil from collections import defaultdict from cerbero.build import recipe from cerbero.build.cookbook import CookBook from cerbero.config import Platform from cerbero.utils import to_unixpath class GStreamerStatic(recipe.Recipe): c...
"""SCons.Platform.posix Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001 - 2017 The SCons Foundation # # ...
import logging, jwt, json, datetime, uuid, re from django.http.response import HttpResponse from django.conf import settings from .utils import get_private_key, get_certificate logger = logging.getLogger('django.request') SCOPE_RE = re.compile(r'^(?P<type>repository):(?P<name>[^:]+)(?::(?P<tag>[^:]))?:(?P<actions>...
#!/usr/bin/env python from weighted_graph import Graph import pytest from collections import OrderedDict as od @pytest.fixture(scope='function') def empty_graph(): return Graph() @pytest.fixture(scope='function') def non_empty_graph(): g = Graph() g.add_node("A") return g @pytest.fixture(scope='fu...
from __future__ import print_function import docker.errors from builtins import object import os import tempfile import shutil from . import utils TMPDIR = tempfile.gettempdir() BUILD_CACHEDIR = os.path.join(TMPDIR, 'dmk_cache') BUILD_TEMPDIR = os.path.join(TMPDIR, 'dmk_download') def clear_copy_cache(): for ...
# This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O...
from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import RequestContext from cpes.models import Item...