├── static ├── robots.txt └── css │ └── styles.css ├── variables.py ├── templates ├── back.html └── index.html ├── license.md ├── app.py └── quotes.txt /static/robots.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /variables.py: -------------------------------------------------------------------------------- 1 | apikey = "YOUR API KEY HERE" -------------------------------------------------------------------------------- /static/css/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin-top:100px; 3 | } 4 | 5 | #quote { 6 | margin-top:.25em; 7 | font-family:Garamond, serif; 8 | font-size:2em; 9 | } 10 | 11 | #instructions { 12 | margin-top:4em; 13 | } 14 | 15 | .small { 16 | font-size:.8em; 17 | } 18 | 19 | .hidden { 20 | visibility: hidden; 21 | } 22 | 23 | .modal-content { 24 | margin-top:100px; 25 | } 26 | 27 | #username { 28 | border-bottom: 1px dashed; navy; 29 | font-weight:800; 30 | } -------------------------------------------------------------------------------- /templates/back.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Take Me Back 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

I Hate Rejection

18 |

Your lack of interest makes me sad. Sniff.
You can go back and get three more insults if you want. I'm needy, not greedy.

19 | OK, OK, I'll try it again. 20 |
21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | PiOS License 2 | 3 | Copyright (C) 2024 4 | 5 | Permission is hereby granted by the application software developer (“Software Developer”), free 6 | of charge, to any person obtaining a copy of this application, software and associated 7 | documentation files (the “Software”), which was developed by the Software Developer for use on 8 | Pi Network, whereby the purpose of this license is to permit the development of derivative works 9 | based on the Software, including the right to use, copy, modify, merge, publish, distribute, 10 | sub-license, and/or sell copies of such derivative works and any Software components incorporated 11 | therein, and to permit persons to whom such derivative works are furnished to do so, in each case, 12 | solely to develop, use and market applications for the official Pi Network. For purposes of this 13 | license, Pi Network shall mean any application, software, or other present or future platform 14 | developed, owned or managed by Pi Community Company, and its parents, affiliates or subsidiaries, 15 | for which the Software was developed, or on which the Software continues to operate. However, 16 | you are prohibited from using any portion of the Software or any derivative works thereof in any 17 | manner (a) which infringes on any Pi Network intellectual property rights, (b) to hack any of Pi 18 | Network’s systems or processes or (c) to develop any product or service which is competitive with 19 | the Pi Network. 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or 22 | substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 25 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 26 | AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, PUBLISHERS, OR COPYRIGHT HOLDERS OF THIS 27 | SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL 28 | DAMAGES (INCLUDING, BUT NOT LIMITED TO BUSINESS INTERRUPTION, LOSS OF USE, DATA OR PROFITS) 29 | HOWEVER CAUSED AND UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 30 | TORT (INCLUDING NEGLIGENCE) ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE 31 | OR OTHER DEALINGS IN THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 32 | 33 | Pi, Pi Network and the Pi logo are trademarks of the Pi Community Company. 34 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | # Sandbox URL https://sandbox.minepi.com/mobile-app-ui/app/the-insult-o-matic 2 | 3 | from flask import Flask, render_template 4 | from flask import request 5 | from flask_bootstrap import Bootstrap 6 | import simplejson as json 7 | import requests 8 | import random 9 | import variables 10 | 11 | apikey = variables.apikey 12 | 13 | header = { 14 | 'Authorization' : "Key {}".format(apikey) 15 | } 16 | 17 | 18 | app = Flask(__name__) 19 | Bootstrap(app) 20 | 21 | @app.route('/') 22 | def index(): 23 | return render_template('index.html') 24 | 25 | @app.route('/get_quote') 26 | def get_quote(): 27 | with open('quotes.txt', 'r') as f: 28 | quotes = f.readlines() 29 | return random.choice(quotes) 30 | 31 | @app.route('/back') 32 | def back(): 33 | return render_template('back.html') 34 | 35 | @app.route('/payment/approve', methods=['POST']) 36 | def approve(): 37 | # Build the header for user authentication 38 | accessToken = request.form.get('accessToken') 39 | userheader = { 40 | 'Authorization' : f"Bearer {accessToken}" 41 | } 42 | paymentId = request.form.get('paymentId') 43 | approveurl = f"https://api.minepi.com/v2/payments/{paymentId}/approve" 44 | response = requests.post(approveurl, headers = header) 45 | userurl = "https://api.minepi.com/v2/me" 46 | userresponse = requests.get(userurl, headers = userheader) 47 | userjson = json.loads(userresponse.text) 48 | return(response.text) 49 | 50 | @app.route('/payment/complete', methods=['POST']) 51 | def complete(): 52 | # Build the header for user authentication 53 | accessToken = request.form.get('accessToken') 54 | userheader = { 55 | 'Authorization' : f"Bearer {accessToken}" 56 | } 57 | paymentId = request.form.get('paymentId') 58 | txid = request.form.get('txid') 59 | userurl = "https://api.minepi.com/v2/me" 60 | userresponse = requests.get(userurl, headers = userheader) 61 | data = {'txid': txid} 62 | approveurl = f"https://api.minepi.com/v2/payments/{paymentId}/complete" 63 | response = requests.post(approveurl, headers = header, data = data) 64 | return(response.text) 65 | 66 | @app.route('/payment/cancel', methods=['POST']) 67 | def cancel(): 68 | paymentId = request.form.get('paymentId') 69 | approveurl = f"https://api.minepi.com/v2/payments/{paymentId}/cancel" 70 | response = requests.post(approveurl, headers = header) 71 | return(response.text) 72 | 73 | @app.route('/payment/error', methods=['POST']) 74 | def error(): 75 | paymentId = request.form.get('paymentId') 76 | approveurl = f"https://api.minepi.com/v2/payments/{paymentId}/cancel" 77 | response = requests.post(approveurl, headers = header) 78 | return(response.text) 79 | 80 | @app.route('/me', methods=['POST']) 81 | def getme(): 82 | userurl = "https://api.minepi.com/v2/me" 83 | response = requests.post(userurl, headers = header) 84 | return(response.text) 85 | 86 | if __name__ == '__main__': 87 | app.run(debug=True, port=8080) 88 | -------------------------------------------------------------------------------- /templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | The Insult-Generator 8 | 9 | 10 | 11 | 12 | 13 | 14 | 42 | 111 | 123 | 124 | 125 | 126 | 127 | 128 |
129 |
130 |

