text stringlengths 12 6.59M |
|---|
#!usr/bin/env python
# -*- coding: utf-8 -*-
"""
Authors:
Sebastian Burgstaller (sebastian.burgstaller' at 'gmail.com
Andra Waagmeester (andra' at ' micelio.be)
This file is part of ProteinBoxBot.
ProteinBoxBot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
#!usr/bin/env python
# -*- coding: utf-8 -*-
"""
Authors:
Sebastian Burgstaller (sebastian.burgstaller' at 'gmail.com
Andra Waagmeester (andra' at ' micelio.be)
This file is part of ProteinBoxBot.
ProteinBoxBot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
# Copyright 2012, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
import os
import yaml
import pytest
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from numpy.testing import assert_allclose
from tardis.io.atom_data.base import AtomData
from tardis.simulation import Simulation
from tardis.io.config_reader import Configuration
quantity_comparison = [
('... |
print 2**3
print pow(2,3)
print abs(-10)
print round(1.536,2)
|
from tendrl.commons import etcdobj
from tendrl.commons.message import Message as message
from tendrl.commons import objects
class NodeMessage(message, objects.BaseObject):
internal = True
def __init__(self, **node_message):
self._defs = {}
message.__init__(self, **node_message)
objects... |
# -*- coding: utf-8 -*-
#==============================================================================
# Copyright: Hybrid Labs
# Licence: See LICENSE
#==============================================================================
"""
Built-in exceptions
"""
class Exception(object):
def __init... |
import psycopg2
import datetime
import io
import math
import sys
import numpy
from collections import Counter
import KernelFunctionsV1 as KF
import operator
import random
class Document:
userID = ""
userLat = ""
userLong = ""
Feature_Freq = {}
total_words = 0
#Feature_Prob = {}
outsid... |
#!/usr/bin/env python
"""
Created by stevertaylor
Copyright (c) 2014 Stephen R. Taylor
Code contributions by Rutger van Haasteren (piccard) and Justin Ellis (PAL/PAL2).
"""
import numpy as np
import sys, os, glob
import libstempo as T2
import ephem
from ephem import *
import NX01_utils as utils
from collections imp... |
import os
import sys
import time
import threading
import urllib2
import bson
import csv
from StringIO import StringIO
from datetime import timedelta, datetime
from multiprocessing import Process
from lxml import etree
import requests
from Malcom.auxiliary.toolbox import debug_output
from Malcom.config.malconf import... |
VERSION = (0, 2, None)
|
#!/usr/bin/env python3.4
import ursgal
import os
import shutil
class kojak_1_5_3( ursgal.UNode ):
"""
Kojak UNode
Parameter options at http://www.kojak-ms.org/param/index.html
Reference:
Hoopmann MR, Zelter A, Johnson RS, Riffle M, Maccoss MJ, Davis TN, Moritz RL (2015) Kojak: Efficient analysis ... |
import inspect, time, re
import md5, base64, binascii
import traceback, sys, os
restricted = {
'everyone':['TOKENIZE','TELNET','HASH','EXIT','PING'],
'fresh':['LOGIN','REGISTER'],
'agreement':['CONFIRMAGREEMENT'],
'user':[
########
# battle
'ADDBOT',
'ADDSTARTRECT',
'DISABLEUNITS',
'ENABLEUNITS',
... |
from __future__ import unicode_literals
from copy import deepcopy
from django.contrib.auth.mixins import PermissionRequiredMixin
from django.views.generic import ListView, FormView
from django.core.urlresolvers import reverse
from django.http import Http404
from framework.auth.core import get_user
from osf.models.con... |
import inspect, time, re
import base64
try: from hashlib import md5
except: md5 = __import__('md5').new
import traceback, sys, os
ranks = (5, 15, 30, 100, 300, 1000, 3000, 10000)
restricted = {
'everyone':['TOKENIZE','TELNET','HASH','EXIT','PING'],
'fresh':['LOGIN','REGISTER'],
'agreement':['CONFIRMAGREEME... |
# Copyright (c) 2015 Intracom socket_obj.A. Telecom Solutions.
#All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v1.0 which accompanies this distribution,
# and is available at http://www.eclipse.org/legal/epl-v10.html
"""Unittest M... |
"""
@file
@brief Various function to install some application such as :epkg:`pandoc`.
"""
from __future__ import print_function
import re
import os
import shutil
from ..filehelper import download, read_url
from ..filehelper.internet_helper import ReadUrlException
from ..filehelper.compression_helper import unzip_files... |
#!/usr/bin/env python
# Created by Daniele Silvestro on 02/03/2012 => pyrate.help@gmail.com
import argparse, os,sys, platform, time, csv
import random as rand
import warnings
version= " PyRate 0.571 "
build = " 20140926 "
if platform.system() == "Darwin": sys.stdout.write("\x1b]2;%s\x07" % ... |
'''
Created on May 21, 2010
Contains functions to login and manage forms.
@author: jnaous
'''
import urllib, urllib2, cookielib
class browser():
def cookie_setup(self):
""""
call at the beginning to set up cookiejar
"""
self.cookiejar = cookielib.CookieJar()
... |
'''
Implement a quadtree
'''
class Quadtree():
def __init__(xmin, ymin, xmax, ymax):
self.xmin = xmin
self.ymin = ymin
self.xmax = xmax
self.ymax = ymax
def __newnode__(xmin, ymin, xmax, ymax):
self.name = blah.blah
self.xmin = xmin
self.ymin = ymin
... |
#!/usr/bin/python
"""
@brief QuickBot class for Beaglebone Black
@author Rowland O'Flaherty (rowlandoflaherty.com)
@date 02/07/2014
@version: 1.0
@copyright: Copyright (C) 2014, Georgia Tech Research Corporation
see the LICENSE file included with this software (see LINENSE file)
"""
from __future__ import division
im... |
# Copyright 2020 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... |
"""
Created on 28. aug. 2015
@author: pab
"""
from __future__ import division, print_function
import numpy as np
from scipy import linalg
from scipy.ndimage.filters import convolve1d
import warnings
EPS = np.finfo(float).eps
_EPS = EPS
_TINY = np.finfo(float).tiny
def _assert(cond, msg):
if not cond:
ra... |
#!/usr/bin/env python
from utils.munin.base import MuninGraph
from apps.rss_feeds.models import FeedFetchHistory, PageFetchHistory
import datetime
graph_config = {
'graph_category' : 'NewsBlur',
'graph_title' : 'NewsBlur Users',
'graph_vlabel' : 'users',
'all.label': 'all',
}
last_day = datetime.da... |
#!/usr/bin/env python
# Downloads some of the OnTime flights database
# pylint: disable=invalid-name,missing-docstring
import os
import subprocess
def execute_command(command):
"""Executes the specified command using a shell"""
print(command)
exitcode = subprocess.call(command, shell=True)
if exitcode... |
# 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... |
import wx
import rxcadre_gui_withoutDirectory
import sys
import tempfile
import unittest
import csv
import os
import sqlite3
import time
import datetime
import ctypes
from rxcadre import *
from collections import namedtuple
import datetime
import logging
import math
import sys
import unittest
import zipfile
import nu... |
# 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 django.utils.translation import ugettext as _
import commonware
import jwt
from rest_framework import exceptions
from rest_framework_jwt.authentication import (
JSONWebTokenAuthentication as UpstreamJSONWebTokenAuthentication)
from olympia import amo
from olympia.api import jwt_auth
from olympia.api.models i... |
import logging
from PyQt5.QtWidgets import QComboBox, QDialog, QPushButton, QWidget, QLabel, QHBoxLayout, QVBoxLayout, QLineEdit, QCheckBox
from typing import Optional, Any, List, Union, Callable, Dict
from sas.system.config.config import config
from sas.qtgui.Utilities.UI.PreferencesUI import Ui_preferencesUI
impor... |
import logging
import csv
import time
import traceback
import signal
import os
from flask import Flask, g, current_app
from dataactcore.aws.sqsHandler import sqs_queue
from dataactcore.config import CONFIG_BROKER, CONFIG_SERVICES
from dataactcore.interfaces.db import GlobalDB
from dataactcore.interfaces.function_bag ... |
import logging
from PyQt5.QtWidgets import QComboBox, QDialog, QPushButton, QWidget, QLabel, QHBoxLayout, QVBoxLayout, QLineEdit, QCheckBox
from typing import Optional, Any, List, Union, Callable, Dict
from sas.system.config.config import config
from sas.qtgui.Utilities.UI.PreferencesUI import Ui_preferencesUI
impor... |
# Copyright 2014-2015 Boxkite Inc.
# This file is part of the DataCats package and is released under
# the terms of the GNU Affero General Public License version 3.0.
# See LICENSE.txt or http://www.fsf.org/licensing/licenses/agpl-3.0.html
import sys
from os import listdir
from os.path import isdir, exists
from data... |
from __future__ import absolute_import
import six
from sentry.api.serializers import Serializer
from sentry.utils.assets import get_asset_url
from sentry.utils.http import absolute_uri
from sentry.models import ProjectOption
from django.utils.text import slugify
class PluginSerializer(Serializer):
def __init__(... |
from __future__ import absolute_import
from django import forms
from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from uuid import uuid1
fro... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import datetime
import logging as std_logging
import operator
import unittest
from decimal import Decimal
import elasticsearch
from django.apps import apps
from django.conf import settings
from django.test impor... |
from core.validate_md5_s3_trigger.service import handler as validate_md5_s3_trigger
from core.validate_md5_s3_trigger.service import make_input
# from core.validate_md5_s3_trigger.service import STEP_FUNCTION_ARN
import pytest
from ..conftest import valid_env
from datetime import datetime
import mock
def test_build_r... |
import os
import pytest
from conda_verify import utils
from conda_verify.exceptions import RecipeError
from conda_verify.verify import Verify
@pytest.fixture
def recipe_dir():
return os.path.join(os.path.dirname(__file__), 'test-recipes')
@pytest.fixture
def verifier():
recipe_verifier = Verify()
retu... |
# -*- coding: utf-8 -*-
'''
Tests for the Openstack Cloud Provider
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
import logging
from time import sleep
# Import Salt Testing libs
from tests.support.case import ShellCase
from tests.support.helpers import generate_rand... |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, you can obtain one at http://mozilla.org/MPL/2.0/.
import pytest
from mock import MagicMock
from tests import test_utils
from treeherder.log_parser.artifactbuildercollect... |
import datetime
from decimal import Decimal
from django.core.exceptions import FieldError
from django.conf import settings
from django.test import TestCase, Approximate
from django.db import DEFAULT_DB_ALIAS
from django.db.models import Count, Max, Avg, Sum, StdDev, Variance, F
from regressiontests.aggregation_regres... |
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import File, Release, ReleaseFile
from sentry.testutils import APITestCase
class ReleaseDetailsTest(APITestCase):
def test_simple(self):
self.login_as(user=self.user)
project = self.create_pro... |
"""
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.services.user_badge.models.awarding import QuantifiedBadgeAwardingTuple
from byceps.services.user_badge import service as user_badge_service
from testfixtures.user import create_user
from tests.base import... |
"""Test D-Bus private tube support"""
import base64
import dbus
from dbus.connection import Connection
from dbus.lowlevel import SignalMessage
from servicetest import call_async, EventPattern, tp_name_prefix
from gabbletest import exec_test, make_result_iq, acknowledge_iq, sync_stream
from constants import *
from tu... |
# Copyright 2019 Scalyr 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, so... |
#!/usr/bin/env python
from rt import RT
import unittest, os
class TestRT(unittest.TestCase):
def setUp(self):
#get the api key from the environment
self.api = RT(os.getenv('API_KEY'))
def testSearch(self):
self.result = self.api.search('Inception')
self.assertEqual(self.resul... |
import urllib2 as urllib
import json
import base64
import getpass as g
from repoClass import *
def __main__():
url = 'https://api.github.com/repositories'
username = raw_input("Enter username: ")
password = g.getpass()
repos = []
for page in range(1, 11):
request = urllib.Request(url)
... |
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Scribber, a text editor that focuses on minimalism.
Icons provided by the Tango Desktop Project (http://tango.freedesktop.org/)
"""
import pygtk
pygtk.require('2.0')
import gtk
import os
import pango
import re
import ReSTExporter
class ScribberView(gtk.Window):
... |
# -*- coding: utf-8 -*-
# @Author: Eddie Ruano
# @Date: 2017-06-01 14:25:28
# @Last Modified by: Eddie Ruano
# @Last Modified time: 2017-06-04 23:35:35
import RPi.GPIO as GPIO
class Sentinel(object):
def __init__(self):
"""Create an instance of Sentinel"""
# Locks/Mutex/Counters
self.Ac... |
__author__ = 'mukesh'
# In this stock data is scrapped from money.rediff for any particular stock.
import urllib
from bs4 import BeautifulSoup
base_url = 'http://money.rediff.com/companies/'
def Get_content(symbol):
"""
Returns html content, which is used in other function.
"""
symbol.upper()
ur... |
import traceback
import asyncpg
import discord
import asyncio
import json
import time
from discord.ext.commands.view import StringView
from discord.ext import commands
from utils import errors
import config
async def set_codecs(con):
await con.set_type_codec('json', schema='pg_catalog',
... |
import discord
import json
import random
import requests
import asyncio
import sys
import os
raw = ''
discToken = ''
riotKey = ''
regions = ['NA1', 'RU', 'KR', 'EUN1', 'EUW1', 'TR1', 'LA1', 'LA2', 'BR1', 'OC1', 'JP1']
if len(sys.argv) == 1:
riotKey = os.environ.get('RIOTKEY')
discToken = os.environ.get('DISCKE... |
"""
An storage service for use by a Jenca Cloud authentication service.
"""
import os
from flask import Flask, jsonify, request
from flask.ext.login import LoginManager
from flask.ext.sqlalchemy import SQLAlchemy
from flask_jsonschema import JsonSchema, ValidationError
from flask_negotiate import consumes
from requ... |
"""
Models for PSKB
"""
from . import db
from . import utils
article_tags = db.Table('article_tags',
db.Column('tag_id', db.Integer, db.ForeignKey('tags.id')),
db.Column('article_id', db.Integer, db.ForeignKey('articles.id'))
)
class Article(db.Model):
__tablename__ = 'articles'
id = db.Column(db.... |
"""
Main entry point for interacting with remote service APIs
"""
import base64
import collections
from flask_oauthlib.client import OAuth
from flask import session
from . import app
oauth = OAuth(app)
github = oauth.remote_app(
'github',
consumer_key=app.config['GITHUB_CLIENT_ID'],
consumer_secret=app... |
#!/usr/bin/env python
#
# $Id$
#
import errno
import os
import _psutil_mswindows
# import psutil exceptions we can override with our own
from error import *
try:
import wmi
except ImportError:
wmi = None
# --- module level constants (gets pushed up to psutil module)
NUM_CPUS = _psutil_mswindows.get_num_cpu... |
#!/usr/bin/env python
#
# $Id$
#
import errno
import os
import subprocess
import socket
import re
import sys
try:
from collections import namedtuple
except ImportError:
from psutil.compat import namedtuple # python < 2.6
import _psutil_mswindows
from psutil.error import *
try:
import wmi
except ImportE... |
#!/usr/bin/env python2
# OpenPOWER Automated Test Project
#
# Contributors Listed Below - COPYRIGHT 2017
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Lic... |
#!/usr/bin/env python3
import telebot
from telebot import types
import logging
import model
import db_helper
import config
import strings
telebot.logger.setLevel(logging.WARNING)
# helper function: returns an array of InlineKeyboardButton for paginating stuff
# prefix - string added to each callback data from the ... |
from django import template
from django.conf import settings
register = template.Library()
def get_url(path, folder=None, media_root=settings.MEDIA_URL):
if not path.startswith('http://') and not path.startswith('https://'):
args = [media_root, folder, path]
path = '/'.join([arg.rstrip('/') for arg in args if ar... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""RNAkb (previous Gromacs) utils.
A module with different functions needed for Gromacs/RNAkb merriage.
Marcin Magnus
Albert Bogdanowicz
(1) prepare groups and then (2) mdp score file.
"""
import re
import os
import PDBFile as pf
import os
LIB_PATH = os.path.dirname(o... |
import time
import re
from cumulusci.robotframework.utils import capture_screenshot_on_error
from cumulusci.robotframework.pageobjects import BasePage
from cumulusci.robotframework.pageobjects import pageobject
from selenium.common.exceptions import ElementClickInterceptedException
from selenium.common.exceptions impor... |
#Wall_Follow.py
'''
from long_range_ir import LRIR
'''
class WallFollow():
## Initialize a WallFollowing.
#
# @param left A Motor representing the left motor.
# @param right A Motor representing the right motor.
# @param timer A Timer for moderating data taking.
def __init__(self, left, ri... |
COMPILER = "gfortran"
# Declare a list of all the avaliable driving functions
DRIVING_OPTIONS = ["0.0",
"t",
"cos(t)",
"t * cos(t)",
"cos(t * pi)",
"t * cos(t * pi)",
"sin(t)",
"t * sin(... |
"""
Common functions.
"""
import datetime
import logging
import struct
from xml.dom import minidom
from xml.etree import cElementTree
import numpy as np
from .constants import DEFAULT_DATE
def _demo_logger(self, msg, *args, **kwargs):
"""A custom logger for :class:`~msl.equipment.connection_demo.ConnectionDemo`... |
import io
from collections import namedtuple
import odswriter
from django.contrib import messages
from django.contrib.admin import helpers
from django.core.mail import send_mass_mail
from django.db.models import Q
from django.http import HttpResponse
from django.template import loader
from django.template.response imp... |
#
# -*- coding: utf-8 -*-
# GitHub starcat_gui
# =============================================================================
# Name : starcat_gui.py
# Date : 2017-08-16 22:35:03
# Author : sol courtney
# GitHub : https://github.com/swc2124
# Affiliation ... |
"""
Utility dialogs for starcheat itself
"""
import os, sys, platform
from PyQt5.QtWidgets import QDialog, QFileDialog, QMessageBox, QListWidgetItem
from PyQt5 import QtGui
from config import Config
from gui_common import preview_icon
import save_file, assets, logging
import qt_options, qt_openplayer, qt_about
# TOD... |
from testtools import TestCase
from testtools.matchers import Equals
from elementtree.ElementTree import parse, fromstring, ElementTree
from v1pysdk.client import *
class TestV1Connection(TestCase):
def test_connect(self, username='admin', password='admin'):
server = V1Server(address='www14.v1host.com', userna... |
"""
units.py
Author: Adam Ginsburg
Affiliation: University of Colorado at Boulder
Created on March 9th, 2011
Unit parsing and conversion tool.
The SpectroscopicAxis class is meant to deal with unit conversion internally
"""
length_dict = {'meters':1.0,'m':1.0,
'centimeters':1e-2,'cm':1e-2,
'millim... |
import json
import os
import re
import logging
from datetime import datetime
import pytz
from django_select2.widgets import (
Select2MultipleWidget, AutoHeavySelect2Widget,
JSFunctionInContext, HeavySelect2Widget
)
from django_select2.fields import AutoModelSelect2Field
from django.utils.translation impor... |
"""
Import and generation of meshes.
"""
import numpy as np
import spfem.mesh
import platform
import meshpy.triangle
import meshpy.tet
import meshpy.gmsh_reader
from meshpy.geometry import GeometryBuilder
import os
import matplotlib.pyplot as plt
class Geometry(object):
"""Geometry contains metadat... |
import matplotlib as mpl
#mpl.use('Agg')
import spiderman as sp
import numpy as np
import matplotlib.pyplot as plt
from matplotlib._png import read_png
from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, \
AnnotationBbox
import matplotlib.patches as patches
from matplotlib import gridspec
#import s... |
#! /usr/bin/python
'''
Spark Bot for Room Finder Application
This Bot will use a provided Spark Account (identified by the Developer Token)
and create a new room to use for interacting with the Roomfinder application. Users can
check current available rooms.
This is the an example Service for a ... |
from datetime import datetime
from django.core import serializers
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import render_to_response
from django.template import RequestContext
from django_rest_interface.resource import Resource
from transformers.csv_ import get_csv_from_django_... |
# The contents of this file are subject to the Mozilla Public 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.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"basis,
#... |
# -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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... |
import logging
from datetime import datetime
from string import Template
import luigi
# from luigi import six
from googleapiclient.errors import HttpError
import time
from luigi_gcloud.gcore import get_default_client, _GCloudTask
from luigi_gcloud.storage import GCSTarget
logger = logging.getLogger('luigi-gcloud')
... |
#!/usr/bin/env python3
#
# Copyright (C) 2018 VyOS maintainers and contributors
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 or later as
# published by the Free Software Foundation.
#
# This program is distributed in the hope t... |
# 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
# distribu... |
# coding: utf-8
from __future__ import print_function
import sys
import requests
import json
import time
import six
''' A simple and thin Python library for the Spotify Web API
'''
class SpotifyException(Exception):
def __init__(self, http_status, code, msg, headers=None):
self.http_status = http_stat... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""A program (and Python module) to generate a tree of symlinks to LV2
extension bundles, where the path of the symlink corresponds to the URI of
the extension. This allows including extension headers in code without using
the bundle name. Including extension headers in this... |
# Orca
#
# Copyright 2005-2007 Sun Microsystems Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This ... |
# coding: utf-8
from __future__ import print_function
import sys
import requests
import json
import time
import six
''' A simple and thin Python library for the Spotify Web API
'''
class SpotifyException(Exception):
def __init__(self, http_status, code, msg, headers=None):
self.http_status = http_stat... |
# Copyright 2016 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 applicable law or agreed to in writing... |
import bpy
import bmesh
import math
import numpy
from bpy_extras import view3d_utils
from collections import deque
from mathutils import Vector, Matrix, Quaternion
from mathutils.geometry import intersect_line_plane, distance_point_to_plane
from mathutils.bvhtree import BVHTree
from . import sprytile_utils, sprytile_gu... |
import bpy
from mathutils import Matrix, Vector
from bpy.types import Panel
def GetGridMatrix(srpytile_grid):
"""Returns the transform matrix of a sprytile grid"""
class SprytileValidateGridList(bpy.types.Operator):
bl_idname = "sprytile.validate_grids"
bl_label = "Validate Material Grids"
@classmeth... |
import bpy
import bgl
import blf
import bmesh
import math
import sys
from bpy_extras import view3d_utils
from bpy_extras.io_utils import ImportHelper
from bpy.props import StringProperty
from bmesh.types import BMVert, BMEdge, BMFace
from mathutils import Matrix, Vector, Quaternion
from mathutils.geometry import inter... |
# -*- coding: utf-8 -*-
import collections
import logging
import os
import sys
from pignacio_scripts.terminal.color import (bright_green, bright_blue,
bright_magenta, bright_cyan,
bright_red, red)
from .constants import DATA_DIR... |
#
# spyne - Copyright (C) Spyne contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This libra... |
import unittest
from StringIO import StringIO
from vcfiterator import VcfIterator
class StringIOWrapper(StringIO):
"""
Wrapper to support xreadlines()
"""
def xreadlines(self):
"""
We don't mind memory usage for these tests..
"""
lines = self.readlines()
for lin... |
#!/usr/bin/env python
# -*- coding: UTF8 -*-
from __future__ import with_statement
import os
import base64
import ConfigParser
import functools
import logging
from PyQt4 import QtGui
from PyQt4 import QtCore
import constants
from util import qtpie
from util import qui_utils
from util import misc as misc_utils
impo... |
#!/usr/bin/env python
# -*- coding: UTF8 -*-
from __future__ import with_statement
import os
import base64
import ConfigParser
import functools
import logging
from PyQt4 import QtGui
from PyQt4 import QtCore
import constants
from util import qtpie
from util import qui_utils
from util import misc as misc_utils
impo... |
# encoding: utf8
from __future__ import unicode_literals
from optparse import make_option
from collections import OrderedDict
from importlib import import_module
import itertools
import traceback
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import Ba... |
# coding=utf-8
import os
import bz2
import datetime
import sys
import xmlrpc.client
import http.client
import time
import logging
logger = logging.getLogger('updater')
logger.setLevel(logging.DEBUG)
loggerHandler = logging.FileHandler(os.path.curdir + '/update.log')
loggerFormatter = logging.Formatter('%(asctime)s - %... |
import warnings
import cx_Oracle
from django.db.backends.base.introspection import (
BaseDatabaseIntrospection, FieldInfo, TableInfo,
)
from django.utils.deprecation import RemovedInDjango21Warning
from django.utils.encoding import force_text
class DatabaseIntrospection(BaseDatabaseIntrospection):
# Maps ty... |
# encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import, division... |
#!/usr/bin/env python
from __future__ import with_statement
import sys
import os
import urllib2
import socket
from datetime import datetime
from update_ip.services.webfaction import WebFactionService
class AlreadyRegisteredError(Exception):
pass
class NotRegisteredError(Exception):
pass
class InvalidService... |
from __future__ import absolute_import
from django.core.management.base import BaseCommand
from zappa.zappa import Zappa
from .zappa_command import ZappaCommand
class Command(ZappaCommand):
can_import_settings = True
requires_system_checks = False
help = '''Update the the lambda package for a given Za... |
import helper
from utils import *
import operator
NUMBER_OF_DAYS = 32
class Index():
def __init__(self):
self.operators = []
self.idx_for_operator_uri = {}
self.lines = []
self.idx_for_line_uri = {}
self.routes = []
self.idx_for_route_uri = {}
self.journey_p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.