Computer Science and Programming
156K subscribers
449 photos
32 videos
37 files
743 links
Channel specialized for advanced topics of:
* Artificial intelligence,
* Machine Learning,
* Deep Learning,
* Computer Vision,
* Data Science
* Python

Admin: @otchebuch

Memes: @memes_programming

Ads: @Source_Ads,
https://telega.io/c/computer_science
Download Telegram
This media is not supported in your browser
VIEW IN TELEGRAM
12 Most Common git Commands YOU MUST KNOW

- init
- clone
- status
- add
- commit
- push
- pull
- branch
- checkout / switch
- merge
- diff
- log
๐Ÿ‘167๐Ÿ”ฅ1๐Ÿ˜1
This media is not supported in your browser
VIEW IN TELEGRAM
NoSQL vs SQL

NoSQL databases provide flexible data models ideal for diverse data structures and scalability.

1. Key-Value: Simple, uses key-value pairs (e.g., Redis).
2. Document: Stores data in JSON/BSON documents (e.g., MongoDB).
3. Graph: Manages complex relationships with nodes and edges (e.g., Neo4j).
4. Column Store: Optimized for analytics, organizes data by columns (e.g., Cassandra).

SQL databases, like RDBMS and OLAP, provide structured, relational storage for traditional and analytical needs

1. RDBMS: Traditional relational databases with tables (e.g., PostgreSQL & MySQL).
2. OLAP: Designed for complex analysis and multidimensional data (e.g., SQL Server Analysis Services).
๐Ÿ‘134
This media is not supported in your browser
VIEW IN TELEGRAM
6 Software ARCHITECTURAL PATTERNS

- Event Driven
- Layered
- Monolithic
- Microservice
- MVC
- Master Slave
๐Ÿ‘156
Explore Human Parsing Modality for Action Recognition

๐Ÿ“„ https://arxiv.org/pdf/2401.02138.pdf

๐Ÿ’ป https://github.com/liujf69/EPP-Net-Action
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘45
This media is not supported in your browser
VIEW IN TELEGRAM
Public Static Void Main(String[] args) Explained.

โค public: An access modifier keyword that indicates the class (MainClass) is accessible from outside the package.

โค class: A keyword used to declare a class in Java.
MainClass: The name of the class. It follows the naming conventions for classes in Java.

โค { and }: Curly braces define a block of code. In this case, they enclose the body of the class.

โค public: An access modifier keyword indicating that the main method can be called from outside the class.

โค static: A keyword indicating that the main method belongs to the class itself rather than to an instance of the class.

โค void: A keyword indicating that the main method does not return any value.

โค main: The name of the method. It is the entry point for the Java program.

โค (String[] args): The method parameter list. String[] args is an array of strings that can be used to pass command-line arguments to the program.

โค System.out.println("Hello, World!");: A statement that prints the string "Hello, World!" to the console. System.out is an object representing the console output, and println is a method to print a line.
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘146๐Ÿ‘Ž2
This media is not supported in your browser
VIEW IN TELEGRAM
18 most used Linux commands YOU MUST KNOW

- ls
- mv
- ssh
- cd
- cat
- sudo
- pwd
- grep
- top
-mkdir
- find
- wget
- rm
- chmod
- tar
- cp
- chwon
- gzip
๐Ÿ‘237๐Ÿ‘Ž3โค1
This media is not supported in your browser
VIEW IN TELEGRAM
๐ŸŒ Public vs Internal Load Balancers: Unveiling the Power of Balance! ๐Ÿ”„

Load balancing is the unsung hero of seamless digital experiences, and choosing between public and internal load balancers can be a game-changer. Let's dive into the key differences in a nutshell! ๐Ÿš€

๐ŸŒ Public Load Balancers:
- Audience: Everyone, Everywhere!
- Designed to distribute incoming traffic across public-facing servers.
- Ideal for applications accessible over the internet, such as websites or APIs.
- Acts as the gateway, directing external requests to the right internal resources.

