Skip to content

Instantly share code, notes, and snippets.

@afifmisran
afifmisran / views.py
Last active December 18, 2017 02:40
views.py
from django.http import HttpResponse
from django.shortcuts import render
from test2.score import Result
from test2.score import get_average
def check(request):
screen_name = "not logged in"
average = get_average(screen_name)
@afifmisran
afifmisran / score.py
Last active December 18, 2017 02:39
score.py
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import json
import sys
from twitter import *
from klout import *
from django import forms
from datetime import datetime
@afifmisran
afifmisran / score.py
Created December 17, 2017 10:02
SyntaxError: import * only allowed at module level
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import json
import sys
import twitter
import klout
from datetime import datetime
from difflib import SequenceMatcher
@afifmisran
afifmisran / index.html
Created December 5, 2017 01:00
Dah tambah {% load static %} <img src="{% static "my_app/example.jpg" %}" alt="My image"/>
<!DOCTYPE html>
{% load static %}
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
@afifmisran
afifmisran / settings.py
Last active December 5, 2017 00:37
Hello. I can't load bosstrap file to my django
"""
Django settings for humanorbot project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/