ATOM word count and document outline for Markdown

When you have atom, there are a few things are really important for you to set up for writing in Markdown. 

  1.  Set up the soft warp by go to preference-> Editor --> preferred length and then check the box of using preferred length for soft wrap.
  2. Search document outline package by preference -> install -> search "document outline" -> install.
  3. Install word count "counter" by Fredrik01. It will display the word count in your status bar. The # in front of "C" is the number of English and Chinese words.



AutoML

Just read the post about AutoML, which is a very good introductory post about the new Automatic Machine Learning field.

Per the discussion in the post about one of motivation for AutoML is that release the hand of data scientist to do more challenging stuff, which I think it is a little bit distort the fact that it is also reducing the employee pool of data scientist.

This is a soften version of saying I want to replace you one day for your own good. I generally do not oppose the AutoML. But I do think the entry level of data science job that the people on the position cannot understand the core idea of machine learning algorithms will be endanger of their jobs.

The future of AI and data science will be the people who super good at implementing or improving by change the core of algorithms. Meanwhile, the communication of the job is also a key that these AutoML pipelines need to be maintained and interpreted by DS.

如何用markdown写微信或邮件

  1. 在chrome和firefox浏览器中安装extension "Markdown Here"
  2. 在微信后台写或者粘贴markdown文本,然后"ctrl+alt+M", 文本就会变成渲染后的markdown 格式。
  3. 如果需要编辑,就重复"ctrl+alt+M", 然后文本会取消渲染效果,然后继续编辑,重复快捷键去渲染。直接发布就可以了。

值得注意的是:

  • 微信后台似乎不支持数学公式直接居中的表达,比如 $$ f(x)=x^2+1$$,而其他的一些编辑器支持。比如sublime text 2 + pandoc,或者markdown preview to html等。
  • 所以可以直接在sublime text写好之后,用pandoc 转成pdf,或者直接用markdown preview "ctrl+alt+M" 去查看渲染之后的效果。可以支持修改文件,然后refresh html去查看。
  • 写书也挺适合用markdown的,可以直接用pandoc转成许多其他格式,比如epub等。
  • 还可以直接写latex文档,以及latex slides 等等。
​

How to set up pandoc shortcut in sublime text 2

install pandoc

  • Suppose you have installed the package control in ST2, then "Command+Shift+P" or "tools > Command Palette" will pop out the dialog.

  • type "install packages"

  • type "pandoc", choose the most general one just with this name.

create short cut

  • In a normal way, you can just open "command palette" by "cmd+shift+p", and then type "pandoc", then type "PDF" or any other format you like.

  • Creating shortcut can help you save the typing "pandoc":

  1. Preferences > Key binding users
  2. Add { "keys": ["ctrl+alt+p"], "command": "pandoc"} in to the file.

For example, after adding, my files looks like:

