Make a more general version of circle called arc that takes an additional parameter
angle, which determines what fraction of a circle to draw
I recently just learned how to do this without using loops: import random x = [0 for _ in range(10)] #underscore used when you do not need the value from the list. So here 0 replaces the value from range(10) #expected output [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] y = [random.random() […]
This is so simple, it needs no heading.. 08/19/201810:10:49 PM Drinks Coffee as usual… Straight to the point: So this is the CSV data I will be working with ( generated using the website: https://mockaroo.com) MOCK_DATA Goal Create a bar plot showing the number of emails based on the alphabets they begin with . For instance, […]
If you need help with your excel table conversion, i provide such a service here 😀 Sometimes a database is really not necessary. Why not try a simple excel sheet Coded this in an hour; sips on coffee though 9:06:34 PM I generated the excel workbook using a website called Mockaroo. Today’s task is to convert a […]
I hate copying and pasting, so might as well automate it 9:43:24 PM Trying to complete my research paper.. … If you have any question, do ask in the comment section. See you! This allows for transforming my .ods file to .xlsx //Note –> You will have to tweak this to your needs. This is […]
Lexpression Web App simplifying language learning… 11:17:20 AM finally can sleep Apologies for not documenting the development process daily, however, if you follow my Youtube channel, you should have seen the coding videos. So yea, the website /web application is deployed and it looks good, like functionally good.Not sure about the basic design. The web […]
The world is indeed comic, but the joke is on mankind. H. P. Lovecraft true.. true.. 6:23:15 PM I made different functions to handle a specific (one) task; Division of labor # usage python download_lefthand_comic.py import logging import os import requests import bs4 import time import re # TODO: CHECK FOR LAST UPDATE # […]
I want to turn the clock back to when people lived in small villages and took care of each other. Pete Seeger And more coffee.. 4:05:04 PM #usage Prettified_Stopwatch.py import time , pyperclip #TODO: start by enter #TODO: store start time #TODO: create lapNum #TODO: loop until user ctrl c input() startTime = time.time() lapNum = […]
And where I excel is ridiculous, sickening, work ethic. You know, while the other guy’s sleeping? I’m working. Will Smith I like will smith!! 12:50:11 AM This task was unexpectedly difficult for me, so I am not sure if it is correct # USAGE python excel_2_csv.py import openpyxl import os import sys import logging import […]
“I can stand brute force, but brute reason is quite unbearable. There is something unfair about it’s use. It is hitting below the intellect.” ― Oscar Wilde, The Picture of Dorian Gray I don’t get it.. 11:20:21 PM # USAGE python brute_force.py import PyPDF2 import os import sys import logging logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s – %(message)s”) […]
“Nothing annoys people so much as not receiving invitations.” ― Oscar Wilde, The Importance of Being Earnest I know that feeling…humph.. 10:36:20 PM # usage python invitation.py <textFile> import docx import os import sys import logging from docx.enum.text import WD_ALIGN_PARAGRAPH logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s – %(message)s”) if len(sys.argv) == 2: # TODO: GET TEXT FILE […]
“Paranoid? Probably. But just because you’re paranoid doesn’t mean there isn’t an invisible demon about to eat your face.” scary… 9:13:00 PM my solution # usage pdf_paranoia_encrypt.py import PyPDF2 import os import sys import logging logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s – %(message)s”) # TODO: GET PASSWORD FROM COMMAND LINE if len(sys.argv) == 2: # TODO: OS WALK […]
Chapter 12 done!!! Finally Now I can sleep.. for 10 minutes though.. 3:42:14 AM Suggestions are welcomed. # USAGE python sheet2text.py import logging import sys import os import openpyxl logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s – %(message)s”) if len(sys.argv) == 2: # TODO: EXTRACTS EXCEL FILE excelfile = sys.argv[1] excelfile = os.path.abspath(excelfile) excelfile_name = os.path.basename(excelfile).split(“.”)[0] if not os.path.exists(excelfile): […]
1 hour laturr….. I need coffee but if I drink coffee, I will go to sleep… drinks green tea instead 3:18:41 AM Code # USAGE python text2sheet import logging import sys import os import openpyxl logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s – %(message)s”) if len(sys.argv) > 1: # TODO: EXTRACT TEXT FILES files = sys.argv[1:] # TODO:CREATE NEW WORKBOOK […]
This isn’t too bad …right ? Not too tired but would rather be sleeping now. Unfortunately I have to finish this chapter before Sunday.. sighs deeply 2:53:05 AM # USAGE python sheetinverter.py import logging import openpyxl import os import sys logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s – %(message)s”) if len(sys.argv) == 2: # TODO: EXTRACT WB wb […]
I really don’t know how useful this automation is, but okay.. 04:07:22 still tired… Korean indie music playing in the background; this is going to be fun. Note: I did not check to see if the file to be read / workbook already has content in the rows. To do so, I could simply add […]
Easier done than said ….like actually 03:35:23 Coffee with a drop of sleep in my eyes I am rather tired at the moment but have enough energy to solve this task: Multiplication table challenge.. # Usage: python multiplication.py <N> import sys import os import openpyxl import logging from openpyxl.styles import Font logging.basicConfig(level=logging.DEBUG, format=”%(asctime)s – %(levelname)s […]
The day is not over, so I decided to keep planning on the web application. I thought of a feature to add – Search Autocomplete. Yes I know, keep it simple. I promise, I would not add any other feature before the first publishing okay!. Now let us talk about what we should see in […]
Downloading a comic…. 9% 12:39:32 PM There is a solution provided in the book but this is my way of going around the task #comic saver – saves each post of a comic page #USAGE python comic.py import logging, requests, bs4, os, sys logging.basicConfig(level=logging.DEBUG, format=” %(asctime)s – %(levelname)s – %(message)s”) #TODO: get url if len( […]
How to fill in the gaps 1:49:09 AM I need help with this! I like this exercise but I cannot seem to find its ideal solution. Could someone suggest in pseudocode, please..? # finds files with a give prefix in a folder # locates any gaps in the numbering # renames all the later files to […]