The OS X filesystem, HFS+, by default is in read-only mode in my ubuntu.

Sepertinya tahun depan tidak akan ada kebakaran hutan,

tak ada asap, 

karena tak ada lagi yang bisa dibakar.

I got the problem because using 'recursive' as function name, :)

At least now I know that, :)

The next? Beautifying the result, :D 

.

Sepuluh hari gak ketemu, :)

Jika MotoGP Sepang gagal karena asap, maka Rossi cukup finish ketiga di Valencia untuk jadi juara dunia, :)

Trik Old Shatterhand di Llano Estacado untuk mendatangkan hujan sepertinya tak berhasil di sini.

I have trouble accessed it within function,

so I pass it to every function,

not so elegant solution, but it works, :) .

In the code below, I have global variable named list.

:) Xcode update, iTunes, and Command Line Tools

Ini terjadi di Malang, bukan hutan, ini ladang tebu sehabis panen.

Naik sepeda lewat beginian, hanya 20 meter terpapar asap, rasanya...

Cuma sekian detik.

Here it is. I used getFolderById() to determine the folder I want to list the files and folders inside.  I used home as variable name of the folder home.getFiles() is used to gets a collection of all files in home. home.getFolders() is used to gets a collection of all folders in home. I have list and row  as array or tuple or 'list' to accommodate the result. Maybe it's wasting time to have two variable, but I plan to write code to list 'files and folders inside subfolders' recursively. I know maybe it didn't even need that array variable, :). But just in case...

Google App Script is fun, :) Here's my simple hello world, :) What I did is create "form", which actually have no form at all, just submit button to activate listFilesNFolders(form) function on script (Code.gs file) The code will return output 'tadaa...', 'heheh...', and 'Hello World!!!'. Notice the html formatting, :)

Jika terus-terusan matahari tertutup asap hingga jadi berwarna orange atau malah tidak terlihat sama sekali, saya takut kalo tumbuhan tidak dapat berfotosintesis dengan sempurna dan tidak dapat menghasilkan oksigen yang optimal.

Sesak karena asap, juga karena kurang oksigen.

I updated my last code, so it will list all folders name too, in addition of files name.

I heard it's powerful, it could be integrated with Google Drive, so I decided to give it a try. Try to make a form Name, NIM, Offering, and a button to upload a file. Basically, it's super simple form. It will upload file to my Google Drive, place it in folder NIM (or create it if there's no folder match with NIM). As addition, I created spreadsheet manually and update its content, the list of files in the folders. (still got a trouble) function uploadFiles(form) { try { var dropbox = "Testing"; var folders = DriveApp.getFoldersByName(dropbox); if (folders.hasNext()) { var folder = folders.next(); } else { var folder = DriveApp.createFolder(dropbox); } folders = folder.getFoldersByName(form.myNIM); if(folders.hasNext()){ var anak = folders.next(); } else{ var anak = folder.createFolder(form.myNIM); } var blob = form.myFile; var file = anak.createFile(blob); file.setDescription("Uploaded by " + form.myName); listFilesInFolder(folder) return "File uploaded successfully " + file.getUrl(); } catch (error) { return error.toString(); } } function listFilesInFolder(folderName) { //var ssNew = SpreadsheetApp.create("Rekap"); //https://drive.google.com/open?id=11AzGyCcWfvcE_mUltyjAx17wJDghOS-YH5e_zrHT-zc //https://docs.google.com/spreadsheets/d/11AzGyCcWfvcE_mUltyjAx17wJDghOS-YH5e_zrHT-zc/edit#gid=0 //var ss = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/abc1234567/edit'); var ss = SpreadsheetApp.openById("11AzGyCcWfvcE_mUltyjAx17wJDghOS-YH5e_zrHT-zc"); SpreadsheetApp.setActiveSpreadsheet(ss); var activeSpreadsheet = SpreadsheetApp.getActiveSpreadsheet(); /* var myNewSheet = activeSpreadsheet.getSheetByName("Rekap"); if (myNewSheet != null) { activeSpreadsheet.deleteSheet(myNewSheet); } myNewSheet = activeSpreadsheet.insertSheet(); myNewSheet.setName("Rekap"); */ //0BxZS62a5NdNYUGxySmp2QW41OUU //var folder = DriveApp.getFoldersByName(folderName).next(); var id = '0BxZS62a5NdNYUGxySmp2QW41OUU'; var folder = DriveApp.getFolderById(id); var contents = folder.getFiles(); var file, data, sheet = SpreadsheetApp.getActiveSheet(); sheet.clear(); sheet.appendRow(["Name", "Date", "Size", "URL", "Download", "Description", "Type"]); //sheet.appendRow(["Tadaa..."]) for (var i = 0; i < contents.length; i++) { file = contents[i]; if (file.getFileType() == "SPREADSHEET") { continue; } data = [ file.getName(), file.getDateCreated(), file.getSize(), file.getUrl(), "https://docs.google.com/uc?export=download&confirm=no_antivirus&id=" + file.getId(), file.getDescription(), file.getFileType().toString() ]; sheet.appendRow(data); } }; function doGet(e) { return HtmlService.createHtmlOutputFromFile('form.html'); }

