text
stringlengths
12
6.59M
from __future__ import division from collections import OrderedDict import pandas as pd import numpy as np import json import zlib import pandas.io.data as web def json_to_obj(json): return pd.json.loads(str(zlib.decompress(json))) def one_dec_places(x, pos): return '%.1f' % x def percentage(x, pos): ...
from PyQt5.QtCore import Qt from PyQt5 import QtGui from PyQt5.QtWidgets import (QApplication, QWidget, QGridLayout, QTableWidget, QDoubleSpinBox, QCheckBox) import numpy as np from pyqtgraph.Qt import QtCore import pyqtgraph as pg from scipy.optimize import curve_fit import sys pg.setC...
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ ckanutils ~~~~~~~~~ Provides methods for interacting with a CKAN instance Examples: literal blocks:: python example_google.py Attributes: CKAN_KEYS (List[str]): available CKAN keyword arguments. """ from __future__ import ( absolute_import...
# -*- coding: utf-8 -*- # Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid # Copyright (c) 2018 Future Internet Consulting and Development Solutions S.L. # This file is part of OAuth2 CKAN Extension. # OAuth2 CKAN Extension is free software: you can redistribute it and/or modify # it under the terms...
#!/usr/bin/env python # coding: utf8 #from django.shortcuts import render from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.contrib.auth.decorators import login_required from django.http import HttpResponseForbidden, HttpResponseRedirect, Http404 ...
import datetime import os import re import sys from django.contrib.messages import constants as message_constants # Loads the variable INSTALL_ROOT execfile('/etc/courtlistener') ################ # Misc. Django # ################ SITE_ID = 1 USE_I18N = False DEFAULT_CHARSET = 'utf-8' LANGUAGE_CODE = 'en-us' USE_TZ = ...
from pathlib import Path import glob import logging import random import os import hecto import yaml from .utils import load_config from .utils import make_absolute_urls_relative MESSAGES = [ "Post processing", "Relativizing URLs", "Distilling enjoyment", "Adding emotional depth", "Filtering the...
from rest_framework import mixins, viewsets from rest_framework.decorators import action from rest_framework.renderers import JSONRenderer, BrowsableAPIRenderer from rest_framework.response import Response from rest_framework_csv.renderers import CSVRenderer from . import models, permissions, serializers from django....
import numpy as np import pandas as pd import xarray as xr import matplotlib import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.lines import Line2D from matplotlib.patches import Patch, Ellipse, Circle from matplotlib.legend_handler import HandlerPatch import matplotlib.colors as c...
# encoding=utf-8 from __future__ import print_function, unicode_literals import StringIO import io import pickle import pytz import requests from PIL import Image from datetime import datetime, timedelta from wechat_app import app, redis_store __author__ = 'guoyong' NASA_OPEN_API_KEY = app.config['NASA_OPEN_API_K...
import requests from requests.exceptions import RequestException class ClefSetupError(Exception): """ Raised when there is something wrong with a user's credentials - Clef app_id or app_secret """ pass class ClefCodeError(Exception): """ Raised when something goes wrong with OAuth handshake and Clef is unable to ...
import utils import pymongo from xbrowse.core import constants from xbrowse.parsers import vcf_stuff class VariantAnnotator(): def __init__(self, settings_module, reference, population_frequency_store, vep_annotator, custom_annotator=None): self.settings_module = settings_module self._db = pymong...
from datetime import datetime from datetime import date import logging import sys FILE = "cli-count.txt" DEFAULT_UNIT = 1 DEFAULT_START_VALUE_NEW = 0 DEFAULT_TOTAL = 0 DEFAULT_DATE = '01.01.2017' log = logging.getLogger('cli-count') ACTION_NEW = "new" ACTION_ADD = "add" ACTION_TOTAL = "total" ACTION_LIST = "list" OPTI...
def filter_gene_variants_by_variant_filter(variants, gene_id, variant_filter): """ When you switch a variant stream to gene stream, result is a list of all variants for a given gene. But some of the fields in variant_filter are specific to a gene annotation (currently only the so_annotations field)...
#!/usr/bin/env python """The cyclus preprocessor. cycpp is a 3-pass preprocessor which adds reflection-like semantics to cyclus agents. This is needed to provide a high-level, user-facing API to cyclus. Code that uses cycpp is entirely valid C++ code and will compile normally even without first running it through the...
#!/usr/bin/env python """The cyclus preprocessor. cycpp is a 3-pass preprocessor which adds reflection-like semantics to cyclus agents. This is needed to provide a high-level, user-facing API to cyclus. Code that uses cycpp is entirely valid C++ code and will compile normally even without first running it through the ...
def counter(x): if x > 0: while x >= 0: print x x -= 1 else: while x <= 0: print x x += 1 def counter2(x): while x >= 0: print x x -= 1 while x <= 0: print x x += 1 #def sequence(n): # while n != 1: # ...
#!/usr/bin/env python import collections import curses import datetime import locale import logging import math import random import sys logging.basicConfig(filename='log/clipycube.log', level=logging.DEBUG) # Faces TOP = 'top' BOTTOM = 'bottom' FRONT = 'front' BACK = 'back' LEFT = 'left' RIGHT = 'right' # Twist ...
"""Tests for debugging machinery. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import sys import warnings from tempfile import NamedTemporaryFile from subprocess import check_output import nose.tools as nt from IPython.core import debugger #--------------...
# -*- coding: utf-8 -*- """IPython Test Process Controller This module runs one or more subprocesses which will actually run the IPython test suite. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import argparse import ...
"""Nose Plugin that supports IPython doctests. Limitations: - When generating examples for use as doctests, make sure that you have pretty-printing OFF. This can be done either by starting ipython with the flag '--nopprint', by setting pprint to 0 in your ipythonrc file, or by interactively disabling it with %...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import pdb import time from opcua import Client from opcua.tools import endpoint_to_strings uri = "opc.tcp://192.168.1.186:4840" def get_children(node): descs = node.get_children_descriptions() descs.sort(key=lambda x: x.BrowseName) return descs def ...
# from __future__ import print_function import savalidation.validators as val from pprint import pprint from datetime import datetime as dt, date as d from app import db from savalidation import ValidationMixin from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy.orm import backref class Person(db.Model, Va...
import os import string import numpy as np import h5py from fuel.datasets.hdf5 import H5PYDataset from fuel.schemes import SequentialScheme import app.hparams as hparams from app.datasets.dataset import Dataset @hparams.register_dataset('wsj0') class Wsj0Dataset(Dataset): '''WSJ0 dataset''' def __init__(self...
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils import cint,cstr, today from frappe import _ import re import datetime from collecti...
import logging import pika import time import copy import datetime from esgfpid.utils import get_now_utc_as_formatted_string as get_now_utc_as_formatted_string import esgfpid.defaults as defaults from esgfpid.utils import loginfo, logdebug, logtrace, logerror, logwarn, log_every_x_times from ..exceptions import PIDServ...
from django.conf.urls.defaults import patterns, include, handler500, handler404, url from django.conf import settings from django.contrib import admin urlpatterns = patterns( '', # Profile view url(r'^p/(?P<username>\w+)/$', 'commoner_i.views.badge', name='profile_badge'), )
""" ******************************************************************************** compas ******************************************************************************** .. currentmodule:: compas .. toctree:: :maxdepth: 1 compas.datastructures compas.files compas.geometry compas.numerical ...
""" ******************************************************************************** compas ******************************************************************************** .. currentmodule:: compas .. toctree:: :maxdepth: 1 compas.com compas.datastructures compas.files compas.geometry compa...
# -*- coding: utf-8 -*- """ Hamiltonian dynamics based MCMC samplers. """ __authors__ = 'Matt Graham' __license__ = 'MIT' import numpy as np autograd_available = True try: from autograd import grad except ImportError: autograd_available = False class AbstractHmcSampler(object): """ Abstract Hamiltonian...
from allgo_utils import PCA9685,ultrasonic,ir_sens import wiringpi as wp import time DIR_DISTANCE_ALERT = 20 preMillis = 0 ULTRASONIC_TRIG = 3 # TRIG port is to use as output signal ULTRASONIC_ECHO = 23 # ECHO port is to use as input signal OUT = {'front_left_led':5, 'front_right_led':0, 'rear_right_le...
from allgo_utils import PCA9685,ultrasonic,ir_sens import wiringpi as wp import time DIR_DISTANCE_ALERT = 20 preMillis = 0 ULTRASONIC_TRIG = 3 # TRIG port is to use as output signal ULTRASONIC_ECHO = 23 # ECHO port is to use as input signal OUT = {'front_left_led':5, 'front_right_led':0, 'rear_right_le...
# encoding: utf8 """Various information about the underlying ImageMagick library and the features it supports. Deliberately not named ``features`` to emphasize that everything herein is highly specific to ImageMagick and completely out of the library's hands. """ from __future__ import absolute_import from __future__ ...
from django.test import TestCase, TransactionTestCase from django.shortcuts import reverse from rest_framework.test import APIRequestFactory, APIClient from freezegun import freeze_time from django.contrib.auth.models import User from reminder.models import Reminder from django.utils import timezone import json class...
# -*- coding: utf-8 -*- # These are found in Repack-MPQ/fileset.{locale}#Mods#Core.SC2Mod#{locale}.SC2Data/LocalizedData/Editor/EditorCategoryStrings.txt # EDSTR_CATEGORY_Race # EDSTR_PLAYERPROPS_RACE # The ??? means that I don't know what language it is. # If multiple languages use the same set they should be comma s...
from __future__ import absolute_import import zlib import pprint import hashlib from datetime import datetime import time from StringIO import StringIO from collections import defaultdict, deque, namedtuple from xml.etree import ElementTree import urllib2 from mpyq import MPQArchive from sc2reader import utils from ...
import uuid import json import requests from PIL import Image from django.core.urlresolvers import reverse from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.shortcuts import render from django.http import HttpResponse from rest_framework.decorators import api_view, authentication_clas...
from __future__ import absolute_import import zlib import pprint import hashlib from datetime import datetime import time from StringIO import StringIO from collections import defaultdict, deque, namedtuple from xml.etree import ElementTree import urllib2 from mpyq import MPQArchive from sc2reader import utils from ...
""" Django settings for sc_project project. Generated by 'django-admin startproject' using Django 1.11.2. 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/ """ import...
import json from datetime import datetime from django.contrib.auth.models import User, Group from django.core.cache import cache from ehb_client.requests.exceptions import PageNotFound from ehb_client.requests.subject_request_handler import Subject from ehb_client.requests.external_record_request_handler import Extern...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license import time,struct from fcntl import ioctl from scapy.data import * from scapy.config import conf from scapy.utils import...
from datetime import datetime from django.db.models import Sum from django.utils import timezone from django.shortcuts import get_object_or_404 from rest_framework import generics from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework import parsers, ren...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license import time,struct,sys if not sys.platform.startswith("win"): from fcntl import ioctl from scapy.data import * from s...
# Config API_INTERFACE = 'sspanelv2' #mudbjson, sspanelv2, sspanelv3, sspanelv3ssr, muapiv2(not support) UPDATE_TIME = 60 SERVER_PUB_ADDR = '127.0.0.1' # mujson_mgr need this to generate ssr link #mudb MUDB_FILE = 'mudb.json' #Node Group NODE_GROUP_ENABLE = 0 # Mysql MYSQL_CONFIG = 'usermysql.json' # API MUAPI_CO...
# -*- coding: UTF-8 -*- """ Scarlett Client Utils """ import scarlett import os import sys import time import getopt import tempfile import json import glob import subprocess import pygst pygst.require("0.10") import gst import pygtk pygtk.require('2.0') import gtk from scarlett.basics import * from scarlett.constant...
""" Scipy 2D sparse matrix module. Original code by Travis Oliphant. Modified and extended by Ed Schofield, Robert Cimrman, and Nathan Bell """ __all__ = ['spmatrix','csc_matrix','csr_matrix','coo_matrix', 'lil_matrix','dok_matrix', 'spdiags','speye','spidentity','spkron','extract_diagonal', ...
from collections import OrderedDict import itertools import json from django.core.exceptions import ImproperlyConfigured from django.db import models, connection class ScoreMock(object): is_mock = True def __init__(self, **kwargs): kwargs.setdefault('retired', False) kwargs.setdefault('disqu...
from __future__ import unicode_literals import re import functools from copy import deepcopy import six from lxml import etree from pycountry import languages from nameparser import HumanName from scrapi import requests URL_REGEX = re.compile(r'(https?://\S*\.\S*)') ''' Takes a value, returns a function that alwa...
# coding: utf8 import csv import sys import re import logging from peewee import DoesNotExist from models import WelcomeIcMembership, WelcomeIcRecord from models import WelcomeIcPersonMembership, WelcomeIcProjectMembership from models import GeneralHuman, GeneralPerson, GeneralRelHumanAddresses from models import Ge...
import numpy as np def process_file(fileName, **loadtxt_kwargs): """Load Keysight PNA file data into dict. Parameters ---------- fileName : string Path to data. Actual name of the file should be in the format: ``name + '_' + pwr + '_DBM_TEMP_' + temp + '.S2P'`` where: - name: ...
"""Some debugging functions for working with the Scrapy engine""" from time import time # used in global tests code from scrapy.project import crawler def get_engine_status(engine=None): """Return a report of the current engine status""" if engine is None: engine = crawler.engine global_tests = ...
#!/usr/bin/python3 import sys #sys.path.insert(0, "/usr/local/opencv3/lib/python2.7/site-packages/") import argparse import pickle import cv2 import fnmatch import json import math import numpy as np import os.path from progress.bar import Bar sys.path.append('../lib') import Matcher import Pose import ProjectMgr im...
#!/usr/bin/python2.5 # Copyright 2010 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 ...
# -*- coding: utf-8 -*- # # python-json-patch - An implementation of the JSON Patch format # https://github.com/stefankoegl/python-json-patch # # Copyright (c) 2011 Stefan Kögl <stefan@skoegl.net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted...
#!/usr/bin/env python3 """JVC projector low level command module""" import json import enum import math from distutils.util import strtobool import dumpdata import eotf from jvc_command import JVCCommand, Command, GammaTable, GammaCorrection, HDMIInputLevel HDMI_INPUT_LEVEL_MAP = { HDMIInputLevel.Standard: (0, ...
from pymongo import MongoClient import threading import time import urllib2 import json import sys import time from bs4 import BeautifulSoup from datetime import datetime import signal import sys MONGODB_URI = 'mongodb://heroku:f6a7beb1d678f34e3bbef2d5a6e62cbd@paulo.mongohq.com:10025/app18218091' def get_mongo_clien...
from flask import Blueprint from dmcontent.content_loader import ContentLoader main = Blueprint('main', __name__) content_loader = ContentLoader('app/content') content_loader.load_manifest('g-cloud-6', 'services', 'edit_service') content_loader.load_messages('g-cloud-6', ['dates']) content_loader.load_manifest('g-cl...
#!/usr/bin/python import sys import math import subprocess import datetime # FIXME It would be nice to have a better way of making this script able to find # other modules in sibling packages sys.path.insert(0, sys.path[0]+"/..") from config import ClusterConfig from run import ClusterSubstitute,ClusterRun,ClusterDe...
#!/usr/bin/env python3 """ Extracts a spectrum from a region in a spectral cube. The pixels will be averaged spatially inside the given region. The region must be specified as shape,coords,frame,parameters Region can be, point, box, circle or ellipse. Also, CASA region files are supported. Coords can be pix or sky. Fr...
#! /usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source cod...
""" Run IEPY core loop Usage: iepy_runner.py <dbname> <seeds_file> iepy_runner.py -h | --help | --version Options: -h --help Show this screen --version Version number """ import codecs from csv import reader from docopt import docopt from iepy.core import BoostrappedIEPipeline fr...
""" Run IEPY core loop Usage: iepy_runner.py <dbname> <seeds_file> iepy_runner.py -h | --help | --version Options: -h --help Show this screen --version Version number """ import codecs from csv import reader from docopt import docopt from iepy.core import BoostrappedIEPipeline fr...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This ...
# -*- coding: utf-8 -*- import contextlib import json import os import platform import re import shutil import ssl import subprocess import sys import traceback from subprocess import PIPE from zipfile import ZipFile try: from ConfigParser import SafeConfigParser as ConfigParser from ConfigParser import Erro...
""" Applications are great. Lets have more of them. """ import sys import weakref from functools import wraps from werkzeug.routing import Map, Rule from twisted.python import log from twisted.python.components import registerAdapter from twisted.web.server import Site, Request from twisted.internet import reacto...
#!/usr/bin/python2.5 # # Copyright 2008 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
""" Configuration from system files and environment variables. Warning: much of this code is copied from hdf3.conf """ from __future__ import absolute_import import os import re import warnings def current_user(): try: import pwd return pwd.getpwuid(os.geteuid()).pw_name except ImportError:...
#!/usr/bin/env python # coding=utf-8 from distutils.spawn import find_executable from kvirt.config import Kconfig from kvirt.baseconfig import Kbaseconfig from kvirt.config import __version__ from kvirt.defaults import TEMPLATES from prettytable import PrettyTable import argparse from kvirt import common from kvirt im...
# Create a probability density map over a single path/row # Given a stack of L8 scenes in a parent directory, # analyze the stack of pixels for changes in (blue - red) vs (green - nir) import os import re import pyproj import rasterio as rio from sklearn.neighbors import KernelDensity from l8 import BANDS, SCENE_...
#!/usr/bin/env python # coding: utf-8 ''' latexmake ~~~~~~~~~ Python module for latexmk.py which completely automates the process of generating a LaTeX document. :copyright: (c) 2012 by Marc Schlaich :license: MIT, see LICENSE for more details. ''' from __future__ import with_statement from...
#!/usr/bin/python # ABOUT: # A python script I have been working on to make the Makefile for a generic # TeX document. It is probably similar to latexmk [1], but there is something # to be said for writing some things yourself! # # PUBLIC REPOSITORY: # https://github.com/pavdpr/latexmake # # SUGGESTED USE: # - Put the...
from __future__ import absolute_import from __future__ import unicode_literals from app import redis import collections class RedisOperationNotAllowedException(Exception): pass class RedisModel(collections.MutableMapping): """Defines a basic model for data storage using HASH inside redis. Implement...
# This file is part of the GBI project. # Copyright (C) 2013 Omniscale GmbH & Co. KG <http://omniscale.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/licens...
""" Based on the implementation here: https://pypi.python.org/pypi/ProxyTypes/0.9 """ from functools import wraps import operator import sys PY3 = sys.version_info[0] >= 3 OPERATORS = [ # Unary "pos", "neg", "abs", "invert", # Comparison "eq", "ne", "lt", "gt", "le", "ge", # Container "getit...
from app import app, models from flask import request, make_response, jsonify, url_for from collections import namedtuple def register_api(view, endpoint, url, pk='id', pk_type='any'): """ Function to simplify registration of API Views (based on MethodView) """ view_func = view.as_view(endpoint) ...
#!/usr/bin/python2.5 # Copyright 2010 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 logging from flask import request, redirect, url_for, session, escape, render_template from app import app from . import vk from . import forms logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) @app.route('/', methods=['GET', 'POST']) @app.route('/index', methods=['GET', 'POST'])...
import inspect import config #import configuration file ./config.py from django.shortcuts import render from django.contrib.auth import authenticate, login, logout from django.http import HttpResponse from django.template import loader from django.shortcuts import redirect from django.contrib import messages from djan...
""" Definition of views. """ from django.shortcuts import render from django.http import HttpRequest from django.template import RequestContext from datetime import datetime from app.models import * import hashlib import random import sys import smtplib def home(request): """Renders the home page.""" assert ...
# -*- coding: utf-8 -*- import re import threading import subprocess as sp import xml.etree.ElementTree as ET from werkzeug import secure_filename from flask import render_template, url_for, redirect from app import app from flask.ext.restful import reqparse, abort, Api, Resource, fields, marshal from flask.ext import...
# Version 1.0 routes commented out, consisting primarily of model attribute category pages and user creating/editing model objects from flask import render_template, flash, redirect, request, url_for, g, session from app import app, db from models import User, Set, Match, Character, Placement, secondaries, Region from...
from flask import render_template, flash, request from app import app from flask import request from wtforms import Form, validators, TextField, SelectField, TextAreaField, SelectMultipleField from wtforms.fields.html5 import DateField from wtforms_components import DateIntervalField, DateRange from app import getdata ...
from flask import render_template, Flask, request, redirect, flash from app import app from .forms import RequestForm import requests from twilio.rest import TwilioRestClient import twilio.twiml import urllib import math import sys import urllib2 ''' @author Arjun Jain @author Chris Bernt @author Greg Lyons @author We...
# -*- coding: utf-8 -*- """ app.views ~~~~~~~~~ Provides additional API endpoints """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) import itertools as it from datetime import datetime as dt from bisect import bisect from operator import ite...
""" __authors__ = Yash, Will, Peter __description__ = Flask routes of site pages __name__ = views.py """ from flask import render_template, redirect, url_for, request, g, send_from_directory from flask import session as flask_session from flask_socketio import emit from flask_login import login_user, logout...
import os, json, unittest, time, shutil, sys sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_kmeans, h2o_hosts import random import math import h2o_util # a truly uniform sphere # http://stackoverflow.com/questions/5408276/python-uniform-spherical-distribution # While the author prefers the discarding method...
from __future__ import division, print_function, unicode_literals __author__ = 'setten' import os from pymatgen.util.testing import PymatgenTest from pymatgen.core.structure import Structure from pymatgen.matproj.rest import MPRester, MPRestError from pymatgen.io.gwwrapper.datastructures import GWSpecs, GWConvergence...
import re, os, sys from Tester import Tester from RunParallel import RunParallel # For TIMEOUT value class AnalyzeJacobian(Tester): @staticmethod def validParams(): params = Tester.validParams() params.addRequiredParam('input', "The input file to use for this test.") params.addParam('test_name', ...
# -*- coding: utf-8 -*- #!/usr/bin/python ##------------------------------------------------------------------- ## @copyright 2017 DennyZhang.com ## Licensed under MIT ## https://raw.githubusercontent.com/DennyZhang/devops_public/master/LICENSE ## ## File : detect_big_docker_image.py ## Author : Denny <denny@dennyzha...
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/env python # *-* coding: UTF-8 *-* """ Programul sincronizezaza doua path-uri catre astfel orice fisier adaugat in unul dintre path-uri este automat copiat in celalalt path. """ from __future__ import print_function import os import sys from shutil import copy def sincronizare_functie(path1, path2): "...
import os import unittest import time import inspect from mock import Mock from slipstream import util from slipstream.ConfigHolder import ConfigHolder from slipstream.SlipStreamHttpClient import UserInfo from slipstream_okeanos import LOG from slipstream_okeanos.OkeanosClientCloud import getConnector, getConnectorCl...
""" routes file for handling get/post request for crowdscholar Author: Harry Rybacki Date: 5June13 """ import json import raw_db import articles_db import articles_endpoint_validator import uuid import os import bson from flask import render_template, request, Response from app import app from json_controller import...
import pytest from pyopentxs import (server, ReturnValueError, is_message_success, error, instrument) from pyopentxs.nym import Nym from pyopentxs.asset import Asset from pyopentxs.account import Account from datetime import datetime, timedelta from pyopentxs.instrument import transfer, write from pyopentxs.tests impor...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" import logging import optparse import os import sys import shutil impor...
import subprocess import os import config from flask import render_template, jsonify, request, send_from_directory from app import app @app.route(config.PREFIX + '/', methods=['GET', 'POST']) @app.route(config.PREFIX + '/index', methods=['GET', 'POST']) def index(): return render_template( 'index.html', t...
# Copyright (c) 2013, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OpenQuake is distributed...
import csv import io import re import time import hashlib import random from flask import flash from flask import make_response from flask import redirect from flask import render_template from flask import request from flask import url_for from flask_login import current_user from flask_login import login_required fr...
from app import app, db, utils from utils import * from models import * from forms import AddNewFoodResourceForm, NonAdminAddNewFoodResourceForm from flask import render_template, flash, redirect, session, url_for, request, \ g, jsonify, current_app from flask.ext.login import login_user, logout_user, current_user, \ ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Wrapper for LAST program. <http://last.cbrc.jp> """ import os.path as op import sys import logging from optparse import OptionParser from subprocess import Popen, PIPE from Bio import SeqIO from itertools import islice from multiprocessing import Lock from jcvi.ut...