text
stringlengths
475
200k
#!/usr/bin/env python # Copyright 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. """A tool to generate symbols for a binary suitable for breakpad. Currently, the tool only supports Linux, Android, and Mac. Support f...
############################################################################## # # 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 GNU Affero General Publ...
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from pages.firefox.all import FirefoxAllPage @pytest.mark.smoke @pytest.mark.n...
import os import re import requests from urlparse import urlparse from time import time from httmock import urlmatch, HTTMock from django.test import RequestFactory from django.core.urlresolvers import reverse from django.core.validators import URLValidator from django.conf import settings from django.contrib.auth.mo...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, [EMAIL] # Gerhard Lausser, [EMAIL] # Gregory Starck, [EMAIL] # Hartmut Goebel, [EMAIL] # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
import re try: from scrapy.selector import Selector, XPathSelectorList except ImportError: # scrapy < 0.20 from scrapy.selector import XPathSelector as Selector, XPathSelectorList _UNSUPPORTED_XPATH_ENDING = re.compile(r'.*/((@)?([^/()]+)(\(\))?)$') class WebdriverXPathSelector(Selector): """Scrapy sel...
#!/usr/bin/env python """Implement access to the windows registry.""" import ctypes import ctypes.wintypes import exceptions import os import stat import StringIO import _winreg from grr.client import vfs from grr.lib import rdfvalue from grr.lib import utils # Difference between 1 Jan 1601 and 1 Jan 1970. WIN_UNI...
"""Test the SimplePooledPg module. Note: We don't test performance here, so the test does not predicate whether SimplePooledPg actually will help in improving performance or not. Copyright and credit info: * This test was contributed by Christoph Zwerschke """ import sys import unittest __version__ = '1.2' # Th...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies and contributors # For license information, please see license.txt from __future__ import unicode_literals import json import requests from six.moves.urllib.parse import urlencode import frappe from frappe.model.document import Document from frappe imp...
from __future__ import absolute_import, print_function from datetime import timedelta from django.conf import settings from django.db import models from django.utils import timezone from jsonfield import JSONField from sentry.db.models import FlexibleForeignKey, Model, sane_repr class AuthIdentity(Model): user ...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can b # found in the LICENSE file. """Enumerates the BoringSSL source in src/ and generates two gypi files: boringssl.gypi and boringssl_tests.gypi.""" import os import subprocess import sys...
##[Example scripts]=group ##Input_raster=raster ##Input_vector=vector ##Transform_vector_to_raster_CRS=boolean ##Output_table=output table import os from osgeo import gdal, ogr, osr from processing.core.TableWriter import TableWriter from processing.core.GeoAlgorithmExecutionException import \ GeoAlgorithmExec...
""" dyld emulation """ import os from ctypes.macholib.framework import framework_info from ctypes.macholib.dylib import dylib_info from itertools import * __all__ = [ 'dyld_find', 'framework_find', 'framework_info', 'dylib_info', ] # These are the defaults as per man dyld(1) # DEFAULT_FRAMEWORK_FALLBACK = [ ...
from multiprocessing import freeze_support from multiprocessing.managers import BaseManager, BaseProxy import operator ## class Foo: def f(self): print('you called Foo.f()') def g(self): print('you called Foo.g()') def _h(self): print('you called Foo._h()') # A simple generator fu...
import os from cobbler import autoinstallgen from cobbler import clogger from cobbler import utils from cobbler.cexceptions import CX TEMPLATING_ERROR = 1 KICKSTART_ERROR = 2 class AutoInstallationManager: """ Manage automatic installation templates, snippets and final files """ def __init__(self, ...
import builtins import sys import types import math import unittest from copy import deepcopy from test import support class OperatorsTest(unittest.TestCase): def __init__(self, *args, **kwargs): unittest.TestCase.__init__(self, *args, **kwargs) self.binops = { 'add': '+', ...
# Downloading Kepler light curves import os import pandas as pd import kplr import kepler_data as kd def get_lc(id, KPLR_DIR="/Users/ruthangus/.kplr/data/lightcurves"): """ Downloads the kplr light curve and loads x, y and yerr. """ kid = str(int(id)).zfill(9) path = os.path.join(KPLR_DIR, "{}...
""" ============================================ Scalability of Approximate Nearest Neighbors ============================================ This example studies the scalability profile of approximate 10-neighbors queries using the LSHForest with ``n_estimators=20`` and ``n_candidates=200`` when varying the number of sa...
# Generated by Django 2.2.5 on 2019-11-22 10:07 import common.fields.model from django.db import migrations, models import uuid class Migration(migrations.Migration): dependencies = [ ('terminal', '0015_auto_20190923_1529'), ] operations = [ migrations.CreateModel( name='Com...
#!/usr/bin/env python ''' Description: This is the handler for the Social Engineering Toolkit (SET) trying to overcome the limitations of set-automate ''' from framework.dependency_management.dependency_resolver import BaseComponent from framework.lib.general import * import time SCRIPT_DELAY = 2 class SpearPhishing...
#!/usr/bin/python # (c) 2016, Pierre Jodouin <[EMAIL]> # # 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 distr...
from .base import PairCountBase, verify_input_sources import numpy import logging class SurveyDataPairCount(PairCountBase): r""" Count (weighted) pairs of objects from a survey data catalog as a function of :math:`r`, :math:`(r,\mu)`, :math:`(r_p, \pi)`, or :math:`\theta` using the :mod:`Corrfunc` pac...
import btk import unittest import _TDDConfigure class AcquisitionUnitConverterTest(unittest.TestCase): def test_NoInputNoConversion(self): uc = btk.btkAcquisitionUnitConverter() uc.Update() output = uc.GetOutput() self.assertEqual(output.GetPointUnit(btk.btkPoint.Marker), 'mm') ...
from behave import when, then from code_generation import cd import fsm_designer.cli import os HERE = os.path.dirname(__file__) @given(u'two empty fsm designs') def step_impl(context): context.designA = os.path.join(HERE, 'X') context.designB = os.path.join(HERE, 'Y') @given(u'two simple fsm designs') def ...
# 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 time from telemetry.page.actions.javascript_click import ClickElementAction from telemetry.page.actions.loop import LoopAction from telemetry.page.ac...
#!/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. """Module that sanitizes source files with specified modifiers.""" import commands import os import sys _FILE_EXTENSIONS_TO_SAN...
#!/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...
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para videoweed # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re, urlparse, urllib, urllib2 import os from ...
# -*- coding: utf-8 -*- """ werkzeug.testsuite.cache ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the cache system :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import time import unittest import tempfile import shutil from werkzeug.testsuite import Werkzeug...
from .utils import NamespacedClient, query_params, _make_path, SKIP_IN_PATH class CatClient(NamespacedClient): @query_params('h', 'help', 'local', 'master_timeout', 'v') def aliases(self, name=None, params=None): """ `<http://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.ht...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2006,2008-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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 Fou...
# -*- 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 model 'WombatToken' db.create_table('wombat_authenticator_wombattoken', ( ('id', self.g...
from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) from django.shortcuts import render, redirect from .forms import UserLoginForm, UserRegisterForm def login_view(request): print(request.user.is_authenticated()) next = request.GET.get('next') title = "Log...
# (c) 2012-2014, Michael DeHaan <[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 later version. ...
""" Copyright (c) 2009, Alexey Smirnov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the f...
# -*- coding: utf-8 -*- # TAXIPP -- A French microsimulation model # By: IPP <[EMAIL]> # # Copyright (C) 2012, 2013, 2014, 2015 IPP # https://github.com/taxipp # # This file is part of TAXIPP. # # TAXIPP is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lice...
# Class decorator factory: apply any decorator to all methods of a class from types import FunctionType from decotools import tracer, timer def decorateAll(decorator): def DecoDecorate(aClass): for attr, attrval in aClass.__dict__.items(): if type(attrval) is FunctionType: ...
"""Garbage collection thread for representing zmq refcount of Python objects used in zero-copy sends. """ # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. import atexit import struct from os import getpid from collections import namedtuple from threading import Thread, Eve...
# # Copyright (c) 2013 Docker, 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 requir...
from selenium import webdriver import time import os from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains password = os.getenv('USERPWD') chrome_options = webdriver.ChromeOptions() #chrome_options.add_argument('--headless') #chrome_options.add_ar...
# Check the various features of the ShTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out # RUN: FileCheck < %t.out %s # # END. # CHECK: -- Testing: # CHECK: FAIL: shtest-format :: external_shell/fail.txt # CHECK-NEXT: *** TEST 'shtest-format :: external_shell/fail.txt' FAILED *** # CHECK: Comma...
"""Stuff to parse AIFF-C and AIFF files. Unless explicitly stated otherwise, the description below is true both for AIFF-C files and AIFF files. An AIFF-C file has the following structure. +-----------------+ | FORM | +-----------------+ | <size> | +----+------------+ | | AIFC ...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# -*- coding: utf-8 -*- """ werkzeug._internal ~~~~~~~~~~~~~~~~~~ This module provides internally used helpers and constants. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import string import inspect from weakre...
"""Helper to provide extensibility for pickle/cPickle. This is only useful to add pickle support for extension types defined in C, not for instances of user-defined classes. """ from types import ClassType as _ClassType __all__ = ["pickle", "constructor", "add_extension", "remove_extension", "clear_extens...
from django.conf import settings from django.db import DEFAULT_DB_ALIAS # function that will pass a test. def pass_test(*args): return def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: ...
import logging import sys import os import openerp from openerp import tools from openerp.modules import module _logger = logging.getLogger(__name__) commands = {} class CommandType(type): def __init__(cls, name, bases, attrs): super(CommandType, cls).__init__(name, bases, attrs) name = getattr(...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
# 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 op...
# 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...
from yowsup.structs import ProtocolEntity, ProtocolTreeNode from .presence import PresenceProtocolEntity class UnsubscribePresenceProtocolEntity(PresenceProtocolEntity): ''' <presence type="unsubscribe" to="jid"></presence> ''' def __init__(self, jid): super(UnsubscribePresenceProtocolEntity, ...
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Ogg Vorbis support. # # Copyright 2006 Joe Wreschnig # # 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. """Read and write Ogg Vorbis comments. This module handles Vorbis files wrapp...
import json from mock import patch from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse from django.core.management import call_command from django.contrib.auth.models import Group from django.contrib.auth import get_user_model from model_mommy ...
import agents as ag import envgui as gui # change this line ONLY to refer to your project import submissions.aardvark.vacuum2 as v2 # ______________________________________________________________________________ # Vacuum environment class Dirt(ag.Thing): pass class VacuumEnvironment(ag.XYEnvironment): """T...
#!/usr/bin/python # # Copyright (c) 2017 Julien Stroheker, <[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', '...
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2013 Alessio Ababilov # Copyright 2013 Grid Dynamics # Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you ...
# encoding: utf-8 """ Image part objects, including Image """ import hashlib import os import posixpath try: from PIL import Image as PIL_Image except ImportError: import Image as PIL_Image from StringIO import StringIO from pptx.opc.package import Part from pptx.opc.packuri import PackURI from pptx.opc.sp...
""" This module is intended for solving recurrences or, in other words, difference equations. Currently supported are linear, inhomogeneous equations with polynomial or rational coefficients. The solutions are obtained among polynomials, rational functions, hypergeometric terms, or combinations of hypergeometric term ...
# -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
# 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 unittest from telemetry.unittest import simple_mock from telemetry.core.backends.chrome import inspector_websocket from telemetry.core.backends.chrom...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, [EMAIL] # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAssembleWorksh...
# Copyright 2015 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 agreed ...
""" Test for assert_deallocated context manager and gc utilities """ import gc from scipy._lib._gcutils import set_gc_state, gc_state, assert_deallocated, ReferenceError from nose.tools import assert_equal, raises def test_set_gc_state(): gc_status = gc.isenabled() try: for state in (True, False): ...
#!/usr/bin/env python # -*- coding:utf-8 -*- from ..units.general import Velocity, Time, Distance from ..data.constants import LIGHT_VELOCITY from ..movement import Movement from ..relativity import contraction_factor, lorentz_factor, time_dilation, \ length_contraction, RelativistMovement import pytest class T...
import numpy as np import catmap from .parser_base import * string2symbols = catmap.string2symbols Template = catmap.Template class TableParser(ParserBase): """Parses attributes based on column headers and filters. Additional functionality may be added by inheriting and defining the parse_{header_name...
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License from __future__ import print_function from sklearn.linear_model import LinearRegression from load_ml100...
#!/usr/bin/env python ''' Image Embedding Extension for Python-Markdown ====================================== Converts lone links to embedded images, provided the file extension is allowed. Ex: http://www.ericfehse.net/media/img/ef/blog/django-pony.jpg becomes <img src="http://www.ericfehse.net/media/img...
import requests from cloudbot import hook max_length = 100 def goog_trans(api_key, text, source, target): url = 'https://www.googleapis.com/language/translate/v2' if len(text) > max_length: return "This command only supports input of less then 100 characters." params = { 'q': text, ...
""" Python Character Mapping Codec for CP1125 """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): return codecs.charmap_decode(input,errors,deco...
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <[EMAIL]> * # * * # * This program is free software; you can redistribute it and/or modify...
#!/usr/bin/env python #-*- coding:utf-8 -*- import logging from pyparsing import * from miasm2.expression.expression import * from miasm2.core.cpu import * from collections import defaultdict from miasm2.core.bin_stream import bin_stream import miasm2.arch.arm.regs as regs_module from miasm2.arch.arm.regs import * fro...
from configurations import Configuration, values import redis class Common(Configuration): REDIS_HOST = 'redis' REDIS_PORT = 6379 REDIS_DB = 0 LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format' : "[%...
import os import sys import logging import kfp import fire logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) class MyCLI: """ CLI for Kubeflow Pipelines. This CLI allows us to compile and run our pipelines in Kubeflow Pipelines without accessing Kubeflow portal. """ ...
# -*- coding: utf-8 -*- # # SelfTest/Random/OSRNG/__init__.py: Self-test for OSRNG modules # # 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 ...
# 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 json import logging import posixpath import re from compiled_file_system import Cache from extensions_paths import EXAMPLES from samples_data_source ...
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : [EMAIL] **...
""" A number of function that enhance IDLE on MacOSX when it used as a normal GUI application (as opposed to an X11 application). """ import sys import Tkinter from os import path _appbundle = None def runningAsOSXApp(): """ Returns True if Python is running from within an app on OSX. If so, assume that ...
# Copyright 2018 Google LLC. 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...
# pylint: disable=C0111 # pylint: disable=W0621 from lettuce import world, step from nose.tools import assert_true, assert_equal # pylint: disable=E0611 from terrain.steps import reload_the_page from selenium.common.exceptions import StaleElementReferenceException ############### ACTIONS #################### @step(...
#! /usr/bin/env python assert __name__ == "__main__" import sys from macro import Macro, writeFile tmpl = """\ @node %(name)s @unnumberedsec %(name)s @majorheading Synopsis %(synopsis)s @majorheading Description %(description)s @majorheading Source Code Download the @uref{http://git.savannah.gnu.org/gitweb/?p=...
# declare file encoding # -*- coding: utf-8 -*- # Copyright (C) 2014 Lamkin666 # # 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, or (at your option) # any later version. ...
""" This program accumulates by month the maximum high temperature, the minimum high temperature, the number of days and the accumulated high temperatures. The latter two are used to calculate the average high temperature for the month. """ monlst = [] for i in range(12): monlst.append([0, 0, 0, 200]) # sublist[Da...
"""functions related to animation""" import pymel.util as _util import pymel.internal.factories as _factories import general as _general import pymel.internal.pmcmds as cmds def currentTime( *args, **kwargs ): """ Modifications: - if no args are provided, the command returns the current time """ if ...
import csv import os import copy import re from decimal import Decimal from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse, FormRequest from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from scrapy.http.c...
""" platformer.py Author: Matthew F Credit: Robbie Assignment: Write and submit a program that implements the sandbox platformer game: https://github.com/HHS-IntroProgramming/Platformer Platformer.listenKeyEvent("keydown", "s", self.SPRING) Platformer.listenKeyEvent("keyup", "s", self.SPRINGoff) ...
########################################################################### # Copyright (c) 2011-2014 Unixmedia S.r.l. <[EMAIL]> # Copyright (c) 2011-2014 Franco (nextime) Lanza <[EMAIL]> # # Domotika System Controller Daemon "domotikad" [http://trac.unixmedia.it] # # This file is part of domotikad. # # domotikad is f...
# -*- 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...
from tests.config import base_folder, base_url from core.generate import generate, save_generated from core.channels.channel import Channel from unittest import TestCase import subprocess import utils import random import hashlib import os def setUpModule(): subprocess.check_output(""" BASE_FOLDER="{base_folder}/g...
import fs.osfs import os, os.path from capa.capa_problem import LoncapaProblem from mock import Mock, MagicMock import xml.sax.saxutils as saxutils TEST_DIR = os.path.dirname(os.path.realpath(__file__)) def tst_render_template(template, context): """ A test version of render to template. Renders to the re...
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <[EMAIL]> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as ...
# -*- coding: utf-8 -*- from __future__ import absolute_import,print_function import os import sys import code import warnings import string import inspect import argparse from flask import _request_ctx_stack from .cli import prompt, prompt_pass, prompt_bool, prompt_choices from ._compat import izip, text_type cl...
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK throughput. # # REDHAWK throughput is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published ...
import django.dispatch #: Sent after ensuring that the cart and order are valid. #: #: :param sender: The controller which performed the sanity check. #: :type sender: ``payment.views.confirm.ConfirmController`` #: #: :param controller: The controller which performed the sanity check. #: :type controller: ``payment.vi...
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard: # This context manager registers itself in the current iterators of the # weak container, such ...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..aes import aes_cbc_decrypt from ..compat import ( compat_b64decode, compat_ord, compat_str, ) from ..utils import ( bytes_to_intlist, ExtractorError, intlist_to_bytes, int_or_none, ...
# 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 ...
import os import subprocess # hardcoded paths HUNTER_DIR='..' PACKAGES_DIR=os.path.join(HUNTER_DIR, 'cmake/projects') DOCS_PKG_DIR=os.path.join(HUNTER_DIR, 'docs', 'packages', 'pkg') # get all wiki entries docs_filenames = [x for x in os.listdir(DOCS_PKG_DIR) if x.endswith('.rst')] docs_entries = [x[:-4] for x in doc...