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
Ksivusya [100]
3 years ago
9

The file includes 4993 tweets including the keyword 'election'. Each tweet is represented in a separate line. Write a program to

open the file and read through its lines, then only if a tweet includes a hashtag (a term beginning by the
Computers and Technology
1 answer:
Likurg_2 [28]3 years ago
7 0

Answer:

import re

with open("../../Downloads/Tweets.txt","r", encoding="utf-8") as tweets:

   myfile = tweets.readlines()

   for item in myfile:

       item = item.rstrip()

       mylist = re.findall("^RT (.*) ", item)

       if len(mylist) !=0:

           for line in mylist:

               if line.count("#") >=1:

                   ln = line.split("#")

                   dm = ln[1]

                   print(f"#{dm}")

Explanation:

The python source code filters the document file "Tweets" to return all tweets with a hashtag flag, discarding the rest.

You might be interested in
You have installed a point-to-point connection using wireless bridges and Omni directional antennas between two buildings. The t
kozerog [31]

Answer and Explanation:

Omnidirectional antenna are those antennas which receives the signals from multiple directions equally.These are the antennas that cannot  get the signal from a particular direction thus gives the low throughput.

To get high throughput, directional antennas should be installed because they receive the signal from a particular direction only .Thus the signal received from these antenna work for a certain area.Example-Television antenna at homes are directional antennas names as Yagi-uda antennas.

3 0
4 years ago
In which of the following mouse operations do you move the mouse until the pointer is positioned on the item of choice?
wolverine [178]
It's a. You have to move to the item thus pointing ;D
8 0
3 years ago
.Why are protocols important for networking?
NNADVOKAT [17]

Answer: Networking protocols are important as they define a set of rules to be used for exchanging information between computer nodes.

Explanation:

in terms of networking it is required for the source and the destination to have a set of predefined rules which enables the router to send and receive information across the network in such as way that both the ends are able to receive the messages.

The information exchange takes place first by the client by introducing itself to the remote server. the remote server upon receiving the information uses some form of handshaking and acknowledges the client of the receipt of the message.

besides this there are many routing protocols which tells us about the way how packets are sent from the client to the source. There are two types of routing protocols:

1. static routing protocols

2. dynamic routing protocols.

6 0
3 years ago
CHEGG Why does Akamai need to geographically disperse its servers to deliver its customers’ web content?
Wittaler [7]

Answer:

Find the explanation below.

Explanation:

Akamai is a cloud service and content delivery company that is known for providing web and internet security on a worldwide scale. To effectively discharge their services to their customers, they disperse different content such as videos and pictures in different servers based on the location of their site visitors. They do this in order to reduce the time wasted in loading pages.

Most online visitors are impatient when it comes to pages that load slowly. Spreading these servers across different locations would reduce traffic and thus increase the loading speed.

6 0
3 years ago
Alcohol damages your __________, making it more difficult to understand how far away other objects are.
Zolol [24]

The answer to the blank part of the statement is vision.

When you consume alcohol, your pupils would react slower; you would be less likely to contrast dark and light objects well; your eyes would twitch if your consumption is excessive; and you have dry eye, your symptoms would be exacerbated. This is one of the reasons why people who are drunk aren’t allowed to drive, since they cannot accurately perceive the things around them due to being impaired by alcohol.

7 0
3 years ago
Other questions:
  • The key invention that enabled computers to go into every home and office is
    7·1 answer
  • "Career Clusters" describe a group of ________ within the same industry
    14·1 answer
  • Vanessa and Marie are best friends. Vanessa tells Marie that one of their classmates has been posting nasty comments about Vanes
    10·2 answers
  • FINISH THE SENTENCE <br><br> buzzfeed____reddit_____
    5·1 answer
  • Authorization is a set of rights defined for a subject and an object. They are based on the subject’s identity.a. Trueb. False
    9·1 answer
  • True or False: It is illegal to park in a location that you block or create a hazard for other vehicles.
    11·2 answers
  • Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and s
    12·1 answer
  • Which custom configuration is most likely to include a raid array?
    14·1 answer
  • Write two examples of hard copy output?​
    9·1 answer
  • Describe what impact your personal vision could have your community or on society​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!