text
stringlengths
475
200k
from django.shortcuts import render_to_response from django.db.models import Q from django.template import RequestContext from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.utils.translation import ugettext as _ from main.models import Post, Tag from main.forms import PostForm from ut...
# Copyright (c) 2012 Giorgos Verigakis <[EMAIL]> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISC...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
# # Test suite for the textwrap module. # # Original tests written by Greg Ward <[EMAIL]>. # Converted to PyUnit by Peter Hansen <[EMAIL]>. # Currently maintained by Greg Ward. # # $Id: test_textwrap.py 67896 2008-12-21 17:01:26Z benjamin.peterson $ # import unittest from test import test_support from textwrap import...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/L...
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import io import os import platform import re import sys import socket import struct import wa...
# Copyright (C) 2015-2021 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later from math import sqrt from numpy import isclose from rbnics.problems.elliptic.elliptic_coercive_compliant_problem import EllipticCoerciveCompliantProblem from rbnics.problems.elliptic.ellipti...
from __future__ import unicode_literals import re import json import itertools from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse_urlparse, compat_urlparse, ) from ..utils import ( ExtractorError, find_xpath_attr, int_or_none, orderedSet, xpath_wit...
data = ( 'qiet', # 0x00 'qiex', # 0x01 'qie', # 0x02 'qiep', # 0x03 'quot', # 0x04 'quox', # 0x05 'quo', # 0x06 'quop', # 0x07 'qot', # 0x08 'qox', # 0x09 'qo', # 0x0a 'qop', # 0x0b 'qut', # 0x0c 'qux', # 0x0d 'qu', # 0x0e 'qup', # 0x0f 'qurx', # 0x10 'qur', # 0x11 ...
#!/usr/bin/env python ######################################################################## # $Header: $ ######################################################################## __RCSID__ = "$Id$" from DIRAC import exit as DIRACExit from DIRAC.Core.Base import Script Script.setUsageMessage( """ Remove th...
#!/usr/bin/env python # # Copyright 2016 Google 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...
"""Tests for Lib/fractions.py.""" from decimal import Decimal from test.support import requires_IEEE_754 import math import numbers import operator import fractions import sys import unittest import warnings from copy import copy, deepcopy from pickle import dumps, loads F = fractions.Fraction gcd = fractions.gcd cla...
# 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. # This program is distributed in the hope that it will be useful, # but...
""" Modified version of build_ext that handles fortran source files. """ from __future__ import division, absolute_import, print_function import os import sys from glob import glob from distutils.dep_util import newer_group from distutils.command.build_ext import build_ext as old_build_ext from distutils.errors impo...
# Copyright (C) 2015 Philipp Baumgaertel # All rights reserved. # # This software may be modified and distributed under the terms # of the BSD license. See the LICENSE.txt file for details. import numpy as np from scipy.optimize import fmin from scipy.misc import derivative from scipy.stats import norm from .Utiliti...
import unittest2 from lxml import etree import openerp from openerp.tools.misc import mute_logger from openerp.tests import common # test group that demo user should not have GROUP_TECHNICAL_FEATURES = 'base.group_no_one' class TestACL(common.TransactionCase): def setUp(self): super(TestACL, self).setU...
# Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
"""Scrapy Shell See documentation in docs/topics/shell.rst """ from __future__ import print_function import os import signal import warnings from twisted.internet import reactor, threads, defer from twisted.python import threadable from w3lib.url import any_to_uri from scrapy.crawler import Crawler from scrapy.exc...
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <[EMAIL]> # # This file is part of Volatility. # # Volatility 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 F...
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer [EMAIL] # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # Li...
# -*- coding: utf-8 -*- ############################################################################### # # AddChild # Moves a specified folder into a parent folder. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
# This is a component of LinuxCNC # Copyright 2011, 2013, 2014 Dewey Garrett <[EMAIL]>, # Michael Haberler <[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 ...
# -*- 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 -*- from __future__ import unicode_literals from django.db import migrations, models import enumfields.fields import shuup.core.fields import shuup.xtheme.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name...
# 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/. from WebIDL import IDLInterface class Configuration: """ Represents global configuration state based on IDL pa...
# -*- coding: utf-8 -*- """ Tests for In-Course Reverification Access Control Partition scheme """ import ddt import unittest from django.conf import settings from lms.djangoapps.verify_student.models import ( VerificationCheckpoint, VerificationStatus, SkippedReverification, ) from openedx.core.djangoap...
from sympy import symbols, S, I, atan, log, Poly from sympy.integrals.rationaltools import ratint, \ ratint_ratpart, ratint_logpart, log_to_atan, log_to_real from sympy.abc import a, x, t half = S(1)/2 def test_ratint(): assert ratint(S(0), x) == 0 assert ratint(S(7), x) == 7*x assert ratint(x, x) ...
"""Collection of helper methods. All containing methods are legacy helpers that should not be used by new components. Instead call the service directly. """ from homeassistant.components.vacuum import ( ATTR_FAN_SPEED, ATTR_PARAMS, DOMAIN, SERVICE_CLEAN_SPOT, SERVICE_LOCATE, SERVICE_PAUSE, ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.db.models.deletion import modelcluster.fields import wagtail.wagtailcore.fields import wagtail.wagtailcore.blocks class Migration(migrations.Migration): dependencies = [ ('wagtailimages...
#!/bin/env # -*- coding: utf-8 -*- from langconv import * from bs4 import BeautifulSoup import re import os import json #输入Unicode编辑,输出Unicode def big2simple(line): #转换繁体到简体 line = Converter('zh-hans').convert(line) return line def save_img_url(img_url,num): img_url_file = open("img_url.txt","a") line = num+"...
""" Views for serving static textbooks. """ from django.contrib.auth.decorators import login_required from django.http import Http404 from edxmako.shortcuts import render_to_response from opaque_keys.edx.locations import SlashSeparatedCourseKey from xmodule.annotator_token import retrieve_token from courseware.acces...
#! /usr/bin/env python sources = """ @SOURCES@""" import os import sys import base64 import zlib import tempfile import shutil def unpack(sources): temp_dir = tempfile.mkdtemp('-scratchdir', 'unpacker-') for package, content in sources.items(): filepath = package.split(".") dirpath = os.sep....
# Scan an Apple header file, generating a Python file of generator calls. import sys from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX LONG = "CoreFoundation" SHORT = "cf" OBJECTS = ("CFTypeRef", "CFArrayRef", "CFMutableArrayRef", ...
from openerp import netsvc from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.addons.point_of_sale.point_of_sale import pos_session class pos_session_opening(osv.osv_memory): _name = 'pos.session.opening' _columns = { 'pos_config_id' : fields.many2one('pos.config...
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 distributed in the hope that it will ...
"""Response classes used by urllib. The base class, addbase, defines a minimal file-like interface, including read() and readline(). The typical response object is an addinfourl instance, which defines an info() method that returns headers and a geturl() method that returns the url. """ from __future__ import absolut...
import numpy as np import matplotlib.pyplot as plt from scipy import stats npoints = 20 # number of integer support points of the distribution minus 1 npointsh = npoints / 2 npointsf = float(npoints) nbound = 4 #bounds for the truncated normal normbound = (1 + 1 / npointsf) * nbound #actual bounds of truncated normal ...
# A Musepack reader/tagger # # Copyright 2006 Lukas Lalinsky <[EMAIL]> # # This program 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. # # $Id: musepack.py 4013 2007-04-23 09:18:22Z luks $ """Musep...
# -*- coding: utf-8 -*- import cStringIO import datetime from itertools import islice import json import logging import re from sys import maxint import werkzeug.utils import werkzeug.wrappers from PIL import Image import openerp from openerp.addons.web import http from openerp.http import request, Response logger ...
""" ========================== Model Complexity Influence ========================== Demonstrate how model complexity influences both prediction accuracy and computational performance. The dataset is the Boston Housing dataset (resp. 20 Newsgroups) for regression (resp. classification). For each class of models we m...
# -*- coding: utf-8 -*- """ *************************************************************************** aspect.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com ******************...
"""Provide kiskadee queues and operations on them.""" import time from multiprocessing import Queue import kiskadee analysis = Queue() results = Queue() packages = Queue() class Queues(): """Provide kiskadee queues objects.""" @staticmethod def enqueue_analysis(package_to_analysis): """Put a ana...
# Copyright (C) 2013 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 ...
""" test one to many relationships """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six from elixir import * from sqlalchemy import and_ from sqlalchemy.ext.orderinglist import ordering_list def setup(): ...
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext as _ from model_utils import Choices import aristotle_mdr as aristotle """ These models are based on the DDI3.2 and the SQBL XML formats. """ class AdministrationMode(aristotle.models.unmanagedObject...
from jingo import get_env from mock import Mock from pyquery import PyQuery as pq from olympia import amo from olympia.addons.models import Addon def render(s, context=None): """Taken from jingo.tests.utils, previously jingo.tests.test_helpers.""" if context is None: context = {} t = get_env().fr...
"""TLS Lite + smtplib.""" from smtplib import SMTP from tlslite.TLSConnection import TLSConnection from tlslite.integration.ClientHelper import ClientHelper class SMTP_TLS(SMTP): """This class extends L{smtplib.SMTP} with TLS support.""" def starttls(self, username=None, password=None, share...
########################################################################## # Copyright 2009 Carlos Ribeiro # # This file is part of Radio Tray # # Radio Tray 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, eit...
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Adrien Pavie 2017 ## ## ...
from setuptools import setup import os readme = open(os.path.join(os.path.dirname(__file__), 'README'), 'r').read() license = open(os.path.join(os.path.dirname(__file__), 'LICENSE'), 'r').read() setup( name = "data_packager", version = "0.0.1", author = "Ethan Rowe", author_email = "[EMAIL]", desc...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015 Florian Bruhin (The Compiler) <[EMAIL]> # # This file is part of qutebrowser. # # qutebrowser 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...
# coding=utf-8 """ The GridEngineCollector parses qstat statistics from Sun Grid Engine, Univa Grid Engine and Open Grid Scheduler. #### Dependencies * Grid Engine qstat """ import os import re import subprocess import sys import xml.dom.minidom import diamond.collector class GridEngineCollector(diamond.collec...
#! /usr/bin/env python """A Python debugger.""" # (See pdb.doc for documentation.) import sys import linecache import cmd import bdb from repr import Repr import os import re import pprint import traceback class Restart(Exception): """Causes a debugger to be restarted for the debugged python program.""" pa...
# -*- coding: utf-8 -*- # Copyright 2016 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis # Copyright 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import api, fields, models from openerp import SUPERUSER_ID # TODO remove in v10 class BaseI...
#!/usr/bin/env python ''' Run this script every time you change one of the png files. Using pngcrush, it will optimize the png files, remove various color profiles, remove ancillary chunks (alla) and text chunks (text). #pngcrush -brute -ow -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text ''' import os impor...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test variable expansion of '<!()' syntax commands. """ import os import TestGyp test = TestGyp.TestGyp(format='gypd') expect = test....
# 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...
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # py...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban 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;...
# Copyright 2012-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information import stem.response import stem.socket class MapAddressResponse(stem.response.ControlMessage): """ Reply for a MAPADDRESS query. Doesn't raise an exception unless no addresses were mapped successfully. :var di...
#!/usr/bin/env python '''Testing flat map allow_oob enforcement. Press 0-9 to set the size of the view in the window (1=10%, 0=100%) Press arrow keys to move view focal point (little ball) around map. Press "o" to turn allow_oob on and off. You should see no black border with allow_oob=False. Press escape or close...
import sys import unittest from test import test_support from UserList import UserList # We do a bit of trickery here to be able to test both the C implementation # and the Python implementation of the module. # Make it impossible to import the C implementation anymore. sys.modules['_bisect'] = 0 # We must also handl...
#!/usr/bin/env python3 # #### # Copyright 2000 by Timothy O'Malley <[EMAIL]> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in all # cop...
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, Brian Coca <[EMAIL]> # # 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 # (...
# 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...
#!/usr/bin/env python # # Copyright 2007 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 o...
"""\ Augment the "bgen" package with definitions that are useful on the Apple Macintosh. Intended usage is "from macsupport import *" -- this implies all bgen's goodies. """ # Import everything from bgen (for ourselves as well as for re-export) from bgen import * # Simple types Boolean = Type("Boolean"...
import kdb, unittest TEST_NS = "user/tests/swig_py3" class Constants(unittest.TestCase): def setUp(self): pass def test_kdbconfig_h(self): self.assertIsInstance(kdb.DB_SYSTEM, str) self.assertIsInstance(kdb.DB_USER, str) self.assertIsInstance(kdb.DB_HOME, str) self.assertIsInstance(kdb.DEBUG, int...
# 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...
data = ( 'dwaen', # 0x00 'dwaenj', # 0x01 'dwaenh', # 0x02 'dwaed', # 0x03 'dwael', # 0x04 'dwaelg', # 0x05 'dwaelm', # 0x06 'dwaelb', # 0x07 'dwaels', # 0x08 'dwaelt', # 0x09 'dwaelp', # 0x0a 'dwaelh', # 0x0b 'dwaem', # 0x0c 'dwaeb', # 0x0d 'dwaebs', # 0x0e 'dwaes', # 0x...
# -*- encoding: utf-8 -*- # # Copyright © 2012 New Dream Network, LLC (DreamHost) # # Author: Julien Danjou <[EMAIL]> # # 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: utf8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from unittest2 import TestCase from pylijm.list import List class TestDict(TestCase): @property def fixture(self): return List(int) def test_init_good(self): Fix = self.fixture ...
import pytest def test_audit_biosample_characterization_review_lane_not_required( testapp, biosample_characterization, review, ): testapp.patch_json( biosample_characterization['@id'], { 'review': review, 'characterization_method': 'immunoprecipitati...
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
# -*- 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...
# Copyright (c) 2016 EMC 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 requir...
#!/usr/bin/python -u import libxml2 import sys # Memory debug specific libxml2.debugMemory(1) doc = libxml2.newDoc("1.0") comment = doc.newDocComment("This is a generated document") doc.addChild(comment) pi = libxml2.newPI("test", "PI content") doc.addChild(pi) root = doc.newChild(None, "doc", None) ns = root.newNs("...
import uuid from django import http from django.contrib.syndication.views import Feed from django.shortcuts import get_object_or_404 from django.utils.feedgenerator import Rss201rev2Feed as RSS from django.utils.translation import ugettext from olympia import amo from olympia.activity.models import ActivityLog from o...
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 op...
# -*- coding: utf-8 -*- """ Sphinx directive to support embedded IPython code. This directive allows pasting of entire interactive IPython sessions, prompts and all, and their code will actually get re-executed at doc build time, with all prompts renumbered sequentially. It also allows you to input code as a pure pyth...
# coding: utf-8 # # Talks markdown generator for academicpages # # Takes a TSV of talks with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/what_i...
# -*- test-case-name: twisted.mail.test.test_bounce -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Support for bounce message generation. """ import StringIO import rfc822 import time import os from twisted.mail import smtp BOUNCE_FORMAT = """\ From: postmaster@%(failedDomain)s ...
# Copyright 2018 Capital One Services, 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...
#!/usr/bin/env python # Convert calls from Canvas, cn.MOPS, CNVnator, ERDS, Genome STRiP, or RDXplorer to a common format # Usage example: # convert_CNV_calls_to_common_format.py input_filename name_of_caller # name_of_caller must be one of "Canvas", "cn.MOPS", "CNVnator", "ERDS", "Genome_STRiP" (note underscore), or ...
"""Build a sentiment analysis / polarity model Sentiment analysis can be casted as a binary text classification problem, that is fitting a linear classifier on features extracted from the text of the user messages so as to guess wether the opinion of the author is positive or negative. In this examples we will use a ...
# vim: ts=4 sw=4 expandtab import HTMLParser import unittest class _Parser(HTMLParser.HTMLParser): def __init__(self): HTMLParser.HTMLParser.__init__(self) self._tags = [] def handle_starttag(self, tag, attributes): if tag.lower() == 'script': attr = dict(attributes) ...
import numpy import scipy.integrate.odepack from scipy.sparse.linalg import LinearOperator from scipy.ndimage.filters import convolve from scipy.sparse.linalg import gmres import pyopencl as cl import pyopencl.array as cl_array from pyopencl.array import vec import math class CrankNicIntegrator: def __init__(self,...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
from ctypes import c_void_p from django.contrib.gis.gdal.error import GDALException from django.utils import six class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _...
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import _base from .. import ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
from setuptools import find_packages from setuptools import setup package_name = 'demo_nodes_py' setup( name=package_name, version='0.15.0', packages=find_packages(exclude=['test']), data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), (...
from __future__ import division import errno import json import os import sys import time import traceback from twisted.internet import defer, reactor from twisted.python import log from twisted.web import resource, static import p2pool from bitcoin import data as bitcoin_data from . import data as p2pool_data, p2p ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2011 Camptocamp SA (http://www.camptocamp.com) # # Author: Guewen Baconnier (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who take the whole resp...
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2019 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...