text
stringlengths
475
200k
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
# -*- coding: utf-8 -*- # # privacyIDEA # Jul 18, 2014 Cornelius Kölbel # License: AGPLv3 # contact: http://www.privacyidea.org # # This code is free software; you can redistribute it and/or # modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE # License as published by the Free Software Foundation...
page_footer = """ <footer>Happy Hunting </footer> <div id="hashModal" class="modal"> <div class="modal-content"> <div class="modal-header"> <span class="close">&times;</span> <h2>Captured Hashes</h2> </div> <div class="modal-body"> <p id='dumped_hashes'></p> </div> <div class="...
"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" __revision__ = "$Id$" from distutils.core import Command # XXX force is never used class install_headers(Command): description = "install C/C++ header file...
# coding=utf-8 # Copyright 2020 The TF-Agents Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import division, absolute_import import sys import traceback from zope.interface import implementer from twisted.python.failure import Failure from twisted.trial.unittest import SynchronousTestCase, PyUnitResultAdapter from twis...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ From KERAS package Fairly basic set of tools for real-time data augmentation on image data. Can easily be extended to include new transformations, new preprocessing methods, etc... """ from functools import partial import multiprocessing.pool import numpy as np import...
""" This module exports routines of PHCpack to manipulate positive dimensional solution sets of polynomial systems. """ def standard_embed(nvar, topdim, pols): """ Given in pols a list of strings representing polynomials in nvar variables, with coefficients in standard double precision, this function r...
""" This module provides some useful functions for working with scrapy.http.Response objects """ import os import weakref import webbrowser import tempfile from twisted.web import http from scrapy.utils.python import to_bytes, to_native_str from w3lib import html from scrapy.utils.decorators import deprecated @depr...
# 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.apache.org/licenses/LICENSE-2.0 # # Unless req...
import os import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from ..test_data import TEST_DATA, TestDS, get_ds_file if HAS_GDAL: from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, GDALException, OGRIndexError, GDAL_VERSION from django.contrib.gis....
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # l10n_pl module improved for Poland # by Grzegorz Grzelak [EMAIL] # ...
# -*- coding: utf-8 -*- import unittest def memoize(f): result = {} def wrapped(*args, **kwargs): cache_key = tuple(args) if not result: result[cache_key] = f(*args, **kwargs) return result[cache_key] return wrapped @memoize def parse_layers_props(yaml_path): f...
""" Module for performing checks on a Kibana logging deployment """ import json import ssl # pylint can't find the package when its installed in virtualenv # pylint: disable=import-error,no-name-in-module from ansible.module_utils.six.moves.urllib import request # pylint: disable=import-error,no-name-in-module from a...
# (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. ...
from __future__ import unicode_literals from django import http from django.apps import apps from django.contrib.contenttypes.models import ContentType from django.contrib.sites.requests import RequestSite from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import ugettext as _ def sh...
menu = { "title": "Main menu", "content": [ { "title": "I've been raped / sexually abused what do I do now?", "content": [ { "title": "Important Information", "content": [ "Make sure that you are safe...
# -*- 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 'SuccessNotification' db.create_table('robokassa_successnotification', ( ('id', s...
#!/bin/sh # -*- mode: Python -*- # 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....
""" Tests for wiki permissions """ from django.contrib.auth.models import Group from nose.plugins.attrib import attr from student.tests.factories import UserFactory from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from courseware.test...
import yaml import pprint import sys def _load_code(expression): return eval(expression) def myconstructor1(constructor, tag, node): seq = constructor.construct_sequence(node) return {tag: seq } def myconstructor2(constructor, tag, node): seq = constructor.construct_sequence(node) string = '' ...
import pyparsing as pp def jsParse(inStr): # This disaster is a context-free grammar parser for parsing javascript object literals. # It needs to be able to handle a lot of the definitional messes you find in in-the-wild # javascript object literals. # Unfortunately, Javascript is /way/ more tolerant then JSON w...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
#!/usr/bin/env python # Usage: progname <directory> # # This program scans <directory> and generates C code on its stdout # that contains an array of psf_entry structures, one for each file # in <directory>. This code may be used to instantiate a file in procfs # whose contents is identical to each file in <directory...
# Copyright (c) Mathias Kaerlev 2011-2012. # This file is part of pyspades. # pyspades 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...
""" Constants used throughout the cea.technologies package. History lesson: This is a first step at removing the `cea.globalvars.GlobalVariables` object. """ # Heat Exchangers U_COOL = 2500.0 # W/m2K U_HEAT = 2500.0 # W/m2K DT_HEAT = 5.0 # K - pinch delta at design conditions DT_COOL = 2.0 # K - pinch del...
#!/usr/bin/python # -*- 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that app bundles are built correctly. """ import TestGyp import os import plistlib import subprocess import sys def GetStdou...
#!/usr/bin/env python # Copyright (C) 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 ...
# -*- coding: utf-8 -*- # Copyright (c) 2014, Brandon Nielsen # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE file for details. import unittest import datetime from aniso8601.time import get_time_resolution, parse_time, parse_datetime, \...
# OpenEmbedded sitecustomize.py (C) 2002-2008 Michael 'Mickey' Lauer <[EMAIL]> # GPLv2 or later # Version: 20081123 # Features: # * set proper default encoding # * enable readline completion in the interactive interpreter # * load command line history on startup # * save command line history on exit import os def __...
""" TIFF image parser. Authors: Victor Stinner, Sebastien Ponce, Robert Xiao Creation date: 30 september 2006 """ from hachoir_parser import Parser from hachoir_core.field import FieldSet, SeekableFieldSet, RootSeekableFieldSet, Bytes from hachoir_core.endian import LITTLE_ENDIAN, BIG_ENDIAN from hachoir_parser.image...
import inspect import time from flask import jsonify, request from engine.controllers.eval_controller import EvalController from engine.services.csv.eval import eval_to_csv from engine.services.db.eval import insert_eval_result from . import api @api.route('/create_domains', methods=['GET']) def create_domains(): ...
import pandas as pd #Enumerate colors. class COLOR: RED = "tomato" GREEN = "yellowgreen" BLUE = "lightblue" NEWLINE_INDENT = "\n " def fill(color): return f"[style=filled fillcolor=\"{color}\"]" def dual_label(weapon, n): return f"[label=\"{weapon}\" taillabel=\"{n}\"]" def solo_node(player, color): return f...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
#!/usr/bin/python # # This tools exploits the data of csv files produced by script collect-ce-job-status.py, to # compute the number of CEs grouped by slice of ratio R/(R+W) as a function of time: # between 0 and 0,5, and between 0,5 and 1, exactly 1 or not calculable. # # Results are stored in file running_ratio_slic...
from django.core import validators from django.core.exceptions import ValidationError from django.contrib.auth.models import User from django.db import models from contactboard.models import Alumne class Profile(models.Model): class Meta: verbose_name = 'perfil' ordering = ['alumne'] user = m...
# -*- coding: utf-8 -*- from django.forms import TextInput, Media, TextInput, CharField, Form, MultiWidget from django.template import Template, Context from django.test import TestCase from django.test.utils import override_settings @override_settings( STATIC_URL=None, MEDIA_URL='http://media.example.com/med...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <[EMAIL]>' # ----- Imports --------------------------------------------------------------- from tinyAPI.base.services.geo.api.CountryCode import CountryCode import tinyAPI import unittest # ----- Tests ---...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Darryl Stoflet <[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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Daniel Korn <[EMAIL]> # (c) 2017, Yaacov Zamir <[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 = { 'm...
# 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...
"""Script to install/uninstall HA into OS X.""" import os import time # mypy: allow-untyped-calls, allow-untyped-defs def install_osx(): """Set up to run via launchd on OS X.""" with os.popen("which hass") as inp: hass_path = inp.read().strip() with os.popen("whoami") as inp: user = inp....
""" Utilities for fast persistence of big data, with optional compression. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2009 Gael Varoquaux # License: BSD Style, 3 clauses. import pickle import traceback import sys import os import zlib import warnings from ._compat import ...
# Copyright 2014-2015, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Handles making requests and formatting the responses. """ import code import socket import stem import stem.control import stem.descriptor.remote import stem.interpreter.help import stem.util.connection import stem....
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, json from frappe import _, throw, msgprint from frappe.utils import cstr, nowdate from frappe.model.document import Document class SMS...
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', ...
#!/usr/bin/env python # # Copyright 2008, 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...
# -*- mode: 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 distr...
######################## # Prelude to the example ######################## """ This example is realized with a DP-VBGMM model The other mixtures and the K-means are working in the same way The available classes are: - Kmeans (kmeans) - GaussianMixture (GMM) - VariationalGaussianMixture (VBGMM) - DPVariation...
""" .. _tut_compute_covariance: Computing a covariance matrix ============================= Many methods in MNE, including source estimation and some classification algorithms, require covariance estimations from the recordings. In this tutorial we cover the basics of sensor covariance computations and construct a no...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
""" Views for hint management. Get to these views through courseurl/hint_manager. For example: https://courses.edx.org/courses/MITx/2.01x/2013_Spring/hint_manager These views will only be visible if FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True """ import json import re from django.http import HttpResponse, Http...
from __future__ import division from collections import Counter import math, random, csv, json from bs4 import BeautifulSoup import requests ###### # # BOOKS ABOUT DATA # ###### def is_video(td): """it's a video if it has exactly one pricelabel, and if the stripped text inside that pricelabel starts with 'Vi...
#!/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 distribut...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
# Publications are stored actions which are taken when a feed is created, updated, deleted, or there is a matching percolator query. # # topic_id - The key for the parent topic # id - The identifier of the publication class Publication(): def __init__(self, topic_id, id, client): self.topic_id = topic_id self.id ...
"""Sort performance test. See main() for command line syntax. See tabulate() for output format. """ import sys import time import random import marshal import tempfile import os td = tempfile.gettempdir() def randfloats(n): """Return a list of n random floats in [0, 1).""" # Generating floats is expensive,...
from __future__ import absolute_import # Avoid importing `importlib` from this package. import copy from importlib import import_module import os import sys import warnings from django.core.exceptions import ImproperlyConfigured from django.utils import six from django.utils.deprecation import RemovedInDjango19Warni...
import os import textwrap from xml.etree import ElementTree from fontTools.ttLib import TTFont, newTable from fontTools.misc.psCharStrings import T2CharString from fontTools.ttLib.tables.otTables import GSUB,\ ScriptList, ScriptRecord, Script, DefaultLangSys,\ FeatureList, FeatureRecord, Feature,\ LookupLi...
import unittest from django.utils import html class TestUtilsHtml(unittest.TestCase): def check_output(self, function, value, output=None): """ Check that function(value) equals output. If output is None, check that function(value) equals value. """ if output is None: ...
"""Tests for laguerre module. """ from __future__ import division, absolute_import, print_function import numpy as np import numpy.polynomial.laguerre as lag from numpy.polynomial.polynomial import polyval from numpy.testing import ( TestCase, assert_almost_equal, assert_raises, assert_equal, assert_, run_mod...
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
import copy import pytest from .utils import * import numpy as np import psi4 pytestmark = pytest.mark.quick _vars_entered = { 'VAR A': 4.0, 'VaR B': -4.0, 'MATVAR A': psi4.core.Matrix.from_array(np.arange(6).reshape(2, 3)), 'MatvaR B': psi4.core.Matrix.from_array(np.arange(3).reshape(1, 3)), '...
import re from couchpotato.core.helpers.rss import RSS from couchpotato.core.helpers.variable import tryInt, splitString from couchpotato.core.logger import CPLog from couchpotato.core.media.movie.providers.automation.base import Automation log = CPLog(__name__) autoload = 'CrowdAI' class CrowdAI(Aut...
from Screen import Screen from Components.config import ConfigClock, ConfigDateTime, getConfigListEntry from Components.ActionMap import NumberActionMap from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.Pixmap import Pixmap import time import datetime class TimeDateI...
# 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...
# Copyright 2009, 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 of conditions and the f...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_generate_copy_without_render --------------------------------- """ from __future__ import unicode_literals import os import pytest from cookiecutter import generate from cookiecutter import utils @pytest.fixture(scope='function') def remove_test_dir(request): ...
#!/usr/bin/python # coding=utf-8 ############################################################################### from test import CollectorTestCase from test import get_collector_config from test import run_only from mock import patch from slony import SlonyCollector def run_only_if_psycopg2_is_available(func): ...
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
import string import httplib, sys import myparser import re import time class search_google: def __init__(self,word,limit,start,filetype): self.word=word self.results="" self.totalresults="" self.filetype=filetype self.server="www.google.com" self.hostname="www.google.com" self.userAgent="(Mozilla/5.0 (...
# Copyright (C) 2006 Douglas Gregor <doug.gregor -at- gmail.com>. # Use, modification and distribution is subject to the Boost Software # License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Test scatter() collective. import boost.parallel.mpi as mpi from ...
# -*- coding: utf-8 -*- # # Copyright: (c) 2019, Bojan Vitnik <[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 import pytest from .FakeAnsibleModule import FakeAnsibleModule, E...
#!/usr/bin/env python # # Copyright (c) Greenplum Inc 2008. All Rights Reserved. # # Unit Testing of pg commands # import os import unittest import tempfile from gppylib.db import dbconn from gppylib.db.test import skipIfDatabaseDown from gppylib import gplog from gppylib.commands import pg from gppylib.gparray impo...
import re import urllib from HTMLParser import HTMLParser class BlogAttachmentPageParser(HTMLParser): """HTMLParser used to extract the url of Bing images from a Blog Post Attachment Page from www.iorise.com (e.g.: http://www.iorise.com/blog/?attachment_id=44)""" def __init__(self, result_list): ...
def test(): def gen(n): for x in xrange(n): yield str(x) def f_1(xs): """ :type xs: list of int """ return xs def f_2(xs): """ :type xs: collections.Sequence of int """ return xs def f_3(xs): """ :type xs...
import click from os import cpu_count, environ, execvp from sys import prefix from .app import create_app @click.group() def cli(): pass @cli.command() def run_uwsgi(): """ Run API through uwsgi server. """ # avoid fork problems with tensorflow (and other non-serializable objects) environ[...
# Wrapper module for _ssl, providing some additional facilities # implemented in Python. Written by Bill Janssen. """\ This module provides some more Pythonic support for SSL. Object types: SSLSocket -- subtype of socket.socket which does SSL over the socket Exceptions: SSLError -- exception raised for I/O er...
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, RouteTable class TestDescribeRouteTables(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return b""" <DescribeRouteTablesResponse xmlns="ht...
""" Copyright 2015-2016 @_rc0r <[EMAIL]> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, s...
from . import serialize from .eventtarget import EventTarget class Entity: """ Attempt to implement an entity component system This is the base object Components are given on construction. Once a component is added to the object the attach method will be called on the component (if it has one). ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import re import sys import os import glob import helper from mockable_test_result import MockableTestResult from runner import path_to_enlightenment from libs.colorama import init, Fore, Style init() # init colorama class Sensei(MockableTestResult): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <[EMAIL]> # Copyright (C) 2012 Lars Buitinck <[EMAIL]> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Construct a corpus from a Wikipedia (or other MediaWiki-based) database dump. If you have the `patte...
# 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...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# 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 logging import psycopg2 from socorro.external import DatabaseError, MissingArgumentError from socorro.external.p...
# -*- 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 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:[EMAIL] # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by th...
#!/usr/bin/python # # This file is part of jetflows. # # Copyright (C) 2014, Henry O. Jacobs ([EMAIL]), Stefan Sommer ([EMAIL]) # https://github.com/nefan/jetflows.git # # jetflows 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 S...
# -*- coding: utf-8 -*- ############################################################################# # SRWLIB Example: Virtual Beamline: a set of utilities and functions allowing to simulate # operation of an SR Beamline. # The standard use of this script is from command line, with some optional arguments, # e.g. for ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
import time import unittest import threading import synapse.async as s_async import synapse.lib.threads as s_threads from synapse.tests.common import * class AsyncTests(SynTest): def test_async_basics(self): boss = s_async.Boss() data = {} def jobmeth(x, y=20): return x + y...
data = ( 'Ben ', # 0x00 'Yuan ', # 0x01 'Wen ', # 0x02 'Re ', # 0x03 'Fei ', # 0x04 'Qing ', # 0x05 'Yuan ', # 0x06 'Ke ', # 0x07 'Ji ', # 0x08 'She ', # 0x09 'Yuan ', # 0x0a 'Shibui ', # 0x0b 'Lu ', # 0x0c 'Zi ', # 0x0d 'Du ', # 0x0e '[?] ', # 0x0f 'Jian ', # 0x10 'Mi...
''' Color Picker ============ .. versionadded:: 1.7.0 .. warning:: This widget is experimental. Its use and API can change at any time until this warning is removed. .. image:: images/colorpicker.png :align: right The ColorPicker widget allows a user to select a color from a chromatic wheel where pinch...
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # mc.py # Purpose: mimic operation of example/MC/in.mc via Python # Syntax: mc.py in.mc # in.mc = LAMMPS input script import sys,random,math # set these parameters # make sure neigh skin (in in.mc) > 2*deltamove nloop =...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class MorningstarIE(InfoExtractor): IE_DESC = 'morningstar.com' _VALID_URL = r'https?://(?:www\.)?morningstar\.com/[cC]over/video[cC]enter\.aspx\?id=(?P<id>[0-9]+)' _TEST = { 'url': 'http://www.mo...
# # (c) 2018 Extreme Networks Inc. # # 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. # # Ans...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # ...