Category Archives: Uncategorized
delete a branch locally and remote
to delete a local branch: git branch -d bname to delete a remote branch git push origin –delete bname https://www.git-tower.com/learn/git/faq/delete-remote-branch/
consistency for sql with cache
https://yunpengn.github.io/blog/2019/05/04/consistent-redis-sql/
resize image to a specific resolution/pixel
convert -resize 1024X768 source.png dest.jpg #(keep aspect ratio) convert -resize 1024X768! source.png dest.jpg #(not keep aspect ratio) https://askubuntu.com/questions/1164/how-to-easily-resize-images-via-command-line just a side note on how to resize image in scipy for cnn. my_image = “image.jpg” # change this to the name of your image filefname = “images/” + my_imageimage = np.array(ndimage.imread(fname, flatten=False))my_image = scipy.misc.imresize(image, size=(300,225)).reshape((3002253,1))my_image = …
Continue reading “resize image to a specific resolution/pixel”
combine multiple pdfs using command line on macOS
matlab dynamic legend
http://www.mathworks.com/matlabcentral/newsreader/view_thread/146397 % Handle storage h = zeros(1, 5); % Data x = 0:0.1:1; % Color data C = [1 0 0; 1 1 0; 0 1 0; 0 1 1; 0 0 1]; % Prepare the axes hold on axis([0 1 0 1]); % Prepare the string cell array s = cell(1, 5); % Plot …
Fortran and Fortran array
http://orion.math.iastate.edu/burkardt/papers/fortran.html http://orion.math.iastate.edu/burkardt/papers/fortran_arrays.html
Free-form, fixed-form and file extensions for fortran
http://gcc.gnu.org/wiki/GFortranGettingStarted Free-form, fixed-form and file extensions By default, gfortran is aware of a few file extensions, and its action depends on the extension of the file you ask it to compile. Examples: if the file is named code.f gfortran supposes it is fixed-form source, with no preprocessing needed. if the file is named code.f90 gfortran supposes it is free-form …
Continue reading “Free-form, fixed-form and file extensions for fortran”
display specific lines in a file
sed -n “20,40p” filename will display lines from 20 to 40 in the file.