1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mel-nik [20]
2 years ago
6

Develop a crawler that collects the email addresses in the visited web pages. You can write a function emails() that takes a doc

ument (as a string) as input and returns the set of email addresses (i.e., strings) appearing in it. You should use a regular expression to find the email addresses in the document.
Computers and Technology
1 answer:
Mars2501 [29]2 years ago
5 0

Answer:

see explaination

Explanation:

import re

def emails(document):

"""

function to find email in given doc using regex

:param document:

:return: set of emails

"""

# regex for matching emails

pattern = r'[\w\.-]+at[\w\.-]+\.\w+'

# finding all emails

emails_in_doc = re.findall(pattern, document)

# returning set of emails

return set(emails_in_doc)

# Testing the above function

print(emails('random text ertatxyz.com yu\npopatxyz.com random another'))

You might be interested in
Convert one billion byte into one storage unit​
notka56 [123]

Answer:

Explanation:

To convert larger units to smaller units (i.e. take a number of gigabytes and convert it down in to megabytes, kilobytes, or bytes) you simply multiply the original number by 1,024 for each unit size along the way to the final desired unit

7 0
2 years ago
Short notes on primary key​
Thepotemich [5.8K]

Answer:

A primary key is a special relational database table column (or combination of columns) designated to uniquely identify each table record. A primary key is used as a unique identifier to quickly parse data within the table. A table cannot have more than one primary key.

Primary Key.

Candidate Key.

Alternate Key.

Super Key.

Composite Key.

Foreign Key.

Unique Key.

In the relational model of databases, a primary key is a specific choice of a minimal set of attributes that uniquely specify a tuple in a relation. Informally, a primary key is "which attributes identify a record," and in simple cases constitute a single attribute: a unique ID.

Explanation:

5 0
1 year ago
What is the destination ip address when an ipv4 host sends a dhcpdiscover message?
hjlf

The destination ip address when an ipv4 host sends a DHCPDISCOVER message Because a DHCP client does not have a valid IPv4 address, it must use a broadcast IP address of 255.255. 255.255 as the destination address to communicate with the DHCP server.

<h3>What does the DHCP server do when it receives the Dhcpdiscover message?</h3>

When the lease has expired, the client must start over with the DHCPDISCOVER process. The client ends the lease by sending a DHCPRELEASE message to the DHCP server. The server will then return the client's IP address to the available address pool.

<h3>What is a Dhcpdiscover message?</h3>

The DHCPDISCOVER message contains an identifier unique to the client (typically the MAC address). The message might also contain other requests, such as requested options (for example, subnet mask, domain name server, domain name, or static route). The message is sent out as a broadcast.

To learn more about DHCPDISCOVER, refer

brainly.com/question/14407739

#SPJ4

8 0
1 year ago
What considerations should you make when deciding on the size of a table?
Kisachek [45]

Answer:

You should consider the number of cells needed for data, labels, titles, and formulas.

Explanation:

4 0
2 years ago
Insufficient vacuum will require the driver to _______________ to adequately activate the brakes?
sp2606 [1]
A i think idk im trying to earn points
8 0
3 years ago
Other questions:
  • Which windows tool is used to determine if a dynamic disk is corrupted?
    6·1 answer
  • What is the basic difference between a printer and a plotter?​
    12·1 answer
  • Consider a binary-search method in an array that reports whether an object is in the array. The documentation indicates that the
    11·1 answer
  • What are the OSHA construction standards also called ?
    10·1 answer
  • When browsing using certain browsers, if a page is known to be malicious or using phishing techniques in the past a browser may
    5·1 answer
  • Test if the word mold is stored in the variable word.
    5·1 answer
  • Calculate the total and average number from 1 to 100<br>​
    12·1 answer
  • Braxton is writing a program to design t-shirts. Which of the following correctly sets an attribute for color?
    7·1 answer
  • 10.
    12·1 answer
  • Refers to the capacity to form bonds with particular
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!