gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
"""
Shared Folder Rules:
* All Permissions are handle at folder level
* Listing Bookmarks and Folder Bookmarks inheritance Permissions from the folder it is part of.
* Folder Bookmark are the only Bookmark Entries that have Bookmark Permissions
* Root Folders can never been public, users will be able to... | |
"""Support for Sensibo wifi-enabled home thermostats."""
import asyncio
import logging
import aiohttp
import async_timeout
import pysensibo
import voluptuous as vol
from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity
from homeassistant.components.climate.const import (
HVAC_MODE_COOL,
... | |
#!/usr/bin/env python
# Written by Bram Cohen
# modified for multitracker by John Hoffman
# see LICENSE.txt for license information
from BitTornado import PSYCO
if PSYCO.psyco:
try:
import psyco
assert psyco.__version__ >= 0x010100f0
psyco.full()
except:
pass
from sys import a... | |
"""
kombu.entity
================
Exchange and Queue declarations.
"""
from __future__ import absolute_import
from .abstract import MaybeChannelBound
TRANSIENT_DELIVERY_MODE = 1
PERSISTENT_DELIVERY_MODE = 2
DELIVERY_MODES = {'transient': TRANSIENT_DELIVERY_MODE,
'persistent': PERSISTENT_DELIVERY_M... | |
#!/usr/bin/env python
from numpy import *
from numpy import f2py # not part of import *
from scitools.StringFunction import StringFunction
import time, sys, os
# make sys.path so we can find Grid2D.py:
sys.path.insert(0, os.path.join(os.environ['scripting'],
'src','py','examples'))
fro... | |
"""
Renderer Module
This module defines the PlotlyRenderer class and a single function,
fig_to_plotly, which is intended to be the main way that user's will interact
with the matplotlylib package.
"""
from __future__ import absolute_import
import six
import warnings
import plotly.graph_objs as go
from plotly.matplo... | |
# -*- coding: utf-8 -*-
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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 t... | |
from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
from unittest import skipIf
from xml.dom.minidom import parseString
from django.core import serializers
from django.core.urlresolvers import reverse
from django.db.models import Max, Min
from django.http import HttpRequest
fr... | |
#!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | |
#!/usr/bin/python
#####
# tries predicting tree cover in coto brus
#####
import gdal
import scipy
import numpy as np
from sklearn import tree
from sklearn import ensemble
from sklearn import linear_model
from sklearn import svm
from sklearn import metrics
from sklearn import preprocessing
from sklearn.model_selection ... | |
import math
import sys
import numpy
import scipy.stats
import Likelihood
import cellDetect
try:
import astropy.io.fits as pyfits
except:
import pyfits
import logging
log = logging.getLogger("main")
class FixedBinSearch(object):
def __init__(self, X, Y, t, timebin, eventfile, expomap, hwu, region=... | |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | |
# -*- coding: utf-8 -*-
from unittest import TestCase
from jsonschema import RefResolver
from mock import patch, Mock
from pluct.resource import Resource, ObjectResource, ArrayResource
from pluct.session import Session
from pluct.schema import Schema
class BaseTestCase(TestCase):
def setUp(self):
self.... | |
# Copyright 2012 10gen, 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... | |
"""
Base class for optimization.
"""
from abc import ABCMeta, abstractmethod
from collections import namedtuple
from copy import deepcopy
from functools import reduce
from string import ascii_letters, digits
from types import MethodType
from boltons.iterutils import pairwise
import numpy as np
from scipy.optimi... | |
"""Represent the main entry point for the pipeline tool."""
# Copyright (c) 2017 Thomas Lehmann
#
# 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 limita... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 Citrix Systems, 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/L... | |
"""Controller interfaces with the Alarm.com API via pyalarmdotcomajax."""
from __future__ import annotations
import asyncio
from datetime import timedelta
import logging
import aiohttp
import async_timeout
from homeassistant.components import persistent_notification
from homeassistant.config_entries import ConfigEnt... | |
# 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
# d... | |
import pygame, random, sys, copy
from pygame.locals import *
from collections import deque
# initialize pygame
pygame.init()
gameClock = pygame.time.Clock()
# set up main window
WINDOWWIDTH = 300
WINDOWHEIGHT = 300
windowSurface = pygame.display.set_mode((WINDOWWIDTH, WINDOWHEIGHT), 0, 32)
pygame.display.set_caption(... | |
#! /usr/bin/env python3
"""
Counterparty setup script - works under Ubuntu Linux and Windows at the present moment
"""
import os
import sys
import getopt
import logging
import shutil
import zipfile
import platform
import tempfile
import subprocess
import stat
import string
import random
import tarfile
import urllib
imp... | |
import os
from datetime import datetime
import pytz
from tempfile import NamedTemporaryFile
from uuid import uuid4
from urllib.parse import urlencode
from django.utils.deconstruct import deconstructible
from django.conf import settings
from django.core.files.storage import Storage
from django.core.urlresolvers import... | |
# Copyright 2013: Mirantis Inc.
# 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 required b... | |
# -*- coding: utf-8 -*-
"""
Django settings for on_admin project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
from __future__ import absolute_import, unicode_li... | |
import os
import sys
import copy
import Common
import KernelParameters
import AutoGemmParameters
import argparse
##############################################################################
# Make OpenCL Kernel String
##############################################################################
def makeOpenCLKerne... | |
from copy import deepcopy
from typing import List, Callable, Mapping, Union, Optional
import numpy as np
import pandas as pd
from joblib import Parallel, delayed
from sklearn.base import RegressorMixin, BaseEstimator
from bartpy.data import Data
from bartpy.initializers.initializer import Initializer
from bartpy.init... | |
#!/usr/bin/env python
import os
import logging
import mango.unittest
import scipy as sp
import numpy as np
import mango
import mango.data
import mango.optimize
import mango.mpi as mpi
from mango.application.cylinder_fit import *
logger, rootLogger = mpi.getLoggers(__name__)
if (mango.haveRestricted):
class Cylind... | |
#!/usr/bin/env python3
'''
Icinga (Nagios) plugin that checks the total amount of current, concurrent
sessions on a Cisco ASA and evaluates them against 'warning' and 'critical' value
thresholds.
'''
__version__ = 'v0.2'
__author__ = '[email protected]'
import sys
import argparse
import subprocess
def ok(msg):
p... | |
from django.conf import settings
from nose.tools import eq_
from pyquery import PyQuery as pq
from tidings.models import Watch
from kitsune.flagit.models import FlaggedObject
from kitsune.kbadge.tests import AwardFactory, BadgeFactory
from kitsune.questions.events import QuestionReplyEvent
from kitsune.questions.tests... | |
import argparse
import os
import shutil
import nltk
from collections import defaultdict
from tqdm import tqdm
import gc
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.utils.data.dataloader import DataLoader
from dpp_nets.utils.language import Vocabulary, BeerDataset, simple_collate,... | |
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | |
# -*- coding: utf8 -*-
import io
import os
import shutil
def split_url_path(path):
"""
Separates URL path to repository name and path.
# Parameters
path (str): The path from URL.
# Return
tuple (str, str): The repository name and the path to be listed.
"""
separator = '/'
parts = path.split(sepa... | |
"""Unit tests for top_k_accuracy.py
Written by Grant Van Horn.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import random
import unittest
import numpy as np
import top_k_accuracy
def make_accuracy_data(num_classes, num_test_samples, num_... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of pyCMBS.
(c) 2012- Alexander Loew
For COPYING and LICENSE details, please refer to the LICENSE file
"""
import matplotlib as mpl
mpl.rcParams['backend'] = 'Agg'
from pycmbs.data import Data
import matplotlib.pyplot as plt
import sys
import os
impo... | |
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import io
import json
import pytest
import requests
from functools import partial
from tableschema import Field, exceptions
# Constants
DESCRIP... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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 ob... | |
#
# The Python Imaging Library.
# $Id$
#
# JPEG (JFIF) file handling
#
# See "Digital Compression and Coding of Continous-Tone Still Images,
# Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1)
#
# History:
# 1995-09-09 fl Created
# 1995-09-13 fl Added full parser
# 1996-03-25 fl Added hack to use th... | |
import imp
import importlib
import os
import os.path
import shutil
import sys
from test import support
from test.test_importlib import util
import unittest
import warnings
class LockTests(unittest.TestCase):
"""Very basic test of import lock functions."""
def verify_lock_state(self, expected):
self.a... | |
import pytest
from mne import open_docs, grade_to_tris
from mne.epochs import add_channels_epochs
from mne.utils import (copy_function_doc_to_method_doc, copy_doc,
linkcode_resolve, deprecated, deprecated_alias)
import webbrowser
@pytest.mark.parametrize('obj', (grade_to_tris, add_channels_epo... | |
import sip
sip.setapi('QVariant', 2)
import os
import traceback
from blocks.WorkspaceController import WorkspaceController
from generators.PythonGen import PythonGen
from PyQt4 import QtGui,QtCore, uic
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QDockWidget
class MainWnd(QtGui.QMainWindow):
instance =... | |
import socket
from typing import Any, BinaryIO, Dict, Iterable, List, Optional, Tuple, Union
__version__ = '2.0.0'
Address = Union[Tuple[str, int], str]
Body = Union[bytes, str]
Stats = Dict[str, Union[str, int]]
DEFAULT_TUBE = 'default'
DEFAULT_PRIORITY = 2**16
DEFAULT_DELAY = 0
DEFAULT_TTR = 60
class Job:
""... | |
# -*- mode: python; coding: utf-8 -*-
# Copyright 2017 the HERA Collaboration
# Licensed under the 2-clause BSD license.
"""Handling quality metrics of HERA data."""
from astropy.time import Time
from math import floor
from sqlalchemy import (Column, Integer, BigInteger, Float, ForeignKey,
Str... | |
__author__ = 'isparks'
from lxml import etree
MEDI_NS = '{http://www.mdsol.com/ns/odm/metadata}'
ODM_NS = '{http://www.cdisc.org/ns/odm/v1.3}'
XLINK_NS = '{http://www.w3.org/1999/xlink}'
def getEnvironmentFromNameAndProtocol(studyname, protocolname):
"""Extract environment name using studyname and protocolname ... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2019 TurboCoin
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP68 implementation."""
import time
from test_framework.blocktools import create_block, create_coinbase, add_witn... | |
"""
promise: bytecode optimisation using staticness assertions.
This is a module for applying some simple optimisations to function bytecode.
By promising that a function doesn't do certain things at run-time, it's
possible to apply optimisations that are not legal in the general case.
As a simple example, it's p... | |
# Copyright 2015 One Zero Capital
#
# 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 i... | |
#!/usr/bin/env python
# Copyright 2015 Dell 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 appl... | |
# -*- coding: utf-8 -*-
from time import time, mktime
from datetime import datetime, timedelta
from retrying import retry
from iso8601 import parse_date
from socket import setdefaulttimeout
from openprocurement.search.source import BaseSource, TendersClient
from openprocurement.search.utils import restkit_error
from ... | |
"""
XML serializer.
"""
from collections import OrderedDict
from xml.dom import pulldom
from xml.sax import handler
from xml.sax.expatreader import ExpatParser as _ExpatParser
from django.apps import apps
from django.conf import settings
from django.core.serializers import base
from django.db import DEFAULT_DB_ALIAS,... | |
import math
import sys
import types
import fishlib
import cli
import flags
if sys.version_info < (2, 6):
try:
import simplejson as json
except ImportError:
from django.utils import simplejson as json
else:
import json
class PermissionsError(Exception):
pass
class WisdomFailure(Excep... | |
# -*- coding: utf-8 -*-
import sys
from prody import *
import traceback
__name__ = "Models"
class Serializer():
def to_json(self,o):
return str(self)
class Journal(Serializer):
def __init__(self):
self.publisher = ""
self.reference = ""
self.title = ""
self.issn... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
These tests assume that the quickstart database exists.
To create it run /opt/nuodb/run-quickstart or use the web console.
"""
import unittest
import decimal
from .nuodb_base import NuoBase
class NuoDBStatementManagementTest(NuoBase):
def test_stable_statement... | |
# Word2Vec: Skipgram Model
#---------------------------------------
#
# In this example, we will download and preprocess the movie
# review data.
#
# From this data set we will compute/fit the skipgram model of
# the Word2Vec Algorithm
#
# Skipgram: based on predicting the surrounding words from the
# Ex sentence "t... | |
"""
<Program Name>
test_signercli.py
<Author>
Konstantin Andrianov
<Started>
September 20, 2012
<Copyright>
See LICENSE for licensing information.
<Purpose>
test_signercli.py provides collection of methods that tries to test all the
units (methods) of the module under test.
unittest_toolbox module wa... | |
from typing import Dict, List, Optional, Sequence, Iterable
import itertools
import logging
import warnings
from allennlp.common.checks import ConfigurationError
from allennlp.common.file_utils import cached_path
from allennlp.data.dataset_readers.dataset_reader import DatasetReader, PathOrStr
from allennlp.data.data... | |
"""
Machine arithmetics - determine the parameters of the
floating-point arithmetic system
Author: Pearu Peterson, September 2003
"""
from __future__ import division, absolute_import, print_function
__all__ = ['MachAr']
from numpy.core.fromnumeric import any
from numpy.core.numeric import errstate
# Need to speed... | |
# version code ef5291f09f60+
# pass = ZzBcTmfdMK
coursera = 1
# Please fill out this stencil and submit using the provided submission script.
## 1: (Task 1) Minutes in a Week
minutes_in_week = 7*24*60
## 2: (Task 2) Remainder
#For this task, your expression must use //
remainder_without_mod = 2304811 // 47
#... | |
import os
import subprocess
from scripts.lib.zulip_tools import run, ENDC, WARNING
from scripts.lib.hash_reqs import expand_reqs
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
VENV_CACHE_PATH = "/srv/zulip-venv-cache"
if 'TRAVIS' in os.environ:
# In Travis CI, we don't ... | |
from math import *
# function [alpha, xmin, L]=plfit(x, varargin)
# PLFIT fits a power-law distributional model to data.
# Source: http://www.santafe.edu/~aaronc/powerlaws/
#
# PLFIT(x) estimates x_min and alpha according to the goodness-of-fit
# based method described in Clauset, Shalizi, Newman (2007). x i... | |
# -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | |
from __future__ import absolute_import, unicode_literals
import warnings
from django.conf import settings
from django.utils.importlib import import_module
from django.utils import six
# Always import this module as follows:
# from debug_toolbar import settings [as dt_settings]
# Don't import directly CONFIG or PAN... | |
from binascii import unhexlify
from time import time
from django import forms
from django.conf import settings
from django.forms import Form, ModelForm
from django.utils.translation import gettext_lazy as _
from django_otp.forms import OTPAuthenticationFormMixin
from django_otp.oath import totp
from django_otp.plugins... | |
##########################################################################
#
# Copyright (c) 2016, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | |
import numpy as np
import re
import os
from pathlib import Path
def get_spill(text):
"""
Extracts spillover matrix from FCS text entry.
:param text: Text value from the $SPILL or $SPILLOVER metadata keyword in an FCS file
:return: A tuple containing: (spillover matrix new_spill, column headers)
"... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
# Copyright 2017 The TensorFlow 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 required by applica... | |
from django.shortcuts import render, get_object_or_404
from django.http import Http404
from django.utils import timezone
from django.db.models import Avg, Max, Min
from myfavteam.models import Team, News, Stadium, Tournament, Schedule, Position
from myfavteam.models import Player, PlayerNews, TournamentTeam, TeamPictur... | |
"""
A Weld wrapper for pandas.DataFrame.
"""
import numpy as np
import pandas as pd
import weld.encoders.numpy as wenp
import weld.grizzly.weld.ops as weldops
from weld.lazy import WeldLazy, identity
from weld.grizzly.core.forwarding import Forwarding
from weld.grizzly.core.generic import GrizzlyBase
from weld.griz... | |
import _pyio as _original_pyio
import errno
import os as _original_os
import socket as _original_socket
from io import (
BufferedRandom as _OriginalBufferedRandom,
BufferedReader as _OriginalBufferedReader,
BufferedWriter as _OriginalBufferedWriter,
DEFAULT_BUFFER_SIZE,
TextIOWrapper as _OriginalTex... | |
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import connection
from django.db.models import Prefetch
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import six
from .models import (Author, Book, Rea... | |
#!/usr/bin/env/python
"""
add_sponsors.py -- From a data file consisting of sponsors of
research, update sponsors and add sponsors
Version 0.1 MC 2014-03-10
-- Working as expected
Version 0.2 MC 2014-03-16
-- Added abbreviations, shortcuts
Version 0.3 MC 2014-03-27
-- Handle lang tag... | |
import logging
import bisect
import itertools as iter
import h5py
import numpy
import scipy
import csv
import pdb
import itertools
from operator import itemgetter
from abc import ABCMeta, abstractmethod, abstractproperty
log = logging.getLogger(__name__)
def _get_dtype_from_format(format):
dtype = 'int8'
if for... | |
"""
Generic command module. Pretty much every command should go here for
now.
"""
import time
from django.conf import settings
from src.server.sessionhandler import SESSIONS
from src.utils import utils, search
from src.objects.models import ObjectNick as Nick
from src.commands.default.muxcommand import MuxCommand, MuxC... | |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Tract.B08301_001E'
db.add_column('census_tract', 'B08301_001E',
self.g... | |
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
from astropy.cosmology import w0waCDM
def _hacccosmologydict(haccinputdict ) :
cosmologyvariables = ['HUBBLE', 'OMEGA_CDM','DEUT','OMEGA_NU' ,'W_DE','WA_DE', 'SS8', 'NS']
hacccosmologydict = {}
for key in haccinputdict :
if key in cosmo... | |
# @MUNTJAC_COPYRIGHT@
# @MUNTJAC_LICENSE@
"""Defines a text editor component."""
from warnings import warn
from muntjac.ui.abstract_text_field import AbstractTextField
from muntjac.data.property import IProperty
class TextField(AbstractTextField):
"""A text editor component that can be bound to any bindable IP... | |
import nrrd
import json
import numpy as np
import pickle
import os
import scipy.stats as stats
from scipy.optimize import fsolve
from scipy.special import iv
from scipy.special import factorial2, factorial
from scipy.special import hyp1f1
import matplotlib.pyplot as plt
def rician_eqn(p, measured_mean, measured_var... | |
# Copyright 2016 The TensorFlow 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 required by applica... | |
#!/usr/bin/env python
"""This module has unit tests for the pvl __init__ functions."""
# Copyright 2019, Ross A. Beyer ([email protected])
#
# 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
#
# ... | |
# -*- coding: utf-8 -*-
## Author : [email protected]
## This code for T110, ELT CO2 sensor
## Please see details for the CO2 sensor data sheet : http://eltsensor.co.kr/2012/eng/pdf/T-110/DS_T-110-3V_ver1.210.pdf
import serial,os,time
import sys
import RPi.GPIO as GPIO
import logging
import logging.handlers ... | |
from flask import render_template, redirect, url_for, abort, flash, request,\
current_app, make_response
from flask_login import login_required, current_user
from flask_sqlalchemy import get_debug_queries
from . import main
from .forms import EditProfileForm, EditProfileAdminForm, PostForm,\
CommentForm
from ..... | |
# /test/test_acceptance.py
#
# Test case for psqtraviscontainer/create.py, creating proot containers
#
# See /LICENCE.md for Copyright information
"""Test case for psqtraviscontainer/create.py, creating proot containers."""
import os
import platform
import stat
import sys
import tempfile
from collections import n... | |
#
# This file is part of pyasn1-modules software.
#
# Created by Russ Housley with assistance from asn1ate v.0.6.0.
# Modified by Russ Housley to add a map for use with opentypes.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
# Enhanced Security Services for S/MIME
#
#... | |
# -*- coding: utf-8 -*-
"""helper functions that are used both in rtfits and rtplots"""
from itertools import tee, islice
from collections import OrderedDict
try:
import numpy as np
except ModuleNotFoundError:
pass
def rectangularize(array, return_mask=False, dim=None, return_masked=False, dtype=None):
"... | |
# encoding: utf-8
import os
import re
import urllib
import urllib2
import uuid
import logging
import hashlib
import tempfile
import locale
import ConfigParser
import mimetypes
import contextlib
from datetime import datetime
from urlparse import urlparse, urljoin
import json
import ccnet
from constance import config
im... | |
from collections import deque, OrderedDict
from django.conf import settings
from elasticsearch_dsl import Document, Date, Integer, Keyword, Text, Search, Index, Boolean, Completion, \
SearchAsYouType, normalizer, analyzer
from elasticsearch_dsl.connections import connections
from tqdm import tqdm
from elasticsearc... | |
# -*- coding: utf-8 -*-
'''
Parser for multipart/form-data
==============================
This module provides a parser for the multipart/form-data format. It can read
from a file, a socket or a WSGI environment. The parser can be used to replace
cgi.FieldStorage (without the bugs) and works with Python 2.5+ and 3.x (... | |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'EnginePatch'
db.create_table(u'physical_enginepatch', (
... | |
import os
import sys
import time
import yaml
import copy
import random
import string
import logging
import subprocess
from importlib import import_module
from logging.handlers import RotatingFileHandler, TimedRotatingFileHandler
POSIX = os.name != 'nt'
TMP_SHELL_FILE_PREFIX = '/tmp/__rdb_backup_'
log = logging.getLog... | |
# -*- coding: utf-8 -*-
"""
pygments.lexers.math
~~~~~~~~~~~~~~~~~~~~
Lexers for math languages.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, bygroups, include, \
combine... | |
# Copyright 2016 EMC Corporation
import time
from vmax_smis_base import VmaxSmisBase, get_ecom_int
THINPROVISIONINGCOMPOSITE = 32768
THINPROVISIONING = 5
class VmaxSmisDevices(object):
def __init__(self, **kwargs):
self.devices_refresh = False
self.devices = None
self.interval = 180
... | |
# Copyright 2017 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/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Flavien Chantelot (@Dorn-)
# Copyright: (c) 2018, Antoine Levy-Lambert (@antoinell)
# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <[email protected]>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
... | |
# -*- coding: utf-8 -*-
"""Base for drivers
:copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from pykern import pkconfig, pkio, pkinspect, pkcollections, pkconfig, pkjson
from pykern.pkcollections import PKDict
from pykern.pkdebug import ... | |
#
# Copyright (c) SAS Institute 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 w... | |
<<<<<<< HEAD
<<<<<<< HEAD
"""
Generic framework path manipulation
"""
import re
__all__ = ['framework_info']
STRICT_FRAMEWORK_RE = re.compile(r"""(?x)
(?P<location>^.*)(?:^|/)
(?P<name>
(?P<shortname>\w+).framework/
(?:Versions/(?P<version>[^/]+)/)?
(?P=shortname)
(?:_(?P<suffix>[^_]+))?
)$
""")
def... | |
"""
mainpred.py
This file is the main code for running the prediction algorithms for OpenAPS.
The OpenAPS data must be in a subdirectory called "data" with a subdirectory of
the ID number that contains the devicestatus.json file. For example:
./data/01234567/devicestatus.json
where . represents the current dir... | |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import page_sets
import re
from measurements import timeline_controller
from metrics import speedindex
from telemetry import benchmark
fr... | |
# Copyright 2015 Yahoo 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, softw... | |
"""
Functions
---------
.. autosummary::
:toctree: generated/
fmin_l_bfgs_b
"""
## License for the Python wrapper
## ==============================
## Copyright (c) 2004 David M. Cooke <[email protected]>
## Permission is hereby granted, free of charge, to any person obtaining a
## copy of this so... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.