text stringlengths 26 2.53M |
|---|
<|endoftext|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Provides ``mapping`` of url paths to request handlers.
"""
from bootstrap import Bootstrap
from fund import InstantPaymentNotificationHandler
from fund import ThankYouHandler
from view import *
mapping = [
(r"/", Index),
(r"/ipn", InstantPaymentN... |
<|endoftext|># -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2015 François-Xavier Bourlet (bombela+zerorpc@gmail.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated docum... |
<|endoftext|>#!/usr/bin/env python
"""Django's command line utility."""
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<|endoftext|> |
<|endoftext|>"""Installer for hippybot
"""
import os
cwd = os.path.dirname(__file__)
__version__ = open(os.path.join(cwd, "hippybot", "version.txt"), "r").read().strip()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from set... |
<|endoftext|>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "twobuntu.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<|endoftext|> |
<|endoftext|># -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = []
operations = [
migrations.CreateModel(
name="Category",
fields=[
(
"id",
models.Auto... |
<|endoftext|>import twitter
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.db import transaction
from django.shortcuts import redirect, render
from twobuntu.news.forms import AddItemForm
@user_passes_test(lambda u: u.is_staff)
def add(request):
"""
... |
<|endoftext|># -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010-2015, 2degrees Limited.
# All Rights Reserved.
#
# This file is part of django-wsgi <https://github.com/2degrees/django-wsgi/>,
# which is subject to the provisions of the BSD at
# ... |
<|endoftext|>import boto
import boto.s3.connection
from django.conf import settings
import logging
log = logging.getLogger(__name__)
def get_s3_connection():
if settings.S3_ACCESS_KEY and settings.S3_SECRET_KEY and settings.S3_HOST:
log.debug(
"Connecting to {}, with secure connection is {}... |
<|endoftext|>from django.db import models
import datetime
from common.models import Project
class Stage(models.Model):
name = models.CharField(max_length=128)
project = models.ForeignKey(Project)
text = models.TextField(default="", blank=True)
link = models.URLField(default=None, blank=True, null=Tru... |
<|endoftext|># -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
("testreport", "0026_testresult_launch_item_id"),
]
operations = [
migrations.AddField(
model_name="testplan",
name="filter",
... |
<|endoftext|>import gevent
from gevent import monkey
monkey.patch_all()
import time
import smtplib
TEST_MAIL = """
Date: Wed, 30 Jul 2014 03:29:50 +0800 (CST)
From: =?utf-8?B?6IGU5oOz?= <client@gsmtpd.org>
To: test@gsmtpd.org
Message-ID: <766215193.1675381406662190229.JavaMail.root@USS-01>
Subject: =?utf-8?B?6IGU5oO... |
<|endoftext|>#!/usr/bin/env python
import sys
import json
if sys.version_info < (3,):
def b(x):
return x
def s(x):
return x
else:
def b(x):
return bytes(x, "utf-8")
def s(x):
return x.decode("utf-8")
def parse_payload(payload):
if not isinstance(payload, str)... |
<|endoftext|>from flask_resty import Api, GenericModelView
from marshmallow import fields, Schema
import pytest
from sqlalchemy import Column, Integer, String
import helpers
# -----------------------------------------------------------------------------
@pytest.yield_fixture
def models(db):
class Widget(db.Mode... |
<|endoftext|>from .dogpile import Dogpile
<|endoftext|> |
<|endoftext|>"""
RPi-Tron-Radio
Raspberry Pi Web-Radio with 2.8" TFT Touchscreen and Tron-styled graphical interface
GitHub: http://github.com/5volt-junkie/RPi-Tron-Radio
Blog: http://5volt-junkie.net
MIT License: see license.txt
"""
import pygame
from pygame.locals import *
import time
import datetime
import sys... |
<|endoftext|># coding:utf8
"""
Created on 2013-7-10
memcached client
@author: lan (www.9miao.com)
"""
import memcache
class MemConnError(Exception):
""" """
def __str__(self):
return "memcache connect error"
class MemClient:
"""memcached"""
def __init__(self, timeout=0):
""" """
... |
<|endoftext|># coding:utf8
"""
Created on 2013-7-31
@author: lan (www.9miao.com)
"""
from firefly.dbentrust.dbpool import dbpool
from firefly.dbentrust.madminanager import MAdminManager
from firefly.dbentrust import mmode
from firefly.dbentrust.memclient import mclient
import time
if __name__ == "__main__":
# ... |
<|endoftext|>""" Really basic gatttool (BlueZ) wrapper
Based on https://github.com/stratosinc/pygatt
Part of https://github.com/ALPSquid/thebutton-monitor
"""
import pexpect
class connect:
"""Use to initiate a connection to a GATT device
Example: bt_device = gatt.connect('AB:CD:EF:01:23:45')
"""
de... |
<|endoftext|># -*- coding: utf-8 -*-
from django.db import models, migrations
import wagtail.wagtailcore.fields
class Migration(migrations.Migration):
dependencies = [
("puput", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="blogpage",
name=... |
<|endoftext|>"""
==================================
Map two radars to a Cartesian grid
==================================
Map the reflectivity field of two nearby ARM XSARP radars from antenna
coordinates to a Cartesian grid.
"""
print(__doc__)
# Author: Jonathan J. Helmus (jhelmus@anl.gov)
# License: BSD 3 clause
... |
<|endoftext|>"""
pyart.aux_io.radx
=================
Reading files using Radx to first convert the file to Cf.Radial format
.. autosummary::
:toctree: generated/
read_radx
"""
import os
import tempfile
import subprocess
from ..io.cfradial import read_cfradial
from ..io.common import _test_arguments
def ... |
<|endoftext|>"""
pyart.exceptions
================
Custom Py-ART exceptions.
.. autosummary::
:toctree: generated/
MissingOptionalDependency
DeprecatedAttribute
DeprecatedFunctionName
_deprecated_alias
"""
import warnings
class MissingOptionalDependency(Exception):
"""Exception raised whe... |
<|endoftext|>"""
pyart.io.nexrad_archive
=======================
Functions for reading NEXRAD Level II Archive files.
.. autosummary::
:toctree: generated/
:template: dev_template.rst
_NEXRADLevel2StagedField
.. autosummary::
:toctree: generated/
read_nexrad_archive
_find_range_params
_... |
<|endoftext|>"""
pyart.io.uf
===========
Reading of Universal format (UF) files
.. autosummary::
:toctree: generated/
read_uf
_get_instrument_parameters
"""
import warnings
import numpy as np
from netCDF4 import date2num
from ..config import FileMetadata, get_fillvalue
from ..core.radar import Radar
... |
<|endoftext|>#! /usr/bin/env python
"""
Make a small netCDF CF/Radial file containing a single RHI scan.
Single field and scan is converted from sigmet file XSW110520113537.RAW7HHL
"""
import pyart
radar = pyart.io.read_rsl("XSW110520113537.RAW7HHL")
time_slice = slice(None, 713, 18)
range_slice = slice(None, None,... |
<|endoftext|>"""
pyart.util.radar_utils
======================
Functions for working radar instances.
.. autosummary::
:toctree: generated/
is_vpt
to_vpt
join_radar
"""
import copy
import numpy as np
from netCDF4 import num2date, date2num
from . import datetime_utils
def is_vpt(radar, offset=0.... |
<|endoftext|>"""
Default config for Workload Automation. DO NOT MODIFY this file. This file
gets copied to ~/.workload_automation/config.py on initial run of run_workloads.
Add your configuration to that file instead.
"""
# *** WARNING: ***
# Configuration listed in this file is NOT COMPLETE. This file sets the defau... |
<|endoftext|># Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
<|endoftext|>"""Louie version information."""
NAME = "Louie"
DESCRIPTION = "Signal dispatching mechanism"
VERSION = "1.1"
<|endoftext|> |
<|endoftext|># Copyright 2013-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
<|endoftext|># Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
<|endoftext|># Copyright 2012-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
<|endoftext|># Copyright 2013-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
<|endoftext|>#!/usr/bin/env python
"""
mbed SDK
Copyright (c) 2011-2016 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required b... |
<|endoftext|>#!/usr/bin/env python
"""
mbed SDK
Copyright (c) 2011-2015 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required b... |
<|endoftext|>#!/usr/bin/env python
# small RNA oriented bowtie wrapper
# version 1.5 17-7-2014: arg parser implementation
# Usage sRbowtie.py <1 input_fasta_file> <2 alignment method> <3 -v mismatches> <4 out_type> <5 buildIndexIfHistory> <6 fasta/bowtie index> <7 bowtie output> <8 ali_fasta> <9 unali_fasta> <10 --num-... |
<|endoftext|>#!/usr/bin/python
#
import sys
input = open(sys.argv[1], "r")
output = open(sys.argv[2], "w")
for line in input:
if line[0] == ">":
print("@HTW-" + line[1:-1], file=output)
continue
else:
print(line[:-1], file=output)
print("+", file=output)
print("H" * len... |
<|endoftext|>"""
Verbose demonstration of how to set up a server and run a remote game.
For all practical needs, using the simplesetup module should be sufficient.
"""
import sys
import subprocess
from pelita.simplesetup import SimpleServer, SimplePublisher, SimpleController
import logging
from pelita.ui.tk_viewer i... |
<|endoftext|># Main entry point for the plugin.
# Author: Yuri van Geffen
import sublime, sublime_plugin
import os
import threading
import queue
import asyncore
import socket
from itertools import chain
import re
settings = sublime.load_settings("subdebug")
TCP_IP = "127.0.0.1"
TCP_PORT = 8172
BUFFER_SIZE = 1024
B... |
<|endoftext|>from django.contrib import sitemaps
from django.core.urlresolvers import reverse
class StaticViewSitemap(sitemaps.Sitemap):
priority = 0.5
changefreq = "monthly"
def items(self):
return [
"landpage",
"robots",
"humans",
"google_plus_ver... |
<|endoftext|>from django.conf.urls import patterns, include, url
from publisher.views import catalog
from publisher.views import my_publication
from publisher.views import publication
urlpatterns = patterns(
"",
# Publications(s)
url(r"^publish$", catalog.catalog_page),
url(r"^publication/(\d+)$", publ... |
<|endoftext|>from django.core.urlresolvers import resolve
from django.http import HttpRequest
from django.http import QueryDict
from django.test import TestCase
from django.test import Client
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth... |
<|endoftext|># Django & Python
from django.core.urlresolvers import resolve
from django.http import HttpRequest
from django.http import QueryDict
from django.test import TestCase
from django.test import Client
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from d... |
<|endoftext|>"""added goal properties
Revision ID: 5018059c5c8f
Revises: 16b4a243d41d
Create Date: 2015-09-23 11:56:01.897992
"""
# revision identifiers, used by Alembic.
revision = "5018059c5c8f"
down_revision = "16b4a243d41d"
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
... |
<|endoftext|># Demonstration of `applib` features
import logging
from applib.base import Cmdln, Application
from applib.misc import require_option
from applib import textui, sh, _cmdln as cmdln
LOG = logging.getLogger(__name__)
application = Application("demo-app", "CompanyNameHere", "1.2")
@cmdln.option("", "--f... |
<|endoftext|># Copyright (c) 2015-2016, Activision Publishing, 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:
#
# 1. Redistributions of source code must retain the above copyright notice, th... |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 7