Skip to content

Instantly share code, notes, and snippets.

View Vyasdev217's full-sized avatar
💭
Thinking...

Vyasdev Vyasdev217

💭
Thinking...
View GitHub Profile
@Vyasdev217
Vyasdev217 / dictmongodb.js
Created May 15, 2024 17:06
Makes MongoClient object act like dictionary of collections of specified database
const { MongoClient } = require('mongodb');
class DictMongoDB{
constructor(connection_string, log=true){
this.connection_string = connection_string;
this.client = new MongoClient(connection_string);
this.log = log
if (this.client==undefined){ console.log("DictMongoDB>>> CONNECTION FAILED"); }
}
async initialize(db_name, collections=undefined, create_db_if_not_exists=true){
@Vyasdev217
Vyasdev217 / docker_jupyter.sh
Last active June 22, 2023 09:32
An example to setup a docker container and jupyter server in a server and access from another host in LAN
### An example to setup a docker container and jupyter server in a server and access from another host in LAN
## Pull docker image [Only first time]
sudo docker pull tensorflow/tensorflow:latest-gpu-jupyter
## Create and start docker container
sudo docker run --gpus all -it -p 192.168.x.x:8889:8888 -v /source/derectory/in/host:/dest/directory/in/container tensorflow/tensorflow:latest-gpu-jupyter bash
# Create and start docker container with current directory as source directory in host
@Vyasdev217
Vyasdev217 / webhook.py
Last active May 11, 2022 18:26 — forked from Bilka2/webhook.py
Simple discord webhook with python[Forked] : Added simple GUI
import tkinter
import requests #dependency
from tkinter import Scrollbar, Tk,ttk,StringVar
def webhook_send():
global webhookurl
global username
global entry_content
url =webhookurl.get()
#for all params, see https://discordapp.com/developers/docs/resources/webhook#execute-webhook
@Vyasdev217
Vyasdev217 / SimpleVideoPlayer.html
Last active February 18, 2022 05:25
Simple HTML video player
<!DOCTYPE html>
<html>
<head>
<title>SIMPLE MEDIA PLAYER</title>
<style type="text/css">
/* The Modal (background) */
.modal {
display: none;