- Test-Driven Development (TDD) with pytest: Always write a failing test before writing implementation code (Red-Green-Refactor). Use
pytest
andpytest-fixtures
for test setup, execution, and teardown. - KISS (Keep It Simple, Stupid): Favor the simplest solution that meets the requirements.
- DRY (Don't Repeat Yourself): Avoid code duplication. Extract reusable logic into functions or classes.
- Standard Libraries and Tools: Utilize standard Python libraries (like
datetime
for date/time,requests
for HTTP requests, andlogging
) and external libraries, includingBeautifulSoup4
for HTML parsing, to avoid reinventing the wheel. Favor well-maintained and widely-used libraries. - YAGNI (You Ain't Gonna Need It): Don't implement features or functionality unless they are currently required.
- SOLID Principles & Extensibility: Adhere to SOLID principles, promoting maintainability, testability, and future extension. Consider potential future requi
# PCA on n=6990 images of handwritten 2's, each with d = 784 pixels. | |
# install.packages("remotes") | |
# remotes::install_github("jlmelville/snedata") | |
# thank you jlmelville for making this data so easy to access! | |
library(snedata) | |
library(magrittr) | |
library(Matrix) | |
library(rARPACK) |
// Commented version of https://twitter.com/zozuar/status/1441384708441456651 | |
// Google-translated (with some editing) from @gam0022's version | |
float i, // Ray marching loop counter | |
e, // Volume density (the smaller the value, the higher the density) | |
s, // FBM scale (and loop counter) | |
g, // Ray's distance (also used for tunnel twirl and camera prespective) | |
k = .01; // Handy constant | |
// Ray marching loop |
// RCL 05 June 2021 | |
/* | |
verify with `openssl pkey -in <privatekey>` or `openssl pkey -in <privatekey> -pubout` | |
the latter should match the publickey | |
*/ | |
package main | |
import ( |
# Install docker or podman package on your distro (podman doesn't need a daemon like dockerd to work). All args are exactly same, just replace ``podman`` with ``docker`` in command if you want to. | |
sudo pacman -S podman | |
# Run an archlinux container with dbus and wayland sockets. | |
sudo podman run \ | |
--volume "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY":/tmp/wayland-0 \ | |
--device /dev/dri \ | |
--volume /run/user/1000/bus:/tmp/bus \ | |
--rm -it archlinux /bin/bash |
1. Install msys2 from msys2.org | |
2. run msys2.exe: pacman -Syu, restart, pacman -Su | |
3. run mingw64.exe: pamcan -S mingw-w64-x86_64-emacs | |
4. create C:\msys2_64\runemacs_patched_path.bat: | |
cmd /C "set PATH=C:\msys2_64\mingw64\bin;C:\msys2_64\usr\bin;%PATH% && C:\msys2_64\mingw64\bin\runemacs.exe --daemon" | |
5. Super-R shell:startup [RET] | |
6. Create shortcut to runemacs_patched_path.bat, call it e.g. "emacs-daemon" | |
7. Create a short-cut in Start menu: | |
C:\msys2_64\mingw64\bin\emacsclientw.exe -c -n -a "C:\msys2_64\mingw64\bin\runemacs.exe" |
;;; test-lsp-jdtls-installation.el --- Test lsp jdtls installation -*- lexical-binding: t; -*- | |
;;; Date: 2020-05-11_09.12.50 | |
;;; Usage: | |
;; ┌──── | |
;; │ $ emacs -nw -Q -l \ | |
;; │ --eval '(setq with-proxy-http-server "127.0.0.1:XXXX")' \ | |
;; │ /path/to/test-lsp-jdtls-installation.el | |
;; └──── | |
(toggle-debug-on-error) | |
(setq user-emacs-directory (format "~/.emacs.d/%s/%s/" (file-name-base load-file-name) emacs-version)) |
mount_*/ | |
environment_*/ | |
output.log |
This is a step-by-step tutorial for setting up your own conda feedstock from scratch. I started with the instructions here:
As a novice, I found that the above tutorial lacked sufficient detail. So, I decided to document the process that I used for my own future reference.
why doesn't radfft support AVX on PC?
So there's two separate issues here: using instructions added in AVX and using 256-bit wide vectors. The former turns out to be much easier than the latter for our use case.
Problem number 1 was that you positively need to put AVX code in a separate file with different compiler settings (/arch:AVX for VC++, -mavx for GCC/Clang) that make all SSE code emitted also use VEX encoding, and at the time radfft was written there was no way in CDep to set compiler flags for just one file, just for the overall build.
[There's the GCC "target" annotations on individual funcs, which in principle fix this, but I ran into nasty problems with this for several compiler versions, and VC++ has no equivalent, so we're not currently using that and just sticking with different compilation units.]
The other issue is to do with CPU power management.