text
stringlengths
12
6.59M
#!/usr/bin/env python # coding=utf-8 import sys import time import imp import os import logging import getpass from optparse import OptionParser, OptionGroup from greader import GReader root_logger = logging.getLogger() root_logger.setLevel(logging.ERROR) def loading(text, callback_exit, callback_count=None): p...
from SimpleCV import * import time import numpy import itertools def filter_matches(kp1, kp2, matches, ratio=0.75): mkp1, mkp2 = [], [] for m in matches: if len(m) == 2 and m[0].distance < m[1].distance * ratio: m = m[0] mkp1.append(kp1[m.queryIdx]) mkp2.append(kp2[...
#!/usr/bin/env python # -*- coding: utf-8 -*- import tweepy, time, sys, os, math, random, struct, string from PIL import Image, ImageDraw # Enter the corresponding information from your Twitter application: CONSUMER_KEY = os.environ['ROTHKO_API_KEY'] # Replace this with your consumer key or set an environmenta...
# -*- coding: utf-8 -*- # # vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # Copyright (c) 2007, Ashish Kulkarni <kulkarni.ashish@gmail.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the foll...
# -*- coding: utf-8 -*- """The user interface for our app""" import os,sys,tempfile,re from pprint import pprint from multiprocessing import Process from hashlib import md5 from cStringIO import StringIO from rst2pdf.createpdf import RstToPdf from rst2pdf.log import log import logging log.setLevel(logging.INFO) # ...
""" Classes for remixing audio files. (c) 2017 - Dave Rensin - dave@rensin.com This module contains classes for remixing audio files. It started as an attempt to re-create the amazing Infinite Jukebox (http://www.infinitejuke.com) created by Paul Lamere of Echo Nest. The InfiniteJukebox class can do it's processing ...
import curses, datetime from decimal import Decimal _ = lambda x:x #from i18n import _ from electrum.util import format_satoshis, set_verbosity from electrum.bitcoin import is_valid from electrum import Wallet, WalletStorage import tty, sys class ElectrumGui: def __init__(self, config, network): self....
"""Crawl SEC Edgar DB and return filing information.""" # -*- coding: utf-8 -*- __author__ = "Jake Schurch" import gevent from gevent import monkey; monkey.patch_all() import requests import pandas as pd import re import datetime from gevent.pool import Pool from gevent.lock import BoundedSemaphore cla...
import sys, os if sys.platform != "darwin": print "GUI: your platform is probably not supported yet" from guiCocoaCommon import * from utils import * import Traits try: app except NameError: # only declare if not yet declared app = None def setupAppleMenu(): # http://www.cocoabuilder.com/archive/cocoa/192181-i...
# Code I wrote teaching my cousin about # while loops in Python. userInput = 3 while True: print("menu") print("1 Celsius, 2 Farenheit, 3 exit") #don't forget to cast inputs if you want anything other than a string userInput = int(input("Enter Choice: ")) if userInput == 1: print("Celsius is for co...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ libG(oogle)Reader Copyright (C) 2010 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com Python library for working with the unofficial Google Reader API. Google may break this at anytime, I am not responsible for damages from that breakage, but I will try my ...
import os import unittest from Logger import Logger class TestLogger(unittest.TestCase): def test_file_handling(self): testLog = Logger("testLog") ## Check if program can create and open file self.assertTrue(testLog.opened) returns = testLog.close() ## Check if logger correc...
import requests, json, secrets, time, urllib startTime = time.time() # function to find key in nested dicts: see http://stackoverflow.com/questions/9807634/find-all-occurences-of-a-key-in-nested-python-dictionaries-and-lists def gen_dict_extract(key, var): if hasattr(var,'iteritems'): for k, v in var.iter...
#!/usr/bin/env python3 import argparse import os from litex.gen import * from litex.gen.genlib.resetsync import AsyncResetSynchronizer from litex.gen.fhdl.specials import Keep from litex.boards.platforms import arty from litex.soc.integration.soc_core import mem_decoder from litex.soc.integration.soc_sdram import * ...
################################# #Addon header ################################# bl_info = { 'name': 'Rayne model and animation formats (.sgm, .sga)', 'author': 'Nils Daumann', 'blender': (2, 90, 0), 'version': (2, 0, 1), 'description': 'Exports an object as .sgm file format and its animations as .sga file.', 'c...
# 2013 Nikola Peric import sys import re from PyPDF2 import PdfFileWriter, PdfFileReader from PySide.QtGui import QMainWindow, QPushButton, QApplication, QLabel, QAction, QWidget, QListWidget, QLineEdit, QFileSystemModel, QTreeView, QListView, QGroupBox, QGridLayout, QSplitter, QHBoxLayout, QVBoxLayout, QDesktopServic...
# pdspread.py # A simple spreadsheet. # This code is released to the public domain. import sys, re, types, itertools, math, curses, curses.ascii, traceback, string, os # A cell class. This has left and top boundaries. These are the leftmost # column and the topmost row. We will make the defaults 2 fo...
from bindings import _FFI, _C from functools import wraps from copy import copy from binascii import hexlify import pytest def force_Bn(n): """A decorator that coerces the nth input to be a Big Number""" def convert_nth(f): @wraps(f) def new_f(*args, **kwargs): if not n < len(ar...
# Copyright 2013-2014 Massachusetts Open Cloud Contributors # # 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 applicab...
#!/usr/bin/env python """ hackdiet.py: Weight, Body-fat, and Wakeup-time plotting inspired by the Hacker's Diet online by John Walker. :author: Robert David Grant <robert.david.grant@gmail.com> :copyright: Copyright 2012 Robert David Grant Licensed under the Apache License, Version 2.0 (the "License"); you ...
#Searching and Downloading Google Images/Image Links #Import Libraries #coding: UTF-8 import time #Importing the time library to check the time of code execution import sys #Importing the System Library import urllib2 ########### Edit From Here ########### #This list is used to search keywords. You can ...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
#!/usr/bin/env python3 """ Read a text using Google Translate TTS API. """ __version__ = "1.0.13" __author__ = "desbma" __license__ = "GPLv3" import argparse import collections import itertools import logging import os import re import subprocess import string import sys import threading import urllib.parse import ...
#!/usr/bin/env python #fileencoding=utf-8 import re import time import random import string import hashlib import logging from tornado.web import RequestHandler from tornado.web import HTTPError from tornado.escape import json_decode from tornado.options import options from bson.json_util import dumps, loads from bs...
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # Package: Pikos toolkit # File: api.py # License: LICENSE.TXT # # Copyright (c) 2012, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ from ...
""" Support functions for installing and building the "wheel" binary package format. """ from __future__ import with_statement import csv import os import sys import shutil import functools import hashlib from pip.log import logger from pip.util import call_subprocess, normalize_path from base64 import urlsafe_b64enc...
import collections class Settings(object): def __init__(self): self._settings = collections.OrderedDict() def __setattr__(self, name, value): if name.startswith('_'): super(Settings, self).__setattr__(name, value) else: self._settings[name] = value def _se...
try: import Image, ImageFilter except ImportError: from PIL import Image, ImageFilter import random import string import argparse black_pixel = (0, 0, 0, 255) white_pixel = (255, 255, 255, 255) # Generates names for output files def id_generator(size=5, chars=string.ascii_lowercase + string.ascii_uppercase + string...
from ..repository import KnowledgeRepository from ..utils.encoding import encode from io import open from knowledge_repo.utils.files import read_binary, write_binary import git import logging import os import re import shutil import yaml logger = logging.getLogger(__name__) class GitKnowledgeRepository(KnowledgeRepo...
############################################################################## # This file is part of the Apollo Framework. # This file is an adaptation of the spack package file for Camellia # that installs camellia from the apolloall repository instead of the # standard camellia bitbucket repo. # # Modified by Eric H...
#!/usr/bin/env python2 import yum import yumoter import argparse import sys import os import yumoter as depyumoter def commonInLists(listOfLists): # Input: List of lists # Output: Single list of common elements # Must take unknown number of lists if len(listOfLists) == 0: raise Exception('No...
from kokki import * def Service(service_description, hostgroup_name=None, check_command=None, use="generic-service", notification_interval=0, action="create"): File("/etc/nagios3/conf.d/service_%s.cfg" % description.lower(), content = Template("nagios3/cfg.j2", dict( type = "service", ...
# -*- coding: utf-8 -*- """ Parser for e-prime ARCHI localizers log-files author: Mehdi Rahim @contributor: Ana Luisa Pinho, ana.pinho@inria.fr Last update: Dec 2017 Compatibility: Python 2.7 How to run: python <name_of_the_script> <eprime_input.txt> <exp_var_1> <exp_var_2> ... <exp_var_n> Example: python pars...
import click from prettytable import PrettyTable class Table(object): def __init__(self): super(Table, self).__init__() def listEqual(self, list): return True if all(x == list[0] for x in list) else False def tableArray(self, x, y, fx, fy): return [fy(y)+[fx(z,y) for z in x] for y in y] def renderTable(s...
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2015 Luis Felipe Miléo - KMEE # # This program 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 Softw...
# Copyright (C) 2009 - TODAY Renato Lima - Akretion # Copyright (C) 2014 KMEE - www.kmee.com.br # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models from odoo.exceptions import UserError class DocumentCorrection(models.Model): _name = "l10n_br_fiscal.document.cor...
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Romania - Account Period Closing", "category": "Localization", "summary": "Romania - Account Period Closing", "depends": ["l10n_ro_config"], "data": [ "views/account_period_close_view.xml", "wizards/wiza...
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from sys import version_info import numpy as np from scipy import interpolate, sparse from copy import deepcopy from sklearn.datasets import load_boston from sklearn.utils.testing ...
from main import * import counter memcachekey = "TagListMemCacheKey" class TagListWorker(webapp.RequestHandler): def get(self): try: logging.info("TagListWorker: generating tag list") all_tag = [ tag for entry in Post.all() for tag in entry.tags ] co...
import argparse import os from urllib.error import URLError import platform import shlex import subprocess import sys from subprocess import CalledProcessError, list2cmdline from . import core, dockercore, state from .core import BuildError from .dockercore import DockerBuildError, docker_get_image_shell from .eval im...
# -*- coding: utf-8 -*- """ Created on Mon Jul 27 14:39:00 2015 @author: alex_ """ # Universal Imports import numpy as np import sunpy.map as mp from astropy import units as u # Visulisation Imports from mayavi import mlab from mayavi_seed_streamlines import SeedStreamline, Streamline from mayavi.tools.sources impo...
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np from fractions import Fraction def create_pi_labels(a=0, b=2, step=0.5, ax=None, direction='x'): """ A function that gives back ticks an labels in radians Keyword arguments: a -- lower limit is a*pi (default 0.0) b --...
#!/usr/bin/env python3 """Functions for reading and plotting estimator files. Examples are temperatures, populations, heating/cooling rates. """ # import math import argparse import glob import gzip import math import os import re import sys from collections import namedtuple import matplotlib.pyplot as plt import ma...
#!/usr/bin/env python3 import argparse import glob import itertools import math import os import sys from pathlib import Path from typing import Iterable import numpy as np import pandas as pd from astropy import constants as const from astropy import units as u import artistools as at import artistools.spectra impo...
from pygame.locals import * import helpers import hardware class Race(object): options = None def __init__(self, options_object): self.options = options_object def start(self): pass def render(self): pass class Options(object): distance = None # meters p...
from validate import * from instance_manager import NavitiaManager import copy def convertType(validator): if validator == str : return "string" elif validator == datetime_validator: return "datetime" elif validator == time: return "time" elif validator == int: return "i...
# -*- coding: utf-8 -*- ## \package globals.settings # # Retrieves the FFmpeg executable # MIT licensing # See: LICENSE.txt import os from globals.paths import PATH_root EXE_name = None FILE_settings = u'{}/settings'.format(PATH_root) def GetAppInfo(key_search): if not os.path.isfile(FILE_settings): ...
{ 'target_defaults': { 'conditions': [ ['OS=="win"', { 'msvs_disabled_warnings': [ 4530, # C++ exception handler used, but unwind semantics are not enabled 4506, # no definition for inline function ], }], ], }, 'targets': [ { 'target_name': 'nslo...
''' PIPELINE BETA 1.0.0 Project manager for Maya Ahutor: Lior Ben Horin All rights reserved (c) 2016 liorbenhorin.ghost.io liorbenhorin@gmail.com --------------------------------------------------------------------------------------------- install: Place the pipeline folder in your maya scripts folder. Ru...
{ "targets": [ { "target_name": "tiff-multipage", "sources": [ "src/module.cc", "src/sync.cc", "src/async.cc", "src/tiff_multipage.cc" ], "include_dirs": [ "<!(node -e \"require('n...
{ "targets": [{ "target_name": "node_snap7", "include_dirs": [ "<!(node -e \"require('nan')\")" ], "sources": [ "./src/node_snap7.cpp", "./src/node_snap7_client.cpp", "./src/snap7.cpp" ], "conditions": [ ["OS...
{ 'targets': [{ 'target_name': 'robotjs', 'include_dirs': [ "<!(node -e \"require('nan')\")" ], 'cflags': [ '-Wall', '-Wparentheses', '-Winline', '-Wbad-function-cast', '-Wdisabled-optimization' ], 'conditions': [ ['OS == "mac"', { ...
{ "target_defaults": { "conditions": [ ['OS=="win"', { }, { 'cflags' : [ "-fexceptions" ], 'cflags_cc' : [ "-fexceptions" ] } ] ], "configurations": { "Release": { 'msvs_settings': { 'VCCLCompilerTool': { 'WholeProgramOptimization': ...
#!/usr/bin/env python ''' @file ion/services/dm/distribution/test/test_pubsub.py @author Jamie Chen @test ion.services.dm.distribution.pubsub_management_service Unit test suite to cover all pub sub mgmt service code ''' import gevent from mock import Mock from interface.services.dm.ipubsub_management_service import Pu...
""" birthday.py Author: Avery Wallis Credit: None so far Assignment: Your program will ask the user the following questions, in this order: 1. Their name. 2. The name of the month they were born in (e.g. "September"). 3. The year they were born in (e.g. "1962"). 4. The day they were born on (e.g. "11"). If the user'...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson <brado@movedbylight.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 ...
#!/usr/bin/env python from pyon.util.containers import DotDict from pyon.util.poller import poll from pyon.core.bootstrap import get_sys_name from gevent.event import AsyncResult from interface.services.coi.iresource_registry_service import ResourceRegistryServiceClient from interface.services.dm.ipubsub_management_s...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.db.models import Q from sqlalchemy.sql import ( and_, select, column, compiler ) from django.test import TestCase from zerver.lib import bugdown from zerver.decorator import JsonableError from zerver.lib.test_runner import slow from zerver.v...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson <brado@movedbylight.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 ...
#!/usr/bin/env python # blogware - a python blogging system # Copyright (C) 2016-2017 izrik # # This file is a part of blogware. # # Blogware 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 vers...
''' -- imports from python libraries -- ''' import re, magic ''' -- imports from installed packages -- ''' from django.contrib.auth.models import User from django.http import HttpResponse from django.http import HttpResponseRedirect from django.http import Http404 from django.template import Library from django.templa...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to add authorized_keys for ssh logins. (c) 2012, Brad Olson <brado@movedbylight.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 ...
# Copyright (c) 2017 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 DOCUMENTATION = ''' name: gcp_compute plugin_type: inventory short_description: Google C...
"""Defaults urls for the Zinnia project""" from django.conf.urls import url from django.conf.urls import patterns from django.conf.urls import include as default_include from django.utils.translation import ugettext_lazy from zinnia.settings import TRANSLATED_URLS def i18n_url(url, translate=TRANSLATED_URLS): "...
"""Views for Zinnia entries""" from django.views.generic.dates import BaseDateDetailView from zinnia.models.entry import Entry from zinnia.views.mixins.archives import ArchiveMixin from zinnia.views.mixins.entry_protection import EntryProtectionMixin from zinnia.views.mixins.callable_queryset import CallableQuerysetMi...
from __future__ import absolute_import import socket import re import feedparser from . import storage class FeedparserSupport(object): """ Mix-in for a bot class to give feedparser support. """ def __init__(self, feed_interval=60, feeds=[]): self._feed_interval = feed_interval self._feeds ...
import os import logging import warnings from lofarpipe.support.parset import parameterset import tkp.utility.accessors from tkp.database import DataBase, DataSet, Image from tkp.utility.accessors.dataaccessor import extract_metadata from tempfile import NamedTemporaryFile from pyrap.images import image as pyrap_image ...
#!/usr/bin/env python3 """ This script downloads the latest MTG card data from http://mtgjson.com/ and processes it to turn the highly-structured data there into a flat list of card names to descriptions formatted to send down the chat. """ import common common.FRAMEWORK_ONLY = True import sys import json import re im...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import fnmatch import locale import os.path import re import subprocess import sys regex = re.compile( r"^(?P<filename>[^:]*):(?P<line>\d*):(?:(?P<column>\d*):)? (?P<message_id>[^:]*): (?P<message>.*) \((?P<message_url>.*)\)$", re.MULTILINE, ) def eprint(*args,...
import os import collections from contextlib import contextmanager class BaseKVStore(collections.MutableMapping): def __init__(self, path): self.path = path self._db = [] def load(self, fp): raise NotImplementedError def dump(self, fp): raise NotImplementedError @st...
#!/usr/bin/env python from PyQt4.QtCore import * from PyQt4.QtGui import * from structdata import g_project from roomslistwidget import RoomsListWidget class ItemsListWidget(RoomsListWidget): """ Classe che eredita da RoomsListWidget, serve per mostrare gli ITEMS nel modello dei dati. Per generalizzar...
#!/usr/bin/python # -*- coding: utf-8 -*- # ... # .:::|#:#|::::. # .:::::|##|##|::::::. # .::::|##|:|##|:::::. # ::::|#|:::|#|::::: # ::::|#|:::|#|::::: # ::::|##|:|##|::::: # ::::.|#|:|#|.::::: # ::|####|::|####|:: # :|###|:|##|:|###|: # |###|::|##|::|###| ...
# -*- coding: utf-8 -*- """ S3XRC Resource Framework - Resource API @version: 2.2.10 @see: U{B{I{S3XRC}} <http://eden.sahanafoundation.org/wiki/S3XRC>} @requires: U{B{I{lxml}} <http://codespeak.net/lxml>} @author: nursix @contact: dominic AT nursix DOT org @copyright: 2009-2010 (c) Sahana S...
import os import sys import errno import importlib import contextlib from maya import cmds, OpenMaya import maya.utils import maya.api.OpenMaya as om from pyblish import api as pyblish from . import lib, compat from ..lib import logger from .. import api, schema from ..tools import workfiles from ..vendor.Qt import Q...
import subprocess import time import speaker # #startup dispatcher # class StartUp(object): # def __init__: # self.dispatcher = subprocess.Popen('easyNav-pi-dispatcher > dispatcher.txt 2>&1', shell=True) # print "Started dispatcher" # self.nav = class StartUp(object): def __init__(self): self.speakery...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------- # Name: sfp_spamhaus # Purpose: SpiderFoot plug-in for looking up whether IPs/Netblocks/Domains # appear in the Spamhaus block lists, indicating potential open-relays, # ope...
import os import sys import importlib import contextlib import logging from collections import OrderedDict import nuke from pyblish import api as pyblish from . import lib from .. import api, io from ..vendor.Qt import QtWidgets from ..pipeline import AVALON_CONTAINER_ID log = logging.getLogger(__name__) self = sys...
#!/usr/bin/env python import subprocess class Theharvester(): """module to use theharvester""" def run(self, args, lookup, reportDir): """main function""" #init lists theharvester_result = [] #based on domain or ip, enumerate with index and value for i, l in enumerate(...
# -*- coding: cp1252 -*- import praw import time import json from collections import Counter import os import zipfile data = [] limit = 5 ######################## ####### CRAWLERS ####### ######################## def crawl(comments): i = 1 data = [] print "Getting an average delay time over the last 5 ve...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Network module for tmux-statusline.""" import os from subprocess import PIPE, Popen from time import time class Network(): """Get network stats and return throughput rates. This class determines the statistics for all local network adapters other than lo and ...
import pprint import re import copy import itertools import operator import pymongo from bson.code import Code from mongoengine import signals __all__ = ['queryset_manager', 'Q', 'InvalidQueryError', 'DO_NOTHING', 'NULLIFY', 'CASCADE', 'DENY', 'PULL'] # The maximum number of items to display in a QueryS...
import sys try: from StringIO import BytesIO except ImportError: from io import BytesIO try: from urllib import quote except ImportError: from urllib.parse import quote import base64 from itertools import product import matplotlib matplotlib.use('Agg') import numpy as np import os import pandas as ...
from __future__ import absolute_import, unicode_literals import contextlib import logging from mopidy import exceptions from mopidy.audio import PlaybackState from mopidy.compat import urllib from mopidy.core import listener from mopidy.internal import deprecation, models, validation logger = logging.getLogger(__nam...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import codecs import datetime import logging import os import time import json from urlparse import urljoin import six # Django from django.conf import settings from django.db import models #from django.core.cache import cache from django.utils.encod...
import os import errno from morenines import output from morenines import util from morenines.index import Index from morenines.ignores import Ignores NAMES = { 'mn_dir': '.morenines', 'index': 'index', 'ignore': 'ignore', 'new_index': 'new_index', 'index_archive_dir': 'indexes', } DEFAULT_IGNO...
""" Axosoft API. Hook up to axosoft """ import requests import json # pylint: disable=F0401,E0611 try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from sets import Set from .validate import validate_address, \ validate_required_params, \ validate_response S...
''' Created on Aug 19, 2014 @author: David Zwicker <dzwicker@seas.harvard.edu> This module contains convenience functions for scanning mouse videos. ''' from __future__ import division import warnings from .algorithm.parameters import PARAMETERS_DEFAULT, set_base_folder from .algorithm.analyzer import Analyzer fro...
######## # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
# pylint: disable-msg=too-many-lines """Config spec for MPF.""" from mpf._version import __version__ # values are type|validation|default mpf_config_spec = ''' accelerometers: __valid_in__: machine platform: single|str|None hit_limits: single|float:str|None level_limits: single|float:str|None leve...
"""Contains the drivers and interface code for pinball machines which use the Multimorphic P3-ROC hardware controllers. Much of this code is from the P-ROC drivers section of the pyprocgame project, written by Adam Preble and Gerry Stellenberg. It was originally released under the MIT license and is released here unde...
""" Extended docstrings for functions.py """ pi = r""" `\pi`, roughly equal to 3.141592654, represents the area of the unit circle, the half-period of trigonometric functions, and many other things in mathematics. Mpmath can evaluate `\pi` to arbitrary precision:: >>> from mpmath import * >>> mp.dps = 50; m...
import os from celery import Celery # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pycon.settings.celery') app = Celery('pycon') # Using a string here means the worker doesn't have to serialize # the configuration object to child processes. # - nam...
""" MPP Solar Inverter Command Library reference library of serial commands (and responses) for PIP-4048MS inverters mppinverter.py """ import serial import time import re import logging import json import glob import os # from pprint import pprint from os import path from argparse import ArgumentParser from .mppcomm...
""" MPP Solar Inverter Command Library reference library of serial commands (and responses) for PIP-4048MS inverters mppinverter.py """ import serial import time import re import logging import json import glob import os from os import path from .mppcommand import mppCommand log = logging.getLogger('MPP-Solar') cl...
import logging import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermis...
# coding: utf-8 # Copyright 2013 The Font Bakery Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
import json import logging import time from io import BytesIO from django.conf import settings from django.utils import timezone from django.test import Client as DjangoClient from rest_framework.parsers import JSONParser from ambulance.models import Ambulance, \ AmbulanceStatus from emstrack.tests.util import po...
# coding: utf-8 # Copyright 2013 The Font Bakery Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
import logging import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermis...
import json import os import threading import requests from requests.models import REDIRECT_STATI from balanced.config import Config from balanced.utils import to_json serializers = { 'application/json': to_json } deserializers = { 'application/json': json.loads } REDIRECT_STATI = list(REDIRECT_...