Example #1
0
def start(path):
    package_dir = os.path.join(path, 'packages')
    download_dir = os.path.join(path, 'download')

    files = [os.path.join(package_dir, f) for f in os.listdir(package_dir)
             if os.path.isfile(os.path.join(package_dir, f))]
    contents = [open(f).read().replace('\n', '') for f in files]
    packages = [json.loads(c) for c in contents]

    setup.start(path, download_dir, packages)
Example #2
0
def start(path):
    package_dir = os.path.join(path, 'packages')
    download_dir = os.path.join(path, 'download')

    files = [
        os.path.join(package_dir, f) for f in os.listdir(package_dir)
        if os.path.isfile(os.path.join(package_dir, f))
    ]
    contents = [open(f).read().replace('\n', '') for f in files]
    packages = [json.loads(c) for c in contents]

    setup.start(path, download_dir, packages)
Example #3
0
    def __init__(self, master=None):
        master.title("{}".format(APPNAME))  #change title here
        master.geometry("{}x{}".format(WIDTH,
                                       HEIGHT))  #change window size here
        master.resizable(width=False, height=False)  #resizable?
        tk.Frame.__init__(self, master, relief=tk.GROOVE)

        # s = ttk.Style()
        # s.theme_use("winxpblue")

        self.menubar = tk.Menu(self)

        self.contentFrame = tk.Frame(master, width=100, height=100)
        self.contentFrame.pack(anchor=tk.NW, fill=tk.BOTH, expand=True)

        self.pages = []  # initialize pages list

        self.addContent(self.contentFrame)

        self.menus = []  # initialize menus list

        self.addMenus(self.menus)

        for page in self.pages:  # place all pages
            page.place(in_=self.contentFrame,
                       x=0,
                       y=0,
                       relwidth=1,
                       relheight=1)

        # maybe I could start this at the beginning and make it asynchronous, then wait on the main thread until this is finished?
        self.startFresh = setup.start()

        # self.pages[0].show()

        master.config(menu=self.menubar)

        if self.startFresh:
            self.pages[1].show()
            messagebox.showinfo(
                "New User",
                "It looks like you haven't used this application before.\nLet's start by getting some information."
            )
        else:
            self.pages[0].show()

        # self.bind_all("<Control-Key-0>", self.pages[0].show)    # main menu
        # self.bind_all("<Control-Key-1>", self.pages[1].show)    # Page 2

        self.bind_all("<Control-Key-w>",
                      lambda _: self.master.quit())  # Quit Application
Example #4
0
def install():
    setup.start()
Example #5
0
import os
import setup

setup.start(os.getcwd())
Example #6
0
    num = len(file.readlines())
    file.close()
    return num


def newDice(players, player, jet, sur):
    try:
        players[player].append(jet / sur * 100)
    except KeyError:
        players[player] = [jet / sur * 100]


## Starting the bot!
if isSetUp(datadir + "/setup.txt") == False:
    setup.setup_common()
    setupArray = setup.start()
else:
    setupArray = setup.start()
if isSetUp(datadir + "/token.txt") == False:
    createToken()

## The bot itself
global client
client = discord.Client()


@client.event
@asyncio.coroutine
def on_ready():
    #lel=open("sorataisbored.png","rb")
    #yield from client.edit_profile(avatar=lel.read())
import sys
import setup
import glob

if '--all' in sys.argv:
    sys.argv.remove('--all')
if len(sys.argv) == 3:
    sys.argv += glob.glob('*.pyx')

setup.build(sys.argv)
setup.start()
Example #8
0
Usage:
        $ python hdd-indexer.py


"""

import time
import setup
import subprocess
import webbrowser

if __name__ == '__main__':
    setup_status = setup.depickle_setup()
    if setup_status['console_completed'] is not True:
        setup_status = setup.start(setup_status)
        print "Now comes the nice part...!"

    setup.cls()
    print "Let's start HDD-indexer!"
    print ""
    print "HDD-indexer is browser based."
    print "So, you can always find it at"
    print ""
    print ""
    print "    >>>  localhost:8000  <<<"
    print ""
    print ""
    print "I'm going to start the server here, in this window."
    print "And I'll also open the webpage in a browser for you, OK?"
    print ""
from setup import Color
import time
from chars import D
import setup 
strip = setup.start()


###################################################################################
#Display has range:
#                 D[0][0] to D[10][27]
#
#  left number  = y
#  right number = x
#
#  Color(RED,GREEN,BLUE)
# where R/G/B is an integer from 0 to 255


#change the colour of a pixel:

strip.setPixelColor( D[0][0], Color(255,255,255))
strip.setPixelColor( D[10][27], Color(255,255,255))

#update display

strip.show()
Example #10
0
                        conn = sqlite3.connect("userfingerdata.db")
                c = conn.cursor()
                #proximal
                for i in proximal:
                        enterdata(i[0], i[1], i[2], i[3], i[4], conn, c)

                #distal
                for j in distal:
                        enterdata(j[0], j[1], j[2], j[3], j[4], conn, c)

                conn.commit()
                conn.close()
                
                print "saved"

start("fingerdata")     
userInput = raw_input("Record Gesture or Enter Gesture?")
while userInput.lower() != "record" and userInput.lower() != "enter":
     print "\nInvalid input!\n"
     userInput = raw_input("Record Gesture or Enter Gesture?")
"""if userInput.lower() == "record":
        conn = sqlite3.connect("fingerdata.db")
        c = conn.cursor()
        c.execute("DROP TABLE fproximal1")
        c.execute("DROP TABLE fproximal2")
        c.execute("DROP TABLE fproximal3")
        c.execute("DROP TABLE fproximal4")
        c.execute("DROP TABLE fproximal5")
        c.execute("DROP TABLE fdistal1")
        c.execute("DROP TABLE fdistal2")
        c.execute("DROP TABLE fdistal3")