text stringlengths 12 6.59M |
|---|
from pynYNAB.Entity import Entity, undef
from pynYNAB.schema.Fields import EntityField
class CatalogBudget(Entity):
Fields= dict(
budget_name=EntityField(None),
is_tombstone=EntityField(None)
)
class UserBudget(Entity):
Fields= dict(
budget_id=EntityField(undef),
... |
# -*- coding: utf-8 -*-
def load_nametable(nt_file):
f = open(nt_file)
nt_content = f.read()
nt_bin = []
for nt in nt_content:
nt_bin.append(ord(nt))
return nt_bin
def get_nametable(index, nt):
tile_index = index * 1024
nametable = []
for y in range(32):
line = []
... |
"""
pynipap - a Python NIPAP client library
=======================================
pynipap is a Python client library for the NIPAP IP address planning
system. It is structured as a simple ORM.
There are three ORM-classes:
* :class:`VRF`
* :class:`Pool`
* :class:`Prefix`
Each of... |
# Copyright 2020, The TensorFlow 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 applicable law or agreed t... |
"""Document file for Pynuts."""
import os
import docutils
import jinja2
import docutils.core
import mimetypes
from flask import Response, render_template, request, redirect, flash, url_for
from werkzeug.datastructures import Headers
from jinja2 import ChoiceLoader
from weasyprint import HTML
from docutils.writers.html... |
# Copyright 2018 The TensorFlow Probability 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 applicable law o... |
"""Create a "virtual" Python installation
"""
import sys
import os
import optparse
import shutil
import subprocess
join = os.path.join
py_version = 'python%s.%s' % (sys.version_info[0], sys.version_info[1])
## FIXME: probably other modules for Windows?
REQUIRED_MODULES = ['os', 're', 'posix', 'posixpath', 'stat', 'Us... |
import locale
import os
import re
import sys
import string
from zipfile import ZipFile, ZipInfo
from tarfile import TarFile, TarInfo
from pyp2rpm import utils
class Archive(object):
"""Class representing package archive. All the operations must be run using with statement.
For example:
archive = Archiv... |
#
# Copyright (C) 2012 - 2018 Satoru SATOH <ssato@redhat.com>
# Copyright (C) 2019 - 2020 Satoru SATOH <satoru.satoh@gmail.com>
# SPDX-License-Identifier: MIT
#
"""Misc utility routines for anyconfig module.
"""
from __future__ import absolute_import
import collections.abc
import functools
import itertools
import os.p... |
#!/usr/bin/python
import util
import chordKMeans
import sys
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import pylab
import random
BEATS_PER_BAR = 4
PLOT_BEATS_PER_BAR = 1
def plotRectangle(top, left, right, height, opt='', alpha=1):
x = np.array([left, left, right, right])
y = np.array(... |
"""
PyPika is divided into a couple of modules, primarily the ``queries`` and ``terms`` modules.
pypika.queries
--------------
This is where the ``Query`` class can be found which is the core class in PyPika. Also, other top level classes such
as ``Table`` can be found here. ``Query`` is a container that holds all ... |
#!/usr/bin/env python
"""Visualizes data on a cubic lattice
Built specifically to visualize the VTK files created by Morpheus
"""
import os
import glob
import sys
import argparse
import numpy as np
import vtk
from vtk.util import numpy_support as VN
from matplotlib import colors
found_im2movie = True
try:
from ... |
"""
apipkg: control the exported namespace of a Python package.
see https://pypi.python.org/pypi/apipkg
(c) holger krekel, 2009 - MIT license
"""
import os
import sys
from types import ModuleType
from .version import version as __version__ # NOQA:F401
def _py_abspath(path):
"""
special version of abspath
... |
"""multipart/form-data encoding module
Released via https://bitbucket.org/chrisatlee/poster/ under MIT License (Included below)
This module provides functions that faciliate encoding name/value pairs
as multipart/form-data suitable for a HTTP POST or PUT request.
multipart/form-data is the standard way to upload fil... |
"""Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
# This Python module is part of the PyRate software package.
#
# Copyright 2020 Geoscience Australia
#
# 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/... |
"""Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
# -*- coding: utf-8 -*-
"""
=========================================
Termoactivated building surfaces (TABS)
=========================================
"""
from __future__ import division
import scipy.optimize
__author__ = "Martin Mosteiro"
__copyright__ = "Copyright 2016, Architecture and Building Systems - ETH Zur... |
import os
import sys
import ftplib
if sys.version_info >= (3, 0):
from urllib.request import urlopen
from urllib.error import HTTPError
else:
from urllib2 import urlopen, HTTPError
from osgeo import gdal
from .snap import ExamineSnap
from spatialist import Raster
from spatialist.ancillary import dissolve... |
"""Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
'''
The engine
'''
import os
import os.path
import argparse
from time import time
from collections import Iterable
import re
from datetime import datetime, timedelta
from pprint import pformat
import gc
from bdb import BdbQuit
import numpy as np
import pandas as pd
from ceam import config
from ceam.analysis import ... |
import logging
import os
import threading
from django.apps import apps
from django.conf import settings
from django.core.cache import cache
from django.db import models, connection
from boardinghouse import signals
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(logging.NullHandler())
_thread_locals = thread... |
import os
import random
import sys
import datetime
from pyseeder.utils import PyseederException
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
from cryptography import x509
from cryptography.x5... |
from flask import Flask
from flask import render_template
from flask import request
from flask import make_response
from redis import Redis, RedisError
import os
import socket
import logging
import signal
import sys
optionA = "Warriors"
optionB = "Cavs"
name = optionA + " VS " + optionB
redis = Redis(host="redis", db... |
"""The mutable value system
"""
from collections import defaultdict
from datetime import timedelta
from ceam import config, CEAMError
from .util import marker_factory, from_yearly
produces_value = marker_factory('value_system__produces')
produces_value.__doc__ = """Mark a function as the producer of the named value.... |
# -*- coding: utf-8 -*-
"""Kernel of Pyslvs."""
__version__ = "21.03.0"
__author__ = "Yuan Chang"
__copyright__ = "Copyright (C) 2016-2021"
__license__ = "AGPL"
__email__ = "pyslvs@gmail.com"
from .expression import get_vlinks, VJoint, VPoint, VLink, Coord
from .bfgs import SolverSystem
from .topo_config import t_co... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# rra.py
#
# Copyright 2014 Thaha Muhammed <storm@storm-lappy>
#
# 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; either version 2 of the ... |
# http://www.python.org/dev/peps/pep-0396/
__version__ = '4.2.3'
# backward compatibility
version = tuple([ int(x) for x in __version__.split('.') ])
majorVersionId = version[0]
|
import asyncio
import logging
from functools import partial
import signal
import os
from aiohttp.web import Application
from .utils.monkey_patch import monkey_patch_asyncio_task_factory, monkey_patch_aiohttp_client_session_request, \
monkey_patch_aiohttp_response_init
from .bus import TCPBus, PubSubBus
from vyked.... |
r'''Provides the core components of pyspecdata.
Currently, this is a very large file that we will slowly break down into separate modules or packages.
The classes :class:`nddata`, :class:`nddata_hdf`, :class:`ndshape`, the
function :func:`plot`, and the class :class:`fitdata`
are the core components of the N-Dimension... |
""":mod:`wand.image` --- Image objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opens and manipulates images. Image objects can be used in :keyword:`with`
statement, and these resources will be automatically managed (even if any
error happened)::
with Image(filename='pikachu.png') as i:
print('width =', i.w... |
import httplib2
import logging
import os
import shutil
import socket
import sys
import urllib
import zipfile
def unzip(source_filename, dest_dir):
with zipfile.ZipFile(source_filename) as zf:
zf.extractall(dest_dir)
def create_config_files(directory):
"""
Initialize directory ready for vpn walke... |
"""This module implements unit tests for the key server's
async_creds_retriever module."""
import httplib
import os
import sys
import uuid
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
import mock
import mac
import yar_test_util
import async_creds_retriever
import ks_util
class... |
# -*- coding: utf-8 -*-
import os
import glob
import importlib
import mimetypes
from bson import ObjectId
from flask import request
from modularodm import fields
from mako.lookup import TemplateLookup
from time import sleep
import furl
import requests
from modularodm import Q
from modularodm.storage.base import KeyExi... |
import dataclasses
import datetime
from typing import Optional, Tuple, Union
try:
import zoneinfo
except ImportError:
from backports import zoneinfo
import astral.moon
import astral.sun
from astral import (
Depression,
Elevation,
LocationInfo,
Observer,
SunDirection,
dms_to_float,
... |
# coding: utf-8
"""
Provides a class for parsing template strings.
This module is only meant for internal use by the renderengine module.
"""
import re
from pystache.parsed import ParsedTemplate
DEFAULT_DELIMITERS = (u'{{', u'}}')
END_OF_LINE_CHARACTERS = [u'\r', u'\n']
def _compile_template_re(delimiters=None... |
""":mod:`wand.image` --- Image objects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opens and manipulates images. Image objects can be used in :keyword:`with`
statement, and these resources will be automatically managed (even if any
error happened)::
with Image(filename='pikachu.png') as i:
print('width =', i.w... |
#!/usr/bin/env python
import sys, os, re
import json
import datetime, iso8601
# Pass date and base path to main() from airflow
def main(iso_date, base_path):
APP_NAME = "make_predictions.py"
# If there is no SparkSession, create the environment
try:
sc and spark
except NameError as e:
import finds... |
import httplib
from flask import request
from boto import exception
from website.addons.s3 import utils
from website.project.decorators import must_have_addon
from website.project.decorators import must_have_permission
from website.project.decorators import must_be_contributor_or_public
@must_be_contributor_or_publ... |
#!/usr/bin/env python
###
# Copyright (c) 2002, Jeremiah Fincher
# 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,
# ... |
from contextlib import contextmanager
import functools
import sys
import traceback
import weakref
import pytest
from pytestqt.qt_compat import QtCore, QtGui, QtTest
def _inject_qtest_methods(cls):
"""
Injects QTest methods into the given class QtBot, so the user can access
them directly without having t... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Arne Neumann <discoursegraphs.programming@arne.cl>
"""This module converts .rs3 files into `NLTK ParentedTree`s."""
from collections import defaultdict
import textwrap
from operator import methodcaller
from lxml import etree
from discoursegraphs.readwrite.tree... |
"""
@brief test log(time=2s)
"""
import sys
import os
import unittest
import re
try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..")))
if path not in sys... |
"""Device, context and memory management on CuPy.
.. note::
The package ``chainer.cuda`` has been renamed to
:mod:`chainer.backends.cuda` as of v4.0.0, but the previous module path
``chainer.cuda`` is also available.
Chainer uses `CuPy <https://cupy.chainer.org/>`_ (with very thin wrapper)
to exploit the spe... |
# coding:utf-8
import urllib
import urllib2
import json
import time
import re
import crypt
import hashlib
import sys
reload(sys)
sys.setdefaultencoding("utf8")
common_used_numerals_tmp = {'零': 0, '一': 1, '二': 2, '两': 2, '三': 3, '四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9,
'十': ... |
# -*- coding: utf-8 -*-
# © 2013-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields, api, _
from openerp.exceptions import UserError
class AccountCutoff(models.Model):
_name = 'account.cutoff'
_rec... |
# -*- coding: utf-8 -*-
# Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
#
# This file is part of dynamic-graph.
# dynamic-graph 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 ... |
import collections
import heapq
import traceback
import weakref
import numpy
import six
import chainer
from chainer.backends import cuda
from chainer import configuration
from chainer import function_hook
from chainer.utils import type_check
from chainer import variable
class FunctionNode(object):
"""Function ... |
# 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,... |
import numpy
import six
import chainer
from chainer import backend
from chainer import utils
import chainerx
def assert_allclose(x, y, atol=1e-5, rtol=1e-4, verbose=True):
"""Asserts if some corresponding element of x and y differs too much.
This function can handle both CPU and GPU arrays simultaneously.
... |
from werkzeug.testsuite import WerkzeugTestCase
import unittest
import werkzeug._urlparse as urlparse
import six
RFC1808_BASE = u"http://a/b/c/d;p?q#f"
RFC2396_BASE = u"http://a/b/c/d;p?q"
RFC3986_BASE = u'http://a/b/c/d;p?q'
SIMPLE_BASE = u'http://a/b/c/d'
# A list of test cases. Each test case is a two-tuple that... |
import rdflib as r, pygraphviz as gv, sys
import importlib
from IPython.lib.deepreload import reload as dreload
import percolation as pe
#importlib.reload(g.loadMessages)
#importlib.reload(g.listDataStructures)
#importlib.reload(g.interactionNetwork)
#importlib.reload(pe.linkedData)
##dreload(pe,exclude="pytz")
#drelo... |
import numpy as np
from PIL import Image
def read_image(path, dtype=np.float32, color=True):
"""Read an image from a file.
This function reads an image from given file. The image is CHW format and
the range of its value is :math:`[0, 255]`. If :obj:`color = True`, the
order of the channels is RGB.
... |
import argparse
import structlog
import logging
from dcicutils.deployment_utils import CreateMappingOnDeployManager
from dcicutils.env_utils import is_beanstalk_env, is_stg_or_prd_env
from dcicutils.log_utils import set_logging
from pyramid.paster import get_app
from snovault.elasticsearch.create_mapping import run as... |
# -*- coding: utf-8 -*-
from . import SessionStorage
class SaeKVDBStorage(SessionStorage):
"""
SaeKVDBStorage 使用SAE 的 KVDB 来保存你的session ::
import werobot
from werobot.session.saekvstorage import SaeKVDBStorage
session_storage = SaeKVDBStorage()
robot = werobot.WeRoBot(token=... |
import sys
"""
Provides platform-agnostic exported symbols which may be provided in different ways on different platforms.
For example, the const() symbol provides for values which are treated as constant by the micropython bytecode
compiler, but the agnostic library enables python3 to use const() but just provides it ... |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
from builtins import super
standard_library.install_aliases()
import chainer
import chainer.functions as F
from chainer import cuda
f... |
#!/usr/bin/env python
"""
A simple script for making latex author lists from the csv file produced by
the DES Publication Database.
Some usage notes:
(1) By default, the script does not tier or sort the author list. The '--sort' option does not respect tiers.
(2) An exact match is required to group affiliations. This... |
"""
catfuncs.py
A library containing functions that are useful for working with catalogs
of objects. These will primarily be produced by SExtractor, but do not
necessarily have to.
"""
import numpy as n
import pyfits as pf
import imfuncs as imf
from matplotlib import pyplot as plt
from math import pi
from astrom_si... |
#----------------------------------------------------------------------
# Copyright (c) 2013 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including witho... |
"""
Load (or update) data from upstream or execute CTAS or add views to Redshift.
A "load" refers to the wholesale replacement of any schema or table involved.
An "update" refers to the gentle replacement of tables.
There are three possibilities:
(1) "Tables" that have upstream sources must have CSV files and a ma... |
"""
This is the "load and transform" part of our ELT.
There are three options for accomplishing this:
(1) a "load" command will start building the data warehouse from scratch (usually, after backing up).
(2) an "upgrade" command will try to load new data and changed relations (without any back up).
(3) an "update" co... |
from __future__ import division
import collections
import math
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pdb
from ColumnsTable import ColumnsTable
from columns_contain import columns_contain
import errors
from Month import Month
from Report import Report
cc = columns_contain
clas... |
# coding=utf-8
# Copyright (c) 2015-2019 Vector 35 Inc
#
# 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... |
import urllib2
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from wit import *
# --
num_features = 100 # Characters
max_len = 150 # Characters
formatter = KerasFormatter(num_features, max_len)
# --
# Load data
url = 'https://raw.githubusercontent.com/chrisalbon/vari... |
# -*- coding: utf-8 -*-
"""
@brief test log(time=33s)
"""
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder
from pyquickhelper.ipythonhelper import execute_notebook_list, execute_notebook_list_finalize_ut
from pyquickhelper.pycode import... |
# Foremast - Pipeline Tooling
#
# Copyright 2016 Gogo, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
#!/usr/bin/env python2
# Copyright (C) 2013:
# Gabes Jean, naparuba@gmail.com
# Pasche Sebastien, sebastien.pasche@leshop.ch
#
# 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... |
#:coding=utf-8:
from django.test import TestCase as DjangoTestCase
from django.utils import unittest
from django.utils.encoding import force_text
from django import forms
from jsonfield.tests.jsonfield_test_app.models import *
from jsonfield.fields import JSONField
class JSONFieldTest(DjangoTestCase):
def test_js... |
#!/usr/bin/env python
import sys, os
from datetime import datetime
import argparse
import config
if __name__ == '__main__':
# Namibia Pilot Tiles
namibia_tiles = [
"AF/s20e015",
"AF/s20e020",
"AF/s20e025",
"AF/s25e015",
"AF/s25e020",
"AF/s25e025"
]
# Haiti Pilot Tiles
haiti_tiles = [
"CA/n15w070",
"CA/... |
# Generated by Django 2.2.10 on 2021-09-09 21:06
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('accelerator', '0072_partnerjudgeapplicationassignment'),
]
operations = [
... |
# Copyright 2019-20 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import itertools
import operator
from odoo import models
class JournalLedgerReport(models.AbstractModel):
_name = "report.account_financial_report.journal_ledger"
_description... |
"""Tests for TLS/SSL support."""
# -*- coding: utf-8 -*-
# vim: set fileencoding=utf-8 :
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import functools
import ssl
import sys
import threading
import time
import OpenSSL.SSL
import pytest
import requests
import six
import trustme... |
import struct
import time
import cherrypy
def decode(encoding=None, default_encoding='utf-8'):
"""Decode cherrypy.request.params from str to unicode objects."""
if not encoding:
ct = cherrypy.request.headers.elements("Content-Type")
if ct:
ct = ct[0]
encoding = ct.para... |
"""Extensions to unittest for web frameworks.
Use the WebCase.getPage method to request a page from your HTTP server.
Framework Integration
=====================
If you have control over your server process, you can handle errors
in the server-side of the HTTP conversation a bit better. You must run
both the client ... |
#!/usr/bin/python
from __future__ import unicode_literals
import re
from datetime import datetime
import time
import requests
from pytvmaze import endpoints
from pytvmaze.exceptions import *
class Show(object):
def __init__(self, data):
self.status = data.get('status')
self.rating = data.get('rat... |
from typing import Tuple
import numpy as np
import scipy.integrate as integrate
from chromathicity.chromadapt import (
ChromaticAdaptationAlgorithm,
get_default_chromatic_adaptation_algorithm)
from chromathicity.illuminant import Illuminant, get_default_illuminant
from chromathicity.rgbspec import (RgbSpecific... |
"""Leetcode 108. Convert Sorted Array to Binary Search Tree
Easy
URL: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/
Given an array where elements are sorted in ascending order,
convert it to a height balanced BST.
For this problem, a height-balanced binary tree is defined as a binary tree... |
import argparse
import collections
import datetime
import json
import logging
import math
import urllib
from sqlalchemy import Boolean
from sqlalchemy import Column
from sqlalchemy import DateTime
from sqlalchemy import ForeignKey
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy.dialects.my... |
#
# $Id$
# ---------------------------------------------------------------------------
"""
Introduction
============
The ``pyutmp`` module provides a Python-oriented interface to the *utmp*
file on Unix-like operating systems. To paraphrase the *Linux Programmer's
Manual* page *utmp*\ (5), the *utmp* file allows one ... |
''' pcap_graph worker '''
import zerorpc
import os
import pprint
import gevent
def gsleep():
''' Convenience method for gevent.sleep '''
print '*** Gevent Sleep ***'
gevent.sleep(0)
class PcapGraph(object):
''' This worker generates a graph from a PCAP (depends on Bro) '''
dependencies = ['pcap_br... |
from typing import Tuple
import numpy as np
import scipy.integrate as integrate
from chromathicity.chromadapt import (
ChromaticAdaptationAlgorithm,
get_default_chromatic_adaptation_algorithm)
from chromathicity.illuminant import Illuminant, get_default_illuminant
from chromathicity.rgbspec import (RgbSpecific... |
# coding: utf-8
import os, subprocess
import gitlab
import logging
from webhookerror import WebhookError
'''
Class: PandocParser
description: realizar a conversão do artigo para PDF
author: Adriano dos Santos Vieira <adriano.vieira@dataprev.gov.br>
character encoding: UTF-8
raising Exception: evite propagar uma "Excep... |
"""Primary container for radio interferometer datasets."""
from astropy import constants as const
from astropy.time import Time
import os
import numpy as np
import warnings
import aipy as a
import ephem
from uvbase import UVBase
import parameter as uvp
import telescopes as uvtel
import utils as uvutils
class UVData(U... |
import os
import asyncio
from functools import partial
from astropy import units as u
from astropy.time import Time
from ..utils import error, listify
from ..utils.images import solve_field, solve_offset
from collections import OrderedDict
class PanStateLogic(object):
""" The enter and exit logic for each st... |
"""
Objects for interfacing with the Wink API
"""
import logging
import json
import time
import requests
BASE_URL = "https://winkapi.quirky.com"
HEADERS = {}
class WinkDevice(object):
@staticmethod
def factory(device_state_as_json):
if "light_bulb_id" in device_state_as_json:
return Win... |
from django.db import models
# Game definitions
"""
ATTRIBUTES:
Strength Vitality
Dexterity Charisma
Intelligence Wisdom
"""
"""
ELEMENTS:
Physical Spell
Shadow Arcane
Lightning Poison
Fire Ice
Psychic Chaos
"""
"""
SLOTS:
Head
Neck
Ch... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Shoichi Sakane <sakane@tanu.org>, All rights reserved.
# See the file LICENSE in the top level directory for more details.
#
from __future__ import print_function
import sys
import argparse
import traceback
import json
from tiny_http_server import ... |
import os
import sys
import socket
from threading import Thread, Lock
import logging
import resource
from papa.utils import Error, cast_bytes, cast_string
from papa.server import papa_socket, values, proc
import atexit
__author__ = 'Scott Maxwell'
try:
from argparse import ArgumentParser
except ImportError:
f... |
# -*- coding: utf-8 -*-
# pylint: disable=R0904
"""
zotero.py
Created by Stephan Hügel on 2011-02-28
This file is part of Pyzotero.
The MIT License (MIT)
Copyright (c) 2015 Stephan Hügel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files... |
import copy
import operator
import random
import characterclass
from mixins import BasicAttributesMixin, AppearenceMixin, AscendingAcMixin, HitDiceMixin, PsionicWildTalentMixin
from dice import d, xdy
def _is_halfling(INT, CON, DEX, STR):
return STR > 11 and DEX >= 9 and CON >= 9, characterclass.HALFLING
def _i... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Shoichi Sakane <sakane@tanu.org>, All rights reserved.
# See the file LICENSE in the top level directory for more details.
#
from __future__ import print_function
from tiny_http_server import *
'''
- Chunk handling referred to "4.1. Chunked Transf... |
# pylint: disable=R0904
"""
zotero.py
Created by Stephan Hügel on 2011-02-28
This file is part of Pyzotero.
The MIT License (MIT)
Copyright (c) 2015 Stephan Hügel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to de... |
from __future__ import division
# -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ---------------... |
"""
Pywikipedia bot, which automatically fixes various errors from WikiProject
CheckWiki. Full list of errors see in ENABLED_ERRORS constant.
Written in python 3.5, compatibility with older versions doesn't tested.
Adapted for ruwiki. Do not use this bot on other wikis!
Using as script:
python checkwiki.py ... |
import collections
import dbm
import http.client
import io
import logging; log = logging.getLogger('qmsk.e2.presets')
import os
import os.path
import tarfile
import urllib.request
from xml.etree import ElementTree
class Error(Exception):
pass
class XMLError(Error):
pass
def parse_xml_aux_dest (xml):
"""... |
from batch.client import Job
from batch_helper import short_str_build_job
from ci_logging import log
from constants import VERSION, DEPLOY_JOB_TYPE
from environment import \
PR_DEPLOY_SCRIPT, \
batch_client, \
SELF_HOSTNAME
from git_state import FQRef, FQSHA, Repo
from github import latest_sha_for_ref
from ... |
#! coding=utf8
from flask import Flask, request, session, g, redirect, url_for, abort, \
render_template, flash, jsonify, json
from mongo_single import Mongo
import time
import os
import traceback
from functions import get_project_list, md5
from helper import GlobalHelper
from spider_for_test import test_run
from b... |
# -*- coding: utf8 - *-
"""Cihai dataset for `Unihan`_, Han Unification from Unicode, Inc.
cihai.datasets.unihan
~~~~~~~~~~~~~~~~~~~~~
"""
from __future__ import absolute_import, division, print_function, \
with_statement, unicode_literals
import os
import sys
import glob
import hashlib
import fileinput
import ... |
#web_status.py
#This is a small python file that will get the web status of a site (in this case http://www.raspberrypi.org/)
#and relay that to the user through the awesome PiGlow by Pimoroni,
#using the bulit-in module "urllib" as well as an external one - "piglow" created by Boeeerb.
#james12802
#0 = not tested =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.