Tuesday Tip #6: Share your code with GitHub Gist πŸ‘©β€πŸ’»


Hi Reader!

One quick side note, before we get to today's tip:

There are lots of data science tools and resources that I can't fit into the newsletter, so I share them on social media instead. Follow me on Twitter and connect on LinkedIn if you’re interested!

Please mention the newsletter when inviting me to connect, otherwise I might miss your invitation. Thanks!

πŸ‘‰ Tip #6: Share your code with Gist

Let's say that you need to share your code with a friend, a mailing list, or a discussion group. What do you do?

βœ‰οΈ You could copy it into an email, but the formatting might get lost.

πŸ“Ž You could send it as an attachment, but it might get marked as spam.

πŸ› You could create a GitHub repository, but that seems like a lot of work to share a single file.

My suggestion is to use a GitHub Gist instead!

What's a Gist?

A Gist is a lightweight GitHub repository that's optimized for a single file.

It’s easy to create a Gist:

  1. Sign into GitHub (or create a free account).
  2. Go to gist.github.com.
  3. Drag & drop (or copy & paste) your file into the Gist.
  4. Click β€œCreate secret gist”.

You’re done!

Copy the Gist URL and send it to anyone you choose:

The recipients can comment on the Gist, download it, or fork it. And you can edit or delete the Gist.

Give it a try the next time you need to share some code!

How useful was today’s tip?

β€‹πŸ€©β€‹πŸ™‚β€‹πŸ˜β€‹


If you enjoyed this issue, please forward it to a friend! Takes only a few seconds, and it really helps me out πŸ™

See you next Tuesday!

- Kevin

P.S. Flirting with statistical significance​

Did someone awesome forward you this email? Sign up here to receive data science tips every week!

Learn Data Science from Data School πŸ“Š

Join 25,000+ aspiring Data Scientists and receive Python & Data Science tips every Tuesday!

Read more from Learn Data Science from Data School πŸ“Š

Hi Reader, Regardless of whether you enrolled, thanks for sticking with me through the launch of my new course! πŸš€ I've already started exploring topics for the next course... πŸ˜„ πŸ”— Link of the week git cheat sheet (PDF) A well-organized and highly readable cheat sheet from Julia Evans, the brilliant mind behind Wizard Zines! πŸ‘‰ Tip #48: Three ways to set your environment variables in Python I was playing around with Mistral LLM this weekend (via LangChain in Python), and I needed to set an...

Hi Reader, Last week, I announced that a new course is coming soon and invited you to guess the topic. Hundreds of guesses were submitted, and four people who guessed correctly got the course for free! (I've already notified the winners.) I'll tell you about the course next week. In the meantime, I've got a new Tuesday Tip for you! πŸ‘‡ πŸ”— Link of the week OpenAI just unleashed an alien of extraordinary ability (Understanding AI) If you're curious about what makes OpenAI's new "o1" models so...

Hi Reader, I'm really proud of this week's tip because it covers a topic (data leakage) that took me years to fully understand. 🧠 It's one of those times when I feel like I'm truly contributing to the collective wisdom by distilling complex ideas into an approachable format. πŸ’‘ You can read the tip below πŸ‘‡ or on my blog. πŸ”— Link of the week Building an AI Coach to Help Tame My Monkey Mind (Eugene Yan) In this short post, Eugene describes his experiences calling an LLM on the phone for coaching:...