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
/** | |
* The JSDoc module tag identifies the file as a module. JSDoc | |
* assumes all symbols in the file belong to the module, unless | |
* otherwise specified. | |
* | |
* @module DummyModule | |
*/ | |
var DummyModule = (function() { | |
// The constructs tag and the memberof tag on the constructor function |
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
# pip install Pillow if you don't already have it | |
# import image utilities | |
from PIL import Image | |
# import os utilities | |
import os | |
# define a function that rotates images in the current directory | |
# given the rotation in degrees as a parameter |
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
if (requestCode == 5 && resultCode == RESULT_OK) { | |
Toast.makeText(this,"here",Toast.LENGTH_SHORT).show(); | |
if (data != null) { | |
Place place = PlacePicker.getPlace(data, this); | |
if (place != null) { | |
lat = place.getLatLng().latitude; | |
lng = place.getLatLng().longitude; | |
MarkerOptions marker = new MarkerOptions().position( | |
place.getLatLng()).title("Hello Maps"); marker.icon(BitmapDescriptorFactory | |
.defaultMarker(BitmapDescriptorFactory.HUE_RED)); |
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
gtk-color-scheme = "base_color:#ffffff\nfg_color:#4c4c4c\ntooltip_fg_color:#000000\nselected_bg_color:#f07746\nselected_fg_color:#000000\ntext_color:#3C3C3C\nbg_color:#E6E6FA\ntooltip_bg_color:#C0C0C0\nlink_color:#DD4814" |
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
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.nio.file.FileSystems; | |
import java.io.File; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.lang.StringBuffer; | |
public class FileUtilities | |
{ |
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
public class StringUtilities | |
{ | |
/** | |
* Check if input string is a vowel | |
* Author: http://stackoverflow.com/users/1357341/arshajii | |
**/ | |
public static boolean isVowel(String inStr) | |
{ | |
return "aeiou".indexOf(inStr.toLowerCase()) >= 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
<snippet> | |
<content><![CDATA[ | |
($1) | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>(</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
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
# BeautifulSoup is used to extract data from a html source file | |
from bs4 import BeautifulSoup | |
# tablib is used to output the data to an Excel file with a minimum of hassle | |
import tablib | |
# open the file of interest, a file containing the html source for | |
# the select/options tags you want to extract data from | |
# INFILE is a placeholder for a filename | |
infile = open(INFILE, 'r') |
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
import time | |
from splinter import Browser | |
browser = Browser() | |
inst_list = [IPEDSID-1, IPEDSID-2, IPEDSID-3, IPEDSID-n] | |
browser.visit("http://nces.ed.gov/ipeds/datacenter/") | |
browser.execute_script('javascript:doSubmit(6)') | |
button = browser.find_by_id('ibtnLoginLevelOne') | |
button.click() |
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
# extract (remove) some element from the soup | |
[s.extract() for s in soup(x)] | |
# examples | |
# extract style elements | |
[s.extract() for s in soup('style')] | |
# extract script elements |