Committed version 3 of the bot from the source code on my computer. Older versions of the bot were version controlled manually before I knew how to use Git.

This commit is contained in:
2021-07-06 14:09:06 +01:00
parent eae07b923d
commit 2f10edc3f9
37 changed files with 39162 additions and 2 deletions

157
development/10_syllable.txt Normal file
View File

@ -0,0 +1,157 @@
large indefinite quantity
imaginative comparison
coordinated universal time
application-oriented language
histocompatibility complex
nongovernmental organization
command processing overhead time
X-linked dominant inheritance
negative identification
positive identification
National Association of Realtors
Democratic-Republican Party
magnetomotive force unit
Argentine monetary unit
Bangladeshi monetary unit
Belarusian monetary unit
Bhutanese monetary unit
Cape Verde monetary unit
Costa Rican monetary unit
Dominican monetary unit
Ecuadoran monetary unit
Guatemalan monetary unit
Guinea-Bissau monetary unit
Icelandic monetary unit
Indonesian monetary unit
Japanese monetary unit
Kazakhstani monetary unit
Kyrgyzstani monetary unit
Lebanese monetary unit
Mauritanian monetary unit
Mozambique monetary unit
Nepalese monetary unit
Nicaraguan monetary unit
Pakistani monetary unit
Panamanian monetary unit
Philippine monetary unit
Portuguese monetary unit
Sierra Leone monetary unit
South African monetary unit
Sudanese monetary unit
Venezuelan monetary unit
Vietnamese monetary unit
Western Samoan monetary unit
Yugoslavian monetary unit
Revolutionary calendar month
reduced instruction set computing
hypothetical imperative
International Wanted Notice
suborder Pachycephalosaurus
Streptococcus anhemolyticus
International Court of Justice
combination in restraint of trade
Commonwealth of Independent States
National Academy of Sciences
reticular activating system
negative reinforcing stimulus
positive reinforcing stimulus
Dewey decimal classification
extracurricular activity
comprehensive examination
preliminary examination
biological warfare defense
trustee-beneficiary relation
amyotrophic lateral sclerosis
categorical imperative
machine readable dictionary
Master of Arts in Library Science
Master of Science in Engineering
declaration of estimated tax
database management system
Church of Jesus Christ of Latter-Day Saints
Evangelical and Reformed Church
Bureau of Justice Assistance
Federal Housing Administration
Financial Management Service
National Climatic Data Center
Naval Surface Warfare Center
Department of Justice Canada
Committee for State Security
International Monetary Fund
individual retirement account
rank-order correlation coefficient
maple syrup urine disease
standing operating procedure
health maintenance organization
hospitalization insurance
hyperbetalipoproteinemia
hypobetalipoproteinemia
Council of Economic Advisors
Central Intelligence Agency
Federal Protective Service
Interstate Commerce Commission
Nuclear Regulatory Commission
Office of Inspector General
United States Postal Service
Criminal Investigation Command
Drug Enforcement Administration
United States Marshals Service
Commission on the Status of Women
Foreign Intelligence Service
Secret Intelligence Service
National Security Agency
United States Secret Service
principle of liquid displacement
comparative literature
biserial correlation coefficient
multiple correlation coefficient
President of the United States
Secretary of Agriculture
Secretary of Veterans Affairs
magnetic resonance imaging
positron emission tomography
angiotensin converting enzyme
thyrotropin-releasing hormone
elephantiasis neuromatosa
major depressive episode
lower respiratory infection
upper respiratory infection
double standard of sexual behavior
secondary sex characteristic
communications intelligence
cardiopulmonary exercise
follicle-stimulating hormone
human chorionic gonadotropin
gamma aminobutyric acid
discoid lupus erythematosus
autosomal dominant disease
necrotizing enterocolitis
pelvic inflammatory disease
respiratory distress syndrome
Argentine hemorrhagic fever
Crimea-Congo hemorrhagic fever
arteriosclerosis obliterans
modified radical mastectomy
hormone replacement therapy
indirect immunofluorescence
somatic cell nuclear transplantation
breach of the covenant of warranty
adenosine monophosphate
beta-hydroxybutyric acid
nonthrombocytopenic purpura
posterior subcapsular cataract
paroxysmal trepidant abasia
Department of Commerce and Labor
correctional rehabilitation
vocational rehabilitation
electroconvulsive therapy
monounsaturated fatty acid
polyunsaturated fatty acid
abdominal actinomycosis
diethylaminoethyl cellulose
very low density lipoprotein
plasma thromboplastin antecedent
lymphocytic choriomeningitis
erythema nodosum leprosum
acute lymphocytic leukemia
acute myelocytic leukemia

