Skip to content

Instantly share code, notes, and snippets.

@marktaiwan
marktaiwan / flaggotry.user.js
Created November 15, 2022 12:20
Add flags to the posts when viewing archived /mlp/ threads on Desuarchive
// ==UserScript==
// @name Desu Flaggotry
// @namespace https://desuarchive.org/mlp/thread/
// @description Add flags to the posts when viewing archived /mlp/ threads on Desuarchive
// @version 1.0.0
// @author Anonymous
// @icon https://s.4cdn.org/image/flags/mlp/anf.gif
// @match https://desuarchive.org/mlp/thread/*
// @run-at document-end
// @grant GM_addStyle
/* Deleting a node from Binary search tree */
#include<iostream>
using namespace std;
struct Node {
int data;
struct Node *left;
struct Node *right;
};
//Function to find minimum in a tree.
Node* FindMin(Node* root)
@Pusnow
Pusnow / CS 분야 우수 학술대회 목록.csv
Last active March 29, 2024 07:22
CS 분야 우수 학술대회 목록
약자 한국정보과학회 (2020) BK21플러스 IF (2018) KAIST CS (2022) SNU CSE (2023.9) POSTECH CSE (2023.10) 평균 (정규화) 학회명 DBLP Key
AAAI 최우수 4 O O 최우수 1.00 AAAI Conference on Artificial Intelligence (AAAI) conf/aaai
AAMAS 우수 2 0.20 International Joint Conference on Autonomous Agents & Multiagent Systems (AAMAS) conf/atal
ACCV 우수 1 우수 0.25 Asian Conference on Computer Vision (ACCV) conf/accv
ACL 최우수 4 O O 최우수 1.00 Annual Meeting of the Association for Computational Linguistics (ACL) conf/acl
ACL Findings 우수 0.10 Findings of ACL series/findacl
ACSAC 우수 2 우수 0.30 Annual Computer Security Applications Conference (ACSAC) conf/acsac
AIED 우수 0.10 International Conference on Artificial Intelligence in Education (AIED) conf/aied
AISTATS 우수 1 우수 0.25 International Conference on Artificial Intelligence and Statistics (AISTATS) conf/aistats
ANCS 우수 1 우수 0.25 Symposium on Architectures for Networking and Communications Systems (ANCS) conf/ancs
@smoser
smoser / README.md
Last active March 29, 2024 07:19
set up a ssh tunnel only user for ssh proxy jump

Set up a ssh tunnel only user

In order to give someone access to hosts that are available only by ssh "bouncing" (ProxyJump), add a user for this specific purpose.

We have an internal openstack where instances get IPs on per-tenant networks. Each tenant has a 'bastion' host that has a "public" ip (floating ip). You can access other instances by bouncing through the bastion. From time to time I want to let someone else into an instance. This could be done either with:

a.) just give them shell access to the bastion and let them hop through. Sharing an unrestricted shell account on my bastion is less than ideal. b.) assign a floating/"public" IP to the instance so they could go directly in. Floating IPs are limited, so this is less than ideal.

So instead, I have set up a single user as described here that can only be used for ProxyJump. It allows others proxied access to my instances but without granting them full shell access.

@tartakynov
tartakynov / fourex.py
Last active March 29, 2024 07:18
Fourier Extrapolation in Python
import numpy as np
import pylab as pl
from numpy import fft
def fourierExtrapolation(x, n_predict):
n = x.size
n_harm = 10 # number of harmonics in model
t = np.arange(0, n)
p = np.polyfit(t, x, 1) # find linear trend in x
x_notrend = x - p[0] * t # detrended x
@ThioJoe
ThioJoe / Error-Lookup-Tool-Friendly.bat
Last active March 29, 2024 07:09
Error Lookup Tool Friendly Output
@echo off
:: Note: Lines beginning with "REM" or :: are comments
:: Script by: https://github.com/thiojoe
:: Purpose: Creates a much more user friendly output for the Microsoft Error Lookup Tool (err.exe). It parses the original output and modifies the text.
:: Usage: Just call the batch file with command prompt along with the error code the same as you would with err.exe
:: Example: error.bat 50
:: Recommended to rename this script to something shorter like 'error.bat'. Must be next to the lookup tool exe file.
@james2doyle
james2doyle / getXML.go
Last active March 29, 2024 07:08
Use HTTP to GET and parse XML in golang
// tweaked from: https://stackoverflow.com/a/42718113/1170664
func getXML(url string) ([]byte, error) {
resp, err := http.Get(url)
if err != nil {
return []byte{}, fmt.Errorf("GET error: %v", err)
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return []byte{}, fmt.Errorf("Status error: %v", resp.StatusCode)
@hakerdefo
hakerdefo / sources.list
Last active March 29, 2024 07:15
Ubuntu 22.04 LTS (Jammy Jellyfish) complete sources.list
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
@badge
badge / demo.py
Last active March 29, 2024 07:04
from celery import Celery
from pydantic import BaseModel, TypeAdapter
from pydantic_serializer import PydanticCelerySerializer
app = Celery("tasks", broker="pyamqp://guest@localhost//", backend="rpc://")
class TaskDefinition(BaseModel):
x: int
@OrionReed
OrionReed / DOM3D.js
Last active March 29, 2024 07:04
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