src
stringlengths
721
1.04M
#!/usr/bin/env python import click import pandas as pd import re # Hard-coded variables investigation_type = 'metagenome' # Function: return dataframe of environmental package-specific metadata items # A single environmental package (soil) or list can be provided (soil,water). def show_items_of_env_pkg(df_env_pkg, l...
# -*- 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...
# # gPrime - A web-based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your optio...
""" Supplies Pane, Layout, NdLayout and AdjointLayout. Pane extends View to allow multiple Views to be presented side-by-side in a NdLayout. An AdjointLayout allows one or two Views to be ajoined to a primary View to act as supplementary elements. """ from functools import reduce from itertools import chain import nu...
""" Emonoda -- A set of tools to organize and manage your torrents Copyright (C) 2015 Devaev Maxim <mdevaev@gmail.com> 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 vers...
#-*- coding: utf8 -* # # Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008 # # This file is part of XYZCommander. # XYZCommander is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by # the Free Software Foundation, either version 3 of the Licens...
# Copyright 2012-2015 Mattias Fliesberg # # This file is part of opmuse. # # opmuse 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 versi...
# -*- coding: utf-8 -*- ## ## Copyright © 2007, Matthias Urlichs <matthias@urlichs.de> ## ## 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 3 of the License, or ## (at your...
from vnpy.event import EventEngine from vnpy.trader.engine import MainEngine from vnpy.trader.ui import QtWidgets from ..engine import APP_NAME class RiskManager(QtWidgets.QDialog): """""" def __init__(self, main_engine: MainEngine, event_engine: EventEngine): """""" super().__init__() ...
#!/usr/bin/python3 import argparse import json import re import subprocess import sys parser = argparse.ArgumentParser() parser.add_argument( "--token", help="Github Personal Access token, get it from https://github.com/settings/tokens.", ) parser.add_argument( "--org", default="mendersoftware", h...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: ...
# # 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 # ...
# Copyright 2019 Matteo Bilotta # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging from datetime import datetime from odoo.tools.misc import DEFAULT_SERVER_DATE_FORMAT _logger = logging.getLogger(__name__) def _fix_date_field(cr): cr.execute("SELECT id, date FROM withholding_ta...
""" Custom hyperparameter functions. """ import abc import copy import math import random import itertools from typing import List import rlkit.pythonplusplus as ppp class Hyperparameter(metaclass=abc.ABCMeta): def __init__(self, name): self._name = name @property def name(self): return ...
# -*- coding: utf-8 -*- """ Copyright (C) 2014 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import logging # Zato from zato.admin.web.forms import ChangePasswordFo...
import sys import fontforge amiri = fontforge.open(sys.argv[1]) xits = fontforge.open(sys.argv[2]) amiri.em = 1000 amiri.layers[1].is_quadratic = 0 amiri.selection.all() amiri.unlinkReferences() names = [] alts = [] for aglyph in amiri.glyphs(): u = aglyph.unicode if (u in range(0x1EE00, 0x1EF00) or ...
#A small web app for searching multiple tags on instagram #Takes input in the form of a list of tags, returns oembed code for displaying #images on a webpage import requests import json from collections import defaultdict import settings #settings.py includes the following: client_id = settings.client_id client_secre...
import os import sys import struct MY_PATH, _ = os.path.split(os.path.realpath(__file__)) ARSDK_PATH=os.path.join(MY_PATH,'..', 'arsdk-xml') ARCOMMANDS_PATH=os.path.join(ARSDK_PATH, 'xml') sys.path.append(ARSDK_PATH) import arsdkparser _ctx = arsdkparser.ArParserCtx() arsdkparser.parse_xml(_ctx, os.path.join(ARCOMM...
# -*- coding: utf-8 -*- # Copyright 2014-2016 The HyperSpyUI developers # # This file is part of HyperSpyUI. # # HyperSpyUI 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 #...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, 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 #...
""" Jennifer's scientific computing cheatsheet - arrays and numerical analysis. Contents: - numpy & ndarray basics - Basic operations and functions with ndarrays - Type conversions - Basic indexing and slicing - Boolean indexing - Fancy indexing - Conditional logic and array operations - Transposing arrays and swappin...
class Solution(object): def calculate(self, s): """ :type s: str :rtype: int """ queue = collections.deque() method = { "+": operator.add, "-": operator.sub, "*": operator.mul, "/": operator.div } pri = {...
# -*- coding: utf-8 -*- from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors class TestCvePoC(metaclass=CaseMeta): """ Regression test for the bug described in: https://github.com/Exiv2/exiv2/issues/283 """ url = "https://github.com/Exiv2/exiv2/issues/283" cve_url = "https://cv...
class TestTracks: def test_can_add_and_delete_tracks(self, helper): recording = helper.given_new_device(self, "tracks").has_recording() user = helper.admin_user() track0 = user.can_add_track_to_recording(recording) user.can_see_track(track0) track1 = user.can_add_track_to_r...
class VersionDataManager: """Manager of all the information of files and packages in a specific version Attributes: packages (list of str): List of packages name files (list of str): List of all the files in the project packagedict (dict): Map of packages(key) and filenames(value) ...
########################################################################## # This file is part of WTFramework. # # WTFramework 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 L...
from pytest import raises # The parametrize function is generated, so this doesn't work: # # from pytest.mark import parametrize # import pytest parametrize = pytest.mark.parametrize from maelstorm import metadata from maelstorm.main import main class TestMain(object): @parametrize('helparg', ['-h', '--help'...
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from django import db from django.db.models.deletion import ProtectedError from django.core import exceptions from django.conf import settings from rest_framework import views, status from rest_framework.respons...
# 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...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
# -*- 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 'Project' db.create_table(u'projects_project', ( ...
# -*- coding: utf-8 -*- """ Content here is borrowed from our contributions to Dask. """ import numpy import dask.array def _fftfreq_block(i, n, d): r = i.copy() r[i >= (n + 1) // 2] -= n r /= n * d return r def _fftfreq(n, d=1.0, chunks=None): """ Return the Discrete Fourier Transform s...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2019 ASMlover. 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...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTime}. """ __metaclass__ = type import signal from twisted.internet.defer import TimeoutError from twisted.trial.unittest import TestCase, SkipTest from twisted.python.runtime import platform from twis...
import sublime, sublime_plugin import time import datetime def log_error(ex, command): error_msg = 'Error in ' + command + ': ' + str(ex) print error_msg sublime.status_message(error_msg) class SubliMapCommand(sublime_plugin.TextCommand): def run(self, edit): self.edit = edit self.view...
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 3 # of the License, or (at your option) any later version. # # This program is distrib...
# # Copyright (c) 2011-2014 Exxeleron GmbH # # 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 agre...
# encoding: utf-8 # pylint: disable=missing-docstring import json from app.modules.teams import models def test_new_team_creation(flask_app_client, db, regular_user): # pylint: disable=invalid-name team_title = "Test Team Title" with flask_app_client.login(regular_user, auth_scopes=('teams:write', )): ...
import socket import sys import RPi.GPIO as gpio import time HOST = '192.168.0.9' # RC카 라즈베리파이 IP값으로 변경필요 PORT = 10000 TIME_OUT = 100 #Motor 1 GPIO Pin IC1A = 22 IC2A = 27 #Motor 2 GPIO Pin IC3A = 4 IC4A = 17 gpio.cleanup() gpio.setmode(gpio.BCM) #Motor Pin Setup gpio.setup(IC1A, gpio.OUT) gpio.setup(IC2A, gpio.O...
#!/usr/bin/python versie = 1.0 from datetime import datetime, timedelta import re import serial import sys from metingen import meting # --- Meter lees informatie --- # Maximum aantal regels dat gelezen mag worden # dient om programma te stoppen wanneer er geen 'eofline' voorbij komt maxlines = 30 # Einde van berich...
"""Template helper methods for rendering strings with Home Assistant data.""" from datetime import datetime import json import logging import math import random import base64 import re import jinja2 from jinja2 import contextfilter from jinja2.sandbox import ImmutableSandboxedEnvironment from jinja2.utils import Names...
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** """Mercurial VCS support. """ im...
# Used to display minitex boxes on screen. from minitex import boxmodel import renderers class Compositor(object): def __init__(self, images, debug=False): self.debug = debug self.images = images self.imglayer = renderers.ImageLayer(images) self.fontlayers = {} def get_fontlaye...
'''Module containing detector class''' import sys import os import numpy as np from numpy import ma import pandas try: import h5py HDF5_MODE = True except ImportError: HDF5_MODE = False class Detector(object): """Dragonfly detector The detector file format is specified in github.com/duaneloh/Drag...
#!/usr/bin/env python import os import re import sys import glob import shutil import logging import tempfile from argparse import ArgumentParser from subprocess import Popen, STDOUT from contextlib import contextmanager from matmodlab2.core.logio import get_logger from matmodlab2.core.environ import environ from matm...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Mon Feb 14, 2011 @author:Isabel Restrepo Threshold taylor coefficients. Each block is processed in a separate thread. """ import os; import bvpl_octree_batch import multiprocessing import Queue import time import random import optparse import sys from numpy im...
from collections import namedtuple from django.db import models from django.core.exceptions import ValidationError from django.utils.six import with_metaclass, string_types Choice = namedtuple('Choice', ('value', 'display', 'slug', 'handler',)) class ChoiceField(with_metaclass(models.SubfieldBase, models.PositiveSma...
# -*- coding: utf-8 -*- # # paloma documentation build configuration file, created by # sphinx-quickstart on Sun Mar 4 15:12:23 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
# coding=utf-8 # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and ope...
#!C:\Users\SeanSaito\Dev\aviato\flask\Scripts\python.exe # -*- coding: utf-8 -*- #****************************************************************************** # $Id$ # # Project: GDAL Python Interface # Purpose: Application for converting raster data to a vector polygon layer. # Author: Frank Warmerdam, warm...
# Copyright 2013 OpenStack Foundation # # 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...
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) 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 Softwar...
# This file is part of the GOsa framework. # # http://gosa-project.org # # Copyright: # (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de # # See the LICENSE file in the project's top-level directory for details. """ Object Index ============ The Object Index is the search engine in GOsa. It keeps track about a...
# Copyright 2014-2016 ARM Limited # # 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...
# Copyright 2016 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 agreed to in writing, s...
""" This function just reads all the required input files for the 2D three body rotation test Copyright 2017 Anna Wirbel 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 ve...
from __future__ import print_function, unicode_literals import fnmatch import functools import json import os import re import sys from nose.case import FunctionTestCase from nose.plugins import Plugin from nose.plugins.skip import SkipTest def walk_subfolders(path): """ Walk in the subtree within path and g...
"""Attribute Interpretation unit tests.""" import pytest from vivid.classes.attribute import Attribute from vivid.classes.relation import Relation from vivid.classes.attribute_structure import AttributeStructure from vivid.classes.attribute_system import AttributeSystem from vivid.classes.relation_symbol import Relati...
''' Created on 2 сент. 2016 г. @author: garet ''' import urllib.request import queue import sqlite3 import re import json from urllib.parse import urlparse from Parser import HtmlPage import lxml class BaseSpider: def __init__(self): self.urls = QueueUrls() self.cache = Sqlite...
import copy import json import re import logging from flask import g, request from flask.ext.restful import abort from formencode import Invalid, Schema from formencode.validators import Validator from hoops.restful import Resource from hoops.exc import APIValidationException from hoops.status import library as status...
# -*- coding: utf-8 -*- # pylint: disable-msg=W0201 # pylint-version = 0.7.0 # # Copyright 2004-2005 André Malo or his licensors, as applicable # # 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...
# Copyright 2015 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...
#=============================================================================== # brobot # Copyright (C) 2010 Michael Keselman # # 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...
# Usage: $ python3 get_bug_commit_ratio_per_tag.py /home/kevin/Desktop/evolution-project/repos/facebook-android-sdk ./output/ # Calculates each files overall (not per tag) changes and bug related changes. __author__ = 'kevin' from datetime import datetime, timedelta from subprocess import call, check_output import sy...
#!/usr/bin/env python3 # Copyright (C) 2014, 2015 M-Labs Limited # Copyright (C) 2014, 2015 Robert Jordens <jordens@gmail.com> import argparse import sys import time from operator import itemgetter from itertools import chain import logging import h5py from artiq.language.environment import EnvExperiment from artiq....
# Generated by Django 2.0.1 on 2018-01-28 11:05 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0059_config'), ] operations = [ migrations.AlterField( model_name='config', ...
# Copyright 2012 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...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # friend.py # # This file is part of Squilla # # Copyright (C) 2014 Thibault Cohen # # 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 Foundat...
"""Minimal Gnip API using HTTP requests.""" import textwrap import requests from .search import SearchManager class Gnip(object): """Simple binding to Gnip search API.""" session_class = requests.Session default_params = { 'publisher': 'twitter', 'maxResults': 500, } def __in...
__author__ = 'beau' import pyb class PDM(): def __init__(self,pout='X11',tim=4,freq=50): """ :param pout: output pin nr :param tim: timer number :param freq: frequency of the bitstream """ self.max = 2**24-1#2**31-1 crashes with larger ints? 24bit resolution is fin...
import unittest, test.support import sys, io, os import struct import subprocess import textwrap import warnings import operator import codecs # count the number of test runs, used to create unique # strings to intern in test_intern() numruns = 0 try: import threading except ImportError: threading = None cla...
#################################################################################################### # # Musica - A Music Theory Package for Python # Copyright (C) 2017 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
from django import forms from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ from report_builder.models import Question, Answer, Report from report_builder.report_shortcuts import get_question_permission class QuestionForm(forms.ModelForm): children = forms.CharF...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re, sys, json from pymongo import MongoClient a = None def parseColumnNames(f): line = f.readline() return line.split(',') inputFilename = sys.argv[1] inputFilenameCron = sys.argv[2] outputfilename = sys.argv[3] outputfilenameIds = sys.argv[4] outputfile...
#! /usr/bin/env python # this file is part of SDB. # # SDB 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 # (at your option) any later version. # # SDB is distributed in t...
#!/usr/bin/python #from IPython.core.debugger import Tracer; debug_here = Tracer() import os, subprocess, re import numpy as np import aizkolari_utils as au #measures = ['jacs', 'modulatedgm', 'norms', 'trace', 'geodan'] measures = ['jacs', 'modulatedgm'] #measures = ['trace'] dists = ['pearson', 'bhattacharyy...
#!/usr/bin/env python """This modules contains tests for clients API handlers.""" from grr.gui import api_test_lib from grr.gui.api_plugins import client as client_plugin from grr.lib import aff4 from grr.lib import client_index from grr.lib import events from grr.lib import flags from grr.lib import test_lib fro...
# vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab smarttab autoindent # Altai API Service # Copyright (C) 2012-2013 Grid Dynamics Consulting Services, Inc # All Rights Reserved # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License ...
# # gPrime - A web-based genealogy program # # Copyright (C) 2008 Gary Burton # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later ...
# Copyright (c) 2013 dotCloud, 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 requir...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2013 Matmoz d.o.o. (info at matmoz.si) # All Rights Reserved. # # WARNING: This program as such is intended to be used by professional # programmers who take the whole resp...
#remove all others only keep Bip38 here. Need to learn more about this. from bitcoin.bip38 import Bip38 from bitcoin.key import CKey from bitcoin.base58 import CBase58Data __b58chars = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" __b58base = len(__b58chars) def encode_pw(key, pw): key = CKey() ...
import unittest import skype4pytest from Skype4Py.skype import * class SkypeTest(skype4pytest.TestCase): def setUpObject(self): self.obj = self.skype # Methods # ======= def testApiSecurityContextEnabled(self): # Returned type: bool def test(): self.obj.ApiSecuri...
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2018-04-03 16:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'),...
# -*- coding:utf-8 -*- """ Description: Remote Node, use to broadcast tx Usage: from AntShares.Network.RemoteNode import RemoteNode """ #from AntShares.Network.RPC.RpcClient import RpcClient from RPC.RpcClient import RpcClient class RemoteNode(object): """docstring for RemoteNode""" def __init__(sel...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Francois Boulogne # License: from __future__ import unicode_literals import unittest import sys from bibtexparser.bparser import BibTexParser from bibtexparser.bwriter import BibTexWriter, to_bibtex from bibtexparser.customization import author class TestBibt...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import datetime from sqlalchemy import Column, ForeignKey from sqlalchemy.dialects.sqlite import INTEGER, TEXT, DATETIME, BOOLEAN from sqlalchemy.orm import column_property, relationship from sqlalchemy.sql import func from sqlalchemy import and_ from database.database im...
import inspect import warnings class RemovedInDjango20Warning(DeprecationWarning): pass class RemovedInDjango19Warning(PendingDeprecationWarning): pass RemovedInNextVersionWarning = RemovedInDjango19Warning class warn_about_renamed_method(object): def __init__(self, class_name, old_method_name, new_...
# -*- coding: utf-8 -*- # qgis-ol3 Creates OpenLayers map from QGIS layers # Copyright (C) 2014 Victor Olaya (volayaf@gmail.com) # # 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...
# coding=utf-8 __author__ = 'dracks' import models from Api.Manager import DataManager def create(code, level, label_ca, label_es): warning_list = DataManager.sharedManager().retrieve_all('warning') for w in warning_list: if w.code == code: if w.name is None: w.name = {} ...
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def VmDiskFileQueryFilter(vim, *args, **kwargs): '''The filter for the virtual disk prima...
# -*- coding: utf-8 -*- # python 2 support via python-future from __future__ import absolute_import, division, print_function, unicode_literals from builtins import bytes, dict, int, str import atexit import collections import distutils.spawn import importlib import logging import re import shlex import subprocess im...
""" streaman.stream --------------- Provides the base `Stream` and `Channel` classes which must be overridden by implemented services. """ import time import os try: import cPickle as pickle except ImportError: import pickle from types import MethodType from streaman.common import * class Stream(object): ...
""" Tracer box in 2D ================ Solves a standing wave in a rectangular basin using wave equation. This version uses a constant tracer to check local/global conservation of tracers. Initial condition for elevation corresponds to a standing wave. Time step and export interval are chosen based on theoretical osc...
#!/usr/bin/python # 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 # (at your option) any later version. # # Ansible is distributed...
#!/usr/bin/env python # coding=utf-8 """368. A Kempner-like series https://projecteuler.net/problem=368 The **harmonic series** $1 + \dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{4} + ...$ is well known to be divergent. If we however omit from this series every term where the denominator has a 9 in it, the series remarkab...
#!/usr/bin/python2 import hashlib import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) import os from scapy.all import * import sys #returns [(session,carving)] def carve_http(streams): ret=[] requests=[] for stream in streams: start_pos=0 raw=stream[1]+"\r\n\r\n" carving="" header=""...
# -*- coding: utf-8 -*- # Comunicacao com a placa agilent U2531A # # UFC - Universidade de Federal do Ceará # # Responsáveis: # Felipe Bandeira da Silva # Francisco Alexander # from __future__ import division import platform #if platform.system() == 'Windows': # import visa #else: # import visa_linux_emulatio...
""" Support for LMA data display in brawl4d. These are meant to be lightweight wrappers to coordinate data formats understood by the lmatools package. """ import numpy as np from lmatools.flashsort.autosort.LMAarrayFile import LMAdataFile from stormdrain.bounds import Bounds, BoundsFilter from stormdra...
#!/usr/bin/env python """ Commands related to the syncing assets. """ from glob import glob import logging import os from fabric.api import prompt, task import app_config from fnmatch import fnmatch import utils logging.basicConfig(format=app_config.LOG_FORMAT) logger = logging.getLogger(__name__) logger.setLevel(app...