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
@salgo60
salgo60 / Check P10467
Last active October 13, 2023 12:01
Länkröta Naturkartan
#Naturkartan check
# https://gist.github.com/salgo60/eae5986297ad88a801549d0a37731817
#
from datetime import datetime
import urllib3
import sys
from SPARQLWrapper import SPARQLWrapper, JSON
endpoint_url = "https://query.wikidata.org/sparql"
http = urllib3.PoolManager()
[
{
"Eionet bathingWaterIdentifier":"SE0441273000000001",
"name":{
"sv":{
"language":"sv",
"value":"Vesljungasjön, badplats"
},
"de":{
"language":"de",
@salgo60
salgo60 / README.md
Last active March 20, 2021 11:37 — forked from VladimirAlexiev/README.md
Google Sheets to Wikidata
@salgo60
salgo60 / GetWordsInSAOB.py
Last active January 5, 2021 13:09
Extracts words in SAOB to file
# based on https://github.com/Torbacka/wordlist/blob/master/client.py
import requests
from bs4 import BeautifulSoup
data = {
'action': 'myprefix_scrollist',
'unik': '0',
'dir': 'ned',
'dict': 'saob'
}
@brianwitte
brianwitte / doom.txt
Created July 30, 2020 05:55 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@salgo60
salgo60 / FindDeletedWD.py
Last active October 4, 2021 19:08
Finds deleted WD objects referenced from Europeana
import json
import requests
urlbase = 'http://data.europeana.eu/'
uribase = 'agent/base/'
import sys
print (sys.getdefaultencoding())
def checkWDobject(Qnumber,currUri):
@chrisjsimpson
chrisjsimpson / dms2dec.py
Created April 1, 2019 12:17 — forked from jeteon/dms2dec.py
Convert coordinates in DMS notation to decimal in Python.
#!/env/python
# coding=utf8
"""
Converting Degrees, Minutes, Seconds formatted coordinate strings to decimal.
Formula:
DEC = (DEG + (MIN * 1/60) + (SEC * 1/60 * 1/60))
Assumes S/W are negative.
@pvik
pvik / smartparens-cheatsheet.md
Last active March 17, 2024 03:29
A Cheatsheet for Emacs Smarparens example configuration

An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.

Traversal

C-M-f sp-forward-sexp
C-M-b sp-backward-sexp
@sloanlance
sloanlance / jq_tsv_conversion.md
Last active April 12, 2024 04:33
jq: JSONL → TSV conversion

jq: JSONL → TSV conversion

What is TSV?

TSV means "tab-separated values". I prefer this format over CSV ("comma-separated values") because it doesn't require as much quoting. Many programs that can use CSV formatted data can also use TSV, although they may need to be explicitly told of the different format if it's not detected automatically.

However, in any of the jq scripts below, "@tsv" can usually be replaced with "@csv" to get CSV output instead.

@tasdikrahman
tasdikrahman / python_tests_dir_structure.md
Last active May 5, 2024 06:06
Typical Directory structure for python tests

A Typical directory structure for running tests using unittest

Ref : stackoverflow

The best solution in my opinion is to use the unittest [command line interface][1] which will add the directory to the sys.path so you don't have to (done in the TestLoader class).

For example for a directory structure like this:

new_project

├── antigravity.py