git fetch origin —- fetch from origin git reset –hard origin/master — this is the real reset. git clean -f -d **** warning clean will remove all data and directories not tracked. **** so if you have data file or untracked data – it will be gone. **** Not really necessary to really sync the actual code. But it will […]
How to reset git repo to remote origin
rpm – how to find packages based on size
rpm -qa –queryformat ‘%10{size} – %-25{name} \t %{version}\n’ | sort -n returns a list – biggest down at bottom ………. 27698421 – binutils 2.29.1 30080231 – vim-common 8.1.1602 30573277 – python-libs 2.7.18 35589262 – scipy 0.12.1 36808072 – gcc-c++ 7.3.1 39563592 – mariadb 10.2.38 42421327 – python3-libs 3.7.10 48556145 – gcc 7.3.1 49102448 – python2-botocore 1.18.6 84934333 – mariadb-server 10.2.38 […]
Pandas/Python – how to drop a row with ‘NaN’
So, you want to get rid of any row that has ‘NaN’ ( null or not a number ) values, because it doesn’t work with some functions ( or can’t ignore ) obs1.dropna(how = ‘all’, subset = [‘wind_mph’], inplace = True) obs1 = obs1.reset_index(drop=True) Another important point – is that with Pandas – you have to convert any value you […]
Windows – how to start Jupyter notebook without anaconda
So, you pip installed Jupyter. Thinking – hey don’t have to start up Anaconda environment to run it. C:\Users\jonallen\Documents\github\weather_obs>pip install jupyter Collecting jupyter Downloading jupyter-1.0.0-py2.py3-none-any.whl (2.7 kB) Collecting ipywidgets Downloading ipywidgets-7.6.3-py2.py3-none-any.whl (121 kB) |████████████████████████████████| 121 kB 3.3 MB/s Collecting notebook Downloading notebook-6.4.3-py3-none-any.whl (9.9 MB) |████████████████████████████████| 9.9 MB 234 kB/s Collecting jupyter-console Downloading jupyter_console-6.4.0-py3-none-any.whl (22 kB) Collecting nbconvert Downloading nbconvert-6.1.0-py3-none-any.whl (551 […]
Google cloud debian – nslookup is missing
nslookup missing Have to install it. user @iowa_f1:~$ sudo apt-get install dnsutils -y Reading package lists… Done Building dependency tree Reading state information… Done dnsutils is already the newest version (1:9.11.5.P4+dfsg-5.1+deb10u3). 0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded. This will install nslookup and dig. Dig is a dns inquire program, that is a bit more […]
Large .cache directory – Linux
[user@myhost .cache]$ du -sh 72M . So what is this? Pip cache ‘pip cache dir’ [user@myhost ~]$ pip cache dir /home/user/.cache/pip [user@myhost ~]$ to clean – ‘pip cache purge’ [user@myhost ~]$ pip cache purge Files removed: 155 check the space [user@myhost .cache]$ du -sh 2.5M . [user@jibsheet .cache]$ 95% or more reduction of space.
HTML – color cheatsheet
This is a really good one https://htmlcolorcodes.com/color-names/
Windows Putty – Vim – cut and paste not working
I tried lots of things including “:set paste” inside vim. What worked was <shift><insert>
Docker – how to delete all stopped containers
Command passes a list of stopped container id root@core# docker delete $(docker ps -aq )
How to display Docker Images
root@core ~# docker images REPOSITORY TAG IMAGE ID CREATED SIZE bitnami/mysql 5.7 35a3535a56a8 3 days ago 297MB bitnami/mariadb latest f3115f49667f 3 days ago 331MB ubuntu latest f643c72bc252 7 weeks ag o 72.9MB turnkeylinux/wordpress latest d1b2a2797ac5 8 months a go 885MB centos/mysql-57-centos7 latest f83a2938370c 15 months ago 452MB mysql latest 8d99edb9fd40 2 years ag o 445MB ubuntu 14.04 d85c70d7c800 2 years […]