text
stringlengths
17
737k
from __future__ import absolute_import, unicode_literals import traceback from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from dash.orgs.models import Org from django.conf import settings from django.template.response import TemplateResponse from django.utils import translati...
import fnmatch import os.path import re EXPAND_BRACES_RE = re.compile(r'.*(\{.*?[^\\]?\})') def get_real_metric_path(absolute_path, metric_path): # Support symbolic links (real_metric_path ensures proper cache queries) real_absolute_path = os.path.realpath(absolute_path) if absolute_path != real_absolute...
# Copyright 2022 The CLU 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...
class CommandException(Exception): """ This custom exception can be thrown by commands when something goes wrong during execution. The parameter is a message sent to the source that called the command (a channel or a user) """ def __init__(self, displayMessage=None, shouldLogError=True): """ Create a new Comm...
#!/opt/python-2.7.6/bin/python # -*- coding: utf-8 -*- import os import sys import argparse import datetime import time import pwd import grp import MySQLdb from pseudo_cluster.task import Task_record from pseudo_cluster.tasks_list import Tasks_list def main(argv=None): """ Главная функция программы ...
#!/usr/bin/env python3 # Copyright (c) 2009-2019 The Bitcoin Core developers # Copyright (c) 2014-2019 The DigiByte Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Run regression test suite. This module calls do...
#!/usr/bin/env python # coding: utf-8 import scanpy as sc import scIB import warnings warnings.filterwarnings('ignore') def runIntegration(inPath, outPath, method, hvg, batch): """ params: method: name of method batch: name of `adata.obs` column of the batch max_genes_hvg: maximum num...
#!/usr/bin/env python # Created by Raul Peralta-Lozada import sys import rospy from json_msgs.srv import * from geometry_msgs.msg import PoseWithCovarianceStamped def service_call(service_name): rospy.wait_for_service(service_name) try: swapper_call = rospy.ServiceProxy(service_name, JsonSrv) ...
#!/usr/bin/python # NATINAL # (c) 2016-20 J. W. Crockett, Jr., josh.crockett@gmail.com # Not # Another # Twit # Issuing # Notifications # About the # Lineups! # yes, the acronym's a terrible stretch. ref: http://www.uni-watch.com/2009/04/18/natinal-joke/, and the daily race of Nationals beat writers for who tweets t...
# -*- coding: utf-8 -*- import datetime from flask import session, redirect, url_for, flash, render_template from . import app from .forms import ShortenedURLForm from .models import ShortenedURL, register from .validation import get_msg_if_blacklisted_or_spam @app.context_processor def inject_year(): now = dat...
from django import forms from django.contrib.auth import login, authenticate from django.http import HttpResponse from django.views.generic import View,TemplateView from django.template import RequestContext from django.shortcuts import render_to_response, redirect, get_object_or_404 from django.core.urlresolvers impor...
""" A number of functions that help the Amcat3 selection page to retrieve selections from the database """ from amcat.models import article def getQuerySet(projects=None, articlesets=None, mediums=None, startDate=None, endDate=None, articleids=None, **kargs): queryset = article.Article.objects if articlesets:...
from cms import settings from cms.admin.change_list import CMSChangeList from cms.admin.dialog.views import get_copy_dialog from cms.admin.forms import PageForm, PageAddForm from cms.admin.permissionadmin import PAGE_ADMIN_INLINES, \ PagePermissionInlineAdmin from cms.admin.utils import get_placeholders from cms.ad...
# -*- coding: utf-8 -*- import argparse import configparser import hashlib import hmac import io import json import logging import mimetypes import os import re import smtplib import socket import tempfile import traceback import urllib.request import urllib.parse import urllib.error from base64 import b64decode, b64e...
#Is it better to restrict a Reaction to a single model or #should we allow a Reaction to be associated with multiple models? # from collections import defaultdict import re from copy import deepcopy from .Object import Object from .Metabolite import Metabolite from .Gene import Gene from warnings import warn class Re...
''' Pretty prints a bitboard to the console given its hex or decimal value from argv or stdin. ''' import sys, textwrap FULL_BITBOARD = 0xFFFFFFFFFFFFFFFF # 64 set bits def print_bb(bb_str): # Handle hex/decimal bitboards if bb_str.startswith('0x'): base = 16 else: base = 10 if int(bb...
# -*- coding: utf-8 -*- ''' Text Annotation module Latest version can be found at https://github.com/letuananh/chirptext :copyright: (c) 2012 Le Tuan Anh <tuananh.ke@gmail.com> :license: MIT, see LICENSE for more details. ''' import os import logging import json import csv import warnings from collections import na...
""" Network polling code. The reactor works in tandem with the socket operations. Here's the basic workflow: * the coroutine yields a operation * the scheduler runs that operation (the [Docs_CogenCoreEventsOperation#process process] method) Note: all the socket operations share the same [Docs_CogenCor...
# -*- coding: utf-8 -*- """ numconv ------- :synopsys: Python library to convert strings to numbers and numbers to strings. :copyright: 2008-2009 by Gustavo Picon :license: Apache License 2.0 :version: 2.1a :url: http://code.tabo.pe/numconv/ :documentation: `numconv-docs <http://docs.tabo.pe/numconv/...
""" Install and manage python packages usage: pip.py [-h] [--verbose] sub-command ... optional arguments: -h, --help show this help message and exit --verbose be more chatty List of sub-commands: sub-command "pip sub-command -h" for more help on a sub-command list list packages inst...
from mitxmako.shortcuts import render_to_response from django.http import HttpResponse from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import user_passes_test from django.db.models import Q import json import logging from django import db from models import * from student...
#!/usr/bin/env python3 # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import shutil import sys import os import argparse import subprocess import logging import difflib logger = logging.getLogger('verible_format') VER...
#!/usr/bin/env python #-*- coding: utf-8 -*- """ pyScss, a Scss compiler for Python @author German M. Bravo (Kronuz) <german.mb@gmail.com> @version 1.1.4 @see https://github.com/Kronuz/pyScss @copyright (c) 2012 German M. Bravo (Kronuz) @license MIT License http://www.opensource.org/licen...
import datetime, glob, inspect, json, os, random, re, string from CommandTemplate import CommandTemplate from IrcMessage import IrcMessage from util import FileUtil from util import IrcFormattingUtil from util import StringUtil import GlobalStore from CommandException import CommandException fieldCommandPrefix = u"$...
import Database class User: def __init__(self, name, email): self.name = name self.email = email def user_creation(self, db): """user creation returns error string if unsuccessfull""" if (db.query("select '%s' from db") % (self.name)) != self.name): db.update("insert '%s") % (self.name) else: return...
"""Utility file for utterance generator to work with CX resources.""" # Copyright 2022 Google 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 # # https://www.apache.org/licenses/LICE...
# Copyright (c) 2016, PerformLine, 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 conditio...
import random import click from faker import Faker from catwatch.app import create_app from catwatch.extensions import db from catwatch.blueprints.issue.models import Issue from catwatch.blueprints.user.models import User fake = Faker() app = create_app() def _log_status(count, model_label): """ Log the o...
from __future__ import absolute_import import sys import os.path import numpy as np import scipy.interpolate as interpolate import datetime import dateutil import csv import copy from itertools import dropwhile from sunpy.net import hek from sunpy.time import parse_time from sunpy.sun import sun import sunpy.lightcur...
from sklearn import clone, metrics from sklearn.base import BaseEstimator, RegressorMixin import sklearn.cross_validation as cv import numpy as np from scipy.optimize import fmin_l_bfgs_b, nnls class SLError(Exception): """ Base class for errors in the SupyLearner package """ pass class SuperLearner(...
from headerparse import headerError from proxybase import proxyError import sys import html2md import utils import datetime import os ################################################################################ # def _getProxy(header): try: p = header.proxy() except headerError, err: print...
import os from listtools import * from collections import namedtuple import files ObjectiveCClass = namedtuple("ObjectiveCClass", "publicMethods, className, sloc, semicolons, imports, imported") class ObjectiveCClass(ObjectiveCClass): def parseFromString(self, string): pass ObjectiveCMethod = namedtuple(...
# Copyright 2011 the Melange 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 wr...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
# Copyright 2009 - Participatory Culture Foundation # # This file is part of Miro Community. # # Miro Community 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 ...
import hug import json import sqlite3 import pandas as pd conn = sqlite3.connect('check.db') c = conn.cursor() @hug.directive() def cors(support='*', response=None, **kwargs): '''Returns passed in parameter multiplied by itself''' response and response.set_header('Access-Control-Allow-Origin', support) @hug.g...
import functools import logging import os import tempfile import traceback from collections import namedtuple, defaultdict from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait from datetime import datetime from enum import Enum import decorator import dill import matplotlib as mpl import networkx a...
#!/usr/bin/env python3 # # Copyright (C) 2019 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as # published by the Free Software Foundation. # # This program is distributed in the hope t...
import random import places import items import money class Outcome(object): def __init__(self, character, msg, add_item=False, # USAGE: items.item_name remove_item=False, # USAGE: items.item_name remove_all_items=False, ...
from PySide import QtGui, QtCore class PayDialog(QtGui.QDialog): def __init__(self, value, currency_, customer_, disabled=[]): super(PayDialog, self).__init__() self.value = value self.currency = currency_ self.customer = customer_ self.payment = None ...
#!/usr/bin/python # # Copyright (C) 2010, 2012, 2013 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 later version. # # ...
""" ArcGIS Toolbox for integrating the CEA with ArcGIS. ArcGIS starts by creating an instance of Toolbox, which in turn names the tools to include in the interface. These tools shell out to ``cli.py`` because the ArcGIS python version is old and can't be updated. Therefore we would decouple the python version used by...
from sqlalchemy import * from sqlalchemy.orm import relationship, backref, exc from sqlalchemy.sql.expression import between from sqlalchemy.dialects.mysql import INTEGER as Integer from datetime import datetime from rfk.database import Base, UTCDateTime from rfk.types import ENUM, SET from rfk.helper import now cl...
import os from mock import Mock, PropertyMock, patch from moto import mock_ec2 from tornado.testing import AsyncTestCase class Test_broker(AsyncTestCase): db_uri = "sqlite:////tmp/loads_test.db" def _createFUT(self): from loadsbroker.broker import Broker from loadsbroker.options import Influ...
from flask import Flask, url_for from flask.ext.pymongo import PyMongo from views import * import os papertalk = Flask(__name__) try: papertalk.config.from_object('config.Config') except: papertalk.config["MONGO_HOST"] = os.environ.get("MONGO_HOST") papertalk.config["MONGO_PORT"] = os.environ.get("MONGO_PO...
"""The noisemodels module contains all noisemodels available in Pastas. Author: R.A. Collenteur, 2017 """ from abc import ABC from logging import getLogger import numpy as np import pandas as pd from .decorators import set_parameter logger = getLogger(__name__) all = ["NoiseModel", "NoiseModel2"] class NoiseMo...
import os import sys import tempfile import random from hashlib import sha512 from subprocess import Popen, PIPE from datetime import datetime def genkey(secret, salt): """ Generate keys for files based on host key and filename. Nice utility, Bob! """ h = sha512() h.update(":%s:%s:" % (secret,...
import logging import urllib.parse as urllibparse import requests import requests.adapters logger = logging.getLogger("dunya") HOSTNAME = "https://dunya.compmusic.upf.edu" TOKEN = None session = requests.Session() session.mount('http://', requests.adapters.HTTPAdapter(max_retries=5)) session.mount('https://', reques...
if __name__ == "__main__": print("Starting up Discord Harmonbot...") import discord from discord.ext import commands import asyncio import ctypes import json import os import re import sys import traceback import aiohttp from aiohttp import web import pkg_resources # from setuptools import youtu...
#!/usr/bin/env python import logging import os from beepboop import resourcer from beepboop import bot_manager from slack_bot import SlackBot from slack_bot import spawn_bot logger = logging.getLogger(__name__) if __name__ == "__main__": log_level = os.getenv("LOG_LEVEL", "INFO") logging.basicConfig(form...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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...
p3Path='../peano3/src' p3RepositorySubpath='src' p3Revision='1140' #Revision number or 'HEAD' p3Build='release' #'debug', 'asserts', or 'release' p3Parallel='yes' #'yes' or 'no' p3Dimension='2' #'2' or '3' def getPeano3Path(): return p3Path def getPeano3RepositorySubpath(): return p3RepositorySubpath def getPea...
import os import sys def env(name, default=None): val = os.environ.get(name) if val == 'True': return True elif val == 'False': return False elif val is None: return default return val PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) PACKA...
#! /usr/bin/env python # -*- coding: utf-8 -*- '''This script is used to automaticaly tweet link of the last published post from a Pelican blog. Both Markdown and Rest syntax are supported. The 'Slug' tag **has** to be set so the script can create the complete URL of the post. ''' __author__ = 'quack1' __version...
#! /usr/bin/env python """Convert a LaTeX .toc file to some PDFTeX magic to create that neat outline. The output file has an extension of '.bkm' instead of '.out', since hyperref already uses that extension. Let's avoid clashing. """ import getopt import os import re import string import sys # Ench item in an ent...
#!/usr/bin/env python """ Soil Moisture Timeseries """ import sys sys.path.insert(0, '/mesonet/www/apps/iemwebsite/scripts/lib') import os os.environ[ 'HOME' ] = '/tmp/' os.environ[ 'USER' ] = 'nobody' import datetime import numpy import sys import iemtz import cgitb cgitb.enable() import network nt = network.Table("I...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import math import numpy as np from numpy.random import RandomState from scipy.stats import (binom, ttest_ind) from scipy.optimize import brentq def permute_within_groups(group, condition, groups, see...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __opener...
# Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
from django import http from django.conf import settings from utils import next_redirect, confirmation_view from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.shortcuts import render_to_response from django.template import RequestContext from django.template.loader import ren...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This Bot uses the Updater class to handle the bot. First, a few handler functions are defined. Then, those functions are passed to the Dispatcher and registered at their respective places. Then, the bot is started and runs until we press Ctrl-C on the command line. U...
""" Functions to interrogate and extract CTD data from the ctd.db SQLite3 database. """ from __future__ import print_function from datetime import datetime from pathlib import Path from warnings import warn import numpy as np from netCDF4 import Dataset from PyFVCOM.utilities.general import split_string, ObjectFro...
""" Carneades model of argumentation ================================ >>> a = PropLiteral('a') >>> argset = ArgumentSet() >>> v = argset.add_proposition(a) Using a CAES ++++++++++++ >>> kill = PropLiteral('kill') >>> intent = PropLiteral('intent') >>> neg_intent = intent.negate() >>> murder = PropLiteral('murder') >...
import mock from django.test import TestCase import json from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.test import Client class TestVersionViewer(TestCase): url_django_version_viewer = reverse('django_version_viewer') url_django_version_viewer_csv = reve...
''' Integration test cases for AlchemyModelViewSet Uses Django test client ''' from utils import SessionMixin, DeclarativeModel, ClassicalModel from utils import CompositeKeysModel, ChildModel from djangorest_alchemy.managers import AlchemyModelManager from djangorest_alchemy.viewsets import AlchemyModelViewSet from dj...
''' Implements the often needed split, map, combine paradigm ''' from __future__ import division import os import tempfile import logging import numpy as np import tables as tb from collections import Iterable from pathos import multiprocessing from pathos.pools import ProcessPool class SMC(object): def __init...
# *************************************************************************** # * Copyright (c) 2015 - FreeCAD Developers * # * Author: Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
#!/usr/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Parameter handlers for the SMIRNOFF force field engine This file contains standard ...
##################################################################### # variables.py # # (c) Copyright 2013-2015, Benjamin Parzella. All rights reserved. # # 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 Soft...
#!/usr/bin/env python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Parameter handlers for the SMIRNOFF force field engine This file contains standard ...
""" DogStatsApi is a tool for collecting application metrics without hindering performance. It collects metrics in the application thread with very little overhead (it just writes them to a `Queue <http://docs.python.org/library/queue.html>`_ with an aggressive timeout). The aggregation and network access is performed ...
from itertools import groupby import datetime import os.path import bisect import iso8601 from flask import url_for MIN_YEAR = 2006 ICONS = { "member": "bill-introduced.png", "committee": "committee-discussion.png", "house": "house.png", "president": "signed-by-president.png", "unknown": "bill-i...
import copy import warnings from collections.abc import Iterable import numpy as np from .utils import histogram, show_progress, sum_if_not_none_or_initialize from .gti import generate_indices_of_segment_boundaries_unbinned, generate_indices_of_segment_boundaries_binned try: import pyfftw from pyfftw.interfac...
# 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, software # distributed under t...
#!/usr/bin/env python import numpy as np import argparse import os import time from SULI import which from SULI.execute_command import execute_command from SULI.work_within_directory import work_within_directory from astropy.io import fits if __name__ == "__main__": parser = argparse.ArgumentParser('Submit tran...
# data/models/inventory.py: Data models that make up the shopping inventory # # Copyright 2014 Sudaraka Wijesinghe <sudaraka.org/contact> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Founda...
"""Base Bolt classes.""" from __future__ import absolute_import, print_function, unicode_literals from collections import defaultdict import os import signal import sys import threading import time import warnings from six import iteritems, reraise, PY3 from .base import Component from .ipc import (read_handshake, r...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2018 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 Licen...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import, division __version_info__ = (0, 2, 1) __version__ = '.'.join(map(str, __version_info__))
# !/usr/bin/python # -*- coding: cp1252 -*- # ################################################################################## # # This program is part of OSRFramework. You can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation,...
import constants import reversion from datetime import datetime from django.db import models from django.db.models.query_utils import Q from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.core.urlresolvers import reverse from core.models import BaseModel from pu...
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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...
# This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
# imagecodecs/numcodecs.py # Copyright (c) 2021, Christoph Gohlke # 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 notice, # ...
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException...
# Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permane...
# -*- coding: utf-8 -*- import os import re import sys import pygments from pygments.lexers import get_lexer_by_name from pygments.formatters import HtmlFormatter from six.moves import html_entities from . import utils class Macro(object): """Base class for altering slide HTML during presentation generation"""...
import os import sys import numpy as np from collections import namedtuple from decimal import Decimal from decimal import ROUND_HALF_UP from astropy.time import Time from astropy.table import Table from astropy.wcs import WCS from astropy.modeling import models, fitting from matplotlib.colors import LogNorm import...
import sh import os import shutil class Shell(object): # @classmethod # def ls(cls, arguments=None): # return cls._execute(sh.ls, arguments) @classmethod def _execute(cls, f, *args, **kwargs): ''' interanl method to execute a command with args and kwargs and pass...
import base64 import annotators import bottle import json import hadoopy_hbase import time import uuid import hashlib import mturk_vision import picarus.api import numpy as np import crawlers import re import gipc import picarus_takeout import logging import msgpack # TODO: Abstract these operations from driver import ...
""" gui/render ~~~~~~~~~~~~~~~~~~~~ Graphical user interface for rendering localization images :author: Joerg Schnitzbauer, 2016 :copyright: Copyright (c) 2016 Jungmann Lab, Max Planck Institute of Biochemistry """ import sys import os.path import traceback from PyQt4 import QtCore, QtGui import n...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#! /usr/bin/env python3 import sys, io, asyncio, random, decimal, collections, getpass, pprint from connectrum.client import StratumClient from pycoin.ui import standard_tx_out_script from pycoin.tx.tx_utils import distribute_from_split_pool, sign_tx from pycoin.tx.Tx import Tx from subclasses import MyServerInfo, ...
import os import sys from pip.basecommand import Command from pip.commands.options import * from pip.index import PackageFinder from pip.log import logger from pip.exceptions import CommandError from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.util import normalize_path from pip.wheel...
import socket from struct import * import sys import time import binascii def unauthenticated_test_packet(seq): # https://tools.ietf.org/html/rfc4656#section-4.1.2 # Sequence field sequence_number = pack('!I', int(seq)) # Used ! for bits alignment "network" (= big-endian) # Timestamp field localtim...
#! /usr/bin/env python # sfi -- slice-based facility interface import sys sys.path.append('.') import os, os.path import tempfile import traceback import socket from types import StringTypes, ListType from optparse import OptionParser from sfa.trust.certificate import Keypair, Certificate from sfa.trust.credential im...
#!/usr/bin/python """script to run the experiment make sure you've already generated and saved the stimuli you want (using stimuli.main). They should be in the order you want for that run. also make sure that you've already set up the monitor you'll be using in PsychoPy's monitor center """ import numpy as np from p...
import sys import getopt from ctl import HavenCtl def print_version(): import pkg_resources # part of setuptools version = pkg_resources.require("havenctl")[0].version print(version) def print_usage(): print """ Usage: havenctl [-a <remote_address> | --address=<remote_address>] [-p <...
#!/usr/bin/python # -*- coding: utf-8 -*- # # progressbar - Text progress bar library for Python. # Copyright (c) 2005 Nilton Volpato # # 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; ei...
# Copyright 2014 PerfKitBenchmarker 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...