๐Ÿข Internal Load Balancers:
- Keep it in the Family:
- Tailored for distributing traffic within a private network or data center.
- Perfect for applications serving internal users or specific services behind the scenes.
- Enhances security by keeping sensitive systems shielded from the public eye.

๐Ÿค” How to Choose?
- Public:
- Opt for when your services need to be accessible from the internet.
- Ideal for handling high volumes of external traffic.
- Best suited for public-facing applications like websites or APIs.
๐Ÿ‘98โค1
This media is not supported in your browser
VIEW IN TELEGRAM
Ever wondered how your computer securely communicates with a remote server? ๐Ÿค”

Let's dive into the magic behind SSH and unravel its secrets. ๐Ÿ”๐Ÿ’ป

1. What is SSH? ๐Ÿคทโ€โ™‚๏ธ
SSH, or Secure Shell, is a cryptographic network protocol that enables secure communication between two devices over an unsecured network. It's like a secure tunnel for your data! ๐Ÿš‡๐Ÿ”’

2. Key Players: Public and Private Keys ๐Ÿ—
SSH uses a pair of cryptographic keys โ€“ a public key (shared with the world) and a private key (kept super-secret). ๐Ÿคซ When you connect, these keys perform a digital handshake to ensure a secure connection. ๐Ÿค๐Ÿ”‘

3. The Handshake Dance: Authentication ๐Ÿ’ƒ
The handshake involves your computer proving its identity using the private key, and the server verifying it using the corresponding public key. Think of it as a secret password exchange, but way cooler! ๐Ÿ˜Ž๐Ÿ•ต๏ธ

4. Encryption Enchantment: Securing the Chat ๐Ÿ›ก
Once the handshake is complete, SSH wraps your data in layers of encryption, ensuring that even if someone intercepts it, they'll find nothing but gibberish. ๐Ÿค๐Ÿ“ก

5. Port Perfection: Default Port 22 ๐Ÿšช
SSH communicates through port 22 by default. It's like the entrance to your secure data party! ๐ŸŽ‰๐Ÿšช But beware, changing ports adds an extra layer of security. ๐Ÿ•ต๏ธโ€โ™€๏ธ๐Ÿ”

SSH is the superhero of secure communication, ensuring your data remains confidential, and the connection is trustworthy. ๐Ÿฆธโ€โ™‚๏ธ๐Ÿ’ผ Next time you SSH, remember the cryptographic dance happening in the background, making it all possible! ๐Ÿ•บ๐ŸŒ
๐Ÿ‘132๐Ÿ‘Ž3
This media is not supported in your browser
VIEW IN TELEGRAM
Monolithic VS Microservices Architecture. Which one are you using? ๐Ÿค”

In the realm of software architecture, the choice between Monolithic and Microservices can shape the destiny of your application. Let's break down the key differences in a nutshell! ๐Ÿงฉ

1. Monolithic Architecture ๐Ÿฐ

- One Big Castle: Monoliths are like a majestic castle, where all components (database, server, user interface) are tightly knit into a single structure.

- Unified & Simple: Easy to develop and deploy due to its unified structure. Changes are made in one place, making coordination a breeze.

- Scaling Challenges: Scaling can be a challenge. When one aspect needs upgrading, the entire application must be scaled, even if only a small part requires more resources.

2. Microservices Architecture ๐ŸŒ

- City of Specialized Buildings: Microservices resemble a bustling city, with each service as a specialized building handling a distinct function.

- Scalability & Flexibility: Offers scalability on a per-service basis. If one part of the application needs more resources, you can scale just that service.

- Increased Complexity: As the number of services grows, managing the communication between them can become complex. Decentralization brings its own set of challenges.
๐Ÿ‘97โค1
Leveraging SAM for Single-Source Domain Generalization in Medical Image Segmentation

๐Ÿ“„ https://arxiv.org/pdf/2401.02076.pdf

๐Ÿ’ป https://github.com/SARIHUST/SAMMed

@computer_science_and_programming
Please open Telegram to view this post
VIEW IN TELEGRAM
๐Ÿ‘42๐Ÿ‘Ž2
Improving API Performance with Database Connection Pooling

The diagram below shows 5 common API optimization techniques. Today, Iโ€™ll focus on number 5, connection pooling. It is not as trivial to implement as it sounds for some languages.

When fulfilling API requests, we often need to query the database. Opening a new connection for every API call adds overhead. Connection pooling helps avoid this penalty by reusing connections.

How Connection Pooling Works

1. For each API server, establish a pool of database connections at startup.
2. Workers share these connections, requesting one when needed and returning it after.

Challenges for Some Languages

However, setting up connection pooling can be more complex for languages like PHP, Python and Node.js. These languages handle scale by having multiple processes, each serving a subset of requests.

- In these languages, database connections get tied to each process.
- Connections can't be efficiently shared across processes. Each process needs its own pool, wasting resources.

In contrast, languages like Java and Go use threads within a single process to handle requests. Connections are bound at the application level, allowing easy sharing of a centralized pool.

Connection Pooling Solution

Tools like PgBouncer work around these challenges by proxying connections at the application level.

PgBouncer creates a centralized pool that all processes can access. No matter which process makes the request, PgBouncer efficiently handles the pooling.

At high scale, all languages can benefit from running PgBouncer on a dedicated server. Now the connection pool is shared over the network for all API servers. This conserves finite database connections.

Connection pooling improves efficiency, but its implementation complexity varies across languages.
๐Ÿ‘109โค1
If you design complex systems, you'll love sequence diagrams

Complex system architectures can quickly become tangled and hard to follow. Enter sequence diagrams! They keep your design neat and easily understandable.

For example, check out the diagram below. It depicts a client/server interaction, clearly differentiating between a cache hit and a cache miss. This is a prime example of how visual aids simplify complex interactions.

Sequence diagrams are a must when you aim to:

- ๐Ÿš€ Map out end-to-end system workflows.
- ๐Ÿ” Clarify interactions between components.
- ๐Ÿ“š Produce clear and concise documentation.
- ๐Ÿ”ง Identify design flaws.

I have two favorites for creating sequence diagrams. WebSequenceDiagrams and Mermaid (links in comment). You can make sequence diagrams easily with just text.

Do you have a go-to tool for crafting good-looking sequence diagrams? Drop your suggestions below! ๐Ÿ‘‡
๐Ÿ‘76๐Ÿ‘Ž3
This media is not supported in your browser
VIEW IN TELEGRAM
Ever wondered how Docker ๐Ÿณ works?

1. Docker Build ๐Ÿ—
2. Docker Push โ˜๏ธ
3. Docker Run ๐Ÿƒ
4. Docker Pull ๐Ÿšš
5. Docker Images ๐Ÿ–ผ
๐Ÿ‘90๐Ÿ‘Ž3
This media is not supported in your browser
VIEW IN TELEGRAM
18 Most common used Java List methods

1. add(E element) - Adds the specified element to the end of the list.
2. addAll(Collection<? extends E> c) - Adds all elements of the specified collection to the end of the list.
3. remove(Object o) - Removes the first occurrence of the specified element from the list.
4. remove(int index) - Removes the element at the specified position in the list.
5. get(int index) - Returns the element at the specified position in the list.
6. set(int index, E element) - Replaces the element at the specified position in the list with the specified element.
7. indexOf(Object o) - Returns the index of the first occurrence of the specified element in the list.
8. contains(Object o) - Returns true if the list contains the specified element.
9. size() - Returns the number of elements in the list.
10. isEmpty() - Returns true if the list contains no elements.
11. clear() - Removes all elements from the list.
12. toArray() - Returns an array containing all the elements in the list.
13. subList(int fromIndex, int toIndex) - Returns a view of the portion of the list between the specified fromIndex, inclusive, and toIndex, exclusive.
14. addAll(int index, Collection<? extends E> c) - Inserts all elements of the specified collection into the list, starting at the specified position.
15. iterator() - Returns an iterator over the elements in the list.
16. sort(Comparator<? super E> c) - Sorts the elements of the list according to the specified comparator.
17. replaceAll(UnaryOperator<E> operator) - Replaces each element of the list with the result of applying the given operator.
18. forEach(Consumer<? super E> action) - Performs the given action for each element of the list until all elements have been processed or the action throws an exception.
๐Ÿ‘126โค3
This media is not supported in your browser
VIEW IN TELEGRAM
DevOps is a set of practices that combines software development and IT operations. It aims to shorten the software development life cycle and provide continuous delivery with high software quality. ๐Ÿš€

DevOps has several phases

Plan: This phase involves defining the goals, scope, and requirements of the software project. It also includes identifying the stakeholders, risks, and resources needed. ๐Ÿ“

Build: This phase involves writing, compiling, and packaging the code into executable units. It also includes using version control, code review, and configuration management tools. ๐Ÿ”ง

Test: This phase involves verifying that the software meets the quality standards and functional specifications. It also includes using automated testing, performance testing, and security testing tools. ๐Ÿงช

Deploy: This phase involves releasing the software to the production environment or to the end-users. It also includes using deployment automation, orchestration, and monitoring tools. ๐Ÿšš

Operate: This phase involves running and maintaining the software in the production environment. It also includes using incident management, problem management, and change management tools. ๐Ÿ› 

Observe: This phase involves collecting and analyzing data from the software and the production environment. It also includes using logging, tracing, and metrics tools. ๐Ÿ”Ž

Continuous Feedback and Discovery: This phase involves gathering feedback from the stakeholders, users, and customers. It also includes using feedback loops, surveys, and analytics tools. It also involves discovering new opportunities, challenges, and trends. ๐Ÿ“Š

DevOps is a culture that promotes collaboration, communication, and continuous improvement. It helps to deliver software faster, better, and safer. ๐Ÿ˜Š
๐Ÿ‘75
This media is not supported in your browser
VIEW IN TELEGRAM
Computer Memory Explained

Computer memory is like a workspace for your computer. It stores data and instructions that the computer needs to access quickly.

Internal Memory:

1. ROM (Read-Only Memory):
- PROM (Programmable ROM): Programmable once by the user post-manufacturing. ๐Ÿ–Š
- EPROM (Erasable Programmable ROM): Can be erased with ultraviolet light and reprogrammed. โ˜€๏ธ๐Ÿ”
- EEPROM (Electrically Erasable Programmable ROM): Can be erased and reprogrammed electrically, multiple times. โšก๏ธ

2. RAM (Random Access Memory):
- SRAM (Static RAM): Retains data as long as power is supplied, no need to refresh, faster than DRAM. โšก๏ธ๐Ÿ’จ
- DRAM (Dynamic RAM): Stores data in capacitors that must be refreshed periodically, widely used. ๐Ÿ”„
- SDRAM (Synchronous DRAM): Syncs with CPU clock speed for improved performance. โฑ
- RDRAM (Rambus DRAM): High bandwidth memory with Rambus technology. ๐Ÿš€
- DDR SDRAM (Double Data Rate SDRAM): Transfers data on both rising and falling clock edges.
- DDR1: First generation, higher speed and bandwidth than SDRAM. ๐Ÿ†•
- DDR2: Improved version of DDR1 with lower power consumption and higher speeds. ๐Ÿ”‹๐Ÿ’จ
- DDR3: Higher speeds and reduced power consumption over DDR2. ๐Ÿ”‹โž•๐Ÿ’จ
- DDR4: Higher module density and increased performance with reduced voltage. ๐Ÿ”‹๐Ÿ†™๐ŸŽ›

External Memory:

