text
stringlengths
12
6.59M
import os # ============================================================================== # HUMAN_FRIENDLY_FILESIZES # ============================================================================== def human_friendly_filesizes(size): """ Given an integer files...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django import forms from django.contrib import admin from filer.admin.fileadmin import FileAdmin from .models import Embeddable, Youtube # _____ # ...
""" This module, which also functions as a standalone script, downloads the latest (static binary) release of FFmpeg from different sources. These sites are all linked to by the official homepage of FFmpeg. Supported systems are Linux, OS X and Windows. Currently armv7 and armv8 architectures are only available for Li...
""" Module for creating trees """ from math import pi, log, sqrt from random import gauss from Tree.utils import Node from Tree.draw import SUPPORTED_CANVAS class Tree: """The standard tree.""" def __init__(self, pos=(0, 0, 0, -100), branches=None, sigma=(0, 0)): """The contructor. Args: ...
#!/usr/bin/python # -*- coding: utf-8 -*- """Extension for flake8 to test for certain __future__ imports""" import sys try: import argparse except ImportError as e: argparse = e from ast import NodeVisitor, PyCF_ONLY_AST __version__ = '0.3.dev1' class FutureImportVisitor(NodeVisitor): def __init__(sel...
# -*- coding: utf-8 -*- """ flask.ext.cache ~~~~~~~~~~~~~~ Adds cache support to your application. :copyright: (c) 2010 by Thadeus Burgess. :license: BSD, see LICENSE for more details """ __version__ = '0.10.1' __versionfull__ = __version__ import uuid import hashlib import inspect import except...
# -*- coding: utf-8 -*- """ flask.ext.cache ~~~~~~~~~~~~~~ Adds cache support to your application. :copyright: (c) 2010 by Thadeus Burgess. :license: BSD, see LICENSE for more details """ __version__ = '0.13' __versionfull__ = __version__ import base64 import functools import hashlib import insp...
# -*- coding: utf8 -*- """Main package for Flask-Z3950.""" from .z3950 import Z3950Manager, Z3950Database from .dataset import Dataset from PyZ3950.zoom import ZoomError __author__ = "Alexander Mendes" __license__ = "BSD License" __version__ = "1.0.1"
# Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.node.test.test_config -*- """ APIs for parsing and validating configuration. """ from __future__ import unicode_literals, absolute_import import math import os import re import types from twisted.python.filepath import FilePa...
from __future__ import absolute_import from collections import defaultdict from tornado import web from celery import states from ..views import BaseHandler class Monitor(BaseHandler): @web.authenticated def get(self): self.render("monitor.html") class SucceededTaskMonitor(BaseHandler): @web....
# -*- coding: utf-8 -*- """ Created on Wed Jan 4 03:50:31 2017 @author: jeffrey_yuan """ import os import logging import numpy as np from itertools import combinations, product import flye.polishing.alignment as flye_aln import flye.utils.fasta_parser as fp import flye.config.py_cfg as config import flye.polishing....
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import sys, os from datetime import datetime, timedelta from github import Github import click from jinja2 import Template from tqdm import tqdm __version__ = "0.1" try: ROOT = sys._MEIPASS except AttributeError: ...
from __future__ import unicode_literals import hashlib from django.conf import settings try: from django.contrib.auth import get_user_model # Django 1.5 except ImportError: from postman.future_1_5 import get_user_model from django.core.exceptions import ValidationError from django.core.urlresolvers import rev...
# -*- coding: utf-8 -*- """ Created on Wed Jan 4 03:50:31 2017 @author: jeffrey_yuan """ import os import logging import numpy as np from itertools import combinations, product import flye.polishing.alignment as flye_aln import flye.utils.fasta_parser as fp import flye.config.py_cfg as config import flye.polishing....
# Copyright (C) 2001-2007 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
#! /usr/bin/env python3 # Copyright 2018 John Hanley. # # 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, including without limitation # the rights to use, copy, modify, m...
"""Python wrapper for the gtemu emulator """ import itertools from contextlib import contextmanager import asm import _gtemu __all__ = ["Emulator", "RAM", "ROM"] _BLANK_RAM = bytearray([0 for _ in range(1 << 15)]) def _make_state_field_accessor(name): """Return a descriptor that accesses the fields of the st...
from django.shortcuts import resolve_url from django.utils.translation import ugettext_lazy as _ from django.views.decorators.csrf import csrf_protect from django.contrib.auth.tokens import default_token_generator from django.contrib.auth.forms import PasswordResetForm from django.db import connection from django.core....
"""Kraken Maya - Maya Builder module. Classes: Builder -- Component representation. """ import json import logging from kraken.log import getLogger from kraken.core.kraken_system import ks from kraken.core.maths import Vec2, Vec3, Xfo, Mat44, Math_radToDeg, RotationOrder from kraken.core.builder import Builder f...
""" Database support module for the pprof study. """ import os from pprof.settings import config from abc import ABCMeta, abstractproperty from pprof.experiment import static_var def setup_db_config(): """Query the environment for database connection information """ config["db_host"] = "localhost" ...
#!/usr/bin/env python2 # Copyright 2016 The Fontbakery Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# # This module contains most of the code of stdeb. # import sys, os, shutil, sets, select import ConfigParser import subprocess import tempfile import stdeb from stdeb import log, __version__ as __stdeb_version__ __all__ = ['DebianInfo','build_dsc','expand_tarball','expand_zip', 'stdeb_cmdline_opts','stdeb...
# -*- coding: utf8 -*- # # Copyright (C) 2015 NDP Systèmes (<http://www.ndp-systemes.fr>). # # 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 Software Foundation, either version 3 of the # Licen...
#!/usr/bin/env python2 # Copyright 2016 The Fontbakery Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from ast import literal_eval from odoo import models, fields, api, _ from odoo.exceptions import ValidationError from odoo.addons import decimal_precision as dp class ProductAttribute(models.Model): _inherit = 'product.attribute' @api.multi def copy(self, default=None): if not default: ...
#!/home/pi/.virtualenvs/stephmeter/bin/python import nextbus import pwm_calibrate import led import time import datetime import sys from settings import * def main(): DEBUG = '--debug' in map(lambda x: x.lower().strip(), sys.args) if DEBUG: print 'Entering debug mode...' else: l = led.LED(SERIAL_DEVICE, SERI...
import ctypes from numpy import array, cross, dot, zeros_like, mean from numpy import apply_along_axis, column_stack from numpy.linalg import norm import numpy c_cross = ctypes.cdll.LoadLibrary('./lib_cross.so') # pylint: disable=C0103 ERROR_TEXT = { 'VERTICES_SIZE': "Size of vertices array should be a multiple...
from views import * from lookups import * import requests import re from utils import * import itertools from config import config if config.IMPORT_PYSAM_PRIMER3: import pysam import csv #hpo lookup import orm # shows each individual, # all_individuals @app.route('/individuals') @requires_auth def individuals_pa...
from Cura.MeshHandling.Vertex import Vertex from Cura.Math.Vector import Vector import numpy # Class to hold a list of verts and possibly how (and if) they are connected. class MeshData(object): def __init__(self): self._verts = None self._num_verts = 0 def getVerts(self): retu...
#!/usr/bin/env python2 # Copyright 2016 The Fontbakery Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Comunitea Servicios Tecnológicos All Rights Reserved # $Omar Castiñeira Saavedra <omar@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it u...
from Cura.MeshHandling.Vertex import Vertex from Cura.Math.Vector import Vector import numpy from struct import pack ## Class to hold a list of verts and possibly how (and if) they are connected. class MeshData(object): def __init__(self): self._vertices = None self._num_vertices = 0 self...
#!/usr/bin/env python2 # Copyright 2016 The Fontbakery Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Comunitea servicios Tecnológicos # $Omar Castiñeira Saavedra$ <omar@comunitea.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
# # Pyrex - Module parse tree node # import os, time from PyrexTypes import CPtrType import Future try: set except NameError: # Python 2.3 from sets import Set as set import Annotate import Code import Naming import Nodes import Options import PyrexTypes import TypeSlots import Version import DebugFlags f...
# -*- coding: utf-8 -*- """ %store magic for lightweight persistence. Stores variables, aliases etc. in PickleShare database. $Id: iplib.py 1107 2006-01-30 19:02:20Z vivainio $ """ import IPython.ipapi from IPython.ipapi import UsageError ip = IPython.ipapi.get() import pickleshare import inspect,pickle,os,sys,tex...
# -*- coding: utf-8 -*- '''The app module, containing the app factory function.''' from flask import Flask, render_template import re def asset_path_context_processor(): return {'asset_path': '/static/'} def create_app(config_filename): ''' An application factory, as explained here: http://flask.pocoo...
''' Created on Feb 15, 2011 @author: eplaster ''' VixDiskLibDiskType = dict( MONOLITHIC_SPARSE=1, MONOLITHIC_FLAT=2, SPLIT_SPARSE=3, SPLIT_FLAT=4, VMFS_FLAT=5, STREAM_OPTIMIZED=6, VMFS_THIN=7, VMFS_SPARSE=8, UNKNOWN=256) # Disk adapter types...
# Yith Library Server is a password storage server. # Copyright (C) 2012-2013 Yaco Sistemas # Copyright (C) 2012-2013 Alejandro Blanco Escudero <alejandro.b.e@gmail.com> # Copyright (C) 2012-2013 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> # # This file is part of Yith Library Server. # # Yith Library Server is...
from PySide.QtCore import * from PySide.QtGui import * from PySide.QtSql import * import DarunGrimDatabase import DiffEngine from Graphs import * import FlowGrapher import FileStoreBrowser import FileStoreDatabase import DarunGrimEngine import pprint from multiprocessing import Process import time import os def Perfo...
# # Pyrex - Module parse tree node # import os, time from cStringIO import StringIO from PyrexTypes import CPtrType try: set except NameError: # Python 2.3 from sets import Set as set import Annotate import Code import Naming import Nodes import Options import PyrexTypes import TypeSlots import Version fr...
# -*- coding: utf-8 -*- """Storj HTTP module.""" import os import logging import json import requests import storj import time from base64 import b64encode from binascii import b2a_hex from ecdsa import SigningKey from hashlib import sha256 from io import BytesIO from six.moves.urllib.parse import urlencode, urljoin...
"""Tests for the object inspection functionality. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from inspect import Signature, Parameter import os import re import sys import nose.tools as nt from .. import oinspect from IPython.core.magic import (Magics, ...
# -*- coding: utf-8 -*- # # Fatiando a Terra documentation build configuration file, created by # sphinx-quickstart on Tue May 22 15:17:01 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
# # Pyrex - Types # from Code import UtilityCode import StringEncoding import Naming import copy from Errors import error class BaseType(object): # # Base class for all Pyrex types including pseudo-types. def can_coerce_to_pyobject(self, env): return False def cast_code(self, expr_code)...
import matplotlib.pyplot as plt import numpy as np class RefDataType: def __init__(self,length,steps,coverage,cv,marker,color,label): self.length = length self.steps = steps self.coverage = coverage self.cv = cv self.marker = marker self.color = color self.label = label def get_prop(self, prop_str): ...
# encoding: utf-8 """ ============= parallelmagic ============= Magic command interface for interactive parallel work. Usage ===== ``%autopx`` {AUTOPX_DOC} ``%px`` {PX_DOC} ``%result`` {RESULT_DOC} """ #----------------------------------------------------------------------------- # Copyright (C) 2008 The IPy...
# -*- coding: utf-8 -*- # # salt-cloud documentation build configuration file, created by # sphinx-quickstart2 on Sat Jun 23 01:57:46 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.db import models from django.db.models import Sum, Max from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext as _ from filer.fields.image ...
import random def DEFAULT_VALUE_FUNC(board): if board.player1wins: return 1 if board.player2wins: return -1 return 0 class BaseStrategy(object): ''' Takes in a board implementing the following interface class Board: possible_moves(self) => list(Move) update(self, Move) throws ...
# -*- coding: utf-8 -*- # # Django Media Tree documentation build configuration file, created by # sphinx-quickstart on Sun Jun 26 21:56:57 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
from django.shortcuts import render, redirect from django.contrib.auth import logout from django.contrib.auth.decorators import login_required from django.db.models import Count from django.http import JsonResponse, HttpResponseRedirect, HttpResponse from django.utils.crypto import get_random_string from django.views.d...
# Copyright 2017 Specialty Medical Drugstore # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import _, api, exceptions, fields, models class ProjectTask(models.Model): _inherit = "project.task" pr_uri = fields.Char(string="PR URI", tracking=True) pr_required_states = fields.Ma...
from typing import Any, Mapping, cast import json import re from bs4 import BeautifulSoup as Soup from .typing.guide_data import GuideData from .util import first def initial_data(content: Soup) -> Mapping[str, Any]: text = first( filter(lambda x: '"ytInitialData"' in x.text, content.sele...
import json import logging import os import signal import sys from collections import defaultdict from contextlib import ExitStack, contextmanager from datetime import datetime, timedelta from functools import partial from threading import Lock from django.conf import settings from django.db.utils import IntegrityErro...
#!/usr/bin/env python ''' Project: Geothon (https://github.com/MBoustani/Geothon) File: Vector/create_shp_line.py Description: This code create a line shapefile from multi-points. Author: Maziyar Boustani (github.com/MBoustani) ''' import os try: import ogr except ImportError: from os...
#!/usr/bin/env python import eventlet import time import socket import fcntl import struct import threading from oslo.config import cfg from vmthunder.openstack.common import log as logging from vmthunder.path import connection_to_str from vmthunder.path import Path from vmthunder.enum import Enum fro...
from __future__ import print_function import re from fortls.objects import map_keywords, fortran_module, fortran_program, \ fortran_submodule, fortran_subroutine, fortran_function, fortran_block, \ fortran_select, fortran_type, fortran_int, fortran_obj, fortran_meth, \ fortran_do, fortran_where, fortran_if,...
# Credit to: https://gist.github.com/philfreo/5543145 from __future__ import division import collections from texttable import Texttable import stripe by_status = collections.defaultdict(list) per_page = 100 offset = 0 STRIPE_TEST_KEY = "" STRIPE_LIVE_KEY = "" stripe.api_key = STRIPE_LIVE_KEY while True: strip...
# -*- coding: utf-8 -*- import sys, os import sphinx # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. DIR = os.path.dirname(__file...
# See https://zulip.readthedocs.io/en/latest/subsystems/events-system.html for # high-level documentation on how this system works. import atexit import copy import logging import os import random import signal import sys import time import traceback from collections import deque from typing import ( AbstractSet, ...
import decimal import numpy as np import math # 1.4 becomes 1 and 1.6 becomes 2. special case: 1.5 becomes 2. def round_half_up(number): return int(decimal.Decimal(number).quantize(decimal.Decimal('1'), rounding=decimal.ROUND_HALF_UP)) def stack_frames(sig, sampling_frequency, frame_length=0.020, frame_stride=0...
from .base_settings import * # Database # https://docs.djangoproject.com/en/1.11/ref/settings/#databases ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'postgres', 'USER': 'postgres', 'HOST': 'db', 'PORT': 5432, } } ...
import sys import os import numpy as np import pygame from pygame.locals import * from World import World from Person import Player from Item import Item class Game: SPRITES_LOCATION = "sprites/" SPRITES_EXT = ".png" CANTERBURY_FONT = os.path.join("fonts", "Canterbury.ttf") MONOSPACE_FONT = os.path.j...
import cStringIO as StringIO import math import json from datetime import datetime from datetime import timedelta from django import template from django.contrib import admin from django.db.models import Max from django.db.models import Q from django.http import HttpResponse from django.http import HttpResponseRedirec...
""".""" import numpy as _np import matplotlib.pyplot as _plt import datetime as _datetime import time as _time from mathphys.functions import load_pickle import siriuspy.clientconfigdb as _sconf from ..utils import MeasBaseClass as _BaseClass, \ ParamsBaseClass as _ParamsBaseClass from siriuspy.devices import Tune...
#!/usr/bin/env python import pandas as pd import urllib2 import re import datetime from bs4 import BeautifulSoup from gevent.pool import Pool def load_files(symbolfilepaths, csvdelim = ","): """ Takes a list of symbol file paths to respective csv files, and loads their content into a \ dictionary of file-paths to...
#encoding:utf-8 from utils import get_url, weighted_random_subreddit subreddit = weighted_random_subreddit({ 'hmmmgifs': 1/3, 'hmmm': 2/3 }) t_channel = '@just_hmmm' def send_post(submission, r2t): what, gif_url, ext = get_url(submission) if what not in ('gif', 'img'): return False titl...
# voter/controllers.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .models import BALLOT_ADDRESS, fetch_voter_id_from_voter_device_link, Voter, VoterAddressManager, \ VoterDeviceLink, VoterDeviceLinkManager, VoterManager from django.http import HttpResponse from analytics.controllers import m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # umap documentation build configuration file, created by # sphinx-quickstart on Fri Jun 8 10:09:40 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autog...
import sys import xlrd from collections import OrderedDict import urllib.request import urllib.error import json import argparse import logging import datetime import uuid # used to generate unique user accesion if it is not provided. from socket import timeout url_meta = 'http://target.wustl.edu:7006' url_submit = '...
from __future__ import absolute_import from typing import Optional, Any from typing import Dict, Text from django.utils.translation import ugettext as _ from django.conf import settings from django.contrib.auth import authenticate, update_session_auth_hash from django.http import HttpRequest, HttpResponse from django....
""" sphinxcontrib.redoc ~~~~~~~~~~~~~~~~~~~ ReDoc powered OpenAPI spec renderer for Sphinx. Enjoy beautiful API docs! ;) :copyright: (c) 2017 by Ihor Kalnytskyi. :license: BSD, see LICENSE for details. """ import io import os import json import yaml import jinja2 import pkg_resources from s...
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # This program 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, version 3 of the License. # # This program is distributed in the hope that it will b...
from javax.swing import JFrame, JList, JPanel, JLabel, JTextField, JButton, Box, BoxLayout, JTable from javax.swing.event import ListSelectionListener from javax.swing.table import AbstractTableModel from java.awt.event import ActionListener from java.awt import FlowLayout, BorderLayout, Dimension, Font, Color class ...
from django.http import HttpResponse from django.template.response import TemplateResponse from django.db.models import Sum, Avg from django.shortcuts import render_to_response #from odm2testapp.forms import VariablesForm from django.shortcuts import render from django.http import HttpResponseRedirect from .models impo...
import os import pickle import sys from PyQt5 import QtWidgets, QtCore import about_dialogue import character import config import import_dialogue import main_view import new_character_dialogue __author__ = "Johannes Hackbarth" class CharacterCreator(QtWidgets.QMainWindow, main_view.Ui_MainWindow): def __init_...
""" Champ pour définir une « saveur » relative à une barrette """ from django.db import models class Ventilation: """ Un doublet booléen/nombre ; si le booléen est vrai, le nombre est pris en compte """ def __init__(self, actif, nombre): """ Le constructeur @param actif boo...
import os # # Project settings # project = 'Temporenc' copyright = '2014, Wouter Bolsterlee' version = '0.1' # TODO: get from project release = version # # Extensions # extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', ] autodoc_member_order = 'bysource' # # Files and paths # master_doc = 'in...
import sys import xlrd from collections import OrderedDict import urllib.request import urllib.error import json import argparse import logging import datetime import uuid # used to generate unique user accesion if it is not provided. import pprint from socket import timeout url_meta = 'http://target.wustl.edu:7006' ...
# -*- coding: utf-8 -*- from __future__ import with_statement import logging import os import six import pytest from sqlalchemy.ext.declarative import declarative_base from ziggurat_foundations.models import PermissionTuple from ziggurat_foundations.models import UserMixin from ziggurat_foundations.models import Group...
import datetime import json import os import sys import time from bcrypt import gensalt, hashpw from pytz import timezone, utc from sqlalchemy import and_, create_engine from sqlalchemy.schema import Index from sqlalchemy.orm import ( backref, relation, scoped_session, sessionmaker, with_polymorphi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # archimedes documentation build configuration file, created by # sphinx-quickstart on Tue Jan 17 06:55:44 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this #...
import getopt, os, sys, json, io version = '0.1.0' class CommandArgumentsError(RuntimeError): def __init__(self, arg): self.args = arg class SubstituteError(RuntimeError): def __init__(self, arg): self.args = arg def substitute_text(contents, context, strict): with io.BytesIO() as output: index = 0 while...
from pupa.core import db def people_by_jurisdiction(jurisdiction_id): """ Find all people by a jurisdiction """ people_ids = db.memberships.find({ "jurisdiction_id": jurisdiction_id, }).distinct('person_id') if None in people_ids: people_ids.remove(None) return people_ids def or...
from celery import Celery, Task from classtools import reify from redis import StrictRedis from charat2.model import sm from charat2.model.connections import redis_pool celery = Celery("newparp", include=[ "charat2.tasks.background", "charat2.tasks.matchmaker", "charat2.tasks.reaper", "charat2.tasks.r...
# -*- coding: utf-8 -*- # # Kernel CI Dashboard API documentation build configuration file, created by # sphinx-quickstart on Mon Aug 4 13:52:58 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogener...
#This is My Nest but it will slowly be converted to superClock! import urllib import urllib2 import sys import json import time import requests from Adafruit_7SegmentPlus import SevenSegment from optparse import OptionParser import myColorText # Make sure your higher level directory has the JSON file called passwordF...
import logging from os import getenv import sentry_sdk __all__ = ['log', 'check_for_tokens'] logging.basicConfig(level=logging.INFO, format='%(message)s') log = logging.getLogger('sdl') sentry_sdk.init("https://fc66a23d79634b9bba1690ea13e289f0@o321064.ingest.sentry.io/2383261") def check_for_to...
# -*- coding: utf-8 -*- # # Atom calculator documentation build configuration file, created by # sphinx-quickstart on Fri Jul 29 12:19:10 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
from django.conf import settings import celery from ..models import PushNotification from ..dispatchers import get_dispatcher, Dispatcher from pushy.models import get_filtered_devices_queryset, Device @celery.shared_task( queue=getattr(settings, 'PUSHY_QUEUE_DEFAULT_NAME', None) ) def check_pending_push_notifica...
from gpkit import Variable, Model class Sutherland(Model): """ Dynamic viscosity (mu) as a function of temperature References: http://www-mdp.eng.cam.ac.uk/web/library/enginfo/aerothermal_dvd_only/aero/ atmos/atmos.html http://www.cfd-online.com/Wiki/Sutherland's_law """ def set...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Janus documentation build configuration file, created by # sphinx-quickstart on Tue Sep 17 10:23:19 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autoge...
""" desisim.templates ================= Functions to simulate spectral templates for DESI. """ from __future__ import division, print_function import os import sys import numpy as np import multiprocessing from desiutil.log import get_logger, DEBUG from desisim.io import empty_metatable LIGHT = 2.99792458E5 #- spe...
# # 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...
from __future__ import print_function import numpy as np import fitsio from astrometry.util.fits import fits_table from legacypipe.cpimage import CP_DQ_BITS from legacypipe.common import tim_get_resamp def make_coadds(tims, bands, targetwcs, mods=None, xy=None, apertures=None, apxy=None, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 requ...
# -*- coding: utf-8 -*- # # Python Piwik documentation build configuration file, created by # sphinx-quickstart on Thu Jun 17 03:02:40 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
# # 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...
#! /usr/bin/python import numpy as np from astropy.time import Time from datetime import datetime, timedelta from surveysim.weather import weatherModule from surveysim.nightcal import getCal from surveysim.exposurecalc import expTimeEstimator, airMassCalculator import astropy.io.fits as pyfits from surveysim.afternoon...