text
stringlengths
12
6.59M
# ****************************************************************************** # Cloud jukebox # Copyright Paul Dardeau, SwampBits LLC, 2014 # BSD license -- see LICENSE file for details # # (1) create a directory for the jukebox (e.g., ~/jukebox) # # This cloud jukebox uses an abstract object storage system. # (2) c...
""" Django settings for spacelaunchnow project. Generated by 'django-admin startproject' using Django 1.11.1. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ im...
import re import uuid, collections from datetime import datetime import dateutil.parser from itertools import imap from operator import itemgetter import random import string from couchdbkit import ResourceNotFound from couchdbkit.ext.django.schema import * from django.core.cache import cache from django_couchdb_uti...
import base64 import tempfile from odoo.modules import get_module_resource from odoo.tests import Form from odoo.tests.common import SingleTransactionCase class FatturapaCommon(SingleTransactionCase): def getFile(self, filename, module_name=None): if module_name is None: module_name = "l10n_i...
# # Parse tree nodes for expressions # from __future__ import absolute_import import cython cython.declare(error=object, warning=object, warn_once=object, InternalError=object, CompileError=object, UtilityCode=object, TempitaUtilityCode=object, StringEncoding=object, operator=object, ...
""" Tests for the session.Session class """ import mock try: import unittest2 as unittest except ImportError: import unittest import psycopg2 from psycopg2 import extensions from queries import session from queries import pool from queries import PYPY class SessionTests(unittest.TestCase): @mock.patch...
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2010 Marcin Kuzminski,Lukasz Balcerzak. All rights reserved. # """ Created on Apr 8, 2010 :author: marcink,lukaszb """ import os import re import time import urllib2 import posixpath import errno from mercurial import ui from mercurial.context import short fr...
__author__ = 'jacob' import os from shutil import copyfile common_path = os.path.join("") initial_path = os.path.join("", common_path) final_path = os.path.join("", common_path) for file_name in initial_path: copyfile(os.path.join(initial_path, file_name), os.path.join(final_path, file_name))
#------------------------------------------------------------------------------- # Name: cs-578-project 3 # Description: A prototype trainer for a K-Nearest Neighbor classifier that # attempts to predict smoaking status for unlabeled patients as one of three categories: 'SMOKER, 'NON-SMOKER' # , or 'UNKNOWN...
# Time: O(n) # Space: O(1) # # Say you have an array for which the ith element # is the price of a given stock on day i. # # Design an algorithm to find the maximum profit. # You may complete at most two transactions. # # Note: # You may not engage in multiple transactions at the same time # (ie, you must sell the ...
__author__ = "Ivan Infante and Felipe Zapata" # ================> Python Standard and third-party <========== import numpy as np import os import pyparsing as pa from scipy.optimize import curve_fit # ==================> Internal modules <========== from nac.common import (hbar, h2ev, r2meV, fs_to_cm) # ============...
# coding=utf-8 # Copyright 2022 NAVER AI Labs and The HuggingFace Inc. team. 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/LICENS...
__version__ = "0.7b1"
#! /usr/bin/env python3 # encoding: utf-8 """ RMA -- Ressource Management System @author: Norbert Auer @copyright: Copyright 2016 Acib GmbH. All rights reserved. @license: license @contact: norbert.auer@boku.ac.at @deffield updated: Updated """ import sys import os import magic import zlib # gzip giv...
#!/usr/bin/env python #-*- coding: utf-8 -*- """usage: lastscrape.py USER [OUTPUT_FILE]""" import sys import time import codecs import urllib2 from BeautifulSoup import BeautifulSoup sys.stdout = codecs.lookup('utf-8')[-1](sys.stdout) def parse_page(page): """Parse a page of recently listened tracks and return a lis...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 ...
# # Pyrex - Parse tree nodes for expressions # import operator from string import join from Errors import error, warning, InternalError from Errors import hold_errors, release_errors, held_errors, report_error from Cython.Utils import UtilityCode import StringEncoding import Naming from Nodes import Node import Pyr...
import os import ast import tempfile import ConfigParser import collections import numpy as np import server import time import re import functools import requests def catch_exception(f): @functools.wraps(f) def func(*args, **kwargs): try: return f(*args, **kwargs) except requests.e...
import datetime as dt import os.path import pytest from khal.settings import get_config from khal.settings.exceptions import (CannotParseConfigFileError, InvalidSettingsError) from khal.settings.utils import (config_checks, get_all_vdirs, get_color...
import re import redis from asgiref.sync import async_to_sync from channels.layers import get_channel_layer from math import ceil from urllib.parse import quote from webcolors import html5_parse_simple_color from datetime import timedelta from django.utils import timezone from django.conf import settings from django.co...
'''SQL query strings''' CLUSTER_BY_TYPE_OR_DESCRIPTION = """ WITH RECURSIVE all_subtypes AS ( SELECT bgc_type_id FROM antismash.bgc_types WHERE term = %s OR lower(description) LIKE lower(%s) UNION SELECT t.bgc_type_id FROM antismash.bgc_types t JOIN all_subty...
# Mrs # Copyright 2008-2012 Brigham Young University # # 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 o...
import ast import builtins import itertools import logging import math import re from collections import namedtuple from contextlib import suppress from functools import lru_cache, partial from keyword import iskeyword import attr import pycodestyle __version__ = "22.4.25" LOG = logging.getLogger("flake8.bugbear") C...
import os import uuid import base64 import logging.config from config.config import Config APPLICATION_NAME = 'YOUR_APPLICATION_NAME' PROJECT_DIR = os.path.dirname(__file__) TEMPLATE_DIR = os.path.join(PROJECT_DIR, APPLICATION_NAME, 'templates') STATIC_DIR = os.path.join(PROJECT_DIR, 'static') CONFIG_FILE = os.path....
import multiprocessing import clip_year_tiles import subprocess import glob import shutil import utilities # creates a 10x10 degree wgs 84 tile of .00025 res burned year. Download all modis hv tile from s3, # make a mosaic for each year, and clip to hansen extent. Files are uploaded to s3 for year in range(2000, 2018...
import collections import requests.exceptions from server import constants, jobs from server.canvas import api from server.models import CanvasAssignment, CanvasCourse, Enrollment from server.utils import encode_id @jobs.background_job def upload_scores(canvas_assignment_id): logger = jobs.get_job_logger() c...
import sublime import sublime_plugin import errno from functools import reduce import json import os import os.path import re import sass import stat from subprocess import PIPE, Popen # Guarantee sassc is executable if not os.access(sass.path, os.X_OK): mode = os.stat(sass.path).st_mode os.chmod(sass.path, m...
# coding: utf-8 # This file is a part of VK4XMPP transport # © simpleApps, 2013 — 2015. # File contains parts of code from # BlackSmith mark.1 XMPP Bot, © simpleApps 2011 — 2014. # Installation: # The extension requires up to 2 fields in the main config: # 1. ConferenceServer - the address of your (or not yours?) conf...
#!/usr/bin/env python """ Estimate epidemic model parameters by comparing simulations to "observed" phylogeny. """ import sys import os import multiprocessing as mp from phyloK2 import PhyloKernel import random import rcolgem from Bio import Phylo from copy import deepcopy import time from cStringIO import StringIO im...
# # Parse tree nodes for expressions # import cython cython.declare(error=object, warning=object, warn_once=object, InternalError=object, CompileError=object, UtilityCode=object, TempitaUtilityCode=object, StringEncoding=object, operator=object, Naming=object, Nodes=objec...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Update a (possibly non-existant) virtualenv directory using a requirements.txt listing When this script completes, the virtualenv should have the same packages as if it were removed, then rebuilt. ''' from __future__ import print_function import argparse fro...
############################################################################### # # Copyright (c) 2011 Ruslan Spivak # # 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, inc...
# -*- coding: utf-8 -*- """This preprocessor replaces bibliography code in markdowncell """ #----------------------------------------------------------------------------- # Copyright (c) 2015, Julius Schulz # # Distributed under the terms of the Modified BSD License. # #-----------------------------------------------...
#!/usr/bin/python3 """Takes pictures with a photo camera and converts them to a PDF document. Currently, this is specific to my (Torsten Bronger) specific setup. In particular, some things are hardcoded, e.g. the path to the input colour profile of the camera or the path of the mount point of the camera on my compute...
"""Base class for activities written in Python This is currently the only definitive reference for what an activity must do to participate in the Sugar desktop. A Basic Activity All activities must implement a class derived from 'Activity' in this class. The convention is to call it ActivitynameActivity, but this...
from html import escape as escape_HTML # fetch key, possibly nested thru dot notation def ctx_fetch(ctx, line): key, params = (line.split(" ", 1) + [""])[:2] parts = key.split(".", 1) is_attr = hasattr(ctx, parts[0]) if parts[0] in ctx or is_attr: if len(parts) == 1: value = None ...
""" This module contains multiple functions in order to run MSAF algorithms. """ from copy import deepcopy from joblib import Parallel, delayed import librosa import logging import numpy as np import os import msaf from msaf import input_output as io from msaf import utils from msaf import plotting from msaf.features ...
""" byceps.blueprints.site.seating.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2021 Jochen Kupperschmidt :License: Revised BSD (see `LICENSE` file for details) """ from __future__ import annotations from dataclasses import dataclass from itertools import chain from typing import Iterable, Iterator...
# -*- coding: UTF8 -*- # ***** BEGIN LICENSE BLOCK ***** # Sconspiracy - Copyright (C) IRCAD, 2004-2010. # Distributed under the terms of the BSD Licence as # published by the Open Source Initiative. # ****** END LICENSE BLOCK ****** import os import SCons.Defaults import SCons.Node from os.path import join as opj...
from collections import defaultdict from django.shortcuts import render_to_response from django.http import HttpResponseRedirect import waldo.uniprot.retrieve import waldo.mgi.retrieve import waldo.locate.retrieve import waldo.predictions.retrieve from waldo.translations.services import translate import waldo.backend ...
from __future__ import unicode_literals import copy import logging import re from django.conf import settings from django.core import validators from django.contrib.auth import password_validation from django.db import transaction from django.db.models import Q from django.template.defaultfilters import slugify from ...
import sqlite3 import graphviz from DSGRN._dsgrn import * from DSGRN.Query.Logging import LogToSTDOUT class Database: def __init__(self, database_name): """ Initialize a DSGRN database object """ self.dbname = database_name self.conn = sqlite3.connect(database_name) self.cursor = self.conn.c...
# # Parse tree nodes for expressions # import cython cython.declare(error=object, warning=object, warn_once=object, InternalError=object, CompileError=object, UtilityCode=object, TempitaUtilityCode=object, StringEncoding=object, operator=object, Naming=object, Nodes=objec...
__doc__="""for querying the endpoint without loading and doing other stuff in sparqlTest.py.""" import sys, os, time keys=tuple(sys.modules.keys()) for key in keys: if "percolation" in key: print(key) del sys.modules[key] import percolation as P, importlib importlib.reload(P.utils) importlib.reload(...
"""Settings for AutoShare""" # Youtube url and api settings Youtube_playlistId = " " Youtube_api_key = " " Youtube_base_url = "https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=1&playlistId="+Youtube_playlistId+"&key="+Youtube_api_key Youtube_watch_url = "https://www.youtube.com/watch?v=" ...
from veripy import VerifierMonad
import re from pyhammer.tasks.taskbase import TaskBase from pyhammer.utils import execProg2 class IncrementVersionTask(TaskBase): def __init__( self, assemblyPath, type, encoding = "ISO 8859-1", projectRoot = '', useSvnBuild = True): super().__init__() self.__assemblyPath = assemblyPath s...
#!/usr/bin/env python # encoding: utf-8 """ server.py Created by Thomas Mangin on 2011-11-30. Copyright (c) 2011 Exa Networks. All rights reserved. """ # http://code.google.com/speed/articles/web-metrics.html import os import struct import time import socket import errno from select import select from .browsers im...
import os import signal import threading import time import rospy from appctl_support import ProcController from lg_common.msg import ApplicationState from lg_common.helpers import is_valid_state SIG_RETRY_DELAY = 0.05 class ManagedApplication(object): def __init__(self, cmd, shell=False, window=None, initial_s...
load("//tools/bzl:maven_jar.bzl", "maven_jar") def external_plugin_deps(): maven_jar( name = "javamelody-core", artifact = "net.bull.javamelody:javamelody-core:1.77.0", sha1 = "a2b2dd1d39f21d185ea3215830661002445664a4", ) maven_jar( name = "jrobin", artifact = "org....
#!/usr/bin/python3 """Takes pictures with a photo camera and converts them to a PDF document. Currently, this is specific to my (Torsten Bronger) specific setup. In particular, some things are hardcoded, e.g. the path to the input colour profile of the camera or the path of the mount point of the camera on my compute...
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo 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 ...
"""Base class for activities written in Python This is currently the only definitive reference for what an activity must do to participate in the Sugar desktop. A Basic Activity All activities must implement a class derived from 'Activity' in this class. The convention is to call it ActivitynameActivity, but thi...
""" The module ``xnumpy`` provides useful functions in combination with ``numpy``. =============================================================================== Overview =============================================================================== The module ``xnumpy`` provides some addition useful functions that ...
""" byceps.services.tourney.models.tourney ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import datetime from ....database import db, generate_uuid from ....util.instances import ReprBuilder from .tourney_categor...
# -*- coding: utf-8 -*- ''' Created on Jul 7, 2014 @author: viejoemer HowTo create and use the data structure set in Python? ¿Cómo crear y usar la estructura de datos set en Python? A set object is an unordered collection of distinct hashable objects. Common uses include membership testing, removing dupl...
import SimpleHTTPServer import SocketServer import json import logging import os import traceback import urlparse DEPLOYED_PACKAGE = 'build' DEVELOPMENT_PACKAGE = 'web' class KcaaHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): GET_NEW_OBJECTS = '/get_new_objects' GET_OBJECT = '/get_object' ...
# coding=utf-8 """ Bose-Einstein integral calculators (:mod:`ibei.models`) ======================================================= """ import astropy.constants import astropy.units import attrs import functools import mpmath import numpy as np def _temperature_converter(value): try: temperature = astropy...
from django.shortcuts import render from django.views import generic from django.contrib import auth from django.http import HttpResponseRedirect from django.contrib.auth.decorators import login_required from profiles.models import Profile from .models import * # Create your views here. def indexPage(request): if...
#!/usr/bin/env python # Adapted from Paul Furber's Python version of Nehe's OpenGL Lesson 3. from __future__ import division from OpenGL.GL import * from OpenGL.GLU import * import pygame, random, sys, numpy, copy from pygame.locals import * from itertools import count from operator import itemgetter def init_openg...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by ExopyHqcLegacy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ------...
from . import debug, settings _default_input_codec = None _default_output_codec = None def _set_default_codecs(): global _default_input_codec global _default_output_codec _default_input_codec = "utf-8" # 'cp850' _default_output_codec = "utf-8" # 'cp850' class ConfigContainer(object): def _ge...
import hashlib import os import ldap as python_ldap import ldap.filter from ldap.controls import SimplePagedResultsControl class LdapService: SEARCH_LIMIT = 20 MAX_CREATE_ATTEMPTS = 10 ENTRY_MAPPING = { 'telephoneNumber': 'phone', 'cn': 'username', 'displayName': 'name', '...
import wsgiref.handlers import sys if 'lib' not in sys.path: sys.path[0:0] = ['lib', 'distlib', 'distlib.zip'] from main import app def main(): wsgiref.handlers.CGIHandler().run(app) if __name__ == '__main__': main()
#! /usr/bin/env python # coding=UTF-8 ''' Created on 9. mars 2010 @author: Harald Hauknes(harald@hauknes.org) ''' # The with statement is not available in Python 2.5, so import it from __future__ import with_statement import GnuPGInterface from hashlib import md5 import random import re import time ...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save import workflows.library import time from picklefield.fields import PickledObjectField from workflows.thumbs import ThumbnailField from mothra.settings import DEBUG from mothra.settings import USE...
""" GDB extension that adds Cython support. """ from __future__ import with_statement import sys import textwrap import traceback import functools import itertools import collections import gdb try: from lxml import etree have_lxml = True except ImportError: have_lxml = False try: # Python 2...
import json import telegram import random from telegram.ext import CommandHandler, RegexHandler # Open the settings file. with open('settings.json', 'r') as data_file: settings = json.load(data_file) # Create the admin list, whitelist and mute list. admins = settings['users']['admins'] whitelist = settings['user...
#!/usr/bin/env python # encoding: utf-8 """ process.py Created by Thomas Mangin on 2011-11-29. Copyright (c) 2011 Exa Networks. All rights reserved. """ from threading import Thread import subprocess import errno import os import re import time import socket from Queue import Empty from .http import Header from ....
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for `RestApiz` package.""" import json import pytest from RestApiz import RestApiz # noqa from flask import Flask from flask_cors import CORS app = Flask(__name__) CORS(app) with open('tests/dbConfig.json') as data_file: data = json.load(data_file) @p...
#!/usr/bin/env python """ $Id$ Copyright (c) 2006-2011 sqlmap developers (http://www.sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import codecs import difflib import os import re import sys import urllib2 import urlparse from xml.dom.minidom import Document # Path to the XML file with signatu...
#!/usr/bin/env python # # Copyright (c) 2013 Ciro Mattia Gonano <ciromattia@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for # any purpose with or without fee is hereby granted, provided that the # above copyright notice and this permission notice appear in all # copies. # # THE SOFTW...
from __future__ import absolute_import import sublime, sublime_plugin import re, string, os, sys, functools, mmap, pprint, imp, threading from collections import Counter from plistlib import readPlistFromBytes try: from . import vhdl_module from .util import vhdl_util from .util import sublime_util fr...
#!/usr/bin/env python # sim harness for connecting a bot running in a ROS stdr simulation with a decision policy import rospy import math import argparse from geometry_msgs.msg import Twist import sys from sonars import Sonars import odom_reward from collections import OrderedDict import policy.baseline import policy...
import ResolvedStellarPops.graphics.GraphicsUtils as rspg import ResolvedStellarPops as rsp import ResolvedStellarPops.convertz as convertz import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import MaxNLocator, MultipleLocator, NullFormatter import os import brewer2mpl ''' actually for the LMC, y...
# Copyright 2016, 2017 John J. Rofrano. 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
from aiida.orm import Code, DataFactory from aiida.orm.workflow import Workflow from aiida.orm.calculation.inline import make_inline from aiida.workflows.wf_gruneisen_pressure import WorkflowGruneisen from aiida.workflows.wf_phonon import WorkflowPhonon from aiida.orm import load_workflow StructureData = DataFactory...
"""librados Python ctypes wrapper Copyright 2011, Hannu Valtonen <hannu.valtonen@ormod.com> """ from ctypes import CDLL, c_char_p, c_size_t, c_void_p, c_int, \ create_string_buffer, byref, Structure, c_uint64, c_ubyte, c_byte, pointer import ctypes import datetime import errno import time ANONYMOUS_AUID = 0xffffff...
# Copyright (c) 2015 Presslabs SRL # # 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 writ...
import pytest import copy from collections.abc import Mapping from types import MappingProxyType from math import exp import numpy as np import mici SEED = 3046987125 STATE_DIM = 10 @pytest.fixture def rng(): return np.random.default_rng(SEED) @pytest.fixture def transition(system, integrator): return mic...
from bitmicro.model import features as f import pymongo import time import sys import pickle client = pymongo.MongoClient() db = client['bitmicro'] symbol = sys.argv[1] duration = int(sys.argv[2]) predictions = db[symbol+'_predictions'] with open('cols.pkl', 'r') as file1: cols = pickle.load(file1) with open('mode...
import datetime import re from django.contrib.auth.models import ( AbstractBaseUser, BaseUserManager, PermissionsMixin) from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.core.validators import MinValueValidator from django.db import models from django.db...
#!/bin/python import glob import os import re import shutil import traceback import datetime import requests import sys import time import constants import graphutils import utils SLACK = '-enable-slack-bot' in sys.argv and 'SLACK_BOT_TOKEN' in os.environ QUICK = '-quick' in sys.argv CLOUD_TEST_ONLY = '-cloud-test-...
import MySQLdb import datetime class SQL: _unnamed_category = "unnamed" _unused_category_type = 0 _income_category_type = 1 _expense_category_type = 2 _general_category_type = 3 _db = None _cursor = None def __init__(self): self._host = "localhost" self._user = "root" ...
# -*- coding:utf-8 -*- # Django settings for imaginationforpeople project. import os import re import sys import socket from django.utils.translation import ugettext_lazy as _ # Import settings for the given site from site_settings import * from apps.member.utils import fix_username PROJECT_ROOT = os.path.dirname(_...
# -*- coding: utf-8 -*- import sublime if int(sublime.version()) > 2999: message = u"Locales plugin only support Sublime Text 2, do not install in Sublime Text 3 Beta." sublime.error_message(message) else: import sublime_plugin import os import os.path import shutil import json import...
import milk.unsupervised.affinity import numpy as np def test_affinity(): np.random.seed(22) X = np.random.randn(100,10) X[:40] += .4 S = milk.unsupervised.pdist(X) clusters, labels = milk.unsupervised.affinity.affinity_propagation(S) assert labels.max()+1 == len(clusters) assert len(labels)...
# coding=utf-8 # Copyright 2017 The DLT2T Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
#!/usr/bin/python2 # written by sqall # twitter: https://twitter.com/sqall01 # blog: http://blog.h4des.org # github: https://github.com/sqall01 # # Licensed under the GNU Public License, version 2. import threading import os import time import logging import collections from server import AsynchronousSender # this ...
#! /usr/bin/python from __future__ import division, print_function import sys import argparse import numpy as np from gplot import * from pause import * from wstat import nanwsem, wmean, mlrms, wstd try: import gls except: print('Cannot import gls') try: import astropy.io.fits as pyfits except: print('...
# Copyright 2017 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 agreed to in writing, ...
from custom_settings import * MANAGERS = ADMINS LANGUAGE_CODE = 'en-us' SITE_ID = 1 USE_I18N = True USE_L10N = True ADMIN_MEDIA_PREFIX = '/media/' # Make this unique, and don't share it with anybody. SECRET_KEY = 'f6h^bz8&0+ad@+qsntr)_onhx2(y^^u%$434byw3l^q!*n078v' TEMPLATE_LOADERS = ( 'django.template.loaders...
#!/usr/bin/env python import os import shutil import tempfile import unittest import csv import json from datetime import datetime from taca.analysis.analysis import * from taca.illumina.Runs import Run from taca.illumina.HiSeqX_Runs import HiSeqX_Run from taca.utils import config as conf # This is only run if TAC...
"""This is the standard development settings file. If you need to overload settings, please do so in a local_settings.py file (it won't be tracked in git). """ import os from lib.settings_base import * # noqa DEBUG = True TEMPLATE_DEBUG = DEBUG DEBUG_PROPAGATE_EXCEPTIONS = DEBUG # These apps are great during deve...
import os app_secret = os.urandom(32) BIND_ROUTE = "/" BIND_HOST = "127.0.0.1" BIND_PORT = 20123 DEBUG = False streams = { "arrownl": { "id": "arrownl", "title": "Arrow Classic Rock", "stream": "http://91.221.151.155:80", "referer": "player.arrow.nl", "user-agent": "Mozilla...
from hlsclient.balancer import Balancer def test_balancer_returns_active_server_if_its_the_only_one(): PATH = '/path' SERVER = 'server' paths = {PATH: [SERVER]} b = Balancer() b.update(paths) active_playlists = list(b.actives) assert 1 == len(active_playlists) assert PATH == active_playlists[0].path assert SE...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import importlib from collections import defaultdict import os from urllib import urlencode from django.contrib import messages import settingshelper as helper # odd celery fix import djcelery djcelery.setup_loader() DEBUG = True TEMPLATE_DEBUG = DEB...
"""Unit tests for `pycall.callfile`.""" from time import mktime from getpass import getuser from datetime import datetime from unittest import TestCase from path import path from nose.tools import assert_false, eq_, ok_, raises from pycall import Application, Call, CallFile, InvalidTimeError, \ NoSpoolPermissionEr...
""" Django settings for muckrock project """ import os from lamson.server import Relay import logging DEBUG = True TEMPLATE_DEBUG = True EMAIL_DEBUG = DEBUG SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) ADMINS = ( ('Mitchell Kotler', 'mitch@muckrock.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'pos...
""" Copyright 2019, Institute for Systems Biology 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 wr...