Skip to content

Instantly share code, notes, and snippets.

View LovelyBuggies's full-sized avatar
👣
Live in the moment.

N!no LovelyBuggies

👣
Live in the moment.
View GitHub Profile
@LovelyBuggies
LovelyBuggies / Code2Tensor.ipynb
Created May 1, 2022 01:03
Tensor Representation of Code for Vulnerability Detection
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@LovelyBuggies
LovelyBuggies / Clustering.md
Last active November 17, 2020 14:08
Using Minimum Spanning Tree and K-Means to cluster 2-d points.

In this note, I'll show how to cluster the points into K clusters via MST and K-means.

Note that these two algorithms will generate different results.

MST

#include <iostream>
@LovelyBuggies
LovelyBuggies / Tokenizer for C++ Program.md
Last active November 19, 2023 15:50
Tokenizer for C++ Program

In this note, I wrote a c++ tokenizer using a finite state machine, which can get tokens from a cpp program.

I may omit some situations, if you found, leave a comment and let me know.

Tokenize c++ std input

#include <iostream>
#include <cctype>
#include <vector>