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
<div data-ex-role="exhibit-facet" data-ex-expression=".month" | |
data-ex-facet-label="Month" data-ex-show-missing="false" | |
data-ex-scroll="true" data-ex-collapsible="true" | |
data-ex-fixed-order="January;February;March;April;May;June;July;August;September;October;November;December" | |
data-ex-collapsible="true"> | |
</div> |
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
<script> | |
$(document).bind("scriptsLoaded.exhibit", function() { | |
Exhibit.FunctionUtilities.registerSimpleMappingFunction("yearOf", | |
function(d) { | |
return d.split('-')[0]; | |
}, | |
"number"); | |
}); | |
</script> |
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
<script> | |
$(document).bind("onAfterViewPanelSwitch.exhibit", function(event, i) { | |
$("#st").hide(); // divs you want to hide: summary timeline | |
$("#sm").hide(); // id for summary map | |
switch (i) { | |
case 1: | |
$("#st").show(); // id of the second view | |
break; | |
case 2: | |
$("#sm").show(); // id of the third view |
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
$(document).bind("dataload.exhibit", function() { | |
$('div.exhibit-mapView-map').addClass('img-rounded') | |
}); |
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
$(document).bind("dataload.exhibit", function() { | |
$('div#leyenda').append($('div.exhibit-legendWidget')); | |
$('div#leyenda').show(); | |
}); | |
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
<link href="#indata" type="application/json" rel="exhibit-data"/> | |
<script type="application/json" id="indata"> | |
{ | |
"types": { | |
"Nobelist" : { | |
"pluralLabel": "Nobelists" | |
} | |
}, | |
"properties": { |
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
# convierto la tabla a csv con phpmyadmin | |
from csv import DictReader | |
import json | |
f = open('materiales.csv') | |
reader = DictReader(f, delimiter=';') | |
result = [line for line in reader] |
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
''' | |
table_to_csv converts a table | |
db_to_csv converts all the tables | |
''' | |
import MySQLdb | |
import csv | |
# configure | |
DB_HOST = 'localhost' |
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 csv | |
import MySQLdb | |
conn = ... | |
cur = conn.cursor() | |
reader = csv.reader(open('arasaac_croata.csv')) | |
lineas = [l for l in reader] | |
insert = '''INSERT INTO `traducciones_16` (`id_traduccion`, `id_palabra`, `traduccion`) VALUES (%s, %s, %s)''' |
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
$ curl {SERVER}/w/api.php?action=query&prop=imageinfo&format=json&iiprop=url&iiurlheight=200&titles=File:xxx |
OlderNewer