This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update | |
sudo apt -y install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
# Install Apache | |
sudo apt install -y apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
keywords = "https://raw.githubusercontent.com/philharmoniedeparis/mimo/master/our_data/03_skos/keywords_skos.json" | |
data = json.loads(requests.get(keywords).text) | |
instruments = [] | |
for i in data[1:]: | |
for item in i["http://www.w3.org/2004/02/skos/core#prefLabel"]: | |
if item["@language"] == "de": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
keywords = "https://raw.githubusercontent.com/philharmoniedeparis/mimo/master/our_data/03_skos/keywords_skos.json" | |
data = json.loads(requests.get(keywords).text) | |
instruments = [] | |
for i in data[1:]: | |
for item in i["http://www.w3.org/2004/02/skos/core#prefLabel"]: | |
if item["@language"] == "de": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generateZDBcheckdigit(number): | |
numberstr = str(number) | |
if len(numberstr) > 10 or len(numberstr) < 8: | |
print("Identnummer ohne Prüfziffer besteht aus einer Folge von minimal 8 und maximal 10 Zifern.") | |
else: | |
numberstr = numberstr.strip().zfill(10) | |
summe = 0 | |
for position, n in enumerate(numberstr): | |
summe += (11 - position)*int(n) | |
pruefziffer = 11 - (11 - (summe % 11)) % 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Site Maintenance</title> | |
<meta charset="utf-8"/> | |
<meta name="robots" content="noindex"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { text-align: center; padding: 20px; font: 20px Helvetica, sans-serif; color: #efe8e8; } | |
@media (min-width: 768px){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.read_csv('mydata.csv', sep=';') | |
def convert_row(row): | |
""" | |
This function creates a <page> node for each line in the CSV. | |
You can define variables from the CSV columns and reference them in the return statement with curly braces. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Help for "import-media": | |
Import media from a directory or directory tree. | |
Options for import-media are: | |
--source (-s) Data to import. For files provide the path; for database, OAI and other | |
non-file sources provide a URL. | |
--username (-u) User name of user to log import against. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"diagnostic": { | |
"count": 6, | |
"page": 1, | |
"pages": 1, | |
"q": "soup", | |
"results_per_page": 20 | |
}, | |
"records": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import json | |
import requests | |
import urllib2 | |
kw = 'soup' | |
requestURL = 'http://iconclass.org/rkd/9/?q=' + kw + '&q_s=1&fmt=json' | |
cjson = urllib2.urlopen(requestURL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tone | |
2-step garage | |
4-beat | |
4x4 garage | |
8-bit | |
acapella | |
acid | |
acid breaks | |
acid house | |
acid jazz |