Run deepseek-r1 on WSL

 [OS] windows 10

Make sure you install WSL 2. if not, follow this official guidance.

Installing ollama:

$curl -fsSL https://ollama.com/install.sh | sh

After installation, if you run:

$ollama run deepseek-r1:8b 

A error saying "Error: could not connect to ollama app, is it running?" will pop out. Please follow this solution:

$ollama serve

don't close it, open another WSL shell to run deepseek-r1:

$ollama run deepseek-r1:8b

How to get big idea

"The way to get a big idea to appear in your head is not to hunt for big ideas, but to put in a lot of time on work that interest you, and in the process keep your mind open enough that a big idea can take roost."

by Paul Graham, what you'll wish you'd known

[e.g.] A perfect demonstration of this in MRI is the birth of the idea of  MR Fingerprinting. Mark Griswold wrote a excellent article on this topic


How to create effective academic slides

I am recently working on creating PowerPoint slides for an upcoming academic workshop (MICCAI-SCMR workshop 2025) presentation. As I started this process, I realized that I had never received formal training in slides design. Previously, I simply followed the default PowerPoint format without deep considering whether it was the best way to convey my ideas. It was surprising to discover that this approach doesn't align with expert recommendations.
 
An excellent online resource from the Writing and Communication center at the Harvard University offers valuable insights into slide design, and highlights the weakness of relying on PowerPoint's defaults templates. Interestingly, some of the examples provided relate to MRI, which is my field of study. 
 
Here's a summary of the new strategy of slide design:

Design strategy: assertion-evidence design 
 
The assertion-evidence design emphasizes using a clear sentence headline (assertion) supported by visualized data (evidence). Evidence can take the form of images, GIFs, animations, or a combination of visuals and text.

Key Rules for Effective Slides (credit: Fundamentals of Slides Design):
  • Begin each slide  (with exception of title slide) with a strong headline
  • Incorporate strong visual evidence, such as photographs, drawings, graphs, films, or words and equations arranged visually to support your headlines and credit sources. (Images should be high in resolution with no clip art.)
  • Include clear captions/labels/symbols to make the slides easier to follow.
  • Minimize the use of bullet points.
  • Keep animations, special effects, and sounds to a minimum.
  • Use an appropriate number of slides for the length of the presentation (e.g. typically around one slide per minute)
  • Use slides that have a consistent look and feel.
  • Create slides that are readable from a distance.
  • Include images and language that are inclusive and accessible for all learners.

Preview *.html files and *.md files with vim

Previw *.html files with vim

[OS]: Ubuntu

One command line to preview html files with vim:

:w | !firefox yourfile.html %

[OS]:MacOS

the command line will be:

:w | !open yourfile.html %


Preview *.md files with vim

using vim-plug to install markdowm-previw.nvim

the command line will be:

:w | MarkdownPreview

Bloomberg explained why deflation is harmful for economy

[Bloomberg] China is facing longest deflation streak since Mao era in 1960s:

"Deflation can be a silent killer of commerce and consumption over the long haul. Even though cheaper goods may seem appealing, the danger is people could delay purchases because they expect prices to fall further.

Weaker consumer spending would then erode income for businesses, which in turn would reduce hiring and investment — resulting in a vicious cycle."


How to success even though you don't have high IQ

"Well, screw that. Yes, you have to be clever, but if you have good taste in problems, an ability to forge intellectual connections, an eye for untapped opportunities, drive, and yes, a willingness to work hard, you can have major impacts on the field."

   by Julianne Dalcanton, the cult of genius

            

Vim setting for python

[OS]: Ubuntu

[Path]: ~/.vimrc (create one if don't have)

here is how to config vim for python:

filetype plugin indent on
syntax on
au BufNewFile,BufRead *.py set ts=4 softtabstop=4 shiftwidth=4 expandtab=4 smarttab autoindent

and why you can't use source ~/.vimrc in your terminal after you finished configuration.

RedNote hits the #1 free app downloaded on the Apple App Store amid looming TikTok ban

Chinese sharing platform RedNote, also known as Xiaohongshu in China, has emerged as the biggest winner following the upcoming ban of TikTok in the U.S., which is set to take effect on January 19. A wave of users, often calling themselves "TikTok refugees", has already begun transitioning to the app, seeking an alternative platform to share and connect. This surge in users propelled the app to become the #1 free app downloaded on the Apple App Store. However, while it remains uncertain whether RedNote will become the go-to platform for displaced TikTok creators, its meteoric rise underscores the shifting landscape of social media amid ongoing geopolitical tensions.

In addition to its international success, RedNote has been gaining traction domestically in China, gradually replacing the search engine Baidu for many users. Increasingly, people are turning to RedNote as their primary tool for finding information they need, signaling a notable shift in user preferences.

Image Creating on MALTAB for Publications

Having just completed the abstract submission for ISMRM 2025, I found myself spending a lot of time perfecting the figures. To save time next year and help others in a similar position, I thought it would be helpful to compile some tips on creating clear, effective figures for ISMRM submissions or publications.

To start, it's important to understand the differences between common image formats. ISMRM allows images to be submitted in PNG or JPEG formats, with GIF permitted for animated display. While I'm not an expert on the topic, the key point is that JPEG uses lossy compression, meaning it reduces file size by discarding some image data, whereas PNG is a lossless format that retains all image details. Since JPEG files are typically smaller, they're ideal for meeting ISMRM's 2MB file size limit, making JPEG my go-to choice.

Returning to MATLAB. As for figure creating, two commonlly-used functions are: plot & imshow. You can save these figures manually or automate the process with the print function. However, the default properties for both plot & imshow aren't typically optimized for publication-quality images. MATLAB offers a variety of customization options through Axes Properties and Figure Properties, which can be adjusted with the set using axie handle gca and figure handle gcf.

For example, if you want to set the font size to 16 and line weight to 2 for the axis, you can use the command: set(gca, 'FontSize', 16, 'LineWeight', 2). If you need an exact figure size without resizing it in other software, use: set(gcf, 'Position', [10, 10, 500, 1000]), where Position property is a vector [left, bottom, width, height] (refer to Figure Properties for more details). For a black background, you can set: set(gcf, 'Color', 'k').

Additionally, nexttile function is a good alternative to the subplot function because it can control the subplot spacing. A general usage example would look like:

 
 figre(1)
 t = tiledlayout(2,2, 'TileSpacing', 'compact')
 nexttile, plot(x1, y1);
 nexttile, plot(x2, y2);
 nexttile, plot(x3, y3);
 nexttile, plot(x4, y4);

For the function imshow, a helpful setting is imshow(abs(YourImage), [], 'border', 'tight'), which removing unnecessary margins around the saved images, saving time on cropping. The montage function is also useful, allowing you to combine images of different sizes into a single display. I often use it to combine a series of images and their zoomed-in details.

Regarding GIF creating, I wrote a function to create GIF format:

 
 function saveGIF(im3d, framerate, dir)
 % write the mat file to GIF format
 % Only support 3D images
 % input:
 %   im3d     : size = [width, hight, time].
 %   framerate: expected frame rate of created GIF.
 %   dir      : ../../XXX.gif.

 im3d = abs(im3d);

 for i = 1:size(im3d,3)
     [A, map] = gray2ind(im3d(:,:,i), 256);
     if i == 1
         imwrite(A, map, dir, "gif", ...
     "LoopCount", Inf, "DelayTime", framerate);
     else
         imwrite(A, map, dir, "gif", ...
     "WriteMode", "append", "DelayTime", framerate);
     end
 end
        

You can edit GIF using ezgif, a clean, and efficient website for GIF editing.