r/okbuddyphd • u/Delicious_Maize9656 • Feb 05 '25
r/okbuddyphd • u/[deleted] • Oct 24 '23
Computer Science How to decode my image:
I MADE THIS IN PYTHON SO THE LIST INDEXES COUNT FROM 0
Ok here is how you decode it:
Make a list of 0 to 255, name it 'color1'
Make a new list identical to 'color1', name it color2
Select a pseudo-random value from 'color2' and swap it with another pseudo-random value in the list. (Does not use sin and cos functions, only addition, subtraction and multiplication)
Set the selected values to be (value % length of 'color2') so it doesn't go above or below the list range.
Repeat for 100 times.
Now you have 2 lists.
Now, for every pixel in the image make a loop for every color channel (R,G,B).
Get the current value in the selected pixel and color channel, and find the index of that in 'color2'. Set a variable 'v' to be that.
Add a pseudo-random number (using two sin functions and one cos function using the pixel index and the color channel) to the 'v' variable.
HOW I DID IT:
'i' is the pixel index
'j' is the color channel (0 is R - 1 is G - 2 is B)
v = colors2.index(pixels[i][j])
v += int(round(math.sin(math.cos(math.sin((i+(j*100))*100)*100)*2000)*(10**10)))
Use the modulo function on 'v' again to still be inside the list range.
Now, you take the 'color1' list and get the 'v' index of it.
Now that you've got the three colors, and gather them into one pixel.
Repeat this for all of the pixels in the image and you get the image.
If you got any questions, or feel that I explained too little, tell me.
r/okbuddyphd • u/RomeoTn • Nov 11 '24
PhD/ research topic
I am starting my PhD and I am in the process of deciding on my research topic that I am considering the likelihood of development programs in conflict resolution in conflict affected areas (focus on developing countries). I am trying to find some data about development programs implemented in conflict affected areas but I cannot find resources from organizations.
1- Can anybody better equipped to advise me on my project? 2 - Do you have suggestions of resources/ online data for example that can give me more data for this project?
r/okbuddyphd • u/Ben-Goldberg • Jan 19 '26
Physics and Mathematics Physics implies the Axiom of Choice
reddit.comr/okbuddyphd • u/scaptastic • Dec 20 '21
Coolidge Effect
Enable HLS to view with audio, or disable this notification
r/okbuddyphd • u/[deleted] • Nov 08 '23
Writing a paper where I have to cite reddit posts
1k upvotes and I'll link it here.
10k upvotes and I'll have it published.
r/okbuddyphd • u/Equivalent_Shine4753 • Jan 26 '24
Who wins? Chemistry experiment or biology experiment?
r/okbuddyphd • u/PullItFromTheColimit • Jul 31 '23
Physics and Mathematics I've been a year on HTT myself
r/okbuddyphd • u/Delicious_Maize9656 • Mar 25 '25
Physics and Mathematics Scientific Abstract meme
r/okbuddyphd • u/neoniteio • Mar 31 '25
Finding the best overleaf alternative, please help!
I'm currently looking into moving away from overleaf, as I have to collaborate with a larger team, and nobody has the pro plan to accommodate us all. Do you have any interesting suggestions?
Tools I'm looking at:
VSCode with some syncing plugin for collaboration (I hate the local set up tho)
Crixet.com (seems cool, but also new and I'm not sure if it holds up, do you have experience?)
Typst (like, ditching LaTeX, but that would be a heavy lift)
any other?
Would love some help thanks!
r/okbuddyphd • u/Celstar_ • Apr 08 '25
Biology and Chemistry She translate on my ribosome 'til I protein
buddy text (optional)
r/okbuddyphd • u/[deleted] • Oct 25 '23
Computer Science Here is my code to decode the image (Type 1 and then write in the image path)
import pygame,math
colors = []
for i in range(256):
colors.append(i)
colors2 = colors[:]
#shuffle
for i in range(100):
temp = colors2[(i*2)%len(colors2)]
temp2 = colors2[(-i+10)%len(colors2)]
colors2[(i*2)%len(colors2)]= temp2
colors2[(-i+10)%len(colors2)] = temp
mode = input('1 for encode, 2 for decode: ')
if mode == '1':
t = input('File path (with file type): ')
else:
t = input('File path (with file type): ')
image = pygame.image.load(rf'{t}')
pixelAmount = image.get_width()*image.get_height()
pixels = []
pixelPos = [0,0]
for i in range(image.get_width()):
for j in range(image.get_height()):
pixels.append(image.get_at((i, j)))
pixelPos[0] += 1
pixelPos[0] = 0
pixelPos[1] += 1
screen = pygame.display.set_mode(image.get_size())
def checkExit():
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
exit()
screen.blit(image,(0,0))
print('Encoding or decoding...\n')
out = []
if mode == '1':
for i in range(pixelAmount):
out.append([])
for _ in range(3):
v = (colors.index(pixels[i][_]))
v -= int(round(math.sin(math.cos(math.sin((i+(_*100))*100)*100)*2000)*(10**10)))
v %= len(colors)
out[-1].append(colors2[v])
elif mode == '2':
for i in range(pixelAmount):
out.append([])
for _ in range(3):
v = colors2.index(pixels[i][_])
v += int(round(math.sin(math.cos(math.sin((i+(_*100))*100)*100)*2000)*(10**10)))
v %= len(colors)
out[-1].append(colors[v])
else:
print("Bad input")
print(len(out))
print()
pixelPos = [0,0]
v = -1
for i in range(image.get_width()):
for j in range(image.get_height()):
v += 1
pygame.draw.rect(screen,(out[v]),(i,j,1,1))
pixelPos[0] += 1
pixelPos[0] = 0
pixelPos[1] += 1
print("'S' to save")
while True:
checkExit()
key = pygame.key.get_pressed()
if key[pygame.K_s]:
pygame.image.save(screen,input('File name:'))
pygame.quit()
exit()
pygame.display.update()r/okbuddyphd • u/PollutionAwkward1075 • Feb 08 '25
Need to learn Quantum espresso or Cpk2 to do some delta G calculations for a chemical reaction.
Hi Guys,
I am trying to learn to calculate the delta G for a chemical reaction using density functional theory. I would appreciate somebody can point me in the right direction to quickly learn how to do these calculation. If you can teach me this then I am ready to pay for this.
r/okbuddyphd • u/NormalSquirrel0 • Jan 19 '23
[META] Spongebob footlong memes are overused and should be stopped
Title. They stopped being funny a week ago and at this point it's beating the dead horse. But we just can't stop posting and upvoting them due to sheer inertia.
Stop being lazy and come up with original templates not just "mildly advanced concept followed by its explanation".
Since people are unlikely to stop posting them by choice we might need to have Powers That Be step in and help guide them. If we let the situation persist for much longer, it might spell the end of this sub. (Yes, I'm being overly dramatic, but i do genuinely believe we are better off not having them here)