text
stringlengths
475
200k
"""This file contains code used in "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2010 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import math import pandas import random import numpy as np import statsmode...
#!/usr/bin/env python """ %prog MODE FILES... Post-processes HTML and Latex files output by Sphinx. MODE is either 'html' or 'tex'. """ from __future__ import division, absolute_import, print_function import re import optparse import io def main(): p = optparse.OptionParser(__doc__) options, args = p.parse_...
#!/usr/bin/env python2 import re from psparser import PSLiteral from glyphlist import glyphname2unicode from latin_enc import ENCODING ## name2unicode ## STRIP_NAME = re.compile(r'[0-9]+') def name2unicode(name): """Converts Adobe glyph names to Unicode numbers.""" if name in glyphname2unicode: retu...
# # 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...
from __future__ import unicode_literals from django.apps import apps from django.contrib.sites.models import Site from django.test import TestCase from django.test.utils import modify_settings, override_settings @override_settings( ROOT_URLCONF='flatpages_tests.urls', SITE_ID=1, ) @modify_settings( INSTA...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
# -*- coding: utf-8 -*- """ pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ class _TokenType(tuple): parent = None def split(self): buf = [] ...
# encoding: 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): # Changing field 'GeneratedCertificate.certificate_id' db.alter_column('certificates_generatedcertificate', 'cert...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ video_codec and video_profile property """ from rebulk import Rebulk, Rule, RemoveMatch from rebulk.remodule import re from ..common import dash from ..common.pattern import is_disabled from ..common.validators import seps_after, seps_before, seps_surround def video_...
# 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 (c) 2008 Joost Cassee # Licensed under the terms of the MIT License (see LICENSE.txt) """ This TinyMCE widget was copied and extended from this code by John D'Agostino: http://code.djangoproject.com/wiki/CustomWidgetsTinyMCE """ from django import forms from django.conf import settings from django.contrib...
# Copyright (c) 2015 "Hugo Herter http://hugoherter.com" # # This file is part of Billabong. # # Intercom is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your o...
#!/usr/bin/python """ The example of using xmpppy's Ad-Hoc Commands (JEP-0050) implementation. """ import xmpp from xmpp.protocol import * options = { 'JID': '[EMAIL]', 'Password': '********', } class TestCommand(xmpp.commands.Command_Handler_Prototype): """ Example class. You should read source if you wish to und...
from MenuList import MenuList from Tools.Directories import SCOPE_ACTIVE_SKIN, resolveFilename from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, gFont, getDesktop from Tools.LoadPixmap import LoadPixmap from Tools.Directories import fileExists import skin def ChoiceEntryComponent(key="", text=None): scre...
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(...
# coding: utf-8 # (c) 2015, Toshio Kuratomi <[EMAIL]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) from ..utils import ( parse_duration, ) class ShareSixIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?sharesix\.com/(?:f/)?(?P...
import distutils.sysconfig import sys import os import traceback import cexceptions import os import sys import xmlrpclib import cobbler.module_loader as module_loader import cobbler.utils as utils plib = distutils.sysconfig.get_python_lib() mod_path="%s/cobbler" % plib sys.path.insert(0, mod_path) def register(): ...
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os import time try: from f5.bigiq import ManagementRoot fro...
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
""" Unit tests for sonification methods """ import mir_eval import numpy as np import scipy def test_clicks(): # Test output length for a variety of parameter settings for times in [np.array([1.]), np.arange(10)*1.]: for fs in [8000, 44100]: click_signal = mir_eval.sonify.clicks(times, fs...
#!/usr/bin/env python # # Copyright (c) 2009 NHN 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 l...
"""A Chaco file reader. """ # Author: Suyog Dutt Jain <[EMAIL]> # Copyright (c) 2009, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import Instance, Str from traitsui.api import View, Group, Item from tvtk.api import tvtk # Local imports. from mayavi.core.source import Source from...
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 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. ...
try: __IPYTHON__ import IPython import ipywidgets as widgets from IPython.core import display from traitlets import Unicode, Integer, Float import json from numpy.random import seed import time from .backends.base import MultiTrace from .sampling import _iter_sample except (NameE...
""" FastCGI (or SCGI, or AJP1.3 ...) server that implements the WSGI protocol. Uses the flup python package: http://www.saddi.com/software/flup/ This is a adaptation of the flup package to add FastCGI server support to run Django apps from Web servers that support the FastCGI protocol. This module can be run standalo...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
from django.contrib import admin from django.utils import timezone from django.utils.functional import curry from django.utils.translation import ugettext_lazy as _ from .forms import AdminPostForm from .models import Post, Image, ReviewComment, Section from .utils import can_tweet class ImageInline(admin.TabularInl...
import os import shutil import tempfile import zipfile from utils.file_util import get_files_by_re, gen_new_file_extension def get_aar_files(proj_dir, des_dir): rel_aar_dir = r"build\outputs\aar" aar_dirs = [os.path.join(proj_dir, i) for i in os.listdir(proj_dir) if os.path.isdir(os.path.join(proj_dir, i))] ...
"""Setup the adhocracy application""" import logging import os import os.path import pylons import pylons.test from pylons import config import migrate.versioning.api as migrateapi try: from migrate.versioning.exceptions import DatabaseAlreadyControlledError from migrate.versioning.exceptions import DatabaseN...
#!/usr/bin/env python """Test functions for fftpack.helper module Copied from fftpack.helper by Pearu Peterson, October 2005 """ from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal from numpy import fft fr...
# This file is part of the Waymarked Trails Map Project # Copyright (C) 2015 Sarah Hoffmann # # 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 2 # of the License, or any later version. # #...
#!/usr/bin/env python2 # This file is part of or-applet. # # or-applet 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. # # or-applet i...
# ASN.1 "universal" data types import operator, sys from pyasn1.type import base, tag, constraint, namedtype, namedval, tagmap from pyasn1.codec.ber import eoo from pyasn1.compat import octets from pyasn1 import error # "Simple" ASN.1 types (yet incomplete) class Integer(base.AbstractSimpleAsn1Item): tagSet = bas...
""" =================================== Swiss Roll reduction with LLE =================================== An illustration of Swiss Roll reduction with locally linear embedding """ # Author: Fabian Pedregosa -- <[EMAIL]> # License: BSD 3 clause (C) INRIA 2011 print(__doc__) import matplotlib.pyplot as plt # This im...
# Copyright (C) 2003-2007 Robey Pointer <[EMAIL]> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
import hashlib import operator from django.db.backends.creation import BaseDatabaseCreation from django.db.backends.utils import truncate_name from django.db.models.fields.related import ManyToManyField from django.db.transaction import atomic from django.utils.encoding import force_bytes from django.utils.log import ...
from django.core.management.base import NoArgsCommand from django.contrib.auth.models import User from django.db.models.signals import pre_save, post_save import sys class Command(NoArgsCommand): def get_user(self, uid_str): try: uid = int(uid_str) return User.objects.get(id=uid) ...
# # Copyright (C) 2012 Carnegie Mellon University # # 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, # but WITHOUT AN...
# ------------------------------------------------------------------------- # This is an example illustrating how to visit all patched bytes in Python # (c) Hex-Rays import idaapi # ------------------------------------------------------------------------- class patched_bytes_visitor(object): def __init__(self): ...
# # Copyright (C) 2014 Cirrax GmbH http://www.cirrax.com # Benedikt Trefzer <[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 3 of the License, or # ...
""" Copyright 2008-2011 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 l...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
from time import time class TokenBucket(object): """An implementation of the token bucket algorithm. >>> bucket = TokenBucket(80, 0.5) >>> print bucket.consume(10) True >>> print bucket.consume(90) False """ def __init__(self, tokens, fill_rate): """tokens is the total tokens...
# yielddefer is an async programming mechanism with a blocking look-alike syntax # # The contents of this file are subject to the Python Software Foundation # License Version 2.3 (the License). You may not copy or use this file, in # either source code or executable form, except in compliance with the License. # You m...
######################################################## # evaluator.py # Author: Jamie Zhu <jimzhu@GitHub> # Created: 2014/2/6 # Last updated: 2014/11/03 ######################################################## import numpy as np from numpy import linalg as LA import time, sys import random import core from utilitie...
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ The parent class for all the SSH services. Currently implemented services are ssh-userauth and ssh-connection. Maintainer: Paul Swartz """ from twisted.python import log class SSHService(log.Logger): name = None # this is th...
#!/usr/bin/env python # # Copyright 2005,2008,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
#-------------------------------------------------------------------------------------------------------------------------------------------# # openVA Pipeline: pipeline.py -- Software for processing Verbal Autopsy data with automated cause of death assignment. # # Copyright (C) 2018 Jason Thomas,...
import numpy as np import pytest from pandas import ( Categorical, CategoricalDtype, CategoricalIndex, DataFrame, MultiIndex, Series, Timestamp, get_dummies, period_range, ) import pandas._testing as tm from pandas.core.arrays import SparseArray class TestGetitem: def test_get...
# Copyright 2017 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...
# # 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 us...
import py import sys def test_ne(): code1 = py.code.Code(compile('foo = "bar"', '', 'exec')) assert code1 == code1 code2 = py.code.Code(compile('foo = "baz"', '', 'exec')) assert code2 != code1 def test_code_gives_back_name_for_not_existing_file(): name = 'abc-123' co_code = compile("pass\n", ...
# ----------------------------------------------------------------------------- # hedit.py # # Paring of Fortran H Edit descriptions (Contributed by Pearu Peterson) # # These tokens can't be easily tokenized because they are of the following # form: # # nHc1...cn # # where n is a positive integer and c1 ... cn are ch...
""" Cisco_IOS_XR_ip_pfilter_oper This module contains a collection of YANG definitions for Cisco IOS\-XR ip\-pfilter package operational data. This module contains definitions for the following management objects\: pfilter\-ma\: Root class of PfilterMa Oper schema Copyright (c) 2013\-2015 by Cisco Systems, Inc. A...
# This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied war...
# # 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 us...
""" I am completely rewriting this framework which was formerly known as weatherPattern. Yau Kwan Kiu, 802 CERB, NTU, 23-1-2013. == Requirements == * python 2.7 or similar (python 2.5 will probably be okay, no python 3 please) * numpy and scipy * no sympy needed yet * no opencv yet == What's this? == ARMOR = Adjustm...
import unittest from sqlalchemy.exc import UnboundExecutionError from sqlalchemy.orm import sessionmaker from sqlalchemy import func from iktomi.db.sqla import multidb_binds from . import multidb_models from .multidb_models import db1, db2 class MultidbTest(unittest.TestCase): def setUp(self): binds = mu...
"""Extract, format and print information about Python stack traces.""" import linecache import sys import types __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'print_exception', ...
""" Django admin page for credit eligibility """ from ratelimitbackend import admin from openedx.core.djangoapps.credit.models import ( CreditConfig, CreditCourse, CreditProvider, CreditEligibility, CreditRequest, CreditRequirement, CreditRequirementStatus ) class CreditCourseAdmin(admin.ModelAdmin): """...
import pytest import flask_login from encore import create_app from encore.user import User @pytest.fixture(scope="module") def app(request): app = create_app() ctx = app.app_context() ctx.push() request.addfinalizer(ctx.pop) return app @pytest.fixture(scope="module") def test_client(request, app)...
"""psycopg 1.1.x compatibility module This module uses the new style connection and cursor types to build a psycopg 1.1.1.x compatibility layer. It should be considered a temporary hack to run old code while porting to psycopg 2. Import it as follows:: from psycopg2 import psycopg1 as psycopg """ # psycopg/psycop...
#!/usr/bin/env python from __future__ import print_function """ test_transform_with_no_re_matches.py test messages with no regular expression matches """ #88888888888888888888888888888888888888888888888888888888888888888888888888888888888888888 # options #888888888888888888888888888888888888888888...
# coding=utf-8 """ Get ceph status from one node """ import subprocess import re import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), 'ceph')) from ceph import CephCollector patternchk = re.compile(r'\bclient io .*') numberchk = re.compile(r...
# Copyright (c) 2014, Chris Church <[EMAIL]> # Copyright (c) 2017 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 DOCUMENTATION = ''' name: powershell plugin_type: shell ...
#!/usr/bin/env python # LOG ANALYZER # by Kevin Yang # # Assumes VERY MUCH THIS FORMAT: # [<time>] <event> -> <data> import sys, re import numpy as np def find_outliers(array, mean = None, std = None, m = 6): if mean == None: mean = np.mean(array) if std == None: std = np.std(array) return array[abs(array - ...
import difflib import pprint import pickle import re import sys import warnings import weakref import inspect from copy import deepcopy from test import support import unittest from .support import ( TestEquality, TestHashing, LoggingResult, ResultWithNoStartTestRunStopTestRun ) class Test(object): "Ke...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals # IMPORTANT: only import safe functions as this module will be included in jinja environment import frappe import operator import re, urllib, datetime, math import babel.dates...
import os import time import tempfile import pickle as cPickle import mock from testtools import TestCase from cloudify.workflows import local from cloudify.decorators import operation from diamond_agent import tasks from diamond_agent.tests import IGNORED_LOCAL_WORKFLOW_MODULES class TestSingleNode(TestCase): ...
import inspect import os import re from django import template from django.template import RequestContext from django.conf import settings from django.contrib.admin.views.decorators import staff_member_required from django.db import models from django.shortcuts import render_to_response from django.core.exceptions imp...
import unittest from conans.client import tools from conans.test.utils.tools import TestClient from conans.test.utils.cpp_test_files import cpp_hello_conan_files from conans.util.files import save, load import os from conans.paths import CONANFILE from collections import OrderedDict from conans.test.utils.test_files i...
# -*- coding: utf-8 -*- """ *************************************************************************** OTBTester.py --------------------- Copyright : (C) 2013 by CS Systemes d'information (CS SI) Email : otb at c-s dot fr (CS SI) Contributors : Julien Malik (CS SI...
import ocl as cam import camvtk import time import vtk import datetime if __name__ == "__main__": myscreen = camvtk.VTKScreen() myscreen.setAmbient(1,1,1) #stl = camvtk.STLSurf(filename="demo.stl") stl = camvtk.STLSurf(filename="demo2.stl") print("STL surface read") myscreen.addActor(stl...
""" Field classes. """ from __future__ import unicode_literals import copy import datetime import os import re import sys import uuid import warnings from decimal import Decimal, DecimalException from io import BytesIO from django.core import validators from django.core.exceptions import ValidationError # Provide th...
import numpy as np import scipy.sparse as sp from HPOlibConfigSpace.configuration_space import ConfigurationSpace from HPOlibConfigSpace.conditions import EqualsCondition, InCondition from HPOlibConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter...
#!/usr/bin/python # TerminatorEncoding - charset encoding classes # Copyright (C) 2006-2008 [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, version 2 only. # # This program ...
grid_size = 50 # assumes a square grid counter = 3 * (grid_size * grid_size) # all cases that won't be covered def gcd(a,b): while (b != 0) and (a != b) and (a != 0): if b < a: a = a - b else: b = b - a if a > 0: return a return b end = grid_size+1 def my_a...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitsend Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly)...
"""Module for enhancement UI.""" import logging import unittest import mock from letsencrypt import errors from letsencrypt.display import util as display_util class AskTest(unittest.TestCase): """Test the ask method.""" def setUp(self): logging.disable(logging.CRITICAL) def tearDown(self): ...
# encoding: 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 'FeedUpdateHistory' db.delete_table('rss_feeds_feedupdatehistory') def backwards(se...
import yaml, json import random import traceback import sys import os import next.utils as utils DICT = {'dict','dictionary','map'} LIST = {'list'} TUPLE = {'tuple'} ONEOF = {'oneof'} NUM = {'num','number','float'} STRING = {'str','string','multiline'} ANY = {'any','stuff'} FILE = {'file'} BOOL = {'boolean','bool'} ...
# encoding: utf-8 __author__ = "Nils Tobias Schmidt" __email__ = "schmidt89 at informatik.uni-marburg.de" ''' Utility module ''' from Queue import Empty import itertools from os.path import splitext import re import sys import time import traceback from androlyze.log.Log import log def sha256(data): ''' ...
r"""OS routines for NT or Posix depending on what system we're on. This exports: - all functions from posix or nt, e.g. unlink, stat, etc. - os.path is either posixpath or ntpath - os.name is either 'posix' or 'nt' - os.curdir is a string representing the current directory (always '.') - os.pardir is a strin...
''' Hom family of models with regimes. ''' __author__ = "Luc Anselin [EMAIL], Pedro V. Amaral [EMAIL], Daniel Arribas-Bel [EMAIL]" from scipy import sparse as SP import numpy as np import multiprocessing as mp from numpy import linalg as la from pysal import lag_spatial from utils import power_expansion, set_endog, ...
"""A simple log mechanism styled after PEP 282.""" # This module should be kept compatible with Python 2.1. # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. DEBUG = 1 INFO = 2 WARN = 3 ERROR = 4 FATAL = 5 import sys class Log: def __i...
from algo import mod_inv from random import randrange, randint from ecurves import * def elgalmal_encrypt(M,k,a,p): ''' Input: M - menssage k - recipient private key a - generator p - prime Output (c1,c2) [Encrypted] ''' s = randrange...
# coding: utf-8 from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..utils import ( get_element_by_id, clean_html, ExtractorError, remove_start, ) class KuwoBaseIE(InfoExtractor): _FORMATS = [ {'format': 'ape', 'ext': 'ape', 'prefere...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import threading imp...
# 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...
"""MNE software for MEG and EEG data analysis.""" # PEP0440 compatible formatted version, see: # https://www.python.org/dev/peps/pep-0440/ # # Generic release markers: # X.Y # X.Y.Z # For bugfix releases # # Admissible pre-release markers: # X.YaN # Alpha release # X.YbN # Beta release # X.YrcN # Rele...
#! /usr/bin/env python # Copyright (c) 2009-2014, The Linux Foundation. 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 # ...
import os from setuptools import setup def read(*paths): """Build a file path from *paths* and return the contents.""" with open(os.path.join(*paths), 'r') as f: return f.read() setup( name='git-history', version='0.0.1', description='Keep a history of all your git commands.', long_...
''' Steps for problem.feature lettuce tests ''' # pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step from common import i_am_registered_for_the_course, visit_scenario_item from problems_setup import PROBLEM_DICT, answer_problem, problem_has_answer, add_problem_to_course def _view_problem(...
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ import cgi, os import framework.filters as filters from lib import jinja2 from framework.config import * from framework.log import log log.info("_________________________________________...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Cumulus Networks <[EMAIL]> # # This file is part of Ansible # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or ...
""" ============================ ``ctypes`` Utility Functions ============================ See Also --------- load_library : Load a C library. ndpointer : Array restype/argtype with verification. as_ctypes : Create a ctypes array from an ndarray. as_array : Create an ndarray from a ctypes array. References ----------...
from __future__ import absolute_import import errno import warnings import hmac from binascii import hexlify, unhexlify from hashlib import md5, sha1, sha256 from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning SSLContext = None HAS_SNI = False IS_PYOPENSSL = False # Maps the length of a d...