text
stringlengths
475
200k
# browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl <[EMAIL]> # # Browsershots 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...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # Author: Jon Trulson <[EMAIL]> # Copyright (c) 2015 Intel Corporation. # # 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 limita...
import os import subprocess import traceback from . import secure_execution_environment class JailedSandbox(secure_execution_environment.SecureExecutionEnvironment): """ A Jailed Sandbox ensures a secure execution environment by carefully permissioning files during each phase of execution, and by running...
# https://drive.google.com/open?id=0B5vxvuZBEEfTRGdXZ2NXUjNKUUk import h5py import matplotlib.gridspec as gridspec import matplotlib.widgets as mwidgets from matplotlib import path import numpy as np # uncomment this to set the backend # import matplotlib # matplotlib.use('Qt4Agg') import matplotlib.pyplot as plt ...
# Copyright 2012 Tomasz Kontusz # # This file is part of Spanel. # # Spanel 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. # # Spanel ...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:/DC.ui' # # Created: Thu Mar 21 22:26:29 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeE...
# In consumers.py from channels import Channel, Group from channels.sessions import channel_session from channels.auth import channel_session_user, channel_session_user_from_http from django.contrib.auth.decorators import login_required # message.content: { # 'reply_channel': 'daphne.response.KlKfRlEHam!wMmjwWCFNp'...
from bernard.conf.utils import ( patch_conf, ) from bernard.i18n.translator import ( WordDictionary, ) def test_render_gender(): wd = WordDictionary() wd.update_lang(None, [ ('PRONOUN', 'he'), ], {'gender': 'male'}) wd.update_lang(None, [ ('PRONOUN', 'she'), ], {'gender':...
from base import BaseBot from scraping import research, general class ResearcherBot(BaseBot): def __init__(self, browser, config, planets): self.research_client = research.Research(browser, config) self.general_client = general.General(browser, config) self.planets = planets supe...
import csv import json import urllib.parse import urllib.request # See https://developer.github.com/v3/issues/ def get_issues(state=None, labels=None, milestones=None): query = dict() if state: query.update(state=state) if labels: query.update(labels=','.join(labels)) if milestones: ...
# Copyright 2013 OpenStack Foundation # # 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...
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # streamondemand.- XBMC Plugin # Canal para eurostreaminginfo # http://www.mimediacenter.info/foro/viewforum.php?f=36 # ------------------------------------------------------------ import re from core import config from core import ...
"""Auxiliary functions to be used for preparing the training data.""" def bic_intra_extra_pairs(training_data): """bic_intra_extra_pairs(training_data) -> intra_pairs, extra_pairs Computes intra-class and extra-class pairs from given training data. The ``training_data`` should be aligned in a list of sub-list...
# project from tests.core.test_wmi import TestCommonWMI from tests.checks.common import AgentCheckTest from mock import patch def to_time(wmi_ts): "Just return any time struct" return (2100, 12, 24, 11, 30, 47, 0, 0) def from_time(year=0, month=0, day=0, hours=0, minutes=0, seconds=0, microsecond...
#!/usr/bin/python # Copyright (C) 2013 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import sys def create(t): t.write('''mockinfo.py''', ''' import re import optparse import os ...
# -*- coding: utf-8 -*- import spyral class Creditos(spyral.Scene): def __init__(self, size): spyral.Scene.__init__(self, size) self.background = spyral.Image(size=self.size).fill((0,0,0)) self.velocidad = 20.0 spyral.event.register("input.keyboard.down.*", self.leave) sp...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014 CERN. # # Invenio 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 of the # License, or (at your option) any...
# -*- coding: utf-8 -*- # # SelfTest/Cipher/AES.py: Self-test for the AES cipher # # Written in 2008 by Dwayne C. Litzenberger <[EMAIL]> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public...
""" Generates list of current authors Run the script in the main sympy repo. Copy authors.tex in the tutorial repo. """ def generate_authors_list(): authors = [] with open('AUTHORS') as f: for line in f: if line.strip().endswith('>'): aut = line.split('<')[0].strip() + '\\\...
# Copyright (C) 2013 Jeremy S. Sanders # Email: Jeremy Sanders <[EMAIL]> # # 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 2 of the License, or # (at your option...
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from datetime import datetime, timedelta from io import BytesIO from itertools import chain import time from django.core.exceptions import SuspiciousOperation from django.core.handlers.wsgi import WSGIRequest, LimitedStream from django.http import (Htt...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/main.ui' # # Created: Mon Oct 13 21:40:12 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attrib...
#! /usr/bin/python -u import datetime, os, sys, pwd import hg_helper, ldap_helper import logging from sh_helper import QuoteForPOSIX if __name__ == '__main__': os.environ['PYTHONPATH'] = '/repo_local/mozilla/libraries/' if os.getenv ('USER') == 'root': root_shell = pwd.getpwuid (0)[6] ssh_comm...
import os import tempfile import shutil from io import BytesIO from django.test import TestCase from dbbackup.storage.builtin_django import Storage as DjangoStorage class DjangoStorageTest(TestCase): def setUp(self): self.temp_dir = tempfile.mkdtemp() self.storage = DjangoStorage(location=self.tem...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# ------------------------------------------------------------------------------ # # Copyright 2011, 2012, 2013 Brent L. Brock and the Craighead Institute # # This file is part of Wild Planner. # # Wild Planner is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public...
# Copyright: (c) 2019, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat.mock import patch from ansible.modules.network.icx import icx_linkagg from units....
from __future__ import absolute_import # Copyright (c) 2010-2018 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Sequence, Typed, Alias, ) from openpyxl.descriptors.excel import ( ExtensionList, ) from openpyxl.descriptors.sequence import ( Mul...
"""Please refer to the documentation provided in the README.md. which can be found at the PyPI URL: https://pypi.org/project/simple-slack-bot/ """ import itertools import logging import logging.config import os import sys import time import traceback import typing from logging import StreamHandler import slacksocket...
"""Provides device automations for NEW_NAME.""" from typing import List import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, CONF_DOMAIN, CONF_TYPE, CONF_PLATFORM, CONF_DEVICE_ID, CONF_ENTITY_ID, STATE_ON, ) from homeassistant.core import HomeAssistant from homeassista...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 OpenCraft # License: AGPLv3 """ This module contains a mixin that allows third party XBlocks to be easily edited within edX Studio just like the built-in modules. No configuration required, just add StudioEditableXBlockMixin to your XBlock. """ # Imports #################...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2016 Google 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 by applicable law or a...
#!/usr/bin/python # vim: tabstop=4 expandtab shiftwidth=4 fileencoding=utf8 # # Copyright (C) 2010 Peter Todd <[EMAIL]> """User interface.""" import pygtk pygtk.require('2.0') import gtk, gobject, cairo import time from pylab import * from scipy.spatial.distance import pdist,squareform world_width = 1.920 world_he...
import os import requests ll_url = 'https://maps.googleapis.com/maps/api/geocode/json?address=%s' weather_url = 'https://api.darksky.net/forecast/%s/%f,%f' darksky_key = os.environ.get('darksky_key', None) def get_forecast(city_name): try: ll = get_lat_lon(city_name) response = requests.get(weathe...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import logging as log from time import time from beamie import data from beamie.config import CONFIG def do_tidy_tokens(): session = data.session() expired_tokens = session.query(data.Token).filter( data.Token.expiry < int(time())) count...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- 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 field 'Release.commit_count' db.add_column( 'sentry_r...
#!/usr/bin/python # -*- coding: utf-8 -*- # __author__='atareao' __date__ ='$19/02/2012' # # # Copyright (C) 2012 Lorenzo Carbonell # [EMAIL] # # 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, ei...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Member.alternate_avatar' db.add_column(u'staff_member', 'alternate_avatar', ...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, [EMAIL], All rights reserved. # LLNL-CODE-647188 # # F...
"""Tests for distutils.dist.""" from distutils import sysconfig import os import test import unittest from test.test_support import TESTFN class SysconfigTestCase(unittest.TestCase): def setUp(self): super(SysconfigTestCase, self).setUp() self.makefile = None def tearDown(self)...
# Copyright 2013-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
#!/usr/bin/env python import atexit from compileall import compile_file from ctypes import CDLL, c_char_p import os import platform import shutil import sys import tempfile import textwrap try: # Python 3 from urllib.request import urlopen except ImportError: # Python 2 from urllib2 import urlopen from...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018 Caleb Bell <[EMAIL]> 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 S...
# coding=utf-8 """Test methods without color codes.""" import string import sys import pytest from colorclass import Color class _Default(dict): @staticmethod def __missing__(key): return key def test_chaining(): """Test chaining Color() instances.""" value = Color('test') value2 = Co...
from cffi import FFI import os module_name = '_smbus_cffi' ffi = FFI() ffi.cdef(""" typedef unsigned char __u8; typedef int32_t __s32; typedef unsigned short int __u16; #define I2C_SLAVE ... #define I2C_PEC ... /* smbus_access read or write markers */ #define I2C_SMBUS_READ ... #define I2C_SMBUS_WRITE ... /* SMB...
# -*- coding: utf-8 -*- from django.forms import ModelForm from apps.registro.models import Establecimiento from apps.registro.models.Turno import Turno from apps.registro.models.EstablecimientoTurno import EstablecimientoTurno from apps.registro.models.Nivel import Nivel from apps.registro.models.TipoCompartido import...
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np from .kern import CombinationKernel from paramz.caching import Cache_this import itertools from functools import reduce def numpy_invalid_op_as_exception(func): """ A decorator ...
from blist import blist from bisect import bisect_left, bisect_right from collections import MutableMapping, namedtuple from heapq import merge from itertools import chain, tee try: from itertools import izip except ImportError: izip = zip Interval = namedtuple('Interval', 'start stop') def pairwise(iterable)...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
# -*-coding:utf-8 -* # Copyright (c) 2011-2015, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, thi...
"""Support for the Google Cloud TTS service.""" import logging import os import asyncio import async_timeout import voluptuous as vol from google.cloud import texttospeech from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider import homeassistant.helpers.config_validation as cv _LOGGER = logg...
""" Module to generate C code for a given native @block """ from builtins import zip import warnings from future.utils import viewitems, viewvalues from miasm.expression.expression import ExprId, ExprLoc, ExprInt, \ ExprMem, ExprCond, LocKey, is_expr from miasm.ir.ir import IRBlock, AssignBlock from miasm.ir.tr...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2011 credativ Ltd (<http://www.credativ.co.uk>). # All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Ge...
#!/usr/bin/python import os, glob, sys def fixHeader(fnp): q = open(fnp).read() with open(fnp, "w") as f: dump = False inc = False opened = False closed = False for line in q.split("\n"): if dump and inc: f.write(line + "\n") ...
#!/usr/bin/env python # @@@ START COPYRIGHT @@@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Li...
""" Flask-SQLAlchemy ---------------- Adds SQLAlchemy support to your Flask application. Links ````` * `documentation <http://packages.python.org/Flask-SQLAlchemy>`_ * `development version <http://github.com/mitsuhiko/flask-sqlalchemy/zipball/master#egg=Flask-SQLAlchemy-dev>`_ """ from setuptools import setup s...
#!/usr/bin/env python ''' PYROMS_TOOLBOX is a toolbox for working with ROMS ocean models input/output files based on PYROMS pyroms and pyroms_toolbox are based on the python/numpy/matplotlib scientific python suite. NetCDF I/O is based on the NetCDF4-python package. ''' from iview import iview from jview import j...
import pandas import numpy import itertools import sklearn import sklearn.tree import sklearn.svm from sklearn.ensemble import AdaBoostClassifier from sklearn.cluster import KMeans import sklearn.multiclass import sklearn.metrics import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt start = pandas.T...
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network on a region of int...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# ********************************************************************** # # Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************************************...
#---------------------------------------------------------------------- # Name: wxPython.lib.filebrowsebutton # Purpose: Composite controls that provide a Browse button next to # either a wxTextCtrl or a wxComboBox. The Browse button # launches a wxFileDialog and loads the result i...
# 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 # d...
# -*- coding: utf8 -*- # # Copyright (C) 2015 NDP Systèmes (<http://www.ndp-systemes.fr>). # # 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 # Licen...
from django import forms from django.contrib import admin from django.contrib.admin import widgets from unittest import TestCase from django.test import TestCase as DjangoTestCase from django.db.models import DateField import models class AdminFormfieldForDBFieldTests(TestCase): """ Tests for correct behavior ...
# The MIT License (MIT) # # Copyright (c) 2013 Numenta, Inc. # # 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 # to use, copy, mod...
from astrobin.models import Telescope, Camera, Software, Filter, Mount, Accessory, FocalReducer TYPES_LOOKUP = { 'Telescope': Telescope.TELESCOPE_TYPES, 'Camera': Camera.CAMERA_TYPES, 'Software': Software.SOFTWARE_TYPES, 'Filter': Filter.FILTER_TYPES, } CLASS_LOOKUP = { 'Telescope': Telescope, ...
""" The MIT License (MIT) Copyright (c) 2014 kangareuben 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 to use, copy, modify, merge, ...
# -*- coding: utf-8 -*- """ This file is part of **opensense** project https://github.com/opensense-network/. :platform: Unix, Windows, MacOS X :sinopsis: opensense .. moduleauthor:: Frank Pallas <[EMAIL]> License : GPL(v3) **opensense** is free software: you can redistribute it and/or modify it under the t...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012, 2013 CERN. ## ## Invenio 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 of the ## License, or (at your opt...
""" AZBaseClasses Base Classes for AZ methods. """ import imp import orange import types,os from AZutilities import dataUtilities from AZutilities import descUtilities import pickle import copy #from trainingMethods import AZorngConsensus def getCorrespondingLearner(modelPath, getParameters = True): ...
# # Copyright (C) 2013 UNIVERSIDAD DE CHILE. # # 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 dist...
# Copyright 2013 NEC Corporation # Copyright 2013 IBM Corp. # 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-...
""" Tools to read Delft output into paraview. Note that this probably needs to be run from within paraview or pvpython. """ from __future__ import print_function import numpy as np import time from ...io import qnc from . import dfm_grid try: import paraview import paraview.numpy_support as pnp import ...
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import class DataIngestionInterface(object): """ A data ingestion extension """ def __init__(self, is_inference_db=False, **kwargs): """ Initialize the data ingestion extension Para...
# This source code is from Theano tutorial # http://deeplearning.net/tutorial/ # This source code is licensed under a BSD license found in the # 3rd-party-licenses.txt file in the root directory of this source tree. # The original code was modified by Robert Bosch LLC, USA for timing. # All modifications are licens...
# Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
#!/usr/bin/env python """ Copyright 2013 OpERA 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 agree...
""" pylayers ========= This file is adapted from scikit-learn package """ import sys __version__ = '0.12-git' try: # This variable is injected in the __builtins__ by the build # process. It used to enable importing subpackages of sklearn when # the binaries are not built __PYLAYERS_SETUP__ except Na...
#!/usr/bin/python3 ############################################################################### # # # collecty - A system statistics collection daemon for IPFire # # Copyright (C) 2012 IPFire development team ...
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.scripts.ckeygen}. """ import getpass import sys import subprocess from io import BytesIO, StringIO from twisted.python.compat import unicode, _PY3 from twisted.python.reflect import requireModule if requireModule(...
# Copyright (c) 2012-2013 Paul Tagliamonte <[EMAIL]> # Copyright (c) 2013 Leo Cavaille <[EMAIL]> # # 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 limit...
import typing as t from functools import update_wrapper from pca.data.values import ( Owner, Value, ) from pca.utils.collections import freeze # noinspection PyPep8Naming class reify: # noqa: N801 """ Taken from `pyramid.decorator`. Use as a class method decorator. It operates almost exactly ...
from pprint import pprint from subfind_provider_opensubtitles import OpensubtitlesProvider __author__ = 'hiepsimu' import logging import unittest logging.basicConfig(level=logging.DEBUG) class OpensubtitleTestCase(unittest.TestCase): def setUp(self): self.provider = OpensubtitlesProvider() def tes...
#!/usr/bin/python # -*- coding: utf-8 -*- """ ================================================================================ mingus - Music theory Python package, Suite module Copyright (C) 2008-2009, Bart Spaans This program is free software: you can redistribute it and/or modify it under the term...
from copy import copy, deepcopy import parameters from generate_chain_system import * from bezier_constraint_odd_solver import BezierConstraintSolverOdd from bezier_constraint_odd_solver_fast import BezierConstraintSolverOddFast from bezier_constraint_even_solver import BezierConstraintSolverEven #BezierConstraintSolve...
############################################################################## # # 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 os import sys import glob init_py_path = os.path.normpath(os.path.dirname(os.path.abspath(__file__))) + '/anvio/__init__.py' version_string = [l.strip() for l in open(init_py_path).readlines() if l.strip().startswith('anvio_version')][0] anvio_version = version_string.split('=')[1].strip().strip("'").strip('"')...
# -*- coding: utf-8 -*- from hashlib import sha1 from random import choice, randint def sliding_window(n): def _cover(f): def _f(self, *args): while len(args) >= n: f(self, *args[:n]) args = args[1:] return _f return _cover class Markov: prefix...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'EncounterInitiative' db.delete_table(u'dm_encounterinitiative') # Adding model 'N...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: [EMAIL] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 import sys # noqa: F401 ...
# Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
#!/usr/bin/env python # Copyright (C) 2006-2013 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...
from rest_framework import serializers from api.models import HTCondorJob class HTCondorJobSerializer(serializers.ModelSerializer): # st = serializers.WritableField(write_only=True, source='state', default='', required=False) # test = serializers.CharField(source='schedd', read_only=True) class Meta: ...