1. HDD (Hard Disk Drive): Uses spinning disks to read/write data, traditional storage device. ๐Ÿ”„๐Ÿ’พ
2. SSD (Solid State Drive): Non-volatile flash memory for faster speed than HDDs. ๐Ÿš€๐Ÿ’พ
3. CD (Compact Disc): Optical disc for storing digital data, used for music and software
๐Ÿ‘168โค2
How Git Works - From Working Directory to Remote Repository

[1]. Working Directory:
Your project starts here. The working directory is where you actively make changes to your files.
[2]. Staging Area (Index):
After modifying files, use git add to stage changes. This prepares them for the next commit, acting as a checkpoint.
[3]. Local Repository:
Upon staging, execute git commit to record changes in the local repository. Commits create snapshots of your project at specific points.
[4]. Stash (Optional):
If needed, use git stash to temporarily save changes without committing. Useful when switching branches or performing other tasks.
[5]. Remote Repository:
The remote repository, hosted on platforms like GitHub, is a version of your project accessible to others. Use git push to send local commits and git pull to fetch remote changes.
[6]. Remote Branch Tracking:
Local branches can be set to track corresponding branches on the remote. This eases synchronization with git pull or git push.
๐Ÿ‘81โค1๐Ÿ‘Ž1
This media is not supported in your browser
VIEW IN TELEGRAM
DevOps Explained!

Plan:
- Defines project goals, scope, and requirements, identifying stakeholders and resources. ๐Ÿ“
Build:
- Involves coding, compiling, and packaging, emphasizing version control and code management. ๐Ÿ”ง
Test:
- Ensures software aligns with quality and functional standards, utilizing automated and security testing. ๐Ÿงช
Deploy:
- Releases software precisely using deployment automation and monitoring tools. ๐Ÿšš
Operate:
- Ensures operational stability, promptly addressing issues with management tools. ๐Ÿ› 
Observe:
- Analyzes data from software and production using logging, tracing, and metrics tools. ๐Ÿ”Ž
Continuous Feedback:
- Gathers ongoing feedback, utilizing loops, surveys, and analytics for improvement. ๐Ÿ“Š
DevOps:
- Cultivates a culture of collaboration, communication, and continuous improvement for faster, better, and safer software delivery.
๐Ÿ‘82โค2
This media is not supported in your browser
VIEW IN TELEGRAM
UNTANGLE Spring Security Architecture ๐Ÿ”’

Authentication and Authorization:
- Validates user identity and orchestrates controlled resource access.
- Empowers comprehensive user authentication and nuanced authorization.

Security Filters:
- Intercepts incoming requests, meticulously enforcing security measures.
- Offers a flexible, layered security filter chain for diverse protection strategies.

Custom Authentication Providers:
- N Authentication Provider: Extends authentication capabilities beyond default configurations. Facilitates tailored authentication strategies and seamless integration.
- DaoAuthentication Provider: Adopts a database-backed approach for user authentication. Scrutinizes user credentials against stored records, heightening security.

Authentication Manager:
- Orchestrates the authentication process, coordinating various authentication providers.
- Serves as a pivotal component in managing user identity verification.

Token-based Security (JWT):
- Implements advanced token-based authentication for stateless communication.
- Facilitates secure interaction without the need for server-side storage.

Session Management:
- Efficiently manages user sessions, mitigating session-related risks.
- Provides adaptability for session creation, tracking, and invalidation.

Authentication Tokens:
- Username Password Authentication Token:Represents user credentials for authentication purposes.
- Leverages usernames and passwords for robust user verification.

Add/Remove Authentication Token:
- Dynamically enables the addition and removal of authentication tokens.
- Ensures real-time control over user authentication, promoting flexibility.
๐Ÿ‘50โค1
๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—ณ๐˜‚๐—ป๐—ฑ๐—ฎ๐—บ๐—ฒ๐—ป๐˜๐—ฎ๐—น๐˜€, ๐—ป๐—ผ๐˜ ๐—ณ๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€

