Skip to content

Instantly share code, notes, and snippets.

View lxdlam's full-sized avatar
🎯
Focus

lxdlam lxdlam

🎯
Focus
View GitHub Profile

$argon2id$v=19$m=512,t=256,p=1$n6yvzJe2AxOS6yQBsCPKKA$Ei089XHiQ+u6SDk9DmyzLOzr7qccHmzJ88uK3eKg2dQ

@lxdlam
lxdlam / links.md
Created March 7, 2024 06:02 — forked from Leandros/links.md
Writing a Modern Rendering Engine
from abc import ABC
from copy import deepcopy
from dataclasses import dataclass, fields
from datetime import datetime
from enum import Enum
from typing import Union, get_args, get_origin
from uuid import UUID
nt = type(None)
package http
import (
"bytes"
"context"
"encoding/json"
"io"
"net/http"
)
// You need at least `nom = "7"` to work.
mod protocol {
use std::{fmt, str::FromStr};
use nom::Finish;
use self::parser::parse;
const DELIMITER: &str = "\r\n";
[package]
name = "playground"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
tokio = { version = "1.9", features = ["full"] }
thiserror = "1.0"
@lxdlam
lxdlam / bucket.go
Created May 10, 2021 09:27
A simple bucket based goroutine limiter
package main
import (
"fmt"
"sync"
"time"
)
type Limiter interface {
Commit(func())
@lxdlam
lxdlam / main.cpp
Created March 30, 2020 15:10
SRM 502 Div1 Medium
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
const int MAXN = 60;
const int MAXT = 1e5 + 10;
#include <bits/stdc++.h>
using namespace std;
void print_vector(const vector<int>& vec) {
for (const auto& item : vec) {
cout << item << ' ';
}
cout << '\n';
@lxdlam
lxdlam / lstm.ipynb
Created June 14, 2019 05:45
Learning LSTM
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.