Introduction to Computer Science and Python programming
#scholarship
https://www.edx.org/course/introduction-to-computer-science-and-programming-7?utm_campaign=mitx&utm_medium=partner-marketing&utm_source=email&utm_content=mailchimp-6.00.1x-aug2021
#scholarship
https://www.edx.org/course/introduction-to-computer-science-and-programming-7?utm_campaign=mitx&utm_medium=partner-marketing&utm_source=email&utm_content=mailchimp-6.00.1x-aug2021
💻 Linear Algebra for Natural Language Processing
https://www.kdnuggets.com/2021/08/linear-algebra-natural-language-processing.html
Code: https://github.com/Taaniya/linear-algebra-for-ml
@epythonlab #nlp #code #article
https://www.kdnuggets.com/2021/08/linear-algebra-natural-language-processing.html
Code: https://github.com/Taaniya/linear-algebra-for-ml
@epythonlab #nlp #code #article
What is Namespace in Python?
https://www.pythonforbeginners.com/basics/what-is-namespace-in-python
@epythonlab #code #article
https://www.pythonforbeginners.com/basics/what-is-namespace-in-python
@epythonlab #code #article
Forwarded from Epython Lab (Asibeh Tenager)
#CODE_CHALLENGE #PYTHON_LIST #LOOPS #FUNCTIONS
1. Write a function called delete_starting_evens() that has a parameter named lst.
The function should remove elements from the front of lst until the front of the list is not even. The function should then return lst.
For example if lst started as [4, 8, 10, 11, 12, 15], then delete_starting_evens(lst) should return [11, 12, 15].
Make sure your function works even if every element in the list is even!
POST YOUR SOLUTION @PYTHONETHBOT
1. Write a function called delete_starting_evens() that has a parameter named lst.
The function should remove elements from the front of lst until the front of the list is not even. The function should then return lst.
For example if lst started as [4, 8, 10, 11, 12, 15], then delete_starting_evens(lst) should return [11, 12, 15].
Make sure your function works even if every element in the list is even!
POST YOUR SOLUTION @PYTHONETHBOT
Forwarded from Epython Lab
Compilers and interpreters are programs that help convert the high level language (Source Code) into machine codes to be understood by the computers. Computer programs are usually written on high level languages. A high level language is one that can be understood by humans.
However, computers cannot understand high level languages as we humans do. They can only understand the programs that are developed in binary systems known as a machine code. To start with, a computer program is usually written in high level language described as a source code. These source codes must be converted into machine language and here comes the role of compilers and interpreters.
Differences between Interpreter and Compiler
!. Interpreter translates just one statement of the program at a time into machine code where as Compiler scans the entire program and translates the whole of it into machine code at once.
2. An interpreter takes very less time to analyze the source code. However, the overall time to execute the process is much slower. A compiler takes a lot of time to analyze the source code. However, the overall time taken to execute the process is much faster.
3. An interpreter does not generate an intermediary code. Hence, an interpreter is highly efficient in terms of its memory. A compiler always generates an intermediary object code. It will need further linking. Hence more memory is needed.
4. Keeps translating the program continuously till the first error is confronted. If any error is spotted, it stops working and hence debugging becomes easy. A compiler generates the error message only after it scans the complete program and hence debugging is relatively harder while working with a compiler.
5. Interpreters are used by programming languages like Ruby and Python for example. Compliers are used by programming languages like C and C++ for example.
However, computers cannot understand high level languages as we humans do. They can only understand the programs that are developed in binary systems known as a machine code. To start with, a computer program is usually written in high level language described as a source code. These source codes must be converted into machine language and here comes the role of compilers and interpreters.
Differences between Interpreter and Compiler
!. Interpreter translates just one statement of the program at a time into machine code where as Compiler scans the entire program and translates the whole of it into machine code at once.
2. An interpreter takes very less time to analyze the source code. However, the overall time to execute the process is much slower. A compiler takes a lot of time to analyze the source code. However, the overall time taken to execute the process is much faster.
3. An interpreter does not generate an intermediary code. Hence, an interpreter is highly efficient in terms of its memory. A compiler always generates an intermediary object code. It will need further linking. Hence more memory is needed.
4. Keeps translating the program continuously till the first error is confronted. If any error is spotted, it stops working and hence debugging becomes easy. A compiler generates the error message only after it scans the complete program and hence debugging is relatively harder while working with a compiler.
5. Interpreters are used by programming languages like Ruby and Python for example. Compliers are used by programming languages like C and C++ for example.
🔝 Write an SQL query builder in 150 lines of Python!
https://death.andgravity.com/query-builder-how
Join @epythonlab for information #sql #article #python #code
https://death.andgravity.com/query-builder-how
Join @epythonlab for information #sql #article #python #code
This video shows the demo of how to read list of telegram groups links and auto joining and sending message to each group from the list.
Functions:
1. It will jump if there is found that the channel is private or you are banned from it
2. It will jump if you are restricted to write message
3. reading list of links from the file etc.
https://youtu.be/RER4vFGvzf0
Join @epythonlab
Functions:
1. It will jump if there is found that the channel is private or you are banned from it
2. It will jump if you are restricted to write message
3. reading list of links from the file etc.
https://youtu.be/RER4vFGvzf0
Join @epythonlab
YouTube
Auto messaging to telegram groups using Python
Hi everyone, this video shows the demo of the Python script that will auto joining and sending message to anyone of telegram groups including promotion links. Some functions of this project are:
1. Storing list of telegram group links in txt file and reading…
1. Storing list of telegram group links in txt file and reading…
Telegram scraper and adder
The adder script doing the following jobs:
1. Reading credentials from txt file
2. Reading message from txt and send to telegram group randomly when 20 members are added
3. Reading csv file that contains members profile and adding to the target group
4. Once added the first 20-50 members, the file will be deleted automatically and start adding members from another file automatically(Here you can stop the script and change the credentials and run again to add members from another file)
5. Report how many members are added
The scraper doing the following:
1. reading credentials from txt file(you have the opportunity to modify the credentials)
2. scraping members from the selected group
3. Save the members into separate files(50 members in one file)
4. Excluding bots
5. Scraping active users only.
Join @epythonlab
The adder script doing the following jobs:
1. Reading credentials from txt file
2. Reading message from txt and send to telegram group randomly when 20 members are added
3. Reading csv file that contains members profile and adding to the target group
4. Once added the first 20-50 members, the file will be deleted automatically and start adding members from another file automatically(Here you can stop the script and change the credentials and run again to add members from another file)
5. Report how many members are added
The scraper doing the following:
1. reading credentials from txt file(you have the opportunity to modify the credentials)
2. scraping members from the selected group
3. Save the members into separate files(50 members in one file)
4. Excluding bots
5. Scraping active users only.
Join @epythonlab
How to add an Element to a Set in Python
https://www.pythonforbeginners.com/basics/how-to-add-an-element-to-a-set-in-python
@epythonlab #code #article
https://www.pythonforbeginners.com/basics/how-to-add-an-element-to-a-set-in-python
@epythonlab #code #article
Voice group chat is an interesting features of telegram messaging app. Therefore, I have a plan to have a voice group chat and let's to discus about selective topics on Python. Are you interested?
Anonymous Poll
79%
Yes, I am interested
7%
No, I am not interested
14%
May be
K-Centroid Clustering
Summary: Cluster analysis identifies cohesive subgroups of observations within a dataset. It allows us to reduce a large number of observations into a smaller number of clusters.
STEP 1: SELECT APPROPRIATE VARIABLES
The first step is to understand the objectives for segmentation. Then, choose the appropriate variables that provide the information needed for clustering. A sophisticated cluster analysis cannot compensate for the poor choice of attributes.
STEP 2: DATA PREPARATION
Numeric data: Cluster analyses requires numeric data. Many non-numeric variables can be converted to numeric ones. Make sure to remove outliers as clustering algorithms are highly sensitive to outliers.
Variable reduction: This step often requires variable reduction techniques to combine variables that revolve around a particular theme. A common method is Principal Component Analysis (PCA), which reduces a set of related variables into few principal components (PCs) that explain most of the variances in the data. Rule of thumb is to use PCs that account for ~80% variance.
Scaling the data: Standardizing each variable using the z-score ensures that the results are not overly sensitive to variables with higher values.
STEP 3: DETERMINE THE NUMBER OF CLUSTERS
Use the AR and CH indices to determine the optimal method and number of clusters. Use a box and whisker plot. The higher the median and smaller the variation the better. Remember, clustering is an iterative process and may require comparing several models to arrive at a good solution.
STEP 4: CREATE THE CLUSTERING MODEL
Select the variables, standardization process, clustering method, and number of clusters that gave the best solution. Create the cluster model and append the clusters to the dataset.
STEP 5: VISUALIZE AND VALIDATE RESULTS
Visualization helps us determine the meaning and usefulness of the clustering solution. Use summary statistics to understand difference among clusters.
Validate the results: You can use internal validation and/or external validation. Plot the distribution of the validation variable for each cluster using box and whisker plot to visualize the differences.
#keynotes #cluster #kcentroid #dataanalysis @epythonlab
Summary: Cluster analysis identifies cohesive subgroups of observations within a dataset. It allows us to reduce a large number of observations into a smaller number of clusters.
STEP 1: SELECT APPROPRIATE VARIABLES
The first step is to understand the objectives for segmentation. Then, choose the appropriate variables that provide the information needed for clustering. A sophisticated cluster analysis cannot compensate for the poor choice of attributes.
STEP 2: DATA PREPARATION
Numeric data: Cluster analyses requires numeric data. Many non-numeric variables can be converted to numeric ones. Make sure to remove outliers as clustering algorithms are highly sensitive to outliers.
Variable reduction: This step often requires variable reduction techniques to combine variables that revolve around a particular theme. A common method is Principal Component Analysis (PCA), which reduces a set of related variables into few principal components (PCs) that explain most of the variances in the data. Rule of thumb is to use PCs that account for ~80% variance.
Scaling the data: Standardizing each variable using the z-score ensures that the results are not overly sensitive to variables with higher values.
STEP 3: DETERMINE THE NUMBER OF CLUSTERS
Use the AR and CH indices to determine the optimal method and number of clusters. Use a box and whisker plot. The higher the median and smaller the variation the better. Remember, clustering is an iterative process and may require comparing several models to arrive at a good solution.
STEP 4: CREATE THE CLUSTERING MODEL
Select the variables, standardization process, clustering method, and number of clusters that gave the best solution. Create the cluster model and append the clusters to the dataset.
STEP 5: VISUALIZE AND VALIDATE RESULTS
Visualization helps us determine the meaning and usefulness of the clustering solution. Use summary statistics to understand difference among clusters.
Validate the results: You can use internal validation and/or external validation. Plot the distribution of the validation variable for each cluster using box and whisker plot to visualize the differences.
#keynotes #cluster #kcentroid #dataanalysis @epythonlab
Tableau is the best tool for building interactive Dashboard.
Here is the online free trial for 13 days and you can also download the public
https://dub01.online.tableau.com/#/site/pa/home
Here is the online free trial for 13 days and you can also download the public
https://dub01.online.tableau.com/#/site/pa/home
Check If a List has Duplicate Elements
https://www.pythonforbeginners.com/basics/check-if-a-list-has-duplicate-elements
@epythonlab #list #article
https://www.pythonforbeginners.com/basics/check-if-a-list-has-duplicate-elements
@epythonlab #list #article
Scraping is one way of obtaining data from web page. Here you can learn Web scraping with some python libraries.
Mastering Web Scraping in Python: Scaling to Distributed Crawling
https://www.zenrows.com/blog/mastering-web-scraping-in-python-scaling-to-distributed-crawling
@epythonlab #article #code #webscraping
Mastering Web Scraping in Python: Scaling to Distributed Crawling
https://www.zenrows.com/blog/mastering-web-scraping-in-python-scaling-to-distributed-crawling
@epythonlab #article #code #webscraping
Don't miss it out
Link: http://www.udacity.com/scholarships/nokia-bit-scholarship
Link: http://www.udacity.com/scholarships/nokia-bit-scholarship
x = 10
while x < 1000: x = x * 2**4 How many times the loop checks the value of X?
while x < 1000: x = x * 2**4 How many times the loop checks the value of X?
Anonymous Quiz
41%
2
22%
4
17%
3
20%
5
x = 10
while x < 1000: x = x * 2**4 What is the largest value of x?
while x < 1000: x = x * 2**4 What is the largest value of x?
Anonymous Quiz
5%
120
38%
160
25%
1560
32%
2560