teleren/devto huggingface dataset:
🐍 Minimal Python Package
Tags: python
Published: 2021-01-14 13:40:52

---
cover: /static/minimal-python-package-xmas2020.png
cover_image: https://waylonwalker.com//static/minimal-python-package.png
canonical_url: https://waylonwalker.com/minimal-python-package
published: true
status: published
tags:
- python
templateKey: blog-post
title: 🐍 Minimal Python Package
---

What does it take to create an installable python package that can be hosted on pypi?


## What is the minimal python package

* setup.py
* my_module.py


This post is somewhat inspired by the bottle framework, which is famously created as a single python module.  Yes, a whole web framework is written in one file.

## Directory structure

``` bash
.
├── setup.py
└── my_pipeline.py
```


## setup.py

``` python
from setuptools import setup

setup(
    name="",
    version="0.1.0",
    py_modules=["my_pipeline", ],
    install_requires=["kedro"],
)
```

## name

The name of the package can contain any letters, numbers, "_", or "-".  Even if it's for internal/personal consumption only I usually check for discrepancy with pypi so that you don't run into conflicts. 

> Note that pypi treats "-" and "_" as the same thing, beware of name clashes

## version

This is the version number of your package.  Most packages follow
[semver](semver.org).  At a high level its three numbers separated by a `.` that follow the format `major.minor.patch`.  It's a common courtesy to only break APIs on major changes, new releases on minor, and fixes on patch.  This can become much more blurry in practice so checkout [semver.org](https://semver.org/).

## py_modules

Typically most packages use the `packages` argument combined with
`find_packages`, but for this minimal package, we are only creating one `.py` file.

## Using packages instead

``` python
from setuptools import setup, find_packages

setup(
    name="",
    version="0.1.0",
    packages=find_packages(),
    install_requires=["kedro"],
)
```


## install_requires
These are your external dependencies that come from pypi.  They go in this list but are often pulled in from a file called `requirements.txt`.  Other developers may look for this file and want to do a `pip install -r
requirements.txt`.

## Clean?

One thing to be careful of here is that everything sits at the top level API, when you users import your module and hit tab they are going to see a lot of stuff unless you hide all of your internal functions behind an `_`.

## Minimal

Can you create a python package with less than two files and less than 8 lines? Should you?  I really like a minimal point to get started from for quick and simple prototypes.  You can always pull a more complicated `cookiecutter` template later if the project is successful.
Steps To Creating Modern & Minimalist UI/UXs
Tags: ux, webdev
Published: 2021-01-14 13:34:36

I'm no minimalist in real life myself, not sure if I ever could be, but I'm in love with modern and minimalist UI/UXs. No one wants the headache of having to figure out how to navigate the site, or when pop-ups continue to pop up and I can't even get to the part of figuring out how to navigate the complex site. 

When building a site, it's important that rather than focusing first on what components you'll incorporate, try putting all your focus towards creating a wireframe. Nothing complex. If you're not all that familiar with wireframes, grab a sheet of paper and scribble down boxes to represent each page and lines going from buttons/links to pages. It can literally be that simple. 

If you already have a website that's currently not the best, who says you can't revamp and make visitors happy. It might be worth a shot.


This is yet another shorter post, and most of my posts will likely be shorter, but I personally don't like long posts because I typically don't read them all the way through. Though everyone's different.

Thanks for reading!
~ Matthew Marquise
I joined the Forem team!
Tags: meta, career, forem
Published: 2021-01-14 13:29:36

I'm delighted to say I'm starting 2021 with a new role in the Forem team as a Software Engineer where I'll be focusing all on things frontend 🎉

## Why Forem?

As a career-changer into tech, the DEV community has been a huge source of support and inspiration for me on my developer journey. I really love what Forem is doing in helping create inclusive, empowered, communities, and I'm super excited to be part of that. 

I'm also really looking forward to working on an open-source project and interacting with the wider community of contributors. My first forays into open-source were during Hacktoberfest 2019 ([which I posted about here on DEV](https://dev.to/s_aitchison/my-a11y-hacktoberfest-retro-34op)!), and it definitely helped broaden my experience and make some really rewarding connections.

