Skip to content

Instantly share code, notes, and snippets.

View misgeatgit's full-sized avatar
🎯

Misgana Bayetta misgeatgit

🎯
  • opencog
  • HongKong
View GitHub Profile
(QuantitativePredicateLink
(
(ConceptNode "GDP")
(QuantitativePredicateNode "UnitedStates")
(SchemaValueListLink
(DynamicNumberNode"16244600")
(DynamicNumberNode"1")
)
)
(QuantitativePredicateLink
uuid,tv_past,tv_cur,stimulus,rent,wage,sti_past,sti_cur,lti_past,lti_cur,vlti_past,vlti_cur,rule_applied,af_past,af_current
@misgeatgit
misgeatgit / .vimrc
Last active August 29, 2015 14:21 — forked from rocarvaj/.vimrc
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
/*
* From https://www.hackerrank.com/challenges/playing-with-numbers
*
*/
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <sstream>
@misgeatgit
misgeatgit / latency.txt
Created December 11, 2015 10:30 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
from opencog.utilities import initialize_opencog
from opencog.bindlink import execute_atom
from opencog.type_constructors import *
import numpy as np
import random
atomspace = AtomSpace()
initialize_opencog(atomspace)
def simneu(X,Y):
#!/usr/bin/ruby
require 'securerandom'
require 'gsl'
module RandData
def create_random_friendship size
friendships = ""
while size != 0 do
f1 = "RandFriend-" + SecureRandom.uuid;
f2 = "RandFriend-" + SecureRandom.uuid;
#include "HsFFI.h"
#ifdef __cplusplus
extern "C" {
#endif
extern HsDouble sqrtJsdC_hs(HsInt32 a1, HsDouble a2, HsInt32 a3, HsInt32 a4, HsDouble a5, HsInt32 a6, HsInt32 a7);
#ifdef __cplusplus
}
#endif
@misgeatgit
misgeatgit / API.md
Created March 30, 2016 10:18 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

# unregister broken GHC packages. Run this a few times to resolve dependency rot in installed packages.
# ghc-pkg-clean -f cabal/dev/packages*.conf also works.
function ghc-pkg-clean() {
for p in `ghc-pkg check $* 2>&1 | grep problems | awk '{print $6}' | sed -e 's/:$//'`
do
echo unregistering $p; ghc-pkg $* unregister $p
done
}
# remove all installed GHC/cabal packages, leaving ~/.cabal binaries and docs in place.