Skip to content

Instantly share code, notes, and snippets.

View dperconti's full-sized avatar
🤘

Donato Perconti dperconti

🤘
View GitHub Profile
@dperconti
dperconti / transaction_data.md
Created September 11, 2023 02:37
Transaction Data Questions

Financial Transaction Data Manipulation

You are given a list of financial transactions represented as dictionaries, each containing the following information:

  • transaction_id: A unique identifier for the transaction (string).
  • transaction_date: The date when the transaction occurred (string in the format "YYYY-MM-DD").
  • transaction_type: The type of the transaction. Purchases | Reversals | Refunds | Payments
  • reversal_transaction_id: the transaction_id of a reversal
  • amount: The transaction amount in cents (Int).
  • description: A brief description of the transaction (string).
@dperconti
dperconti / transaction_data.json
Created September 11, 2023 02:36
Transaction Data
[
{
"transaction_id":"tx_78e3fa01b572",
"transaction_date":"2023-01-01",
"transaction_type":"Purchases",
"amount":5000,
"description":"Online shopping"
},
{
"transaction_id":"tx_d2c0df115b8c",
@dperconti
dperconti / Palenight.md
Created October 1, 2018 22:14
Material Palenight Palette
Color Hex
background #292d3e
foreground #959dcb
comment #676e95
accent #c3e88d
redish #ff5370
orangish #f78c6c
yellowish #ffcb6b
greenish #c3e88d
body { background: #292d3e; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #292d3e; }
@dperconti
dperconti / .zshrc
Created December 5, 2017 17:39
oh-my-zsh / zsh / iterm2 init ASCII art
COLUMNS=`tput cols` export COLUMNS # Get screen width.
WELCOME="WELCOME, DONATO"
VERSE="If you're worn out in this footrace with men, what makes you think you can race against horses?"
L_1=" ..,:cloddooddooooddoooddxxdolc:,... ..';coxxdo:,. ..',;:c:cllloooooooooooodddllc:,.. "
L_2=" .:loooloool;,'....';::ccc::;:cllclxkxdddooc:,. .:x00OOOkxddk000kd:. ..';clodkOkxxdoooool:::::;:;'';dkocc;:lx000ko, "
L_3=" 'dko;'...,ld; .,dkdl::,.. ,lc;:c:cox00Oxdoc,.. .dWWXo'.'.. ';:dO0O, ..;loddddolcoxo;. .. .:l::cc' .oKk;. .';:lk0k:."
L_4=" :XXc ..';cd: ;OO' .,;ccccccokkl:ldxooddooxO0OOOxo:'. ;OWO, .;'. .c:... .,codxxdl:,'',:lol'..;ccclc:cllcc:. .,ko. .,clc:,;:'. "
L_5=".dWk' 'll:;,',:cc, .,,..;c,. .''''.'''. .;ccoxkxxkkkkkO0KXX0xl;. oNXo,:0Oc'..c0l.,' .,:oxxxol:;;;coollll:. .',,,,,:xx;. .;' .c0kc::;:k0xlcc' "
@dperconti
dperconti / tag_counts.py
Created March 17, 2014 16:36
A tag counting script with comments
import sys
import json
import codecs
from collections import defaultdict
# This line will fix your unicode printing woes... still getting the hang of
# using codecs for everything, but it's important
sys.stdout = codecs.getwriter("utf8")(sys.stdout)
# collections.Counter was introduced in 2.7 -- this is 2.6 compatible