Showing posts with label Fun. Show all posts
Showing posts with label Fun. Show all posts

Tuesday, June 26, 2018

Difference of gasoline when you fill in at different temperatures

We know objects are expanding when the temperature goes up. Therefore, I always think that I should fill in my gasoline in my car in the early morning so that I could have more gasoline when I spend the same money. But how much really we could gain if the temperature changes fill in gasoline at 60°F instead of 80°F (this is actually the changes of temperature at Berkeley during the morning and noon). I want to have a rough estimation of what's the difference between the amount of gasoline when I fill in at different times of the day. To calculate the change of the gasoline, we need to use the physics that we learned in high school, the basic equation is the following one, that relates the volume change of an object to the temperature change.
\Delta = \beta\times T \times \DeltaT
\DeltaV is the change of the volume, and \beta is the average coefficient of volume expansion, and the V is the initial volume of the object, and \DeltaT is the change of the temperature. Therefore, all we need to do is to find the coefficient of volume expansion, and it is 9.6\times 10^{-4}/C°, that is 5.33\times 10^{-4}/F°. Now, let’s assume that we fill in 10-gallon gasoline in the morning at 60°F and how much it will be at noon (80°F)
delta_v = 5.33e-4 * 10 * (80-60)
print('We gain %.2f gallon gasoline, \nif we fill in the morning instead of noon.'%delta_v)
We gain 0.11 gallon gasoline, 
if we fill in the morning instead of noon.
Well, it is 0.11-gallon difference if we fill in 10-gallon gasoline in the morning (that is, we will have 10.11 gallon at noon when temperature increases to 80°F). Let’s calculate how much we potentially can save if we drive our car for certain distances.
Let’s say your car’s average MPG is 30, for 150,000 miles, we need 150,000 / 30 = 5000-gallon gasoline. The difference of gasoline will be 5000 / 10 \times0.11 = 55gallon.

Friday, June 8, 2018

Turtle graphics

Turtle graphics is a popular way of introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966. You can find more information here. With the following lines, you can create this star from the example. 
from turtle import *
color('red', 'yellow')
begin_fill()
while True:
    forward(200)
    left(170)
    if abs(pos()) < 1:
        break
end_fill()
done()
With some changes, we could make this nice figure, it is really cool to see how it draws this beautiful pattern. 
colors = ['red', 'orange', 'yellow', 'green', 'cyan', 'blue']
p = Pen()
p.speed(0)
bgcolor('black')
begin_fill()
for i in range(360):
    p.pencolor(colors[i%6])
    p.width(i/100+1)
    p.forward(i)
    p.left(59)
end_fill()
done()

Monday, May 21, 2018

Maker faire 2018

I was at Maker Faire 2018 yesterday, and it is fun as usual! 
        
jpg
jpg
jpg
jpg
        
jpg
jpg
jpg
jpg
        
jpg
jpg
jpg

Sunday, December 17, 2017

AGU 2017 at New Orleans

I was at AGU 2017 this week, it was held at New Orleans this time (finally not in San Fransisco anymore). It is a great conference overall, and here are some photos I took:




















Thursday, November 30, 2017

Fun: Father and Ice Cream

Recently, my daughter (3.5-year-old) draws a picture, which she calls 'Father and Ice Cream' (see the image below). I know in her eyes, both Father and Ice Cream are important. I feel the drawing of me looks like a carrot (according to one of my friend), but at least I can tell which one is me, which one is ice cream. Maybe she inherits her mom's drawing skills.


Sunday, November 12, 2017

T-shirt design competition for Berkeley Seismology Lab

This week at Berkeley Seismology Lab here, we have a competition to design a lab T-shirt for the Christmas party. I decided to design one as well. The following is my design about the T-shirt.

Back

jpg
The back of the T-shirt is our Berkeley Seismology Lab logo, with our two favorite colors from UC Berkeley. This part I didn’t design, it is just a copy of our own logo.

Front (version 1)

jpg
I was thinking to have some nice figures in the front, but my design skills are not so good, therefore, I decided to just put some text on the front. ‘Questions about earthquakes’ will show what do we do, and a good conversation starter, it has a meaning that we are the experts, ask us questions.

Front (version 2)

jpg
This version is a word cloud generated from our mission and history page, using the Berkeley blue and yellow, the things we do here at BSL are popped up.

Front (version 3)

jpg
This version is an equation, that we - Seismologist is made up of this 3 ingredients. And the ‘+ I + =’ part is a small face by design :-)

Friday, September 15, 2017

Fun: Places I hiked before (Qingkai's Hiking Map)

I love hiking, and before we had our kids, we usually go hiking or camping every weekend. Even with our daughter, we still try to go out every weekend with her on my back. We once had an ambitious plan to hike in all the parks in Bay Area before I graduate,  but now it seems hard to achieve the goal!


In the following, I plot all my hiked places in Bay Area (Plus some in Northern CA) on a map, and many places we went more than once! I am really impressed by how many places we visited in the last few years, and hope we will increase more hiking dots on the map.

 

Sunday, April 23, 2017

Machine learning 10 - Funny pictures

The following are funny pictures related to machine learning or data science I found online. It is a great way to learn some concepts in this way. Also, it is nice to use some of them in your talk so that students can learn something in a very relaxed environment. Hope you also enjoy them! 

Torture your data

jpg

Big data is like teenage sex

jpg

No trust of large uncertainty

png

Correlation does not imply causation

jpg

Type I and Type II error

jpg

Out lier!

jpg

Machine learning protests

jpg

Different views of machine learning

png

Hisotry of life

jpg

Your product vs. apple and google

png

Good code vs. bad code

jpg

How deos overfitting looks like?

jpg

Developers are born brave

jpg

It never rains in the Bay Area

jpg

Deep learning is easy

jpg

Interview a data scientist

jpg

Change your habit

jpg

Label the axis

jpg

Information, Knowledge, and Creativity

jpg

The deep learning Saga

Acknowledgements

All the figures are from internet, I thank all the authors. I found a lot of the pictures from the following links.