Skip to content

Instantly share code, notes, and snippets.

View b-mandelbrot's full-sized avatar

b-mandelbrot

View GitHub Profile
@b-mandelbrot
b-mandelbrot / Abstention.R
Created November 2, 2019 18:40
Troca valores dos votos faltantes pela categoria "abs"
# Carrega pacote para ler arquivos arff
install.packages("foreign")
library("foreign")
# Seta diretorio de trabalho
setwd("D:/House-Votes/")
# Lê base de dados
data <- read.arff("house-votes-84.arff")
@b-mandelbrot
b-mandelbrot / limpeza.R
Last active November 2, 2019 13:38
Remove linhas com mais de 70% de valores faltantes
# Carrega pacote para ler arquivos arff
install.packages("foreign")
library("foreign")
# Seta diretorio de trabalho
setwd("D:/House-Votes/")
# Lê base de dados
data <- read.arff("house-votes-84.arff")
@b-mandelbrot
b-mandelbrot / post4.json
Created December 18, 2018 16:28
Post 4 JSON
{
"technology": {
"type": "QRCODE",
"identifier": "13050329197F190A"
},
"operationType": 1,
"amount": 100,
"paymentInstallments": 0,
"terminalLogicalNumber": 20091303,
"paymentDate": "2018-05-15T11:33:49Z",
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?><CURRICULO-VITAE SISTEMA-ORIGEM-XML="LATTES_OFFLINE" NUMERO-IDENTIFICADOR="7679840055825288" DATA-ATUALIZACAO="14022017" HORA-ATUALIZACAO="182014"><DADOS-GERAIS NOME-COMPLETO="Hedibert Freitas Lopes" NOME-EM-CITACOES-BIBLIOGRAFICAS="LOPES, H. F.;LOPES, HEDIBERT F.;LOPES, HEDIBERT FREITAS;LOPES, HEDIBERT F;LOPES, HEDIBERT" NACIONALIDADE="B" PAIS-DE-NASCIMENTO="Brasil" UF-NASCIMENTO="MS" CIDADE-NASCIMENTO="Aquidauana" PERMISSAO-DE-DIVULGACAO="NAO" DATA-FALECIMENTO="" SIGLA-PAIS-NACIONALIDADE="BRA" PAIS-DE-NACIONALIDADE="Brasil"><RESUMO-CV TEXTO-RESUMO-CV-RH="Eu possuo graduação e mestrado em Estatística pela UFRJ (1990 e 1994) e doutorado em Estatística e Teoria da Decisão pela Duke University (2000). Eu fui Professor Assistente de Estatistica da Universidade Federal Fluminense entre Abril de 1992 e Fevereiro de 1996 e da Universidade Federal do Rio de Janeiro de Marco de 1996 a Junho de 2000; Professor Adjunto de Estatistica da Universidade Federal do
@b-mandelbrot
b-mandelbrot / awesome-nginx.conf
Created October 13, 2015 23:00 — forked from vjt/awesome-nginx.conf
*AWESOME* nginx configuration for Ruby/Rack web applications
#
# mmm m m mmm mmm mmm mmmmm mmm
# " # "m m m" #" # # " #" "# # # # #" #
# m"""# #m#m# #"""" """m # # # # # #""""
# "mm"# # # "#mm" "mmm" "#m#" # # # "#mm"
#
# nginx configuration For Ruby/Rack web applications
#
# Cooked up with style, care and a bit of *secret*
# nerdy spice. :-)
@b-mandelbrot
b-mandelbrot / puma.sh
Last active August 29, 2015 14:10 — forked from ktaragorn/puma.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: pumacontrol
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Puma web server
========
OK, I see what's causing the label problem. That query count method is trying to execute this query:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ( str(COUNT(?label)) AS ?labelCount ) WHERE {
?subject rdfs:label ?label
FILTER isLiteral(?label)
}
AllegroGraph doesn't seem to support passing the count value to the str() function. If I remove the str() it returns a count value. (This is using the AllegroGraph query interface.) It doesn't look like the str() function is even necessary, because I don't think COUNT values are ever returned as typed literals, so this should be a simple fix.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
or
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2