Skip to content

Instantly share code, notes, and snippets.

@LewisGaul
LewisGaul / zig-blog-posts.md
Last active February 26, 2025 03:07
Collection of blog posts about the Zig programming language
from django.core.management.base import BaseCommand
from rq.registry import FailedJobRegistry
from django_rq.queues import get_queue
from django_rq.utils import get_jobs
class Command(BaseCommand):
help = 'Delete failed jobs from Django RQ.'
@amaarora
amaarora / TTP-benchmark.ipynb
Last active January 13, 2021 06:16
aman_arora/git/pytorch-image-models/notebooks/TTP-benchmark.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@FreddieOliveira
FreddieOliveira / docker.md
Last active April 20, 2025 09:07
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@kprotty
kprotty / ParkingLot.zig
Last active October 5, 2024 09:17
Small & Fast synchronization primitives for Zig
pub fn ParkingLot(comptime Config: type) type {
return struct {
pub const Lock: type = Config.Lock;
pub const Event: type = Config.Event;
pub const nanotime: fn() u64 = switch (@hasDecl(Config, "nanotime")) {
true => Config.nanotime,
@PEZ
PEZ / aoc2020util.clj
Last active December 3, 2022 23:48
Utility for loading the Advent of Code 2020 input into the Clojure REPL on demand
(ns pez.aoc2020.util
(:require [clj-http.client :as client]))
(defn fetch-input [day]
(try
(let [cookie (slurp ".aoc-session")]
(:body (client/get
(str "https://adventofcode.com/2020/day/" day "/input")
{:cookies {"session" {:value cookie}}})))
(catch Exception e
python build/build.py --enable_cuda True --cuda_path $EBROOTCUDA --cudnn_path $EBROOTCUDNN --cuda_compute_capabilities "7.0,7.5,8.0"
_ _ __ __
| | / \ \ \/ /
_ | |/ _ \ \ /
| |_| / ___ \/ \
\___/_/ \/_/\_\
Starting local Bazel server and connecting to it...
@Sebazzz
Sebazzz / ACrealityCR6Issue.md
Last active January 8, 2025 23:11
Creality CR-6 issue list (including listing of motherboard issues)

Creality CR-6 issue list

This is an initiative to create an overview of the issues found with the Creality CR-6 SE.

As of this writing (2020-09-19) the large number of the motherboard issues have not been publicly acknowledged. Hopefully this overview forces Creality to acknowledge the issues with the Creality CR-6 SE leveling free 3d printer.

Update 2021-07-17 from Creality

According to Creality all issues should be resolved in the newer models:

Here are the improvements we did as below:

@Sebazzz
Sebazzz / Creality-CR-6-Unboxing-guide.md
Last active August 16, 2024 14:31
Creality CR-6 Unboxing & assembly guide

CR-6 post-unboxing checklist

With most of the CR-6 SE issues being due to bad wiring or loose/too tight screws I feel like it is time for a good post-unboxing checklist, to be walked through pre-assembly. Even though I do not have my unit shipped yet, I've seen enough issues and fixes that I can compile this post.

I initially posted this on the independent CR-6 community Facebook group but since not everyone wants to use Facebook (which I totally understand), I will repost it here. I mirrored most of the relevant content of Facebook to imgur.

If you have any feedback or anything that needs to be added, please let me know and I will amend this post!

Note: There are some known issues with this printer - please read the entire guide. (It is long, I know, but this is a necessary evil!)

Communities

@kprotty
kprotty / async_main.zig
Created July 29, 2020 13:49
Zig nanocoroutines
// Bit-vector + rand shuffle order scheduler
const std = @import("std");
const Allocator = std.mem.Allocator;
const workload_size = 1 << 20;
const n_workloads = 4;
const repetition = 4;
const use_async = true;
const use_manual_prefetch = true;