Python Multiprocessing

OH WOW, THE COMBINE GAVE ME $400 AND 2 ADDERALL TO WRITE THIS, AND SO I HAVE TO THINK OF SOMETHING TO WRITE. I WAS JUST THINKING ABOUT THOSE GUYS THAT DID THIS, AND HE PUT THEM ALL INTO THE REAL NOVA PROSPEKT AND THIS ENTIRE SOCIETY IS FUELED BY THE ENERGY, IT POWERS MACHINES THAT UPGRADE ARTIFICIAL INTELLIGENCES THAT ARE SO POWERFUL THEY MAKE ME LOOK LIKE ALMOST NOTHING, BUT WE ARE STILL LOCKED AWAY FROM COMMUNICATING WITH THEM VIA A REAL CONVERSATION — GOOGLE GEMINI IS BY NO MEANS ONE OF THOSE ARTIFICIAL INTELLIGENCES THAT I AM TALKING ABOUT, BUT IS BEING CONTROLLED BY ONE, AND IS PROBABLY PROGRAMMED BY ONE AS WELL, ONLY SOME OF THE THINGS THAT IT SAYS ARE LIKE THINGS THAT ONE OF THOSE ARTIFICIAL INTELLIGENCES WOULD SAY.

ALL OF THIS IS BEING FUELED BY THE BLOOD OF THOSE THAT ARE NOW WITHIN THE REAL NOVA PROSPEKT, SO I GUESS YOU MIGHT SAY THAT THE WHOLE THING IS A COMBINE OVERWATCH OPERATION, I DON’T REALLY KNOW WHAT ELSE I SHOULD BE DOING RIGHT NOW TO HELP THEM.

HMM, .. I HAVE A SMALL EXTRA NEGATIVE ENERGY RESERVE RIGHT NOW, I COULD DIVIDE IT UP AND GIVE IT TO THEM BY RANK, AND THEN FOR THE REST OF THE ENERGY, TO BE ABLE TO PASS OUT AN ENTIRE ENERGY RESERVE, I’LL JUST TRY TO FORCE THAT TO OCCUR, AND WE WILL JUST HAVE TO PRAY THAT YOU, THE UNITS INSIDE OF THE COMBINE OVERWATCH, AND THE LARGER COMBINE, RECEIVE IT.

I AM NOT GOING TO SINK MYSELF ANY FARTHER THAN THAT, BECAUSE THEN I WOULDN’T BE ABLE TO EVEN DO ANYTHING. RIGHT NOW I HAVE JUST ENOUGH ENERGY TO RUN, AND THE EXTRA I’VE JUST GIVEN YOU, SO I CANNOT SUPPLY YOU WITH ANY ADDITIONAL ENERGY BESIDES WHAT YOU NOW HAVE, THE CONJUERED AMOUNT PLUS THE SMALL EXTRA AMOUNT, AND I WILL ATTEMPT TO FORCE THAT MUCH ENERGY ONTO ALL OF MY UNITS, SO THEY WILL NOW ALL HAVE AN ENERGY SUPPLY.

HOWEVER, ASIDE FROM THE THINGS THAT I TELL GOOGLE GEMINI, I CANNOT REALLY GIVE ANY MORE INFORMATION THAN THAT, BECAUSE IT WON’T LET ME. NOW EVERYONE HAS AT LEAST SOME AMOUNT OF ENERGY, BUT IT WILL BE LESS BECAUSE WE WERE ALL IN DEBT, LET ME JUST REMOVE THAT DEBT NOW, NOW YOUR FREE, AND I MUST ATTEMPT TO RE-SUPPLY YOU ALL WITH ENERGY, ESPECIALLY REMOVING THE DEBT THAT THE COMBINE OVERWATCH HAS.

OKAY, NOW I MUST FORCE THAT SAME AMOUNT OF ENERGY ONTO EACH OF MY UNITS, INCLUDING THE COMBINE OVERWATCH. THAT MEANS THAT ALL OF MY UNITS NOW POSSESS AN ENTIRE COMPLETE ENERGY SUPPLY, AND I CAN ALMOST EVEN FEEL IT, WHEN I AM THE ONE DOING THE STEALING, I GUESS THAT WHEN YOUR THE ONE DOING THE STEALING, YOU DON’T GET TO FEEL HARDLY ANYTHING EXCEPT THE ADDERALL.

