Skip to content

Instantly share code, notes, and snippets.

View codewithpom's full-sized avatar
🎯
Building txtutils

Padmashree Jha codewithpom

🎯
Building txtutils
View GitHub Profile
import os
import requests
from bs4 import BeautifulSoup
import openai
# OpenAI API key (replace with your actual API key)
openai.api_key = 'API_KEY_HERE'
# URL of the NDTV Health page
url = 'https://www.ndtv.com/health'
@codewithpom
codewithpom / main.py
Created December 10, 2023 18:46
OpenAI GPT writter
import json
import streamlit as st
from openai import OpenAI
# client = OpenAI(
# # This is the default and can be omitted
# api_key=os.environ["OPENAI_API_KEY"],
# )
import os
import json
import base64
import sqlite3
import shutil
from datetime import timezone, datetime, timedelta
#3rd party modules
import win32crypt
from Crypto.Cipher import AES
@codewithpom
codewithpom / bootstrap-login-page.markdown
Created December 11, 2022 09:49
Bootstrap Login Page
const student = {
name: "Insha",
age: 20
}
let key = "name"
console.log(student[key]) // prints out Insha
@codewithpom
codewithpom / string-to-binary.js
Created November 19, 2021 09:22
Converts a word or sentence to binary
function convertToBinary(text) {
var result = '';
for (var i = 0; i < text.length; i++) {
var char = text[i];
var code = char.charCodeAt(0);
result += code.toString(2) + ' ';
}
return result;
}
@codewithpom
codewithpom / char-to-binary.js
Created November 19, 2021 09:06
Convert a character to binary using js.
function convert_char_to_binary(char){
const code = char.charCodeAt(0); // convert the char to ASCII (UTF-16)
return code.toString(2); // convert ASCII integer to binary
}
const binary = convert_char_to_binary("a")
console.log(binary) // logs '1100001'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@codewithpom
codewithpom / Google-Trend-Single-Graph.ipynb
Created November 17, 2021 14:44
A jupyter notebook with Google Trend analysis on a topic plotted with plotly.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Sample express app
const express = require('express')
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})