Skip to content

Instantly share code, notes, and snippets.

@0xjac
0xjac / private_fork.md
Last active October 25, 2025 17:58
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@ignamv
ignamv / format_si.py
Created May 21, 2016 19:30
Python SI prefix formatting
def format_si(number, significant_digits=3):
"""Format number using SI prefixes
The prefix is chosen such that the number before the prefix is 1<x<1000."""
if number == 0:
return '0 '
prefixes = list('afpnμm') + [''] + list('kMGTPE')
multipliers = 10.**np.arange(-18, 19, 3)
inv_multipliers = 10.**(-np.arange(-18, 19, 3))
abs_number = abs(number)