{"id":76,"date":"2018-12-29T06:42:18","date_gmt":"2018-12-29T06:42:18","guid":{"rendered":"http:\/\/gantovnik.com\/bio-tips\/?p=76"},"modified":"2018-12-29T06:43:33","modified_gmt":"2018-12-29T06:43:33","slug":"counting-files-in-the-current-directory","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/counting-files-in-the-current-directory\/","title":{"rendered":"Counting files in the current directory"},"content":{"rendered":"<pre>ls -q | wc -l<\/pre>\n<pre>wc - l command counts lines<\/pre>\n<pre>ls -q option will replace non-printable characters by a question mark<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ls -q | wc -l wc &#8211; l command counts lines ls -q option will replace non-printable characters by a question mark<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-76","post","type-post","status-publish","format-standard","hentry","category-bash"],"modified_by":null,"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-1e","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":9524,"url":"https:\/\/gantovnik.com\/bio-tips\/2025\/05\/460-guys-finally-i-run-several-codes-in-ls-dyna-so-soon-i-will-post-several-examples-here\/","url_meta":{"origin":76,"position":0},"title":"#460 Seepage of SPH nodes in LS-Dyna","author":"gantovnik","date":"2025-05-01","format":false,"excerpt":"Even when correct contact definitions are applied between SPH particles and the impacted surface, non-physical seepage of SPH nodes can still occur at high impact velocities. This issue can often be resolved by adjusting numerical parameters: Reduce the initial time step scale factor (TSSFAC) in the *CONTROL_TIMESTEP card. Increase the\u2026","rel":"","context":"In &quot;fem&quot;","block_context":{"text":"fem","link":"https:\/\/gantovnik.com\/bio-tips\/category\/fem\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2025\/05\/ex460-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2025\/05\/ex460-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2025\/05\/ex460-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2025\/05\/ex460-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":900,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/02\/162-loops-using-command-line-in-bash\/","url_meta":{"origin":76,"position":1},"title":"#162 Loops using command line in bash","author":"gantovnik","date":"2021-02-19","format":false,"excerpt":"With increment: Output: Output: C-like syntax: Output: Output: Output: Output: Output: Output:","rel":"","context":"In &quot;bash&quot;","block_context":{"text":"bash","link":"https:\/\/gantovnik.com\/bio-tips\/category\/bash\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1229,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/11\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2\/","url_meta":{"origin":76,"position":2},"title":"#219 Polar plot legend","author":"gantovnik","date":"2021-11-28","format":false,"excerpt":"","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2021\/11\/ex219.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":93,"url":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/plots-of-nonlinear-functions\/","url_meta":{"origin":76,"position":3},"title":"Plots of nonlinear functions","author":"gantovnik","date":"2018-12-31","format":false,"excerpt":"import os import matplotlib.pyplot as plt import numpy as np os.chdir('\/home\/vg\/Downloads\/projects\/ex15') os.getcwd() #define model parameters x=np.linspace(-2,2,1000) #examples of nonlinear functions f1=x**2-x-1 f2=x**3-3*np.sin(x) f3=np.exp(x)-2 f4=1-x**2+np.sin(50\/(1+x**2)) fig,axes=plt.subplots(1,4,figsize=(12,3),sharey=True) for n,f in enumerate([f1,f2,f3,f4]): axes[n].plot(x,f,lw=1.5) axes[n].axhline(0,ls=':',color='k') axes[n].set_ylim(-5,5) axes[n].set_xticks([-2,-1,0,1,2]) axes[n].set_xlabel(r'$x$',fontsize=18) axes[0].set_ylabel(r'$f(x)$',fontsize=18) titles=[r'$f(x)=x^2-x-1$',r'$f(x)=x^3-3\\sin(x)$',r'$f(x)=\\exp(x)-2$', r'$f(x)=\\sin\\left(50\/(1+x^2)\\right)+1-x^2$'] for n,title in enumerate(titles): axes[n].set_title(title) plt.savefig(\"example15.png\", dpi=100) plt.show() plt.close()","rel":"","context":"In &quot;python&quot;","block_context":{"text":"python","link":"https:\/\/gantovnik.com\/bio-tips\/category\/python\/"},"img":{"alt_text":"example15","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2018\/12\/example15.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2018\/12\/example15.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2018\/12\/example15.png?resize=525%2C300 1.5x"},"classes":[]},{"id":96,"url":"https:\/\/gantovnik.com\/bio-tips\/2018\/12\/bisection-method\/","url_meta":{"origin":76,"position":4},"title":"#16 Bisection method using python","author":"gantovnik","date":"2018-12-31","format":false,"excerpt":"","rel":"","context":"In &quot;optimization&quot;","block_context":{"text":"optimization","link":"https:\/\/gantovnik.com\/bio-tips\/category\/optimization\/"},"img":{"alt_text":"example16","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2018\/12\/example16.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2018\/12\/example16.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2018\/12\/example16.png?resize=525%2C300 1.5x"},"classes":[]},{"id":2059,"url":"https:\/\/gantovnik.com\/bio-tips\/2024\/01\/407-multiple-axes-animation-using-python\/","url_meta":{"origin":76,"position":5},"title":"#407 Multiple axes animation using python","author":"gantovnik","date":"2024-01-14","format":false,"excerpt":"y=sin(x)","rel":"","context":"In &quot;animation&quot;","block_context":{"text":"animation","link":"https:\/\/gantovnik.com\/bio-tips\/category\/animation\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex407.gif?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex407.gif?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2024\/01\/ex407.gif?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/76","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=76"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/76\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=76"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=76"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=76"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}