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
<!-- This loads of all of files that you call below from your 'static' folder --> | |
{% load staticfiles %} | |
<!--The static folder consists of your bootstrap files (.css, .js, fonts, etc)--> | |
<!--When you load the static folders is calls all those folders in the static files without having to code each one in individually--> | |
<html> | |
<head> | |
<!--This is the meta information which is good for SEO--> | |
{% block head-meta %} | |
<meta charset="utf-8"> |
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
{% extends "NAME_OF_YOUR_PROJECT/base.html" %} | |
{% load static %} | |
{% block content %} | |
<!--Insert all of the page specific content here--> | |
{% endblock %} |
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
from __future__ import division | |
import nltk, re | |
from nltk import FreqDist | |
from nltk import word_tokenize | |
from nltk.tokenize import RegexpTokenizer | |
from nltk.corpus import brown | |
tokenizer = RegexpTokenizer(r'\w+') # Takes out the punctuation that Python can't read | |
f= open('Conservative.txt').read().decode('utf-8') # open the file | |
text = word_tokenize(f) |
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
{ | |
"user": { | |
"name": "John Dough", | |
"age": 42, | |
"friends": [ | |
{"name": "Jane Doe"}, | |
{"name": "Bill Green"} | |
] | |
} | |
} |
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
{ | |
user(id: 1) { | |
name | |
age | |
friends { | |
name | |
} | |
} | |
} |
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
{ | |
"user": { | |
"name": "John Dough", | |
"age": 42, | |
"city": "Tokyo" | |
} | |
} |
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
{ | |
user(id: 1) { | |
name | |
age | |
city | |
} | |
} |
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
{ | |
user(id: 1) { | |
name | |
age | |
} | |
} |
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
<ul class="bxslider"> | |
{% for medium in media %} | |
<div class="item {% if forloop.first %} active {% endif %}"> | |
{% if medium.mediaType == 'video' %} | |
<li> | |
<iframe width="640" height="360" src="{{medium.mediaLink}}" frameborder="0" allowfullscreen> | |
</iframe> | |
</li> |
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
<a href="{% url 'index' %}">This is my index page!</a> |
NewerOlder