text stringlengths 475 200k |
|---|
# Copyright 2019 The Magenta 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 ... |
# -*- coding: utf-8 -*-
#
#
# ===========================================================================
#
# Python class for parsing EDXML data
#
# Copyright (c) 2010 - 2016 by D.H.J. Takken
# ([EMAIL])
#
# This file is part of the EDXML Softwar... |
# -----------------------------------------------------------------------------
# Copyright * 2014, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration. All
# rights reserved.
#
# The Crisis Mapping Toolkit (CMT) v1 platform is licensed under the Apache
#... |
# -*- coding: utf-8 -*-
# loadlimit/channel.py
# Copyright (C) 2016 authors and contributors (see AUTHORS file)
#
# This module is released under the MIT License.
"""Define data channels"""
# ============================================================================
# Imports
# =====================================... |
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... |
#
# pylibssh2 - python bindings for libssh2 library
#
# Copyright (C) 2010 Wallix Inc.
#
# This library is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation; either version 2.1 of the License, or (at your
# o... |
#!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Sending Unicode data over a socket.
"""
#end_pymotw_header
import sys
import SocketServer
class Echo(SocketServer.BaseRequestHandler):
def handle(self):
# Get some bytes and echo them back to the cli... |
import os
import shutil
import sys
import tempfile
import unittest
from io import StringIO
from django.conf import settings
from django.contrib.staticfiles import finders, storage
from django.contrib.staticfiles.management.commands.collectstatic import \
Command as CollectstaticCommand
from django.core.cache.backe... |
#
# Script to extract data from an Azure Serverless Function
# and add it to an AppDynamics Controller as a custom
# Analytics Event. Uses the API documented here:
# https://docs.appdynamics.com/display/PRO42/Analytics+Events+API
#
# This script is broken into three parts:
# 1. Extract the data from Azure Serverless F... |
import os
import numpy as np
from numpy.random import RandomState
from unittest import TestCase
from ..base.constants import MAX_SEED
from ..database import create_session, delete_database, cleanup_database
from ..database.models import Interaction, Protein
from ..models.binary_relevance import MixedBinaryRelevanceCl... |
# 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... |
# ===========================================================================
# eXe
# Copyright 2004-2006, University of Auckland
# Copyright 2004-2008 eXe Project, http://eXeLearning.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... |
# -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the... |
# 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... |
#!/usr/bin/env python
# Copyright 2016 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.
"""
Uploads or downloads third party libraries to or from google cloud storage.
This script will only work for Android checkouts.
"""
... |
from __future__ import print_function
import constants, rauth, subprocess, os, json, base64, urlparse
"""
Auth module for OneNote.
Our strategy is to store only the refresh token and use it every time to get a new access token.
"""
def get_oauth_service():
client_id, client_secret = json.loads(base64.b64decode(c... |
# -*- coding: utf-8 -*-
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:
User = get_user_model()
user_orm_label... |
# Databricks notebook source
# MAGIC %md
# MAGIC # Implementation of [PSPNet](https://arxiv.org/pdf/1612.01105.pdf) with distributed training using Horovod
# MAGIC
# MAGIC William Anzén ([Linkedin](https://www.linkedin.com/in/william-anz%C3%A9n-b52003199/)), Christian von Koch ([Linkedin](https://www.linkedin.com/in/c... |
#!/usr/bin/python
# -*- coding: utf8 -*-
'''
Created on 19.12.2013
@author: heinz-peterlang
For details: `check Sesame REST API<http://openrdf.callimachus.net/sesame/2.7/docs/system.docbook?view#The_Sesame_REST_HTTP_Protocol>`_
http://www.csee.umbc.edu/courses/graduate/691/spring14/01/examples/sesame/openrdf-sesame-... |
# -*- coding: utf-8 -*-
from six.moves import http_client as http
import flask
import werkzeug
from webargs import flaskparser
from flask_apispec import utils
class Wrapper(object):
"""Apply annotations to a view function.
:param func: View function to wrap
:param instance: Optional instance or parent... |
# -*- coding:utf-8 -*-
#-------------------
__version__ = "1.0"
__author__ = "sn0wfree"
#-------------------
import os
import platform
import zipfile
import loadingsplit
import download2 as download
import multiprocessing as mp
def check_zipfile_for_pool(zip_file_path_lists):
if zipfile.is_zipfile(zip_file_pa... |
import os
from bcbio.utils import file_exists
import bcbio.pipeline.datadict as dd
from bcbio.ngsalign.postalign import dedup_bam
from bcbio.distributed.transaction import file_transaction
from bcbio import broad, bam
def rnaseq_gatk_variant_calling(data):
data = dd.set_deduped_bam(data, dedup_bam(dd.get_work_bam... |
# -*- coding: utf8 -*- *
#* These are a FreeCAD & cadquery tools *
#* to export generated models in STEP & VRML format. *
#* *
#* cad ... |
# Copyright 2018,2019,2020,2021 Sony 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 applicable law or a... |
# coding=utf-8
# Copyright 2021 The Tensor2Tensor 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... |
#!/usr/bin/env python
# encoding: utf-8
import operator
from collections import defaultdict
import numpy as np
from scipy import sparse, stats
from quoll.classification_pipeline.functions import vectorizer
class FCBF:
"""
Created by Prashant Shiralkar on 2015-02-06.
Fast Correlation-Based Filter (FCBF) a... |
###############################################################################
##
## Copyright (c) Crossbar.io Technologies 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
##
##... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The freesurfer module provides basic functions for interfacing with
freesurfer tools.
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os... |
# Copyright 2013 Viewfinder Inc. All Rights Reserved.
"""Object store high level utilities.
"""
__author__ = '[EMAIL] (Marc Berhault)'
import cStringIO
import gzip
import logging
import subprocess
import sys
import traceback
from functools import partial
from tornado import gen, options
from viewfinder.backend.bas... |
"""
Tick locating and formatting
============================
This module contains classes to support completely configurable tick
locating and formatting. Although the locators know nothing about major
or minor ticks, they are used by the Axis class to support major and
minor tick locating and formatting. Generic t... |
# coding: utf-8
import multiprocessing
import os
import time
import tempfile
from unittest2 import TestCase
from robottelo.decorators.func_locker import (
get_temp_dir,
lock_function,
locking_function,
set_default_scope,
LOCK_FILE_NAME_EXT,
TEMP_FUNC_LOCK_DIR,
TEMP_ROOT_DIR,
FunctionLo... |
import sys
sys.path.append('..')
import csv
from itertools import izip, chain, starmap, tee
from math import sin, cos, pi
from time import time
from pyglet.gl import *
from pyglet.window import *
from pyspades.vxl import VXLData
from pyspades.common import Vertex3
from pyspades.navigation import Navigation
MAP_X = ... |
# Copyright (c) 2008-2009 Citrix Systems Inc.
#
# 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; version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... |
#
# The Python Imaging Library.
# $Id$
#
# PCX file handling
#
# This format was originally used by ZSoft's popular PaintBrush
# program for the IBM PC. It is also supported by many MS-DOS and
# Windows applications, including the Windows PaintBrush program in
# Windows 3.
#
# history:
# 1995-09-01 fl Created
# 1996... |
# -*- 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... |
# -*- coding: utf-8 -*-
from src.lib.ark_twokenize_py import twokenize
from . import url_regex, url2_regex, mention_regex, brown_cluster_dict
import re
def brown_cluster(tweet_text):
"""
Get a distribution of brown cluster of a tweet and check if it contains URL or not
:param tweet_text: Tweet content ... |
#!/usr/bin/python
from __future__ import division
__author__ = "Wenchao Lin"
__copyright__ = "Copyright 2014,Tianjin Biochip Corp."
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "Wenchao Lin"
__email__ = "[EMAIL]"
from Bio import SeqIO
import sys
from optparse import OptionParser
import numpy as np
d... |
"""
Each store has slightly different semantics wrt draft v published. XML doesn't officially recognize draft
but does hold it in a subdir. Old mongo has a virtual but not physical draft for every unit in published state.
Split mongo has a physical for every unit in every state.
Given that, here's a table of semantics... |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
import unittest
from mock import Mock, patch, PropertyMock
from repstruct.retrieval.flickrwrapper import *
from repstruct.dataset import *
class TestFlickrWrapper(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def testDownloader(self):
urllib.urlretrieve = M... |
"""
Application-class that implements pyFoamJoinCSV.py
"""
from optparse import OptionGroup
from .PyFoamApplication import PyFoamApplication
from .CommonReadWriteCSV import CommonReadWriteCSV
from PyFoam.Basics.SpreadsheetData import SpreadsheetData
from os import path
class JoinCSV(PyFoamApplication,
... |
#!/usr/bin/env python
# Copyright (c) 2014, Palo Alto Networks
#
# Permission to use, copy, modify, and/or 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" A... |
'''
@author: Blair Elzinga
create date: Nov 12, 2015
module description: unit tests for UserLib module
'''
import unittest
from UserLib import UserLib
class TestUserLib(unittest.TestCase):
def setUp(self):
self.userLib = UserLib()
def test_add1(self):
self.userLib.add('one','two')
self.assertE... |
#!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
"""
How to use this file:
from _dippy import *
_Solve = Solve
def Solve(prob, params=None):
# Set up prob here, must have DipAPI as a base class
# call the Solve method from _dippy
try:
solList, dualList = _Solve(prob, processed)
# solList is a list of (col_name, value) pairs
# dualLi... |
import asyncio
from unittest import mock
import pytest
from multidict import CIMultiDict
from aiohttp.protocol import HttpVersion11, RawRequestMessage
from aiohttp.signals import Signal
from aiohttp.web import Application, Request, Response
@pytest.fixture
def app(loop):
return Application(loop=loop)
@pytest.... |
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.base import is_affirmative
from datadog_checks.base.checks.openmetrics import OpenMetricsBaseCheck
DEFAULT_METRICS = [
# nginx metrics
{'nginx_ingress_controller_nginx_process_... |
#!/usr/bin/env python
"""
A terminal browser, similar to less(1) for testing printable width of unicode.
This displays the full range of unicode points for 1 or 2-character wide
ideograms, with pipes ('|') that should always align for any terminal that
supports utf-8.
Usage:
./bin/wcwidth-browser.py [--wide=<n>]
... |
#coding=utf8
import os
import mapnik
from utilities import execution_path, run_all
from nose.tools import eq_
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
if 'shape' in mapnik.DatasourceCache.plugin_names()... |
#!/usr/bin/env python3
# Copyright (c) 2020 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 addr relay
"""
from test_framework.messages import (
CAddress,
NODE_NETWORK,
NODE_WITNESS... |
#!/usr/bin/env python
# encoding: utf-8
#
# 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 Licens... |
# -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Scientific Package. This package holds all simulators, and
# analysers necessary to run brain-simulations. You can use it stand alone or
# in conjunction with TheVirtualBrain-Framework Package. See content of the
# documentation-folder for more details. See also http://www... |
# 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... |
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016 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... |
import glob
import os
import shutil
import sys
import xml.dom.minidom
#------------------------------------------------------------------------------------------
# DOM helper functions
#------------------------------------------------------------------------------------------
def getMatchingChildNodes(node, name):
l... |
from datetime import datetime
__start_time__ = datetime.now()
__end_time__ = 0
__last_lap__ = 0
__lap_list__ = []
def __get_micro_seconds__(datetime_obj):
total_microseconds = datetime_obj.microseconds + datetime_obj.seconds * (10 ** 6)
return total_microseconds
def initialize():
global __lap_list__
__lap_li... |
# -*- coding: utf-8 -*-
# Copyright (c) 2012-2015 CoNWeT Lab., Universidad Politécnica de Madrid
# This file is part of Wirecloud.
# Wirecloud 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 v... |
""" Test refcounting and behavior of SCXX.
"""
from __future__ import absolute_import, print_function
import sys
from UserList import UserList
from numpy.testing import (TestCase, dec, assert_equal, assert_, assert_raises,
run_module_suite)
from scipy.weave import inline_tools
from weave_... |
# !/usr/bin/env python
#recreates a Miriad UDB file
import time, os
import numpy as np
def udbfile_recreate(ufile_in, ufilename):
'''Read in a UDB dataset, correct the variables nschan, ischan,
and write out the file'''
import aipy
if len(ufile_in) == 0:
print 'udbfile_recreate: No... |
#!/usr/bin/env python2
# coding=utf-8
# -----------------------------------------------------------------------------
# Name: export_html.py
# Purpose: JDF database editor's html creator
# Author: Damian Chrzanowski
# Created: 14/04/16
# Modified: 14/04/16
# Copyright: [EMAIL]
# License: GN... |
from django.conf import settings
from django.test import TestCase, modify_settings
from django.urls import reverse
from mymoney.apps.bankaccounts.factories import BankAccountFactory
from mymoney.core.factories import UserFactory
from ..factories import BankTransactionTagFactory
@modify_settings(MIDDLEWARE={
're... |
import re
import os
import pandas as pd
import numpy as np
import plotly.plotly as py
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
from lib import plot_formatters as pf
init_notebook_mode(connected=True)
def bar_switch(df):
#function for creating p... |
#!/usr/bin/env python
from setuptools import setup
setup(
name='gssapi_console',
version='1.0.0',
author='The Python GSSAPI Team',
author_email='[EMAIL]',
packages=['gssapi_console'],
scripts=['gssapi-console.py'],
description='An interactive tool for testing Python GSSAPI programs',
l... |
# Copyright (c) 2008, Humanized, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditio... |
# Copyright 2011 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 ... |
#
# Copyright (C) 2011, 2012 Pablo Barenbaum <[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 progra... |
#!/usr/bin/env python
"""
This module provides simple wrappign functions for topia
"""
# from topia.termextract import extract
from data_parser import DataParser
from util.data_dumper import DataDumper
import numpy as np
import traceback
class KeywordExtractor(object):
def __init__(self, raw_labels, raw_data, datas... |
#!/usr/bin/python
import shutil, tempfile, os, optparse, logging
usage = "usage: %prog [options]"
parser = optparse.OptionParser(usage=usage)
parser.add_option("-i", "--isofile", help="ISO image", dest="isoimg")
parser.add_option("-d", "--domainid", help="Domain id ", dest="domainid")
parser.add_option("-n", "--vsmnam... |
#!/usr/bin/python3
## system-config-printer
## Copyright (C) 2006, 2007, 2008, 2010, 2013 Red Hat, Inc.
## Authors:
## Florian Festi <[EMAIL]>
## Tim Waugh <[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
## th... |
# coding=utf-8
# (The line above is necessary so that I can use 世界 in the
# *comment* below without Python getting all bent out of shape.)
# Copyright 2007-2009 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 o... |
import cv
# create windows for displaying our results
cv.NamedWindow('original image', cv.CV_WINDOW_AUTOSIZE)
cv.NamedWindow('threshed image', cv.CV_WINDOW_AUTOSIZE)
# create our image from a file
#image = cv.LoadImage('yellow-ball.png', cv.CV_LOAD_IMAGE_COLOR)
#image = cv.LoadImage('yellow-ball-multiple-blobs.png',... |
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.contrib import messages
from django.core import serializers
from django.shortcuts import render, redirect
from django.db.models import Q, F
from django.http import Http404
from lms.envs.common import STATE_CHOICES
from dj... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
#... |
import pytest
from flask import url_for, request
from werkzeug.exceptions import Forbidden, Unauthorized
from pypnusershub.db.tools import (
UnreadableAccessRightsError,
)
from .bootstrap_test import app, json_of_response, get_token
from geonature.core.gn_permissions.models import (
VUsersPermissions,
TF... |
import base64
import struct
from typing import List
from binascii import hexlify
from itertools import chain
from lbry.schema.types.v2.result_pb2 import Outputs as OutputsMessage
class Outputs:
__slots__ = 'txos', 'extra_txos', 'txs', 'offset', 'total'
def __init__(self, txos: List, extra_txos: List, txs: ... |
# This file is part of Ansible
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import base64
import json
import os
i... |
#
# Copyright 2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
""" Automatically create YAML bindings for GRC from block code """
import os
import re
import glob
import logging
import yaml
from collections import OrderedDict
try:
from yaml ... |
# Copyright 2020 The HuggingFace Team. 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 applicabl... |
# Copyright (c) 2011 Citrix Systems, 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 ... |
#fasta
import re
import sys
import parse
from collections import defaultdict
#first argument: fasta filename, 2nd argument: xwalk filename, 3rd argument: a.a. of interest
#EXAMPLE: python readxwalk2.py ECRNINVIVO1.fasta uvrdrnap.txt K > output.txt
parser = argparse.ArgumentParser(description='''
pScatter
Inte... |
from __future__ import print_function, division, absolute_import
import io
import os
from distutils.version import LooseVersion
from warnings import warn
from toolz import merge
from .compression import seekable_files, files as compress_files
from .utils import (SeekableFile, read_block, infer_compression,
... |
from django.db import models
from django.utils.translation import ugettext, ugettext_lazy as _
class PersonDiscipleship(models.Model):
class Meta:
verbose_name = _('Person in Discipleship')
verbose_name_plural = _('People in Discipleship')
unique_together = ('disciple', 'discipleship')
... |
#!/usr/bin/env python
import argparse
import socket
import sys
parser = argparse.ArgumentParser()
parser.add_argument('host', metavar='HOST', type=str,
help='Hostname to knock at')
parser.add_argument('ports', metavar='PORT', type=int, nargs='+',
help='Port(s) to use, in orde... |
"""Remove keyvalue properties table
Revision ID: d5dcee6894fa
Revises: 66971a97040e
Create Date: 2017-12-29 17:39:24.192424
"""
# revision identifiers, used by Alembic.
revision = 'd5dcee6894fa'
down_revision = '66971a97040e'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
from... |
#!/usr/bin/env python
from subprocess import call
import sys,getopt,numpy as np
import matplotlib
from pylab import *;
import swap
def make_info_plots(argv):
"""
NAME
make_info_plots
PURPOSE
Given stage1 and stage2 bureau pickles, this script produces the
several plots for the... |
# Copyright 2013 IBM Corp.
#
# 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 t... |
# -*- coding: utf-8 -*-
# Copyright 2009-2016 Odin Hørthe Omdal
# This file is part of Medlemssys.
# Medlemssys 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
# (a... |
#!/usr/bin/env python
#
# Copyright (C) 2011 Roberto A. Martinez Perez
#
# This file is part of data-is-fun.
#
# data-is-fun 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 t... |
#!/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 distribut... |
# -*- coding: utf-8 -*-
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
if PY3:
import urllib.parse as urlparse # Es muy lento en PY2. En PY3 es nativo
else:
import urlparse ... |
from django.forms.forms import BoundField
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
class FormLayout(object):
def __unicode__(self):
return self.render_layout()
class Fieldset(FormLayout):
''' Fieldset container. '''
def __init__(self, legen... |
from __future__ import division, print_function, absolute_import
import functools
import operator
import sys
import warnings
import numbers
import numpy as np
def _aligned_zeros(shape, dtype=float, order="C", align=None):
"""Allocate a new ndarray with aligned memory.
Primary use case for this currently is... |
#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import argparse
import re
import os
import sqlite3
import sys
def parsearguments():
parser = argparse.ArgumentParser(description='regist images to sqlite3 database')
parser.add_argument('dbname')
return parser.parse_args()
def registimages(dbname, imagedir)... |
# -*- coding:utf-8 -*-
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2011 Paul Colomiets
# Copyright (c) 2012 roger
# Copyright (c) 2012-2014 Tycho Andersen
# Copyright (c) 2013 Tao Sauvage
# Copyright (c) 2013 Arnas Udovicius
# Copyright (c) 2014 ramnes
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 Nathan ... |
# Copyright 2014 0xc0170
#
# 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, soft... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import exceptions
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.addons.sales_team.tests.common import TestSalesMC
from odoo.tests.common import users, TransactionCase
from odoo.tools im... |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
# !/usr/bin/env python
# -*- coding: utf-8 -*-
# created by restran on 2016/1/2
from __future__ import unicode_literals, absolute_import
import re
import traceback
from datetime import datetime
from django.utils.encoding import smart_str
from django.utils.http import urlquote
from django.shortcuts import render_to_r... |
# Copyright 2013 IBM Corp.
# 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 app... |
from __future__ import absolute_import, division, unicode_literals
from . import support # flake8: noqa
import unittest
import codecs
from io import BytesIO
from six.moves import http_client
from html5lib.inputstream import (BufferedStream, HTMLInputStream,
HTMLUnicodeInputStream, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.