Skip to content

Instantly share code, notes, and snippets.

@b-rodrigues
b-rodrigues / gist:e2bce18f511cc2c475a53faec9b4a7c6
Created February 9, 2019 18:59
L'Union-1868-04-18 alto file
<?xml version="1.0" encoding="UTF-8"?>
<alto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/standards/alto/ns-v3#" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v3# https://www.loc.gov/standards/alto/v3/alto-3-1.xsd">
<Description>
<MeasurementUnit>mm10</MeasurementUnit>
<sourceImageInformation>
<fileName>//dss/d/Images/BNL_2010/lunion/BNL10706A/0008/IMAGE002654.TIF</fileName>
</sourceImageInformation>
<OCRProcessing ID="OCRPROCESSING_1">
<preProcessingStep>
<processingSoftware>
@b-rodrigues
b-rodrigues / gist:830fc032c36d5b2839f0a5ba43cad8b1
Created February 9, 2019 18:59
L'Union-1868-04-18 alto file
<?xml version="1.0" encoding="UTF-8"?>
<alto xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.loc.gov/standards/alto/ns-v3#" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/standards/alto/ns-v3# https://www.loc.gov/standards/alto/v3/alto-3-1.xsd">
<Description>
<MeasurementUnit>mm10</MeasurementUnit>
<sourceImageInformation>
<fileName>//dss/d/Images/BNL_2010/lunion/BNL10706A/0008/IMAGE002654.TIF</fileName>
</sourceImageInformation>
<OCRProcessing ID="OCRPROCESSING_1">
<preProcessingStep>
<processingSoftware>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><base href="https://chroniclingamerica.loc.gov/lccn/sn86069133/1910-10-31/ed-1/seq-1/ocr.xml"><style>body{margin-left:0;margin-right:0;margin-top:0}#bN015htcoyT__google-cache-hdr{background:#f5f5f5;font:13px arial,sans-serif;text-align:left;color:#202020;border:0;margin:0;border-bottom:1px solid #cecece;line-height:16px;padding:16px 28px 24px 28px}#bN015htcoyT__google-cache-hdr *{display:inline;font:inherit;text-align:inherit;color:inherit;line-height:inherit;background:none;border:0;margin:0;padding:0;letter-spacing:0}#bN015htcoyT__google-cache-hdr a{text-decoration:none;color:#1a0dab}#bN015htcoyT__google-cache-hdr a:hover{text-decoration:underline}#bN015htcoyT__google-cache-hdr a:visited{color:#609}#bN015htcoyT__google-cache-hdr div{display:block;margin-top:4px}#bN015htcoyT__google-cache-hdr b{font-weight:bold;display:inline-block;direction:ltr}</style><div id="bN015htcoyT__google-cache-hdr"><div><span>This is Google's cache of <a href="htt
(base) cbrunos@ubantoo:~$ dmesg
[ 0.000000] Linux version 4.15.0-45-generic (buildd@lcy01-amd64-027) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10)) #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 (Ubuntu 4.15.0-45.48~16.04.1-generic 4.15.18)
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=65c00187-dc3d-43c4-81cd-cf04cc34b92b ro quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
ubantoo
description: Desktop Computer
product: System Product Name (SKU)
vendor: System manufacturer
version: System Version
serial: System Serial Number
width: 64 bits
capabilities: smbios-3.0 dmi-3.0 vsyscall32
configuration: boot=normal chassis=desktop family=To be filled by O.E.M. sku=SKU uuid=5DE229E2-B314-3177-CC0B-2CFDA170AC84
*-core
PassengerId Survived Pclass Name Sex Age SibSp Parch Ticket Fare Cabin Embarked
1 0 3 Braund, Mr. Owen Harris male 22 1 0 A/5 21171 7.25 S
2 1 1 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female 38 1 0 PC 17599 71.2833 C85 C
3 1 3 Heikkinen, Miss. Laina female 26 0 0 STON/O2. 3101282 7.925 S
4 1 1 Futrelle, Mrs. Jacques Heath (Lily May Peel) female 35 1 0 113803 53.1 C123 S
5 0 3 Allen, Mr. William Henry male 35 0 0 373450 8.05 S
6 0 3 Moran, Mr. James male 0 0 330877 8.4583 Q
7 0 1 McCarthy, Mr. Timothy J male 54 0 0 17463 51.8625 E46 S
8 0 3 Palsson, Master. Gosta Leonard male 2 3 1 349909 21.075 S
9 1 3 Johnson, Mrs. Oscar W (Elisabeth Vilhelmina Berg) female 27 0 2 347742 11.1333 S
@b-rodrigues
b-rodrigues / lux_tesseract_test.txt
Created March 31, 2019 15:03
OCR of a luxembourguish text with tesseract v4
English model has trouble with ü, ä, ö
German model has trouble with é
Dutch model seems to give the best results
Luxembourguish model gives overall quite bad results
# With English model
[1] "Lhe"
[2] "| Kaum huet d’Feld dat fréndlecht Feier"
[3] "Vun der Aussentssonn gesunn"
@b-rodrigues
b-rodrigues / reverse.elm
Created May 9, 2019 19:39
elm reverse, but it's not working
import Browser
import Html exposing (Html, Attribute, div, input, text, button)
import Html.Attributes exposing (..)
import Html.Events exposing (onClick)
-- MAIN
@b-rodrigues
b-rodrigues / solution.R
Last active June 18, 2019 19:19
solution
```{r, eval=FALSE, include=FALSE}
library(Ecdat)
library(dplyr)
data("LaborSupply")
# Compute the average annual hours worked by year (plus standard deviation)
LaborSupply %>%
@b-rodrigues
b-rodrigues / cVimrc
Last active February 23, 2020 12:00
my cvimrc
" Settings
set nohud
set nosmoothscroll
set noautofocus " The opposite of autofocus; this setting stops
" sites from focusing on an input box when they load
set typelinkhints
let searchlimit = 30
let scrollstep = 70
let barposition = "bottom"