gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, ...
import logging import os from collections import OrderedDict from inspect import isclass from io import StringIO from tempfile import NamedTemporaryFile from fontTools import mtiLib from fontTools.feaLib.builder import addOpenTypeFeaturesFromString from fontTools.feaLib.error import FeatureLibError, IncludedFeaNotFoun...
# -*- coding: utf-8 -*- from __future__ import division from collections import defaultdict from datetime import timedelta import locale from locale import gettext as _ import os from babelfish import Language from gi.repository import GObject, Gtk, Nautilus from subliminal import (VIDEO_EXTENSIONS, ProviderPool, __co...
# 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...
#!/usr/bin/env python # # Copyright 2012-2015 clowwindy # Copyleft 2017 isinstance # # 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...
# Copyright 2015-2017 Cisco Systems, 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 ...
import sys import functools import operator import weakref import inspect PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 if PY3: string_types = str, else: string_types = basestring, def with_metaclass(meta, *bases): """Create a base class with a metaclass.""" return meta("NewBase", bas...
# 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 ...
""" This is the base class for all level states (i.e. states where the player can move around the screen). Levels are differentiated by self.name and self.tmx_map. This class inherits from the generic state class found in the tools.py module. """ import copy, sys import pygame as pg from .. import tools, collision fro...
from haystack import indexes from ananta.search_indexes import ContentSearchIndexMixin from contacts.search_indexes import (PersonSearchIndexMixin, PledgePersonSearchIndexMixin) from .models import Pledge, FollowUp, Contribution, BulkPayment class PledgeIndex(ContentSearchIndexM...
import unittest class TestData(object): def __init__(self, entity=None, **kw): self.entity = entity self.__dict__.update(kw) class TestComponent(dict): def __init__(self, entities=()): self.entities = set(entities) def __getitem__(self, entity): return self.setdefault(entity, TestData(entity)) clas...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # mayhem/datatypes/elf.py # # 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 lis...
# 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 (t...
# -*- test-case-name: xmantissa.test.test_webapp -*- """ This module is the basis for Mantissa-based web applications. It provides several basic pluggable application-level features, most notably Powerup-based integration of the extensible hierarchical navigation system defined in xmantissa.webnav """ import os 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...
import logging import struct import re from .utils import s2n_motorola, s2n_intel, Ratio from .tags import * logger = logging.getLogger('exifread') class IfdTag: """ Eases dealing with tags. """ def __init__(self, printable, tag, field_type, values, field_offset, field_length): ...
# Copyright 2012 Anton Beloglazov # # 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 wri...
"""Support for Z-Wave door locks.""" import logging import voluptuous as vol from homeassistant.components.lock import DOMAIN, LockDevice from homeassistant.core import callback import homeassistant.helpers.config_validation as cv from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import ZW...
# Software License Agreement (BSD License) # # Copyright (c) 2009, Willow Garage, 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...
#author felipe from pyspark import SparkContext from pyspark.sql import SQLContext import sys import os from subprocess import Popen from dateutil import parser sc = SparkContext() sqlContext = SQLContext(sc) def help(): print("Usage: spark-submit (...) log_parsing.py"+\ "\n\t --in <input-path>\n\t\t# Direc...
"""Generate finely spaced grid of AGB yields using the Karakas (2010) yields. Karakas & Lattanzio (2010): M = 1.0, 1.25, 1.5, 1.75, 1.9, 2.0, 2.1, 2.25, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0, 6.5 (Zsolar only); Z = 0.0001, 0.004, 0.008, 0.02 """ from __future__ import print_function, division, absolute_import import os from ...
"""Attribute selector plugin. Oftentimes when testing you will want to select tests based on criteria rather then simply by filename. For example, you might want to run all tests except for the slow ones. You can do this with the Attribute selector plugin by setting attributes on your test methods. Here is an example:...
# 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 in writing, s...
# Copyright 2017-present Adtran, 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...
from quantopian.algorithm import attach_pipeline, pipeline_output from quantopian.pipeline import CustomFactor, Pipeline from quantopian.pipeline.data.builtin import USEquityPricing from quantopian.pipeline.factors import AverageDollarVolume from quantopian.pipeline.filters.morningstar import Q1500US from quantopian.pi...
"""Support for Automation Device Specification (ADS).""" import threading import struct import logging import ctypes from collections import namedtuple import asyncio import async_timeout import voluptuous as vol from homeassistant.const import ( CONF_DEVICE, CONF_IP_ADDRESS, CONF_PORT, EVENT_HOMEASSISTANT_STOP) ...
# pylint: disable=missing-docstring, multiple-statements, useless-object-inheritance,import-outside-toplevel # pylint: disable=too-few-public-methods, no-init, no-self-use,bare-except,broad-except, import-error from __future__ import print_function # pylint: disable=wrong-import-position from typing import TYPE_CHECKI...
#%% Finding and Correcting Cycle Slips # Greg Starr, Sebastijan Mrak #%% Import import numpy as np from scipy.interpolate import interp1d #%% Old Functions def quickCheck(data): """ same as Sebastijan's algorithm, just checks for the 1 or 2 slips-in-a-row pattern within nonmathematical arbitrary bounds ...
""" Contains stub data that is to be used within the tests to avoid DRY """ import json import factory from faker import Faker from biblib.models import User, Library from biblib.views import USER_ID_KEYWORD faker = Faker() def fake_bibcode(): """ Generate a fake bibliographic code used by the ADS. This shou...
# -*- coding: utf-8 -*- # Copyright (c)2012 Rackspace US, 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/LIC...
# Copyright 2012 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...
import uuid from . import config valid_types = ['counter', 'text', 'boolean', 'decimal', 'double', 'int', 'list', 'set', 'map', 'bigint', 'blob', 'tuple', 'dict', 'float', 'timestamp', 'time', 'date', 'numpy.ndarray'] basic_types = valid_types[:-1] def storage_id_from_name(name): return uuid.uuid...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ Classes for reading/manipulating/writing exciting input files. """ import xml.etree.cElementTree as ET import numpy as np import scipy.constants as const from monty.io import zopen from monty.json import ...
# # Copyright (C) 2013 Tommy Winther # http://tommy.winther.nu # # This Program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # Thi...
from __future__ import print_function # FUNCTIONS def addNums(a, b): """ Adds two numbers and returns the result. """ c = a + b return c # Calling a function print(addNums(5, 8)) # Input for the decimalHour function: 05:29:45 def decimalHour(time_string): """ Converts time from the 24hrs hh:mm:...
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# Copyright (c) 2012-2013 Paul Tagliamonte <paultag@debian.org> # Copyright (c) 2014-2015 Clement Schreiner <clement@mux.me> # Copyright (c) 2015 Lucas Kanashiro <kanashiro.duarte@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documenta...
from functools import partial from itertools import product from string import ascii_letters import numpy as np from pandas import ( Categorical, DataFrame, MultiIndex, Series, Timestamp, date_range, period_range, ) from .pandas_vb_common import tm method_blocklist = { "object": { ...
from __future__ import division from numpy import linalg as la import sys as sys import os as os import numpy as np import math as math import time as time import xml.dom.minidom as dom import argparse as arg import re as re import getpass a...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
import remi.gui as gui from remi import start, App import math class SvgPolygon(gui.SvgPolyline): def __init__(self, _maxlen=None, *args, **kwargs): super(SvgPolygon, self).__init__(_maxlen, *args, **kwargs) self.type = 'polygon' def set_stroke(self, width=1, color='black'): """Sets th...
"""Service calling related helpers.""" import asyncio import logging from os import path import voluptuous as vol from homeassistant.auth.permissions.const import POLICY_CONTROL from homeassistant.const import ATTR_ENTITY_ID, ENTITY_MATCH_ALL import homeassistant.core as ha from homeassistant.exceptions import Templa...
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import numpy as np import warnings from sklearn import datasets from sklearn.base import clone from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble import GradientBoostingRegressor from sklearn.ensemble.gra...
from datetime import date from unittest import TestCase import pytest from . import GenericCalendarTest from ..europe import ( Scotland, Aberdeen, Angus, Arbroath, Ayr, CarnoustieMonifieth, Clydebank, DumfriesGalloway, Dundee, EastDunbartonshire, Edinburgh, Elgin, Falkirk, Fife, Galashiels, Glasgow, Hawic...
from __future__ import print_function import gdbremote_testcase import lldbgdbserverutils from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestGdbRemoteProcessInfo(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(_...
#!/usr/bin/python # Copyright (c) 2010-2012 OpenStack, 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...
import os import socket from os import path from uuid import uuid4 from cattle.utils import memoize CONFIG_OVERRIDE = {} try: import eventlet # NOQA except: pass def default_value(name, default): if name in CONFIG_OVERRIDE: return CONFIG_OVERRIDE[name] result = os.environ.get('CATTLE_%s'...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
# 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...
# Copyright (c) 2012 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 ...
# This file is part of beets. # Copyright 2016, Thomas Scholtes # # 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, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # # Unle...
# coding: utf-8 from uuid import uuid4 import re import unicodedata import urllib from google.appengine.datastore.datastore_query import Cursor from google.appengine.ext import ndb from werkzeug import utils as w_utils import flask import funcy #######################################################################...
# Copyright (c) 2009, 2010, 2011 Nicira, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# -*- 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 'Video.description' db.add_column(u'catalog_video', 'descr...
import copy from functools import partial import json import os import requests import sys import subprocess import time import traceback try: import urlparse except ImportError: from urllib import parse as urlparse UPSTREAMABLE_PATH = 'tests/wpt/web-platform-tests/' NO_SYNC_SIGNAL = '[no-wpt-sync]' def upstr...
#!/usr/bin/env python2.7 # Copyright 2015, 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 lis...
# (c) Copyright 2012-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/lic...
# Testing the line trace facility. from test import test_support import unittest import sys import difflib # A very basic example. If this fails, we're in deep trouble. def basic(): return 1 basic.events = [(0, 'call'), (1, 'line'), (1, 'return')] # Many of the tests below are t...
import shutil from django.contrib.auth.models import User from django.contrib.admin import site as default_admin_site from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from django.core.files import File from django.conf import settings from django.forms.formsets import DE...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
""" terminal reporting of the full testing process. This is a good source for looking at the various reporting hooks. """ from __future__ import absolute_import, division, print_function import itertools from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_INTERRUPTED, \ EXIT_USAGEERROR, EXIT_NOTESTSCOLLECTED...
from __future__ import unicode_literals, absolute_import, print_function import calendar from decimal import Decimal import random import datetime import uuid from django.conf import settings from django.core.management import call_command from dimagi.utils.dates import add_months from dimagi.utils.data import genera...
# 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...
# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
""" Create segment definitions for prjxray interconnect. """ import argparse from prjxray.db import Database import re from collections import OrderedDict def add_segment_wires(db, tile, wires, segments): """ Adds to the set segment wires. """ tile = db.get_tile_type(tile) for pip in tile.get_pips(): ...
#!/usr/bin/python2.5 # Copyright (C) 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 la...
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
import json import hashlib from flask import Blueprint, jsonify, url_for, request, current_app, Response, render_template_string, redirect from dict2xml import dict2xml from labmanager.db import db from labmanager.models import RLMS, Laboratory, EmbedApplication from labmanager.rlms import get_manager_class, Capabili...
# coding=utf-8 from __future__ import absolute_import, unicode_literals from decimal import Decimal from django import VERSION from django.core.exceptions import ValidationError from django.db import models from django.db.models import Field from django.db.models.expressions import ( BaseExpression, Expression, F...
''' xml_file_listing.py Author : James Mnatzaganian Contact : http://techtorials.me Version : 1.0 Date Created : 12/21/2013 Date Modified : 12/28/2013 Python Version: 2.7 Purpose: Module for building XML files from a file path License: The MIT License (MIT) Copyright (c) 2013 Jame...
import re class version_info(object): def __init__(self, verstr): """verstr - version string""" m1 = re.match('(.*?)([RBIXSF-])(.*)', verstr) self.type = m1.group(2) self.major = tuple(map(int, m1.group(1).split('.'))) # creates tuyple after_type = m1.group(3).split('.')...
""" Extended math utilities. """ # Authors: Gael Varoquaux # Alexandre Gramfort # Alexandre T. Passos # Olivier Grisel # Lars Buitinck # Stefan van der Walt # Kyle Kastner # Giorgio Patrini # License: BSD 3 clause from __future__ import division from funct...
#!/usr/bin/env python # # Merge multiple JavaScript source code files into one. # # Usage: # This script requires source files to have dependencies specified in them. # # Dependencies are specified with a comment of the form: # # // @requires <file path> # # e.g. # # // @requires Geo/DataSource.js # # This scri...
"""Methods for running sequential selection. Sequential (forward or backward) selection is explained in Section xxx of Webb (yyyy). """ import copy import pickle import numpy import keras.utils import sklearn.base from gewittergefahr.gg_utils import file_system_utils from gewittergefahr.gg_utils import error_checking...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
from __future__ import annotations from math import exp, sqrt import numpy as np from numpy.linalg import norm from dxtbx import flumpy from libtbx.phil import parse from scitbx import matrix from scitbx.linalg import eigensystem, l_l_transpose_cholesky_decomposition_in_place from dials.algorithms.profile_model.ell...
# coding: utf-8 # Copyright (c) 2012 Gregg Gajic <gregg.gajic@gmail.com> # # 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 u...
# # 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...
from py.test import raises from flask import Flask, Response, g from flask.ext.principal import Principal, Permission, Denial, RolePermit, \ PermissionDenied, identity_changed, Identity, identity_loaded def _on_principal_init(sender, identity): if identity.uid == 'ali': identity.provides(RolePermit...
#!/usr/bin/env python # # Use the raw transactions API to spend bitcoins received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a bitcoind or Bit...
# ----------------------------------------------------------------------------- # cpp.py # # Author: David Beazley (http://www.dabeaz.com) # Copyright (C) 2017 # All rights reserved # # This module implements an ANSI-C style lexical preprocessor for PLY. # --------------------------------------------------------------...
#!/usr/bin/env python # # Copyright (C) 2014, 2015 # Brian Caswell <bmc@lungetech.com> # Narf Industries <info@narfindustries.com> # # 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 withou...
"""A full cache system written on top of Django's rudimentary one. Frequently used functions are: cache_set(*keys, **kwargs) cache_get(*keys, **kwargs) cache_delete(*keys, **kwargs) keys.. parameters of general type which are convertable to string or hashable unambiguously. The keys can be of any general t...
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 Benjamin Peterson # # 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 with...
# 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...
# Copyright (c) 2016 Cisco Systems # 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 require...
#!/usr/bin/env python from tornado import httpclient, simple_httpclient, netutil from tornado.escape import json_decode, utf8, _unicode, recursive_unicode, native_str from tornado.httpserver import HTTPServer from tornado.httputil import HTTPHeaders from tornado.iostream import IOStream from tornado.simple_httpclient ...
#!/usr/bin/env python # # zip up the titanium mobile SDKs into suitable distribution formats # import os, types, glob, shutil, sys, platform, codecs import zipfile, datetime, subprocess, tempfile, time sys.path.append(os.path.join(os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)),'..','support','co...
# Copyright 2015-2016 Yelp 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 writin...
# Suppress pylint messages concerning missing class and method docstrings # pylint: disable=C0111 # Suppress pylint warning about attribute defined outside __init__ # pylint: disable=W0201 # Suppress pylint warning about access to protected member # pylint: disable=W0212 # Suppress pylint warning about unused argume...
# Copyright (c) 2015 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 ...
""" Controlador para suportar mobilidade de hosts utilizando SDN. Controlador desenvolvido utilizando o framework Ryu Disciplima: CMP 182 - Redes de Computadores I Professor: Dr. Luciano Paschoal Gaspary Autor: Iulisloi Zacarias E-mail: izacarias at inf dot ufrgs dot br Data: 27/06/2016...
import os import yaml import six DOCKER_CONFIG_KEYS = [ 'cap_add', 'cap_drop', 'cpu_shares', 'cpuset', 'command', 'detach', 'devices', 'dns', 'dns_search', 'domainname', 'entrypoint', 'env_file', 'environment', 'extra_hosts', 'read_only', 'hostname', ...
from direct.gui.DirectGui import * from pandac.PandaModules import * from direct.task.Task import Task from direct.fsm import StateData from direct.showbase import AppRunnerGlobal from direct.directnotify import DirectNotifyGlobal from toontown.toonbase import TTLocalizer from toontown.toontowngui import TTDialog from ...
#!/usr/bin/env python # # Copyright 2009 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of...
# Copyright 2020 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 -*- import serial import os import time import tempfile from filelock import FileLock # from pprint import pprint actual_codes = {} common_codes = { 'aspect43' : b"kc 00 01", 'aspect169' : b"kc 00 02", 'aspectstatus' : b"kc 00 ff", 'poweroff' : b"ka 00 00", 'po...
# Copyright (c) 2014, Florian Scherf <fscherf@gmx.net>. 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 # t...