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
'''loads pdf file in sys.argv[1], extracts URLs, tries to load each URL''' | |
import urllib | |
import sys | |
import PyPDF2 | |
# credits to stackoverflow.com/questions/27744210 | |
def extract_urls(filename): | |
'''extracts all urls from filename''' | |
PDFFile = open(filename,'rb') |
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
/* | |
* Copyright (C) 2015 The Android Open Source Project | |
* Copyright (C) 2018 github.com/serv-inc | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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/sh | |
### upgrades udacity's android sources to use the gradle-3.0 plugin of Android Studio 3. | |
### run this script from the directory you want to upgrade to | |
for i in $(git ls-files '*build.gradle'); do | |
grep 'vectorDrawables' $i && echo "$(/bin/pwd)/$i already upgraded? contains vectorDrawables" && exit 1 | |
sed -i'.bak' -e "s/classpath 'com.android.tools.build:gradle:2.2.3'/classpath 'com.android.tools.build:gradle:3.0.0'/g" $i; | |
sed -i'.bak' "s/buildToolsVersion ['\"]25.0.2['\"]/buildToolsVersion '26.0.2'/g" $i; | |
sed -i'.bak' -e "s/defaultConfig {/defaultConfig{\n vectorDrawables.useSupportLibrary = true/g" $i; | |
sed -i'.bak' -e "s/^dependencies {/dependencies {\n compile 'com.android.support:appcompat-v7:26.1.0'/g" $i; | |
done |
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
/// Original C++ implementation found at http://www.wilmott.com/messageview.cfm?catid=10&threadid=38771 | |
/// C# implementation found at http://weblogs.asp.net/esanchez/archive/2010/07/29/a-quick-and-dirty-implementation-of-excel-norminv-function-in-c.aspx | |
/* | |
* Compute the quantile function for the normal distribution. | |
* | |
* For small to moderate probabilities, algorithm referenced | |
* below is used to obtain an initial approximation which is | |
* polished with a final Newton step. | |
* | |
* For very large arguments, an algorithm of Wichura is used. |