src
stringlengths
721
1.04M
# Copyright (C) 2014 Statoil ASA, Norway. # # The file 'ensemble_plot_gen_kw_vector.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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...
#!/usr/bin/env python """This script is given "A collection of at most 10 DNA strings of equal length (at most 1 kbp) in FASTA format" and returns "A consensus string and profile matrix for the collection". """ import argparse from collections import defaultdict def main(args): """Consensus and Profile""" ...
#! /usr/bin/env python3 """ services-wrapper A small tool which wraps around check-services.php and tries to guide the services process with a more modern approach with a Queue and workers. Based on the original version of poller-wrapper.py by Job Snijders Author: Neil Lathwo...
#! /usr/bin/env python3 # # Copyright (c) 2014 Joseph Keshet, Morgan Sonderegger, Thea Knowles # # This file is part of Autovot, a package for automatic extraction of # voice onset time (VOT) from audio files. # # Autovot is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser Gen...
from threading import Thread from queue import Queue import curses import time def listen_to_ticks(rate, input_queue): while True: input_queue.put('TICK') time.sleep(1 / rate) def listen_to_keys(input_queue, get_input): while True: try: input_queue.put(get_input()) ...
#!/usr/bin/python #import statements import serial import os import time #Global Constants############################################################################# #These values are temporary, for testing. They WILL change in the final product #It was recommended that these values should be placed in a dictionary...
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
""" Modules to Set default parameters: W.T. Franks FMP Berlin """ import de.bruker.nmr.mfw.root as root import math import os import sys import TopCmds import IntShape import CPDtools p90H=2.5 ampH=4.0 p90C=3.0 ampC=0.0 p90N=5.0 ampN=-2.0 MAS =10000.0 def dBtoW(dB): watts=math.pow(10,-dB/10.) #TopCmds.MSG("w...
from copy import copy from django.conf import settings from django.urls import reverse def get_permissions(response_mapping, custom_mapping): """ Build permission mappings. :param response_mapping: usually a predefined permission template (FORBIDDEN, NOT_FOUND, etc.) :type response_mapping: dict ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC # This file is Copyright (c) 2015-20...
# Author: Mathieu Blondel # License: Simplified BSD import numpy as np from scipy.optimize import minimize from sdtw import SoftDTW from sdtw.distance import SquaredEuclidean def sdtw_barycenter(X, barycenter_init, gamma=1.0, weights=None, method="L-BFGS-B", tol=1e-3, max_iter=50): """ ...
# -*- test-case-name: openid.test.test_fetchers -*- """ This module contains the HTTP fetcher interface and several implementations. """ __all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse', 'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError', 'HTTPError'] import urll...
import inspect import importlib import sys from collections import namedtuple, Hashable from functools import partial try: from unittest.mock import MagicMock, patch # Python 3 except ImportError: from mock import MagicMock, patch # Python 2 from inspect import getargspec SerializedCallable = namedtuple('Ser...
keysyms = { 'XF86AudioLowerVolume': 0x1008ff11, 'XF86AudioMute': 0x1008ff12, 'XF86AudioRaiseVolume': 0x1008ff13, 'XF86AudioPlay': 0x1008ff14, 'XF86AudioStop': 0x1008ff15, 'XF86AudioPrev': 0x1008ff16, 'XF86AudioNext': 0x1008ff17, 'VoidSymbol': 0xffffff, 'BackSpace': 0xff08, 'Tab':...
# 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 # not use this file except in compliance wi...
#!/usr/bin/env python """ Extract grammatical error edits from CoNLL dataset SGML files into kilogram format. Not using XML or SGML parse since the file is not XML/SGML-compliant. wget http://www.comp.nus.edu.sg/~nlp/conll13st/release2.3.1.tar.gz """ import re import argparse import unicodecsv as csv SPACE = re.compi...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012, Nachi Ueno, NTT MCL, 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/L...
#! /usr/bin/env python import datetime import logging import logging.handlers import threading import time import traceback import os import pwd import sys from pprint import pprint from autopyfactory.apfexceptions import FactoryConfigurationFailure, CondorStatusFailure, PandaStatusFailure from autopyfactory.logserv...
from django.db import IntegrityError from rest_framework import serializers as ser from rest_framework import exceptions from website.files import exceptions as file_exceptions from api.base.serializers import IDField, ShowIfVersion class DestinationSerializer(ser.Serializer): parent = ser.CharField(write_only=...
"""Tests for scandir.scandir().""" from __future__ import unicode_literals import os import shutil import sys import time import unittest try: import scandir has_scandir = True except ImportError: has_scandir = False FILE_ATTRIBUTE_DIRECTORY = 16 TEST_PATH = os.path.abspath(os.path.join(os.path.dirname...
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand - XBMC Plugin # Conector para liveall # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
### PyPBE Bokeh Simulator ### Written By: Eric Strong ### Last Updated: 2017/08/31 from pypbe.core import PBE from bokeh.io import curdoc from bokeh.plotting import figure from bokeh.models.tools import SaveTool from bokeh.models.ranges import Range1d from bokeh.models.annotations import Label from bokeh.layouts impor...
import numpy, pylab, os, sys, csv, pickle from echem_plate_fcns import * from echem_plate_math import * PyCodePath=os.path.split(os.path.split(os.path.realpath(__file__))[0])[0] sys.path.append(os.path.join(PyCodePath,'ternaryplot')) from myternaryutility import TernaryPlot from myquaternaryutility import QuaternaryPlo...
"""Filter design. """ from __future__ import division, print_function, absolute_import import math import operator import warnings import numpy import numpy as np from numpy import (atleast_1d, poly, polyval, roots, real, asarray, resize, pi, absolute, logspace, r_, sqrt, tan, log10, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from random import randint if __name__ == "__main__": from node import Node from nodelist import Nodelist else: from .node import Node from .nodelist import Nodelist Node.xmax = 30 Node.ymax = 15 def gen_obstacles(xmax: int, ymax: int) -> Nodelist: o...
#!/usr/bin/env vpython # # Copyright 2019 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. """ Update manually maintained dependencies from Chromium. """ import argparse import os import shutil import subprocess import sys ...
# tests.checks # Performs checking that visualizers adhere to Yellowbrick conventions. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Mon May 22 11:18:06 2017 -0700 # # Copyright (C) 2017 District Data Labs # For license information, see LICENSE.txt # # ID: checks.py [4131cb1] benjamin@ben...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Collect gene statistics based on gff file: Exon length, Intron length, Gene length, Exon count """ import os.path as op import sys import logging from jcvi.utils.cbook import SummaryStats, percentage, human_size from jcvi.utils.range import range_interleave from jcvi....
from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from .containers import OrderedDict from . import iniparse from .compat import text_type, string_types, PY2, implements_to_string, implements_bool from . import errors from .tools import textual_list f...
from setuptools import setup, find_packages import sys, os version = '0.1' install_requires = [ # List your project dependencies here. # For more details, see: # http://packages.python.org/distribute/setuptools.html#declaring-dependencies 'tables', 'Pydap>=3.2', 'Numpy', ] setup(name='pydap...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import requests_mock import json import os import pymisp as pm from pymisp import PyMISP # from pymisp import NewEventError from pymisp import MISPEvent from pymisp import EncodeUpdate from pymisp import EncodeFull @requests_mock.Mocker() class TestOffli...
from .submaker import Submaker import collections import os class PropertySubmaker(Submaker): def make(self, workDir): props = self.getValue(".", {}) if "__make__" in props: del props["__make__"] if "__depend__" in props: del props["__depend__"] propsFlat =...
from django.db import models class RouteType(models.Model): id = models.IntegerField(primary_key=True) name = models.CharField(max_length=20) color = models.CharField(max_length=10) def __str__(self): return self.name class Location(models.Model): name = models.CharField(max_length=30) ...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL 3' __copyright__ = '2011, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import random import re import urllib from contextlib import closing from lxml import ...
#========================================================================== # # Copyright Insight Software Consortium # # 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...
from django.utils.unittest.case import TestCase from corehq.apps.groups.models import Group from corehq.apps.reports.util import case_users_filter, case_group_filter from corehq.apps.users.models import CommCareUser def _mock_case(owner, user): return { 'owner_id': owner, 'user_id': user, } c...
#!/usr/bin/python3 import glob import sys import subprocess import os import time video_dir = "/mnt/ams2" def check_running(cam_num, type): if type == "HD": cmd = "ps -aux |grep \"ffmpeg\" | grep \"HD\" | grep \"cam" + cam_num + "\" | grep -v grep | wc -l" else: cmd = "ps -aux |grep \"ffmpeg\" | gr...
# Artshow Keeper: A support tool for keeping an Artshow running. # Copyright (C) 2014 Ivo Hanak # # 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...
#!/usr/bin/env python3 # -*- coding : utf-8 -*- # http://speedtest.tele2.net/10GB.zip # https://docs.python.org/3/library/http.server.html # http://blog.csdn.net/cteng/article/details/51584766 """ Anti-HTTP-Scanner : Redirect all requests to 10GB speedtest file Patrick Young 2017/10/8 usage: "antiscanhttp.py" [-h] [-...
from __future__ import absolute_import from sentry.lang.native.utils import get_sdk_from_event, is_minidump_event def test_get_sdk_from_event(): sdk_info = get_sdk_from_event( { "debug_meta": { "sdk_info": { "sdk_name": "iOS", "version_m...
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # # URL: https://sick-rage.github.io # # This file is part of SickRage. # # SickRage 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 ...
# 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...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2017 Juan Cabral # 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 withou...
# MP-specific cache management from pysnmp.proto.mpmod import cache class AbstractMessageProcessingModel: def __init__(self): self._snmpMsgSpec = self.snmpMsgSpec() # local copy self._cache = cache.Cache() def prepareOutgoingMessage( self, snmpEngine, transport...
# -*- coding: utf-8 -*- import PyQt5.QtWidgets as Qw import PyQt5.QtCore as Qc import PyQt5.QtGui as Qg from tedqt import parameters as par MSG_SELECT_DAYS = u'Επιλέξτε τις Εργάσιμες ημέρες\nΜε δεξί κλικ μηδενίστε' BLANK, GREEN = range(2) class Weekdays(Qw.QWidget): ''' Weekdays selection ( [1,1,1,1,1,0,0...
from django import forms from django.contrib import admin from utilities.forms import LaxURLField from .models import CustomField, CustomLink, ExportTemplate, JobResult, Webhook def order_content_types(field): """ Order the list of available ContentTypes by application """ queryset = field.queryset.o...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- ################################################## # GNU Radio Python Flow Graph # Title: Tx Scram Rand # Generated: Wed May 24 11:14:20 2017 ################################################## from gnuradio import blocks from gnuradio import digital from gnuradio import e...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
from __future__ import division def mrr(out, th): """Computes MRR. Args: out: dict where each key maps to a ranked list of candidates. Each values is "true" or "false" indicating if the candidate is relevant or not. """ n = len(out) MRR = 0.0 for qid in out: candidates = out[qid]...
""" Handles creation of genomes, either from scratch or by sexual or asexual reproduction from parents. """ from __future__ import division, print_function import math import random from itertools import count from sys import stderr, float_info from neat.config import ConfigParameter, DefaultClassConfig from neat.ma...
from .tests_basic import ordinal_func, __name__ as __basic_name__ from .fixtures import User, __name__ as __test_name__ class TestMiscellaneous: def test_class_repr(self): assert repr(User.class_method_full_spec) == ( '<TaggedCached: ' 'callable="' + __test_name__ + '.User.class_m...
import common, enums import borg, importlib importlib.import_module('.helpers', 'borg') importlib.import_module('.fuse', 'borg') import os, stat, pwd, grp, gi, collections gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gio, GObject def toggle_hide_column(checkbox, column): column.set_visible(checkb...
from __future__ import print_function, division import os import sys import re import copy import platform import subprocess from scipy import polyval, polyfit import numpy as np RAW_DIR = os.path.dirname(os.path.abspath(__file__)) if RAW_DIR not in sys.path: sys.path.append(RAW_DIR) import SASM import SASFileIO...
# Copyright 2020 kubeflow.org. # # 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,...
# -*- coding: utf-8 -*- ########################################################################### # Python code generated with wxFormBuilder (version Jun 5 2014) # http://www.wxformbuilder.org/ # # TODO: (Is this something we should follow?) PLEASE DO 'NOT' EDIT THIS FILE! ##########################################...
# -*- coding: utf-8 -*- # # clixtragen - generates helpers for a command line interpreter # # Copyright (C) 2013 Eric Le Bihan # # 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 ...
import tensorflow.python.platform import numpy as np import tensorflow as tf import plot_boundary_on_data # Global variables. NUM_LABELS = 2 # The number of labels. BATCH_SIZE = 100 # The number of training examples to use per training step. # Define the flags useable from the command line. tf.app.flags.DEFIN...
# -*- coding: utf8 -*- # Copyright (C) 2015 - Philipp Temminghoff <phil65@kodi.tv> # This program is Free Software see LICENSE file for details from __future__ import absolute_import from __future__ import unicode_literals import xbmc import xbmcgui from kodi65 import busy from kodi65 import utils class VideoPlay...
import copy from datetime import datetime, timedelta import getpass import imp import jinja2 import json import logging import os import dill import re import signal import socket import sys from sqlalchemy import ( Column, Integer, String, DateTime, Text, Boolean, ForeignKey, PickleType, Index,) from sqlalche...
''' Created on Jul 31, 2009 @author: aleksandrcicenin ''' from .. import RESTAPI, authneeded class StatusAPI(RESTAPI): def status_show(self, id): path = self._get_method_path('statuses/show/' + id) return self._get_request_data(path) @authneeded def status_update(self, status, ...
import time import windows import widgets import chaninfo import events from conf import conf textareas = {} if 'font' in conf: textareas['font'] = conf['font'] if 'bg_color' in conf: textareas['bg'] = conf['bg_color'] if 'fg_color' in conf: textareas['fg'] = conf['fg_color'] widgets.set_style("view", te...
import pytest import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from pycpd import AffineRegistration def test_2D(): B = np.array([[1.0, 0.5], [0, 1.0]]) t = np.array([0.5, 1.0]) Y = np.loadtxt('data/fish_target.txt') X = np.dot(Y, B) + np.tile(t, (np.shape(Y)...
from __future__ import print_function from pylayers.util import project from pylayers.signal.bsignal import * import pylayers.util.pyutil as pyu import ConfigParser import matplotlib.pylab as plt import itertools import pdb r""" .. currentmodule:: pylayers.simul.exploit .. autosummary:: """ class Exploit(object): ...
#!/usr/bin/env python """ 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");...
from __future__ import print_function import unittest import gridpp import numpy as np lats = [60, 60, 60, 60, 60, 70] lons = [10,10.1,10.2,10.3,10.4, 10] """Simple check 20 21 22 23 24 15 16 17 18 19 10 11 12 13 nan 5 6 7 nan 9 0 1 2 3 4 """ values = np.reshape(range(25), [5, 5]).astype(float) values[1, 3] ...
import load_synth_extract from plants import studytreelist as plantslist from metazoa import studytreelist as metalist from fungi import studytreelist as fungilist from microbes import studytreelist as microbelist studytreelist = [] studytreelist.extend(metalist) studytreelist.extend(fungilist) studytreelist.extend(m...
# -*- coding: utf-8 -*- # Copyright (C) 2008-2009, 2014 Toms Bauģis <toms.baugis at gmail.com> # This file is part of Project Hamster. # Project Hamster 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, eithe...
# 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 the Li...
""" Created on 6/05/2013 @author: thom """ import logging import string from rdkit.Chem import AllChem as Chem from evaluator import Evaluator from molecular_population import MolecularPopulation from molecule import Molecule class EvaluatorSummary(Evaluator): def get_result_titles(self): return ["N...
import ast import optparse import sys from lyra.core.cfg import * from lyra.core.expressions import Literal from lyra.core.statements import * from lyra.core.types import IntegerLyraType, BooleanLyraType, resolve_type_annotation, \ FloatLyraType, ListLyraType, TupleLyraType, StringLyraType, DictLyraType, SetLyraTy...
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Copyright (c) 2015-2016 California Institute of Technology. # Copyright (c) 2016-2018 Mike McKerns. # License: 3-clause BSD. """ check environment scipt """ import sys # requirements has = dict( # optimization scipy='0.6.0',...
from django.contrib.auth.models import User from django.test import TestCase from django.urls import reverse class TestSmugglerViewsRequireAuthentication(TestCase): def test_dump_data(self): url = reverse('dump-data') response = self.client.get(url) self.assertRedirects( respon...
import os,fnmatch from gi.repository import Gtk, GObject,GdkPixbuf def get_app_info_path(code): home_path = os.path.expanduser('~/') return{ 1: home_path + ".ap_helper/info/1/", 2: home_path + ".ap_helper/info/2/", 3: home_path + ".ap_helper/info/3/", 4: home_path + ".ap_hel...
## model.py ## Author: Yangfeng Ji ## Date: 09-09-2014 ## Time-stamp: <yangfeng 11/05/2014 20:44:25> ## Last changed: umashanthi 11/19/2014 """ As a parsing model, it includes the following functions 1, Mini-batch training on the data generated by the Data class 2, Shift-Reduce RST parsing for a given text sequence 3...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-14 15:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Instagram', '0001_initial'), ] operations = [ migrations.RenameField( ...
# coding: utf-8 # ------------------------------------------------------------------------- # 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 python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2011 Umeå University # # 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...
# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from abc import ABCMeta, abstractmethod from distutils.version import StrictVersion from .exceptions import ignored from .xml import get_etree_root, get_schemaloc_pairs class UnknownVersionError(Exception): "...
#!/usr/bin/python # Copyright (c) 2014, Erik Ruiter, SURFsara BV, Amsterdam, The Netherlands # 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 ...
__author__ = "itamar" class VictimHost(object): def __init__(self, ip_addr, domain_name=""): self.ip_addr = ip_addr self.domain_name = str(domain_name) self.os = {} self.services = {} self.icmp = False self.monkey_exe = None self.default_tunnel = None ...
# -*- coding: utf-8 -*- # 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...
# This script takes marks the existing text content of a Windows # clipboard as HTML. This is useful to automate copy/paste of # the formatted code from gVIM to Outlook, blog post, etc. # Clipboard stuff from http://code.activestate.com/recipes/474121/ import re import win32clipboard class HtmlClipboard: CF_HTM...
# 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 urllib2 import httplib import socket import json import re import sys from telemetry.core import util from telemetry.core import exceptions from ...
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-6 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
# ################################################### # Copyright (C) 2008-2017 The Unknown Horizons Team # team@unknown-horizons.org # This file is part of Unknown Horizons. # # Unknown Horizons is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
#!/usr/bin/python # -*- coding: utf-8 -*- ############################################################################### # # # This file is part of 3d Brain Atlas Reconstructor # # ...
""" SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ from sleekxmpp.xmlstream.handler.base import BaseHandler class Callback(BaseHandler): """ The Callback handler will execute a callbac...
#! /usr/bin/env python # -*- coding: utf-8 -*- import logging logger = logging.getLogger(__name__) import unittest import sys import pytest # import teigen # import io3d import os.path as op path_to_script = op.dirname(op.abspath(__file__)) class MyTestCase(unittest.TestCase): # @pytest.mark.interactive ...
import operator import numpy as np from rlscore.measure.measure_utilities import UndefinedPerformance from measure_utilities import multitask from rlscore.utilities import array_tools def auc_singletask(Y, P): #the implementation has n(log(n)) time complexity #P: predicted labels #Y: true labels, y_i \in ...
#!/usr/bin/env python __author__ = "Antonio Gonzalez Pena" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Antonio Gonzalez Pena"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Antonio Gonzalez Pena" __email__ = "antgonza@gmail.com" from qiime.plot_semivariogram import hist_bins...
import os from django.urls import reverse from django.http import Http404 from django.contrib import messages from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.messages.views import Success...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # 2015-03-24T08:33+08:00 # 2015-07-07T11:26+08:00 Use temporary file when running unit test import contextlib import functools import hashlib import io import os import sys try: import chardet.universaldetector _chardet_available = True except ImportError: ...
# -*- 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 model 'Link' db.create_table(u'bountyfulcoinsapp_link', ( ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe import erpnext import calendar import random from erpnext.accounts.utils import get_fiscal_year from frappe.utils.make_ran...
#!/usr/bin/env python """ mbed SDK Copyright (c) 2011-2013 ARM Limited 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 ...
# Copyright 2016 Measurement Lab # # 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 writi...