Skip to content

Instantly share code, notes, and snippets.

View wedesoft's full-sized avatar

Jan Wedekind wedesoft

View GitHub Profile
@wedesoft
wedesoft / sha1.md
Created February 10, 2025 16:37
answer of qwen-2.5:15b for CUDA SHA1 hasher

Certainly! Below is an example of how you could implement a simple SHA-1 hashing algorithm using PyCUDA. PyCUDA allows you to leverage the power of your GPU for parallel processing tasks, including cryptographic operations like hash functions.

First, make sure you have PyCUDA installed:

pip install pycuda

Here's a basic implementation of SHA-1 using PyCUDA:

@wedesoft
wedesoft / vimrc
Created February 10, 2025 16:17
Vimrc
set tabstop=4
set shiftwidth=4
set autoindent
set hlsearch
call plug#begin()
Plug 'tartansandal/vim-compiler-pytest'
Plug 'gergap/vim-ollama'
call plug#end()
@wedesoft
wedesoft / .gitignore
Last active January 15, 2025 19:19
compare performance of Clojure, Ruby, and Python interpreters
venv
.cpcache
@wedesoft
wedesoft / deps.edn
Last active July 3, 2024 19:33
Using NASA SPK format to interpolate planet ephemerides (translating jplephem code to Clojure)
{:deps {org.clojure/clojure {:mvn/version "1.11.3"}
instaparse/instaparse {:mvn/version "1.5.0"}
org.clj-commons/gloss {:mvn/version "0.3.6"}
generateme/fastmath {:mvn/version "2.4.0" :exclusions [com.github.haifengl/smile-mkl org.bytedeco/openblas]}
org.lwjgl/lwjgl {:mvn/version "3.3.3"}
org.lwjgl/lwjgl$natives-linux {:mvn/version "3.3.3"}}
:paths ["."]}
@wedesoft
wedesoft / cube.pde
Created October 1, 2023 15:20
Rubik's cube implemented in Java Processing
int t;
int n;
int dir;
int axis;
int grid = 100;
int size = 80;
void setup() {
size(854, 480, P3D);
rnd();
@wedesoft
wedesoft / get-assimp-mesh.clj
Last active August 3, 2023 20:54
using LWJGL Assimp to access a mesh in Clojure
; https://lwjglgamedev.gitbooks.io/3d-game-development-with-lwjgl/content/chapter27/chapter27.html
; https://github.com/LWJGL/lwjgl3/issues/558
(require '[clojure.reflect :as r]
'[clojure.pprint :as p])
(import '[org.lwjgl.assimp Assimp AIMesh AIVector3D AIVector3D$Buffer AIMaterial AIString AITexture])
(import '[org.lwjgl.stb STBImage])
(defn all-methods [x]
@wedesoft
wedesoft / dmesg.txt
Created June 15, 2023 19:59
dmesg output of amdgpu rendering failure
[ 3789.603274] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, signaled seq=428555, emitted seq=428557
[ 3789.603742] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* Process information: process java pid 7811 thread java:cs0 pid 7848
[ 3789.604177] amdgpu 0000:05:00.0: amdgpu: GPU reset begin!
[ 3789.705737] ------------[ cut here ]------------
[ 3789.705743] WARNING: CPU: 0 PID: 4769 at drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:656 amdgpu_irq_put+0x45/0x70 [amdgpu]
[ 3789.706167] Modules linked in: ctr ccm rfcomm xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables libcrc32c nfnetlink br_netfilter bridge stp llc snd_seq_dummy snd_hrtimer snd_seq snd_seq_device qrtr overlay cmac algif_hash algif_skcipher af_alg bnep binfmt_misc nls_ascii nls_cp437 vfat fat iwlmvm btusb mac80211 btrtl btbcm btintel btmtk intel_rapl_msr libarc4 intel_rapl_common bluetooth edac_mce_amd uvcvideo videobuf2_vmalloc
@wedesoft
wedesoft / bounce.pde
Created June 11, 2023 13:34
Bouncy ball implemented in Java Processing
float x;
float y;
float vx;
float vy;
int radius;
float ay;
void setup() {
size(1000, 800);
x = 500;
@wedesoft
wedesoft / deps.edn
Last active October 26, 2023 04:44
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}
org.lwjgl/lwjgl {:mvn/version "3.3.2"}
org.lwjgl/lwjgl$natives-linux {:mvn/version "3.3.2"}
org.lwjgl/lwjgl-opengl {:mvn/version "3.3.2"}
org.lwjgl/lwjgl-opengl$natives-linux {:mvn/version "3.3.2"}
org.lwjgl/lwjgl-glfw {:mvn/version "3.3.2"}
org.lwjgl/lwjgl-glfw$natives-linux {:mvn/version "3.3.2"}}}
@wedesoft
wedesoft / deps.edn
Last active May 23, 2023 08:04
Clojure/Java matrix library comparison core.matrix vs EJML vs vectorz-clj vs fastmath
{:deps {org.clojure/clojure {:mvn/version "1.11.1"}
net.mikera/core.matrix {:mvn/version "0.63.0"}
net.mikera/vectorz-clj {:mvn/version "0.48.0"}
org.ejml/ejml-all {:mvn/version "0.43"}
criterium/criterium {:mvn/version "0.4.6"}
generateme/fastmath {:mvn/version "2.2.2-SNAPSHOT" :exclusions [com.github.haifengl/smile-mkl org.bytedeco/openblas]}}}