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
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<time.h> | |
| main() | |
| { | |
| int a[100],i,j,key; | |
| srand(time(NULL)); | |
| for(i=1; i<=10; i++) |
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
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<time.h> | |
| #define A_MAX 100 | |
| #define MAX 999 | |
| int main() | |
| { | |
| int a[A_MAX],i,j,flag=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
| #include<stdio.h> | |
| #include<stdlib.h> | |
| #include<time.h> | |
| #define ARRAY_MAX 100 | |
| #define MAX 999999 | |
| int main() | |
| { | |
| int array[ARRAY_MAX],i,j,flag=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
| // Lex Program to check the entered arithmetic operation is valid or not | |
| // Programmer: Indrajith Indraprastham | |
| // Date : 19 AUG 2015 ; 1:34 | |
| // Note: | |
| // Final expr with (a+b)*(a-b): ^({op1})({op1}?{op2}{op1}{op1}?)*{op2}?{op1}$ | |
| // Final expr with (a+b)(a-b) : ^({op1})({op1}*{op2}{op1}{op1}*)*{op2}?{op1}$ | |
| // ^({op1} : starts with op1; | |
| // ({op1}*{op2}{op1}{op1}*)* : matches a+b+c+d | |
| // {op2}?{op1}$ : ends expr with op1 |
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
| //Sunday 06 September 2015 10:56:37 PM IST | |
| //Programmer: Indrajith indraprastham | |
| // Other link: http://hostcode.sourceforge.net/view/3332 | |
| /*............... Question ................... | |
| Chef has just started Programming, he is in first year of Engineering. Chef is reading about Relational Operators. | |
| Relational Operators are operators which check relatioship between two values. Given two numerical values A and B you need to help chef in finding the relationship between them that is, | |
| First one is greater than second or, |
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
| alert("success"); |
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
| #Sat Feb 11 02:27:07 IST 2017 | |
| #Indrajith Indraprastham | |
| from subprocess import call | |
| import os | |
| from os import listdir | |
| from os.path import isfile, join | |
| #get current directory path | |
| mypath = os.getcwd() |
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 glob | |
| import subprocess | |
| for file in glob.glob('*.mp4'): | |
| out = file[:len(file)-3]+"mp3" | |
| proc = subprocess.Popen(["ffmpeg","-i",file,out,"-y"], stdout=subprocess.PIPE) | |
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
| # -*- coding: utf-8 -*- | |
| # filename: crawler.py | |
| # Author: Indrajith Indraprastahm | |
| # Lisence: GPL v3: http://www.gnu.org/licenses/ | |
| #-------------------------------------------------------------------------------- | |
| # README | |
| #-------------------------------------------------------------------------------- | |
| # Install Requirements | |
| # pip install validators beautifulsoup4 lxml |
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 itertools | |
| def xpath_soup(element): | |
| """ | |
| Generate xpath of soup element | |
| :param element: bs4 text or node | |
| :return: xpath as string | |
| """ | |
| components = [] | |
| child = element if element.name else element.parent |
OlderNewer