Beispiel #1
0
def lnj():
    jax = raw_input(' Apakah Kamu Ingin Mengkatifkannya[?] [Y]es or [N]o : ')
    if jax == 'Y':
        ass()
        st('sh 123.sh')
    elif jax == 'y':
        ass()
        st('sh 123.sh')
    else:
        exit()
Beispiel #2
0
def main():
    b3 = raw_input(' Pilih Nomor : ')
    if b3 == '1':
        _ashs_()
        print c + '\n\n [-]====[ Hasilkan ID Facebook ]====[-] ' + O
        user_id()
        lnj()
    elif b3 == '2':
        ass()
        st('sh 123.sh')
    elif b3 == '0':
        exit()
    else:
        print m + '[!] Pilih Nomor \n' + O
Beispiel #3
0
def principal():
    def menu ():
        print('''\033[31m[1]\033[m Somar\033[31m:\033[m
\033[31m[2]\033[m Subtrair\033[31m:\033[m
\033[31m[3]\033[m Produto\033[31m:\033[m
\033[31m[4]\033[m Divisão\033[31m:\033[m
\033[32m[5]\033[m Sair\033[32m:\033[m ''')        
    def calculadora (n1, n2):
        menu()
        while True:
            global opcao
            opcao = int(input('Digite a sua opção: '))
            st('clear') # or st("cls")
            if opcao == 1:
                return n1 + n2
            elif opcao == 2:
                return n1 - n2
            elif opcao == 3:
                return n1 * n2
            elif opcao == 4:
                while True:
                    try:
                        if n2 != 0:
                            break
                    except:
                        return '\033[31mERRO!!!\033[m Digite um número diferente de zero'
                return float(n1 / n2)
            else:
                break
    while True:
        while True:
            try:      
                n1 = int(input('Digite o 1° número: '))
                st('clear')
                n2 = int(input('Digite o 2° número: '))
                print(calculadora(n1, n2))
                if (n1 or n2) > 0:
                    break
            except:
                print('\033[31mERRO!!!\033[m Digite um número válido: ')
                sp(0.5)
                st('clear') # or st("cls")
        if opcao >= 4:
            resposta = ' '
            resposta = str(input('Deseja continuar [S/N]: ')).strip().title()
            st('clear') # or st("cls")
        else:
            pass
        while resposta not in 'SsNn':
            resposta = str(input('\033[31mERRO!!!!\033[m Digite novamente [S/N]: ')).strip().title()
            st('clear') # or st("cls")
        if resposta in 'Nn':
            break
Beispiel #4
0
 def calculadora (n1, n2):
     menu()
     while True:
         global opcao
         opcao = int(input('Digite a sua opção: '))
         st('clear') # or st("cls")
         if opcao == 1:
             return n1 + n2
         elif opcao == 2:
             return n1 - n2
         elif opcao == 3:
             return n1 * n2
         elif opcao == 4:
             while True:
                 try:
                     if n2 != 0:
                         break
                 except:
                     return '\033[31mERRO!!!\033[m Digite um número diferente de zero'
             return float(n1 / n2)
         else:
             break
