git checkout -- < file >
> git reset HEAD < file >
| [mergetool] | |
| prompt = false | |
| keepBackup = false | |
| keepTemporaries = false | |
| [merge] | |
| tool = winmerge | |
| [mergetool "winmerge"] | |
| name = WinMerge |
| from numpy import unique | |
| from numpy import where | |
| from matplotlib import pyplot | |
| from sklearn.datasets import make_classification | |
| from sklearn.cluster import KMeans | |
| if __name__ == '__main__': | |
| # initialize the data set we'll work with | |
| training_data, _ = make_classification( | |
| n_samples=2000, |
| // In this implementation it is assumed that grid is always 9x9 | |
| function sudoku2(grid) { | |
| // check rows | |
| for(let row = 0; row < grid.length; row++) { | |
| const numbersMap = new Set(); | |
| for(let column = 0; column < grid[row].length; column++) { | |
| if(grid[row][column] === ".") continue; | |
| if (numbersMap.has(grid[row][column])) { | |
| return false; | |
| } else { |
| import React, { useState, useEffect } from 'react'; | |
| /* Custom hook */ | |
| function useAPIFetch(apiURL) { | |
| const [loading, setLoading] = useState(true); | |
| const [data, setData] = useState(null); | |
| function fetchData() { | |
| setLoading(true); | |
| fetch(apiURL) |