Skip to content

Instantly share code, notes, and snippets.

View aaronpenne's full-sized avatar
👋

Aaron Penne aaronpenne

👋
View GitHub Profile
@aaronpenne
aaronpenne / withinwithout_template.html
Last active March 30, 2022 19:44
Template for recreating Within/Without artwork locally using 3 pieces of blockchain data.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<script>
tokenData = {
// replace these values with the output from tokenIdToTokenData for your tokenId
@aaronpenne
aaronpenne / artwork_post_processing.sh
Last active April 17, 2022 15:39
Helper functions for artwork resizing, combining, padding, etc.
# Combine multiple images into one (three singles into one row of three)
ffmpeg -i IMG_0021.jpeg -i IMG_0029.jpeg -i IMG_0026.jpeg -filter_complex "[0][2][1]hstack=inputs=3" combined.png
# Expand image by adding colored padding
convert unpadded.png -background "#ECE7DD" -gravity center -extent 7200x4000 padded.png
# Crop video, centered
ffmpeg -i in.mp4 -filter:v "crop=in_w-30:in_h-18" -c:a copy out.mp4
# Convert Quitcktime screen recording to gif
@aaronpenne
aaronpenne / get_ab_features.py
Created June 23, 2021 16:29
Python 3 script to parse hash, token, and features for a given ArtBlocks project
#
# Python 3 script to parse hash, token, and features for a given ArtBlocks project
# @aaronpenne
# MIT License
#
# Usage:
# python get_features.py -s 77000000 -e 77000299
#
import sys
@aaronpenne
aaronpenne / images_to_gif.py
Created August 29, 2018 23:26
Converts images in a directory to an animated gif. Directory and image type are selectable. Requires imageio.
import os
import sys
import imageio
import argparse
import datetime
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
description='Convert images in a directory to gif.\nDefaults to png files in current directory.')
parser.add_argument('-d', '--dir', help='directory containing image files')
parser.add_argument('-f', '--format', help='image format to be converted to gif')
@aaronpenne
aaronpenne / un_country_codes.csv
Created July 23, 2018 21:02
United Nations Country Codes - UN ISO 3166-1 alpha-3 codes from https://unstats.un.org/unsd/tradekb/knowledgebase/country-code
code country
ABW Aruba
AFG Afghanistan
AGO Angola
AIA Anguilla
ALA Aland Islands
ALB Albania
AND Andorra
ANT Netherlands Antilles
ARE United Arab Emirates
@aaronpenne
aaronpenne / tips_how_to_succeed_ee_ece.md
Last active August 23, 2023 18:59
Tips on How To Succeed in an EE or ECE Major

This is ECE advice on how to study and succeed in school. This is a long list (copied from my Reddit post on r/ece) of things I learned over 6 years as an ECE undergraduate and masters student. Some tips are pulled from other places on this sub and around Reddit. This list is not comprehensive, has typos, and is obviously biased by personal taste... so if you have something to add please do so!

I am currently an electrical engineer at a large aerospace company, and am finishing finished my master's in ECE. I am was a TA for an introductory circuits course and want to give the students some tips. These are things I wish I knew when I was at their stage.

I am on Twitter nowadays, hit me up if you are struggling and I'll try to help out!

If you do some of these, you'll be better off. It's not a laundry list of everything you should do, it's just a reference if you need some tips. H