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
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
const { Carousel, Image, Suggestions } = require('actions-on-google'); | |
process.env.DEBUG = 'dialogflow:debug'; | |
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, 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
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
const { Carousel, Image } = require('actions-on-google'); | |
process.env.DEBUG = 'dialogflow:debug'; | |
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, 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
'use strict'; | |
const functions = require('firebase-functions'); | |
const {WebhookClient} = require('dialogflow-fulfillment'); | |
const {Card, Suggestion} = require('dialogflow-fulfillment'); | |
const { Carousel, Image, Button, BasicCard } = require('actions-on-google'); | |
process.env.DEBUG = 'dialogflow:debug'; | |
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, 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 urllib.request import urlopen | |
import urllib | |
from bs4 import BeautifulSoup | |
import time | |
import pymsgbox | |
#taking the required variables | |
print("what is your current rating? ") | |
curr = str(input()) | |
print("Enter your username: ") |
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 urllib.request | |
import shutil | |
for i in range(34): | |
url = "http://sites.math.rutgers.edu/~ajl213/CLRS/Ch" + str(i+1) +".pdf" | |
output_file = "LOCATION WHERE YOU WANT TO DOWNLOAD/" + str(i+1) + ".pdf" | |
with urllib.request.urlopen(url) as response, open(output_file, 'wb') as out_file: | |
shutil.copyfileobj(response, out_file) | |
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 zlib | |
def crc32(fileName): | |
prev = 0 | |
for eachLine in open(fileName,"rb"): | |
prev = zlib.crc32(eachLine, prev) | |
return "%X"%(prev & 0xFFFFFFFF) | |
print(crc32("plugin.zip")) |
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
#system uses duck architechture for maximum flexibility | |
class PicardPluginRegistry(type): | |
plugins = [] | |
def __init__(cls, name, bases, atrrs): | |
if name!='PicardPlugin': | |
PicardPluginRegistry.plugins.append(cls) | |
class PicardPlugin(object): |