text stringlengths 12 6.59M |
|---|
# This Python file uses the following encoding: utf-8
from CheckedToneChars import checkedToneChars
charAfterOpenCcConversion_to_CharShownInSimplifiedText = {
# Conversion for the quotation marks.
u"「": u"“",
u"」": u"”",
u"『": u"‘",
u"』": u"’",
# OpenCC successfully converts the following char... |
__author__ = 'Johannes'
import Adafruit_BBIO.GPIO as GPIO
import time
P = "USR3"
GPIO.setup(P, GPIO.OUT)
for i in xrange(100):
if i % 2 == 0:
GPIO.output(P, GPIO.HIGH)
print "HIGH"
else:
GPIO.output(P, GPIO.LOW)
print "LOW"
time.s... |
'''
Channels is where we store information for mapping virtual (qubit) channel to
real channels.
Split from Channels.py on Jan 14, 2016.
Moved to SQLAlchemy ORM from atom 2018
Original Author: Colm Ryan
Modified By: Graham Rowlands
Copyright 2016-2018 Raytheon BBN Technologies
Licensed under the Apache License, Ver... |
'''
Channels is where we store information for mapping virtual (qubit) channel to
real channels.
Split from Channels.py on Jan 14, 2016.
Moved to SQLAlchemy ORM from atom 2018
Original Author: Colm Ryan
Modified By: Graham Rowlands
Copyright 2016-2018 Raytheon BBN Technologies
Licensed under the Apache License, Ver... |
#!/usr/bin/env python
from ..common import *
from ..extractor import VideoExtractor
class Bilibili(VideoExtractor):
name = "Bilibili"
# Bilibili media encoding options, in descending quality order.
stream_types = [
{'id': 'flv_p60', 'quality': 116, 'audio_quality': 30280,
'container': 'F... |
#!/usr/bin/env python
from ..common import *
from ..extractor import VideoExtractor
import hashlib
class Bilibili(VideoExtractor):
name = "Bilibili"
# Bilibili media encoding options, in descending quality order.
stream_types = [
{'id': 'flv_p60', 'quality': 116, 'audio_quality': 30280,
... |
from setuptools import setup
setup(
name='tsnecuda',
version='2.0.0',
author='Chan, David M., Huang, Forrest., Rao, Roshan.',
author_email='davidchan@berkeley.edu',
packages=['tsnecuda', 'tsnecuda.test'],
package_data={'tsnecuda': ['libtsnecuda.so']},
scripts=[],
url='https://github.com... |
#!/usr/bin/env python
import urllib.request
import urllib.parse
import json
import re
from ..util import log
from ..common import get_content, download_urls, print_info, playlist_not_supported, url_size
__all__ = ['kuaishou_download_by_url']
def kuaishou_download_by_url(url, info_only=False, **kwargs):
page = ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
##
# circuit.py: Modeling for stabilizer circuits.
##
# © 2012 Christopher E. Granade (cgranade@gmail.com) and
# Ben Criger (bcriger@gmail.com).
# This file is a part of the QuaEC project.
# Licensed under the AGPL version 3.
##
# This program is free software: you can redi... |
import re
import sqlite3
import vntypes
def sql_add_where(has_where, clause):
if has_where:
return " AND " + clause
else:
return " WHERE " + clause
def get_all_novels(cursor, novel_id=None, character_id=None, name=None, include_chars=True):
novel_query = """
SELECT
no... |
from event import Event
import event
from db import Session
import unittest
from organization import Organization
from datetime import datetime
from sqlalchemy import exc
import random
import string
# event contains: id, name, address, city, state, zip, about, start_at, posted_at, duration, interests, skills, org
cla... |
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
import importlib
import warnings
import distutils.version as dv
from os.path import dirname
requirements_dir = dirname(dirname(__file__)) + '/requirements/'
def split_version(version):
"""
Separate a string including digits separated by periods into a
tuple of integers.
"""
return tuple(int(ver) ... |
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
# Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... |
"""
Django settings for stagecraft project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
from .common import *
import os
# Quick-start development settings - ... |
import math
import numpy as np
import clustering
import random
import blockNames
import spawningTypes
class StartingConformationBuilder:
def buildSpawningCalculator(self, spawningBlock):
spawningTypeString = spawningBlock[blockNames.StringSpawningTypes.type]
if spawningTypeString == blockNames.Stri... |
from UM.i18n import i18nCatalog
from UM.Application import Application
from UM.Logger import Logger
from UM.Signal import signalemitter
from UM.Message import Message
import UM.Settings
from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState
from PyQt5.QtNetwork import QHttpMultiPart, QHttpPart, Q... |
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import logging
import time
import os
from flask import current_app
# Redis Queue
from redis import Redis
from rq import Queue
# for details, see: https://github.com/nvie/rq/pull/421
from rq.registry import FinishedJobRegistry, StartedJobRegistry
# details:
# https://real... |
#!/usr/bin/env python
import os
import sys
from os.path import abspath, dirname, join
from django.core.management import execute_manager
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
try:
import settings_core as settings
except ImportError:
import sys
sys.stderr.write("Error: Can't fin... |
### Generate exon start and stop sites
import pandas as pd
import pickle
# Create ENSG -> cdsStart, cdsStop mapping
# this is then used inside exon_info generator.
# CCDS -> start stop mapping
ccds_coords_map = {}
with open('../pre_processed/CDS/ccds_coords_hum.txt', 'r') as ccds_coords:
for line in ccds_coords:
... |
import time
import signal
import logging
from datetime import datetime
from multiprocessing import Pool
from flask.ext.script import Command
from croniter import croniter
from triager import jobs, db
from models import Project, TrainStatus as TS
class RetrainScheduler(Command):
DAY = 60*60*24
def _train_pr... |
from UM.i18n import i18nCatalog
from UM.Application import Application
from UM.Logger import Logger
from UM.Signal import signalemitter
from UM.Message import Message
import UM.Settings
from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState
import cura.Settings.ExtruderManager
from PyQt5.QtNetwor... |
'''
The crypt module manages all of the cryptography functions for minions and
masters, encrypting and decrypting payloads, preparing messages, and
authenticating peers
'''
# Import python libs
import os
import sys
import hmac
import hashlib
import logging
import tempfile
import base64
# Import Cryptography libs
from... |
#user/local/bin/python
from bs4 import BeautifulSoup
import pdfkit
import urllib.request
def findArticles(website, firstName, lastName):
url = "{}?s={}+{}".format(website, firstName, lastName) #access the search term through website
html = urllib.request.urlopen(url).read()
soup = BeautifulSoup(html,from_e... |
#/usr/bin/env python
'''
The minionswarm script will start a group of salt minions with different ids
on a single system to test scale capabilities
'''
# Import Python Libs
import os
import optparse
import subprocess
import tempfile
import shutil
import random
import hashlib
# Import salt libs
import salt
# Import t... |
'''
The crypt module manages all of the cryptography functions for minions and
masters, encrypting and decrypting payloads, preparing messages, and
authenticating peers
'''
# Import python libs
import os
import sys
import hmac
import hashlib
import logging
import tempfile
import base64
# Import Cryptography libs
from... |
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QFileDialog
import os
import sys
import traceback
from itertools import groupby
import pandas as pd
import numpy as np
from idw import idw
from cfm import cfm
from knncad import knn
class MainWindow(QtWidgets.QMainWindow):
def __init__(self... |
import os
import shutil
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.common.exceptions import (
NoSuchElementException, StaleElementReferenceException, TimeoutException, WebDriverEx... |
"""
Django settings for NippoKun project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
fr... |
# -*- coding: utf-8 -*-
'''
The State Compiler is used to execute states in Salt. A state is unlike
an execution module in that instead of just executing a command, it
ensures that a certain state is present on the system.
The data sent to the state calls is as follows:
{ 'state': '<state module name>',
'fun... |
#!/usr/bin/env python
''' Adds a bogus read group to a readgroup-less BAM file '''
import os
import sys
import pysam
from uuid import uuid4
def modhead(header, rgid, fn):
if 'RG' in header:
sys.stderr.write("RG found in header, this script is not what you want!\n")
sys.exit(usage())
header[... |
from rest_framework import renderers
from clldutils.dsv import UnicodeWriter
CSV_PREAMBLE = """
Research that uses data from D-PLACE should cite both the original source(s) of
the data and the paper by Kirby et al. in which D-PLACE was first presented
(e.g., research using cultural data from the Binford Hunter-Gathere... |
from protocol import proto_store
from urlparse import urlparse
import constants
import datastore
import hashlib
import json
import logging
import os
import routingtable
import time
class DHT(object):
def __init__(self, transport, market_id, settings, db_connection):
self._log = logging.getLogger('[%s] %s... |
import os
from buildbot import locks
from buildbot.steps.shell import ShellCommand
from buildbot.steps.shell import SetProperty
from buildbot.steps.python import Sphinx
from buildbot.steps.transfer import FileDownload
from buildbot.steps.transfer import FileUpload
from buildbot.steps.transfer import DirectoryUpload
fro... |
"""
# Name: Tier 1 Rapid Benefit Indicator Assessment- All Modules
# Purpose: Calculate values for benefit indicators using wetland restoration site polygons
# and a variety of other input data
# Author: Justin Bousquin
# Additional Author Credits: Michael Charpentier (Report generation)
# Additional Author Cr... |
import datetime, os, json, multiprocessing
import mediacloud.api as mcapi
import app
def load_media_info_json():
static_data_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)),'static','data')
json_data=open(os.path.join(static_data_dir,'media.json'))
data = json.load(json_data)
media_info... |
import csv
import io
import os
import sys
from retriever.lib.defaults import ENCODING
def open_fr(file_name, encoding=ENCODING, encode=True):
"""Open file for reading respecting Python version and OS differences.
Sets newline to Linux line endings on Windows and Python 3
When encode=False does not set e... |
'''
The module used to execute states in salt. A state is unlike a module execution
in that instead of just executing a command it ensure that a certain state is
present on the system.
The data sent to the state calls is as follows:
{ 'state': '<state module name>',
'fun': '<state function name>',
'nam... |
from _Framework.ButtonMatrixElement import ButtonMatrixElement
from _Framework.ControlSurface import ControlSurface
from _Framework.InputControlElement import MIDI_CC_TYPE
from _Framework.Layer import Layer
from _Framework.MixerComponent import MixerComponent
from _Framework.ModesComponent import LayerMode
from _Framew... |
import os,sys,string
import math
import optparse
import apollo
import time
import glob,hashlib
import datetime
import random
from multiprocessing import Process,Queue
def parseFips(state,county,tract):
fipsString = ""
if len(str(state)) == 1:
fipsString = "0" + str(state)
else:
fipsString =... |
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal, assert_
import statsmodels.sandbox.tsa.fftarma as fa
from statsmodels.tsa.descriptivestats import TsaDescriptive
from statsmodels.tsa.arma_mle import Arma
from statsmodels.tsa.arima_model import ARMA
from results import results_arma
import ... |
import sys
sys.path.append('/home/dotcloud/current')
from app import app as application
|
'''
The module used to execute states in salt. A state is unlike a module execution
in that instead of just executing a command it ensure that a certain state is
present on the system.
The data sent to the state calls is as follows:
{ 'state': '<state module name>',
'fun': '<state function name>',
'nam... |
import sys
import json
from collections import defaultdict
import pyelliptic as ec
from zmq.eventloop import ioloop, zmqstream
import zmq
from multiprocessing import Process
from threading import Thread
ioloop.install()
import traceback
# Default port
DEFAULT_PORT=12345
# Get some command line pars
SEED_URI = False... |
"""Illustrate usage of DAPPER to benchmark multiple DA methods"""
from dapper import *
##############################
# DA method configurations
##############################
xps = xpList()
from dapper.mods.Lorenz63.sakov2012 import HMM # Expected rmse.a:
xps += Climatology() #... |
# vim: set fileencoding=utf-8 :
import base64
import os
import sys
import time
import urllib
from boto.ec2.connection import EC2Connection
from boto.s3.connection import S3Connection
from boto.exception import EC2ResponseError, S3CreateError, S3ResponseError
from mint import helperfuncs
from mint.mint_error import EC... |
import os
import logging
import traceback
from collections import namedtuple
from funcy.objects import cached_property
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtWidgets import QApplication
from PyQt5 import uic
from PyQt5.QtCore import QDir
from hexview import HexViewWidget
from vstructui im... |
#!/usr/bin/env python
""" Assignment 1, Exercise 2, INF1340, Fall, 2015. Name that shape.
This module contains one function name_that_shape(). It prompts the user
to input the number of sides in a shape and outputs the name of the shape.
"""
__author__ = 'Susan Sim'
__email__ = "ses@drsusansim.org"
__copyright__ = ... |
import logging
import os
import re
import json
from copy import copy
try:
from queue import Empty
except ImportError:
from Queue import Empty
from unittest import TestCase
from nose.plugins import Plugin
from IPython.kernel.tests import utils
try:
from IPython.nbformat import read
NBFORMAT_VERSION ... |
# vim: set fileencoding=utf-8 :
import base64
import os
import re
import sys
import time
import urllib
import urllib2
from boto.ec2.connection import EC2Connection
from boto.s3.connection import S3Connection
from boto.exception import EC2ResponseError, S3CreateError, S3ResponseError
from mint import helperfuncs
from ... |
#!/usr/bin/env python
""" Assignment 1, Exercise 2, INF1340, Fall, 2015. Name that shape.
This module contains one function name_that_shape(). It prompts the user
to input the number of sides in a shape and outputs the name of the shape.
"""
__author__ = 'Susan Sim'
__email__ = "ses@drsusansim.org"
__copyright__ = ... |
#!/usr/bin/env python
ABOUT = '''
Notelock: A simple terminal note encryption service. Or, the terminal diaries
Use: notelock [OPTION]... [NOTEBOOK] [message]
Each notebook has entries stored in chronological order. Adding an entry is
easy: just type 'notelock [book name] [message]', and it will be appended to the
n... |
import autosar
import apx
import math
from copy import deepcopy
from apx.parser import apx_split_line
def _getIntegerTypeCode(dataType):
"""
using an autosar integer datatype, calculate how many bits are required
to store its value and based on that, calculate what APX type code to use.
"""
g... |
#!/usr/bin/env python
""" Assignment 1, Exercise 3, INF1340, Fall, 2015. Troubleshooting Car Issues.
This module contains one function diagnose_car(). It is an expert system to
interactive diagnose car issues.
"""
__author__ = 'Susan Sim'
__email__ = "ses@drsusansim.org"
__copyright__ = "2015 Susan Sim"
__license__... |
"""
This is the dashboard of CEA
"""
from __future__ import division
from __future__ import print_function
import json
import os
import pandas as pd
import cea.config
import cea.inputlocator
from cea.plots.optimization.pareto_capacity_installed import pareto_capacity_installed
from cea.plots.optimization.pareto_curv... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import six
import os
import tensorflow as tf
from input_metadata import CATEGORICAL_FEATURE_KEYS_TO_BE_REMOVED
from input_metadata import HASH_STRING_FEATURE_KEYS
from input_metadata import LABEL_KEY
from inpu... |
import model
import abc
import transformation
import shutil
import os
import util
class BaseExport(object):
"""This class holds the main functions concerned about
creation and exportation of opinions polarities to text files"""
__metaclass__ = abc.ABCMeta
def __init__(self, baseModel, ngrams_dict):
super(BaseE... |
"""Certbot installer plugin for Postfix."""
import logging
import os
import string
import subprocess
import sys
import zope.interface
from certbot import errors
from certbot import interfaces
from certbot.plugins import common as plugins_common
logger = logging.getLogger(__name__)
@zope.interface.implementer(inte... |
"""Base classes and helpers for testing the plugin."""
import os
import os.path
import re
import coverage
from coverage.test_helpers import TempDirMixin
import django
# Make Django templates outside of Django.
# Originally taken from: http://stackoverflow.com/a/98178/14343
from django.conf import settings
settings.... |
from datetime import datetime
import json
import logging
import math
import os
import shutil
import uuid
import zipfile
from django.http import HttpResponse
from openpyxl import load_workbook
from django.db import connection
from django.db.utils import IntegrityError
from django.utils.translation import ugettext as _
f... |
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... |
# Copyright (C) 2012 Victor Semionov
# 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 ... |
#!/usr/bin/env python3.5
import re
import json
import sys
def load_json(filename):
"""
Parse a JSON file
First remove all comments, then use the standard json package
Comments look like :
// ...
or
/*
...
*/
Args:
filename (str): Path of the file to l... |
#!/usr/bin/env python3
import sys
from argparse import ArgumentParser
import nuimo
controller_manager = None
class ControllerPrintListener(nuimo.ControllerListener):
"""
An implementation of ``ControllerListener`` that prints each event.
"""
def __init__(self, controller):
self.controller = ... |
from __future__ import print_function, division
import os
import mdtraj as md
import pandas as pd
import numpy as np
from numpy.testing import assert_approx_equal
from mdtraj.testing import eq
from sklearn.externals.joblib import load, dump
import sklearn.pipeline
from six import PY3
from mixtape.utils import map_dra... |
#!/usr/bin/env cctbx.python
# Resolutionizer.py
#
# Copyright (C) 2013 Diamond Light Source, Graeme Winter
#
# This code is distributed under the BSD license, a copy of which is
# included in the root directory of this package.
#
# A toolkit component for merging symmetry related intensity measurements
# to calcu... |
#!/usr/bin/env python
#
# commit_tests.py: testing fancy commit cases.
#
# Subversion is a tool for revision control.
# See http://subversion.tigris.org for more information.
#
# ====================================================================
# Copyright (c) 2000-2003 CollabNet. All rights reserved.
#
# ... |
#!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterf... |
"""
test_plot_mpl:
==============
A module intended for use with Nose.
"""
from __future__ import absolute_import
import matplotlib
# Force matplotlib to not use any Xwindows backend.
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from nose.plugins.attrib import attr
from nose.tools import raises
from plotl... |
import os
from shutil import rmtree
from fabric.api import lcd, local, settings, hide
from fabric.tasks import Task
__all__ = ['bundle_packages', 'dev_appserver','test','show_config',
'fix_virtualenv_paths', 'update', 'update_indexes', 'update_queues',
'update_dos', 'update_cron', 'vacuum_indexes']
def find_... |
#!/usr/bin/python
# (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
# Sponsored by Four Kitchens http://fourkitchens.com.
#
# This file is part of Ansible
#
# Ansible 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... |
import sublime
import sublime_plugin
import os
class FanBuildCommand(sublime_plugin.WindowCommand):
def run(self, task='compile', **kwargs):
self.workingDir = self._find_pod_dir()
if not self.workingDir:
sublime.status_message("Could not find build.fan")
return
if task == 'prompt':
self.window.show_in... |
# (c) 2014, Matt Martz <matt@sivel.net>
#
# This file is part of Ansible
#
# Ansible 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
# (at your option) any later version.
#
... |
"""Configuration for a datapath."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2017 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this ... |
"""Configuration for a datapath."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this ... |
"""Configuration for a datapath."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this ... |
"""Configuration for a datapath."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2017 The Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this ... |
from __future__ import print_function
import re
import json
from dateutil.parser import parse
import string
from datetime import datetime
import pytz
import facepy
from facepy import GraphAPI
from frontend import write_html
# Put Facebook 'Access Token' in a plain text file ACCESS_TOKEN in same dir.
# To get an acc... |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Various low-level utilities.
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import datetime
import json
import math
import os
import select
import signal
impor... |
import os
import sys
import time
import errno
import threading
import subprocess
from atve import STRING_SET
from atve import PYTHON_VERSION
from atve.exception import *
class ThreadWithReturn(threading.Thread):
def __init__(self, *args, **kwargs):
super(ThreadWithReturn, self).__init__(*args, **kwargs)
... |
import os
import tempfile
import errno
import datetime
import socket
import json
import uuid
import re
from subprocess import Popen, PIPE
from ansible import utils
def get_dotted_val_in_dict(d, keys):
"""Searches dict d for element in keys.
Args:
d (dict): Dictionary to search
keys (str): St... |
import os
DEBUG = True
SECRET_KEY = 'acb123'
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
# database info
DATABASE = {
'name': os.path.join(PROJECT_ROOT, 'dibbs.db'),
'engine': 'peewee.SqliteDatabase',
}
# Application specific config
APP_NAME = "Cult 2.0 dibbs"
APP_TAGLINE = "Call dibbs on war b... |
# Django settings for npp project.
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
("Brendan Smith", "brendan@nationalpriorities.org"),
("Becky Sweger", "bsweger@nationalpriorities.org"),
)
MANAGERS = ADMINS
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unico... |
#------------------------------------------------------------------------------
#
# GLOBAL SETTINGS
#
# Defines: gateway_schema, dataset_schema, pod_schema, user_schema,
#
#------------------------------------------------------------------------------
import os
# FIGURE OUT WHERE WE ARE RUNNING... ON HEROKU, OR LOCAL... |
import sys
import os
# ===========================
# = Directory Declaractions =
# ===========================
CURRENT_DIR = os.path.dirname(__file__)
NEWSBLUR_DIR = CURRENT_DIR
TEMPLATE_DIRS = (os.path.join(CURRENT_DIR, 'templates'),
os.path.join(CURRENT_DIR, 'vendor/zebra/templates'))
MEDIA_ROOT... |
#!/usr/bin/env python
"""
A tool that automatically formats Python code to conform to the PEP 8 style
guide.
"""
import copy
import os
import re
import sys
try:
from cStringIO import StringIO
except ImportError:
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
i... |
# -*- coding: utf-8 -*-
"""request_token default test settings."""
from distutils.version import StrictVersion
from os import getenv
import django
DJANGO_VERSION = StrictVersion(django.get_version())
assert DJANGO_VERSION >= StrictVersion('1.11')
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'djang... |
#!/usr/bin/env python
#
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
# Copyright (C) 2013-2014 Hideo Hattori, Steven Myint, Bill Wendling
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation file... |
connectionSettings = {
'ip' : "enter ip",
'port' : "enter port",
'user' : "name"
}
controls = {"up" : "key", "down" : "key", "left" : "key", "right" : "key"}
|
#!/usr/bin/env python
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
# Copyright (C) 2013-2016 Hideo Hattori, Steven Myint, Bill Wendling
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files... |
# Django settings for auslan project.
ADMINS = (
('Steve Cassidy', 'steve.cassidy@mq.edu.au'),
)
MANAGERS = ADMINS
DEFAULT_FROM_EMAIL = "webmaster@auslan.org.au"
TIME_ZONE = 'Australia/Sydney'
LANGUAGE_CODE = 'en-us'
# site_id
# 1 = www.auslan.org.au
# 2 = beta.auslan.org.au
SITE_ID = 1
USE_I18N = True
#... |
#!/usr/bin/env python
#
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
#
# 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, in... |
import os
from wafer.settings import *
try:
from localsettings import *
except ImportError:
pass
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse_lazy
pyconzadir = os.path.dirname(__file__)
STATICFILES_DIRS = (
os.path.join(pyconzadir, 'static'),
)
... |
from tapiriik.settings import WEB_ROOT, HTTP_SOURCE_ADDR, GARMIN_CONNECT_USER_WATCH_ACCOUNTS
from tapiriik.services.service_base import ServiceAuthenticationType, ServiceBase
from tapiriik.services.service_record import ServiceRecord
from tapiriik.services.interchange import UploadedActivity, ActivityType, ActivityS... |
# @Integer(label="Points Density", value=20) points_density
# @Boolean(label="Smooth Line", value=True) smooth
# @StatusService status
from ij.plugin.frame import RoiManager
from ij.gui import Roi
from ij.gui import PolygonRoi
def main():
rm = RoiManager.getInstance()
rm.runCommand("Deselect")
if not rm:
stat... |
#!/usr/bin/env python
#
# Copyright (C) 2010-2011 Hideo Hattori
# Copyright (C) 2011-2013 Hideo Hattori, Steven Myint
#
# 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, in... |
import markdown
from flask import Blueprint, flash, redirect, render_template, request, url_for
from flask import Markup
from flask.ext.login import current_user
from application import db
from application.page.models import Page, PageRevision
page_module = Blueprint('page', __name__)
@page_module.route('/page/')
@... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.