Skip to content

Instantly share code, notes, and snippets.

View dpriskorn's full-sized avatar
💭
Looking for work as a developer 🚀

Nizo Priskorn dpriskorn

💭
Looking for work as a developer 🚀
View GitHub Profile
@dpriskorn
dpriskorn / progress.py
Created December 19, 2020 17:45 — forked from Minotorious/progress.py
Python command line progress bar with colour
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#
@dpriskorn
dpriskorn / getSAOB.py
Created December 27, 2020 07:49 — forked from salgo60/getSAOB.py
import requests
file = open("saob2020.csv", "r")
def createQSurl(SAOBid):
# https: // quickstatements.toolforge.org / # /v1=L349183%7CP8478%7C%22A_0787-0228.n0A3%22
urlbase = "https://quickstatements.toolforge.org/#/v1=LEXEME"
urlP8478 = f"%7CP8478%7C%22{SAOBid.strip()}%22"
return urlbase + urlP8478
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
<Author>Läkemedelsverket</Author>
<LastAuthor>Läkemedelsverket</LastAuthor>
@dpriskorn
dpriskorn / random-crossref-doi-output.json
Created February 11, 2021 11:11
Random Crossref JSON output of an article
{
"status": "ok",
"message-type": "work",
"message-version": "1.0.0",
"message": {
"indexed": {
"date-parts": [
[
2020,
3,
@dpriskorn
dpriskorn / copy-on-select.ahk
Last active April 20, 2021 06:22
Copy on select implementation for AutoHotkey
;; source https://autohotkey.com/board/topic/44064-copy-on-select-implementation/
cos_mousedrag_treshold := 20 ; pixels
#IfWinNotActive ahk_class ConsoleWindowClass
~lButton::
MouseGetPos, cos_mousedrag_x, cos_mousedrag_y
keywait lbutton
mousegetpos, cos_mousedrag_x2, cos_mousedrag_y2
@dpriskorn
dpriskorn / error.gpx
Last active April 25, 2021 12:27
GPX that causes a parse error in OsmAnd
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="OpenStreetMap GPX exporter"><metadata><desc>Filtered OSM data converted to GPX</desc><copyright author="Data under ODbL by OpenStreetMap Contributors"/><time>2021-04-25T11:59:20.626Z</time></metadata><wpt lat="62.3662999" lon="17.3141611"><name>way/91221193</name><desc>amenity=shelter
building=yes
id=way/91221193</desc><link href="http://osm.org/browse/way/91221193"/></wpt><wpt lat="62.3688379" lon="17.2760757"><name>way/91225695</name><desc>amenity=shelter
bin=yes
name=Värmestugan
shelter_type=building
id=way/91225695</desc><link href="http://osm.org/browse/way/91225695"/></wpt><wpt lat="62.9732399" lon="18.4437393"><name>way/107738941</name><desc>building=yes
name=Bredviksstugan
source:year=https://www.allehanda.se/artikel/harnosand/kommunen-avyttrar-b
@dpriskorn
dpriskorn / no-error.gpx
Created April 25, 2021 12:33
GPX for testing OsmAnd
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd" version="1.1" creator="OpenStreetMap GPX exporter"><metadata><desc>Filtered OSM data converted to GPX</desc><copyright author="Data under ODbL by OpenStreetMap Contributors"/><time>2021-04-25T11:59:20.626Z</time></metadata>
<wpt lat="62.3662999" lon="17.3141611"><name>way/91221193</name><desc>amenity=shelter
building=yes
id=way/91221193</desc><link href="http://osm.org/browse/way/91221193"/></wpt>
<wpt lat="62.3688379" lon="17.2760757"><name>way/91225695</name><desc>amenity=shelter
bin=yes
name=Värmestugan
shelter_type=building
id=way/91225695</desc><link href="http://osm.org/browse/way/91225695"/></wpt>
@dpriskorn
dpriskorn / presentation.txt
Last active August 13, 2021 18:23
Presentation for Writing a bot - Wikimania Hackathon 2021
Presentation
Writing a bot
Start by having a good usecase
Talk to others about the usecase e.g. in the Wikidata Telegram Chat
Think about how to break down the problem in smaller steps
E.g. I want to enrich Wikidata items with data from OpenCitations
@dpriskorn
dpriskorn / data.csv
Created October 12, 2021 09:19
Synonymer.se matches with Wikidata Lexemes
We can't make this file beautiful and searchable because it's too large.
"Word","on site"
"frukt","Yes"
"grönsak","Yes"
"mobilmast","Yes"
"spruta","Yes"
"duva","Yes"
"bjudning","Yes"
"landskapsfisk","Yes"
"helsingforsare","No"
"skrivbord","Yes"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.