Skip to content

Instantly share code, notes, and snippets.

View vincenzopalazzo's full-sized avatar
:octocat:
The commit can contain poetry

Vincenzo Palazzo vincenzopalazzo

:octocat:
The commit can contain poetry
View GitHub Profile
@abhijeet2096
abhijeet2096 / bst.pl
Created April 1, 2018 05:41
Binary Search Tree Implementation in Prolog
%% Topic : Binary Search Tree Implementation in Prolog
%% Author : Abhijeet Sharma | Akhil Singhal
%% Date : 26/03/2018
%% Course : Paradigms of Programming
%% Sample Inputs
%% Input inl([3,6,1,2,4,7,9],nil,X).
%% X = t(3, t(1, nil, t(2, nil, nil)), t(6, t(4, nil, nil), t(7, nil, t(9, nil, nil))))
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 31, 2024 12:46
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@morcos
morcos / FeeEstimationHighLevel.md
Last active June 14, 2023 10:57
Bitcoin Core Fee Estimation Algorithm

High level description Bitcoin Core's fee estimation algorithm

The algorithm takes as input a target which represents a number of blocks within which you would like your transaction to be included in the blockchain. It returns a fee rate that you should use on your transaction in order to achieve this.

The algorithm is conceptually very simple and does not attempt to have any predictive power over future conditions. It only looks at some recent history of transactions and returns the lowest fee rate such that in that recent history a very high fraction of transactions with that fee rate were confirmed in the block chain in less than the target number of blocks.

Transactions can occur with a nearly continuous range of fee rates and so in order to avoid tracking every historical transaction independently, they are grouped into fee rate "buckets". A fee rate bucket represents a range of fee rates within which the algorithm treats all transactions as having approximately the same fee rate and the answer th

@balos1
balos1 / lab_report.tex
Last active May 25, 2023 09:11
A Lab Report LaTex Template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% University/School Laboratory Report
% LaTeX Template
% Version 3.1 (25/3/14)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Linux and Unix Users Group at Virginia Tech Wiki
@citrusui
citrusui / dropdown.md
Last active May 29, 2024 20:44
"Dropdowns" in Markdown
How do I dropdown?
This is how you dropdown.

<details>
<summary>How do I dropdown?</summary>
<br>
This is how you dropdown.
@ravibhure
ravibhure / git_rebase.md
Last active April 3, 2024 08:38
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@aubricus
aubricus / License
Last active May 17, 2024 21:09
Python Progress Bar
Copyright 2020 Aubrey Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH
@fstab
fstab / MATRIX.md
Last active January 5, 2022 12:31
How to use matrix.org and vector.im as an IRC client

How to use matrix.org and vector.im as an IRC client

How to Join an IRC Channel on matrix.org

Join the room #freenode_<#channel>:matrix.org, replacing <#channel> with the name of the IRC channel. For example, in order to join the #prometheus IRC channel, join the room #freenode_#prometheus:matrix.org on matrix.org.

In vector.im, rooms can be joined with the directory symbol on the bottom left.

@y0no
y0no / mizip_calc.py
Created July 5, 2016 10:09
Mizip keys calculator
#!/usr/bin/env python
# This script is an implementation of lua code written by Iceman:
# https://github.com/iceman1001/proxmark3/blob/master/client/scripts/calc_mizip.lua
# Thanks to him!
import sys
xortable = (
('001', '09125a2589e5', 'F12C8453D821'),
('002', 'AB75C937922F', '73E799FE3241'),
@adonese
adonese / quicksort.py
Created March 22, 2016 09:25
Quicksort 3-way partition algorithm
def partition3(A, l, r):
"""
partition3: A partition for quicksort algorithm. We'll use the 3-way to handle few equal elements in array (happens
a lot in practical use.)
This function is called from the main function quick_sort.
"""
lt = l # We initiate lt to be the part that is less than the pivot
i = l # We scan the array from left to right
gt = r # The part that is greater than the pivot
pivot = A[l] # The pivot, chosen to be the first element of the array, that why we'll randomize the first elements position