Coding Stuff


Simple, stand-alone chat bot program (I like to call it stupidchat v.1.0.0)

Simple Celsius to Fahrenheit conversion program with comments:



....


Remove your NoPlay List By Pressing "Run," then Entering Username, Password Below:
(Note that EOF error is raised when finished)


The code for above program:

#!/bin/sh
#!/usr/bin/python

# erase noplay list and log out -- takes ~ 1 min
import sys
import telnetlib
import time
import re
newline="/r/n"
bot = telnetlib.Telnet("167.114.65.195", 5000)
user = input('Please enter your username: ')
bot.write((user + "\n").encode('ascii'))
password = input('Please enter your password (case sensitive): ')
bot.write((password + "\n").encode('ascii'))
time.sleep(20)
count = 1
while bot:
    response = bot.read_very_eager()
    namelist = re.compile(rb'names --\n\r(?P<names>.+)\n\rfics%', re.DOTALL | re.MULTILINE)
    namelist_result = namelist.search(response)
    if count == 1:
        stuff = bot.write(("=noplay\n").encode('ascii'))
        count = count + 1
    if namelist_result:
        thenames = namelist_result.group('names')
        thenames2 = thenames.replace(b'\n\r', b' ')
        thelist = re.findall(rb'[A-Za-z]+', thenames2)
        removalnoplay = list(map(lambda x:"-noplay " + str(x) + "\n",thelist))
        bot.write((''.join(removalnoplay).replace(" b'", ' ').replace("'", '')).encode('ascii'))
        time.sleep(20)
        bot.write(('logout\n').encode('ascii'))

Tic-Tac-Toe in MATLAB

