Skip to content

Instantly share code, notes, and snippets.

View nunenuh's full-sized avatar
🏠
Working remotely from home

Lalu Erfandi Maula Yusnu nunenuh

🏠
Working remotely from home
View GitHub Profile
@nunenuh
nunenuh / tone_generator.py
Last active May 15, 2018 00:45
Generating tone based on Factor 9 built on 432
from pysine import sine
import numpy as np
def genfreq(num):
tone = []
lbfreq = [126, 135, 144, 153, 162, 171, 180,
189, 198, 207, 216, 225, 234, 243]
lbfreq = np.array(lbfreq)
for i in range(0, num):
val = lbfreq * (2**i)
@nunenuh
nunenuh / playtone.py
Created May 14, 2018 23:26
Play Tone with specific frequency in python
from pysine import sine
import numpy as np
listfr = [126, 144, 162, 171, 189, 216, 234, 252]
freq = np.array(listfr)
for f in freq:
print(f)
sine(frequency=f, duration=2.0)
import os
from pathlib import Path
from shutil import copyfile
srcdir = '/home/nunenuh/research/fase2/data/new/'
dstdir = '/home/nunenuh/research/fase2/data/new/combined/'
def copyalltoo(srcdirz, dstdirz, verbose=False):
#create directory if exists
dst = Path(dstdirz)
Install Java JDK
The manual way
Download the 32-bit or 64-bit Linux "compressed binary file" - it has a ".tar.gz" file extension.
Uncompress it
tar -xvf jdk-8-linux-i586.tar.gz (32-bit)
tar -xvf jdk-8-linux-x64.tar.gz (64-bit)
@nunenuh
nunenuh / repair_mysql.txt
Created November 26, 2017 13:03
How To Repair Lost Password MySQL
service mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
mysql>use mysql;
mysql>update user set password=PASSWORD("a") where User='root';
mysql>flush privileges;
mysql>quit;
@nunenuh
nunenuh / ListUbuntuInstall.txt
Created November 26, 2017 12:54
List Ubuntu Install Apps
#server Install
apt-get install -y apache2 apache2-doc apache2-utils apache2-suexec libapache2-mod-php5 libapache2-mod-fcgid libapache2-mod-suphp libruby libapache2-mod-python
#PHP
sudo apt-get install php5-fpm php5 php5-common php5-dev php5-dbg php5-gd php5-mysql php5-imap php5-cli php5-cgi php5-mcrypt mcrypt php5-imagick imagemagick php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json memcached php-pear php-auth
apt-get install -y mysql-server mysql-client mysql-workbench phpmyadmin
apt-get install -y openssh-server openssh-client openssh-known-hosts openssh-sftp-server openssh-blacklist openssh-blacklist-extra openssl openssl-blacklist openssl-blacklist-extra
@nunenuh
nunenuh / digitalroot.py
Created November 26, 2017 12:50
Digital Root Implementation in Python
# I forgot where I got this source... this is not mine...
import numpy
def dsum(n):
return sum([int(d) for d in str(n)])
def droot(n):
r = dsum(n)
if r < 10:
return r
@nunenuh
nunenuh / UbuntuPerfectInstall.md
Last active August 26, 2016 13:36
Perfect Install Ubuntu

###Apache Web Server sudo apt-get install -y apache2 apache2-doc apache2-utils apache2-suexec libapache2-mod-php5 libapache2-mod-fcgid libapache2-mod-suphp libruby libapache2-mod-python

###PHP5 sudo apt-get install -y php5-fpm php5 php5-common php5-dev php5-dbg php5-gd php5-mysql php5-imap php5-cli php5-cgi php5-mcrypt mcrypt php5-imagick imagemagick php5-curl php5-intl php5-memcache php5-memcached php5-ming php5-ps php5-pspell php5-recode php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json memcached php-pear php-auth

###PHP7.0 sudo apt-get install -y php7.0-fpm php7.0 php7.0-common php7.0-dev php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php7.0-mcrypt mcrypt php7.0-curl php7.0-intl php7.0-ps php7.0-pspell php7.0-recode php7.0-sqlite php7.0-tidy php7.0-xmlrpc php7.0-xsl php7.0-json memcached php-pear php-auth

###MySQL Server

@nunenuh
nunenuh / std2.html
Created June 26, 2016 20:20
SIALEM
<h3><strong>2.1. RUANG LINGKUP MATERI</strong></h3>
<table cellpadding="1" cellspacing="0" style="width:652px">
<tbody>
<tr>
<td>
<p>2.1.1.</p>
<p>Materi pembelajaran</p>
</td>
@nunenuh
nunenuh / std1.html
Created June 26, 2016 20:02
SIALEM
<table cellpadding="1" cellspacing="0" style="width:652px">
<tbody>
<tr>
<td>
<p>1.1.1.&nbsp;Keberadaan SKL</p>
</td>
<td>
<p>Apakah Program Kursus dan Pelatihan menggunakan Standar Kompetensi Lulusan (SKL) yang sesuai dalam pelaksanaan pembelajaran?</p>
<p><input name="vehicle" type="checkbox" value="Bike" />Sesuai dengan visi, misi, dan tujuan lembaga</p>