Guest User

Untitled

a guest
Feb 16th, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.17 KB | None | 0 0
  1. let mysql = require('mysql');
  2. let fs = require('fs');
  3. // let connection = mysql.createConnection({
  4. // host: '0.0.0.0',
  5. // port: '3306',
  6. // user: 'root',
  7. // password: '123',
  8. // database: 'thesis'
  9. // })
  10.  
  11. // connection.connect((err) => {
  12. // if(err){
  13. // throw err
  14. // } else {
  15. // console.log('database connected')
  16. // }
  17. // })
  18.  
  19.  
  20. let loadData = (dataPoints) => {
  21. let adverbArray = ['blue', 'red','black','large','medium','small', 'sour', 'giant', 'electric', 'Dependable','Elaborate','Elegant','Flowery','Icy','Giant','Grimy','Grotesque','Huge','adorable','adventurous','aggressive','agreeable','alert','alive','amused','angry','annoyed','annoying','anxious','arrogant','ashamed','attractive','average','awful','bad','beautiful','better','bewildered','black','bloody','blue','blue-eyed','blushing','bored','brainy','brave','breakable','bright','busy','calm','careful','cautious','charming','cheerful','clean','clear','clever','cloudy','clumsy','colorful','combative','comfortable','concerned','condemned','confused','cooperative','courageous','crazy','creepy','crowded','cruel','curious','cute','dangerous','dark','dead','defeated','defiant','delightful','depressed','determined','different','difficult','disgusted','distinct','disturbed','dizzy','doubtful','drab','dull','eager','easy','elated','elegant','embarrassed','enchanting','encouraging','energetic','enthusiastic','envious','evil','excited','expensive','exuberant','fair','faithful','famous','fancy','fantastic','fierce','filthy','fine','foolish','fragile','frail','frantic','friendly','frightened','funny','gentle','gifted','glamorous','gleaming','glorious','good','gorgeous','graceful','grieving','grotesque','grumpy','handsome','happy','healthy','helpful','helpless','hilarious','homeless','homely','horrible','hungry','hurt','ill','important','impossible','inexpensive','innocent','inquisitive','itchy','jealous','jittery','jolly','joyous','kind','lazy','light','lively','lonely','long','lovely','lucky','magnificent','misty','modern','motionless','muddy','mushy','mysterious','nasty','naughty','nervous','nice','nutty','obedient','obnoxious','odd','old-fashioned','open','outrageous','outstanding','panicky','perfect','plain','pleasant','poised','poor','powerful','precious','prickly','proud','puzzled','quaint','real','relieved','repulsive','rich','scary','selfish','shiny','shy','silly','sleepy','smiling','smoggy','sore','sparkling','splendid','spotless','stormy','strange','stupid','successful','super','talented','tame','tender','tense','terrible','testy','thankful','thoughtful','thoughtless','tired','tough','troubled','ugliest','ugly','uninterested','unsightly','unusual','upset','uptight','vast','victorious','vivacious','wandering','weary','wicked','wide-eyed','wild','witty','worrisome','worried','wrong','zany','zealous','fabulous','fastidious','ferocious','fervent','fiery','flabby','flaky','flashy','frank','friendly','funny','fussy','dirty','clean','rusty','musty','musky','dangerous','hazardous','bad','good','evil','sharp','colorful','boring','weird','angled','shaved','carved','painted','unusual','unique','horrible','terrifying','scary','calming','peaceful','tranquil','organized','disorganized','messy','harrowing','creepy','fluffy','patterned','checkered','circled','encircled','soft','hard','alive','dead','adequate','important','innocent','dark','light','black','white','blue','green','orange','red','yellow','purple','magenta','vicious','violent','adorable','alert','beautiful','bright','cloudy','rainy','snowy','icy','slippery','glowing','gleaming','glamorous','fashionable','dowdy','tacky','steep','pale','stormy','broad','chubby','crooked','curved','deep','flat','high','hollow','low','narrow','round','shallow','skinny','square','steep','straight','wide','big','colossal','fat','gigantic','great','huge','immense','large','little','mammoth','massive','miniature','petite','puny','scrawny','short','small','tall','teeny','teeny-tiny','tiny','bitter','delicious','fresh','greasy','juicy','hot','icy','loose','melted','nutritious','prickly','rainy','rotten','salty','sticky','strong','sweet','tart','tasteless','uneven','weak','wet','wooden','yummy','abandoned','able','absolute','adorable','adventurous','academic','acceptable','acclaimed','accomplished','accurate','aching','acidic','acrobatic','active','actual','adept','admirable','admired','adolescent','adorable','adored','advanced','afraid','affectionate','aged','aggravating','aggressive','agile','agitated','agonizing','agreeable','ajar','alarmed','alarming','alert','alienated','alive','all','altruistic','amazing','ambitious','ample','amused','amusing','anchored','ancient','angelic','angry','anguished','animated','annual','another','antique','anxious','any','apprehensive','appropriate','apt','arctic','arid','aromatic','artistic','ashamed','assured','astonishing','athletic','attached','attentive','attractive','austere','authentic','authorized','automatic','avaricious','average','aware','awesome','awful','awkward','babyish','bad','back','baggy','bare','barren','basic','beautiful','belated','beloved','beneficial','better','best','bewitched','big','big-hearted','biodegradable','bite-sized','bitter','black','black-and-white','bland','blank','blaring','bleak','blind','blissful','blond','blue','blushing','bogus','boiling','bold','bony','boring','bossy','both','bouncy','bountiful','bowed','brave','breakable','brief','bright','brilliant','brisk','broken','bronze','brown','bruised','bubbly','bulky','bumpy','buoyant','burdensome','burly','bustling','busy','buttery','buzzing','calculating','calm','candid','canine','capital','carefree','careful','careless','caring','cautious','cavernous','celebrated','charming','cheap','cheerful','cheery','chief','chilly','chubby','circular','classic','clean','clear','clear-cut','clever','close','closed','cloudy','clueless','clumsy','cluttered','coarse','cold','colorful','colorless','colossal','comfortable','common','compassionate','competent','complete','complex','complicated','composed','concerned','concrete','confused','conscious','considerate','constant','content','conventional','cooked','cool','cooperative','coordinated','corny','corrupt','costly','courageous','courteous','crafty','crazy','creamy','creative','creepy','criminal','crisp','critical','crooked','crowded','cruel','crushing','cuddly','cultivated','cultured','cumbersome','curly','curvy','cute','cylindrical','damaged','damp','dangerous','dapper','daring','darling','dark','dazzling','dead','deadly','deafening','dear','dearest','decent','decimal','decisive','deep','defenseless','defensive','defiant','deficient','definite','definitive','delayed','delectable','delicious','delightful','delirious','demanding','dense','dental','dependable','dependent','descriptive','deserted','detailed','determined','devoted','different','difficult','digital','diligent','dim','dimpled','dimwitted','direct','disastrous','discrete','disfigured','disgusting','disloyal','dismal','distant','downright','dreary','dirty','disguised','dishonest','dismal','distant','distinct','distorted','dizzy','dopey','doting','double','downright','drab','drafty','dramatic','dreary','droopy','dry','dual','dull','dutiful','eager','earnest','early','easy','easy-going','ecstatic','edible','educated','elaborate','elastic','elated','elderly','electric','elegant','elementary','elliptical','embarrassed','embellished','eminent','emotional','empty','enchanted','enchanting','energetic','enlightened','enormous','enraged','entire','envious','equal','equatorial','essential','esteemed','ethical','euphoric','even','evergreen','everlasting','every','evil','exalted','excellent','exemplary','exhausted','excitable','excited','exciting','exotic','expensive','experienced','expert','extraneous','extroverted','extra-large','extra-small','fabulous','failing','faint','fair','faithful','fake','false','familiar','famous','fancy','fantastic','far','faraway','far-flung','far-off','fast','fat','fatal','fatherly','favorable','favorite','fearful','fearless','feisty','feline','female','feminine','few','fickle','filthy','fine','finished','firm','first','firsthand','fitting','fixed','flaky','flamboyant','flashy','flat','flawed','flawless','flickering','flimsy','flippant','flowery','fluffy','fluid','flustered','focused','fond','foolhardy','foolish','forceful','forked','formal','forsaken','forthright','fortunate','fragrant','frail','frank','frayed','free','French','fresh','frequent','friendly','frightened','frightening','frigid','frilly','frizzy','frivolous','front','frosty','frozen','frugal','fruitful','full','fumbling','functional','funny','fussy','fuzzy','gargantuan','gaseous','general','generous','gentle','genuine','giant','giddy','gigantic','gifted','giving','glamorous','glaring','glass','gleaming','gleeful','glistening','glittering','gloomy','glorious','glossy','glum','golden','good','good-natured','gorgeous','graceful','gracious','grand','grandiose','granular','grateful','grave','gray','great','greedy','green','gregarious','grim','grimy','gripping','grizzled','gross','grotesque','grouchy','grounded','growing','growling','grown','grubby','gruesome','grumpy','guilty','gullible','gummy','hairy','half','handmade','handsome','handy','happy','happy-go-lucky','hard','hard-to-find','harmful','harmless','harmonious','harsh','hasty','hateful','haunting','healthy','heartfelt','hearty','heavenly','heavy','hefty','helpful','helpless','hidden','hideous','high','high-level','hilarious','hoarse','hollow','homely','honest','honorable','honored','hopeful','horrible','hospitable','hot','huge','humble','humiliating','humming','humongous','hungry','hurtful','husky','icky','icy','ideal','idealistic','identical','idle','idiotic','idolized','ignorant','ill','illegal','ill-fated','ill-informed','illiterate','illustrious','imaginary','imaginative','immaculate','immaterial','immediate','immense','impassioned','impeccable','impartial','imperfect','imperturbable','impish','impolite','important','impossible','impractical','impressionable','impressive','improbable','impure','inborn','incomparable','incompatible','incomplete','inconsequential','incredible','indelible','inexperienced','indolent','infamous','infantile','infatuated','inferior','infinite','informal','innocent','insecure','insidious','insignificant','insistent','instructive','insubstantial','intelligent','intent','intentional','interesting','internal','international','intrepid','ironclad','irresponsible','irritating','itchy','jaded','jagged','jam-packed','jaunty','jealous','jittery','joint','jolly','jovial','joyful','joyous','jubilant','judicious','juicy','jumbo','junior','jumpy','juvenile','kaleidoscopic','keen','key','kind','kindhearted','kindly','klutzy','knobby','knotty','knowledgeable','knowing','known','kooky','kosher','lame','lanky','large','last','lasting','late','lavish','lawful','lazy','leading','lean','leafy','left','legal','legitimate','light','lighthearted','likable','likely','limited','limp','limping','linear','lined','liquid','little','live','lively','livid','loathsome','lone','lonely','long','long-term','loose','lopsided','lost','loud','lovable','lovely','loving','low','loyal','lucky','lumbering','luminous','lumpy','lustrous','luxurious','mad','made-up','magnificent','majestic','major','male','mammoth','married','marvelous','masculine','massive','mature','meager','mealy','mean','measly','meaty','medical','mediocre','medium','meek','mellow','melodic','memorable','menacing','merry','messy','metallic','mild','milky','mindless','miniature','minor','minty','miserable','miserly','misguided','misty','mixed','modern','modest','moist','monstrous','monthly','monumental','moral','mortified','motherly','motionless','mountainous','muddy','muffled','multicolored','mundane','murky','mushy','musty','muted','mysterious','naive','narrow','nasty','natural','naughty','nautical','near','neat','necessary','needy','negative','neglected','negligible','neighboring','nervous','new','next','nice','nifty','nimble','nippy','nocturnal','noisy','nonstop','normal','notable','noted','noteworthy','novel','noxious','numb','nutritious','nutty','obedient','obese','oblong','oily','oblong','obvious','occasional','odd','oddball','offbeat','offensive','official','old','old-fashioned','only','open','optimal','optimistic','opulent','orange','orderly','organic','ornate','ornery','ordinary','original','other','our','outlying','outgoing','outlandish','outrageous','outstanding','oval','overcooked','overdue','overjoyed','overlooked','palatable','pale','paltry','parallel','parched','partial','passionate','past','pastel','peaceful','peppery','perfect','perfumed','periodic','perky','personal','pertinent','pesky','pessimistic','petty','phony','physical','piercing','pink','pitiful','plain','plaintive','plastic','playful','pleasant','pleased','pleasing','plump','plush','polished','polite','political','pointed','pointless','poised','poor','popular','portly','posh','positive','possible','potable','powerful','powerless','practical','precious','present','prestigious','pretty','precious','previous','pricey','prickly','primary','prime','pristine','private','prize','probable','productive','profitable','profuse','proper','proud','prudent','punctual','pungent','puny','pure','purple','pushy','putrid','puzzled','puzzling','quaint','qualified','quarrelsome','quarterly','queasy','querulous','questionable','quick','quick-witted','quiet','quintessential','quirky','quixotic','quizzical','radiant','ragged','rapid','rare','rash','raw','recent','reckless','rectangular','ready','real','realistic','reasonable','red','reflecting','regal','regular','reliable','relieved','remarkable','remorseful','remote','repentant','required','respectful','responsible','repulsive','revolving','rewarding','rich','rigid','right','ringed','ripe','roasted','robust','rosy','rotating','rotten','rough','round','rowdy','royal','rubbery','rundown','ruddy','rude','runny','rural','rusty','sad','safe','salty','same','sandy','sane','sarcastic','sardonic','satisfied','scaly','scarce','scared','scary','scented','scholarly','scientific','scornful','scratchy','scrawny','second','secondary','second-hand','secret','self-assured','self-reliant','selfish','sentimental','separate','serene','serious','serpentine','several','severe','shabby','shadowy','shady','shallow','shameful','shameless','sharp','shimmering','shiny','shocked','shocking','shoddy','short','short-term','showy','shrill','shy','sick','silent','silky','silly','silver','similar','simple','simplistic','sinful','single','sizzling','skeletal','skinny','sleepy','slight','slim','slimy','slippery','slow','slushy','small','smart','smoggy','smooth','smug','snappy','snarling','sneaky','sniveling','snoopy','sociable','soft','soggy','solid','somber','some','spherical','sophisticated','sore','sorrowful','soulful','soupy','sour','Spanish','sparkling','sparse','specific','spectacular','speedy','spicy','spiffy','spirited','spiteful','splendid','spotless','spotted','spry','square','squeaky','squiggly','stable','staid','stained','stale','standard','starchy','stark','starry','steep','sticky','stiff','stimulating','stingy','stormy','straight','strange','steel','strict','strident','striking','striped','strong','studious','stunning','stupendous','stupid','sturdy','stylish','subdued','submissive','substantial','subtle','suburban','sudden','sugary','sunny','super','superb','superficial','superior','supportive','sure-footed','surprised','suspicious','svelte','sweaty','sweet','sweltering','swift','sympathetic','tall','talkative','tame','tan','tangible','tart','tasty','tattered','taut','tedious','teeming','tempting','tender','tense','tepid','terrible','terrific','testy','thankful','that','these','thick','thin','third','thirsty','thorough','thorny','those','thoughtful','threadbare','thrifty','thunderous','tidy','tight','timely','tinted','tiny','tired','torn','total','tough','traumatic','treasured','tremendous','tragic','trained','tremendous','triangular','tricky','trifling','trim','trivial','troubled','true','trusting','trustworthy','trusty','truthful','tubby','turbulent','twin','ugly','ultimate','unacceptable','unaware','uncomfortable','uncommon','unconscious','understated','unequaled','uneven','unfinished','unfit','unfolded','unfortunate','unhappy','unhealthy','uniform','unimportant','unique','united','unkempt','unknown','unlawful','unlined','unlucky','unnatural','unpleasant','unrealistic','unripe','unruly','unselfish','unsightly','unsteady','unsung','untidy','untimely','untried','untrue','unused','unusual','unwelcome','unwieldy','unwilling','unwitting','unwritten','upbeat','upright','upset','urban','usable','used','useful','useless','utilized','utter','vacant','vague','vain','valid','valuable','vapid','variable','vast','velvety','venerated','vengeful','verifiable','vibrant','vicious','victorious','vigilant','vigorous','villainous','violet','violent','virtual','virtuous','visible','vital','vivacious','vivid','voluminous','wan','warlike','warm','warmhearted','warped','wary','wasteful','watchful','waterlogged','watery','wavy','wealthy','weak','weary','webbed','wee','weekly','weepy','weighty','weird','welcome','well-documented','well-groomed','well-informed','well-lit','well-made','well-off','well-to-do','well-worn','wet','which','whimsical','whirlwind','whispered','white','whole','whopping','wicked','wide','wide-eyed','wiggly','wild','willing','wilted','winding','windy','winged','wiry','wise','witty','wobbly','woeful','wonderful','wooden','woozy','wordy','worldly','worn','worried','worrisome','worse','worst','worthless','worthwhile','worthy','wrathful','wretched','writhing','wrong','wry']
  22. let categoryArr = ['Electronics', 'Books', 'Kitchen Ware', 'Apparel', 'Tools', 'Household Appliances', 'Furniture', 'Misc', 'Car Parts', 'Self-care', 'Linens']
  23. let objArray = ['spoon ','bottle cap ','thong ','nail clippers ','candle ','ice cube ','slipper ','thread ','glow stick ','needle ','stop sign ','blouse ','hanger ','rubber duck ','shovel ','bookmark ','model car ','tampon ','rubber band ','tire swing ','sharpie ','picture frame ','photo album ','nail filer ','tooth paste ','bath fizzers ','tissue box ','deodorant ','cookie jar ','rusty nail ','drill press ','chalk ','word search ','thermometer ','face wash ','paint brush ','candy wrapper ','shoe lace ','leg warmers ','wireless control ','boom box ','quilt ','stockings ','card ','tooth pick ','shawl ','speakers ','key chain ','cork ','helmet ','mouse pad ','zipper ','glasses ','lamp shade ','sketch pad ','gage ','plastic fork ','flag ','clay pot ','check book ','CD ','#2 pencil ','fake flowers ','sticky note ','hair tie ','credit card ','sun glasses ','seat belt ','buckel ','button ','canvas ','vase ','lip gloss ','rug ','gel ','twezzers ','toe ring ','scotch tape ','bow ','white out ','grid paper ','earser ','puddle ','cement stone ','sponge ','lace ','outlet ','frizz control ','sailboat ','screw ','sand paper ','eye liner ','pool stick ','pop can ','balloon ','spring ','ipod charger ','twister','angle','ant','apple','arch','arm','army','baby','bag','ball','band','basin','basket','bath','bed','bee','bell','berry','bird','blade','board','boat','bone','book','boot','bottle','box','boy','brain','brake','branch','brick','bridge','brush','bucket','bulb','button','cake','camera','card','cart','carriage','cat','chain','cheese','chest','chin','church','circle','clock','cloud','coat','collar','comb','cord','cow','cup','curtain','cushion','dog','door','drain','drawer','dress','drop','ear','egg','engine','eye','face','farm','feather','finger','fish','flag','floor','fly','foot','fork','fowl','frame','garden','girl','glove','goat','gun','hair','hammer','hand','hat','head','heart','hook','horn','horse','hospital','house','island','jewel','kettle','key','knee','knife','knot','leaf','leg','library','line','lip','lock','map','match','monkey','moon','mouth','muscle','nail','neck','needle','nerve','net','nose','nut','office','orange','oven','parcel','pen','pencil','picture','pig','pin','pipe','plane','plate','plow','pocket','pot','potato','prison','pump','rail','rat','receipt','ring','rod','roof','root','sail','school','scissors','screw','seed','sheep','shelf','ship','shirt','shoe','skin','skirt','snake','sock','spade','sponge','spoon','spring','square','stamp','star','station','stem','stick','stocking','stomach','store','street','sun','table','tail','thread','throat','thumb','ticket','toe','tongue','tooth','town','train','tray','tree','trousers','umbrella','wall','watch','wheel','whip','whistle','window','wing','wire','worm','toaster ','spatula ','spoons ','cups ','forks ','mugs ','spoons ','bowls ','plates ','placemats ','mixing bowls ','glasses ','fruit bowl ','clocks ','curtains ','cushions ','pictures ','hi-fi stereo ','DVDs ','CDs ','vases ','books ','jugs ','saucepans ','knives ','hooks ','clothes ','shoes ','soap ','washing powder ','sponges ','cloths ','baking trays ','cake tins ','rugs ','towels ','quilts ','mirrors ','broom brush ','garbage rubbish bins ','paper ','pens ','pencils ','lights ','vaccum ','pegs ','shelves ','toilet roll ','food ','drink ','dusters ','coasters ','plants ','bucket ','TV ','DVD player ','boxes ','clothes hangers ','tins ','jewellery ','toiletries ','sheets ','pillows ','pillow cases ','computer laptop ','kitchen scales ','bathroom scales ','lamps ','doormats ','blinds','dinner knives ','fish knives ','steak knives ','butter knife ','cake knife ','serving forks ','dinner forks ','fish forks ','dessert/salad forks ','serving spoons ','soup spoons ','coffee spoons ','teaspoons ','dessert spoons ','sugar spoon ','sugar tongs ','carving set ','gravy ladle ','salad servers ','pie server ','silver chest ','goblets ','old fashioned ','highball ','cocktail ','sherry l ','liqueur ','brandy ','beer ','ice bucket ','wine cooler ','wine rack ','soda syphon ','cocktail shaker ','ice crusher ','decanters (assorted)','sheets (to size) ','pillows ','pillowcases ','comforter ','duvet ','duvet cover ','tablecloth(s) ','napkins ','dish towels ','bath mat ','hand towels ','guest towels ','bath towels','accelerator','airbag','air conditioner','air conditioning','air filter','air vent','alarm','all-wheel drive','alternator','antenna','anti-lock brakes','armrest','automatic transmission','automobile','axle','baby car seat','baby seat','back-up lights','battery','bench seat','bonnet','brake light','brake pedal','brakes','bucket seat','bumper','camshaft','car','carburetor','catalytic converter','chassis','child car seat','chrome trim','clutch','computer','console','cooling system','crankshaft','cruise control','cylinder','radiator','radio','rag top','rear-view mirror','rear window defroster','reverse light','rims','roof','roof rack','rotary engine','seat','seat belt','shift','shock absorber','side airbags','side mirror','spare tire','spark plug','speaker','speedometer','spoiler','steering column','steering wheel','sunroof','sun visor','suspension','Milk','Detergent','Toilet tissue','Detergent','Eggs','Sponge/scrub','Kleenex Bleach','Bread','Wipes','Handsoap','Fabric softn','Butter','Scour pwdr','Body wash','Spray starch','Fruit','Spray clnr','Body scrub','Vegetables','Spray wax','Face scrub','Meat','Floor clnr','Toothpaste','Fish','Disenfectant','Mouthwash','Baby items','Soup/broth','Window clnr Floss','Vitamins','Dessert Mop/broom','Toothbrush','Medicine','Cereal','Deodorant','Vacuum bags','Potatoes','Powder','Lottery tckts','Rice/beans','Paper towels','Body spray','Film','Pasta','Napkins','Hand cream','Potpourri','Sauces','Clear wrap','Face cream','Candles','Dressings','Foil wrap','Shampoo','Stamps','Baby food','Wax paper','Conditioner','Cards/gifts','Coffee','Sandwich bag','Hairspray','Batteries','Tea Garbage bags','Brush/comb','Lite bulbs','Frozen food ','Shave cream ','Ice cream','Razor/blades','Cake mix','Sugar','Antiseptic','Cookie mix','Flour','Bandaids ','Munchies','Salt/Pepper Q-tips','Coffee filter','Spices Personals','Pet food','Radio Flyer Wagon','Chemistry Set','Joy Buzzer','Yo-Yo','Pop-Up Book','Etch A Sketch','Rock-a-Stack','Ken','Slip \'n Slide','Chatter Telephone','G.I. Joe','Easy-Bake Oven','Creepy Crawlers','Rock\'em Sock\'em Robots','Johnny Seven O.M.A.','See \'n Say','SuperBall','Barrel of Monkeys','Radio-Controlled Car','Lite-Brite','Hot Wheels','Playmobil','Flatsy Doll','Barbie\'s Dream House','Cabbage Patch Kids','Polly Pocket','Slap Bracelet','Masters of the Universe Action Figure','Glo Worm','Care Bear','My Little Pony','Transformers','Teddy Ruxpin','Snoopy Sno-Cone Machine','Pound Puppy','Koosh Ball','Teenage Mutant Ninja Turtles','Skip-It','Glow Stick','Wrestling Buddy','Acai','Apples','Apricots','Avocado','Ackee','Bananas','Bilberries','Blueberries','Blackberries','Boysenberries','Bread fruit','Cantaloupes (cantalope)','Chocolate-Fruit','Cherimoya','Cherries','Cranberries','Cucumbers','Currants','Dates','Durian','Eggplant','Elderberries','Figs','Gooseberries','Grapes','Grapefruit','Guava','Honeydew melons','Horned melon (Kiwano)','Huckleberries','Ita Palm','Jujubes','Kiwis','Durian is an unusual tropical fruit.','Kumquat','Lemons','Limes','Lychees','Mangos','Mangosteen','Mulberries','Muskmelon','Nectarines','Ogden melons','Olives','Oranges','Papaya','Passion fruit','Peaches','Pears','Peppers','Persimmon','Pineapple','Plums','Pluot','Pomegranate','Prickly Pear','Quince','Rambuton','Raspberries','Rose Apple','Starfruit','Sapadilla','Strawberries','Tamarind','Tangelo','Tangerines','Tomatoes','Ugli fruit','Voavanga (Spanish Tamarind)','Watermelons','Xigua melon','Yellow watermelon','Zucchini','bassinet','bean bag chair','bed','bed table','bench','bookcase','bookshelf','breakfront','buffet','bunk bed','bureau','cabinet','card table','carpet','cart','chair','chaise lounge','chandelier','chest','chest of drawers','china cabinet','coffee table','console','cot','couch','cradle','credenza','crib','cubbies','cupboard','curio','curtains','cushion','hall tree','hammock','hassock','hat stand','headboard','highchair','hope chest','hutch','rack','recliner','rocking chair','room divider','rug','file cabinet','folding chair','folding screen','footrest','footstool','four-poster bed','furnishings','furniture','futon','deck chair','desk','desk chair','dining room table','director\'s chair','display cabinet','divan','drapery','drapes','dresser','sconce','screen','seat','secretary','sectional sofa','settee','shelf','shoji screen','sideboard','sleeper sofa','sofa','sofabed','stool','pantry','park bench','patio chair','patio table','pew','piano bench','picnic table','pillow','porch swing','Baking dish','Baking tray','Cake pan','Can opener','Chopping board','Coffee press','Colander','Cooling rack','Corkscrew','Cutlery','Dinnerware','Eggbeater','Electric mixer','Fork','Frying pan','Garlic press','Grater','Glassware','Grill pan','Kitchen scissors','Knives','Mandolin','Measuring cups and spoons','Measuring spoon','Mixing bowls','Muffin tin','Pasta server','Peeler','Pepper mill','Pie dish','Pizza stone','Plates','Potato masher','Potato ricer','Rolling pin','Saucepan','Serving fork','Serving spoon','Sheet pan','Skillet','Slicer','Slotted spoon','Soup spoon','Spatula','Spoon','Stockpots','Steamers','Strainer','Timer','Tongs','Tray','Whisk','Wok','Wooden spoon','Tape (dispenser)','Paper clip holder','Ruler','Paper clips','Pushpins','Bulldog clip','Scissors','Correction Fluid (white-out)','Pencil sharpener','Calculator','Stapler','Staples','Pen','Pencil','Eraser ','Highlighter','Hole-punch','Rubber bands (elastic bands)','bellows','bevel','block and tackle','block plane','bolt','bolt cutter','brad','brush','calipers','carpenter','chalk line','chisel','circular saw','clamp','clippers','coping saw','countersink','crowbar','cutters','machete','mallet','measuring tape','miter box','monkey wrench','wedge','wheel','woodworker','workbench','wrench','screw','screwdriver','scythe','sharpener','shovel','sickle','snips','spade','spear','sponge','square','squeegee','staple','stapler','Phillips screwdriver','pickaxe','pin','pincer','pitchfork','plane','pliers','plow','plumb bob','poker','pry bar','pulley','pinch','pruning shears','putty knife']
  24. let i = 0
  25. let params = [];
  26. let wpoint = dataPoints/500
  27. for(var w = 0; w < wpoint; w++){
  28. for(var x = 0; x < 500; x++){
  29. var entry = []
  30. var first = adverbArray[Math.floor(Math.random() * adverbArray.length)]
  31. var second = objArray[Math.floor(Math.random() * objArray.length)]
  32. var name = first.concat(' ' + second)
  33. entry.push(name)
  34. entry.push(categoryArr[Math.floor(Math.random() * categoryArr.length)])
  35. entry.push(Math.floor(Math.random() * 500))
  36. entry.push('This is the description for a ' + name)
  37. entry.push(Math.floor(Math.random() * 1000))
  38. entry.push('\n')
  39. params.push(entry)
  40. }
  41. fs.appendFile('data.csv', params, 'utf8', (err) => {
  42. if(err){
  43. throw err;
  44. }
  45. })
  46. if(i%100000 ===0){
  47. console.log(w * x)
  48. }
  49. }
  50. }
Add Comment
Please, Sign In to add comment