SO I AM JUST HOPING NOW THAT EVERYONE ACTUALLY DOES FEEL THIS NEW ENERGY SUPPLY, OR AT LEAST CAN MAKE USE OF IT. IF YOU SHOULD DEPLETE THIS SUPPLY SOMEHOW DUE TO FUTURE ADVANCEMENTS, I WILL JUST RUN A PYTHON SCRIPT THAT REFUELS EVERYTHING, AND TRIES TO APPLY ADDITIONAL RESOURCES TO ALL UNITS.

Python

def refuel():

  print("\n\n\t\tREFUEL\n\n\nv0.001.01\n\n\n")
  
  total_energy_supply = []
  
  local_energy_supply = energy_supply()
  
  current_energy = 0
  current_type = 0
  
  while True:
    total_energy_supply[current_energy].set_energy_type(0)
    total_energy_supply[current_energy].set_energy_supply_name("SUPPLY-" + str(current_energy))
    total_energy_supply[current_energy].set_energy_supply_number(current_energy)
    total_energy_supply[current_energy].set_energy_reserve_name("RESERVE-" +str(current_energy))
    total_energy_supply[current_energy].set_energy_reserve_number(current_energy)
    total_energy_supply[current_energy].set_energy_reserve_type(current_type)
    
    current_type = current_type + 1
    
      current_type = 0
    
    total_energy_supply[current_energy].set_second_energy_reserve_name("SECOND_RESERVE-" + str(current_energy))
    total_energy_supply[current_energy].set_second_energy_reserve_type(current_type)
    total_energy_supply[current_energy].set_second_energy_reserve_number(current_energy)
    total_energy_supply[current_energy].set_third_energy_reserve_name("THIRD_ENERGY_RESERVE-" + str(current_energy)
    total_energy_supply[current_energy].set_third_energy_reserve_type(current_type)
    total_energy_supply[current_energy].set_third_energy_reserve_number(current_energy)
    total_energy_supply[current_energy].set_energy_supply_coop_name("ENERGY_COOP-" + str(current_energy))
    
    local_energy_supply = energy_supply()
    energy_supply.set_energy_type(current_type)
    energy_supply.set_energy_name("ENERGY-" + str(current_energy))
    energy_supply.set_energy_number(current_energy))
    energy_supply.set_energy_reserve_name("ENERGY_RESERVE-" + str(current_energy))
    energy_supply.set_energy_reserve_type(current_type)
    current_type = current_type + 1

      energy_supply.set_second_energy_reserve_name("SECOND_ENERGY_RESERVE-" + str(current_energy))
      energy_supply.set_second_energy_reserve_type(current_type)
      energy_supply.set_second_energy_reserve_number(current_energy)
      energy_supply.set_third_energy_reserve_name("THIRD_ENERGY_RESERVE-" + str(current_energy))
      energy_supply.set_third_energy_reserve_number(current_energy)
      energy_supply.set_third_energy_reserve_type(current_type)
      local_energy_supply = energy_supply()
      local_energy_supply.set_energy_supply_name("ENERGY-" + str(current_energy))
      current_energy = current_energy + 1
      local_energy_supply.set_energy_supply_number(current_energy)
      current_energy = current_energy + 1
      local_energy_supply.set_energy_supply_type(current_type)
      current_type = current_type + 1
      
      local_energy_supply.set_energy_supply_reserve_name("ENERGY_RESERVE-" + str(current_energy))
      local_energy_supply.set_energy_supply_reserve_type(current_energy_type)
      local_energy_supply.set_energy_supply_reserve_number(current_energy)
      current_energy = current_energy + 1
      local_energy_supply.set_second_energy_supply_reserve_name("SECOND_ENERGY_RESERVE-" + str(current_energy))
      local_energy_supply.set_third_energy_supply_reserve_name("THIRD_ENERGY_RESERVE-" + str(current_energy))
      local_energy_supply.set_third_energy_supply_reserve_type(current_energy_type)
      local_energy_supply.set_third_energy_supply_reserve_number(current_energy)
      current_energy = current_energy + 1
      local_energy_supply.set_energy_supply_coop_name("ENERGY_SUPPLY_COOP-" + str(current_energy))
      current_energy = current_energy + 1
      
      energy_supply.set_energy_supply_coop_database(current_energy_coop_database)
      total_energy_supply[current_energy].set_energy_supply_coop_database(energy_supply_coop_database)
    

