text
stringlengths
12
6.59M
from django.utils import six from django_filters.rest_framework import DjangoFilterBackend from rest_framework import decorators, permissions, response, status, exceptions, serializers as rf_serializers from nodeconductor.core import (views as core_views, exceptions as core_exceptions, permissions as core_permissions,...
#!/usr/bin/env python # Every python controller needs these lines import roslib; roslib.load_manifest('practica_turtlebot_mariano') import rospy import time import math import numpy as np # The velocity command message from geometry_msgs.msg import Vector3, Twist, Quaternion, Pose, Point # The laser scan message f...
from collections import defaultdict import json import re import itertools from twitter.pants import TaskError class ParseError(TaskError): pass class AnalysisElement(object): """Encapsulates one part of the analysis. Subclasses specify which section headers comprise this part. Note that data in these object...
#!../../../../virtualenv/bin/python3 # -*- coding: utf-8 -*- # NB: The shebang line above assumes you've installed a python virtual environment alongside your working copy of the # <4most-4gp-scripts> git repository. It also only works if you invoke this python script from the directory where it # is located. If these...
""" Created on 21 Sep 2020 @author: Jade Page (jade.page@southcoastscience.com) DESCRIPTION The aws_group_configurator is a class used by aws_group_setup to collate information and make requests to the amazon greengrass API. It is dependent on aws_json_reader to collect information. """ import grp import json import...
# -*- coding: utf-8 -*- # # Sphinx-Gallery documentation build configuration file, created by # sphinx-quickstart on Mon Nov 17 16:01:26 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
# -*- coding: utf-8 -*- # # Makahiki documentation build configuration file, created by # sphinx-quickstart on Mon Feb 6 10:22:39 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
def setup(app): app.add_stylesheet('custom.css')
# Copyright (C) Linaro Limited 2015,2016,2017,2019 # Author: Matt Hart <matthew.hart@linaro.org> # Author: Milo Casagrande <milo.casagrande@linaro.org> # # This program 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 # Softwa...
# -*- coding: utf-8 -*- #Author : jeonghoonkang https://github.com/jeonghoonkang import sys import subprocess berePi_dir="/home/pi/devel/BerePi" tmp_dir=berePi_dir + "/apps/lcd_berepi/lib" sys.path.append(tmp_dir) from lcd import * def wip_chk(): cmd = "ip addr show wlan0 | grep inet | awk '{print $2}' | cut -d/...
from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.reverse import reverse from django.core.urlresolvers import resolve, Resolver404 from django.db.models import Q from schools.models import School from users.models import User from .models import Question, ...
# -*- coding: utf-8 -*- import os import json from django.test import TestCase from django.core.urlresolvers import reverse from os import path from django.conf import settings from apps.teams.models import Team, Invite, TeamVideo, \ Application, TeamMember, TeamVideoLanguage from messages.models import Message ...
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Founda...
from oslo_log import log from tempest import config from tempest.common import fixed_network from tempest.common import waiters from tempest.common.utils import data_utils from tempest.scenario import manager from argus import util ARGUS_CONF = util.get_config() CONF = config.CONF LOG = log.getLogger(__name__) # Sta...
# coding: utf-8 import unicodedata from datetime import datetime, timedelta import urlparse import pymongo from xylose.scielodocument import Article, Journal from decorators import LogHistoryChange def remove_accents(data): if not isinstance(data, unicode): unicode(data) try: return u''.joi...
import collections import socket import sys import time from aspen.engines import CooperativeEngine from aspen.sockets import packet from aspen.sockets.loop import Die import tornado.ioloop import tornado.httpserver import tornado.wsgi class TornadoBuffer(collections.deque): """Model a buffer of items. Th...
#!/usr/bin/env python """Tests for the Model Migration feature""" from __future__ import print_function import argparse import logging import os from subprocess import CalledProcessError import sys from time import sleep from assess_user_grant_revoke import User from deploy_stack import BootstrapManager from jujucha...
## Just the JSON decoder, because I only need a decoder for now. #from rpython.rlib.unicodedata import unicodedb_6_2_0 as unicodedb from rpython.rlib.listsort import make_timsort_class from rpython.rlib import rfile from rpython.rlib.rstring import UnicodeBuilder from rpython.rlib.objectmodel import specialize, always_...
import sys import envi import logging import envi.archs.arm as e_arm import vivisect import vivisect.impemu.emulator as v_i_emulator import visgraph.pathcore as vg_path from envi.archs.arm.regs import * logger = logging.getLogger(__name__) verbose = True class ArmWorkspaceEmulator(v_i_emulator.WorkspaceEmulator, e_...
#*******************************************************************************************# #********* Export volume, mass, weight and volume centroid coordinates to .csv file ********# #********* by Djordje Spasic ***************************************************************# #********* issworld2000@yahoo.com 28-J...
"""Setup CLI configuration.""" # :license: MIT, see LICENSE for more details. import os.path import click import SoftLayer from SoftLayer import auth from SoftLayer.CLI import config from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting from SoftLayer import u...
"""Export an image.""" # :license: MIT, see LICENSE for more details. import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import helpers @click.command() @click.argument('identifier') @click.argument('uri') @click.option('--ibm-api-key', ...
#from interface.services.icontainer_agent import ContainerAgentClient #from pyon.net.endpoint import ProcessRPCClient from pyon.public import Container, IonObject #from pyon.util.log import log from pyon.util.containers import DotDict from pyon.util.int_test import IonIntegrationTestCase from interface.services.sa.ida...
from functools import reduce from os.path import basename, splitext from zipfile import ZipFile from functools import lru_cache from io import BytesIO import pandas import requests import dill as pickle from . import Singleton from .aus_map import AusMap from .image_provider import RequiresData from .shape import sha...
#!/usr/bin/env python # coding=utf-8 from __future__ import division, print_function, unicode_literals import functools import hashlib import os.path import re import sys import pkg_resources import sacred.optional as opt from sacred import SETTINGS from sacred.utils import is_subdir, iter_prefixes, basestring MB =...
from common.models import Tag from .client import SalesforceClient import json import requests import threading ''' Project model maps to the Salesforce Campaign object ''' client = SalesforceClient() def run(request): response = SalesforceClient().send(request) print(f'{response.status_code}: {response.text}...
# -*- coding: utf-8 -*- ''' The status beacon is intended to send a basic health check event up to the master, this allows for event driven routines based on presence to be set up. The intention of this beacon is to add the config options to add monitoring stats to the health beacon making it a one stop shop for gathe...
""" Support for APT (Advanced Packaging Tool) .. important:: If you feel that Salt should be using this module to manage packages on a minion, and it is using a different module (or gives an error similar to *'pkg.install' is not available*), see :ref:`here <module-provider-override>`. For reposit...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains functions for computing robust statistics using Tukey's biweight function. """ import numpy as np from .funcs import median_absolute_deviation from ..utils.decorators import deprecated_renamed_argument __all__ = ['biweight_loc...
""" A module for shelling out. Keep in mind that this module is insecure, in that it can give whomever has access to the master root execution access to all salt minions. """ import base64 import fnmatch import functools import glob import logging import os import re import shutil import subprocess import sys import ...
# -*- coding: utf-8 -*- __all__ = ["BoxLeastSquares", "BoxLeastSquaresResults"] import numpy as np from ...tests.helper import assert_quantity_allclose from ... import units from ..lombscargle.core import has_units, strip_units from . import methods def validate_unit_consistency(reference_object, input_object): ...
# -*- coding: utf-8 -*- import logging log = logging.getLogger(__name__) def multipath_list(): ''' Device-Mapper Multipath module CLI Example: .. code-block:: bash salt '*' devmap.multipath_list salt '*' devmap.multipath flush mpath1 ''' cmd = 'multipath -l' return __salt__['cmd.ru...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # TODO: need to download some images used by the jquery-ui css file: # images/ui-icons_888888_256x240.png import os data_path = os.path.join(os.path.abspath(os.path.dirname(__file__)),'data') ipynb_js_script = """ <script class="jsbin" src="{data_path}/j...
import os def _get_django_admin(bin_env): if not bin_env: da = 'django-admin.py' else: # try to get pip bin from env if os.path.exists(os.path.join(bin_env, 'bin', 'django-admin.py')): da = os.path.join(bin_env, 'bin', 'django-admin.py') else: da = bin_en...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains helper functions and classes for handling metadata. """ from functools import wraps import warnings from collections import OrderedDict from collections.abc import Mapping from copy import deepcopy import numpy as np from astro...
''' Support for Portage :optdepends: - portage Python adapter For now all package names *MUST* include the package category, i.e. :code:`'vim'` will not work, :code:`'app-editors/vim'` will. ''' # Import python libs import logging log = logging.getLogger(__name__) HAS_PORTAGE = False # Import third party libs ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Simbad query class for accessing the Simbad Service """ from __future__ import print_function import copy import re import json import os from collections import namedtuple import warnings import astropy.units as u from astropy.utils.data import get_pk...
# -*- coding: utf-8 -*- ''' Oracle DataBase connection module :maintainer: Vladimir Bormotov <bormotov@gmail.com> :maturity: new :depends: cx_Oracle :platform: all :configuration: module provide connections for multiple Oracle DB instances. **OS Environment** .. code-block:: yaml ORACLE_HOME: pa...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import requests import io import numpy as np #------------------ from ..query import BaseQuery from ..utils.class_or_instance import class_or_instance from ..utils import commons import astropy.units as u import astro...
# -*- coding: utf-8 -*- ''' Extract the pillar data for this minion ''' # Import python libs import collections # Import third party libs import yaml # Import salt libs import salt.pillar import salt.utils from salt._compat import string_types __proxyenabled__ = ['*'] def get(key, default='', merge=False, delim='...
# Copyright 2016 Quora, 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, so...
# -*- coding: utf-8 -*- ''' Execute puppet routines ''' # Import python libs import logging import os import yaml import datetime # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError log = logging.getLogger(__name__) def __virtual__(): ''' Only load if puppet is installed ...
# -*- coding: utf-8 -*- ''' Module for returning various status data about a minion. These data can be useful for compiling into stats later. ''' # Import python libs import os import re import fnmatch # Import salt libs import salt.utils __opts__ = {} # TODO: Make this module support windows hosts # TODO: Make t...
from django.contrib.messages.context_processors import messages from django.http.response import HttpResponseBadRequest from rest_framework.generics import get_object_or_404 from rest_framework.parsers import JSONParser from atlas.ami.client import AMIClient from atlas.prodtask.models import ActionStaging, ActionDefau...
# -*- coding: utf-8 -*- ''' Support for YUM .. note:: This module makes heavy use of the **repoquery** utility, from the yum-utils_ package. This package will be installed as a dependency if salt is installed via EPEL. However, if salt has been installed using pip, or a host is being managed using salt...
""" Proxy Minion to manage Restconf Devices :codeauthor: Jamie (Bear) Murphy <jamiemurphyit@gmail.com> :maturity: new :platform: any Usage ===== .. note:: To be able to use this module you need to enable to RESTCONF on your device and have https enabled. Cisco Configuration example: .. code-bl...
# -*- coding: utf-8 -*- ''' General management functions for salt, tools like seeing what hosts are up and what hosts are down ''' # Import python libs from __future__ import absolute_import, print_function import os import operator import re import subprocess import tempfile import time # Import 3rd-party libs impor...
# -*- coding: utf-8 -*- ''' Functions to interact with the pillar compiler on the master ''' from __future__ import absolute_import # Import salt libs import salt.pillar import salt.utils.minions def show_top(minion=None, saltenv='base'): ''' Returns the compiled top data for pillar for a specific minion. I...
# -*- coding: utf-8 -*- ''' Management of Gentoo configuration using eselect ================================================ A state module to manage Gentoo configuration via eselect .. code-block:: yaml profile: eselect.set: target: hardened/linux/amd64 ''' # Define a function alias in or...
# -*- coding: utf-8 -*- ''' Control the Salt command interface ================================== This state is intended for use from the Salt Master. It provides access to sending commands down to minions as well as access to executing master-side modules. These state functions wrap Salt's :ref:`Python API <python-ap...
# -*- coding: utf-8 -*- ''' Management of SmartOS Standalone Compute Nodes :maintainer: Jorge Schrauwen <sjorge@blackdot.be> :maturity: new :depends: vmadm, imgadm :platform: smartos .. versionadded:: 2016.3.0 .. code-block:: yaml vmtest.example.org: smartos.vm_present: - config...
# -*- coding: utf-8 -*- ''' Microsoft IIS site management This module provides the ability to add/remove websites and application pools from Microsoft IIS. .. versionadded:: 2016.3.0 ''' # Import python libs from __future__ import absolute_import # Define the module's virtual name __virtualname__ = 'win_iis' de...
# -*- coding: utf-8 -*- ''' Installation of Windows Updates using the Windows Update Agent .. versionadded:: 2017.7.0 Salt can manage Windows updates via the "wua" state module. Updates can be installed and removed. Update management declarations are as follows: For installation: .. code-block:: yaml # Install...
# -*- coding: utf-8 -*- ''' Some of the utils used by salt ''' # Import python libs from __future__ import absolute_import, division, print_function import contextlib import copy import collections import datetime import distutils.version # pylint: disable=import-error,no-name-in-module import errno import fnmatch im...
# -*- coding: utf-8 -*- ''' Some of the utils used by salt ''' from __future__ import absolute_import from __future__ import print_function # Import python libs import contextlib import copy import collections import datetime import distutils.version # pylint: disable=E0611 import errno import fnmatch import hashlib ...
''' Some of the utils used by salt ''' from __future__ import absolute_import # Import Python libs import os import re import imp import random import sys import fcntl import socket import logging import inspect import hashlib import datetime import tempfile import shlex import shutil import subprocess import time imp...
from flask.blueprints import Blueprint import logging from flask_login import login_required, current_user from gevent import Greenlet from waitlist.data.perm import perm_admin, perm_settings, perm_officer,\ perm_management, perm_accounts, perm_dev, perm_leadership,\ perm_fleetlocation, perm_bans from flask.te...
# -*- coding: utf-8 -*- ''' Some of the utils used by salt ''' # Import python libs from __future__ import absolute_import, division, print_function import contextlib import copy import collections import datetime import distutils.version # pylint: disable=import-error,no-name-in-module import errno import fnmatch im...
''' Some of the utils used by salt ''' import os import imp import sys import socket import logging from calendar import month_abbr as months from salt.exceptions import SaltClientError log = logging.getLogger(__name__) # Do not use these color declarations, use get_colors() # These color declarations will be remo...
''' Some of the utils used by salt ''' from __future__ import absolute_import # Import python libs import os import re import imp import sys import time import shlex import shutil import random import socket import logging import inspect import hashlib import datetime import platform import tempfile import subprocess ...
#!/usr/bin/python import os import sys import platform import shutil import subprocess def create_page(orig_path, page_name, page_header): orig = open(orig_path) dest = open("Temp/" + os.path.split(orig_path)[1] + ".txt", "w") dest.write("/** @page " + page_name + " " + page_header + "\n") dest.write(...
#!/usr/bin/env python3 # file: dvd2webm.py # vim:fileencoding=utf-8:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2016-02-10 22:42:09 +0100 # Last modified: 2017-04-30 14:06:45 +0200 # # To the extent possible under law, R.F. Smith has waived all copyright and # related or neighboring rights to dvd2web...
import sys import itertools import re import random import numpy as np COMMENT_PREFIX = '#' def finites(a): """Return finite elements as a flat array.""" return np.array(filter(np.isfinite, a.flat)) def impute(a): """Set missing (non-finite) values to mean. Return their number.""" cnt = 0 m = fin...
import os import datetime from configurations import Configuration, values class Common(Configuration): # Application settings ENVIRONMENT = values.Value(environ_prefix=None) HTTP_PROTOCOL = 'https' # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirna...
import numpy as np import logging import psutil import sys logger = logging.getLogger(__name__) level_log = logging.INFO if level_log == logging.INFO: stream = sys.stdout lformat = '%(name)-15s %(levelname)-8s %(message)s' else: stream = sys.stderr lformat = '%%(relativeCreated)5d (name)-15s %(leve...
# Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, Inc. # 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...
# 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 # distributed under th...
import collections import logging from bndl.execute.job import Job, Stage, Task from functools import partial import traceback logger = logging.getLogger(__name__) def schedule_job(dset, workers=None): ''' Schedule a job for a data set :param dset: The data set to schedule ''' ctx = ds...
# -*- coding: utf-8 -*- from __future__ import ( print_function, division, generators, absolute_import, unicode_literals ) import networkx as nx import pytest @pytest.fixture def graph(): g = nx.DiGraph() g.add_node(0, split='segment', state={}) g.add_node(1, split='age', state={'segment': 123...
import re from os.path import isdir from enstaller.utils import abs_expanduser, comparable_version DIST_PAT = re.compile(r'(file://.*[\\/]|http://.+/)([^\\/]+)$') def split_dist(dist): """ splits a distribution, e.g. 'http://www.example.com/repo/foo.egg', into repo and filename ('http://www.example.com/...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Mara Parser ''' import ply.yacc as yacc from lexer import tokens # pylint: disable=W0611 from lexer import KEYWORDS import node import util ERROR_WINDOW = 10 class ParseError(Exception): def __init__(self, tok, lexer): data = lexer.lexdata pos ...
import os import unittest from numpy import allclose, ravel import nose from enthought.kiva import agg # FIXME: # These tests are broken, and Peter promised to fix it at some point. class Test_Save(unittest.TestCase): format_output_map = { "rgb24": [255,255,255,255,255,255,255,0,0,255,0,0], ...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from os.path import expanduser from threading import Lock from time import sleep import oursql from classes import BaseTask import config import wiki # Valid submission statuses: STATUS_NONE = 0 STATUS_PEND = 1 STATUS_DECLINE = 2 STATUS_ACCEPT = 3 c...
# -*- coding: utf-8 -*- from flask import g, jsonify from .. import app, lastuser from coaster.views import load_models, render_with from boxoffice.models import Organization, ItemCollection def jsonify_dashboard(data): return jsonify(orgs=[{'id': org.id, 'name': org.name, 'title': org.title, 'url': '/o/'+org.na...
from bragly.cli import parse_args import arrow # Test argument generation def check_args(args, result_keys): args = args.split() parser, args = parse_args(args) assert (set(result_keys) == set(args.keys())) def test_args(): test_cases = [ { 'args': 'w test message', ...
from collections import defaultdict from eva_cttv_pipeline import utilities def process_gene(consequence_type_dict, variant_id, ensembl_gene_id, so_term): consequence_type_dict[variant_id].append(ConsequenceType(ensembl_gene_id, SoTerm(so_term))) def process_consequence_type_file_tsv(snp_2_gene_filepath): ...
from django.shortcuts import render from django.views.generic import TemplateView from django.shortcuts import redirect from .forms import ProfessorEvaluateForm from ..course.models import Course from .models import Group_User # Create your views here. class ProfessorEvaluateView(TemplateView): template_name = "dashb...
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, exceptions, _ from openerp.tools import DEFAULT_SERVER_TIME_FORMAT from dateutil.relativedelta import relativedelta from datetime import datetime f...
#!/usr/bin/env python3 """ EllipticCurve class, functions, and instances of SEC2 elliptic curves TODO: document duck-typing and static typing design choices """ from hashlib import sha256 from math import sqrt from typing import Tuple, NewType, Union from btclib.numbertheory import mod_inv, mod_sqrt, legendre_symbo...
""" DC Forward Simulation ===================== Forward model two conductive spheres in a half-space and plot a pseudo-section. Assumes an infinite line source and measures along the center of the spheres. INPUT: loc = Location of spheres [[x1, y1, z1], [x2, y2, z2]] radi = Radius of spheres [r1, r2] param =...
#!/usr/bin/env python2.7 # Create dictionary of seismic synthetics import os, sys sys.path.append(os.path.abspath('..')) import numpy as np import matplotlib.pyplot as plt import scipy.misc as sp import seispy.GeologicalModelling as GM import seispy.SeismicModelling2D as SM filepath = './datasets/seismic/syntheti...
import subprocess import itertools import os import sys from distutils.version import StrictVersion try: import ipdb as pdb except ImportError: import pdb import click import localdev.main from .cloud import CloudClient, get_aldryn_host from .check_system import check_requirements from .utils import ( hr...
import logging from collections import defaultdict from pprint import pformat # noqa from banal import ensure_list from followthemoney import model from followthemoney.graph import Graph from followthemoney.types import registry from aleph.core import es from aleph.model import Entity from aleph.logic import resolve...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import weatherinfo import config import exitutils from logsupport import ConsoleError, ConsoleInfo, ConsoleWarning import isy class GetTempsToISY(object): def __init__(self): pass def SendTemps(self, alert): """ params: Station, (Fieldspec Var)+ where Fieldspec = C|F:fieldname Var = S|I|L:name) """ stat...
import alltheitems.__main__ as ati import bottle import collections import contextlib import datetime import itertools import json import pathlib import random import re import xml.sax.saxutils import alltheitems.item import alltheitems.world class FillLevel: def __init__(self, stack_size, total_items, max_slots...
import os import json from .core import FunctionExpression class ExprFunc(object): def __init__(self, name, doc): self.name = name self.doc = doc self.__doc__ = """{0}(*args)\n {1}""".format(name, doc) def __call__(self, *args): return FunctionExpression(self.name, *args) ...
# Lint as: python3 """This script is used to build and train a nutrient-prediction ML model.""" # Define imports and constants import os import json import numpy as np import pandas as pd import sklearn.model_selection import tensorflow as tf from tensorflow import keras from tensorflow.keras.preprocessing import text...
# -*- coding: utf-8 -*- # # # Copyright 2013 Netflix, 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 ...
# -*- coding: utf-8 -*- # # license: AGPLv3, see LICENSE for details. In addition we strongly encourage # you to buy us beer if we meet and you like the software. """API factory.""" from eve import Eve # from eve_docs import eve_docs # from flask.ext.bootstrap import Bootstrap from amivapi import ( user...
import matplotlib.pyplot as pl from collections import Counter import sqlite3, os import os.path import numpy as np def analysis_graph(): ROOT_DIR = os.path.dirname(os.pardir) db_path = os.path.join(ROOT_DIR, "TweetAnalysis.db") with sqlite3.connect(db_path) as db: conn = db c = conn.curs...
import os, sys, shutil, glob, numpy, csv, cPickle import scipy.io.wavfile as wavfile import audioBasicIO import audioTrainTest as aT import audioSegmentation as aS import matplotlib.pyplot as plt import scipy.spatial.distance minDuration = 7; def classifyFolderWrapper(inputFolder, modelType, modelName, outputMode=Fals...
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # """ Provides the build configuration as special dictionaries that directly export their namespaces. Should read, or be provided, some sort of configuration information relative to the build being done. For now, we'll intialize a static configuration suffi...
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import subprocess progs = [ { 'path': 'apps/EHD', 'travis': True }, { 'path': 'apps/fractal/cpp', 'travis': False }, { 'path': 'apps/GenMAI', 'travis': True }, { 'path': 'apps/m...
from collections import defaultdict import logging import networkx import simuvex import claripy import angr from ..entry_wrapper import EntryWrapper from .cfg_base import CFGBase from ..analysis import Analysis from ..errors import AngrCFGError, AngrError l = logging.getLogger(name="angr.analyses.cfg") class CFGNo...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2014, Anima Istanbul # # This module is part of anima-tools and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause import os import re import logging from stalker.db import DBSession import hou from .. import utils from anima.env import...
"""Multi-label classification decoders using network-inspired architectures. ## Binary relevance decoder (independent binary classifier per label). @@DecoderBR ## Sequence prediction decoder (one label prediction per timestep). @@DecoderRNN @@DecoderAttRNN """ import tensorflow as tf import tensorflow.contrib.seq2s...
#!/usr/bin/env python3.5 # See Rose Perrone's answer at # http://stackoverflow.com/questions/2429511/why-do-people-write-usr-bin-env-python-on-the-first-line-of-a-python-script?rq=1 from colorama import init, deinit, Fore, Back, Style from datetime import datetime, timedelta, date import argparse import re import coll...