This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
| # Last updated May, 2024 for Apple silicon Macs | |
| # Install Homebrew if you don't already have it: https://brew.sh | |
| # install nano from homebrew | |
| brew install nano nanorc | |
| # update your nanorc file | |
| echo 'include "'"$(brew --cellar nano)"'/*/share/nano/*.nanorc"' >> ~/.nanorc | |
| # close and re-open your terminal and you'll have syntax highlighting |
| # pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | |
| # expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu | |
| # tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks | |
| # OSX terminal | |
| brew install qemu | |
| # kernel-qemu is a linux kernel compiled with ARM1176 support. | |
| # learn more here: http://xecdesign.com/compiling-a-kernel/ | |
| curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu | |
| curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest |
This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb
| <?php | |
| /** | |
| * Plugin Name: Custom Post Types Example | |
| * Description: An example plugin to create custom post types with custom taxonomies and custom meta fields, including exposing to the REST API. | |
| * Plugin URI: http://kosso.co.uk | |
| * Version: 1.0.0 | |
| * Author: Kosso | |
| * Author URI: http://kosso.co.uk | |
| * License: GPLv2 | |
| * Network: true |
| from flask import Flask, render_template | |
| from flask_bootstrap import Bootstrap | |
| from flask_wtf import Form | |
| from wtforms.fields import DateField | |
| app = Flask(__name__) | |
| app.config['SECRET_KEY'] = 'secret' | |
| Bootstrap(app) |
| [options] | |
| # | |
| # WARNING: | |
| # If you use the Odoo Database utility to change the master password be aware | |
| # that the formatting of this file WILL be LOST! A copy of this file named | |
| # /etc/odoo/openerp-server.conf.template has been made in case this happens | |
| # Note that the copy does not have any first boot changes | |
| #----------------------------------------------------------------------------- | |
| # Odoo Server Config File - TurnKey Linux |
| from flask import Flask, render_template | |
| from flask_paginate import Pagination, get_page_args | |
| app = Flask(__name__) | |
| app.template_folder = '' | |
| users = list(range(100)) | |
| def get_users(offset=0, per_page=10): |
| """ | |
| Dynamic size in account_invoice report | |
| Just send the account_invoice_line_id take the len() and multiply it with 7 (millimeters) | |
| This example is simulating the paper of a supermarket invoice, the default size in my country is 24 millimeters for a correct | |
| format, but you can change it! | |
| How it works: You need pass this method inside the qweb report sending the lines. | |
| """ | |
| #Qweb | |
| <t t-esc="o.change_size_page(o.lines)"/> |
| def file_to_base64(file_path): | |
| """ | |
| A simple function which accepts the file_path and | |
| converts and returns base64 string if specified file | |
| exists. Returns blank string '' if file is not found. | |
| """ | |
| from os import path | |
| if not path.exists(file_path): | |
| return '' | |
| return open(file_path, 'rb').read().encode('base64') |
This is an unofficial manual for the couchdb Python module I wish I had had.
pip install couchdb