src
stringlengths
721
1.04M
#!/usr/bin/env python import os, sys, time, socket, traceback log_f = os.fdopen(os.dup(sys.stdout.fileno()), "aw") pid = None def reopenlog(log_file): global log_f if log_f: log_f.close() if log_file: log_f = open(log_file, "aw") else: log_f = os.fdopen(os.dup(sys.stdout.filen...
# Topydo - A todo.txt client written in Python. # Copyright (C) 2014 - 2015 Bram Schoenmakers <me@bramschoenmakers.nl> # # 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 L...
# -*- coding: utf-8 -*- # # touchdown documentation build configuration file, created by # sphinx-quickstart on Tue Jun 28 13:27:09 2011. # # 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. # # A...
#! /usr/bin/python # # Author: Parker Moore # Class: COMP 206 - McGill University # Winter 2011 # Assignment 5 # Team Quad-Core Programmers # print "Content-type: text/html\n\n" import cgitb; cgitb.enable() class Page: def __init__(self): self.template_page = "index.html.pyt" self.inventory_file = "inventory....
import itertools import json import logging import os import random import threading from net import bsonrpc from net import gorpc class ZkOccError(Exception): pass # # the ZkNode dict returned by these structures has the following members: # # Path string # Data string # Stat ZkStat # Children []strin...
import os from flask import Flask, url_for, redirect, render_template, request from flask_sqlalchemy import SQLAlchemy from wtforms import form, fields, validators import flask_admin as admin import flask_login as login from flask_admin.contrib import sqla from flask_admin import helpers, expose from werkzeug.s...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python packaging.""" import os import sys from setuptools import setup from setuptools.command.test import test as TestCommand class Tox(TestCommand): """Test command that runs tox.""" def finalize_options(self): TestCommand.finalize_options(self) ...
from __future__ import absolute_import from __future__ import unicode_literals import logging from functools import reduce from docker.errors import APIError from .config import ConfigurationError from .config import get_service_name_from_net from .const import DEFAULT_TIMEOUT from .const import LABEL_ONE_OFF from ....
#!/usr/bin/env python # # Jetduino Example for using the analog read command to read analog sensor values # # The Jetduino connects the Jetson and Grove sensors. You can learn more about the Jetduino here: http://www.NeuroRoboticTech.com/Projects/Jetduino # # Have a question about this example? Ask on the forums her...
import sys; sys.path[0:0] = './' # Puts current directory at the start of path import settings import pymc as pm import numpy as np import scipy as sp import detrital_ui.common as ba from detrital_ui.data_types import * BIN = True err = pm.Uniform('RelErr',settings.error_prior[0],settings.error_prior[1],plot=Tr...
# -*-python-*- # ie_shell.py - Simple shell for Infinity Engine-based game files # Copyright (C) 2004-2009 by Jaroslav Benkovsky, <edheldil@users.sf.net> # # 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 Fo...
"""README for structure of the output data & how to load. The .csv output files are tab-delimited The first 3 rows contain the following information: * ROW 1: ROI ID's (there is one unique ID for each field-of-view) * ROW 2: ROI tags (e.g. 'r' indicates that the ROI was tdTomato positive) * ROW 3: ...
import cPickle import gzip import os, sys, errno import time import math import subprocess import socket # only for socket.getfqdn() # numpy & theano imports need to be done in this order (only for some numpy installations, not sure why) import numpy #import gnumpy as gnp # we need to explicitly import this in some...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Ultros documentation build configuration file, created by # sphinx-quickstart on Sat Jul 2 11:34:37 2016. # # 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 # aut...
from binascii import hexlify, unhexlify import unittest import aesgcm class TestVectors(unittest.TestCase): VECTORS = [ { 'key': unhexlify(b'0000000000000000000000000000000000000000000000000000000000000000'), 'iv': unhexlify(b'000000000000000000000000'), 'aad': None, ...
# -*- coding: utf-8 -*- """ flask.ext.hippocket.tasks ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by Sean Vieira. :license: MIT, see LICENSE for more details. """ from flask import Blueprint, Markup, request, render_template from itertools import chain from os import path from pkgutil import walk_p...
# Copyright 2015 Diogo Dutra # This file is part of alquimia. # alquimia 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. # Th...
from appfd.models import Basemap, Feature, Order, Place, Test from drf_queryfields import QueryFieldsMixin from rest_framework.serializers import HiddenField, IntegerField, NullBooleanField, CharField, ChoiceField, URLField from rest_framework.serializers import HyperlinkedModelSerializer, ModelSerializer, Serializer, ...
import json import asyncio import logging import functools # from concurrent.futures import ProcessPoolExecutor TODO Get this working import aiohttp from raven.contrib.tornado import AsyncSentryClient from stevedore import driver from waterbutler import settings from waterbutler.core import exceptions from waterbut...
# -*- coding: utf-8 -*- import time import pycurl from module.network.HTTPRequest import BadHeader from ..hoster.DebridlinkFr import error_description from ..internal.misc import json from ..internal.MultiAccount import MultiAccount class DebridlinkFr(MultiAccount): __name__ = "DebridlinkFr" __type__ = "ac...
import uuid from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from six import text_type, python_2_unicode_compatible from cms.mode...
# Configuration file for ipython. c = get_config() #------------------------------------------------------------------------------ # InteractiveShellApp configuration #------------------------------------------------------------------------------ # A Mixin for applications that start InteractiveShell instances. # #...
import json import requests.requests as requests from .helpers import Nested, add_json_headers from .admin import Admin from .projects import Projects from .compat import basestring class Stash(object): _url = "/" def __init__(self, base_url, username, password, verify=True): self._client = StashCli...
#!/usr/bin/env python3 """ActiveTick data conversions and code mappings.""" import calendar import time import unittest import pytz import activetickpy.config as config def _datetime_to_ms(dtime: calendar.datetime.datetime) -> int: """Convert the specified datetime object to milliseconds since the Epoch. ...
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> __revision__ = "$Id: textwrap.py 67747 2008-12-13 23:20:54Z antoine.pitrou $" import string, re __all__ = ['TextWrapper', 'wrap', 'fill', 'ded...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import xlsxwriter from django.core.management.base import BaseCommand from tasks.models import BeneficiariesMatching class Command(BaseCommand): help = ('Exports the list of foreign companies from declarations of PEPs ' 'which aren\'t ye...
""" Copyright (c) 2014-2015 F-Secure See LICENSE for details """ """ Common methods to be used in converting localization files. Copyright: F-Secure, 2012 """ #defult product name in localization files PRODUCT_NAME_DEFAULT_VALUE = "F-Secure Mobile Sync" # id that defines default product name in localization file PROD...
# -*- coding: utf-8 -*- from setuptools import setup short_description = 'flake8 plugin that integrates isort .' long_description = '{0}\n{1}'.format( open('README.rst').read(), open('CHANGES.rst').read() ) setup( name='flake8-isort', version='0.3.dev0', description=short_description, long_d...
import unittest import os from reactivexcomponent.configuration.api_configuration import APIConfiguration class TestConfiguration(unittest.TestCase): def setUp(self): self.configuration = APIConfiguration( os.path.join("tests", "unit", "data", "WebSocket_NewDevinetteApi_test.xcApi")) de...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from base import GAETestCase from pswdclient.model import SignSecret from pswdclient.manager import FindOrCreateSecrets, RenewSecrets, RevokeSecrets class TestSignSecret(GAETestCase): def test_find_or_create(self): # Secret c...
# Copyright 2017 Canonical Ltd. # Licensed under the LGPLv3, see LICENCE file for details. import abc import base64 import json import logging import os import pymacaroons from pymacaroons.serializers import json_serializer import macaroonbakery as bakery import macaroonbakery.checkers as checkers from macaroonbakery...
#!/usr/bin/env python # set path from sys import path from os.path import realpath, dirname, join path.append(realpath(dirname(realpath(__file__)) + '/../')) # import json import requests import re from distutils.version import LooseVersion, StrictVersion from lxml import html from searx.url_utils import urlparse, ur...
# 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. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (C) 2019 Greenweaves Software Limited # This 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 software is distribut...
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # ------------------------ Imports ----------------------------------# from __future__ import division # Force real division import numpy as np # Numpy Arrays import math # Square root # ------------------------ Classes ---------------------------------# clas...
import asyncio import aiohttp import json base_url = 'https://pypi.python.org/pypi/%s/json' loop = asyncio.get_event_loop() client = aiohttp.ClientSession(loop=loop) package_list_filename = 'packages.txt' async def get_pypi_json(package): url = base_url%packa...
import pandas as pd df = pd.read_csv('../data/movie_data.csv') import cleandata df['review'] = df['review'].apply(cleandata.preprocessor) # grid search, 非常耗时 #import gridlearn #gridlearn.learn(df) from sklearn.feature_extraction.text import HashingVectorizer from sklearn.linear_model import SGDClassifier import tok...
#!/usr/bin/env python # # # Copyright 2009-2015 Ghent University # # This file is part of hanythingondemand # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), ...
#! /usr/bin/env python3.3 # Virtual memory analysis scripts. # Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu # Copyright (c) 2012-2014 Peter Hornyack and University of Washington from analyze.argparsers import sum_vm_parser from util.pjh_utils import * from trace.vm_common import * from trace.vm_regex i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('iati', '0001_initial'), ] operations = [ migrations.CreateModel( name...
"""Module is calling outputs in iteration by dynamically loading modules""" import datetime as DT import logging import os import pkgutil import sys from sysinfosuite.SysInfoProcessCall import SysInfoProcessCall __author__ = "Peter Mikus" __license__ = "GPLv3" __version__ = "2.1.0" __maintainer__ = "Pet...
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # MipBroker - An Mip broker # # # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
# -*- 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, softw...
from django.shortcuts import render from django.http import HttpResponse ,HttpResponseRedirect from django.urls import reverse from .models import * from login.models import UserProfile from quiz.models import Question from django.core.files import File # Create your views here. def first_question(): list = Q...
# peppy Copyright (c) 2006-2009 Rob McMullen # Licenced under the GPLv2; see http://peppy.flipturn.org for more info """Groovy programming language editing support. Major mode for editing Groovy files. Supporting actions and minor modes should go here only if they are uniquely applicable to this major mode and can't ...
from stats import QueenStats from ant_move import AntStartMove from edge import DummyEdgeEnd class Simulator(object): def __init__(self, reality, simulation_class, reality_processors): self.reality = reality self.simulation_class = simulation_class self.reality_processors = reality_processo...
""" Test Scikit-learn """ import numpy as np from mlens.ensemble import SuperLearner, Subsemble, BlendEnsemble, TemporalEnsemble from mlens.testing.dummy import return_pickled try: from sklearn.utils.estimator_checks import check_estimator from sklearn.linear_model import Lasso, LinearRegression from sklear...
import functools import os.path from collections import OrderedDict bucket_type_keys = OrderedDict() def bucket_type_key(bucket_type): """ Registers a function that calculates test item key for the specified bucket type. """ def decorator(f): @functools.wraps(f) def wrapped(item, se...
import stat import os from fooster.web import web, file import mock import pytest test_string = b'secret test message' test_multibyte = b'i \xe2\x99\xa5 python\r\n' test_chunked = '{:x}'.format(len(test_multibyte)).encode(web.http_encoding) + b'\r\n' + test_multibyte + b'\r\n0\r\n\r\n' class FileHandler(file.Fi...
# # Copyright (c) 2014, Arista Networks, 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 of condit...
# Copyright 2012-2017 Jonathan Vasquez <jon@xyinn.org> # # 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 above copyright notice, this # list of conditions and the fol...
import sqlite3 import os if __name__ == '__main__': # with open('/tmp/out.txt', 'rb') as fd: # s = fd.read() # ll = s.split('\n') # otl = [] # s = '''UPDATE all_comics SET width=?, height=?, ratio=? WHERE comicid=?;''' # # with sqlite3.connect('data/gazee_comics.db') as con: # # ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Flash Cr50 using gsctool or cr50-rescue. gsctool example: util/flash_cr50.py --image cr50.bin.prod util/...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # jeopardy_quiz.py # == Preface == # === Copyright === # Copyright 2017 Chelsea School Students and Rik Goldman <rgoldman@chelseaschool.edu> # === License === # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU ...
import json, sys, re, hashlib, smtplib, base64, urllib, os from auth import * from core.account import manager from django.http import * from django.shortcuts import render_to_response from django.views.decorators.csrf import csrf_exempt from django.core.context_processors import csrf from django.core.validators impor...
# -*- coding: utf-8 -*- # Copyright (c) 2012 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing combobox classes using the eric6 line edits. """ from __future__ import unicode_literals from PyQt5.QtWidgets import QComboBox class E5ComboBox(QComboBox): """ Class implementing a com...
# Copyright 2013 the Melange 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 in wr...
import gambit, time, os, sys from utils import compute_time_of ''' Read GAME_FILE in SAVED_GAMES_DIRECTORY and create a tree from it. ''' def create_tree(args): os.chdir(SAVED_GAMES_DIRECTORY) g = gambit.Game.read_game(GAME_FILE) os.chdir(PARENT_DIRECTORY) return g ''' Solve the game. ''' def solve_ga...
import numpy as np import tensorflow as tf import cancer_data from neural_network_decision_tree import nn_decision_tree import time from sklearn.model_selection import train_test_split x = cancer_data.feature y = cancer_data.label d = x.shape[1] epochs = 100 batch_size = 100 num_cut = [] for features in xrange(d):...
import inspect #------------------------------------------------------------ #------------------------------------------------------------ class BaseStruct(object): #------------------------------------------------------------ def __init__(self, *args, **kwds): self.deserialize(*args, **kwds) ...
############################################################################## # # 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 ...
import hashlib from PyQt5.QtCore import Qt from PyQt5.QtWidgets import * def cryptPassword(password=''): return hashlib.md5(password.encode('utf-8')).hexdigest() def checkPassword(crypted_password, password): if crypted_password != cryptPassword(password): return False return Tru...
''' Low-level programming constructs for key-value stores Originally developed as part of Zephyr https://zephyr.space/ ''' from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import super from future import s...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
from . import util from .util import ( mkhead, sm_name, sm_section, unbare_repo, SubmoduleConfigParser, find_first_remote_branch ) from git.objects.util import Traversable from io import BytesIO # need a dict to set bloody .name field from git.util import ( Iterable, jo...
# models.py contains code for defining the user object and behavior which will be used throughout the site from refinery import db, app import datetime from refinery.webapp.pubsub import msgServer from collections import defaultdict import random,os,re,codecs from collections import defaultdict import pickle # Defi...
"""! @brief Unit-tests for pyclustering package that is used for exchange between ccore library and python code. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ import unittest import numpy from pyclustering.core.pyclustering_package import package_builder, package_ex...
# jsb/plugs/core/core.py # # """ core bot commands. """ ## jsb imports from jsb.lib.aliases import setalias from jsb.lib.config import getmainconfig from jsb.utils.statdict import StatDict from jsb.utils.log import setloglevel, getloglevel from jsb.utils.timeutils import elapsedstring from jsb.utils.exception import...
# coding: utf-8 import logging import pytest import signal import subprocess import sys import time import ray logger = logging.getLogger(__name__) def test_healthcheck(): res = subprocess.run(["ray", "health-check"]) assert res.returncode != 0 ray.init() res = subprocess.run(["ray", "health-check"...
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
from setuptools import setup, Extension import numpy import sys import os sys.path.insert(0, os.path.join('.', 'pyearth')) from _version import __version__ # Determine whether to use Cython if '--cythonize' in sys.argv: cythonize_switch = True del sys.argv[sys.argv.index('--cythonize')] else: cythonize_swi...
import dateutil.parser import scrapy import scrapy.spiders from jobs.common import clean_html from jobs.items import JobsItem class TvinnaSpider(scrapy.spiders.XMLFeedSpider): name = "tvinna" start_urls = ["http://www.tvinna.is/feed/?post_type=job_listing"] itertag = "item" namespaces = [ ("a...
# -*- coding: utf-8 -*- """ test_django-watchman ------------ Tests for `django-watchman` views module. """ from __future__ import unicode_literals import json try: from importlib import reload except ImportError: # Python < 3 pass import sys import unittest import django from django.conf import settings ...
# # @file TestUnitKind.py # @brief UnitKind enumeration unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # $Id$ # $HeadURL$ # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by ...
#compare branch lengths on species tree to inferred events (per gene copy) --- read a species tree with branch lengths and a set of uml_rec files import os, re, sys, glob from collections import defaultdict import numpy as np import scipy import matplotlib matplotlib.use('Agg') import seaborn as sns import pandas as ...
# -*- coding: utf-8 -*- import collections import json from TM1py.Objects.Annotation import Annotation from TM1py.Services.ObjectService import ObjectService class AnnotationService(ObjectService): """ Service to handle Object Updates for TM1 CellAnnotations """ def __init__(self, rest): su...
from dnfpy.core.map2D import Map2D import random import sys import numpy as np from dnfpy.cellular.hardlib import HardLib class BsRsdnfMap(Map2D): """ Map to handle the CellBsRsdnf in hardlib. This map use a standard XY routing scheme with 4 router by cell A spike is interpreted as a ...
from __future__ import absolute_import from django.conf import settings from celery import shared_task @shared_task(bind=True) def check_all_services(self): from aggregator.models import Service service_to_processes = Service.objects.filter(active=True) total = service_to_processes.count() count = 0...
#!/usr/bin/python # Software License Agreement (BSD License) # # Copyright (c) 2009-2011, Eucalyptus Systems, Inc. # All rights reserved. # # Redistribution and use of this software in source and binary forms, with or # without modification, are permitted provided that the following conditions # are met: # # Redistri...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
import os, subprocess import grompp ######################################### # this is a hack to find all restraint files # we have available def itp_files(params): proc = subprocess.Popen(["bash", "-c", "grep include ../%s/*top | grep -v %s"%(params.rundirs.top_dir,params.physical.forcefield)], stdout=subproc...
# noinspection PyPackageRequirements from EVE_Gnosis.simulations.capacitor import Capacitor from EVE_Gnosis.formulas.formulas import Formulas from datetime import datetime module_list = [] capacitor_amount = 375 capacitor_recharge = 105468.75 print("Start time: ", datetime.now().time()) module_list.append( { ...
# -*- coding: utf-8 -*- # Authors: Eric Larson <larson.eric.d@gmail.com> # License: BSD (3-clause) import numpy as np from numpy.polynomial.polynomial import Polynomial from ..io import BaseRaw from ..utils import _validate_type, warn, logger, verbose @verbose def realign_raw(raw, other, t_raw, t_other, verbose=No...
import imp import threading from importlib import import_module from django.apps import apps from django.contrib.staticfiles import finders from django.conf import settings from webassets.env import ( BaseEnvironment, ConfigStorage, Resolver, url_prefix_join) from django_assets.glob import Globber, has_magic __...
from swimlane.core.resources.usergroup import UserGroup, User from swimlane.exceptions import ValidationError from .base import MultiSelectField class UserGroupField(MultiSelectField): """Manages getting/setting users from record User/Group fields""" field_type = ( 'Core.Models.Fields.UserGroupField,...
from subprocess import * from tempfile import TemporaryFile SHELL = '/bin/bash' class Bench: workingDir = '' test = '' name = '' script = {} expected_result = None def __init__(self, workingDir, test, name, script, expected_result): self.workingDir = workingDir self.test = tes...
import sys import array import fcntl from termios import TIOCGWINSZ class ProgressBase(object): global_switch = False @classmethod def _pass(self, *args, **kwargs): pass class ProgressBar(ProgressBase): def __init__(self, body="<1II1>" * 12, prefix='>', suffix='<', output=sys.stderr): ...
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
import datetime from haystack import indexes from haystack.sites import site from brubeck.blogs.models import Entry, Blog class EntryIndex(indexes.SearchIndex): text = indexes.CharField(document=True, use_template=True) # title = indexes.CharField(model_attr='title') pub_date = indexes.DateTimeField(model_...
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
#!/usr/bin/python -tt # -*- coding: utf-8 -*- from pytraits import extendable # Let's start by creating a simple class with some values. It contains # only instance variables. Composed property will have access to all # these variables. @extendable class ExampleClass: def __init__(self): self.public = 42 ...
import numpy as np import sys from parameters import * from common import add_db def smr_bit_allocation(params,smr): """Calculate bit allocation in subbands from signal-to-mask ratio.""" bit_allocation = np.zeros(N_SUBBANDS, dtype='uint8') bits_header = 32 bits_alloc = 4 * N_SUBBANDS * params.nch bi...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # # Easy AVR USB Keyboard Firmware Keymapper # Copyright (C) 2013-2017 David Howland # # 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 versi...
# # generate scaffold # generates the plain HTML view scaffolding for crud actions. # # index, show, list, edit, create, delete # import argparse import tornado.template as template import os.path import timeit import testapp.powlib as lib import testapp.config as cfg def camel_case(name): """ converts t...
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # showre - [insert a few words of module description on this line] # Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of th...
# -*- coding: utf-8 -*- """ GIS Controllers """ module = request.controller resourcename = request.function # Compact JSON encoding SEPARATORS = (",", ":") # ----------------------------------------------------------------------------- def index(): """ Module's Home Page: Show the Main map """ ...
""" PySCeS - Python Simulator for Cellular Systems (http://pysces.sourceforge.net) Copyright (C) 2004-2015 B.G. Olivier, J.M. Rohwer, J.-H.S Hofmeyr all rights reserved, Brett G. Olivier (bgoli@users.sourceforge.net) Triple-J Group for Molecular Cell Physiology Stellenbosch University, South Africa. Permiss...
# %PSCGPL_START_COPYRIGHT% # ----------------------------------------------------------------------------- # Copyright (c) 2009-2013, Pittsburgh Supercomputing Center (PSC). # # 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 # ...
#!/usr/bin/env python # coding: utf-8 # Copyright (c) 2012, Polar Mobile. # 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 # ...