Skip to content

Instantly share code, notes, and snippets.

View drzippie's full-sized avatar
👁️‍🗨️

Antonio Cortes (DrZippie) drzippie

👁️‍🗨️
View GitHub Profile
@drzippie
drzippie / example.md
Created May 24, 2019 08:47
Basic NER Service using MITIE

curl -d @sample_request.txt -X POST https://ner.morcego.net/ner

response:

[{"tag": "ORGANIZATION", "score": 0.40190129560515164, "label": "Furnival Barristers"}, {"tag": "PERSON", "score": 1.0128972145423198, "label": "Edith Oliv\u00e9 Bocanegra"}, {"tag": "LOCATION", "score": 0.9171091771615874, "label": "Panam\u00e1"}, {"tag": "PERSON", "score": 0.3877786881212515, "label": "Mossack & Fonseca"}, {"tag": "LOCATION", "score": 1.0092007968591041, "label": "Espa\u00f1a"}]% ➜ ~

systemManager.classes.SystemValue = function( code , callback ) {
var currentValue = null ;
var callbacks = [] ;
var id = code ;
// El objeto tiene una propiedad code y solo lectura con un valor en el constructor
Object.defineProperty( this , 'code', {
value: code,
# https://bugs.jqueryui.com/ticket/4186
# works for "jquery-ui": "~1.11.4"
# to enable change aspectRatio before created
(($) ->
oldfunc = $.ui.resizable.prototype._setOption
$.ui.resizable.prototype._setOption = (key, value) ->
oldfunc.apply @, arguments
if key is "aspectRatio"
@_aspectRatio = !!value
return
var c = { } ;
var x = graph.V("edu").In('in_sector').In('in_industry').Out('has_skill').Tag("id").ForEach(
function ( d ) {
if ( c[d.id] ) {
c[d.id] ++;
} else {
c[d.id] = 1 ;
}
d.count = c[d.id] ;
package main
import (
"crypto/hmac"
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"fmt"
"strings"
)
@drzippie
drzippie / compress_images.sh
Created January 31, 2015 11:55
compress images
find . -type f -size +150k -name '*-original.jpeg' -exec mogrify -verbose -strip -resize 1024x1024">" -quality 80 -define jpeg:extent=140kb. {} \;
@drzippie
drzippie / gist:30c37456ad1305997186
Created January 20, 2015 15:51
Publisher - Dependence and hierarchy of nodes to publish.php
<?php
$nodes = [
'1' => ['50'],
'2' => ['21','53', '14'],
'21' => ['53', '10', '15'] ,
'10' => ['14', '1'],
'14' => [],
'15' => ['21'],
'53' => [ '14'] ,
@drzippie
drzippie / theme-my-login-custom.php
Created January 23, 2014 18:26
theme-my-login-custom.php with custom template dir
<?php
/**
* theme-my-login-custom.php
*/
/**
* Cambiamos las plantillas por unas propias
* @param string $useTemplate Plantilla encontrada
* @param array $templates Plantillas buscadas
@drzippie
drzippie / theme-my-login-template-files.txt
Created January 23, 2014 18:23
theme-my-login template files
# templates/
user-panel.php
resetpass-form.php
register-form.php
profile-form.php
ms-signup-user-form.php
ms-signup-blog-form.php
ms-signup-another-blog-form.php
lostpassword-form.php
@drzippie
drzippie / check_is_running.sh
Created December 30, 2013 16:57
Check shellscript - check is running
#!/bin/bash
#
lockdir=/tmp/diario_stocks.lock
if mkdir "$lockdir"
then
echo >&2 "successfully acquired lock"
# Remove lockdir when the script finishes, or when it receives a signal
trap 'rm -rf "$lockdir"' 0 # remove directory when script finishes