├── .gitignore ├── facebook ├── djangofb │ ├── default_app │ │ ├── __init__.py │ │ ├── urls.py │ │ ├── templates │ │ │ └── canvas.fbml │ │ ├── models.py │ │ └── views.py │ ├── context_processors.py │ ├── models.py │ └── __init__.py ├── decorator.py ├── wsgi.py └── webappfb.py ├── static ├── img │ ├── favicon.ico │ ├── spinner.gif │ ├── appengine.gif │ └── ajax-loader.gif ├── blueprint │ ├── src │ │ ├── grid.png │ │ ├── reset.css │ │ ├── forms.css │ │ ├── print.css │ │ ├── ie.css │ │ ├── typography.css │ │ └── grid.css │ ├── plugins │ │ ├── buttons │ │ │ ├── icons │ │ │ │ ├── key.png │ │ │ │ ├── tick.png │ │ │ │ └── cross.png │ │ │ ├── readme.txt │ │ │ └── screen.css │ │ ├── link-icons │ │ │ ├── icons │ │ │ │ ├── doc.png │ │ │ │ ├── im.png │ │ │ │ ├── pdf.png │ │ │ │ ├── xls.png │ │ │ │ ├── email.png │ │ │ │ ├── feed.png │ │ │ │ ├── external.png │ │ │ │ └── visited.png │ │ │ ├── readme.txt │ │ │ └── screen.css │ │ ├── rtl │ │ │ ├── readme.txt │ │ │ └── screen.css │ │ └── fancy-type │ │ │ ├── readme.txt │ │ │ └── screen.css │ ├── print.css │ ├── ie.css │ └── screen.css ├── js │ ├── fbinit.js │ ├── main.js │ ├── sound.js │ ├── scriptaculous.js │ ├── builder.js │ ├── shell.js │ └── slider.js ├── xd_receiver.html └── css │ └── main.css ├── facebook.yaml ├── config.py ├── cron.yaml ├── templates ├── canvas │ ├── error_download.html │ ├── friend.html │ ├── invite.html │ ├── index.html │ ├── base.html │ └── graph.html ├── test.html ├── error │ └── download.html ├── fbconnect.html ├── graph │ ├── emotion.html │ └── index.html ├── index.html ├── latihan.html ├── testfb.html ├── trainning │ ├── smiley.html │ ├── status.html │ ├── index.html │ └── keyword.html ├── iframefb.html ├── shell.html └── base.html ├── exp └── test.py ├── loader.py ├── exporter.py ├── latihan.py ├── app.yaml ├── cron.py ├── graph.py ├── index.yaml ├── base.py ├── main.py ├── trainning.py ├── analysis.py ├── shell.py └── models.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.py? 2 | -------------------------------------------------------------------------------- /facebook/djangofb/default_app/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/img/favicon.ico -------------------------------------------------------------------------------- /static/img/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/img/spinner.gif -------------------------------------------------------------------------------- /static/img/appengine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/img/appengine.gif -------------------------------------------------------------------------------- /static/img/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/img/ajax-loader.gif -------------------------------------------------------------------------------- /static/blueprint/src/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/src/grid.png -------------------------------------------------------------------------------- /facebook.yaml: -------------------------------------------------------------------------------- 1 | app_name: emograph 2 | api_key: ead88d005b9905d8e6d13282e0065b93 3 | secret_key: 44f7bb8680cd23a8268c2449c56828ce 4 | -------------------------------------------------------------------------------- /config.py: -------------------------------------------------------------------------------- 1 | TEMPLATE_DIR = 'templates' 2 | FB_API_KEY = 'ead88d005b9905d8e6d13282e0065b93' 3 | FB_SECRET_KEY = '9d12ee2ecccc2615fb817082befef760' 4 | -------------------------------------------------------------------------------- /static/blueprint/plugins/buttons/icons/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/buttons/icons/key.png -------------------------------------------------------------------------------- /static/blueprint/plugins/buttons/icons/tick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/buttons/icons/tick.png -------------------------------------------------------------------------------- /static/blueprint/plugins/buttons/icons/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/buttons/icons/cross.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/doc.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/im.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/im.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/pdf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/pdf.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/xls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/xls.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/email.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/feed.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/external.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/external.png -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/icons/visited.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ATA/emotiongraph/master/static/blueprint/plugins/link-icons/icons/visited.png -------------------------------------------------------------------------------- /cron.yaml: -------------------------------------------------------------------------------- 1 | cron: 2 | - description: list word 3 | url: /cron-words.php 4 | schedule: every 5 minutes 5 | - description: probabilitas 6 | url: /cron-probs.php 7 | schedule: every 5 minutes 8 | -------------------------------------------------------------------------------- /templates/canvas/error_download.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | {% block content %} 5 | Error When downloading from facebook, Try Again 6 | {% endblock %} 7 | -------------------------------------------------------------------------------- /exp/test.py: -------------------------------------------------------------------------------- 1 | class Mahasiswa: 2 | 3 | @classmethod 4 | def m1(cls): 5 | cls.m2() 6 | @classmethod 7 | def m2(cls): 8 | print 'm2' 9 | 10 | Mahasiswa.m1() 11 | -------------------------------------------------------------------------------- /facebook/djangofb/default_app/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import * 2 | 3 | urlpatterns = patterns('{{ project }}.{{ app }}.views', 4 | (r'^$', 'canvas'), 5 | # Define other pages you want to create here 6 | ) 7 | 8 | -------------------------------------------------------------------------------- /static/js/fbinit.js: -------------------------------------------------------------------------------- 1 | document.observe("dom:loaded", function() { 2 | FB.init("ead88d005b9905d8e6d13282e0065b93", "/xd_receiver.htm"); 3 | $$('table tbody > tr:nth-child(even)').each(function(e){e.addClassName('even')}) 4 | }); 5 | -------------------------------------------------------------------------------- /static/js/main.js: -------------------------------------------------------------------------------- 1 | document.observe("dom:loaded", function() { 2 | FB.init("ead88d005b9905d8e6d13282e0065b93", "/xd_receiver.htm"); 3 | $$('table tbody > tr:nth-child(even)').each(function(e){e.addClassName('even')}) 4 | }); 5 | -------------------------------------------------------------------------------- /templates/test.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |6 |
10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /facebook/decorator.py: -------------------------------------------------------------------------------- 1 | import config 2 | from facebook import Facebook 3 | 4 | class BaseDecorator(object): 5 | self.fb = Facebook(config.FB_API_KEY, config.FB_SECRET_KEY) 6 | 7 | class FBConnect(BaseDecorator): 8 | def __init__(self, func): 9 | self.func = func 10 | def __call__(self): 11 | 12 | self.func(self) 13 | 14 | -------------------------------------------------------------------------------- /facebook/djangofb/context_processors.py: -------------------------------------------------------------------------------- 1 | def messages(request): 2 | """Returns messages similar to ``django.core.context_processors.auth``.""" 3 | if hasattr(request, 'facebook') and request.facebook.uid is not None: 4 | from models import Message 5 | messages = Message.objects.get_and_delete_all(uid=request.facebook.uid) 6 | return {'messages': messages} -------------------------------------------------------------------------------- /static/blueprint/plugins/rtl/readme.txt: -------------------------------------------------------------------------------- 1 | RTL 2 | * Mirrors Blueprint, so it can be used with Right-to-Left languages. 3 | 4 | By Ran Yaniv Hartstein, ranh.co.il 5 | 6 | Usage 7 | ---------------------------------------------------------------- 8 | 9 | 1) Add this line to your HTML: 10 | -------------------------------------------------------------------------------- /static/blueprint/plugins/fancy-type/readme.txt: -------------------------------------------------------------------------------- 1 | Fancy Type 2 | 3 | * Gives you classes to use if you'd like some 4 | extra fancy typography. 5 | 6 | Credits and instructions are specified above each class 7 | in the fancy-type.css file in this directory. 8 | 9 | 10 | Usage 11 | ---------------------------------------------------------------- 12 | 13 | 1) Add this plugin to lib/settings.yml. 14 | See compress.rb for instructions. 15 | -------------------------------------------------------------------------------- /static/blueprint/plugins/link-icons/readme.txt: -------------------------------------------------------------------------------- 1 | Link Icons 2 | * Icons for links based on protocol or file type. 3 | 4 | This is not supported in IE versions < 7. 5 | 6 | 7 | Credits 8 | ---------------------------------------------------------------- 9 | 10 | * Marc Morgan 11 | * Olav Bjorkoy [bjorkoy.com] 12 | 13 | 14 | Usage 15 | ---------------------------------------------------------------- 16 | 17 | 1) Add this line to your HTML: 18 | -------------------------------------------------------------------------------- /loader.py: -------------------------------------------------------------------------------- 1 | from google.appengine.ext import db 2 | from google.appengine.tools import bulkloader 3 | import analysis.models 4 | 5 | class FBUserLoader(bulkloader.Loader): 6 | def __init__(self): 7 | bulkloader.Loader.__init__(self, 'FBUser', 8 | [('uid', lambda x: x.decode('utf-8')), 9 | ('name', lambda x: x.decode('utf-8')), 10 | ('religion', lambda x: x.decode('utf-8')), 11 | ]) 12 | 13 | loaders = [FBUserLoader] 14 | -------------------------------------------------------------------------------- /exporter.py: -------------------------------------------------------------------------------- 1 | from google.appengine.ext import db 2 | from google.appengine.tools import bulkloader 3 | import analysis.models 4 | 5 | class FBUserExporter(bulkloader.Exporter): 6 | def __init__(self): 7 | bulkloader.Exporter.__init__(self, 'FBUser', 8 | [('uid', lambda x: x.decode('utf-8')), 9 | ('name', lambda x: x.decode('utf-8')), 10 | ('religion', lambda x: x.decode('utf-8')), 11 | ]) 12 | 13 | exporters = [FBUserExporter] 14 | -------------------------------------------------------------------------------- /templates/canvas/invite.html: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | {% block content %} 5 |
11 |
12 |
| Message | 13 |Emotion Result | 14 |
|---|---|
| 20 | {{status.message}} 21 | | 22 |23 | {{status.emotion}} 24 | | 25 |
Status : Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
5 |
6 | Keywords:
7 | jijik :
8 | sedih :
9 | takut :
10 | marah :
11 | senang :
12 | malu :
13 |
15 | keyword di isi 16 |
17 | {% endblock %} 18 | -------------------------------------------------------------------------------- /static/blueprint/plugins/buttons/readme.txt: -------------------------------------------------------------------------------- 1 | Buttons 2 | 3 | * Gives you great looking CSS buttons, for both and