- in the 3rd class
- under age 10
- female
A:
train[(train['Age'] < 10) & (train['pclass'] == 3) & (train['sex'] == "female")]
/* | |
Convert GoogleDoc To HTML (on Google Drive ) | |
Converting a Google Document to simple HTML | |
http://collaborative-tools-project.blogspot.co.uk/2013/06/converting-google-document-to-simple.html | |
*/ | |
function test_convertGoogleDoc(){ |
// Iterate through the file iterator for a particular folder | |
function iterateFolderById() { | |
var files = DriveApp.getFolderById("0B5eEwPQVn6GOaUt6Vm1GVjZmSTQ").getFiles(); | |
while (files.hasNext()) { | |
var file = files.next(); | |
Logger.log(file.getName()); | |
var doc = DocumentApp.openById(file.getId()); | |
doc.replaceText("My search string or regex", "My replacement string"); | |
} |
/* | |
How do I move a file to a folder in Google Apps Script? | |
http://stackoverflow.com/questions/14696514/how-do-i-copy-move-a-file-to-a-folder-in-google-apps-script | |
Yeah, it is a bit odd that Google does not provide a move method. | |
But, considering how drive works and that a file can belong to | |
multiple folders, it makes some sense that you have write your own moves. | |
I should note that this simple function is exactly that ... simple. |
// Get the *first* folder ID by its name | |
function getFolderByName(folderName) { | |
var folders = DriveApp.getFoldersByName(folderName); | |
var folderID = null; | |
if (folders.hasNext()) | |
folderID = folders.next(); | |
return folderID; | |
} |
/* | |
Usage: | |
Adding this script to your doc: | |
- Tools > Script Manager > New | |
- Select "Blank Project", then paste this code in and save. | |
Running the script: | |
- Tools > Script Manager | |
- Select "ConvertToMarkdown" function. | |
- Click Run button. | |
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]...". |
// http://stackoverflow.com/questions/20599404/google-picker-for-google-drive | |
function doGet() { | |
var app = UiApp.createApplication(); | |
var selectCkH = app.createServerHandler('selectFile'); | |
var closeHandler = app.createServerHandler('closeDocsPicker'); | |
var docsDialog = app.createDocsListDialog().showDocsPicker()//.setInitialView(google.picker.ViewId.FOLDERS) | |
// .addView(new google.picker.PhotosView() | |
// .setType(google.picker.PhotosView.Type.FEATURED)) | |
.addCloseHandler(closeHandler) |
"two\nlines" | |
"\"This is in quotes\"" | |
int d = 3, e, f = 5; | |
byte z = 22; | |
double pi = 3.14159; | |
char x = 'x'; | |
z = (byte) f; |
#!/bin/sh | |
# http://article.gmane.org/gmane.linux.file-systems/54764 | |
# | |
# The script (test06.sh) makes a read-only overlayfs mount on top of | |
# another readonly overlayfs mount, repeating this in a loop, | |
# | |
# when all the read-only filesystems are mounted, then it mounts another | |
# overlayfs that uses the last read-only rootdir as lowerdir and a read-write | |
# filesystem in upperdir, |
// http://play.golang.org/p/FOe85j-O-n | |
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
) |