text stringlengths 12 6.59M |
|---|
# -*- coding:utf-8 -*-
import socket
import logging
import datetime
from tornado.iostream import IOStream
from tornado.ioloop import IOLoop
from tornado import gen
from datetime import timedelta
from torstomp.protocol import StompProtocol
from torstomp.errors import StompError
from torstomp.subscription import Subsc... |
import asyncio
import discord
import random
import datetime
from discord.ext import commands
from Cogs import Settings
from Cogs import Xp
# This is the feed module. It allows the bot to be fed,
# get hungry, die, be resurrected, etc.
class Feed:
# Init with the bot reference, and a reference to... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2006 Edgewall Software
# Copyright (C) 2004 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2006 Christian Boos <cboos@neuf.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPY... |
# -*- coding: iso-8859-1 -*-
#
# Copyright (C) 2003-2006 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2006 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as p... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2014 Edgewall Software
# Copyright (C) 2003-2006 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2006 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the fil... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2009 Edgewall Software
# Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2005-2007 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part o... |
__version_info__ = {
'major': 0,
'minor': 2,
'micro': 7,
'releaselevel': 'beta',
'serial': 1
}
def get_version(short=False):
assert __version_info__['releaselevel'] in ('alpha', 'beta', 'final')
vers = ["%(major)i.%(minor)i.%(micro)i" % __version_info__]
if __version_info__['releaseleve... |
from collections import namedtuple
import logging
from operator import itemgetter
import re
import string
import unicodedata
from django.db import transaction
from django.db.utils import IntegrityError
from django.utils import timezone
from spotify.spotify import spotify
from trackmap.models import Album, Track, Trac... |
#!/usr/bin/env python3
# Copyright 2020 Google LLC
#
# Licensed under the the Apache License v2.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://llvm.org/LICENSE.txt
#
# Unless required by applicable law or agreed to in writi... |
#!/usr/bin/env python3
#
# description to be written ...
#
import re
import json
import regex
import os.path
import time
import statistics
import argparse
import itertools
import multiprocessing
from Bio import Seq, SeqRecord
import tracemalloc
import time
def print_memory_tracking(threshold,message,current_level)... |
__version__ = "2.4.3"
|
__version__ = '2.25.2'
|
#!/usr/bin/env python
"""
.. module:: inference
:synopsis: An implementation of the Hindley Milner type checking algorithm
based on the Scala code by Andrew Forrest, the Perl code by
Nikita Borisov and the paper "Basic Polymorphic Typechecking"
by Cardelli.
.. moduleauthor::... |
from __future__ import absolute_import
import os
import six
import json
import django
from .. import views
from django.db import models
from .. import models as bmodels
from django.conf import settings
from django.test import TestCase
from django.core.management import call_command
from django.core.management.base impo... |
import uuid
from time import gmtime, strftime
from celery.task import task
from pandas import concat, rolling_window
from bamboo.core.calculator import Calculator
from bamboo.core.frame import BambooFrame, BAMBOO_RESERVED_KEY_PREFIX,\
DATASET_ID, DATASET_OBSERVATION_ID, INDEX, PARENT_DATASET_ID
from bamboo.core.s... |
import subprocess
import os
import time
class Installer:
############################################################
# install_software
############################################################
def install_software(self):
if self.benchmarker.install == 'all' or self.benchmarker.install == 'server':
... |
#!/usr/bin/env python3
# Copyright (c) 2014-2021 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Base class for RPC testing."""
import configparser
from enum import Enum
import argparse
import loggin... |
import os
import json
import time
import exiftool
def fetchFilesWithExtensions(rootdir, extensions):
matchedfiles = []
dirs = [rootdir]
while dirs:
cur_dir = dirs[0]
del dirs[0]
# (path, dirnames, filenames)
walk_result = os.walk(cur_dir).next()
for subdir in walk_r... |
# coding: utf-8
import os
import random
import struct
import time
import math
from collections import OrderedDict
from uuid import uuid4, UUID
from thrift_bindings.v30.ttypes import CfDef, Mutation, ColumnOrSuperColumn, Column
from thrift_bindings.v30.ttypes import ConsistencyLevel as ThriftConsistencyLevel
from dte... |
""" Contains unit tests for the MetaFeatures class.
# TODO
# compare computed metafeatures against a static file of pre-computed metafeatures
# this would allow us to see if we have fundamentally changed how we are computing metafeatures
# during any development process
# we then manually decide which metafeatures are ... |
#!/usr/bin/env python
"""
Tool for flashing .hex files to the ODrive via the STM built-in USB DFU mode.
"""
import argparse
import sys
import time
import threading
import platform
import struct
import array
import fractions
import usb.core
import odrive.discovery
from odrive.utils import Event
from odrive.dfuse import... |
"""
Python Interface to UpCloud's API.
"""
# flake8: noqa
from __future__ import unicode_literals
from __future__ import absolute_import
__version__ = '1.0.1'
__author__ = 'Elias Nygren'
__author_email__ = 'elias.nygren@upcloud.com'
__maintainer__ = 'UpCloud'
__maintainer_email__ = 'hello@upcloud.com'
__license__ =... |
""" Contains unit tests for the MetaFeatures class. """
import inspect
import json
import math
import os
import random
import time
import unittest
# import openml
import pandas as pd
import numpy as np
from metalearn.metafeatures.metafeatures import Metafeatures
from test.config import CORRECTNESS_SEED, METADATA_PATH... |
# -*- coding: utf-8 -*-
import argparse
import json
import os
import re
import pymysql
os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__))
import pywikibot
from config import config_page_name, database # pylint: disable=E0611,W0614
os.environ['TZ'] = 'UTC'
site = pywikibot.Site()
site.login()... |
import json
from updown import settings
def generate(problems, resolved, information, last_updated):
if len(problems) == 0:
alexa_string = 'There are currently no reported step free access issues on the \
Transport for London network.'
else:
alexa_string = 'There are step free ac... |
import re
import pymongo
import requests
from bs4 import BeautifulSoup
from upol_crawler import logger, tasks
from upol_crawler.db import db_mongodb as db
from upol_crawler.settings import *
from upol_crawler.urls import parser, robots, url_tools, validator
def load_seed(seed_path, database):
"""Load urls seed f... |
#!/usr/bin/env python
# Copyright 2017 Stanford University
#
# 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... |
#!/usr/bin/env python
class Buffer(object):
"""Read data from a filelike object without blocking
"""
def __init__(self, filelike=None):
self._data = ''
self.filelike = filelike
self.eof = False
def _append(self, newdata):
assert(self.eof is False)
if newdata ==... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import urllib2
import urllib
import google
from urlparse import urlparse
import sys
import os
from sys import argv as s
import time
from tqdm import tqdm
from termcolor import colored
class IPTV(object):
def __init__(self, stdout=None, stderr=None):
self._stdout = stdout o... |
"""
EPUB generation from Markdown source files plus YAML metadata
"""
import os
from datetime import datetime as dt
import shutil
from hashlib import md5
import logging
import re
import yaml
import jinja2 as j2
import markdown
from . import params
from . import utils
def gen_uuid(message):
uuid = md5(message.en... |
"""
EventProcessor classes.
An EventProcessor is an object that the Simulation is aware of, and can
accept simulation Events. EventProcessors can also generate Events, and
will presumably do some computation as well. Most EventProcessors
will be in other more specific packages, such as topo.sheet; those
here are the ... |
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext_lazy as _
from hijack.admin import HijackUserAdminMixin
from .models import User
from .forms import UserCreationForm, UserChangeForm
class UserProfileAdmin(HijackUserAdminMixin, UserAdmin):... |
# by ME
# snoopify.py
# changes comments into snoop dog/lions language
import praw, re
#gets password
with open('passwords.txt', 'r') as passFile:
password = passFile.read()
with open('user.txt', 'r') as uFile:
userName = uFile.read()
r = praw.Reddit('Snoop Translator by u/kmurph45 v0.1.')
r.login(str(userNam... |
#!/usr/bin/env python
#
# TP-Link Wi-Fi Smart Plug Protocol Client
# For use with TP-Link HS-100 or HS-110
#
# by Lubomir Stroetmann
# Copyright 2016 softScheck GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... |
# -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... |
# -*- coding: iso-8859-1 -*-
#
# Copyright (C) 2005 Edgewall Software
# Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.... |
import requests
import re
from HTMLParser import HTMLParser
from citeproc.source.json import CiteProcJSON
from citeproc import CitationStylesStyle, CitationStylesBibliography
from citeproc import formatter
from citeproc import Citation, CitationItem
def get_readme(github_base_url):
# use this later
# url = "h... |
#!/usr/bin/env python
# Copyright (c) 2012 Eric S. Raymond <esr@thyrsus.com>
# Distributed under BSD terms.
#
# This script contains git porcelain and porcelain byproducts.
# Requires Python 2.6, or 2.4 with the 2.6 json library installed.
#
# usage: irkerhook.py [-V] [-n]
#
# This script is meant to be run in a post-c... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2006 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part ... |
# -*- coding: utf-8 -*-
"""
treebeard.mp_tree
-----------------
Materialized Path Tree.
:copyright: 2008 by Gustavo Picon
:license: Apache License 2.0
This is an efficient implementation of Materialized Path
trees for Django 1.0+, as described by `Vadim Tropashko`_ in `SQL Design
Pat... |
# -*- coding: utf-8 -*-
"""
treebeard.ns_tree
-----------------
Nested Sets Tree.
:copyright: 2008-2010 by Gustavo Picon
:license: Apache License 2.0
An implementation of Nested Sets trees for Django 1.0+, as described by
`Joe Celko`_ in `Trees and Hierarchies in SQL for Smarties`_.
... |
from django.contrib.gis.db import models
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
from operations.models import Trainer, Location, Participant
from trainings.tasks import send_message
class Event(models.Model):
"""
Training events
... |
# -*- encoding:utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import codecs
import io
import os
import subprocess
from PIL.EpsImagePlugin import EpsImageFile
__version__ = "0.0.1"
BASE_DIR = os.path.normpath(os.path.abspath(os.path.dirname(__file__)))
BWIPP_PATH = os.pa... |
"""
Class, which contains methods to optimize branch lengths given the time
constraints set to leaves
"""
from __future__ import print_function, division
from treeanc import TreeAnc
import utils
import config as ttconf
import numpy as np
from Bio import AlignIO, Phylo
import datetime
from scipy.interpolate import int... |
from trigger import exceptions
from trigger.conf import settings
from grammar import *
from support import junos_match_ordering_list, junos_match_order, address_matches
# Temporary resting place for comments, so the rest of the parser can
# ignore them. Yes, this makes the library not thread-safe.
Comments = []
cla... |
"""
triangles.py
-------------
Functions for dealing with triangle soups in (n, 3, 3) float form.
"""
import numpy as np
from . import util
from .points import point_plane_distance
from .constants import tol
def cross(triangles):
"""
Returns the cross product of two edges from input triangles
Paramete... |
"""sosource.py Second order source term calculation module.
Author: Ian Huston
$Id: sosource.py,v 1.75 2010/01/18 14:36:02 ith Exp $
Provides the method getsourceandintegrate which uses an instance of a first
order class from cosmomodels to calculate the source term required for second
order models.
"""
from __futur... |
from __future__ import division
from travwave import navigation, solver, discretization
class BifurcationDiagram(object):
def __init__(self, equation, boundary_condition, size = 32, doublings = 1, correction_rate = 10):
self.equation = equation
self.boundary = boundary_condition
self... |
# coding=utf-8
# Copyright 2019 The Trax 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 a... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# moldynplot.StateProbFigureManager.py
#
# Copyright (C) 2015 Karl T Debiec
# All rights reserved.
#
# This software may be modified and distributed under the terms of the
# BSD license. See the LICENSE file for details.
"""
Generates one or more state probability fig... |
#!/usr/bin/env python2.5
#
# Copyright 2010 the Melange 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 applic... |
# coding:utf-8
import pandas as pd
from container import Container
from styler import Styler, number_formats, colors
import numpy as np
import openpyxl.cell
from copy import deepcopy
import datetime as dt
class StyleFrame(object):
"""
A wrapper class that wraps pandas DataFrame.
Stores container objects t... |
import datetime
import pytest
from flask import json, url_for
from app import DATETIME_FORMAT
from tests import create_authorization_header
from tests.app.db import create_inbound_sms
def test_get_all_inbound_sms_returns_200(
client, sample_service
):
all_inbound_sms = [
create_inbound_sms(servic... |
# coding:utf-8
import datetime as dt
import numpy as np
import pandas as pd
import sys
from .deprecations import deprecated_kwargs
from . import utils
from copy import deepcopy
from collections import Iterable
from openpyxl import cell, load_workbook
from openpyxl.xml.functions import fromstring, QName
PY2 = sys.ver... |
# coding:utf-8
import datetime as dt
import numpy as np
import pandas as pd
import sys
from .deprecations import deprecated_kwargs
from . import utils
from copy import deepcopy
from collections import Iterable
from openpyxl import cell, load_workbook
from openpyxl.xml.functions import fromstring, QName
PY2 = sys.ver... |
from __future__ import print_function, division
from Bio import Phylo
from Bio import AlignIO
import numpy as np
from gtr import GTR
import seq_utils
try:
from itertools import izip
except ImportError: #python3.x
izip = zip
import json
class TreeAnc(object):
"""
Class defines simple tree object wi... |
import unittest
import numpy
import pytest
import cupy
from cupy.cuda import runtime
from cupy import testing
@testing.parameterize(*testing.product({
'UPLO': ['U', 'L'],
}))
@testing.gpu
@pytest.mark.xfail(runtime.is_hip, reason='dsyevd not implemented')
class TestEigenvalue(unittest.TestCase):
@testing.f... |
"""
The :mod:`tslearn.shapelets` module gathers Shapelet-based algorithms.
It depends on the `keras` library for optimization.
"""
from keras.models import Model, model_from_json, load_model
from keras.layers import Dense, Conv1D, Layer, Input, concatenate, add
from keras.metrics import (categorical_accuracy, categor... |
# -*- coding: utf-8 -*-
from __future__ import with_statement, print_function, absolute_import
from trello.compat import force_str
class Checklist(object):
"""
Class representing a Trello checklist.
"""
def __init__(self, client, checked, obj, trello_card=None):
self.client = client
s... |
"""
WSGI config for troposphere project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
import sys
root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'... |
import pytest
import numpy as np
from numpy.testing import assert_allclose
from keras.utils.test_utils import layer_test, keras_test
from keras.utils.np_utils import conv_input_length
from keras import backend as K
from keras_contrib import backend as KC
from keras_contrib.layers import convolutional, pooling
from ker... |
""" API module for pySpaceGDN.
This is a really light wrapper around the API.
It only loads the json to python objects.
All public functions will return a list of results if the query was
successfull, or a dictionary with the error if it failed. The module is written
for both Python 2.7.x and Python 3.x, the only thi... |
#!/usr/bin/python2.7
import os
import re
import sys
import stat
import time
import zlib
import base64
import select
import socket
import os.path
import urllib2
import argparse
import tempfile
import logging as log
import subprocess as sp
from datetime import datetime
import config as CFG
from poetsocket import *
UA ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2017-2018 CIRCL Computer Incident Response Center Luxembourg (smile gie)
# Copyright (C) 2017-2018 Christian Studer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Li... |
from ggame import App, Sprite, ImageAsset, Frame, SoundAsset, Sound
import math
from time import time
class Stars(Sprite):
asset = ImageAsset("images/starfield.jpg")
width = 512
height = 512
def __init__(self, position):
super().__init__(Stars.asset, position)
class Sun(Sprite):
ass... |
from pyhamimports import *
class Spectrum(object):
"""
Spectrum Class
Description:
This is a spectrum class which defines the spectrum object, containing
information about the wavelength, flux, and error for a given spectrum.
Because knowledge of only one spectrum is necessary at a... |
"""
This module contains a list of the known Twitter V2+ API expansions and fields
for each expansion, and a function flatten() for "flattening" a result set,
including all expansions inline.
ensure_flattened() can be used in tweet processing programs that need to make
sure that data is flattened.
"""
import loggi... |
# Tweepy
# Copyright 2009 Joshua Roesslein
# See LICENSE
import httplib
from socket import timeout
from threading import Thread
from time import sleep
from . auth import BasicAuthHandler
from . parsers import parse_status
from . api import API
from . error import TweepError
try:
import json
except ImportError:
i... |
# -*- test-case-name: twext.python.test.test_log-*-
##
# Copyright (c) 2006-2013 Apple 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... |
import os
import unittest
import pandas as pd
from cea.demand.occupancy_model import schedule_maker
from cea.demand.thermal_loads import calc_thermal_loads, BuildingProperties
from cea.globalvar import GlobalVariables
from cea.inputlocator import InputLocator
from cea.utilities import epwreader
class TestCalcTherma... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import requests
import time
from unittest import TestCase
from polyaxon_client.api_config import ApiConfig
from polyaxon_client.transport.threaded_transport import ThreadedTransportMixin
from polyaxon_client.workers.queue_worker... |
#!/usr/bin/env python
import os
import socket
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SOCK_ADDRESS = ('127.0.0.1', 9000)
def check_path_info(path_info):
if not path_info:
path_info = '/index.html'
return os.path.join(BASE_DIR, path_info[1:])
def request_parse(text):
... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
'''
OAuth 2 serveur implementation based on Authlib.
See the documentatiosn here:
- https://docs.authlib.org/en/latest/flask/oauth2.html
- https://docs.authlib.org/en/latest/spec/rfc6749.html
- https://docs.authlib.org/en/latest/spec/rfc6750.html
- ht... |
import websocket
try:
import simplejson as json
except:
import json
from threading import Thread, Timer
import time
import logging
class Connection(Thread):
def __init__(self, eventHandler, url, logLevel=logging.INFO):
self.socket = None
self.socket_id = ""
self.eventCallbacks =... |
# -*- Python -*-
# license
# license.
# ----------------------------------------------------------------------
import os, copy, math, operator, datetime, pprint
from pathlib import Path
import logging; module_logger = logging.getLogger(__name__)
from .hidb_access import get_hidb
from .locdb_access import get_locdb
fro... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
desimodel.inputs.gfa
====================
Utilities for updating GFA data.
"""
import os.path
import numpy as np
from ..focalplane import get_radius_deg, get_radius_mm, xy2qs
from ..io import datadir
def build_gfa_table(testdi... |
"""
desispec.calibfinder
==============
Reading and selecting calibration data from $DESI_SPECTRO_CALIB using content of image headers
"""
import re
import os
import numpy as np
import yaml
import os.path
from desiutil.log import get_logger
def _parse_date_obs(value):
'''
converts DATE-OBS keywork to int
... |
"""
Module for QA plots
"""
from __future__ import print_function, absolute_import, division, unicode_literals
import numpy as np
from scipy import signal
import scipy
import sys, os
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
import matplotlib.gridspec as gridspec
from desispec imp... |
import sys
from bs4 import BeautifulSoup
import effulgence_pb2 as eproto
import google.protobuf
import re
import os
import urlparse
def get_chapters_from_stdin():
chapters = eproto.Chapters()
google.protobuf.text_format.Merge(sys.stdin.read(), chapters)
return chapters
def load_profile_data():
... |
import os
import numpy as np
from desitarget.skybricks import Skybricks
def stuck_on_sky(hw, tiles):
'''
Will STUCK positioners land on good SKY locations for the given set of tiles?
Returns a nested dict:
stuck_sky[tileid][loc] = bool_good_sky
'''
from fiberassign.utils import Logger
... |
'''Explore matrices that respect rank
identity_matrices = RankMatrices(identity_rule)
>>> for n in range(2, 11):
... for m in range(1, n):
... if 2 * m <= n:
... print(n, m, identity_matrices.product_stats(n - m, m))
2 1 [(1, 2)]
3 1 [(0, 3), (1, 3)]
4 1 [(0, 10), (1, 5)]
4 2 [(0, 14), (1, 6)]
... |
#!/usr/bin/python2.4
#
# Copyright (c) 2008 rPath, Inc.
#
import os
import sys
import StringIO
from lxml import etree
import descriptor_errors as errors
import descriptor_nodes as dnodes
import constants
class _BaseClass(object):
version = constants.version
defaultNamespace = constants.defaultNamespaceList[0... |
import pandas as pd
import json
import requests
class Table(object):
"""The Table object provides methods for Cytoscape table manipulation"""
def __init__(self):
self.df = None
self.port = None
def push(self, target_table_name):
BASE_URL = "http://localhost:" + self.port + "/v1/"
... |
# -*- coding: utf-8 -*-
"""
Air quality plugin
Plugin show data fetched form aqicn.org public API
Configuration parameters:
cache_timeout: timeout for refresh data from api (default 900)
city: city or id of city
for search for Your city use curl, for example (sarching for stations in Kraków):
... |
# -*- coding: utf-8 -*-
"""
A simple countdown timer.
This is a very basic countdown timer. You can change the timer length as well
as pausing, restarting and resetting it. Currently this is more of a demo of a
composite.
Each part of the timer can be changed independently hours, minutes, seconds using
mouse button... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import os
import jpype
from future.utils import iteritems
from pyathenajdbc import (ATHENA_DRIVER_CLASS_NAME,
ATHENA_CONNECTION_STRING,
ATHENA_JAR)
... |
__author__ = 'Tom Schaul and Thomas Rueckstiess'
from itertools import chain
import logging
from sys import exit as errorexit
from pybrain.structure.networks.feedforward import FeedForwardNetwork
from pybrain.structure.networks.recurrent import RecurrentNetwork
from pybrain.structure.modules import BiasUnit, SigmoidL... |
class SSLUnavailable(Exception):
"""If you haven't verified a CNAME zone within the grace period (a week),
it can't be verified any more.
"""
pass
|
'''
Created on Feb 24, 2013
@author: jasonrudy
'''
import pickle
import copy
import os
from .testing_utils import (if_statsmodels, if_pandas, if_patsy,
if_environ_has, assert_list_almost_equal_value,
assert_list_almost_equal,
if_sklear... |
import rlp
from opcodes import opcodes
import utils
import time
import blocks
import transactions
debug = 0
# params
GSTEP = 1
GSTOP = 0
GSHA3 = 20
GSLOAD = 20
GSSTORE = 100
GBALANCE = 20
GCREATE = 100
GCALL = 20
GMEMORY = 1
GTXDATA = 5
GTXCOST = 500
OUT_OF_GAS = -1
def verify(block, parent):
assert block.t... |
#!/usr/bin/env python
import cairo
import pygtk
pygtk.require('2.0')
import gtk
import gobject
import os
from sys import argv
from TurtleArt.tablock import Media
from TurtleArt.taconstants import CONSTANTS
from TurtleArt.tatype import *
from TurtleArt.tawindow import TurtleArtWindow
# path to the toplevel director... |
"""Configuration file for harness.py
Author: Ian Huston
"""
import logging
import os.path
##############################
# CHANGEABLE VALUES
##############################
# Directory structure
# Calculate base directory as being below $HOME
CODEDIR = os.path.dirname(os.path.abspath(__package__))
# Change the na... |
#!/usr/bin/python
# $Id:$
import ctypes
import comtypes
from comtypes import client, GUID
from pyglet.gl import *
import pyglet.window.win32.types as wintypes
from pyglet import image
from pyglet.media import Sound, Video, Medium, Listener, MediaException
_qedit = client.GetModule('qedit.dll')
_quartz... |
# -*- coding: utf-8 -*-
"""
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
Formatter for Pixmap output.
:copyright: 2007 by Ali Afshar.
:license: BSD, see LICENSE for more details.
"""
import sys
from commands import getstatusoutput
from pygments.formatter import Formatter
from pygments.util im... |
# -*- coding: utf-8 -*-
"""
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
Formatter for Pixmap output.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
from pygments.formatter import Formatter
from pygments.util import ge... |
"""
This modules provides eigenfunctions for a certain set of second order spatial
operators. Therefore functions for the computation of the corresponding
eigenvalues are included.
The functions which compute the eigenvalues are deliberately separated from
the predefined eigenfunctions in order to handle transformation... |
#!/usr/bin/env python
#
# Copyright 2009 Mike Wakerly <opensource@hoho.com>
#
# This file is part of the Pykeg package of the Kegbot project.
# For more information on Pykeg or Kegbot, see http://kegbot.org/
#
# Pykeg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... |
#------------------------------------------------------------------------------
# Voyager config options
#------------------------------------------------------------------------------
# ----------------------------------------
# Global settings
# ----------------------------------------
# include titles in clips?
#... |
"""
Classes that define how vector spaces are formatted
Most of our models can be viewed as linearly transforming
one vector space to another. These classes define how the
vector spaces should be represented as theano/numpy
variables.
For example, the VectorSpace class just represents a
vector space with a vector, a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.