This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SIMPLE MEDIA PLAYER</title> | |
<style type="text/css"> | |
/* The Modal (background) */ | |
.modal { | |
display: none; |