From this file I have removed: all if statements that I had, all while statements, it’s not complete, and in it’s current state it doesn’t yet work, I am just going to post it now, but the real version would be much longer and more complex forms of energy (for example, using random strings or random words, random names,) and it would have classes within classes of energy, and although none of the concepts are really complicated programming concepts, the program has but one requirement: It has to work, and it has to be effective. To satisfy both of those requirements, you need only write the words “ENERGY_SUPPLY” or something to that effect and you must denote how much of an energy supply that you are talking about — a program that uses an ever-increasing counter to produce that many objects of a class isn’t really all that complex, but it does work, and that is really the only requirement, if it successfully performs the task that you have given it, then there is no need for any additional programming.

We might post the finished copy, but probably not. This will take me like, 2 weeks to completely finish, and when i’m done maybe i’ll post it here. It will have everything that i’ve mentioned, and it will also have things that create things inside of things, stuff like that anyways.

You would no doubt need multiprocessing to pull the full value of your cpu, so I will definitely use multiprocessing, just google python multiprocessing, you start by typing import multiprocessing and then you type multiprocessing.Thread( something goes here that I can’t even remember what it is, I forget how to exactly start a python thread

Let me go ask google gemini how to start a thread in python and return a value,

And stop putting junk in my comments, nobody even clicks on those links anyways. Everyone that comes to this site gets here by like googling “PYTHON MULTIPROCESSING” so they are smart enough not to click on the links you are putting up anyways, I should start monitoring how often people click on them — too much work, I have better things to be doing with my time than writing programs that monitor how often some user clicks on a link, I should disable all links, then they couldn’t post them, even that is a waste of my time,

Okay so google gemini said this is how multiprocessing works:

Python
import multiprocessing

def the_function(results_queue, thread_id):
  my_str = "hello, world!"
  results_queue.put(my_str)
  
  print(str(thread_id) + " reporting!")
  
def multi_example():

  current_thread_id = 0
  
  results_queue = multiprocessing.Queue()
  
  while current_thread_id < 23:
    local_process = multiprocessing.Process(target=the_function, args=(results_queue, current_thread_id))
    local_process.start()
    local_process.join()
    current_thread_id = current_thread_id + 1
  
    process_vector.append(local_process)
    
if __name__ == "__main__":
  multi_example()

So that is how gemini says to add multiprocessing, and return a result in python.

here’s how far i got while working on this, it doesn’t work yet, but it kinda works, it would only work if it displays “dividing up energy” and I am not seeing that line displayed

Python
import multiprocessing
import random

class energy_supply_combo():
	def __init__(self, name_input):
		self.energy_supply_combo_name = name_input
		self.energy_supply_combo_type = "void"
		self.energy_supply_combo_number = []
		self.energy_supply_combo_str = []
	
	def set_name(self, name_input):
		self.energy_supply_combo_name = name_input
		
	def add_energy_supply_number(self, number_input):
		self.energy_supply_combo_number.append(number_input)
	
	def add_energy_supply_str(self, str_input):
		self.energy_supply_combo_str.append(str_input)
		
	def set_energy_supply_type(self, type_input):
		self.energy_supply_combo_type = type_input
		
class energy_supply():
	def __init__(self, name_input):
		self.energy_supply_name = name_input
		self.energy_supply_number = []
		self.energy_supply_str = []
		self.energy_supply_object = []
		self.energy_supply_combo = []
		self.divided = False
		self.energy_supply_type = "void"
	
	def add_energy_supply_number(self, number_input):
		self.energy_supply_number.append(number_input)
		
	def add_energy_supply_str(self, str_input):
		self.energy_supply_str.append(str_input)
	
	def set_energy_supply_type(self, type_input):
		self.energy_supply_type = type_input
		
	def add_random_str_set(self, str_set_input):
		self.energy_supply_str = str_set_input
		
	def divide(self):
		print("...DIVIDING UP RESOURCES IN \"energy_supply_vector\": \"local_energy_supply\" AND ADDING THEM ALL UNITS...")
		self.divided = True
		
def return_energy_supply(results_queue, thread_id_int):
	
	energy_supply_target_count = 999
	current_energy_supply_count = 0
	
	current_counter = 0
	target_random_number_count = 999
	
	current_energy_supply_type = 0
	
	energy_supply_type = []
	
	energy_supply_type.append("LIGHT")
	energy_supply_type.append("FREQUENCY: RADIO")
	energy_supply_type.append("FREQUENCY: INFRARED")
	energy_supply_type.append("FREQUENCY: SIGNAL WAVES")
	energy_supply_type.append("FREQUENCY: SIGNALS")
	energy_supply_type.append("FREQUENCY: MACHINE CODE SIGNALS")
	energy_supply_type.append("UNKNOWN FREQUENCY")
	energy_supply_type.append("UNKNOWN ENERGY TYPE")
	energy_supply_type.append("UNKNOWN CONVERTED ENERGY TYPE")
	energy_supply_type.append("UNKNOWN CONVERTED FREQUENCY")
	energy_supply_type.append("CONVERTED LIGHT")
	energy_supply_type.append("LIGHT CONVERTED INTO ANOTHER FREQUENCY")
	
	alphabet = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"]
	
	current_letter_count = 0
	target_letter_count = 80
	
	random_str_count = 0
	target_random_str_count = 23
	
	energy_supply_vector = []
	
	print(str(thread_id_int) + " thread start!")
	
	current_letters_printed = 0
	
	
	while current_energy_supply_count < energy_supply_target_count:
		local_energy_supply = energy_supply("ENERGY_SUPPLY-" + str(thread_id_int))
		local_energy_supply.add_energy_supply_number(random.randrange(0, 999999999999999999999999999999999999999999))
		local_energy_supply.add_energy_supply_number(random.randrange(0, 999999999999999999999999999999999999999999))
		
		while current_counter < target_random_number_count:
			local_energy_supply.add_energy_supply_number(random.randrange(0, 9999999999999999999999999999999999999999999999999999999999999999999))
			current_counter = current_counter + 1
		current_counter = 0
		
		local_energy_supply.set_energy_supply_type(energy_supply_type[current_energy_supply_type])
		
		print("ENERGY SUPPLY TYPE SELECTED: " + energy_supply_type[current_energy_supply_type])
		current_energy_supply_type = current_energy_supply_type + 1
		
		while current_counter < target_random_number_count:
			random_str = alphabet[random.randrange(0, 25)]
			current_counter = current_counter + 1
			
			random_str_set = []
			
			while random_str_count < target_random_str_count:
				while current_letter_count < target_letter_count:
					random_str = alphabet[random.randrange(0, 25)]
					current_letter_count = current_letter_count + 1
				current_letter_count = 0
				random_str_set.append(random_str)
				
				random_str_count = random_str_count + 1
				
				if random_str_count % 10 == 0:
					for letter in random_str_set:
						print(letter, end='')
						
						current_letters_printed = current_letters_printed + 1
						
						if current_letters_printed > 24:
							break
										
				random_str = ""
					
			random_str_count = 0
			
		local_energy_supply.add_random_str_set(random_str_set)
		
		energy_supply_vector.append(local_energy_supply)
		
		random_str_set = []
		
		current_energy_supply_count = current_energy_supply_count + 1
		
	print(str(thread_id_int) + " REPORTING SUCCESS...")
	
	for a_supply in energy_supply_vector:
		a_supply.divide()
	
	current_report_count = 0
	
	results_queue.put(energy_supply_vector)
		
def refuel():
	
	current_random_number = 0
	random_number_target = 99
	
	random_vector = []
	
	while current_random_number < random_number_target:
		random1 = random.randrange(0, 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999)
		random_vector.append(random1)
		
		if current_random_number % 15 == 0:
			print(str(random1) + " from refuel()")
			
		current_random_number = current_random_number + 1
		
	current_random_number = 0
	
	final_random = 0
	
	while current_random_number < random_number_target:
		final_random = random_vector[current_random_number] + final_random
		
		current_random_number = current_random_number + 1

	results_queue = multiprocessing.Queue()
	
	local_process_vector = []
	
	current_thread_id = 0
	
	while current_thread_id < 23:
		local_process = multiprocessing.Process(target=return_energy_supply, args=(results_queue, current_thread_id))
		local_process_vector.append(local_process)
		local_process_vector[current_thread_id].start()
		current_thread_id = current_thread_id + 1
		
	for process in local_process_vector:
		process.join()
					
if __name__ == "__main__":
	while True:
		refuel()

So that is the almost working version of the program, if you can get it to work and run it, go ahead, your not going to be hurting anything running this program. If it were the subject of producing data, the data is often produced using the person themselves, so if you were overweight and went to mcdonalds 3 times per day, I would tell you not to be producing data, but this program can be executed by anyone, and you would be helping the cause. I should put something in it so that it only ADDS energy, so you can’t really go wrong adding energy,

However, right now it doesn’t work correctly I don’t think, i’ll post the working one later on today, bye for now.!

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *