Skip to content

Instantly share code, notes, and snippets.

View haridutt12's full-sized avatar
🎯
Focusing

haridutt12

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 23 16:41:22 2020
@author: Hari Dutt Parashar
"""
import json
from datetime import datetime
import re
In [99]: import pandas as pd
In [100]: data = pd.read_csv('/home/haridutt/Downloads/automobile.csv')
In [101]: X = data.loc[:, ['type', 'engine_s', 'horsepow', 'mpg']]
In [102]: y = data.iloc[:, 1 ]
In [103]: X_opt = X
@haridutt12
haridutt12 / 00_README.md
Created May 31, 2019 10:34 — forked from bjorne/00_README.md
Equivalent binary trees

From the Go tour. Only supports trees of size 10 for now.

def user_login(request):
if request.method == 'POST':
# First get the username and password supplied
username = request.POST.get('username')
password = request.POST.get('password')
# Django's built-in authentication function:
user = authenticate(username=username, password=password)
###########################
## PART 10: Simple Game ###
### --- CODEBREAKER --- ###
## --Nope--Close--Match-- ##
###########################
# It's time to actually make a simple command line game so put together everything
# you've learned so far about Python. The game goes like this:
# 1. The computer will think of 3 digit number that has no repeating digits.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<title>Document</title>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
package main
import (
"fmt"
"io"
"net"
"strconv"
"time"
)
package main
import (
"fmt"
)
func sum(a []int, ch chan int) {
s := 0
for i := 0; i < len(a); i++ {
s += a[i]
package main
import (
"fmt"
"time"
)
func say(s string) {
for i := 0; i < 5; i++ {