Skip to content

Instantly share code, notes, and snippets.

View ElGatoLoco's full-sized avatar
🍄
🌵

Nikola Paunović ElGatoLoco

🍄
🌵
  • Barcelona, Spain
View GitHub Profile
@ElGatoLoco
ElGatoLoco / minting-native-tokens-on-cardano.sh
Created March 26, 2021 12:29
Mint native tokens on Cardano testnet using the node and cli that come with Daedalus
# This guide assumes that you're running MacOS and already have a fully synced Daedalus testnet wallet
# For mainnet some minor tweaks are required
# The line below assumes the default location for the testnet wallet at the time of writing this guide
# If your node socket is located somewhere else, you should be able to finding by inspecting the running processes on your machine
export CARDANO_NODE_SOCKET_PATH=~/Library/Application\ Support/Daedalus\ Testnet/cardano-node.socket
# Make testnet id available as environment variable; not needed for the mainnet
# This one is active at the time of writing this guide
export TESTNET_ID=1097911063
@ElGatoLoco
ElGatoLoco / Plutus.hs
Last active March 9, 2021 16:02
Plutus playground starter
-- This is a starter contract, based on the Game contract,
-- containing the bare minimum required scaffolding.
--
-- What you should change to something more suitable for
-- your use case:
-- * The MyDatum type
-- * The MyMyRedeemerValue type
--
-- And add function implementations (and rename them to
-- something suitable) for the endpoints:
@ElGatoLoco
ElGatoLoco / git-feature-workflow.md
Created October 29, 2016 13:42 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.

The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.

When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].

Basic branching

When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.

@ElGatoLoco
ElGatoLoco / calculator.py
Last active October 20, 2016 11:54
Phonotactic Probability Calculator (core)
class Calculator(object):
"""
A basic class for calculating grapheme/phonotactic probabilities for any language.
Instance needs to be initialized with corpus (essentialy a list of words/phonetic transcriptions
of a given language) and segment size (1, 2 or 3) used to calculate grapheme/phonotactic probabilities.
When initialized, get_probs method of the calculator instance can be called with the following parameters:
word: a word we need the probability calculated for;
prob_type: an integer which defines probability type
(1 - Regular probability; 2 - Inverted probability; 3 - Combined probability)