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
import random | |
import math | |
import timeit | |
import heapq | |
N = 100 | |
# Insertion sort |
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 django.db import models | |
from django.contrib import admin | |
from django.utils.translation import ugettext as _ | |
from django.utils.encoding import force_unicode | |
from django.http import HttpResponse, HttpResponseRedirect | |
class DateTime(models.Model): | |
datetime = models.DateTimeField(auto_now_add=True) |
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
import time | |
from calendar import month_name | |
def mkmonth_lst(): | |
if not Post.objects.count(): return [] | |
year, month = time.localtime()[:2] | |
first = Post.objects.order_by("created")[0] | |
fyear = first.created.year | |
fmonth = first.created.month |
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 django.shortcuts import render_to_response | |
from django.template import RequestContext | |
import urllib | |
from xml.dom import minidom | |
def google_weather(request): | |
GOOGLE_WEATHER_URL = 'http://www.weather.com/xml' | |
GOOGLE_IMG_ROOT = 'http://10.2.2.106/media' | |
url = GOOGLE_WEATHER_URL |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional/EN"> | |
<html> | |
<head> | |
<title>Untitled</title> | |
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | |
<meta name="generator" content="PyScripter"> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://www.dynamicdrive.com/dynamicindex2/sagscroller.css" /> |
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 django.template import RequestContext | |
from django.shortcuts import render_to_response, | |
from xml.dom import minidom | |
import urllib2 | |
def rondonia_cafe_capa(request): | |
GOOGLE_WEATHER_URL = 'http://www.google.com/ig/api?weather=porto+velho&hl=pt-BR&ie=UTF-16&ll=-8.760224,-63.901978&spn=3.794279,6.696167&sll=-9.020728,-63.726196&sspn=3.791585,6.696167&vpsrc=0&hnear=Porto+Velho+-+Rond%C3%B4nia&t=h&z=8' | |
url = GOOGLE_WEATHER_URL |
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 XML file does not appear to have any style information associated with it. The document tree is shown below. | |
<xml_api_reply version="1"> | |
<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0"> | |
<forecast_information> | |
<city data="Porto Velho, RO"/> | |
<postal_code data="porto velho"/> | |
<latitude_e6 data=""/> | |
<longitude_e6 data=""/> | |
<forecast_date data="2011-11-30"/> | |
<current_date_time data="1970-01-01 00:00:00 +0000"/> |
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 newforms widget and field to allow multiple file uploads. | |
Created by Edward Dale (www.scompt.com) | |
Released into the Public Domain | |
""" | |
from django.utils.encoding import force_unicode | |
from django.utils.datastructures import MultiValueDict | |
from django.utils.translation import ugettext |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> jQuery Youtube </title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" > | |
<link rel="stylesheet" href="../../reset.css" type="text/css" media="screen" charset="utf-8"> | |
<link rel="stylesheet" href="../../screen.css" type="text/css" media="screen" charset="utf-8"> | |
<link rel="stylesheet" href="screen.css" type="text/css" media="screen" 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> jQuery Youtube </title> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" > | |
<link rel="stylesheet" href="../../reset.css" type="text/css" media="screen" charset="utf-8"> | |
<link rel="stylesheet" href="../../screen.css" type="text/css" media="screen" charset="utf-8"> | |
<link rel="stylesheet" href="screen.css" type="text/css" media="screen" charset="utf-8"> | |
OlderNewer