% Tic-Tac-Toe in 33 Lines of Code
clear; clc; close all
tttm = ['-','-','-';'-','-','-';'-','-','-'];
available = [1,4,7;2,5,8;3,6,9];
fprintf('Welcome to tic-tac-toe! Each number corresponds to a move on the board.\nPlease type the number of your choice and press "enter" to move.\n147\n258\n369\n')
while sum(available(1:9)) < 900
    invalid = 0;
    move = input('Your Move: ');
    if available(move) < 100
    available(move) = 100;
    tttm(move) = 'X'; clc; disp(tttm)
    else
    disp('please enter a valid move')
    invalid = 1;
    end
    if any(sum(available) == 300) | any(sum(available') == 300) | sum(available([1,5,9])) == 300 | sum(available([3,5,7])) == 300
        disp('X wins!')
        available(1) = 2200;
    end
    if sum(available(1:9)) < 900 & invalid == 0
    compchoice = available(find(available(:)<100))
    compmove = compchoice(ceil(rand(1)*length(compchoice)));
    tttm(compmove) = 'O';
    available(compmove) = 101; clc
    disp(tttm)
    end
    if any(sum(available) == 303) | any(sum(available') == 303) | sum(available([1,5,9])) == 303 | sum(available([3,5,7])) == 303
        disp('O wins!')
        available(1) = 2200;
    elseif sum(available(:)) == 904
        disp('DRAW!')
    end
end

Slek's Math Tree Parser/Evaluator

Donated ever so kindly by Slek of FICS:


Code for knubbel:
import sys

import telnetlib
newline="/r/n"
bot = telnetlib.Telnet("167.114.65.195", 5000, timeout=30)
user = "knubbel"
bot.write((user + "\n").encode('ascii'))

#Enter your password
password = "passwordhere"
bot.write((password + "\n").encode('ascii'))

#I know I'm awesome, but paste your handles where my names appear.
awesomepeople = "JoseCapablanca JoseCapablanca JoseCapablanca"
thelist = awesomepeople.split(" ")
#Enter your message where testing 123 is, making sure to keep the space at the start, and the \n at the end.
allmessages = list(map(lambda x:"message " + x + " testing 123\n",thelist))
bot.write((''.join(allmessages)).encode('ascii'))

Stirling's Approximation Code

#Find Sterling's Approximation of LN(N!) and compare with the actual value for N < 171
while True:
    try:
        import math #import math to use ln(), factorial, and pi functions
        from decimal import * #import decimal to handle large numbers and automatically carry to more digits.
        number = float(eval(input("input N: ")))
        output = Decimal(float(number*math.log(number)-number+.5*math.log(2*math.pi*number)))
        print("Stirling's: " + str(output))
        if number < 171:
            output2 = Decimal(math.log(math.factorial(number)))    
            print("Actual: " + str(output2))
            if output2 > 0:
                perror = (float(output) - float(output2))*float(100)/float(output2)
                print("Percent Error: " + str(perror) + "%")
    except:
        print("Sorry, your value is too large, or I couldn't understand your input.")

Mindless Computer's Code (runs on FICS):
#!/bin/sh
#!/usr/bin/python

import sys

import telnetlib
newline="/r/n"
bot = telnetlib.Telnet("167.114.65.195", 5000)
user = "MindlessComputer"
bot.write((user + "\n").encode('ascii'))
password = "mypasswordgoeshere"
bot.write((password + "\n").encode('ascii'))

script = "finger"
bot.write((script + "\n").encode('ascii'))
script = "t josecapablanca hello"
bot.write((script + "\n").encode('ascii'))
script = "seek 3 0"
bot.write((script + "\n").encode('ascii'))

while bot:
  response = bot.read_very_eager()
  import re
  # the parenthesis create a group with what was matched
  # and '\w' matches only alphanumeric charactes
  p = re.compile(rb"^\n\r(\w+)[^ ]* tells you: (.+)")
  q = re.compile(rb"Your seek matches one posted by (\w+)\.")
  # use search(), so the match doesn't have to happen
  # at the beginning of "big string"
  m = p.search(response)
  n = q.search(response)
  # search() returns a Match object with information about what was matched
  if m:
      name = m.group(1).decode('ascii')
  if n:
      name = n.group(1).decode('ascii')
  if b"JoseCapablanca tells you: seek" in response:
    bot.write(("seek 3 0" + "\n").encode('ascii'))
  if b"JoseCapablanca tells you: fast" in response:
    bot.write(("seek 1 0" + "\n").encode('ascii'))
  if b"abort" in response:
    bot.write(("abort" + "\n").encode('ascii'))
  if b"leave" in response:
    bot.write(("logout" + "\n").encode('ascii'))
  if b"JoseCapablanca tells you: challenge fjjvh" in response:
    bot.write(("challenge fjjvh 3 0 rated" + "\n").encode('ascii'))
  if b"shouts: spams mindless" in response:
    import random
    pos = ["shout sings *if I only had a brain*",
           "shout who needs a brain anyway, we all know that brawn and beauty are the winners",
           "shout no pain, no gain!",
           "shout I would like to credit my creator for my handsome mindlessness",
           "shout *babbles*",
           "shout JoseCapablanca is using my brain, that's how he's still alive, and why I'm bad at chess.",
           "shout yep, death and taxes",
           "shout Can you believe it! Another chess game just went by while you were spamming me, and you weren't playing :(",
           "shout all is fair in love and chess.",
           "shout just so you know, it's true. I really have no mind.",
           "shout I think I can, I think I can!",
           "shout you're a lovely person",
           "shout just remember, I always leave my mind in a glass jar before I go to sleep.",
           "shout You're my 10th customer, and, you know, the human coding me has run out of things for me to say.",
           "shout chess is a game -- you will live to see another one."
           ]
    e = random.choice(pos)
    bot.write((e + "\n").encode('ascii'))
  if b"accepts your seek" in response:
      bot.write(("kib I am a mindless computer -- hope you enjoy the game!" + "\n").encode('ascii'))
      bot.write(("finger" + "\n").encode('ascii'))
      from threading import Thread
      def mindlessplay():
          while True:
            import time
            time.sleep(.1)
            bot.write(("Nc3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nc6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nb1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nb8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("a3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("a6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ra7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ra2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ra8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ra1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nf3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nf6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ng1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ng8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bd2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bd7" + "\n").encode('ascii'))
            time.sleep(.1)      
            bot.write(("e8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("e1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("f8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("f1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qd2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qd7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("gf" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("ef" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("ed" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("QxN" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kxp" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("g6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("g3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf7" + "\n").encode('ascii'))
            bot.write(("Kf2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qe7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qe2" + "\n").encode('ascii'))
            bot.write(("KxQ" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bc4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bc5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nc4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nc5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("h8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("h1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Be2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Be7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb2" + "\n").encode('ascii'))
            bot.write(("Kb7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ka5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qd8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qd1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Rg8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Rg1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Rh8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Rh1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("e6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("e3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("b4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("b5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("g4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("g5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("a4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("a5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("b3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("b6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("f4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("f5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bf1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bf8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kh7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("c3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("c6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("c4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("c5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("g8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("g1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kd5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ke5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kc5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bb2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bb7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ba6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ba3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("h3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("h6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("h4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("h5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("d3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("d6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("d4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("d5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("e4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("e5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Rd2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Rd7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ne8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ne1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nd8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nd1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ne2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ne7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nd2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nd7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bg7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bg2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bh6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bh3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kf5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kg6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb3" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Kb6" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qf8" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Qf1" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Be5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Be4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bb5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bb4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bg5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Bg4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nge2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nge7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nbd2" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nbd7" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("RxQ" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("NxQ" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("QxQ" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("RxR" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("bc" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("ab" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("BxQ" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("NxR" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ne5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Ne4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nd5" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("Nd4" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("BxN" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("NxB" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("a8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("a1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("b8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("b1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("c8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("c1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("d8=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("d1=N" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("NxN" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("cb" + "\n").encode('ascii'))
            time.sleep(.1)
            bot.write(("fg" + "\n").encode('ascii'))
            time.sleep(.1)

      t2 = Thread(target = mindlessplay)
      t2.start()

Comments