Pake jasa pawang hujan seluruh Indonesia?

What I did is read a .wav file, extract the raw audio data, (I use first 1/20 data for sample), transform it using Fast Fourier Transform, manipulate it (I only use the first cluster frequency spectrum ), transform it back using InverseFFT. I use matplotlib and numpy module to plot and compute. I also use sys and wave module as 'interface'. import matplotlib.pyplot as plt import numpy as np import wave import sys spf = wave.open('violin2.wav','r') #Extract Raw Audio from Wav File signal = spf.readframes(-1) signal = np.fromstring(signal, 'Int16') fs = spf.getframerate() print fs #If Stereo if spf.getnchannels() == 2: print 'Just mono files' sys.exit(0) Time=np.linspace(0, len(signal)/fs, num=len(signal)) sample = [] st=[] for i in np.arange(len(signal)/20): sample.append( signal[i]) st.append(Time[i]) ft=np.fft.fft(sample) pft=[] for i in np.arange(len(ft)): if i<500: data-blogger-escaped-ample="" data-blogger-escaped-else:="" data-blogger-escaped-from="" data-blogger-escaped-ft="" data-blogger-escaped-i="" data-blogger-escaped-ift="" data-blogger-escaped-ignal="" data-blogger-escaped-ime="" data-blogger-escaped-pft.append="" data-blogger-escaped-pft="" data-blogger-escaped-plt.figure="" data-blogger-escaped-plt.grid="" data-blogger-escaped-plt.plot="" data-blogger-escaped-plt.show="" data-blogger-escaped-plt.title="" data-blogger-escaped-pre="" data-blogger-escaped-rue="" data-blogger-escaped-sample="" data-blogger-escaped-signal="" data-blogger-escaped-st="" data-blogger-escaped-wave...=""> .

I use it to load an image,

convert to grayscale,

read the value of every pixel,

print it,

create the diagonal cross section and record the value

and then plot it.

Melihat koreografi Bruno Mars dan The Hooligans, jadinya malah teringat Rhoma Irama dan Soneta

Open the Image to im using Image.open() syntax

Load the value of im into a and now we have 2D tuple and live become easier, :)

.

Here's what I'm doing on EL Capitan.

I have GCC come with Xcode but I use GCC 5.2.

I know, Windows has tile/cascade feature gazillion years ago.

Anyway, here it is.

I like this new build animation, so many possibilities's coming with it.

Keep in mind that it works with line, as its name suggests, :) .

It works with shape without color fill too.

My Pages, Number and Keynote received new feature. ...and hey, my view is increased twofold, :D (And my Keynote on iPhone 4s is upgraded as well)

Dulu belajar berbicara.

Sekarang perlu untuk belajar diam.

Berapa nikmat yang diberikan kepadaku?

Ngawur,

kurang kerjaan.

Sana, mending hitung butiran pasir di pantai saja sana,

tu lebih sedikit, lebih gampang.

I have problem with gfortran coming with Xcode. Apple is come with its version of gcc, using clang.

So I uninstalled it.

Here it is. We could set the order of interpolation by changing the value of k

from pylab import * from random import uniform k = 11 def l(t): l = [] for i in arange (len(t)): l.append(0.) for j in arange(k+1): lag = 1.

Look, the wrong way often provide a beautiful result.

It's not Discrete Fourier Transform. Instead, I use continue definition (using Integral, not Sum) to compute the transformation. I know, it's weird, but it's worth a try, :) What I did is transform signal with 3 frequency, remove the two frequency and trasform back to time-signal.

I have no problem mount it on Centos, read and write mode.

But, on Ubuntu, it needs some works.

Yang tak terlupa, saat ada acara pembacaan surat YaaSin di rumah, ikut tradisi setempat, saat bapak meninggal. Yeah, bapak meninggal, itu sulit dilupakan. Tapi beberapa minggu ini ada yang mengungkit-ungkit kenangan itu lagi, kebakaran di Sumatera dan Kalimantan. Bukan tentang bapak yang diungkit (mudah sekali mengingat kejadiaan itu), tetapi tentang asap. Apa yang terjadi saat pembacaan surat YaaSin? Tentu saja, membaca surat YaaSin bersama-sama, diawali surat-surat pendek untuk pemanasan, Yaasin, trus doa-doa yang dipimpin secara estafet oleh dua pemuka agama. Yang terungkit oleh kebakaran di SwarnaDwipa dan Borneo justru sebelum acara. Ketika tamu mulai datang dan menunggu yang lain. Harus menemui tamu itu jelas, dan kebanyakan mereka adalah perokok! Hm, mereka merokok sebelum mendoakan seseorang yang meninggal akibat rokok, ckckck. Ketika acara akan mulai, tamu sudah semakin banyak, delapan puluh lebih. Ruangan sudah penuh hingga meluber ke halaman. Juga asap rokoknya. Sehari, ..., OK Dua hari, OOOOK... Hari ketiga, KO..., ke bidan, kena radang tenggorokan parah, harus minum 7 jenis pil.

On MacbookAir, :)

My VLC crashed

Matplotlib Python module's not working, (visual python's running without problem)

Archive
Label
Popular Posts
Popular Posts
Loading