The Insult Generator

131 |

All in good fun. Use with care, .

132 | Gimme An Insult 133 | 134 |
135 |
136 |
137 |
138 | 139 | 140 | 151 | 152 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /quotes.txt: -------------------------------------------------------------------------------- 1 | I'd explain it to you, but I don't have the time or the crayons. 2 | You're what I call a content-free individual. 3 | Your train of thought is still boarding at the station. 4 | Every time you speak, I get dumber. 5 | Someday you'll go far. Please stay. 6 | How brave of you to be so openly uninformed. 7 | Your confidence in your beliefs is... refreshing. 8 | You light up a room when you leave it. 9 | Ah, a master of unsolicited advice, I see. 10 | Your authenticity is truly... unmatched. 11 | If I throw a stick, will you leave? 12 | You're impossible to underestimate. 13 | You speak an infinite deal of nothing (William Shakespeare) 14 | You are the cacafuego of blatherskites. Go look it up. 15 | Sorry, what was that? I don't speak dipshit. 16 | I don't enter a battle of wits with an unarmed person. 17 | I'd like to help you out. Which way did you come in? 18 | There’s a tree out there working hard to provide you oxygen. Go apologize. 19 | Hush, the grownups are talking. 20 | I’d love to insult you, but I think you’re too weak to take it. So you get a humanitarian pass. 21 | You are at the top of the bell curve, aren't you? 22 | I envy everyone you have never met. 23 | You bring so much joy when you leave the room. 24 | You have an interesting perspective on things. 25 | Your ability to ruin a moment is unparalleled. 26 | I appreciate how you are always consistently yourself. 27 | You're like a cloud. When you disappear, it's a beautiful day. 28 | You're impossible to underestimate. 29 | Your thoughts are refreshingly pedestrian. 30 | You're someone who could make a statue yawn. 31 | I admire your dedication to mediocrity. 32 | You always meet my expectations, which aren’t high. 33 | You're as bright as a black hole, and twice as dense. 34 | I like how you're not burdened by genius. 35 | You're a gray sprinkle on a rainbow cupcake. 36 | You have a face for radio and a voice for silent films. 37 | Your talents are so hidden, I'm still trying to find them. 38 | Your opinion is very important to me, just like everyone else's. 39 | You're the embodiment of 'it's the thought that counts'. 40 | You're the human equivalent of a participation award. 41 | Your lack of insight is truly remarkable. 42 | You are proof that evolution can go in reverse. 43 | You have the charm of a broken doorknob. 44 | You're the reason the gene pool needs a lifeguard. 45 | It's impressive how you are consistently out of your depth. 46 | You have the unique ability to be wrong in new ways. 47 | You're not the dumbest person in the room, but you better hope they don't leave. 48 | You're proof that one can live without a brain, quite well in fact. 49 | You are the human version of a participation certificate. 50 | Somewhere out there, a tree is tirelessly producing oxygen for you. You owe it an apology. 51 | You are the gold medalist in the mental decathlon of the unenlightened. 52 | Your brain must feel as good as new, seeing that you never use it. 53 | You're a conversation starter, not because you're interesting, but because you're so clueless. 54 | You're as useful as a knitted condom. 55 | Your ignorance is so profound, it's almost admirable. 56 | You're the personification of an error 404. 57 | Your depth is as shallow as a puddle in the Sahara Desert. 58 | You are the human equivalent of a software update in the middle of a work day. 59 | You're the crayon that's still in the box, not because you're special, but because nobody wants you. 60 | You're not stupid; you just have bad luck thinking. 61 | You are an example of why some animals eat their young. 62 | Your intellectual prowess is underwhelming, to say the least. 63 | If you were any more inane, you'd be a parody of yourself. 64 | You are the reason we need instructions on shampoo bottles. 65 | You are as pointless as the 'ueue' in 'queue'. 66 | Your contribution to this conversation is the equivalent of water in a sieve. 67 | You're as relevant as a floppy disk in the modern age. 68 | You're the human version of a speed bump on the road of progress. 69 | You're like a software update that makes things worse. 70 | You have all the appeal of a paper cut. 71 | You are as unnoticed as the terms and conditions on a website. 72 | You're the lint of the intellectual world. 73 | You're the kind of person who could fall into a barrel of boobs and come out sucking your thumb. 74 | Your aura is as grey as a London sky in winter. 75 | You're the answer to a question nobody asked. 76 | You're the visual representation of 'error 404 - intelligence not found'. 77 | You have the charm of a dial-up internet connection in the 21st century. 78 | You're as elusive as an honest politician. 79 | You are the embodiment of a midweek traffic jam. 80 | You're as welcome as a fart in an elevator. 81 | You're the salad in a buffet of desserts. 82 | You're as forgettable as an ad before a YouTube video. 83 | Your presence is as uplifting as a funeral. 84 | You're the reason why we can't have nice things. 85 | You're as confusing as a chameleon in a bag of skittles. 86 | You're like an expired coupon, useless but pretending to be valuable. 87 | You're the audio version of a headache. 88 | You are as misplaced as a snowman in the Sahara. 89 | You're the itch that can't be scratched. 90 | You're as bewildering as a silent alarm clock. 91 | You're the personification of a dead end. 92 | You're as useful as a white crayon on white paper. 93 | You're as effective as a waterproof teabag. 94 | You're the real-life equivalent of a typo. 95 | You're as impactful as a feather on a boulder. 96 | You're as sharp as a marble. 97 | Perhaps your sole purpose in life is to serve as a warning to others. 98 | You're not the worst person in the world, but you better hope he doesn’t retire. 99 | You have the Midas touch. Everything you touch turns into a muffler. 100 | You're the reason we have warning labels. 101 | Your gene pool could use a little chlorine. 102 | You're the human equivalent of a participation trophy. 103 | You are as forgettable as an umbrella on a sunny day. 104 | You're the 'b' in subtle. 105 | Your presence is as noticeable as an extra in a movie scene. 106 | You're as intimidating as a teddy bear. 107 | You're the reason this country has to put directions on shampoo. 108 | You're the embodiment of all the world's unsolved problems. 109 | You are the non-stick coating on the skillet of progress. 110 | You're as impactful as a whisper in a thunderstorm. 111 | You're the pebble in the shoe of greatness. 112 | You're the elevator music of personalities. 113 | Your birth certificate is an apology letter from the condom factory. 114 | You're as relevant as a VHS tape in a Blu-ray world. 115 | You're the reason the middle finger was invented. 116 | You're the human version of a migraine. 117 | You are the visual equivalent of Comic Sans. 118 | You're the appendix of human evolution. 119 | Your family tree must be a cactus because everyone on it is a prick. 120 | You're as useful as a screen door on a submarine. 121 | You're the rubber at the end of a pencil - there for mistakes. 122 | You're the reason we're not allowed to have nice things. 123 | Your intellect is rivaled only by garden tools. 124 | You're about as effective as a white crayon. 125 | You're the physical embodiment of a participation award. 126 | You're as useful as a knitted condom. 127 | You're as essential as a pet rock. 128 | You're as useful as an ashtray on a motorcycle. 129 | You're the best at being average. 130 | You're as useful as a solar-powered flashlight. 131 | You're the reason aliens won't talk to us. 132 | You're like a slinky, not really good for much, but bring a smile when pushed down stairs. 133 | You're as sharp as a bowling ball. 134 | You're the human equivalent of a flaccid balloon. 135 | You're as useful as a waterproof towel. 136 | You're the elbow of the internet – nobody really knows what you're for. 137 | You're the reason the gene pool needs a lifeguard. 138 | You're as indispensable as a paperclip in a paperless office. 139 | You're the flavorless gum in the pack of life. 140 | You're the 'Ctrl+Alt+Delete' of personalities. 141 | You're as useful as a glass hammer. 142 | You're the 'Terms and Conditions' of people – everyone ignores you. 143 | You're as bright as a solar eclipse. 144 | You're the loud noise in a silent library. 145 | You're the soggy bread in a sandwich. 146 | You have the charisma of a wet sock. 147 | Please, do continue. I'm always eager to learn new ways to be wrong. 148 | You're like a broken pencil - pointless. 149 | I've seen more personality in a parking lot. 150 | You're the reason we have to put instructions on shampoo bottles. 151 | You're the human equivalent of a participation trophy. 152 | You're like a bad case of the hiccups. 153 | You're as effective as a paper condom. 154 | --------------------------------------------------------------------------------