Coding skills here for learning
5 subscribers
266 photos
3 files
10 links
Download Telegram
Aggfunc and datediff
Sure! Let's simplify it:

1. Supervised Learning: It's like teaching your dog tricks by showing it what to do and giving it a treat when it gets it right. For example, if you show your dog pictures of cats and dogs and tell it which is which, it will learn to recognize them.

2. Unsupervised Learning: Imagine you have a big box of toys, and you don't know which ones are similar. Unsupervised learning is like sorting those toys into groups based on how they look or what they do without anyone telling you how to group them.

3. Semi-Supervised Learning: This is like when your teacher gives you some homework with answers and some without. You learn from the homework with answers, and then you try to figure out the rest on your own.

4. Reinforcement Learning: Picture yourself playing a video game. You try different moves, and when you do something good, you get points or rewards. Reinforcement learning is like teaching a computer to play a game by giving it points for doing the right things.

5. Deep Learning: Imagine you have lots of LEGO blocks, and you want to build a really cool spaceship. Deep learning is like having instructions to build the spaceship layer by layer. Each layer adds more details until you have an awesome spaceship.

So, in simple terms:
- Supervised learning is like teaching with examples and rewards.
- Unsupervised learning is like sorting things out without being told how.
- Semi-supervised learning is like doing homework with some answers and some without.
- Reinforcement learning is like learning by getting points for doing good things.
- Deep learning is like building something step by step with lots of tiny pieces.
SELECT FLOOR(1 + RAND() * 10) AS random_integer;


RAND()
SELECT * FROM table_name WHERE RAND() <= 0.1;
SELECT * FROM table_name ORDER BY RAND();
re.findall('[\w+]+@[\w\.]+', random_text)
how to use re to list comprehension
Sure, here are some example codes demonstrating the usage of the main functions in Python's re module:

1. re.match(pattern, string, flags=0):
- This function attempts to match the pattern at the beginning of the string.
   import re
result = re.match(r'Hello', 'Hello, World!')
print(result.group(0)) # Output: Hello

2. re.search(pattern, string, flags=0):
- This function searches for the first occurrence of the pattern within the string.
   import re
result = re.search(r'World', 'Hello, World!')
print(result.group(0)) # Output: World

3. re.findall(pattern, string, flags=0):
- This function finds all occurrences of the pattern within the string and returns them as a list.
   import re
results = re.findall(r'\d+', 'There are 123 apples and 456 oranges.')
print(results) # Output: ['123', '456']

4. re.finditer(pattern, string, flags=0):
- This function finds all occurrences of the pattern within the string and returns them as an iterator of match objects.
   import re
matches = re.finditer(r'\d+', 'There are 123 apples and 456 oranges.')
for match in matches:
print(match.group(0)) # Output: 123, 456

5. re.sub(pattern, repl, string, count=0, flags=0):
- This function substitutes occurrences of the pattern in the string with the replacement string repl.
   import re
result = re.sub(r'\d+', 'X', 'There are 123 apples and 456 oranges.')
print(result) # Output: There are X apples and X oranges.

6. re.split(pattern, string, maxsplit=0, flags=0):
- This function splits the string into substrings based on the occurrences of the pattern.
   import re
parts = re.split(r'\s+', 'Split this string by spaces')
print(parts) # Output: ['Split', 'this', 'string', 'by', 'spaces']

These examples demonstrate how to use the main functions in Python's re module for pattern matching, searching, substitution, and splitting text based on regex patterns.

Regex
\d all numbers
\D not numbers
\W not number or letter
\ w only number or letter
\ s special characters
\ S not special characters
recursive cte