CombinedText
stringlengths
4
3.42M
package components import ( cryptorand "crypto/rand" "crypto/tls" "crypto/x509" "crypto/x509/pkix" "math/big" "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" v12 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "kubevirt.io/kubevirt/pkg/certificates/bootstrap" certutil "kube...
// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package time provides functionality for measuring and displaying time. // // The calendrical calculations always assume a Gregorian calendar, with // no leap...
package toolbox import ( "context" "testing" ) func TestJokeSources(t *testing.T) { text, err := getDadJoke(context.Background(), 10) if err != nil || text == "" { t.Fatal(err) } text, err = getChuckNorrisJoke(context.Background(), 10) if err != nil || text == "" { t.Fatal(err) } } func TestJoke(t *testi...
package storage import ( "strings" "time" log "github.com/Sirupsen/logrus" "github.com/akutz/gofig" "github.com/akutz/goof" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" "github.com...
// Copyright 2017 The TensorFlow 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 b...
import sys import errno import signal from eventlet import patcher select = patcher.original('select') time = patcher.original('time') sleep = time.sleep from eventlet.support import get_errno, clear_sys_exc_info from eventlet.hubs.hub import BaseHub, READ, WRITE, noop, alarm_handler EXC_MASK = select.POLLERR | selec...
import sys import json import yaml try: from yaml import CLoader as Loader, CDumper as Dumper except ImportError: from yaml import Loader, Dumper from PIL import Image, ImageFont, ImageDraw from tkinter import Tk from tkinter import filedialog from fpdf import FPDF from datetime import datetime """ Defaul...
import time from django.shortcuts import render, render_to_response from django.views.generic import DetailView, ListView, CreateView, UpdateView, TemplateView, FormView from django.views.generic.edit import ProcessFormView from django.views.generic.detail import SingleObjectMixin from django.http import HttpResponseR...
#!/usr/bin/env python # coding: utf-8 # Copyright (C) USC Information Sciences Institute # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> # URL: <http://nlg.isi.edu/> # For more information, see README.md # For license information, see LICENSE # combine.py – a simple tool for combining many text file into bigger one. ...
"""Retrieve Account Credential from Gate API.""" import logging import murl import requests from ..consts import API_URL LOG = logging.getLogger(__name__) def get_env_credential(env='dev'): """Get Account Credential from Spinnaker for _env_. Args: env (str): Environment name to find credentials fo...
import os import re import sys import matplotlib.gridspec as gridspec import matplotlib.pyplot as plt import numpy as np from matplotlib.font_manager import FontProperties from matplotlib.offsetbox import HPacker, TextArea, AnnotationBbox from matplotlib.patches import FancyArrowPatch, ArrowStyle, Polygon from matplot...
""" ================================================================================ pyFluidSynth Python bindings for FluidSynth Copyright 2008, Nathan Whitehead <nwhitehe@gmail.com> Released under the LGPL This module contains python bindings for FluidSynth. FluidSynth is a software synt...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import os import numpy as np from .... import units as u from ... import ICRS, FK5 from ....time import Time from ....table import Table from .....
import os import tee import pkg_resources from os.path import abspath, join, isfile from python import Python from process import Process from chdir import chdir from exit import err_exit class Setuptools(object): """Interface to setuptools functions.""" def __init__(self, process=None): self.pytho...
########################################################### # # Copyright (c) 2005-2008, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written ...
#!/usr/bin/python """Brown Dwarf Flux ratio calculator: Inputs : Star name: Mass of companion in Jupiter masses Age of star: """ from __future__ import division, print_function import numpy as np def _parser(): """Take care of all the argparse stuff. :returns: the args """ parser = argparse.Argumen...
import json import grequests from django.core.management.base import BaseCommand from programs.models import Program, ProgramModules, LearningPlan from disciplines.models import Discipline, Semester, TrainingTerms from modules.models import Module class Command(BaseCommand): help = "Create Django objects from r...
#! /usr/bin/env python # -*- coding: utf-8 -*- ''' Created on Oct 24, 2016 @author: stefan ''' import json import requests class SKBRESTClient(): TRANSLATION_PATH = '1.0/skb/translation?' TITLE_TRANSLATION_PATH = '1.0/skb/title_translation?' KEYWORD_PATH = '1.0/skb/keyword_annotation' def __in...
from bs4 import BeautifulSoup import re import json import time from django.core.management.base import BaseCommand from programs.models import Program, ProgramModules, LearningPlan from disciplines.models import Discipline, Semester, TrainingTerms from modules.models import Module class Command(BaseCommand): "...
""" ConnectionField and associated classes. This module defines some basic classes of objects used to create simulations of cortical sheets that take input through connection fields that project from other cortical sheets (or laterally from themselves). ConnectionField: Holds a single connection field within a CFProj...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 20.01.2014 @author: heinz-peterlang The source files for the dictionaries (of format *.csv and *.txt) are being copied by Jenkins from the opinion-mining-lexicon repository to services.weblyzard.com. ''' from __future__ import unicode_literals from future impo...
from bs4 import BeautifulSoup import re import json import time from django.core.management.base import BaseCommand from django.db.models import Q from programs.models import Program, ProgramModules, LearningPlan from disciplines.models import Discipline, Semester, TrainingTerms from modules.models import Module cl...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 07.04.2014 @author: heinz-peterlang ''' from __future__ import print_function import json import logging import hashlib import unicodedata from lxml import etree from datetime import date, datetime from weblyzard_api.model.exceptions import (MalformedJSONExce...
# Copyright (c) 2010-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 distri...
#!/usr/bin/env python """A static execution plugin for the MTMS pattern """ __author__ = "Vivek Balasubramanian <vivek.balasubramanian@rutgers.edu>" __copyright__ = "Copyright 2015, http://radical.rutgers.edu" __license__ = "MIT" import os import sys import saga import time import traceback import pickle import...
# Copyright (c) 2010-2014, 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 distri...
# Copyright (c) 2010-2014, 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 distri...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 07.04.2014 @author: heinz-peterlang ''' from weblyzard_api.xml_content.parsers import XMLParser class XML2013(XMLParser): SUPPORTED_NAMESPACE = 'http://www.weblyzard.com/wl/2013#' DOCUMENT_NAMESPACES = {'wl': SUPPORTED_NAMESPACE, ...
#!/usr/bin/env python """ .. module:: radical.pilot.agent :platform: Unix :synopsis: The agent for RADICAL-Pilot. The agent gets CUs by means of the MongoDB. The execution of CUs by the Agent is (primarily) configured by the triplet (LRMS, LAUNCH_METHOD(s), SCHEDULER): - The LRMS detects and structu...
# # Copyright 2012 WebFilings, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
import ast import inspect import re import sys import traceback from inspect import CO_VARARGS from inspect import CO_VARKEYWORDS from io import StringIO from pathlib import Path from traceback import format_exception_only from types import CodeType from types import FrameType from types import TracebackType from typin...
data = [0x0, 0x0, 0x0, 0x0, 0x0, 0x8, 0x8, 0x8, 0x0, 0x8, 0xa, 0x4a, 0x40, 0x0, 0x0, 0xa, 0x5f, 0xea, 0x5f, 0xea, 0xe, 0xd9, 0x2e, 0xd3, 0x6e, 0x19, 0x32, 0x44, 0x89, 0x33, 0xc, 0x92, 0x4c, 0x92, 0x4d, 0x8, 0x8, 0x0, 0x0, 0x0, 0x4, 0x88, 0x8, 0x8, 0x4, 0x8, 0x4, 0x84, 0x84, 0x88, 0x0, 0xa, 0x44, 0x8a, 0x40, 0x0, 0x4, 0...
from collections import OrderedDict from datetime import date, datetime from django.core.management import call_command from django.test import TestCase from mock import patch from casexml.apps.case.const import ARCHIVED_CASE_OWNER_ID from casexml.apps.case.sharedmodels import CommCareCaseIndex from corehq.form_proc...
# -*- coding: utf-8 -*- ## ## $Id$ ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either v...
#!/usr/bin/env python # -*- coding: latin-1 -*- import requests import json import sys import logging from urllib.parse import urljoin from urllib.parse import quote class dict_diff(object): """ Calculate items added, items removed, keys same in both but changed values, keys same in both and unchanged va...
#!/usr/bin/env python # -*- coding: latin-1 -*- import requests, json, jsonschema import sys, logging class dict_diff(object): """ Calculate items added, items removed, keys same in both but changed values, keys same in both and unchanged values """ def __init__(self, current_dict, past_dict): self.current_dict...
# -*- coding: utf-8 -*- import sys, os.path path = os.path.expanduser('~/RandomMetroidSolver') if os.path.exists(path) and path not in sys.path: sys.path.append(path) import datetime, os, hashlib, json, subprocess, tempfile, glob, random from datetime import datetime, date from collections import OrderedDict # t...
"""A separate Flask app that serves fake endpoints for demo purposes.""" # -*- coding: utf-8 -*- import json import os from random import randrange as rr from random import choice, random import time from flask import ( Flask, abort, ) from flask.ext.cors import CORS from flask.ext.cors import cross_origin ...
# -*- coding: utf-8 -*- """ Production Configurations - Use djangosecure - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis on Heroku - Use sentry for error logging """ from __future__ import absolute_import, unicode_literals # noinspection PyUnresolvedReferences f...
__version__ = '1.0.54' 1.0.55 __version__ = '1.0.55'
# MIT License # Copyright (c) 2017 MassChallenge, Inc. import os from configurations import Configuration, values from django.urls import reverse_lazy from unipath import Path class Base(Configuration): LANGUAGE_CODE = 'en-us' TIME_ZONE = 'America/New_York' LOGIN_URL = reverse_lazy('auth_login') L...
test: Move google imports into try/except block The datastore tests require google imports. The imports are only required for the datastore backend and thus shouldn't cause a test failure.
from urllib.error import URLError import numpy import smopy import matplotlib.pyplot as plt from matplotlib import colors as mcolors import math from gtfspy.gtfs import GTFS from gtfspy.stats import get_spatial_bounds, get_percentile_stop_bounds, get_median_lat_lon_of_stops from gtfspy.route_types import ROUTE_TYPE_TO...
from helpers import * from java.util.UUID import fromString as java_uuid from org.bukkit.util import Vector from traceback import format_exc as print_traceback ff_perms = ["utils.forcefield", "utils.forcefield.ignore"] ff_prefix = "&8[&aFF&8]" ff_users = [] whitelists = {} # {ff_owner_id: [white,...
""" Based off of `capsule`, by Tristan Jehan and Jason Sundram. Heavily modified by Peter Sobot for integration with forever.fm. Again by Mike iLL and Rosuav for Infinite Glitch """ import os import gc from . import apikeys import logging import pickle import base64 import traceback import threading import subprocess i...
# -*- coding: utf-8; -*- from unittest.mock import MagicMock, patch from tests.base import AppInitialized GIT_HOOK_URL = '/hooks/update-content' # OPTIONS is implicitly added by flask and always handled # http://flask.pocoo.org/docs/0.10/api/#flask.Flask.add_url_rule → Parameters → options _HTTP_METHODS = {'GET', '...
""" Based off of `capsule`, by Tristan Jehan and Jason Sundram. Heavily modified by Peter Sobot for integration with forever.fm. Again by Mike iLL and Rosuav for Infinite Glitch """ import os import gc import apikeys import logging import urllib2 import traceback import threading import subprocess import multiprocessin...
import flask from pale.adapters import flask as pale_flask_adapter from tests.example_app import api def create_pale_flask_app(): """Creates a flask app, and registers a blueprint bound to pale.""" blueprint = flask.Blueprint('api', 'tests.example_app') pale_flask_adapter.bind_blueprint(api, blueprint) ...
# # Copyright (c) 2004-2005 rPath, Inc. # # This program is distributed under the terms of the MIT License as found # in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licenses/mit-license.php. # # This program is distributed in the hope that it will be usef...
""" Calculates .... @copyright: The Broad Institute of MIT and Harvard 2015 """ import argparse, sys, os import numpy as np import pandas as pd from pandas.tools.pivot import pivot_table from scipy.stats import fisher_exact from scipy.stats import ttest_ind from utils import load_dataframe, design_matrix sys.path.app...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Therp BV (<http://therp.nl>) # All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lice...
# -*- coding: utf-8 -*- """ formlayout ========== Module creating Qt form dialogs/layouts to edit various type of parameters formlayout License Agreement (MIT License) ------------------------------------------ Copyright (c) 2009-2015 Pierre Raybaut Permission is hereby granted, free of charge, to any person obtai...
__version__ = '3.4.13' Update version to 3.5.0 __version__ = '3.5.0'
__version__ = '3.5.0' Reversion to 3.4.14 Recent changes are minor fixes to address ansible 2.4, no functional changes at all. As version has not been tagged or released, this change *shouldn't* have a wider impact. __version__ = '3.4.14'
from dez.http.application import HTTPApplication from dez.logging import get_logger from ...scripts.util import log as syslog from ..util import * from routes import static, cb DWEB = None class Web(HTTPApplication): def __init__(self, bind_address, port): HTTPApplication.__init__(self, bind_address, port, get_...
import random from collections import deque from ..learner import Learner from ..utils import max_qvalue class QLearning(Learner): '''Tabular Q-learning''' def __init__(self, env, policy, qfunction, learning_rate=0.1, discount_factor=1.0, **kwargs): super(QLearning, self).__init__(en...
unit testing start
import shutil import subprocess import os import tempfile from django.utils import timezone from rq import get_current_job from osmaxx.conversion._settings import CONVERSION_SETTINGS, odb_license, copying_notice, creative_commons_license from osmaxx.conversion.converters.utils import zip_folders_relative, recursive_...
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import import os # Import Salt Testing libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import skipIf, TestCase from tests.support.mock import NO_MOCK, NO_MOCK_REASON, MagicMock, patch # Import salt libs i...
import database import gamemaker import team class Escavenge(): def __init__(self): self.database = database.Database() self.game_maker = gamemaker.GameMaker(database) self.maker = { "logout" : self.game_maker.logout(), "login" : self.main(), "display status" : self.game_maker.d...
#!/usr/bin/python -u import sys import os import subprocess from datetime import datetime import shutil import tempfile import hashlib import re import logging import argparse import json ################ #### Chronograf Variables ################ # Packaging variables PACKAGE_NAME = "chronograf" INSTALL_ROOT_DIR = ...
#!/usr/bin/env python3 import os import re import sys import json import time import select import logging import argparse import threading import subprocess ETCD_IMAGE = "quay.io/coreos/etcd:v3.3.5" LOG_LEVELS = { "critical": logging.CRITICAL, "error": logging.ERROR, "warning": logging.WARNING, "inf...
from django.db import models import utils.models as utils class AutomatedMessageQuerySet(utils.BaseQuerySet): def for_participant(self,participant,exact=False,**kwargs): ''' Return AutomatedMessage for participant and today ''' description = participant.description(**kwargs) # print "Desc...
#!/usr/bin/env python3 import os import re import json import time import argparse import threading import subprocess ETCD_IMAGE = "quay.io/coreos/etcd:v3.3.5" DELETABLE_RESOURCES = [ "daemonsets", "replicasets", "services", "deployments", "pods", "rc", "pvc", "serviceaccounts", "...
__author__ = 'Isaac' from multiprocessing.queues import Empty class Router: def __init__(self, response_queue, command_queue): self.response_queue = response_queue self.command_queue = command_queue self.routes = {} def handle(self): try: command = self.command_que...
from django.shortcuts import render_to_response from django.template import RequestContext from django.conf import settings from django import http from django.core.urlresolvers import reverse from django.views.decorators.http import require_http_methods from gallery import models as gallery_api from gallery.utils imp...
#!/usr/bin/python import os import shutil import string import subprocess import sys import time APPS = ['httpd', 'mysql'] AAS = ['basicaa', 'anders-aa', 'ds-aa'] APPS_DIR = os.getenv('APPS_DIR') def is_useful(line): return ('Congrats' in line or 'Detected' in line or 'CPU' in line or 'swap' in lin...
from django.contrib.sites.models import Site from django.core import urlresolvers from django.conf import settings from django.template.loader import get_template from django.template import Context from django.views.decorators.csrf import csrf_exempt import requests import logging logger = logging.getLogger(__name__)...
# Copyright 2018 Nathan Sommer and Ben Coleman # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is dis...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ts=2 sw=2 et ai ############################################################################### # Copyright (c) 2012,2013 Andreas Vogel andreas@wellenvogel.net # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and a...
#!/usr/bin/env python import argparse import ConfigParser import json import logging import mad import os import re import pycurl import shutil import sqlite3 import sys import time import socket origGetAddrInfo = socket.getaddrinfo def getAddrInfoWrapper(host, port, family=0, socktype=0, proto=0, flags=0): return ...
#!/usr/bin/python -O import argparse import binascii import ConfigParser import json import logging import lxml.etree as ET import math import os import pycurl import re import setproctitle as SP import signal import socket import sqlite3 import struct import sys import time # # This is needed to force ipv4 on ipv6 de...
#!/usr/bin/python -O import argparse import binascii import ConfigParser import json import logging import lxml.etree as ET import math import os import pycurl import marshal import gzip import re import setproctitle as SP import signal import struct import sys import time import socket import StringIO import threading...
# -*- coding: UTF8 ''' Created on 02.10.2015 @author: mEDI ''' from PySide import QtCore, QtGui import PySide import gui.guitools as guitools from sqlite3_functions import calcDistance __toolname__ = "Bookmarks" __internalName__ = "Bo" __statusTip__ = "Open A %s Window" % __toolname__ class tool...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Tests for ``admin.packaging``. """ from glob import glob from subprocess import check_output from textwrap import dedent from unittest import skipIf from StringIO import StringIO from twisted.python.filepath import FilePath from twisted.python.procutil...
# 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. import json import os import appengine_blobstore as blobstore import object_store from file_system import FileSystem, StatInfo from StringIO import Stri...
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake Utility Functions """ # Copyright (C) 2004 Michael Lauer # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the F...
import json import datetime from copy import copy from flask import request from flask.ext.cors import cross_origin from dateutil.parser import parse as parse_date from alerta.app import app, db from alerta.alert import Alert from alerta.app.utils import absolute_url, jsonify, jsonp, process_alert from alerta.app.met...
""" Copyright 2017 Nicolas Ramirez 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 i...
""" analyzr.NetworkScanner ~~~~~~~~~~~~~~~ This modules allows to scan the network of the current host.. """ from typing import List import netaddr from scapy.all import * from texttable import Texttable from analyzr.core.entities import NetworkNode from analyzr.networktool import NetworkToolFacade logger = logging...
import logging import sys import cli_ui from gitlabform import EXIT_PROCESSING_ERROR from gitlabform.gitlab import GitLab from gitlabform.gitlab.core import NotFoundException class BranchProtector(object): def __init__(self, gitlab: GitLab, strict: bool): self.gitlab = gitlab self.strict = stric...
# # Copyright 2010-2012 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 django.db import models from django.dispatch import receiver from django.contrib.auth.models import User from django.db.models.signals import pre_save, pre_init, post_save, post_delete import datetime class Bill(models.Model): user = models.ForeignKey(User) number = models.CharField(max_length=10, uniqu...
import importlib import androguard.session as session_module from androguard.gui.DataModel import * from androguard.gui.apiwindow import APIWindow from androguard.gui.binwindow import binWidget from androguard.gui.fileloading import FileLoadingThread from androguard.gui.helpers import class2func from androguard.gui.me...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import division import warnings import string import re import math from collections import Counter import pkg_resources import repoze.lru from pyphen import Pyphen easy_word_set = set([ ln.decode('utf-8').strip() for ln in pkg_re...
# -*- coding: utf-8 -*- from django.shortcuts import render from django.http import HttpResponse, Http404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User, Group from rest_framework.views import APIView from rest_framework.response import Response from rest_framework...
import re import ROOT import os from PyAnalysisTools.base import InvalidInputError, _logger from PyAnalysisTools.ROOTUtils.ObjectHandle import get_objects_from_canvas_by_type, get_objects_from_canvas_by_name from PyAnalysisTools.PlottingUtils.PlotConfig import get_style_setters_and_values, find_process_config def loa...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2014, Anima Istanbul # # This module is part of anima-tools and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause import os import datetime import pymel.core as pm import maya.cmds as mc from anima import stalker_server_internal_addres...
__version__ = '2.0.0a4' default_app_config = 'tg_react.apps.TgReactConfig' Dump version to 2.0.0 __version__ = '2.0.0' default_app_config = 'tg_react.apps.TgReactConfig'
#! /usr/bin/python2.7 # -*- coding: utf-8 -*- import os import pandas as pd from settings import ASSEMBLY_ID, BASEURL, DIR, END_BILL, ID_MULTIPLIER, LIST_DATA import utils def get_urlmap(): with open(LIST_DATA, 'r') as f: data = pd.read_csv(f) return zip(data['bill_id'], data['link_id'], data['has_su...
from __future__ import print_function import argparse import os import shutil import subprocess as sp import sys import yaml def run_cmd(args, cwd='.', raise_err=True): if isinstance(args, str): args = args.split() print("RUN CMD", args, file=sys.stderr) proc = sp.Popen(args, stdout=sp.PIPE, stde...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any...
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np from tgym.core import Env from tgym.utils import calc_spread plt.style.use('dark_background') mpl.rcParams.update( { "font.size": 15, "axes.labelsize": 15, "lines.linewidth": 1, "lines.markersize": 3 } )...
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
__author__ = 'sevas' from datetime import datetime, timedelta from StringIO import StringIO class Event(object): def __init__(self): self.summary = "" self.organizer = "" self.location = "" self.description = "" self.dtstart = None self.dtend = None self.dt...
# coding=utf-8 import numpy as np import multiprocessing import itertools as it import collections as coll from functools import partial import logging import h5py import scipy.ndimage as nd import scipy.sparse as sparse from scipy.ndimage.measurements import label from scipy.spatial.distance import pdist, squareform ...
#!/usr/bin/env python # The MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, ...
import numpy as np from scipy.ndimage.measurements import maximum_position, label, find_objects from scipy.ndimage.morphology import generate_binary_structure def search_candidates(image, threshold, n_d_x, n_d_y): threshold = np.percentile(image.ravel(), threshold) a = image.copy() # Keep only tail of im...
try: import matplotlib matplotlib.use('Agg') # stops it from using X11 and breaking import matplotlib.pyplot as plt except: matplotlib = None try: from mako.template import Template from mako.lookup import TemplateLookup except: Template = None TemplateLookup = None try: from lxml import etree from lxml.etr...
import logging from typing import Any, Dict, Optional, Union from globus_sdk import client, paging, response, utils from globus_sdk._types import UUIDLike from globus_sdk.scopes import SearchScopes from .data import SearchQuery, SearchScrollQuery from .errors import SearchAPIError log = logging.getLogger(__name__) ...