text
stringlengths
17
737k
# 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...
# # Script to update and run an existing VMWare restore job # --restore is always required (existing restore job name) # --mode is always required (restore run mode, Test|Production|Clone) # --desttype corresponds to the type of restore being performed # 1 = use orig host/cluster with sys defined IP (default) # ...
""" Django settings. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR =...
# encoding: UTF-8 # # Copyright (c) 2015 Facility for Rare Isotope Beams # """ Request handlers for web application. .. moduleauthor:: Dylan Maxwell <maxwelld@frib.msu.edu> """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging fr...
# 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
# # Copyright 2010-2013 University of Southern California # # 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...
from __future__ import absolute_import, division, print_function import os import pytest def test_dials_cluster_unit_cell_command_line(dials_regression, tmpdir): pytest.importorskip("scipy") data_dir = os.path.join(dials_regression, 'refinement_test_data', 'multi_narrow_wedges') impor...
#!/usr/bin/python2 # OpenPOWER Automated Test Project # # Contributors Listed Below - COPYRIGHT 2017 # [+] International Business Machines Corp. # # # 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...
#!/usr/bin/python # More flexible parameters NUMROUNDS = 2 NUMMATCHES = 3 NUMTEAMS = 12 # More built in parameters. NUMSLOTS = 4 # Underlying bitwidths ROUNDBITS = 4 MATCHBITS = 4 SLOTBITS = 2 print "(set-info :status unknown)" print "(set-option :produce-models true)" print "; Logic is now \"Whatever Z3 accepts\" ...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2013-2014 CNRS (Hervé BREDIN - http://herve.niderb.fr) # 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 witho...
"""FetchKillmails.py Using zKillboard and EVE Online's ESI API, fetch killmails for a given daterange """ from datetime import datetime, timedelta from os import path import requests import ujson from plumbum import cli from tinydb import TinyDB, Query import dataset import prosper.common.prosper_logging as p_...
# -*- coding: utf-8 -*- import collections import itertools from savate.sources import BufferedRawSource, StreamSource from savate.flv import FLVHeader, FLVTag, FLVAudioData, FLVVideoData from savate import looping from savate import helpers class FLVSource(StreamSource): # Initial burst duration, in millisecond...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. import sys import traceback import inspect from UM.PluginObject import PluginObject ## Static class used for logging purposes. This class is only meant to be used as a static class. class Logger: def __init__(sel...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. import json import re import types from . import validators __version__ = "0.5.0" # constants for DeletionPolicy Delete = 'Delete' Retain = 'Retain' Snapshot = 'Snapshot' valid_names = re.compile(r'^...
import sqlite3 import db.config as DB_CONFIG def execute_sql(sql, params=()): """ Executes a sql query and commits the result. params is a list of values that will be used in place of question marks in the sql statement. """ con = get_db_connection() cur = con.execute(sql, params) resu...
import getpass import hashlib import inspect import os import sys from .messageparse import MessageParseMethods from .users import UserMethods from .. import utils, helpers, errors from ..tl import types, functions class AuthMethods(MessageParseMethods, UserMethods): # region Public methods def start( ...
# Copyright 2011 OpenStack Foundation # Copyright 2013 Rackspace Hosting # 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/lice...
from __future__ import unicode_literals import logging import rest_framework.status as status from django.http.response import Http404 from rest_framework.generics import GenericAPIView from rest_framework.response import Response from rest_framework.reverse import reverse import util.rest as rest_util from error.mod...
# -*- coding: utf-8 -*- __version__ = '0.2.4' class Try_(object): _unhandled = tuple() @staticmethod def set_unhandled(es=None): """Set a list of the unhandled exceptions. :param es: an iterable of exceptions or None >>> from operator import getitem >>> Try(getitem, [],...
import json import logging from core import ffCommand, getDeviceStatusDict, getDeviceViewsList, getRoutineList from core.firefly import app from flask import Flask, request @app.route('/') def baseView(): return "This is the root page" @app.route('/API/core/views/routine') def APICoreViewRoutine(): routine_list ...
"""PhoSim Instance Catalog""" from __future__ import absolute_import, division, print_function from lsst.sims.catUtils.exampleCatalogDefinitions import PhoSimCatalogZPoint from lsst.sims.catUtils.exampleCatalogDefinitions.phoSimCatalogExamples import PhoSimCatalogSN import numpy as np from .twinklesVariabilityMixins im...
import sys from scenario import run_scenario def main(args=None): if args is None: args = sys.argv[1:] assert len(args) == 2, 'Usage: scenario <executable> <scenario>' executable_path = args[0] scenario_path = args[1] run_scenario(executable_path, scenario_path) if __name__ == '__...
"""Django DDP API, Collections, Cursors and Publications.""" from __future__ import absolute_import, unicode_literals, print_function # standard library import collections from copy import deepcopy import traceback # requirements import dbarray from django.conf import settings from django.contrib.auth import get_user...
# coding: utf-8 """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 65 PATCH_VERSION = '3' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) # Format for platforms PLATFORM_FOR...
""" Simple Twitter streaming API access """ __version__ = "0.3.5" __author__ = "Rune Halvorsen <runefh@gmail.com>" __homepage__ = "http://bitbucket.org/runeh/tweetstream/" __docformat__ = "restructuredtext" import urllib import urllib2 import socket import time import anyjson import logging logger = logging.getLogger...
# coding: utf-8 """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 81 PATCH_VERSION = '0b2' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) # Format for platforms PLATFORM_F...
# coding: utf-8 """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 66 PATCH_VERSION = '0.b2' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) # Format for platforms PLATFORM_...
# coding: utf-8 """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 29 PATCH_VERSION = '5' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 4, 2) PROJECT_NAME = 'Home Assistant' PRO...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from ..path import Path from ..hpie import complete from typing import Dict def strinvalues_to_pathvalues(stringvalues: Dict[str, float]): return {Path(tuple(item)): value for item, value in stringvalues.items()} class HpieTest(unittest.TestCase): ...
from unittest import TestCase from chatterbot.adapters.storage.sqlalchemy import SQLAlchemyDatabaseAdapter from chatterbot.conversation import Response from chatterbot.conversation import Statement class SQLAlchemyAdapterTestCase(TestCase): def setUp(self): self.adapter = SQLAlchemyDatabaseAdapter() cl...
import os.path from random import randint class XkcdPasswordGenerator: """generates xkcd-inspired passwords""" def __init__(self, word_list): self.word_list = word_list def generate(self, words=4, separator=' '): result = [self.random_word() for _ in range(words)] if separator is ...
# -*- coding: latin-1 -*- ''' Created on 11.10.2012 @author: Teemu Pkknen ''' def get_callback_map(): def generate_negation_function( function ): return lambda simulation, negation, **kwargs: function( simulation, **kwargs ) ^ negation conditions = { 'default_current_document_is_relevant': ...
### # Copyright (c) 2005, Jeremiah Fincher # Copyright (c) 2010, James McCoy # 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 ...
# -*- coding: utf-8 -*- # # 2019-02-12 Cornelius Kölbel <cornelius.koelbel@netknights.it> # # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public # License, version 3, as published by the Free Software Foundation. # # This program i...
from flask import Flask from flask import request app = Flask(__name__) import os, sys @app.route("/") def hello(): return "Hello World!" @app.route("/1") def hello(): return "H ello people!" @app.route('/upload', methods=['GET', 'POST']) def upload_file(): if request.method == 'POST': ...
"""This module provides discrete-time filter support. Copyright 2021 Michael Hayes, UCECE """ from .expr import expr, equation from .nexpr import DiscreteTimeDomainExpression from .discretetime import n, z, seq from .sequence import Sequence from .utils import isiterable from numpy import arange, ndarray import symp...
from collections import defaultdict import logging import sys import time import urllib import urllib2 import rdflib try: import json except ImportError: import simplejson as json from humfrey.utils.namespaces import NS from humfrey.linkeddata.resource import Resource from humfrey.streaming import srx from hu...
from __future__ import print_function from datetime import date import hexchat __module_name__ = 'PlaybackStamps' __module_author__ = 'TingPing' __module_version__ = '1' __module_description__ = 'Prints date on older playback messages' edited = False events = ['Channel Message', 'Channel Msg Hilight', 'Channel Act...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import template from django.db.models import Model from django.template.defaultfilters import urlencode try: from django_bitly.templatetags.bitly import bitlify DJANGO_BITLY = True except ImportError: DJANGO_BITLY = False regis...
# -*- coding: utf-8 -*- """POCS is a the Panoptes Observatory Control System * Documentation: http://panoptes-pocs.readthedocs.org/ * Source Code: https://github.com/panoptes/POCS """ import os import yaml import panoptes.utils.logger as logger import panoptes.utils.config as config import panoptes.utils.error as err...
# Copyright 2012 Jeff Trawick, http://emptyhammock.com/ # # 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 la...
import warnings import matplotlib.pyplot as plt import matplotlib.gridspec as gs import matplotlib as mpl import mpl_toolkits.mplot3d import numpy as np import scipy.signal as sps from .resonator import indexResList Axes3D = mpl_toolkits.mplot3d.Axes3D def plotResListData(resList, plot_types=['IQ'], **kwargs): r"...
""" Radiation engine and geometry handler for CEA """ from __future__ import print_function from __future__ import division import os import shutil import sys import pandas as pd import time from cea.utilities import epwreader import math from cea.resources.radiation_daysim import daysim_main, geometry_generator impor...
import os import codecs from datetime import datetime from stat import ST_MTIME, ST_CTIME from re import search from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponseForbidden from django.utils.translation import ugettext as _ from django.shortcuts import render_to_resp...
import xml.etree.ElementTree as ET def parse_xml(f): tree = ET.parse(f) root = tree.getroot() modules = [] module_collection = root[0].tag for module in module_collection: modules.append(module)
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import urllib.request, urllib.parse, urllib.error import datetime from lib.proc import execute from lib.string import clean_screen_name #settings user = 'rr-' host = 'burza' src_folder = '/cygdrive/z/hub/pinkyard/queued/' safe_folder = '/cygdrive/z/hub/pinkyard/done...
# -*- encoding: utf-8 -*- ''' A simple Nova plugin :maintainer: HubbleStack :maturity: 20160325 :platform: All :requires: SaltStack This audit module requires yaml data to execute. It will search the local directory for any .yaml files, and if it finds a top-level 'pkg' key, it will use that data. Sample YAML data, ...
import numbers import os import sys import warnings from configparser import ConfigParser from operator import itemgetter from scrapy.exceptions import ScrapyDeprecationWarning, UsageError from scrapy.settings import BaseSettings from scrapy.utils.deprecate import update_classpath from scrapy.utils.python import with...
import torch import math from collections import namedtuple from operator import attrgetter class Beam(object): def __init__(self, beam_size, min_length=3, padding_token=0, bos_token=1, eos_token=2, min_n_best=3, cuda=False): """ Generic beam class. It keeps information about beam_size hypothesis. ...
from __future__ import print_function import os, sys import json import subprocess import time import tempfile import threading from select import select from io import BytesIO import errno import boto3 import botocore import socket from enum import Enum if sys.version_info[0] == 2: from pipes import quote as SHEL...
#!/usr/bin/env python3 import json import pandas as pd import argparse from random import randint from langdetect import * from parsers import log from parsers import utils, config def parse_arguments(): parser = argparse.ArgumentParser() parser.add_argument('--own-name', dest='own_name', type=str, ...
from collections import Counter import json import settings from datetime import datetime from django.utils import timezone from django.contrib.auth.decorators import login_required from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse from django.views.decorators.csrf i...
""" ffs.path Pathname API """ from __future__ import with_statement import contextlib import fnmatch import hashlib try: import simplejson as json except ImportError: import json import mimetypes import os import re import tempfile import traceback import types import six from ffs import (exceptions, filesy...
# Script to create app cache manifest files for the Dragonfly project. # Takes very much in regard how the dragonfly.opera.com server works. # There are two main paths on https://dragonfly.opera.com, # /app/ and /app/cutting-edge/. # If the request has no language cookie then a small document to # set the language c...
# -*-coding:Utf-8 -*- """Configuration file reader""" # Compatibility 2.7-3.4 #from __future__ import absolute_import #from __future__ import unicode_literals import os, sys, configparser # Reading configuration from /etc if possible else form the script directory conf = configparser.ConfigParser() conffile = "pass...
import sys import time import bomb #Wii remote library! #import cwiid #TO DO: Look at check mod states to check mod states also instead of just game state, and disable button for module when complete. Maybe new widget or loop for module logics / game logic and connect to module buttons instead of change active module....
#!/usr/bin/env python from pylab import * import gzip import os import pickle import rebound as re import utils as u if __name__ == '__main__': loadpath = 'simulation.save' if os.path.exists(loadpath): sim = re.Simulation.from_file(loadpath) loaded = True start_t = sim.t else: ...
#!/usr/bin/env python2 # coding=utf-8 """ gradient pattern. generates a test pattern: gradient history: see git commits todo: ~ all fine :-) """ import pattern import array import colorsys ########################################## # globals #####################################...
""" This module provides the core functions and classes for Lcapy. To print the rational functions in canonical form (with the highest power of s in the denominator with a unity coefficient), use print(x.canonical()). For additional documentation, see the Lcapy tutorial. Copyright 2014, 2015, 2016 Michael Hayes, UCE...
from mock import patch, Mock from ceph_deploy.util import pkg_managers class TestRPM(object): def setup(self): self.to_patch = 'ceph_deploy.util.pkg_managers.process.run' def test_normal_flags(self): fake_run = Mock() with patch(self.to_patch, fake_run): pkg_managers.rpm(...
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'make', 'wget'] if args.kvm: programs += ['apt-cacher-ng', 'python-vm-builder', 'qemu-kvm', 'qemu-utils'] elif args.docker and not os.path.isfile('/lib/sys...
#!/usr/bin/python3 # stjepan.henc@fer.hr import numpy as np # no problem import librosa as lbr import matplotlib.pyplot as plt from scipy.signal import lfilter, freqz import math from a_weighting2 import itu_r_468_amplitude_weight from detect_speech import detect_speech def a_filter(y, sr, intervals, mode=0): sn...
import random from pyglet import window, clock, gl, event from pyglet.window import key import spryte win = window.Window(vsync=False) fps = clock.ClockDisplay(color=(1, 1, 1, 1)) layer = spryte.Layer() balls = [] for i in range(200): balls.append(spryte.Sprite('ball.png', layer, (win.width - 64) * ran...
import re from errbot import BotPlugin, botcmd, cmdfilter class HashMatch(BotPlugin): ''' ''' def __init__(self, bot): super().__init__(bot) self.pattern = re.compile('([a-zA-Z0-9]{64}|[a-zA-Z0-9]{40}|[a-zA-Z0-9]{32})') def callback_message(self, msg): '''Check the messages if they contain a hash.''' ...
import json import jsonschema from django import forms from .models.model_program import ModelProgramResourceFileType from .utils import get_model_program_aggregations class ModelInstanceMetadataValidationForm(forms.Form): def __init__(self, *args, **kwargs): self.user = kwargs.pop('user', None) ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ filetags.py View, set, search, or remove xdg tags and comments from one or more files. With --nocolor and --search, it allows for operating on files with certain tags like this in BASH (where echo could be some other command): for fname in $(fileta...
#!/usr/bin/python """ bulk_gis.py A simple loader for GIS files in CSV format. Developed primarily for loading Administrative Areas for Haiti. LICENSE: This source file is subject to LGPL license that is available through the world-wide-web at the following URI: http://www.gnu.org/copyleft/lesser.html author ...
from __future__ import annotations # remove after python 3.11 from typing import List, Optional, Tuple from . import core as tl from triton._C.libtriton.triton import ir # Create custom exception that prints message "hello" class IncompatibleTypeErrorimpl(Exception): def __init__(self, type_a, type_b): ...
from __future__ import print_function, division import numpy as np import matplotlib.pyplot as plt import pandas as pd import scipy.stats as stats import logging import re, os, os.path import numpy.random as rand from astropy import units as u from astropy.units import Quantity from astropy.coordinates import SkyCoor...
## @package Compiler # # The following is a Compiler for the custom language specific # to the Imitation domain. The custom language syntax is defined # here: # INSERT LINK HERE TO CAUSAL LANGUAGE SYNTAX NOTES # # The compiler is based on the how-to series entitled 'Let's Build # a Simple Interpreter' present a...
#!/usr/bin/env python import argparse, tempfile, sys, os, re from OrderedSet import OrderedSet from replace_imports import include_imports from strip_comments import strip_comments from strip_newlines import strip_newlines from split_file import split_coq_file_contents from split_definitions import split_statements_to_...
""" Newforms Admin configuration for Photologue """ from django.contrib import admin from models import * class GalleryAdmin(admin.ModelAdmin): list_display = ('title', 'date_added', 'photo_count', 'is_public') list_filter = ['date_added', 'is_public'] date_hierarchy = 'date_added' prepopula...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import sys import math import regex from difflib import SequenceMatcher from urllib.parse import urlparse, unquote_plus from itertools import chain from collections import Counter from datetime import datetime import time import os import os.path as path # noinsp...
# -*- coding: utf-8 -*- import regex import phonenumbers from bs4 import BeautifulSoup def all_caps_title(s, site): if regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT)\b").search(s): return False # common words in non-spam all-caps titles return bool(regex.compile(ur"^(?=.*\...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import sys import math import regex from difflib import SequenceMatcher from urllib.parse import urlparse, unquote_plus from itertools import chain from collections import Counter from datetime import datetime import os import os.path as path # noinspection PyPac...
# -*- coding: utf-8 -*- # noinspection PyCompatibility import sys import math import regex from difflib import SequenceMatcher from urllib.parse import urlparse, unquote_plus from itertools import chain from collections import Counter from datetime import datetime import time import os import os.path as path # noinsp...
# -*- coding: utf-8 -*- import regex import phonenumbers def all_caps_text(s, site): s = regex.sub("<[^>]*>", "", s) # remove HTML tags s = regex.sub("&\w+;", "", s) # remove HTML entities if len(s) <= 150 and regex.compile(ur"SQL|\b(ERROR|PHP|QUERY|ANDROID|CASE|SELECT|HAVING|COUNT|GROUP|ORDER BY|IN...
# -*- coding: utf-8 -*- import datetime import json import logging import requests from sanic import Blueprint, response from sanic.request import Request from typing import Text, Dict, Any, List, Iterable from rasa.core.channels.channel import UserMessage, OutputChannel, InputChannel logger = logging.getLogger(__na...
"""Views for doc serving.""" import itertools import logging import os from urllib.parse import urlparse from django.conf import settings from django.core.files.storage import get_storage_class from django.http import Http404, HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.urls imp...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hwt.code import If, log2ceil, isPow2, Concat from hwt.constraints import set_false_path, get_clock_of, set_max_delay from hwt.hdl.types.bits import Bits from hwt.interfaces.std import Clk, Rst_n, FifoWriter, FifoReader from hwt.serializer.mode import serializeParamsU...
#!/usr/bin/python #---------------------------------------------------------------------- # Copyright (c) 2011 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restricti...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for bitcoind node under test""" import decimal import errno import http.client import json import log...
#!/usr/bin/python import sys, os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) from test_common import * ec2 = 4 # returns (return_value, stdout, stderr) or None in case the process did not terminate within timeout seconds # run_rethinkdb() automatically fills in ...
#!/usr/bin/env python # DungeonMap - the Model for our dungeon generator # # Represented as a collection of Regions and Connections. # Each Region owns a single polygon that does not overlap any other Regions. # Each Connection straddles the border between two Regions. # The DungeonMap handles collision detection betwe...
from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client import client from oauth2client import tools from oauth2client.file import Storage import datetime import rfc3339 # for date object -> date string import iso8601 # for date string -> date object...
"""Script to change -v for an ack command to vack""" import re import sys def main(args): words = ['ack'] for word in args: if re.match('-[a-uw-z]*[vV][a-uw-z]*', word): words[0] = 'vack' words.append(word) else: if ' ' in word: if ' $' in word: words.append("'%s'" % word) else: words...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext import frappe.defaults from frappe import _ from frappe.utils import cstr, cint, flt, comma_or, getdate, nowdate, formatdate, for...
""" Created on May 17, 2015 Description: Merge VCF, iAnnotateSV tab and targetSeqView tab file into a single tab-delimited file ::Input:: aId: Sample ID for case that has the structural abberations bId: Sample ID for control vcfFile: Delly filtered and merged VCF file annoTab: iAnnotateSV tab-delimited file with annot...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
from __future__ import absolute_import, unicode_literals import os from dotenv import load_dotenv load_dotenv('.env') local_settings_module = os.environ.get('LOCAL_SETTINGS', 'hydroshare.local_settings') ######################## # MAIN DJANGO SETTINGS # ######################## # People who get code error notifica...
__author__ = "Jacopo Mauro" __copyright__ = "Copyright 2016, Jacopo Mauro" __license__ = "ISC" __version__ = "0.2" __maintainer__ = "Jacopo Mauro" __email__ = "mauro.jacopo@gmail.com" __status__ = "Prototype" import sys import os import logging as log import json import re # use multiprocessing because antlr is not th...
from django.db.backends.postgresql_psycopg2.base import DatabaseWrapper, \ DatabaseCreation from django import VERSION as DJANGO_VERSION class DatabaseWrapper(DatabaseWrapper): UNTOUCHED = 1 def __init__(self, *args, **kwargs): super(DatabaseWra...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END from importlib import import_module from urllib.parse import urlparse import copy import json import inspect import ipaddress import datetime from foglamp.common.storage_client.payload_builder import PayloadBuilder from fogla...
# # Copyright 2018 Analytics Zoo 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 agreed to...
#!/usr/bin/python # Copyright (C) 2009 - Curtis Hovey <sinzui.is at verizon.net> # This software is licensed under the GNU General Public License version 2 # (see the file COPYING). """Find in files and replace strings in many files.""" __metaclass__ = type __all__ = [ 'extract_match', 'find_files', 'find...
""" Django settings for project aclarknet. Generated by 'django-admin startproject' using Django 1.8.7. 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/ """ import dj_d...
#!/usr/bin/env python # Copyright 2008 Nokia Siemens Networks Oyj # # 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...
# Copyright 2013-2019 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 AprUtil(AutotoolsPackage): """Apache Portable Runtime Utility""" homepage = 'https:/...
# -*- coding: utf-8 -*- # imageio is distributed under the terms of the (new) BSD License. """ SPE file reader """ import os import logging import numpy as np from .. import formats from ..core import Format logger = logging.getLogger(__name__) class Spec: """SPE file specification data Tuples of (offs...
from django.contrib import admin from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.views.main import ChangeList from django.core.paginator import Paginator from django.template import Context, Template from django.test import TransactionTestCase from models import (Child, Par...