Skip to content

Instantly share code, notes, and snippets.

model = tf.keras.models.Sequential([
tf.keras.layers.Conv2D(16, (3,3), activation='relu', input_shape=(HEIGHT, WIDTH, 3)),
tf.keras.layers.MaxPooling2D(2, 2),
tf.keras.layers.Conv2D(32, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
tf.keras.layers.Flatten(),
tf.keras.layers.Dense(1024, activation='relu'),
tf.keras.layers.Dropout(0.2),
from tensorflow.keras.applications.vgg16 import VGG16
from tensorflow.keras import layers
from tensorflow.keras.models import Model
base_model = VGG16(weights='imagenet', #pre-trained weights
include_top=False, #remove original classifier
input_shape=(HEIGHT, WIDTH, 3))
#Freeze all layers
for layer in base_model.layers:
architecting.with.gke.workloads.kubernetes.io/safe-to-evict": "true"
import logging
import boto3
from argparse import ArgumentParser, HelpFormatter
from botocore.exceptions import ClientError, ProfileNotFound
# from botocore.errorfactory import UnauthorizedException
# logger config
logger = logging.getLogger()
logging.basicConfig(level=logging.INFO,
@alonlavian
alonlavian / vpc-inside.py
Created August 7, 2022 08:09
Describe resources inside an AWS VPC
import logging
import boto3
from argparse import ArgumentParser, HelpFormatter
from botocore.exceptions import ClientError, ProfileNotFound
# logger config
logger = logging.getLogger()
logging.basicConfig(level=logging.INFO,
format='%(message)s')
@alonlavian
alonlavian / alon-lavian.json
Created May 23, 2023 11:38
Jsoned linkedin profile
{
"public_identifier": "alon-lavian",
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/alon-lavian/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230523%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230523T111453Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=cf270c9149d667b4e1b2124e815f02e1380f03388632b834dfc9c83798e75eb6",
"background_cover_image_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/alon-lavian/cover?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230523%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230523T111453Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=4fd51e1f1feb5235fafad3a69fefb5c0f4a1b9008a0a036254cc0f7311f2e202",
"first_name": "Alon",
"last_name": "Lavian",
"full_name": "Alon Lavian",
"follower_count": null,
"occupation": "Director of Product Management at Orca Security",
"headline": "Director, Product Management