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 PIL import Image, ImageDraw, ImageFont #dynamic import | |
filename = '1' | |
gif='./data/'+filename+'.gif' #1 | |
img = Image.open(gif) | |
img.save('./readydata/'+filename+".png",'png', optimize=True, quality=70) #2 | |
# Create a file in Documents to test the upload and download. | |
import sys |
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 fs = require("fs"); | |
var StringDecoder = require('string_decoder').StringDecoder; | |
var decoder = new StringDecoder('utf8'); | |
fs.readFile("filename.html", (err, data) => { | |
if (err) throw err; | |
var textChunk = decoder.write(data); | |
console.log(JSON.stringify(textChunk.trim())); | |
}); |
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
#implemented word and Landmark Matching | |
#. __ __ _ _ ____ | |
# | \/ | __ _| |_ ___| |__ / ___| __ _ _ __ ___ ___ | |
# | |\/| |/ _` | __/ __| '_ \ | | _ / _` | '_ ` _ \ / _ \ | |
# | | | | (_| | || (__| | | | | |_| | (_| | | | | | | __/ | |
# |_| |_|\__,_|\__\___|_| |_| \____|\__,_|_| |_| |_|\___| | |
# | |
botName='Ayush-15-defbot' |
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
var cowsay = require('cowsay'); | |
module.exports = async function (context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
if (req.query.text || (req.body && req.body.text)) { | |
context.res = { | |
// status: 200, /* Defaults to 200 */ | |
body: cowsay.say({ | |
text : req.query.text || (req.body && req.body.text), |
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
/*==================================================================================================================+ | |
| | | |
| An election is contested by five candidates. | | |
| The candidates are numbered 1 to 5 and the voting is done by marking the candidate number on the ballot paper. | | |
| Write a program to read the ballots and counts | | |
| the votes cast for each candidates using an array variable count. | | |
| In case, a number read is outside the range 1 to 5, the ballot should be considered as a 'spoilt ballot' | | |
| and the program should also count the number of spoilt ballots. | | |
| |
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
/*==========================================================================================================+ | |
| Assume that a bank maintains two kinds of accounts for customers, | | |
| one called as savings account and the other as current account. | | |
| The savings account provides compound interest and withdrawal facilities but no cheque book facility. | | |
| The current account provides cheque book facility but no interest. | | |
| Current account holders should also maintain a minimum balance | | |
| and if the balance falls below this level, a service charge is imposed. | | |
| Create a class account that stores customer name, account number and type of account. | | |
| From this derive the classes curacct and savacct to make them more specific to their requirements. | | |
| Include necessary member fun |
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
//add username according to your own | |
{ | |
"configurations": [ | |
{ | |
"name": "Mac", | |
"includePath": [ | |
"/usr/include/c++/4.2.1", | |
"/usr/local/include", | |
"/usr/include", |
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
country=us | |
update_config=1 | |
ctrl_interface=/var/run/wpa_supplicant | |
network={ | |
scan_ssid=1 | |
ssid="MyNetworkSSID" | |
psk="Pa55w0rd1234" | |
} |
NewerOlder