Thursday, 3 May 2018

Mengekstrak Tabel dari PDF

Status : Draft


Tutorial [1] menggunakan layanan berbayar, dengan trial 50 halaman PDF.

Referensi

  1. Extracting Tables From PDFs, http://stanford.edu/~mgorkove/cgi-bin/rpython_tutorials/Using_Python_to_Extract_Tables_From_PDFs.php
  2. tabula-py: Extract table from PDF into Python DataFrame, https://blog.chezo.uno/tabula-py-extract-table-from-pdf-into-python-dataframe-6c7acfa5f302
  3. Extract / Identify Tables from PDF python, https://stackoverflow.com/questions/28532770/extract-identify-tables-from-pdf-python
  4. PDF Data and Table Scraping to Excel, https://stackoverflow.com/questions/29868541/pdf-data-and-table-scraping-to-excel
  5. Extract tables from PDF pages., https://github.com/ashima/pdf-table-extract
  6. Extracting table contents from a collection of PDF files [closed], https://stackoverflow.com/questions/17217194/extracting-table-contents-from-a-collection-of-pdf-files/26110587

Saturday, 14 April 2018

Berkenalan dengan Django

Status : Draft


Referensi


  1. Django, The web framework for perfectionists with deadlines, https://www.djangoproject.com
  2. Django Rest Framework with React Tutorial, https://wsvincent.com/django-rest-framework-react-tutorial/

Sunday, 10 December 2017

Mengekstrak Data dari apbd.jakarta.go.id

Status : Draft 

Mendapat email dari Mokhtar Ebrahim, beliau mengatakan, jika konten web, menggunakan javascript dan/atau meload content melalui ajax call,  BeautifulSoup dan Scrappy tidak akan dapat melakukannya, pilihan yang tepat untuk tugas ini adalah Selenium [5]

Referensi

  1. APBD Elektronik Pemerintah Provinsi DKI Jakarta, http://apbd.jakarta.go.id/
  2. How to scrape websites with Python and BeautifulSoup, https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe
  3. Scrappy, An open source and collaborative framework for extracting the data you need from websites. In a fast, simple, yet extensible way, https://scrapy.org
  4. Mewariskan Semangat Bung Hatta kepada Para Pemuda Karang Taruna di Rukun Tetangga, http://pemerintahan.openthinklabs.com/2017/12/mewariskan-semangat-bung-hatta-kepada-para-pemuda-karang-taruna-di-rukun-tetangga.html
  5. Selenium, https://www.seleniumhq.org
  6. 20+ Python Web Scraping Examples (Beautifulsoup & Selenium), https://likegeeks.com/python-web-scraping/

Monday, 12 June 2017

Python untuk Pengembangan IoT

Status : Draft

Referensi


  1. Zerynth,  middleware for smart devices, IoT and Industry 4.0 applications, https://www.zerynth.com/

Wednesday, 7 June 2017

PySide : Instalasi

Status : Draft

Ketika melakukan instalasi via pip ( sudo pip install PySide), saya mendapatkan error seperti berikut :

    /usr/bin/ld: /usr/local/lib/python2.7.9/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32S against `_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC
    /usr/local/lib/python2.7.9/lib/libpython2.7.a: error adding symbols: Bad value
    collect2: error: ld returned 1 exit status
    libshiboken/CMakeFiles/libshiboken.dir/build.make:381: recipe for target 'libshiboken/libshiboken-python2.7.so.1.2.4' failed
    make[2]: *** [libshiboken/libshiboken-python2.7.so.1.2.4] Error 1
    CMakeFiles/Makefile2:204: recipe for target 'libshiboken/CMakeFiles/libshiboken.dir/all' failed
    make[1]: *** [libshiboken/CMakeFiles/libshiboken.dir/all] Error 2
    Makefile:127: recipe for target 'all' failed
    make: *** [all] Error 2
    error: Error compiling shiboken
 

Ternyata hal ini terjadi karena python yang digunakan di Ubuntu, dikompilasi tanpa opsi --enable-shared, oleh karena itu kita perlu melakukan kompilasi ulang python.

sudo wget http://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
sudo tar -xvvzf Python-2.7.9.tgz
cd Python-2.7.9/
sudo ./configure --enable-shared --prefix=/opt/python   LDFLAGS=-Wl,-rpath=/opt/python/lib
sudo make
sudo make install
sudo update-alternatives --install /usr/bin/python python /opt/python/bin/python 1
sudo update-alternatives --config python

Install pip :

wget -c https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
sudo pip install PySide