Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
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
void Main() | |
{ | |
///Understanding Captures vs Groups http://stackoverflow.com/a/3320890/1175496 | |
//In short, Groups represent things inside Grouping Parentheses () | |
//Captures represent the items in the collection implied by repetition operators * and + | |
var matchesONE = Regex.Matches("{Q}{R}{S}", @"(\{[A-Z]\})"); | |
var matchesOOM = Regex.Matches("{Q}{R}{S}", @"(\{[A-Z]\})+"); | |
var matchesOPT = Regex.Matches("{Q}{R}{S}", @"(\{[A-Z]\})*"); | |
Console.Out.WriteLine(matchesONE); |
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
//I couldn't figure out why I modified a List but later in the code the List seemed unchanged. | |
//I was modifying something returned the public accessor { get }; | |
//But wasn't truly changing the private variable behind the public variable | |
//Again I ran into it while trying to fix TT0263356 | |
void Main() | |
{ | |
List<List<Ref>> Refss = new List<List<Ref>>{ | |
new List<Ref> { |
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
function drawVisualization() { | |
var data = google.visualization.arrayToDataTable([ | |
['Country', 'Popularity', 'Display'], | |
['DE-BY', 200, 'Bavaria'], | |
['DE-NW', 500, 'Nordrhein-Westfalen'] | |
]); | |
//http://stackoverflow.com/a/11956132/1175496 | |
var formatter = new google.visualization.PatternFormat('{1}'); | |
formatter.format(data, [0,2]); |
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
filepath = r'\\path\to\file\may\not\be\a\PNG.png' | |
filepath.replace('\\', '/') | |
f = open(filepath, mode='b') | |
b = f.read(8) | |
for _ in b: | |
print (_) | |
print (hex(_)) | |
#Notice the first two hex values are 42 and 4d; | |
#Consistent with BMP filetype (despite the extension), |
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
import base64 | |
file_path = r'\\useomapp2100.us.kworld.kpmg.com\Showcase App\Logos\kpmg_logo_from_qvt_qlikview_extension_downsized_sharp.png' | |
with (open(file_path, 'rb') as f): | |
b = f.read() | |
encoded_string = base64.b64encode(b) | |
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
--SETUP | |
DECLARE @test_xml_table TABLE (test_xml_column xml); | |
DECLARE @test_xml_local_variable xml; | |
SET @test_xml_local_variable = '<?xml version="1.0" encoding="utf-8"?> | |
<Countries> | |
<Country > | |
<CountryName>US</CountryName> | |
<IncomeStatements> |
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
license: mit | |
height: 2000 | |
scrolling: yes |
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
license: mit | |
height: 2000 | |
scrolling: yes |
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 | |
echo "Current working directory '$(pwd)'" | |
echo "Writing the log files to one directory *above* $(pwd) so that changes to the log files aren't noticed by the Google App Engine" | |
read -p "Press [Enter] key to run python exe dev_appserver.py pointed at ttbtamer folder" | |
"C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/platform/bundledpython/python.exe" "C:/Program Files (x86)/Google/Cloud SDK/google-cloud-sdk/bin/dev_appserver.py" . 1>>../out.log 2>>../err.log |