text
stringlengths
12
6.59M
# Copyright (c) 2015 Christian Menard # Copyright (c) 2015 Nils Asmussen # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notic...
""" Django settings for project316 project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
""" Storage space for a contact map """ from __future__ import division __author__ = "Felix Simkovic" __credits__ = "Jens Thomas" __date__ = "03 Aug 2016" __version__ = 0.1 from conkit.core.Entity import Entity from conkit.core.Sequence import Sequence import collections import numpy import warnings class _Residu...
""" Storage space for a contact map """ from __future__ import division __author__ = "Felix Simkovic" __credits__ = "Jens Thomas" __date__ = "03 Aug 2016" __version__ = 0.1 from conkit import constants from conkit.core.Entity import Entity from conkit.core.Sequence import Sequence import collections import numpy im...
from jsonrpc import ServiceProxy import datetime import generic from accounts.models import accountFilter from bitcoinrpc.authproxy import JSONRPCException import hashlib class Connector(object): # how long to cache responses caching_time = 3 config = [] services = {} errors = [] # source...
#!/usr/bin/python import board import game_state import alpha_beta import nearby_filter import game import gui from board_strip import * from length_counter import * import pdb CAPTURE_SCORE_BASE = 120 ** 3 class ABState(): """ Bridge for state, for use by alpha_beta code """ def __init__(self, parent=Non...
import json from datetime import datetime from django.conf import settings from django.contrib import messages from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpResponse, HttpResponseForbidden from django.shortcuts import render, get_object_or_404, red...
from abf_reader import * import matplotlib.pyplot as plt import warnings class epoch(object): def __init__(self, abf, DAC_num, epoch_num, **kwds): self.abf = abf self.DAC_num = DAC_num self.epoch_num = epoch_num self._levels = make_epch_levels(abf.header, DAC_num)[:,epoch_num] ...
from django.http import HttpResponse from .models import Company from .serializers_company import CompanySerializer from .helper import auth_decorator from rest_framework import status from rest_framework.response import Response from rest_framework.decorators import api_view from django.db.models import Q import logg...
import util class Ability (util.Entity): action_time = 0 def __init__ (self, target, *args): super(Ability, self).__init__(*args) self.target = target def use (self): self.state.entities.append(self) def rollback (): self.state.entities.remove(self) self.state.timers.start_run_once(self.action_time...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (a...
__all__ = ['shortest_simple_paths', 'bfs_search', 'find_sources', 'get_path_iter'] import sys import logging from collections import deque from copy import deepcopy import networkx as nx import networkx.algorithms.simple_paths as simple_paths from networkx.classes.reportviews import NodeView, OutEdgeView, \...
import pickle from matplotlib import pyplot as plt import numpy as np from indra.tools import plot_formatting as pf from collections import Counter from indra.statements import * from indra.preassembler import Preassembler from indra.preassembler.hierarchy_manager import hierarchies from copy import deepcopy from indra...
#!/usr/bin/python # # Copyright (C) 2012 Codethink Limited import os import sys import bottle import mustard.renderer def application(environ, start_response): server_path = environ['MUSTARD_SERVER_PATH'] project_path = environ['MUSTARD_PROJECT_PATH'] sys.path = [server_path] + sys.path os.chdir(o...
import hashlib import random import time from twisted.internet import reactor, defer, task from starpy import fastagi from twisted.python import log from epsilon.extime import Time from datetime import timedelta from axiom.item import Item from axiom.store import Store from axiom.attributes import text, timestamp, i...
import os import string import time from urlparse import urljoin from django.conf import settings from splinter.browser import Browser from inthe_am.taskmanager import models TEST_COUNTERS = { 'following': {}, 'before': {} } def sanitize_name(name): acceptable_letters = [] for char in name: ...
#!/usr/bin/env python2.6 """ all_pairs.py By Simon Pratt Given the output of rbox followed by a list of edges, compute all-pairs shortest paths on the edges. """ import numpy as np from sys import stdin, maxint from math import sqrt lines = [] for line in stdin: lines.append(line.strip()) print lines.pop(0) n...
from django.contrib import admin from feincms.admin import editor from django.conf import settings from django.utils.translation import ugettext as _ class LumpyContentAdmin(editor.ItemEditor): def get_template_list(self): return ['feincmstools/item_editor.html'] + \ super(LumpyContentAdmin, se...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import re import os import settings import git import HTML import sqlite3 from time import time import shlex, subprocess from optparse import OptionParser class DrupalCores(): def __init__(self, opts, args): """Initial setup and config of database ...
"""Evaluates performance of different az-shear thresholds for tornado.""" import argparse import numpy from keras import backend as K from scipy.stats import rankdata from gewittergefahr.gg_utils import radar_utils from gewittergefahr.gg_utils import time_conversion from gewittergefahr.deep_learning import input_examp...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import logging import math import numpy as np from typing import List import torch from fvcore.nn import giou_loss, sigmoid_focal_loss_jit, smooth_l1_loss from torch import nn from torch.nn import functional as F from detectron2.config import confi...
import six from sqlalchemy.inspection import inspect as sqlalchemyinspect from sqlalchemy.orm.exc import NoResultFound from graphene import ObjectType from graphene.relay import Node from .converter import (convert_sqlalchemy_column, convert_sqlalchemy_relationship) from .utils import is_mapped...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
from collections import OrderedDict import six from sqlalchemy.inspection import inspect as sqlalchemyinspect from sqlalchemy.orm.exc import NoResultFound from graphene import ObjectType from graphene.relay import is_node from .converter import (convert_sqlalchemy_column, convert_sqlalchemy_rel...
# -*- coding: utf-8 -*- """Base class for turbinia interactions.""" import getpass import os import random import tempfile import time from typing import Dict, List, Optional, Tuple, Any, Union from turbinia import TurbiniaException from turbinia import client as turbinia_client from turbinia import config as turbini...
from great_expectations.dataset import DataSet from functools import wraps import inspect from .util import DocInherit, parse_result_format from sqlalchemy import MetaData, select, table, or_, and_, not_, case from sqlalchemy import func as sa_func from sqlalchemy import column as sa_column from sqlalchemy.engine im...
""" .. module:: PecanStreetDatasetAdapter :platform: Unix :synopsis: Contains methods for importing data from the pecan street dataset. .. moduleauthor:: Phil Ngo <ngo.phil@gmail.com> .. moduleauthor:: Stephen Suffian <steve@invalid.com> .. moduleauthor:: Sabina Tomkins <sabina.tomkins@gmail.com> """ from...
import os from copy import copy from decimal import Decimal from django.utils.unittest import TestCase from django.contrib.gis.gdal import DataSource from django.contrib.gis.tests.utils import mysql from django.contrib.gis.utils.layermapping import LayerMapping, LayerMapError, InvalidDecimal, MissingForeignKey from ...
from __future__ import absolute_import # For 'redis' import redis from django.conf import settings from django.utils import simplejson from ..job import Job class RedisBackend(object): KEY = 'django_lightweight_queue' def __init__(self): self.client = redis.Redis( host=settings.REDIS_FE...
#!/usr/bin/python import os import csv import json import keyword import sys from django.core.management.base import BaseCommand, CommandError header_keys = ( 'field_name', 'form_name', 'section_name', 'field_type', 'field_label', 'choices', 'field_note', 'validation_type', 'min_value', 'max_value', 'is_i...
""" Supports scanning a DD-WRT router. """ import logging from datetime import timedelta import re import threading import requests from homeassistant.const import CONF_HOST, CONF_USERNAME, CONF_PASSWORD from homeassistant.helpers import validate_config from homeassistant.util import Throttle from homeassistant.compon...
"""Support for System Bridge sensors.""" from __future__ import annotations from collections.abc import Callable from dataclasses import dataclass from datetime import datetime, timedelta, timezone from typing import Final, cast from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, ...
"""Support for monitoring the local system.""" from __future__ import annotations import asyncio from dataclasses import dataclass import datetime from functools import lru_cache import logging import os import socket import sys from typing import Any, Callable, cast import psutil import voluptuous as vol from homea...
__author__ = 'tonycastronova' import os from dateutil import parser from unittest import TestCase import datetime as dtime from django.contrib.auth.models import Group, User from django.utils import timezone from hs_core.hydroshare import resource from hs_core.models import GenericResource from hs_core.testing impo...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
#!/usr/bin/env python """ SYNOPSIS swim_wrf.py [-h] [--verbose] [-v, --version] [WRF_filename] [hi_res_topofile] DESCRIPTION Reads forcing data to drive the: Simple Weather Interpolation Model (SWIM) Physics based Orographic Precipitation model (POP) Hybrid Orographic Precipitation ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A StatusReceiver module to mail someone when a step warns/fails. Since the behavior is very similar to the MailNotifier, we simply inherit from it an...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (c) 2015, Marcos (Feirlane) López <feirlane@gmail.com> # 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 c...
#!python """ Retrieve sequence data as FASTA from NCBI using eutils The following example will fetch the sequence of chromosome 8 of GRCh37: python efetch.py CM000670.1 See: http://www.ncbi.nlm.nih.gov/books/NBK25499/ http://www.ncbi.nlm.nih.gov/books/NBK25500/ http://w...
from bioblend import galaxy from bioblend.galaxy.tools import ToolClient from bioblend.galaxy.histories import HistoryClient from bioblend.galaxy.datasets import DatasetClient from bioblend.galaxy import objects import subprocess import argparse import os from string import Template import logging DEBUG = os.environ.ge...
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Copyright (C) 2008 Evan Martin <martine@danga.com> """A git-command for integrating reviews on Gerrit.""" from __future__ impor...
''' Created on 21 Feb 2013 @author: jmht ''' # Python modules import glob import logging import os import random import re import shutil import subprocess import sys import time import unittest # Our modules import add_sidechains_SCWRL import ample_util import clusterize import octopus_predict class RosettaModel(o...
#!/usr/bin/env python # Class for submitting ample modelling and MR/Refine/Build components to a cluster # queuing system. # # Ronan Keegan 25/10/2011 import sys, os, string import shlex, subprocess import shutil class Shelx: def __init__(self): self.pdbFile="" self.mtzFile="" self.phaserBest...
#! /usr/bin/env python from __future__ import print_function import argparse import vcf import re import banyan import collections import numpy #Functions def overlapValid((s1, e1), (s2, e2), reciprocalOverlap=0.8, maxOffset=250): bpOffset = max(abs(s2-s1), abs(e2-e1)) overlapLen = float(min(e1, e2) - max(s1,...
from __future__ import print_function from __future__ import division import time import numpy as np from scipy.ndimage.filters import gaussian_filter1d import config import microphone import dsp import led _time_prev = time.time() * 1000.0 """The previous time that the frames_per_second() function was called""" _fps...
# Copyright 2018 VyOS maintainers and contributors <maintainers@vyos.io> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any lat...
""" Excel integration. Requires xlwings. WARNING: Return values are dynamic arrays and will overwrite worksheet values without warning! """ import numpy import xlwings import zerosum.balance import zerosum.nash @xlwings.func @xlwings.arg('payoff_matrix', numpy.array, ndim=2) @xlwings.ret(expand='table') def zerosum_...
# vim:encoding=utf-8:ts=2:sw=2:expandtab from decimal import Decimal import re import inspect from os.path import join, isfile, isdir from collections import OrderedDict ############################################################################### class _Undefined: __slots__ = () def __repr__(cls): return "...
import click import sys python_version = sys.version # Python 3 # if python_version[0] < '3': # print('Python 3 is required to run this version of the Lingotek Filesystem connector.\n\nFor other versions and troubleshooting, see: https://github.com/lingotek/filesystem-connector') # exit() # End Python 3 from ltk ...
""" This module parses OGC Web Processing Service (WPS) Execute request. """ # Author: Jachym Cepicky # http://les-ejk.cz # jachym at les-ejk dot cz # Lince: # # Web Processing Service implementation # Copyright (C) 2006 Jachym Cepicky # # This program is free software; you can redistribute it and...
"""Helper classes that maintain the content model of XMLSchema in the binding classes.""" from pyxb.exceptions_ import * import basis import xml.dom class AttributeUse (object): """A helper class that encapsulates everything we need to know about the way an attribute is used within a binding class.""" __...
# -*- coding: utf-8 -*- # Copyright 2009-2012, Peter A. Bigot # # 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...
# noqa import argparse from dodo_commands.extra.standard_commands import DodoCommand import os class Command(DodoCommand): # noqa help = "" decorators = ['docker'] docker_options = [ '--name=node-sass', ] def add_arguments_imp(self, parser): # noqa parser.add_argument( ...
# # 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...
from os import path # Training folds GUESSER_TRAIN_FOLD = "guesstrain" BUZZER_TRAIN_FOLD = "buzztrain" TRAIN_FOLDS = {GUESSER_TRAIN_FOLD, BUZZER_TRAIN_FOLD} # Guesser and buzzers produce reports on these for cross validation GUESSER_DEV_FOLD = "guessdev" BUZZER_DEV_FOLD = "buzzdev" DEV_FOLDS = {GUESSER_DEV_FOLD, BUZZ...
#!/usr/bin/python #coding=utf8 from qiniu import Auth, put_file, BucketManager from os import popen, path, mkdir from sys import argv from json import loads, dumps import sys from commands import getstatusoutput from ConfigParser import ConfigParser, NoOptionError reload(sys) sys.setdefaultencoding('utf8') __author__ =...
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. from abc import ABCMeta, abstractmethod from google.protobuf.json_format import MessageToJson, Parse from pyqrllib.pyqrllib import sha2_256, getAddress, bin2hstr, str...
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import struct import time from queue import PriorityQueue from pyqrllib.pyqrllib import bin2hstr from twisted.internet import reactor from twisted.internet.protocol im...
r""" Filename: ddp.py Author: Daisuke Oyama Module for solving dynamic programs (also known as Markov decision processes) with finite states and actions. Discrete Dynamic Programming ---------------------------- A discrete dynamic program consists of the following components: * finite set of states :math:`S = \{0,...
# Copyright 2021 The T5X 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 in writ...
# -*- coding: utf-8 -*- #Copyright (c) 2011 Walter Bender #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, mer...
from glob import glob import inspect import os import re from quickrelease.step import Step from quickrelease.exception import ReleaseFrameworkError from quickrelease.utils import GetActivePartnerList PROCESS_MODULES_HOME = ('quickrelease', 'processes') PROCESS_MODULES_PYTHON_PATH = '.'.join(PROCESS_MODULES_HOME) PR...
import math from collections_extended import bag # a Factorization object contains: # a list of factors: factorList[], where factorList[m] ≡ factorList[n] (mod τ), # a function returning the value of the first factor (mod τ). # a function returning the length of the factor list. class Factorization: def _...
#!/usr/bin/env python3 from __future__ import print_function from __future__ import absolute_import import os, sys, subprocess, re, datetime, glob import click, boto3, fnmatch import sqlite3 from taw.util import * from taw.taw import * # This must be the end of imports # ==================== # Exported Functions #...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ filter point on a section perpendicular to an axis command line parameters: input_file, section_coordinate, column, tolerance e.g. a horizontal section at 1000 meter: np_slide.py lidar.txt 1000 3 0.1 """ import sys import numpy as np if len(sys.argv) < 5: ...
import inspect import numpy as np from scipy import interpolate, optimize import matplotlib.pyplot as plt import matplotlib from astropy import units, constants from tec.electrode import Metal class TECBase(object): """ Base thermoelectron engine class This class provides the base API for subclasses which...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import throw, msgprint, _ from frappe.model.document import Document class SiteMaster(Document): pass def mul...
# 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...
import argparse import os from string import Template from utils import create_dir SUBSTITUTIONS = { "2.0": {"template_eol": "2001-06-22"}, "2.1": {"template_eol": "2002-04-08"}, "2.2": {"template_eol": "2003-05-30"}, "2.3": {"template_eol": "2008-03-11"}, "2.4": {"template_eol": "19 December 2008...
import json import uuid from time import time from uuid import uuid4 import six from eventsourcing.application.policies import PersistencePolicy from eventsourcing.domain.model.entity import VersionedEntity, TimestampedEntity from eventsourcing.domain.model.events import topic_from_domain_class, EventWithOriginatorVe...
from openerp.osv import fields, osv import time import datetime from pprint import pprint import pytz import openerp from openerp import tools, api from openerp.osv import osv, fields import dateutil @api.model def _tz_get(self): return [(tz,tz) for tz in sorted(pytz.all_timezones, key=lambda tz: tz if not tz.sta...
#read_temp() palauttaa hetkellisen lämpötila-arvon celsiuksina. #Huom! OneWire support lisättävä Raspiin. #Ohjeet sivulla: #https://cdn-learn.adafruit.com/downloads/pdf/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing.pdf import os import glob import time os.system('modprobe w1-gpio') os.system('modprobe...
#!/usr/bin/python # TorCtl.py -- Python module to interface with Tor Control interface. # Copyright 2007 Mike Perry -- See LICENSE for licensing information. # Portions Copyright 2005 Nick Matthewson """ TorUtil -- Support functions for TorCtl.py and metatroller """ import os import re import sys import socket import...
#****************************************************************************** # (C) 2018, Stefan Korner, Austria * # * # The Space Python Library is free software; you can redistribute it and/or * ...
#!/usr/bin/env python3 import sys import os sys.path.append(os.getcwd() + "/..") import unittest import fpgaperf import re import random def def_devpack(toolchain): if 'radiant' in toolchain: device = 'up5k' package = 'uwg30' else: device = 'lp8k' package = 'cm81' return de...
#!/usr/bin/env python # -*- coding: utf-8 -*- # std import import sys import argparse import os.path from collections import defaultdict import csv import re import math class Variant(object): def __init__(self, type, comment): self.type = type self.comment = comment def __eq__(self, other...
import datetime import unittest from edn import ( Keyword, Symbol, TaggedValue, Vector, dumps, edn, loads, make_tagged_value, ) class EDNTestCase(unittest.TestCase): def test_nil(self): self.assertEqual(edn("nil").nil(), None) def test_boolean(self): self.asse...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from sopel.db import SopelDB from sopel.formatting import bold from sopel.modules import rss from sopel.test_tools import MockSopel, MockConfig import feedparser import os import pytest import tempfile import types @pytest.fixture(scope="function") def bo...
#!/bin/env python #coding=utf-8 import sys import os sys.path.append(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/vendor/') import tornado import tornado.options import tornado.ioloop import tornado.web import tornado.websocket import tornado.escape import...
#!/usr/bin/python # -*- coding: utf-8 -*- """ """ __author__ = "Evgeny Boykov. <artscan@list.ru>" import unittest from ellipsoid import ellipsoid from dataelement import * from numpy import * from utilities import * from phi import modphi as phi class params(): def __init__(self, numpoints = 400, axes = [float(...
import logging import typing from typing import ( List, Optional, Text, Dict, Tuple, Union, Generator, Callable, Any, NamedTuple, ) import tensorflow as tf import numpy as np if typing.TYPE_CHECKING: from tensor2tensor.utils.hparam import HParams logger = logging.getLogger(...
#!/usr/bin/python """Copyright 2015 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 required by applicable l...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np def make_feature_vec(words, model, num_features): """ Function to average all of the word vectors in a given paragraph :param words: :param model: :param num_features: :return: """ # Pre-initialize an empty numpy array (...
""" The main pipeline logic, from where all other components are called. """ import imp import logging import atexit import os from tkp import steps from tkp.config import initialize_pipeline_config, get_database_config import tkp.db from tkp.db.image_store import store_fits from astropy.io.fits.hdu import HDUList from...
from errbot import BotPlugin, botcmd from errbot.utils import get_sender_username import logging import time import datetime import csv class Entry: def __init__(self, title, creator): self.title = title self.creator = creator self.description = "No description. :(" self.timestamp = time.time() ...
""" topojson.py Functions that extract GeoJSON-ish data structures from TopoJSON (https://github.com/mbostock/topojson) topology data. Author: Sean Gillies (https://github.com/sgillies) """ from itertools import chain def rel2abs(arc, scale=None, translate=None): """Yields absolute coordinate tuples from a delt...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2005 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # 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 htt...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2010 Edgewall Software # Copyright (C) 2003-2007 Jonas Borgström <jonas@edgewall.com> # 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 htt...
#!/usr/bin/env python # -*- coding:utf-8 -*- import xmlrpclib import ConfigParser import cmd import subprocess import tempfile import os import pprint import string import json import trac_connection import re import pickle from datetime import datetime from trhaelppyercthon import TPH class TracCmd(cmd.Cmd): def...
#!/usr/bin/env python import sys, os from pathlib import Path import subprocess as sp import time import shutil from nbrun import run_notebook convert_notebook_name = 'Convert to Photon-HDF5 48-spot smFRET from YAML - tempfile.ipynb' #convert_notebook_name = 'Convert to Photon-HDF5 48-spot smFRET from YAML - inplac...
import pandas as pd import numpy as np import os input_data_folder = "../labeled_logs_csv" output_data_folder = "../labeled_logs_csv_processed" filenames = ["traffic_fines_f%s.csv"%i for i in range(1,4)] case_id_col = "Case ID" activity_col = "Activity" timestamp_col = "Complete Timestamp" label_col = "label" pos_la...
#!/usr/bin/python import os import json import urllib import sys import collections import dateutil.parser import requests import subprocess import httplib import sqlite3 import datetime import scraperwiki import httplib import random import codecs from secrets import * # Horrendous hack to work around some Twitter ...
import re import uuid from datetime import datetime from functools import wraps import cherrypy import pytz import six from cherrypy import HTTPError from dateutil import parser as dateparser from pockets import unwrap from time import mktime from residue import UTCDateTime from sqlalchemy import and_, func, or_ from ...
#!/usr/bin/env python # -*- coding: utf8 -*- import requests import argparse import getpass import sys import re import os import json from bs4 import BeautifulSoup try: from urllib import urlretrieve # Python 2 except ImportError: from urllib.request import urlretrieve # Python 3 class Session: heade...
import unittest, time, sys, random sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_glm, h2o_browse as h2b, h2o_import as h2i, h2o_exec as h2e ITERATIONS = 20 DELETE_ON_DONE = 1 DO_EXEC = True DO_UNCOMPRESSED = True class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_f...
# coding=utf-8 from typing import Dict, Union import tweepy from ....datatype.services.twitter.application import Application from ....datatype import BaseDataType from ....twitter import twispy class Account(BaseDataType): key: str = None application: Union[str, Application] = None ck: str = None c...
# A Segment is the building block of Sequence Class. They are responsible # for resolving pulse timing, Z gates, generating trigger pulses and adding # charge compensation # # author: Michael Kerschbaum # created: 4/2019 import numpy as np import math import logging log = logging.getLogger(__name__) from copy import d...
# -*- coding: utf-8 -*- import markup from markupsafe import Markup try: from .errors import error print "SUPER" except: raise Exception('One of the imports failed. Shame on the you.') class UnoFormatString(object): def __init__(self, name): __name = name self.format_tag = '{' ...
# -*- coding: utf-8 -*- """ Created on Tue Jan 05 07:55:56 2016 @author: Suhas Somnath, Chris Smith, Rama K. Vasudevan """ from __future__ import division, print_function, absolute_import, unicode_literals from os import path from warnings import warn import h5py import matplotlib.pyplot as plt import numpy as np i...