Build and Deploy Twitter Bots with Python, Tweepy and PythonAnywhere
This article will guide beginner Python developers on creating Twitter bots. You will learn the Twitter API while building a your bot and then you will deploy the bot to a cloud platform. The Twitter bot tweets quotes randomly selected from a Random Quotes API service.
To build our Twitter bot, we first need to set up our Python development environment and install the required packages that are needed for us to follow along with this tutorial.
In addition to Python 3, we will be using:
- virtualenv – a development environment
- Requests library – a http library for humans
- Tweepy – an API wrapper for Twitter
- json – a built-in Python library for working with json
- time module – a built-in Python library for working with time
First of all, it is highly recommended and best practice to create a virtual environment before you begin any Python project. We will create a virtual ...
How to Send SMS Reminders from PHP Symfony Applications
If you have a booking system, making appointments such as massage or other therapist bookings, dental or medical appointments, etc., you’d probably like to remind the client about the booking they made on the day of the appointment. In some cases, you might also want to remind the person offering the service. In this tutorial, you'll learn how to send SMS reminders to clients of their upcoming massage appointments, at a designated time before the appointment, in a
Symfonyproject using Twilio's SMS service.
This post assumes that:
- You have already set up a LEMP, MAMP, XAMPP, or equivalent development environment.
- You are familiar with the
We’ll be using
composer(a tool for dependency management) to install
Twilio's SDK. Composer installation instructions can be found here. Also, be sure to install
composerglobally, by following the instructions in the global sub-section.
After installing ...
Introducing PHP Developer Marcus Battle
The house lights darkened. Drums began to play from backstage. Strings warmed up the orchestra pit. Suddenly there were the words I had secretly been waiting for. The ones that the average American still gets wrong twenty years later, but loves to unashamedly sing. "Nants ingonyama bagithi Baba." The introduction to the “Circle of Life” was ringing throughout the auditorium.
I found myself in a parade of 750 pounds of silicone rubber fashioned into Zulu costumes, 18-foot giraffes, flocks of birds in the mezzanine and 6-foot elephants walking through the aisles. The entire auditorium became the stage. The floor opened up to expose Pride Rock and Simba's dedication. My inner child awoke. I completely gave in to experiencing "The Lion King" on Broadway.
“Dad, don’t we eat the antelope?
Yes, Simba. But let me explain.
When we die, our bodies become the grass.
The antelopes eat the grass ...
How to Capture Call Tracking Metrics in Google Analytics with Twilio Programmable Voice
Call tracking involves saving a phone number and recording related the information about the calls made by that number. The metrics can then be used to measure the impact of marketing efforts on lead generation and sales.
Say that you are an entrepreneur or the marketing head of an organization and your main source of leads are phone calls. To spend your marketing dollars wisely, you will have to know which of your campaigns generate the maximum number of calls. This can be done using a call tracking system.
Call tracking systems used to be very expensive and cumbersome. However, in this blog post we will create an easy call tracking system that combines the powers of Twilio and Google Analytics to give you a very detailed picture of the calls and locations of these calls.
Configuring Google Analytics
Start by logging into your Google Analytics account or signing up ...
Audio visualisation with the Web Audio API and React
The Web Audio API is a powerful browser API for creating, manipulating and analysing audio. I'm no musician, so I'll leave the creating and manipulating to the experts. Instead, in this post we're going look at analysing audio. To make things extra interesting, we're going to see how to visualise the audio in a React component with
When we're done we'll have a React application that can listen to the microphone on your computer and show a waveform to visualise the data.
- Clone or download the repo from GitHub
git clone -b getting-started https://github.com/philnash/react-web-audio.git
- Change into the directory and install the dependencies with npm
cd react-web-audio npm install
- Start the application
npm start ...
What is Public Key Cryptography?
From TLS to authentication, “crypto” is used for a lot more than just currencies. In 2018, security should be part of every developer's toolkit and cryptography a fundamental building block for the libraries and tools we use to protect our data and applications. This post will dive into modern cryptography, an overview of how it works, and its everyday use cases — including how Twilio uses public-key crypto in our Authy application and to secure our API.
Let's start with some context and history.
Meet Alice and Bob
Alice and Bob have a history of illicit dealings. We're not really sure what they're up to, but they don't want us, or the ever-curious Eve, to know. Before the internet, Alice and Bob could pass secret messages by encrypting text with an agreed upon cipher. Maybe that was through letter substitution or shifting or other sophisticated methods. They agreed on the method ...
Why We're Never Done Fighting for an Open Internet
tl;dr Call or text California Governor Jerry Brown at 1-833-288-4404 to let him know you support open internet legislation.
We can’t sugar coat the disappointing and controversial decision by FCC Chairman Ajit Pai to roll back the strong net neutrality protections of the 2015 Open Internet Order. Predictably, since the December 2017 FCC vote, internet service providers and wireless carrier companies have acted against the best interests of consumers with increased impunity: both through blocking and throttling consumers communications and introducing steep price increases.
It would be understandable if net neutrality advocates got frustrated, packed up, and moved on -- but that hasn’t happened because there’s simply too much at stake. We’re heartened that supporters are rallying efforts to protect net neutrality at multiple levels of government. There are important efforts taking place across a range of venues: in the courts, at federal ...
Translator via SMS with C# and Azure Functions
What you’ll need:
- A Twilio account (sign up for a free Twilio account here)
- An SMS enabled Twilio number (find one here)
- An Azure account (sign up for a free Azure account here)
- Optional: pieces o' eight!
Azure Functions allow you to write code without having to worry about infrastructure or servers, so they are perfect for setting up a simple webhook for an incoming SMS or call from Twilio.
Create an Azure Function
From the Azure portal, click the Create a resource button, found at the top of the menu on the left. Search for a Serverless Function App and then click on the matching result.
Give your app a name, I called mine
twilio-sms-translator, create or reuse ...
How to Build A Twilio-Hosted Group Messaging Service with Sync, Functions and SMS
With Twilio’s services you can manage your own group SMS application for Scheduling business meetings, planning wedding activities, parties, or a dinner get together. A friend of mine uses group SMS for family communications among his siblings and parents.
Don’t like Facebook? Or someone you want to include in your group doesn’t use Facebook or WhatsApp? No worries, use SMS. Yes, everyone with a mobile phone has an SMS app because your phone comes with an SMS app. You’re Group SMS app ready for group messaging.
The blog, How To: Set Up SMS Broadcasts in Five Minutes, says, “SMS messages are opened 98% of the time within minutes of being received. When you need to reach your constituents quickly and consistently, there’s no better medium than SMS.”
This blog gives you the configuration steps to communicate quickly and effectively with your friends, colleagues or customers ...
Extending Python and Flask Web Applications with APIs
Application Programming Interfaces (APIs) can be a great way to programmatically gather or distribute data. API creation really distills down to creating a set of routes that receive requests and return useful data. For example, visiting this page may be easy for a person to read, but it’s harder for a computer program to extract the information it may need. An API can return just the information a program needs.
The site is organized by sections the user can visit to learn about different topics. For this API, we’ll create an endpoint so that when a user pings it with a topic they want to get content resources for, it returns a list of resources.
Before we start coding ...