Skip to content

Instantly share code, notes, and snippets.

View Tknott95's full-sized avatar
🍀

TKnott Tknott95

🍀
View GitHub Profile
@SmaugPool
SmaugPool / scripts_resources.md
Last active December 17, 2023 22:35
Scripts Memory Units & Execution Steps used by Cardano transactions & blocks

Smart Contracts on Cardano are Plutus scripts. We often talk about the size of transactions and blocks compared to the maximum currently authorized by the protocol parameters, but scripts are also limited in CPU and memory units.

Here is the description of those 3 properties from Cardano docs:

  • The total on-chain transaction size in bytes: a simple transaction, for example, is around 300 bytes, one with metadata is around 650 bytes, and Plutus scripts are typically 4,000-8,000 bytes (future optimizations and improvements will reduce this).
  • The number of computational (CPU) steps that the script uses: each step represents 1 picosecond of execution time on a benchmark machine. Typical scripts should consume less than 1,000,000,000 (1 millisecond).
  • The number of memory units that the script uses: this represents the number of bytes that the script allocates. Typical scripts should consume less than 1,000,000 memory units (
@p1nox
p1nox / pytorch_rtx_3060.md
Last active December 17, 2023 02:27
PyTorch on RTX 3060

After researching a lot on how to use PyTorch with a RTX 3060 card, specially with older versions or torch (0.4.0) and torchvision (0.2.1), I noticed that it was either impossible or very hard to do. RTX 3060 and these packages apparently doesn't have compatibility with the same versions of CUDA and cuDNN. I tried to do this by using different combinations with compiled versions available in conda, but didn't work, maybe it could work if you recompile from source these versions.

After all this, actually I was able to use RTX 3060 effectively with latest versions of all these dependencies with two methods:

  1. Using a conda env, and latest versions published in pytorch site (https://pytorch.org/get-started/locally):
conda create -n rtx_3060 python=3.6.5
conda activate rtx_3060
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c nvidia
@SmaugPool
SmaugPool / cardano-cli-completion.md
Last active November 29, 2023 11:57
cardano-cli Bash auto-completion

To enable cardano-cli and cardano-node bash auto-completion for the current shell:

source <(cardano-cli --bash-completion-script cardano-cli)
source <(cardano-cli --bash-completion-script cardano-node)

To enable it for all future sessions:

@Tknott95
Tknott95 / nietzsche.MD
Last active December 26, 2019 11:47
“And those who were seen dancing were thought to be insane by those who could not hear the music.” ~Nietzsche
  “And those who were seen dancing were thought to be insane by those who could not hear the music.”
~Nietzsche
@Tknott95
Tknott95 / gist:cc860a04ad84891fc273d19b40e49326
Last active April 12, 2019 02:38
Letter to Pythocles Epicurus

This letter contains explanations of various celestial phenomena along with some pro-empiricist epistemological remarks and ethical justifications for scientific study:

Epicurus to Pythocles, greeting:

In your letter to me, of which Cleon was the bearer, you continue to show me affection which I have merited by my devotion to you, and you try, not without success, to recall the considerations which make for a happy life. To aid your memory you ask me for a clear and concise statement respecting celestial phenomena; for what we have written on this subject elsewhere is, you tell me, hard to remember, although you have my books constantly with you. I was glad to receive your request and am full of pleasant expectations. We will then complete our writing and grant all you ask. Many others besides you will find these reasonings useful, and especially those who have but recently made acquaintance with the true story of nature and those who are attached to pursuits which go deeper than any part of ordinary educat

Non timebo mala
@Tknott95
Tknott95 / arch-firmware-aicwd-fix.md
Last active May 13, 2019 07:16
Arch Linux Missing Firmware | Possibly missing firmware for module: aic94xx wd719x

ARCH LINUX MISSING FIRMWARE FIX

Problem

** In Arch Linux mkinitcpio -p linux and/or boot shows error messages **
  ** Possibly missing firmware for module: aic94xx **
  ** Possibly missing firmware for module: wd719x **
git config --global url."git@github.com:".insteadOf "https://github.com/"
@Tknott95
Tknott95 / unpopulated-fix-keyring.md
Last active May 13, 2019 07:16
Random FIX for Errors Regarding unpopulated keyring | installing<PKG-HERE> breaks dependency <PKG-HERE> |

ARCH LINUX - POPULATING A KEYRING

FIX for errors regarding

| unpopulated keyring |

alt text

IN CLI/SHELL ENTER:

@Tknott95
Tknott95 / arch-linux-install
Created February 21, 2018 21:19 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap