teleren/devto huggingface dataset:
Abstract API Python SDK
Tags: python, api, opensource
Published: 2024-01-20 00:14:56

I'm excited :) to share about my open source Python library I created to help with using [AbstractAPI](https://www.abstractapi.com/) services.
What can you do with the library? It supports using all current AbstractAPI services:
- Email validation
- Phone number validation
- IP geolocation
- Lookup holidays of a country on a specific date or date range.
- VAT validation/calculation/categories
- IBAN validation
- Exchange Rates live/conversion/historical rates
- Lookup company data using only its domain
- Timezone current/conversion
- Avatars generation
- Website screenshot
- Website scrape
- Image processing

It supports Python >= 3.9 and it is tested on all environments from 3.9 up to 3.12. Tests are run automatically on all supported Python versions by a CI workflow.

Check it and maybe give a star? :)
Repo: https://github.com/ebram96/AbstractAPI-Python-SDK
Doc: https://abstractapi-python-sdk.readthedocs.io/en/latest/
Package: https://pypi.org/project/abstract-api/

Contributions are very welcome.
Balancing Act: Code Less or Lead More?
Tags: discuss
Published: 2024-01-20 00:00:00

---
published_at : 2024-01-20 00:00 +0000
---
How do you navigate the shift from coding-centric tasks to managing larger projects and influencing technical direction? Share insights on balancing coding and leadership responsibilities.
Follow the DEVteam for more discussions and online camaraderie!
{% embed https://dev.to/devteam %}
Fundamental Controller (Laravel)
Tags: laravel, controller, srp
Published: 2024-01-19 23:33:49

---
title: Fundamental Controller (Laravel)
published: true
description: Konsep Penerapan Controller yang baik pada Laravel
tags: #laravel, #controller, #SRP
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o54xgg1yb4xp6eiwpc3h.jpeg
# Use a ratio of 100:42 for best results.
# published_at: 2024-01-09 07:24 +0000
---

Jumlah fungsi (function) dalam satu file controller pada Laravel tidak ada aturan yang baku, tetapi sebaiknya diusahakan untuk menjaga kebersihan dan keterbacaan kode. Penerapan prinsip Single Responsibility Principle (SRP) dapat membantu dalam memutuskan seberapa banyak fungsi yang sebaiknya ada dalam satu file.

Berikut beberapa pedoman umum:

SRP (Single Responsibility Principle): Setiap fungsi sebaiknya memiliki satu tanggung jawab atau peran utama. Ini membantu dalam memahami dan memelihara kode dengan lebih mudah.

Kohesi (Cohesion): Fungsi-fungsi dalam satu file controller sebaiknya berkaitan erat dengan satu sama lain. Jika terdapat fungsi-fungsi yang memiliki tanggung jawab yang berbeda secara signifikan, pertimbangkan untuk memisahkan mereka ke dalam file controller yang berbeda.

Keterbacaan Kode (Readability): Sebaiknya mempertimbangkan tingkat keterbacaan kode. Jika file controller menjadi terlalu panjang dan sulit dipahami, itu bisa menjadi indikator untuk memisahkan fungsi-fungsi tertentu ke file controller yang berbeda.

Mengikuti Konvensi Laravel: Laravel memiliki konvensi tertentu dalam penamaan file dan class controller. Menyimpan fungsi-fungsi yang berkaitan dalam satu file controller sesuai dengan konvensi dapat memudahkan identifikasi dan pemeliharaan.

Jika file controller Anda menjadi terlalu besar, pertimbangkan untuk memisahkan fungsionalitas ke dalam file controller terpisah atau menggunakan fitur seperti resource controllers untuk mengelola operasi CRUD dengan lebih terstruktur.
API/SDK for interior design & filling up empty rooms with furniture
Tags: ai, api, interiordesign, virtualstaging
Published: 2024-01-19 23:33:00

Hey community,

I want to introduce an API/SDK I have built around my platform [Decor8 AI](https://decor8.ai). 

With this API, app builders can integrate the latest generative ai capabilities in their apps. 

The API is helpful to the apps which provide:
1. Online Interior Design Product/Services who can let their users upload photo of their room and provide on-demand designing
2. Interior Design & Architecture Firms looking to give their clients self-service portal. Their clients can imagine their own space with infinite possibilities.
3. Realtors can use virtual staging service to save money on their listings.

**How is the API different than GenAI's in-painting features?**
The API uses Stable Diffusion generative AI model to perform in-painting but the magic sauce is in the way it does it. It actually recognizes what's in the room before it does in-painting. In addition, the API preserves a room's layout (walls/windows/doors/ceiling/floor-plan) when re-designing it. This is very important differentiation that just using basic generative-ai model.

Here is the SDK on [Github](https://github.com/immex-tech/decor8ai-sdk) - Take a look. 
 
Please don't hesitate to reach out to me if you're interested in integrating this api into your app.

Looking forward to hearing questions/feedback/comments from the community members.

Thanks for your time 🤜

Best,
Akhilesh
E-Commerce with Angular & Firebase, part one.
Tags: angular, firebase, designpatterns, tailwindcss
Published: 2024-01-19 23:30:00

Hello guys,
Long time no post yet, sorry for that, I'm back with this project idea for beginners as well as advanced. I came up with a blog series where we'll cover all the build functionality that an e-commerce site has, and try to make it a production level of quality.
So this is the first part as part one, in this blog, I'll cover the installation and packages that we'll gonna use in this project.

> Which policy is the best ?
> Honesty ❌
> Documentation ✅

## Pre-requisites 🤓:

1. [Angular 17](https://angular.dev).
2. [Firebase](https://firebase.google.com).
3. [daisyUi](https://daisyui.com/).
4. [Design patterns](https://refactoring.guru/design-patterns).

## Installation 📖:
First start with Angular CLI installation, if you don't have the Angular CLI installed in your system, then you should run this command to install it globally in your system.

```bash
npm i -g @angular/cli
```
Or if you've already installed it and it is an older version, that needs an upgrade ?, then you should run this command to update your CLI and core of Angular.

```bash
npm i -g @angular/cli@17
```

```bash
npm i -g @angular/core@17
```
You can follow the main documentation too, [read docs](https://update.angular.io/?v=16.0-17.0).

### Create a new angular project:
If you know this step then you can skip that step to create a new angular project, if you're new to angular then sir, follow me or you can follow the main documentation.
To create a new project, open your destination folder, open the terminal or command prompt, and run this command to create a new angular project folder.

```bash
ng new ecommerce --routing --style=css --no-standalone
```
Hit the enter key and another option will ask you, whether you want SSR `(Server-side rendering)` or not?, so type `n` for no, and hit enter, It'll create a new `ecommerce` folder of the angular project.

### Install packages:
Open this project in your text editor or Visual Studio Code, open the terminal panel of Visual Studio Code, and run this command to install the packages, that we'll gonna use to build our e-commerce project.

``` bash
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init
npm i -D daisyui@latest
npm install firebase
```
Run these commands one by one, so that every package will installed properly, if you know how to install all packages in one shot, then its beneficial to you and for me too, because I don't know, so comment down in the comment section so that I wanna know, what'll be the command to achieve it one single command.
Now see you and I have finished the pre-requisites for this blog post, just one thing is left, and that's the design patterns, we'll gonna have that in my upcoming blog posts.
🐥 Demystifying the AI Jargon: A Beginner's Guide
Tags: ai, chatgpt, llm
Published: 2024-01-19 23:05:54

As AI technology advances rapidly, the terminology can be confusing. Here's a quick guide to some of the key AI jargon I came across recently:

- **Models** - Large data sets that are trained on lots of data to understand prompts and questions. They vary in speed, price, size and quality.
- **LLMs (Large Language Models)** - Models specifically focused on understanding and generating natural language text.
- **Providers** - Services like OpenAI, Anthropic, Replicate, Cohere, Amazon Bedrock that provide easy APIs to test and run AI models.
- **Hugging Face** - A hub for open source machine learning models anyone can use. Has hundreds of models for text, image and speech tasks.
- **Tokens** - The way models count length of text prompts sent to them. More tokens used = more expensive.
- **Embeddings** - Turning text into mathematical representations models can match for similarity.
- **Temperature** - Setting that affects how creative/random a text generation model will be.
- **Top percentile (Top p)** - Similar setting that tweaks how deterministically the same a model's outputs will be.
- **Fine tuning** - Customizing a model by training it further on your own specialized data set.
- **Prompts** - What you send the model to prime it to generate a useful response.
- **VectorDB** - Database for searching embeddings to find similar documents.
- **Streaming** - Displaying a model's output as it generates, rather than waiting for it to finish.
- **Evals** - Test suites to evaluate model quality over time.
Pages and Blocks in DBMS
Tags: database, postgres, sql
Published: 2024-01-19 23:02:02

Hey there! I'm not so active here cause I don't write things that often, but here we are.

Been spending a lot of time around databases and everything around them, so I wanted to understand how data gets read and it's crazy how everything is orchestrated.
Usually pages and blocks are called interchangeably which pissed me off. 

Disclaimer: I'm not an expert on this subject and might make mistakes. 

We'll consider a scenario where we're dealing with a Relational Database (eg: Postgres)

**A Table row is stored as tuples in disk**
Remember this, what I mean by tuple is just an array of your entries in a row. 

But of course, you can't store all these rows as it is on disk. So these rows are bundled together in Pages (database)

A page can have a bunch of rows next to each other with increasing order of IDs.


![How tuples stored in a page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ioxxddnnxd0l27u9ewbd.png)
Let's not waste time around the technicals of the page.

Now whenever you read a row, you're fetching a whole page! (It's mainly due to efficiency. Disk I/O operations are expensive (time-consuming)) and posts this page in its cache (RAM) so in case if you re-read it you don't have to search the disk.

-- Easy till here --

Now storing this page on disk requires more work, we can't just store all pages as it is cause OS handles a lot of other things (READ about fragmentation) 

So these pages ( end up breaking up into smaller chunks into a block (around 2kb).

Block is a logical unit of data in OS, in other words, OS tells with data as blocks. So it's part of file system jobs whenever to combine all these chunks of blocks into a page/file. 

-- Still easy -- Cause we're not deep diving it. 

But this physical disk? In that realm there are no blocks, but pages or sectors. 

So There is a module called Disk Controller which puts these blocks into a disk and it's their job to take care of everything. 
Here in simple terms, this controller maintains an LBA (Logical Block address) to Physical address mapping. 

And on fetching this gets cached in the File system.

--- That's it --

I haven't deep-dived on things work but I suggest you should.
Feel free to reach out, and follow my socials!
Creating Recommendation Software Portfolio Project
Published: 2024-01-19 23:00:46

# Recommended Language Project
This project is to create a terminal program on python for https://www.codecademy.com as part of my `Portfolio Project: Creating Recommendation Software` project. This project is about getting recommendations of languages based on the categories the user chose.

To start the program, type in the shell `python script.py`

The project page: https://github.com/CornSnek/computer_language_recommendation

I have used the wikipedia page https://en.wikipedia.org/wiki/List_of_programming_languages_by_type as data for my project. The data was parsed by reading each header file, creating an enum number from that header, and extracting the hyperlinks from each header. There were some trial-and-error to extract the language names correctly without Python throwing exceptions due to "Out of bounds" errors or logical errors.

I have used 3 algorithms I have learned from Codecademy that are used to parse and output data. One algorithm was the binary search, which was used to get the category enum number from each language (A language can have more than one category, and the category enum numbers are sorted from lowest to highest). The second algorithm was the Knuth–Morris–Pratt algorithm (KMP algorithm). This was used to search each languages/categories if they match. The last algorithm were heaps and heapsort. Heapsort was used to order each language from the Wikipedia in alphabetical order. Out of the 3, Heap/heapsort was the trickiest to implement and unit test to get passing tests.
Day 898 : Every Lil'
Tags: hiphop, code, coding, lifelongdev
Published: 2024-01-19 22:44:43

_liner notes_:
- Professional : Whew...what a day! Did a couple of things before heading downtown for the Orlando Devs board members meeting. It was good to see everyone in person. Got to demo the project I've been working on. Every lil' functionality I built worked without any problems. It went really well! Everyone seemed to like it and got some suggestions for features that I'll be working on. Also went to get photos taken so I can get my passport renewed. Finally made my way back to my spot exhausted. haha

- Personal : Last night, I bought some tracks from Bandcamp and put together the social media posts. Also did some work on the playlist for the radio show. Went to bed kind of early so I could get up and make sure the demo application worked so I could show it at the meeting.


![A photo of the ocean at sunset in China Cove, CA, USA. The sun is setting over the horizon, casting a golden glow over the water. The waves are gently crashing against the shore. There are some trees and rocks on the shore. The sky is a deep blue, fading to lighter blue at the horizon.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fqoufnkuqconcd32443c.jpg)

I put together the playlist for this week's radio show last night. Tonight, I'm going to type it up in the official doc and get the social media posts together. Going to do some work on my side project. Definitely want to watch the final episode of "Echo" before going to bed. Maybe I'll do some research for the radio show on Saturday: https://kNOwBETTERHIPHOP.com and study sessions on Sunday: https://untilit.works

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube ueS7-ywgK9o %}
The Best PUBG Saudi UC Store
Tags: webdev
Published: 2024-01-19 22:24:18

<p style="text-align: justify;">في عالم مشحون بالأدرينالين من لعبة ببجي، حيث البقاء هو الهدف النهائي، اعتاد اللاعبون على الاعتماد على تشكيلة واسعة من الأسلحة تتراوح بين الأسلحة النارية والأدوات الحادة. ومع ذلك، في الآونة الأخيرة، ظهر منافس غير متوقع كبطل لا يحظى بالتقدير على ساحة المعركة - وهو البسيط "<a href="https://saudiuc.com/shadat-pubg/c115100218"><strong>شحن شدات ببجي</strong></a>".</p>
<p style="text-align: justify;">في الغالب يتم تجاهل المفاتيح لصالح أسلحة أكثر فعالية، إلا أن المفتاح قام بنحت مكانة خاصة كأداة متعددة الاستخدامات يمكنها تغيير مجرى المعركة. المصممة أصلاً لإصلاح المركبات وإصلاح التلف، اكتسبت المفتاح هدفًا جديدًا على ساحة المعركة، حيث أصبحت سلاحًا قويًا في المعارك القتالية القريبة.</p>
<p style="text-align: justify;">اكتشف لاعبو ببجي مجموعة فريدة من الميزات للمفتاح، مما جعله خيارًا مفاجئًا للقتال عند القرب. حركته السريعة والأذى الجيد الناتج عنه أفاجأ العديدين من الخصوم، مما يقدم للاعبين بديلاً عن الأسلحة الحادة التقليدية مثل السكاكين والعصي.</p>
<p style="text-align: center;"><img src="https://cdn-ak.f.st-hatena.com/images/fotolife/t/toddpedersen/20240120/20240120021747.jpg" width="1200" height="650" loading="lazy" title="" class="hatena-fotolife" itemprop="image" /></p>
<p style="text-align: justify;">إحدى الميزات الرئيسية لمفتاح ببجي هي طبيعته الصامتة ولكنها فتاكة. في لعبة حيث تلعب الخفة والمفاجأة دورًا حاسمًا، يمكن أن تكون قدرة المفتاح على التخلص من الأعداء بصمت قاطعة للشكل. يمكن للاعبين، وهم يتجولون في الظلال بمفتاح في يدهم، إبطال القوى الخصمة بسرعة دون إنذار الأعداء القريبين، مما يمنحهم ميزة استراتيجية.</p>
<p style="text-align: justify;">ليس "<a href="https://saudiuc.com/shadat-pubg/c115100218"><strong>شدات ببجي</strong></a>" مقتصرة على المعارك فقط. الظل الدائم للمنطقة الزرقاء المتقدمة، مع ضررها الذي لا ينتهي، يجبر اللاعبين على الحركة باستمرار. سواء كانوا يتنقلون في الغابات الكثيفة أو في المدن أو في الحقول المفتوحة، فإن الرحلة مليئة بالخطر، وكل خطوة هي مقامرة.</p>
<p style="text-align: justify;">في اللحظات الأخيرة، عندما يتنافس الناجون القلائل في ساحة تقلصة، يصل الحدة إلى ذروتها. الرهانات في أوجها، والخط الرفيع بين النصر والهزيمة يصبح حادًا. كل رصاصة، وكل قرار، وكل نفس يمكن أن يعني الفارق بين عشاء دجاج مجيد وطعم المرارة للهزيمة.</p>
Do devs spend significant time on application rolling updates and rollbacks?
Tags: devops, sre, developers, productivity
Published: 2024-01-19 22:23:46

## Here’s why
The management of complex applications come with an overhead and providing a standard way to deploy, manage and scale becomes crucial for modern cloud-native environments. Below are a few things to consider before rolling out new versions of application code:
<br>
### 1. Updates
Manage updates across multiple instances or servers might become more complex and error-prone.
<br>
### 2. Availability
Modern applications are expected to be always available, with no downtime.
<br>
### 3. Storage
Many applications maintain client sessions, cached data, connections to backends, etc. that have state that needs to be handled.
<br>
### 4. Traffic
Traffic needs to be slowly shifted from the old version to the new version through various orchestration techniques.
<br>
### 5. QA
Every update needs rigorous testing and validation before releasing.
<br>
This increases complexity that stems from the need to carefully choreograph rolling out new application versions to customers without introducing any bugs, errors, or downtime which is why companies resort to investing heavily in DevOps and SRE’s to streamline and automate updates.
Preparando o ambiente de trabalho e utilizando APIs google.
Tags: beginners, tutorial, googlecloud
Published: 2024-01-19 21:53:42

Guia rápido de como começar ativar e começar a usar as APIs google. 

#Acesso o console de desenvolvedor
- Abra o navegador e acesse [Console do Google](https://cloud.google.com/cloud-consol)
- Se ainda não tiver um projeto, clique em 'criar projeto'

#Ativando a API
-No painel de controle clique em 'Ativar APIs e Serviços'
-Na biblioteca encontre a API que você quer utilizar
-Escolha a API e clique em 'Ativar'

#Criando credenciais
-No painel de controle clique em 'Criar Credenciais'
-Selecione o tipo de credencial que faça sentido de acordo com o projeto .Por exemplo, se estiver desenvolvendo uma aplicação da web, escolha "ID do Cliente OAuth"
-Configure as informações necessárias, como URLs.
-Clique em 'Criar' e faça o download das credenciais geradas. Nota que este arquivo é muito importante e você deve guardar com cuidado.

#Papeis e permissões
-No console, acesse a seção 'IAM' 
-Adicione os membros da sua equipe atribua papeis apropriados

#Integrando credenciais a aplicação
-Use as credenciais baixadas de acordo com o que a documentação da API pede
-Mantenha as credenciais em segredo. Recomendo usar dotenv ou algo do tipo.
Want to Turn the JavaScript Console Into a Mean Console? Now, You Can!
Tags: javascript, programming, softwaredevelopment, softwareengineering
Published: 2024-01-19 21:38:57

Donato Rimenti did it again! If you are not familiar with him, he is the developer behind the [React PokeDom](https://writech.run/blog/check-out-react-pokedom-a-library-to-catch-pok%C3%A9mon-alongside-dom-events-eb1c4f391e3c) and [GomorraSQL](https://writech.run/blog/check-out-gomorrasql-a-library-to-write-queries-in-neapolitan-3e85568dddb4) projects. The first one allows you to catch Pokédom hidden in the DOM of a web page, while the latter has more than 1.2k stars on GitHub and enables you to write SQL queries in Neapolitan.

This time, he came up with [Mean Console](https://github.com/aurasphere/mean-console). The motto behind this library?

> "Let the console express how it feels about your coding mistakes!"

Have you ever wondered what the console would tell you if it was a human being frustrated by your countless coding mistakes? Well, this is exactly what this new project is all about!

Let's now understand what Mean Console is and how it works.

## What Is Mean Console?

Mean Console is an npm library that enables the JavaScript console to tell you what it honestly thinks about your code. Every time the [`console.error()`](https://developer.mozilla.org/en-US/docs/Web/API/console/error) gets called, the library will add a special comment for you to the error message.

Some of the funniest messages it will tell you are:

- "Some drink from the fountain of knowledge; you only gargled"

- "I'm jealous of all the people who haven't read your code"

- "Aw, it's so cute when you try to code things you don't understand"

Technically speaking, it simply overrides `console.error()` by adding custom insult extraction logic.

When to use Mean Console? The scenarios are endless! You could secretly install it to see the reaction of your colleagues or have a fun pair programming session, competing to see who makes the console madder.

## How to Make the JavaScript Console Speak Truthfully About Your Coding Skills

Integrating Mean Console into your code is not difficult. First, add [`@aurasphere/mean-console`](http://twitter.com/aurasphere/mean-console) to your project dependencies with:

```shell
npm install @aurasphere/mean-console
```

Then, import it into your code with the line below:

```javascript
import "@aurasphere/mean-console"
```

Et voilà! You will now receive an honest message from the console whenever `console.error` is invoked.

## Conclusion

In this article, we looked at Mean Console, a npm library that allows the JavaScript console to give you an honest opinion about your code. Making coding into a fun experience isn't that easy, but this library definitely pulls it off!

Thanks for reading! I hope you found this article helpful.
  
***
_The post "[Want to Turn the JavaScript Console Into a Mean Console? Now, You Can!](https://writech.run/blog/want-to-turn-the-javascript-console-into-a-mean-console-now-you-can-8b8f34d271c9/)" appeared first on [Writech](https://writech.run)._