Skip to content

Instantly share code, notes, and snippets.

View iamjaco's full-sized avatar
💭
What virus?

Iamjaco iamjaco

💭
What virus?
  • Perth, australia
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>PyScript Hello World</title>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-env>
- numpy
@iamjaco
iamjaco / ebook_textractor.py
Created March 28, 2022 08:33 — forked from Kraballa/ebook_textractor.py
Extracts plain text from epub files. Specify directory in `dir_to_epubs` variable. The extracted `.txt` files will be written to `./epub_text`.
from ebooklib import epub
import ebooklib
import re
import html
import os
#folder to epub files
dir_to_epubs = ''
#generate list of epub-files in specified directory
@iamjaco
iamjaco / GPT2-Simple.py
Last active March 17, 2022 02:26
This script contains code to easily test out GPT2 on any dataset
!pip install gpt-2-simple
f = r'<your file location here>' # include a blank line between texts
import gpt_2_simple as gpt2
import os
import requests
model_name = "124" # or 355
if not os.path.isdir(os.path.join("models", model_name)):
@iamjaco
iamjaco / default.j2
Created February 25, 2022 02:07 — forked from perfecto25/default.j2
Python function to send email using a Jinja HTML template
<style type="text/css">
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(http://fonts.gstatic.com/s/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTa-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
.body {
width: 90%;
@iamjaco
iamjaco / wordle-answers-alphabetical.txt
Created February 18, 2022 07:42 — forked from cfreshman/wordle-answers-alphabetical.txt
Wordle answers from source code in alphabetical order. And if you write a solver, here's a leaderboard! https://freshman.dev/wordle/#/leaderboard
aback
abase
abate
abbey
abbot
abhor
abide
abled
abode
abort
aahed
aalii
aargh
aarti
abaca
abaci
abacs
abaft
abaka
abamp
@iamjaco
iamjaco / index.html
Created January 15, 2021 09:26
Monospace Blog Design
<header class="main-navigation">
<nav>
<div>
<a href="/work">~/work</a>
<a href="/fun">~/fun</a>
<a href="/code">~/code</a>
</div>
<div>
<a href="/">/home/hayden</a>
</div>