gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
from py4j.java_gateway import java_import
from pyspark import RDD
from pyspark.serializers import FramedSerializer, SpecialLengths, write_int, read_int
from pyspark.sql import DataFrame
from utils import datetime_to_millis
from datetimeindex import DateTimeIndex
import struct
import numpy as np
import pandas as pd
from... | |
# -*- coding: utf-8 -*-
#
# xarray documentation build configuration file, created by
# sphinx-quickstart on Thu Feb 6 18:57:54 2014.
#
# 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.
#
# Al... | |
# Copyright 2017,2018,2019,2020,2021 Sony Corporation.
# Copyright 2021 Sony Group 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-... | |
# Copyright 2014 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.
from telemetry.page import page as page_module
from telemetry import story
class ToughVideoCasesPage(page_module.Page):
def __init__(self, url, page_set,... | |
"""Metrics to assess performance on regression task
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Ma... | |
#!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the bumpfee RPC.
Verifies that the bumpfee RPC creates replacement transactions successfully when
its ... | |
# Copyright 2011 Justin Santa Barbara
# Copyright 2014 NetApp, Inc.
# Copyright 2014 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.ap... | |
# -*- coding: utf-8 -*-
import httplib as http
import importlib
import pkgutil
import pytest
from pytz import utc
from datetime import datetime
import urllib
from nose.tools import * # flake8: noqa
import re
from tests.base import ApiTestCase, DbTestCase
from osf_tests import factories
from tests.utils import make_... | |
""" fix.parser unit tests
Copyright (c) 2014 Kenn Takara
See LICENSE for details
"""
import unittest
from fixtest.fix.parser import FIXParser
from fixtest.fix.parser import FIXParserError, FIXLengthTooLongError
from fixtest.tests.utils import to_fix
# pylint: disable=too-many-public-methods
# pylint: disab... | |
# -*- 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
#... | |
#!/usr/bin/env python
# Copyright 2017 The PDFium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Looks for performance regressions on all pushes since the last run.
Run this nightly to have a periodical check for performance regres... | |
#!/usr/bin/env python
import pysam
import sqlite3
import os
import sys
import collections
import re
from unidecode import unidecode
from bx.bbi.bigwig_file import BigWigFile
from gemini.config import read_gemini_config
# dictionary of anno_type -> open Tabix file handles
annos = {}
def get_anno_files( args ):
con... | |
##############################################################################
# Copyright 2009, Gerhard Weis
# 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 ... | |
import unittest
from unittest import TestCase
from algorithms.dataStructures.BinaryTree import BinaryTreeNode
from algorithms.dataStructures.BinaryTree import BinaryTree
class binary_tree_creation_Test(TestCase):
def test_create_node(self):
n = BinaryTreeNode(1)
self.assertIsInstance(n, BinaryTr... | |
"""
Set up the plot figures, axes, and items to be done for each frame.
This module is imported by the plotting routines and then the
function setplot is called to set the plot parameters.
"""
#--------------------------
def setplot(plotdata):
#--------------------------
"""
Specify what is to be plotted ... | |
"""Test sensor of Nettigo Air Monitor integration."""
from datetime import timedelta
from unittest.mock import AsyncMock, Mock, patch
from nettigo_air_monitor import ApiError
from homeassistant.components.nam.const import DOMAIN
from homeassistant.components.sensor import (
ATTR_STATE_CLASS,
DOMAIN as SENSOR_... | |
from .fleet_object import FleetObject
try: # pragma: no cover
# python 2
from StringIO import StringIO
except ImportError: # pragma: no cover
# python 3
from io import StringIO
class Unit(FleetObject):
"""This object represents a Unit in Fleet
Create and modify Unit entities to communicate... | |
#!/usr/bin/env python
#
# Module for handling SCons documentation processing.
#
__doc__ = """
This module parses home-brew XML files that document various things
in SCons. Right now, it handles Builders, functions, construction
variables, and Tools, but we expect it to get extended in the future.
In general, you can... | |
"""NextBus sensor."""
from itertools import chain
import logging
from py_nextbus import NextBusClient
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_NAME, DEVICE_CLASS_TIMESTAMP
import homeassistant.helpers.config_validation as cv
from homeass... | |
import re
from collections import defaultdict, namedtuple
from collections.abc import Iterable
from functools import lru_cache
from sanic.exceptions import NotFound, InvalidUsage
from sanic.views import CompositionView
Route = namedtuple(
'Route',
['handler', 'methods', 'pattern', 'parameters', 'name'])
Param... | |
#!/usr/bin/env python
# Copyright 2016 The Kubernetes 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 appli... | |
"""
Support for Nest thermostats.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/climate.nest/
"""
import logging
import voluptuous as vol
from homeassistant.components.nest import (
DATA_NEST, SIGNAL_NEST_UPDATE, DOMAIN as NEST_DOMAIN)
from homeas... | |
from twisted.internet.defer import inlineCallbacks, returnValue
from vumi.utils import http_request_full
from vumi.message import TransportUserMessage
from vumi.transports.mtech_ussd import MtechUssdTransport
from vumi.transports.mtech_ussd.mtech_ussd import MtechUssdResponse
from vumi.transports.tests.helpers import ... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 Citrix Systems, Inc.
# 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
#
# htt... | |
#python
import re
# apetools
from apetools.baseclass import BaseClass
from apetools.tools import sleep
from apetools.commons import enumerations, expressions, errors
from apetools.parsers.oatbran import NAMED, STRING_START,SPACES, INTEGER
from apetools.commands.pscommand import PsGrep
from apetools.commands.topcomman... | |
"""The beam search module."""
from collections import OrderedDict
from six.moves import range
import logging
import numpy
from picklable_itertools.extras import equizip
import theano
from theano import function
from blocks_extras.bricks.sequence_generator2 import SequenceGenerator
from blocks.filter import VariableFi... | |
# ----------------------------------------------------------------------------
# Copyright 2015-2016 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | |
"""Tests for the Synology DSM config flow."""
from unittest.mock import MagicMock, Mock, patch
import pytest
from synology_dsm.exceptions import (
SynologyDSMException,
SynologyDSMLogin2SAFailedException,
SynologyDSMLogin2SARequiredException,
SynologyDSMLoginInvalidException,
SynologyDSMRequestExce... | |
"""
mbed SDK
Copyright (c) 2011-2014 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 wr... | |
# Copyright 2021, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | |
#!/usr/bin/env python3
# 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
# "... | |
"""Support for the DOODS service."""
import io
import logging
import time
from PIL import Image, ImageDraw
from pydoods import PyDOODS
import voluptuous as vol
from homeassistant.components.image_processing import (
CONF_CONFIDENCE,
CONF_ENTITY_ID,
CONF_NAME,
CONF_SOURCE,
PLATFORM_SCHEMA,
Imag... | |
""" Test cases for time series specific (freq conversion, etc) """
from datetime import (
date,
datetime,
time,
timedelta,
)
import pickle
import numpy as np
import pytest
from pandas._libs.tslibs import (
BaseOffset,
to_offset,
)
import pandas.util._test_decorators as td
from pandas import (... | |
"""Module implementing some base classes useful for implementing dynamical
systems"""
from __future__ import division, print_function, absolute_import
import six
range = six.moves.range
map = six.moves.map
import numpy as np
from . import mx
from . import caching
from .mx import hashable_state
from .utils import r... | |
# -*- coding: utf-8 -*-
"""Tools for inspecting Python objects.
Uses syntax highlighting for presenting the various information elements.
Similar in spirit to the inspect module, but all calls take a name argument to
reference the name under which an object is being read.
"""
#***************************************... | |
"""Routine to monitor the modal gain in each pixel as a
function of time. Uses COS Cumulative Image (CCI) files
to produce a modal gain map for each time period. Modal gain
maps for each period are collated to monitor the progress of
each pixel(superpixel) with time. Pixels that drop below
a threshold value are fla... | |
# Copyright 2013 Metacloud, Inc.
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | |
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
# Copyright 2014 Open Source Robotics Foundation, 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... | |
"""
Linux on Hyper-V and Azure Test Code, ver. 1.0.0
Copyright (c) Microsoft Corporation
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/LICEN... | |
#!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a bitcoind or Bit... | |
from common_fixtures import * # NOQA
import subprocess
from subprocess import Popen
from os import path
import os
import sys
import pytest
import cattle
import ConfigParser
PROJECTS = []
CERT = '''-----BEGIN CERTIFICATE-----
MIIDJjCCAg4CCQDLCSjwGXM72TANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJB
VTETMBEGA1UECBMKU29tZS1T... | |
from mpi4py import MPI
import mpiunittest as unittest
from functools import reduce
cumsum = lambda seq: reduce(lambda x, y: x+y, seq, 0)
cumprod = lambda seq: reduce(lambda x, y: x*y, seq, 1)
_basic = [None,
True, False,
-7, 0, 7, 2**31,
-2**63+1, 2**63-1,
-2.17, 0.0, 3.14,
... | |
#!/usr/bin/env python3
#
# Copyright (c) 2019 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... | |
# -----------------------------------------------------------------------------
# GLFW - An OpenGL framework
# API version: 3.0.1
# WWW: http://www.glfw.org/
# ----------------------------------------------------------------------------
# Copyright (c) 2002-2006 Marcus Geelnard
# Copyright (c) 2006-2010 C... | |
#!/usr/bin/env python
"""Tests for grr.lib.aff4_objects.filestore."""
import os
import StringIO
import time
from grr.lib import action_mocks
from grr.lib import aff4
from grr.lib import config_lib
from grr.lib import flow
from grr.lib import rdfvalue
from grr.lib import test_lib
from grr.lib import utils
from grr.lib... | |
# 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 or agreed to in writing, ... | |
# Copyright 2016 Facebook Inc.
# Copyright 2016 Douban Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
# Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import sys
from mixbox.binding_utils import *
from . import cybox_common
from . import win_handle_object
class WaitableTimerType(cybox_common.BaseObjectPropertyType):
"""WaitableTimerType specifies Windows wa... | |
"""
cal_gui.py - Calibration GUI for FreeIMU boards
Copyright (C) 2012 Fabio Varesano <fabio at varesano dot net>
Development of this code has been supported by the Department of Computer Science,
Universita' degli Studi di Torino, Italy within the Piemonte Project
http://www.piemonte.di.unito.it/
This program is fr... | |
from library.utils import file_utils
import os, shutil, time
import numpy as np
from library.preprocessing.data_transform import transform
from library.datasets.cifar.base import CIFARBase
import h5py
class CIFAR100(CIFARBase):
def __init__(self,
num_images=1.0,
one_hot_encode=F... | |
from django.contrib.contenttypes import fields
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import Q
from django.template.defaultfilters import slugify
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ... | |
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 18 11:20:55 2014
@author: aitor
"""
import mysql.connector
from cache import university_locations, university_ids, thesis_ids, name_genders, codes_descriptor, descriptor_codes
import networkx as nx
import sys
import pprint
import json
import os
lib_path = os.path.abspat... | |
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | |
"""\
Example.
%(prog)s production.ini
"""
from webtest import TestApp
from contentbase.storage import DBSession
import atexit
import datetime
import json
import logging
import os
import psycopg2
import select
import signal
import socket
import sqlalchemy.exc
import sys
import threading
import time
from urllib.p... | |
##########################################################################
#
# Copyright (c) 2008, Image Engine Design 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:
#
# * Redistribu... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Nebula, 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
#
# ... | |
#!/usr/bin/env python3
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2019 The Starwels developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_fun... | |
# -*- coding: utf-8 -*-
# For debugging
# NVIM_PYTHON_LOG_FILE=nvim.log NVIM_PYTHON_LOG_LEVEL=INFO nvim
import sys
import os
import re
import copy
import importlib
import cm
import subprocess
import time
import cm_default
import threading
import json
logger = cm.getLogger(__name__)
# use a trick to only register th... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import oscar.models.fields.autoslugfield
import django.db.models.deletion
import django.core.validators
import oscar.models.fields
class Migration(migrations.Migration):
dependencies = [
('contenttyp... | |
#!/usr/bin/env python
#
# Copyright (c) 2010 The SCons Foundation
#
# 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... | |
"""Tests for homekit_controller config flow."""
import json
from unittest import mock
import homekit
import pytest
from homeassistant.components.homekit_controller import config_flow
from homeassistant.components.homekit_controller.const import KNOWN_DEVICES
from tests.common import MockConfigEntry
from tests.compon... | |
from os import path
from random import shuffle
from unittest import TestCase
from click.testing import CliRunner
import pyinfra
from pyinfra import pseudo_state
from pyinfra_cli.main import _main, cli
from ..paramiko_util import PatchSSHTestCase
def run_cli(*arguments):
pyinfra.is_cli = True
runner = CliR... | |
from __future__ import unicode_literals
import glob
import gzip
import os
import warnings
import zipfile
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import BaseCommand, Comman... | |
"""
websocket - WebSocket client library for Python
Copyright (C) 2010 Hiroki Ohtani(liris)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, ... | |
# coding=utf-8
import copy
from typing import Dict, Any, List, Optional
from mdstudio.api.context import ContextCallable
from mdstudio.db.sort_mode import SortMode
from mdstudio.db.connection_type import ConnectionType
from mdstudio.db.cursor import Cursor
from mdstudio.db.database import IDatabase, CollectionType, Do... | |
#!/usr/bin/env python
from __future__ import print_function
import datetime
import os
import shutil
import sys
import glob
import decimal
from optparse import OptionParser
from subprocess import Popen, PIPE
from xhtml2pdf import pisa
do_bytes = 'b'
if sys.version[0] != '2':
do_bytes = ''
def render_pdf(filename, ... | |
# coding: utf-8
#
# Copyright 2016 The Oppia 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 requi... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simulate photometric observations.
"""
from __future__ import (print_function, division)
import six
from six.moves import range
import sys
import os
import warnings
import math
import numpy as np
import warnings
from . import priors
from . import reddening
__all__ ... | |
# vim: set et sw=4 sts=4 fileencoding=utf-8:
#
# Python camera library for the Rasperry-Pi camera module
# Copyright (c) 2013-2017 Dave Jones <dave@waveform.org.uk>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# ... | |
# -*- coding: utf-8 -*-
"""
Created on Thu May 15 16:36:05 2014
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
class TransformRestriction(object):
"""Transformation for linear constraints `R params = q`
Note, the transformation from the reduced to the full parameters is an
affine and not... | |
# 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... | |
import requests
import json
from functools import wraps
class PocketException(Exception):
'''
Base class for all pocket exceptions
http://getpocket.com/developer/docs/errors
'''
pass
class InvalidQueryException(PocketException):
pass
class AuthException(PocketException):
pass
class ... | |
"""
This module provides convenient functions to transform sympy expressions to
lambda functions which can be used to calculate numerical values very fast.
"""
from __future__ import print_function, division
import inspect
import textwrap
from sympy.external import import_module
from sympy.core.compatibility import ... | |
# 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... | |
from mako.lexer import Lexer
from mako import exceptions, util, compat
from test.util import flatten_result
from mako.template import Template
import re
from test import TemplateTest, eq_, assert_raises_message
# create fake parsetree classes which are constructed
# exactly as the repr() of a real parsetree object.
# ... | |
#!/usr/bin/env python
# Copyright (c) 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | |
import dpkt
import pcap
import re
import socket
import urlparse
import binascii
import signal
import sys
from firebase import firebase
from pprint import pprint
import settings
from utils import add_colons_to_mac
APP = {80: 'HTTP', 23: 'TELNET', 21: 'FTP', 110: 'POP3'}
class Sniffer(object):
def __init__(self, *... | |
"""multipart/form-data encoding module
This module provides functions that faciliate encoding name/value pairs
as multipart/form-data suitable for a HTTP POST or PUT request.
multipart/form-data is the standard way to upload files over HTTP"""
__all__ = ['gen_boundary', 'encode_and_quote', 'MultipartParam',
... | |
#!/usr/bin/env python3
"""
Without argument: run all the regression tests.
About the tests:
* They are stored as python file in the subdirectories.
* The firstline must be an explanation about the test.
* Errors(must be True) defines an Error that must be corrected
* Warning(must be True) defines someth... | |
#!/usr/bin/env python
"""
webwol
Generates wake-on-lan packets via a web interface. Useful for WOL when you're on
a different subnet, over a VPN, via an HTTP interface etc.
A secondary goal of this tool is to minimize external dependencies required, so
that deployment is trivial and can happen anywhere that Python ca... | |
from typing import Callable, Generator, Iterator, Union, Optional
import warnings
import numpy as np
import tensorflow as tf
from sklearn.datasets import load_digits
from sklearn.decomposition import PCA
from sklearn.metrics.cluster import entropy as entropy1D
from tensorflow_probability.python import distributions as... | |
"""Provides a Qt-based GUI for browsing Wiretap servers and nodes.
@author Brendan Holt
@date May 2014
@todo Implement node creation, deletion, and display filters.
@defgroup modWiretapBrowser WiretapBrowser
@{
"""
import sys
from PySide import QtGui
from wiretap import WireTapClientInit, WireTapClientUninit, WireTa... | |
#!/app/.heroku/bin/python2.7
"""An RFC 2821 smtp proxy.
Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]]
Options:
--nosetuid
-n
This program generally tries to setuid `nobody', unless this flag is
set. The setuid call will fail if this program is not run as root (in... | |
# Copyright 2019 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... | |
from datetime import datetime, timedelta, time
from dateutil import tz
import hashlib
from werkzeug.security import generate_password_hash, check_password_hash
from flask import current_app, request, url_for
from flask.ext.login import UserMixin, AnonymousUserMixin
from .extensions import db, login_manager
#from .tasks... | |
# Copyright 2012 OpenStack Foundation
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2017 AT&T Corp.
# 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 t... | |
# 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... | |
import wx
import os #needed to join paths in open/save
import threading
import copy
class mainwindow(wx.Frame):
def __init__(self, parent, title):
self.input = ['', '', '', '', '', ''] #Save user entered values
self.dirname = ''
self.filename = ''
#Creating the window, setting it bl... | |
from bitcoin import *
import getpass
import json
import random
import argparse
import time
import os.path
import binascii
import readline
import platform
from . import diceware
from .blockchain_providers import *
from .aes import AES
SATOSHIS = 100000000
BTCUSD_RATE = 0
BTCUSD_FETCHED = 0
PROVIDER = None
NO_FIAT = Fal... | |
import struct
import wtforms
from wtforms.validators import Length, NumberRange
from . import core
class BasicBinaryField(core.BinaryField):
# Some BinaryFields will have inherent value restrictions, based on the
# limitations of the serialized form. For example, a UInt8Field cannot
# store numbers abov... | |
# Copyright 2016 United States Government as represented by the Administrator
# of the National Aeronautics and Space Administration. All Rights Reserved.
#
# Portion of this code is Copyright Geoscience Australia, Licensed under the
# Apache License, Version 2.0 (the "License"); you may not use this file
# except in ... | |
# Copyright 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 requ... | |
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#
# Module to allow connection and socket objects to be transferred
# between processes
#
# multiprocessing/reduction.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditio... | |
# -*- coding: utf-8 -*-
# Copyright 2015 Cyan, Inc.
# Copyright 2017, 2018, 2019, 2021 Ciena 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... | |
import logging
import logging.config
import os
import sys
import click
import click.core
import click.testing
import copy
import csv
import pkg_resources
from pkg_resources import Requirement, resource_filename
import struct
import base64
logging.basicConfig(
level=logging.WARNING,
format=('%(asctime)s - %(nam... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.