This was originally taken from https://superuser.com/a/1012669/894282 and then updated to be compatible with python 3.X
Requires pypdf2 to be installed.
This was originally taken from https://superuser.com/a/1012669/894282 and then updated to be compatible with python 3.X
Requires pypdf2 to be installed.
| #! /usr/bin/env python | |
| # Original author Nicholas Kim, modified by Yan Pashkovsky | |
| # New license - GPL v3 | |
| import sys | |
| import time | |
| from PyPDF2 import utils, PdfFileReader, PdfFileWriter | |
| def eprint(*args, **kwargs): | |
| """Print to stderr |
| plt.rcParams.update({ | |
| 'font.family': 'serif', | |
| # 'font.serif': 'cmr10', | |
| # 'mathtext.fontset': 'cm', | |
| 'font.serif': 'stixgeneral', | |
| 'mathtext.fontset': 'stix', | |
| 'axes.unicode_minus': False, | |
| 'font.size': 11, | |
| 'figure.dpi': 150, | |
| 'lines.linewidth': 0.5, |
| " Vim syntax file | |
| " Language: markdown with embedded yaml, toml for Hugo | |
| " Author: James Wright ([email protected]) | |
| " License: MIT | |
| " Inspired by https://github.com/pbrisbin/vim-syntax-shakespeare/blob/master/after/syntax/haskell.vim | |
| " store and remove current syntax value | |
| if exists('b:current_syntax') | |
| let old_syntax = b:current_syntax | |
| unlet b:current_syntax |
| #!/usr/bin/env python3 | |
| import pexpect | |
| shell = pexpect.spawn('/bin/bash') | |
| shell.sendline('ssh -t node0001') | |
| shell.interact() |
| #!/usr/bin/env python | |
| import math | |
| from pathlib import Path | |
| import argparse | |
| import OCC | |
| import OCC.gp as gp | |
| import OCC.GC as GC | |
| from OCC.BRepBuilderAPI import BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire, BRepBuilderAPI_MakeFace | |
| from OCC.BRepPrimAPI import BRepPrimAPI_MakeRevol | |
| from OCC.Display.SimpleGui import init_display |
| ic_unload_tetin | |
| #==============Parameters | |
| # Meta | |
| set {mesh_option} 0 | |
| # Geometry | |
| set {in_len} 150 | |
| set {out_len} 200 | |
| set {in_r} 20 | |
| set {dif_len} 50 |