text stringlengths 12 6.59M |
|---|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Version: Fri 28 Mar 2014
# Initial build.
#
import os
import time
import numpy as np
import pandas as pd
import yaml
# ... : ted
# from ... import msg
from ... import env
# from ... import TEDError
from ... import Namespace
# . : ted.sdss.cutouts
from . import load_... |
# -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
:codeauthor: :email:`Thomas Jackson (jacksontj.89@gmail.com)`
salt.utils.context
~~~~~~~~~~~~~~~~~~
Context managers used throughout Salt's source code.
'''
from __future__ import absolute_import
# Import python... |
import sys
import collections
import numpy as np
def finite_difference(fun, x0, args=None, d=10**-4):
"""
finite_difference
Calculates the finite difference of fun() around x0. fun() can return an
array of any dimension.
:param fun: Function to calculate the fd of.
:param x0: Location around ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Version: Fri 28 Mar 2014
# Initial build.
#
import os
import time
import numpy as np
import pandas as pd
import yaml
# ... : ted
# from ... import msg
from ... import env
# from ... import TEDError
from ... import Namespace
# . : ted.sdss.cutouts
from . import load_... |
# -*- coding: utf-8 -*-
'''
Define some generic socket functions for network modules
'''
# Import python libs
from __future__ import absolute_import, unicode_literals, print_function
import itertools
import os
import re
import types
import socket
import logging
import platform
import random
import subprocess
from stri... |
# pylint: disable=invalid-name
"""
Define some generic socket functions for network modules
"""
import fnmatch
import itertools
import logging
import os
import platform
import random
import re
import shutil
import socket
import subprocess
import types
from collections.abc import Mapping, Sequence
from string import a... |
# -*- coding: utf-8 -*-
u"""Simulation schema
:copyright: Copyright (c) 2018 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern import pkcollections
from pykern import pkconfig
from pykern impor... |
# -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
salt.utils.parsers
~~~~~~~~~~~~~~~~~~
This is where all the black magic happens on all of salt's CLI tools.
'''
from __future__ import absolute_import
# Import python libs
from __future__ import print_function
impo... |
import os
import re
from time import sleep
from opensextant import Place
from opensextant.gazetteer import DB, estimate_name_bias, GazetteerIndex, get_default_db
from opensextant.utility import replace_diacritics, load_list, get_list
def filter_out_feature(pl: Place, feats):
"""
Filter out places by their fe... |
'''
AUTHOR:
Alexa Villaume, UCSC
PURPOSE:
This is a collection of classes in order to make working with
different photometry catalogs easier.
'''
class CFHTSource:
# Take source line, split(), float them,
def __init__(self, line):
self.line = line
cols = line.split()
self... |
# -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`
salt.utils.parsers
~~~~~~~~~~~~~~~~~~
This is where all the black magic happens on all of salt's CLI tools.
'''
# pylint: disable=missing-docstring,protected-access,too-many-ancestors,too-few-public-methods
# pylint:... |
############################################################################
# Copyright 2016 Albin Severinson #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may no... |
#!/usr/bin/env python
r"""
Tree representations (:mod:`skbio.core.tree`)
=============================================
.. currentmodule:: skbio.core.tree
This module provides functionality for working with trees, including
phylogenetic trees and hierarchies. Functionality is provided for constructing
the trees, for t... |
# -*- coding: utf-8 -*-
'''
Create and verify ANSI X9.31 RSA signatures using OpenSSL libcrypto
'''
# python libs
from __future__ import absolute_import
import glob
import sys
import os
# salt libs
import salt.utils
# 3rd-party libs
from ctypes import cdll, c_char_p, c_int, c_void_p, pointer, create_string_buffer
fr... |
from __future__ import division, print_function, absolute_import
from bugsnag import six
from bugsnag.six.moves.urllib.request import urlopen, Request
import os
import sys
import threading
import traceback
import logging
import bugsnag
from bugsnag.utils import sanitize_object, json_encode
from bugsnag.utils import f... |
# The MIT License (MIT)
# Copyright (c) 2016 Massachusetts Institute of Technology
#
# Authors: Victor Pankratius, Justin Li, Cody Rude
# This software has been created in projects supported by the US National
# Science Foundation and NASA (PI: Pankratius)
#
# Permission is hereby granted, free of charge, to any person... |
try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.3'
|
# -*- coding: utf-8 -*-
'''
Wheel system wrapper for connected minions
'''
from __future__ import absolute_import
from salt.utils.cache import CacheCli
import salt.config
import salt.utils.minion
def connected():
'''
List all connected minions on a salt-master
'''
opts = salt.config.master_config(__o... |
#!/usr/bin/env python
"""
sage_server.py -- unencrypted forking TCP server.
Note: I wrote functionality so this can run as root, create accounts on the fly,
and serve sage as those accounts. Doing this is horrendous from a security point of
view, and I'm definitely not doing this.
For debugging, this may help:
... |
# -*- coding: utf-8 -*-
"""
A Theil-Sen Estimator for Multiple Linear Regression Model
"""
# Author: Florian Wilhelm <florian.wilhelm@gmail.com>
#
# License: BSD 3 clause
from __future__ import division, print_function, absolute_import
import warnings
from itertools import combinations
import numpy as np
from scipy... |
"""
Testing for grid search module (sklearn.grid_search)
"""
from collections import Iterable, Sized
from sklearn.externals.six.moves import cStringIO as StringIO
from sklearn.externals.six.moves import xrange
from itertools import chain, product
import pickle
import sys
import numpy as np
import scipy.sparse as sp
... |
import types
import warnings
import pickle
import re
from copy import deepcopy
from functools import partial, wraps
from inspect import signature
import numpy as np
from scipy import sparse
from scipy.stats import rankdata
import joblib
from . import IS_PYPY
from .. import config_context
from ._testing import _get_ar... |
# coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... |
# This file is part of Indico.
# Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).
#
# Indico 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; either version 3 of the
# License, or (a... |
import warnings
import numpy as np
import scipy.sparse as sp
from scipy.linalg import pinv2
from scipy.linalg import eigh
from itertools import chain
from sklearn.utils.testing import (assert_equal, assert_raises, assert_true,
assert_almost_equal, assert_array_equal,
... |
# 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... |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import pickle
import logging
import numpy as np
from datetime import datetime
from collections import Counter
from matplotlib import pyplot as plt
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
... |
# -*- coding: utf-8 -*-
"""
==============================================================================
SWNT bundle structure class (:mod:`sknano.structures._swnt_bundle`)
==============================================================================
.. currentmodule:: sknano.structures._swnt_bundle
"""
from __fut... |
# 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 2017 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 or agreed to in writing, s... |
import single_robot_behavior
import behavior
from enum import Enum
import main
import evaluation
import constants
import role_assignment
import robocup
import planning_priority
import time
import skills.move
class Capture(single_robot_behavior.SingleRobotBehavior):
# tunable config values
## Speed in m at wh... |
import json
import requests
from pprint import pprint
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from wit import Wit
from django.views import generic
from django.http.response import HttpResponse
from django.template.cont... |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
"""
gridfs使用的模块,用于存储文件到mongodb,
需要设置app.config中的GRIDFS_URIS字段,格式为:
{
Bucket_name:(mongodbURI,collection),
...
}
"""
__all__ = ["Core"]
from sanic.log import logger as log
from sanic_mongo.standalone import GridFSBucket
class Core:
@staticmethod
def SetConfi... |
import cherrypy
from social.utils import setting_name, module_member
from social.actions import do_auth, do_complete, do_disconnect
from social.apps.cherrypy_app.utils import strategy
class CherryPyPSAViews(object):
@cherrypy.expose
@strategy('/complete/%(backend)s')
def login(self, backend):
ret... |
import json
import requests
from pprint import pprint
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from wit import Wit
from django.views import generic
from django.http.response import HttpResponse
from django.template.cont... |
from collections import defaultdict
try:
from ipysankeywidget import SankeyWidget
from ipywidgets import Layout
except ImportError:
SankeyWidget = None
try:
import graphviz
except ImportError:
graphviz = None
from .utils import pairwise
from .sankey_view import sankey_view
from .augment_view_grap... |
from social_auth.backends import get_backends
from social_auth.utils import group_backend_by_type
from social_auth.models import get_social_auth_for_user
# Note: social_auth_backends, social_auth_by_type_backends and
# social_auth_by_name_backends don't play nice together.
def social_auth_backends(request):
... |
# coding: utf-8
from __future__ import absolute_import, division
import json
import re
import six
_url_to_api_object = {}
class FromUrl(object):
def __init__(self, url, _requests):
self.url = url
self._requests = _requests or __import__('requests')
def __call__(self, **kwargs):
try... |
"""
SAS model constructor.
Small angle scattering models are defined by a set of kernel functions:
*Iq(q, p1, p2, ...)* returns the scattering at q for a form with
particular dimensions averaged over all orientations.
*Iqac(qab, qc, p1, p2, ...)* returns the scattering at qab, qc
for a rotationally s... |
import logging
import time
from datetime import datetime
import types
from .micromodels.fields import ModelCollectionField
from . import SlickConnection, SlickCommunicationError, Release, Build, BuildReference, Component, ComponentReference, \
Project, Testplan, Testrun, Testcase, RunStatus, Result, ResultStatus, ... |
import datetime
import socket
import time
from django.db import connections
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
try:
from django.utils.timezone import now
except ImportError:
now = datetime.datetime.now
from slowpoke.models import *
class SlowPokeTestRunner(... |
"Smarkets API client order objects"
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com>
#
# This module is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
import smarkets.seto.piqi_pb2 as seto
BUY = 1
SELL = 2
class OrderCreate(object):
"Simple order state with usef... |
"""
Saucebrush Filters are callables that take a Saucebrush source and yield
back filtered records.
The Filter, YieldFilter, and FieldFilter abstract base types are provided
for convenience. Derived classes only need to implement process_record
(or process_field for FieldFilter).
"""
from saucebr... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import division, print_function
import copy
import time
import math
from collections import OrderedDict
import warnings
import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline as Spline1d
from astropy.extern import s... |
"""
selenium-saucelabs-python
~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from __future__ import absolute_import
try:
VERSION = __import__('pkg_resources') \
.get_distribution('selenium-saucelabs-python').version
except Exception, e:
VERSION = 'unknown'
# Try global selenium library first
try:
from selenium imp... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import division, print_function
from warnings import warn
import copy
import numpy as np
from scipy.interpolate import InterpolatedUnivariateSpline as Spline1d
from astropy.utils import OrderedDict as odict
from astropy.extern import six
... |
import os
import json
import getpass
import sys
import configparser
import webbrowser
import pyperclip
import click
from prompt_toolkit import prompt
from .api import SnippetApi
from .snippet import Snippet
from .completer import SnippetFilesCompleter
from .repo import Repo
from . import utils
DEFAULT_SNIPPET_DIR = ... |
import threading
from scadasim.utils import parse_yml, build_simulation
import sys
import logging
logging.basicConfig()
log = logging.getLogger('scadasim')
log.setLevel(logging.WARN)
class Simulator(object):
def __init__(self, dbus=False, debug=0):
self.dbus = dbus
if debug == 1:
log... |
#!/usr/bin/env python
from __future__ import print_function
import os, stat, sys, shutil, json, re, subprocess, errno, gzip, tarfile, zipfile
import urllib, tempfile
import time
from collections import defaultdict
from itertools import groupby
from subprocess import Popen, PIPE
import hashlib
import urllib2
from req... |
# Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... |
from constants import MAX_LIMIT
from version import __version__, version_info
import requests
from cStringIO import StringIO
import csv
import json
import re
__author__ = "Cristina Munoz <hi@xmunoz.com>"
class Socrata(object):
def __init__(self, domain, app_token, username=None, password=None,
... |
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
from builtins import object
from io import StringIO, IOBase
import requests
import csv
import json
import logging
import re
import os
from .constants import DEFAULT_API_PREFIX, OLD_API_PREFIX
class Socrata... |
# -*- coding: utf-8 -*-
# Django settings for sopler project.
import os.path
PROJECT_DIR = os.path.normpath(os.path.dirname(os.path.abspath(__file__)))
DEBUG = False
TEMPLATE_DEBUG = DEBUG
SESSION_SAVE_EVERY_REQUEST = True
#Set "True" if all non-SSL requests should be permanently redirected to SSL.
SECURE_SSL_REDIREC... |
import gaussian
import torch, random, sys
from torch.autograd import Variable
from torch.nn import Parameter
import torch.nn.functional as F
from torch import nn, optim
from tqdm import trange
from tensorboardX import SummaryWriter
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import util, lo... |
##########################################################################
#
# Copyright (c) 2007-2017, 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:
#
# * Redis... |
# -*- coding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals, \
with_statement
import calendar
from datetime import datetime
import json
import logging
import time
import types
import urllib
import urllib2
import urlparse
import pytz
SOLR_ADD_BATCH = 200 # Number of do... |
from scapy.fields import *
from scapy.packet import *
from scapy.layers.inet import UDP
from scapy.layers.dns import DNSQRField, DNSRRField, DNSRRCountField
"""
LLMNR (Link Local Multicast Node Resolution).
[RFC 4795]
"""
#############################################################################
### ... |
__version__ = '2.5.6'
|
import json
import mfr
from .exceptions import TableTooBigException, EmptyTableException, MissingRequirementsException
from mfr.core import RenderResult, get_file_extension
from mako.template import Template
from .configuration import config
def render_html(fp, src=None):
"""Render a tabular file to html
:par... |
#!/usr/bin/env python3
#import serial
import asyncio, json, copy
import datetime
import sys
from collections import Callable
@asyncio.coroutine
def simulator(reader, writer):
while True:
data = yield from reader.read(100)
print('data: ',data.decode())
ack_received = 'ok\r\n'.encode()
ack_ready = '{"stat":0... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import sys
import warnings
import re
import logging
import gzip
import jinja2
import datetime
import json
from glob import glob
import argparse
import matplotlib.pyplot as plt
import numpy as np
import tables
from six.moves import zip
from pathli... |
import random
import sys
import os
import time
from slackclient import SlackClient
from bot_plugin_set import BotPluginSet
from mozdef_util.utilities.logger import logger
greetings = [
"mozdef bot in da house",
"mozdef here..what's up",
"mozdef has joined the room..no one panic",
"mozdef bot here..... |
import os
import zipfile
from watcher import SonoSiteWatcher
import requests
from requests.auth import HTTPDigestAuth
import shutil
SCANNER_OUTPUT_DIR = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'tests', 'complete'
)
def get_subdirectories(directory):
return [d for d in os.listdir(directory) ... |
###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification, ... |
# Copyright 2020
#
# 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
# ... |
"""Start EAD Sandbox WSGI Application."""
import socket
import sys
import webbrowser
from argparse import ArgumentParser
from wsgiref.simple_server import make_server
from eadtoolbox.sandbox import EADSandboxWsgiApp
application = EADSandboxWsgiApp()
# Set up argument parser
argparser = ArgumentParser(description=_... |
from django import template
from waitinglist.forms import WaitingListEntryForm
register = template.Library()
@register.assignment_tag
def waitinglist_entry_form():
"""
Get a (new) form object to post a new comment.
Syntax::
{% waitinglist_entry_form as [varname] %}
"""
re... |
import os
import json
import time
import uuid
import asyncio
import hashlib
from stevedore import driver
from waterbutler.core import utils
from waterbutler.core import signing
from waterbutler.core import streams
from waterbutler.core import provider
from waterbutler.core import exceptions
from waterbutler.provider... |
import psycopg2
import uuid
import sys
from datetime import datetime
import ProcessedTweet
from Term import ProcessedCity,ProcessedCityCount
import Term
from json import dumps
import UserUpdate
class Storage:
def __init__(self):
connection = self.__getConnection()
cursor = connection.cursor()
... |
import tensorflow as tf
import numpy as np
def TPS_STN(U, nx, ny, cp, out_size):
"""Thin Plate Spline Spatial Transformer Layer
TPS control points are arranged in a regular grid.
U : float Tensor
shape [num_batch, height, width, num_channels].
nx : int
The number of control points on x... |
#######################################################
'''
Metodos Numericos para la Ciencia e Ingenieria FI3104
Tarea 2
Maximiliano Dirk Vega Aguilera
18.451.231-9
'''
#######################################################
import numpy as np
import matplotlib.pyplot as plt
#########################################... |
import requests
import nose
_HOST_UNDER_TEST = ""
def setup_module():
f = open('test_url.cfg', 'r')
global _HOST_UNDER_TEST
_HOST_UNDER_TEST = f.readline().strip()
f.close()
class TestPremium:
def test_region1_age40(self):
payload = {'lat': '39.68', 'long': '-122.48', 'age': 40}
... |
__all__ = []
import os,sys,time,glob,string,traceback,unittest
import types
import imp
try:
# These are used by Numeric tests.
# If Numeric and scipy_base are not available, then some of the
# functions below will not be available.
from Numeric import alltrue,equal,shape,ravel,around,zeros,Float64,a... |
import logging
import os
import tempfile
import time
from urllib.request import urlopen as urllib_urlopen
from urllib.error import URLError
from typing import (
Any,
Callable,
Container,
Dict,
IO,
Mapping,
MutableMapping,
Optional,
Text,
Tuple,
Union,
cast,
)
import reque... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
rss_parser finds all information in an rss item
"""
# @author chengdujin
# @contact chengdujin@gmail.com
# @created Jan 2, 2013
import sys
reload(sys)
sys.setdefaultencoding('UTF-8')
sys.path.append('..')
from BeautifulSoup import BeautifulStoneSoup
import calendar
impo... |
from __future__ import absolute_import
from __future__ import unicode_literals
import uuid
from datetime import datetime
from django.test import TestCase
from sqlalchemy import Date, Integer, SmallInteger, UnicodeText
from casexml.apps.case.mock import CaseBlock
from casexml.apps.case.tests.util import delete_all_c... |
from kivy.clock import Clock
import os
from platform import system
import subprocess
import signal
from Queue import Queue, Empty
from threading import Thread
import sys
from decimal import Decimal
__author__ = 'woolly_sammoth'
from kivy.uix.screenmanager import Screen
class HomeScreen(Screen):
def __init__(s... |
from __future__ import absolute_import
from __future__ import unicode_literals
import re
from uuid import uuid4
from django.urls import reverse
from django.test import TestCase, Client
from dimagi.utils.couch.cache.cache_core import get_redis_default_cache
from mock import patch
from casexml.apps.case.mock import Cas... |
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import calendar
import hashlib
import json
import random
import re
import six
from copy import deepcopy
from corehq.apps.data_interfaces.utils import property_references_parent
from corehq.messaging.scheduling... |
from __future__ import absolute_import
from __future__ import unicode_literals
import copy
import datetime
import json
import logging
import six
from django.http import HttpResponse
from django.utils.decorators import method_decorator, classonlymethod
from django.views.generic import View
from elasticsearch.exceptions... |
from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... |
from parsl import *
import os
import time
import shutil
import argparse
workers = IPyParallelExecutor()
dfk = DataFlowKernel(executors=[workers])
@App('bash', dfk)
def multi_line(inputs=[], outputs=[],
stderr=os.path.abspath('std.err'),
stdout=os.path.abspath('std.out')):
return ""... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from scrapy import Spider, FormRequest, Request, Item, Field
from scrapy.loader import ItemLoader
from scrapy.loader.processors import MapCompose
from scrapy.shell import inspect_response
from jaccount import login
# from sdtMain import asp_params
from pdb import set_trac... |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
#!/usr/bin/env python
import networkx as nx
import numpy as np
import os
from scipy.io.matlab import loadmat, savemat
import logging
from tqdm import tqdm
import nibabel as nib
import os.path as op
import networkit
from time import time
from .spatial import Spatial, hdr
try:
from matplotlib import pyplot as plt
... |
# Copyright (c) 2008 Mikeal Rogers
#
# 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 agre... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:set expandtab tabstop=4 shiftwidth=4:
#
# The MIT License (MIT)
# ldapCherry
# Copyright (c) 2014 Carpentier Pierre-Francois
# Generic imports
import sys
import re
import traceback
import json
import logging
import logging.handlers
from operator import itemgetter
fro... |
"""
Python Interchangeable Virtual Instrument Library
Copyright (c) 2012-2016 Alex Forencich
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... |
# -*- coding: utf-8 -*-
#
# django-ldapdb
# Copyright (C) 2009-2010 Bolloré telecom
# See AUTHORS file for a full list of contributors.
#
# 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, either... |
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... |
# Copyright (c) 2010 Spotify AB
# Copyright (c) 2010-2011 Yelp
#
# 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, m... |
# Copyright (c) 2008 Chris Moyer http://coredumped.org/
#
# 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, ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Print a gorgeous millipede
"""
from __future__ import print_function
from argparse import ArgumentParser
import os
import sys
__version__ = '0.2'
def millipede(size, comment=None, reverse=False, template='default'):
"""
Output the millipede
"""
pad... |
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 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 ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Print a gorgeous millipede
"""
from __future__ import print_function
from argparse import ArgumentParser
import os
import sys
__version__ = '0.1'
def millipede(size, comment=None, reverse=False, template='default'):
"""
Output the millipede
"""
pad... |
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# 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, modi... |
from __future__ import absolute_import
import amqp.connection
import amqp
import gevent
import gevent.event
import json
import logging
import uuid
LOG = logging.getLogger(__name__)
class AMQPPubChannel(object):
def __init__(self, topic):
self.topic = topic
self.channel = None
self.ioloop... |
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2011 Harry Marr http://hmarr.com/
#
# 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
# wit... |
#
# Copyright (c) 2009-2010 rPath, Inc.
#
# All rights reserved.
#
"""
A unified interface to rBuilder project repositories.
"""
import errno
import logging
import os
import time
import weakref
from collections import namedtuple
from conary import callbacks
from conary import conarycfg
from conary import conaryclien... |
import logging, logging.handlers
log = logging.getLogger(__name__)
import os
import os.path
import resource
import sys
import yaml
import botologist.bot
root_dir = os.getcwd()
config_path = os.path.join(root_dir, 'config.yml')
if len(sys.argv) > 1:
config_path = sys.argv[1]
if not config_path.startswith('/'):
c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.