Skip to content

Instantly share code, notes, and snippets.

View okram999's full-sized avatar

Niris Okram okram999

View GitHub Profile
import os
from langchain.document_loaders import TextLoader
from langchain.text_splitter import CharacterTextSplitter
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Pinecone
import pinecone
from langchain import VectorDBQA, OpenAI
{
"public_identifier": "okramniristotle",
"profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/okramniristotle/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230720%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230720T160137Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=ad19b9e78398b6d6b4cecde342fa1a94515ed24cd6ff077eb4dcdae7ed8ac9dd",
"background_cover_image_url": null,
"first_name": "Niris",
"last_name": "Okram",
"full_name": "Niris Okram",
"follower_count": null,
"occupation": "Sr Solutions Architect at Amazon Web Services (AWS)",
"headline": "Sr. Solutions Architect at Amazon Web Services (AWS) | AWS Certified x 8",
import boto3
client = boto3.client('iam')
def isPasswordEnabled(username):
iam = boto3.resource('iam')
login_profile = iam.LoginProfile(username)
try:
login_profile.create_date
return True
@okram999
okram999 / debug.py
Last active December 2, 2020 05:10
debug.py
import boto3
import logging
import sys
SESSION = boto3.session.Session()
CFT = SESSION.client('cloudformation')
LOGGER = logging.getLogger()
LOGGER.setLevel(logging.INFO)
@okram999
okram999 / networking-screenshot
Last active March 31, 2020 01:44
networking-screenshot
We couldn’t find that file to show.
@okram999
okram999 / landingZone.md
Last active December 24, 2019 21:59
landingZone

Landing Zone Architecture:

image

image

Account Vending Machine:

@okram999
okram999 / Some home work
Last active January 5, 2020 05:16
Some home work
https://aws.amazon.com/premiumsupport/knowledge-center/configure-vpn-backup-dx/
Lambda @Edge
# For Public VIF:
Customer can control the route propagation to AWS using the community tags:
7224:9100 - local
7224:9200 - continent
7224:9300 - Global
Customer can filter AWS routes
@okram999
okram999 / Advance Networking.md
Last active December 11, 2019 16:45
Advance Networking

What are the technical requirements for virtual interfaces to public AWS services such as Amazon EC2 and Amazon S3?

  • A public or private ASN. If you are using a public ASN, you must own it. If you are using a private ASN, it must be in the 64512 to 65535 range.
  • A new unused VLAN tag that you select
  • Public IPs (/30) allocated by you for the BGP session
* VLAN are in customer's DC
* VIF are in AWS VPC
@okram999
okram999 / PlannedHandOver-DevOps
Last active September 6, 2019 14:55
PlannedHandOver-DevOps
9/10:
1. AMI for the build agents
2. Create extra horse power in the agent pool
3. Build Failures
4. SNS Topic Subscription
5. Tagging Resources