git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
package naive_bayes; | |
import java.util.*; | |
public class NaiveBayesBinary { | |
// lists containing training data | |
private List<Boolean> training_mumPresent = new ArrayList<Boolean>(); | |
private List<Boolean> training_dadPresent = new ArrayList<Boolean>(); | |
private List<Boolean> training_babyPresent = new ArrayList<Boolean>(); | |
private List<Boolean> training_outcome = new ArrayList<Boolean>(); | |
$ uname -r
""" Radon Transform as described in Birkfellner, Wolfgang. Applied Medical Image Processing: A Basic Course. [p. 344] """ | |
from scipy import misc | |
import numpy as np | |
import matplotlib.pyplot as plt | |
def discrete_radon_transform(image, steps): | |
R = np.zeros((steps, len(image)), dtype='float64') | |
for s in range(steps): | |
rotation = misc.imrotate(image, -s*180/steps).astype('float64') | |
R[:,s] = sum(rotation) |
<?php | |
use Illuminate\Pagination\Paginator; | |
//This example is a bit more comlex since I have columns that are foreign keys of the Ticket table. | |
public function index(Request $request) | |
{ | |
if($request->ajax()) { | |
$columns = ['tickets.id', 'client_name', 'location', 'priority_name', 'status_name', 'date']; | |
$draw = $request->draw; | |
$start = $request->start; //Start is the offset | |
$length = $request->length; //How many records to show |
{ | |
"env": { | |
"es6": true | |
}, | |
"extends": [ | |
"plugin:react/recommended", | |
"plugin:@typescript-eslint/recommended", | |
"airbnb", | |
"plugin:import/errors", | |
"plugin:import/warnings", |