Why do numpy string arrays cut strings when they see a forward slash?

I’m processing some text data with python, making charts, etc. I’m using numpy string arrays as it’s the framework i’m the most comfortable with.

I encountered a weird behaviour with forward slashes. When trying to get a string containing a forward slash inside a numpy array, it is cut at the slash and the rest disappears. See example below:

import numpy  a = numpy.array(["one","two","three"]) a[0] = "test/case" print(a) 

This gets me:

['test/','two','three']

What’s happening here, can I fix it ? Thank you !

how you would move forward from completing the Planning, requirements modelling and analysis part of the development process?

I am following RUP/USDP practice. I have made Use case model, High level, Use case, Expanded, Interactions Diagrams, and Class Diagram.

Question: Explain how you would move forward from this part of the development process.

Forward WhatsApp messages to e-mail or SMS

Some friends of mine want to use WhatsApp to send me messages from time to time. But, I don’t want to install the app (or I don’t want to have it running all the time). Can I configure something within WhatsApp or another service to forward the messages from WhatsApp to an e-mail address via SMS?

Even a solution that requires me to configure a program on my own server would suffice.

write into a tun interface and forward traffic to another computer

I have the following setup. An application on machine A creates an IP packet which is captured by the tun1 interface. I have added the route using the command :

sudo route add -host 10.129.131.220 tun1.

enter image description here

Then I read the packets from the tun1 file-descriptor and write to another UDP client socket with destination address B. I can read packets on the B machine. I verified with tshark on machine B where tshark shows following types of outputs.

1 0.000000000 10.129.131.170 → 10.129.131.220 UDP 51 34611 → 8080 Len=23 and more similar rows.

Now I want to route these IP packets to machine C, (actual destination machine). I have created a tun1 interface in machine B and writing the received packets on machine B. Writes are successful and watch -n 1 "ifconfig tun1" shows the RX packets values getting incremented.

I have enables the packet forwarding in machine B by setting

echo 1 > /proc/sys/net/ipv4/ip_forward

My question is, how to properly add forwarding rule in machine B so that IP packets are routed to machine C without the addition of more IP header. I think writing to a tun1 device (on B) again might do the work. But how to route from tun1 to eth0?

Thanks!

Last Observation Carried Forward in python with datetime

I have this event dataset and while retrieving it only recorded the changes and I want these changes to be converted to a uniform time series. The data is recorded at 12 hour time interval. The retrieval_time is an object and start_time is datetime64.

   ID        Count  retrieval_time                start_time    100231380 70     2017-10-11T23:30:00.000+10:30 21/10/17 23:30    100231380 70     2017-10-12T11:30:00.000+10:30 21/10/17 23:30    100231380 72     2017-10-12T23:30:00.000+10:30 21/10/17 23:30    100231380 72     2017-10-13T11:30:00.000+10:30 21/10/17 23:30    100231380 73     2017-10-13T23:30:00.000+10:30 21/10/17 23:30    100231380 74     2017-10-14T11:30:00.000+10:30 21/10/17 23:30    100231380 74     2017-10-14T23:30:00.000+10:30 21/10/17 23:30    100231380 74     2017-10-15T11:30:00.000+10:30 21/10/17 23:30    100231380 77     2017-10-15T23:30:00.000+10:30 21/10/17 23:30    100231380 83     2017-10-16T11:30:00.000+10:30 21/10/17 23:30    100231380 85     2017-10-16T23:30:00.000+10:30 21/10/17 23:30    100231380 85     2017-10-17T11:30:00.000+10:30 21/10/17 23:30    100231380 90     2017-10-17T23:30:00.000+10:30 21/10/17 23:30    100231380 90     2017-10-18T11:30:00.000+10:30 21/10/17 23:30    100231380 93     2017-10-18T23:30:00.000+10:30 21/10/17 23:30    100231380 99     2017-10-19T23:30:00.000+10:30 21/10/17 23:30    100231380 104    2017-10-20T23:30:00.000+10:30 21/10/17 23:30    100231380 117    2017-10-21T23:30:00.000+10:30 21/10/17 23:30 

I want to be able to make it consistent for example in last 3 rows, from 19/10/2017 in retrieval time, there is no recorded data for 11:30am. I want to be able to add a row and replace it with last observation for entire row.

I want to output to be something like this..

   ID        Count  retrieval_time                start_time    100231380 70     2017-10-11T23:30:00.000+10:30 21/10/17 23:30    100231380 70     2017-10-12T11:30:00.000+10:30 21/10/17 23:30    100231380 72     2017-10-12T23:30:00.000+10:30 21/10/17 23:30    100231380 72     2017-10-13T11:30:00.000+10:30 21/10/17 23:30    100231380 73     2017-10-13T23:30:00.000+10:30 21/10/17 23:30    100231380 74     2017-10-14T11:30:00.000+10:30 21/10/17 23:30    100231380 74     2017-10-14T23:30:00.000+10:30 21/10/17 23:30    100231380 74     2017-10-15T11:30:00.000+10:30 21/10/17 23:30    100231380 77     2017-10-15T23:30:00.000+10:30 21/10/17 23:30    100231380 83     2017-10-16T11:30:00.000+10:30 21/10/17 23:30    100231380 85     2017-10-16T23:30:00.000+10:30 21/10/17 23:30    100231380 85     2017-10-17T11:30:00.000+10:30 21/10/17 23:30    100231380 90     2017-10-17T23:30:00.000+10:30 21/10/17 23:30    100231380 90     2017-10-18T11:30:00.000+10:30 21/10/17 23:30    100231380 93     2017-10-18T23:30:00.000+10:30 21/10/17 23:30    100231380 93     2017-10-19T11:30:00.000+10:30 21/10/17 23:30    100231380 99     2017-10-19T23:30:00.000+10:30 21/10/17 23:30    100231380 99     2017-10-20T11:30:00.000+10:30 21/10/17 23:30    100231380 104    2017-10-20T23:30:00.000+10:30 21/10/17 23:30    100231380 104    2017-10-21T11:30:00.000+10:30 21/10/17 23:30    100231380 117    2017-10-21T23:30:00.000+10:30 21/10/17 23:30 

I also want to know how to format the retrieval_time and start_time to make it similar to be able to compare it.

And, I want some generic solution as I have aggregated grouped data for multiple events and time interval is the same 12 hours, however, the retrieval_time and start_time is different for all the events.

Thanks.

Forward [only] unfiltered emails in gmail

I am using a new email address, but I still want to get email from my old one. However, I do not want to get all the mail. A lot of my mail is filtered into different labels. I do not want to delete it, but I do not want these emails forwarded to my new address. I only want to forward new unfiltered mail.

I am pretty sure there is no way to this in vanilla gmail. Any another ideas?