Have you ever wondered why some technologies are still with us, and some disappeared? Here is ๐˜๐—ต๐—ฒ ๐—Ÿ๐—ถ๐—ป๐—ฑ๐˜† ๐—˜๐—ณ๐—ณ๐—ฒ๐—ฐ๐˜ to explain it. This effect tells me that ๐—ฏ๐˜† ๐˜๐—ต๐—ฒ ๐˜๐—ถ๐—บ๐—ฒ ๐—œ ๐—ฟ๐—ฒ๐˜๐—ถ๐—ฟ๐—ฒ, ๐—ฑ๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜€ ๐˜„๐—ถ๐—น๐—น ๐˜€๐˜๐—ถ๐—น๐—น ๐—ฏ๐—ฒ ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—–# ๐—ฎ๐—ป๐—ฑ ๐—ฆ๐—ค๐—Ÿ. It is a concept in technology and innovation that suggests that the future life expectancy of a non-perishable item is proportional to its current age. In other words, the longer an item has been in use, the longer it is likely to continue to be used.

The concept was named after Lindy's Deli in New York City, where Nassim Nicholas Taleb popularized it in his book "๐—ง๐—ต๐—ฒ ๐—•๐—น๐—ฎ๐—ฐ๐—ธ ๐—ฆ๐˜„๐—ฎ๐—ป." According to Taleb, the Lindy effect applies to many things, including technologies, ideas, and cultures, and evaluates their potential longevity.

In software development, we see that ๐—ณ๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€ ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ๐—ป๐—ฑ ๐—ด๐—ผ, ๐—ฏ๐˜‚๐˜ ๐—น๐—ฎ๐—ป๐—ด๐˜‚๐—ฎ๐—ด๐—ฒ๐˜€ ๐˜€๐˜‚๐—ฐ๐—ต ๐—ฎ๐˜€ ๐—ฆ๐—ค๐—Ÿ ๐—ผ๐—ฟ ๐—–# ๐—ฎ๐—ป๐—ฑ ๐—ฐ๐—ผ๐—ป๐—ฐ๐—ฒ๐—ฝ๐˜๐˜€ ๐˜€๐˜‚๐—ฐ๐—ต ๐—ฎ๐˜€ ๐—ข๐—ฏ๐—ท๐—ฒ๐—ฐ๐˜-๐—ผ๐—ฟ๐—ถ๐—ฒ๐—ป๐˜๐—ฒ๐—ฑ ๐—ฝ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—ผ๐—ฟ ๐—ฆ๐—ข๐—Ÿ๐—œ๐—— ๐—ฝ๐—ฟ๐—ถ๐—ป๐—ฐ๐—ถ๐—ฝ๐—น๐—ฒ๐˜€ ๐˜€๐˜๐—ฎ๐˜†. All the energy I put into learning those technologies 10-15 years ago continues to support my work today. Some things changed, but the fundamentals stayed and even got better.

So, try to ๐—น๐—ฒ๐—ฎ๐—ฟ๐—ป ๐˜๐—ต๐—ถ๐—ป๐—ด๐˜€ ๐˜๐—ต๐—ฎ๐˜ ๐—ฑ๐—ผ๐—ป'๐˜ ๐—ฐ๐—ต๐—ฎ๐—ป๐—ด๐—ฒ (quote from Jeff Bezos). Focus on foundations, not frameworks. I've been doing this for two decades now.
๐Ÿ‘170๐Ÿ‘Ž1
๐——๐—ผ ๐˜†๐—ผ๐˜‚ ๐˜€๐˜‚๐—ณ๐—ณ๐—ฒ๐—ฟ ๐—ณ๐—ฟ๐—ผ๐—บ ๐—œ๐—บ๐—ฝ๐—ผ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฆ๐˜†๐—ป๐—ฑ๐—ฟ๐—ผ๐—บ๐—ฒ?

Always believing that you must know everything before doing?

Adjust your viewpoint.

Be a smart learner!
๐Ÿ‘167๐Ÿ‘Ž3