text
stringlengths
475
200k
from toolset.benchmark.test_types.framework_test_type import FrameworkTestType from toolset.benchmark.test_types.verifications import basic_body_verification, verify_headers from time import sleep class PlaintextTestType(FrameworkTestType): def __init__(self, config): self.plaintext_url = "" kwarg...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- """ OneLogin_Saml2_Metadata class Copyright (c) 2010-2021 OneLogin, Inc. MIT License Metadata class of OneLogin's Python Toolkit. """ from time import gmtime, strftime, time from datetime import datetime from defusedxml.minidom import parseString from onelogin.saml2.constants import OneLog...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, print_function, unicode_literals, \ absolute_import import os import unittest import numpy as np from pymatgen.io.lammps.output import LammpsRun, LammpsLog, LammpsDump _...
#!/usr/bin/python # # Copyright (c) 2018 Yunge Zhu, <[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', 'status...
# -*- coding: utf-8 -*- # © 2014 Numérigraphe SARL # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import models, fields, api from openerp.addons import decimal_precision as dp class ProductTemplate(models.Model): _inherit = 'product.template' @api.multi @api.depends('p...
# -*- coding: utf-8 -*- """ ************* VF2 Algorithm ************* An implementation of VF2 algorithm for graph ismorphism testing. The simplest interface to use this module is to call networkx.is_isomorphic(). Introduction ------------ The GraphMatcher and DiGraphMatcher are responsible for matching graphs or d...
import calendar import datetime import re import sys import urllib import urlparse from email.utils import formatdate from django.utils.datastructures import MultiValueDict from django.utils.encoding import smart_str, force_unicode from django.utils.functional import allow_lazy ETAG_MATCH = re.compile(r'(?:W/)?"((?:\...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np def get_fans(shape): fan_in = shape[0] if len(shape) == 2 else np.prod(shape[1:]) fan_out = shape[1] if len(shape) == 2 else shape[0] return fan_in, fan_out class WeightInitializer(object): """ Initializer for creating weights. ...
#!/usr/bin/python DOCUMENTATION = ''' --- module: redhat_subscription short_description: Manage Red Hat Network registration and subscriptions using the C(subscription-manager) command description: - Manage registration and subscription to the Red Hat Network entitlement platform. version_added: "1.2" author: "Jam...
from subprocess import call, PIPE, Popen import sys import re import numpy as np from numpy.linalg import lapack_lite from numpy.testing import TestCase, dec from numpy.compat import asbytes_nested class FindDependenciesLdd: def __init__(self): self.cmd = ['ldd'] try: st = call(self....
class ReportField(object): REPORT_FIELD_TYPES_KNOWN = ['double', 'string', 'date', 'datetime', 'boolean'] REPORT_FIELD_TYPES_FALLBACK = 'string' REPORT_FIELD_TYPE_MAP = { 'money': 'double', 'integer': 'int', 'bid': 'double', 'long': 'int' } def __init__(self, defini...
# # Package analogous to 'threading.py' but using processes # # multiprocessing/__init__.py # # This package is intended to duplicate the functionality (and much of # the API) of threading.py but uses processes instead of threads. A # subpackage 'multiprocessing.dummy' has the same API but is a simple # wrapper for 't...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boolean...
# Copyright (C) 2010 Google 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 agreed to in writ...
import itertools from datetime import datetime, timedelta from subprocess import Popen, PIPE from django.conf import settings from django.utils import translation from django.db import connection, transaction import cronjobs import commonware.log import amo from amo.utils import chunked from amo.helpers import user_...
# coding: utf-8 """ Wavefront REST API <p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
# 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 applicab...
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
# coding=utf8 """ Label propagation in the context of this module refers to a set of semisupervised classification algorithms. In the high level, these algorithms work by forming a fully-connected graph between all points given and solving for the steady-state distribution of labels at each point. These algorithms per...
""" Tests of neo.io.brainwaresrcio """ import logging import os.path import unittest import numpy as np import quantities as pq from neo.core import (Block, Event, Group, Segment, SpikeTrain) from neo.io import BrainwareSrcIO, brainwaresrcio from neo.test.iotest.common_io_test import BaseTestI...
"""Unittests for heapq.""" import random import unittest from test import test_support import sys # We do a bit of trickery here to be able to test both the C implementation # and the Python implementation of the module. # Make it impossible to import the C implementation anymore. sys.modules['_heapq'] = 0 # We must...
# Read 32 messages and verify that they are not fragmented. # This can be removed if the "reassemble small messages" feature is removed. See # https://crbug.com/1086273. from mod_pywebsocket import common from mod_pywebsocket import msgutil NUMBER_OF_MESSAGES = 32 def web_socket_do_extra_handshake(request): # D...
# Django settings for {{ project_name }} project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[EMAIL]'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', ...
from classserializer import UserManager, User from soaplib.core import Application from soaplib.core.model.clazz import ClassModel from soaplib.core.model.primitive import Integer, String from soaplib.core.service import soap, DefinitionBase from soaplib.core.server import wsgi computer_database = {} computerid_seq ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
# -*- 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 'CourseAuthorization' db.create_table('bulk_email_courseauthorization', ( ('id', ...
#!/usr/bin/env python from socket import * from optparse import OptionParser UDP_ADDR = "0.0.0.0" UDP_PORT = 7724 BUFFER_SIZE = 65536 #HEADER_KEYS = ['Logger', 'Level', 'Source-File', 'Source-Function', 'Source-Line', 'TimeStamp'] HEADER_KEYS = { 'mini': ('Level'), 'standard': ('Logger', 'Level', 'Source-Func...
#!/usr/bin/env python # # Copyright 2004,2007,2010-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at ...
# Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't picklable (module imports are okay...
#._cv_part guppy.heapy.test.test_ER # Tests of equivalence relations. # These are also tested by test_Classifiers. # This is some more tests, tailored esp. to the user view. # (test_Classifiers was so slow already, so I start over) # o Intended to be exhaustive wrt all ER's defined # # o Intersection of ER's fro...
# 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...
""" Constraints """ class BadValue(ValueError): def __init__(self, desc, obj, col, value, *args): self.desc = desc self.col = col # I want these objects to be garbage-collectable, so # I just keep their repr: self.obj = repr(obj) self.value = repr(value) fu...
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
from __future__ import unicode_literals import os import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, compat_urllib_request, ) class MofosexIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?P<url>mofosex\.com/videos/(?P<i...
"""Seqan Doc Links for Trac. Version 0.1. Copyright (C) 2010 Manuel Holtgrewe Install by copying this file into the plugins directory of your trac work directory. In your trac.ini, you can use something like this (the following also shows the defaults). [seqan_doc_links] prefix = seqan base_url = http://www....
# Copyright 2018 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...
from taiga.requestmaker import RequestMaker from taiga.models import Task, Tasks import unittest from mock import patch import six if six.PY2: import_open = '__builtin__.open' else: import_open = 'builtins.open' class TestTasks(unittest.TestCase): @patch('taiga.requestmaker.RequestMaker.get') def tes...
# Copyright (C) 2012 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 ...
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import os import json import pandas as pd import xmltodict import shutil # RiBuild Modules from delphin_6_automation.dat...
# 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. """ Lint for IDL """ import os import sys from idl_log import ErrOut, InfoOut, WarnOut from idl_node import IDLAttribute, IDLNode from idl_ast import I...
# manually build and launch your instances # remember that the ip field deals with a private ip def _get_parameter(node_id, private_ip, min_key, max_key): p = {"id": node_id, "ip": private_ip, "min_key": min_key, "max_key": max_key} return p def create_instances_parameters(): """ first = _get_param...
#!/usr/bin/python -u import sys import libxml2 # Memory debug specific libxml2.debugMemory(1) ctxt = libxml2.createFileParserCtxt("valid.xml") ctxt.validate(1) ctxt.parseDocument() doc = ctxt.doc() valid = ctxt.isValid() if doc.name != "valid.xml": print "doc.name failed" sys.exit(1) root = doc.children if r...
from __future__ import absolute_import, unicode_literals from django.core.paginator import Paginator from django.core import urlresolvers from django.utils.html import mark_safe, escape import django_tables2 as tables from django_tables2.tables import Table from django_tables2.utils import Accessor as A, AttributeDic...
""" ============================================== Label Propagation learning a complex structure ============================================== Example of LabelPropagation learning a complex internal structure to demonstrate "manifold learning". The outer circle should be labeled "red" and the inner circle "blue". Be...
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.common import Backend from lib.core.common import Format from lib.core.common import hashDBWrite from lib.core.data import kb from lib.core.data impor...
############################################################################# # Documentation # ############################################################################# # Author: Todd Whiteman # Date: 16th March, 2009 # Verion: 2.0.0 # License: Public Domain - free to d...
from bs4 import BeautifulSoup import requests from findmyhash.algo import Algo from findmyhash.errors import * from .Service import Service class MD5DECRYPTION(Service): NAME = "md5decryption" HOST = "http://md5decryption.com" ALGO_SUPPORTED = [Algo.MD5] @classmethod def algo_supported(cls,...
# 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 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...
#!/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': ['stableinterf...
# Copyright (C) 2010 Chris Jerdonek ([EMAIL]) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the followin...
"""A library for integrating Python's builtin ``ssl`` library with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set ``CherryPyWSGIServer.ssl_adapter`` to an instance of ``BuiltinSSLAdapter``. """ try: import ssl except ImportError: ssl = None from cherrypy import ws...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <[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', ...
"""Functions for use in URLsconfs.""" from functools import partial from importlib import import_module from django.core.exceptions import ImproperlyConfigured from .resolvers import ( LocalePrefixPattern, RegexPattern, RoutePattern, URLPattern, URLResolver, ) def include(arg, namespace=None): app_name = No...
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flask import jsonify from flask_restplus import inputs from flexget.api import api, APIResource from flexget.api.app import NotFoundError, BadRequest, etag from flexg...
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, incl...
# -*- coding: utf-8 -*- # Copyright 2013 Thomas Bechtold <[EMAIL]> # Copyright 2013 Deutsche Telekom AG # # 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/...
import json from django import forms from django.core.exceptions import ValidationError from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ['HStoreField'] class HStoreField(forms.CharField): """A field for HStore data which accepts JSON input.""" widget = forms.Te...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
# 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. """Abstract injector class for GS requests.""" class FileNotFoundError(Exception): """Thrown by a subclass of CloudBucket when a file is not found.""" ...
from kraken import plugins from kraken.core.maths import Vec3 from kraken_components.generic.tentacle_component import TentacleComponentGuide, TentacleComponentRig from kraken.core.profiler import Profiler from kraken.helpers.utility_methods import logHierarchy Profiler.getInstance().push("tentacle_build") tentacl...
# -*- coding: utf-8 -*- # # WTForms documentation build configuration file, created by # sphinx-quickstart on Fri Aug 01 15:29:36 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't...
# Copyright 2011 Google 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 agreed to in writing,...
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
# -*- coding: utf-8 -*- """ This file is covered by the LICENSING file in the root of this project. """ import logging from os.path import realpath, dirname, join from logging import config, DEBUG, INFO __all__ = ["log"] class Log(object): """Wrapper of Python logging module for easier usage :Example: ...
#!/bin/env python # -*- python -*- # # Copyright 2003,2004 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or...
# -*- coding: utf-8 -*- import bot class M_List(bot.Module): index = "list" def register(self): self.addcommand( self.list, "list", "List modules or, if <module> is specified, commands in a module, " "<module> can be * for all commands.", ...
#!/usr/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 ''' Collect information about node within ELB ''' # # Copyright 2015 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 ...
# 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 # vim: set fileencoding=utf-8 : import struct import Config import time from Util import Util from cstruct import CStruct # PostEntry.accessed[0] FILE_SIGN = 0x1 #/* In article mode, Sign , Bigman 2000.8.12 ,in accessed[0] */ # not used FILE_OWND = 0x2 #/* accessed array */ #...
# MIT License # Copyright (c) 2016 Steve Parker import subprocess import shlex from subprocess import call class PlayBulbCandle: commands = { 'setName': '0x001C', # writeReq needed get/set 'setEffect': '0x0014', # get/set 'setColor': '0x0016', # get/set 'getType': '0x0023', 'getFamily': '0x0025', 'getFi...
# Copyright 2018 FiberHome Telecommunication Technologies CO.,LTD # 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/LI...
# -*- coding: utf-8 -*- # # 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 ...
#!/usr/bin/python import urllib2 import urllib from simple_config import load_config tester_config = load_config("tester.conf") class ServiceTester: def __init__(self, config=None): if config is None: config = tester_config self.config = config self.timeout_seconds = config["timeout_...
from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import cache KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ def __init__(self, session_key=None): self._cache = cache su...
""" @package mi.instrument.harvard.massp.rga.test.test_driver @file marine-integrations/mi/instrument/harvard/massp/rga/driver.py @author Peter Cable @brief Test cases for rga driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u [-t testname] ...
#!/usr/bin/env python # coding=utf-8 # # Copyright 2017 ihasy.com # Do have a faith in what you're doing. # Make your life a story worth telling. import smtplib import sys import email from email.mime.text import MIMEText send_mail_host = 'smtp_host' send_mail_user = 'smtp_user' send_mail_user_name = u'send_mail_user...
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
# 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...
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException...
#!/usr/bin/env python # Script to check a bios image and report info on it. # # Copyright (C) 2008 Kevin O'Connor <[EMAIL]> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys, struct import layoutrom, buildrom from python23compat import as_bytes def subst(data, offset, new): r...
#!/usr/bin/env python # Fill in checksum/size of an option rom, and pad it to proper length. # # Copyright (C) 2009 Kevin O'Connor <[EMAIL]> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys def alignpos(pos, alignbytes): mask = alignbytes - 1 return (pos + mask) & ~mask ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# -*- encoding: utf-8 -*- # Pilas engine - A video game framework. # # Copyright 2010 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar import pilas class Camara(object): """Representa el punto de vista de la ventana. Los atributos ``x...
# Copyright 2014 Red Hat, 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 ...
#!/usr/bin/python # Terminator by Chris Jones <[EMAIL]> # GPL v2 only """titlebar.py - classes necessary to provide a terminal title bar""" import gtk import gobject from version import APP_NAME from util import dbg from terminator import Terminator from editablelabel import EditableLabel # pylint: disable-msg=R0904...
# encoding: UTF-8 __author__ = 'CHENXY' # C++和python类型的映射字典 type_dict = { 'int': 'int', 'char': 'string', 'double': 'float', 'short': 'int', 'unsigned': 'string' } def process_line(line): """处理每行""" if '///' in line: # 注释 py_line = process_comment(line) elif 'typede...
# Copyright (c) 2016 IBM Corp. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
import datetime as dt import logging import dateutil.parser from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required from django.core.paginator import Paginator, EmptyPage from django.shortcuts import get_object_or_404, redirect from django.urls import reverse,...
# 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 applicable ...
import threading from urllib import quote, getproxies from urlparse import urlparse import os.path import time import traceback from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.encoding import ss, toSafeString, \ toUnicode, sp from couchpotato.core.helpers.variable import md5, i...
# Copyright (C) 2018 Jeremy S. Sanders # Email: Jeremy Sanders <[EMAIL]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option...
# Tweepy # Copyright 2010 Joshua Roesslein # See LICENSE for details. from datetime import datetime import time import htmlentitydefs import re import locale from urllib import quote from email.utils import parsedate def parse_datetime(string): return datetime(*(parsedate(string)[:6])) def parse_html_value(htm...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved ############################################################################## # Modu...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # # 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 you...
import numpy as np from collections import namedtuple from btgym.research.model_based.model.rec import Zscore, ZscoreState, Covariance, CovarianceState from btgym.research.model_based.model.rec import OUEstimatorState from btgym.research.model_based.model.univariate import OUProcess, TimeSeriesModel BivariateTSMode...
import unittest import skype4pytest from Skype4Py.skype import * class SkypeTest(skype4pytest.TestCase): def setUpObject(self): self.obj = self.skype # Methods # ======= def testApiSecurityContextEnabled(self): # Returned type: bool def test(): self.obj.ApiSecuri...