text
stringlengths
475
200k
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of splitsecond. # https://github.com/globocom/splitsecond # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2015, Bernardo Heynemann <[EMAIL]> from splitsecond.utils import logger from functools import ...
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Results of coverage measurement.""" import collections from coverage.backward import iitems from coverage.misc import format_lines, SimpleRepr class Analysis...
__all__ = ['column_stack','row_stack', 'dstack','array_split','split','hsplit', 'vsplit','dsplit','apply_over_axes','expand_dims', 'apply_along_axis', 'kron', 'tile', 'get_array_wrap'] import numpy.core.numeric as _nx from numpy.core.numeric import asarray, zeros, newaxis, outer, \ concatena...
# -*- coding: utf-8 -*- import json from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """ Bootstraps the HTML view template with some default configura...
# 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...
""" Helper functions for creating Form classes from Django models and database field objects. """ from django.db import connections from django.utils.encoding import smart_unicode, force_unicode from django.utils.datastructures import SortedDict from django.utils.text import get_text_list, capfirst from django.utils.t...
#!/usr/bin/env python # # DocBeauty (c) 2003, 2004, 2008 David Turner <[EMAIL]> # # This program is used to beautify the documentation comments used # in the FreeType 2 public headers. # from sources import * from content import * from utils import * import utils import sys, os, time, string, getopt content_pro...
# Copyright (C) 2002-2007 Python Software Foundation # Contact: [EMAIL] """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time, calendar SPACE = ' ' EMPTYSTRING = '' CO...
import os import re import ast import time import logging from autotest.client.shared import error from autotest.client import utils from virttest import aexpect from virttest import remote from virttest import virt_vm from virttest import virsh from virttest import utils_net from virttest import utils_misc from virtte...
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2 import nod...
from mock import Mock from ceph_deploy import install class TestSanitizeArgs(object): def setup(self): self.args = Mock() # set the default behavior we set in cli.py self.args.default_release = False self.args.stable = None def test_args_release_not_specified(self): ...
import copy import numpy from nupic.support.configuration import Configuration from nupic.frameworks.opf.exceptions import (CLAModelInvalidRangeError, CLAModelInvalidArgument) class _CLAClassificationRecord(object): """ A single record to store data associated with a...
import glob import os import sys import re import matplotlib import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import numpy as np import python.DataIO as DataIO import python.graphics as graphics import python.clusters as clusters import python.counts as counts # Format settings from matplotlib i...
from stockpile import conf from django.test import TestCase from .models import Account, DummyInfo import logging log = logging.getLogger(__name__) class StockpileTest(TestCase): def setUp(self): # Don't use a fixture for caching reasons a1 = Account.objects.create(id=1, name='dummy_name_1')...
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['deprecated']...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint, flt, cstr from webnotes import msgprint, _ import webnotes.defaults from controllers.accounts_contr...
#!/usr/bin/python # encoding: utf-8 # (c) 2015, Jose Armesto <[EMAIL]> # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
import sys import numpy as np import discopy as dp def remap(d1, d2): z = d2.Z r = d2.R nq = d1.numQ prim = [] for k in range(d2.numZ): sheet = [] for j in range(d2.numR): sheet.append(np.empty((d2.numPhi[k,j], nq),np.float)) prim.append(sheet) for k in ra...
# -*- 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...
# $HeadURL$ __RCSID__ = "$Id$" import base64 from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Utilities import DEncode gForceRawEncoding = False try: import zlib gZCompressionEnabled = True except ImportError, x: gZCompressionEnabled = False def codeRequestInFileId( plotRequest, compressIfPossible = T...
from __future__ import absolute_import from pychron.core.ui import set_qt set_qt() from pychron.pyscripts.hops_editor import Position, Hop, HopSequence __author__ = 'ross' import unittest class PositionTestCase(unittest.TestCase): def test_to_string_no_deflection(self): p = Position(detector='H1', iso...
# -*- 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...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing utilities for apk packages.""" import re from devil.android.sdk import aapt _MANIFEST_ATTRIBUTE_RE = re.compile( r'\s*A: ([^...
from __future__ import absolute_import from datetime import date from django.db.models.sql.query import InvalidQuery from django.test import TestCase from .models import Author, Book, Coffee, Reviewer, FriendlyAuthor class RawQueryTests(TestCase): fixtures = ['raw_query_books.json'] def assertSuccessfulRa...
# # (C) Copyright 2011 Jacek Konieczny <[EMAIL]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WI...
# -*- coding: utf-8 -*- """ patchlevel.py ~~~~~~~~~~~~~ Extract version info from Include/patchlevel.h. Adapted from Doc/tools/getversioninfo. :copyright: 2007-2008 by Georg Brandl. :license: Python license. """ import os import re import sys def get_header_version_info(srcdir): patchlev...
# -*- coding: utf-8 -*- """ Kanevsky all minimum node k cutsets algorithm. """ import copy from collections import defaultdict from itertools import combinations from operator import itemgetter import networkx as nx from .utils import build_auxiliary_node_connectivity from networkx.algorithms.flow import ( build_r...
# 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...
#!/usr/bin/python2.5 # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozil...
######################################################################## # Copyright (c) 2000, BeOpen.com. # Copyright (c) 1995-2000, Corporation for National Research Initiatives. # Copyright (c) 1990-1995, Stichting Mathematisch Centrum. # All rights reserved. # # See the file "Misc/COPYRIGHT" for information on usag...
# Copyright (c) 2010 Howard Hughes Medical Institute. # All rights reserved. # Use is subject to Janelia Farm Research Campus Software Copyright 1.1 license terms. # http://license.janelia.org/license/jfrc_copyright_1_1.html import neuroptikon import osgUtil import os from neuro_object import NeuroObject class A...
# """ This is a utility to 'can' the widths data for certain CID fonts. Now we're using Unicode, we don't need 20 CMAP files for each Asian language, nor the widths of the non-normal characters encoded in each font. we just want a dictionary of the character widths in a given font which are NOT 1000 ems wide, keyed on...
import li_std_pair_extra p = (1, 2) p1 = li_std_pair_extra.p_inout(p) p2 = li_std_pair_extra.p_inoutd(p1) d1 = li_std_pair_extra.d_inout(2) i, d2 = li_std_pair_extra.d_inout2(2) i, p = li_std_pair_extra.p_inout2(p) p3, p4 = li_std_pair_extra.p_inout3(p1, p1) psi = li_std_pair_extra.SIPair("hello", 1) pci = li_std_...
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
import unittest from Cython.Compiler.Visitor import PrintTree from Cython.TestUtils import TransformTest from Cython.Compiler.TreePath import find_first, find_all from Cython.Compiler import Nodes, ExprNodes class TestTreePath(TransformTest): _tree = None def _build_tree(self): if self._tree is None: ...
# Copyright (c) 2017 Ultimaker B.V. # PluginBrowser is released under the terms of the AGPLv3 or higher. from UM.Extension import Extension from UM.i18n import i18nCatalog from UM.Logger import Logger from UM.Qt.ListModel import ListModel from UM.PluginRegistry import PluginRegistry from UM.Application import Applicati...
#!/usr/bin/env python import os import sys from setuptools import setup ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) requirements = [ 'requests >= 2.5.2, < 2.11', 'six >= 1.4.0', 'websocket-client >= 0.32.0', ] if sys.platform == 'win32': requirements.append('pypiwin32 >...
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.grant_types ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import unicode_literals, absolute_import import json import logging from .base import GrantTypeBase from .. import errors from ..request_validator import RequestValidator log = logging.getLogger(_...
from __future__ import unicode_literals import datetime import unittest from django.test.utils import requires_tz_support from django.utils import timezone from django.utils.timesince import timesince, timeuntil class TimesinceTests(unittest.TestCase): def setUp(self): self.t = datetime.datetime(2007, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Slightly based on AboutModules in the Ruby Koans # from runner.koan import * class AboutMultipleInheritance(Koan): class Nameable: def __init__(self): self._name = None def set_name(self, new_name): self._name = new_name ...
""" :copyright: (c) 2010 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ import datetime import sys from django.conf import settings from django.contrib.auth.models import User, AnonymousUser from django.core.cache import cache from django.core.management.base import CommandError from django.c...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import qualities class UnistraIE(InfoExtractor): _VALID_URL = r'http://utv\.unistra\.fr/(?:index|video)\.php\?id_video\=(?P<id>\d+)' _TESTS = [ { 'url': 'http://utv.unistra.fr/video.php?id_v...
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2019 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
from django.conf import settings from django.contrib.sites.managers import CurrentSiteManager from django.contrib.sites.models import Site from django.core import checks from django.db import models from django.test import SimpleTestCase, TestCase from django.test.utils import isolate_apps from .models import CustomAr...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_more_cookiecutters ----------------------- Test formerly known from a unittest residing in test_examples.py named TestGitBranch.test_branch TestExamplesRepoArg.test_cookiecutter_pypackage_git """ from __future__ import unicode_literals import os import subproces...
""" Utilities for dealing with Javascript and JSON. """ import json from django.utils.html import escapejs from mako.filters import decode from xmodule.modulestore import EdxJSONEncoder def _escape_json_for_js(json_dumps_string): """ Escape output of JSON dumps that is safe to be embedded in a <SCRIPT> tag....
""" Models can have a ``managed`` attribute, which specifies whether the SQL code is generated for the table on various manage.py operations. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible # All of these models are created in the database by Django. @python_2_unicode_...
""" The `compat` module provides support for backwards compatibility with older versions of django/python, and compatibility wrappers around optional packages. """ # flake8: noqa from __future__ import unicode_literals import django import inspect from django.core.exceptions import ImproperlyConfigured from django.co...
"""Test the minimum spanning tree function""" from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import assert_ import numpy.testing as npt from scipy.sparse import csr_matrix from scipy.sparse.csgraph import minimum_spanning_tree def test_minimum_spanning_tree(): ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Check for stylistic and formal issues in .rst and .py # files included in the documentation. # # 01/2009, Georg Brandl # TODO: - wrong versions in versionadded/changed # - wrong markup after versionchanged directive import os import re import sys import getopt f...
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Get-NetLocalGroup', 'Author': ['@harmj0y'], 'Description': ('Returns a list of all current users in a specified local group ' 'on ...
import copy from botocore.args import ClientArgsCreator import botocore.serialize import botocore.parsers from .config import AioConfig from .endpoint import AioEndpointCreator from .signers import AioRequestSigner class AioClientArgsCreator(ClientArgsCreator): # NOTE: we override this so we can pull out the cu...
import chainer def depthwise_convolution_2d(x, W, b=None, stride=1, pad=0): """Two-dimensional depthwise convolution function. This is an implementation of two-dimensional depthwise convolution. It takes two or three variables: the input image ``x``, the filter weight ``W``, and optionally, the bias ...
# 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...
from .utils import xpath from openstates.scrape import Scraper, Organization import lxml.etree class WACommitteeScraper(Scraper): _base_url = "http://wslwebservices.leg.wa.gov/CommitteeService.asmx" def scrape(self, chamber=None, session=None): if not session: session = self.latest_sess...
# -*- 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): db.rename_table('user_api_usercoursetags', 'user_api_usercoursetag') def backwards(self, orm): db.rena...
""" python wrapper for Autodesk Revit Server This is a python module for interacting with Autodesk Revit Server using its RESTful API. This module requires 'requests' module for handling http requests to the Revit Server. Module Files: exceptions.py: Defines module exceptions and custom exceptions for ...
# ----------------------------------------------------------------------------- # yacc_literal.py # # Grammar with bad literal characters # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2011 Nicolas Wack <[EMAIL]> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free Software ...
"""Tests for methods defined in util/misc.py""" from xmodule.util.misc import escape_html_characters from unittest import TestCase class UtilHtmlEscapeTests(TestCase): """ Tests for methods exposed in util/misc """ final_content = " This is a paragraph. " def test_escape_html_comments(self): ...
''' Parallel Command @author: Kay Kasemir ''' from scan.commands import Command try: import xml.etree.cElementTree as ET except: import xml.etree.ElementTree as ET class Parallel(Command): """Perform multiple commands in parallel. Each of the commands performed in parallel may await callback ...
# -*- 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...
#!/usr/bin/env python # This module reads data from a FieldTrip buffer and writes it to an audio device # # This software is part of the EEGsynth project, see <https://github.com/eegsynth/eegsynth>. # # Copyright (C) 2018-2020 EEGsynth project # # This program is free software: you can redistribute it and/or modify # ...
#!/usr/bin/python """ansible module for ec2 ami copy to all regions""" # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 DOCUMENTATION = ''' --- module: aos_ami_copy_to_regions short_description: this module copies an ami out to all regions description: - this module accepts an ami id and copies it to al...
#!/usr/bin/env python import string from AOR.BasicStatement import BasicNamedStatement, BasicStatement from AOR.DoubleList import DoubleList class Select(BasicNamedStatement): # Stores a select statement # # sLabel -- Label of the select statement (this is NOT the label # used in t...
# runs all the GUIedit charts in this directory - # makes a PDF sample for eaxh existing chart type import sys import glob import inspect import types def moduleClasses(mod): def P(obj, m=mod.__name__, CT=type): return (type(obj)==CT and obj.__module__==m) try: return inspect.getmembers(mod, P)...
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para tumi.tv # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import urllib from core import scrapertools from c...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Snapshot Build Bisect Tool This script bisects a snapshot archive using binary search. It starts at a bad revision (it will try...
# Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. import zeroinstall import os from zeroinstall import _ from zeroinstall.support import tasks, unicode from zeroinstall.injector.model import Interface, Feed, stable, testing, developer, stability_levels from zeroinsta...
from __future__ import unicode_literals import json import warnings from django.db import models from django.utils import six from django.utils.deconstruct import deconstructible from django.utils.deprecation import RemovedInDjango110Warning from django.utils.encoding import force_text, python_2_unicode_compatible #...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi. Copyright Camptocamp SA # Financial contributors: Hasa SA, Open Net SA, # Prisme Solutions Informatique SA, Quod SA # # Translation contributors: brain-te...
# 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...
#!/usr/bin/env python # # Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
"""This module is part of Swampy, a suite of programs available from allendowney.com/swampy. Copyright 2010 Allen B. Downey Distributed under the GNU General Public License at gnu.org/licenses/gpl.html. """ from Tkinter import TOP, BOTTOM, LEFT, RIGHT, END, LAST, NONE, SUNKEN from Gui import Callable from World impo...
import json from django.conf import settings from django.contrib.messages.storage.base import BaseStorage from django.contrib.messages.storage.cookie import ( MessageDecoder, MessageEncoder, ) from django.utils import six class SessionStorage(BaseStorage): """ Stores messages in the session (that is, dja...
# -*- coding: utf-8 -*- # Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # Copyright (c) 2011, Nexenta Systems, Inc. # Copyright (c) 2012, Google, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of t...
# -*- coding: utf-8 -*- """Manage background (threaded) jobs conveniently from an interactive shell. This module provides a BackgroundJobManager class. This is the main class meant for public usage, it implements an object which can create and manage new background jobs. It also provides the actual job classes manag...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
from django.db.models import Aggregate from django.contrib.gis.db.backend import SpatialBackend from django.contrib.gis.db.models.sql import GeomField class GeoAggregate(Aggregate): def add_to_query(self, query, alias, col, source, is_summary): if hasattr(source, '_geom'): # Doing additional s...
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutSets(Koan): def test_sets_make_keep_lists_unique(self): highlanders = ['MacLeod', 'Ramirez', 'MacLeod', 'Matunas', 'MacLeod', 'Malcolm', 'MacLeod'] there_can_only_be_only_one = set(highlanders) ...
# -*- coding: utf-8 -*- # # This file is part of Invenio Demosite. # Copyright (C) 2011, 2012 CERN. # # Invenio Demosite 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 (a...
""" Django settings for mainsite project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from django.core.urlresolvers import reverse_lazy from os.path import dirn...
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=unused-argument import mock from pyfakefs import fake_filesystem_unittest from py_utils import cloud_storage import dependency_manager f...
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) response.headers.set("Content...
#!/usr/bin/python # # Copyright (c) 2017 Yuwei Zhou, <[EMAIL]> # # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'statu...
#!/usr/bin/env python import sys import signal from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtWebKit import QWebPage def save_webpage_screenshot(url, width, height, file_name = None): """Saves a screenshot of the webpage given in url into filename+".png" width and height, if given, ar...
""" Get different statistics about the underlying index in a collection """ from future.utils import iteritems from solrcloudpy.utils import _Request, SolrResult class SolrIndexStats(object): """ Get different statistics about the underlying index in a collection """ def __init__(self, connection, nam...
from django import forms from django.utils.translation import ugettext_lazy as _ # Stop Words courtesy of: # http://www.dcs.gla.ac.uk/idom/ir_resources/linguistic_utils/stop_words STOP_WORDS = r"""\b(a|about|above|across|after|afterwards|again| against|all|almost|alone|along|already|also|although|always|am| among|am...
# Copyright (c) 2010 Philip Taylor # Released under the BSD license and W3C Test Suite License: see LICENSE.txt # Current code status: # # This was originally written for use at # http://philip.html5.org/tests/canvas/suite/tests/ # # It has been adapted for use with the Web Platform Test Suite suite at # https://githu...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Marta Vázquez Rodríguez$ <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the te...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Xcode supports build variable substitutions and CPP; sadly, that doesn't work # because: # # 1. Xcode wants to do the Info.pli...
## # Copyright 2009-2021 Ghent University # # This file is part of EasyBuild, # 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://www.vscentrum.be), # Flemish Research Foundation (F...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import contextlib import json import logging import re import urllib2 from telemetry.core import util from telemetry.core.backends.chrome import chrome_brow...
""" RadioRecord Top Hits Downloader """ from setuptools import find_packages, setup dependencies = ['click==6.6', 'aiohttp==0.22.5', 'lxml==3.6.1'] setup( name='rrtop100', version='0.1.0', url='https://github.com/kidig/rrtop100', license='BSD', author='Dmitrii Gerasimenko', author_email='[EMAI...
""" Tests to verify that CorrectMap behaves correctly """ import unittest from capa.correctmap import CorrectMap import datetime class CorrectMapTest(unittest.TestCase): """ Tests to verify that CorrectMap behaves correctly """ def setUp(self): self.cmap = CorrectMap() def test_set_inpu...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Sebastien Rohaut <[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, o...
# 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 use ...
# The MIT License. # Copyright (C) 2017 The Future Shell , DeathSec. # # @filename : InstagramPySession.py # @description : creates a new session , checks for configuration and gets critical data # , loads save and saves data too. import json import os import uuid import hashlib import requests from s...