text
stringlengths
12
6.59M
import os, subprocess import argparse from . import mlog from .mesonlib import git, Popen_safe from .wrap.wrap import API_ROOT, Resolver, WrapException from .wrap import wraptool def update_wrapdb_file(wrap, repo_dir, options): patch_url = wrap.get('patch_url') branch, revision = wraptool.parse_patch_url(patc...
#!/usr/bin/env python import os.path import random import sys from datetime import datetime from gi import require_version from gi.repository import GLib, Gio, GObject from gi._gi import variant_type_from_string require_version('Gio', '2.0') __daemon_path__ = os.path.abspath(os.curdir) __version__ = '2.2.0' DeskCha...
import os import posixpath import re import shutil from compressor.filters.css_default import CssAbsoluteFilter URL_PATTERN = re.compile(r'url\(([^\)]+)\)') SRC_PATTERN = re.compile(r'src=([\'"])(.+?)\1') SCHEMES = ('http://', 'https://', '/', 'data:') from django.conf import settings as django_settings class Cust...
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2015] Michał Szczygieł, M4GiK Software # # 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...
import unittest import distarray as da from numpy.testing import assert_array_equal from distarray.mpi.mpibase import MPI, create_comm_of_size from distarray.mpi.error import InvalidCommSizeError from distarray.utils import comm_null_passes class BaseDAPCase(object): """Base class for Distributed Array Protocol t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Brunnhilde --- A Siegfried-based digital archives reporting tool For information on usage and dependencies, see: github.com/timothyryanwalsh/brunnhilde Tested in Python 2.7, 3.5, and 3.6 The MIT License (MIT) Copyright (c) 2016 Tim Walsh http://bitarchivist.net ""...
import numpy as np import matplotlib.pyplot as plt from matplotlib import lines from scipy.integrate import odeint # Journal of Catalysis, 1996, 161. Jg., Nr. 1, S. 1-10. # Bezugdaten: 'Løvik, Ingvild. "Modelling, estimation and optimization # of the methanol synthesis with catalyst deactivation." (2001). # Katalysa...
# # See https://github.com/dials/dials/wiki/pytest for documentation on how to # write and run pytest tests, and an overview of the available features. # from __future__ import absolute_import, division, print_function import os import pytest try: import dials_data as pkg_dials_data dials_data = pkg_dials_...
#!/usr/bin/python import python_sha3 import aes import os import sys import json import getpass import pbkdf2 as PBKDF2 from bitcoin import * import urllib2 from optparse import OptionParser # Arguments network = 'testnet' if network = 'testnet': exodus = 'mvBWJFv8Uc84YEyZKBm8HZQ7qrvmBiH7zR' magicbyte = 111 ...
# -*- coding: utf-8 -*- import datetime import logging import os import pytest import yaml import couchdb from dateutil.tz import tzlocal from StringIO import StringIO from openprocurement.auction.insider.auction import Auction, SCHEDULER from openprocurement.auction.insider.mixins import LOGGER from openprocurement....
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This file is the main file used when running tests with pytest directly, # in particular if running e.g. ``pytest docs/``. import os import tempfile import hypothesis try: from pytest_astropy_header.display import PYTEST_HEADER_MODULES PYTEST...
#!/usr/bin/env python3 # Copyright (C) 2017-2019 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
__author__ = 'Alain Ivars' def pytest_configure(config): from django.conf import settings if not settings.configured: from example import settings_tests as test_settings settings.configure(**test_settings.__dict__) if not hasattr(settings, 'CACHES'): # pragma: no cover settings....
from json import dumps from django.contrib.contenttypes.models import ContentType import pytest from wagtail.admin.panels import FieldPanel from wagtail.models import Page, Locale, Site, StreamField from wagtailcodeblock.blocks import CodeBlock class TestPage(Page): body = StreamField([ ("code", CodeBlo...
from django.contrib import admin from django.contrib.comments.admin import CommentsAdmin from django.utils.translation import ugettext_lazy as _ from mezzanine.conf import settings from mezzanine.generic.models import ThreadedComment class ThreadedCommentAdmin(CommentsAdmin): """ Admin class for comments. ...
# -*- coding: utf-8 -*- # Copyright (C) 2010-2011, Luis Pedro Coelho <luis@luispedro.org> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # License: MIT. See COPYING.MIT file in the milk distribution # -*- coding: utf-8 -*- from __future__ import division import numpy as np from collections import defaultdict from...
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK import argparse from textwrap import dedent from glob import glob parser = argparse.ArgumentParser( formatter_class=argparse.RawDescriptionHelpFormatter, description=dedent("""\ The toolbox frontend of the Matlab2cpp library. Use this to try to do automatic and s...
from flask import Flask,jsonify ftHelloWorld = Flask(__name__) ftHelloWorld.config.from_object('config') @ftHelloWorld.route('/') def hello_world(): ret = jsonify( {"Helo World! fase 2 ":ftHelloWorld.config['CONFIG_VAR']} ) ret.status_code = 202 return ret if __name__ == '__main__': ftHelloWorld.run()
from UM.i18n import i18nCatalog from UM.Application import Application from UM.Logger import Logger from UM.Signal import signalemitter from UM.Message import Message from cura.PrinterOutputDevice import PrinterOutputDevice, ConnectionState from PyQt5.QtNetwork import QHttpMultiPart, QHttpPart, QNetworkRequest, QNet...
from keras import Input from keras.engine import Layer, Model from keras.layers import Activation, BatchNormalization, Convolution2D, Dense, Flatten, MaxPooling2D from keras.models import Sequential from keras.regularizers import l2 from keras.utils import plot_model from models.TrainingConfiguration import TrainingCo...
''' Created on 2012-11-06 @author: Gary ''' from steps.abc_step import abcStep from lib.constants import Constants class COSMOutputStep( abcStep ): ''' This object should be started with with the COSM thread and hang around forever. ''' queue = None ''' A Queue for communicating...
""" Create the graph from molecules. This implementation is in alpha version. The original MEGNet paper uses features directly taken from Faber et al. at https://drive.google.com/open?id=0Bzn36Iqm8hZscHFJcVh5aC1mZFU """ import itertools import re from pymatgen import Molecule from pymatgen.io.babel import BabelMolAdap...
import ast import re import pyparsing # TODO: There is a lot of work to be done here. # The current implementation is written in a way that _any_ input is valid, # which does not make sense once things get more complex. PartialQuotedString = pyparsing.Regex( re.compile( r''' (["']) # start q...
import threading, time, datetime, json import traceback import tornado.ioloop import tornado.web import tornado.websocket import tornado.template import tornado.httpserver from tornado import gen import ssl,os import OmniDB_app.include.Spartacus as Spartacus import OmniDB_app.include.Spartacus.Database as Database im...
import pytest from django.contrib.auth.models import Permission, Group, ContentType from django.core.exceptions import ObjectDoesNotExist from contacts.group_permissions import GroupPermissions @pytest.mark.django_db def test_add_perms(): g1, _ = Group.objects.get_or_create(name="Test Group 1") g2, _ = Grou...
import math import requests import logging import sys from setproctitle import setproctitle from time import sleep from django.db import Error, IntegrityError, InterfaceError, transaction from django.core.management.base import BaseCommand from django.utils import timezone from busstops.models import DataSource, Servic...
from nltk.corpus import stopwords, wordnet as wn from nltk.stem import PorterStemmer, WordNetLemmatizer import DBModel import util import nltk import os import re from config import config as cfg cwd = os.getcwd() def stem_system(system_name): list_of_stem_dicts = [] banned_words = [] print "[stemmer] St...
# Extract pixels and metadata using shapefiles and georeferenced imagery. # The purpose of this module is to generate train, test and target data # for machine learning algorithms. import geoio import geojson import geojson_tools as gt import numpy as np import sys from itertools import cycle import osgeo.gdal as gdal...
""" ############################################################################### Core: Core Data Class ############################################################################### """ import pprint, string, random import scipy as sp import scipy.constants from OpenPNM.Base import logging, Tools from OpenPNM.Base...
import tkinter as tk from gui.operations.operation_template import OperationTemplate from gui.tabpicture import TabPicture class OperationLightLeveling(OperationTemplate): def __init__(self, tab: TabPicture): self.scale_value = tk.StringVar() super().__init__("Redukcja poziomow szarosci", tab) ...
### author: alessio.marcozzi@gmail.com ### version: 2017_05 ### licence: MIT ### requires Python >= 3.6 and numpy def vprint(var_name,var_dict=globals(),sep=' : '): '''(str, dict) => print Fast way to check a variable's value. >>> scale = 0.35 >>> mass = '71 Kg' >>> vprint('scale',globals()) ...
# Copyright (C) Jean-Paul Calderone 2008, All rights reserved """ Unit tests for L{OpenSSL.SSL}. """ from errno import ECONNREFUSED, EINPROGRESS from sys import platform from socket import error, socket from os import makedirs from os.path import join from unittest import main from OpenSSL.crypto import TYPE_RSA, FI...
# -*- coding: utf-8 -*- import os.path as p import re import sys import argparse import simplejson __all__ = ['jsonpipe'] __version__ = '0.0.4' def jsonpipe(obj, pathsep='/', path=()): r""" Generate a jsonpipe stream for the provided (parsed) JSON object. This generator will yield output as UTF-8-en...
#!/usr/bin/env python # Copyright (c) 2015 IBM. 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 ...
import sublime import sublime_plugin import re import webbrowser import collections from .output_view import find_view, output_to_view ###---------------------------------------------------------------------------- def log(message, *args, status=False, dialog=False): """ A simple logic facility to ensure ...
from functools import partial import numpy as np from pathlib import Path from menpo.base import LazyList from menpo.image import Image, MaskedImage, BooleanImage from menpo.image.base import normalize_pixels_range, channels_to_front def _pil_to_numpy(pil_image, normalize, convert=None): p = pil_image.convert(c...
# Copyright 2015 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 applicable law or agreed to ...
from __future__ import print_function from hotcidr import util from hotcidr import ports from hotcidr import state import boto.ec2 import contextlib import os.path import shutil import sys import tempfile import yaml def dump(x): return state.dump(x, default_flow_style=False) def append_to_rules(connection, rules...
from datetime import datetime import logging import os import re import requests from requests_futures.sessions import FuturesSession _logger = logging.getLogger(__name__) ENV_KEY = 'PL_API_KEY' class APIException(Exception): '''also used as placeholder for unexpected response status_code''' pass class ...
# -*- coding: utf-8 -*- """Tools for inspecting Python objects. Uses syntax highlighting for presenting the various information elements. Similar in spirit to the inspect module, but all calls take a name argument to reference the name under which an object is being read. """ # Copyright (c) IPython Development Team...
# encoding: utf-8 """ A mixin for :class:`~IPython.core.application.Application` classes that launch InteractiveShell instances, load extensions, etc. Authors ------- * Min Ragan-Kelley """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Developm...
# encoding: utf-8 """ Utilities for getting information about IPython and the system it's running in. """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in ...
"""An Application for launching a kernel Authors ------- * MinRK """ #----------------------------------------------------------------------------- # Copyright (C) 2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.txt, distributed as pa...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import psycopg2 from odoo import api, fields, models, registry, SUPERUSER_ID, _ _logger = logging.getLogger(__name__) class DeliveryCarrier(models.Model): _name = 'delivery.carrier' _descriptio...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # ftpserver.py # # pyftpdlib is released under the MIT license, reproduced below: # ====================================================================== # Copyright (C) 2007 Giampaolo Rodola' <g.rodola@gmail.com> # Hacked by Fabien Pinckaers (C) 2008 <fp@tinyerp.com...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 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...
"""Kraken - objects.operators.operator module. Classes: Operator - Base operator object. """ import re from kraken.core.configs.config import Config from kraken.core.objects.scene_item import SceneItem class Operator(SceneItem): """Operator representation.""" def __init__(self, name, parent=None, metaData...
# 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 # distributed under the...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from base64 import b64decode from cups import IPPError, IPP_PRINTER_IDLE, IPP_PRINTER_PROCESSING, IPP_PRINTER_STOPPED import dbus import logging import netifaces as ni import os import io import base64 import re import s...
""" Provides the LuminosoClient object, a wrapper for making properly-authenticated requests to the Luminoso REST API. """ from .auth import LuminosoAuth, OAuth from .constants import URL_BASE from .errors import (LuminosoError, LuminosoAuthError, LuminosoClientError, LuminosoServerError, LuminosoAPIError) from ge...
# USAGE # python demo_bulk.py --base-model $CAFFE_ROOT/models/bvlc_googlenet \ # --images initial_images/the_matrix --output examples/output/the_matrix # import the necessary packages from __future__ import print_function from batcountry import BatCountry from imutils import paths from PIL import Image import numpy a...
# Django settings for fund_raiser project. import os DEBUG = True TEMPLATE_DEBUG = DEBUG PROJECT_PATH = os.path.abspath(__file__) SITE_PATH = os.path.abspath(os.path.join(PROJECT_PATH, os.path.pardir)) ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS # Hosts/domain names that are valid fo...
# -*- coding: utf-8 -*- # ################################################################################################## # # lyngspice v0.2.1 - A simple single-module wrapper for ngspice # # Copyright (c) 2018 Ernesto Pérez Serna # # Permission is hereby granted, free of charge, to any person obtai...
import os import urlparse import warnings from collections import defaultdict from django.conf import settings from django.template import TemplateDoesNotExist from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import render from django.views.decorators.csrf import requ...
""" Django views for interacting with Order app """ # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import transaction from django.shortcuts import get_object_or_404 from django.core.exceptions import ValidationError from django.urls import reverse from django.utils.translation import u...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import hashlib import hmac from datetime import datetime import logging import random from odoo import api, fields, models, tools, _ from odoo.exceptions import UserError from odoo.tools.safe_eval import safe_eval from ...
"""The aim of this script is to read the multi pie dataset """ import scipy.io import numpy as np import matplotlib.pyplot as plt import glob import cPickle as pickle import os import cv2 import facedetection import fnmatch import Image import csv import matplotlib.image as io # from skimage import io # from skimage...
# -*- coding: utf-8 -*- # Application settings of Google App Engine / Python # START of settings for gae-tap # settings for Google Cloud Endpoints from this below config_API = ( #(<module name>,) "api_sample.v1", ) # settings for webapp2 from this below config_APP = { #{<domain>: ((<path prefix>, <module nam...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import importlib import pathlib import logging from typing import OrderedDict from importlib import reload from django.apps import AppConfig, apps from django.conf import settings from django.db.utils import OperationalError, ProgrammingError from django....
#!/usr/bin/env python import argparse import logging import multiprocessing import time from functools import partial, update_wrapper from defaults import EXTRACTION_MAX_READ_PAIRS import pysam compl_table = [chr(i) for i in xrange(256)] compl_table[ord('A')] = 'T' compl_table[ord('C')] = 'G' compl_table[ord('G')] = ...
"""The aim of this script is to read the multi pie dataset """ import scipy.io import numpy as np import matplotlib.pyplot as plt import glob import cPickle as pickle import os import cv2 import facedetection import fnmatch import matplotlib.image as io # from skimage import io # from skimage import color from skimag...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.osv import expression from odoo import api, fields, models, _ from odoo.addons import decimal_precision as dp from odoo.exceptions import UserError, ValidationError class ProductAttribute(models.Model): _...
"""The aim of this script is to read the multi pie dataset """ import scipy.io import numpy as np import matplotlib.pyplot as plt import glob import cPickle as pickle import os import cv2 import facedetection import fnmatch import Image import csv import matplotlib.image as io # from skimage import io # from skimage...
DEP_CLASS_ABI = 0 DEP_CLASS_IS = 1 DEP_CLASS_SONAME = 2 DEP_CLASS_FILES = 3 DEP_CLASS_TROVES = 4 class Dependency: """ Implements a single dependency. This is relative to a DependencyClass, which is part of a DependencySet. Multiple DependencySets make up a DependencyGroup, which kee...
""" The main application window. """ from typing import List, Tuple import logging import os.path import importlib.resources from gi.repository import Gio, Gdk, Gtk from gaphor import UML, Application from gaphor.UML.event import ModelFactoryEvent from gaphor.core import ( _, event_handler, action, ...
# # Copyright (c) 2004 Specifix, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/li...
import logging import mccq.errors from discord.ext import commands from discord.ext.commands import Context from mccq.query_manager import QueryManager from mccq.version_database import VersionDatabase from cogbot import checks from cogbot.cog_bot import CogBot log = logging.getLogger(__name__) class MCCQExtensionS...
import os import warnings import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset, stringtochar from scipy import optimize, interpolate, integrate from desc.backend import sign from desc.compute.utils import compress from desc.utils import Timer from desc.grid import Grid, LinearGrid from desc.b...
# -*- coding: utf-8 -*- """ Common Plotting =============== Defines the common plotting objects: - :func:`colour.plotting.colour_style` - :func:`colour.plotting.override_style` - :func:`colour.plotting.colour_cycle` - :func:`colour.plotting.artist` - :func:`colour.plotting.camera` - :func:`colour.plotting...
#coding: utf-8 """For Drupal site deployment and management""" from os import remove as rm from os.path import isdir, join as path_join, realpath, basename from pipes import quote as shell_quote from sh import tar, unzip from shlex import split as shell_split from shutil import copy2 as copy_file, rmtree as rmdir_forc...
import logging import uuid from collections import Counter from functools import partial from itertools import filterfalse from math import pi from sqlalchemy.orm.session import Session from alcor.models import (Group, Star) from alcor.models.eliminations import StarsCounter from alcor.model...
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, erpnext, json from frappe import _, scrub, ValidationError from frappe.utils import flt, comma_or, nowdate from erpnext.a...
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, erpnext, json from frappe import _, scrub, ValidationError from frappe.utils import flt, comma_or, nowdate, getdate from ...
# Copyright (C) 2019 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribu...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Populates the environment variables or a keyring from a json file and authenticates via Jason Web Token ''' import json import os import sys from keyring import get_password, set_password from boxsdk import JWTAuth, Client JSON_FILE = './.box/app_settings.json' PRIVA...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
# Copyright 2014-present PlatformIO <contact@platformio.org> # # 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 applicabl...
#!/usr/bin/python # # Copyright (c) 2015 All rights reserved # This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # # http://www.apache.org/licenses/LICENSE-2.0 # # Maintainer : jose.lausuch@erics...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import optparse from abc import ABCMeta from operator import attrgetter from xml.etree.ElementTree import Element from nassl.legacy_ssl_client import LegacySslClient from nassl.ssl_client import OpenSslVersionEnum, ...
import ast import errno import glob import importlib import os import py_compile import stat import sys import textwrap import zipfile from functools import partial import py import _pytest._code import pytest from _pytest.assertion import util from _pytest.assertion.rewrite import _get_assertion_exprs from _pytest.a...
#!/usr/bin/env ambari-python-wrap ''' 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 (th...
# Copyright (C) 2011-2016 Red Hat, Inc. # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or any later version. # # This library is distributed in the h...
""" SoftLayer.tests.CLI.modules.vs_tests ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :license: MIT, see LICENSE for more details. """ import mock from SoftLayer import testing from SoftLayer.CLI import exceptions import json class VirtTests(testing.TestCase): def test_list_vs(self): result = self....
from flask import Flask, request import bs4 as bs import requests import json import os import datetime import time import pytz app = Flask(__name__) debug_print_on = True ######################### Global Variables ######################### botToken = str(os.environ.get('botToken')) myjsonId = str(os.environ.get('myj...
### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James Vega # 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 copyri...
from html import escape from csp.decorators import csp_update from django.conf import settings from django.conf.urls.static import static from django.db.models import Q, Count from django.shortcuts import render, get_object_or_404 from django.templatetags.static import static from django.urls import reverse from djang...
#!/usr/bin/python ######################################################################## # # Caution: there are two separate, independent build systems: # 'makepanda', and 'ppremake'. Use one or the other, do not attempt # to use both. This file is part of the 'makepanda' system. # # To build panda using this scrip...
#!/usr/bin/env python ######################################################################## # # To build panda using this script, type 'makepanda.py' on unix # or 'makepanda.bat' on windows, and examine the help-text. # Then run the script again with the appropriate options to compile # panda3d. # ##################...
import os import json import math from rest_framework import serializers from rest_framework import status from rest_framework.response import Response from app.plugins.views import TaskView from worker.tasks import execute_grass_script from app.plugins.grass_engine import grass, GrassEngineException from geojson im...
import os import platform import sys from logging.handlers import SysLogHandler LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] def get_logger_config(log_dir, logging_env="no_env", tracking_filename="tracking.log", edx_filename="edx.log...
from __future__ import division __author__ = 'Vladimir Iglovikov' ''' It takes too long to merge datasets every time. I need to merge it before doing regression ''' import graphlab as gl import os print 'reading train' train = gl.SFrame(os.path.join('..', 'data', 'train_ads')) print print 'train shape' print train...
#!/usr/bin/env python # -*- coding: utf-8 -*- # std import import sys import argparse import os.path from collections import defaultdict import csv import re import math class Variant(object): def __init__(self, type, comment): self.type = type self.comment = comment def __eq__(self, other...
from flanker import mime import os import f2n import argparse import sys def main(): LAYERS = set(['map01', 'url01', 'headers', 'attachments']) parser = argparse.ArgumentParser(prog="") parser.add_argument('-d', '--dirname', required=True, default='') parser.add_argument('-l', '--layers', required=Tr...
# -*- coding: utf-8 -*- import os import time from django.conf import settings from django.core.cache import cache try: from djangosanetesting.cases import HttpTestCase except: class HttpTestCase(object): pass from django.utils.importlib import import_module from django.test import TestCase from djang...
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################################################## # # Project: Metalink Checker # URL: http://www.nabber.org/projects/ # E-mail: webmaster@nabber.org # # Copyright: (C) 2007-2012, Hampus Wessman, Neil McNab # License: GNU General Public License Versio...
# -*- coding: utf-8 -*- # # MOTECH Platform Campaigns documentation build configuration file, created by # sphinx-quickstart on Mon Apr 7 12:17:02 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogen...
""" Support for eQ-3 Bluetooth Smart thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.eq3btsmart/ """ import logging import voluptuous as vol from homeassistant.components.climate import ( ClimateDevice, PLATFORM_SCHEMA, PRECISIO...
from citrination_client.client import CitrinationClient from citrination_client.models import * from citrination_client.models.columns import * from os import environ import pytest import time from citrination_client.base.errors import * citrination_client = CitrinationClient(environ["CITRINATION_API_KEY"]) client = ...
#!/usr/bin/python ######################################################################## # # Caution: there are two separate, independent build systems: # 'makepanda', and 'ppremake'. Use one or the other, do not attempt # to use both. This file is part of the 'makepanda' system. # # To build panda using this scrip...