And finally, I care deeply about accessibility and inclusion (you might already know this from my previous posts, and my side project [Up Your A11y](https://www.upyoura11y.com)), and I'm delighted to work for an organisation that feels the same.

## A little bit about me

I got into coding about 4 years ago, and in a previous life I was an English teacher overseas, and an international student support manager here in the UK. I've lived in Cambodia, Vietnam and Prague, and travelled extensively in Nigeria and Ghana. Needless to say I'm not travelling so much any more, and I'm happily settled in my home country of Scotland, living by the beach in Edinburgh.

My coding career began in Android development and then later React and the frontend, which I ended up falling in love with. I advocate for accessible web experiences, through [meet-up talks](https://t.co/n6gkPSyYwE?amp=1) and [Up Your A11y](https://www.upyoura11y.com). I'm also really into CSS art! Last year I completed a project creating [a new piece of CSS art every day for 100 days](https://dev.to/s_aitchison/100-days-of-css-art-complete-1i2m).

Aside from coding, I love sewing and make a lot of my own clothes, I do yoga every day and like to lift weights and go on long beach walks with my dog. Roller derby is my sport of choice, and until recently I helped run and co-captain a roller derby team here in Edinburgh. I'm also a (part-time) foster carer, which has made me pretty well-versed in Marvel and Pixar movies 😂
Model data tracker in Laravel
Tags: laravel, php
Published: 2021-01-14 13:29:07

Have you ever tried to track your model data and see the complete data of every visit by clients?

Have you ever wanted to know who sees your post and where they live?

With this package, you will be able to track model data and see how many views your posts and data have.

For example, you have a blog and you want to see who has seen your posts.

You just need to use `Trackable` trait in your model and say `$post->track();`

Now you are able to track your post and see who saw it with complete information like County, IP, Reefer page, and...

You can see the package which is called `laravel-tracker` in Github.

Repo : https://github.com/rezaamini-ir/laravel-tracker
Reminders
Published: 2021-01-14 13:23:41

This will be an unhelpful post haha
As you may know, I've been trying to use my email more often. 
Make Email Great Again, amiright?

I honestly do not want to use apps as that takes up space on my phone.
I check my email all the time and might as well use it for reminder.

##Do you guys know a service/bot or even a program that I can install into my cPanel so I can start getting reminders on the date/time for reminders?

similar option is followupthen but I don't want to be paying. Looking for open-source.

Thanks in Advance,
HaxNet @ [TekNiQ](https://tekniq.xyz)

update: I also just install remind (a CLI package) that I use for my Arch Linux.
It is quite simple to use and creating alias makes it even more easier to add reminders.
How to move from mid-level developer to senior engineer in 2021
Tags: career, software, engineer
Published: 2021-01-14 13:16:06

---
title: How to move from mid-level developer to senior engineer in 2021
published: true
description: Practical steps to becoming a senior engineer in 2021
tags: career,software,engineer
cover_image: https://res.cloudinary.com/bahdcoder/image/upload/v1610629569/christina-wocintechchat-com-4U_GM4dSb6c-unsplash_atzmga.jpg
---

I've spent a lot of time leading teams, training over 65 thousand developers via online courses and mentoring dozens. Here's a guide on how to move from mid-level developer to senior engineer in 2021:

### Start mentoring someone today.

   Show empathy, support and a strong desire to see this person succeed. Find someone who is just starting out, make sure they don’t make the mistakes you made. Get on a consistent schedule to have video calls, check up on their progress, pain points, and be there for them. And yes, don't doubt yourself. You have what it takes! You can do this!

### The value you provide needs to go beyond code.

   Get closer to the business. Schedule a call with your CEO now. Ask questions about the future of the business, the goals for the year. Get involved. Do market research about your company’s industry. Do this every week, attend marketing calls, make sure engineering is working towards the goals of the company. Love the business. Care for the business. Attend marketing calls, peaching calls, or watch past ones. Working at a large company ? Get super involved with the role of your team. 

### Level up technically. 

Don't learn more frameworks. Master the ones you're already using. Do something more advanced. Watch technical workshops. Every day, dive into the code and find those things that are making the business lose money (Performance, poor design, Bugs). Pay incredible attention to detail when writing code. Creating an endpoint to fetch data ? Don't end at fetching data. Handle 401s, 404s, data validation, sanitisation, rate limiting, caching, query performance, clean code, documentation. Every Single Detail Matters.

### Become a master of soft skills. 

Your coding skills can only take you half way there. The higher you go, the more people skills you need. Communicate excessively. Every single detail matters. Have a deep empathy for the business you work for, and the people you collaborate with everyday. Put yourself in their shoes. Be open minded. Accept feedback joyfully from those you mentor, those you report to, and be willing to grow from it. The more people skills you have, the more doors you can open.


🚀 Did you find this impactful? Consider [following me on twitter](https://twitter.com/bahdcoder) for more nuggets, tips and guides to grow in your career as a software engineer.
CSS Flexbox: flex-direction
Tags: css, beginners, codenewbie, todayilearned
Published: 2021-01-14 13:04:20

Hello Fellow Codenewbies 👋

Flexbox is known as *one dimension*.
It means that it deals with one dimension layout at a time, the column or the row.

When we talk about a column or a row in flexbox, we are talking about the *main axis* or the *cross axis*.

![cross main axis.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1609719149841/3rx8PuitL.jpeg)


# Making Responsive Layout With `flex-direction`

Before we talk about the values of `flex-direction`, you can check the playground that I provide below.
The screenshots that I attached in each value's explanation are based on this playground.

{% codepen https://codepen.io/adiati/pen/ZEpBeBd %}


## The values in `flex-direction`:
### row
⭐ This the default value.
This value makes the flex container becoming a row and the flex items become columns.
![row1.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1610412594152/-1iup83xp.jpeg)


### row-reverse
Same as `row`, but it reverses the order of the flex items.
![row-reverse-1.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1610412605130/AOPK3dhIy.jpeg)

### column
This value makes flex container becomes column and flex items become rows.

In a glimpse, it looks like the default layout when we don't apply `display: flex`.
But under the hood, this value ***switches the main axis***.
And because there is a change on the main axis, there are changes as well in the behavior of:
- `justify-content`
    will now work *vertically*  
- `align-items`
    will now work *horizontally*

![column1.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1610412527410/Qnrf-32Tv.jpeg)

### column-reverse
Same as `column`, but it reverses the order of the flex items.
![column-reverse-1.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1610412625974/NnCaMYZe1.jpeg)

We usually use *media queries* when we want to apply `flex-direction`.

## Conclusion

- `flex-direction` is changing the main axis around.
- The values of `flex-direction`:
  - row (**default**)
  - row-reverse
  - column
  - column-reverse
Daily Developer Jokes - Thursday, Jan 14, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-01-14 13:00:16

---
title: "Daily Developer Jokes - Thursday, Jan 14, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Thursday%2C%20Jan%2014%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258d16351b.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ What do you get when you cross a computer and a life guard?

___A:___ A screensaver!
 -->
CodeAnth
Tags: ruby, anthropology, computerscience, rails
Published: 2021-01-14 12:57:28

Are you a rubyist that really likes to think and talk about Ruby? 

I am an anthropologist and ruby dev conducting a series of interviews with rubyists to understand more about the values and the history of the ruby community. I have been chatting with a lot of ruby devs about their developer origin story, why they love (or hate) ruby, and what are their ideas about the ruby community. 

Maybe you want to share your story with me as well?

If you want to be interviewed for this research, please send an email to g.heurich@ucl.ac.uk
Re-creating Meteor original examples - part 1
Tags: meteor, javascript
Published: 2021-01-14 12:37:48

About a month ago the Meteor examples were removed from the Meteor repository. Honestly this was a long overdue action as these examples pre-dated the 1.0 release and were super ancient and only useful to archeologists. At least on first look.

Some examples could have been deleted out right as they were more for testing a single function (that is no longer relevant since we have CI) or in one case to showcase a functionality even predating Blaze where upgrading it was not worth it. The rest was worth updating. In many ways there were beautiful in their one short `js` file (in most cases).

First things first. Updating all the way to the latest release (1.12.1) via `meteor update` was for the most part easy. Occasionally one had to be a bit more patient, but nothing major. After that came things like adding `npm` and basic packages to make things run. Often this was enough to get the old code running fine (discounting the design), but with the old patterns that was not what I wanted to achieve. When I started to upgrade things along current coding practices it was often much easier to create a new Meteor Blaze project and drop the old code into it.

![Parties example](https://dev-to-uploads.s3.amazonaws.com/i/rcqc63ir65dlem9hvez6.png)

The next step was upgrading the code by adding imports and using ECMA Script features. The older the example the more replacements in code had to be made, but that was for changes before Meteor 1.0. After Meteor 1.0 it was mostly adding imports, separating code into its own `client`, `server` and `imports` folder for collections related stuff. Also not to mention Blaze changes. For me this was a re-acquainting with Blaze.

With these there was a chance for some small initial improvements. For example removing `insecure` and `autopublish` and adjusting things accordingly. Also removing `jQuery` and `underscore` where feasible.

![Words play example](https://dev-to-uploads.s3.amazonaws.com/i/9wkp5fka0lz7du860ps3.png)

The two most notable examples are the `parties` and `words play` examples. There is still a lot more work that needs to be done and there is still one more folder of unfinished examples left.

Currently my plan is to upgrade them to Meteor 2.0 and modernize things as much as possible. But before that I want to get the rest of the examples updated as well and determine which are the best to keep on going. These will then be uploaded to a dedicated GiHub repository to share with everyone and some examples like `words play` that are more advanced will be uploaded to Galaxy and expanded upon.

Stay tuned for part 2!

--------
If you like my work, please consider supporting me on [GitHub Sponsors ❤️](https://github.com/sponsors/StorytellerCZ).
Something I learnt about HTML
Tags: html
Published: 2021-01-14 12:15:40

Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages ​​such as JavaScript.

HTML can embed programs written in a scripting language, such as JavaScript, that affect the behavior and content of web pages. CSS inclusion defines the look and feel of the content. The World Wide Web Consortium (W3C), formerly responsible for HTML and now responsible for CSS standards, has promoted the use of CSS over explicit HTML since 1997. 

Related article: <a href="https://www.imam-khomeini-isf.com/how-to-build-messenger-bots/">How to build Messenger Bots?</a>

Web browsers receive HTML documents from a web server or local storage and convert documents to multimedia web pages. HTML describes the structure of a semantic web page and initially included clues to the appearance of the document.

HTML elements are the basic elements of HTML pages. With HTML constructions, images and other objects, such as interactive forms, can be embedded in the rendered page. HTML provides a means of creating structured documents by naming the structural semantics of text, such as titles, paragraphs, lists, links, quotes, and other elements. HTML elements are delimited by tags, written in angle brackets. Tags such as <img /> and <input /> feed content directly to the page. Other tags, such as <p> surround and provide information about the text of the document, and may include other tags as sub-items. Browsers do not display HTML tags, but use them to interpret the content of the page.
Embracing gradual typing — Strategies for adopting TypeScript into a large project (Talk)
Tags: typescript, javascript, techtalks, video
Published: 2021-01-14 11:26:45

---
title: 'Embracing gradual typing — Strategies for adopting TypeScript into a large project (Talk)'
published: true
description: A TypeScript talk I gave in November 2020
tags: typescript, javascript, techtalks, video
cover_image: https://dt.in.th/uploads/embracing-gradual-typing-ss.jpg
---

**There are many challenges when trying to adopt TypeScript into your JavaScript project.** Your project may already have tons of untyped files, changing your build system can sound risky, and your colleages may ask if the cost of investing in migrating all the code to TypeScript would be worth the effort or not.

Some may argue that they wouldn’t need types because they already have tests. Some may question whether the benefit would really outweigh the TypeScript tax. Some may have had bad experience with earlier versions of TypeScript before. And there are many outdated opinion pieces everywhere.

But _adopting TypeScript doesn’t have to be a big, all-or-none effort._

There are strategies for _incrementally_ introducing pieces and bits of TypeScript into your JavaScript project, each little step _immediately improving the developer experience_, without having to install extra dependencies or make any changes to the build system.

This is what I discuss about in this talk. It also contains real-world examples which is kinda hard to convey just in text.

{% details Topics discussed %}

- How you may already be using TypeScript in your JavaScript project.
- TypeScript the language, the compiler, and the language service.
- Using JSDoc to improve type inference, code completions, and IntelliSense.
- Configuring `jsconfig.json` for improved code actions and automatic refactoring.
- Using `// @ts-check` to type-check JavaScript files (with examples on dealing with a few type-checking errors).
- Enabling `checkJs` to type-check JavaScript files project-wide.
- Creating a `.d.ts` file next to a JavaScript file to keep the `.js` file unmodified.
- Creating a global `.d.ts` file to declare modules and global variables.
- Discussion on strategies for improving developer productivity, improving code documentation, and reducing chance of runtime errors.

{% enddetails %}

> **Note:** The talk is in Thai language but I added English captions, and all slides are in English.

{% youtube xATsf5nm2yc %}

Hope you find it useful, and thanks for watching! Also, please [consider subscribing to my YouTube channel](https://dt.in.th/go/youtube) for more content.
Ignite Game News React Hooks 😍🎉
Tags: react, javascript, framermotion, styledcomponents
Published: 2021-01-14 11:53:38

Game News App Using React Hooks, Redux, Styled Components & Framer Motion 🎉😍

Demo : https://ignite-react.netlify.app/

Repo : https://github.com/saidMounaim/ignite

This app from Dev Ed The Creative React and Redux Course 

https://developedbyed.com/p/the-creative-react-and-redux-course
Transform your existing Nuxt.js app to PWA
Tags: programming, pwa, nuxt, vue
Published: 2021-01-14 11:41:11

---
title: Transform your existing Nuxt.js app to PWA
published: true
description: A clear explination on how to add pwa to a nuxt app
tags: #programming #pwa #nuxt #vue
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gic2hwsp9wrbtrvawipr.png
---
 

### Let's go the terminal and type: 

```
yarn add --dev @nuxtjs/pwa
```
or
```
npm i --save-dev @nuxtjs/pwa
```

Once finished installing, go to nuxt-config.js and add the following

```
modules: ["@nuxtjs/pwa"],
```

Now you're app have pwa technology, We only need to override default values.

```
 // nuxt-config.js
  manifest: {
    icon: {
      // Add path to the app icon
      iconSrc: '',
    },
    // Short name of your app
    short_name: '',
    // Name of your app
    name: 'Chocoreto',
    // Add descreption
    descreption: '',
    start_url: '/',
    theme_color: '#fff',
    background_color: '#000',
  },

```

And voila !