Skip to content

Instantly share code, notes, and snippets.

View addshore's full-sized avatar
🏄

addshore

🏄
View GitHub Profile
@addshore
addshore / file.py
Created October 6, 2023 20:35
COVID-19 Wikipedia pageview spikes, 2019-2022 (plotly functions)
dfToPlot = allThePandasFiltered.copy()
def do_pyplot( data, title, logY=False, unstackAndSort=False, grid=False, trends=False, plotMax=False, ylim=False ):
pd.options.plotting.backend = "matplotlib"
fig,ax = plt.subplots(figsize=plotSize)
plt.title(title)
ax.set_xlabel("Date")
ax.set_ylabel("Pageviews")
if ylim:
@addshore
addshore / s3-upload.sh
Created August 22, 2023 07:55 — forked from DBX12/s3-upload.sh
Upload to S3 with curl
#!/bin/bash -e
#
# Copyright 2014 Tony Burns
#
# 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
#
@addshore
addshore / list.txt
Created August 4, 2023 13:26
T105100 Date list 2
This file has been truncated, but you can view the full file.
Dates marked as gregorian, before 1584
----
Q1$789eef0c-4108-cdda-1a63-505cdd324564
Q228$024BDB5F-0503-41BF-BE4E-886067DCC39C
Q323$c2c9dc5b-461d-7812-e1fd-b3001b46c975
Q403$978def80-4bcb-3947-f476-fb41bfa92454
Q403$32a1a2ab-4ffb-e98b-4d15-cbfc3e4c972d
Q635$262393F6-94AE-41D5-BEEB-2CE4B6003D64
q849$281a5d42-419f-b809-f32c-7dbe7b633c61
Q849$3A79F4B5-0E1C-47FD-AC63-00C2A13C4AAC
@addshore
addshore / wsl-ssh-agent-relay
Created July 3, 2023 21:24
~/.local/bin/wsl-ssh-agent-relay
#!/bin/bash
#### Add following lines to your shell rc file (.zshrc .bashrc)
# ${HOME}/.local/bin/wsl-ssh-agent-relay start
# export SSH_AUTH_SOCK=${HOME}/.ssh/wsl-ssh-agent.sock
# If you do not want the ssh agent relay require your ssh agent
# to be running at the time relay is started add the option -s
# to wsl-ssh-agent-relay.
@addshore
addshore / extra-localsettings-fedprops.txt
Last active February 21, 2022 14:24
Wikibase test system files
$wgWBRepoSettings['federatedPropertiesEnabled'] = true;
# simulate source API errors via request header
if( isset ( $_SERVER['HTTP_X_FEDPROPS_SOURCEAPIRESPONSE'] ) ) {
$wgParserCacheType = CACHE_NONE;
$code = $_SERVER['HTTP_X_FEDPROPS_SOURCEAPIRESPONSE'];
if( $code == 404 ) {
$wgWBRepoSettings['federatedPropertiesSourceScriptUrl'] = 'http://notFound.404';
}
@addshore
addshore / index.html
Created June 13, 2020 15:36
Wikidata & WIkibase, Vision Diagram
<script src=" https://gojs.net/latest/release/go-debug.js"></script>
<div id="sample">
<div id="myDiagramDiv" style="border: solid 1px black; width:100%; height:800px;"></div>
<button id="SaveButton" onclick="save()">Save</button>
<button onclick="load()">Load</button>
<button onclick="layoutAll()">Layout</button>
Diagram Model saved in JSON format (to persist you must copy this back into the pen):
<br />
<textarea id="mySavedModel" style="width:100%;height:400px">
We can't make this file beautiful and searchable because it's too large.
3,129,6,129
3,129,1935,130
3,129,1942,129
5,123,46,117
6,129,12,126
6,129,13,126
6,129,1930,128
6,129,1931,126
6,131,12,126
6,131,13,126
We can't make this file beautiful and searchable because it's too large.
posx,posy,_c2
-106,358,3
0,220,1
0,251,1
0,263,1
0,266,1
0,269,1
0,275,1
0,294,1
0,456,1
We can't make this file beautiful and searchable because it's too large.
-106,358,3
0,220,1
0,251,1
0,263,1
0,266,1
0,269,1
0,275,1
0,294,1
0,456,1
0,954,1
We can't make this file beautiful and searchable because it's too large.
-53,179,3
0,110,2
0,125,2
0,131,3
0,132,3
0,133,4
0,134,4
0,137,1
0,142,1
0,147,1