Skip to content

Instantly share code, notes, and snippets.

View phu54321's full-sized avatar

박현우 phu54321

View GitHub Profile
@phu54321
phu54321 / g1.c
Created October 7, 2017 12:59
Prime generating quine
// Simple prime generatine quine example.
char *f="?1?2?0=5755?/(?75=?5='!??5?'%?",*r="aeaaaaaaa",a[]="c*d(%%e%y]0q9=("
"05;t/\"nf<(<u*(ip;ru}lrhr+)i7(3<[;!22*);}c(,=o7*1+u1fu}(tes+a=1{=5+]1xf=);q"
";pih?c$r5p5i;0(te3cle+r\"5;=8+>0/o0;p)prfa7[,(8-;%x)*cl4hs ; a,m0]p>;4r;pu;"
"ui(r57mi;-i3+;phs)ae{p*e*=);<(y](qutxtnx(=5,=i=+]+}=ae;r xufaqnbwdi+?p+tc+c"
"t+1?8x2+n+=)p=r }(i+t=a,;rh+/+4=+ch+hf*05+,;+%)1pu6(ie3f+c\"abwei13)7c)ha;a"
"(r)=1yi)1i;ut49fl4(;h?a[hal6){:;{ar}r\"-;'],<c0futc)2(s)*pa1a5ike))f3*ir(i("
"%9r!,um[)(+ch{)*e;pur?a]l;({&o2pf(9f3d7e?d=;i)(=haf;q p=t(2a[efnf1r)!(12(4\""
">t?[0i]/f4arop={u=c1?\"8(o>o)(;=*1)x),7u51,+=1[;r(ru=pt3h00,0ir0rbxp0q0;>;m"
@phu54321
phu54321 / gist:fae0240580fea77759f81853d506f683
Last active October 15, 2020 02:34
Snag duplicate remover
const fs = require('fs-extra')
const path = require('path')
const Jimp = require('jimp')
const dirnames = process.argv.slice(2)
;(async function () {
for (const dir of dirnames) {
console.log(`Processing ${dir}`)
const files = (await fs.readdir(dir)).filter(f => f.endsWith('.jpg'))
@phu54321
phu54321 / Dumping Anki's review log.md
Last active February 7, 2019 09:50
How to create a revlog from Anki:

Dumping study log (Windows & Mac users)

  1. Run anki's console with Ctrl+:
  2. On a console window, paste the code (import os ~~~~~ write('\n') on the top white box, and type Ctrl+enter
  3. File called revlog.csv would be at your desktop. Upload that file.

For privary-concerned: What revlog.txt does.

@phu54321
phu54321 / folder-window-color.js
Last active September 25, 2020 03:53
Simple way to apply each folder opening a unique color
setInterval(() => {
// From https://stackoverflow.com/questions/8022885/rgb-to-hsv-color-in-javascript
function hslToRgb(h, s, l) {
var r, g, b;
if (s == 0) {
r = g = b = l; // achromatic
} else {
function hue2rgb(p, q, t) {
if (t < 0) t += 1;
@phu54321
phu54321 / overlapper.py
Created October 31, 2020 14:10
Fix for cloze overlapper (2.1.28+)
# -*- coding: utf-8 -*-
# Cloze Overlapper Add-on for Anki
#
# Copyright (C) 2016-2019 Aristotelis P. <https://glutanimate.com/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version, with the additions
@phu54321
phu54321 / faster-whisper-colab-runner.ipynb
Created June 24, 2024 10:43
Faster Whisper Colab Runner.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phu54321
phu54321 / whisper-with-youtube.ipynb
Created July 9, 2024 09:09
Whisper with youtube
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.