teleren/devto huggingface dataset:
Self-driving cars
Tags: automation
Published: 2021-02-22 08:24:56

---
title: Self-driving cars
published: true
date: 2021-02-06 00:00:00 UTC
tags: automation
canonical_url: https://jhall.io/archive/2021/02/06/self-driving-cars/
---

Yesterday I expressed my view that we should “automate all the things”, especially tasks that have the potential for serious errors.

What about driving?

Self-driving cars are still under active development, and expert opinions vary, but I suspect that soon (probably within a decade), they’ll be much safer than human-driven cars.

I might be wrong about that, but for the sake of argument, let’s imagine that I’m right. Let’s imagine that a wholesale switch to self-driving cars (if this were logistically possible) could cut car accidents in half.

Now imagine that you’re at the new car lot, and you’ve just made a down payment on your new, self-driving car, you’ve climbed in. Your spouse is next to you. Your average 2.5 children are in the backseat. And the car starts speeding down the highway toward your home.

How do you feel?

Can you relax? Or is your jaw clenched?

You know the statistics. You and your family are half as likely to have an accident on the way home with the car self-driving, than if you were driving.

But I’m betting you feel out of control and nervous, just imagining it. I know I do!

Humans are predictably irrational.

Often the best decision we can make _feels_ scary, in the face of objective evidence. [Continuous Deployment](https://jhall.io/posts/benefits-of-cd/) is a great example, but there are countless others that apply to software development. Something may make you feel a loss of control, but don’t let an objectively irrational fear prevent you from doing the best thing!
Day 303 : Safe Side
Tags: hiphop, code, coding, lifelongdev
Published: 2021-02-05 22:48:15

_liner notes_:
- Professional : Pretty chill day. Had a meeting with my immediate team to catch up with everyone. Got to watch a teammate on a livestream show. Finished up my blog. I wanted to transfer to the new content management system, but I forgot to get my access from another team member. Also didn't get a chance to check out a React Native tutorial someone wanted me to check out. Probably do that this weekend. I'll make a note to do it to be on the safe side.

- Personal : Last night, I went through a bunch of tracks for this week's radio show. Also tried to see if I could get around an issue I was having with a previous side project. It didn't work. I think I may have another idea. I'll try it this weekend. Then I watched an episode of "The Watch" and went to sleep.

![Rows and rows of yellow tulips extending to the background with mountains in the distance in Skagit Valley, WA, United States.](https://dev-to-uploads.s3.amazonaws.com/i/x3a9hheagyyyqgyncyxt.jpg)

After work, I worked on the radio show tomorrow. Got a lot of tracks. Also, while I have WiFi at the park, I downloaded the latest episode of "WandaVision" from Disney+ so I can watch it later and not use any of my data. I may try to work on the possible solution for that issue I was having or work on another side project I want to release soon. Then of course watch "The Watch" and "WandaVision".

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube qMiBfx11K1c %}
Evolution of Object Detection Techniques - RCNN
Tags: machinelearning, womenintech, 100daysofcode
Published: 2021-02-05 22:32:01

RCNN ( **Region Based Convolution Neural Network** ) is used for object detection and Localization (Identification of Objects in image with Boundaries). In this, <u>Selective Search</u> method (Edge Boxes and Other Region Proposal Methods) are used to determine the region proposal. This technique overcomes the problems faced using Sliding Window technique. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/etgw6qs25lbgyoljz1nc.png)

Around 2000 Region Proposals per Image are extracted using this technique and all these regions are Cropped and warped into fixed size (depending on the dimension which the used algorithm in the network for Classification expects) and then these regions are fed to the CNN network one by one and on the last layer of the network SVM is used for Classification.

But,
- RCNN is very slow as every single region requires forward pass of CNN and as a result we end up with too many inputs to localization network.
Facebook widget
Tags: facebook, widget, html, question
Published: 2021-02-05 22:26:13

