text
stringlengths
12
6.59M
from pprint import pprint from django.conf import settings from apps.reader.models import MUserStory, UserStory from apps.rss_feeds.models import Feed, Story, MStory, StoryAuthor, Tag from apps.analyzer.models import MClassifierTitle, MClassifierAuthor, MClassifierFeed, MClassifierTag from apps.analyzer.models import C...
""" Django settings for ShoppingList project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, .....
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase from formidable import constants from formidable.forms import fields, FormidableForm class FormTest(FormidableForm): title = fields.TitleField(label='Jedi Onboarding') helptext = fields.HelpTextField(text='youh...
from typing import Optional, TYPE_CHECKING from ..config import Config from ..utils import RichStatus from .irresource import IRResource from .ircluster import IRCluster if TYPE_CHECKING: from .ir import IR class IRTracing (IRResource): cluster: Optional[IRCluster] service: str driver: str driv...
#!/usr/bin/python # 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/. # Modeline analyzer. import re import os import argparse commentyLinePatt = re.compile("^\s*\*") w...
# Copyright (C) 2010-2014 Cuckoo Sandbox Developers. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. def choose_package(file_type, file_name): """Choose analysis package due to file type and file extension. @param file_type: file type. ...
from __future__ import division import numpy as np import scipy.sparse as sp from .codeutils import isScalar def mkvc(x, numDims=1): """Creates a vector with the number of dimension specified e.g.:: a = np.array([1, 2, 3]) mkvc(a, 1).shape > (3, ) mkvc(a, 2).shape ...
# -*- coding: utf-8 -*- DEVELOPMENT = False DBURI = 'sqlite://storage.sqlite' EMAIL_SENDER = 'i.vote.secure@gmail.com' EMAIL_SERVER = 'localhost' EMAIL_LOGIN = None GMAIL_LOGIN = None AS_SERVICE = True DEBUG_MODE = False SCHEME = 'http' or 'https' # scheme for access to voting USERS_FILENAME = None response....
import logging from collections import defaultdict import ailment import pyvex from ..engines.vex.irop import operations as vex_operations from ..calling_conventions import DEFAULT_CC from ..keyed_region import KeyedRegion from ..engines.light import SimEngineLightVEX, SimEngineLightAIL, SpOffset, RegisterOffset from...
import math import re import types import spidermonkey import instanceactions import instanceproperties from appvalidator.python.copy import deepcopy from appvalidator.constants import (BUGZILLA_BUG, DESCRIPTION_TYPES, MAX_STR_SIZE) from jstypes import * NUMERIC_TYPES = (int, long...
"""Main module.""" import time as _time from threading import Thread as _Thread, Event as _Event from copy import deepcopy as _dcopy import numpy as np import matplotlib.pyplot as plt import matplotlib.gridspec as mpl_gs import matplotlib.cm as cm import pyaccel as _pyacc from pymodels.middlelayer.devices import SOF...
## ## i2p netdb parser ## ## Author: Jeff ## MIT Liecense 2014 ## import os,sys,struct,time,hashlib,fnmatch,io from geoip import geolite2 import base64 import logging b64encode = lambda x : base64.b64encode(x, '~-') def sha256(data,raw=True): """ compute sha256 of data """ h = hashlib.new('sha256') ...
import logging import re import math import geohash # python-geohash package import googlemaps import numpy as np from geographiclib.geodesic import Geodesic from anyway.backend_constants import BE_CONST from anyway.models import NewsFlash from anyway.parsers import resolution_dict from anyway import secrets from anyw...
"""Main module.""" import time as _time from threading import Thread as _Thread, Event as _Event from copy import deepcopy as _dcopy import numpy as _np import matplotlib.pyplot as _plt import matplotlib.gridspec as _mpl_gs import matplotlib.cm as _cmap from siriuspy.namesys import SiriusPVName as _PVName from siriu...
"""Provide an interface to data, parameters and results A :class:`DataHandle` is passed in to a :class:`Model` at runtime, to provide transparent access to the relevant data and parameters for the current :class:`ModelRun` and iteration. It gives read access to parameters and input data (at any computed or pre-compute...
#!/usr/bin/python # 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 # (at your option) any later version. # # Ansible is distributed...
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
############################################################################### ## ## Copyright (C) 2011-2013, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
################################################################# # Code written by Edward Choi (mp2893@gatech.edu) # For bug report, please contact author using the email address ################################################################# import sys, random import numpy as np import cPickle as pickle from colle...
"""A library for controlling Homebrew through Python.""" import getpass import logging import os import pwd import shutil import subprocess log = logging.getLogger(__name__) def get_installed_formulas(): log.info("Getting installed formulas") return _get_command_output(['brew', 'list']) def get_installed_...
""" This module is about path resolving for the skin path. This is particular useful if you for example try create new skins or open an existing one. """ import getpass import io import os import platform import re from functools import lru_cache import winreg import sublime from .. import logger from .program_pat...
from __future__ import print_function import argparse import base64 import binascii import datetime import dateutil.relativedelta import dateutil.tz import io import itertools import json import operator import pprint import re import six import socket import struct import sys import antlr4 import antlr4.error.Errors...
""" Models for the News application """ from django.contrib.auth.models import User from django.db import models from datetime import datetime from easy_thumbnails.fields import ThumbnailerImageField from taggit.managers import TaggableManager from muckrock.foia.models import FOIARequest from muckrock.tags.models im...
# This file is part of the FifoCI project. # Copyright (c) 2014 Pierre Bourdon <delroth@dolphin-emu.org> # Licensing information: see $REPO_ROOT/LICENSE from django.conf import settings from django.core.management.base import BaseCommand, CommandError from fifoci.models import FifoTest, Result, Version, Type import j...
"""Dispatchers implementing the OnRamp PCE API. Exports: Files: Access visible files from job runs. Modules: View, add, update, and remove PCE educational modules. Jobs: Launch, update, remove, and get status of PCE jobs. Cluster: View cluster status. """ import logging import os from multiprocessing ...
from story_parser import parse_text,\ InvalidHeaderException from should_dsl import should_be import unittest class StoryParserWithValidStorysHeaders(unittest.TestCase): def test_story_title_should_be_Title1(self): text_parsed = parse_text("""Story: Title1 As a <role> ...
import unittest import os import sys sys.path.append('../lib/') sys.path.append(os.path.dirname(os.path.realpath(__file__))) import alchemy from alchemy.schema import * class TestAlchemy(unittest.TestCase): def setUp(self): # this basically resets our testing database os.system("cp {0}/alchemy.ra...
""" Models for the Task application """ from django.contrib.auth.models import User from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models import Q from datetime import datetime import email import...
import hashlib import logging import os from concurrent import futures from typing import Set from urllib.parse import urlsplit import requests logger = logging.getLogger('downloader') class Downloader: def __init__( self, save_path, session=requests.Session(), max_workers=5, ...
# -*- coding: utf-8 -*- # Neuronal - Framework for Neural Networks and Artificial Intelligence # # Copyright (C) 2012 dddddd <dddddd@pyphiverses.org> # Copyright (C) 2012 Notxor <gnotxor@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
import ot import numpy as np # import pytest def test_sinkhorn(): # test sinkhorn n = 100 np.random.seed(0) x = np.random.randn(n, 2) u = ot.utils.unif(n) M = ot.dist(x, x) G = ot.sinkhorn(u, u, M, 1, stopThr=1e-10) # check constratints assert np.allclose(u, G.sum(1), atol=1...
""" Models for the Task application """ from django.contrib.auth.models import User from django.db import models from django.db.models import Q from datetime import datetime import logging from muckrock.foia.models import FOIARequest, STATUS from muckrock.agency.models import Agency from muckrock.jurisdiction.model...
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################## # # Project: Metalink Checker # URL: http://www.nabber.org/projects/ # E-mail: webmaster@nabber.org # # Copyright: (C) 2007-2010, Neil McNab # License: GNU General Public License Version 2 # (http://...
from Library import * from Entity import * from EventEntity import * from AnalogEntity import * from SegmentEntity import * from NeuralEntity import * class EntityProxy(object): def __init__(self, nsfile): self._nsfile = nsfile def __getitem__(self, key): return self._nsfile.get_entity(key) ...
# -*- coding: utf-8 -*- # Copyright 2014 Jan-Philip Gehrcke. See LICENSE file for details. from __future__ import unicode_literals import os import sys import logging from py.test import raises, mark from clitest import CmdlineInterfaceTest, CmdlineTestError, WrongExitCode RUNDIRTOP = "./cmdline-test" TIMEGAPS_NAME ...
import pytest import warnings import numpy as np from sklearn import datasets import kmapper as km from kmapper.kmapper import Cover class TestAPIMaintenance(): def test_warn_old_api(self): """ Confirm old api works but throws warning """ mapper = km.KeplerMapper() data = np.random.rand...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, 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.apach...
from pyethereum import tester from datetime import datetime, date from functools import partial from bitcoin import * import math import pytest slow = pytest.mark.slow class TestBtcTx(object): CONTRACT = 'btcTx.py' CONTRACT_GAS = 55000 ETHER = 10 ** 18 def setup_class(cls): cls.s = tester...
#!/usr/bin/env python3 # coding: utf-8 from __future__ import division from __future__ import print_function import collections import colorsys import hashlib import shutil import io import itertools import os.path import operator import optparse import subprocess import webbrowser import xml.dom.minidom import zipfi...
import pytest import pytac.lattice import pytac.element import pytac.device import mock from pytac.units import PolyUnitConv from pytac.exceptions import ElementNotFoundException, PvException from constants import PREFIX, RB_SUFFIX, SP_SUFFIX, RB_PV, SP_PV, LATTICE @pytest.fixture def simple_element(identity=1): ...
################################################################################## # # # MngIt: Manage redundant information in software # # ...
import numpy as np from vsm import ( enum_sort as _enum_sort_, map_strarr as _map_strarr_, isstr as _isstr_) from vsm.linalg import row_norms as _row_norms_ from labeleddata import ( IndexedValueArray as _IndexedValueArray_, LabeledColumn as _LabeledColumn_, DataTable as _DataTable_, for...
# 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 # dist...
import numpy as np from vsm import (enum_sort as _enum_sort, map_strarr as _map_strarr) from vsm.viewer import (IndexedValueArray as _IndexedValueArray, res_term_type as _res_term_type_, res_doc_type as _res_doc_type_, doc_label...
# 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 (at your option) any later version. # # This program is distributed in the hope that it will be usefu...
#!/usr/bin/env python # # Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
# pylint: disable=g-bad-file-header # Copyright 2017 The Bazel 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 ...
import time import os import unittest import canopen import can EDS_PATH = os.path.join(os.path.dirname(__file__), 'sample.eds') class TestNetwork(unittest.TestCase): def setUp(self): network = canopen.Network() network.add_node(2, EDS_PATH) network.add_node(3, network[2].object_dictio...
# Django settings for wagtaildemo project. import os PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..') DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_...
# This file is part of the GBI project. # Copyright (C) 2012 Omniscale GmbH & Co. KG <http://omniscale.com> # # 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/licens...
# -*- coding: utf-8 -*- ## ## ## This file is part of CDS Indico. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS Indico 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 o...
from random import choice import json import sys import pymue from collections import defaultdict MAX_WAY = 7.8 def way_cost(way_length): if way_length <= 1: return way_length * 100 elif way_length < MAX_WAY: return (way_length * 100) ** 2 return sys.float_info.max print "read data...."...
# -*- coding: utf-8 -*- import pytest import time import sys import cPickle as pickle from test_base_class import TestBaseClass aerospike = pytest.importorskip("aerospike") try: from aerospike.exception import * except: print "Please install aerospike python client." sys.exit(1) class TestOperate(object):...
# This file is part of the GBI project. # Copyright (C) 2012 Omniscale GmbH & Co. KG <http://omniscale.com> # # 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/licens...
# This file is part of Indico. # Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
""" multiplication-table.py Author: Dina Credit: stack overflow, anushka, jasmine, Assignment: Write and submit a Python program that prints a multiplication table. The user must be able to determine the width and height of the table before it is printed. The final multiplication table should look like this: Width ...
# -*- coding: utf-8 -*- import pytest import time import sys import cPickle as pickle from test_base_class import TestBaseClass aerospike = pytest.importorskip("aerospike") try: from aerospike.exception import * except: print "Please install aerospike python client." sys.exit(1) class TestOperate(object):...
""" multiplication-table.py Author: Mary Feyrer Credit: Ethan Adner, Tess Snyder, http://stackoverflow.com/questions/493386/how-to-print-in-python-without-newline-or-space Assignment: Write and submit a Python program that prints a multiplication table. The user must be able to determine the width and height of the t...
import json from django.contrib.auth import login as django_login, authenticate, logout as django_logout from django.contrib.auth.decorators import login_required from django.contrib.auth.forms import SetPasswordForm from django.http import JsonResponse, HttpResponseRedirect from django.shortcuts import render, get_obj...
#!/usr/bin/env python # coding: utf-8 import csv import importlib import io import os import tempfile from textwrap import dedent as twdd import unittest import kraken_biom as kb def prep_kraken_input(data): kdr = csv.DictReader(data, fieldnames=kb.field_names, delimiter="\t") return [entry for entry in kdr]...
# Copyright 2015 Dimitri Racordon # # 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...
import numpy from sklearn.metrics import confusion_matrix import pdb class UnsupportedPredictedClasses(Exception): pass def assert_valid_prediction(y_pred, K): forbidden_klasses = set(y_pred.flatten()) - set(list(range(K))) if len(forbidden_klasses): raise UnsupportedPredictedClasses(forbidden_kl...
import os try: import unittest2 as unittest except ImportError: import unittest class ProjectTests(unittest.TestCase): # ./Docker or docker/Docker def test_docker_dir(self): self.assertTrue(os.path.isdir("./Docker")) # ./docker-compose.yml or ./docker/docker-compose.yml def test_dock...
# Copyright 2017 Mycroft AI 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 writin...
#!/usr/bin/env python # vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab: # Import external modules import sys import os import re import imp import getpass import socket import shutil import tempfile import unittest import distutils.spawn from contextlib import contextmanager try: from cStringIO import Stri...
import mysite.base.unicode_sanity import xml.etree.ElementTree as ET import xml.parsers.expat import sys, urllib, hashlib import urllib2 import cStringIO as StringIO from urlparse import urlparse from urllib2 import HTTPError from httplib import BadStatusLine from django.conf import settings import mysite.customs.model...
import pytest from click.testing import CliRunner from condor.scripts.bibset import create as bibcreate from condor.scripts.model import create as modelcreate from condor.scripts.query import query from condor.scripts.bibset import bibset from condor.scripts.matrix import matrix from condor.scripts.ranking import ra...
from _io import StringIO import pandas from viewcore import viewcore from viewcore import request_handler from viewcore.viewcore import post_action_is import requests from test.RequestStubs import PostRequest from test import RequestStubs from datetime import datetime from viewcore import configuration_provider def...
# vim: ai ts=4 sts=4 et sw=4 # Imports {{{ from django.http import HttpResponse, HttpResponseRedirect, HttpResponseServerError from django.shortcuts import render_to_response, get_object_or_404 from mysite.profile.models import Person, ProjectExp, Tag, TagType, Link_ProjectExp_Tag, Link_Project_Tag, Link_SF_Proj_Dude_...
# Imports {{{ # Python import StringIO import datetime import urllib import simplejson import re import collections import logging # Django from django.template.loader import render_to_string from django.core import serializers from django.http import \ HttpResponse, HttpResponseRedirect, HttpResponseServerEr...
# -*- coding: UTF-8 -*- import re import datetime _nanosecond_size = 1 _microsecond_size = 1000 * _nanosecond_size _millisecond_size = 1000 * _microsecond_size _second_size = 1000 * _millisecond_size _minute_size = 60 * _second_size _hour_size = 60 * _minute_size units = { "ns" : _nanosecon...
""" @brief test log(time=20s) """ import sys import os import unittest import warnings try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], "..", ".."))) if path not...
#!/usr/bin/python import time import uuid import sqlite3 import os try: import gexf except ImportError: pass#version of pygexf on pip is not compatible with py3, possible to git clone the orig repo from copy import deepcopy try: import cPickle as pickle except ImportError: import pickle from .ngpop import Popul...
from time import time as timestamp from time import sleep import copy try: from . import NScore from .arguments_obj import NSArgs from .NScore import exceptions from .mixins import ( NSUserAgentMixin, NSPropertiesMixin, NSSettersMixin, escape_url ) except (Import...
import unittest from vsmlib.model import ModelNumbered path = "/mnt/storage/Data/Embeddings/explicit_BNC_m100_w2_svd_d200" class Tests(unittest.TestCase): def test_similarity(self): model = ModelNumbered() model.load_with_alpha(path) l = model.get_most_similar_words("apple", 12) f...
# Natural Language Toolkit: Type Checking # # Copyright (C) 2001 University of Pennsylvania # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://nltk.sf.net> # For license information, see LICENSE.TXT # # $Id$ """ Type checking support for NLTK. Type checking for the parameters of functions and meth...
# # This file is part of nmgr. # Copyright (C) 2015 Leo Gaspard # # nmgr is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # nmgr is di...
""" Our own freezing module. Inspired by, but different from, frozen flask. """ from os.path import abspath, isdir, dirname, join, relpath, isfile from os import makedirs, remove, link, walk from math import ceil from glob import glob from noink import mainApp from noink.event_log import EventLog from noink.pickler i...
import ui.MainWindowUI import ui.Options import ui.SearchTab import ui.Status import ui.Options from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import QVariant import Options import Queries import datetime import EDDB import EliteLogAnalyzer import ui.EdceVerification import EdceWrapper imp...
#!/usr/bin/env python #-*- coding: utf-8 -*- """ Purpose ------------------ Automate creating water dimers for DALTON input in order to study the properties dependence on various parameters. Usage ------------------ This script creates a water dimer with one water with its oxygen in origo and the other water with i...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, division from armet.authorization import ManagedAuthorization from armet.exceptions import ImproperlyConfigured try: import shield except ImportError: shield = None class ShieldAuthorization(ManagedAuthorization): """Impl...
from mongoengine import Q from flask import Blueprint, g, current_app, render_template, flash, redirect, request, url_for, jsonify from flask.ext.login import current_user, login_required from flask.ext.babel import gettext as _ from app.utils import url_for_school from app.mod_school import get_school_context from ap...
import json import types import logging import requests import functools from django.utils import six from nodeconductor.structure import ServiceBackend, ServiceBackendError from .. import __version__ logger = logging.getLogger(__name__) class SaltStackBackendError(ServiceBackendError): def __init__(self, mes...
# # Copyright (c) 2015, Scott J Maddox # # This file is part of Open Band Parameters Device Simulator (OBPDS). # # OBPDS 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...
"""Config flow for the Amber Electric integration.""" from __future__ import annotations import amberelectric from amberelectric.api import amber_api from amberelectric.model.site import Site import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_API_TOKEN from homeassi...
"""Base class for fritzbox_callmonitor entities.""" from __future__ import annotations from contextlib import suppress from datetime import timedelta import logging import re from fritzconnection.lib.fritzphonebook import FritzPhonebook from homeassistant.util import Throttle from .const import REGEX_NUMBER, UNKNOW...
""" Support for Google travel time sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.google_travel_time/ """ from datetime import datetime from datetime import timedelta import logging import voluptuous as vol from homeassistant.helpers.ent...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from ...utils import NumpyRNGContext from ..interval import (ManualInterval, MinMaxInterval, PercentileInterval, AsymmetricPercentileInterval, ZScaleInterval) class TestInterval(object): da...
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
# -*- coding: utf-8 -*- """ @file @brief Defines a set of modules for more machine learning or student projects. """ import sys from ..installhelper.module_install import ModuleInstall def ml_set(): """ modules introduced by students or needed for student projects """ return ensae_set() def ensae_se...
#!/usr/bin/env python2.6 import os import subprocess import sys import time from git import * from optparse import OptionParser from time import gmtime, strftime from twitter.mesos import clusters from twitter.mesos.tunnel_helper import TunnelHelper __author__ = 'William Farner' REMOTE_USER = 'mesos' TEST_CMD = '...
import logging import sys from inferno.lib.lazy_property import lazy_property log = logging.getLogger(__name__) class Archiver(object): def __init__(self, ddfs, tags, archive_prefix='processed', archive_mode=False, max_blobs=sys.maxint): self.tags = tags self.ddfs = ddfs self.max_blobs...
import copy import functools import getpass import os import re from twitter.mesos.proxy_config import ProxyConfig from gen.twitter.mesos.ttypes import ( Constraint, CronCollisionPolicy, Identity, JobConfiguration, LimitConstraint, TaskConstraint, TwitterTaskInfo, UpdateConfig, ValueConstraint, ) cl...
""" All methods must return media_ids that can be passed into e.g. like() or comment() functions. """ import random def get_media_owner(self, media_id): self.mediaInfo(media_id) try: return str(self.LastJson["items"][0]["user"]["pk"]) except: return False def get_your_medias(sel...
## @file # This file is used to define common static strings used by INF/DEC/DSC files # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies th...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gen...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import sys import gzip if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument('infile', help='input text format matrix') parser.add_argument('-outfile', help='output npz file') args = parser....
import sys import os import os.path import ConfigParser from subprocess import call from subprocess import Popen from subprocess import PIPE from vimpdb import bbbconfig from vimpdb.errors import BadRCFile from vimpdb.errors import ReturnCodeError from vimpdb.errors import BrokenConfiguration RCNAME = os.path.expandu...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
# -*- coding: utf-8 -*- from collections import defaultdict import itertools from operator import itemgetter from ckeditor.widgets import CKEditorWidget from django.contrib import admin from django.db.models import Q, Count from django.template.defaultfilters import striptags from django.utils.encoding import smart_te...