text
stringlengths
17
737k
from django.conf import settings from django.core.management.base import BaseCommand try: # 2008-05-30 admindocs found in newforms-admin brand from django.contrib.admindocs.views import extract_views_from_urlpatterns, simplify_regex except ImportError: # fall back to trunk, pre-NFA merge from django.con...
# sets up the geocoding databases import re import fwork # TODO: Consider replacing the lambdas with functions which can be tested. def create_sql_helper_functions(conn): conn.create_function("remove_spaces", 1, lambda x: re.sub(" ", "", x)) conn.create_function("separator_count", 1, lambda x: len(re.findal...
#!/usr/bin/env python # # sectioner generates a static portfolio website # # Copyright (C) 2016 Pierre Marchand <pierremarc07@gmail.com> # # 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 Foundation,...
#!/usr/bin/env python """ Uses the extended ContentHandler from xml_driver to extract the needed fields from patent grant documents """ import cStringIO from xml_driver import * from xml_util import * class PatentGrant(object): def __init__(self, filename, is_string=False): xh = XMLHandler() parser = ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenCivil module for OpenERP, module Etat-Civil # Copyright (C) 200X Company (<http://website>) pyf # # This file is a part of penCivil # # penCivil is free software: you can redistribute it and/or mo...
# -*- coding: utf-8 -*- # # This file is part of Sequana software # # Copyright (c) 2016 - Sequana Development Team # # File author(s): # Thomas Cokelaer <thomas.cokelaer@pasteur.fr> # Etienne Kornobis <etienne.kornobis@pasteur.fr> # # This is a copy of the biokit.viz.volcano module (from myself) since # b...
import hoomd import pytest import numpy as np import itertools import hoomd.md.pytest.conftest np.random.seed(0) def _assert_equivalent_type_params(type_param1, type_param2): for pair in type_param1: if isinstance(type_param1[pair], dict): for key in type_param1[pair]: np.test...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.tools.template import benchexec.result as result from benchexec.tools.sv_...
# python version >= 2.5 import ctypes import sys import os from ctypes import * from numpy import * import time from ctypes.util import find_library libEDK = cdll.LoadLibrary(".\\edk.dll") #---------------------------------------------------------------------------------------------------------------------------------...
# -*- coding: utf-8 -*- import logging import click from path import path from housekeeper.store import api from housekeeper.store.utils import build_date, get_rundir from housekeeper.exc import AnalysisConflictError from .mip import analysis as mip_analysis from .general import commit_analysis, check_existing log =...
from Acquisition import aq_inner from Acquisition import aq_parent from Products.Archetypes.BaseContent import BaseContent from bika.lims.upgrade import stub from Products.CMFCore.utils import getToolByName def upgrade(tool): """Upgrade step required for Bika LIMS 3.1.8 """ portal = aq_parent(aq_inner(too...
# Standard libs import httplib2 import json import os import datetime from webapp2_extras import sessions from webapp2_extras import i18n import webapp2 import datetime import time import re import jinja2 import random from discovery import Discovery from google.appengine._internal.django.utils.encoding import smart_st...
from entitee import Entite #from sprites import Sprites class Obstacle(Entite) : self.vie = 10 #self.sprites = Sprites def draw(self, calque) : calque.blit(self.sprite.sprite((0,0), (10,10)) , self.position)
from bs4 import BeautifulSoup from cum import output from cum.config import config from cum.scrapers.base import BaseChapter, BaseSeries from mimetypes import guess_extension, guess_type from tempfile import NamedTemporaryFile import os import re import requests img_path_re = re.compile( r'(http://img.bato.to/comi...
# pylint: disable=C0302 """Calxeda: fabric.py """ # Copyright (c) 2012-2013, Calxeda 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...
""" dataone.py Functions related to querying the DataOne v1 API. """ import os import urllib import urllib2 import base64 import re import xml.etree.ElementTree as ET try: import RDF except ImportError: import sys sys.path.append('/usr/lib/python2.7/dist-packages/') import RDF from d1lod import util ...
# coding=utf-8 # Python modules import urllib from bs4 import BeautifulSoup # Google App Engine Modules from google.appengine.api import urlfetch, urlfetch_errors # Local Modules from common import debug, html_utils, text_utils from common.telegram import telegram_utils from bible import bible_utils # Link to fetch...
from ConfigParser import NoOptionError import datetime from automatron.controller.command import IAutomatronCommandHandler from automatron.controller.controller import IAutomatronClientActions from automatron.core.event import STOP from automatron_youtube_playlist.config_oauth_requester import ConfigOAuthRequesterFacto...
# Here's a probably-not-very-good port of the Adafruit Arduino library for # this sensor. The Adafruit library is located here: # https://github.com/adafruit/Adafruit_TCS34725 # This port is for the Beaglebone Black and the Adafruit_BBIO and Adafruit_I2C # libraries. By AKA MEDIA SYSTEM from Adafruit_I2C import Adafru...
#!/usr/bin/env python # -*- coding: utf-8 -*- import feedparser import time import mimetypes from urlparse import urlparse from datetime import datetime from django.conf import settings from django.contrib.sites.models import Site from tagging.models import Tag from planet.models import (Blog, Generator, Feed, Fee...
################################################################## # ipv4 runout models # (c) carlos@lacnic.net 2014-03-05 # # this version uses different exhaustion data ################################################################## from matplotlib import use use('Agg') from matplotlib import pyplot # from numpy i...
import functools import inspect import os import sys import warnings from collections import defaultdict from collections import deque from contextlib import suppress from pathlib import Path from types import TracebackType from typing import Any from typing import Callable from typing import cast from typing import Di...
from __future__ import absolute_import import logging from celery import chain from django.conf import settings from django.core.cache import cache from celery import shared_task LOGGER = logging.getLogger(__name__) REGISTRY_LIMIT_LAYERS = getattr(settings, 'REGISTRY_LIMIT_LAYERS', -1) REGISTRY_SEARCH_URL = getatt...
""" Populates the database with sample data for testing. Copyright: (c) 2012 Artem Nezvigin <artem@artnez.com> License: MIT, see LICENSE for details """ import os from logging import getLogger from random import choice, shuffle, randint from jinja2.utils import generate_lorem_ipsum import json from faceoff.models.use...
#!/usr/bin/env python # Copyright 2016 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...
import json import pandas as pd from sqlalchemy.sql import table, column from igf_data.igfdb.baseadaptor import BaseAdaptor from igf_data.igfdb.igfTables import Experiment, Run, Run_attribute, Seqrun class RunAdaptor(BaseAdaptor): ''' An adaptor class for Run and Run_attribute tables ''' def store_run_and_at...
""" Unit tests of the Dashboard application """ import contextlib import datetime import decimal import hashlib import uuid import xmlrpclib from django.conf import settings from django.contrib.auth import login from django.contrib.auth.models import User, Group from django.contrib.contenttypes import generic from dja...
#!/usr/bin/env python import fileinput from os.path import join, dirname, abspath import sys import os BASEDIR = dirname(abspath(__file__)) OUTPUT = join(BASEDIR, 'output.xml') sys.path.insert(0, join(BASEDIR, '..', '..', '..', '..', 'src')) import robot from robot.result.executionresult import ResultFromXml from ...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class UfsUtils(CMakePackage): """The UFS Utilities package contains programs set up the model gr...
#!/bin/python # -*- coding: UTF-8 -*- ## Copyright (C) 2009-2012 Assem Chelli <assem.ch [at] gmail.com> ## 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 Foundation, either version...
# This file is part of SpaceVecAlg. # # SpaceVecAlg 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 3 of the License, or # (at your option) any later version. # # SpaceVecAlg is distribut...
# _*_ coding:utf-8 _*_ # Speaker information coming from the transcript # # Example: # DONALD TRUMP: Thank you very much # SPEAKERS = { 'HILLARY CLINTON': 'speaker dem', 'TIM KAINE': 'speaker dem', 'BARACK OBAMA': 'speaker dem', 'DONALD TRUMP': 'speaker gop', 'MIKE PENCE': 'speaker gop' } # Fact ...
#!/usr/bin/env python """ Testing Utilities ================= This module contains functions for testing the performance and results of functions that produce numerical data. - func_timer Function execution timer. Can be used as a decorator. - plot_encoded Plot a time-encoded signal. - plot_compare Displa...
#!/usr/bin/env python2.7 """ Shared stuff between different modules in this package. Some may eventually move to or be replaced by stuff in toil-lib. """ from __future__ import print_function import argparse, sys, os, os.path, random, subprocess, shutil, itertools, glob import json, timeit, errno import threading from...
# # Copyright (c) 2013 Pavlo Lavrenenko # # 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, copy, modify, merge, publish, ...
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import os import io import frappe import timeit import json from datetime import datetime, date from frappe import _ from frappe.utils import cint, flt, update_progress_bar, cstr, duration_to_seconds from frappe.utils.csvu...
from flask import Flask, jsonify, url_for from werkzeug.contrib.fixers import ProxyFix from flask_sslify import SSLify from flask_dance.consumer import OAuth2ConsumerBlueprint app = Flask(__name__) app.wsgi_app = ProxyFix(app.wsgi_app) if not app.debug: SSLify(app) app.config["HIPCHAT_OAUTH_CLIENT_ID"] = os.envir...
from string import Template import os import shutil import sublime import sublime_plugin class BaseTossFile(sublime_plugin.TextCommand): def init_toss(self, toss_type): self.toss_file_type = toss_type self.num_files_tossed = 0 self.num_locations_tossed = 0 self.num_files_skipped = ...
#!/usr/bin/env python # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import os import sys path0 = os.path.dirname(os.path.abspath(__file__)) path1 = os.path.abspath...
from django.conf import settings from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.utils import timezone from django.core.cache import cache from mock import patch from rest_framework import test, status from rest_framework.authtoken.models import Token class To...
"""Handles storm-based machine learning. "Storm-based" means that each example is one storm object. Thus, each forecast is for one storm object, within some distance buffer and some range of lead times. Forecasts made by this module are non-spatial (i.e., they do not consider storm motion and are not tied to a spati...
# -*- coding: UTF-8 -*- # Copyright 2011-2015 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare 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 y...
import configparser import csv import json import logging import os from bottle import request, route from buttervolume import btrfs from datetime import datetime from os.path import join, basename, dirname from subprocess import CalledProcessError from subprocess import run, PIPE config = configparser.ConfigParser()...
# -*- coding: utf-8 -*- """Test that we're meeting delicious API specifications""" import feedparser import logging import time import transaction from datetime import datetime from bookie.models import DBSession from bookie.models import ( Bmark, BmarkMgr, ) from bookie.tests import TestViewBase from bookie.te...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from cms.models import Page, GlobalPagePermission from cms.utils import permissions from .wizards.wizard_pool import wizard_pool from .w...
from behave import * from time import time, sleep @when(u'I fill "{text}" as key name') def fill_key_name(context, text): if "randomly_created" in text: text = context.random_name textfield = context.browser.find_element_by_id("key-add-id") textfield.send_keys(text) # for letter in text: ...
# -*- coding: utf-8 -*- from distutils.version import LooseVersion from cms.constants import PLUGIN_MOVE_ACTION, PLUGIN_COPY_ACTION from cms.utils.compat.metaclasses import with_metaclass import re from cms.utils import get_cms_setting from cms.utils.compat.dj import force_unicode, python_2_unicode_compatible from cms...
import cv2 import os import glob import numpy as np import Tkinter import tkFileDialog class TwoImages: def __init__(self): self.mode = 0 self.tmp_message = "" self.window_name = "compare" def set_files(self, file1, file2): self.img1 = cv2.imread(file1) self.img2 = cv2.i...
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
# -*- coding: utf-8 -*- from __future__ import with_statement import json import datetime from djangocms_text_ckeditor.cms_plugins import TextPlugin from djangocms_text_ckeditor.models import Text from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.sites import s...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
''' -- imports from python libraries -- ''' # from datetime import datetime import datetime import json import ast ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect # , HttpResponse uncomment when to use from django.http import HttpResponse from django.http import Http404 from ...
#!/usr/bin/env python # Copyright 2021 Google # # 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 agr...
from __future__ import absolute_import, division, print_function import os from functools import partial from collections import Counter import numpy as np from glue.core import Coordinates from qtpy import QtCore, QtWidgets from glue.utils.qt import load_ui from glue.utils.qt.widget_properties import (TextProperty...
# Copyright (c) 2012 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. """Set of utilities to add commands to a buildbot factory. This is based on commands.py and adds Syzygy-specific commands.""" from buildbot.process.pro...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2018 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...
from __future__ import unicode_literals import sys import logging from datetime import datetime from framework.mongo import database from website.app import init_app from scripts import utils as script_utils from framework.transactions.context import TokuTransaction logger = logging.getLogger(__name__) # 2015 Sept 1...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 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 License, o...
from collections import OrderedDict from .constants import Utf8, Classref, NameAndType, Float, Integer from .opcodes import Opcode from .signatures import method_descriptor # From: http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html ##########################################################################...
import time import os import sys import platform from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_options = Options() chrome_options.add_argument("nwapp=" + os.path.dirname(os.path.abspath(__file__))) if platform.system() != 'Linux': sys.exit(0) driver = webdriver.Chrom...
''' Filesystem layout of packages ''' from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from __future__ import print_function import os import zipfile from . import layouts from . import metakey from .. import tech # technology modules persistence = tech.p...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Created on 2016-07-26 11:04:34 import datetime from abc import ABCMeta, abstractmethod from peewee import SQL import model import util from kuaidi100_compoent import Kuaidi100ComponentImpl from mojo_qq_compoent import MoJoQQComponentImpl from pkg_trk_repo_component im...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
# -*- coding: utf-8 -*- # Copyright (c) Virtual Reality and Clinical Gait Analysis Laboratory import abc import csv import h5py from .data_column import DataColumn class _DataFile: __metaclass__ = abc.ABCMeta def __init__(self, file, header_row=0): self._columns = [] self._headers = [] ...
from django.contrib.syndication.views import Feed from codespeed.models import Report from django.conf import settings from django.db.models import Q class ResultFeed(Feed): title = settings.WEBSITE_NAME link = "/changes/" def items(self): return Report.objects\ .filter(self.result_fil...
"""Media browsing tests for the forked_daapd media player platform.""" from http import HTTPStatus from unittest.mock import patch from homeassistant.components import media_source, spotify from homeassistant.components.forked_daapd.browse_media import create_media_content_id from homeassistant.components.media_playe...
import pytest import numpy as np from numpy.testing import assert_allclose from astropy import units as u from astropy.tests.helper import assert_quantity_allclose from astropy import time from astropy.time import Time from astropy.coordinates import CartesianRepresentation from poliastro.twobody.rv import rv2coe f...
#! /bin/python3 """ 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 version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be us...
from conans import ConanFile, CMake class GrpccbConan(ConanFile): name = "grpc_cb_core" version = "0.2" license = "Apache-2.0" url = "https://github.com/jinq0123/grpc_cb_core" description = "C++ gRPC core library with callback interface." settings = "os", "compiler", "build_type", "arch" op...
import directory_components.views import directory_healthcheck.views from django.conf import settings from django.conf.urls import include, url from django.contrib.sitemaps.views import sitemap from django.views.static import serve from django.views.generic import RedirectView from directory_constants import slugs i...
import sqlalchemy as sa from tests import TestCase, create_test_cases class ManyToManyRelationshipsTestCase(TestCase): def create_models(self): class Article(self.Model): __tablename__ = 'article' __versioned__ = { 'base_classes': (self.Model, ) } ...
# coding: utf8 """ weasyprint.stacking ------------------- :copyright: Copyright 2011-2012 Simon Sapin and contributors, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import division, unicode_literals import operator from .formatting_structure import boxes from .layout.ab...
import types from random import randint from webob import Request from manhattan import visitor from manhattan.visitor import Visitor test_clickstream = [ (10, 'page', 'a', '/'), (10, 'page', 'b', '/cheese'), (132, 'pixel', 'a'), (240, 'page', 'a', '/potatoes'), (290, 'page', 'a', '/potatoes/swe...
import email.parser from http.client import HTTPMessage, _MAXLINE, _MAXHEADERS from io import BytesIO from asyncio import StreamReader, async from urllib.parse import parse_qs from base64 import b64encode from functools import reduce from cgi import valid_boundary, parse_header from pulsar import HttpException, is_asy...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 DeneroTeam. (<http://www.deneroteam.com>) # Copyright (C) 2012-2015 Didotech srl (info@didotech.com) # All Rights Reserved # # This program is free software: you can redistribute it ...
# References: # https://github.com/google-research/vision_transformer # https://github.com/facebookresearch/ClassyVision/blob/main/classy_vision/models/vision_transformer.py import math from collections import OrderedDict from functools import partial from typing import Any, Callable, Optional import torch import tor...
# -*- coding: utf-8 -*- import json from maxwellbloch import ob_base class OBAtom(ob_base.OBBase): def __init__(self, num_states=0, energies=[], decays=[], fields=[]): self.num_states = num_states self.energies = energies self.decays = decays self.build_fields(fields) def ...
"""Stateful programmatic WWW navigation, after Perl's WWW::Mechanize. Copyright 2003-2006 John J. Lee <jjl@pobox.com> Copyright 2003 Andy Lester (original Perl code) This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (see the file COPYING included with the distribu...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2017 CNRS # 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 ...
#!/usr/bin/env python """Module to extract from DNA files orthologous sequences according to groups found through OrthoMCL step.""" from __future__ import division from Bio import SeqIO from divergence import create_directory, extract_archive_of_files, create_archive_of_files, parse_options from divergence.filter_orth...
# -*- coding: utf-8 -*- """ .. _plot_source_alignment: Source alignment and coordinate frames ====================================== The aim of this tutorial is to show how to visually assess that the data are well aligned in space for computing the forward solution, and understand the different coordinate frames inv...
#!/usr/bin/python3 # # Copyright (C) 2015 ScyllaDB # # # This file is part of Scylla. # # Scylla 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) a...
from django.contrib.auth import authenticate, login from django.contrib.auth.decorators import login_required from django.http import HttpResponse from django.shortcuts import redirect, render, get_object_or_404 from scheduler.models import * import datetime import parsedatetime.parsedatetime as pdt from itertools impo...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2012-2015 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This is a plugin for the Binary Analysis Tool. Its purpose is to determine the package a file belongs to based on the name of a package...
from __future__ import print_function import requests from websocket import create_connection import time from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor import json import dill from tqdm import tqdm import sys import io from zipfile import ZipFile from os import path, remove from .settings impo...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" import io import os...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, re, json import logging import urllib.request import argparse def verifyValue(target, attribute): "Verify attribute exists in target" if attribute in target.keys(): return str(target[attribute]).replace('<b>', '').replace('</b>', '').replace('\n...
""" Interface for remote shell commands (rsh, rcp) and derivatives that use the same syntax (ssh, scp). Code stolen from Galaxy: - https://bitbucket.org/galaxy/galaxy-central/src/tip/lib/galaxy/jobs/runners/cli.py?at=default """ from .local import LocalShell from logging import getLogger log = getLogger(__name__) ...
#!/usr/bin/env python # Copyright (c) 2002-2003 Andrew Straw. Distributed under the terms # of the GNU Lesser General Public License (LGPL). import VisionEgg, string __version__ = VisionEgg.release_name __cvs__ = string.split('$Revision$')[1] __date__ = string.join(string.split('$Date$')[1:3], ' ') __author__ = 'And...
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------------------------------------------------- # INFO: #----------------------------------------------------------------------------------------------------------------------- """ Authors: Evan Hubi...
# The MIT License (MIT) # Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors # # 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 wi...
''' A condition ''' from base import Base from compares.const import Const as const class ComparisonMixin(const): ''' Compare two values with a comparison utility to denote if a change has validated. ''' def compare(self, node, a, b, ctype=None): ''' compare 'a' against 'b' for a ...
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------------------------------------------------- # INFO: #----------------------------------------------------------------------------------------------------------------------- """ Authors: Evan Hubi...
# encoding=utf8 import sys import logging import scipy import numpy as np import emcee from robo.acquisition.log_ei import LogEI from robo.acquisition.base_acquisition import BaseAcquisitionFunction from robo.util import epmgp sq2 = np.sqrt(2) l2p = np.log(2) + np.log(np.pi) eps = np.finfo(np.float32).eps logger ...
# -*- coding: utf-8 -*- """ pygments.lexers.templates ~~~~~~~~~~~~~~~~~~~~~~~~~ Lexers for various template engines' markup. :copyright: Copyright 2006-2009 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re try: set except NameError: from sets import...
# # CDR-Stats License # http://www.cdr-stats.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The Initial Develope...
import sys import os import tarfile import subprocess import json packages = { "fftw" : { "url" : "http://www.fftw.org/fftw-3.3.5.tar.gz", "options" : [] }, "gsl" : { "url" : "ftp://ftp.gnu.org/gnu/gsl/gsl-2.2.1.tar.gz", "options" : ["--disable-shared"] }, "h...
import copy import logging import os import shutil import subprocess from parsl.channels.base import Channel from parsl.channels.errors import * from parsl.utils import RepresentationMixin logger = logging.getLogger(__name__) class LocalChannel(Channel, RepresentationMixin): ''' This is not even really a channe...
from django.http import Http404 from rest_framework.decorators import detail_route from rest_framework.response import Response from rest_framework.viewsets import ViewSet from c3nav.editor.hosters import hosters from c3nav.editor.serializers import HosterSerializer class HosterViewSet(ViewSet): """ Get Pack...