src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- """ Originally from https://code.google.com/p/pysuffix/ Used from https://github.com/baiyubin/pysuffix """ from array import array def radix_pass(a, b, r, n, k): """ :param a: word to sort :param b: sorted words :param r: initial string :param n: input size :param k: a...
#!/usr/bin/env python ################################################################################ # Copyright (C) 2014, 2015 GenAP, McGill University and Genome Quebec Innovation Centre # # This file is part of MUGQIC Pipelines. # # MUGQIC Pipelines is free software: you can redistribute it and/or modify # it und...
# -*- coding: utf-8 -*- import hmac import hashlib import math import time from cherrypy.process import plugins __all__ = ['TokenEnginePlugin'] class TokenEnginePlugin(plugins.SimplePlugin): """ Generates and verifies RFC-6238-compliant time-based one-time passwords. Uses the SHA256 digest algorithm an...
from django.forms import widgets from django.contrib.auth.models import User, Group from rest_framework import serializers from .models import * class IconSerializer(serializers.ModelSerializer): class Meta: model=Icon fields = ('__all__') class ServiceSerializer(serializers.ModelSerializer):...
from django.shortcuts import render from django.http import Http404 from django.http import HttpResponse, HttpResponseRedirect,Http404 import datetime from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.utils.timezone import localtime from transaction.models import...
"""Module containing non-deprecated functions borrowed from Numeric. """ from __future__ import division, absolute_import, print_function import types import warnings import numpy as np from .. import VisibleDeprecationWarning from . import multiarray as mu from . import umath as um from . import numerictypes as nt ...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Define the HEOS CoolProp backend for node. """ from scr.logic.nodes.node import Node from scr.logic.refrigerants.re...
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
#!/usr/bin/env python3 import sys import argparse from httpclient.http import HttpRequest __version__ = '0.1.0' def parse_cmd_options(args): """Parse the command line arguments.""" parser = argparse.ArgumentParser() parser.add_argument('url', help='URL to send the request to') parser.add_argument...
""" Parsing TCPROS communication protocol usage: ./tcpros <log file to replay> """ import socket import struct import sys import datetime def prefix4BytesLen( s ): "adding ROS length" return struct.pack("I", len(s)) + s def splitLenStr( data ): ret = [] while len(data) >= 4: size = s...
""" Wrapper for biopython Fasta, add option to parse sequence headers """ import re import sys import os import os.path as op import shutil import logging import string from itertools import groupby, izip_longest from Bio import SeqIO from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord from Bio.SeqUtils.Chec...
from setuptools import setup, find_packages import os # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... # (from http://packages.python.org/an_ex...
#!/usr/bin/env python """wordmap_tst.py is the executable module for the testing the MapList and WordMap classes for replace-words coding test. This module creates a MapList instance, and populates it with test WordMap objects. Then, the new MapList/WordMap(s) combination is tested both for checkin...
#!/usr/bin/python # -*- coding: utf-8 -*- """Bot to find all pages on the wiki with mixed latin and cyrilic alphabets.""" # # (C) Pywikibot team, 2006-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals import codecs import itertools import os import re f...
# (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP # # 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...
# -*- coding: utf-8 -*- ############################################################################ # Copyright (C) 2015 by Michael Goerz # # http://michaelgoerz.net # # ...
import os from test_commits import CommittedRepositoryTest class DeletionTest(CommittedRepositoryTest): def testDeletingFile(self): filename = self.makeSomeChange() full_filename = os.path.join(self.repo.path, filename) self.repo.addAll() self.repo.commit(message="test") sel...
{"expires_in":2592000,"refresh_token":"22.ca7aeff542c491ee0c9de8a3010a9de4.315360000.1724417263.3875775130-1056026","access_token":"21.8bdf77c07a392aea779d571a24903d45.2592000.1411649263.3875775130-1056026","session_secret":"8ddef6d7ab2a0b36034c53a46bcbb6c0","session_key":"9mnRfHBbgiKJcCaPaY1v1Qjo2\/VryC6ZM+X+sorRrQ6C8...
# coding=utf-8 # Copyright 2021 The Uncertainty Baselines 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 ap...
# Copyright (C) 2014 Jim Turner # This file is part of map_ssh_attempts. # map_ssh_attempts 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 v...
__author__ = "Andre Merzky, Ole Weidner" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" """ List of all registered SAGA adaptor modules. This registry is used to locate and load adaptors. The entries must be formatted in dotted python module notation (e.g. as 'saga.adaptors.contex...
#!/bin/env python # This is a C++ example from the OpenSceneGraph source code, converted to python # /* OpenSceneGraph example, osgterrain. # * # * 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 t...
# -*- coding: utf-8 -*- ''' Freeciv - Copyright (C) 2009-2017 - Andreas Røsdal andrearo@pvv.ntnu.no 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, or (at your option) ...
# -*- coding: utf-8 -*- import os from setuptools import setup, find_packages import watson.filesystem name = 'watson-filesystem' description = 'Abstracted filesystems for Watson.' version = watson.filesystem.__version__ def read(filename, as_list=False): with open(os.path.join(os.path.dirname(__file__), filenam...
# -*- encoding: utf-8 -*- import abc from abjad.tools.datastructuretools.TreeContainer import TreeContainer class ReSTDirective(TreeContainer): r'''A ReST directive. ''' ### INITIALIZER ### def __init__( self, argument=None, children=None, directive=None, name...
import os import time import unittest from context import get_testdata, TESTS_DATA_DIR, woogenerator from woogenerator.parsing.special import CsvParseSpecial from woogenerator.utils import Registrar, TimeUtils class TestCSVParseSpecialV2(unittest.TestCase): def setUp(self): # import_name = TimeUtils.get...
import logging from datetime import datetime, timedelta from django.core.cache import cache from django.db import models import bleach from celeryutils import task from tower import ugettext_lazy as _ import amo.models from mkt.translations.fields import save_signal, TranslatedField from mkt.users.models import User...
#!/usr/bin/env python def get_help_data_12577(): """ Alerts and Alarms help. Data store of information to be presented when a help request is made for port 12577. Returns a list of dictionaries associated with various requests supported on that port. """ help_data = [ { ...
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-07-17 23:22 from __future__ import unicode_literals import ckeditor.fields import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('iiits', '0062_auto...
from typing import Iterable, NamedTuple from elasticsearch import Elasticsearch from elasticsearch_dsl import Date, Document, InnerDoc, Integer, Keyword, Nested from injector import Module, inject from rep0st.analyze.feature_vector_analyzer import TYPE_NAME as FEATURE_VECTOR_TYPE from rep0st.config.rep0st_elasticsear...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Thematic.order' db.add_column('carts_thematic', 'order', ...
#!/usr/bin/env python import xmlrpclib, time, os, base64, re, sys sys.path.append("/etc/syncpkgd") from ctlconfig import config server = xmlrpclib.Server(config.server_url) if len(sys.argv) > 1: if sys.argv[1] == "-d": if server.cancel_build(config.server_user, config.server_pass, sys.argv[2]): print "Okay, th...
# Copyright 2013 NEC Corporation # 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 ...
import pygame, os from OpenGL.GL import * def MTL(filename): contents = {} mtl = None for line in open(filename, "r"): if line.startswith('#'): continue values = line.split() if not values: continue if values[0] == 'newmtl': mtl = contents[values[1]] = {} ...
#!/usr/bin/env python # # check-translation.py - check Mercurial specific translation problems import polib import re scanners = [] checkers = [] def scanner(): def decorator(func): scanners.append(func) return func return decorator def levelchecker(level, msgidpat): def decorator(func):...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet from ...shareds...
# File: # Desc: import math; # param: hType, hexType, 0 for Flat topped, 30 if Pointy topped # param: center, Vector2Point, hex center # param: radius, size of hex # param: index, indexPoint corner of hex, 0-5 # returns: Vector2Point hex corner def GeneratePointHEX(hType, center, radius, index): vec[0]; angle_deg =...
# Copyright (C) IBM Corporation 2008 from BeautifulSoup import BeautifulSoup, Tag from NewtifulSoup import NewtifulStoneSoup as BeautifulStoneSoup import re from datetime import date class NoDocException(Exception): def __init__(self, value): self.parameter = value def __str__(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 Luis Alejandro Martínez Faneyth # # This file is part of Condiment. # # Condiment 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 ver...
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------- # scrollabletext_area.py - A scrollable text area for the Freevo skin # ----------------------------------------------------------------------- # $Id$ # # Notes: # Todo: # # -------------------------------------------...
#!/usr/bin/env python # Based on previous work by # Charles Menguy (see: http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process) # and Sander Marechal (see: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/) # Adapted by M.Hendrix [2015] # daemon13....
import qtawesome as qta from components.Menu import menuSeperator from PyQt5 import QtGui, QtCore, QtWidgets #Menu widget placed in the stack of vLPart class MenuEdit(QtWidgets.QWidget): def setup(self): vMenu = QtWidgets.QVBoxLayout() vMenu.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) ...
import itertools import numpy as np from numpy.testing import assert_array_equal, assert_array_almost_equal from nose.tools import assert_equal, assert_true from pystruct.models import GraphCRF, LatentNodeCRF, EdgeFeatureLatentNodeCRF from pystruct.learners import (NSlackSSVM, LatentSSVM, ...
# # Copyright (C) 2017 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope that it will be...
import logging import os import tempfile from twisted.internet.defer import inlineCallbacks, returnValue, succeed, fail #from txzookeeper import ZookeeperClient from txzookeeper.managed import ManagedClient from juju.errors import ( EnvironmentNotFound, MachinesNotFound, ProviderError) from juju.machine import...
from ovito import * from ovito.io import * from ovito.modifiers import * import numpy as np node = import_file("../../files/CFG/shear.void.120.cfg") node.add_to_scene() node.modifiers.append(SliceModifier( distance = -12, inverse = True, slice_width = 18.0 )) node.modifiers.append(SliceModifier( dist...
import io import json import pytest from AzureKubernetesServices import (API_VERSION, AKSClient, clusters_addon_update, clusters_list) app_id = 'app_id' subscription_id = 'subscription_id' resource_group_name = 'resource_group_name' @pytest.fixture() def client(mocker): moc...
# encoding=utf-8 import tornado.web from terroroftinytown.tracker.model import User ACCOUNT_COOKIE_NAME = 'tottu' ACCOUNT_TOKEN_COOKIE_NAME = 'tottt' class BaseHandler(tornado.web.RequestHandler): def get_current_user(self): username_raw = self.get_secure_cookie(ACCOUNT_COOKIE_NAME) token = sel...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
# # The Multiverse Platform is made available under the MIT License. # # Copyright (c) 2012 The Multiverse Foundation # # 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 restrict...
""" Unittests for opal.utils """ import sys from django.test import TestCase from django.db.models import ForeignKey, CharField from mock import patch from opal.core.test import OpalTestCase from opal import utils class StringportTestCase(TestCase): def test_import(self): import collections sel...
from django.conf import settings from dcu.active_memory import upload_rotate import datetime import os.path import subprocess import logging logger = logging.getLogger(__name__) class BackupFailed(Exception): pass def backup_media(): ''' make a backup of media files ''' timestamp = datetime.d...
# Copyright 2014, Oliver Nagy <olitheolix@gmail.com> # # This file is part of Azrael (https://github.com/olitheolix/azrael) # # Azrael 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...
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
from . import evaluate class Parser(): def __init__(self, variables): self.lexemes = [] self.lookahead = None self.tokens = [] self.parse_tree = [] self.variables = variables self.types = { 'TRUE_KEYWORD': 'boolean', 'FALSE_KEYWORD': 'boolean...
import telnetlib import sys import time import random import math import GnuplotUtil from tankUtil import * class Agent(object): # constants SERVER_DELIMITER = "\n" LIST_START = "start" + SERVER_DELIMITER LIST_END = "end" + SERVER_DELIMITER SERVER_CONNECT_ACKNOWLEDGED = "bzrobots 1" + SERVER_DELIMITER NOT_SET ...
#!/bin/bash/python #coding=utf-8 ''' #first try start from PIL import Image im=Image.open('balloons.jpg','wb') w,h=im.size diff=Image.new(im.mode,(w/2,h),0) for i in range(w/2): for j in range(h): diff.putpixel((i,j),tuple([x[0]-x[1] for x in zip(im.getpixel((i,j)),im.getpixel((i+w//2,j)))])) diff.s...
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import datetime import telestream_cloud_qc from telestream_cl...
from django.conf import settings from django.forms import widgets from django.db import models from django.utils.safestring import mark_safe import warnings warnings.warn("django_mongodb_engine.widgets is deprecated and will be removed " "in version 0.5", DeprecationWarning) class DictWidget(widgets.Wi...
import numpy as np from metaworld.policies.action import Action from metaworld.policies.policy import Policy, assert_fully_parsed, move class SawyerSweepIntoV2Policy(Policy): @staticmethod @assert_fully_parsed def _parse_obs(obs): return { 'hand_pos': obs[:3], 'unused_1':...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'load_data_ds.ui' # # Created: Fri Jun 12 17:18:39 2015 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except A...
# Copyright 2014 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 law or ag...
""" Schulze STV voting implementation. See https://en.wikipedia.org/wiki/Schulze_method """ from collections import defaultdict, OrderedDict import random def compute_strongest_paths(preference, candidates): """ input: preference p[i,j] = number of voters that prefer candidate i to candidate j in...
# coding: utf-8 import uuid from datetime import datetime from flask.ext.login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from . import db, login_manager def create_only_slug(form): if form.slug.data == "": slug = str(datetime.now())[0:10] + "-" + str(uuid...
# Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from ..remote import RemoteModel from infoblox_netmri.utils.utils import check_api_availability class DeviceDiskUtilizationRemote(RemoteModel): """ This table list out entries of Device Disk Utilization | ``HRStorageID:`` The internal NetMRI identifier of the high rate storage in the device disk utiliz...
# # 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 # ...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# -*- coding: utf-8 -*- # Description: work_history table # By Thuong.Tran # Date: 29 Aug 2017 from sqlalchemy import create_engine, Table, Column, MetaData, Integer, Text, DateTime, Float from sqlalchemy import select, and_ import datetime as dt class work_history(): def __init__(self, db_url): _engine = crea...
# -*- coding: utf-8 -*- # Maestro Music Manager - https://github.com/maestromusic/maestro # Copyright (C) 2014-2015 Martin Altmayer, Michael Helmling # # 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 Foun...
# The MIT License (MIT) # Copyright (c) 2018 Massachusetts Institute of Technology # # Author: Cody Rude # This software has been created in projects supported by the US National # Science Foundation and NASA (PI: Pankratius) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this sof...
import unittest import mock import sys import os sys.path.append(os.path.join('..\..', 'src')) from backend.game import Game from backend.menus.menus import GameMenu, StartGameMenu, PauseGameMenu class GameMenuTest(unittest.TestCase): @mock.patch('backend.game.Game') def setUp(self, mock_game): self...
"""Attention mechanisms. This module defines the interface of attention mechanisms and a few concrete implementations. For a gentle introduction and usage examples see the tutorial TODO. An attention mechanism decides to what part of the input to pay attention. It is typically used as a component of a recurrent netwo...
from .about import about, contact from .alerts import alertUsers, postAlertPolygon, readAlertPoint from .disclaimer import disclaimer from .edit import editHazards, editShape, updateHazard from .index import index from .postPoint import (postHazard, postIncident, postNearmiss, postNewInfra...
# -*- coding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2015-Today Julius Network Solutions SARL <contact@julius.fr> # # This program is free software: you can redistribute it and/or modify # it unde...
from __future__ import absolute_import, division, print_function import os import sys from os.path import join import subprocess import multiprocessing import conda.config as cc from conda_build.config import config from conda_build import source def get_perl_ver(): return str(config.CONDA_PERL) def get_py_v...
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2017) Hewlett Packard Enterprise Development LP # # 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/licen...
#!/usr/bin/env python """Singleton for the library's communication with the Earth Engine API.""" from __future__ import print_function # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name # pylint: disable=g-bad-import-order import contextlib import json import time import...
#!/usr/bin/env python """ Simple Python module to parse a Thunderbird mail file and scan each email message with ClamAV in order to detect suspect messages. """ import pyclamd import argparse import mailbox import logging log = logging.getLogger(__name__) default_net = ("localhost", 3310) class ScanMes...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import struct from canopen_301_402.utils import collect_all_leaf_subclasses from canopen_301_402.utils import parseIntAutoBase from canopen_301_402.constants import CanOpenBasicDatatypes class CanDatatype(object): def __init__(self): ''' @summary: a...
# -*- coding: utf-8 -*- """ v1: Created on November 28, 2016 author: dg622@cornell.edu """ import numpy as np import astropy.units as u class Population(object): """This class contains all the planetary parameters necessary for sampling or finding probability distribution functions Args: a_mi...
# Copyright (c) 2014 Mirantis 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 writ...
import json import os import threading from django.http import HttpResponse import time from libtool import find_root_path from object_filter.operations import get_tag_info_for_obj from objsys.obj_tagging_local import UfsFilter from ufs_utils.django_utils import retrieve_param from ufs_utils.misc import ensure_dir from...
import graphene from graphql_jwt.exceptions import PermissionDenied from ...core.permissions import WebhookPermissions from ...webhook import models, payloads from ...webhook.event_types import WebhookEventType from ..utils import sort_queryset from .sorters import WebhookSortField from .types import Webhook, WebhookE...
#!/usr/bin/env python # Copyright 2013-2014 Aerospike, 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 la...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) # 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 witho...
#!/usr/bin/python ############################################################################# # The main algorithmic functions for MUL-reconciliation mapping. # Gregg Thomas # Fall 2015, Combo algorithm implemented Spring 2016 ############################################################################# import os, i...
#!/usr/bin/env python # coding=utf-8 # Copyright (C) 2015 by Serge Poltavski # # serge.poltavski@gmail.com # # # # This program is free software; you can redistribut...
""" @author: Silvian Dragan @Date: 17/06/2016 @Copyright: Copyright 2016, Samaritan CMA - Published under GNU General Public Licence v3 @Details: https://github.com/Silvian/samaritan """ import json from django.contrib.auth import get_user from django.contrib.auth.decorators import login_required from django.http impo...
from __future__ import division, absolute_import, print_function import sys import warnings import functools import numpy as np from numpy.core.multiarray_tests import array_indexing from itertools import product from numpy.testing import * try: cdll = np.ctypeslib.load_library('multiarray', np.core.multiarray....
# Author: Edward Hope-Morley (opentastic@gmail.com) # Description: QEMU Base Image Management Utility # Copyright (C) 2017 Edward Hope-Morley # # License: # # This file is part of basejmpr. # # basejmpr is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Case data in external format. """ from numpy import array, ones, arange, r_ def t_case_ext(): """Case data in external format used to test C{ext2int} and...
#!/usr/bin/python #-*- coding: utf-8 -*- ''' file : import LabelPurgers abs. : пакет содержит функции обработки излов графа ''' ''' Набор функция очистки узла ''' ''' удаление комментариев из главных меток - любых и полезных тоже ''' def pureNode( node ): splitList = node.split(';') splitListSplTabSpaces = sp...
# -*- coding: utf-8 -*- """Some utility functions.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # # License: BSD (3-clause) from collections import OrderedDict from copy import deepcopy import logging import json import numpy as np from .check import _check_pandas_installed, _check_preload, _valida...
#!/usr/bin/env python """ Oscilloscope + spectrum analyser in Python. ------------------------------------------------------------ Copyright (C) 2008, Roger Fearick, University of Cape Town This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as pu...
# -*- encoding:utf8 -*- """ Methods for managing OS packages. An alternative package manager can be selected by settings the: ``deploy_package_manager`` env variable. Note: Different distributions/operating systems have different naming conventions for packages. For example Apache is referred to as apache on Debian s...
# -*- coding: utf-8 -*- import os import shutil import signal import subprocess import psutil import pytest os.environ['SECUREDROP_ENV'] = 'test' # noqa import config # TODO: the PID file for the redis worker is hard-coded below. # Ideally this constant would be provided by a test harness. # It has been intentional...
from django.conf import settings from django.core.mail import EmailMessage from typing import Any, Mapping, Optional from zerver.lib.actions import internal_send_message from zerver.lib.send_email import FromAddress from zerver.lib.redis_utils import get_redis_client from zerver.models import get_system_bot import t...
# -*- coding: utf-8 -*- from builtins import range import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int if PY3: #from future import standard_library #standard_library.install_aliases() import urllib.parse as urllib ...