(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
from tqdm import tqdm | |
from tqdm.utils import CallbackIOWrapper | |
file_path = os.path.abspath(__file__) | |
upload_url = https://some-bucket.s3.amazonaws.com | |
file_size = os.stat(file_path).st_size | |
with open(file_path, "rb") as f: | |
with tqdm(total=file_size, unit="B", unit_scale=True, unit_divisor=1024) as t: | |
wrapped_file = CallbackIOWrapper(t.update, f, "read") |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
;;; init.el --- Fun stuff all around -*- lexical-binding: t; -*- | |
;;; Commentary: | |
;; This is a simple init.el which offers a Python configuration. Each package | |
;; usage is annotated with the how and why of its use. `use-package' is used to | |
;; manage the configuration as it provides lots of facilities to load modes, | |
;; define custom variables and key-maps, etc. | |
;;; Code: |
-- Two dashes start a one-line comment. | |
--[[ | |
Adding two ['s and ]'s makes it a | |
multi-line comment. | |
--]] | |
---------------------------------------------------- | |
-- 1. Variables and flow control. | |
---------------------------------------------------- |
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
First posted in August 2021. This is basically a snapshot of my thinking about pansharpening at that time; I’m not making any substantial updates. Last typo and clarity fixes in February 2023.
This is a collection of notes on how I’ve been approaching convolutional neural networks for pansharpening. It’s an edited version of an e-mail to a friend who had asked about this tweet, so it’s informal and somewhat silly; it’s not as polished as, say, a blog post would be. It’s basically the advice I would give to an image processing hobbyist before they started working on pansharpening.
If you want a more serious introduction, start with the literature review in Learning deep multiresolution representations for pansharpening. Most of the academic work I would recommend is mentioned there.