Skip to content

Instantly share code, notes, and snippets.

View vidit0210's full-sized avatar
🎯
Focusing

Vidit Shah vidit0210

🎯
Focusing
View GitHub Profile
np.random.seed(5)
l=list(df.index)
np.random_shuffle(l)
df = df.iloc[l]
from sklearn.model_selection import StratifiedKFold
from sklearn.base import clone
skfolds = StratifiedKFold(n_splits =3,random_state=42)
for train_index,test_index in skfolds.split(X_train,y_train_5):
clone_clf = clone(sgd_clf)
X_train_folds = X_train[train_index]
y_train_folds = y_train_5[train_index]
X_test_fold = X_train[test_index]
@vidit0210
vidit0210 / A* C++
Created June 26, 2019 23:06
A* C++ Udacity Course Algo
#include <algorithm> // for sort
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
enum class State {kEmpty, kObstacle, kClosed, kPath, kStart, kFinish};
pragma solidity ^0.4.17;
contract Auction {
// Data
//Structure to hold details of the item
struct Item {
uint itemId; // id of the item
uint[] itemTokens; //tokens bid in favor of the item
}
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
}
struct Proposal{
uint voteCount;
class Car{
park(){
return "stopped";
}
drive(){
return "Vroom";
}
}
let car ;
#!/usr/bin/env python3
# Chapter 1 -- The ``__init__()`` Method
# -----------------------------------------
# .. sectnum::
#
# .. contents::
#
@vidit0210
vidit0210 / Combining Color and Region Selections
Created December 16, 2017 17:23
Reference Gist for Lane Detection
mport matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
# Read in the image
image = mpimg.imread('test.jpg')
# Grab the x and y sizes and make two copies of the image
# With one copy we'll extract only the pixels that meet our selection,
# then we'll paint those pixels red in the original image to see our selection
"""
Mini Project:
Developed by:
Vidit Shah
Vivek Shah
Jash Rele
Deep Thakker
"""
"""
Project Title : Lane Detection.
Developed By :- Vidit Shah,
Vivek Shah,
Jash Rele,
Deep Thakker
"""
import cv2