This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
geofencing alfamart | |
# uri toko | |
dict(zip([ i.select('span')[15].text for i in soup.select('div[jstcache="206"]')],[ i.select('span')[0].text for i in soup.select('div[jstcache="206"]')])) | |
dict(zip([ i.select('span')[15].text for i in soup.select('div[jstcache="206"]')],list(zip([ i.find('a')['href'] for i in soup.select('div[jstcache="206"]')],[ i.select('span')[0].text for i in soup.select('div[jstcache="206"]')])))) | |
# shape | |
import shapefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Unpivot a pivot table of any size. | |
* | |
* @param {A1:D30} data The pivot table. | |
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1. | |
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1. | |
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column". | |
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value". | |
* @return The unpivoted table | |
* @customfunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sesuaikan query dengan data air untuk memasak dan bahan bakar memasak | |
require(foreign) | |
kor16<-read.dbf('../../SUSENAS/SUSENAS Maret 2016/kor16rt.dbf')[,c(1:4,22,26,108)] | |
b43 <- read.dbf('../../SUSENAS/SUSENAS Maret 2016/blok43.dbf') | |
b42 <- read.dbf('../../SUSENAS/SUSENAS Maret 2016/blok42.dbf') | |
#Scoring air dan bahanbakar memasak | |
air <- c( '1' = '4','2' = '3','3' = '3','4' = '2','5' = '2','6' = '1','7' = '1','8' = '0','9' = '0','10' = '0','11' = '0','12' = '0') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kmeans pernah buat bikin pembagian muatan freezer vaksin | |
import pandas as pd | |
import numpy as np | |
from sklearn.cluster import KMeans | |
from k_means_constrained import KMeansConstrained | |
data = pd.read_csv('sulsel.csv') | |
X = np.array(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pm uninstall -k --user 0 com.nttdocomo.android.databackup; | |
pm uninstall -k --user 0 com.nttdocomo.android.screenlockservice; | |
pm uninstall -k --user 0 jp.co.nttdocomo.carriermail; | |
pm uninstall -k --user 0 com.nttdocomo.android.felicaremotelock; | |
pm uninstall -k --user 0 com.nttdocomo.android.dmenu2; | |
pm uninstall -k --user 0 com.nttdocomo.android.schedulememo; | |
pm uninstall -k --user 0 com.nttdocomo.android.osv.res.overlay_305; | |
pm uninstall -k --user 0 com.nttdocomo.android.iconcier; | |
pm uninstall -k --user 0 com.sonyericsson.android.servicemenu.product.res.overlay.docomo; | |
pm uninstall -k --user 0 com.nttdocomo.android.pf.dcmwappush; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IDM | |
#!/bin/python3 | |
import urllib3 | |
from bs4 import BeautifulSoup | |
from time import sleep | |
import csv | |
import sys | |
import json | |
import ssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Chrome Repo | |
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7 | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb | |
sudo apt-get update | |
# Download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#IDM | |
#!/bin/python3 | |
import urllib3 | |
from bs4 import BeautifulSoup | |
from time import sleep | |
import csv | |
import sys | |
import json | |
import ssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ik = idm.find({}).distinct('id_desa') | |
key0 = ['Indeks_komposit','Dimensi','skor','Nilai','Perangkat_Indikator','skor_1','Nilai_1','Indikator_peritem','skor_2','kosong','eksisting_dari_indikator_umum','Kewenangan_pusat','Kewenangan_provinsi','Kewenangan_kabupaten','Kewenangan_desa','Kewenangan_sosial_alami'] | |
for u in idmy.find({},{'_id':0}): #sort descending | |
if u['id_desa'] not in ik : | |
print('mengunduh %s' % u['detail']) | |
url0 = root+u['detail'].split('"')[1] | |
n=ambil(url) | |
kkk=[] | |
try: | |
for i in n.findAll('div',{'class':'row'})[1].findAll('tr')[2:]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sae | |
wilayah<-podes[,c(1:9)] | |
head(wilayah) | |
str_to_lower(wilayah$R103N) | |
str_replace(str_to_lower(wilayah$R103N),' ','') | |
wilayah$kec<-str_replace(str_to_lower(wilayah$R103N),' ','') | |
sek_desa<-sek_desa | |
sekdesa<-sek_desa | |
sekdesa$kec <- gsub(' ','',str_replace(str_to_lower(sekdesa$Kecamatan),'kec. ','')) |
NewerOlder