Skip to content

Instantly share code, notes, and snippets.

View devpruthvi's full-sized avatar
🎯
Focusing

Pruthvi Raj devpruthvi

🎯
Focusing
View GitHub Profile
#include<stdio.h>
#include<malloc.h>
#include<string.h>
#define MAX_INPUTS 10
#define MAX_INPUT_SIZE 5
#define MAX_STATES 20
#define MAX_STATE_SIZE 5
#define MAX_ID_SIZE 100
int get_id(char str[], char str_arr[][MAX_STATE_SIZE], int len)
{
#include<stdio.h>
#include<malloc.h>
#include<string.h>
#define MAX_INPUTS 10
#define MAX_INPUT_SIZE 5
#define MAX_STATES 20
#define MAX_STATE_SIZE 5
#define MAX_ID_SIZE 100
int get_id(char str[], char str_arr[][MAX_STATE_SIZE], int len)
{
#include<stdio.h>
#include<malloc.h>
#include<string.h>
#define MAX_INPUTS 10
#define MAX_INPUT_SIZE 5
#define MAX_STATES 20
#define MAX_STATE_SIZE 5
#define MAX_ID_SIZE 100
int get_id(char str[], char str_arr[][MAX_STATE_SIZE], int len)
{
import pyfiglet
import sys,random
f,t = '',''
ts = list(pyfiglet.FigletFont.getFonts())
if sys.argv[-1] in ts:
t = sys.argv[-1]
f = sys.argv[1:-1]
else:
t = random.choice(ts)
f = sys.argv[1:]
import pyfiglet
from termcolor import cprint
import sys,random
f,t = '',''
fonts = list(pyfiglet.FigletFont.getFonts())
if sys.argv[-1] in fonts:
f = sys.argv[-1]
t = sys.argv[1:-1]
else:
f = random.choice(fonts)
$(function () {
function Player(name,marker,score) {
this.name = name;
this.marker = marker;
this.score = score;
};
var p1 = new Player("Player 1","x","000000000");
var p2 = new Player("Player 2","o","000000000");
var SIZE = 3,moves = 0;
var turn = p1;
import ast
allData = []
with open('moosebook.txt','r') as f:
allData = list(map(list,ast.literal_eval('[' + f.read().replace(')(','),(')+ ']' )))
for data in allData:
print(data[0]+' : '+data[5])
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
char* lhs[10] = { "E","E","E","E","E" };
char *rhs[10] = { "E+E","E-E","E*E","E/E","a" };
int numProductions = 5;
int row_id,len;
char stack[50] = "$";
char inp_string[50];
int get_id(char * string, char* arr[10],int len)
done dona done done
@devpruthvi
devpruthvi / attendance_automate.py
Last active May 27, 2016 08:47
Attendance Automation for college final
import openpyxl,datetime,os,time,string
from win32com.client import Dispatch
workbookname = raw_input('Enter the workbook name: ')
outputsheetname = workbookname
workbook = openpyxl.load_workbook(workbookname)
allsheets = workbook.get_sheet_names()
print(allsheets)
weeklysheetname = [x for x in allsheets if 'WEEKLY' in x]
for sheetname in allsheets:
if not sheetname.startswith('I'):