View File

@ -0,0 +1,87 @@
United States Customary System
X-linked recessive inheritance
conditioned emotional response
object-oriented programming language
Association of Southeast Asian Nations
American Federation of Labor
Congress of Industrial Organizations
Azerbaijani monetary unit
El Salvadoran monetary unit
Saudi Arabian monetary unit
Surinamese monetary unit
Tajikistani monetary unit
Uzbekistani monetary unit
Systeme International d'Unites
certificate of incorporation
occupational safety and health act
Council of Basel-Ferrara-Florence
North Atlantic Treaty Organization
neonatal intensive care unit
Palestine National Authority
equivalent-binary-digit factor
United Arab Emirate dirham
hierarchical classification system
electronic counter-countermeasures
business interruption insurance
primary subtractive color for light
personal identification number
Bachelor of Arts in Library Science
Bachelor of Science in Engineering
Bureau of Diplomatic Security
Bureau of Intelligence and Research
Naval Underwater Warfare Center
Office of Intelligence Support
Office of Naval Intelligence
United States Public Health Service
familial hypercholesterolemia
Waterhouse-Friderichsen syndrome
cardiopulmonary resuscitation
oxidation-reduction indicator
dichlorodiphenyltrichloroethane
generalized anxiety disorder
obsessive-compulsive disorder
acute schizophrenic episode
cystic fibrosis transport regulator
Evangelical United Brethren Church
Council on Environmental Policy
Office of Management and Budget
Environmental Protection Agency
Federal Communications Commission
General Services Administration
Securities and Exchange Commission
Social Security Administration
Federal Bureau of Investigation
Financial Crimes Enforcement Network
National Institute of Justice
Economic Commission for Africa
Economic Commission for Europe
Central Intelligence Machinery
Iraqi Intelligence Service
Defense Intelligence Agency
National Reconnaissance Office
product-moment correlation coefficient
tetrachoric correlation coefficient
Secretary of Commerce and Labor
North American Free Trade Agreement
adrenocorticotropic hormone
sodium carboxymethyl cellulose
premature ventricular contraction
Eysenck Personality Inventory
United States Naval Academy
bovine spongiform encephalitis
autosomal recessive disease
congenital afibrinogenemia
freedom from cruel and unusual punishment
right to speedy and public trial by jury
radioactive iodine excretion test
radioactive iodine uptake test
laparoscopic cholecystectomy
deoxyadenosine monophosphate
deoxycytidine monophosphate
deoxyguanosine monophosphate
deoxythymidine monophosphate
systemic lupus erythematosus
Department of Health and Human Services
Department of Homeland Security
cervicofacial actinomycosis
nephrogenic diabetes insipidus

View File

@ -0,0 +1,47 @@
erythrocyte sedimentation rate
National Socialist German Workers' Party
Calymmatobacterium granulomatis
Foreign Intelligence Surveillance Court
Organization of American States
depository financial institution
United Mine Workers of America
electronic warfare-support measures
Bachelor of Science in Architecture
Center for Disease Control and Prevention
Defense Information Systems Agency
Defense Technical Information Center
Department of Energy Intelligence
Economic and Social Council commission
Food and Agriculture Organization
General Agreement on Tariffs and Trade
International Finance Corporation
International Labor Organization
World Meteorological Organization
standard generalized markup language
antisocial personality disorder
hereditary cerebellar ataxia
self-report personality inventory
Foreign Intelligence Surveillance Act
face-amount certificate company
Bureau of Alcohol Tobacco and Firearms
Federal Law Enforcement Training Center
acute hemorrhagic encephalitis
Secretary of Health and Human Services
imitative electronic deception
simulative electronic deception
melanocyte-stimulating hormone
disease of the neuromuscular junction
hyperbilirubinemia of the newborn
United States Air Force Academy
vocational rehabilitation program
marital communications privilege
subacute bacterial endocarditis
digital communications technology
ovulation method of family planning
transurethral resection of the prostate
recombinant deoxyribonucleic acid
hepatolenticular degeneration
adult respiratory distress syndrome
freedom from involuntary servitude
port-access coronary bypass surgery
oculopharyngeal muscular dystrophy

