Skip to content

Instantly share code, notes, and snippets.

View dmpe's full-sized avatar
💭
🎾

John dmpe

💭
🎾
View GitHub Profile
@dmpe
dmpe / R version
Last active February 26, 2016 16:13
This shows a list of Python 3 installed packages which may need to be present in the system in order to reproduce our results.
Session info ------------------------------------------------------------------------------------------------------------------
setting value
version R version 3.2.3 (2015-12-10)
system x86_64, linux-gnu
ui RStudio (0.99.1054)
language en_US
collate en_US.UTF-8
tz <NA>
date 2016-02-07
@dmpe
dmpe / swiss_Religion.csv
Created January 4, 2018 22:08
swiss_Religion.csv
We can make this file beautiful and searchable if this error is corrected: Any value after quoted field isn't allowed in line 1.
"";"Catholic";"Place";"Protestant";"LabelCatholic";"LabelProtestant"
"1";9,96;"Courtelary";90,04;"Catholic 9.96 %";"Protestant 90.04 %"
"2";84,84;"Delemont";15,16;"Catholic 84.84 %";"Protestant 15.16 %"
"3";93,4;"Franches-Mnt";6,6;"Catholic 93.4 %";"Protestant 6.6 %"
"4";33,77;"Moutier";66,23;"Catholic 33.77 %";"Protestant 66.23 %"
"5";5,16;"Neuveville";94,84;"Catholic 5.16 %";"Protestant 94.84 %"
"6";90,57;"Porrentruy";9,43;"Catholic 90.57 %";"Protestant 9.43 %"
"7";92,85;"Broye";7,15;"Catholic 92.85 %";"Protestant 7.15 %"
"8";97,16;"Glane";2,84;"Catholic 97.16 %";"Protestant 2.84 %"
"9";97,67;"Gruyere";2,33;"Catholic 97.67 %";"Protestant 2.33 %"
@dmpe
dmpe / swiss_religion2.csv
Created January 5, 2018 18:35
swiss_religion2.csv
Catholic Place Protestant LabelCatholic LabelProtestant
1 9.96 Courtelary 90.04 Catholic 9.96 % Protestant 90.04 %
2 84.84 Delemont 15.16 Catholic 84.84 % Protestant 15.16 %
3 93.4 Franches-Mnt 6.6 Catholic 93.4 % Protestant 6.6 %
4 33.77 Moutier 66.23 Catholic 33.77 % Protestant 66.23 %
5 5.16 Neuveville 94.84 Catholic 5.16 % Protestant 94.84 %
6 90.57 Porrentruy 9.43 Catholic 90.57 % Protestant 9.43 %
7 92.85 Broye 7.15 Catholic 92.85 % Protestant 7.15 %
8 97.16 Glane 2.84 Catholic 97.16 % Protestant 2.84 %
9 97.67 Gruyere 2.33 Catholic 97.67 % Protestant 2.33 %
@dmpe
dmpe / airquality.csv
Created February 22, 2018 16:16
Air quality New York data 1973 from datasets R library
Ozone Solar.R Wind Temp Month Day
1 41 190 7.4 67 5 1
2 36 118 8 72 5 2
3 12 149 12.6 74 5 3
4 18 313 11.5 62 5 4
5 NA NA 14.3 56 5 5
6 28 NA 14.9 66 5 6
7 23 299 8.6 65 5 7
8 19 99 13.8 59 5 8
9 8 19 20.1 61 5 9
6 148 72 35 0 33.6 0.627 50 1
1 85 66 29 0 26.6 0.351 31 0
8 183 64 0 0 23.3 0.672 32 1
1 89 66 23 94 28.1 0.167 21 0
0 137 40 35 168 43.1 2.288 33 1
5 116 74 0 0 25.6 0.201 30 0
3 78 50 32 88 31.0 0.248 26 1
10 115 0 0 0 35.3 0.134 29 0
2 197 70 45 543 30.5 0.158 53 1
8 125 96 0 0 0.0 0.232 54 1
@dmpe
dmpe / startup_ubuntu.sh
Last active July 19, 2023 22:38
A post script which installs some basic tools for Ubuntu OS
#!/bin/bash
sudo apt update
sudo apt upgrade -y
sudo apt install -y wget curl
cd Downloads/
# Edge
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
@dmpe
dmpe / Dockerfile
Last active June 10, 2019 13:28
Neverfinished Dockerfile for jupyterhub with selected plugins/extensions. Using this nginx config and jupyter_conf.py I can guarantee that it is going to work on a Ubuntu server, on a subdomain.
############
### We must build our own image, conda is a no go
# https://gist.github.com/affixalex/97bc870e478b4f77a161e5fb2d63ec6d
# https://hub.docker.com/r/jupyterhub/jupyterhub/dockerfile
#######
FROM jupyterhub/jupyterhub:latest
USER root
RUN pip3 install oauthenticator ipywidgets nbdime ipyleaflet ipympl jupyterlab-git jupyterlab_sql jupyterlab_code_formatter \
@dmpe
dmpe / branch_cleanup.sh
Created May 24, 2019 00:47
delete remote and locale devel-cur-* branch
# https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-locally-and-remotely
release_in_question="9.0.3.290.02"
future_release=""
git checkout master
# get latest from remote
git pull origin pull
@dmpe
dmpe / backup.ps1
Created December 28, 2019 16:16
Azure Key Vault - Backup secrets using powershell (core) - Uses newer az Module
[string]$VaultName = 'keyvault'
Get-AzKeyVaultSecret -VaultName $VaultName |
ForEach-Object {
Backup-AzKeyVaultSecret `
-VaultName $VaultName `
-Name $_."Name" `
-OutputFile ('/home/jm/Documents/azure-keyvault-backups/{0}.blob' -f $_."Name")
}
@dmpe
dmpe / import_certificate.sh
Created March 9, 2020 22:34
citrix - ssl cert cannot be trusted - tested on ubuntu
#!/bin/bash
cert_name=""
mv $cert_name /opt/Citrix/ICAClient/keystore/cacerts
/opt/Citrix/ICAClient/util/ctx_rehash