text
stringlengths
12
6.59M
""" Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipul...
import cherrypy from spyre import server import matplotlib.pyplot as plt import numpy as np class SimpleSineApp(server.App): title = "Simple Sine App" inputs = [{ "input_type":"text", "variable_name":"freq", "value":5, "action_id":"sine_wave_plot"}] outputs = [{"output_type":"plot", "output_id":"s...
from __future__ import unicode_literals import logging from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.db.models import Count, signals from django.db import transaction from django.utils.timezone import now from waldur_core.core import util...
''' Django settings for the DPaW IBMS application. ''' from confy import database import os import sys from unipath import Path # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = Path(__file__).ancestor(2) PROJECT_DIR = os.path.join(BASE_DIR, 'ibms_project') # Add PROJECT_DIR to the sys...
# -*- coding: utf-8 -*- import scrapy class OpensooqDebugSpider(scrapy.Spider): name = "opensooq_debug" allowed_domains = ["https://sa.opensooq.com/"] start_urls = [ # paginate # 'https://sa.opensooq.com/ar/find?term=&cat_id=&scid=&city=&allposts_cb=true&allposts=no&price_from=&price_to=&p...
from qa.models import Question from django import forms class QuestionForm(forms.ModelForm): class Meta: model = Question fields = ('question_text', 'tags')
import hashlib import os import re from subprocess import PIPE import sys from threading import Thread import time import types from urllib import FancyURLopener from quickrelease.config import ConfigSpec, ConfigSpecError gUsingKillableProcess = True try: if bool(ConfigSpec.GetConstant('DISABLE_KILLABLEPROCESS_P...
# Copyright 2019 The TensorFlow 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 required by applica...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# Carriots Utilities - Device Update From CSV # By Timothy D. Swieter, P.E. # MIT License # Take a CSV file with details for new devices or modifying devices. # Process that file to create or modify devices on Carriots. # See the following link for the API information: https://www.carriots.com/documentation/api/devic...
from __future__ import with_statement from os import path from flask import _request_ctx_stack, url_for from flask.templating import render_template_string from webassets.env import (\ BaseEnvironment, ConfigStorage, env_options, Resolver, url_prefix_join) from webassets.filter import Filter, register_filter from w...
#!/usr/bin/env python3 # # Copyright (C) 2018 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as # published by the Free Software Foundation. # # This program is distributed in the hope t...
# This file is part of fedmsg. # Copyright (C) 2013 Red Hat, Inc. # # fedmsg is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. #...
""" <Program Name> scrape_deps_and_detect_conflicts.py <Purpose> Employs custom version of pip (awwad/pip:develop) to harvest dependencies and find dependency conflicts for packages in PyPI. See README.md! """ import sys # for arguments and exceptions import pip # for SpecifierSet and Version (TODO: Refine.) ...
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import binascii import compiler import httplib import json import keyword import logging import re import socket import string import struct import time import traceback impor...
import ldapdb.models from django.contrib.auth.models import Group, User from django.db import models from django.utils.encoding import smart_unicode from ldapdb.models import fields from ipynbsrv.wui.signals.signals import * from random import randint class Backend(models.Model): ''' The backend model is used...
""" Django settings for model_my_watershed project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ from base import * # NOQA # SITE CONFIGURATION # Hosts/domai...
class Person(object): def __init__(self, rachio): self.rachio = rachio def getInfo(self): url = '%sperson/info' % (self.rachio.server) (resp, content) = self.rachio.h.request(url, 'GET', headers=self.rachio.headers) return (resp, content) def get(self, id): url = '%sperson/%s' % (self.rachio.server, id)...
#pylint: disable=W,C,R from datetime import datetime import os import sys import asyncio import glob from subprocess import PIPE, Popen from threading import Thread import shlex import discord from redbot.core import commands from redbot.core import Config try: from Queue import Queue, Empty except ImportError: ...
# -*- coding: utf-8 -*- import plotly.graph_objs as go from plotly import tools import copy from .layout import ElementBuilder from .plot import AtomBuilder from .subplot import SubPlotSpec, PlotCanvas import itertools class FigureHolder(object): def __init__(self, figure): self.figure = figure def ...
from __future__ import unicode_literals import copy import logging import re from django.conf import settings from django.core import validators from django.contrib.auth import password_validation from django.db import transaction from django.db.models import Q from django.template.defaultfilters import slugify from ...
""" Parse iCal data to Events. """ # for UID generation from random import randint from datetime import datetime, timedelta, date from typing import Optional from dateutil.relativedelta import relativedelta from dateutil.rrule import rrule, rruleset, rrulestr from dateutil.tz import UTC, gettz from icalendar import C...
import httplib from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.core.mail import EmailMultiAlternatives from django.contrib.sites.models import Site from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.templ...
import requests from graph import Graph from distance import calculate_distance import sys def import_cities(): ''' Import the city flight connection path JSON file, Returns dictionary of cities ''' # url = 'cities_with_airports.json' url = 'https://codefellows.github.io/sea-python-401d...
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 requir...
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import compiler import httplib import json import keyword import logging import re import socket import string import struct import time import traceback import urllib2 import...
__version__ = '0.5.2'
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import (division, print_function, absolute_import, unicode_literals) import numpy as np from radial import orbit, dataset, rv_model, prior import scipy.signal as ss import matplotlib.pyplot as plt import matplotlib.markers as mrk im...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime from flask import url_for from quokka.core.db import db from quokka import admin from quokka.modules.accounts.models import User # Commom class Publishable(object): published = db.BooleanField(default=False) created_at = db.DateTimeField(default=da...
import binary_snapshot_io import os.path import numpy as np import iccpy.cosmology def _get_filename(directory, file, snapnum=0, filenum=0): if filenum==0 and snapnum==0: filename = directory + "/" + file if os.path.isfile(filename): return filename if filenum==0: filename = "%s/...
# -*- coding: utf-8 -*- from base64 import urlsafe_b64encode import rpc import conf import random import string try: import zlib as binascii except ImportError: import binascii class PutExtra(object): params = {} mime_type = 'application/octet-stream' crc32 = "" check_crc = 0 def put(uptoken, key, data, extra...
#!/usr/bin/env python """ Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import binascii import compiler import httplib import json import keyword import logging import re import socket import string import struct import time import traceback impor...
__version__ = '0.1.99' __version__date__ = '29/06/2018' # histórico # # - ?.?.? - 20??/??/?? # # - 0.1.99 - 2018/06/29 # . RH - Atualizações # . Comandos utilitários # # - 0.1.98 - 2018/06/19 # . insumos/Previsão - Diversos desenvolvimentos # # - 0.1.97 - 2018/06/05 # . CD - Histórico simples de OP no CD # # -...
from dessn.framework.samplers.scaffold import GenericSampler import os import numpy as np from time import time import logging class MetropolisHastings(GenericSampler): """ Self tuning Metropolis Hastings Sampler Parameters ---------- num_burn : int, optional The number of burn in steps. TODO...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import sqlite3 from tabledata import InvalidTableNameError class DatabaseError(sqlite3.DatabaseError): """ Exception raised for errors that are related to the database. .. seealso:: - `sqlite3.DatabaseErr...
"""Functions to communicate with the server using JSONRPC""" from __future__ import absolute_import, division, print_function import sys import os import time from copy import deepcopy from functools import wraps from datetime import datetime import logging from iceprod.core import constants from iceprod.core impor...
# A copy of this file is distributed with the binaries of Sniper and Benchmarks import sys, os, re, sniper_stats, sniper_config try: import json except ImportError: import localjson as json try: try: import env_setup sys.path.append(os.path.join(env_setup.benchmarks_root(), 'tools', 'scheduler')) exc...
""" This module contains utility functions to process and load various datasets. Most of the datasets are public, but are not included in the package; MNIST dataset will be automatically downloaded. There are also some classes to represent datasets. `ExampleVisiting` is an helper class that implements the stochastic s...
class FlatList(list): """ This class inherits from list and has the same interface as a list-type. However, there is a 'data'-attribute introduced, that is required for the encoding of the list! The fields of the encoding-Schema must match the fields of the Object to be encoded! """ @property ...
from collections import defaultdict, namedtuple from datetime import datetime import logging from dataactcore.config import CONFIG_BROKER from dataactcore.models.lookups import FILE_TYPE_DICT, RULE_SEVERITY_DICT from dataactcore.models.validationModels import RuleSql from dataactcore.interfaces.db import GlobalDB log...
""" FeatureMap and associated functions and classes. $Id$ """ __version__='$Revision$' from Numeric import zeros, Float from Numeric import array import topo from topo.base.sheet import Sheet from topo.base.sheetview import SheetView from topo.base.parameterizedobject import ParameterizedObject from topo.misc.util...
# Copyright 2018 The TensorFlow 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 required by applica...
#!/usr/bin/env python import inspect import itertools import logging l = logging.getLogger(name = "simuvex.s_procedure") import claripy symbolic_count = itertools.count() from .s_run import SimRun run_args = inspect.getargspec(SimRun.__init__)[0] class SimProcedure(SimRun): ADDS_EXITS = False NO_RET = Fal...
import datetime from ..emails.result_email import send_results __all__ = ['INFO', 'PASS', 'ERROR', 'log', 'start_testing', 'end_testing'] _LOGFILE = None INFO = "INFO" PASS = "PASS" ERROR = "ERROR" TEST = "TEST" _errors = 0 # Customise which log events are printed: _OUTPUT_LOGGING_LEVELS = [INFO, PASS, ERROR] d...
import sys from dataclasses import dataclass from typing import Any @dataclass class WindowsConsoleFeatures: """Windows features available.""" vt: bool = False """The console supports VT codes.""" truecolor: bool = False """The console supports truecolor.""" try: import ctypes from cty...
from collections import defaultdict, namedtuple from decimal import Decimal, DecimalException from datetime import datetime import logging from dataactcore.models.lookups import FIELD_TYPE_DICT_ID, FILE_TYPE_DICT, RULE_SEVERITY_DICT from dataactcore.models.validationModels import RuleSql from dataactcore.models.domain...
from contextlib import contextmanager from datetime import date from rorn.ResponseWriter import ResponseWriter from Task import Task from LoadValues import isDevMode from utils import * colorMap = { # Maps status names to border colors 'blocked': '#00008b', 'canceled': '#000', 'complete': '#008b00', 'deferred': ...
# coding=utf-8 # Copyright 2022 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # this file is part of 'RAX-AutoScaler' # # Copyright 2014 Rackspace US, 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 obta...
# -*- coding: utf-8 -*- import logging.config import os import os.path from flask import Flask from raven import setup_logging from raven.contrib.flask import Sentry from raven.handlers.logging import SentryHandler from flask.ext.babel import get_locale from model import init_context, init_datasources_dormitories, ...
from ConfigParser import RawConfigParser from tweepy import api, StreamListener, Stream, BasicAuthHandler class Listener(StreamListener): __slots__ = ('templates', 'output', 'triggers') def __init__(self, templates, output, triggers): super(Listener, self).__init__() self.templates = templat...
""" Righteous CLI. Usage: righteous [options] list righteous [options] create <environment> <email> <instance_type> righteous [options] stop <environment>... righteous [options] status <environment>... righteous [options] delete <environment>... righteous --version Options: -c FILE --config=FILE ...
import intake from functools import partial from intake.catalog.utils import RemoteCatalogError from suitcase.mongo_normalized import Serializer import os import pytest import shutil import tempfile import time import types from .generic import * # noqa TMP_DIR = tempfile.mkdtemp() TEST_CATALOG_PATH = [TMP_DIR] YAM...
""" General utilities """ import dataclasses import http.client import json import logging import time from collections.abc import Iterable from datetime import date, datetime, timedelta from functools import wraps from itertools import chain from operator import itemgetter import icalendar import markdown import rec...
""" Main entry point to access the on-the-fly estimation of thermochemical properties of species using quantum chemical packages such as G03, (Open)Mopac and MM4. This module contains the driver class called QMTP with its principal method .generateQMThermoData that generates a ThermoData object. A molfile class i...
# -*- coding: utf-8 -*- # Copyright 2017 Juca Crispim <juca@poraodojuca.net> # This file is part of toxicbuild. # toxicbuild 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, ...
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Support reading and parsing the dataset.xml documents from the netCDF Subset Service.""" from __future__ import print_function import logging import re import numpy as ...
# -*- coding: UTF-8 -*- """ The ``Resource`` class wraps a ``Graph`` and a resource reference (i.e. an ``URIRef`` or ``BNode``), to support a resource oriented way of working with a graph. It contains methods directly corresponding to those methods of the Graph interface that relate to reading and writing data. The di...
# -*- coding: utf-8 -*- u"""simulation data operations :copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function from pykern import pkconfig from pykern import pkio from pykern.pkcol...
# -*- coding: UTF-8 -*- from rdflib import py3compat __doc__ = py3compat.format_doctest_out(""" The ``Resource`` class wraps a ``Graph`` and a resource reference (i.e. an ``URIRef`` or ``BNode``), to support a resource oriented way of working with a graph. It contains methods directly corresponding to those methods of...
# -*- coding: utf-8 -*- """ readability.api ~~~~~~~~~~~~~~~ This module provies the core Readability API interface. """ import urllib import urlparse import oauth2 from decorator import decorator from .config import settings from .models import Bookmark, Article, Domain, Contribution, User from .helpers import is...
# -*- coding: cp1252 -*- import time from datetime import datetime import xbmc import xbmcvfs import xbmcgui import os import urllib2 import resources.lib.utils as utils from resources.lib.croniter import croniter class CronSchedule: expression = '' name = 'library' timer_type = 'xbmc' command = 'Updat...
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from requests.exceptions import ConnectionError LOGIN = "http://api.lingualeo.com/api/login" ADD_WORD = "http://api.lingualeo.com/addword" GET_TRANSLATE = "http://api.lingualeo.com/gettranslates?word=" class Lingualeo: def __init__(self, email, passw...
import os import pytest import requests @pytest.fixture(scope="session") def url(): return os.getenv("SITE", "http://localhost:5000") def test_get_templates(expect, url): response = requests.get(f"{url}/templates") expect(response.status_code) == 200 def test_post_images(expect, url): params = {"...
#!/usr/bin/python # # Tool for upgrading a db based on db version # import sys import os import getopt import pgdb config = {} config_file = "/etc/planetlab/plc_config" execfile(config_file, config) upgrade_config_file = "plcdb.3-4.conf" schema_file = "planetlab4.sql" temp_dir = "/tmp" def usage(): print "Us...
""" Code used to support old snapshots (those created from 0.9.7/r11275 onwards). $Id$ """ __version__='$Revision: 8021 $' import sys import param # CEB: Add note that snapshot can be re-saved, making updates # permanent. All functions in here should be written to support that. # CEB: code to support older snapsh...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Contains generating and parsing systems of the Chromium Buildbot Annotator. When executed as a script, this reads step name / c...
#! /usr/bin/env python3 import logging import os import re import pwd import csv import time import shutil import psutil import pathlib import datetime import subprocess from collections import OrderedDict, abc import elo import yaml from bs4 import BeautifulSoup DROPBOX_DEBUG = logging.DEBUG - 1 logger = logging.g...
import os import platform import sys from methods import get_compiler_version, use_gcc # This file is mostly based on platform/x11/detect.py. # If editing this file, make sure to apply relevant changes here too. def is_active(): return True def get_name(): return "Server" def get_program_suffix(): if ...
__author__ = 'Chaya D. Stern' import numpy as np import logging import sys verbose = False def RMSE(scanSet, db): ''' :param model: TorsionScanSet :param db: pymc database :return: numpy array of rmse ''' N = len(scanSet.qm_energy) errors = np.zeros(len(db.trace('mm_energy')[:])) fo...
import os import platform import sys # This file is mostly based on platform/x11/detect.py. # If editing this file, make sure to apply relevant changes here too. def is_active(): return True def get_name(): return "Server" def get_program_suffix(): if sys.platform == "darwin": return "osx" ...
# Copyright 2014, Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain # rights in this software. from __future__ import division __version__ = "0.5.0" from toyplot.canvas import Canvas def bars(a, b=None, c=None, along="x", baseline="stack...
# -*- coding: utf-8 -*- from functools import lru_cache from collections import namedtuple import refo import iepy TokenToMatch = namedtuple("TokenToMatch", "token pos kinds, is_subj is_obj") def rule(answer, priority=0): if answer not in [False, True]: message = "Rule has invalid answer, it has to be...
from FAdo.fa import * import math class MiniTasksAutomatonInterface(): _separator_string = " " _negation_string = "not" _anything_string = "anything" _and_string = "and" _or_string = "or" _sigma = [] for i in range(26): _sigma.append(chr(ord('A') + i)) def __init__(self, desc...
import json import jsonpickle import ifind.common.make_json_serializable class Response(object): """ Models a Response object for use with ifind's search interface. Response Attributes: query_terms: string representation of original query terms results: list representation of retrie...
"""Main behavioral methods and argument routing for GAM.""" import base64 import configparser import csv import datetime import difflib from email import message_from_string import hashlib import io import json import mimetypes import os import pkg_resources import platform from pathlib import Path import random from ...
import os import sys import re import gevent from gevent import monkey monkey.patch_all() import requests from lxml import etree from utils import get_image_info from more_itertools import chunked REQUEST_HEADERS = {'User-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko)...
# -*- coding: utf-8 -*- """ This module can do slight modifications to a wiki page source code such that the code looks cleaner. The changes are not supposed to change the look of the rendered wiki page. The following parameters are supported: &params; -always Don't prompt you for each replacement. Warnin...
from numbers import Integral try: from StringIO import StringIO except Exception: from io import StringIO import numpy as np from numpy import in1d, sqrt import itertools # The sparse matrix for the orbital/bond currents from scipy.sparse import csr_matrix from scipy.sparse import isspmatrix_csr from scipy.sp...
from django.conf import settings __version_info__ = (1, 2, 0, 'dev') # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to a...
import bson from dateutil import tz from nltk.chat.eliza import eliza_chatbot as chatbot import pymongo from xmlrpc.server import BaseHandler from xmlrpc.util import signature class IRC(BaseHandler): MESSAGE = 'msg' USERJOIN = 'user_join' USERLEFT = 'user_left' USERQUIT = 'user_quit' @staticmet...
from __future__ import absolute_import from functools import partial from sympy import S, finite_diff_weights from devito.finite_differences import Differentiable from devito.tools import Tag __all__ = ['first_derivative', 'second_derivative', 'cross_derivative', 'generic_derivative', 'second_cross_deriv...
""" Test some lldb command abbreviations. """ import os, time import unittest2 import lldb from lldbtest import * class AbbreviationsTestCase(TestBase): mydir = "abbreviation_tests" def test_nonrunning_command_abbreviations (self): self.expect("ap script", startstr = "The fol...
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # import json from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.http.response import Http...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Semestrální práce k předmětu BI-PYT, jejížm ukolem bylo rozpůlit obrázek v pulce a schovat do něj další obrázek a textový soubor nebo wav soubor""" from PIL import Image import ntpath import struct import sys import os import tkinter as tk import tkinter.ttk as ttk im...
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This pro...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2008 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 Björn Ricks <bjoern.ricks@googlemail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as ...
""" SEP: 0010 Title: Stellar Web Authentication Author: Sergey Nebolsin <sergey@mobius.network>, Tom Quisel <tom.quisel@gmail.com>, Leigh McCulloch <@leighmcculloch> Status: Active Created: 2018-07-31 Updated: 2019-12-04 Version 1.3.0 """ import os import time from typing import List, Tuple from .ed25519_public_key_s...
import deepsecurity as api from deepsecurity.rest import ApiException as api_exception import codecs import re import time import pickle import os #DSM Host & port (must end in /api) HOST='https://app.deepsecurity.trendmicro.com:443/api' #API Key from the DSM defined in an environment varaible called "API_KEY" API_KEY...
## ## Copyright 2016 SRI International ## See COPYING file distributed along with the package for the copyright and license terms ## """ Create the SIBIS Session Object =============================== The SIBIS Session Object provides a single point of reference to access multiple systems. For example, XNAT, REDDCap,...
# -*- Mode: Python; test-case-name: flumotion.test.test_http -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License ...
# coding: utf-8 from __future__ import unicode_literals import re import json from furl import furl from collections import OrderedDict from .utils import camelize import warnings import base64 import zeep import zeep.transports from lxml import etree from requests import Request from rakuten_ws.utils import xm...
import numpy as np import pandas as pd import sys sys.path.append("..") import matplotlib.pyplot as plt import seaborn as sns from sklearn.linear_model import LogisticRegression import src.data.extractor.preprocessing as preprocessing from sklearn.model_selection import train_test_split from sklearn.metrics import clas...
import jwt from django.contrib.auth import get_user_model from django.utils.encoding import smart_text from django.utils.translation import ugettext as _ from rest_framework import exceptions from rest_framework.authentication import ( BaseAuthentication, get_authorization_header ) from rest_framework_jwt.setting...
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software cons...
import requests import os import sys import tarfile import zipfile from cStringIO import StringIO from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter, \ UnicodeCSVDictReader from dateutil import parser from datetime import datetime, date, timedelta import calendar from plenario.database import task_session...
import logging import plistlib from six import PY2 from six.moves.urllib import parse as urlparse import time from libpytunes.Song import Song from libpytunes.Playlist import Playlist logger = logging.getLogger(__name__) try: import xspf xspfAvailable = True except ImportError: xspfAvailable = False ...
"""Field declarations.""" import abc import copy class BaseField(object, metaclass=abc.ABCMeta): """ Base class for all fields. Subclasses should override `transform_to_storage` and `transform_from_storage`. They may optionally also override `validate`, but should call `super().validate` if doin...
""" Bounding regions and bounding boxes. """ __version__='$Revision$' from numpy import inf ### JABALERT: The aarect information should probably be rewritten in ### matrix notation, not list notation, so that it can be scaled, ### translated, etc. easily. ### import param from param.parameterized import get_occupied...