Skip to content

Instantly share code, notes, and snippets.

View RalXYZ's full-sized avatar
🐈
Meow!

Ralph RalXYZ

🐈
Meow!
  • Zhejiang University
  • Beijing/Hangzhou, China
  • 23:45 (UTC +08:00)
View GitHub Profile
@RalXYZ
RalXYZ / microsoft-fluentui-emoji.sh
Last active August 13, 2022 19:01
Shell script to process Microsoft fluentui-emoji repo, to meet the need of telegram emoji
# git clone https://github.com/microsoft/fluentui-emoji.git
# change this to your project dir after clone
WORK_DIR="/home/ralxyz/Desktop/fluentui-emoji-main"
# replace all space in filename to '_'
find $WORK_DIR/assets -depth -name "* *" -execdir rename 's/ /_/g' "{}" \;
mkdir target
import cyaron
f = open("input.txt", "w")
vertex = int(input("vertex num: "))
edge = int(input("edge num: "))
starting_point = int(input("starting vertex: "))
graph = cyaron.Graph.graph(vertex, edge, weight_limit=(1, 100), self_loop=False, repeated_edges=False)
import random
from numba import jit, cuda
import numpy as np
@jit
def calculate_probability():
valid_count = 0
iterations = 10000000 # 10M
for _ in range(0, iterations):
@RalXYZ
RalXYZ / linked_list.c
Created March 13, 2020 17:59
A set of linked list functions
#include <stdio.h>
#include <stdlib.h>
struct ListNode {
int data;
struct ListNode *next;
};
struct ListNode *listCreat();
void listPrint(struct ListNode *head );
@RalXYZ
RalXYZ / PlusOperatorBundle.cpp
Last active February 9, 2020 10:24
Overload operators related to "plus"
// struct test already declared
const test test::operator++(int) {
test temp = *this;
this->a++;
return temp;
}
test& test::operator++() {
++this->a;
return *this;