View gist:5665449
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
(function() { | |
var notices = { | |
WiknicUS: | |
{ | |
begin: '7 May 2013 00:00 UTC', | |
end: '23 June 2013 00:00 UTC', | |
country: 'US', | |
text: "Join the [[Wikipedia:Wiknic|Great American Wiknic]], a Wiki-Picnic being celebrated in 10+ US cities around June 22!" | |
}, |
View gist:3361873
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
/*jslint white:true, vars:true, browser: true */ | |
/*global mw, $ */ | |
// | |
// Helper Functions | |
// | |
mw.activeCampaigns = mw.activeCampaigns || {}; | |
mw.activeCampaigns.PEF = { |
View Dijk.c
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
#include<stdio.h> | |
#define infi 999 | |
int mat[20][20], dist[20], path[20]; | |
int n,i,j; | |
int q[100]; | |
int front=-1, rear=-1; | |
int isempty() |
View Hash.c
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
#include<stdio.h> | |
#include<stdlib.h> | |
#define size 10 | |
int a[size],num,r=7; | |
int index; | |
struct node | |
{ | |
int data; |
View irclogger.py
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
#!/usr/bin/python | |
# IRC Logger. | |
# By Shashi Gowda <http://identi.ca/shashi>. | |
import sys | |
import socket | |
import time | |
import os |
View json-format.l
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
// Lex program to pretty-format json file. ***WARNING-Amateurish*** | |
%{ | |
int string=0; | |
int gi=0; | |
void indent(int i); | |
int prev_close=0; | |
%} | |
%% | |
\\\" { //Matching an escaped double quote |
View colorspaceconvertor.c
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
// Author: Unkown | |
#include<stdio.h> | |
#include<conio.h> | |
#include<graphics.h> | |
#include<stdlib.h> | |
void main() | |
{ | |
int gd=DETECT,gm,n; | |
float r=0,g=0,b=0; | |
float y=0,i=0,q=0; |
View projecteuler_prob_3.py
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=600851475143 | |
i=2 | |
while i<a : | |
if a%i==0: | |
a1=a/i | |
else : | |
i+=1 | |
continue | |
n=2 |
View wordcount.py
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
text = raw_input("Enter a text ") | |
textsplit = text.split() | |
count = len(textsplit) | |
print "The word count is = " + str(count) | |
NewerOlder