Skip to content

Instantly share code, notes, and snippets.

package anna
import (
"fmt"
"github.com/channelmeter/gocql"
"github.com/channelmeter/heka/message"
. "github.com/channelmeter/heka/pipeline"
"regexp"
"strings"
"sync"
@AALEKH
AALEKH / sendMail.go
Last active August 29, 2015 14:06 — forked from andelf/sendMail.go
package main
import (
"log"
"net/mail"
"encoding/base64"
"net/smtp"
"fmt"
"strings"
package anna
import (
"fmt"
"github.com/channelmeter/gocql"
"github.com/channelmeter/heka/message"
. "github.com/channelmeter/heka/pipeline"
"regexp"
"strings"
"sync"
@AALEKH
AALEKH / countries.sql
Last active August 29, 2015 14:24 — forked from adhipg/countries.sql
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@AALEKH
AALEKH / libwebsockets-webserver.c
Created September 24, 2015 23:09 — forked from martinsik/libwebsockets-webserver.c
Simple webserver based on libwebsockets library. Read full description at http://martinsikora.com/libwebsockets-simple-http-server
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libwebsockets.h>
static int callback_http(struct libwebsocket_context *context,
struct libwebsocket *wsi,
enum libwebsocket_callback_reasons reason, void *user,
@AALEKH
AALEKH / StreamToString.go
Created October 14, 2015 20:46 — forked from tejainece/StreamToString.go
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@AALEKH
AALEKH / hello_daemon_plugin.c
Created January 9, 2016 14:17 — forked from tom-lpsd/hello_daemon_plugin.c
MySQL daemon plugin sample.
#include <stdio.h>
#include <mysql_version.h>
#include <mysql/plugin.h>
struct st_mysql_daemon hello_daemon_plugin =
{ MYSQL_DAEMON_INTERFACE_VERSION };
static FILE *fp;
int hello_daemon_plugin_init(void *p)
@AALEKH
AALEKH / tmux-cheatsheet.markdown
Created July 6, 2017 15:10 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@AALEKH
AALEKH / plank_notes
Created August 8, 2017 20:06 — forked from erogol/plank_notes
Kaggle Plankton Classification winner's approach notes
FROM: http://benanne.github.io/2015/03/17/plankton.html
Meta-Tricks:
- Use %10 for validation with STRATIFIED SAMPLING (my mistake)
- Cyclic Pooling
- Leaky ReLU = max(x, a*x) learned a
- reduces overfitting with a ~= 1/3
- Orthogonal initialization http://arxiv.org/pdf/1312.6120v3.pdf
- Use larger weight decay for larger models since otherwise some layers might diverge