This file contains hidden or 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
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| // adding download json | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
This file contains hidden or 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
| var token = "5195227267:AAHLHhhRQ_kqc6iIgIrNqzLUZF67QyXuk3o"; // FILL IN YOUR OWN TOKEN | |
| var telegramUrl = "https://api.telegram.org/bot" + token; | |
| var webAppUrl = "https://script.google.com/macros/s/AKfycbw5xC4O1jZ-JYoZ6lYyAg5b71iXqzzhwY9EWEwCET6hW8XJR2R8cThgBCAnUvRiUcg8/exec"; | |
| var ssId = "1ivlIZ0_e6EEwydJ06JfBbsuW23K75O7_m8BWUKGka80"; // FILL IN THE ID OF YOUR SPREADSHEET | |
| //AKfycbw5xC4O1jZ-JYoZ6lYyAg5b71iXqzzhwY9EWEwCET6hW8XJR2R8cThgBCAnUvRiUcg8 | |
| function getMe() { | |
| var url = telegramUrl + "/getMe"; | |
| var response = UrlFetchApp.fetch(url); | |
| Logger.log(response.getContentText()); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
NewerOlder