Skip to content

Instantly share code, notes, and snippets.

Machine Learning Week 1 Quiz 2 (Linear Regression with One Variable) Stanford Coursera

Github repo for the Course: Stanford Machine Learning (Coursera)

Question 1

Consider the problem of predicting how well a student does in her second year of college/university, given how well she did in her first year.

Specifically, let x be equal to the number of "A" grades (including A-. A and A+ grades) that a student receives in their first year of college (freshmen year). We would like to predict the value of y, which we define as the number of "A" grades they get in their second year (sophomore year).

@nonkronk
nonkronk / vscode-tunnel-daemon-oracle-cloud.md
Last active May 12, 2024 16:06
Setup an Always-on VSCode Tunnel on Ubuntu Server

Setup an Always-on VSCode Tunnel on Oracle Cloud Always-free Instance

Access Oracle Cloud VM from any browser on any devices

Install VSCode for arm64

wget -O vscode.deb https://code.visualstudio.com/sha/download\?build\=stable\&os\=linux-deb-arm64 && sudo apt install ./vscode.deb --fix-broken -y && rm vscode.deb
@TheFallender
TheFallender / debloatLossLessCut.ps1
Created October 13, 2022 12:35
Script to debloat the LossLessCut installation from https://community.chocolatey.org/packages/lossless-cut
# To the one that made the original bloatware script, you will be glad to hear that I will give you my most sincere and lovely fuck you.
# Like, who the adds +1500 entries to the registry and doesn't delete them when uninstalling.
# Still, thank you for making the package and mantaining it.
# So, while I have tested this script, I recommend checking it just in case I screwed up in something.
# Remove the media association with LosslessCut
if ((Test-Path -LiteralPath "HKLM:\SOFTWARE\Clients\Media\LosslessCut") -eq $true) {
Remove-Item "HKLM:\SOFTWARE\Clients\Media\LosslessCut" -Recurse -Force -Confirm:$false;
};
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 12, 2024 16:05
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@jjsquady
jjsquady / nextjs-deploy.md
Last active May 12, 2024 16:04
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@narmuni123
narmuni123 / guid_generator.dart
Created May 12, 2024 16:02
In this gist I am adding a code snippet where you can you can generate GUID. Code utilizes a random number generator to create a unique identifier following the standard GUID format. It ensures proper version and variant settings while maintaining the correct hyphenated structure.
import 'dart:math';
class GUIDGen {
static String generate() {
Random random = Random(DateTime.now().microsecond);
const String hexDigit = "0123456789abcdef";
final List<String> uuid = List.filled(36, '', growable: true);
@zmts
zmts / tokens.md
Last active May 12, 2024 15:59
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 12, 2024 15:56
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
@jahirfiquitiva
jahirfiquitiva / settings.json
Created May 11, 2024 22:32
VS Code Settings
{
"breadcrumbs.enabled": false,
"editor.fontFamily": "'MonoLisa', 'Dank Mono', 'Operator Mono Lig', 'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontWeight": "400",
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "explicit",
"editor.stickyScroll.enabled": true,
"explorer.sortOrder": "type",
"workbench.editor.enablePreview": false,
"workbench.editor.highlightModifiedTabs": true,
@companje
companje / map.glsl
Created January 23, 2018 22:46
map() function for GLSL known from Processing & openFrameworks
float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
}