Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Misgana Bayetta misgeatgit

🎯
Focusing
Block or report user

Report or block misgeatgit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View edtf_stat.csv
2018-12-28 01:08:18.088603 887620
2018-12-28 01:13:21.270092 887889
2018-12-28 01:18:31.658331 888220
2018-12-28 01:23:34.410043 889230
2018-12-28 01:28:37.181794 889680
2018-12-28 01:33:48.209001 890040
2018-12-28 01:38:51.388811 890925
2018-12-28 01:43:54.706751 891480
2018-12-28 01:48:57.160848 891730
2018-12-28 01:54:03.030119 892121
View edtf_fund_stat.py
import datetime
import time
import urllib2
from BeautifulSoup import BeautifulSoup
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.3'}
import time
while True:
View GhostAFContent.json
{
"result": {
"atoms": [
{
"attentionvalue": {
"lti": 0,
"sti": 0,
"vlti": false
},
"handle": 10,
View AFContent.json
{
"result": {
"atoms": [
{
"attentionvalue": {
"lti": 0,
"sti": 0,
"vlti": false
},
"handle": 3984,
View find_sum.cc
#include <algorithm>
#include <iostream>
#include <vector>
std::pair<int,int> find_sum(int sum, std::vector<int> aray)
{
std::vector<int> temp = aray;
std::sort(temp.begin(), temp.end()); // Ascending order
int i1; int i2;
View ecandev.patch
diff --git a/opencog/attention/ImportanceDiffusionBase.cc b/opencog/attention/ImportanceDiffusionBase.cc
index 850818f..23f6244 100644
--- a/opencog/attention/ImportanceDiffusionBase.cc
+++ b/opencog/attention/ImportanceDiffusionBase.cc
@@ -131,35 +131,6 @@ void ImportanceDiffusionBase::diffuseAtom(Handle source)
AttentionValue::sti_t totalDiffusionAmount =
calculateDiffusionAmount(source);
-#ifdef LOG_AV_STAT
- // Log sti gain from spreading via non-hebbian links
View LargestSubsquareOnes.c
/*
* Given a binary matrix, find the largest subsquare matrix.
*
*
*/
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
typedef unsigned int uint;
View ECANChanges.md

ECAN latest updates

Features added

  • Multithreaded mode
  • Runtime parameter loading and updating
  • Agents divided further more in to AF(AFImportanceUpdatingAgent and AFRentCollectionAgent) agents and WA agents (WAImportanceUpdatingAgent, WARentCollectionAgent)
  • Fine grained control of agent's runing time is possible. i.e via sleep sys call
  • Floating point importance values
View print_time.cc
#include <iostream>
#include <chrono>
#include <ctime>
#include <iomanip>
#include <sstream>
#include <string>
using namespace std::chrono;
int main(){
View artanis-snippets.sh
# Artanis is a guile web framework. Below are some code snippets demonestrating how to use it.
#------------------------------------------------------------------------------------------------
# A simple demo of parsing get parameters. eg. http://127.0.0.1:8080/hello?first=Foo&last=Bar
guile -c '(use-modules (artanis artanis))(get "/hello" (lambda (rc)(format #f "<h1 s style=\"color:YellowGreen\">Hola ~a ~a!</h1> " (params rc "first") (params rc "last")))) (run #:port 8080)'
You can’t perform that action at this time.