Skip to content

Instantly share code, notes, and snippets.

@adamwight
adamwight / gist:cfb01136c30744d0f4fa63b6bea0dda0
Created January 29, 2021 11:12
Another TicTac userscript
// ==UserScript==
// @name Autofill date
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://tictac.wikimedia.de/web
// @grant none
// ==/UserScript==
// Author: Michi S.
// Show the date with day of week and in the local of the browser
function showDOW () {
var timestring = document.querySelectorAll('.oe_datepicker_root')[1].textContent
var element = document.querySelector('.oe_datepicker_root')
var date = new Date(Date.parse(timestring))
if (date.getDay() === 0) {
element.style.color = '#E00'
element.style.fontWeight = 'bold'
} else if (date.getDay() === 6) {
@adamwight
adamwight / gist:49880ba5c7057e5f28d20c2694b6e32d
Created January 28, 2021 15:59
Userscript for WMDE TicTac
// h/t Tobias A.
$(".oe_attendance_sign_in_out").trigger('mouseenter');
x = new Date($(".tooltip").text().substring(14,33));
var diffMs = Date.now() - x.getTime();
var diffHrs = Math.floor((diffMs % 86400000) / 3600000); // hours
var diffMins = Math.round(((diffMs % 86400000) % 3600000) / 60000); // minutes
console.log("Signed in: " + diffHrs + " Hours " + diffMins + "min")
https://arxiv.org/pdf/1609.07236.pdf
https://www.researchgate.net/profile/Frederic_Kaplan/publication/271899710_Linguistic_Capitalism_and_Algorithmic_Mediation/links/5a14908da6fdccd697bbea77/Linguistic-Capitalism-and-Algorithmic-Mediation.pdf?origin=publication_detail
https://instructure-uploads.s3.amazonaws.com/account_17700000000000001/attachments/2462230/Striphas--algorithmic%20culture.pdf?response-content-disposition=attachment%3B%20filename%3D%22Striphas%202014%20Culture%20now%20has%20two%20audiences.pdf%22%3B%20filename%2A%3DUTF-8%27%27Striphas%25202014%2520Culture%2520now%2520has%2520two%2520audiences.pdf&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJDW777BLV26JM2MQ%2F20180605%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180605T162438Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=993c08ce0458fcba3fae362e1aa32060bf62a0d2f7d88c5f609c031906e19fb1
---
http://www.nicospilt.com/pdf/Spoorkaart_2018.pdf
---
https://www-users.cs.umn.edu/~halfaker/publications/Accept_Decline_Postpone/sc
@adamwight
adamwight / New batch.patch
Last active January 31, 2018 17:10 — forked from Ladsgroup/New batch.patch
Diff for templating
amsa@C235:~/editquality$ python differ.py "Japanese Wikipedia"
- ########################### Japanese Wikipedia ################################
+ ############################# Japanese Wikipedia ################################
? ++
-
# From https://quarry.wmflabs.org/query/9927
datasets/jawiki.sampled_revisions.40k_2016.json:
wget -qO- https://quarry.wmflabs.org/run/89016/output/0/json-lines?download=true > $@
@adamwight
adamwight / New batch.patch
Created January 31, 2018 17:09 — forked from Ladsgroup/New batch.patch
Diff for templating
amsa@C235:~/editquality$ python differ.py "Japanese Wikipedia"
- ########################### Japanese Wikipedia ################################
+ ############################# Japanese Wikipedia ################################
? ++
-
# From https://quarry.wmflabs.org/query/9927
datasets/jawiki.sampled_revisions.40k_2016.json:
wget -qO- https://quarry.wmflabs.org/run/89016/output/0/json-lines?download=true > $@
- ############################# Bengali Wikipedia ##############################
+ ############################# Bengali Wikipedia ################################
? ++
-
# From https://quarry.wmflabs.org/query/20229
datasets/bnwiki.sampled_revisions.20k_2017.json:
wget -qO- https://quarry.wmflabs.org/run/190661/output/0/json-lines?download=true > $@
datasets/bnwiki.autolabeled_revisions.20k_2017.json: \
datasets/bnwiki.sampled_revisions.20k_2017.json
@adamwight
adamwight / list_supported_tags.py
Created January 3, 2018 14:37
Tools for probing Python wheels
from pip import pep425tags
print(pep425tags.supported_tags)
# Score cache options
score_caches:
ores_redis:
class: ores.score_caches.Redis
host: null # Local
port: 6379 # Default port
scoring_systems:
defaults:
metrics_collector: local_logging # Don't try to connect graphite
@adamwight
adamwight / create_virtualenv.md
Last active November 15, 2017 15:04 — forked from halfak/create_virtualenv.md
Setting up a python 3.x Virtual Environment

Step 0: Set up python virtualenv

virtualenv is a command-line utiltity that will allow you to encapsulate a python environment. Ubuntu calls the package that installs this utility "python-virtualenv". You can install it with $ sudo apt-get install python-virtualenv.

Step 1: Create the virtualenv directory

$ cd ~
$ mkdir venv
$ virtualenv -p python3 --system-site-packages ~/venv