This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
V = [-1] | |
def pushWhat(S, Op): | |
"""what should I push on S if I'm at operation Op""" | |
return S + Op | |
def push(I): | |
print(pushWhat(I, len(V))) | |
V.append(I) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'site-gentoo) | |
;; usability | |
;;(cua-mode) | |
(transient-mark-mode nil) ; disable | |
(setq backup-directory-alist '(("." . "~/.emacs-backups"))) | |
(setq gdb-many-windows t) | |
;; iswitchb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- ensure_loaded('iconics.pl'). | |
:- ensure_loaded('utilities.pl'). | |
:- ensure_loaded('simulator2.pl'). | |
gen(_, [], 0) :- !. | |
gen([P|Ps], [(P, w)|T], N) :- N1 is N-1, gen(Ps, T, N1). | |
gen([P|Ps], [(P, dr)|T], N) :- N1 is N-1, gen(Ps, T, N1). | |
gen([P|Ps], [(P, gr)|T], N) :- N1 is N-1, gen(Ps, T, N1). | |
% Check that for a policy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% | |
% ---------------------------------------------------------------------------- | |
% Prolog term 3 course: agents exercise | |
% SKELETON: choices.pl | |
% ---------------------------------------------------------------------------- | |
% | |
:- ensure_loaded('iconics.pl'). | |
:- ensure_loaded('utilities.pl'). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% | |
% ---------------------------------------------------------------------------- | |
% Prolog term 3 course: Agents exercise - Part Deux! | |
% ---------------------------------------------------------------------------- | |
% | |
% ---------------------------------------------------------------------------- | |
% Imports, etc. | |
:- ensure_loaded('iterator.pl'). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
"""Module for pulling contacts out of Google and storing them to disk | |
(or something). | |
See the official guide for a more in-depth look at GData Python | |
http://code.google.com/apis/contacts/docs/1.0/developers_guide_python.html | |
""" | |
import atom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source Gentoo env variables | |
source /etc/zsh/zprofile | |
# next lets set some enviromental/shell pref stuff up | |
# setopt NOHUP | |
#setopt NOTIFY | |
#setopt NO_FLOW_CONTROL | |
setopt INC_APPEND_HISTORY SHARE_HISTORY | |
setopt APPEND_HISTORY | |
# setopt AUTO_LIST # these two should be turned off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright (C) 2010 Alexandru Scvortov <scvalex@gmail.com> | |
* http://github.com/scvalex | |
* http://abstractbinary.org | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* Memory related */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <setjmp.h> | |
void even(int); | |
void odd(int); | |
int main(int argc, char *argv[]) { | |
even(7); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The contents of this file are subject to the Mozilla Public License | |
// Version 1.1 (the "License"); you may not use this file except in | |
// compliance with the License. You may obtain a copy of the License at | |
// http://www.mozilla.org/MPL/ | |
// | |
// Software distributed under the License is distributed on an "AS IS" | |
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
// License for the specific language governing rights and limitations | |
// under the License. | |
// |