gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# -*- coding: utf-8 -*- import time import datetime import random import os import pygtk pygtk.require( '2.0' ) import gtk, gobject import git from multiprocessing import Process, Queue from Queue import Empty from traceback import format_exc def git_sync ( queue, sync_path, repo_name, uri ): """ Sync the rep...
"""Test TrueType font subsetting & embedding code. This test uses a sample font (Vera.ttf) taken from Bitstream which is called Vera Serif Regular and is covered under the license in ../fonts/bitstream-vera-license.txt. """ from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfile, printLocation, ...
#! /usr/bin/python # -*- coding: utf8 -*- # tool : # sync configure file between host, # batch start/stop sf1r process # batch compile/update source code. # send test command to sf1r. import os,sys from os import path import re import time import ast import subprocess import shlex # one of each different master an...
# django-openid-auth - OpenID integration for django.contrib.auth # # Copyright (C) 2008-2010 Canonical Ltd. # # 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 ...
import numpy import numpy as np import neo import warnings import quantities as pq import elephant.rep as rep def fanofactor(spiketrains): """ Evaluates the empirical Fano factor F of the spike counts of a list of `neo.core.SpikeTrain` objects. Given the vector v containing the observed spike counts ...
import robocup import single_robot_composite_behavior import behavior import role_assignment import constants import evaluation.ball import skills import main import enum import math import evaluation import planning_priority class Goalie(single_robot_composite_behavior.SingleRobotCompositeBehavior): OFFSET = 0....
import os import re import logging import random import string from robob.util import time2sec from robob.factories import pipeFactory, parserFactory from robob.metrics import Metrics from robob.logpipe import LogPipe from robob.pipe.bashwrap import Pipe as BashWrapPipe from robob.pipe.app import Pipe as AppPipe from...
# Copyright 2014 PerfKitBenchmarker 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 appli...
## @package predictor_exporter # Module caffe2.python.predictor.predictor_exporter from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.proto import caffe2_pb2 from caffe2.proto import metanet_pb2 from caffe2.py...
# -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals) import os from logging import getLogger from os.path import basename from sys import version_info import pandas as pd from pdb.fetch_ss_dis import fetch_ss_dis from pdb.lib.create_delimiter import create...
# -*- coding: utf-8 -*- """ Chinese-specific form helpers """ from __future__ import absolute_import, unicode_literals import re from django.forms import ValidationError from django.forms.fields import CharField, RegexField, Select from django.utils.translation import ugettext_lazy as _ from .cn_provinces import CN...
from __future__ import unicode_literals from urlparse import urlparse import logging import os import unittest from django.test import TestCase, TransactionTestCase from django.conf import settings from django.db import transaction from docutil.commands_util import load_model from docutil.test_util import clean_test_d...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2014 Alex Forencich 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, including without limitation the righ...
# -*- coding: utf-8 -*- # Copyright 2018 IBM RESEARCH. 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 requ...
#!/usr/bin/env python # # $Id: _psbsd.py 1386 2012-06-27 15:44:36Z g.rodola $ # # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """FreeBSD platform implementation.""" import errno import os i...
"""Unit tests for the events module.""" from collections import namedtuple from datetime import datetime from io import BytesIO import logging import os import sys import time import pytest from pydicom.dataset import Dataset from pydicom.tag import BaseTag from pydicom.uid import ImplicitVRLittleEndian from pydicom...
#!/usr/bin/env python # encoding: utf-8 import numpy as np import clawpack.petclaw as pyclaw # material parameters E1=5./8; p1=8./5 E2=5./2; p2=2./5 # interface parameters alphax=0.5; deltax=1000.0 alphay=0.5; deltay=1.0 # Linearity parameters linearity_mat1=1; linearity_mat2=1 # heterogeneity type #het_type='che...
#!/usr/bin/env python # Copyright (c) 2006-2012 ActiveState Software Inc. # See LICENSE.txt for license details. """Twig support for codeintel""" import logging from codeintel2.common import * from codeintel2.langintel import LangIntel from codeintel2.udl import UDLLexer, UDLBuffer, UDLCILEDriver, XMLParsingBufferMi...
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. import socket import struct import operator from twisted.internet import interfaces, defer, error, protocol, address from twisted.internet.udp import MulticastMixin from twisted.internet.abstract import isIPAddress from twisted.persist...
import os import logging import uuid import urlparse from google.appengine.api import users from google.appengine.api import urlfetch from google.appengine.api import taskqueue from google.appengine.ext import db import webapp2 from webapp2_extras import jinja2 from webapp2_extras import sessions import datetime from...
# 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 unde...
''' This package provides generic "IO templates." There are two kinds of IO templates: Cable-independent IO templates are built using higher-level JTAG or SPI code. They are then transformed into cable-specific IO templates. This init file contains the base class for the cable independent IO template. This ba...
#!/usr/bin/env python3 # Copyright (c) 2014-present, The osquery authors # # This source code is licensed as defined by the LICENSE file found in the # root directory of this source tree. # # SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) import os import random import sys import unittest import utils # osque...
from copy import deepcopy import os import ast import requests from .common import json from .common import CATTLE_API_URL from .common import create_config_file from .common import CATTLE_TEST_URL from .common import ADMIN_TOKEN from .common import get_setting_value_by_name from .common import get_user_client from .co...
# -*- coding: utf-8 -*- """ Common classes and methods for PyLTI module """ from __future__ import absolute_import import logging import json import oauth2 from xml.etree import ElementTree as etree from oauth2 import STRING_TYPES from six.moves.urllib.parse import urlparse, urlencode log = logging.getLogger('pylti...
# 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 requ...
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Helper class for interacting with the Dev Server.""" import base64 import binascii import distutils.version import errno import hashlib import os ...
#!/usr/bin/python # Input: DICTPAGE.RAW from <http://archives.nd.edu/whitaker/dictpage.zip> # cf. <http://archives.nd.edu/whitaker/wordsdoc.htm> from __future__ import print_function import argparse import codecs import itertools import json import re import sys import zipfile if sys.version_info[0] == 2: from i...
#!/usr/bin/env python # # Copyright 2007 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 o...
# coding: utf-8 """ DLRN API DLRN API client OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems class MetricsRequest(object): """NOTE: This class is auto generated by the swagger code generator...
from django.http import HttpResponse from django.template.response import TemplateResponse from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.models import User from django.db.models import F from homework.orders.models import (status, Provider, Dealer, Product, Fulfillment, Pu...
""" Parse a jplacer file and see what happens! """ import os import sys import argparse import json import re from ete3 import Tree from ete3.parser.newick import NewickError def load_jplacer(jpf): """ load the jplacer file and return the tree :param jpf: The jplacer file :return: the data structu...
# Copyright (c) 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
import warnings import numpy as np import pickle import copy import pytest from sklearn.datasets import make_regression from sklearn.isotonic import ( check_increasing, isotonic_regression, IsotonicRegression, _make_unique, ) from sklearn.utils.validation import check_array from sklearn.utils._testin...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import os from backports.tempfile import TemporaryDirectory from django.conf import settings import pytest import mock # AWX from awx.main.models import * # noqa from awx.api.versioning import reverse @pytest.fixture def create_job_factory(job_fact...
from __future__ import unicode_literals import os import time from .common import FileDownloader from ..compat import ( compat_urllib_request, compat_urllib_error, ) from ..utils import ( ContentTooShortError, encodeFilename, sanitize_open, format_bytes, ) class HttpFD(FileDownloader): d...
from __future__ import absolute_import, unicode_literals, print_function from io import BytesIO # Yes, there is an io module in Python 2 import cgi import codecs import gzip import operator import os import re import warnings try: from collections import OrderedDict except ImportError: # pragma: no cover # so...
from __future__ import print_function import qelos as q import re, time, pickle from SPARQLWrapper import SPARQLWrapper, JSON from SPARQLWrapper.SPARQLExceptions import EndPointNotFound, EndPointInternalError ######################################################### # Get valid next tokens for a .lin query based on g...
# # Copyright 2013 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...
# -*- coding: utf-8 -*- '''An implementation of learning copying algorithm_learning with RNN (basic RNN, LSTM, GRU). Input sequence length: "1 ~ 20: (1*2+1)=3 ~ (20*2+1)=41" Input dimension: "8" Output sequence length: equal to input sequence length. Output dimension: equal to input dimension. ''' from __future__ impo...
#!/usr/bin/python # # Copyright 2010-2012, Google Inc. # Author: Raph Levien (<firstname.lastname>@gmail.com) # Author: Dave Crossland (dave@understandinglimited.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may ob...
# Feel free to modify and use this filter however you wish. If you do, # please give credit to SethBling. # http://youtube.com/SethBling from numpy import sign displayName = "Create Busses" def perform(level, box, options): level.markDirtyBox(box) bus = BusCreator(level, box, options) bus.getTerminals(...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import unittest import os import json import warnings import numpy as np from pymatgen import Lattice, Structure, Specie, Molecule from pymatgen.transformations.standard_transformations import ( OxidationS...
# coding=utf-8 # Copyright 2019 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 agreed to ...
from rest_framework import status from rest_framework import viewsets from rest_framework.decorators import action from rest_framework.response import Response from cognitive_tests import models from cognitive_tests import utils from cognitive_tests.api import permissions from cognitive_tests.api import serializers f...
# Copyright 2016 Brian Innes # # 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 beets. # Copyright 2013, Jakob Schnitzer. # # 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, including # without limitation the rights to use, copy,...
#!/usr/bin/env python # # Copyright 2007 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 o...
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
# -*- 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 field 'Timeseries.owner' db.add_column(u'ddsc_core_timeseries', 'owner', self...
# -*- coding:utf8 -*- # ============================================================================== # Copyright 2017 Baidu.com, 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 th...
#!/usr/bin/python # Copyright 2020 Makani Technologies 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 applicabl...
# -*- 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 'AccessGroup' db.create_table( 'sentry_accessgroup', ( ( ...
""" Script that evaluates the `SunMoon` class. For one location, this script computes solar event times for all of the nights of one year by three methods: 1. with one call to get_solar_events_in_interval 2. with one call per day to get_solar_events 3. with one call per event to get_solar_event_time For ...
#!/usr/bin/env impala-python # Copyright (c) 2014 Cloudera, 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 # # Unles...
# coding=utf-8 # Copyright 2019-present, the HuggingFace Inc. team, The Google AI Language Team and Facebook, 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.or...
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin Core Developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib i...
# ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft Corporation # # 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 ...
from __future__ import unicode_literals import datetime import json import sys import time from email.header import Header from django.conf import settings from django.core import signals from django.core import signing from django.core.exceptions import DisallowedRedirect from django.core.serializers.json import Dja...
# tags.py - read tag info from local repository # # Copyright 2009 Olivia Mackall <olivia@selenic.com> # Copyright 2009 Greg Ward <greg@gerg.ca> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. # Currently this module only deals wi...
import hashlib import itertools import logging import time from datetime import datetime, timedelta from urlparse import urlparse from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache from django.core.exceptions import ValidationError, ObjectDoesNotExist from ...
from ..utils import Utils from mopidy.core import PlaybackState from mopidy.models import Track from ..witai import ai import traceback import time from ..audio import sounds from ..audio import voices from mopidy_rstation.config.settings import Config from mopidy_rstation.config.settings import Settings LIRC_PROG_NAM...
from pandac.PandaModules import NodePath, Plane, Vec3, Point3 from pandac.PandaModules import CollisionPlane, CollisionNode from direct.showbase.RandomNumGen import RandomNumGen from direct.showbase.DirectObject import DirectObject from toontown.toonbase.ToonPythonUtil import bound as clamp import CogdoUtil import Cogd...
""" Modules to Set default parameters: W.T. Franks FMP Berlin """ import de.bruker.nmr.mfw.root as root import math import os import sys import TopCmds import IntShape import CPDtools p90H=2.5 ampH=4.0 p90C=3.0 ampC=0.0 p90N=5.0 ampN=-2.0 MAS =10000.0 def dBtoW(dB): watts=math.pow(10,-dB/10.) #TopCmds.MSG("w...
"""Tests updating config of a real org and repo under the dothub-sandbox organization Tests in this file target the real gothub organization of "dothub-sandbox" Set the environment variable GITHUB_TOKEN (only if any maintainer gave it to you) to run these tests """ import pytest from click.testing import CliRunner i...
# Copyright 2017 Bracket Computing, 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. # A copy of the License is located at # # https://github.com/brkt/brkt-cli/blob/master/LICENSE # # or in the "license" file...
import csv import logging import re from smtplib import SMTPException from django.contrib import messages from django.contrib.auth.decorators import login_required from django.core.mail import send_mass_mail from django.core.urlresolvers import reverse from django.http.response import HttpResponse, HttpResponseForbid...
# -*- coding: utf-8; -*- # # The MIT License (MIT) # # Copyright (c) 2014 Flavien Charlon # # 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, including without limitation t...
### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 co...
__author__ = 'Yafit' import requests import json ip = 'http://xxxxxx' def loginApi(ip, username, password): myHeader = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8', 'password': password} r = requests.get(ip + '/rest/v1/login/' + username, headers=myH...
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Test RDFStruct implementations.""" from google.protobuf import message_factory from grr.lib import rdfvalue from grr.lib import type_info from grr.lib.rdfvalues import structs from grr.lib.rdfvalues import test_base # pylint: mode=test class TestS...
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unittests for build stages.""" import contextlib import os import sys sys.path.insert(0, os.path.abspath('%s/../../..' % os.pat...
import os import signal import time from gppylib.mainUtils import * from gppylib.utils import checkNotNone, appendNewEntriesToHbaFile from gppylib.db import dbconn from gppylib import gparray, gplog from gppylib.commands import unix from gppylib.commands import gp from gppylib.commands import base from gppylib.gparra...
import os import sys import traceback from multiprocessing import Process, Manager, Queue, cpu_count, Value, Lock, JoinableQueue import time from queue import Empty, Full from conch.exceptions import ConchPythonError def default_njobs(): return int(0.75 * cpu_count()) class Counter(object): def __init__(se...
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson, # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
# Copyright (C) 2013-2014 SignalFuse, Inc. # Copyright (C) 2015 SignalFx, Inc. # # Docker container orchestration utility. import bgtunnel import collections import datetime import time import os # Import _strptime manually to work around a thread safety issue when using # strptime() from threads for the first time. ...
# Python imports # Don't add any from __future__ imports here. This code should execute # against standard Python. import platform import unittest import datetime import mmap import os # Project imports import posix_ipc # Hack -- add tests directory to sys.path so Python 3 can find base.py. import sys sys.path.insert...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
import datetime import collections from flask import Module, g, flash, url_for, request from flask.ext.wtf import ValidationError from tardyrush import db from tardyrush.views import require_login from tardyrush.helpers import rt, jsonify, abs_url_for, redirect from tardyrush.helpers.filters import * from tardyrush.he...
""" The core execution functions for running on a node. These are all called from :any:`iceprod.core.i3exec`. The fundamental design of the core is to run a task composed of trays and modules. The general heirarchy looks like:: task | |- tray1 | |- module1 | |- module2 | ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2015 Nikola Kovacevic <nikolak@outlook.com> # # 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/LICEN...
# 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 may ...
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
#!/usr/bin/env python # Copyright 2017 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. from __future__ import print_function import json import os import sys import merge_api MISSING_SHARDS_MSG = r"""Missing results fr...
import json import logging from datetime import datetime, timedelta from email.utils import parsedate from django.conf import settings from django.http import (HttpResponse, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseServerError) from django.shortcuts import render from django.u...
from __future__ import absolute_import, division, print_function import json from abc import ABCMeta, abstractmethod from datetime import datetime import six from dateutil.parser import parse from represent import autorepr from .compat.abc import abstractclassmethod from .config import * from .exceptions import * fr...
from datetime import timedelta from django import forms from django.core.validators import ValidationError from django.db.models import Q from django.forms import widgets from django.utils.translation import get_language import happyforms import jinja2 from tower import ugettext as _, ugettext_lazy as _lazy import a...
# -*- coding: utf-8 -*- from copy import deepcopy from unittest import TestCase from mock import Mock, patch from pluct.schema import get_profile_from_header, LazySchema, Schema from pluct.session import Session SCHEMA = { 'title': 'app schema', 'properties': { 'name': {'type': 'string'}, 'p...
import datetime from dateutil.tz import tzoffset from decimal import Decimal from django.db import models from django.contrib.auth import get_user_model from django.test import TestCase from django.http import HttpRequest from tastypie.bundle import Bundle from tastypie.exceptions import ApiFieldError, NotFound from ...
#!/usr/bin/env python #-*- encoding: utf-8 -*- ''' scan google https ip author: iamxujian@gmail.com repositor: https://github.com/iamxujian/scan_google_https_ip ''' from __future__ import unicode_literals import gevent.monkey gevent.monkey.patch_socket() gevent.monkey.patch_ssl() import os import logging import l...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import unittest import mock import webapp2 imp...
""" Store packages in S3 """ import logging import posixpath from datetime import timedelta from urllib.parse import quote, urlparse import boto3 from botocore.config import Config from botocore.exceptions import ClientError from botocore.signers import CloudFrontSigner from cryptography.hazmat.backends import default...
#!/usr/bin/env python # # MansOS web server - the main file # from __future__ import print_function import os, sys, platform, select, signal, traceback, string from urllib2 import URLError # add library directory to the path sys.path.append(os.path.join(os.getcwd(), '..', "lib")) import pages.page_login as page_login...
# 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 -*- # Copyright 2022 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...
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
#!/usr/bin/python """ Copyright [2009-2021] EMBL-European Bioinformatics Institute 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 ...
""" Module defining input/output interfaces to HoloViews. There are two components for input/output: Exporters: Process (composite) HoloViews objects one at a time. For instance, an exporter may render a HoloViews object as a svg or perhaps pickle it. Archives: A collection of HoloViews objects...
#!/usr/bin/python import re class Entry: def __init__(self): self.size = 0 self.rss = 0 self.pss = 0 def _myself(self): #print '[size = %dkB; rss = %dkB; pss = %dkB]' %(self.size, self.rss, self.pss) return '[Size=' + str(self.size) + 'kB;\tRss=' + str(self.rss) + 'kB;...
import sys sys.path.append("./rabbitmq-codegen") from amqp_codegen import * ocTypeMap = { 'octet': 'UInt8', 'shortstr': 'NSString *', 'longstr': 'NSString *', 'short': 'UInt16', 'long': 'UInt32', 'longlong': 'UInt64', 'bit': 'BOOL', 'table': 'NSDictionary *', 'timestamp': 'NSDate...