CombinedText
stringlengths
4
3.42M
#!/usr/bin/env python3 # vim: set syntax=python ts=4 : # # Copyright (c) 2018 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import contextlib import string import mmap import sys import re import subprocess import select import shutil import shlex import signal import threading import concurrent.fu...
#!/usr/bin/env python # # Tests the German credit toy distribution. # # This file is part of PINTS. # Copyright (c) 2017-2019, University of Oxford. # For licensing information, see the LICENSE file distributed with the PINTS # software package. # import pints import pints.toy import unittest import numpy as np impo...
# -*- coding: utf-8 - # # 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 ...
#!/usr/bin/env python3 # vim: set syntax=python ts=4 : # # Copyright (c) 2018 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import os import contextlib import string import mmap import sys import re import subprocess import select import shutil import shlex import signal import threading import concurrent.fu...
""" Base model used for products. Stores hierarchical categories as well as individual product level information which includes options. """ import datetime import random import sha from sets import Set from decimal import Decimal from django.conf import settings from django.core import validators, urlresolvers from ...
"""These settings rely on various environment variables being set """ import os import sys from pathlib import Path from django.db.utils import OperationalError BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split() TEST = ...
#!/usr/bin/env python """ Given an API, load all the forms, count up their non-NA values, and mark their missing/complete status. """ import argparse import pandas as pd import pdb import redcap as rc import sys from load_utils import load_form_with_primary_key from qa_utils import chunked_form_export, get_items_match...
# -*- coding: utf-8 -*- """Main Controller @author: moschlar """ # ## SAUCE - System for AUtomated Code Evaluation ## Copyright (C) 2013 Moritz Schlarb ## ## 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 S...
# coding=utf-8 """View definitions.""" import os import json from datetime import datetime from django.shortcuts import render, get_object_or_404, redirect from django.db.models import Q from django.http import (HttpResponse, JsonResponse, Http404, HttpResponseBadRequest) from django.utils impo...
BUG: fixed bug related to smooth function call
from __future__ import unicode_literals import logging import rest_framework.status as status from rest_framework.generics import GenericAPIView from rest_framework.parsers import JSONParser from rest_framework.response import Response from job.models import JobType from queue.models import Queue import util.rest as...
import os import zipfile from django.conf import settings from django.db.models import Prefetch from django.views.generic.detail import DetailView from django.http import FileResponse, Http404, HttpResponse from django.utils import timezone from busstops.models import Service from vehicles.siri_one_shot import siri_one...
# coding=utf-8 from __future__ import unicode_literals import datetime import traceback import uuid from multiprocessing.pool import Pool from unittest.case import TestCase import six from eventsourcing.contrib.suffixtrees.application import SuffixTreeApplicationWithPythonObjects, \ SuffixTreeApplicationWithCass...
#!/usr/bin/env python ######################################################################################### # # Perform various types of processing from the spinal cord segmentation (e.g. extract centerline, compute CSA, etc.). # (extract_centerline) extract the spinal cord centerline from the segmentation. Output ...
import speech_recognition as sr import cv2 import subprocess import sys def say(phrase): if phrase == "purpose": subprocess.Popen(['mpg123', 'resources/whatismypurpose.mp3']) elif phrase == "ohmygod": subprocess.Popen(['mpg123', 'resources/ohmygod.mp3']) def getState(): return curstate def speechCallback(...
#!/usr/bin/env python ######################################################################################### # # Register anatomical image to the template using the spinal cord centerline/segmentation. # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Po...
#!/usr/bin/env python ######################################################################################### # # Register anatomical image to the template using the spinal cord centerline/segmentation. # # --------------------------------------------------------------------------------------- # Copyright (c) 2013 Po...
import argparse from collections import OrderedDict import os import subprocess import logging import sys from jinja2 import Environment, PackageLoader logger = logging.getLogger(__name__) if sys.version[0] == '2': FileNotFoundError = OSError # Jinja2 tests and filters, available in all templates def jinja_filte...
import io import time import os from pathlib import Path from typing import Generic, Callable, List import numpy as np import sys from PIL import Image as PILImage, ImageChops from PIL import ImageDraw from kivy.app import App from kivy.core.clipboard import Clipboard from kivy.core.image import Image as CoreImage fro...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # This file is part of Ansible # # Ansible 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 # ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # Copyright (c) 2013 Matt Hite <mhite@hotmail.com> # 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 ANSIBL...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # Copyright (c) 2013 Matt Hite <mhite@hotmail.com> # 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 ANSIBL...
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # 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/...
# -*- coding: utf-8 -*- import datetime metric_short_description=\ _("вычисляет среднее время ожидания в очереди.") metric_description=\ _(""" Среднее время ожидания в очереди для задач пользователя. Выражает степень недовольства пользователей вычислительным кластером, поскольку никому не хочется находитьс...
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # # 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/...
from rest_framework import serializers from rest_framework.exceptions import ValidationError from desecapi.models import Domain, Donation, User, RR, RRset, Token from djoser import serializers as djoserSerializers from django.db import models, transaction import django.core.exceptions from rest_framework_bulk import Bu...
# Copyright 2017 the authors. # This file is part of Hy, which is free software licensed under the Expat # license. See the LICENSE. from functools import wraps from ast import literal_eval from rply import ParserGenerator from hy._compat import PY3, str_type from hy.models import (HyBytes, HyComplex, HyCons, HyDict...
Make all columns string
"""Updates the cache for the `covidcast_meta` endpiont.""" # standard library import argparse import covidcast import sys import time import datetime from enum import Enum # first party from logger import get_structured_logger class DashboardSignal(Enum): # TODO: store this in config file or DB table instead of en...
""" Version module. This module defines the package version for use in __init__.py and setup.py. """ __version__ = '0.1.3' trunk version bump """ Version module. This module defines the package version for use in __init__.py and setup.py. """ __version__ = '0.1.4a'
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ A "DAV object" is anything we get from the caldav server or push into the caldav server, notably principal, calendars and calendar events. """ import vobject import io import uuid import re import datetime from lxml import etree from caldav.lib import error, vcal, ...
import argparse from functools import partial import math import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy.optimize import minimize def read_args(): parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', type=str, help='path to .csv file', d...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Time and frequency utilities''' import numpy as np import re __all__ = ['frames_to_samples', 'frames_to_time', 'samples_to_frames', 'samples_to_time', 'time_to_samples', 'time_to_frames', 'note_to_hz', 'note_to_midi', 'midi_...
""" URLconf for registration and activation, using django-registration's default backend. If the default behavior of these views is acceptable to you, simply use a line like this in your root URLconf to set up the default URLs for registration:: (r'^accounts/', include('registration.backends.default.urls')), Thi...
import base64 import json import os def load_manifest(path): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "manifests", path), "rb") as fp: return base64.b64encode(fp.read()).decode("utf-8") def get_layers(): return { "os": { "type": "coreos",...
from __future__ import division from urllib2 import urlopen import re import operator import copy import json from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, render_to_response, redirect from django.tem...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
from bs4 import BeautifulSoup import urllib import re import math import html5lib from html5lib import treebuilders import urlparse def print_parameter_tabel(parameters): def cs(string, length=30): return (string[0+i:length+i] for i in range(0, len(string), length)) def houndred(x): ...
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
# -*- coding: utf-8 -*- """Poker hand history parser module. It only parses PokerStars and Full Tilt Poker Tournament hands, but the plan is to parse a lot. """ import re from abc import ABCMeta, abstractmethod from collections import MutableMapping, OrderedDict from inspect import ismethod from decimal import Dec...
Improve vm create, using from horizontal elasticity
import math import requests from django.conf import settings from django.core.management import BaseCommand from corehq.apps.analytics.utils import ( get_blocked_hubspot_domains, MAX_API_RETRIES, ) from corehq.apps.es import UserES class Command(BaseCommand): help = "Manually cleans up blocked Hubspot c...
from __future__ import division from urllib2 import urlopen import re import operator import copy import json from django.http import HttpResponseRedirect, HttpResponse from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, render_to_response, redirect from django.tem...
""" inputpy.param This module exports two classes: - Param - ParamStore The Design and DesignSpace classes will probably be moved (probably merged with the existing classes in inputpy.design). :copyright: (c) 2013 by Christoffer Fink. :license: MIT. See LICENSE for details. """ from inputpy.util import Evalu...
# Copyright (c) 2018 Fortinet, 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 requir...
# -*- coding: utf-8 -*- # https://man.recast.ai/ from api import ApiManager import requests class RecastManager(ApiManager): def __init__(self, user_slug, bot_slug, token, language, fallback_name, strictness=50): ApiManager.__init__(self, fallback_name) self._base_url = 'https://api.recast.ai/v...
""" ================================= Handwritten digits decompositions ================================= This example compares different unsupervised matrix decomposition (dimension reduction) methods on the digits dataset. """ print __doc__ # Authors: Vlad Niculae, Alexandre Gramfort # License: BSD from time impo...
import aiohttp import asyncio import json import logging from uuid import uuid4 from asyncio.base_events import BaseEventLoop logger = logging.getLogger(__name__) class KurentoTransportException(Exception): def __init__(self, message, response=None): print(message, response) super(KurentoTranspor...
# 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...
# # furl: URL manipulation made simple. # # Arthur Grunseid # grunseid.com # grunseid@gmail.com # # Copyright: LOLOLOL # # License: Build Amazing Things (Unlicense) import abc import urllib import urlparse import warnings class Path(object): """ Represents a URL path comprised of zero or more path segments. ...
"""Manage Network Application files.""" import json import logging import os import re import shutil import tarfile import tempfile import urllib from pathlib import Path from jinja2 import Environment, FileSystemLoader from kytos.utils.client import NAppsClient from kytos.utils.config import KytosConfig log = loggi...
from typing import Iterable from re import compile from collections import namedtuple from subprocess import getoutput import click PREFIX = 'test' SUFFIX = "g2sd" NAME_RE = compile("menuentry '(?P<name>[\w\d\W\D]*)' -") KERNEL_RE = compile("linux(?:[\t ]*)(?P<kernel>.*) root=(?P<root>[\w\d\-=\/]*)") INIT_RE = comp...
"""Utilities for Lambda functions deployed using humilis.""" import base64 from datetime import datetime from dateutil import tz import json import logging import os import traceback import urllib2 import uuid import boto3 from botocore.exceptions import ClientError import raven logger = logging.getLogger() logger....
#! /usr/env/python """ Python implementation of ModelGrid, a base class used to create and manage grids for 2D numerical models. Do NOT add new documentation here. Grid documentation is now built in a semi- automated fashion. To modify the text seen on the web, edit the files `docs/text_for_[gridfile].py.txt`. """ im...
#!/usr/bin/python # Copyright (c) 2005-2008, Alexander Belchenko # 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,...
#!/usr/bin/env python2.7 """ Create pileups from GAMs, and evaluate different parameter sets for the pileup- to-glennfile and glenn-to-vcf steps of the variant calling pipeline. Takes alignments stored like this: alignments/brca1/cactus/NA19240.gam so: <alignments IOstore>/<region>/<graph>/<sample>.gam The graph...
""" draw a histogram of the distribution of a given column and check for uniformity with the chisq test. """ import argparse import numpy as np from chart import chart from _common import pairwise def run(args): # get rid of N, just keep the correlation. col_num = args.c if args.c < 0 else (args.c - 1) fil...
# Copyright (c) 2020, 2021 The Linux Foundation # # SPDX-License-Identifier: Apache-2.0 import os from west import log from zspdx.walker import WalkerConfig, Walker from zspdx.scanner import ScannerConfig, scanDocument from zspdx.writer import writeSPDX # SBOMConfig contains settings that will be passed along to th...
import rtmidi midiout = None midiin = None def connect(port = 0): global midiout, midiin midiout = rtmidi.MidiOut() midiin = rtmidi.MidiIn() available_ports = midiout.get_ports() if available_ports: midiout.open_port(port) midiin.open_port(port) else: raise Except...
# -*- coding: utf-8 -*- """ Copyright (c) 2013, 2014 Jaime Soffer 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, ...
# Copyright (c) 2001-2015, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest from erpnext.accounts.doctype.sales_invoice.test_sales_invoice import create_sales_invoice from erpnext.accounts.doctype.journal_entry.tes...
import json import time import requests import glob2 from django.core.management.base import BaseCommand from django.contrib.gis import geos from django.contrib.gis.gdal import DataSource, GDALException from organisations.models import ( OrganisationDivision, DivisionGeography, Organisation, ) from orga...
from time import sleep from copy import copy import logging from threading import Event #logging.basicConfig(level=logging.DEBUG) def to_be_foreground(func): #A safety check wrapper so that certain functions don't get called if refresher is not the one active def wrapper(self, *args, **kwargs): if self.i...
from django.http import HttpResponse from django.shortcuts import get_object_or_404 from invoice.models import Invoice from invoice.pdf import draw_pdf def pdf_view(request, pk): invoice = get_object_or_404(Invoice, pk=pk) filename = 'Invoice-%s.pdf' % invoice.invoice_id response = HttpResponse(mimetype...
import copy import os from os.path import join from types import DictType, BooleanType, StringTypes, ListType, TupleType from .exceptions import AmbiguousEnvVar, UncastableEnvVar from .util import debug class NestedEnv(Adapter): """ Custom etcaetera adapter for handling env vars (more flexibly than Env). ...
#! /usr/bin/python # -*- coding: utf-8 -*- """ Module is used for visualization of segmentation stored in pkl file. """ import sys import os.path import logging logger = logging.getLogger(__name__) import argparse if sys.version_info < (3, 0): import urllib as urllibr else: import urllib.request as urllibr i...
""" panels Contains blender UI panels to allow editing of custom data """ import bpy class DataPanel(object): bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' bl_context = "data" class EDMDataPanel(DataPanel, bpy.types.Panel): bl_idname = "OBJECT_PT_edmtools" bl_label = "EDM Tools" @classmethod...
Added diversity extraction script
# coding=utf-8 # Copyright 2019 The Tensor2Tensor 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...
# vim: set fileencoding=utf-8 : import ioc.exceptions, ioc.helper import re, exceptions import importlib, inspect from ioc.proxy import Proxy class Extension(object): def load(self, config, container_builder): pass def post_load(self, container_builder, container): pass def pre_build(sel...
import tensorflow as tf import numpy as np from data_sets.data_sets import DataSets def ranked(x): # x will be a numpy array with the contents of the placeholder below return np.argsort(x, axis=0) def main(): steps = 20 data_set = DataSets.get_followers() data_set -= 1 n_raw = data_set.max(...
improvement(k8s-local): cache cert manager images
class Roman(object): def __init__(self, number): self.number = number self.modern_convert() convert_table = {} def modern_convert(self): number = self.number solution = [] while True: if number >= 1000: solution.append("M") number -= 1000 elif number >= 500: ...
from django.utils.translation import ugettext_lazy from django.core.exceptions import ImproperlyConfigured from annoying.functions import get_config fdow_default = 0 # Sunday # Look for FIRST_DAY_OF_WEEK as a locale setting fdow = ugettext_lazy('FIRST_DAY_OF_WEEK') try: FIRST_DAY_OF_WEEK = int(fdow) except Value...
Update linkscraper.py
__version__ = '0.1.2' from os import environ from flask import Flask from flask.ext.admin import Admin from flask.ext.admin.contrib.sqla import ModelView from flask.ext.login import LoginManager, current_user from flask.ext.migrate import Migrate from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy() login_m...
#! /usr/bin/python # -*- coding: utf-8 -*- # © 2010-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>) # # 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 ...
import numpy as np from copy import copy from copy import deepcopy from itertools import zip_longest import traceback from pycqed.utilities.general import temporary_value from pycqed.measurement.quantum_experiment import QuantumExperiment from pycqed.measurement.waveform_control.circuit_builder import CircuitBuilder fr...
# Copyright 2019 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ gallerize ~~~~~~~~~ Create a static HTML/CSS image gallery from a bunch of images. See README for details. :Copyright: 2007-2013 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from __future__ import print_function import argparse import codecs fro...
#!/usr/bin/env python # -*- coding: utf-8 -*- import itertools as it import numpy as np # This is the basis state for the spin nelec=4 j2=1.0 # This is the RATIO j2/j1 (low value high dimerization) n=float(nelec) bc='obc' ms=0 nstate=2 #Number of states to print preket=list(it.product([0.5,-0.5], repeat=nelec))...
# -*- coding: utf-8 -*- from django.conf import settings as django_settings import pytz from dateutil import rrule from django.contrib.contenttypes import generic from django.db import models from django.db.models import Q from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import ...
import http.client import json from cis.libs import exceptions try: from urllib import quote # Python 2.X except ImportError: from urllib.parse import quote # Python 3+ class Person(object): """Retrieve data from person api as needed.""" def __init__(self, person_api_config): """ :...
""" flow_direction_over_flat.py Implementation of Barnes et al.(2014) Created by JL, Oct 2015 """ import numpy as np import Queue from collections import deque import landlab from landlab import Component, FieldError from landlab.grid.base import BAD_INDEX_VALUE from landlab.components.flow_routing.flow_direction_...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import functools import numpy as np from ... import units as u from ...tests.helper import pytest from ...coordinates i...
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Licen...
"""A module containing validation functionality. Warning: It is planned to change from Schema-based to Data-based Codelist validation. As such, this module will change significantly. """ from lxml import etree import iati.core.default def _correct_codes(dataset, codelist, error_log=False): """Determine whet...
# Orca # # Copyright 2010 Joanmarie Diggs. # Copyright 2014-2015 Igalia, S.L. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) an...
#!/usr/bin/env python ####################################################################################### ## Created by David Kirkby, University of California, Irvine <dkirkby@uci.edu> ####################################################################################### """ ./galsimcat.py -i OneDegSq.dat -x 0.5 ...
""" sender - SimplE Neuron DEleteR Deletes the least significant neurons. Outgoing value of neuron is defined as sum of absolute values of weights outgoing from neuron divided by sum of absolute values of weights outgoing from entire layer. Ingoing value of neuron is defined as sum of absolute ...
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
#!/usr/bin/env python import os import pprint import json import time import logging import atexit from libsubmit.providers.provider_base import ExecutionProvider from libsubmit.error import * try : import boto3 from botocore.exceptions import ClientError except ImportError: _boto_enabled = False else: ...
from .. import syntax from . import util from schemata import validators as val class Schema(dict): """ Makes a Schema object from a schema dict. Still acts like a dict. #NeverGrowUp """ def __init__(self, schema_dict, name=''): schema = util.flatten(schema_dict) dict.__init__(self...
#!/usr/bin/python #============================================================================================= # MODULE DOCSTRING #============================================================================================= """ Test examples. """ #=================================================================...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
#!/usr/bin/env python try: from pyspark import SparkContext, SparkFiles except: print "### NO PYSPARK" import sys import os import platform import socket from hybridJaccard import HybridJaccard import argparse import json import cgi from htmltoken import tokenize import crf_features from base64 import b64encod...
import numpy as np import falcon import json class Tukey(object): ''' A timeseries is anomalous if any point is 1.5 times the interquartile range less than the first quartile or more than the third quartile. ''' def on_get(self, req, resp): timeseries, tidx, vidx = utils.ba...
Return the number of failed tests so moosebuild can detect errors.
#!/usr/bin/python # ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met:...