Skip to content

Instantly share code, notes, and snippets.

@diego3g
diego3g / settings.json
Last active March 29, 2024 00:20
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@yohhoy
yohhoy / yuvrgb.md
Last active March 29, 2024 00:19
RGB <=> YCbCr(YPbPr) color space conversion
Y  = a * R + b * G + c * B
Cb = (B - Y) / d
Cr = (R - Y) / e
BT.601 BT.709 BT.2020
a 0.299 0.2126 0.2627
b 0.587 0.7152 0.6780
@antlionguard
antlionguard / twitter-remove-retweets.js
Last active March 29, 2024 00:17
With this script, you can remove all retweets you are retweeted on Twitter.
const timer = ms => new Promise(res => setTimeout(res, ms));
// Unretweet normally
const unretweetTweet = async (tweet) => {
await tweet.querySelector('div[data-testid="unretweet"]').click();
await timer(250);
await document.querySelector('div[data-testid="unretweetConfirm"]').click();
console.log('****// Unretweeted Successfully //****')
}
@mirrornerror
mirrornerror / TSP_LP_scipy.ipynb
Last active March 29, 2024 00:16
TSP LP with scipy.optimize.linprog
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ikbelkirasan
ikbelkirasan / writing-a-state-of-the-art-section.md
Created November 1, 2018 19:28
Writing the "Related Work" Section of a Paper/thesis

Writing the "Related Work" Section of a Paper/thesis

By: Chamin Morikawa (https://www.linkedin.com/pulse/writing-related-work-section-paperthesis-chamin-morikawa/)

For most students, writing about what they did on their own is not hard. But writing about others' work - which is what you have to do in the "State of the Art" or "Related Work" section - is quite hard for them. Here are a few guidelines to make this task a bit easier.

The Basics

Let's lay down our assumptions before continuing. I assume that you want to write a "Related Work" section for a research paper or a thesis that describes your approach to solve some problem. Let's also assume that there are other publications that attempt to solve the same problem, but the solutions in them are not perfect. Finally, let's assume that your approach has some difference when compared to those by others, and some improvement (faster, more accurate, easier to afford, etc.).

@wolever
wolever / fix-mouse.lua
Created November 7, 2019 18:17
Hammerspoon config to use mouse button 3 for scrolling, remap button 4 to middle button
-- HANDLE SCROLLING WITH MOUSE BUTTON PRESSED
local scrollMouseButton = 3
local deferred = false
overrideOtherMouseDown = hs.eventtap.new({ hs.eventtap.event.types.otherMouseDown }, function(e)
-- print(hs.eventtap.event.properties['mouseEventButtonNumber'])
local mouseButton = e:getProperty(hs.eventtap.event.properties['mouseEventButtonNumber'])
if mouseButton == scrollMouseButton then
deferred = true
return true
@TuxSH
TuxSH / k11_latest_n3ds.cpp
Last active March 29, 2024 00:14
Kernel11 kernel decompilation, complete with labels and comments
This file has been truncated, but you can view the full file.
/* This file was generated by the Hex-Rays decompiler.
Copyright (c) 2007-2020 Hex-Rays <info@hex-rays.com>
Detected compiler: GNU C++
*/
#include <defs.h>
@apivovarov
apivovarov / trt_quintize_resnet50.md
Last active March 29, 2024 00:13
TensorRT Quantize Resnet50 TRT

Quantize Resnet50 model with TensorRT

Intro

TensorRT supports two approaches to prepare model for Quantization - Calibration or Training

First we need to add/replace regular model nn.Layers with TRT pytorch_quantization.nn layers. Quantization layers will gather statistics required for quantization.

Once the model is modified we can use the following approaches to gather statistics before quantization:

  1. Calibrate pre-trainer model
  2. Train (1 epoch) pre-trainer model
@souhaiebtar
souhaiebtar / charles key
Created January 13, 2020 14:33
[charles proxy key] an activation key #key #activation
// Charles Proxy License
// Registration code for any version of Charles, who would want to use a cracked version?
// Charles 4.5.5 is currently the latest version and is available.
Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
Author: Neo Peng