Skip to content

Instantly share code, notes, and snippets.

View btbytes's full-sized avatar
🐎
🏈

Pradeep Gowda btbytes

🐎
🏈
View GitHub Profile
open Donald
open System.Data.Common
open System.Data.SQLite
open System.Threading.Tasks
open Giraffe
open Giraffe.ViewEngine
open FsToolkit.ErrorHandling
open Microsoft.AspNetCore.Builder
[<RequireQualifiedAccess>]
@eugeneyan
eugeneyan / mandelbrot-mojo.md
Last active April 4, 2024 15:52
Benchmarking Mojo vs. Python on Mandelbrot sets

Mandelbrot in Mojo with Python plots

Not only Mojo is great for writing high-performance code, but it also allows us to leverage huge Python ecosystem of libraries and tools. With seamless Python interoperability, Mojo can use Python for what it's good at, especially GUIs, without sacrificing performance in critical code. Let's take the classic Mandelbrot set algorithm and implement it in Mojo.

We'll introduce a Complex type and use it in our implementation.

Mandelbrot in python

@andrewstiefel
andrewstiefel / feed.xml
Created January 24, 2022 18:43
Simple XSL boilerplate for styling Atom feeds in Jekyll
---
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/" rel="alternate"/>
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 8, 2024 03:04
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active September 1, 2023 16:49
My growing list of Rust programs to use.
@dysinger
dysinger / config.org
Created December 23, 2019 16:26
My important dotfiles as an org-mode document

Configuration

Setup

git clone \
    https://github.com/chriskempson/base16-shell.git \
@eviltester
eviltester / gist:11093f0e4c501a41990e227393184eda
Last active April 24, 2024 11:35
uncheck twitter interests
var timer=100;document.querySelectorAll("div > input[type='checkbox']:checked").forEach((interest) => {setTimeout(function(){interest.click()},timer);timer+=2000;});
@dabeaz
dabeaz / README.txt
Created October 15, 2019 20:10
PyCon India 2019, Code from Keynote Presentation by @dabeaz
Code from PyCon India 2019 Keynote Talk
David Beazley (https://www.dabeaz.com)
======================================
This code is presented "as is" and represents what was live-coded
during my closing keynote presentation at PyCon India, Chennai,
October 13, 2009. I have made no changes to the files.
Requires: Python 3.6+, numpy, pygame
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@glowinthedark
glowinthedark / generate_directory_index.py
Last active February 7, 2022 11:00
Generate directory index (Python 2) Python 3 version is here: https://gist.github.com/glowinthedark/174df43f469c7ef05f6358f53afe05c6
#!/usr/bin/env python
# requires Python 2
# (Python 3 version: https://gist.github.com/glowinthedark/174df43f469c7ef05f6358f53afe05c6)
# Recursively generate index.html files for
# all subdirectories in a directory tree
##########################################################################
## ❗️❗️❗️ WARNING: This version is outdated and unmaintained!