Nigeria’s Ace rapper /singer Olamide Adedeji popularly known as Olamide badoo has been lambasted on twitter by several Nigerians following the release of the visuals to his mega hit song ‘wonma” due to the usage of nurses in a sexually explicit way in the video .
Wonma , which was a single off Olamide’s 999 Ep released earlier this year was all about some ladies engaging in promiscuous activities despite getting all they wanted from their partner(s) with notable lyrics which was delivered in local Yoruba language such as “you can’t satisfy a promiscuous woman , she will fornicate”. Twitter users especially nurses used the social media to drive home their points by using the hashtag ”
#nursesarenotsexualobjects” demanding the taking down of the video and public apology from the Eni Duro crooner. This was followed by lots of comments by the disgruntled persons who are quick to recall that Olamide and another music star” Whizkid” had used the nurses in a sexual scene in OMO TOH SHAN video some years back hence fuelling the backlash despite some Olamide’s faithfuls attempt to defend the rapper by calling the video a mere parody and entertainment attempt with no detrimental aim towards the Nursing profession.
The video was however taken down by Olamide earlier this morning on his Instagram page where it was initially uploaded with the reason not far fetched but no statement has been made by the music star as at the time of writing this story .
Crowd1 is the world’s fastest growing online networking company and will always deliver the industry’s most powerful promotions ever!
In the exclusive period of 10 days โ starting TODAY and up until August 7th, the day of the second Crowd1 World Recognition Event โ Crowd1 presents chapter 7 of the GREATEST PROMOTION of all time in online networking!
FREE UPGRADE โ for all new and existing Crowd1 members!
The Epic Promotion, which gives you a FREE upgrade when buying or upgrading a Crowd1 package, starts today 18:00 CET July 29 and will be valid until 23:59 CEST, August 7th 2020
When you join Crowd1 at any level we will upgrade you FOR FREE! If you already are a Crowd1 member and do an upgrade we will upgrade you to the next level FOR FREE!
When you register for a White Package we will upgrade you to the BLACK package.
When you register for a Black Package we will upgrade you to the GOLD package.
When you register for a Gold Package we will upgrade you to the TITANIUM package.
When you register for a Titanium Package we will upgrade you to the AMAZING Titanium Pro package.
The Epic Promotion is the most powerful way ever for all new and existing Crowd1 members to exclusively upgrade their businesses and get the most amazing and uncomparable start in online networking worldwide!
Make sure to take advantage of this amazing opportunity, do NOT miss out!
I have recently been contacted by WhatsApp lawyers and they asked me to shut down one of my apps called WhatsBlast (an app to send customized group messages). I tried to come up with different alternatives such as removing the โconnectionโ with WhatsApp or even to put the app open source and remove it totally from the Apple Store and the Google Play Store. They did not accept any of my alternative solutions because the Terms & Conditions are soooooooo broad that they cover any case they donโt like ๐คฆโโ๏ธ. I lost one battle, and because I never liked WhatsApp (I used it only because of social pressure), I decided to quit WhatsApp. If you want to keep in touch with me, please contact me through Telegram, Twitter, or Email.
Whatโs in the long story?
In this blog post I will explain and show:
Why I donโt like the service and the apps provided by WhatsApp
Why I think itโs unfair that they didnโt accept my proposed changes to comply with their Terms & Conditions
Why we have to be careful with giant tech corporations
What are the alternatives to these giants
How to delete your account
WhatsApp services s*ck
As a developer, I spend a lot of time on my computer; therefore I mostly use all my instant messaging from my desktop. This is the main problem WhatsApp, their desktop app. It is very very bad ๐:
It can only work if your phone is on and connected.
If your phone has a bad connection or is killing the app by lack of memory, the desktop app will not be able to get or send messages.
Also, each time I load the WhatsApp desktop app it takes me at least 20 seconds to load. So I better not be in a hurry.
WhatsApp also has other annoying problems:
Sending files are limited in size
When you send an image, it gets compressed
You need to connect it to a cloud provider such as Google Drive to save your history
WhatsApp belongs to Facebook, another tech giant (which leads to centralization of power)
By default, it downloads all the pictures and videos you receive and it can be quickly spammy and space-consuming
The search doesnโt let you find links
WhatsApp is not developer friendly
Why was I even using it?
I started to use it when I started my job in IBM to be integrated into the team chat, and be socially accepted, be part of the group, and so on. Basically because of social pressure ๐ถ.
Rest In Peace WhatsBlast
WhatsBlast was the app I build to send personalized group messages. To give a bit of background, it is a pretty tiny app: it has been installed by 22 000 people and uninstalled by 20 000 of them.
How did it work?
It worked the following way:
Create a group, letโs call this group โFriendsโ, made of 42 of my phone contacts.
Write your message using the tags for example โHello <Firstname>, I would like to invite you to my bye-bye party on Saturday 12th. Are you joining ?โ.
Once the message is written you can see a preview with all the 42 messages filled with the first name of your contacts.
Then you press send and the โmagicโ happens, WhatsBlast would open an URL like this: https://wa.me/$PHONE?text=$MESSAGE replacing the $PHONE by the phone number of the first contact and $MESSAGEby the message with the first name of the contact. By opening this URL, WhatsApp will open the chat page of the contact with the message prefilled (if the contact is using WhatsApp of course).
The user has to press send (after eventually correcting the message) and press the back button.
When pressing the back button the step 4 and 5 will be repeated with the 2nd contact of the group, and then repeated again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again and again (42 times because there were 42 contacts in the โFriendsโ group) ๐ .
Itโs more or less like doing this 42 times on your smartphone
Thatโs not very magic, right?
Because this app was not very automated, I got a loooot of bad reviews on Google Play because users expect to have full bulk messaging to send messages in one click to a lot of users. They were expecting this โmagicโ and got disappointed.
Screenshot from WhatsBlast on Google Play
Therefore spamming was pretty hard. You would get tired very fast if you would like to send 1000 messages or even worst 1000 messages every day it would kill you, it wasnโt made for that because it required A LOT OF MANUAL EFFORT from the USER! This was nothing like automated messaging or bulk messaging.
Then why did WhatsApp lawyers ask me to remove it?
Because of confidentiality statement in their email, I am not sure I can copy-paste their email, therefore I will quote some parts of their Legal Info that they asked me to comply with.
Basically by using WhatsApp I have to comply with their Terms of Service that forbids the following:
โviolate, misappropriate, or infringe the rights of WhatsAppโ
โinvolve sending illegal or impermissible communications, such as bulk messaging, auto-messaging, auto-dialing, and the like;โ
โnon-personal use of our Services unless otherwise authorized by usโ
โcreate derivative worksโ
โinterfere with or disrupt the safety, security, or performance of our Servicesโ
โcollect the information of or about our users in any impermissible or unauthorized mannerโ
Also, they asked me to remove my app from the app stores and social media, to not violate WhatsApp Terms of Service again, and not to use WHATS or WHATSAPP on my app name, and not to design a similar logo.
From all these statements there was one of them I agree I was violating: โCreate derivative worksโ my branding was green and also my name was pretty similar to theirs, WhatsBlast.
Thatโs why when I answered them all my proposals were including to delete the current app and recreating a new one with another name.
Among the proposal two of them were in my opinion not violating the terms and condition at all (this is exactly what I sent them):
Option 1
To create a new app with whatever name, letโs say โFastBlastโ
This app will have the same flow as the current WhatsBlast BUT
The app will not be linked to WhatsApp
The user will have to fill an input with any messenger โdeeplinkโ (for example for WhatsApp itโs this one โhttps://wa.me/” and for viber something like this โviber://add?number=โ)
Deep links will not be provided, it is up to the user to find the right one and to add it
The word WhatsApp will be removed from description
Option 2
To put the source code open (without providing any APK, or IPA) on GitHub
To remove the WhatsApp deeplink from the source code
For your information: a deeplink is a URL that instead of opening a webpage, opens a mobile application.
The lawyers disagreed, for them it still violates the terms and conditions because they use a magic word, that I call wildcard. ๐คฏ
The power of the wildcard in the legal world
In software, a wildcard character is a kind of placeholder represented by a single character, such as an asterisk (*), which can be interpreted as a number of literal characters or an empty string. It is often used in file searches so the full name need not be typed – Wikipedia
Here is the wildcard I saw in their terms and conditions:
Legal And Acceptable Use. You must access and use our Services only for legal, authorized, and acceptable purposes. You will not use (or assist others in using) our Services in ways that: [โฆ] (e) involve sending illegal or impermissible communications, such as bulk messaging, auto-messaging, auto-dialing, and the like; – Whatsapp Legal Info โ https://www.whatsapp.com/legal/#terms-of-service
Basically my app was not doing any of these: โinvolve sending illegal or impermissible communications, such as bulk messaging, auto-messaging, auto-dialing,โ but was falling into the โand the likeโ.
โand the like;โ โ There is the wildcard!
I had a call with the lawyer and my brother who is used to work with lawyers, and we asked โWhat is the exact definition of bulk messagingโ they said there is no strict definition of it ๐ก and my app falls into the โand the likeโ.
Basically ANYTHING can fall into this category!
Here is a piece of code I just wrote. For non-coders: it is just comments, basically. Just read it!cid:frame-1A4226AC1294336C77395EF512448E5F@mhtml.blink
Technically this can go against WhatsApp Terms & Conditions because I (while writing this article) am a user of WhatsApp, therefore, I have to comply with their Terms & Conditions. So I cannot assist others to send illegal bulk messaging and the like. Depending on your interpretation, showing this piece of code could be considered as illegal, in my opinion, itโs not.
So where is the limit? Is there a way to know it without spending a ton of money in a lawyer? In this world money is king, and I donโt have enough to fight against a giant.
Rest in peace my dear WhatsBlast โฐ๏ธ
So yes, I ended up giving up ๐ข, and I removed the app from the stores as they asked me to do. I ended up complying to their merciless rules. I am a real respectful citizen of the world nowโฆ but at what cost ๐?
The app is just dead now, and the source sadly private.
R.I.P. WhatsBlast, I really enjoyed building you.
You can still check out its tomb:WhatsBlast Bulk MessagingSend customized messages in 4 steps: 1. Write your message 2. Select your contacts 3. Preview 4. Send each messageโฆwhatsblast.learn.uno
Any legal alternative?
I donโt know any legal alternative, maybe I can try to build something in the decentralized web, but would it be legal? I donโt know. If you are a legal expert and know any legal alternative, to share my code, or to revive WhatsBlast feel free to comment.
I will just not take any risk doing something illegal, donโt forget: I am a respectful citizen of the world after all.
Beware of the giants (GAFAM)
You probably heard of the acronym GAFAM: Google Apple Facebook Amazon Microsoft (in case you forgot WhatsApp and Instagram belong to Facebook), they are the ones I call the giants or the new gods. When people say โGod bless Americaโ they probably talk about themโฆWho knows.
I am not the best to talk about these giants because I use a lot of their services, I rely a lot on Google (Google Search, Gmail, Agenda, Google Maps, Google Analytics, Android with Google Services, Youtube, โฆ) and Microsoft (Windows, Github, LinkedIn) and I can hardly manage without them because they do provide a good service.
The only thing I know now is that if I have to open a new account in some service or download new software, I will try to look for: Open Source, End to End Encryption, and Decentralized solutions.
Giving too much power to these giants by giving access to your data and just using them can lead to two major problems:
Censorship ๐ซ โThey can just decide what you need to see and what you donโt, it created the filter bubble that lead to Trumpโs election and the Brexit, or it can go against progress and decentralization like Google did, or even worst forbid the access to open source code to Iranianโs users (open-source belongs to everyone, it should be a human right)!!
Privacy ๐โ As Edward Snowden and Pavel Durov (founder of Telegram) state, WhatsApp is supposed to be end-to-end encrypted app but it is very likely to have backdoors, and foresure governments are pushing to add them. Also, a lot of other services people use and I do too, are not encrypted which leads to privacy issues and can lead to governments to read any of your information.
These two problems are often linked to government pressure. For example, thanks to the CLOUD Act, the government can get anything from the US companies. As you can see in the below article, non-US companies are also getting pressured!What Was TON And Why It Is OverFor the last 2,5 years some of our best engineers have been working on a next-generation blockchain platform called TONโฆtelegra.ph
And here is an inspiring quote from Pavel Durov (CEO of Telegram).
I want to conclude this post by wishing luck to all those striving for decentralization, balance and equality in the world. You are fighting the right battle. This battle may well be the most important battle of our generation. We hope that you succeed where we have failed. – Pavel Durov
We are not doomed! ๐
Donโt worry we are not doomed. There are still some ways to escape that.
There are still other options, and more and more people conscious about those problems, here are some alternatives:
Using a privacy-focused service
Using open source
Using a decentralized and anonymous (or pseudonymous) technology
Here are a few links (and tools) to continue this way:
Yes I am doing it, I am closing my WhatsApp account
How to delete a WhatsApp account ๐ฑ๐ โโ๏ธ
Here is my home-made tutorial!cid:frame-FBB2593D1D4659903A14C6F839829B0B@mhtml.blink
Should you delete your account too?
Do whatever you feel like. I had my own reasons to close my account if you have yours just do it.
Will I survive?
I will ๐ .
How to get used to it?
In 2019 I built this service to create a fake app to replace a real one: Detoxify.
Itโs free and open-source, and I will use it ๐!Detoxify app Generate a fake app to replace any addictive app ๐ฑ๐ www.detoxify.app
I am still on Facebook for business purpose mainly, I guess the next step will be to get rid of it.
Disclaimer:
This article isn’t written by http://www.icastemedia.com, this article isn’t meant to promote or aim at defaming any of the above organization as mentioned in this article. However its the writer’s personal thought about the aforementioned Organization judging from his personal relationship with them. Therefore anyone who has/will come across this article has the liberty to do whatsoever and however he/she views this article is entirely a personal decision.
Thanks for reading,… Feel free to share your thoughts in the comment box, you can also share post on your favorite social platforms!
WhatSender is a software designed to send bulk Whatsapp messages directly from PC in a simple and effective way. WhatSender uses Whatsapp Web technology but adds useful features to do Whatsapp Marketing and send Whatsapp messages to multiple users at the same time. Here are the reasons why you should use Whatsender 6.2 to contact all your friends/relatives or potential customers to do Whatsapp marketing at a professional level.
Whatsender screenshot
How does WhatSender Crack work?
WhatSender 6 software designed to send bulk Whatsapp messages directly from PC in a simple and effective way.
WhatSender uses Whatsapp Web technology but adds useful features to do Whatsapp Marketing and send Whatsapp messages to multiple users at the same time. Here are the reasons why you should use Whatsender to contact all your friends/relatives or potential customers to do Whatsapp marketing at a professional level:
Create and send customized messages (with the name of the recipient or other โvariablesโ) directly from your PC
Import contacts either manually or from file (CSV or TXT)
Send Whatsapp messages to contacts even if they are not saved in your address book
Multi-Account (Multi-Channel) to automatically send messages from different whatsapp accounts
Automatically create multiple variations of the message to send to all contacts and avoid spam or ban
Ability to see the report of the campaign (from LOG section)
Possibility to schedule the sending and set a delay between the messages to avoid to be banned (read also this tips)
Grab all member of a Whatsapp group to contact them via WhatSender
Create and send Whatsapp messages with viral photos and videos
Bulk check of Whatsapp and non-Whatsapp phone numbers (numbers filter feature)
Features Of WhatSender Crack Version
Create and send customized messages (with the name of the recipient) directly from your PC
Import contacts either manually or from a file (CSV or TXT)
Send Whatsapp messages to contacts even if they are not saved in your address book
Automatically create multiple variations of the message to send to all contacts and avoid spam or ban
Ability to see the report of the campaign (from LOG section)
Possibility to schedule the sending and set a delay between the messages to avoid to be banned
Grab all member of a Whatsapp group to contact them via WhatSender
Create and send Whatsapp messages with viral photos and videos
Best WhatsApp Marketing Software 2020
WhatsAppMarketing
WappBlaster
Allwebmart
WhatsApp SMS Myntra
WhatsAppMarketing:
WhatsAppMarketing is a platform that enables you to create campaigns through WhatsApp. You can create and upload the lists of potential clients with your smartphone. These lists are stored on your user panel so that you can send bulk messages at any time. This includes broadcasting messages with text, photos, and videos.
WappBlaster:
From bulk sender WappBlaster, you can send unlimited messages to your potential clients. It lets you enhance your message by attaching a picture or a video with a caption. You can avail free Filter software, all over India database, unlimited channels for the USA, and 5 India real SIM channels with WappBlaster software.
Allwebmart:
Allwebmart facilitates you to send WhatsApp messages to convey their services or products to their customer group. It ensures 100% delivery of messages. You can create customer outreach without fearing message spam when you are using WhatsApp marketing tool from Allwebmart.
WhatsApp SMS myntra:
WhatsApp SMS myntra helps you send bulk text messages to numerous clients immediately. It provides highly developed features that let you keep track on your marketing campaigns. You can even choose to promote your business worldwide by making use of their database.
How to Register WhatSender Pro With Serial key
Downloadย WhatSender Crack(comment your e-mail address to get the download link!
Extract and install the program (launch Setup)
Do not launch the program yet, exit if running
Copy Cracked file from Crack toย installation dir
Kindly support this category by sharing with friends, you can also like and comment on post. If if have cracked apps, kindly contact me via email
The Federal College of Education, Abeokuta was established in 1976 as the Federal Advanced Teachers College, in addition to three other similar Colleges that were previously in existence at Okene, Pankshins and Yola. It is the first and the oldest Tertiary institution in Ogun State. The College started at the then Abeokuta Grammar School, Isale-Igbein right …
Applications are hereby Invited from interested and suitably qualified candidates for the post of the Provost of Federal College of Education, Abeokuta that would be vacant soon
Candidates for the post must possess demonstrable evidence of strong academic and administrative leadership, initiative and creativity in policy formulation, management of human and material resources, good human relations and other positive managerial attributes.
Duties
The Provost is the Chief Executive of the College and is responsible for the day-to-day management and operations of the College
The successful candidate would be expected to provide the required academic, administrative and professional leadership for the College in executing the broad policies laid down by the Governing Council for the achievement of the objectives for which the College was established.
Some specific duties of the Provost, among others, include being:
The Chief Academic, Administrative and Accounting Officer of the College;
The Chairman of the Academic Board that directs and oversees academic activities of the College;
A member of the College Governing Council in charge of providing periodic reports on the progress of the College in terms of personnel, finances, Infrastructure and ensuring that the decisions of Council are carried out promptly;
Responsible for ensuring meetings of Council and committees are serviced, etc;
Responsible for approving and authorizing all payments and expenditures of the College in accordance with the financial regulations, treasury circulars and Governing Council’s decisions under sound financial discipline and management;
The Provost shall foster good rapport with the relevant organs of the Federal Ministry of Education, National Commission for Colleges of Education and other professional bodies that would lead to the ultimate attainment of the status of a Centre of Excellence by the College.
Qualifications Candidates for the post of the Provost should possess the following:
A Doctorate Degree (Ph.D) in a field relevant to, at least, one programme in the College with a minimum of fifteen (15) years post qualification teaching / research experience in the College of Education System; and in addition must have held a senior teaching / research as well as holding top administrative leadership position in an institution of higher learning
At least five (5) year experience as a Chief Lecturer in the College of Education System
Must not be more than fifty-nine (59) years of age at the time of taking up the appointment
Evidence of good track record in result-oriented researches at national and International levels, as evident in scholarly publications.
Evidence of professional standing and honours
Demonstrable evidence of proficiency in ICT (packages and capabilities)
Demonstrable evidence of good conduct, discipline, dedication, drive, resourcefulness and ability to command respect and loyalty of members of staff and students of the College
Candidate shall not foster personal, social, ethnic, political, religious and other sectional interest
Possession of Professional Teaching Qualification, a minimum of Nigeria Certificate in Education (NCE) or Postgraduate Diploma in Education (PGDE), including registration with the Teachers’ Registration Council of Nigeria (TRCN) is mandatory.
Evidence of community services at both local and national levels
Candidate must be a person of vision, a goal getter, and one that can produce and execute a strategic plan for the College.
Tenure
The appointment is for a period of four (4) years in the first instance and subject to satisfactory performance; re-appointment for a second and final term of four (4) years.
Salary
The salary and fringe benefits attached to the post are as applicable to the post of a Provost in all Federal Colleges of Education in Nigeria and as may be determined from time-to-time by the Federal Government.
Method of Application
Interested and qualified candidates are requested to submit twenty (20) copies of their Applications (including credentials and Curriculum Vitae) in the following order:
Post sought
Full Names (Surname underlined)
Marital Status, Number and Ages of Children
Mobile Phone Number(s) and E-mail Address(es)
Date and Place of Birth, Local Government Area and State of Origin
Current Postal Address and Permanent Home Address
Educational Institutions Attended with Dates
Academic and Professional Qualifications and Distinctions with Dates
Membership of Professional Associations / Bodies with valid evidence
Work Experience in chronological sequence
Present Employer-Status and Salary
Extra curricular activities
Publications in Standard APA format
ICT Proficiency Compliance (with valid evidence)
Societal linkages and contributions to local, national and international lives
Fund / Research Grants attracted over the years (with evidence).
Medical Fitness (supported by a report from a Recognized Government Hospital)
Names and Addresses of three (3) Referees, one of whom must be the Present Employer
Signature and Date
The application should be accompanied with a two-page statement of the candidate’s mission and vision for the College.
The Application should be enclosed in an envelope marked “Position Of Provost” at the top left corner, addressed and submitted to: The Registrar and Secretary to the Governing Council, Federal College of Education, P.M.B 2096, Abeokuta, Ogun State.
Note: Candidates are also to ensure that their Referees submit confidential reports on them directly to the Registrar’s Office within the specified period.
Every now and again, when I learn about a new feature in Python, or I notice that a few others are unaware of a feature, I make a note of it.
Over the last few weeks, there have been a few interesting features that I recently learned about, or realized others โ on Stack Overflow
Here are ten neat Python development tricks some Iโm sure you havenโt seen before. And a quick look at a few of these features, and a rundown of each.
Note: Codes are shown as images in this story. Further, you will get GitHub Readme link at the end to do experiments further ๐ค
01. How to view source code in the running state?
Looking at the source code of the function, we usually use the IDE to complete.
For example, in PyCharm, you can use Ctrl + mouse to enter the source code of the function.
What if there is no IDE?
When we want to use a function, how do we know which parameters this function needs to receive?
When we have problems when using functions, how to troubleshoot the problem by reading the source code?
At this time, we can use inspect instead of IDE to help you accomplish these things
inspect.getsource: Return the text of the source code for an object.
Theย inspectย module provides several useful functions to help get information about live objects such as modules, classes, methods, functions, tracebacks, frame objects, and code objects
Four main kinds of services provided by this module:
Type checking,
Getting source code,
Inspecting classes and functions
Examining the interpreter stack.
02. The fastest way to view the package path
When you use import to import a package or module, Python will look in some directories, and these directories have a priority order, normally we will use sys.path to view.
Is there a faster way?
Here I want to introduce a more convenient method than the above, one line command can be solved
From the output, you can find that the path of this column will be more complete than sys.path, which contains the directory of the user environment.
03. Write the nested for a loop as a single line
We often use the following nested for loop code
Here are just three for loops, in actual coding, there may be more layers.
Such code is poorly readable, and people do not want to write it, and there is a better way to write it.
Here I introduce a commonly used writing method, using the itertools library to achieve a more elegant and readable code.
04. How to use the print output log
Many people like to use print to debug code and record the running process of the program.
However, the print will only output the content to the terminal, and cannot be persisted to the log file, which is not conducive to troubleshooting.
If you are keen to use print to debug code (although this is not the best practice), record the process of running the program, then the print usage described below may be useful to you.
Print it as a function in Python 3, because it can receive more parameters, so the function itself becomes more powerful
code shown as below:
05. How to quickly calculate the function running time
Calculate the running time of a function, you might do it like this
You see you wrote a few lines of code to calculate the running time of the function.
Is there a way to calculate this running time more conveniently? Yes by using a built-in module called timeit
Use it with just one line of code
The results are as follows
2 2 2 2 2 10.020059824
06. Use the built-in caching mechanism to improve efficiency
Caching is a method of storing quantitative data to meet the needs of subsequent acquisitions, and is designed to speed up data acquisition.
The data generation process may require operations such as calculation, regularization, and remote acquisition. If the same piece of data needs to be used multiple times, it will be a waste of time to regenerate each time.
Therefore, if the data obtained by operations such as computing or remote request is cached, the subsequent data acquisition requirements will be accelerated.
To achieve this requirement, Python 3.2+ provides us with a mechanism that can be easily implemented without requiring you to write such a logic code.
This mechanism is implemented in the lru_cache decorator in the functool module.
Parameter interpretation:
maxsize: how many results of this function call can be cached at most, if None, there is no limit, when set to a power of 2, the performance is the best
typed: If True, calls of different parameter types will be cached separately.
for example
The output is as follows, you can see that the second call does not execute the function body, but directly returns the result in the cache
calculating: 1 + 2 3 3 calculating: 2 + 3 5
The following is the classic Fibonacci sequence when you specify larger n, there will be a lot of repeated calculations
The timeit introduced in point 6 can now be used to test how much efficiency can be improved.
Without lru_cache, the running time is 31 seconds
After using lru_cache, the running speed is too fast, so I adjusted the value of n from 30 to 500, but even so, the running time is only 0.0004 seconds. The increase in speed is very significant.
07. Tips for executing code before the program exits
Using the built-in module atexit, you can easily register and exit functions.
Wherever you cause the program to crash, it will execute those functions that you have registered. Examples are as follows
The results are as follows:
If the clean() function has parameters, you can call atexit.register (clean_1, parameter 1, parameter 2, parameter 3=โxxxโ) without using decorators.
Maybe you have other ways to deal with this kind of demand, but it is more elegant and convenient than not using atexit, and it is easy to extend.
But using atexit still has some limitations, such as:
If the program is killed by a system signal that you have not processed, the registered function cannot be executed normally.
If a serious Python internal error occurs, the function you registered cannot be executed normally.
If you call it manually os._exit(), the function you registered cannot be executed normally.
08. How to turn off the exception association context?
When you are handling an exception, due to improper handling or other problems, when another exception is thrown, the exception thrown out will also carry the original exception information.
Read it again and you will surely understand it now ๐
Just like this.
You can see two exception messages from the output
If an exception is thrown in an exception handler or finally block, the exception mechanism will implicitly work by default to attach the previous exception as the __context__ attribute of the new exception.
This is the automatic correlation exception context that Python enables by default.
If you want to control this context yourself, you can add a from keyword (from will have a limitation that the second expression must be another exception class or instance.) to indicate which exception caused your new exception.
The output is as follows
Of course, you can also use the with_traceback() method to set the __context__ attribute for exceptions, which can also display exception information better in the traceback.
Finally, if I want to completely turn off this mechanism of automatically associating exception contexts? what else can we do?
Can be used raise...from None, from the following example, there is no original exception
09. Implement defer-like delayed calls
There is a mechanism for delaying calls in Golang. The keyword is defer, as shown below
The call of myfunc will be completed before the function returns, even if you write the call of myfunc on the first line of the function, this is the delayed call. The output is as follows,
A B
So is there such a mechanism in Python?
Of course, there are, but it is not as simple as Golang.
Using withโฆopenโฆ we can read data from a file, which is a very familiar operation for all Python devs.
But if you use it improperly, it will also cause great trouble.
For example, when you use the read function, Python will load the contents of the file into memory all at once. If the file has 10 GB or more, then the memory that your computer will consume is very huge.
For this problem, you may think of using readline as a generator to return line by line.
But if the content of this file is in one line, 10 GB per line you will still read all the contents at once.
The most elegant solution is to use the read method to specify that only the fixed size of the content is read at a time. For example, in the following code, only 8kb is returned at a time.
The above code has no problem in function, but the code still looks a bit bloated.
With partial function and iter function, you can optimize the code like this
To Sum up
We can use inspect to view source code in the running state
itertools.product can be used in case of nested loops
Use timeit module over time to calculate running time of a function or piece of code
Use functool.lru_cache to speed up your code. Itโs designed to speed up data acquisition
Use atexit module to register your functions so that wherever you cause the program to crash, it will execute those functions that you have registered
Read a large file by breaking it into fixed-size blocks
Thatโs it! Did you learn anything new? Or do you have another trick that you want to share? Please let me know in the comments!
Here is the link for GitHub Readmeto view and analyze each trick
Yeah! now enjoy just like minions ๐, we made it to the end. Hope you learn something new and have some basic idea about these efficient development tricks
Thanks for reading, We hope you’ve fuel up your python development skill and knowledge. To See more tutorials like this, Support by dropping your comments, likes and share with friends.
Efficacy Homes Limited was incorporated as a limited liability company with RC 765581 in August 2008 to carryout professional and corporate business in Real Estate, Building Construction and Project management. It has her office at idowu taylor, Victoria Island. Lagos. Since inception, Efficacy homes limited has engaged competent professionals in developi…
Job Type: Full Time
Qualification
Experience
Location: Lagos
Job Field: Engineering / Technicalย Requirement
Requirement
Interested candidates should possess relevant qualification.
Owens and Xley is a business consulting and advisory company. We offer strategic services in the areas of business advisory, business development and planning to small businesses that would otherwise not have access to the technical competencies available to bigger companies.
Business Development Officer
Job Type: Full Time
Qualification
Experience: None
Location: Lagos
Job Field: Sales / Marketing / Retail / Business Development
Our client, a leading and award winning fashion brand is currently recruiting a suitably qualified candidate to fill the position below:
Location: Lekki
Overview
The Business Development Officer is responsible for increasing sales and profits for the company, finding new business opportunities and strategic business growth. You are responsible for analyzing customer feedback and data to determine how customers are patronizing us and then develop a strategic plan to increase new and return purchases, or discontinue underperforming offerings.
Job Description
Create and maintain a proactive relationship with our clients.
Work proactively to determine and propose our marketing needs.
Prioritize and manage multiple projects simultaneously, and follow through on issues in a timely manner.
Drive brand awareness online through social media, and offline via daily door to door marketing activities.
Maintain the customers and sellerโs database to drive email marketing initiatives.
Grow and meet the new names target of the company.
Meet the monthly sales revenue target of the company.
Vendor engagement and management.
Work with the CEO in creating an overall Marketing Strategy for the business; creating presentations as well as writing proposals and customer engagement strategies.
Responsible for staying informed on activities that are being performed on our accounts
and ensure ALL important documentation/deliverables align with overall strategy.
Prepare weekly reports and month-end overviews of our current activities, and monthly revenue forecasts, plus plans for future business development.
Organize successful pop up shops and, online and offline events to drive sales.
Skills and competencies
Excellent written and verbal communication skills.
Comfortable with CRM software.
Ability to think creatively and innovatively.
Analytical skills to forecast and identify trends and challenges.
Familiarity with the latest trends, technologies and methodologies in small business strategy, marketing, branding etc.
Must be self-driven and proactive.
Organisational and planning skills.
Problem solving skills.
Attention to detail
Flexible
Effective at managing change in a fast-moving and constantly evolving business.
Ability to work with little or no supervision.
Salary:
55,000
Commission on monthly sales revenue
Deadline: July 10, 2020
Method of Application
Interested and qualified candidates should forward their CV to: recruitment@owensxley.com using the position as subject of email.