gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
import itertools
from wtforms import widgets
from wtforms.fields.core import Field
from wtforms.validators import ValidationError
__all__ = (
"SelectField",
"SelectMultipleField",
"RadioField",
)
class SelectFieldBase(Field):
option_widget = widgets.Option()
"""
Base class for fields which ... | |
#!/usr/bin/env python
"""Web browser interface for CladeCompare.
Input (GET):
Form for submitting FG, [BG, HMM].
Output (POST):
CladeReport (heat map) of submission.
"""
# TODO:
# - take boolean do_weight as a form option (checkbox?)
# ENH (in the report):
# - asterisks up top link to PDF pairlogos
# -... | |
# 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 numpy as np
from astropy import units as u
from poliastro.core.elements import (
circular_velocity as circular_velocity_fast,
coe2rv as coe2rv_fast,
coe2rv_many as coe2rv_many_fast,
eccentricity_vector as eccentricity_vector_fast,
)
from poliastro.core.propagation.farnocchia import (
delta_t... | |
"""
pixelStats.py
Compute a multi-epoch (multi-day) statistics for each lat/lon pixel read from daily Level-3 grids.
Also do statistics roll-ups from daily to monthly, monthly to seasonal, seasonal to yearly,
yearly to multi-year, and multi-year to total N-year period.
Simple code to be run using Spark or Dpark.
"... | |
# 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 ... | |
# Copyright 2022 The SeqIO 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 or agreed to in wr... | |
''' Provider that returns PostGIS vector tiles in GeoJSON or MVT format.
VecTiles is intended for rendering, and returns tiles with contents simplified,
precision reduced and often clipped.
For a more general implementation, try the Vector provider:
http://tilestache.org/doc/#vector-provider
'''
from math import ... | |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/protobuf/internal/message_set_extensions.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from goo... | |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db.models import Max
from django.forms.fields import CharField
from django.template.loader import select_template
from django.utils.html import format_html, strip_tags, strip_entities
from django.utils.safestring import mark_safe
from django.ut... | |
# ---------------------------------------------------------------------------
#
# Albow - Root widget
#
#---------------------------------------------------------------------------
import sys
import pygame
from pygame import key
from pygame.locals import *
#from pygame.time import get_ticks
from pygame.event import... | |
# Copyright (C) 2020 NTT DATA
# 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 ... | |
#!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this lis... | |
"""
Copyright (c) 2017 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from __future__ import unicode_literals
import json
import os
import platform
import sys
try:
import koji
except ImportError:
impor... | |
#!/usr/bin/python
# coding:utf-8
from celery import Celery, platforms
from flask import Flask, current_app
import random
import time
import json
import redis
import time
import logging
import base64
import psycopg2
import datetime
from celery.signals import task_prerun
from datetime import timedelta
from celery.sched... | |
# -*- coding: utf-8 -*-
import uuid
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
for user in orm.User.objects.... | |
from django.core import serializers
from django.shortcuts import render, render_to_response, redirect
from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseForbidden,HttpResponseNotModified, HttpResponseNotFound, JsonResponse
from django.template import RequestContext
from gitorial.models import Use... | |
# -*- coding: utf-8 -*-
'''
Control of entries in SSH authorized_key files
==============================================
The information stored in a user's SSH authorized key file can be easily
controlled via the ssh_auth state. Defaults can be set by the enc, options,
and comment keys. These defaults can be overridd... | |
#!/usr/bin/env python3
# Copyright (c) 2015-2020 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 CSV soft fork activation.
This soft fork will activate the following BIPS:
BIP 68 - nSequence re... | |
# Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# standard library modules, , ,
import argparse
import logging
import os
# Component, , represents an installed component, internal
from yotta.lib import component
# access, , get components, internal
... | |
#!/usr/bin/env python
""" compile.py
Build the pyjamas-showcase web application.
We firstly scan through all the demo modules, pulling out the module
docstrings and the source code, and adding this information to the
demoInfo.py module. We then call Pyjamas to compile the application, and
finall... | |
#!/usr/bin/env python3
import sys, getopt, time
import pyndn, ipaddress
import subprocess
import pyautogui
import logging
import pickle
from Crypto import Random
from Crypto.Cipher import AES
import hashlib
from datetime import datetime
def main(argv):
logging_filename = "ndnMouse-log.txt"
logging_level = loggin... | |
import base64, simplejson, time, datetime
json = simplejson
# Static text.
TEXT_NAME = 'TV-Headend Next Generation'
TEXT_TITLE = 'TV-Headend'
# Image resources.
ICON_DEFAULT = 'icon-default.png'
ART_DEFAULT = 'art-default.jpg'
ICON_ALLCHANS = R('icon-allchans.png')
ICON_BOUQUETS = R('icon-bouquets.png')
# Other d... | |
# python imports
import math
# django imports
from django import forms
from django.db import models
# lfs imports
import lfs
from lfs.payment.settings import PM_ORDER_IMMEDIATELY # NOQA
from lfs.payment.settings import PM_ORDER_ACCEPTED # NOQA
from lfs.payment.settings import PM_MSG_TOP # NOQA
from lfs.payment.set... | |
#!/usr/bin/env python
# coding:utf-8
import os
import base64
import time
import re
import thread
import urllib2
import urlparse
import simple_http_server
from xlog import getLogger
xlog = getLogger("gae_proxy")
from config import config
default_pacfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), co... | |
import json
import os
import random
import six
import socket
from collections import defaultdict
from contextlib import contextmanager
from coverage.files import PathAliases
from coverage.files import relative_filename
from coverage.files import set_relative_directory
from portalocker import Lock
from smother.python i... | |
"""
Tests for `attr._make`.
"""
from __future__ import absolute_import, division, print_function
import pytest
from . import simple_attr
from attr import _config
from attr._compat import PY3
from attr._make import (
Attribute,
NOTHING,
_CountingAttr,
_transform_attrs,
attr,
attributes,
fi... | |
#!/usr/bin/env python
import argparse
import os
import numpy as np
from os.path import isfile
from os.path import join
import sys, signal
import matplotlib.pyplot as plt
from scipy.stats import multivariate_normal
from time import time
import itertools
from multiprocessing import Pool
SCRIPT_DIR = os.path.dirname(os.pa... | |
# Copied from croniter
# https://github.com/taichino/croniter
# Licensed under MIT license
# Pyflakes warnings corrected
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
from time import time, mktime
from datetime import datetime
from dateutil.relativedelta import relativedelta
search_re = re.compile(r'^([^-]+)-(... | |
#!/usr/bin/python -tt
#
# Copyright (c) 2011 Intel, Inc.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; version 2 of the License
#
# This program is distributed in the hope that it will be us... | |
#
# Class to manage the test directory and prototypes
"""
This class manages the test library directory and databases, primarily by maintaining a "prototype"
of the databases. Tests that require a bundle to operate on can be sped up by copyin the protoitype
rather than creating a new library and building the bundles ... | |
"""
Various bayesian regression
"""
# Authors: V. Michel, F. Pedregosa, A. Gramfort
# License: BSD 3 clause
from math import log
import numpy as np
from scipy import linalg
from .base import LinearModel
from ..base import RegressorMixin
from ..utils.extmath import fast_logdet
######################################... | |
#!/usr/bin/env python
# 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 argparse
import collections
import logging
import os
import re
import subprocess
import sys
import time
extra_cq_trybots = [
... | |
# Copyright 2015 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... | |
# 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... | |
import pp
from pp import components as pc
@pp.autoname
def test_comb(
pad_size=(200, 200),
wire_width=1,
wire_gap=3,
comb_layer=0,
overlap_zigzag_layer=1,
comb_pad_layer=None,
comb_gnd_layer=None,
overlap_pad_layer=None,
):
""" Superconducting heater device from phidl.geometry
... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Copyright 2014 OpenStack Foundation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | |
"""
=======================
Network simulation core
=======================
This module contains the main Simulation class.
A simulation object is responsible for creating network and process and to
execute the main loop, running the process on the network. It also handles I/O
and logging. Saving data after each run... | |
#!/usr/bin/env python3
# Copyright 2021 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.
"""Finds unused assets in Chromium code base.
This script is experimental. While it tries to discover known usages, the assets
identif... | |
# autocalibrator.py
#
# David J. Lampert (djlampert@gmail.com)
#
# Contains the AutoCalibrator class that can be used to calibrate a model.
# The class requires and HSPFModel class, start and end dates, and an output
# location to work in while running simulations. The primary function is
# autocalibrate, and it takes ... | |
#!/usr/bin/env python3
#
# Copyright (c) 2015-2017 Nest Labs, 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/lice... | |
########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | |
#!/bin/python
import os
from os.path import dirname, join, exists, relpath, splitext
import json
from json_tools import list_field_paths, field_by_path
from shutil import copy
from utils import get_answer
from bisect import insort_left
from codecs import open as copen
from sys import platform
if platform == "win32":
... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2007-2017, Jared Crapo
#
# 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... | |
# 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 use ... | |
"""
Some API handling code. Predominantly this is to centralize common
alterations we make to API calls, such as filtering by router ids.
"""
import asyncio
import cellulario
import collections
import collections.abc
import fnmatch
import html
import html.parser
import itertools
import logging
import os
import re
imp... | |
# Copyright 2012 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 os
from telemetry.core import app
from telemetry.core.backends import browser_backend
from telemetry.core import browser_credentials
from telemetry.c... | |
import py, pytest
from _pytest.config import getcfg, get_common_ancestor, determine_setup
from _pytest.main import EXIT_NOTESTSCOLLECTED
class TestParseIni:
def test_getcfg_and_config(self, testdir, tmpdir):
sub = tmpdir.mkdir("sub")
sub.chdir()
tmpdir.join("setup.cfg").write(py.code.Sourc... | |
from profelis import utils
from profelis import xml
import re
import os
from javax.swing import JPanel
from javax.swing import JList
from javax.swing import JLabel
from javax.swing import JTextArea
from javax.swing import JTextField
from javax.swing import JButton
from javax.swing import ListCellRenderer
from javax.s... | |
import unittest
import redisco
from redisco import containers as cont
class SetTestCase(unittest.TestCase):
def setUp(self):
self.client = redisco.get_client()
self.client.flushdb()
def tearDown(self):
self.client.flushdb()
def test_common_operations(self):
fruits = cont.... | |
# -*- coding: utf-8 -*-
"""Submissions models"""
import tempfile
import os
from datetime import datetime
from flask_babel import gettext
from pysistem import db, app, cache
from pysistem.submissions.const import RESULT_UNKNOWN, RESULT_OK, STATUS_DONE, STR_STATUS
from pysistem.submissions.const import STATUS_WAIT, S... | |
# 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 ... | |
#!/usr/local/bin/python
from __future__ import with_statement
__license__ = """
Copyright (c) 2014, IDPF, Will Manis
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributi... | |
"""
Unit tests for reverse URL lookups.
"""
from __future__ import unicode_literals
import unittest
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ImproperlyConfigured, ViewDoesNotExist
from django.core.urlresolvers import (reverse, reverse_lazy, resolv... | |
"""Support for a Genius Hub system."""
from datetime import timedelta
import logging
from typing import Any, Dict, Optional
import aiohttp
from geniushubclient import GeniusHub
import voluptuous as vol
from homeassistant.const import (
ATTR_ENTITY_ID,
ATTR_TEMPERATURE,
CONF_HOST,
CONF_MAC,
CONF_PA... | |
import matplotlib.pyplot as plt
import matplotlib as mpl
import subprocess as sub
import pandas as pd
import numpy as np
import sys
import re
import os
import scipy.stats as st
import random as rnd
from matplotlib.ticker import MaxNLocator
from matplotlib.patches import ConnectionPatch
from matplotlib.patches import ... | |
import requests
import re
import urlparse
import traceback
import feedparser
import time
import urllib2
import httplib
from socket import error as SocketError
from boto.s3.key import Key
from django.conf import settings
from django.utils.text import compress_string
from utils import log as logging
from apps.rss_feeds.m... | |
# (c) 2012 Massachusetts Institute of Technology. All Rights Reserved
# Code written by: Anton Goloborodko (golobor@mit.edu)
'''
This module contains the functions that map raw DNA sequences obtained in
the Hi-C experiment to a supplied genome.
The three main methods of this module are iterative_mapping, parse_sam an... | |
# 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
#
# ... | |
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicen... | |
#!/usr/bin/env python
#
# Generated Wed Jun 30 10:34:05 2004 by generateDS.py.
#
import sys
import getopt
from xml.dom import minidom
from xml.dom import Node
#
# If you have installed IPython you can uncomment and use the following.
# IPython is available from http://ipython.scipy.org/.
#
## from IPython.Shell imp... | |
import os
import boto
from mock import Mock, PropertyMock, patch
from moto import mock_ec2
from tornado.testing import AsyncTestCase, gen_test
from loadsbroker.tests.util import (clear_boto_context, load_boto_context,
create_image)
here_dir = os.path.dirname(os.path.abspath(__file... | |
# Copyright 2013 eNovance
#
# 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 t... | |
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the right... | |
# Copyright 2012 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | |
# Copyright 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 req... | |
__author__ = 'stephanie, denver'
import pandas as pd
import numpy as np
from collections import namedtuple
import logging
import datetime
from dateutil.parser import parse
from src.handlers.csvHandler import CSVReader
from src.controllers.Database import Database
logger = logging.getLogger('SDL_logger')
class Mapper(... | |
# encoding: utf-8
# Copyright 2011 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
#
# Unless required by applica... | |
import asyncio
import logging
import os
import signal
import sys
import traceback
from gunicorn.workers import base # type: ignore
from sanic.compat import UVLOOP_INSTALLED
from sanic.log import logger
from sanic.server import HttpProtocol, Signal, serve, try_use_uvloop
from sanic.server.protocols.websocket_protocol... | |
"""
Quadrat statistics for planar point patterns
TODO
- use patch in matplotlib to plot rectangles and hexagons
- plot chi2 statistics in each cell
- delete those cells that do not intersect with the window (study area)
"""
__author__ = 'Serge Rey, Wei Kang, Hu Shao'
__all__ = ['RectangleM', 'HexagonM', 'QStatisti... | |
import binascii
import errno
import logging
import sys
import usb.core
import usb.util
from scapy.layers.bluetooth import *
from scapy.supersocket import SuperSocket
# See BT 4.2 Spec, Vol 4, Part B, "USB Transport Layer".
# Used for "Single Function Primary Controller" devices:
USB_DEVICE_CLASS_WIRELESS_CONTROLL... | |
#!/usr/bin/python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of ... | |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
#!/usr/bin/env python3
import os
import sys
import argparse
import numpy as np
import matplotlib.pyplot as plt
from yellowbrick.regressor import AlphaSelection
from yellowbrick.regressor import ResidualsPlot
from yellowbrick.regressor import PredictionError
from yellowbrick.cluster import KElbowVisualizer
from yellow... | |
# 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... | |
'''The systemBase provides the base class implementation for standard
system Base implementations. This systemBase itself is not intended
to be instantiated as the regular Thespian System Base, but instead it
provides a base class that should be subclassed by the various System
Base implementations.
'''
import loggi... | |
# Copyright 2016 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, ... | |
import abc
from collections import namedtuple
from ctypes import POINTER, Structure, byref
from functools import reduce
from operator import mul
import numpy as np
import sympy
from sympy.core.assumptions import _assume_rules
from cached_property import cached_property
from cgen import Struct, Value
from devito.data ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# webkit_scrape.py
#
# Copyright 2015 Spencer McIntyre <zeroSteiner@gmail.com>
#
# 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 os
import unittest
from cloudify_rest_client.deployments import Deployment
from cloudify_system_workflows.deployment_update.step_extractor import (
extract_steps,
DeploymentUpdateStep,
PROPERTY, PROPERTIES, OUTPUT, OUTPUTS, WORKFLOW, WORKFLOWS, NODE,
NODES, OPERATION, OPERATIONS, RELATIONSHIP, R... | |
###############################################################################
## fs.py
## 9te [angband.ornl.gov]
## Wed Jan 12 10:37:50 2011
###############################################################################
## Copyright (C) 2008 Oak Ridge National Laboratory, UT-Battelle, LLC.
##------------------------... | |
""" Module to vette results against Human catalogs
SDSS-DR5 (JXP) and BOSS (Notredaeme)
"""
from __future__ import print_function, absolute_import, division, unicode_literals
import numpy as np
import pdb
import matplotlib as mpl
mpl.rcParams['font.family'] = 'stixgeneral'
from matplotlib.backends.backend_pdf i... | |
from copy import deepcopy
from cms.extensions.toolbar import ExtensionToolbar
from cms.toolbar_pool import toolbar_pool
from cms.utils.urlutils import admin_reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Permission
from django.contrib.sites.models import Site
from cms.api... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 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 sys
import numpy as np
import ctypes
from numba import jit, literal_unroll, njit, typeof
from numba.core import types
from numba.core.compiler import compile_isolated
from numba.core.itanium_mangler import mangle_type
from numba.core.config import IS_WIN32
from numba.core.errors import TypingError
from numba.np... | |
#!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : IOST_WMain.py
# Version : 1.01
# Date : Sep 21, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copy... | |
import json
from datetime import timedelta
import arrow
import boto3
from moto import mock_sns, mock_sqs, mock_ses
from lemur.notifications import service
from lemur.certificates.schemas import certificate_notification_output_schema
from lemur.plugins.lemur_aws.sns import format_message
from lemur.plugins.lemur_aws.s... | |
# 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... | |
from __future__ import absolute_import, print_function, division
import math
import os
import sys
import traceback
import urwid
from typing import Optional, Union # noqa
from mitmproxy import contentviews
from mitmproxy import controller
from mitmproxy import exceptions
from mitmproxy import models
from mitmproxy i... | |
from flask import current_app
from flask.ext.login import UserMixin, AnonymousUserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from itsdangerous import (
TimedJSONWebSignatureSerializer as Serializer,
BadSignature,
SignatureExpired,
)
from .. import db, login_manager
from ... | |
# 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... | |
# -*- Mode: Python -*-
# $Id: filesys.py,v 1.9 2003/12/24 16:10:56 akuchling Exp $
# Author: Sam Rushing <rushing@nightmare.com>
#
# Generic filesystem interface.
#
# We want to provide a complete wrapper around any and all
# filesystem operations.
# this class is really just for documentation,
# identify... | |
# Copyright 2014 DreamHost, LLC
#
# Author: DreamHost, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | |
# orm/state.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Defines instrumentation of instances.
This module is usually not directly visible to ... | |
import random
import sys
import datetime
def subnet_calc():
try:
print("\n")
now = datetime.datetime.now()
print('Starting Subnet Validator at ' + now.strftime("%Y-%m-%d %H:%M"))
#Get IP address and check if valid
while True:
ip_address = input("Enter an IP add... | |
# 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... | |
# -*- coding: utf-8 -*-
#
# last tinkered with by korylprince at gmail.com on 2012-07-12
#
import sys
import logging
try:
import ldap
import ldap.filter
ldap.set_option(ldap.OPT_REFERRALS, 0)
except Exception, e:
logging.error('missing ldap, try "easy_install python-ldap"')
raise e
def ldap_auth(... | |
"""Support to embed Plex."""
import asyncio
from functools import partial
import logging
import plexapi.exceptions
from plexapi.gdm import GDM
from plexwebsocket import (
SIGNAL_CONNECTION_STATE,
STATE_CONNECTED,
STATE_DISCONNECTED,
STATE_STOPPED,
PlexWebsocket,
)
import requests.exceptions
from h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.