Skip to content

Instantly share code, notes, and snippets.

View sausax's full-sized avatar

Saurabh Saxena sausax

View GitHub Profile
@sausax
sausax / Balsamiq Mockups 3.5.17
Created September 30, 2023 13:04 — forked from kdamsmt/Balsamiq Mockups 3.5.17
Balsamiq Mockups 3.5.17 for Desktop full license key (Tested) or Balsamiq Wireframes for Desktop
Balsamiq Wireframes for Desktop full license key free
This old name is Balsamiq Mockups now the company changing the name to Balsamiq Wireframes for Desktop insteed
HOW TO:
First download softwere here: https://balsamiq.com/wireframes/desktop/
Install and follow screen direction
Use below serial:
=====================================================================================
Write a flask post api to save name, age an occupation in a postgres database. Also write a get api to retrieve the list of user saved in db
Here's an example of a Flask post API to save a user's name, age, and occupation in a PostgreSQL database:
First, create a new Flask application and install the Flask-SQLAlchemy library, which allows you to easily work with a PostgreSQL database:
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://user:password@localhost/dbname'
db = SQLAlchemy(app)
@sausax
sausax / mnist_triplet_loss.py
Created October 20, 2019 22:50
Triplet loss on MNIST using TF tfa.losses.triplet_semihard_loss
import tensorflow as tf
import tensorflow_addons as tfa
from tensorflow.keras.optimizers import Adam
# load and normalize data
(X_train, y_train), (X_test, y_test) = tf.keras.datasets.mnist.load_data()
X_train = X_train.astype('float32')
X_train /= 255.
X_test = X_test.astype('float32')
@sausax
sausax / readme.md
Created December 5, 2018 01:35 — forked from blech75/readme.md
How to fix the "NFS requires a host-only network to be created." message during 'vagrant up'

The following happened to me with Vagrant 2.0 and VirtualBox 5.1.28, though I expect that it affects earlier versions of Vagrant, too.

When using DHCP with NFS, your initial vagrant up might like this:

[...]
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
@sausax
sausax / .ebextensions\deploy.config
Created December 20, 2016 00:42 — forked from pdib/.ebextensions\deploy.config
Installing node and npm on a Django AWS ElasticBeanstalk
# This specifies the deployment process on AWS ElasticBeanstalk for a Django app using npm and Postgres.
#
# The target environment should have access to a Postgres Database through environment variables.
# The environment can be setup using `eb create --database.engine=postgres`
# The necessary environment variables to access the database will be automatically defined on the
# instances of that environment.
#
# In addition, the target environment should define environment variables (django secret key ...).
# They can be manually defined using the AWS ElasticBeanstalk interface on the web.
# They can also be specified when creating the environment from command line, for example: