This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Enter design-volto-theme version: " | |
read -r dvtVersion | |
npx purge-lockfile@latest volto && rm -rdf node_modules && yarn cache clean && yarn add "redturtle/design-volto-theme#v$dvtVersion" -W && yarn i18n && git commit -am "chore(upd8): update dvt v$dvtVersion" && rm -rdf node_modules && yarn install --frozen-lockfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyPDF2 import PdfFileWriter, PdfFileReader | |
# https://stackoverflow.com/questions/490195/split-a-multi-page-pdf-file-into-multiple-pdf-files-with-python#490203 | |
def pdf_split(fname, start, end=None): | |
print('pdf_split', fname, start, end) | |
# pdf_split ~/Downloads/4-27-files/Invoice Email-0.pdf 1 4 | |
#inputpdf = PdfFileReader(open("document.pdf", "rb")) | |
inputpdf = PdfFileReader(open(fname, "rb")) |
Invoke is a Python task execution tool & library. Following the lead of most Unix CLI applications, it offers a traditional flag-based style of command-line parsing, deriving flag names and value types from task signatures (optionally, of course!). Like many of its predecessors, it offers advanced features as well – namespacing, task aliasing, before/after hooks, parallel execution and more.
Get more information at pyinvoke.org
# List all tasks invoke can find in the current direktory (from tasks.py)
invoke --list
# Only show commands that would be executed by called task(s) (dry run)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: odoo-conf | |
data: | |
web: | | |
[options] | |
server_wide_modules = web | |
max_cron_threads = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<openerp> | |
<data> | |
<template id="graph_template"> | |
<t t-call="website.layout"> | |
<head> | |
<title>Graph Web Controller Example</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Run me with sudo ./version.py > result | |
import csv | |
import sys | |
import os | |
import re | |
class VersionAnalyzer: | |
def __init__(self): | |
self.out = csv.writer(sys.stdout) |
<template id="qunit_suite" inherit_id="web.qunit_suite">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/academy/static/src/js/tools.js"></script>
<script type="text/javascript" src="/academy/static/tests/academy_tests.js"></script>
<script type="text/javascript" src="/academy/static/tests/academy_tests_field.js"></script>
</xpath>
</template>
Pos order py
@api.model
def _order_fields(self, ui_order):
res = super()._order_fields(ui_order)
res['carrier_id'] = ui_order.get('carrier_id', False)
return res
Models js