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
| # Created By Shakti | |
| # This Script scrapes all links from the specific url and enerates a list of URL within a text file which can be run automatically to gather points on Indiatimes | |
| #Basically a SCRAPPING Learning Experience | |
| from bs4 import BeautifulSoup | |
| import urllib2 | |
| url=urllib2.urlopen("http://timesofindia.indiatimes.com/entertainment/hindi/") | |
| content=url.read() | |
| soup=BeautifulSoup(content) | |
| import re |
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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.test" | |
| android:versionCode="1" | |
| android:versionName="1.0"> | |
| <uses-sdk android:minSdkVersion="8" /> | |
| <application android:icon="@drawable/icon" android:label="@string/app_name"> | |
| <activity android:name=".activity01" |
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
| from mechanize import Browser | |
| from bs4 import BeautifulSoup as bs | |
| import pytesser | |
| import random | |
| enteredpnr = raw_input('Please input your 10 PNR no. : ') | |
| while len(enteredpnr) != 10 or not enteredpnr.isdigit(): | |
| print('You have not entered a 10 digit numerical value! Please try again.') | |
| enteredpnr = raw_input('Please input your 10 digit book no. : ') | |
| print "PNR entered by you is "+enteredpnr | |
| raw_input('Press Enter to Continue if correct OR restart the Script') |
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 PNR Captcha Bypass | |
| // @namespace http://www.indianrail.gov.in/pnr_Enq.html | |
| // @description Autofill Captcha on Indian Railways Website for PNR Enquiry | |
| // @include http://www.indianrail.gov.in/pnr_Enq.html | |
| // @version 1 | |
| // @grant none | |
| // ==/UserScript== | |
| window.addEventListener('load', function() { | |
| document.getElementById("txtInput").value=document.getElementById("txtCaptcha").value; |
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 os | |
| import sys | |
| files = os.listdir(os.getcwd()) | |
| print files | |
| for index in range(len(files)): | |
| files[index].split('@',1) | |
| extension=files[index].split('@',1)[1][-4:] | |
| print files[index].split('_',1)[1][:4]+" "+files[index].split('_',1)[1][4:6]+" "+files[index].split('_',1)[1][6:8]+" "+files[index].split('_',1)[1][8:14]+" _ "+files[index].split('_',1)[0]+files[index].split('_',1)[1][-4:] | |
| oldname=files[index] |
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
| Sub MacroIDSP() | |
| ' | |
| ' MacroIDSP Macro | |
| ' | |
| ' | |
| On Error Resume Next | |
| Columns("C").SpecialCells(xlBlanks).EntireRow.Delete | |
| Range("E1:E200").Select | |
| Selection.NumberFormat = "0" |
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 pandas as pd | |
| df=pd.read_csv("IDSP.csv") | |
| print 'Total Requests provided in the Data : ' + str(df.shape[0]) | |
| dfd = df.iloc[1:49692,:] | |
| print 'Total Requests made during specified period : ' + str(dfd.shape[0]) | |
| cph_filter = (dfd["STOREROOM"] == "CPG") | (dfd["STOREROOM"] == "CPN")& (dfd["STOREROOM"] != "AC1")& (dfd["STOREROOM"] != "MC1")& (dfd["STOREROOM"] != "PMC") | |
| filtered_reviews = dfd[cph_filter] | |
| print 'Total Requests made during specified period at CPH ie (CPN & CPG): ' + str(filtered_reviews.shape[0]) |
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
| #PatternCount | |
| def PatternCount(Pattern, Text): | |
| count = 0 | |
| for i in range(len(Text)-len(Pattern)+1): | |
| if Text[i:i+len(Pattern)] == Pattern: | |
| count = count+1 | |
| return count | |
| #FrequentWords | |
| def CountDict(Text, k): |
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
| # Copy your updated FrequentWords function (along with all required subroutines) below this line | |
| #PatternCount | |
| def PatternCount(Pattern, Text): | |
| count = 0 | |
| for i in range(len(Text)-len(Pattern)+1): | |
| if Text[i:i+len(Pattern)] == Pattern: | |
| count = count+1 | |
| return count | |
| #FrequentWords | |
| def CountDict(Text, k): |
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
| #! python3 | |
| #This is a perceptron implementation written using tensor flow to learn basics of tensor flow | |
| #from tensorflow.examples.tutorials.mnist import input_data | |
| #mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
| #(Train 55k / Test 10k / Validate 10k) | |
| #structure of Data : x:mnist.train.images y:mnist.train.label | |
| #mnist.train.images : rc [55000, 784] | |
| #mnist.train.labels : rc [55000, 10] | |
| #y=softmax(Wx+b) | |
| from tensorflow.examples.tutorials.mnist import input_data |
OlderNewer