This file contains hidden or 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
with open("Data.txt") as f: | |
content = ast.literal_eval(f.readlines()) |
This file contains hidden or 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
13/02/17 18:19:19 INFO util.NativeCodeLoader: Loaded the native-hadoop library | |
13/02/17 18:19:19 WARN snappy.LoadSnappy: Snappy native library not loaded | |
13/02/17 18:19:19 INFO mapred.FileInputFormat: Total input paths to process : 7 | |
13/02/17 18:19:19 INFO mapred.JobClient: Running job: job_local_0001 | |
13/02/17 18:19:20 INFO util.ProcessTree: setsid exited with exit code 0 | |
13/02/17 18:19:20 INFO mapred.Task: Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@28ab54eb | |
13/02/17 18:19:20 INFO mapred.MapTask: numReduceTasks: 1 | |
13/02/17 18:19:20 INFO mapred.MapTask: io.sort.mb = 100 | |
13/02/17 18:19:20 WARN mapred.LocalJobRunner: job_local_0001 | |
java.lang.OutOfMemoryError: Java heap space |
This file contains hidden or 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
my_input = [{'why': [u'The Matrix Revolutions'], 'title': u'The Matrix'}, | |
{'why': [u'The Matrix Revolutions'], 'title': u'Inception'}, | |
{'why': [u'The Matrix'], 'title': u'The Matrix Revolutions'}, | |
{'why': [u'The Matrix'], 'title': u'Inception'}, | |
{'why': [u'Saving Private Ryan'], 'title': u'The Hurt Locker'}, | |
{'why': [u'Black Hawk Down'], 'title': u'Saving Private Ryan'}, | |
{'why': [u'Black Hawk Down'], 'title': u'The Kingdom'}, | |
{'why': [u'Black Hawk Down'], 'title': u'The Hurt Locker'}, | |
{'why': [u'A Walk To Remember'], 'title': u'The Notebook'}, | |
{'why': [u'Cast Away'], 'title': u'Forrest Gump'}, |
This file contains hidden or 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
// ==UserScript== | |
// @name Get Torrent link on all piratebay link | |
// @description Sets a torcache link to all torrent files from torcache | |
// @namespace http://googlesystem.blogspot.com | |
// @include http://thepiratebay.se/torrent/* | |
// @include https://thepiratebay.se/torrent/* | |
// @match http://thepiratebay.se/torrent/* | |
// @match https://thepiratebay.se/torrent/* | |
// @author Bikram | |
// @version 1.4.10 |
This file contains hidden or 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
;Add all the natural numbers below one thousand that are multiples of 3 or 5. | |
(defun sum-to-last (x) | |
(cond ((eql x 0) | |
0) | |
(t | |
(let ((mod3 (eql (mod x 3) 0)) | |
(mod5 (eql (mod x 5) 0)) | |
) | |
(cond ((or mod3 mod5) | |
(+ x (sum-to-last (1- x))) |
This file contains hidden or 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
StringBuilder response = new StringBuilder(); | |
String jsonString; | |
URL url; | |
HttpURLConnection httpconn; | |
try { | |
url = new URL("http://backend-newsinamap.appspot.com"); | |
httpconn = (HttpURLConnection) url.openConnection(); | |
if (httpconn.getResponseCode() == HttpURLConnection.HTTP_OK) | |
{ |
This file contains hidden or 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 datetime | |
#import urllib2 | |
import re | |
import os | |
from pyPdf import PdfFileWriter, PdfFileReader | |
from urllib2 import Request, urlopen | |
from StringIO import StringIO | |
#date in the url format | |
now = datetime.datetime.now() |
This file contains hidden or 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 clearly is not the correct way of doing this, what must I be doing | |
pos1 = document.getElementById('pos1').value; | |
pos2 = document.getElementById('pos2').value; | |
pos3 = document.getElementById('pos3').value; | |
pos4 = document.getElementById('pos4').value; | |
pos5 = document.getElementById('pos5').value; | |
pos6 = document.getElementById('pos6').value; | |
pos7 = document.getElementById('pos7').value; | |
pos8 = document.getElementById('pos8').value; | |
pos9 = document.getElementById('pos9').value; |
NewerOlder