View File

@ -0,0 +1,39 @@
obsessive-compulsive personality
generally accepted accounting principles
Palestine Liberation Organization
Sao Thome e Principe monetary unit
musical instrument digital interface
Supreme Headquarters Allied Powers Europe
Academy of Television Arts and Sciences
nondepository financial institution
international law enforcement agency
confidential adviser-advisee relation
Defense Advanced Research Projects Agency
Marine Corps Intelligence Activity
National Technical Information Service
Naval Air Warfare Center Weapons Division
Patent and Trademark Office Database
Transportation Security Administration
United States Fish and Wildlife Service
United States Government Printing Office
international intelligence agency
United States intelligence agency
International Development Association
severe combined immunodeficiency
Federal Home Loan Mortgage Corporation
Federal National Mortgage Association
United States Trade Representative
United States Postal Inspection Service
Communications Security Establishment
manipulative electronic deception
African American Vernacular English
California Personality Inventory
Sixteen Personality Factor Questionnaire
United States Military Academy
subacute sclerosing panencephalitis
functional magnetic resonance imaging
glutamic oxalacetic transaminase
age-related macular degeneration
chronic obstructive pulmonary disease
Department of Health Education and Welfare
Department of Housing and Urban Development

View File

@ -0,0 +1,22 @@
transmission control protocol/internet protocol
Organization of Petroleum-Exporting Countries
Academy of Motion Picture Arts and Sciences
United States House of Representatives
Advanced Research and Development Activity
Ballistic Missile Defense Organization
Department of Defense Laboratory System
Immigration and Naturalization Service
National Geospatial-Intelligence Agency
International Atomic Energy Agency
International Maritime Organization
relational database management system
Federal Deposit Insurance Corporation
Federal Emergency Management Agency
National Archives and Records Administration
Economic Commission for Asia and the Far East
Economic Commission for Latin America
Security Intelligence Review Committee
Secretary of Health Education and Welfare
Secretary of Housing and Urban Development
laser-assisted in situ keratomileusis
severe acute respiratory syndrome

View File

@ -0,0 +1,10 @@
United Arab Emirate monetary unit
Defense Reutilization and Marketing Service
National Institute of Standards and Technology
Occupational Safety and Health Administration
International Civil Aviation Organization
object-oriented database management system
National Aeronautics and Space Administration
Canadian Security Intelligence Service
Criminal Intelligence Services of Canada
International Relations and Security Network

View File

@ -0,0 +1,6 @@
Association for the Advancement of Retired Persons
National Oceanic and Atmospheric Administration
International Bank for Reconstruction and Development
Directorate for Inter-Services Intelligence
enzyme-linked-immunosorbent serologic assay
laser-assisted subepithelial keratomileusis

View File

@ -0,0 +1,7 @@
General Certificate of Secondary Education
American Standard Code for Information Interchange
Organization for the Prohibition of Chemical Weapons
United Nations Crime Prevention and Criminal Justice
Minnesota Multiphasic Personality Inventory
basal body temperature method of family planning
minimally invasive coronary bypass surgery

View File

@ -0,0 +1,2 @@
Air Force Intelligence Surveillance and Reconnaissance
United Nations Office for Drug Control and Crime Prevention

View File

@ -0,0 +1 @@
United Nations Educational Scientific and Cultural Organization

View File

@ -0,0 +1 @@
American Federation of Labor and Congress of Industrial Organizations

View File

@ -0,0 +1 @@
blood-oxygenation level dependent functional magnetic resonance imaging

View File

