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
#!/usr/bin/env python3 | |
import urllib.request | |
import json | |
import sys | |
from PIL import Image | |
import requests | |
from io import BytesIO | |
import cv2 | |
import numpy as np | |
import img2pdf |
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
#!/usr/bin/env python3 | |
import os | |
from PIL import Image | |
if __name__ == "__main__": | |
im_list = [] | |
for i in os.listdir('./img'): | |
filename = './img/' + i | |
imgs = Image.open(filename) |
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
#!/usr/bin/env python3 | |
import cv2 | |
import argparse | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser(description='Pre-process for OCR') | |
parser.add_argument('input', help='Name of original image') | |
parser.add_argument('output', help='Name of output image') | |
args = parser.parse_args() |
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
#!/usr/bin/env python3 | |
import urllib.request | |
import json | |
import sys | |
from PIL import Image | |
import requests | |
from io import BytesIO | |
import argparse | |
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
{ | |
"@context": "http://iiif.io/api/presentation/2/context.json", | |
"@id": "http://91d111ec-49ff-40c5-bd1e-fd3bdecee82d", | |
"@type": "sc:Manifest", | |
"label": "my favorit things", | |
"metadata": [], | |
"description": [ | |
{ | |
"@value": "... my favorit images", | |
"@language": "en" |
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
{ | |
"@context": "http://iiif.io/api/presentation/2/context.json", | |
"@id": "http://91d111ec-49ff-40c5-bd1e-fd3bdecee82d", | |
"@type": "sc:Manifest", | |
"label": "my favorit things", | |
"metadata": [], | |
"description": [ | |
{ | |
"@value": "... my favorit images", | |
"@language": "en" |
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 | |
import requests | |
df = pd.read_csv('snf_person.csv', sep=',') | |
df['viaf'] = 'NaN' | |
df['orcid_gnd'] = 'NaN' | |
df['gnd'] = 'NaN' | |
df['ambiguity'] = 0 |
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
{ | |
"@context": "http://iiif.io/api/presentation/2/context.json", | |
"@id": "http://93198e01-31fa-4953-a809-7cce9c2aa606", | |
"@type": "sc:Manifest", | |
"label": "test", | |
"metadata": [], | |
"description": [ | |
{ | |
"@value": "test", | |
"@language": "en" |
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
function getBibliografy() { | |
//最後のスライドを取得し、そのテキストボックスも取得 | |
var presentationID = "your presentation-id"; | |
var presentation = SlidesApp.openById(presentationID); | |
var slide = presentation.getSlides()[x]; //スライドx枚目 | |
var shape = slide.getShapes(); | |
var textBox = shape[0]; // 1番目のShape | |
var textRange = textBox.getText(); | |
textRange.clear(); |
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 | |
def main(): | |
f = open("/path/to/your.geojson", 'r') | |
json_data = json.load(f) | |
for i in range(len(json_data["features"])): | |
lat2 = json_data["features"][i]["properties"]["lat2"] | |
lon2 = json_data["features"][i]["properties"]["lon2"] |