Skip to content

Instantly share code, notes, and snippets.

Mayank Pratap Singh MayankPratap

  • Allahabad
Block or report user

Report or block MayankPratap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dss
Verifying my Blockstack ID is secured with the address 1Mrn2R9Z8pmQbX2YGPfJSEFhmFSfoxPGhA https://explorer.blockstack.org/address/1Mrn2R9Z8pmQbX2YGPfJSEFhmFSfoxPGhA
@MayankPratap
MayankPratap / BotWarriors.cpp
Created May 19, 2017
Code for AI bot which got 2nd rank in CodeWarriors event in Avishkar 2k16.
View BotWarriors.cpp
#include<bits/stdc++.h>
using namespace std;
int dir[8][2] = { -1,-1 , -1,0 , -1,1 , 0,-1 , 0,1 , 1,-1 , 1,0 , 1,1 } ; // For direction
int x , y ; // x for amazon movement and y for arrow movement
int sx , sy , s; // selected amazon x and y location
int p , arena[15][15] , pos[3][5][3] , p1=1 , p2=1 , tmp[15][15] ;
int cons[40] = {100,65,48,40,36,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37,37} ;
/*
p for player selected
View farzee.py
import requests
import json
url="http://elpisdesign.com/apply.php"
r=requests.options(url)
print(r.text)
@MayankPratap
MayankPratap / app.py
Last active May 15, 2017
runs on raspberry pi takes pic and sends it to bot server ( Currently picture capturing part is not shown)
View app.py
# This used Python simpleHTTPServer to host files and then tunnel using ngrok to get public ip
# Then i get url of images hosted on local server.
import requests
import json
import pickle
from time import sleep
@MayankPratap
MayankPratap / app.py
Created May 2, 2017
takes pic through picamera and sends to bot server
View app.py
# This used Python simpleHTTPServer to host files and then tunnel using ngrok to get public ip
# Then i get url of images hosted on local server.
import requests
import json
import pickle
from time import sleep
@MayankPratap
MayankPratap / app.py
Created May 1, 2017
Code that will send image to bot server.
View app.py
import requests
import json
import random
import codecs
#import cStringIO
import base64
from base64 import b64encode
#import pyimgur
#import picamera
import pickle
View dropbox_uploader.py
import requests
import json
import random
#import cStringIO
import base64
from base64 import b64encode
#import pyimgur
#import picamera
import pickle
from imgurpython import ImgurClient
View imguru.py
import requests
import json
import random
#import cStringIO
import base64
from base64 import b64encode
#import pyimgur
#import picamera
import pickle
from imgurpython import ImgurClient
View sample-graph
1
(up) / \ (up)
2 4
(down) \ / (up)
3
You can’t perform that action at this time.