@ -0,0 +1,33 @@
from nltk.corpus import wordnet as wn
from syllables import estimate
# syns = wn.synsets("program")
# print(syns[0].name())
# grief = wn.synsets('grief')
# love = wn.synsets('love')
# # print(grief.path_similarity(love))
# # print(grief)
# print(grief[0].definition())
# print(love[0].definition())
abstractNouns = list([i for i in wn.synset('abstraction.n.06').closure(lambda s:s.hyponyms())])
print(len(abstractNouns))
d = {}
for n in abstractNouns:
if str(estimate(n.name())) in d.keys():
d[str(estimate(n.name()))].append(n.lemmas()[0].name())
else:
d[str(estimate(n.name()))] = [n.lemmas()[0].name()]
# print(n.lemmas()[0].name(),estimate(n.name()))
for i in d:
with open(f'{i}_syllable.txt', 'a') as f:
for ind, l in enumerate(d[i]):
if ind < len(d[i]) - 1:
f.write(f'{l}\n'.replace('_', ' '))
else:
f.write(f'{l}'.replace('_', ' '))

59
development/script.py Normal file
View File

@ -0,0 +1,59 @@
#!/usr/local/bin/python3.8
import tweepy
import time
import os
import random
import sys
from datetime import datetime, timedelta
import math
from nltk.corpus import wordnet as wn
print(datetime.now().strftime("%H:%M:%S"))
callback_uri = 'oob' # https://cfe.sh/twitter/callback
auth = tweepy.OAuthHandler(os.getenv('API_TOKEN'), os.getenv('API_KEY_SECRET'), callback_uri)
auth.set_access_token(os.getenv('ACCESS_TOKEN'), os.getenv('ACCESS_TOKEN_SECRET'))
api = tweepy.API(auth)
def generate_words():
syllables = random.randint(1,sum(1 for file in os.listdir('/usr/src/app/lists')))
w1 = get_word(syllables)
w2 = get_word(syllables)
while w1 == w2:
w2 = get_word(syllables)
return [w1,w2]
def get_word(syl):
fileName = f'{syl}_syllable.txt'
with open(f'/usr/src/app/lists/{fileName}', 'r') as wordList:
l = sum(1 for line in wordList) - 1
c = random.randint(0,l)
wordList.seek(0)
for i, line in enumerate(wordList):
if i == c:
if c == l:
return line
else:
return line[:-1]
elif i > c:
break
def posting():
words = generate_words()
output = f'What is {words[0]}, if not {words[1]} persevering?'
print(output)
# api.update_status(output)
with open('/usr/src/app/post_log.txt', 'a') as logFile:
logFile.write(f'{datetime.now().strftime("%Y-%m-%d-%X")}: {output}\n')
now = datetime.now()
nextHour = (now + timedelta(hours=1)).replace(minute=0,second=0,microsecond=0)
tdelta = nextHour - datetime.now()
sec = math.floor(tdelta.total_seconds())
print(f'Waiting until {nextHour} for first post, sleeping for {sec} seconds.')
time.sleep(sec)
while True:
posting()
time.sleep(3600)

37
development/testScript.py Normal file
View File

@ -0,0 +1,37 @@
from nltk.corpus import wordnet as wn
# syns = wn.synsets("program")
# print(syns[0].name())
# grief = wn.synsets('grief')
# love = wn.synsets('love')
# # print(grief.path_similarity(love))
# # print(grief)
# print(grief[0].definition())
# print(love[0].definition())
w1 = wn.synset('grief.n.01')
w2 = wn.synset('love.n.01')
# print(w1.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(w2.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(w1.hypernyms()[0],w2.hypernyms()[0])
# print(w1.hypernyms()[0].hypernyms()[0],w2.hypernyms()[0].hypernyms()[0])
# print(w1.hypernyms()[0].hypernyms()[0].hypernyms()[0],w2.hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(w1.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0],w2.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(w1.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0],w2.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(w1.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0],w2.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(w1.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0],w2.hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0].hypernyms()[0])
# print(wn.synsets('abstraction.n.06')[0])
abstractNouns = set([i for i in wn.synset('abstraction.n.06').closure(lambda s:s.hyponyms())])
print(len(abstractNouns))
abst = wn.synset('abstraction.n.06').hyponyms()
print(len(abst))
for n in abst:
print(n)