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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> |
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
# http://nlftp.mlit.go.jp/ksj/api/about_api.html | |
# sudo port install py27-lxml | |
#sudo easy_install pip | |
#xcode-select --install | |
#sudo pip install lxml | |
import urllib2 | |
from lxml import etree |
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 | |
# https://cloud.google.com/compute/docs/faq#find_ip_range | |
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
myarray=() | |
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
do | |
myarray+=($LINE) | |
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
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
// replace with project number | |
var projectNumber = 'xxxxxxx'; | |
// replace with Sheets's ID | |
var ssid = "xxxxxxx"; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
function getSpreadsheetId(){ |
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
# To see which processes (files) are consuming a range of ports, use the List Open Files command | |
lsof -i :8000-8020 |
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
//This script should be stored in Drive as a AppScript file and configured to run at intervals | |
//In my case, run it every two hours and copied the doc if there was an update | |
//ID of original document | |
var srcDocId="xxxxxx"; | |
//ID of desitination Folder | |
var targetFolderId= "xxxxxx"; | |
function copyDoc() { | |
copyDocIfUpdated(srcDocId,targetFolderId,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
#!/bin/bash | |
docker run -it -p 8888:8888 tensorflow/syntaxnet |
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 | |
docker run -it -p 127.0.0.1:8081:8080 -v $HOME/datalab:/content -e PROJECT_ID=sandbox-moritani gcr.io/cloud-datalab/datalab:local |
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 | |
docker pull gcr.io/cloud-datalab/datalab:local |
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
# this is a udf sample to calculate coordinates from latlng | |
# https://developers.google.com/maps/documentation/javascript/examples/map-coordinates | |
CREATE TEMPORARY FUNCTION | |
project (latitude FLOAT64, longitude FLOAT64, zoom FLOAT64) | |
RETURNS STRUCT < worldCoordinate_x float64, | |
worldCoordinate_y float64, | |
pixelCoordinate_x float64, | |
pixelCoordinate_y float64, | |
tileCoordinate_x float64, | |
tileCoordinate_y float64 > |
OlderNewer