gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# #groceryDatabase.py: Data base for purchased grocerys # import os import time import datetime import configparser class attribute: """ An attribute Parameters ---------- name : string Attribute name. The names of attributes must be unique. value : float Value of the att...
import math from qrcode import base, exceptions # QR encoding modes. MODE_NUMBER = 1 << 0 MODE_ALPHA_NUM = 1 << 1 MODE_8BIT_BYTE = 1 << 2 MODE_KANJI = 1 << 3 # Encoding mode sizes. MODE_SIZE_SMALL = { MODE_NUMBER: 10, MODE_ALPHA_NUM: 9, MODE_8BIT_BYTE: 8, MODE_KANJI: 8, } MODE_SIZE_MEDIUM = { MOD...
import os, sys sys.path.append(os.getcwd()) import time import functools import numpy as np import tensorflow as tf import tflib as lib import tflib.ops.linear import tflib.ops.conv2d import tflib.ops.batchnorm import tflib.ops.deconv2d import tflib.save_images import tflib.data_loader import tflib.ops.layernorm imp...
#!/usr/bin/env python import sys, os, platform, xml, re, tempfile, glob, datetime, getpass, shutil from optparse import OptionParser from subprocess import Popen, PIPE hostos = os.name # 'nt', 'posix' hostmachine = platform.machine() # 'x86', 'AMD64', 'x86_64' errorCode = 0 SIMD_DETECTION_PROGRAM=""" #if __SSE5__ #...
# coding: utf-8 from __future__ import unicode_literals import unittest from pymatgen import Composition from pymatgen.analysis.reaction_calculator import Reaction, BalancedReaction, \ ReactionError, ComputedReaction from pymatgen.entries.computed_entries import ComputedEntry class ReactionTest(unittest.TestCa...
""" <Program> ut_nodestatetransitions_test_onepercentmanyevents_to_canonical.py <Purpose> Test the backend process transition_onepercentmanyevents_to_canonical.py. This is done in three steps. First we test the process of moving nodes from the onepercentmanyevents state to the movingto_canonical state, then ...
# -*- coding: utf-8 -*- """ Internet Relay Chat (IRC) asyncio-based protocol client library. This an extension of the IRC client framework in irc.client that replaces original select-based event loop with one that uses Python 3's native asyncio event loop. This implementation shares many of the features of its selec...
from __future__ import unicode_literals import datetime import logging import os import sqlite3 import sys from mopidy import backend from mopidy.exceptions import ExtensionError from mopidy.models import Album, Artist, Ref, SearchResult, Track from uritools import uricompose, uriencode, urisplit logger = logging.g...
# 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...
"""Support for Netatmo Smart thermostats.""" import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA from homeassistant.components.climate.const import ( STATE_HEAT, SUPP...
# # 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 # "License"); you may not...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os from pant...
# 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...
import pytoml from JumpScale9 import j mascot = ''' .,,' 'c.cool,..',,,,,,,. 'dxocol:l:;,'......';:,. .lodoclcccc,.....
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 NEC Corporation. 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.or...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# # deeptrees.py: routines that create specific test scenarios # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more...
import os import re import datetime import json import jsonfield import shutil import logging import importlib import settings from collections import OrderedDict from tempfile import mkdtemp from django.db import models from django.db.models.base import ModelBase from django.db.models.fields import DateTimeField, Date...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """A page model for LHN""" from lib import base from lib.constants import locator from lib.element import lhn from lib.page import modal class _Programs(lhn.AccordionGroup): """Programs dropdown in LHN"...
# 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 # "License"); you may not u...
## A script for finding every cox coefficient and pvalue for every mRNA in LIHC Tier 3 data downloaded Jan. 5th, 2016 ##load necessary modules from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##...
########################################################################### # Data model # # This is a transitional AST structure; it defines an object model that # is structured like C++, but outputs Python. At the top of the tree is # a Module definition. ##############################################################...
# Copyright 2011 OpenStack Foundation # 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 requ...
import requests import os import sys import re import subprocess from jinja2 import Environment, meta, Template import shutil from getpass import getpass from random import randint from distutils import spawn #import time def execute(command): process = subprocess.Popen( command, stdout=subprocess.PIPE, ...
from django.test import TestCase from django import template from django.contrib.auth.models import User, Group, Permission from django.core.urlresolvers import reverse from django.core.files.uploadedfile import SimpleUploadedFile from wagtail.tests.utils import unittest, WagtailTestUtils from wagtail.wagtailimages.mo...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- coding: utf-8 -*- from io import BytesIO import qrcode from flask import Blueprint from flask import jsonify from flask import request from flask import Response from jsonschema import validate from jsonschema import ValidationError from adjure.lib import auth auth_page = Blueprint('auth', __name__) def user...
# -*- coding: utf-8 -*- # Copyright (c) 2013 Daniel Prokscha # # 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, mo...
# -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Erkan Ozgur Yilmaz # # This module is part of oyProjectManager and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause import os import re import jinja2 from sqlalchemy import Column, Integer, Boolean, String, Float, ForeignKey from...
# -*- coding: utf-8 -*- from __future__ import print_function import ipywidgets as w import sys import re import os import fcntl import collections import signal import threading import subprocess import select import time import shutil from queue import Queue from joblib import Memory import uuid import glob color_re...
# Copyright (c) 2015 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 require...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import import frappe import json from email.utils import formataddr, parseaddr from frappe.utils import (get_url, get_formatted_email, cint, validate_email_add, split_e...
# -*- 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...
# Copyright 2015 Futurewei. All rights reserved. # Copyright 2017 Intel Corporation. # # 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/LICEN...
#!/bin/env python import sys import json def readJSON(path): f = open(path, 'r') jsonData = json.load(f) f.close() return jsonData def aggregate(d): nd = {} for k in d: if d[k]['name'] in nd: nd[d[k]['name']].append(d[k]['params']) else: nd[d[k]['name'...
# # # Copyright (C) 2006, 2007, 2010, 2011, 2012 Google 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: # # 1. Redistributions of source code must retain the above copyright notice, # this...
# -*- coding: utf-8 -*- from __future__ import absolute_import import numpy as np from sklearn.feature_extraction.text import HashingVectorizer, CountVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.tree import DecisionTreeClassifier from sklearn.pipeline import make_pipeline import pytest from e...
__author__ = 'Bene' import string # class to hold flow entrys class FlowTable(object): def __init__(self, switch=None, tableString=None): self.switch = switch self.tableString = tableString #holds alls entrys of a given switch self.table = [] #fill table #split ta...
# -*- coding: utf-8 -*- # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Test the commandline module.""" from __future__ import print_function import argparse import pickle import signal import ...
# # 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 "License"); you may not us...
# sqlalchemy/events.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core event interfaces.""" from . import event, exc from .pool import Pool f...
# program written by Victor Silva for CMPUT 396 fall 2018 # algorithm based on Bruengger Marzetta Fukuda Nievergelt # parallel search bench ZRAM and its apps # https://pdfs.semanticscholar.org/bb62/b77eee715f715a5e2347299f932b2fd3f29f.pdf # Ralph Udo Gasser # Harnessing Computational Resources for Efficien...
#! /usr/bin/env python3 # Copyright(c) 2017-2018 Intel Corporation. # License: MIT See LICENSE file in root directory. GREEN = '\033[1;32m' RED = '\033[1;31m' NOCOLOR = '\033[0m' YELLOW = '\033[1;33m' try: from openvino.inference_engine import IENetwork, ExecutableNetwork, IECore import openvino.inference_en...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author: Patrick Bos # @Date: 2016-11-16 16:23:55 # @Last Modified by: E. G. Patrick Bos # @Last Modified time: 2017-07-06 11:23:31 import numpy as np import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from pathlib import Path import itertool...
#!/usr/bin/python import argparse, sys, re, random, os, gzip from multiprocessing import Pool, Lock, cpu_count, Queue from subprocess import Popen, PIPE import SimulationBasics from VCFBasics import VCF from SequenceBasics import read_fasta_into_hash from TranscriptomeBasics import Transcriptome from GenePredBasics imp...
# -*- coding: utf-8 -*- """ CAP Module - Controllers """ module = request.controller resourcename = request.function if not settings.has_module(module): raise HTTP(404, body="Module disabled: %s" % module) # ----------------------------------------------------------------------------- def index(): """ M...
from cherrypy._cpcompat import BadStatusLine, ntob import os import sys import time import signal import unittest import socket import cherrypy import cherrypy.process.servers engine = cherrypy.engine thisdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) class Dependency: def __init__(self, bus): ...
import sys import cPickle as pickle import networkx as nx import string import pdb def traverse_depth_first(concept_nx_graph, parent=None): node_list = [] #list of pairs (concept_instance, concept_var_name) e.g. ('establish-01', 'e') if parent == None: parent = nx.topological_sort(concept_nx_graph)[0] node_list.a...
import copy import pickle import unittest from test import support class DictSetTest(unittest.TestCase): def test_constructors_not_callable(self): kt = type({}.keys()) self.assertRaises(TypeError, kt, {}) self.assertRaises(TypeError, kt) it = type({}.items()) self.assertRai...
# Copyright 2011 OpenStack Foundation. # 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 req...
import re from collections import namedtuple from functools import partial from random import randint from time import sleep from livestreamer.compat import urlparse, urljoin, range from livestreamer.exceptions import StreamError, PluginError, NoStreamsError from livestreamer.plugin import Plugin, PluginOptions from ...
# Copyright (c) 2015 Mirantis 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 writ...
""" Utilities for generating random numbers, random sequences, and random selections. """ # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import random import sys import networkx a...
#! /usr/bin/env python import driver import time from hokuyolx import HokuyoLX import logging import signal import npParticle as pf import numpy as np import sys from multiprocessing import Process, Queue, Value,Array import threading from flask import Flask,jsonify import requests import random import timers lvl = l...
# 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...
# Project Name: rAnPrivGP # Author: rAnYKM (Jiayi Chen) # # ___ ____ _ __________ # _____/ | ____ / __ \_____(_) __/ ____/ __ \ # / ___/ /| | / __ \/ /_/ / ___/ / | / / / __/ /_/ / # / / / ___ |/ / / / ____/ / / /| |/ / /_/ / ____/ # /_/ /_/ |_/_/ /_/_/ /_/ /_/ |___/\___...
''' @author: lalluanthoor Views in the VirtualBet application ''' ''' Public section ''' from datetime import date from django.contrib import messages from django.contrib.auth import authenticate, forms, login, logout from django.db.models import Sum from django.http import HttpResponse from django.http.response im...
# -*- test-case-name: twisted.conch.test.test_cftp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation module for the I{cftp} command. """ import os, sys, getpass, struct, tty, fcntl, stat import fnmatch, pwd, glob from twisted.conch.client import connect, default, options ...
import datetime import hashlib import json import urllib import time import collections from django import http from django.conf import settings from django.contrib.sites.models import RequestSite from django.shortcuts import get_object_or_404, redirect, render from django.core.cache import cache from django.contrib.a...
import pytest from stix2 import parse from stix2.datastore.filters import Filter, apply_common_filters from stix2.utils import STIXdatetime, parse_into_datetime stix_objs = [ { "created": "2017-01-27T13:49:53.997Z", "description": "\n\nTITLE:\n\tPoison Ivy", "id": "malware--fdd60b30-b67c-4...
""" Copyright (c) 2017, 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals, absolute_import, division from collections import namedtuple import os from tempfile import N...
import sys import math import array from .utils import ( db_to_float, ratio_to_db, register_pydub_effect, make_chunks, audioop, get_min_max_value ) from .silence import split_on_silence from .exceptions import TooManyMissingFrames, InvalidDuration if sys.version_info >= (3, 0): xrange = ran...
# -*- coding: utf-8 -*- # # Copyright 2014-2020 BigML # # 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 ...
#!/usr/bin/env python3 # Copyright 2012-2019 The Meson development team # 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...
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at valinux co jp> # # 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://...
""" Support for interacting with Snapcast clients. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.snapcast/ """ import asyncio import logging from os import path import socket import voluptuous as vol from homeassistant.components.media_pl...
import math import numpy class Simplex(object): def __init__(self,coordinates): if not len(coordinates) == 4: raise RuntimeError('You must provide only 4 coordinates!') self._coordinates = numpy.array(coordinates) def volume(self): ''' volume: Return volume of simple...
#! /usr/bin/env python """ Generate graphs from the raw Locust data captured in MongoDB. You must have installed the requirements in the util_requirements.txt file in order to successfully run this script. """ import os import sys import datetime import click import pymongo import numpy as np import itertools import...
# # 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 # "License"); you may not...
# -*- test-case-name: twisted.test.test_amp,twisted.test.test_iosim -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Utilities and helpers for simulating a network """ from __future__ import absolute_import, division, print_function import itertools try: from OpenSSL.SSL import Er...
from bz2 import BZ2File import gzip from io import BytesIO import numpy as np import scipy.sparse as sp import os import shutil from tempfile import NamedTemporaryFile from sklearn.externals.six import b from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.u...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
### ### generate_schedules.py ### import os import sys import csv import random import datetime from utils import LogWarning, LogMessage import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webApp.settings") django.setup() from django.shortcuts import render from django.db import transaction from webApp.mo...
import logging import re from django.conf import settings from django import forms from django.db import models from django.contrib.auth.models import User, AnonymousUser from django.forms import FileField, CharField, Textarea, ValidationError from django.core.validators import validate_email try: from tower imp...
import numpy as np import pytest from pandas._libs.tslibs import iNaT from pandas._libs.tslibs.period import IncompatibleFrequency from pandas.core.dtypes.dtypes import PeriodDtype, registry import pandas as pd from pandas.core.arrays import PeriodArray, period_array import pandas.util.testing as tm # -------------...
# -*- coding: utf-8 -*- # # Copyright 2012-2016 Spotify AB # # 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...
"""Edit properties of an existing service. Can be extended to edit additional properties other than maxRecordCount. Reference: http://resources.arcgis.com/en/help/main/10.2/index.html#/Example_Edit_service_properties/0154000005r4000000/ Hardcoded: - admin username - admin password - server name: "wbu...
#!/usr/bin/env python # Copyright (c) 2007, Google 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: # # * Redistributions of source code must retain the above copyright # notice, this l...
"""Lovelace dashboard support.""" from __future__ import annotations from abc import ABC, abstractmethod import logging import os from pathlib import Path import time from typing import Optional, cast import voluptuous as vol from homeassistant.components.frontend import DATA_PANELS from homeassistant.const import C...
import discord from discord.ext import commands from cogs.utils import checks from cogs.utils.dataIO import fileIO from cogs.utils.chat_formatting import * import logging import os import asyncio import time from random import randint from math import ceil log = logging.getLogger("red.scheduler") log.setLevel(logging...
from __future__ import unicode_literals from moto.core.responses import BaseResponse from moto.ec2.models import ec2_backends from .models import rds2_backends import json import re class RDS2Response(BaseResponse): @property def backend(self): return rds2_backends[self.region] def _get_db_kwar...
import mock from nose import tools as nt from django.test import RequestFactory from django.db import transaction from django.http import Http404 from tests.base import AdminTestCase from tests.factories import ( DraftRegistrationFactory, AuthUserFactory, DraftRegistration, ProjectFactory, ) from websi...
#!/usr/bin/env python # # Copyright (c) 2002 Vivake Gupta (vivakeATomniscia.org). All rights reserved. # # 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 ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='CorporateStrategy', fields=[ ('id', models.Auto...
############################################################################### ## ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary for...
import tango.builtin class BaseType(object): def __init__(self, members=None): self.members = members or {} def is_generic(self, memo=None): return False def __eq__(self, other): return self is other class GenericType(BaseType): def __init__(self, signature): supe...
from __future__ import print_function, division, absolute_import import collections import dis import operator from . import config, ir, controlflow, dataflow, utils, errors, six from .utils import builtins, PYVERSION from .errors import NotDefinedError from .utils import ( BINOPS_TO_OPERATORS, INPLACE_BINOPS...
from storage import sql_base from storage.sql_base import SQL import os as os #from chatterbot import ChatBot dir_path = os.path.dirname(os.path.realpath(__file__)) dir_path = dir_path.replace("setup", "") import platform import bot_response as br #Install required modules using pip import pip import subprocess def ins...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function import frappe import unittest, json, sys import xmlrunner import importlib from frappe.modules import load_doctype_module, get_module_name from frappe.utils impor...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
import os import ConfigParser import shutil import subprocess import StringIO import fnmatch import sys from ovs.log.logHandler import LogHandler logging = LogHandler.get('arakoon', name='internal') class Status: HALTED = 'HALTED' RUNNING = 'RUNNING' def __init__(self): pass VAR = 'ARAKOON_PYTH...
from __future__ import unicode_literals import mock import unittest import sys from oauthlib.oauth1 import SIGNATURE_TYPE_QUERY, SIGNATURE_TYPE_BODY from oauthlib.oauth1 import SIGNATURE_RSA, SIGNATURE_PLAINTEXT from requests_oauthlib import OAuth1Session try: from StringIO import StringIO except ImportError: ...
#! /usr/bin/env python # # quick and dirty processing of the MD All Sky images from astropy.io import fits from scipy.misc import imsave import matplotlib.pyplot as plt import matplotlib.image as mpimg import numpy as np import aplpy import argparse as ap import os.path import logging import time def d(ff, box=[]...
# Generated by Django 3.1.8 on 2021-05-05 21:58 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("resources", "0069_auto_20210503_1809"), ] operations = [ migrations.RemoveField( model_name="partner", name="description", ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
"""Elastic Search access""" __author__ = 'thor' import sys import numpy as np import elasticsearch from elasticsearch import Elasticsearch import elasticsearch.helpers from elasticsearch.helpers import scan from collections import defaultdict from pymongo import MongoClient from pymongo.collection import Collection ...
#Copyright 2008, Meka Robotics #All rights reserved. #http://mekabot.com #Redistribution and use in source and binary forms, with or without #modification, are permitted. #THIS SOFTWARE IS PROVIDED BY THE Copyright HOLDERS AND CONTRIBUTORS #"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT #LIMITED...
""" Calculates mold growth indication from temperature and humidity. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.mold_indicator/ """ import logging import math import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHE...
import os import copy import pytest import numpy as np from stingray.base import StingrayObject, StingrayTimeseries _HAS_XARRAY = _HAS_PANDAS = _HAS_H5PY = True try: import xarray from xarray import Dataset except ImportError: _HAS_XARRAY = False try: import pandas from pandas import DataFrame ex...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import os.path import sys import itertools import warnings import functools import posixpath import ntpath import errno FS_ENCODING = sys.getfilesystemencoding() PY_LEGACY = sys.version_info < (3, ) TRUE_VALUES = frozenset(('true', 'yes', '1', 'enable', 'enabl...