src
stringlengths
721
1.04M
import socket import subprocess import time from util import hook, http socket.setdefaulttimeout(10) # global setting def get_version(): try: stdout = subprocess.check_output(['git', 'log', '--format=%h']) except: revnumber = 0 shorthash = '????' else: revs = stdout.spli...
# # File contains functions to read table and collect FDs # # strips input data of commas def stripper(input): for i in range(len(input)): hold = [] for j in range(len(input[i])): hold.append(input[i][j].replace(",", "")) input[i] = hold return input # make dictionary as...
# Copyright 2013 Mirantis Inc. # Copyright 2014 Cloudbase Solutions Srl # # 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 # # ...
# 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import tqdm import click from erppeek import Client from datetime import datetime, date import configdb ATR_CASES = ['C2'] ATR_STEPS = ['01'] def create_file(c, from_date, file_output): atr_ids = c.GiscedataSwitching.search([('create_date','>=', from_dat...
from __future__ import unicode_literals from collections import OrderedDict class FIFO(OrderedDict): """ This is a First in, First out cache, so, when the maximum size is reached, the first item added is removed. """ def __init__(self, maxsize): """ :param int maxsize: ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-31 12:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lab01_authserver_app', '0003_refreshtoken'), ] operations = [ migrations.Re...
''' pydevd - a debugging daemon This is the daemon you launch for python remote debugging. Protocol: each command has a format: id\tsequence-num\ttext id: protocol command number sequence-num: each request has a sequence number. Sequence numbers originating at the debugger are odd, sequence numbers ori...
#!/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...
import numpy as np from ps.extend import EType class PsGrid: # FIXME old way is deprecated '''def ps_construct_grids(self, scheme_order): self.construct_grids(scheme_order) R = self.R # remove eventually? a = self.a self.all_Mplus = {0: set(), 1: set(), 2: set()} self...
from unittest import mock from django.test import TestCase from webhook import handlers from webhook.tests.utils import get_project_webhook_data from_on_deck_project_data = { "action": "moved", "changes": {"column_id": {"from": 2001377}}, "project_card": { "url": "https://api.github.com/projects...
import pytest def test_xsim(): import os import shutil from edalize_common import compare_files, setup_backend, tests_dir ref_dir = os.path.join(tests_dir, __name__) paramtypes = ['plusarg', 'vlogdefine', 'vlogparam'] name = 'test_xsim_0' tool = 'xsim' tool_optio...
import unittest from leafpy import Leaf import vcr, time VIN = 'dummyvin' custom_sessionid = 'dummy_csid' class APICallTests(unittest.TestCase): @vcr.use_cassette('tests/unit/cassettes/test_call_with_no_params.yaml', filter_post_data_parameters=['VIN','custom_sessionid']) def test_call_with_no_param...
# -*- coding: utf-8 -*- import urlparse from dirtyfields import DirtyFieldsMixin from django.db import models from django.utils import timezone from django.utils.functional import cached_property from django.contrib.contenttypes.fields import GenericRelation from framework.celery_tasks.handlers import enqueue_task fr...
# -*- coding: utf-8 -*- """Helper functions used throughout Cookiecutter.""" from __future__ import unicode_literals import contextlib import errno import logging import os import stat import shutil import sys from cookiecutter.prompt import read_user_yes_no logger = logging.getLogger(__name__) def force_delete(f...
from ui import swi import webbrowser from ui.pytag import T from stats import Stats import stats import runner import os import re import matplotlib matplotlib.use('Agg') import pylab import StringIO import math def convert_string_to_value(x): if x=='True': return True if x=='False': return False try: ...
import numpy import nani from . import vector2 _PARTICLE_ID = 0 _PARTICLE_POSITION = 1 _PARTICLE_MASS = 2 _PARTICLE_NEIGHBOURS = 3 class ParticleView(object): __slots__ = ('_data',) def __init__(self, data): self._data = data def __str__(self): return ( "Particle(id=%s, ...
# ============================================================================= # periscope-ps (unis) # # Copyright (c) 2012-2016, Trustees of Indiana University, # All rights reserved. # # This software may be modified and distributed under the terms of the BSD # license. See the COPYING file for details. # # T...
import re from unittest import mock import pytest from celery.events.state import Task, Worker from clearly.protos.clearly_pb2 import TaskMessage, WorkerMessage # noinspection PyProtectedMember from clearly.utils.data import _accept, accept_task, accept_worker, obj_to_message TASK = dict(name='name', routing_key='ro...
#!/usr/bin/python import json import urllib2 import time import datetime import sys from time import sleep config = {"hostname":"127.0.0.1","port":"4985","sgDb":"sync_gateway","secure":False,"debug":True} class WORK(): hostname = '127.0.0.1' port = '4985' sgDb = 'sync_gateway' debug = False secure = "http" chk...
# coding=utf-8 __author__ = 'andre' """ /******************************************************************************* * Aluno: André Meneghelli Vale, Núm. USP: 4898948 * Curso: Bacharelado em Ciências da Computação * Desafio 25 - Brave Balloonists * MAC0327 -- 12/08/2015 -- IME/USP, -- Prof. Cristina Gom...
# Generated by Django 2.2.16 on 2020-11-02 07:04 from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('offer', '0045_codeassignmentn...
from django.contrib import admin from django.core.exceptions import PermissionDenied, ImproperlyConfigured from django.conf.urls import url from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from django.shortcuts import get_object_or_404, render from django.utils.text i...
""" 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 option) any later version. This program is distributed in the hope that it will be useful, but WITHOU...
# coding=utf-8 """ Django settings for reservas project. Generated by 'django-admin startproject' using Django 1.8.5. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ ...
''' Created on 7 Jun 2013 @author: Jamie ''' import urllib2 import math import re import itertools import argparse from bs4 import BeautifulSoup import matplotlib.pyplot as plt markets = {'UK': {'url': 'gb/united%20kingdom/', 'curr': 'GBP'}, 'USA': {'url': 'us/united%20states/', 'curr': 'USD'}, ...
# -*- coding: utf-8 -*- """ URLs for the subscriber module. """ from django.conf.urls import patterns, url from django.views.generic import TemplateView urlpatterns = patterns( '', url(r'^thank-you/$', TemplateView.as_view(template_name="subscriber/thank_you.html"), name="thank_you"), url( r'^succe...
"""Test functions in module.""" import asyncio import itertools import re import signal from textwrap import dedent import pytest from flash_air_music.configuration import FFMPEG_DEFAULT_BINARY from flash_air_music.convert import transcode from flash_air_music.convert.discover import get_songs, Song from tests impor...
""" This is the default template for our main set of AWS servers. This does NOT cover the content machines, which use content.py Common traits: * Use memcached, and cache-backed sessions * Use a MySQL 5.1 database """ # We intentionally define lots of variables that aren't used, and # want to import all variables fro...
""" Upgrader tests for L{xmantissa.port} items. """ from xmantissa.port import TCPPort, SSLPort from xmantissa.web import SiteConfiguration from axiom.test.historic.stubloader import StubbedTest from xmantissa.test.historic.stub_port1to2 import TCP_PORT, SSL_PORT class PortInterfaceUpgradeTest(StubbedTest): """...
import os import signal import sys import time import subprocess from threading import Thread import wx import wx.stc as stc import re import Queue from ide_global import * from doc_base import DocBase import doc_lexer import sim import ide_build_opt from ide_menu import Menu #---------------------------------------...
"""Functions for visualizing results on graphs of topologies""" from __future__ import division import os import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import networkx as nx __all__ = [ 'draw_stack_deployment', 'draw_network_load', ] # Colormap for node stacks ...
# -*- coding: utf-8 -*- from __future__ import division, absolute_import, print_function, unicode_literals from uuid import uuid4 import six import pytest from osgeo import ogr from nextgisweb.models import DBSession from nextgisweb.auth import User from nextgisweb.compat import Path from nextgisweb.core.exception im...
#!/home/cc/library/bin/cctools_python # CCTOOLS_PYTHON_VERSION 2.7 2.6 from work_queue import * import os import sys def runKlipReduce(klipreduce, log_prefix, configList=None, resume=False, resumeLogPrefix=None): # Check to make sure specified options are valid. if configList == None and resumeLogPrefix == ...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- coding: utf-8 -*- # # wat-bridge # https://github.com/rmed/wat-bridge # # The MIT License (MIT) # # Copyright (c) 2016 Rafael Medina García <rafamedgar@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software")...
""" Util functions """ import os import shlex from subprocess import Popen, PIPE from six import string_types from .exceptions import ShellError from . import report class ShellOutput(str): def __new__(cls, stdout, stderr): # Store raw stdout = stdout.strip() if stdout else '' stderr = s...
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Por Mario Izquierdo Rodríguez # # JclicDownloader descarga las actividades que se le pasen como filtro # import sgmllib import sys import urllib import os from time import sleep import getopt import zipfile from xml.dom import minidom # si test es True se usan archiv...
from lobby.models import Active, Audiencia, Passive from popolo.models import Identifier import uuid import unicodedata from datetime import datetime class ActivosCSVReader(): def parse_line(self, line): active = Active() active.name = unicode(line[3] + " " + line[4]) active.save() ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import wsrc.site.usermodel.models import uuid class Migration(migrations.Migration): dependencies = [ ('usermodel', '0002_auto_20180328_2346'), ] operations = [ migrations.AlterField...
# This program converts OpenFOAM raw data to a text file containing information on the particles # in the format that can be read by the porosity code # # position (x y z) and radius # THIS PROGRAM REQUIRES A DIRECTORY particles in the main folder #In the current form of the software the radius must be fixed byu the...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible class BaseModel(models.Model): """ I hear RoR has this by default, who doesn't need these two fields! """ created_at = models.DateTimeField(auto...
from decimal import * import re, sys parseObj = {} parsing = 0 planets = ['earth', 'moon', 'mars'] regexObj = {} def checkLine(line): checkArr = ['angelAccumulation', 'managers', 'unlocks', 'upgrades', 'venture'] for idx, check in enumerate(checkArr): if regexObj[check].match(line): return idx + 1 return 0 de...
import unittest import utils from tree import TreeNode # O(n) time. O(log(n)) space. Top down, iterative DFS. class Solution: def longestZigZag(self, root: TreeNode) -> int: result = 0 stack = [] if root.left: stack.append((root.left, 1, True)) if root.right: ...
import mock from django.conf import settings from django.test import TestCase from middleware.remote_execution import link, symlink, unrar, remove_dir @mock.patch('middleware.remote_execution.shell_connection') class TestRemoteExecution(TestCase): def test_link(self, shell): link('a', 'b') shell....
import unittest from gcp_census.bigquery.bigquery_table_metadata import BigQueryTableMetadata class TestBigQueryTableMetadata(unittest.TestCase): def test_is_daily_partitioned_should_return_False_if_is_a_partition(self): # given big_query_table_metadata = BigQueryTableMetadata( {"tab...
# -*- coding: utf-8 -*- """ Django settings for foosball project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, unicode_li...
__author__ = 'shilad' import collections import io import json import marshal import os import subprocess import sys import tldextract import traceback import urllib2 def warn(message): sys.stderr.write(message + '\n') def open_bz2(path): DEVNULL = open(os.devnull, 'w') p = subprocess.Popen(["pbzcat", p...
import numpy as np import sys #Usage: #python thisprog.py threshold numofnetworks #Will randomly initialize numofnetworks neural networks and train them until the error on a training set is less than threshold #Will then try to interpolate between these networks while keeping error below that of threshold. #Will ...
import app import cli class RunServerCli(cli.BaseCli): """ A tool for running a development server. """ def _get_args(self, arg_parser): """ Customize arguments. """ arg_parser.add_argument( '--debug', action='store_true', help='Enable debug mode: errors p...
# -*- coding: utf-8 -*- """setup.py: setuptools control.""" import re from setuptools import setup #import sys #if not sys.version_info[0] == 3: # print("\n \ # sys.exit("\n \ # ****************************************************************\n \ # * The CLI has only been tested with ...
""" Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful...
import sys import datetime import time true = 1 false = 0 if len(sys.argv) != 5: print("This program creates a wake up schedule for catching an appointment.") print("Usage: ") print("python genRendezvous.py [date] [time] [minutes until end] [lengthen 'l' or shorten 's' sleep-wake cycle]") print("date format: yyyy-...
import unittest from fractions import Fraction import pytest from brown.models.beat import Beat class TestBeat(unittest.TestCase): def test_init_from_numerator_denominator(self): dur = Beat(1, 4) assert(dur.numerator == 1) assert(dur.denominator == 4) def test_init_from_existing_be...
#!/Users/Vincent/lm_svn/checkouts/personal/papertrail-django/env/bin/python # # The Python Imaging Library. # $Id$ # # a utility to identify image files # # this script identifies image files, extracting size and # pixel mode information for known file formats. Note that # you don't need the PIL C extension to use thi...
from datetime import datetime class HQ(object): def __init__(self): self.people_in_hq = 0 self.keys_in_hq = 0 self.joined_users = [] self.hq_status = 'unknown' self.status_since = datetime.now().strftime('%Y-%m-%d %H:%M') self.is_clean = True self.joined_key...
from flask import Flask, url_for, redirect, render_template, request from wtforms import form, fields, validators from wtforms.fields import SelectField, TextAreaField from flask.ext import admin, login from flask.ext.admin.contrib import sqla from flask.ext.admin import helpers, expose from flask.ext.admin.model.templ...
#!/usr/bin/env python # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) | | .` | (_) || | | _|| |) | | ...
#!/usr/bin/python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ import os import re import sys import urllib """Logpuzzle exercise Given an apache logfile, ...
""" Final test script for evaluation statistics """ import os import sys from sklearn.model_selection import ParameterGrid from topoml_util.slack_send import notify notify('ALL TEST SCRIPT RUNNING FINAL TESTS', 'STARTING') SCRIPT_VERSION = '1.0.0' N_TIMES = 1 HYPERPARAMS = { # All using standard hyperparameters ...
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.toon.DistributedNPCLaffRestock from otp.nametag.NametagConstants import CFSpeech, CFTimeout from toontown.toonbase import TTLocalizer, ToontownGlobals from toontown.toon import NPCToons from DistributedNPCToonBase import DistributedNPCToonBase imp...
# -*- coding: utf-8 -*- """ *************************************************************************** Gridify.py --------------------- Date : May 2010 Copyright : (C) 2010 by Michael Minn Email : pyqgis at michaelminn dot com *****************************...
#!/usr/bin/env python # OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc. ############################################################################## # # OpenCenter is licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
import requests import json import re from device import Device class LonoClient(object): """ This class is used to communicate with Lono, an internet-of-things conencted sprinkler controller and one of the first outdoor smart home companies. (If you aren't familiar, check us out at http://l...
""" Provides functions for 1) recording outputs to file 2) replaying outputs from files """ import global_data import mctransmitter import datetime import os import errno import time import threading import ui_display playback_file_tag = None save_filename_prefix = 'botwurst_command_record_' default_save_dir...
import numpy as np def pr_unsampled(offspring_diploid, maternal_diploid, allele_freqs, offspring_genotype, maternal_genotype, male_genotype, mu): """ Calculate the transitions probability for a given set of parental and offspring alleles. Transitipn probabilities are then weight by the probability of...
import httplib import json def update(name='local', ip=None, port=None, host='planq.ddns.net', host_port=17011): ''' Update your kahoot server information on the directory server. Parameters: name : str Your name. Used to identify your server in the database. ip : str Your server...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Some no-reference :abbr:`IQMs (image quality metrics)` are extracted in the final stage of all processing workflows run by MRIQC. A no-reference :abbr:`IQM ...
# -*- 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 'ProjectList' db.create_table(u'organisation_projectlist',...
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 without limitation # the rights t...
# Copyright 2010, 2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). from django.utils.translation import ugettext_lazy as _ class BaseConst(object): @classmethod def _get_choices(cls): attrs = [(getattr(cls, attr), attr) for ...
import click from . import utils, views from . import parsers as p from .crontab import Crontab try: from StringIO import StringIO except ImportError: from io import StringIO @click.group() def crony(): pass @crony.command() @click.option('--limit', default=0, help="Number of crons to di...
import numpy as np import random def normalize(arr): s = sum(arr) if s == 0: s = 1 arr[0] = 1 for i, val in enumerate(arr): arr[i] = val/s def generate(width, height): matrix = [] for i in range(height): matrix.append([]) for j in range(width): ...
from django.test import TestCase from dispatch.modules.integrations import BaseIntegration class IntegrationTestCase(TestCase): class TestIntegration(BaseIntegration): ID = 'test-integration' HIDDEN_FIELDS = [ 'setting_d' ] def test_integration_returns_empty_settings(sel...
import argparse import json import os from datetime import date # ------------------------------------------------------------------------------- def extract_new_mirnas_from_report(report_tsv, type='new'): """ """ new_mirnas = {} fp = open(report_tsv, 'r') count = 0 for line in fp: ...
import simplejson import httplib2 import rdflib import hashlib import sys, os __version__ = "0.2" _RDF_TYPE = u"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" _RDFS_LABEL = "label" # "http://www.w3.org/2000/01/rdf-schema#label" _SKOS_PREFLABEL = "prefLabel" # "http://www.w3.org/2004/02/skos/core#prefLabel" # Conve...
import csv import sys import numpy from numpy import genfromtxt from numpy.linalg import inv numpy.set_printoptions(threshold=numpy.nan) Lambda = float(sys.argv[1]) Sigma2 = float(sys.argv[2]) print("Lambda = ") print(Lambda) print("Sigma2 = ") print(Sigma2) X_train = genfromtxt('X_train.csv', delimiter=',') print(...
from .proxy import RequestsProxy class PubSubRequestsProxy(RequestsProxy): """A PubSub-specific requests proxy. This proxy handles retries according to [1]. [1]: https://cloud.google.com/pubsub/docs/reference/error-codes """ SCOPE = ( "https://www.googleapis.com/auth/pubsub", "h...
#!/usr/bin/env python """ --- Day 5: How About a Nice Game of Chess? --- You are faced with a security door designed by Easter Bunny engineers that seem to have acquired most of their security knowledge by watching hacking movies. The eight-character password for the door is generated one character at a time by findi...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod, abstractproperty from collections import Mapping from functools import reduce from os.path import basename import re from .channel import Channel from .dist import Dist f...
""" Downloader for Reddit takes a list of reddit users and subreddits and downloads content posted to reddit either by the users or on the subreddits. Copyright (C) 2017, Kyle Hickey This file is part of the Downloader for Reddit. Downloader for Reddit is free software: you can redistribute it and/or modify it und...
''' Example script illustrating plotting of PLY data using Mayavi. Mayavi is not a dependency of plyfile, but you will need to install it in order to run this script. Failing to do so will immediately result in ImportError. ''' from argparse import ArgumentParser import numpy from mayavi import mlab from plyfile ...
"""Simple example showing how to get keyboard events. Note that the mouse events don't work very well. Something is wrong with the pipe process that keeps the mouse event process from exiting in the inputs script. The bug has been reported, and as soon as it is fixed, uncommenting the run_mouse() function will work. pr...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/x509v3.h> /* * This is part of a work-...
# # django-model-utils documentation build configuration file, created by # sphinx-quickstart on Wed Jul 31 22:27:07 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuratio...
from labkey.utils import json_dumps import requests from requests.exceptions import RequestException from labkey.exceptions import ( RequestError, RequestAuthorizationError, QueryNotFoundError, ServerContextError, ServerNotFoundError, ) API_KEY_TOKEN = "apikey" CSRF_TOKEN = "X-LABKEY-CSRF" def ha...
from decimal import Decimal import pytest from django.conf import settings from django.contrib.auth import get_user_model from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient from openslides.core.config import config from openslides.motions.models import Motion, ...
import praw from collections import deque from requests.exceptions import HTTPError from errbot import BotPlugin, botcmd class Reddit(BotPlugin): def activate(self): super(Reddit, self).activate() self.reddit = praw.Reddit(user_agent='example') if not self.config: self.config...
# Copyright (C) 2014 Linaro Limited # # Author: Milosz Wasilewski <milosz.wasilewski@linaro.org> # # This file is part of Testmanager. # # Testmanager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software Found...
from django.conf import settings from django.test import TestCase from apiserver.exceptions import BadRequest from apiserver.paginator import Paginator from core.models import Note from core.tests.resources import NoteResource from django.db import reset_queries class PaginatorTestCase(TestCase): fixtures = ['not...
import os import datetime import git import tempfile import shutil import re from csat.paths import PathWalker from csat.graphml.builder import GraphMLDocument, Attribute from . import parser class ModuleNotFound(KeyError): pass class ModuleAlreadyTracked(KeyError): pass def timestamp_to_iso(timestamp): ...
from Scrapers.tools import tools class MetacriticInfo: """Model for each elements""" def __init__(self): self.name = None self.platform = None self.developer = None self.publisher = None self.esrb = None self.release = None self.tags = None self...
from __future__ import division # Have a closer look at the residual blocks # Conclusion: No residual block is likely to be so permuted, or # so steeply changing, that we can't start recursion on the same l # across a block (the problem beeing that some P_lm's are too small to be # represented in IEEE floating point)....
# coding: utf-8 import pickle import sys from heapq import nlargest, nsmallest from operator import itemgetter from pprint import pprint from gensim import corpora, models from utils import calculate_lda, calculate_lsi, cosine_metric, preprocess_data, create_tfidf __author__ = "Michał Ciołczyk" _DATA_FILE = 'data/pa...
""" settings a repository to configure various parts of the app """ import os import sys import json import configparser os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' sys.setrecursionlimit(30000) def build_config(filename): """create a configparser object and write a ini file.""" config = configparser.C...
''' Created on 16.07.2015 @author: marscher ''' from __future__ import absolute_import from pyemma.util.types import is_int from pyemma._base.progress.bar import ProgressBar as _ProgressBar from pyemma._base.progress.bar import show_progressbar as _show_progressbar class ProgressReporter(object): """ Derive from...
""" evpn.py Created by Thomas Morin on 2014-06-23. Copyright (c) 2014-2015 Orange. All rights reserved. """ from struct import pack from exabgp.protocol.family import AFI from exabgp.protocol.family import SAFI # ========================================================================= EVPN # +-------------------...
####################################################################### # This file is part of Lyntin. # copyright (c) Free Software Foundation 2001, 2002 # # Lyntin is distributed under the GNU General Public License license. See the # file LICENSE for distribution details. # $Id: message.py,v 1.1 2003/08/01 00:14:52...
from datetime import datetime, timedelta import course_manager # from login_manager import LoginManager, login_manager, db import coursedb_manager from usage_resource import UsageResource from secret import sqlalchemy_url from login import ( PinResource, SignUpResource, AuthorizeResource, LogoutReso...
""" Copyright (C) 2014, 申瑞珉 (Ruimin Shen) This program 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 3 of the License, or (at your option) any later version. This program is distributed i...