gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from pandac.PandaModules import *
import sys,os
#loadPrcFileData("", "fullscreen 1")
#loadPrcFileData('', 'show-buffers 1')
#loadPrcFileData("", "framebuffer-multisample 1")
#loadPrcFileData("", 'vfs-case-sensitive 0')
# loadPrcFileData('', 'want-pstats 1')
# os.spawnl(os.P_NOWAIT, "D:/Panda3D-1.3.2/bin/pstats.exe")
... | |
import asyncio
import threading
from _weakref import ref
from _weakrefset import _IterationGuard
from pydispatch.utils import (
WeakMethodContainer,
get_method_vars,
_remove_dead_weakref,
)
class AioEmissionHoldLock(object):
"""Async context manager mixin for :class:`pydispatch.utils.EmissionHoldLock_... | |
from direct.gui.DirectGui import *
from pandac.PandaModules import *
import ShtikerPage
from toontown.battle import SuitBattleGlobals
from toontown.coghq import CogDisguiseGlobals
from toontown.suit import SuitDNA
from toontown.toonbase import TTLocalizer
from toontown.toonbase import ToontownGlobals
DeptColors = (
... | |
import datetime
import math
import urlparse
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import connection
from django.utils.encoding import smart_str
import jinja2
from jingo import env, register
from tower import ugettext as _
from tower import ugettext_lazy as _lazy
... | |
"""
Module with location helpers.
detect_location_info and elevation are mocked by default during tests.
"""
import collections
import math
from typing import Any, Optional, Tuple, Dict
import requests
ELEVATION_URL = 'http://maps.googleapis.com/maps/api/elevation/json'
IP_API = 'http://ip-api.com/json'
IPAPI = 'htt... | |
# -*- coding: utf-8 -*-
from django.conf import settings
from django.http import HttpResponse
from django.test import TestCase
from django_auth_ldap.backend import _LDAPUser
from django.test.client import RequestFactory
from typing import Any, Callable, Dict
import mock
import re
from zerver.lib.actions import do_dea... | |
# Lint stub created by lintstub.py -- don't change!
# Constants
NameCanonical = None
NameCanonicalEx = None
NameDisplay = None
NameFullyQualifiedDN = None
NameSamCompatible = None
NameServicePrincipal = None
NameUniqueId = None
NameUnknown = None
NameUserPrincipal = None
REG_NOTIFY_CHANGE_ATTRIBUTES = None
REG_NOTIFY_... | |
#!/usr/bin/python
#
# Copyright 2014 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 b... | |
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, ... | |
#!/usr/bin/python
import utmp
from UTMPCONST import *
import time, pwd, grp, os, string, sys, socket
from stat import *
from string import upper
def boguslist():
# get list of (pid, tty, commandname)
# bogus because we are just guessing by the output of ps
pscmd = "ps ac" # seems to be common
psoutput... | |
"""Here we define the exported functions, types, etc... which need to be
exported through a global C pointer.
Each dictionary contains name -> index pair.
Whenever you change one index, you break the ABI (and the ABI version number
should be incremented). Whenever you add an item to one of the dict, the API
needs to ... | |
"""Color-mod."""
import re
from mdpopups.coloraide import Color as ColorCSS
from mdpopups.coloraide import ColorMatch
from mdpopups.coloraide.spaces import _parse
from mdpopups.coloraide import util
import functools
import math
WHITE = [1.0] * 3
BLACK = [0.0] * 3
TOKENS = {
"units": re.compile(
r"""(?xi)
... | |
# Adrian deWynter, 2016
'''
Adrian deWynter (2016)
Notebook corresponding to an Apache Spark class I once took.
This one pertains to analysis of logs and traffic to a website.
'''
#####
# Remember, databricks has a built-in function (display) that isn't available elsewhere.
# This code isn't meant to run anywhere that... | |
# -*- coding: utf-8 -*-
"""c5filemanager.views module.
THIS SOFTWARE IS UNDER BSD LICENSE.
Copyright (c) 2010-2012 Daniele Tricoli <eriol@mornie.org>
Read LICENSE for more informations.
"""
import os
import posixpath
import shutil
import time
import urllib
import Image
from django.contrib.admin.views.decorators imp... | |
# 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 urllib, urllib2, xbmcplugin, xbmcgui, re, string, sys, os, traceback, xbmcaddon, logging
import Config, DbConnection, ScriptParams, Launcher, RomScanner
import AddEmulatorDialog
import GuiGameInfoWindow, XbmcDirectoryListing
import xbmc, logging, time
def FindEmulatorTypeByName( emuTypeList, name ):
for emuT... | |
#!/usr/bin/env python
""" ZabbixReader.py: Delivery class that read data from zabbix monitoring system. """
__author__ = "Karol Kaczan"
__version__ = "v0.4"
# #########################
# Store version change here
# #########################
# 10/03/2017 - Parse item name to TAGS[metric_name, interface, locatio... | |
from itertools import product
import glob
import os
import os.path as op
import pickle
import shutil
import numpy as np
from scipy import sparse
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_equal)
import pytest
from mne.datasets import testing
from mne ... | |
# Copyright (c) 2008-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for implementations of L{IReactorCore}.
"""
__metaclass__ = type
import signal
import time
from twisted.internet.abstract import FileDescriptor
from twisted.internet.error import ReactorAlreadyRunning
from twisted.internet.d... | |
import array
from collections import namedtuple
import struct
import logging
import cairo
from zorro.di import di, has_dependencies, dependency
from .xcb import Core, Rectangle, XError
from .xcb.core import Atom
from .icccm import SizeHints, is_window_needs_input
from .commands import CommandDispatcher
from .ewmh imp... | |
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# 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... | |
# coding=utf-8
# Copyright 2014 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 copy
import s... | |
# Copyright 2014 Violin Memory, 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 requi... | |
# 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
"""
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard python 2.3+
datetime module.
"""
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
import datetime
import calendar
__all__ = ["relativedelta", "MO", "TU", ... | |
#!/usr/bin/python -u
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | |
#!/usr/bin/env python
# filetail.py
# Copyright (C) 2005 by The Trustees of the University of Pennsylvania
# Author: Jon Moore
"""
Module to allow for reading lines from a continuously-growing file (such as
a system log). Handles log files that get rotated/trucated out from under
us. Inspired by the Perl File::Tail m... | |
import sys
import os
from StringIO import StringIO
import textwrap
from distutils.core import Extension, Distribution
from distutils.command.build_ext import build_ext
from distutils import sysconfig
from distutils.tests import support
from distutils.errors import (DistutilsSetupError, CompileError,
... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | |
try:
import caffe2.python.predictor.predictor_exporter as pe
except ImportError:
print('Please check that Caffe2 is installed correctly to run this demo.')
import numpy as np
import os
import shutil
from caffe2.python import core, model_helper, workspace, brew
from tensorboardX import TorchVis
"""
This is a d... | |
#!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
#
# This is a thin wrapper for native LD. This is not meant to be
# used by the user, but is called from pnacl-translate.
# This ... | |
# -*- coding: utf-8 -*-
#
# google-cloud-dataproc documentation build configuration file
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values ... | |
#-*- coding:utf-8 -*-
""" MinCq learning algorithm
Related papers:
[1] From PAC-Bayes Bounds to Quadratic Programs for Majority Votes (Laviolette et al., 2011)
[2] Risk Bounds for the Majority Vote: From a PAC-Bayesian Analysis to a Learning Algorithm (Germain et al., 2014)
http://graal.ift.ulaval.ca/majorityvote/
""... | |
import os
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def make_conv_bn_relu(in_channels, out_channels, kernel_size=3, stride=1, padding=1, groups=1):
return [
nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, stride=stride... | |
# -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2015 Kitware 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 cop... | |
import functools
import openpyxl
import logging
import requests
import itertools
from django.core import management
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.conf.urls import patterns, url
from django.core.cache import cache
from django.http import HttpResponse, Http404
from d... | |
import sys
import time
import os
import subprocess
import webbrowser
import threading
import traceback
from django.http import HttpResponse
from django.shortcuts import render
from robot_control.models import Category, Question, Response
from django.core.mail import send_mail
import json
MAX_TIME = 180 # seconds
POR... | |
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008-2017,2019 Contributor
#
# 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... | |
from typing import Any, Optional, Sequence, Tuple, Union
from ..commons.utils import JsCode
Numeric = Union[int, float]
JSFunc = Union[str, JsCode]
class BasicOpts:
__slots__ = ("opts",)
def update(self, **kwargs):
self.opts.update(kwargs)
def get(self, key: str) -> Any:
return self.op... | |
# Copyright 2012 Cloudbase Solutions Srl
#
# 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... | |
#!/usr/bin/python
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or
# https://www.gnu.org/licenses/gpl-3.0.txt)
'''
Element OS Software Snapshot Manager
'''
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | |
# 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... | |
#!/usr/bin/env python
# Copyright (c) 2012, Tang Tiong Yew
# 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, t... | |
"""Support for various GEOS geometry operations
"""
import sys
if sys.version_info[0] < 3:
from itertools import izip
else:
izip = zip
from ctypes import byref, c_void_p, c_double
from shapely.geos import lgeos
from shapely.geometry.base import geom_factory, BaseGeometry
from shapely.geometry import asShape... | |
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import datetime
import unittest
import webapp2
import webtest
from mapreduce import operation as op
from dashboard import delete_test_data
from dashboard i... | |
"""
Support for an interface to work with a remote instance of Home Assistant.
If a connection error occurs while communicating with the API a
HomeAssistantError will be raised.
For more details about the Python API, please refer to the documentation at
https://home-assistant.io/developers/python_api/
"""
import asyn... | |
# coding=utf-8
# Copyright 2021 The Reach ML 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 applicable law ... | |
"""
Installs and configures neutron
"""
import logging
import os
import re
import uuid
from packstack.installer import utils
from packstack.installer import validators
from packstack.installer.utils import split_hosts
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
# Controller o... | |
#
# Copyright (c) 2021 Arm Limited and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Create and manage connection to the DUT."""
import re
import sys
import uuid
from time import time
from ..host_tests_logger import HtrunLogger
from .conn_primitive_serial import SerialConnectorPrimitive... | |
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, 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... | |
from torch_geometric.data import InMemoryDataset
import pandas as pd
import shutil, os
import os.path as osp
import torch
import numpy as np
from ogb.utils.url import decide_download, download_url, extract_zip
from ogb.io.read_graph_pyg import read_graph_pyg
class PygGraphPropPredDataset(InMemoryDataset):
def __i... | |
'''
A module that conducts unit tests on all top-level methods within each class.
Created on Jun 20, 2012
@author: ccabot
'''
import unittest
from libpgm.graphskeleton import GraphSkeleton
from libpgm.discretebayesiannetwork import DiscreteBayesianNetwork
from libpgm.hybayesiannetwork import HyBayesianNetwork
from l... | |
from consul_kv import Connection, DEFAULT_REQUEST_TIMEOUT, DEFAULT_ENDPOINT
from tests.testcase import TestCase
class TestConnection(TestCase):
def setUp(self):
self.put_kv = self.set_up_patch('consul_kv.put_kv')
self.put_kv_txn = self.set_up_patch('consul_kv.put_kv_txn')
self.get_kv = sel... | |
###############################################################################
# apogee.spec.window: routines for dealing with the individual element windows
###############################################################################
import os, os.path
import numpy
from apogee.tools.read import modelspecOnApStarWa... | |
import numpy as np
from pyglet.gl import *
from fos import Actor, World
from fos.actor.primitives import NodePrimitive, EdgePrimitive
from fos.core.intersection import intersect_ray_sphere
class AttributeNetwork(Actor):
def __init__(self, node_position, affine = None, force_centering = True, *args, ... | |
# 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 ... | |
<<<<<<< HEAD
<<<<<<< HEAD
# Common utility functions used by various script execution tests
# e.g. test_cmd_line, test_cmd_line_script and test_runpy
import importlib
import sys
import os
import os.path
import tempfile
import subprocess
import py_compile
import contextlib
import shutil
import zipfile
from importlib.... | |
from __future__ import absolute_import, print_function
__all__ = ['SourceProcessor']
import logging
import re
import base64
from django.conf import settings
from django.core.exceptions import SuspiciousOperation
from collections import namedtuple
from hashlib import md5
from OpenSSL.SSL import ZeroReturnError
from o... | |
from django.db import models
from django.utils import timezone
from django.db.models import Q
from django.contrib.auth.models import Group
from guardian.shortcuts import assign_perm, remove_perm, get_perms
from stdimage.models import StdImageField
from suite.models import User
class ClubManager(models.Manager):
d... | |
# 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... | |
"""
Drag Behavior
=============
The :class:`~kivy.uix.behaviors.drag.DragBehavior`
`mixin <https://en.wikipedia.org/wiki/Mixin>`_ class provides Drag behavior.
When combined with a widget, dragging in the rectangle defined by the
:attr:`~kivy.uix.behaviors.drag.DragBehavior.drag_rectangle` will drag the
widget.
Examp... | |
from __future__ import division
import logging
from gi.repository import GLib
from datetime import datetime, timedelta, time
# Victron packages
from ve_utils import exit_on_error
from delegates.base import SystemCalcDelegate
from delegates.batterylife import BatteryLife, BLPATH
from delegates.batterylife import State ... | |
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions for Windows builds.
These functions are executed via gyp-win-tool when using the ninja generator.
"""
from __future__... | |
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2015, ARM Limited and contributors.
#
# 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
#
# ... | |
# 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... | |
# -*- coding: utf-8 -*-
# Licensed under the Apache-2.0 License, see LICENSE for details.
import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
import six
import ctypes
import numpy as np
from numpy.ctypeslib import ndpointer
from .constants import RS_API_VERSION, rs_stream, ... | |
# Copyright (c) 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re, operator, os
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
xrange = range
VERSION = (0, 2, 2)
VERSION_TAG = None
__version__ = ".".join(map(str, VERSION))
if VERSION_TAG:
__version__ = "{0}-{1}".format(
... | |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function
import os
import json
import copy
import pprint
import logging
import numpy as np
from astropy.io import fits
from astropy.coordinates import SkyCoord
from astropy.table import Table, Column
... | |
import warnings
from functools import partial
from typing import Any, Callable, List, Optional, Sequence
import paddle
import paddle.nn as nn
from .misc_paddle import ConvNormActivation, SqueezeExcitation as SElayer
__all__ = ["MobileNetV3", "mobilenet_v3_large", "mobilenet_v3_small"]
def _make_divisible(v: float,... | |
from __future__ import absolute_import
import json
import logging
from datetime import datetime
from threading import Thread
from tornado import web
from tornado import gen
from tornado.escape import json_decode
from tornado.web import HTTPError
from celery import states
from celery.result import AsyncResult
from c... | |
"""Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | |
#
# Pan.py -- Pan plugin for fits viewer
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import math
from ginga.qtw.QtHelp import QtGui, QtCore
from ginga.misc import... | |
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'leagues.ui'
#
# Created: Wed May 15 18:12:11 2013
# by: pyside-uic 0.2.13 running on PySide 1.1.0
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_Leagues(object):
def setupUi(self... | |
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Module: netcdf_to_shape.py
Created on Sun Jul 28 15:51:04 2013
@author: gcoombes
Dexcription: Create a shapefile of contours or probability regions from teh netcdf data
"""
### IMPORTS ###
from __future__ import print_function
import sys, os
import time
from itertoo... | |
#----------------------------------------------------------------------#
# ApproxSRPTE.py
#
# This application simulates a single server with Poisson arrivals
# and processing times of a general distribution. There are errors in
# time estimates within a range. Arrivals are assigned to SRPT classes
# using the methods ... | |
#!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Gulden P2P n... | |
# 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... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | |
"""
.. _tut-fix-meshes:
Editing BEM surfaces in Blender
===============================
Sometimes when creating a BEM model the surfaces need manual correction because
of a series of problems that can arise (e.g. intersection between surfaces).
Here, we will see how this can be achieved by exporting the surfaces to t... | |
# -*- coding: UTF-8 -*-
from __future__ import absolute_import
from app.models import ConsultationPlatform, Initiative, Idea, Comment, SocialNetworkApp, ParticipaUser
from app.sync import save_sn_post, save_sn_comment, save_sn_vote, cud_initiative_votes, cud_initiative_ideas, \
cud_initiative_comm... | |
"""Utils for API usage"""
import logging
from flask import make_response
from flask.ext.restful import Api
import re
from netaddr import IPAddress
import simplejson as json
from compass.api import app
api = Api(app)
def make_json_response(status_code, data):
"""Wrap json format to the reponse object"""
r... | |
"""
sentry.plugins.sentry_mail.models
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import itertools
import logging
import sentry
from django.conf import settings
f... | |
# 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 ... | |
import requests
import json
class LoginRequired(Exception):
def __str__(self):
return 'Please login first.'
class Client(object):
"""class to interact with qBittorrent WEB API"""
def __init__(self, url, verify=True):
"""
Initialize the client
:param url: Base URL of the ... | |
from flask import Flask, render_template, request, redirect
import matplotlib.pyplot as plt
from matplotlib.colors import Normalize
from bs4 import BeautifulSoup
import numpy as np
import pandas as pd
import sqlalchemy
import seaborn as sns
from sklearn.mixture import GMM
from matplotlib.ticker import NullFormatter
imp... | |
"""The test for the History Statistics sensor platform."""
# pylint: disable=protected-access
from datetime import datetime, timedelta
import unittest
from unittest.mock import patch
import pytest
import pytz
from homeassistant.helpers import template
from homeassistant.const import STATE_UNKNOWN
from homeassistant.se... | |
#
# 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... | |
"""Config flow to configure SmartThings."""
import logging
from aiohttp import ClientResponseError
from pysmartthings import APIResponseError, AppOAuth, SmartThings
from pysmartthings.installedapp import format_install_url
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const impo... | |
from __future__ import absolute_import, division, unicode_literals
import param
from holoviews.plotting.util import attach_streams
from ...core import (OrderedDict, NdLayout, AdjointLayout, Empty,
HoloMap, GridSpace, GridMatrix)
from ...element import Histogram
from ...core.options import Store
f... | |
"""
Read documents from RTF 1.5
http://www.biblioscape.com/rtf15_spec.htm
This module is potentially compatible with RTF versions up to 1.9.1,
but may not ignore all necessary control groups.
"""
import string, re, itertools, struct
from pyth import document
from pyth.format import PythReader
from pyth.encodings imp... | |
# Copyright 2010 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... | |
try:
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except ImportError:
from PyQt4.QtGui import *
from PyQt4.QtCore import *
#from PyQt4.QtOpenGL import *
from libs.shape import Shape
from libs.lib import distance
CURSOR_DEFAULT = Qt.ArrowCursor
CURSOR_POINT =... | |
from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
from datetime import datetime, timedelta
from sqlalchemy import Table, Column, Integer, Float, Unicode, Boolean, DateTime
from sqlalchemy.ext.associationproxy im... | |
# coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | |
import re
import urwid
from mitmproxy.tools.console import common
from mitmproxy.tools.console import signals
from mitmproxy.tools.console import statusbar
from mitmproxy.tools.console import flowlist
from mitmproxy.tools.console import flowview
from mitmproxy.tools.console import commands
from mitmproxy.tools.console... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.