I recently started to crate my app to create daily menus for restaurants.
My idea was to provide widget with daily menus on facebook page and same for restaurant website.

I know that is possilbe to share facebook widget on your site, but what if you want share your widget on facebook?

I didn´t find any tutorials or article if it is possible.
Do you think it is possible or my idea?
Let me know if you have any experience in this.
Share your knowledge, get paid, and make a difference?
Tags: hiring, javascript, node, react
Published: 2021-02-05 21:47:26

## About Us

Code Youth is a Canadian non-profit organization whose mission is to empower and support youth, especially those who have dropped out of high school, in accessing jobs within the technology sector.


## About The Opportunity

We’re looking for a programming instructor to teach the first cohort of students starting April 1st. The instructor will do a mix of instruction and hands on coding support around a course designed to give real world knowledge.

## Skill & Qualifications

Ideal candidate has a passion for programming, and experience either teaching or working in software. Additionally the course will largely focus on JavaScript so frontend knowledge is an asset.

## How To Apply
Please reach out to codeyouthmail@gmail.com. Candidate must be able to work in Canada.


_Please feel free to leave questions in the comments section._
Deploying a NestJs App with TypeORM & PostgreSQL on Heroku
Tags: nestjs, typescript, typeorm, heroku
Published: 2021-02-05 21:39:37

