gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # # test_multibytecodec_support.py # Common Unittest Routines for CJK codecs # import sys, codecs import unittest, re from httplib import HTTPException from test import test_support from StringIO import StringIO class TestBase: encoding = '' # codec name codec = None...
# -*- coding: utf-8 -*- """ Module for defining messages, which are used to communicate between services """ from datetime import datetime #from dateutil import parser from SuperGLU.Core.FIPA.SpeechActs import INFORM_ACT, SPEECH_ACT_SET from SuperGLU.Util.Serialization import SuperGlu_Serializable, tokenizeObject, unto...
import asyncore import email.utils import socket import smtpd import smtplib import StringIO import sys import time import select import unittest from test import test_support try: import threading except ImportError: threading = None HOST = test_support.HOST def server(evt, buf, serv): serv.listen(5) ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module tests some methods related to ``CDS`` format reader/writer. Requires `pyyaml <https://pyyaml.org/>`_ to be installed. """ import os from io import StringIO from astropy.io import ascii from astropy import units as u from astropy.table imp...
import os, sys import argparse import types import glob import numpy as np import pickle import tensorflow as tf import data import model from util import * from learning import LearnerCls, LearnerDACls, LearnerClsSelf, LearnerConfPred from learning import TempScalingCls as CalibratorCls ##TODO: clean-up tf options...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Helper functions """ from __future__ import print_function, division import time import contextlib import numpy as np import matplotlib.pylab as plt import seaborn as sns import itertools as it from statsmodels.tsa.tsatools import lagmat __all__ = ['nice_errors', '...
# -*- coding: utf-8 -*- """Converts from XML to objects for ws-agreement agreements/templates or any other xml returned by SLA Manager. This module offers a set of converters from xml formats returned by SLA Manager to a more-friendly POJO instances. The converters are designed to be pluggable: see ListConverter. ...
# Copyright 2020 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. """Methods related to querying the ResultDB BigQuery tables.""" from __future__ import print_function import json import logging import math import multipro...
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin 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 import...
# bookmarks http://www.one-tab.com/page/Ds6dSsBoSX24cD8OSxqKcA import pygame import sys import math from pygame.locals import * from led import LED from buttons import Button import png # pypng from astro_pi import AstroPi import copy, time saved = True warning = False pygame.init() pygame.font.init() ap=AstroPi() sc...
# Image-based testing borrowed from vispy """ Procedure for unit-testing with images: 1. Run unit tests at least once; this initializes a git clone of pyqtgraph/test-data in ~/.pyqtgraph. 2. Run individual test scripts with the PYQTGRAPH_AUDIT environment variable set: $ PYQTGRAPH_AUDIT=1 python pyqtgraph...
from __future__ import print_function, division import matplotlib import logging from sys import stdout matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from neuralnilm import (Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer, Bidirectiona...
# # PyGoWave Server - The Python Google Wave Server # Copyright 2009 Patrick Schneider <patrick.p2k.schneider@gmail.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.ap...
# Natural Language Toolkit: Interface to MaltParser # # Author: Dan Garrette <dhgarrette@gmail.com> # # Copyright (C) 2001-2011 NLTK Project # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT import os import tempfile import subprocess import glob from operator import add import nltk from api i...
#!/usr/bin/env python # Copyright 2012, Julius Seporaitis # # 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 ...
from __future__ import annotations import random import textwrap from math import cos, pi, sin, sqrt from dxtbx.model import BeamFactory, Detector, DetectorFactory, Panel from libtbx.test_utils import approx_equal from scitbx import matrix from dials.algorithms.refinement.parameterisation.detector_parameters import ...
import readline from perception.shared.functions import get_product_uuid from subprocess import call, Popen, PIPE from perception.database.models import OpenvasAdmin,\ OpenvasLastUpdate,\ SvcUser,\ SeedRouter,\ RSInfrastructure, \ DiscoveryProtocolFinding from perception.classes import network from ...
""" Record field data functions to support entity data testing """ from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2014, G. Klyne" __license__ = "MIT (http://opensource.org/licenses/...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Marker(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "treemap" _path_str = "treemap.marker" _valid_props = { "autocolorscale", "ca...
from __future__ import print_function from .utils import decompress import os import os.path import sys try: #Python 2 from xmlrpclib import ServerProxy, Transport from settings import Settings except ImportError: #Python 3 from xmlrpc.client import ServerProxy, Transport from .settings import ...
#!/usr/bin/env python import os import urllib from flask import Flask, request, jsonify from model.query import Query, QueryTableCtx, QueryStatsCtx from model.communication import Socket from helper.api_exceptions import \ FilterParsingException, \ NoDataException, \ NoTableException, \ BadFilterExcep...
""" Script that automates trusted pull/pushes on different docker versions. """ from __future__ import print_function from collections import OrderedDict import json import os import platform import pwd import re import shutil import subprocess from tempfile import mkdtemp from time import time import urllib from urlp...
# -*- coding: utf-8 -*- """ Sahana Eden Vulnerability Model @copyright: 2012 (c) Sahana Software Foundation @license: MIT 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 with...
#!/usr/bin/env python3 # Copyright 2016-2018 Brian Warner # # 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...
# -*- coding: utf-8 -*- import re import boto import boto.route53 from boto.s3.connection import OrdinaryCallingFormat from boto.s3.key import Key import config # BUCKETS AND FILES def get_or_create_bucket(bucket_name): """ Returns the bucket or creates a new one according the provided bucket name. :p...
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ Message Parsing Template-specific Message Parsers are defined here. @copyright: 2014-2016 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this soft...
# # 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 us...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, absolute_import, division from builtins import map, range, object, zip, sorted from past.builtins import basestring from . import TestBase import unittest import amplpy def loadDietModel(ampl): ampl.eval(''' set FOOD ; ...
import numpy as np import nibabel as nb import os import sys import nighresjava from ..io import load_volume, save_volume from ..utils import _output_dir_4saving, _fname_4saving, \ _check_topology_lut_dir, _check_available_memory def lcpca_denoising(image_list, phase_list=None, ...
import weakref from django.http import JsonResponse from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import generics # from rest_framework.serializers from rest_framework.mixins import ListModelMixin from api.users.serializers import UserSerializer from w...
# Copyright (c) 2010 Citrix Systems, 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 la...
from tornado.web import * import json import hashlib import hmac from invocation import * from exceptions import * from tornado.options import define, options import base64 from tornado.httputil import parse_multipart_form_data from tornado.ioloop import IOLoop from tornado.gen import coroutine, Return, engine from tor...
#!/usr/bin/env python import sys import socket import binascii from contextlib import closing class PatliteState(object): """ This is a patlite state class """ # target class Target(object): LIGHT_RED = 0 LIGHT_YELLOW = 1 LIGHT_GREEN = 2 LIGHT_BLUE = 3 LIGHT_WHITE =...
""".""" import logging import os import time import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from no_imagination.baseops import BaseOps from no_imagination.utils import get_current_timestamp, get_project_directory from pylogging import HandlerType, setup_logger from tensorflow.examples.tuto...
# Copyright (c) 2010 Resolver Systems Ltd, PythonAnywhere LLP # See LICENSE.md # from __future__ import with_statement try: import unittest2 as unittest except ImportError: import unittest from mock import Mock, patch from StringIO import StringIO import xlrd from dirigible.test_utils import ResolverTestCas...
# Django settings for django_stormpath project. import os import sys from uuid import uuid4 from stormpath.client import Client ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '.')) sys.path.insert(0, os.path.abspath(os.path.join(ROOT_DIR, '..'))) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = (...
# Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# -*- coding: utf-8 -*- """ Created on Tue Dec 02 09:26:29 2014 Example (not fully working) for Matplotlib widget, taken from http://matplotlib.1069221.n5.nabble.com/Figure-with-pyQt-td19095.html """ ############################## #!/usr/bin/env python import os import sys from PyQt4 import QtCore, QtGui from m...
# Copyright 2014, Hewlett-Packard Development Company, L.P. # 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-...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from hypothesis import given from caffe2.python import core, workspace from caffe2.proto import caffe2_pb2 import caffe2.python.hypothesis_test_util as hu import hypothe...
#!/usr/bin/env python3 import sys if sys.version_info < (3, 3): raise RuntimeError('At least Python 3.3 is required') import struct from datetime import datetime, timedelta from pytz import utc import filestuff, worker, common import fcntl, os.path, stat, os, itertools from os import fstat, mkdir, fchmod, chmod, utim...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
############################################################################## # # Copyright 2008 Lovely Systems GmbH # # 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...
from datetime import datetime, timedelta import hashlib from werkzeug.security import generate_password_hash, check_password_hash from itsdangerous import Signer, TimedJSONWebSignatureSerializer as Serializer,\ SignatureExpired, BadSignature from flask import current_app, request, session from flask.ext.login impor...
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import sys import unittest from iptest import IronPythonTestCase, big, is_cli, run_test def g(self): y = 4...
from time import sleep from lettuce import step, world from questionnaire.features.pages.questionnaires import QuestionnairePage from questionnaire.features.pages.questions import QuestionListingPage, CreateQuestionPage from questionnaire.models import Question, Theme, Questionnaire, Section, SubSection, QuestionGroup,...
# Copyright 2013 the V8 project authors. 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 conditi...
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without # #modification, are permitted provided that the following conditions are #met: # # * Redistr...
#---------------------------------------------------------------------- # Copyright (c) 2008 Board of Trustees, Princeton University # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, i...
#!/usr/bin/env python """Implementation of a router class that does no ACL checks.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from grr_response_server.gui import api_call_router from grr_response_server.gui.api_plugins import artifact as api_artif...
#!/usr/bin/env python -u # -------------------------------------------------------------------------- # # Copyright 2011, MadeiraCloud (support@madeiracloud.com) # # -------------------------------------------------------------------------- # """MadeiraCloud Agent """ import os import sys import ...
#!/usr/bin/env python from __future__ import print_function """ .. module:: keyboard :platform: Unix, :synopsis: Functions to manage the keyboards used by the application .. moduleauthor:: Diogenes Oliveira <diogenes1oliveira+github@gmail.com> This module implements functions to manage the keyboards used by th...
########## # ftszring_draw.py # Generates JSON file for visualization of FtsZRing with Javascript. # # Author: Ruby Lee, Covert Lab ########## import numpy as np import os import random import scipy import scipy.io import sys baseDir = sys.argv[1] simBatch = sys.argv[2] simIdx = sys.argv[3] simDir = baseDir + '/' + s...
""" Test for go.billing.django_utils. """ import json from decimal import Decimal import mock from go.vumitools.tests.helpers import djangotest_imports with djangotest_imports(globals()): from go.base.tests.helpers import GoDjangoTestCase, DjangoVumiApiHelper from go.billing.models import Account, Transacti...
#!/usr/bin/env python import re import socket import sys from argparse import ArgumentParser class ArgumentsException(Exception): pass class Request(): def __init__(self, input_file, validate, quiet): self.bytes = self.get_req_from_file(input_file) self.validate_request(validate, quiet) ...
# -*- coding: utf-8 -*- import socket import random from BeautifulSoup import BeautifulSoup from logging.handlers import RotatingFileHandler import time import logging import mechanize import os import re import sys from random import randint from datetime import datetime, timedelta from utils import * from urllib impo...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack LLC. # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """build query for doclistview and return results""" import frappe, json import frappe.permissions from frappe.model.db_query import DatabaseQuery from frappe import _ @frappe.w...
from draughtcraft.lib.units import InvalidUnitException import math class Calculations(object): def __init__(self, recipe): self.recipe = recipe # # Gravity and alcohol content calculations # @property def og(self): """ Original gravity of the recipe. """ ...
## # Copyright (c) 2009-2017 Apple Inc. All rights reserved. # # 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, mod...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.test import TestCase from zerver.lib.test_helpers import ( most_recent_message, most_recent_usermessage, ) from zerver.lib.test_classes import ( ZulipTestCase, ) from zerver.models import ( get_display_recipient, get_stream, ...
# -*- coding: utf-8 -*- from __future__ import print_function import datetime import multiprocessing import csv from time import sleep import os import traceback import time from globalvalues import RPI if RPI: import RPi.GPIO as GPIO from globalvalues import DEFAULT_DATALOG import cust_crypt def datetime_fro...
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:12705") ...
''' Figures from the galaxy-scale PV-slices made in HI_pvslices.py ''' from spectral_cube import SpectralCube, Projection import pvextractor as pv from astropy.io import fits from astropy import units as u import numpy as np import matplotlib.pyplot as plt from astropy.stats import mad_std from aplpy import FITSFigur...
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- import caffe import yaml import numpy as np import nump...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'DatabaseUpgrade.can_do_retry' db.add_column(u'maintenance...
import random from .CurrentRateMeasure import Measure from BitTornado.bitfield import Bitfield from BitTornado.clock import clock EXPIRE_TIME = 60 * 60 class PerIPStats: def __init__(self, ip): self.numgood = 0 self.bad = {} self.numconnections = 0 self.lastdownload = None ...
from selenium import webdriver from selenium.webdriver.common.keys import Keys import unittest import transaction from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid import testing from .models import DBSession from unittest.mock import p...
# Copyright 2019 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 ...
#!/usr/bin/env python # Copyright JS Foundation and other contributors, http://js.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....
#!/usr/bin/env python3 import abc from array import array import enum from bokem import _dump_sequence from .exceptions import TilesExhausted, OutOfPlays import bokem.bokem # ===================================================================== class IPlayer(abc.ABC): # ----------------------------------------...
# 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 ...
""" Pipeline Preprocessing algorithms for Quicklook """ import numpy as np import os,sys import astropy import astropy.io.fits as fits from desispec import io from desispec.io import read_raw,read_image from desispec.io.meta import findfile from desispec.io.fluxcalibration import read_average_flux_calibration from de...
"""Python code parser.""" import sys import textwrap import tokenize as tk from io import StringIO from itertools import chain, dropwhile from pathlib import Path from re import compile as re from typing import Tuple from .utils import log __all__ = ( 'Parser', 'Definition', 'Module', 'Package', ...
# 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...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing M2M table for field mo_pers on 'Result' db.delete_table(db.sho...
from __future__ import print_function import functools import json import re import traceback from pymel.core import annotate, confirmDialog, cmds, createNode, evalDeferred, group, hide, ls, PyNode, scriptJob, spaceLocator, select, selected, textFieldButtonGrp, warning, polyCylinder, delete, polyPlane from pymel.cor...
#!/usr/bin/env python # encoding: utf-8 import requests from util import * from formats import * from math import ceil from construct import * from os.path import splitext, join from azure import WindowsAzureError from azure.servicemanagement import get_certificate_from_publish_settings from azure.servicemanagement i...
# ST2 uses Python 2.6 and ST3 uses Python 3.3. import sys, sublime, sublime_plugin, re, os, json PYTHON_VERSION = sys.version_info if PYTHON_VERSION[0] == 2: import imp shared_enums_module = os.path.join(os.getcwd(), "SharedEnums.py") imp.load_source("SharedEnums", shared_enums_module) del shared_enums_module shar...
"""distutils.command.build_ext Implements the Distutils 'build_ext' command, for building extension modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: build_ext.py 46103 2006-05-23 11:47:16Z ronald.ouss...
# coding=utf-8 # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import sys from abc ...
import platform import textwrap import pytest from conans.client.tools.env import environment_append from conans.model.ref import ConanFileReference from conans.test.utils.tools import TestClient @pytest.fixture def client(): lib_ref = ConanFileReference.loads("foolib/1.0") lib_conanfile = textwrap.dedent("...
from ..base import ParametrizedValue from ..utils import KeyValue class Pusher(ParametrizedValue): args_joiner = ',' class PusherSocket(Pusher): """Push metrics to a UDP server. Uses the following format: ``<metric> <type> <value>`` ``<type>`` - is in the numeric form of metric type. """ ...
from __future__ import unicode_literals from __future__ import absolute_import import logging from pypuppetdb.utils import json_to_datetime log = logging.getLogger(__name__) class Event(object): """This object represents an event. :param node: The hostname of the node this event fired on. :param status...
from django import forms from datetime import date, timedelta from general.models import Task, Process, Application, HumanTask, \ Reward, ValidationTask, MachineTask # SplitDataTask, FilterDataTask, from django.contrib.auth.models import User from django.forms import ModelForm from crispy_forms.helper import F...
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser engine for the grammar tables generated by pgen. The grammar table must be loaded first. See Parser/parser.c in the Python distribution for additional info on how this parsing engine works. ...
from __future__ import division import gzip import os import platform import sys from PyQt4.QtCore import * from PyQt4.QtGui import * from databaseschema import * from functions import * from xlwt import Workbook, easyxf import modelsandviews class ReportModel(QAbstractTableModel): def __init__(self, report...
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ import pyotp, os from frappe.utils.background_jobs import enqueue from pyqrcode import create as qrcreate from six import BytesIO from base64 i...
#!/usr/bin/env python """ Written by Joerg Dietrich <astro@joergdietrich.com>. Copyright 2015 Based on original code by Oliver Siemoneit. Copyright 2007 This code is licensed under the GNU GPL version 2, see COPYING for details. """ from __future__ import print_function, division from collections import Ord...
from math import log10, floor import models import datetime import argparse import collections import operator import importlib import logging import fnmatch import os import traceback import matplotlib as mpl mpl.use('Agg') import matplotlib.dates as mdates import matplotlib.pyplot as plt from time_bucket import Tim...
# Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # 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/LIC...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
from pandac.PandaModules import * from toontown.toonbase.ToontownGlobals import * from direct.task.TaskManagerGlobal import * from direct.gui.DirectGui import * from pandac.PandaModules import * from toontown.distributed.ToontownMsgTypes import * from direct.directnotify import DirectNotifyGlobal from direct.gui import...
# 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...
from __future__ import unicode_literals from time import time from django.contrib.auth.models import User from django.core.cache import cache from django.core.exceptions import ImproperlyConfigured, ValidationError from django.db import models from django.utils import timezone from django.utils.encoding import python...
#!/usr/bin/env python3 """ Automate your browser via telnet. Requirements: * Firefox * MozRepl add-on (https://addons.mozilla.org/en-US/firefox/addon/mozrepl/) - activate the add-on (under Tools -> MozRepl, "Start" and "Activate on startup") Documentation of gBrowser: * https://developer.mozilla.org/en-US/docs/XUL/...
from django.contrib.auth.models import User, Group from django.db import models from django.db import transaction from hs_core.models import BaseResource from hs_access_control.models.community import Community ############################################# # Classes involving privilege # # These manipulate privilege ...
from BCDataStream import * from enumeration import Enumeration from base58 import public_key_to_bc_address, hash_160_to_bc_address import logging import socket import time from util import short_hex, long_hex import struct def parse_CAddress(vds): d = {} d['nVersion'] = vds.read_int32() d['nTime'] = vds.read_uint...
# initSimulation.m # Initialization module. Cleans up some vehicle-related variables, sets up # orbiting body (Earth) parameters and atmosphere curves (data from # RealSolarSystem\RSSKopernicus.cfg). # std gravity asl [m/s2] g0 = 9.80665 # std gravity param for Earth [m3/s2] mu = 398600441800000 # Earth radius [m] R...
# 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...