Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!



   7494

How to calculate CPM in python

by ThisforThresh - 27 August, 2019 - 03:48 PM
This post is by a banned member (ThisforThresh) - Unhide
77
Posts
2
Threads
6 Years of service
#1
I've made a checker in python and I can't figure out how I can calculate the CPM please help me
This post is by a banned member (Pruned110902) - Unhide
5.467
Posts
44
Threads
6 Years of service
#2
count them ;p
[Object: Error]
This post is by a banned member (Kdhdh) - Unhide
This post is by a banned member (BoicYT) - Unhide
BoicYT  
Registered
39
Posts
4
Threads
6 Years of service
#4
(This post was last modified: 27 May, 2020 - 02:28 AM by BoicYT.)
its easy once u understand it.

make a new variable called cpm
then make a new def give it any name u want
in that def get the cpm by doing global cpm
then make a while loop 
in that loop make a new variable which stores the "oldChecked", basically invalid + valid
then do a time.sleep for 1 second then make a new variable "newChecked" 
then finally set the cpm variable to be (newchecked - oldchecked) * 60

then simply thread it.

 
Code:
 
cpm = 0

def cpmrunner():
            global cpm
            while True:
                oldchecked = valid + invalid
                time.sleep(1)
                newchecked = invalid + valid
                cpm = (newchecked - oldchecked) * 60

threading.Thread(target=cpmrunner).start()cpmrunner).start()
This post is by a banned member (ThisforThresh) - Unhide
77
Posts
2
Threads
6 Years of service
#5
(27 May, 2020 - 02:22 AM)BoicYT Wrote: Show More
its easy once u understand it.

make a new variable called cpm
then make a new def give it any name u want
in that def get the cpm by doing global cpm
then make a while loop 
in that loop make a new variable which stores the "oldChecked", basically invalid + valid
then do a time.sleep for 1 second then make a new variable "newChecked" 
then finally set the cpm variable to be (newchecked - oldchecked) * 60

then simply thread it.

 
Code:
 
cpm = 0

def cpmrunner():
            global cpm
            while True:
                oldchecked = valid + invalid
                time.sleep(1)
                newchecked = invalid + valid
                cpm = (newchecked - oldchecked) * 60

threading.Thread(target=cpmrunner).start()cpmrunner).start()

thanks yeah i figured this out but this is still helpful for other people
This post is by a banned member (Lekkis) - Unhide
Lekkis  
Registered
3
Posts
1
Threads
1 Year of service
#6
<!--td {border: 1px solid #cccccc;}br {mso-data-placement:same-cell;}-->This has always seemed complicated to me, so I won’t touch on it now. I can recommend wenhousecrafts.com Skyrim calculator. You need to spend your time usefully, especially sometimes playing your favorite games, and to make it easier, there are special calculators!

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)