Skip to content

Instantly share code, notes, and snippets.

View jsoma's full-sized avatar

Jonathan Soma jsoma

View GitHub Profile
@jsoma
jsoma / 00 - Scraping basics for Selenium.ipynb
Created December 2, 2021 01:13
Jupyter notebook of an exercise about scraping with Selenium into a pandas dataframe. YouTube video here: https://youtu.be/G2spsjuyIwE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jsoma
jsoma / Downloading a list of files with Python.ipynb
Created December 7, 2021 17:13
How to download a list of files using Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jsoma
jsoma / bootstrap-template.html
Last active July 2, 2023 19:07
A Bootstrap 4 template for a portfolio site (and other things, too). A handful of handy pieces in there, not as complicated or customized as the stuff on https://getbootstrap.com/.
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
@jsoma
jsoma / README.md
Last active June 30, 2023 02:01
Fixing text/font issues on ai2html exports

Fixing text/font issues on ai2html exports

Using ai2html-config.json to specify fonts

Sometimes when you're working on a graphic with ai2html, your exported graphic might have issues with text.

For example, this one has text that runs off the side of the page:

Broken page

@jsoma
jsoma / CORS.xml
Created September 4, 2020 21:08
CORS public access
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
@jsoma
jsoma / CORS.json
Last active May 11, 2023 09:21
CORS public access (new JSON version)
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"PublicRead",
"Effect":"Allow",
"Principal": "*",
"Action":["s3:GetObject","s3:GetObjectVersion"],
"Resource":["arn:aws:s3:::YOUR_BUCKET_NAME_GOES_HERE/*"]
}
country continent life_expectancy population gdp gdp_per_capita
Afghanistan Asia 54.863 22856302 15153728226 663
Albania Europe 74.2 3071856 12886435920 4195
Algeria Africa 68.963 30533827 155661450046 5098
Angola Africa 45.234 13926373 34063908358 2446
Antigua and Barbuda N. America 73.544 77656 989182128 12738
Argentina S. America 73.822 36930709 390394524839 10571
Armenia Europe 71.494 3076098 6502871172 2114
Australia Oceania 79.93 19164351 560384787591 29241
Austria Europe 78.33 8004712 256214821696 32008
@jsoma
jsoma / .gitignore
Last active March 13, 2023 23:08
Tutorial on how to build a most-popular-thing-in-a-grid map in QGIS and pandas
.DS_Store
@jsoma
jsoma / README.md
Last active December 17, 2022 02:54
Installing tweego and story-formats on OS X.

Installing tweego is a little more complicated than (I think) it should be, so here's a script to do it for you. If you'd like to one-line it, you can just cut and paste this in Terminal:

/bin/bash -c "$(curl -fsSL https://gist.githubusercontent.com/jsoma/5ef3045b2004a610455f371479a6f0cf/raw/b6c9224faa18fd52f3e1bf7120af17eed6da8ec1/tweego.sh)"

Once it's installed, tweego docs are here. You'll probably want to read these twee docs, too.

@jsoma
jsoma / README.md
Last active November 13, 2022 07:15
Publishing your site on GitHub Pages

Hosting your site on GitHub Pages

We're going to start by creating a new repository using GitHub Pages.

Create a new repository

And we're going to name is after ourselves! My github username is jsoma, so I'm going to call my repository jsoma.gitub.io.

Name your repository YOURUSERNAME.github.io. Double-check what your GitHub username is. If you do this part wrong, you'll be sad!