Skip to content

Instantly share code, notes, and snippets.

View kaunjovi's full-sized avatar

Kaun Jovi kaunjovi

View GitHub Profile
@kaunjovi
kaunjovi / underfitting-overfitting.py
Last active October 20, 2024 18:51
ML tutorial series. Investigating underfitting and overfitting using sklearn.
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.tree import DecisionTreeRegressor
from sklearn.metrics import mean_absolute_error
if __name__ == "__main__" :
# https://www.kaggle.com/code/kaunjovi/exercise-underfitting-and-overfitting/edit
print(f"Hello world. Pandas version [{pd.__version__}]")
@kaunjovi
kaunjovi / venv-cheat-sheet.md
Last active August 17, 2024 20:28
venv cheat sheet

venv short cheat sheet

git pull [email protected]:<<something>>.git
mkdir .venv 
python3 --version # check if the correct version is getting invoked. 
python3 -m venv .venv 
source .venv/bin/activate
which python3
pip install xyz
codium . 
@kaunjovi
kaunjovi / UnitTest.java
Created May 1, 2017 08:18
Getting started with protobuf.
// 1 : Create a Greeting object using the Protobuf builder.
Builder greetingBuilder = GreetingProtos.Greeting.newBuilder();
greetingBuilder.setGreeting(HELLO_WORLD);
Greeting greeting = greetingBuilder.build();
try {
// 2 : Write the message into a file. Serialize the object.
FileOutputStream output = new FileOutputStream(SER_FILE);
greeting.writeTo(output);
output.close();
// 3 : Deserialize the object from the file.
@kaunjovi
kaunjovi / loose-some-fat-from-header.css
Created December 15, 2016 17:11
Loose some fat from the header of blogger
.Header h1 {
font: normal normal 30px Arial, Tahoma, Helvetica, FreeSans, sans-serif;
color: #152568;
text-shadow: -1px -1px 1px rgba(0, 0, 0, .2);
margin-bottom: 0px;
}
@kaunjovi
kaunjovi / share-code-on-blog.html
Last active December 15, 2016 17:08
Share code on blog.
<!-- Use this script to share your code on blogger. -->
<script src="https://gist.github.com/kaunjovi/869f944e0f9aa03dd220e3986acc9d15.js"></script>
@kaunjovi
kaunjovi / MyApplication.java
Created September 25, 2016 05:12
Spring Boot | Getting started | 0010
package fun.and.games;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
@SpringBootApplication
public class MyApplication {
@kaunjovi
kaunjovi / AngularjsRouteChangeContent.html
Created September 14, 2016 18:54
Route of AngularJs used to change content of an HTML without reloading the page.
<html>
<head>
<title>Routing with AngularJs</title>
<!--Step 1 : Add the angular js and the angular route-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-route.min.js"></script>
</head>
@kaunjovi
kaunjovi / AngularjsRouteHTMLTemplate.html
Created September 14, 2016 18:30
AngularJs with route. This example shows vanilla HTML template.
<html>
<head>
<title>Routing with AngularJs</title>
<!--Step 1 : Add the angular js and the angular route-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-route.min.js"></script>
</head>
<body ng-app="myApp">
@kaunjovi
kaunjovi / LearnAngular00030.html
Created September 13, 2016 15:47
Overriding $scope.variable by HTML, over the value set by JS.
<html>
<head>
<title>Hello world from Angular</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
</head>
<body>
<h1>Hello world from Angular</h1>
<div ng-app="myApp" ng-controller="myController" ng-init="message='Over written.'">
@kaunjovi
kaunjovi / HelloWorldAngularJs.html
Created September 13, 2016 15:27
Hello world with Angular Js
<html>
<head>
<title>Hello world from Angular</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
</head>
<body>
<h1>Hello world from Angular</h1>
<div ng-app="myApp" ng-controller="myController">