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
package main | |
import ( | |
"flag" | |
"io" | |
"log" | |
"net" | |
"strings" | |
) |
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
# coding:utf-8 | |
# From http://code.google.com/p/plsamples/source/browse/trunk/GrandMonde/getimageinfo.py | |
import StringIO | |
import struct | |
from reseekfile import ReseekFile | |
def getImageInfo(datastream): | |
datastream = ReseekFile.ReseekFile(datastream) |
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 bs4 import BeautifulSoup,SoupStrainer | |
import urllib.request | |
import colorama,re,queue,threading | |
from colorama import Fore | |
from urllib.parse import * | |
class check_link(): | |
def __init__(self,address): | |
self.address=address | |
def check(self,address): |
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
// Functional Groovy Crashcourse | |
// | |
// This short Groovy script I wrote to provide my students the most common functional | |
// programming techniques of the programming language Groovy in a very condensed form. | |
// | |
// Author: Nane Kratzke (Luebeck University of Applied Sciences) | |
// License: Free for every one | |
// Date: 22. March 2013 | |
// Here is how you can define a list in Groovy. |
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
//Program to merge two sorted linked lists. | |
public class LLMergeSort{ | |
static Node head1; | |
static Node head2; | |
static Node newHead; | |
static class Node{ | |
int data; | |
Node next; |
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
// Stack - Object oriented implementation using arrays | |
#include <iostream> | |
using namespace std; | |
#define MAX_SIZE 101 | |
class Stack | |
{ | |
private: | |
int A[MAX_SIZE]; // array to store the stack | |
int top; // variable to mark the top index of stack. |
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 re | |
import urllib2 | |
from sets import Set | |
start_link = 'http://precog.iiitd.edu.in/' | |
urls = Set([start_link]) | |
def findId(source): | |
l = re.findall(r'"(http[s]*://\S+)"',source) | |
return l |