This file contains hidden or 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
| # ICS aiocr Configuration File | |
| # This file contains the prompt and JSON structure for data extraction | |
| # Prompt | |
| default_prompt: | | |
| Extract the following Information of the game from the given Scans: | |
| !!!CRITICAL: If you don't find the information dont hallucinate it, leave it empty!!! | |
| - Title | |
| - Subtitle | |
| - Year of Publication (if multiple use the earlier date) |
This file contains hidden or 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
| { | |
| "aar": "aa", | |
| "abk": "ab", | |
| "afr": "af", | |
| "aka": "ak", | |
| "alb": "sq", | |
| "amh": "am", | |
| "ara": "ar", | |
| "arg": "an", | |
| "arm": "hy", |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
NewerOlder