text
stringlengths
475
200k
import fnmatch import logging import os from urlparse import urlparse from distlib.version import UnsupportedVersionError from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.db import models from django.template.defaultfilters import slu...
# -*- coding: utf-8 -*- from outwiker.core.attachment import Attachment from outwiker.core.defines import PAGE_ATTACH_DIR from .basethumbgenerator import BaseThumbGenerator class ThumbTableGenerator (BaseThumbGenerator): """ Создание списка превьюшек в виде таблицы """ def __init__(self, items, thum...
import sys import inspect from functools import update_wrapper from ._compat import iteritems from ._unicodefun import _check_for_unicode_literals from .utils import echo from .globals import get_current_context def pass_context(f): """Marks a callback as wanting to receive the current context object as fir...
# 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...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# -*- coding: utf-8 -*- ############################################################################### # Copyright (C) Bull S.A.S (2010, 2011) # Contributor: Pierre Vignéras <[EMAIL]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
from browser.local_storage import storage # legacy import from browser.session_storage import storage as sess_storage # legacy import from browser.object_storage import ObjectStorage assert(storage.storage_type == "local_storage") assert(sess_storage.storage_type == "session_storage") storage.clear() sess_storage.c...
# Copyright (c) 2010 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 list of conditions and the ...
# Copyright (C) 2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 versio...
from django.template import TemplateDoesNotExist, TemplateSyntaxError from django.test import SimpleTestCase from ..utils import setup from .test_extends import inheritance_templates class ExceptionsTests(SimpleTestCase): @setup({'exception01': "{% extends 'nonexistent' %}"}) def test_exception01(self): ...
""" blink1_pyusb.py -- blink(1) Python library using PyUSB Uses "PyUSB 1.0" to do direct USB HID commands See: https://github.com/walac/pyusb Linux (Ubuntu/Debian): % sudo apt-get install pip % sudo pip install pyusb Note: will give "not claimed" error or similar. Try blink1.py instead Mac OS X: do "brew inst...
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
"""API for communicating with twitch""" from __future__ import absolute_import import functools import logging import os import threading import m3u8 import oauthlib.oauth2 import requests import requests.utils import requests_oauthlib from pytwitcherapi.chat import client from . import constants, exceptions, model...
# encoding: utf-8 """ Utility functions for loading files for unit testing """ import os import sys from lxml import etree from pptx.oxml import oxml_parser _thisdir = os.path.split(__file__)[0] test_file_dir = os.path.abspath(os.path.join(_thisdir, '..', 'test_files')) def abspath(relpath): thisdir = os.pa...
import json import os from ctypes import addressof, byref, c_double, c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.driver import Driver from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.gdal.prototypes import raster as capi from django.contrib.gis...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <[EMAIL]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
# 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...
# Default Django settings. Override these with settings in the module # pointed-to by the DJANGO_SETTINGS_MODULE environment variable. # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. gettext_noop = lambda s: s #################...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # Contributor: Pedro M. Baeza # Copyright 2015 Serv. Tecnol. Avanzados # # 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...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
""" interactive debugging with PDB, the Python Debugger. """ from __future__ import absolute_import import pdb import sys import pytest def pytest_addoption(parser): group = parser.getgroup("general") group._addoption('--pdb', action="store_true", dest="usepdb", default=False, h...
# -*- coding: utf-8 -*- """URL router for v1 API endpoints.""" from ..routers import GroupedRouter from .viewsets import ( BrowserViewSet, FeatureViewSet, MaturityViewSet, ReferenceViewSet, SectionViewSet, SpecificationViewSet, SupportViewSet, VersionViewSet, HistoricalBrowserViewSet, HistoricalFeatureView...
#!/usr/bin/env python from xml.sax.saxutils import escape, quoteattr from emit import Emit from param import known_param_fields, known_units from lxml import etree # Emit ArduPilot documentation in an machine readable XML format for Mission Planner class XmlEmitMP(Emit): def __init__(self, *args, **kwargs): ...
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from core.vectors import PhpCode, ShellCmd, ModuleExec, Os from core.module import Module from core import modules class Cp(Module): """Copy single file.""" aliases = [ 'cp', 'copy' ] def init(self): self.register_info( { 'author': [ 'Emilio Pinna...
__license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' ''' Code to manage ebook library''' def db(path=None, read_only=False): from calibre.db.legacy import LibraryDatabase from calibre.utils.config import prefs from calibre.utils.filenames import expanduser return Libra...
#========================================================================= # pisa_slt_test.py #========================================================================= import pytest import random import pisa_encoding from pymtl import Bits from PisaSim import PisaSim from pisa_inst_test_utils import * #---------...
# Copyright (C) 2012- Sebastian Spaeth & contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # ...
""" Unshuffle previously shuffled file unshuffle.py input_file.csv output_file.csv <max. lines in memory> <random seed> """ import sys import random input_file = sys.argv[1] output_file = sys.argv[2] try: lines_in_memory = int( sys.argv[3] ) except IndexError: lines_in_memory = 100000 print "caching %s lines at...
__author__ = 'parallels' import logging logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.CRITICAL) import pika import sys connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost')) channel = connection.channel() channel.exchange_declare(exchange='direct_logs', ...
"""QBD (Questionnaire Bank Details) Module""" from ..date_tools import FHIR_datetime class QBD(object): """Details needed to define a QB""" def __init__( self, relative_start, iteration, recur=None, recur_id=None, questionnaire_bank=None, qb_id=None): """Hold details needed to...
# -*- coding: utf-8 -*- # # Copyright 2010-2015 The pygit2 contributors # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, # as published by the Free Software Foundation. # # In addition to the permissions in the GNU General Public Li...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Most of this file was ported over from Blink's # webkitpy/layout_tests/layout_package/json_results_generator_unittest.py # import unittest import json ...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2015-2016 Rapptz 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 u...
# -*- coding: utf-8 -*- import codecs import re from os import path from distutils.core import setup from setuptools import find_packages def read(*parts): return codecs.open(path.join(path.dirname(__file__), *parts), encoding='utf-8').read() def find_version(*file_paths): version_fil...
"""Compatibility module defining operations on duck numpy-arrays. Shamelessly copied from xarray.""" import numpy as np try: import dask.array as dsa has_dask = True except ImportError: has_dask = False def _dask_or_eager_func(name, eager_module=np, list_of_args=False, n_array_args=1): """Create a...
# mako/ast.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for analyzing expressions and blocks of Python code, as well as generating Python from AS...
""" WSGI config for Aike project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
# -*- coding: utf-8 -*- # $Id: ru.py 7123 2011-09-12 08:28:31Z milde $ # Author: Roman Suzi <[EMAIL]> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # tr...
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne 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 # # h...
# coding: utf-8 from __future__ import unicode_literals import pytest from mock import Mock from ..vocab import Vocab from ..tokens import Doc, Span, Token from ..tokens.underscore import Underscore def test_create_doc_underscore(): doc = Mock() doc.doc = doc uscore = Underscore(Underscore.doc_extension...
# -*- coding: utf-8 -*- ############################################################################## # # Author Joel Grand-Guillaume and Vincent Renaville Copyright 2013 # Camptocamp SA # CSV data formating inspired from # http://docs.python.org/2.7/library/csv.html?highlight=csv#examples # # This program...
# -*- coding: utf-8 -*- import re from .._globals import IDENTITY from ..helpers.methods import varquote_aux from .base import BaseAdapter class MySQLAdapter(BaseAdapter): drivers = ('MySQLdb','pymysql', 'mysqlconnector') commit_on_alter_table = True support_distributed_transaction = True types = { ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This module handles file-backed storage of the core classes. The storage is logically organized as follows: Storage -> N Archives -> 1 Symbol index ...
#!/usr/bin/env python #python 2.7.5 requires biopython #crossClustCount.py #Version 1. Adam Taranto, April 2015 #Contact, Adam Taranto, [EMAIL] #Take two transcriptomes and a Corset cluster map. #Determine number of member transcripts in each cluster that belong to each of the input transcriptomes. import os import c...
# Copyright 2014 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.org/licenses/LICENSE-2.0 # # Unless required ...
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import numpy as np from numpy import (abs, arctan2, asarray, cos, exp, floor, log, log10, arange, pi, prod, roll, seterr, sign, sin, sqrt, sum, where, zeros, tan, tanh, dot) try: from sci...
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import str_to_int class NineGagIE(InfoExtractor): IE_NAME = '9gag' _VALID_URL = r'''(?x)^https?://(?:www\.)?9gag\.tv/ (?: v/(?P<numid>[0-9]+)| p/(?P<id>[a-zA-Z0-9]+)/(...
# -*- coding: utf-8 -*- """ License: BSD (c) 2009 ::: www.CodeResort.com - BV Network AS ([EMAIL]) """ import os import unittest import urllib2 from tracrpc.tests import rpc_testenv, TracRpcTestCase from tracrpc.api import IRPCProtocol from trac.core import * from trac.test import Mock class ProtocolProvider...
class MyGen: def __init__(self): self.v = 0 def __iter__(self): return self def __next__(self): self.v += 1 if self.v > 5: raise StopIteration return self.v def gen(): yield from MyGen() def gen2(): yield from gen() print(list(gen())) print(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...
# 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...
from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.forms import Form from django.forms.fields import IntegerField, BooleanField from django.forms.utils import ErrorList from django.forms.widgets import HiddenInput from django.utils.encoding import python_2_unicode_co...
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # 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...
# time # # Copyright Jelmer Vernooij 2010 <[EMAIL]> # # 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 i...
""" 9. Many-to-many relationships via an intermediary table For many-to-many relationships that need extra fields on the intermediary table, use an intermediary model. In this example, an ``Article`` can have multiple ``Reporter`` objects, and each ``Article``-``Reporter`` combination (a ``Writer``) has a ``position`...
# Copyright (C) 2012 Nippon Telegraph and Telephone 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/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Patrick F. Marques <[EMAIL]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
#!/usr/bin/env python3 # Copyright (c) 2016-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test processing of feefilter messages.""" from decimal import Decimal import time from test_framework...
def array(p_object, dtype=None, copy=True, order=None, subok=False, ndmin=0): # real signature unknown; restored from __doc__ """ array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0) Create an array. Parameters ---------- object : array_like An arr...
"""Loading unittests.""" import os import re import sys import traceback import types import unittest from fnmatch import fnmatch from django.utils.unittest import case, suite try: from os.path import relpath except ImportError: from django.utils.unittest.compatibility import relpath __unittest = True de...
"""Contains form class defintions for form for the questions app. Classes: [ SurveyQuestionForm ] """ from django import forms from django.core.urlresolvers import reverse from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout fro...
#!/usr/bin/env python # # Copyright 2006, 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 list...
# -*- coding: utf-8 -*- """ Video xmodule tests in mongo. """ import json from collections import OrderedDict from uuid import uuid4 from tempfile import mkdtemp import shutil import ddt from django.conf import settings from django.core.files import File from django.core.files.base import ContentFile from django.test...
from __future__ import absolute_import, unicode_literals import os from datetime import timedelta, datetime from celery.task import task, group from celery.utils.log import get_task_logger from django.conf import settings from django.core.files.storage import default_storage from django.core.management import call_co...
"""Support for Vera scenes.""" import logging from homeassistant.components.scene import Scene from homeassistant.util import slugify from . import VERA_CONTROLLER, VERA_ID_FORMAT, VERA_SCENES _LOGGER = logging.getLogger(__name__) def setup_platform(hass, config, add_entities, discovery_info=None): """Set up t...
# -*- coding: utf-8 -*- from rest_framework import status as http_status import mock import datetime import pytest import unittest from json import dumps from nose.tools import * # noqa (PEP8 asserts) from tests.base import OsfTestCase, get_default_metaschema from osf_tests.factories import ProjectFactory, UserFacto...
#Coded by Matthew Harrison, July, 2015. #Read ESRI shapefiles and calculate district areas #Using Albers Equal Area Projection for North America #Including Alaska and Hawaii from mpl_toolkits.basemap import Basemap from pyproj import Proj from shapely.geometry import LineString, Point, shape import fiona from fiona im...
############################################################################# ## ## Copyright (C) 2015 The Qt Company Ltd. ## Contact: http://www.qt.io/licensing ## ## This file is part of Qt Creator. ## ## Commercial License Usage ## Licensees holding valid commercial Qt licenses may use this file in ## accordance wit...
#!/usr/bin/python ## Revision history ############################################################ __author__ = 'Wouter Eerdekens <[EMAIL]>' __date__ = '2011-08-12' __version__ = 0.1 __history__ = """ 2011-08-12 - Prepare for initial release <[EMAIL]> 2006-07-26 - initial version. """ #############################...
from django import template from django.conf import settings from django.db import models from django.contrib.sites.models import Site from django.template import Context, loader register = template.Library() Analytics = models.get_model('googleanalytics', 'analytics') def do_get_analytics(parser, token): conte...
#! /usr/bin/env python # encoding: utf-8 """ Copyright 2016 Nathan John Sowatskey These are sample functions for the Cisco Fog Director REST API. See: http://www.cisco.com/c/en/us/td/docs/routers/access/800/software/guides/iox/fog-director/reference-guide/1-0/fog_director_ref_guide.html Licensed under the Apache L...
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
#!/usr/bin/python # Client for the backdoor which # uses HTTP CODE header for inserting code # Got the idea after seeing this sort of payload # dropped by a phpmyadmin exploit on rdot :) # Is also good to learn how to use urllib # and not be lazy arse with requests all of time! # Insecurety Research (2013) - insecurety...
import os.path import numpy from filter import Filter from ..utils.svm import SVM class SVMFilter(Filter): """An abstract class representing a filter that uses SVM""" def __init__(self, threshold, invert_threshold, svm_file): super(SVMFilter, self).__init__(threshold, invert_threshold) if...
# Spec: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#asset import base64 import io import json import os import struct from collections import namedtuple import numpy from PIL import Image from pyrr import Matrix44, matrix44, quaternion import moderngl from demosys import context from ...
# Copyright (c) 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 ...
import pkg_resources from pyramid.view import view_config from ringo.lib.helpers import ( get_ringo_version, get_app_version, get_app_name, get_app_title ) from ringo.lib.renderer import ( DTListRenderer ) @view_config(route_name='home', renderer='/index.mako') def index_view(request): value...
# -*- coding: utf-8 -*- """ pygments.lexers.python ~~~~~~~~~~~~~~~~~~~~~~ Lexers for Python and related languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygro...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import flt, today from erpnext.accounts.utils import get_fiscal_year from erpnext.accounts.doctype.jour...
# Author: Andrew Jewett ([EMAIL]) # http://www.chem.ucsb.edu/~sheagroup # License: 3-clause BSD License (See LICENSE.TXT) # Copyright (c) 2012, Regents of the University of California # All rights reserved. import random, math from collections import deque from array import array try: from .ttree_lex imp...
#!/usr/bin/python # # Copyright (C) 2008 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...
# 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 appl...
#! /usr/bin/env python """The Tab Nanny despises ambiguous indentation. She knows no mercy. tabnanny -- Detection of ambiguous indentation For the time being this module is intended to be called as a script. However it is possible to import it into an IDE and use the function check() described below. Warning: The ...
from __future__ import print_function import argparse from functools import partial def keep_line(line, pos_cols, region): fields = line.rstrip().split(b'\t') if fields[pos_cols[0]] == region[0]: # same chromosome if ( region[1] < int(fields[pos_cols[1]]) < region[2] ) or ( ...
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # A implementation of the GMenuModel export of menus/actions on DBus. # GMen...
from bs4 import BeautifulSoup from couchpotato.core.helpers.encoding import tryUrlencode from couchpotato.core.helpers.variable import tryInt from couchpotato.core.logger import CPLog from couchpotato.core.providers.torrent.base import TorrentProvider import traceback log = CPLog(__name__) class IPTorrents(TorrentPr...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update Piwik for nodes that were forked, registered or templated prior to October 2014. """ import datetime import logging import sys import time from modularodm import Q from framework.analytics.piwik import _update_node_object from scripts import utils as scripts_ut...
try: import uwsgi except ImportError: pass # raise ImportError('uWSGI is required to run this package') from django.contrib.auth.decorators import login_required, user_passes_test from django.http import HttpResponse from django.template import RequestContext from django.utils.functional import Promise from...
#!/usr/bin/env python3.4 # import sys import uuid import smtplib import time import logging from email.mime.text import MIMEText from ACNode import ACNode class AlertEmail(ACNode): default_smtphost = 'localhost' default_smtpport = 25 default_alertsubject = "[Node alert]" default_alertfrom = 'acnode@unknown' ...
# Copyright (C) 2010 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 list of conditions and the ...
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2019 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.com/license.html. # # This software consists ...
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, connection, models, router, transaction...
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 r...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Justin Santa Barbara # 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.apach...
# -*- coding: utf-8 -*- """ *************************************************************************** lasmerge.py --------------------- Date : September 2013 Copyright : (C) 2013 by Martin Isenburg Email : martin near rapidlasso point com ****************...
from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ from djblets.util.fields import Base64Field from reviewboard.scmtools.models import Repository class FileDiff(models.Model): """ A diff of a single file. This contains the patch and inform...
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...