pydata

Keep Looking, Don't Settle

2019-07-20 Week 29, nvidia-smi error

nvidia-smi error

The error is (tensorflow_p36) ubuntu@ip-172-31-36-1:~$ nvidia-smi NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

This problem can be resolved by installing the (currently) latest version of the Nvidia driver.

  1. create an install ...

2019-06-08 Week 23 Regular Expression to clean data

regular expression example

We have many sql alike code to patch the system. The purpose is to clean the code to do two things: 1) to find what variables are used; 2) to find the value used in the code. That is, transfer to key-value form so that it can ...

2019-06-01 Week 22 Linux bash date time

Shares From Internet

  1. Linux bash date time
export day=2019-06-02
#day=$(date +%Y-%m-%d)
sunday_1=$(date -d "$day -$(date -d $day +%w) days" +%Y-%m-%d)  # last sunday include current date
sunday_2=$(date -d "$day -$(date -d $day +%u) days" +%Y-%m-%d)  # last sunday ...

2019-05-25 Week 21

python regular expression to clean the RMP data.

import re

strtest = """  3602433631519" />                                </td>
                <td> 7 </td>
                <td>< = "> </a></td>
                <td>HRB_HighClaim_Sideline</td>

                <!-- Align Rule condition to variable expression -->
                    <td></td>

                <td>MVEL</td>
                <td>
                        <pre class="code">get(&quot;$BFS.hrb_claims_by_customer_us.n_claim_count&quot;)!\
=empty &amp;&amp; 
get(&quot;$var_001&quot ...

2019-05-18 Week 20 -- awk

awk -F, '{OFS="\t";print $3,$4}' mo_orders_weekly_2019-04-27.txt   ==>   awk '{print $4","$5}' mo_orders_weekly_2019-04-27.txt

cat mo_orders_weekly_2019-04-27.txt | cut -d ',' -f3    ==>    cat mo_orders_weekly_2019-04-27.txt | cut  -f3-4

awk -F, '{OFS=",";print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$20,$21}' infile.csv > outfile.csv

something else to consider ...