-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23f0597
commit c7dae1f
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import os | ||
import openai | ||
def getFileContents(filename, output): | ||
with open(filename, 'r') as f: | ||
output = f.read() | ||
return output | ||
log = open("Output.txt", "r") | ||
lines = "" | ||
liney = "" | ||
my_secret = getFileContents("key.txt", liney) | ||
openai.api_key = (my_secret) | ||
response_output = ("") | ||
response = openai.Completion.create( | ||
model="text-davinci-002", | ||
prompt=input("Please Enter Your Chemistry Doubt: "), | ||
temperature=1, | ||
max_tokens=4000, | ||
top_p=1, | ||
frequency_penalty=0.43, | ||
presence_penalty=0.66 | ||
) | ||
(response_output) = str(response) | ||
text = response['choices'][0]['text'] | ||
with open("Output.txt", "r") as file1: | ||
line = file1.readlines() | ||
file1.close | ||
with open("Output.txt", 'w') as file: | ||
file.write(str(text)) | ||
for number, line in enumerate(lines): | ||
if number not in [4, 7]: | ||
file.write(line) | ||
file.close() | ||
with open('Output.txt', 'r') as f: | ||
print(f.read()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
|
||
Atoms are the basic units of matter and the defining structure of elements. The term "atom" comes from the Greek word for indivisible, because it was once thought that atoms were the smallest things in the universe and could not be divided. The structure of an atom is a central nucleus composed of protons and neutrons with electrons orbiting around this nucleus. | ||
|
||
The number of protons in an element's nucleus determines which element it is. For example, all atoms with six protons in their nucleus are carbon atoms. The number of electrons in an atom determines how chemically reactive it is. Atoms with more electrons are more likely to form chemical bonds with other atoms. | ||
|
||
The types of elements found on Earth are determined by the number of protons in their nuclei. There are currently 118 different known elements, from hydrogen (with one proton in its nucleus) to oganesson (with 118 protons in its nucleus). All of the elements can be found on the periodic table, which is arranged by increasing atomic number. | ||
|
||
Atoms are incredibly small; a hydrogen atom, for example, has a diameter of just 0.1 nanometers (or 10-10 meters). When we observe anything at such a small scale, quantum mechanics rules come into play. This means that an atom doesn't necessarily have a definite location; rather, it exists as a probability wave spread out over space. | ||
|
||
It's impossible to see individual atoms with our eyes or even with microscopes. However, we can use powerful tools like electron microscopes to take images of atoms and even manipulate them individually. In recent years, scientists have been able to put together proteins and DNA molecules one atom at a time using these techniques. | ||
|
||
Atoms are the basic units of matter that make up everything in the universe, from planets to people. By understanding the structure and behavior of atoms, we can better understand the world around us at both its smallest and largest scales. |