ArcherSysOS 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/-interactive +0 -0
- data/.302.html.swp +0 -0
- data/.AerodiaServer.rb.swp +0 -0
- data/.README.md.swp +0 -0
- data/.archersys_os_peace.py.swp +0 -0
- data/.authorize.php.swp +0 -0
- data/.buildinfo +4 -0
- data/.git.cmd.swp +0 -0
- data/.gitconfig +1 -0
- data/.gitignore +9 -0
- data/.htaccess +12 -0
- data/.index.php.swl +0 -0
- data/.index.php.swm +0 -0
- data/.index.php.swn +0 -0
- data/.index.php.swo +0 -0
- data/.index.php.swp +0 -0
- data/.irb.cmd.swp +0 -0
- data/.irb_history +436 -0
- data/.irbrc +24 -0
- data/.irbrc~ +24 -0
- data/.livesearch.php.swp +0 -0
- data/.login.php.swl +0 -0
- data/.login.php.swm +0 -0
- data/.login.php.swn +0 -0
- data/.login.php.swo +0 -0
- data/.login.php.swp +0 -0
- data/.logout.php.swp +0 -0
- data/.npmrc +96 -0
- data/.os-desktop.php.swp +0 -0
- data/.pythonrc.py +11 -0
- data/.railsrc +1 -0
- data/.travis.yml +3 -0
- data/.vimstarter.bat.swp +0 -0
- data/302.html +8 -0
- data/401.html +43 -0
- data/403.html +9 -0
- data/404.html +43 -0
- data/7imperialisminjapan2.ppt +0 -0
- data/8_imperialism_by_the_united_states2.ppt +0 -0
- data/AbstractArrbyKlass.rb +16 -0
- data/AbstractImplementation.rb +10 -0
- data/Aerodia2.scn +0 -0
- data/AerodiaServer.rb +130 -0
- data/AerodiaServer.rb~ +129 -0
- data/AerodiaServer.txt +53 -0
- data/ArcherCGI.txt +8 -0
- data/ArcherDBM.rb +30 -0
- data/ArcherSysOS.gemspec +33 -0
- data/ArcherSysOS.rb +13 -0
- data/ArcherSysOS.rb.txt +13 -0
- data/ArcherSysOSDate.rb +10 -0
- data/ArcherSysOSOptionsParser.rb +108 -0
- data/ArcherSysOSOptionsParser.rb~ +108 -0
- data/ArcherVMCashewDelegator.rb +17 -0
- data/ArcherVMCashewLogger.rb +55 -0
- data/ArcherVMCashewLogger.rb~ +55 -0
- data/ArcherVMCashewTimeServer.rb +23 -0
- data/ArcherVMCashewTimeServer.rb~ +23 -0
- data/ArcherVMException.rb +13 -0
- data/CHANGELOG.md +4 -0
- data/CONTRIBUTING.md +8 -0
- data/CodeIgniter_2.2.0.zip +0 -0
- data/ConfigTest.php +11 -0
- data/F16MUDCockpitServlet.rb +14 -0
- data/F16MUDTape.rb +7 -0
- data/F16Shell.rb +42 -0
- data/Gemfile +4 -0
- data/LICENSE +19 -0
- data/Listing.rb +31 -0
- data/Middleware.rb +12 -0
- data/Middleware.txt +12 -0
- data/Movie.rb +8 -0
- data/MovieLibrary.rb +10 -0
- data/MySQLDumper1.24.4.zip +0 -0
- data/NotakerPro.aia +0 -0
- data/Num.rb +17 -0
- data/OSStartScreen.py +31 -0
- data/Product.rb +26 -0
- data/QAERODIACORP.sav +0 -0
- data/Queue.rb +16 -0
- data/Queue.rb~ +15 -0
- data/README.md +39 -0
- data/README.md~ +46 -0
- data/Rakefile +1 -0
- data/StockTickerServlet.rb +19 -0
- data/StockTickerServlet.rb~ +19 -0
- data/Symfony_cookbook_2.5.pdf +35637 -39
- data/Taxgator.rb +9 -0
- data/Tetris +2 -0
- data/Ticker.rb +63 -0
- data/Ticker.rb~ +63 -0
- data/WeakHash.rb +10 -0
- data/WikiPage.rb +27 -0
- data/WikiPage.rb~ +27 -0
- data/ZlibEngine.rb +20 -0
- data/_.swm +0 -0
- data/_.swn +0 -0
- data/_.swo +0 -0
- data/_.swp +0 -0
- data/acoserver_acoserver (2).sql +15131 -0
- data/acoserver_acoserver.sql +34707 -0
- data/acoserver_admin.sql +571 -0
- data/acoserver_games.sql +6344 -0
- data/acoserver_moodle.sql +16013 -0
- data/activate_docs_gen.bat +1 -0
- data/activate_docs_gen.txt +1 -0
- data/ager.py +6 -0
- data/alarmpy.py +6 -0
- data/american_imperialism2.ppt +0 -0
- data/apple-touch-icon.png +0 -0
- data/apps.php +35 -0
- data/apps.php.txt +7 -0
- data/arbylog.rb +16 -0
- data/archergit.py +6 -0
- data/archergit.py.txt +6 -0
- data/archergit.txt +6 -0
- data/archerlua.lua +3 -0
- data/archersys-logo.png +0 -0
- data/archersys.gemspec +32 -0
- data/archersys_os_peace.py +7 -0
- data/archersys_os_peace.py~ +5 -0
- data/autoexec.bat +3 -0
- data/bootstrap-tour.css +65 -0
- data/bootstrap-tour.js +698 -0
- data/bootstrap-tour.min.css +19 -0
- data/bootstrap-tour.min.js +19 -0
- data/bootstrap.css +7098 -0
- data/bootstrap.js +2002 -0
- data/bucketwise-master.zip +0 -0
- data/cargo.bat +1 -0
- data/cargo.cmd +1 -0
- data/changelog.txt +769 -0
- data/client_secrets.json +4 -0
- data/cockpitguess.py +12 -0
- data/collaborant-0.1.0.gem +0 -0
- data/composer.json +40 -0
- data/composer.lock +1484 -0
- data/composer.phar +0 -0
- data/conchtack_id.dat +0 -0
- data/config.json +4 -0
- data/config.php +17 -0
- data/config.ru +5 -0
- data/config.yml +16 -0
- data/console.html +8 -0
- data/console.php +42 -0
- data/contact.db +0 -0
- data/contacts.db +0 -0
- data/contrib-update.cmd +6 -0
- data/contrib-update.cmd~ +6 -0
- data/crossdomain.xml +9 -0
- data/cse.xml +25 -0
- data/depression_dbq.pdf +0 -0
- data/desktop-w10.php +6 -0
- data/desktop.html +33 -0
- data/desktop.php +310 -0
- data/dialogue.txt +13 -0
- data/dict.rb +15 -0
- data/dictionary_of_words.db +0 -0
- data/doc-create.html +5 -0
- data/doc-create.php +12 -0
- data/dokuwiki-d9556fbc2c1c07a0baaf81c07d4165f6.tgz +0 -0
- data/drive-appfolder.php +19 -0
- data/drive.php +49 -0
- data/dropbox-login.php +13 -0
- data/drupal-7.34.zip +0 -0
- data/dtop.php +131 -0
- data/f18mud.rb +2 -0
- data/favicon.ico +0 -0
- data/favicon.png +0 -0
- data/footer.html +5 -0
- data/forum.php +5 -0
- data/game1.py +171 -0
- data/genindex.html +164 -0
- data/git.cmd~ +2 -0
- data/github-ci.rb +6 -0
- data/histogram.py +36 -0
- data/htdocs.gemspec~ +31 -0
- data/https___summerjobs.dc.gov_(S(ryzytlym5hqgi255zgb4ojjk))_parental_consent_form.pdf +0 -0
- data/ieconfig.xml +12 -0
- data/imperialism_dbq_questions2.doc +0 -0
- data/imperialism_graphic_organizer2.docx +0 -0
- data/index-desktop.php +42 -0
- data/index-desktop.php.txt +14 -0
- data/index.html +175 -0
- data/index.php +302 -0
- data/index.php~ +315 -0
- data/info.php +3 -0
- data/iostarter.py +88 -0
- data/irb.cmd +3 -0
- data/irb.cmd~ +2 -0
- data/jquery-mobile-theme-105213-0.zip +0 -0
- data/jquery-ui-1.11.1.custom.zip +0 -0
- data/laravel-master.zip +0 -0
- data/laravel.phar +0 -0
- data/latest_specs.4.8 +0 -0
- data/latest_specs.4.8.gz +0 -0
- data/login.php +266 -0
- data/login.php~ +265 -0
- data/logout.php +13 -0
- data/logout.php~ +13 -0
- data/lua.bat +1 -0
- data/main.php +22 -0
- data/manage.py +10 -0
- data/manifest.appcache +22 -0
- data/manifest.json +19 -0
- data/manifest.webapp +14 -0
- data/meter.js +19 -0
- data/meter.php +17 -0
- data/mime.types +0 -0
- data/moodle.sqk +12123 -0
- data/moodle.sql +12123 -0
- data/movielibrary.rhtml +16 -0
- data/mud_login.rb +38 -0
- data/news.py +18 -0
- data/node.exe +0 -0
- data/node_etw_provider.man +153 -0
- data/node_perfctr_provider.man +107 -0
- data/nodejs-portable.bat +194 -0
- data/nodevars.bat +24 -0
- data/notifications-gateway.php +5 -0
- data/now.bat +3 -0
- data/npm +14 -0
- data/npm-debug.log +40 -0
- data/npm.cmd +6 -0
- data/objects.inv +0 -0
- data/ocular.phar +0 -0
- data/opensearch.xml +12 -0
- data/os-desktop.php +211 -0
- data/os-mobile.php +127 -0
- data/package.json +5 -0
- data/parse-js-blank-1.3.0.zip +0 -0
- data/partii.appcache +2 -0
- data/pear.conf +2 -0
- data/phpldapadmin-1.2.3.zip +0 -0
- data/phpliteAdmin_v1-9-5.zip +0 -0
- data/phpunit.cmd +1 -0
- data/phpunit.dist.xml +8 -0
- data/phpunit.phar +77428 -2
- data/phpunit.xml +8 -0
- data/pik.bat +3 -0
- data/pik.ps1 +3 -0
- data/pik_runner.exe +0 -0
- data/pip-selfcheck.json +1 -0
- data/prerelease_specs.4.8 +0 -0
- data/prerelease_specs.4.8.gz +0 -0
- data/producktivshellwin +0 -0
- data/profile.php +7 -0
- data/prototype.php +7 -0
- data/pyconsole.cmd +3 -0
- data/pyconsole.py +8 -0
- data/pygubu-asos.py +19 -0
- data/pythonray.py +62 -0
- data/pythonray.py~ +62 -0
- data/pyvenv.cfg +3 -0
- data/radius.py +12 -0
- data/react-0.11.2.zip +0 -0
- data/readme.txt +8 -0
- data/register.php +130 -0
- data/register.php~ +126 -0
- data/rockpaperscissors.py +68 -0
- data/rockpaperscissors.py~ +28 -0
- data/run_f16.rb +2 -0
- data/rustc.cmd +1 -0
- data/scrollbar.css +6 -0
- data/scrollbar.css~ +4 -0
- data/scrutinizer.yml +5 -0
- data/search.html +177 -0
- data/searchindex.js +1 -0
- data/setup-owncloud.php +300 -0
- data/setup.py +9 -0
- data/sinatra-1.4.5.gem +0 -0
- data/smartsheet.html +1 -0
- data/span.html +5 -0
- data/specs.4.8 +0 -0
- data/specs.4.8.gz +0 -0
- data/starter-kit-1.8.1.zip +0 -0
- data/startscreen.php +11 -0
- data/startscreen.py +33 -0
- data/startup.png +0 -0
- data/svg-edit-2.6.zip +0 -0
- data/symfony.com_pdf_Symfony_book_2.5.pdf +0 -0
- data/telnet-client.py +18 -0
- data/tess.py +26 -0
- data/time.css +279 -0
- data/time.html +2 -0
- data/time.php +56 -0
- data/tinymce_spellchecker_php_2_0_6_1.zip +0 -0
- data/urllib2.py +1371 -0
- data/uru.bat +12 -0
- data/uru.bat.bak +12 -0
- data/uru.ps1 +11 -0
- data/uru.ps1.bak +11 -0
- data/uru_rt.exe +0 -0
- data/vimstarter.bat +3 -0
- metadata +338 -0
data/dialogue.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<dl>
|
|
2
|
+
<dt>¿Hola Qú tal?
|
|
3
|
+
<dd>Hola</dd>
|
|
4
|
+
<dt>¿ Cómo te llamas?</dt>
|
|
5
|
+
<dd>Me llamo Marta. ¿Y tú Cómo te llamas?
|
|
6
|
+
<dt>Me llamo Carlos
|
|
7
|
+
<dd>Encantada</dd>
|
|
8
|
+
<dt>Con Mucho Gusto ¿ De Dónde eres?</dt>
|
|
9
|
+
<dd> Soy de Soy Colombiana ¿ tú de dónde eres?
|
|
10
|
+
<dt>Soy Venezolano</dt>
|
|
11
|
+
<dd>¡Qúe bien!
|
|
12
|
+
|
|
13
|
+
<dt>
|
data/dict.rb
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module ArcherSysOS
|
|
2
|
+
class WordDictionary
|
|
3
|
+
def initialize(title)#creates a hash like a dictionary
|
|
4
|
+
@title = title
|
|
5
|
+
@words = Hash.new
|
|
6
|
+
|
|
7
|
+
end
|
|
8
|
+
def add_entry(word,definition) # Add Definitions
|
|
9
|
+
@words[word] = definition
|
|
10
|
+
end
|
|
11
|
+
def get_entry(word)
|
|
12
|
+
return "#{!word.capitalize} : #{@words[word]}"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
Binary file
|
data/doc-create.html
ADDED
data/doc-create.php
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
require 'vendor/autoload.php';
|
|
3
|
+
|
|
4
|
+
use Parse\ParseClient;
|
|
5
|
+
|
|
6
|
+
ParseClient::initialize('KFNVzk7T8kVDWwzid200j9Yd2DonVQa7bcgXoNg2', 'LgTcbJTbUzaFkEdb4gXv5q6Ja9FaUUqTH05eG0sF', 'JPtos4hBuaVKmlbbLsPc4q6psGybfgiYIiFzS0dH');
|
|
7
|
+
use Parse\ParseFile;
|
|
8
|
+
$contents = $_POST["content"];
|
|
9
|
+
$title = $_POST["title"];
|
|
10
|
+
$file = ParseFile::createFromData($contents, $title.".html");
|
|
11
|
+
|
|
12
|
+
?>
|
|
Binary file
|
data/drive-appfolder.php
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
<?php
|
|
3
|
+
/*
|
|
4
|
+
Print metadata for the Application Data folder.
|
|
5
|
+
|
|
6
|
+
@param Google_DriveService $service Drive API service instance.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
function printApplicationDataFolderMetadata($service) {
|
|
10
|
+
try {
|
|
11
|
+
$file = $service->files->get("appfolder");
|
|
12
|
+
|
|
13
|
+
print "Id: " . $file->getId();
|
|
14
|
+
print "Title: " . $file->getTitle();
|
|
15
|
+
} catch (Exception $e) {
|
|
16
|
+
print "An error occurred: " . $e->getMessage();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
?>
|
data/drive.php
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<script type="text/javascript" src="https://apis.google.com/js/client.js?onload=handleClientLoad"></script>
|
|
4
|
+
<script type="text/javascript">
|
|
5
|
+
var CLIENT_ID = ' 601913270428-2jr0q7qae7qfgdknl1n0s8elvsolukk4.apps.googleusercontent.com';
|
|
6
|
+
var SCOPES = [
|
|
7
|
+
'https://www.googleapis.com/auth/drive.file',
|
|
8
|
+
'https://www.googleapis.com/auth/userinfo.email',
|
|
9
|
+
'https://www.googleapis.com/auth/userinfo.profile',
|
|
10
|
+
// Add other scopes needed by your application.
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Called when the client library is loaded.
|
|
15
|
+
*/
|
|
16
|
+
function handleClientLoad() {
|
|
17
|
+
checkAuth();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Check if the current user has authorized the application.
|
|
22
|
+
*/
|
|
23
|
+
function checkAuth() {
|
|
24
|
+
gapi.auth.authorize(
|
|
25
|
+
{'client_id': CLIENT_ID, 'scope': SCOPES.join(' '), 'immediate': true},
|
|
26
|
+
handleAuthResult);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Called when authorization server replies.
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} authResult Authorization result.
|
|
33
|
+
*/
|
|
34
|
+
function handleAuthResult(authResult) {
|
|
35
|
+
if (authResult) {
|
|
36
|
+
// Access token has been successfully retrieved, requests can be sent to the API
|
|
37
|
+
} else {
|
|
38
|
+
// No access token could be retrieved, force the authorization flow.
|
|
39
|
+
gapi.auth.authorize(
|
|
40
|
+
{'client_id': CLIENT_ID, 'scope': SCOPES, 'immediate': true},
|
|
41
|
+
handleAuthResult);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
</head>
|
|
46
|
+
<body>
|
|
47
|
+
<!-- YOUR CONTENT -->
|
|
48
|
+
</body>
|
|
49
|
+
</html>
|
data/dropbox-login.php
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
require_once "vendor/autoload.php";
|
|
3
|
+
use Dropbox;
|
|
4
|
+
|
|
5
|
+
$appInfo = Dropbox\AppInfo::loadFromJsonFile("config.json");
|
|
6
|
+
$webAuth = new Dropbox\WebAuthNoRedirect($appInfo, "ArcherSys/1.0");
|
|
7
|
+
|
|
8
|
+
$authorizeUrl = $webAuth->start();
|
|
9
|
+
echo "1. Go to: " . $authorizeUrl . "\n";
|
|
10
|
+
echo "2. Click \"Allow\" (you might have to log in first).\n";
|
|
11
|
+
echo "3. Copy the authorization code.\n";
|
|
12
|
+
$authCode = \trim(\readline("Enter the authorization code here: "));
|
|
13
|
+
?>
|
data/drupal-7.34.zip
ADDED
|
Binary file
|
data/dtop.php
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<!DOCTYPE HTML>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<link rel="icon" href="favicon.png">
|
|
5
|
+
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet" type="text/css">
|
|
6
|
+
<meta content='width=device-width, initial-scale=1.0, user-scalable=no' name='viewport'>
|
|
7
|
+
<title>ArcherSys Desktop</title>
|
|
8
|
+
|
|
9
|
+
<script src="http://localhost:80/js/libs/jquery.min.js"></script>
|
|
10
|
+
<script src="bootstrap/js/bootstrap.min.js"></script>
|
|
11
|
+
<script src="bootstrap.js"></script>
|
|
12
|
+
<link href="bootstrap.css" rel="stylesheet"/>
|
|
13
|
+
<link href="bootstrap-tour.min.css" rel="stylesheet"/>
|
|
14
|
+
<link href="bootstrap-tour.min.css" rel="stylesheet"/>
|
|
15
|
+
<script src="bootstrap-tour.min.js"></script>
|
|
16
|
+
<script src="bootstrap-tour.js"></script>
|
|
17
|
+
<script src="assets/js/bootstrap.js"></script>
|
|
18
|
+
<script>
|
|
19
|
+
TogetherJSConfig_toolName = "BIRD";
|
|
20
|
+
</script>
|
|
21
|
+
<script src="/js/libs/togetherjs.js"></script>
|
|
22
|
+
<script type="text/javascript" src="https://apis.google.com/js/platform.js"></script>
|
|
23
|
+
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
|
24
|
+
<script>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
$(function(){
|
|
29
|
+
var enabled = (enabled === true) ? false : true;
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
$("#contentspace").append("<iframe id=\"mapsframe\" width=\"1261\" height=\"634\" frameborder=\"0\" style=\"border:0\" src=\"https://www.google.com/maps/embed/v1/place?q=United%20States&key=AIzaSyAPx5WHasOtdyDoWMq2jnJ3RLId1MIeXgo&maptype=satellite\"></iframe>");
|
|
33
|
+
|
|
34
|
+
$("#mapstoggler").click(function(){
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
$("#mapsframe").toggle();
|
|
38
|
+
enabled = (enabled === true) ? false : true;
|
|
39
|
+
if(enabled){
|
|
40
|
+
$("#mapstoggler").html("Hide Maps");
|
|
41
|
+
|
|
42
|
+
}else{
|
|
43
|
+
$("#mapstoggler").html("Show Maps");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
});
|
|
48
|
+
$("#lbactivate").click(function(){
|
|
49
|
+
$("#mapsframe").hide();
|
|
50
|
+
$("#contentspace").append("<iframe id=\"lbview\" width=\"1700\" height=\"594\" src=\"" + prompt("URL:") + "\"></iframe>");
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
<style>
|
|
57
|
+
#contentspace ul,#contentspace li {
|
|
58
|
+
list-style: none;
|
|
59
|
+
padding: 75px;;
|
|
60
|
+
margin: 0; }
|
|
61
|
+
</style>
|
|
62
|
+
</head>
|
|
63
|
+
<body>
|
|
64
|
+
<div class="container-fluid">
|
|
65
|
+
<ul class="nav nav-tabs">
|
|
66
|
+
|
|
67
|
+
<li><a class="brand" href="#">ArcherSys Desktop</a></li>
|
|
68
|
+
<li><a href="wordpress">Social</a></li>
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
</ul>
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
<div class="container-fluid" id="contentspace">
|
|
79
|
+
|
|
80
|
+
<script>
|
|
81
|
+
(function() {
|
|
82
|
+
var cx = '008504857794623096248:mitppbrolh4'; // Insert your own Custom Search engine ID here
|
|
83
|
+
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
|
|
84
|
+
gcse.src = (document.location.protocol == 'https' ? 'https:' : 'http:') +
|
|
85
|
+
'//www.google.com/cse/cse.js?cx=' + cx;
|
|
86
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
|
|
87
|
+
})();
|
|
88
|
+
</script>
|
|
89
|
+
<gcse:search enableAutoComplete="true"></gcse:search>
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
</div>
|
|
93
|
+
<div class="container-fluid">
|
|
94
|
+
|
|
95
|
+
<script>
|
|
96
|
+
function onYtEvent(payload) {
|
|
97
|
+
if (payload.eventType == 'subscribe') {
|
|
98
|
+
// Add code to handle subscribe event.
|
|
99
|
+
} else if (payload.eventType == 'unsubscribe') {
|
|
100
|
+
// Add code to handle unsubscribe event.
|
|
101
|
+
}
|
|
102
|
+
if (window.console) { // for debugging only
|
|
103
|
+
window.console.log('YT event: ', payload);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
<div class="container-fluid">
|
|
111
|
+
|
|
112
|
+
<nav class="nav navbar-default navbar-fixed-bottom">
|
|
113
|
+
<button id="birdc" class="btn btn-default btn-lg" onclick="TogetherJS(this); return false;">Connect</button>
|
|
114
|
+
<button class="btn btn-default btn-lg" id="mapstoggler" >Show Maps</button>
|
|
115
|
+
<button class="btn btn-default btn-lg" id="lbactivate" >Live Binder</button>
|
|
116
|
+
<div class="g-ytsubscribe" data-channel="GoogleDevelopers" data-layout="full" data-theme="dark" data-count="default" data-onytevent="onYtEvent"></div>
|
|
117
|
+
<div class="g-plusone" data-size="small" data-href="https://twitter.com"></div>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</nav>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<script type="text/javascript">
|
|
124
|
+
(function() {
|
|
125
|
+
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
|
|
126
|
+
po.src = 'https://apis.google.com/js/platform.js';
|
|
127
|
+
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
|
|
128
|
+
})();
|
|
129
|
+
</script>
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
data/f18mud.rb
ADDED
data/favicon.ico
ADDED
|
Binary file
|
data/favicon.png
ADDED
|
Binary file
|
data/footer.html
ADDED
data/forum.php
ADDED
data/game1.py
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Carlos Pedro Gonçalves, 2015, Instituto Superior de Ciências Sociais e Políticas (ISCSP), University of Lisbon
|
|
2
|
+
# E-mail: cgoncalves@iscsp.ulisboa.pt
|
|
3
|
+
#
|
|
4
|
+
# Applied Artificial Intelligence Classes: Artificial Intelligence Applied to Game Theory
|
|
5
|
+
#
|
|
6
|
+
# Lecture 1: Prisoner's Dilemma: Company's Cooperation Game
|
|
7
|
+
#
|
|
8
|
+
# ----------------------------------------
|
|
9
|
+
# | Cooperate | Defect |
|
|
10
|
+
# ----------------------------------------
|
|
11
|
+
# Cooperate | (2.5,2.5) | (0,5) |
|
|
12
|
+
# ----------------------------------------
|
|
13
|
+
# Defect | (5,0) | (1,1) |
|
|
14
|
+
# ---------------------------------------
|
|
15
|
+
#
|
|
16
|
+
# If both cooperate they share the strategic value of 5 in equal parts (2.5 for each).
|
|
17
|
+
# If one cooperates and the other defects, then, the one that defects gets the strategic value of 5, and the other gets nothing.
|
|
18
|
+
# If both defect, then, they cancel each other out and receive 1 each.
|
|
19
|
+
|
|
20
|
+
class game:
|
|
21
|
+
def __init__(self,players,structure):
|
|
22
|
+
self.players = players
|
|
23
|
+
self.structure = structure
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class player:
|
|
27
|
+
def __init__(self,name, strategySpace, payoffs, choice, suboptimal, strategies):
|
|
28
|
+
self.name = name
|
|
29
|
+
self.strategySpace = strategySpace
|
|
30
|
+
self.payoffs = payoffs
|
|
31
|
+
self.choice = choice
|
|
32
|
+
self.suboptimal = suboptimal
|
|
33
|
+
self.strategies = strategies
|
|
34
|
+
|
|
35
|
+
def processGame(self,G):
|
|
36
|
+
for X in G:
|
|
37
|
+
if X[0] == self.name:
|
|
38
|
+
for j in range(1,len(X)):
|
|
39
|
+
Branch = X[j]
|
|
40
|
+
Alternative = Branch[0:len(Branch) - 1 ]
|
|
41
|
+
self.strategySpace = self.strategySpace + [Alternative]
|
|
42
|
+
self.payoffs = self.payoffs + [Branch[len(Branch) - 1]]
|
|
43
|
+
|
|
44
|
+
def evaluate(self):
|
|
45
|
+
X = []
|
|
46
|
+
for i in range(0,len(self.strategySpace)):
|
|
47
|
+
Alternative1 = self.strategySpace[i]
|
|
48
|
+
for j in range(0,len(self.strategySpace)):
|
|
49
|
+
Alternative2 = self.strategySpace[j]
|
|
50
|
+
if Alternative1 != Alternative2:
|
|
51
|
+
if len(Alternative1) == len(Alternative2):
|
|
52
|
+
Compare = 0
|
|
53
|
+
for k in range(0,len(Alternative1) - 1):
|
|
54
|
+
if Alternative1[k] == Alternative2[k]:
|
|
55
|
+
Compare = Compare + 0
|
|
56
|
+
else:
|
|
57
|
+
Compare = Compare + 1
|
|
58
|
+
if Compare == 0:
|
|
59
|
+
PayoffCompare = [self.payoffs[i],self.payoffs[j]]
|
|
60
|
+
M = max(PayoffCompare)
|
|
61
|
+
if self.payoffs[i] == M:
|
|
62
|
+
self.choice = Alternative1
|
|
63
|
+
X = X + [self.choice]
|
|
64
|
+
else:
|
|
65
|
+
self.suboptimal = self.suboptimal + [Alternative1]
|
|
66
|
+
if self.payoffs[j] == M:
|
|
67
|
+
self.choice = Alternative2
|
|
68
|
+
X = X + [self.choice]
|
|
69
|
+
else:
|
|
70
|
+
self.suboptimal = self.suboptimal + [Alternative2]
|
|
71
|
+
X = set(X)
|
|
72
|
+
self.suboptimal = set(self.suboptimal)
|
|
73
|
+
self.strategies = list(X - self.suboptimal)
|
|
74
|
+
print "\nStrategies selected by ", self.name,":"
|
|
75
|
+
print self.strategies
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class nash:
|
|
79
|
+
def __init__(self,equilibrium):
|
|
80
|
+
self.equilibrium = equilibrium
|
|
81
|
+
|
|
82
|
+
def compareTuples(self,tuple0,tuple1,response):
|
|
83
|
+
counter = 0
|
|
84
|
+
len0 = len(tuple0)
|
|
85
|
+
len1 = len(tuple1)
|
|
86
|
+
for element in tuple0:
|
|
87
|
+
if element in tuple1:
|
|
88
|
+
counter += 1
|
|
89
|
+
if counter == len0 and len0 == len1:
|
|
90
|
+
response = 'Match'
|
|
91
|
+
else:
|
|
92
|
+
response = 'Do not match'
|
|
93
|
+
return response
|
|
94
|
+
|
|
95
|
+
def inList(self,tupleA,listB,response):
|
|
96
|
+
for tupleB in listB:
|
|
97
|
+
response = self.compareTuples(tupleA,tupleB,None)
|
|
98
|
+
if response == 'Match':
|
|
99
|
+
break
|
|
100
|
+
return response
|
|
101
|
+
|
|
102
|
+
def inCommon(self,listA,listB):
|
|
103
|
+
X = []
|
|
104
|
+
for tupleA in listA:
|
|
105
|
+
response = self.inList(tupleA,listB,None)
|
|
106
|
+
if response == 'Match':
|
|
107
|
+
X = X + [tupleA]
|
|
108
|
+
return X
|
|
109
|
+
|
|
110
|
+
def compare(self,listA,Slist):
|
|
111
|
+
X = listA
|
|
112
|
+
for S in Slist:
|
|
113
|
+
Y = self.inCommon(X,S)
|
|
114
|
+
X = Y
|
|
115
|
+
self.equilibrium = X
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
#################################################################################
|
|
120
|
+
|
|
121
|
+
# Game Definition:
|
|
122
|
+
|
|
123
|
+
GameCompanyA = ['Company A',
|
|
124
|
+
('B cooperates', 'A cooperates', 2.5),
|
|
125
|
+
('B cooperates', 'A defects', 5),
|
|
126
|
+
('B defects', 'A cooperates', 0),
|
|
127
|
+
('B defects', 'A defects', 1)]
|
|
128
|
+
|
|
129
|
+
GameCompanyB = ['Company B',
|
|
130
|
+
('A cooperates', 'B cooperates', 2.5),
|
|
131
|
+
('A cooperates', 'B defects', 5),
|
|
132
|
+
('A defects', 'B cooperates', 0),
|
|
133
|
+
('A defects', 'B defects', 1)]
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
Game = game(('Company A','Company B'),[GameCompanyA, GameCompanyB])
|
|
137
|
+
|
|
138
|
+
# Definition of players:
|
|
139
|
+
|
|
140
|
+
CompanyA = player('Company A',[],[],None,[],None)
|
|
141
|
+
CompanyB = player('Company B',[],[],None,[],None)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
Players = [CompanyA, CompanyB]
|
|
145
|
+
|
|
146
|
+
for AI in Players:
|
|
147
|
+
AI.processGame(Game.structure)
|
|
148
|
+
AI.evaluate()
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
# Game Equilibrium Computation:
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
ChoicesByPlayers = []
|
|
155
|
+
|
|
156
|
+
for AI in Players:
|
|
157
|
+
ChoicesByPlayers = ChoicesByPlayers + [AI.strategies]
|
|
158
|
+
|
|
159
|
+
N = ChoicesByPlayers[len(ChoicesByPlayers) - 1]
|
|
160
|
+
|
|
161
|
+
Nash = nash(None)
|
|
162
|
+
|
|
163
|
+
Nash.compare(N,ChoicesByPlayers[0:len(ChoicesByPlayers) - 1])
|
|
164
|
+
|
|
165
|
+
if len(Nash.equilibrium) == 0:
|
|
166
|
+
print "\nThis game has no equilibrium in pure strategies"
|
|
167
|
+
else:
|
|
168
|
+
print "\nThe Nash equilibria of this game are:\n"
|
|
169
|
+
for K in Nash.equilibrium:
|
|
170
|
+
print K
|
|
171
|
+
|