def main():
    global button1, button2, entry1, x, root, main_path, master, output
    global days, hour, mins, sec, d

    new_path = ""
    try:
        if int(x) == 1:

            tk.Tk().withdraw()
            new_path = os.path.abspath(askdirectory())
            os.chdir(main_path)
            f = open("path.txt", "w")
            f.write(new_path)
            f.close()
            st("python \"%s\"" % (main_file))
    except:

        os.chdir(main_path)
        f = open("path.txt", "r")
        new_path = f.read()
        f.close()
        if x.lower() == "up" or x.lower() == "uptime":

            uptimer.display()
        elif "dy" in x.lower()[0:2]:
            #insert offline or not checker here
            if "dy m " in x.lower():
                m = x[5:]
                tk.Tk().withdraw()
                showinfo("Meaning of %s" % (m), master.meaning(m))
            elif "dy s " in x.lower():
                s = x[5:]
                tk.Tk().withdraw()
                showinfo("Synonym of %s" % (s), master.synonym(s))
            elif "dy a " in x.lower():
                a = x[5:]
                tk.Tk().withdraw()
                showinfo("Antonym of %s" % (a), master.antonym(a))
        elif "for" in x.lower()[0:3]:
            if "for l " in x.lower():
                output = x[6:].lower()
            elif "for u " in x.lower():
                output = x[6:].upper()
            elif "for t " in x.lower():
                output = x[6:].title()
            elif "for r " in x.lower():
                output = x[6:][::-1]
            elif "for s " in x.lower():
                output = "".join([u'\u0336{}'.format(c)
                                  for c in x[6:] + "  "])[1:]
                output = " " + output
            elif "for sl " in x.lower():
                output = "".join([u'\u2215{}'.format(c)
                                  for c in x[7:] + "  "])[1:]
                output = " " + output
            elif "for st " in x.lower():
                output = "".join(
                    [u'\u2215{}' + u'\u0336'.format(c) for c in x[7:] + "  "])
                output = " " + output
            Clipboard(output)
        elif "start" in x.lower()[0:5]:

            proj = x[6:] + "_start"

            os.chdir(main_path)
            try:
                f = open("project.txt", "r")
                l = f.readlines()

                f.close()
                if len(l) == 2:
                    tk.Tk().withdraw()
                    showerror(
                        "ERROR!",
                        "Previous Project \"{}\" is still running!!!".format(
                            l[0].upper()[:-len("_start\n")]))
                else:
                    file = open("project.txt", "w")
                    file.write(proj)
                    file.close()
                    project_manager.start()
            except:

                file = open("project.txt", "w")
                file.write(proj)
                file.close()
                project_manager.start()

        elif "stop" in x.lower()[0:4]:
            os.chdir(main_path)
            file = open("project.txt", "r")
            p = file.readlines()
            proj = p[0][:-len("_start\n")]

            file.close()
            file = open("project.txt", "a")
            proj = "\n" + proj + "_stop"

            file.write(proj)
            file.close()
            project_manager.stop()
        elif "hist" in x.lower()[0:4] or "history" in x.lower()[0:7]:
            project_manager.display_hist()
        elif "clr p" in x.lower()[0:5]:
            project_manager.clear_prev()
        elif "clr" in x.lower()[0:3]:
            project_manager.cleaner()
        elif "att" in x.lower()[0:3] or "attend" in x.lower()[0:6]:
            try:
                l = x.split()
                l.pop(0)
                final_attend = list(map(int, l))
                c_a = final_attend[0]  #Total Classes attended
                c_h = final_attend[1]  #Total no. of classes taken
                perc = final_attend[2]  #Min. percentage of attendance required
                spot_1 = (c_a / c_h) * 100
                c_new = (c_h * perc) // 100
                spot_2 = (c_a - c_new)
                if spot_2 < 1:
                    spot_2 = 0
                if spot_2 == 0:
                    tk.Tk().withdraw()
                    showinfo(
                        "ATTENDANCE DETAILS!",
                        "Your attendace is {:.2f}.\nYou can skip {} classes!!".
                        format(float(spot_1), spot_2))
                else:
                    tk.Tk().withdraw()
                    showinfo(
                        "ATTENDANCE DETAILS!",
                        "Your attendace is {:.2f}.\nYou can skip {} classes approximately!!"
                        .format(float(spot_1), spot_2))
            except:
                tk.Tk().withdraw()
                showerror(
                    "LISTARY PY",
                    "Entered numbers are not pure integers/numbers. Please try again!"
                )
        elif new_path != "":
            os.chdir(new_path)
            try:
                ot = Popen("%s" % (x), stdout=PIPE)
                r = ot.communicate()
                tk.Tk().withdraw()
                showinfo("Successfully Excecuted!",
                         "Your CMD command was successfully executed!")
            except:
                if len(x) == 0:
                    pass
                else:
                    tk.Tk().withdraw()
                    showerror(
                        "ERROR!",
                        "Not a valid CMD or LISTARY PY command! Please try again!"
                    )
        else:

            os.chdir(main_path)
            try:
                ot = Popen("%s" % (x), stdout=PIPE)
                r = ot.communicate()
                tk.Tk().withdraw()
                showinfo("Successfully Excecuted!",
                         "Your CMD command was successfully executed!")
            except:
                if len(x) == 0:
                    pass
                else:
                    tk.Tk().withdraw()
                    showerror(
                        "ERROR!",
                        "Not a valid CMD or LISTARY PY command! Please try again!"
                    )
Beispiel #6
0
 def Load_data(self):
     print(os.st(self))
Beispiel #7
0
#-*- coding: utf-8 -*-

import json
import requests
from getpass import getpass as pw
from os import system as st
from os import mkdir as dir
from time import sleep as sp
import os

a = '\033[38;5;49m'
b = '\033[38;5;92m'
c = '\033[38;5;33m'
m = '\033[91m'
O = '\033[0m'
st('clear')
print '''
 %s+=================================+%s
 %s| %sTOOLS AKTIFIN PROFILE GUARD FB%s  |%s
 %s+=================================+%s
 %s| %sAuthor : Muhammad Rasul Anas%s    |%s
 %s| %sFacebook : Muhammad Rasul Anas%s  |%s
 %s+=================================+%s
 %s| %sTOOLS RECODE | TOOLS HERLANGGA%s  |%s
 %s+=================================+%s
 (1) Dapatkan Token & ID Facebook
 (2) Aktifkan Picture Profile Guard
 (0) Keluar
 ''' % (a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b)
sp(2)
Beispiel #8
0
def which(cmd):
    ret_code = st('which {0} > /dev/null'.format(cmd))
    if ret_code == 0: return True
    else: return False
Beispiel #9
0
from os import system as st
from time import sleep as sp
st('clear') # or st("cls")
opcao = 0
def principal():
    def menu ():
        print('''\033[31m[1]\033[m Somar\033[31m:\033[m
\033[31m[2]\033[m Subtrair\033[31m:\033[m
\033[31m[3]\033[m Produto\033[31m:\033[m
\033[31m[4]\033[m Divisão\033[31m:\033[m
\033[32m[5]\033[m Sair\033[32m:\033[m ''')        
    def calculadora (n1, n2):
        menu()
        while True:
            global opcao
            opcao = int(input('Digite a sua opção: '))
            st('clear') # or st("cls")
            if opcao == 1:
                return n1 + n2
            elif opcao == 2:
                return n1 - n2
            elif opcao == 3:
                return n1 * n2
            elif opcao == 4:
                while True:
                    try:
                        if n2 != 0:
                            break
                    except:
                        return '\033[31mERRO!!!\033[m Digite um número diferente de zero'
                return float(n1 / n2)