Skip to content

Instantly share code, notes, and snippets.

@brabect1
brabect1 / python_productivity.rst
Created June 22, 2024 10:12
#python #uml #diagrams

Python Prductivity Tips

UML Class Diagrams

Pyreverse (part of Pylint):

  • natively supports .dot (GraphViz), UMLet and PlantUML outputs
  • useful options
@brabect1
brabect1 / even_integer_distribution.rst
Last active June 24, 2024 04:40
distributing an integer total into n integers of almost the same value #python

Distributing total into evenly sized integers

A snippet showing how to distribute even integral weights (e.g. percantage).

from random import randrange

def distribute(n,total=100):
@brabect1
brabect1 / customizing_rst_syntax.rst
Last active June 29, 2024 11:48
Customizing reStructuredText Markup #rst #docutils #python #markup #customization

Customizing reStructuredText (rst) for Domain-specific Syntax

  • document tree
    • created by a Parser component (i.e. from reStructuredText input)
    • manually constructed
  • docutils components
@brabect1
brabect1 / open_sta.rst
Last active May 4, 2024 15:03
OpenSTA #sta

OpenSTA

OpenSTA is an open-source STA tool by Parallax (hence a.k.a. Parallax STA/Static Timing Analyzer). User Manual is part of the repository.

Build

@brabect1
brabect1 / custom_coverpage.rst
Created January 28, 2024 20:06
Custom cover page with LaTeX memoir class.

Custom Coverpage with LaTeX memoir

Example showing use of custom cover page with memoir class of article class option. There are some few "tricks" to yield the desired effect.

@brabect1
brabect1 / git_commit_transfer.rst
Last active January 1, 2024 19:40
Shows how to export and import Git repository. #git #export #import #patch
@brabect1
brabect1 / advanced_tcl.rst
Last active January 20, 2024 08:14
Some advanced Tcl topics #tcl

Advanced Tcl Topics

This gist covers some areas that go beyond basic Tcl use. These are useful for anyone embarking on more complex Tcl programming. Some of the topics are fairly simple but very little advertised in Tcl snippets or tutorials.

Boolean Variables

@brabect1
brabect1 / ocv_timing_derate.rst
Last active March 24, 2024 11:26
OCV and timing derating #sta

OCV and Timing Derating

Attribution

@brabect1
brabect1 / tcl_ns_ensemble.rst
Last active June 15, 2024 04:11
About Tcl ensembles #tcl #namespace #ensemble

Tcl Namespace Ensemble

Tcl ensemble is a dispatcher command. If you oversimplify, you can think of it as an alias. What a dispatcher command does is that it calls another command along with all arguments. Here is an example:

# everbody knows a `file` command, right
file dirname [pwd]