Skip to content

Instantly share code, notes, and snippets.

@sasankaweera123
sasankaweera123 / docker-compose.yaml
Created July 26, 2023 04:30
Docker container Creation for MongoDB
version: "3.8"
services:
mongodb:
image: mongo
container_name: mongodb
ports:
- 27017:27017
volumes:
- data:/data
environment:
More load more created
@sasankaweera123
sasankaweera123 / simpleMl.py
Created July 25, 2022 05:09
Basic ML Understanding Code
from sklearn.linear_model import LinearRegression
import random
feature_set = []
target_set = []
nRows = 200
randomNLimit = 2000
for i in range(0, nRows):
@sasankaweera123
sasankaweera123 / smooth-scrolling.js
Created June 30, 2022 12:35
Smooth Scrolling For Website Use
$(document).ready(function(){
// Add smooth scrolling to all links
$("a").on('click', function(event) {
// Make sure this.hash has a value before overriding default behavior
if (this.hash !== "") {
// Prevent default anchor click behavior
event.preventDefault();
// Store hash