Chapi Dev Talks
8.53K subscribers
940 photos
108 videos
12 files
596 links
My name is Chapi and I am a Developer.

I post my thoughts about tech here.

Message to our assistant to give U Feedback: @sophiservebot

Join https://t.me/chapidevtalks_group

Urgent? Contact Me: @chapimenge (Don't say hi or ask Meta Questions )
Download Telegram
Is the time.sleep CPU bound or Io bound?

If you don't know what CPU bound and Io bound is in short

CPU Bound - is something that use cpu intensively something like factorials which keeps calculating the value it doesn't depend on any other resources.

IO Bound - is something that waits for other resources to finish like you sending requiest to database server to get the data.

This is a very high level explanation for you to understand it.

Now when you do time.sleep(10) is it IO bound or CPU bound task?
❀1
This is crazy πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯πŸ”₯
Forwarded from Pavel Durov (Pavel Durov)
πŸ‘¨β€πŸ’» This week we launched the first batch of Telegram Business features. Users can now convert their personal Telegram accounts into business accounts. As a result, they will be able to add their location and opening hours, organize chats with color labels, use automatic greeting/away messages and shortcuts for quick replies.

That’s just the start β€” we are shipping more Telegram Business features this month. One of these features will revolutionize how people interact with chatbots. Telegram Business accounts will be able to seamlessly add chatbots as their invisible secretaries to respond to all or certain chats. With AI, these chatbots can bring customer service automation to an entirely new level.

The new Bot APIs for developers will become available later this month, all for free. Stay tuned β€” more exciting stuff is coming for businesses and developers on Telegram this season.
Please open Telegram to view this post
VIEW IN TELEGRAM
πŸ‘7❀6⚑1
This media is not supported in your browser
VIEW IN TELEGRAM
The earth when you code using

Python JavaScript ....
😁13🀣6
Got business account now 😎😎😎

Shall I add business hours πŸ˜‚πŸ˜‚?

Can't wait for the bot to be released
😁11πŸ‘2❀1πŸ‘Ž1πŸ†’1
In progress project.

You will me a website i give you the source code!

[Github] is under active development


NextJS Tailwind ShadCN V0
❀13πŸ‘4⚑3πŸ‘Ž1
Loglib is on fire people.


@beka_cru and the team keep this energy flowing.

https://t.me/loglib_community
⚑14πŸŽ‰4❀2πŸ‘Ž1
How do you debug 405 Method not allowed error on Vercel?

Am having a nasty error 😭😭😭😭.

I am logging in my server actions and Vercel is just playing with me.

They showed me the log that I don't want.

Any recommendations?

It works on my local setup my guess is on the server actions there is some blocking happening since I am requesting third-party endpoint.
πŸ‘Ž1
Do you know you can use underscore to increase readability of your code while writing numbes?

In programs like python and golang this can be used to have more readable code.

In Python

large_num = 1_000_000
In Golang

package main

func main(){
largeNum := 1_000_000
}
Use this info to make your code more readable.

I don't know if it is possible in another languages but I would love to hear from you all if you know any.
✍9πŸ‘3πŸ†’2⚑1πŸ‘Ž1πŸ”₯1
People really need to understand billionaires and millionaires difference.

If I give you 100k$ every day you need 10 days to be a millionaire.

If I give you 100k$ every day you need at least 27 years to be a billionaire.

Let that sink in.

FYI: with the above rate to reach Elun musk you need >540 years to reach his worth πŸ˜‚
🀯13πŸ‘3πŸ€“2πŸ‘Ž1
πŸ‘Ž17❀14⚑2πŸŽ‰1
Forwarded from Tech Nerd (Tech Nerd)
This media is not supported in your browser
VIEW IN TELEGRAM
This is one of the best and funniest scene from the Silicon Valley series. πŸ˜„

@selfmadecoder
🀣18πŸ‘Ž1
Tech Nerd
This is one of the best and funniest scene from the Silicon Valley series. πŸ˜„ @selfmadecoder
Is this guy Richard or @beka_cru ?πŸ˜‚πŸ˜‚πŸ˜‚
🀣7😁2πŸ‘Ž1
Distinguished service awards ETCPC team

Hard work pay off may be not today may not tomorrow but after years like this.

I am really excited for this achievement because I were part of this astonishing team. I dedicated my whole university life on building myself and this amazing team.

Mukerem, Mame Kakuma, Abdi Adem and Yohannes(Genius like we all call him) congratulations πŸŽ‰πŸŽ‰πŸŽ‰ from Astu. I know there are other team participated and congrats for you too AASTU you guys are so amazing 😍. I wish I knew your team in person but I am really happy for the achievement you made on the ACPC competition.

I wanna give credit for some persons on this that are thr untold Legends.

- Mebatsihon Sahle
- Mustafa Kamil [ absolute legend]
- Amir kheyru
- Admasu Abera [Mame Kakuma Legend++]

And all the people who really dedicated Thier time, knowledge and money for this cause.

Forever grateful and I am sooo thankful for even knowing you my people.

Much love from Chapi to all of you. 🫑
❀28πŸ‘10πŸ‘5πŸ‘Ž1
Look at this amazing recommend That Anwar gave me.

This actually made not only my night but my week too.

Sometimes when I have stressful week like this one this kind of message really gets my energy boosted.

Thank you Anwar for such amazing words πŸ₯°. I am so thankful that I helped you. Alhamdulilah you were really great guy too we had an amazing two years in ASTU with that I got to know you more and you are also amazing and never gives your back to anyone in need.

πŸ™ŒπŸ™πŸ™
πŸ‘21❀11πŸ‘Ž1
Rails developer take your chance...
πŸ‘6πŸ‘Ž1
In Golang semicolon is necessary but the compiler have a couple of rule so that the developers don't have to write the semicolon as a termination.

Go program can omit most of it if you just follow

- if you are using closing statement like ) or }.
- when input is broken into token, semicolon will inserted immediately after a lines final token if that token is
- identifiers
- integer, float, rune, string or imaginary number
- keyword break, continue, fall through or return
- operators and punctuation ++, --, ) , ] or }

By just following this rules you don't need to insert semicolon but if you are using two statements inside of if Conditions you must use it explicitly like

...
if _, ok := someCall(); ok != nil {
...
}
...
Notice how we use semicolon inside of the if statement that is where we want Go to understand this is the termination.

Final thoughts: WHY ARE YOU NOT LEARNING GOLANG ?
πŸ‘5πŸ‘Ž1
For an extensive error reporting in python check this out and use it in your own case

import traceback
import sys

def divide_numbers(a, b):
try:
result = a / b
return result
except Exception as e:
exc_type, exc_value, exc_traceback = sys.exc_info()
tb_info = traceback.extract_tb(exc_traceback)
filename, line_num, func_name, text = tb_info[-1]
local_vars = {}
local_vars.update(locals())
error_info = {
"exception_type": exc_type.__name__,
"exception_value": str(exc_value),
"filename": filename,
"line_num": line_num,
"func_name": func_name,
"text": text,
"local_vars": local_vars
}
return None, error_info

result, error_info = divide_numbers(10, 0)

if result is None:
print("An error occurred:")
print(f"Exception Type: {error_info['exception_type']}")
print(f"Exception Value: {error_info['exception_value']}")
print(f"File: {error_info['filename']}, Line: {error_info['line_num']}")
print(f"Function: {error_info['func_name']}")
print(f"Code: {error_info['text']}")
print("Local Variables:")
for var_name, var_value in error_info['local_vars'].items():
print(f"{var_name}: {var_value}")
else:
print(f"Result: {result}")
❀4πŸ‘2⚑1πŸ‘Ž1