Skip to content

Instantly share code, notes, and snippets.

View schwarzmx's full-sized avatar

Fernando Hernandez schwarzmx

View GitHub Profile
@schwarzmx
schwarzmx / pom.xml
Created April 3, 2015 14:00
stardog maven minimal
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>stardog-maven</groupId>
<artifactId>stardog</artifactId>
<version>0.0.1-SNAPSHOT</version>

Keybase proof

I hereby claim:

  • I am schwarzmx on github.
  • I am fernando (https://keybase.io/fernando) on keybase.
  • I have a public key whose fingerprint is 8572 C600 4CDE 35AE 154F 237A 5B17 E02C 349A CD03

To claim this, I am signing this object:

[color]
ui = always
[user]
name = Fernando Hernandez
email = fernando@clarkparsia.com
[alias]
# most used
ci = commit
co = checkout
st = status
mvn install:install-file -Durl=file:repo -DgroupId=com.palletops -DartifactId=pallet -Dversion=0.8.0-RC.100 -Dpackaging=jar -Dfile=/Users/fernando/other/pallet/target/pallet-0.8.0-RC.100.jar -DpomFile=/Users/fernando/other/pallet/pom.xml
@schwarzmx
schwarzmx / .bash_profile
Created April 7, 2014 14:32
multiple JDKs - Mac OS X
alias usejava6='export JAVA_HOME=$(/usr/libexec/java_home -v 1.6) ; PATH=$JAVA_HOME/bin:$PATH'
alias usejava7='export JAVA_HOME=$(/usr/libexec/java_home -v 1.7) ; PATH=$JAVA_HOME/bin:$PATH'
alias usejava8='export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) ; PATH=$JAVA_HOME/bin:$PATH'
// Copyright (c) 2010 - 2014, Clark & Parsia, LLC. <http://www.clarkparsia.com>
// For more information about licensing and copyright of this software, please contact
// inquiries@clarkparsia.com or visit http://stardog.com
package com.complexible.stardog.examples.api;
import java.io.FileInputStream;
import com.complexible.common.protocols.server.Server;
import com.complexible.common.rdf.query.resultio.TextTableQueryResultWriter;
@schwarzmx
schwarzmx / urls.py
Created December 5, 2013 05:17
Simple script for retrieving html from some sites
import urllib
urls = ['http://worldnews.nbcnews.com/_news/2013/11/25/21611878-easing-of-iran-sanctions-will-do-little-to-lift-crippled-economy-experts-say?lite',
'http://nbcpolitics.nbcnews.com/_news/2013/11/25/21611792-obama-on-iran-deal-us-cannot-close-the-door-on-diplomacy?lite',
'http://nbcpolitics.nbcnews.com/_news/2013/11/25/21612201-obama-tells-heckler-no-executive-action-to-halt-deportations?lite',
'http://www.cbsnews.com/news/iranians-hope-nuclear-deal-will-boost-economy/',
'http://www.cbsnews.com/news/iranians-hope-nuclear-deal-will-boost-economy/',
'http://www.foxnews.com/science/2013/11/25/iran-uranium-temporarily-converted-experts-warn/',
'http://www.foxnews.com/politics/2013/11/25/senators-weigh-additional-sanctions-amid-iran-nuclear-deal/',
'http://www.foxnews.com/politics/2013/11/25/wife-imprisoned-pastor-says-family-devastated-after-iran-deal/']
@schwarzmx
schwarzmx / .bash_profile
Last active December 11, 2015 23:18
Simple .bash_profile for MacOS
# customized prompt
export PS1="\[\e[1;30m\]\u\[\e[1;32m\]:\[\e[34m\]\W \[\e[1;31m\]\$ \[\e[0m\]"
# aliases
alias ll="ls -lhG"
alias la="ls -lahG"
alias tree="tree -hlC"
# bash completion stuff
if [ -f `brew --prefix`/etc/bash_completion ]; then
@schwarzmx
schwarzmx / LFL.tex
Created September 17, 2012 12:46
LFL Objective Function and Gradient
Objective Function (log-likelihood), network data, asymmetric graph, i.e. $\Lambda$ is arbitrary and $U=V$:
\[
F = \min_U\sum_{i,j \epsilon \mathcal{O}} -\log\frac{e^{U_i^{X_{ij}}\Lambda_{ij}(V_j^{X_{ij}})^T}}{\sum_y e^{U_i^{y}\Lambda_{ij}(V_j^{y})^T}} + \frac{\lambda}{2}||U||^2_F
\]
Expansion:
\[
F = \min_U \sum_{i,j \epsilon \mathcal{O}} -
\big[ U_i^{X_{ij}}\Lambda_{ij}(V_j^{X_{ij}})^T - \log \sum_y e^{U_i^{y}\Lambda_{ij}(V_j^{y})^T}
\big] + \frac{\lambda}{2}||U||^2_F
\]
@schwarzmx
schwarzmx / createusergroups.php
Created December 12, 2011 01:02
Script to create user groups model for NEREID project
<?php
/*
* This script will be in charge of creating the user groups and setting their
* proper permissions as we arranged. That is:
*
* Students: Will create articles and only edit their own. Inherits from Author
* group in Joomla's predefined groups.
* Visitors: Anyone that visits this site. No login necessary. Inherits from
* Public.
* Webmaster: The administrator group of this site. Inherits from SuperUser.