Skip to content

Instantly share code, notes, and snippets.

View zuramai's full-sized avatar

Saugi zuramai

View GitHub Profile
\documentclass[11pt, oneside]{article}
\usepackage[margin=0.5in]{geometry}
\geometry{letterpaper}
\usepackage[parfill]{parskip}
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{xcolor}
\pagecolor{white}
\usepackage[colorlinks = true, linkcolor = blue, urlcolor = blue]{hyperref}
\pagestyle{empty}
@ahoho
ahoho / convert-hf-to-pth.py
Created April 2, 2023 19:35
Convert huggingface model to pytorch checkpoint (modified from alpaca-lora)
# Convert a huggingface LLaMA checkpoint to an (unsharded) pytorch checkpoint
# comes from https://github.com/tloen/alpaca-lora/blob/main/export_state_dict_checkpoint.py
import argparse
import json
from pathlib import Path
import torch
import transformers
from transformers import LlamaForCausalLM, LlamaTokenizer # noqa: E402
@fzn0x
fzn0x / CLEAN_ARCHITECTURE.md
Created December 29, 2021 22:36
Clean Architecture for Goku

Clean Architecture

The value it can provide

  • An effective testing strategy that follows the testing pyramid
  • Frameworks are isolated in individual modules. When (not if) we change our mind, we only have to make a change in one place. The app has use cases rather than being tied to a CRUD system
  • Screaming architecture a.k.a. it screams its intended usage. When you look at the package structure, you get a feel for what the application does rather than seeing technical details
  • All business logic is in a use case, so it’s easy to find and not duplicated anywhere else
  • Hard to do the wrong thing because modules enforce compilation dependencies. If you try to use something that you’re not meant to, the app doesn’t compile
  • It is always ready to deploy by leaving the wiring up of the object for last. Or by using feature flags, so we get all the benefits of continuous integration
Vue.js 3 hrs 49 mins ████████████░░░░░░░░ 45.5%
HTML 1 hr 39 mins ██████▓░░░░░░░░░░░░░ 19.8%
CSS 1 hr 38 mins ██████▓░░░░░░░░░░░░░ 19.6%
JavaScript 38 mins ████▒░░░░░░░░░░░░░░░ 7.7%
@zuramai
zuramai / base.css
Last active July 23, 2022 03:02
Base Responsive Flex CSS Without Bootstrap
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
.row {
margin: 0 -1rem;
display:flex;
flex-wrap: wrap;
@chris-ramon
chris-ramon / main.go
Created September 10, 2018 15:48
full working example PR#388 + PR#393
/*
2018/09/09 20:33:22 [GetCustomerBatchFn] batch size: 3
2018/09/09 20:33:22 [GetCustomerAffiliationsBatchFn] batch size: 3
2018/09/09 20:33:22 [GetGroupBatchFn] batch size: 4
2018/09/09 20:33:22 [GraphQL result] total customers: 3
2018/09/09 20:33:22 [GraphQL result]:
{"data":{"CustomerVisit":{"items":[{"customer":{"affiliations":{"items":[{"group":{"id":1,"name":"first group"}},{"group":{"id":4,"name":"fourth group"}}]},"first_name":"first customer","id":1,"last_name":"first customer last name"}},{"customer":{"affiliations":{"items":[{"group":{"id":2,"name":"second group"}},{"group":{"id":4,"name":"fourth group"}}]},"first_name":"second customer","id":2,"last_name":"second customer last name"}},{"customer":{"affiliations":{"items":[{"group":{"id":3,"name":"third group"}},{"group":{"id":4,"name":"fourth group"}}]},"first_name":"third customer","id":3,"last_name":"third customer last name"}}]}}}
*/
package main
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active July 18, 2024 10:09
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@kasparsd
kasparsd / custom-post-taxonomy-permalinks.php
Created June 13, 2012 15:47
Create permalink structure URLs for custom post types that include all parent terms from a custom taxonomy
<?php
/*
Term Archive Pages:
- http://example.com/recipes/dinner/
- http://example.com/recipes/breakfast,brunch/
Single Recipe Pages:
- http://example.com/recipes/dinner/soup-title/