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
foobar |
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
private static void downDir(int levels) { | |
String oldPath = System.getProperty("user.dir"); | |
String[] splitedPathArray = oldPath.split("/"); | |
levels = splitedPathArray.length - levels; | |
List<String> splitedPathList = Arrays.asList(splitedPathArray); | |
splitedPathList = splitedPathList.subList(0, levels); | |
String newPath = String.join("/", splitedPathList); | |
System.setProperty("user.dir", newPath); | |
} | |
/* |
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
"Scales": { | |
"Major": { | |
"C Major": "C • Dm • Em • F • G • Am • Bdim", | |
"D♭ Major": "Db • Ebm • Fm • Gb • Ab • Bbm • Cdim", | |
"D Major": "D • Em • F#m • G • A • Bm • C#dim", | |
"E♭ Major": "Eb • Fm • Gm • Ab • Bb • Cm • Ddim", | |
"E Major": "E • F#m • G#m • A • B • C#m • D#dim", | |
"F Major": "F • Gm • Am • Bb • C • Dm • Edim", | |
"F♯ Major": "F# • G#m • A#m • B • C# • D#m • E#dim", | |
"G Major": "G • Am • Bm • C • D • Em • F#dim", |
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
wget http://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz` | |
tar -xzvf Python-3.6.5.tgz | |
cd Python-3.6.5 | |
./configure --prefix=$HOME/local/python | |
make | |
make install | |
export PATH=$HOME/local/python/bin:$PATH |
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 re | |
import urllib.request as ur | |
print('What would you like to look up?') | |
text = input('::') | |
search_string = text.split(' ') | |
search_string = '+'.join(search_string) | |
# you can change www.bing.com to any search engine except google. | |
googlesearch = 'https://www.bing.com/search?q=' + search_string | |
source = ur.urlopen(googlesearch) |