gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
################################# LICENSE ##################################
# Copyright (c) 2009, South African Astronomical Observatory (SAAO) #
# All rights reserved. #
# #
# Redistribu... | |
""" self-contained to write legacy storage (pickle/msgpack) files """
from __future__ import print_function
from distutils.version import LooseVersion
from pandas import (Series, DataFrame, Panel,
SparseSeries, SparseDataFrame,
Index, MultiIndex, bdate_range, to_msgpack,
... | |
import re
import collections
from enum import Enum
from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum
from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict
from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI... | |
#!/usr/bin/python
"""
Classes to read and process MedLine XML record files, for use in processing modules.
They can handle the XML format used by PubMed and MedLine services, for example as returned by eutils online services
>>> xml_records = urllib.urlopen('http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi... | |
# Copyright 2022. ThingsBoard
#
# 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 ... | |
# 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... | |
"""distutils.cmd
Provides the Command class, the base class for the command classes
in the distutils.command package.
"""
# created 2000/04/03, Greg Ward
# (extricated from core.py; actually dates back to the beginning)
__revision__ = "$Id: cmd.py,v 1.27 2001/03/22 03:48:31 akuchling Exp $"
import sys, os, string, ... | |
"""
python script that generates mesh for Wei et al geometry
"""
import numpy
import nanopores.py4gmsh.basic
import nanopores.py4gmsh.extra
from nanopores.py4gmsh import *
from params_geo import *
from warnings import warn
def get_geo(x0 = None, **params):
"""
writes a 3d geo file for an axissymmetric geometr... | |
# -*- coding: utf-8 -*-
"""
Openseame Object or the force DAQ remote control
(c) O. Lindemann
v0.9
"""
from . import remote_control as rc
from libopensesame.experiment import experiment
from libopensesame.exceptions import osexception
from openexp.canvas import canvas
from openexp.keyboard import keyboard
FORCE_... | |
# 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
# d... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
import time
import subprocess
# Import parameters from the setup file.
sys.path.append('.')
from setup import (
setup_dict, get_project_files, print_success_message,
print_failure_message, _lint, _test, _test_all,
CODE_DIR... | |
# 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)
from textwrap import... | |
# 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 unittest
import mock
import webapp2
import webtest
from dashboard import debug_alert
from dashboard import testing_common
from dashboard import util... | |
import types
import sys
from itertools import izip
import django.db.models.manager # Imported to register signal handler.
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, FieldError, ValidationError, NON_FIELD_ERRORS
from django.core import validators
from django.db.models.fields imp... | |
#!/usr/bin/env python
#
# Copyright 2001-2012 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright n... | |
# Copyright (c) 2013 Bull.
#
# 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, sof... | |
#
# 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
# ... | |
import os
import sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__))))
from urllib.parse import unquote
from uuid import uuid4
from flask import Flask, session, render_template, send_file, make_response, request, redirect, g, current_app
from flask_login import login_required, UserMixin, login_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... | |
#!/usr/bin/env python
""""
Simple implementation of http://arxiv.org/pdf/1502.04623v2.pdf in TensorFlow
Example Usage:
python draw.py --data_dir=/tmp/draw --read_attn=True --write_attn=True
Author: Eric Jang
"""
import tensorflow as tf
from tensorflow.models.rnn.rnn_cell import LSTMCell
import input_data
import num... | |
# -*- coding: utf-8 -*-
"""
fixtures_multiple_methods.py
This file contains json from NWIS requests that return multiple methods for a
single parameter. This might occur when there are two sensors of the same type
mounted at different elevations.
This fixture was set up to solve Issue #77.
multi_meth: hf.NWIS(site =... | |
import os
import unittest
import logging
import vtk, qt, ctk, slicer
from slicer.ScriptedLoadableModule import *
from slicer.util import VTKObservationMixin
#
# StenosisMeasurement1D
#
class StenosisMeasurement1D(ScriptedLoadableModule):
"""Uses ScriptedLoadableModule base class, available at:
https://github.com/... | |
# -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, 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 t... | |
"""This module implements DataFutures.
We have two basic types of futures:
1. DataFutures which represent data objects
2. AppFutures which represent the futures on App/Leaf tasks.
"""
import os
import logging
from concurrent.futures import Future
from parsl.dataflow.futures import AppFuture
from parsl.app.err... | |
from rest_framework import status as http_status
import logging
import os
from oauthlib.common import generate_token
from addons.base.models import (BaseOAuthNodeSettings, BaseOAuthUserSettings,
BaseStorageAddon)
from django.db import models
from dropbox.dropbox import Dropbox
from dro... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | |
# 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/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
#
# This file is part of Gruvi. Gruvi is free software available under the
# terms of the MIT license. See the file "LICENSE" that was provided
# together with this source file for the licensing terms.
#
# Copyright (c) 2012-2014 the Gruvi authors. See the file "AUTHORS" for a
# complete list.
from __future__ import a... | |
from __future__ import print_function
import numpy as np
import theano
from theano import tensor
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
from scipy.io import wavfile
import os
import sys
from kdllib import audio_file_iterator
from kdllib import numpy_softmax, numpy_sample_softmax
from kdll... | |
# 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 unittest, time, sys, random, math, json
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_kmeans, h2o_import as h2i, h2o_common
print "Assumes you ran ../build_for_clone.py in this directory"
print "Using h2o-nodes.json. Also the sandbox dir"
DELETE_KEYS_EACH_ITER = True
DO_KMEANS = True
NA_COL... | |
#!/usr/bin/env python3
#
# Copyright (c) 2016 Roberto Riggio
#
# 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... | |
"""
Prequ configuration file definition and parsing.
"""
from __future__ import unicode_literals
import io
import os
import re
from collections import defaultdict
from contextlib import contextmanager
from glob import glob
from .ini_parser import bool_or_auto, parse_ini
from .repositories.pypi import PyPIRepository
... | |
"""Generated message classes for cloudbilling version v1.
Allows developers to manage billing for their Google Cloud Platform projects
programmatically.
"""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.protorpclite import messages as _messages
from apitools.base.py import en... | |
"""This is the Bokeh charts interface. It gives you a high level API to build
complex plot is a simple way.
This is the Line class which lets you build your Line charts just
passing the arguments to the Chart class and calling the proper functions.
"""
# ----------------------------------------------------------------... | |
# -*- 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... | |
# Copyright (c) 2016 Uber Technologies, Inc.
#
# 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, publ... | |
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | |
"""Support for Modbus Register sensors."""
import logging
import struct
from typing import Any, Optional, Union
from pymodbus.exceptions import ConnectionException, ModbusException
from pymodbus.pdu import ExceptionResponse
import voluptuous as vol
from homeassistant.components.sensor import DEVICE_CLASSES_SCHEMA, PL... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from collections.abc import MutableMapping
"""
Module for reading and writing the configuration.
USAGE:
configuration.get_configuration([location], [source_type], [file_type], [**kwargs]):
location: file name with path
source_type: see below
... | |
#!/usr/bin/env python
##
## Copyright 2016 SRI International
## See COPYING file distributed along with the package for the copyright and license terms
##
# if test script is run with argument then it will run script with the sibis config file defined by that argument
# for example test_session.py ~/.sibis-general... | |
__author__ = 'fahadadeel'
import jpype
class ChartToImage:
def __init__(self,dataDir):
self.dataDir = dataDir
self.Workbook = jpype.JClass("com.aspose.cells.Workbook")
self.ChartType = jpype.JClass("com.aspose.cells.ChartType")
self.ImageOrPrintOptions = jpype.JClass("com.aspose.c... | |
"""Run code in a jail."""
import logging
import os
import os.path
import resource
import shutil
import sys
from .proxy import run_subprocess_through_proxy
from .subproc import run_subprocess
from .util import temp_directory
log = logging.getLogger("codejail")
# TODO: limit too much stdout data? # pylint: disable=f... | |
import json
import logging
import xml
from typing import Callable, Dict
from urllib.parse import quote
from lxml import html
from xrd import XRD
from federation.inbound import handle_receive
from federation.types import RequestType
from federation.utils.network import fetch_document, try_retrieve_webfinger_document
f... | |
import os.path as op
import warnings
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_almost_equal,
assert_array_equal, assert_allclose)
from nose.tools import assert_equal, assert_true, assert_raises
from scipy.signal import resample as sp_resample, butter
fr... | |
from __future__ import annotations
import asyncio
import logging
from datetime import datetime
from typing import Iterator, Literal, NamedTuple, Optional
import discord
from redbot.core import checks, commands
from redbot.core.bot import Red
from redbot.core.data_manager import cog_data_path
from redbot.core.utils im... | |
# Copyright (C) 2010 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... | |
#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Run Regression Test Suite
This module calls down into individual test cases via subprocess. It will
... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 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... | |
# Copyright (c) 2013 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 ... | |
"""Collection of function implementations.
Functions are either implemented as :class:`~chainer.Function`\\ s or
:class:`~chainer.FunctionNode`\\ s.
"""
from chainer.functions.activation.clipped_relu import clipped_relu # NOQA
from chainer.functions.activation.clipped_relu import ClippedReLU # NOQA
from chainer.fun... | |
# Copyright 2015 Futurewei. 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 appl... | |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | |
"""Base table class. Define just the bare minimum to build tables."""
from terminaltables.build import build_border, build_row, flatten
from terminaltables.width_and_alignment import align_and_pad_cell, max_dimensions
class BaseTable(object):
"""Base table class.
:ivar iter table_data: List (empty or list o... | |
#!/usr/bin/env python
from common import config
from common.entities import entities
from common import oids
from common.prettytable import PrettyTable
from common.util import cisco_tics_to_ctime
from common.util import send_email
from common.util import get_snmp_data
from common.util import myDict
from common.util im... | |
from __future__ import unicode_literals
import base64
import os
import posixpath
import re
from itertools import takewhile
from django.utils.encoding import smart_bytes, force_text
from pipeline.conf import settings
from pipeline.storage import default_storage
from pipeline.utils import to_class, relpath
from pipel... | |
#! /usr/bin/env python
"""Assembly execution drivers.
This module provides the default parameters and handling of
assembler-specific configurations.
Assembler defaults are set in the 'arast.conf' file
"""
import logging
import os
import re
import subprocess
import shutil
import glob
import metadata as meta
from C... | |
# -*- coding: utf-8 -*-
# Author: Florian Mayer <florian.mayer@bitsrc.org>
#
# This module was developed with funding provided by
# the ESA Summer of Code (2011).
#
# pylint: disable=C0103,R0903
"""
Attributes that can be used to construct VSO queries. Attributes are the
fundamental building blocks of queries that, to... | |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
__author__="Scott Hendrickson, Josh Montague"
import sys
import requests
import json
import codecs
import datetime
import time
import os
import re
import unicodedata
from acscsv.twitter_acs import TwacsCSV
## update for python3
if sys.version_info[0] == 2:
reload(sy... | |
#
# QR Code Generator for Python
#
# Copyright (c) 2012 Kazuhiko Arase
#
# URL: http://www.d-project.com/
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
#
# The word 'QR Code' is registered trademark of
# DENSO WAVE INCORPORATED
# http://www.denso-wave.com/qrcode/faqpaten... | |
# Copyright (c) 2015 Blizzard Entertainment
#
# 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, publi... | |
'''
Test Templates
:copyright: (c) 2014 by Openlabs Technologies & Consulting (P) LTD
:license: GPLv3, see LICENSE for more details
'''
import random
import unittest
from trytond.tests.test_tryton import USER, DB_NAME, CONTEXT
from trytond.transaction import Transaction
from test_base import BaseTestCase
... | |
from ai import *
from tweaks import log as LOG
from graphics import MessageBox as MSG
log = lambda *x: LOG(*x, f='logs/creatures.log')
class Stats:
possible = []
def init_class():
I = open('stats.txt')
for line in I:
if '#' in line: continue
long, short, description = l... | |
#
# 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... | |
"""Beautiful Soup Elixir and Tonic - "The Screen-Scraper's Friend".
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup uses a pluggable XML or HTML parser to parse a
(possibly invalid) document into a tree representation. Beautiful Soup
provides methods and Pythonic idioms that make it easy to navigate,
sea... | |
# Copyright (c) 2015 Hewlett-Packard Co.
# 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 r... | |
# -*- coding: utf-8 -*-
"""Module to determine the pywikibot version (tag, revision and date)."""
#
# (C) Merlijn 'valhallasw' van Deen, 2007-2014
# (C) xqt, 2010-2015
# (C) Pywikibot team, 2007-2015
#
# Distributed under the terms of the MIT license.
#
from __future__ import unicode_literals
__version__ = '$Id$'
#
... | |
# An example of embedding CEF browser in wxPython on Linux.
import ctypes, os, sys
libcef_so = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'libcef.so')
if os.path.exists(libcef_so):
# Import local module
ctypes.CDLL(libcef_so, ctypes.RTLD_GLOBAL)
if 0x02070000 <= sys.hexversion < 0x03000000:
... | |
###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# 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 ... | |
"""Config flow for Tuya."""
from __future__ import annotations
import logging
from typing import Any
from tuyaha import TuyaApi
from tuyaha.tuyaapi import (
TuyaAPIException,
TuyaAPIRateLimitException,
TuyaNetException,
TuyaServerException,
)
import voluptuous as vol
from homeassistant import config_... | |
from cStringIO import StringIO
import contextlib
import copy
import logging
import time
import os
import subprocess
from teuthology.config import config as teuth_config
from teuthology import misc as teuthology
from teuthology import contextutil, packaging
from teuthology.exceptions import VersionNotFoundError
from t... | |
#!/usr/bin/env python
"""AFF4 Objects to enforce ACL policies."""
import email
import urllib
from grr.lib import access_control
from grr.lib import aff4
from grr.lib import config_lib
from grr.lib import data_store
from grr.lib import email_alerts
from grr.lib import flow
from grr.lib import rdfvalue
from grr.lib im... | |
# 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, print_function, unicode_literals
import os
from pants.base.build_environment import get_buildroot
from pants_test.pants_r... | |
# 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 ... | |
#!/usr/bin/env python
"""Bootstrap setuptools installation
To use setuptools in your package's setup.py, include this
file in the same directory and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
To require a specific version of setuptools, set a download
mirror, ... | |
# -*- coding: utf-8 -*-
"""
tipfy.auth
~~~~~~~~~~
Base classes for user authentication.
:copyright: 2011 by tipfy.org.
:license: BSD, see LICENSE.txt for more details.
"""
from __future__ import absolute_import
import uuid
from werkzeug import abort
from tipfy import DEV_APPSERVER
from werkzeu... | |
EXCLUDE_FIELDS = [
'best_guess_canonical_building',
'best_guess_confidence',
'canonical_building',
'canonical_for_ds',
'children',
'confidence',
'created',
'extra_data',
'id',
'import_file',
'last_modified_by',
'match_type',
'modified',
'parents',
'pk',
's... | |
from nose.tools import * # flake8: noqa
from website.util import permissions
from api.base.settings.defaults import API_BASE
from api.citations import utils as citation_utils
from tests.base import ApiTestCase
from osf_tests.factories import (
ProjectFactory,
RegistrationFactory,
AuthUserFactory,
A... | |
# Copyright 2018 The TensorFlow Probability 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 o... | |
#!/usr/bin/env python
"""
---------------------
PDF Analytics Client
---------------------
The PDF Analytics Client is a high level module that enables the verification of the images and text of a
local PDF file.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import... | |
import socket, unittest, os, md5, pickle, datetime
import warnings
import testlib
from testlib import testutil, SkipTest, PygrTestProgram
from pygr import seqdb, cnestedlist, mapping
from pygr.downloader import SourceURL, GenericBuilder
warnings.simplefilter("ignore")
import pygr.Data
warnings.simplefilter("default"... | |
#
# 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
# ... | |
# 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 os
# usage: python setup.py command
#
# sdist - build a source dist
# py2exe - build an exe
# py2app - build an app
# cx_freeze - build a linux binary (not implemented)
#
# the goods are placed in the dist dir for you to .zip up or whatever...
APP_NAME = 'zort'
DESCRIPTION = open('README.txt').read()
CHANGES ... | |
"""
HTML Widget classes
"""
import copy
import datetime
import warnings
from collections import defaultdict
from itertools import chain
from django.forms.utils import to_current_timezone
from django.templatetags.static import static
from django.utils import datetime_safe, formats
from django.utils.datastructures impo... | |
#!/usr/bin/env python3
from collections import defaultdict
import numpy as np
from pgmpy.base import UndirectedGraph
from pgmpy.exceptions import CardinalityError
from pgmpy.factors import factor_product
from pgmpy.extern.six.moves import filter, range, zip
class ClusterGraph(UndirectedGraph):
r"""
Base cl... | |
#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import random
import re
from lib.core.agent import agent
from lib.core.common import average
from lib.core.common import Backend
from lib.core.common import isNullValue
from ... | |
# Various useful small widgets
#
# Written by Konrad Hinsen <hinsen@cnrs-orleans.fr>
# Last revision: 2000-10-18
#
_undocumented = 1
import Tkinter, Dialog, FileDialog
import copy, os, string
class FilenameEntry(Tkinter.Frame):
"""Filename entry widget
Constructor: FilenameEntry(|master|, |text|, |pattern... | |
"""The tests for the InfluxDB component."""
from dataclasses import dataclass
import datetime
from unittest.mock import MagicMock, Mock, call, patch
import pytest
import homeassistant.components.influxdb as influxdb
from homeassistant.components.influxdb.const import DEFAULT_BUCKET
from homeassistant.const import (
... | |
#/***********************************************************************
# * Licensed Materials - Property of IBM
# *
# * IBM SPSS Products: Statistics Common
# *
# * (C) Copyright IBM Corp. 1989, 2020
# *
# * US Government Users Restricted Rights - Use, duplication or disclosure
# * restricted by GSA ADP Schedule C... | |
# Copyright 2008-2020 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
from django.db import models
# from django.core.exceptions import ValidationError
from etgen.html import E, join_elems
from lino_xl.lib.ledger.utils import ZERO, MAX_AMOUNT
from lino_xl.lib.ledger.fiel... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012 Red Hat, 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
#
# Un... | |
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
############################################
# Py-TOC 1.2
#
# Jamie Turner <jamwt@jamwt.com>
#
DEBUG = 1
import sys
import socket
import re
import struct
from pycopia import sysrandom
TOC_SERV_AUTH = ("login.oscar.aol.c... | |
# 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... | |
import ObjectListView
from threading import Thread
from time import sleep
import wx
from spacq.devices.config import DeviceConfig
from ..tool.box import MessageDialog
from .device.device_config import DeviceConfigDialog
"""
An interface for creating and editing DeviceConfig objects.
"""
class DeviceColumnDefn(Objec... | |
# Copyright (c) 2010 Cloud.com, Inc
# Copyright (c) 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.... | |
###############################################################################
##
## Copyright 2012-2013 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http:... | |
#!/usr/bin/python
from subprocess import check_output, call, CalledProcessError
from re import split as regx_split
import argparse
def main():
args = process_args()
output = check_output(['git', 'status', '--porcelain', '-uno'])
filelist = output.split('\n')
for staged_file in filelist:
if stag... | |
# Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import itertools
import json
import numpy as np
import os
import PIL.Image
import tempfile
import time
import unittest
# Find the best implementation available
try:
from cStringIO import StringIO
except Imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.