[  { "keys": ["ctrl+alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }  ,  { "keys": ["ctrl+alt+p"], "command": "pandoc"}   ]  

Then in your markdown file, you can just use shortcut "ctrl+alt+p" then type "pdf" you can immediately convert it to pdf.

​

How to use pandoc to convert markdown files to pdf with math formula?

Pandoc Plugin for Sublime Text 2

A Sublime Text plugin that uses Pandoc to convert text from one markup format into another. Pandoc can convert documents in markdown, reStructuredText, textile, HTML, DocBook, LaTeX, MediaWiki markup, OPML, or Haddock markup to XHTML, HTML5, HTML slide shows using Slidy, reveal.js, Slideous, S5, or DZSlides, Microsoft Word docx, OpenOffice/LibreOffice ODT, OpenDocument XML, EPUB version 2 or 3, FictionBook2, DocBook, GNU TexInfo, Groff man pages, Haddock markup, OPML, LaTeX, ConTeXt, LaTeX Beamer slides, PDF via LaTeX, Markdown, reStructuredText, AsciiDoc, MediaWiki markup, Emacs Org-Mode, Textile, or custom writers can be written in lua.

Installation

You need to install Pandoc, and this module:

Usage

The input format is specified by setting the syntax of the document.

Run Pandoc on the current document via the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows) by selecting "Pandoc". You will be presented with output formats to choose from.

Configure

You can fully configure the available formats, and configure the Pandoc options to customize transformation, via the plugin settings file. Via the application menu, go to "Preferences" -> "Package Settings" -> "Pandoc".

​

how to use markdown in sublime text 2

Install package control:

https://packagecontrol.io/installation#st2

Install MarkdownEditing

http://lucifr.com/2012/07/12/markdownediting-for-sublime-text-2/

Markdown preview

Follow this link for markdown preview:
https://github.com/revolunet/sublimetext-markdown-preview

Installation :

Using Package Control (Recommended)

For all Sublime Text 2/3 users we recommend install via Package Control.

Install Package Control if you haven't yet.
Use cmd+shift+P then Package Control: Install Package
Look for Markdown Preview and install it.

To preview :

optionally select some of your markdown for conversion
use cmd+shift+P then Markdown Preview to show the follow commands (you will be prompted to select which parser you prefer):

Markdown Preview: Preview in Browser
Markdown Preview: Export HTML in Sublime Text
Markdown Preview: Copy to Clipboard
Markdown Preview: Open Markdown Cheat sheet

or bind some key in your user key binding, using a line like this one: { "keys": ["alt+m"], "command": "markdown_preview", "args": {"target": "browser", "parser":"markdown"} }, for a specific parser and target or { "keys": ["alt+m"], "command": "markdown_preview_select", "args": {"target": "browser"} }, to bring up the quick panel to select enabled parsers for a given target.
once converted a first time, the output HTML will be updated on each file save (with LiveReload plugin)

Note:

If you want to set the keymap, just " preference> package setting> key bindings - user, and note to use the argument as above.

Then it is really convenient for you to use.

​

How to make sure "alt+z" is for typing Greek Omega in visual studio code

Just click preference of vscode and then in the json file, add:

{ "key": "alt+z",      "command": "-editor.action.toggleWordWrap",
                         "when": "editorTextFocus" }

in the keybinding.json.


This is from: https://code.visualstudio.com/docs/customization/keybindings

Removing a specific key binding rule

You can write a key binding rule that targets the removal of a specific default key binding. With the keybindings.json, it was always possible to redefine all the key bindings of VS Code, but it can be very difficult to make a small tweak, especially around overloaded keys, such as Tab or Escape. To remove a specific key binding, simply add a - to the command and the rule will be a removal rule.

Here is an example:

// In Default Keyboard Shortcuts  ...  { "key": "tab", "command": "tab", "when": ... },  { "key": "tab", "command": "editor.emmet.action.expandAbbreviation", "when": ... },  { "key": "tab", "command": "jumpToNextSnippetPlaceholder", "when": ... },  { "key": "tab", "command": "acceptQuickFixSuggestion", "when": ... },  { "key": "tab", "command": "acceptSelectedSuggestion", "when": ... },  ...    // To remove the second rule, for example, add in keybindings.json:  { "key": "tab", "command": "-editor.emmet.action.expandAbbreviation" }    

How to make pycharm work with tensorflow

Install tensorflow on your console follow the tensorflow installation.

Then go to python on console, and then print sys.version, you will see where tensorflow is installed to. Then you can use that one to set your pycharm.
PyCharm. And note that On macOS this might be a path such as ~/anaconda/bin/python or /Users/jsmith/anaconda/bin/python.

The former are a short link.

You can just open the system preference and set the project interpreter. Add the path to the pycharm and then you can run the tensorflow from there.


How to Stop Procrastinating by Using the “2-Minute Rule”

How to Stop Procrastinating by Using the "2-Minute Rule"

Recently, I've been following a simple rule that is helping me crush procrastination and making it easier for me to stick to good habits at the same time.

I want to share it with you today so that you can try it out and see how it works in your life.

The best part? It's a simple strategy that couldn't be easier to use. 

Here's what you need to know…

How to Stop Procrastinating With the "2–Minute Rule"

I call this little strategy the "2–Minute Rule" and the goal is to make it easier for you to get started on the things you should be doing.

Here's the deal… 

Most of the tasks that you procrastinate on aren't actually difficult to do — you have the talent and skills to accomplish them — you just avoid starting them for one reason or another.

The 2–Minute Rule overcomes procrastination and laziness by making it so easy to start taking action that you can't say no.

There are two parts to the 2–Minute Rule…

Part 1 — If it takes less than two minutes, then do it now.

Part I comes from David Allen's bestselling book, Getting Things Done.

It's surprising how many things we put off that we could get done in two minutes or less. For example, washing your dishes immediately after your meal, tossing the laundry in the washing machine, taking out the garbage, cleaning up clutter, sending that email, and so on.

If a task takes less than two minutes to complete, then follow the rule and do it right now.

Part 2 — When you start a new habit, it should take less than two minutes to do.

Can all of your goals be accomplished in less than two minutes? Obviously not. 

But, every goal can be started in 2 minutes or less. And that's the purpose behind this little rule.

It might sound like this strategy is too basic for your grand life goals, but I beg to differ. It works for any goal because of one simple reason: the physics of real life.

The Physics of Real Life

As Sir Isaac Newton taught us a long time ago, objects at rest tend to stay at rest and objects in motion tend to stay in motion. This is just as true for humans as it is for falling apples. 

The 2–Minute Rule works for big goals as well as small goals because of the inertia of life. Once you start doing something, it's easier to continue doing it. I love the 2–Minute Rule because it embraces the idea that all sorts of good things happen once you get started.

Want to become a better writer? Just write one sentence (2–Minute Rule), and you'll often find yourself writing for an hour.

Want to eat healthier? Just eat one piece of fruit (2–Minute Rule), and you'll often find yourself inspired to make a healthy salad as well.

Want to make reading a habit? Just read the first page of a new book (2–Minute Rule), and before you know it, the first three chapters have flown by.

Want to run three times a week? Every Monday, Wednesday, and Friday, just get your running shoes on and get out the door (2–Minute Rule), and you'll end up putting mileage on your legs instead of popcorn in your stomach.

The most important part of any new habit is getting started — not just the first time, but each time. It's not about performance, it's about consistently taking action. In many ways, getting started is more important than succeeding. This is especially true in the beginning because there will be plenty of time to improve your performance later on.

The 2–Minute Rule isn't about the results you achieve, but rather about the process of actually doing the work. It works really well for people who believe that the system is more important than the goal. The focus is on taking action and letting things flow from there.

Try It Now

I can't guarantee whether or not the 2–Minute Rule will work for you. But, I can guarantee that it will never work if you never try it. 

The problem with most articles you read, podcasts you listen to, or videos you watch is that you consume the information but never put it into practice. 

I want this article to be different. I want you to actually use this information, right now.

What's something you can do that will take you less than two minutes? Do it right now.

Anyone can spare the next 120 seconds. Use this time to get one thing done. Go.

Super good advice for life (zz)

  1. Believe in yourself 100%.
  2. Learn to listen to others effectively.
  3. Handle criticism constructively, take the best from it and chuck the rest away.
  4. Always give the best of yourself you're capable of on that day.
  5. Learn to love and accept yourself first, and then learn to love and accept others.

How can I motivate myself to work hard?

Six years ago I was so depressed I thought I would kill myself. 

I had nothing going on in my life. And the girl I was dating kept calling me "crazy", would break up with me every day, and refuse to introduce me to her friends. 

I had three failed businesses that year and the year before. And I was going to go broke with two kids to support. 

This past year, one of my investments sold for 4000% of my initial investment. A business I started went from $0 in revenues to $12,000,000 in eight months. I published two books and wrote 100s of articles and do 12 podcasts a week. 

But I don't work hard. I'm about to go get a sandwich. I slept late today. 

I don't say this because it's so great. I'd like to be a little more effective in my work. It's a practice and not a formula. Every day I practice. 

Here's what I do. If you don't like it, that's fine. I think each person has to find what works for them. 

I used to not do these things. And when I didn't do these things, nothing would happen. Life doesn't stand still: it either gets worse or better. 

Eventually it gets a lot worse. We die. That's the only real truth. 

But in the meantime, here's what I try to do to be successful and work harder. 

- NOTHING

I don't read the News. I used to work for the news. I know what happens there. The more you read news, the less informed you are, the more time you just wasted.  

Since I stopped reading news, I read more books. i get more info. I feel more alive. I get less scared. 

I also don't talk to people who want to gossip. Gossip never made anyone a success. 

And I don't say "yes" to things I don't want to do. Else I resent the person who asked me, I hate myself for saying yes, and I'm bad at whatever it is I said "yes" to. 

So, in order to work harder, I try to find as much NOTHING in my life as possible. 

- EAT WELL

It's a simple diet but I try to follow it. No snacks. No eating after 6pm (so my liver isn't on overdrive when I am trying to sleep). 

Plates at 10 inches. (Studies show when you reduce plate size from 15 inches to 10 inches, you eat 30% less calories). Note! If your plate size is 8.5 inches, you eat more - your body is not stupid. It knows you are tricking it. 

And that's it. The Plate Diet. Or the - not after 6pm Diet

- MOVE 

A little exercise every day is known to have just as much effect on your mood as a full dosage of anti-depressants. 

- SLEEP

In the morning, you have energy. At the end of the day, you don't. Which is why you need sleep. 

The average person needs eight hours of sleep. For instance, they took some famous orchestra and determined that the professional violinists in the orchestra were sleeping 8.6 hours a day. 

Don't think that less sleep makes you more productive. Whenever I get only six hours of sleep, I know the day is going to be useless. Preparation is how you win the game, and lack of sleep means you didn't prepare well. 

- GRATITUDE

Worry never solves tomorrow's problems, and only takes energy away from today. 

Worry and Gratitude can't exist in the mind at the same time. 
Regret and Gratitude can't exist in the mind at the same time. 
Anger and Gratitude can't exist in the mind at the same time. 

Whenever I notice these things happening in my head, I try to replace with gratitude. 

Now I can continue my day 

- LAUGHTER

The average child laughs 300 times a day. 

The average adult...five. 

Dr. Norman Cousins did a series of studies on the benefits of laughter. It improves health, cures disease, improves productivity, and of course, makes you happier. 

So I try to watch standup comedy when I'm low. Or thing of funny things. Laughter heals the soul. 

- SURRENDER

Too often I would try to control things that were outside of my control. 

For instance, when a boss is yelling at me, it's his problem. I can't control him. So that's when I try to find a better job rather than put up with abuse. 

The same in relationships. 

One of the most important decisions you can make in life is who you spend your time with. 

It's like falling into an sea of hands and hoping they catch you. When you surround your self with good people, you can surrender that they will catch you. 

When you are creative, you can surrender to the fact that your ideas will always catch you.

When you sleep well and are grateful, you can surrender to the fact that your good health and spiritual attitude, will guide you through the difficult moments. 

Whenever I'm scared, I surrender. I do my best. I'm honest. I know good things will happen. 

IDEAS

I write down ten ideas every day. 

The Idea Muscle always needs to be exercised. It atrophies after about two weeks of no use. like any other muscle. 

People think that ideas are nothing and execution is everything. 

Execution is just a subset of ideas. You still have to have the ideas in order to execute. And the only way to have good ideas is to exercise the idea muscle. 

Every day. The result: your life will look completely different in six months. 

You will be an idea machine. You can be stuck on a highway in the desert with no gas and you will have 100 ideas to save you in no time. The idea machine is magic. 

FRIENDS

The people in your life are like a bonsai tree. 

It's always growing. And every day you prune the bad branches and keep the good branches. 

Do that every day and you get more productive. 

Every entrepreneurial movement, every artistic movement, every leap in science, was done by a group of people. There are no lone geniuses. 

Steve Jobs and Bill Gates had the HomeBrew Club. 

Jack Kerouac had the Beats

Andy Warhol had his community of Pop artists. 

Even Larry Page had the thriving entrepreneurial cultures of both Stanford and Silicon Valley and all the search engines before him that he was able to stand on the shoulders of. 

You can't be productive without shoulders to stand on. 

MESSAGE OVER MONEY

I think people are scared. I know this. I am often scared. We live in a hard world. 

It's a sentence of frightening nightmare punctuated by periods of intense joy. 

The message I like to convey is that these ideas help you not only be more productive, but more creative...happier. 

At least for me, this has worked and transformed me from someone crying on the ground in a pool of vomit, to someone who wakes up and (some of the time) feels the full beauty of the day. 

I do the above. 

I surrender to it. And hope for the best.