Skip to content

Instantly share code, notes, and snippets.

View sayyidyofa's full-sized avatar
🍌
Banana

Sayyid Yofa sayyidyofa

🍌
Banana
View GitHub Profile
@sayyidyofa
sayyidyofa / metnum_fixed_point.m
Created September 24, 2019 13:16
Snippet Kode Octave untuk mencari akar persamaan dengan menggunakan metode fixed point
pkg load symbolic
# x = sym("x");
# f = inline("sqrt(2*x + 3)");
function akar = iterasi(fungsi_param, start_point, toleransi=0, verbose=true, show_plot=false)
x_coords = []; # Juga untuk Xr
y_coords = [];
intervals = []; # |Xr+1 - Xr|

Readme First

Untuk kejelasan status user saat mengetik command, maka ditentukan hal berikut
Karakter "$" di awal berarti posisi pada user biasa
Karakter "#" di awal berarti posisi pada user root
Tiap command(yang berawalan dengan "$" atau "#") harus dieksekusi dengat urut.
Saat copas/mengetik command, jangan copas karakter "$"atau "#" di awal baris.

Install prequisites

Jika ada prompt untuk masukkan password, masukkan password user Ubuntu.\

#########################################################################################
# copy perintah dibawah utk install apache spark #
# pastikan VM terhubung ke internet #
# jika ada prompt memninta password berikan password user ubuntu di VM. #
# proses install spark ini mengasumsikan kalau Hadoop telah dikonfigurasi dengan benar #
# setelah selesai spark bisa distart dengan start-master.sh #
#########################################################################################
cd ~ && \
wget -O spark-2.4.4.tgz https://www-us.apache.org/dist/spark/spark-2.4.4/spark-2.4.4-bin-hadoop2.7.tgz && \
sudo apt install -y openjdk-8-jre openjdk-8-jdk ssh && wget https://archive.apache.org/dist/hadoop/common/hadoop-2.9.1/hadoop-2.9.1.tar.gz && tar xvzf hadoop-2.9.1.tar.gz && sudo mkdir /usr/local/hadoop && sudo mv ~/hadoop-2.9.1/* /usr/local/hadoop && sudo chown -R $USER:$USER /usr/local/hadoop && rm -rf ~/hadoop-2.9.1 ~/hadoop-2.9.1.tar.gz
pkg load symbolic
function ang_vel = getAngVel (lin_vel, radius, theta)
ang_vel = abs(lin_vel) * sin(theta) / radius;
endfunction
function ang_vel_diff = getAngVelDiff (mb_len, radius, theta, t0, t1, t2, t3)
ang_vel_diff = 2 * mb_len / radius * theta * (t3 - t0 + t2 - t1);
endfunction
We can't make this file beautiful and searchable because it's too large.
Suburb,Address,Rooms,Type,Price,Method,SellerG,Date,Distance,Postcode,Bedroom2,Bathroom,Car,Landsize,BuildingArea,YearBuilt,CouncilArea,Lattitude,Longtitude,Regionname,Propertycount
Abbotsford,68 Studley St,2,h,,SS,Jellis,3/09/2016,2.5,3067,2,1,1,126,,,Yarra City Council,-37.8014,144.9958,Northern Metropolitan,4019
Abbotsford,85 Turner St,2,h,1480000,S,Biggin,3/12/2016,2.5,3067,2,1,1,202,,,Yarra City Council,-37.7996,144.9984,Northern Metropolitan,4019
Abbotsford,25 Bloomburg St,2,h,1035000,S,Biggin,4/02/2016,2.5,3067,2,1,0,156,79,1900,Yarra City Council,-37.8079,144.9934,Northern Metropolitan,4019
Abbotsford,18/659 Victoria St,3,u,,VB,Rounds,4/02/2016,2.5,3067,3,2,1,0,,,Yarra City Council,-37.8114,145.0116,Northern Metropolitan,4019
Abbotsford,5 Charles St,3,h,1465000,SP,Biggin,4/03/2017,2.5,3067,3,2,0,134,150,1900,Yarra City Council,-37.8093,144.9944,Northern Metropolitan,4019
Abbotsford,40 Federation La,3,h,850000,PI,Biggin,4/03/2017,2.5,3067,3,2,1,94,,,Yarra City Council,-37.7969,144.9969,Northern Metropo
---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!
Time: 4/2/20 10:07 PM
Description: Exception in server tick loop
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at net.minecraftforge.fml.javafmlmod.FMLJavaModLanguageProvider$FMLModTarget.loadMod(FMLJavaModLanguageProvider.java:78) ~[?:31.1] {re:classloading}
at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:234) ~[?:?] {re:classloading}
at net.minecraftforge.fml.ModLoader.lambda$buildMods$26(ModLoader.java:214) ~[?:?] {re:classloading}
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
}
}
@sayyidyofa
sayyidyofa / main.c
Created August 28, 2020 15:15
Quick and dirty rewritten code from daytimetcpcli.c
#include <stdio.h>
#include <strings.h>
#include <unistd.h>
#include <memory.h>
#include "/usr/include/netinet/in.h"
#include "/usr/include/arpa/inet.h"
#define MAXLINE 4096
int main(int argc, char **argv) {
@sayyidyofa
sayyidyofa / echoclient.c
Last active October 11, 2020 04:24
tugas3_client.c
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <strings.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <unistd.h>
#define listenQ 5