gt
stringclasses
1 value
context
stringlengths
2.49k
119k
"""Compatibility module.""" from __future__ import unicode_literals import sys import os import stat import re import unicodedata from functools import wraps import warnings from typing import Any, Callable, Tuple, AnyStr, Match, Pattern, Optional, cast PY37 = (3, 7) <= sys.version_info PY310 = (3, 10) <= sys.version_...
# 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...
#!/usr/bin/env python import sys, os, itertools, shutil, getopt, re import conf import pdb, traceback import metacomm.combinatorics.all_pairs2 all_pairs = metacomm.combinatorics.all_pairs2.all_pairs2 def do_Selfcom(self_combin_file,out_file): try: file = open(self_combin_file) allpairs_in = open(...
#!/usr/bin/env python # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # 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...
# 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 ...
""" Compare the performance of different model parameters """ # import packages import toolbox import GPy import json import os import pandas as pd from sklearn.metrics import mean_squared_error as MSE from sklearn import neural_network import matplotlib.pyplot as plt #################################################...
from itertools import chain, groupby import numpy as np from ._base import Descriptor from ._graph_matrix import DistanceMatrix __all__ = ( "InformationContent", "TotalIC", "StructuralIC", "BondingIC", "ComplementaryIC", "ModifiedIC", "ZModifiedIC", ) class BFSTree(object): __slots_...
#!/usr/bin/env py import os import os.path import sys sys.path.append(os.getenv('HELIX_WORK_ROOT')) import copy """ This is a temporary solution to gather h/w info from machine the package is installed on end machines running perf However this runs on a limited number of platforms (but supports all the flavors we c...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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 -*- # Copyright 2017, Digital Reasoning # # 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...
"""Shared OS X support functions.""" import os import re import sys __all__ = [ 'compiler_fixup', 'customize_config_vars', 'customize_compiler', 'get_platform_osx', ] # configuration variables that may contain universal build flags, # like "-arch" or "-isdkroot", that may need customization for # the...
# Copyright (c) 2012, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) # tdot function courtesy of Ian Murray: # Iain Murray, April 2013. iain contactable via iainmurray.net # http://homepages.inf.ed.ac.uk/imurray2/code/tdot/tdot.py import numpy as np from scipy import linalg...
from pathlib import Path from tempfile import NamedTemporaryFile from unittest import TestCase from unittest.mock import patch import pytest from parameterized import parameterized from transformers import AutoConfig, AutoFeatureExtractor, AutoTokenizer, is_tf_available, is_torch_available from transformers.onnx impo...
""" Copyright 2014 Matt Heitzenroder 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, softw...
import socket, struct from common import * from binascii import hexlify, unhexlify def enum(**enums): return type('Enum', (), enums) class TCPGecko: def __init__(self, *args): self.s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP) print("Connecting to " + str(args[0]) +...
from PIL import Image from PIL import ImageDraw from PIL import ImageChops import random def message_transition(func): func.is_message_transition = True func.is_display_transition = False def display_transition(func): func.is_message_transition = False func.is_display_transition = True def FlashStars...
# ------------------------------------------------------------------------------------------------ # 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 ...
# 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 random import numpy.random as nr import processes as proc import molecules as mol from processes import Process from molecules import BioMoleculeCount from molecules import BioMolecule ''' Klassen, mit Objekten (DNA, Helicase, Polymerase), Prozess (Replikation). Elternklasse (z.B. BioMolecule, BioMoleculeCount...
#!/usr/bin/env python3 import re import sys import json import requests from lxml import etree from pymods import OAIReader from bs4 import BeautifulSoup sys.path.append('../assets') import assets tn = {'name': 'sobek', 'prefix': 'http://dpanther.fiu.edu/sobek/content'} nameSpace_default = { None: '{http://www.loc....
import ply.yacc as yacc from exception import ParseException # necessary even though not explicitly used from lexer import tokens # The parser returns a dictionary describing the contents of the line. # line_no: int # label: string for a label on the line # directive: dictionary { # align: int # address: i...
"""Supporting functions for polydata and grid objects.""" import os import collections.abc import enum import logging import signal import sys from threading import Thread import threading import traceback import numpy as np from pyvista import _vtk import pyvista from .fileio import from_meshio from . import transf...
#!/usr/bin/python # # Copyright (C) 2007 SIOS Technology, 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 appli...
# Copyright 2015 Software Freedom Conservancy # Copyright 2007-2009 WebDriver committers # Copyright 2007-2009 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....
#!/usr/bin/env python # fastqc 0.0.1 # Generated by dx-app-wizard. # # Parallelized execution pattern: Your app will generate multiple jobs # to perform some computation in parallel, followed by a final # "postprocess" stage that will perform any additional computations as # necessary. # # See https://wiki.dnanexus.com...
from __future__ import division, print_function, absolute_import import tensorflow as tf import functools import numpy as np from selfsup.util import DummyDict from selfsup import ops, caffe from selfsup.moving_averages import ExponentialMovingAverageExtended import sys def _pretrained_resnet_conv_weights_initializer...
# # Session 5, part 3 # print("Begin import...") import sys import os import numpy as np import matplotlib.pyplot as plt from skimage.transform import resize #from skimage import data # ERROR: Cannot load libmkl_def.so from scipy.misc import imresize from scipy.ndimage.filters import gaussian_filter print("Loading ...
from past.builtins import basestring import os import itertools import builtins import json import logging import warnings from math import ceil from contextlib import contextmanager from django.apps import apps from django.db import connection from django.db.migrations.operations.base import Operation from osf.mode...
#!/usr/bin/python # -*- coding: utf-8 -*- #print("Content-type:text/html\r\n\r\n") from six import iteritems import cgi, cgitb import os, shutil import sys, traceback from modules.logintools import login import urllib from modules.gitdox_sql import * from modules.gitdox_git import * from modules.configobj import Conf...
#-*- coding:utf-8 -*- import logging logging.basicConfig(level=logging.ERROR) import asyncio from pyblog.taskqueue import QueuePayloadJsonEncapsulator from pyblog.config import Config try: import aiomysql except ImportError: logging.error("can't import 'aiomysql' module") exit(-1) try: import aioredis e...
from pprint import pprint as pp import pytest from scout.exceptions import IntegrityError def test_add_panel(adapter, testpanel_obj): ## GIVEN a adapter with without panels assert adapter.panel_collection.find_one() is None ## WHEN inserting a panel adapter.add_gene_panel(testpanel_obj) ## THEN ...
## Copyright 2013 Matthew A. Robinson ## ## 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 # -*- coding: utf-8 -*- """Definitions shared by multiple clients.""" from collections import namedtuple import sys from google.protobuf.descriptor import FieldDescriptor import gmusicapi from gmusicapi.compat import json from gmusicapi.exceptions import ( CallFailure, ParseException, Vali...
# 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...
######### # Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# Copyright (C) 2010-2011 Richard Lincoln # # 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, modify, merge, publish...
""" # Support Code ## Standard Headers """ from __future__ import division,print_function import sys,random,math sys.dont_write_bytecode = True from settingsWhere import * """ ## Simple, low-level stuff ### Maths Stuff """ def gt(x,y): return x > y def lt(x,y): return x < y def medianIQR(lst, ordered=False): ...
from time import sleep from typing import TYPE_CHECKING, Any, Optional from upcloud_api.firewall import FirewallRule from upcloud_api.ip_address import IPAddress from upcloud_api.storage import Storage from upcloud_api.utils import try_it_n_times if TYPE_CHECKING: from upcloud_api import CloudManager def login_...
import pytest try: from unittest.mock import Mock except ImportError: # pragma: no cover from mock import Mock import collections import openpathsampling as paths from openpathsampling.tests.test_helpers import make_1d_traj from openpathsampling.tests.analysis.utils.fixture_classes import ( TPSSystemFi...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Graphic User Interface.""" import sys import os import glob import ConfigParser from PyQt4.QtCore import * from PyQt4.QtGui import * from froi.version import __version__ from base.labelconfig import ...
#!/usr/bin/env python # # Camlistore blob server for App Engine. # # Derived from Brad's Brackup-gae utility: # http://github.com/bradfitz/brackup-gae-server # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lic...
#Generic Geocoding Script #Requires the GeoPy library and Python 2.7 to run. #To test without having geopy installed comment out 'import geopy', 'from geopy.geocoders import Nominatim', and 'geolocator = Nominatim()' and all geocoding will fail. #For editing csv files import csv import shutil import geopy #For geoco...
# Copyright 2018 ARM Limited # # 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...
# Copyright 2016 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 a...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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 ...
# # 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...
# 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 ...
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
from __future__ import absolute_import from ...spec.base import NullContext from ...scan import Dispatcher from ...errs import SchemaError from ...utils import scope_compose, get_or_none from ...consts import private from ...spec.v1_2.objects import ( ResourceList, Resource, Operation, Authorization, ...
# Copyright 2015 FUJITSU LIMITED # # 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...
#!/usr/bin/env python3 # import rospkg import cv2 import numpy as np import random # rospack = rospkg.RosPack() # pkg_path = rospack.get_path('stopsign') pkg_path = '/home/buck/ros_ws/src/stopsign' IMAGE_RATE = 11 # hz EXACT_FILE = '%s/data/013_extra_man_labels/all_500.csv' % (pkg_path,) start_image_id = 1 end_im...
#!/usr/bin/python from __future__ import print_function from contextlib import closing import threading import configparser import re import getopt import time import pymysql import sys import traceback from geoInfo.MaxMindRepo import MaxMindRepo def usage(msg="Usage"): print(msg) print('python3 '+sys.arg...
#!/usr/bin/env python # # Generated Fri Sep 23 15:48:06 2011 by generateDS.py version 2.6b. # import sys import people_api as supermod etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_import_library = None try: # ...
''' Created on 8 May 2019 @author: si ''' from datetime import datetime from multiprocessing import Process, Pipe from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from pi_fly.actional.abstract import CommsMessage from pi_fly.actional.actional_management import build_actional_processes, go...
import os import unittest from pysd.tools.benchmarking import runner, assert_frames_close rtol = .05 _root = os.path.dirname(__file__) test_models = os.path.join(_root, "test-models/tests") class TestIntegrationExamples(unittest.TestCase): def test_abs(self): output, canon = runner(test_models + '/abs...
# Copyright 2011 OpenStack Foundation # All Rights Reserved. # Copyright 2013 IBM Corp. # # 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 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 sys import numpy as np from numpy.testing import * def assert_dtype_equal(a, b): assert_equal(a, b) assert_equal(hash(a), hash(b), "two equivalent types do not hash to the same value !") def assert_dtype_not_equal(a, b): assert_(a != b) assert_(hash(a) != hash(b), "...
"""Voluptuous schemas for the KNX integration.""" from __future__ import annotations from abc import ABC from collections import OrderedDict from typing import Any, ClassVar, Final import voluptuous as vol from xknx import XKNX from xknx.devices.climate import SetpointShiftMode from xknx.dpt import DPTBase, DPTNumeri...
import os import xbmc, xbmcgui, mc import ConfigParser import common available_providers = ['Addic7ed', 'BierDopje', 'OpenSubtitles', 'SubsWiki', 'Subtitulos', 'Undertexter'] # Set some default values for the subtitles handling def register_defaults(): subtitle_provider("get", "default") subtitle_provider("ge...
#---------------------------------------------------------------------- # Copyright (c) 2016 Inria/iMinds by Arthur Garnier # # 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, including ...
from __future__ import absolute_import import time from sentry.utils.iterators import chunked from sentry.utils.redis import load_script index = load_script('similarity/index.lua') def band(n, value): assert len(value) % n == 0 return list(chunked(value, len(value) / n)) class MinHashIndex(object): d...
#! /usr/bin/python3 # * database.py * # # * Nicholas DiBari * # # * --------------------------------------------- * # # * Provides user interface for Get Quote * # # * DataBase Management * # # * -------------------------...
# -*- coding: utf-8 - # # Copyright (c) 2008, 2009 Benoit Chesneau <benoitc@e-engura.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWA...
# 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 ...
# -*- coding: utf-8 -*- # # Copyright 2018 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND...
"""The tests for Monoprice Media player platform.""" import unittest from unittest import mock import voluptuous as vol from collections import defaultdict from homeassistant.components.media_player import ( DOMAIN, SUPPORT_TURN_ON, SUPPORT_TURN_OFF, SUPPORT_VOLUME_MUTE, SUPPORT_VOLUME_SET, SUPPORT_VOLUME_STEP...
import logging from xml.etree import ElementTree as etree from xml.parsers import expat try: from oslo_serialization import jsonutils except ImportError: from oslo.serialization import jsonutils from builtins import int import six from . import constants from . import exceptions as exception from ..i18n impo...
# -*- coding: utf-8 -*- from __future__ import absolute_import from typing import Any, Callable, Optional from django.conf import settings from django.http import HttpRequest, HttpResponse from django.test import TestCase from zerver.models import ( get_client, get_realm_by_string_id, get_stream, get_user_profile...
# =============================================================================== # Copyright 2011 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licens...
"""Let's Encrypt client API.""" import logging import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import rsa import OpenSSL import zope.component from acme import client as acme_client from acme import jose from acme import messages from letsencrypt impo...
""" Various complex queries that have been problematic in the past. """ from __future__ import unicode_literals import threading from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible class DumbCategory(models.Model): pass class ProxyCategory(Du...
VULNERABILITIES_SEARCH_RESPONSE = { "vulnerabilities": [ { "id": 1, "status": "open", "closed_at": None, "created_at": "Kenna", "due_date": "Kenna", "notes": "Kenna", "port": [], "priority": 1, "ident...
# Copyright (c) 2013 Rackspace Hosting # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
__author__ = 'saeedamen' # # Copyright 2015 Thalesians Ltd. - http//www.thalesians.com / @thalesians # # 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 ...
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
# -*- coding: utf-8 # 'version': '0.3' # # Copyright (c) 2017, Stephen B, Hope, All rights reserved. # # CommAI-env Copyright (c) 2016-present, Facebook, Inc., All rights reserved. # Round1 Copyright (c) 2017-present, GoodAI All rights reserved. # # This source code is licensed under the BSD-style license found in the...
# Copyright 2007 The Spitfire Authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import __builtin__ import copy import logging import os.path import re from spitfire.compiler import ast from spitfire.compiler import analyzer from spitf...
from collections import namedtuple from copy import copy from .array import Array, ArrayError from .location import Location class BoardError(Exception): pass class Board(Array): """ Stores board locations. Provides methods to carry out game logic. """ BLACK = Location('black') WHITE = Loc...
""" To run this test, type this in command line <kolibri manage test -- kolibri.content> """ import datetime import os import shutil import tempfile from django.test import TestCase from django.core.management import call_command from django.core.urlresolvers import reverse from django.db import connections from django...
""" Custom storage for django with Mosso Cloud Files backend. Created by Rich Leland <rich@richleland.com>. """ from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files import File from django.core.files.storage import Storage from django.utils.text import get_vali...
#!/usr/bin/env python import sys import tempfile import time import os import subprocess import argparse import logging from contextlib import contextmanager import uuid log = logging.getLogger("serviced-tests") SERVICED_ROOT = os.path.dirname(os.path.abspath(__file__)) DEVNULL = open(os.devnull, 'w') def fail(...
"""The tests for the MQTT light platform. Configuration for RGB Version with brightness: light: platform: mqtt name: "Office Light RGB" state_topic: "office/rgb1/light/status" command_topic: "office/rgb1/light/switch" brightness_state_topic: "office/rgb1/brightness/status" brightness_command_topic: "offic...
import unittest from ctypes import * from ctypes.test import need_symbol import _ctypes_test class Callbacks(unittest.TestCase): functype = CFUNCTYPE ## def tearDown(self): ## import gc ## gc.collect() def callback(self, *args): self.got_args = args return args[-1] def c...
#!/usr/bin/env python2 # encoding: utf-8 """ cache.py Simple functionality to help to avoid reading in file data multiple times. Motivated by a practical use of the relatrix code. Created by Shane O'Connor 2016. """ import os import datetime import operator import traceback import json from klab import colortext fro...
def __rope_start_everything(): import os import sys import socket import pickle import marshal import inspect import types import threading class _MessageSender(object): def send_data(self, data): pass class _SocketSender(_MessageSender): def __in...
#!/usr/bin/env python import os.path from PySide import QtCore, QtGui, QtOpenGL from PySide.QtCore import Qt from PySide.QtGui import QStyle, QBrush, QColor, QPen, QIcon, QPalette from juma.core import signals, app, AssetRefType from juma.moai.MOAIRuntime import MOAIRuntim...
import time import random from os import path import subprocess import pytest import cattle REPLICA = 'tcp://localhost:9502' REPLICA2 = 'tcp://localhost:9505' @pytest.fixture def controller_client(request): url = 'http://localhost:9501/v1/schemas' c = cattle.from_env(url=url) request.addfinalizer(lambd...
# -*- 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 or...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Proxy models for augmenting our source data tables with methods useful for processing. """ from __future__ import unicode_literals from django.db.models.functions import Cast # Models from django.db.models import ( IntegerField, Case, Q, When ) from .el...
# -*- coding: utf-8 -*- # # 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 #...
# -*- 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): # Changing field 'PayPalPDT.case_id' db.alter_column(u'paypal_pdt', 'cas...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
#!/usr/bin/env python # # Copyright 2006-2008 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 # ...
# Copyright 2009-2015 MongoDB, 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...
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Project Management module views """ from django.shortcuts import get_object_or_404 from django.template import RequestContext from django.http import HttpResponseRedirect, Http404 from django.core.urlre...
<<<<<<< HEAD <<<<<<< HEAD # -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # ...
#!/usr/bin/env python # vim: sw=2 ts=2 import click import os import sys @click.command() ### Cluster options @click.option('--console-port', default='443', type=click.IntRange(1,65535), help='OpenShift web console port', show_default=True) @click.option('--deployment-type', default='openshift-enterpri...