Skip to content

Instantly share code, notes, and snippets.

View kradio3's full-sized avatar
🏠
Working from home

Andrey Yaroshenko kradio3

🏠
Working from home
View GitHub Profile
@kradio3
kradio3 / .gitconfig
Created February 14, 2020 09:54 — forked from varlen/.gitconfig
git lg1
[alias]
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
#!/usr/bin/env python
import os
import csv
import cv2
import numpy as np
import math
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
@kradio3
kradio3 / policy.py
Created December 20, 2018 11:44
Dynamic path planner
# ----------
# User Instructions:
#
# Implement the function optimum_policy2D below.
#
# You are given a car in grid with initial state
# init. Your task is to compute and return the car's
# optimal path to the position specified in goal;
# the costs for each motion are as defined in cost.
#
@kradio3
kradio3 / main.cpp
Last active June 15, 2018 11:13
Udacity c++ for programmers. Why classes
/*Goal: sort students by multiple data vaule
**
**student1: Name: Joe Lime, ID#15, Grad. Date: 2019
**student2: Name: Bob Green, ID#3, Grad. Date: 2020
**student3: Name: SallyAnne Green , ID#1, Grad. Date: 2017
**student4: Name: Annie Blue, ID#10, Grad. Date: 2020
**student5: Name: Jose Lemon, ID#25, Grad. Date: 2016
*/
#include "main.hpp"
public class ChessMetric {
private static int[][] moves = {
{ 1, 1, 0,-1,-1,-1, 0, 1, 1, 2, 2, 1,-1,-2,-2,-1}, //x
{ 0, 1, 1, 1, 0,-1,-1,-1,-2,-1, 1, 2, 2, 1,-1,-2} //y
};
public long howMany(int size, int[] start, int[] end, int numMoves){
long dp [][] = new long[size][size];
@kradio3
kradio3 / Drawer.js
Created December 11, 2016 14:34
Importing Drawer with another name
import React from 'react'
import {Navigation, Drawer as MdlDrawer} from 'react-mdl'
export default class Drawer extends React.Component {
render() {
return (
<MdlDrawer title="Title">
<Navigation>
<a href="">{"Link"}</a>