Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 17, 2024 15:59
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@simonw
simonw / recover_source_code.md
Last active May 17, 2024 15:57
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@doraneko94
doraneko94 / roc_auc_ci.py
Last active May 17, 2024 15:55
Calculating confidence interval of ROC-AUC.
from sklearn.metrics import roc_auc_score
from math import sqrt
def roc_auc_ci(y_true, y_score, positive=1):
AUC = roc_auc_score(y_true, y_score)
N1 = sum(y_true == positive)
N2 = sum(y_true != positive)
Q1 = AUC / (2 - AUC)
Q2 = 2*AUC**2 / (1 + AUC)
SE_AUC = sqrt((AUC*(1 - AUC) + (N1 - 1)*(Q1 - AUC**2) + (N2 - 1)*(Q2 - AUC**2)) / (N1*N2))
@nemotoo
nemotoo / .gitattributes
Last active May 17, 2024 15:58
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@xirixiz
xirixiz / index.md
Created March 11, 2021 11:03 — forked from hrdtbs/index.md
Connect to Github with ED25519

Connect to github with ED25519

2017/08/09 MacOS

Check SSH key

$ ls -al ~/.ssh
@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active May 17, 2024 15:45
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

@Klerith
Klerith / instalaciones-next.md
Last active May 17, 2024 15:44
Instalaciones recomendadas para el curso de Next.js 13 >