Skip to content

Instantly share code, notes, and snippets.

View leannejdong's full-sized avatar
💭
I may be slow to respond.

Leanne Dong leannejdong

💭
I may be slow to respond.
View GitHub Profile
@Cartexius
Cartexius / install_gtest_ubuntu.md
Last active November 7, 2024 00:57
Install gtest in Ubuntu
@ilokhov
ilokhov / build
Created April 2, 2018 20:04
Build shell script for personal website
#!/bin/bash
# clean dist directory and copy all files from src
rm -rf dist && mkdir dist
cp -a src/. dist/
### images
# declare sizes
declare -a sizes=('710' '1000' '1420')
@TysonRayJones
TysonRayJones / gsl_on_osx_and_arcus_guide.md
Last active October 15, 2024 11:43
GSL on OSX, Ubuntu and ARCUS

this guide may be outdated for MacOS versions beyond 10.14 Mojave (and implied Xcode versions)

GSL

Table of Contents

@marc-fez
marc-fez / dell-XPS-15-arch-linux-install
Last active November 7, 2024 12:50 — forked from mattiaslundberg/arch-linux-install
Instructions for installing arch linux on a Dell XPS 15 with full system encryption using dm-crypt and luks
# Having problems with the nvidia drivers
# Arch wiki page on XPS 15
# https://wiki.archlinux.org/index.php/Dell_XPS_15_9560
# Install ARCH Linux with encrypted file-system and UEFI on Dell XPS 15
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
@nadavrot
nadavrot / Matrix.md
Last active April 20, 2025 12:59
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of

@S-M-Salaquzzaman
S-M-Salaquzzaman / Newton Raphson Load Flow solving 3 Bus using MATLAB
Created July 20, 2018 07:47
This code calculates the load flow based on newton raphson methd for three bus power system. The Jacobian is written in a very easy form to understabd.
%Find Ybus Admittance Matrix(any number of Bus)
%I am used 3 Bus and , 2 bus ans 3 bus are not connected
clc
clear
% |FromBus|ToBus|Impedance|LineCharging|
d = [ 1 2 .4j -20j ;
1 3 .25j -50j;
2 3 0j 0j ; ];
fb = d(:,1); tb = d(:,2);
y = 1./d(:,3);
@moorepants
moorepants / environment.yml
Last active September 11, 2024 02:25
Realtime Low and High Pass Butterworth Filters
name: filter
channels:
- conda-forge
- defaults
dependencies:
- numpy
- scipy
- matplotlib
- sympy
- dynamicisttoolkit
@belltailjp
belltailjp / cmdscale.py
Last active June 17, 2019 21:55
Multi-Dimensional Scaling (also as known as Principal Coordinate Analysis) by Python
import matplotlib.pyplot as plt
import numpy as np
from sklearn import manifold
cities = "Athens Barcelona Brussels Calais Cherbourg Cologne Copenhagen Geneva Gibraltar Hamburg HookOfHolland Lisbon Lyons Madrid Marseilles Milan Munich Paris Rome Stockholm Vienna".split(" ")
d = np.array([
# from eurodist dataset: https://rstudio-pubs-static.s3.amazonaws.com/221886_5c57ad0f5ff546e8af6386162f29fabc.html
[ 0, 3313, 2963, 3175, 3339, 2762, 3276, 2610, 4485, 2977, 3030, 4532, 2753, 3949, 2865, 2282, 2179, 3000, 817, 3927, 1991],
[3313, 0, 1318, 1326, 1294, 1498, 2218, 803, 1172, 2018, 1490, 1305, 645, 636, 521, 1014, 1365, 1033, 1460, 2868, 1802],
[2963, 1318, 0, 204, 583, 206, 966, 677, 2256, 597, 172, 2084, 690, 1558, 1011, 925, 747, 285, 1511, 1616, 1175],
@paolocarrasco
paolocarrasco / README.md
Last active April 7, 2025 22:13
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@jeeho-ahn
jeeho-ahn / eigen_cmake.md
Last active March 27, 2024 08:51
Setting up CMake for Eigen Library

Setting up CMake for Eigen Library

Yes. THE EIGEN Library.
It is the library lures engineers first by its name then its capability in matrix manipulation that we've only seen in good expensive almighty slow MATLAB, specifically in C++.

Yes, from my experience so far, Eigen Library is AWESOME. It gives the users a giant freedom AND efficiency in matrix operations in a way I wouldn't even be able to even think about to implement alone.

YES IT IS FREE TO USE!