This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is full code for App.js | |
import { | |
StartScreen, | |
LoginScreen, | |
RegisterScreen, | |
ResetPasswordScreen, | |
Dashboard, | |
} from './src/screens' | |
import React from 'react'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is full code for App.js | |
import { | |
StartScreen, | |
LoginScreen, | |
RegisterScreen, | |
ResetPasswordScreen, | |
Dashboard, | |
} from './src/screens' | |
import React from 'react'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_email(email): | |
regex = '^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$' | |
if(re.search(regex,email)): | |
print("Valid Email") | |
return True | |
else: | |
print("Invalid Email") | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sendInlineMessageForBookingTime(chat_id): | |
text_message='Please choose a time slot...' | |
current_time=datetime.datetime.now() | |
current_hour=str(current_time)[11:13] | |
# ----------- Chunk of if statement to determine which inline keyboard to reply user ---------------- | |
if int(current_hour) < 8: | |
keyboard={'keyboard':[ | |
[{'text':'08:00'}],[{'text':'10:00'}], | |
[{'text':'12:00'}],[{'text':'14:00'}], | |
[{'text':'16:00'}],[{'text':'18:00'}], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sendInlineMessageForService(chat_id): | |
text_message='Hi! I am your Hair Sylist Bot!\nI can help you book an appointment.\n\nYou can control me using these commands\n\n/start-to start chatting with the bot\n/cancel-to stop chatting with the bot.\n\nFor more information please contact automationfeed@gmail.com' | |
keyboard={'keyboard':[ | |
[{'text':'Cut'},{'text':'Dye'}], | |
[{'text':'Perm'},{'text':'Reborn'}] | |
]} | |
key=json.JSONEncoder().encode(keyboard) | |
url='https://api.telegram.org/bot'+str(api_key)+'/sendmessage?chat_id='+str(chat_id)+'&text='+str(text_message)+'&reply_markup='+key | |
response = requests.get(url) | |
return response |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import datetime | |
import pickle | |
import os.path | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request | |
# If modifying these scopes, delete the file token.pickle. | |
# SCOPES = ['https://www.googleapis.com/auth/calendar.readonly'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import datetime | |
import json | |
api_key='your_api_key' | |
def run(): | |
url = "https://api.telegram.org/bot{}/getUpdates".format(api_key) | |
response = requests.get(url) | |
data=response.json() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
import matplotlib.pyplot as plt | |
from matplotlib import style | |
import pandas as pd | |
import pandas_datareader.data as web | |
def plot_ma(ticker,start,end): | |
style.use('ggplot') | |
df=web.DataReader(ticker,'yahoo',start,end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
import matplotlib.pyplot as plt | |
from matplotlib import style | |
import pandas as pd | |
import pandas_datareader.data as web | |
def show_closing_price(ticker,start,end): | |
style.use('ggplot') | |
df=web.DataReader(ticker,'yahoo',start,end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const save = require('instagram-save'); | |
const app = express(); | |
app.get('/download', (req,res) => { | |
var URL = req.query.URL; | |
var myDir='/Users/kaikiat/Programming/youtube_dld'; //your_path | |
var splitted_URL=URL.split("/"); ///returns an array | |
var array_length=splitted_URL.length; | |
insta_photo_id=splitted_URL[array_length-2] |
NewerOlder