Skip to content

Instantly share code, notes, and snippets.

View devpruthvi's full-sized avatar
🎯
Focusing

Pruthvi Raj devpruthvi

🎯
Focusing
View GitHub Profile
import numbers
def getNumber(s):
try:
return int(s)
except ValueError:
return float(s)
flag = True
nums = []
while flag:
try:
import numbers
def getNumber(s):
try:
return int(s)
except ValueError:
return float(s)
flag = True
while flag:
try:
score = raw_input('Enter score: ')
import re,copy,random
class TicTacToe:
def __init__(self):
self.magic_square = [8,1,6,3,5,7,4,9,2]
self.player_marker = 'X'
self.computer_marker = 'O'
self.board = [' ']* 9
self.board_design = "| %s | | %s | | %s |\n| %s | | %s | | %s |\n| %s | | %s | | %s |"
self.player_playing = "n"
#!/usr/bin/env python
#Author: Pruthvi Raj ( pruthvi.n.v@gmail.com )
#Date: 10-March-2016
import re, copy, random
class TicTacToe:
def __init__(self):
self.magic_square = [8, 1, 6, 3, 5, 7, 4, 9, 2]
#!/usr/bin/env python
#Author: Pruthvi Raj ( pruthvi.n.v@gmail.com )
#Date: 10-March-2016
import re, copy, random
class TicTacToe:
def __init__(self):
self.magic_square = [8, 1, 6, 3, 5, 7, 4, 9, 2]
#!/usr/bin/env python
#Author: Pruthvi Raj ( pruthvi.n.v@gmail.com )
#Date: 10-March-2016
import re, copy, random
class TicTacToe:
def __init__(self):
self.magic_square = [8, 1, 6, 3, 5, 7, 4, 9, 2]
//ATOM CONFIG
@devpruthvi
devpruthvi / clone-all-gists.py
Created July 31, 2016 15:15
Gist to download all public and private gists
#!/usr/bin/python
#Depends on: https://github.com/defunkt/gist and git
#install them first
#then run python clone-all-gists.py
import subprocess,re
gists = subprocess.check_output(['gist','-l'])
gists = re.findall('^.*com\/(.*?)(?:\s|$)',gists,re.M)
for gist in gists:
url = 'https://gist.github.com/%s.git' % gist
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class temp
{
public static void main(String[] args)
{