I recently created a simple full-stack todo app written in [Angular](https://angular.io/) for the frontend and [NestJs](https://nestjs.com/) for the backend.

I had to host the app on a live server for testing. I decided to Heroku free dyno that I normally use for hobby apps.

Steps I followed:
* I personally use the Heroku [CLI](https://devcenter.heroku.com/articles/heroku-cli). So install one if you don't. 
* Login to Heroku via command line
```JS
heroku login
```
* Create your app on Heroku (This can be done via command line or through the [web](heroku.com)).
```JS
heroku create new-app-devto
```
>
## Deployment 
* There are a [couple of ways](https://devcenter.heroku.com/categories/deployment) to perform deployment in Heroku
 * [Deploying with Git](https://devcenter.heroku.com/articles/git)
 * [Deployment Integrations](https://devcenter.heroku.com/categories/deployment-integrations) etc.

## Setting App the Database
* Head over to your dashboard at the [web](https://dashboard.heroku.com/) interface, then select your app and view resources.
<img src="https://dev-to-uploads.s3.amazonaws.com/i/0rll2qxi5ckz8grabt4t.png" />
From Resources, go down to `Add-ons`. Search and select your desired Add-on. In our case that will be Heroku Postgres.
* Select your billing plan and submit your form
<img src="https://dev-to-uploads.s3.amazonaws.com/i/d2mn398iq9o9wvi58c13.png" />
* You'll see that the add-on has been attached as a database.
<img src="https://dev-to-uploads.s3.amazonaws.com/i/zn1nw9ovsz68as9e3108.png" />

## Connecting your database to your App.
There a few ways to do this, but the most secure is using [environmental variables](https://devcenter.heroku.com/articles/config-vars).
We will use the nonsecure direct approach in this article and you can through the [official documentation](https://devcenter.heroku.com/articles/config-vars) for setting env variables.
 * Click on the navigator toggle icon near your profile icon and select Data. Select your database in the `Datastore and then select Settings.
<img src="https://dev-to-uploads.s3.amazonaws.com/i/ukr2lt9javr0uphlaj4b.png" />
On Database Credentials, click the View Credentials button to reveal the credentials
<img src="https://dev-to-uploads.s3.amazonaws.com/i/o7ouojtorzoc75hvd2ed.png" />
The credentials will be used in your TypeORM database configuration and connect directly to your database in Heroku. An example:-
<img src="https://dev-to-uploads.s3.amazonaws.com/i/aqadflpj64qjtope1ydh.png" />

## Add, commit and push changes
 * And after, add and commit all your changes then push to heroku


`git push heroku master`
* And your app will be live with a database connection. 

 Happy Coding.

* PS: Heroku added [documentation](https://help.heroku.com/O0EXQZTA/how-do-i-switch-branches-from-master-to-main) to change the default branch
Tailwind without Tailwind
Tags: tailwind, tailwindcss, css, webdev
Published: 2021-02-05 21:28:01

---
canonical_url: https://padding-0.com/tailwind-without-tailwind/
---

Did you know you can use all the benefits of Tailwind CSS without using the library itself? 

Tailwind is a design system. And like any design system, it has design tokens. Design tokens are all the hardcoded values like colors, spacing, border sizes, etc.

All these design tokens can be extracted as plain CSS variables, and used just like that:

```
border-radius: var(--rounded-lg);
background-color: var(--white);
padding: var(--s8);
width: var(--s60);
box-shadow: var(--shadow-lg);
text-align: center;
```
  
  
Check out a [gist](https://gist.github.com/SidKH/96796d968bd81e3980ecee8c6039b75f) containing all major design tokens from Tailwind as CSS variables. 

You can also see it in action on [codesandbox](https://codesandbox.io/s/sweet-bhaskara-e2my7?file=/src/styles.css:140-304).

👉 [Original post ](https://padding-0.com/tailwind-without-tailwind/)
Flutterwave integration
Tags: javascript, php, sql
Published: 2021-02-05 20:53:29

Hello guys I've been working on this flutterwave integration for some time now and it's beginning to. Knock my head off for some reasons. I am working on a sign up page that we redirect users to payment page once registration is successful. I want to select the user details and use it to process the required inputs for flutterwave and also send the payment details to my database. I have not written a payment gateway before please need some help thanks in advance...
What projects are you most proud of?
Tags: hobby, bestprojects, discuss
Published: 2021-02-05 20:51:29

---
title: What projects are you most proud of?
published: true
description: Best non-tech/tech projects
tags: #hobby #bestprojects #discuss
---

I'm trying a non-tech hobby in my life. Photography helps me clear my mind and see the world from a different perspect.

![my photo](https://dev-to-uploads.s3.amazonaws.com/i/6ypo0r909eccm8azrluo.jpg)

Share your best non-tech/tech projects with us?
Bringing the Power of PyTorch to Your Mobile Apps with Flutter
Tags: flutter, machinelearning, pytorch
Published: 2021-02-05 20:49:58

PyTorch is a powerful and popular machine learning framework that is widely used for developing deep learning models. One of the most exciting features of PyTorch is its ability to run on mobile devices, which allows developers to create models that can be used by users without the need for a server connection. However, it is important to be aware that some models can be quite large, which can negatively impact the user experience. In this post, we will explore how to use PyTorch on Flutter, a popular mobile app development framework.

The basic overview of using PyTorch on Flutter is to use a method channel to run native code, such as Java or Kotlin. The method channel allows you to send data, such as an image, from the Flutter app to the native code, where it can be processed by the PyTorch model. Once the model has processed the data, the results are sent back to the Flutter app and displayed to the user.

Here are the basic steps to use PyTorch on Flutter:

1. Create a [method channel](https://flutter.dev/docs/development/platform-integration/platform-channels?tab=android-channel-java-tab) to run native Java code.
2. Send data, such as an image, to the method channel as an **uint8list**.
3. Receive the data in the backend and parse it, in the case of an image we need to use `BitmapFactory.decodeByteArray(byteList, boffset, blength);`
4. Run the forward method of the PyTorch module on the parsed data.
Sometimes the model outputs a map so the output of the model is in the "out" key of the map.
5. Send the data to the frontend and display it
You do this by `result.success(data_to_send);`
then keep in mind the [type conversion](https://flutter.dev/docs/development/platform-integration/platform-channels?tab=android-channel-java-tab#codec) from java to dart or the rest of the programming languages.

One drawback of using Flutter with the PyTorch Java implementation is that Flutter runs in a single thread, which means that the app may halt when running the model in the background. Additionally, the method channel cannot be used in other isolates, which can be a problem in production. In this case, you may need to go for a fully native Java/Kotlin Android implementation or suffer the consequences.


In conclusion, PyTorch is a powerful tool for creating deep learning models that can run on mobile devices. By using Flutter and a method channel, it is possible to integrate PyTorch models into mobile apps, but it is important to be aware of the potential limitations. 

{%youtube -II8B4DPZog%}

If you want to learn more, check out the YouTube video for this post and consider subscribing to my YT channel [ramgendeploy](https://www.youtube.com/c/ramgendeploy?sub_confirmation=1) for more in-depth tutorials.
AI vs ML vs DL
Tags: ai
Published: 2021-02-05 20:36:49

__Artificial Intelligence__

When any machine, often a computer, performs tasks that only a human being can do which require human intelligence, following certain set of rules, is often termed to be artificially intelligent.

__Example__

AI is used in various domains, for example in healthcare an AI based disease detector can be developed based on the past historical clinical data from many individuals. 

__Machine Learning__

Machine learning and AI aren't different, it is a subset of AI. It helps systems with the ability to automatically learn and improve from experience. Earlier when AI was new, developers have to define their own algorithm for training the application. But nowadays, there are n number of problem specific algorithms developed and documented by experts , which can be adapted to similar problems of ours. Example : Linear Regression, K-means etc..

__Example__ 

When we develop a grocery ordering application, we will keep on training the application to anticipate customer behaviour from their activity, which in turn can be used to provide the customer the best experience by means of best deals and suggestions. 

__ANN(Artificial Neural Networks)__

It is a system or network which is designed to simulate the way a human brain thinks, analyse and process information(data). There are problems which cannot be solved by traditional machine learning algorithms, these problems are also highly impossible to be solved by human beings. Such problems can be solved by designing ANN. An example could be handwriting recognition.

__Deep Learning__

Deep Learning is again a subset of Machine Learning. It uses artificial neural networks to analyse different factors with a structure that is similar to the human neural system.
Learning from the Pros: My Insights from the Andrew Ng Course
Tags: machinelearning, datascience
Published: 2021-02-05 20:35:29

## Introduction
If you're looking for a solid foundation in machine learning, the Andrew Ng course at Stanford University is a great place to start. Recently, I completed the course and I want to share my thoughts on the experience.

## My First Thoughts

Firstly, I really enjoyed the course and I believe it provides a great base for any machine learning practitioner. The course has a low-level focus, delving into the math and mechanics behind the concepts. This may be challenging if you don't have a background in university-level calculus and linear algebra, but the course doesn't rely heavily on math when grading. I would still recommend looking into linear algebra to better understand the formulas.

The course covers a wide range of topics, including supervised and unsupervised learning, clustering techniques, and good practices for achieving great results. It's also great that the course doesn't focus too much on deep learning, leaving room for that topic to be covered in another course, such as deeplearning.ai.

## Programming assignments
The labs are a big part of the course, and I must admit, I had my fair share of frustrations while working on them. I found that Octave, the programming language used in the labs, was different from the high-level and OOP languages I was used to. However, I found that thinking in terms of math and linear algebra, rather than programming, helped me get through the assignments. One tip I can offer is to start using vectors as soon as possible. Not only will this make your code faster by avoiding for loops, but you'll be able to translate math formulas almost directly into code.

Another tip is to take advantage of the tutorial section of the labs. I didn't realize it existed until the last weeks of the course and it would have saved me a lot of time and frustration. I also found it helpful to draw out the concepts, like in my drawings of backpropagation and gradient descent (shown below).

![image](https://dev-to-uploads.s3.amazonaws.com/i/brfak9jyfwj2jv4bxhsz.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/u5zqduert9gmjgyaeuxx.png)

## Final thoughts

In conclusion, I highly recommend the Andrew Ng course to anyone looking to gain a comprehensive understanding of machine learning and data science. The course is 11 weeks long, but you can complete it in 3-4 weeks if you're able to devote enough time. 

You'll come away with a strong understanding of topics beyond deep learning and good practices for data science. Plus, it's always nice to feel like an expert when Professor Ng says "those of you who are experts in linear algebra will recognize this." 

If you're struggling with any concepts in the course, feel free to reach out to me on twitter @ramgendeploy for help. Just keep in mind that I can't help with programming assignments, but there's always the tutorials section in the forums!
Weak references in C# (and Unity)
Published: 2021-02-05 20:13:11

Weak references allow loading resources and letting the garbage collector (GC) destroy them at will to free memory. This simplifies memory management for objects that only need to be used temporarily and it’s difficult or impossible to manage their lifecycle explicitly. Note that another solution in C# is a MemoryCache that you should look into if you are considering weak references.

Let’s start with a bug! Assume we have class named Fooer with a method called Foo().

```
// DOES NOT WORK!!
Fooer object = null;
// Doesn’t matter if you check either or both these conditions.
if (objectRef.IsAlive && objectRef.Target != null) {
  // uh-oh GC might have done its magic, after we checked.
  object = objRef.Target as Fooer;
} else {
  object = loadObject();
}
// Boom! NPE — sometimes…
object.Foo();
```

This code will sometimes fail, which is the worse form of failure. This is especially surprising in Unity, where you expect to be operating in a single thread. The garbage collector however always runs in a separate thread, so between the weak reference validity check and the assignment the objRef.Target could have been set to null by the GC.
The correct way to do this is by first assigning the target object to a strong reference, and then checking if it’s null.

```
// Create a strong reference.
object = objRef.Target as Fooer;
// Check if the strong reference points to anything.
if object == null {
  object = loadObject();
  objRef.Target = object;
}
// if loadObject() never returns null, we are safe here.
object.Foo();
```

If the referred object is still loaded, a strong reference is created to it in the stack. This prevents the garbage collector from destroying it - until all hard references are removed.

Bonus: Simple class to manage a weak reference of an object Foo:

```
public class FooerRef {
  private WeakReference fooerRef;
  
  public FooerRef() {
    this.objectRef = new WeakReference(null);
  }
  
  public Fooer Get() {
    Fooer fooer = objectRef.Target as Fooer;
    if (fooer == null) {
      fooer = loadFooer();
      objectRef.Target = fooer;
    }
    return fooer;
  }
  
  private static Fooer loadFooer() {
    // load/create a fooer
  }
}
```
into the rabbithole of Vue
Tags: vue, tutorial
Published: 2021-02-05 19:37:05

So I got around to fiddling with Vue and this is how it went.
First I questioned myself a bit. Why should I use this framework?

Simply put.
Componentization.
...is that a word?

Anywhos! I decided I wanted to make a header component for a resume as it was pretty easy to visualize and separate in my head. First I made sure all of the CSS and HTML code were up to par and wouldn't get messed up because of me adding in Vue.
I added the script in and bam it magically started working. Not really.

First I had to go through and add IDs to the div or ul or whatever elements so that I could reference them in the JS. Next I went through with all of the proper bracket syntax and adding in the Vue Code. You can see my struggles in my codepen here.

[Link to Code Monkey Heaven](https://codepen.io/UIXKinguin/pen/poNgBJp)

In all seriousness it's pretty powerful in an age where development speed is taken for granted. You can create components for quite literally anything you can imagine. So flexible you could call it the Simone Biles of frameworks. You can find Vue componenets, create, your own, etc. Its like using legos to build a webpage and its all in all a really powerful tool.

If you want to check out a more detailed explanation of what I did. You can visit my YouTube Channel for more.
[UIX Kinguin](https://www.youtube.com/watch?v=hVz6rCPyeEY)