This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| import http.cookies | |
| http.cookies._is_legal_key = lambda _: True | |
| import asyncio | |
| import aiohttp | |
| import nest_asyncio | |
| import time | |
| nest_asyncio.apply() | |
| async def gather_with_concurrency(n, *tasks): | |
| semaphore = asyncio.Semaphore(n) |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
| #!/usr/bin/env python3 | |
| # Recursively generate index.html files for | |
| # all subdirectories in a directory tree | |
| ########################################################################## | |
| ## ❗️❗️❗️ WARNING: This version is outdated and unmaintained! | |
| ## For an up-to-date version with cleaner CSS styling see: | |
| ## https://gist.github.com/glowinthedark/625eb4caeca12c5aa52778a3b4b0adb4 | |
| ########################################################################## |
Create the submodule:
git submodule add -b master <[email protected]:MYSUBMODULE.git> <path/to/MYSUBMODULE>This creates the submodule and makes it track submodule's master branch. You can change the branch name if you want to track a different branch.
Change some settings. In the parent repo:
# make it so that git status will include changes to submodules.| """ | |
| Train a neural network to implement the discrete Fourier transform | |
| """ | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from tensorflow.keras.layers import Dense | |
| from tensorflow.keras.models import Sequential | |
| N = 32 | |
| batch = 10000 |
| { | |
| "aa": "Afar", | |
| "ab": "Abkhazian", | |
| "ae": "Avestan", | |
| "af": "Afrikaans", | |
| "ak": "Akan", | |
| "am": "Amharic", | |
| "an": "Aragonese", | |
| "ar": "Arabic", | |
| "as": "Assamese", |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| <html> | |
| <head> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
| <script src="//ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script> | |
| <!-- | |
| TODO: |
| sub, sup { | |
| /* Specified in % so that the sup/sup is the | |
| right size relative to the surrounding text */ | |
| font-size: 75%; | |
| /* Zero out the line-height so that it doesn't | |
| interfere with the positioning that follows */ | |
| line-height: 0; | |
| /* Where the magic happens: makes all browsers position |