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
File f = new File("helloworld.txt") | |
FileOutputStream fos = new FileOutputStream(historyFile, true) | |
DataOutputStream dos = new DataOutputStream(fos) | |
BufferedWriter bw = new BufferedWriter((new OutputStreamWriter(dos))) | |
Date today = new Date() | |
for(int i = 10; i >= 0; i--) { | |
Date anotherDay = new Date() |
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 apispec import APISpec | |
from apispec.ext.marshmallow import MarshmallowPlugin | |
from apispec_webframeworks.flask import FlaskPlugin | |
from flask import Flask, jsonify, render_template, send_from_directory | |
from marshmallow import Schema, fields | |
from werkzeug.utils import secure_filename | |
app = Flask(__name__, template_folder='swagger/templates') | |
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
[req] | |
default_bits = 2048 | |
prompt = no | |
default_md = sha256 | |
x509_extensions = v3_req | |
distinguished_name = dn | |
[dn] | |
C = IN | |
ST = India |
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 flask import Flask, request, jsonify | |
from flask_sqlalchemy import SQLAlchemy | |
from sqlalchemy import select, insert, update, delete | |
from sqlalchemy.exc import SQLAlchemyError | |
app = Flask(__name__) | |
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///todo.sqlite3' | |
db = SQLAlchemy(app) |
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 pprint import pprint | |
import boto3 | |
session = boto3.Session(profile_name='arundhaj') | |
s3_client = session.client('s3') | |
s3_bucket_name = 'codepossibility-presigned' | |
object_name = 'TestUploadFile.txt' |