text
stringlengths
17
737k
#!/usr/bin/env python import fnmatch import os from subprocess import call rootPath = 'ludumdare26' pattern = '*.coffee' print 'Compiling coffeescript files...' for root, dirs, files in os.walk(rootPath): for filename in fnmatch.filter(files, pattern): print( os.path.join(root, filename)) call(...
#!/usr/bin/env python import os import sys import json import subprocess import shutil import re import tempfile # Config VG_CONF_PATH = '/usr/local/etc/voltgrid.conf' # Default ID for spawning and mounting, override in voltgrid.conf DEFAULT_UID = 48 DEFAULT_GID = 48 # Magic Vars CONFIG_EXCEPTION = 64 GIT_EXCEPTIO...
import os import sys from converter import Converter from extensions import valid_input_extensions, valid_output_extensions from qtfaststart import processor class MkvtoMp4: def __init__(self, file, FFMPEG_PATH="FFMPEG.exe", FFPROBE_PATH="FFPROBE.exe", delete=True, output_extension='mp4', relocate_moov=True, vide...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ProductTemplate(models.Model): _inherit = "product.template" can_be_expensed = fields.Boolean(string="Can be Expensed", help="Specify whether the product can be selec...
''' OurBricks-Blender Copyright (c) 2011, Katalabs 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 copyright notice, this list of conditio...
# -*- coding: utf-8 -*- """ Simple helper for sorting when your ordinary memory wont cut it. """ import itertools import sys import tempfile import operator import json import marshal import functools try: import cPickle as pickle except: import pickle import heapq __author__ = 'Vajk Hermecz' __email__ = 'vh...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
#coding=utf-8 import json, os, base64, sys path = os.path.dirname(__file__) emojis = json.load(open(os.path.join(path, "emojis.json"))) chars = json.load(open(os.path.join(path, "mime.json"))) encode_dict = dict(zip(chars, emojis)) decode_dict = dict(zip(emojis, chars)) if sys.version_info.major == 2: emojisize = ...
#!/usr/bin/env python import sys def read(fn): return [fn(x) for x in sys.stdin.readline().split()] def ranges(upvotes, compare): """ Creates an array of tuples representing the distance each index is from the start and end of the range each it is in such that a < b, a <= i < j <= b, and compar...
#!/usr/bin/env python from __future__ import division import roslib import rospy import rosparam import copy import cv import cv2 import numpy as np import threading import dynamic_reconfigure.server from cv_bridge import CvBridge, CvBridgeError from sensor_msgs.msg import Image from std_msgs.msg import Float32, Header...
# The MIT License (MIT) # Copyright (c) 2015 Adam Anh Doan Kim Caramés # 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 restriction, including without limitation the rights # to use,...
# -*- encoding: utf-8 -*- import types import yaml import time # used to eval time.strftime expressions import logging import pooler import netsvc import misc from config import config logger_channel = 'tests' class YamlImportException(Exception): pass class YamlImportAbortion(Exception): pass class YamlT...
from ..utils import * ## # Hero Powers # Fireblast (Jaina Proudmoore) class CS2_034: activate = Hit(TARGET, 1) # Fireblast (Medivh) class CS2_034_H1: activate = CS2_034.activate ## # Minions # Water Elemental class CS2_033: events = Damage().on( lambda self, target, amount, source: source is self and Freeze...
import sys import os from os.path import join, isdir, isfile import re import shutil import tempfile from StringIO import StringIO import urllib2 from paver.easy import * from paver.setuputils import setup, find_package_data ROOT_DIR = path(__file__).dirname() SOURCE_DIR = ROOT_DIR/'src' TEST_DIR = ROOT_DIR/'utest' D...
"""The backbone of pax """ import logging import inspect from configparser import ConfigParser, ExtendedInterpolation import glob import re import os from io import StringIO from pluginbase import PluginBase import pax from pax import units # Store the directory of pax (i.e. parent dir of this file's directory) as...
"""Code to handle a Xiaomi Gateway.""" import logging from micloud import MiCloud from miio import DeviceException, gateway from miio.gateway.gateway import GATEWAY_MODEL_EU from homeassistant.exceptions import ConfigEntryAuthFailed from homeassistant.helpers.entity import Entity from homeassistant.helpers.update_coo...
# -*- coding: utf-8 -*- """ /*************************************************************************** Svir A QGIS plugin OpenQuake Social Vulnerability and Integrated Risk ------------------- begin : 2013-10-24 copyright ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from asdf.yamlutil import tagged_tree_to_custom_tree from asdf import tagged from asdf import yamlutil from .basic import TransformType, ConstantType from ......modeling.core import Model from ......modeling.compound import Comp...
from __future__ import unicode_literals, division, absolute_import import logging from bs4 import BeautifulSoup from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests log = logging.getLogger('pogcal') class InputPogDesign(object): def vali...
""" Biothings Test Case Helper Envs: TEST_TIMEOUT Individual request timeout in seconds. TEST_HOST Tornado API server URL to test on. For example: - When not specified, starts a local server - Test a remote API server: http://www.mygene.info/v3 ...
import logging import random import numpy as np try: # Import serializable if rllab is installed from rllab.core.serializable import Serializable except ImportError: Serializable = object from flow.core.params import InitialConfig from flow.core.traffic_lights import TrafficLights VEHICLE_LENGTH = 5 # l...
# DOCX object class import os, re, tempfile, logging from lxml import etree from bl.dict import Dict from bl.string import String from bl.zip import ZIP from bl.text import Text from bxml.xml import XML LOG = logging.getLogger(__file__) class DOCX(ZIP): NS = Dict(**{ # document namespaces, in word/*.xml...
from django.conf.urls import include, url from django.contrib.flatpages import views as flatpages_views from web import views urlpatterns = [ url(r'^signup/?$', views.ParticipantSignupView.as_view(), name='participant-signup'), url(r'^demographic_data/?$', views.DemographicDataCreateView.as_view(), name='demo...
#!/usr/bin/env python # # Copyright 2011 Pluric import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.escape import socket import re import os import pprint import Image import hashlib import urllib import random from tornado.options import define, options try: ...
# Template XML requests required by the USGS Inventory Service # Requesting data like it's 1999 from xml.etree.ElementTree import Element, SubElement from usgs import USGSApiKeyRequiredError def create_root_request(): root = Element("soapenv:Envelope") root.set("xmlns:xsi", "http://www.w3.org/2001/XMLSchema...
from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from .consumers import PRESENCE_ROOM from .models import Campaign def connect_info_object(sender, **kwargs): reference = kwargs.get('reference') if not reference: return if not reference.startswith('campaign:'): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from djangocms_text_ckeditor.fields import HTMLField from parler.models import TranslatableModelMixin, Trans...
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
from client import Client
#coding=utf-8 from __future__ import division from robofab.world import RGlyph from mutatorMath.objects.location import Location from mutatorMath.objects.mutator import buildMutator from mutatorScale.objects.fonts import MutatorScaleFont from mutatorScale.objects.glyphs import errorGlyph from mutatorScale.utilities.f...
from wq.db.rest.models import MultiQuerySet from wq.db.patterns.models import Identifier, Annotation def search(query, auto=True, content_type=None, authority_id=None): if content_type: ctfilter = {'content_type__model': content_type} else: ctfilter = {} idfilter = ctfilter.copy() if ...
from django import forms from django.contrib import admin from haystack.forms import SearchForm from captcha.fields import CaptchaField from cab.models import Language, Snippet, SnippetFlag, VERSIONS from registration.forms import RegistrationFormUniqueEmail def validate_non_whitespace_only_string(value): """ ...
import os class LocalRepository: CACHE_GETFILES_TIMEOUT = 3600 def __init__(self, base_dir, parser, cache=None, pagesize=5): self.base_dir = os.path.abspath(base_dir) self.parser = parser self.cache = cache self.pagesize = pagesize self.testdir(self.base_dir) def...
import json import uuid from base64 import b64decode from bson import json_util from django.conf import settings from django.core.files.base import ContentFile from django.core.urlresolvers import reverse, reverse_lazy from django.db import transaction from django.db.models import Q from django.http import HttpRespons...
import math import os import random import shutil import time from contextlib import contextmanager from datetime import datetime, timedelta from functools import partial, wraps from urlparse import urlsplit, urlunsplit from django import forms from django.conf import settings from django.core.cache import cache from ...
import re from django.conf import settings from django.utils.encoding import force_unicode from django.utils.functional import allow_lazy from django.utils.translation import ugettext_lazy # Capitalizes the first letter of a string. capfirst = lambda x: x and force_unicode(x)[0].upper() + force_unicode(x)[1:] capfirst...
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- import numpy as np from mol_f import set_bonds_f class Molecule: """ Main Class for Molecule/Cell data Internal coordinates/sizes saved in bohr Includes: Atom symbols/coordinates (_atom_name/_atom_coord) Bonds between atoms (generated when request...
# -*- coding: utf-8 -*- # © 2017 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging try: import odoorpc except: logging.error('Unable to import odoorpc') import psycopg2 import traceback from urlparse import urlparse from openerp import _, api, excepti...
from dnload.common import is_listing from dnload.glsl_access import is_glsl_access from dnload.glsl_float import interpret_float from dnload.glsl_float import is_glsl_float from dnload.glsl_int import interpret_int from dnload.glsl_int import is_glsl_int from dnload.glsl_name import is_glsl_name from dnload.glsl_operat...
from sound.synthesizer import Synthesizer from math import pi, sin class Effects(object): def __init__(self): self.synthesizer = Synthesizer() def tremolo(data, samples): effect_magnitude = 5 effect_frequency = 10 samples_per_seconds = 44100 for i in samples: ...
from flask import Flask def make_app(additional_settings=None): app = Flask(__name__) app.config.from_object('fortunate.default_settings') app.config.from_envvar('FORTUNATE_SETTINGS') if additional_settings: app.config.from_object(additional_settings) return app app = make_app() from for...
import datetime import re import json from urllib import urlencode import tornado.httpclient import tornado.web from tornado.escape import json_encode, xhtml_escape from tornado.options import define, options import torndb import postmark from recaptcha.client import captcha from base import BaseHandler, require_memb...
from django.test import TestCase from formidable.models import Formidable from formidable.serializers.validation import ( MinLengthSerializer, RegexpSerializer, ValidationSerializer, FutureDateSerializer ) class ValidationSerializerTest(TestCase): increment = 0 def setUp(self): self.form = F...
import threading import contextlib from thread import allocate_lock class CallQueue(object): def __init__(self): self.queue_lock = allocate_lock() self.exclusive_lock = allocate_lock() self.queue = list() self.callback = None self.thread = threading.Thread(target=s...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, division, absolute_import from os import linesep import tempfile import logging import warnings import numpy as np from openfisca_core import periods from openfisca_core.commons import empty_clone, stringify_array from openfisca_core.t...
import sys sys.path.append('../../') from lib.cilok import urlEncode16,tokenuri,setTTL,keyuri from lib.sampeu import getWMTS from apps.models import calendar from apps.templates import batik class Controller(object): def home(self,uridt='null'): provinsi = 'sulbar' provloc = '119.414343, -2.451294' mapzoom = '9...
#! /usr/bin/env python """Further iterator tools. """ import itertools from ..itertools_compat import ifilter, imap, ifilterfalse from .. import pairs import functools def itercons(new_head, tail): """Cons a value onto the beginning of an iterator. Like itertools.chain([new_head], tail) >>> list(iterc...
# -*- coding: utf-8 -*- import os import hashlib import time from functools import wraps from PIL import Image from django.http import HttpResponse from django.utils.crypto import get_random_string from .app_settings import ( UPLOAD_AVATAR_TEST_FUNC as test_func, UPLOAD_AVATAR_GET_UID_FUNC as get_uid, U...
from numpy import * # scalars (racenter, deccenter) in deg # scalar radius in deg # arrays (ra,dec) in deg # returns array of booleans def points_within_radius(racenter, deccenter, radius, ra, dec): return radecdotproducts(racenter, deccenter, ra, dec) >= cos(deg2rad(radius)) def points_within_radius_range(racenter,...
import random from collections import defaultdict import os from luigi import six import luigi import luigi.contrib.s3 as luigi_s3 import boto class StreamsS3(luigi.Task): """ Faked version right now, just generates bogus data. """ date = luigi.DateParameter() def run(self): """ G...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-30 20:07 from hanlp.common.constant import HANLP_URL MSRA_NER_BERT_BASE_ZH = HANLP_URL + 'ner/ner_bert_base_msra_20191230_205748.zip' CONLL03_NER_BERT_BASE_UNCASED_EN = HANLP_URL + 'ner/ner_conll03_bert_base_uncased_en_20200101_175841.zip' ALL = {}
#!/usr/bin/env python3 ''' Pipelign.py A python based program to align virus sequences. The program takes as input a single FASTA formatted file Returns a FASTA formatted alignment file ''' #********************************************************************* import sys, os, shutil, subprocess, argparse, ...
# Copyright (c) 2013, Freja Nordsiek # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and t...
"""Module for the SOP class of the Segmentation IOD.""" import itertools import logging import numpy as np from collections import defaultdict from typing import Optional, Sequence, Union, Tuple from pydicom.dataset import Dataset from pydicom.uid import UID from pydicom._storage_sopclass_uids import ( Segmentatio...
# types.py # Copyright (C) 2005, 2006, 2007, 2008, 2009 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """defines genericized SQL types, each represented by a subclass of :class:`~sqlalchemy.types....
__author__ = 'jacob' import ROOT import numpy as np from rootpy.plotting import Canvas, Graph from rootpy.plotting.style import get_style, set_style from rootpy.interactive import wait import os from root_numpy import root2array, root2rec, tree2rec # Look at r284484 data filename = os.path.join("data", "r284484.root"...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging from db.event import Event from db.shot import Shot from db.shootout_attempt import ShootoutAttempt logger = logging.getLogger(__name__) # the *other* player for certain events, i.e. the faceoff loser, a player # taking a hit or one having a shot blocked...
__version__ = '1.1.0dev1'
import pkg_resources from pathlib import Path from cryptography.exceptions import InvalidSignature from setuptools_certificate import hash_pkg, verify from .settings import config discovered_plugins = { entry_point.module_name: dict(plugon=entry_point.name, verified=False) for entry_point in pkg_resources....
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
import pickle import threading import time import networkx as nx import numpy as np import os import six import tensorflow as tf from tensorflow.python.framework.errors_impl import OutOfRangeError from deepchem.data import NumpyDataset from deepchem.metrics import to_one_hot, from_one_hot from deepchem.models.models ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2017 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
"""CAS login/logout replacement views""" from datetime import datetime from urllib import urlencode import urlparse from operator import itemgetter from django.http import HttpResponseRedirect, HttpResponseForbidden, HttpResponse from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from...
# Works only with Python3 import sys glyphs = { 'DIVIDER_RIGHT': '', 'DIVIDER_RIGHT_SOFT': '', 'DIVIDER_LEFT': '', 'DIVIDER_LEFT_SOFT': '', 'BRANCH': '', 'ELLIPSIS': '⋯', 'LINE_NUMBER': '', 'TIME1': '⌚', 'TIME2': '⏰', 'TIME3': '꒾', 'TIME4': '⏳', 'TIME5': '⌛', ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
import os import re import operator import itertools import collections class Command(object): def is_valid(self): try: # Check if both command and repo are valid self._invoke('status') except Exception: return False return super(Command, self).is_valid() class Mercurial(Command): exe = 'hg' def ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2010-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2006 Artem Pavlenko, Jean-Francois Doyon # # Mapnik 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 Li...
# The tester module. import time try: from collections import UserDict except ImportError: from UserDict import UserDict try: import queue except ImportError: import Queue as queue import can class Error(Exception): pass class Messages(dict): def __missing__(self, key): raise Er...
# Copyright (c) 2010-2014, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OpenQuake is distri...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2013, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Lic...
import simplejson import cPickle as pickle import datetime import dateutil.parser from hashlib import sha1 import logging import time import copy from zlib import compress, decompress from twisted.internet.defer import maybeDeferred, DeferredList from .requestqueuer import RequestQueuer from .unicodeconverter import co...
## helper functions for visualizing component score prior likelihoods ## last updated: 09.30.16 vitti@broadinstitute.org import matplotlib as mp mp.use('TkAgg') #set backend import matplotlib.pyplot as plt from random import choice import numpy as np import os def get_hist_bins(score,numBins): if score == "ihs": s...
from django.core.mail.backends import smtp from django.conf import settings def _transform_email(email): replacement = getattr(settings, 'HIJACK_EMAIL_REPLACEMENT', None) return replacement or '{}@{}'.format( email.replace('@', '-at-'), getattr(settings, 'HIJACK_EMAIL_DOMAIN', 'local') ) ...
""" Work with v2.x catalogs """ import os import pyfits import numpy as np import glob import shutil import re import time import matplotlib.pyplot as plt # from matplotlib.figure import Figure # from matplotlib.backends.backend_agg import FigureCanvasAgg import threedhst import threedhst.eazyPy as eazy import thre...
from abc import ABCMeta, abstractmethod from collections import namedtuple import six from StringIO import StringIO from corehq.util.quickcache import quickcache from dimagi.utils.chunked import chunked from dimagi.utils.decorators.memoized import memoized from ..utils import should_use_sql_backend CaseIndexInfo =...
# -*- coding: utf-8 -*- from copy import deepcopy as _deepcopy from collections import OrderedDict as _ODict from importlib import import_module as _import from os import remove from shutil import move from vipster.settings import _paramdict _formats = ["xyz","pwInput","pwOutput","lammpsData","lammpsCustom","cube","e...
# -*- coding: utf-8 -*- """recipe cooking""" import os import pandas as pd import json import yaml import re SEARCH_PATH = '' DICT_PATH = '' class Ingredient(object): """ ingredient class: represents an ingredient object in recipe file. see the impletment of from_dict() method for how the object is con...
import json import os import platform import sqlite3 import subprocess import itertools from datetime import datetime from flask import Flask, request, session, g, redirect, url_for, abort, render_template, flash from werkzeug.utils import secure_filename app = Flask(__name__) # create the application instance :) app...
""" Django settings for voteswap project. Generated by 'django-admin startproject' using Django 1.9.9. 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/ """ from voteswa...
#!/usr/bin/env python # vim: sts=4 sw=4 et # This is a component of EMC # util.py Copyright 2010 Michael Haberler # # # This program 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 versio...
import jsonpickle from pyVim.connect import SmartConnect, Disconnect from common.cloudshell.driver_helper import CloudshellDriverHelper from common.cloudshell.resource_remover import CloudshellResourceRemover from common.logger import getLogger from common.model_factory import ResourceModelParser from common.utilites.c...
# encoding: utf-8 # The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/ # # Software distributed under the License is distributed on ...
# Scraper for HMC (Hoch-Shanahan) dining hall. import requests from datetime import datetime from bs4 import BeautifulSoup class MuddBackend(object): def __init__(self): self.DAYS = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'] def _get_menu_data(self, week_number): ...
import os, sys import time import json import anyjson import hashlib import github import traceback from sh import git from peyotl import can_convert_nexson_forms, convert_nexson_format from peyotl.phylesystem.git_workflows import acquire_lock_raise, \ commit_and_try_merge2m...
# Copyright 2016 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...
# Copyright (c) 2009-2019 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. from hoomd import _hoomd from hoomd.parameterdicts import TypeParameterDict from hoomd.parameterdicts import ParameterDict from hoomd.typeconverter import Requir...
# Copyright (c) 2013 OpenStack Foundation # 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 ...
# -*- coding: utf-8 -*- from base import BaseTopology class BaseMongoDB(BaseTopology): def deploy_first_steps(self): return ( 'workflow.steps.util.deploy.build_databaseinfra.BuildDatabaseInfra', 'workflow.steps.mongodb.deploy.create_virtualmachines.CreateVirtualMachine', ...
import json from collections import defaultdict from datetime import datetime from django.db import connection from django.http import HttpResponse from django.shortcuts import get_object_or_404 from catmaid.models import * from catmaid.control.authentication import * from catmaid.control.common import * from catma...
""" These classes are light wrappers around Django's database API that provide convenience functionality and permalink functions for the databrowse app. """ from django.db import models from django.utils import dateformat from django.utils.text import capfirst from django.utils.translation import get_date_formats cla...
#!/usr/bin/env python import json import subprocess import sys,time class PipelineDependencyFailedException(Exception): pass class PipelineDependencyNotFinishedException(Exception): pass class PipelineProcess(object): def __init__(self, jsonParameters,config): self._id = jsonParameters['i...
# encoding=utf8 import datetime from distutils.version import StrictVersion import hashlib import os.path import random from seesaw.config import realize, NumberConfigValue from seesaw.item import ItemInterpolation, ItemValue from seesaw.task import SimpleTask, LimitConcurrent from seesaw.tracker import GetItemFromTrac...
""" Pipulate lets you collect data straight off of the Web into spreadsheets. _____ _ _ _ | __ (_) | | | | | |__) | _ __ _ _| | __ _| |_ ___ ___ ___ _ __ ___ | ___/ | '_ \| | | | |/ _` | __/ _ \ / __/ _ \| '_ ` _ \ | | | | |_) |...
import unittest, sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_import2 as h2i class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): global localhost localhost = h2o.decide_if_localhost() ...
from __future__ import print_function import os import csv import glob import scipy import sklearn import numpy as np import hmmlearn.hmm import sklearn.cluster import pickle as cpickle import matplotlib.pyplot as plt from scipy.spatial import distance import sklearn.discriminant_analysis from pyAudioAnalysis import au...
# Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module defines the abstract base classes for battery-related classes. Regardless of the kind of electrode, conversion or insertion, there are many common definitions and properties, e.g., average voltage, capacity, et...
from .basecomponent import BaseComponent from .componenttrainer import ComponentTrainer, AbstractScheduler
import logging log = logging.getLogger(__file__) from pyramid.response import Response from pyramid.view import view_config from sqlalchemy.orm.exc import NoResultFound from ott.data.dao import DatabaseNotFound from ott.data.dao import ServerError from ott.data.dao import StopDao from ott.data.dao import StopList...
# -*- coding: utf-8 -*- """Tests for Beautiful Soup's tree traversal methods. The tree traversal methods are the main advantage of using Beautiful Soup over just using a parser. Different parsers will build different Beautiful Soup trees given the same markup, but all Beautiful Soup trees can be traversed with the me...