Skip to content

Instantly share code, notes, and snippets.

View Jatin-8898's full-sized avatar
🚩
Eat Sleep Code Repeat

Jatin Varlyani Jatin-8898

🚩
Eat Sleep Code Repeat
View GitHub Profile
from flask import Flask, request
import requests
import json
from twilio.twiml.messaging_response import MessagingResponse
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if 'A' in incoming_msg:
# return total cases
r = requests.get('https://coronavirus-19-api.herokuapp.com/all')
if r.status_code == 200:
data = r.json()
text = f'_Covid-19 Cases Worldwide_ \n\nConfirmed Cases : *{data["cases"]}* \n\nDeaths : *{data["deaths"]}* \n\nRecovered : *{data["recovered"]}* \n\n 👉 Type *B* to check cases in *India* \n 👉 Type *B, C, D, E, F, G* to see other options \n 👉 Type *Menu* to view the Main Menu'
print(text)
else:
text = 'I could not retrieve the results at this time, sorry.'
msg.body(text)
from twilio.twiml.messaging_response import MessagingResponse
resp = MessagingResponse()
msg = resp.message()
msg.body('this is the response text')
msg.media('https://example.com/path/image.jpg')
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run(host="localhost", port=5000, debug=True)
@Jatin-8898
Jatin-8898 / .bashrc
Created April 6, 2019 07:03
My alias for Git Bash on Windows 10
# ----------------------
# Git Command Aliases
# ----------------------
alias ga='git add'
alias gaa='git add .'
alias gaaa='git add --all'
alias gc='git commit -m'
alias gs='git status'
alias gr='git remote add origin'
alias gp='git push origin master'

Keybase proof

I hereby claim:

  • I am jatin-8898 on github.

  • I am jatin8898 (https://keybase.io/jatin8898) on keybase.

  • I have a public key ASAKfYU503dnDpMlsoHw6EOiyXl9KhCRJXNW11h4HD6bCAo

const path = require("path");
const webpack = require('webpack');
module.exports = {
entry: path.join(__dirname, "js", "app.js"),
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
@Jatin-8898
Jatin-8898 / package.json
Created December 26, 2018 15:02
For the scss starter pack
{
"name": "sass_starter",
"version": "1.0.0",
"description": "Sass Starter Files",
"main": "index.js",
"scripts": {
"start": "gulp"
},
"keywords": [],
"author": "Jatin Varlyani",
@Jatin-8898
Jatin-8898 / gulpfile.js
Last active June 20, 2019 07:33
Simple way to create the gulp file using the version 4.0.0
var gulp = require("gulp"),
sass = require("gulp-sass"),
postcss = require("gulp-postcss"),
autoprefixer = require("autoprefixer"),
cssnano = require("cssnano"),
sourcemaps = require("gulp-sourcemaps"),
browserSync = require("browser-sync").create();
var paths = {
@Jatin-8898
Jatin-8898 / WebCrawler.java
Created October 2, 2018 16:15
WebCrawler using Java
//package com.webCrawler;
import java.util.*;
import java.net.*;
import java.io.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class WebCrawler{
private Queue<String> queue;