Skip to content

Instantly share code, notes, and snippets.

View kabeer11000's full-sized avatar
💭
Adding Bugs to fix later

Kabeer Jaffri kabeer11000

💭
Adding Bugs to fix later
View GitHub Profile
@kabeer11000
kabeer11000 / client.js
Created September 12, 2022 10:14 — forked from naoki-sawada/client.js
Simple socket.io room and auth example
const io = require('socket.io-client');
const socket = io('http://localhost:3000', {
transportOptions: {
polling: {
extraHeaders: {
'Authorization': 'Bearer abc',
},
},
},
@kabeer11000
kabeer11000 / package.json
Created September 12, 2022 16:43 — forked from jayphelps/package.json
TypeScript output es2015, esm (ES Modules), CJS, UMD, UMD + Min + Gzip. Assumes you install typescript (tsc), rollup, uglifyjs either globally or included as devDependencies
{
"scripts": {
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min",
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015",
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs",
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js",
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz",
}
}
@kabeer11000
kabeer11000 / bi-grams.js
Created August 30, 2023 00:46
Scrabble Bi-Grams based word prediction
const validWords = ["dog", "dough", "doggy", "doodle", "dig", "door"];
const bigrams = ["do", "og"]; // Example bigram array
function generateValidWordsFromBigrams(bigrams, validWords) {
const validGeneratedWords = [];
for (const word of validWords) {
const isValid = bigrams.every(bigram => word.includes(bigram));
if (isValid) {
validGeneratedWords.push(word);
#include <iostream>
#include <sstream>
#include <stack>
#include <string>
// Function implementation, not important for this question
double Task3Evaluate(const std::string& expression) {
std::stack<double> operands;
std::istringstream iss(expression);
/**
* Everyone is familiar with a television. It is the object we are going to create in this lab. First we need
a blueprint. All manufacturers have the same basic elements in the televisions they produce as well as
many options. We are going to work with a few basic elements that are common to all televisions. Think
about a television in general. It has a brand name (i.e. it is made by a specific manufacturer). The
television screen has a specific size. It has some basic controls. There is a control to turn the power on
and off. There is a control to change the channel. There is also a control for the volume. At any point in
time, the television’s state can be described by how these controls are set. We will write the television
class. Each object that is created from the television class must be able to hold information about that
instance of a television in fields. So a television object will have the following attributes:

RanForte Changelog

ed60ec997fcbacfde397c4397c2d77816ed51a5d (2024-03-26)

  • fixed login system View

File Changes:

  • M web/src/pages/api/product/get-products.ts* M web/src/pages/products.tsx

8f29fbcb56fadd0df4d7c1b2bf79ef95f2ab0a71 (2024-03-25)

@kabeer11000
kabeer11000 / modified_nqeens.py
Created March 1, 2025 16:52
INTRODUCTION TO AI: Assignment One - support files
from collections import deque
import heapq
import math
class NQueens:
def __init__(self, N):
self.N = N
self.initial_state = tuple((0, col) for col in range(N))
def actions(self, state):