This file contains 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
Get Start_point(x,y) | |
if x-3 >=1 | |
mark endpoint (x-3,y) //north | |
if x+3 <=10 | |
mark endpoint (x+3,y) //south | |
if y-3 >=1 | |
mark endpoint (x,y-3) //west | |
if y+3 <=10 | |
mark endpoint (x,y+3) //east | |
update map |
This file contains 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
<html> | |
<style type="text/css"> | |
.starRate {position:relative; margin:20px; overflow:hidden; zoom:1;} | |
.starRate ul {width:160px; margin:0; padding:0;} | |
.starRate li {display:inline; list-style:none;} | |
.starRate a, .starRate b {background:url(star_rate.gif) left top repeat-x;} | |
.starRate a {float:right; margin:0 80px 0 -144px; width:80px; height:16px; background-position:left 16px; color:#000; text-decoration:none;} | |
.starRate a:hover {background-position:left -32px;} | |
.starRate b {position:absolute; z-index:-1; width:80px; height:16px; background-position:left -16px;} | |
.starRate div b {left:0px; bottom:0px; background-position:left top;} |
This file contains 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
im=Image.open("1.jpg") | |
#im=im.rotate(1) | |
im.save("e.jpg") | |
im2=im.convert("L") | |
im2.save("b.jpg") | |
threshold = 100 | |
im = im2.point(lambda p: p > threshold and 255) | |
im.save("d.jpg") | |
img="d.jpg" | |
result = tesseract.ProcessPagesWrapper(img,api) |
This file contains 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
api = tesseract.TessBaseAPI() | |
api.SetOutputName("outputName"); | |
api.Init(".","eng",tesseract.OEM_DEFAULT) | |
api.SetPageSegMode(tesseract.PSM_AUTO) |
This file contains 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 tesseract | |
from PIL import Image |
This file contains 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
def golog(): | |
os.system("notepad.exe "+"C:/Users/Bogdan/git/GPS2PC/GPS2PC/log.txt") | |
butWHIB=Button(root,text="Where have I been?",command=golog) | |
butWHIB.grid(row=5,column=0,columnspan=2,sticky=N+S+E+W) |
This file contains 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
butG2S=Button(root, text="Go to Maps", command=gomaps) | |
butG2S.grid(row=3,column=0,columnspan=2, sticky=N+S+E+W) |
This file contains 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
butGC=Button(root, text="Get coordinates", command=getcoord) | |
butGC.grid(row=1,column=0, sticky=N+S+E+W) | |
var=StringVar() | |
lab =Label(root, bg='white',width=50,height=2,textvariable=var,justify=CENTER) | |
lab.grid(row=1, column=1,sticky=N+S+E) | |
lab2=Label(root) | |
lab2.grid(row=2,column=0) |
This file contains 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
photo=PhotoImage(file="worldlg.gif") | |
ca=Canvas(root) | |
ca.create_image(200,123,image=photo) | |
ca.grid(row=0,column=0,columnspan=2,sticky=N+S+E+W) |
This file contains 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
root=Tk() | |
root.geometry("420x420+400+100") | |
root.title("Where am I? by Bazub") | |
root.bind("<Escape>", lambda e: e.widget.quit()) | |
root.resizable(FALSE,FALSE) | |
root.mainloop() |
NewerOlder