teleren/devto huggingface dataset:
Quick tip: converting Gluon models to symbolic format
Tags: opensource, machinelearning, deeplearning
Published: 2019-01-25 09:51:35

---
title: Quick tip: converting Gluon models to symbolic format
published: true
tags: open-source,machine-learning,deep-learning
canonical_url: https://medium.com/@julsimon/quick-tip-converting-gluon-models-to-symbolic-format-9513e5dd1d73
---

As discussed [earlier](https://medium.com/@julsimon/gluon-building-blocks-for-your-deep-learning-universe-4bce4e56ef55), Gluon is an imperative API available on top of the symbolic API implemented by [Apache MXNet](http://mxnet.incubator.apache.org).

One of the cool features of Gluon is the extensive [collection](https://gluon-cv.mxnet.io/api/model_zoo.html) of pre-trained computer vision models available in [Gluon CV](https://github.com/dmlc/gluon-cv). Using these models with the Gluon API is extremely easy, but sometimes we’d rather use the symbolic API instead.

One reason could be language support: Gluon is Python only whereas MXNet supports a whole list of languages including C++, which you may need to get the best prediction performance possible. Unfortunately, the MXNet model zoo is not synchronized with the Gluon model zoo, so you can’t just grab the same models.

One easy solution to this problem is to use the Gluon API to download models, export them to symbolic format and then load them using the MXNet API.

It goes like this.

```
from gluoncv import model\_zoo
import mxnet as mx
import numpy as np

# Download the model from the Gluon model zoo
# You'll find it in ~/.mxnet/models
net = model\_zoo.get\_model('resnet50\_v1', pretrained=True)

# Convert the model to symbolic format
net.hybridize()

# Build a fake image to run a single prediction
# This is required to initialize the model properly
x = np.zeros([1,3,224,244])
x = mx.nd.array(x)

# Predict the fake image
net.forward(x)

# Export the model
net.export('resnet50\_v1')
```

This will export the model weights and the JSON file containing the symbolic definition of the model.

```
$ ls -1 resnet50\*
resnet50\_v1-0000.params
resnet50\_v1-symbol.json
```

Now you can load this model as usual with the [_model.load\_checkpoint()_](https://mxnet.incubator.apache.org/api/python/module/module.html) API. Just make sure you use a recent version of MXNet, as Gluon models could be incompatible with older ones. YMMV.

```
import mxnet as mx

sym, arg, aux = mx.model.load\_checkpoint("resnet50\_v1", 0)
...
```

That’s it. Now you can enjoy all these models with the symbolic API :)
Install kubectl and minikube on Mac OS
Tags: kubernetes, googlecloud, macos
Published: 2020-01-18 00:39:01

---
title: Install kubectl and minikube on Mac OS
published: true
date: 2018-11-27 00:00:00 UTC
tags: ['kubernetes', 'google-cloud', 'macos']
canonical_url: https://whatdafox.com/install-kubectl-and-minikube-on-mac-os/
cover_image: https://whatdafox.com/assets/static/hero.07cc2b7.fb033a7e34bbde800f3eb09324c4cf27.jpg
---

> **UPDATE**: Docker can also help you run a Kubernetes cluster locally, check the Docker documentation to get started: https://docs.docker.com/docker-for-mac/kubernetes/

## Install Google Cloud CLI tool 

[GCloud Quickstart MacOS](https://cloud.google.com/sdk/docs/quickstart-macos) 

## Install kubectl 

```bash 
$ gcloud components install kubectl 
``` 

## Install minikube 

```bash 
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.23.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/ 
``` 

## Install minikube hyperkit driver 

```bash 
$ curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \ && sudo install -o root -g wheel -m 4755 docker-machine-driver-hyperkit /usr/local/bin/ 
``` 

## Configure minikube to use hyperkit driver 

```bash 
$ minikube config set vm-driver hyperkit 
``` 

## Start minikube 

```bash 
$ minikube start 
``` 

## Run a test 

```bash 
$ kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080 $ kubectl expose deployment hello-minikube --type=NodePort $ kubectl get pods 
``` 

## Success!

![Success](https://whatdafox.com/assets/static/screenshot.3fa2e4a.b08e2c5e6b45a19245b4b4eb2e869c25.png)
ERC721x Tutorial, library to consume smart contract events with RabbitMQ / Kafka.. | EatTheBlocks Newsletter #17
Tags: ethereum, kafka, rabbitmq, erc721x
Published: 2018-11-26 23:10:56

---
title: ERC721x Tutorial, library to consume smart contract events with RabbitMQ / Kafka.. | EatTheBlocks Newsletter #17
published: true
description: 
tags: Ethereum, Kafka, RabbitMQ, ERC721x
---

https://thepracticaldev.s3.amazonaws.com/i/bp2886b7875k8rzm0aan.png

This week in the EatTheBlocks newsletter:  ERC721x Tutorial, library to consume smart contract events with RabbitMQ / Kafka...

Video: https://youtu.be/LfwQY5j2qp0
Post:  https://eattheblocks.com/erc721x-tutorial-library-to-consume-smart-contract-events-with-rabbitmq-eattheblocks-newsletter-17

Every week I send the 10 most interesting tutorials, tips & news for Ethereum Dapp developers: Solidity, Truffle, Web3, Ethereum protocol & Token standards. Sign up to the newsletter on https://eattheblocks.com and never miss an episode!
Productivity Hacks
Tags: productivity, discuss, webdev, beginners
Published: 2018-11-26 19:36:15

---
title: Productivity Hacks
published: true
description: What hacks do you use for productivity?
tags: productivity, discuss, webdev, beginners
cover_image: 
---

Hey Guys 👋🏽,

Hope everyone is OK. When learning (reading a lot) i've found myself getting distracted easily so today I thought to try the Pomodoro technique and i'm happy to say I saw some great results!

It got me thinking, what other hacks work you guys?

---

_Thanks for reading. To keep up with my coding journey come say hi 👋 on [twitter](https://twitter.com/lawyerscode) or on our #devNewbie [Discord](https://discordapp.com/invite/mBsMP2H) server where we have a friendly group of learners sharing their experiences._
npm package discovered to have bitcoin-stealing backdoor
Tags: npm, opensource, security, news
Published: 2018-11-26 19:32:08

I think people expected this would happen, or was already happening. This is a serious security risk we've all been dealing with in open source.

{% github https://github.com/dominictarr/event-stream/issues/116#issue-382854428 %}

This is the great post from Hackernoon theorizing this scenario:

## [I’m harvesting credit card numbers and passwords from your site. Here’s how.](https://hackernoon.com/im-harvesting-credit-card-numbers-and-passwords-from-your-site-here-s-how-9a8cb347c5b5)

Here's another thread that was just created, related to the topic:

## [How do we improve security in the npm ecosystem?](https://dev.to/nepeckman/how-do-we-improve-security-in-the-npm-ecosystem-3hmj)

I still felt like this was worth a news headline on the site, hence this post. 🙂
What hosting do you use? 
Tags: discuss
Published: 2018-11-26 18:27:13

---
title: What hosting do you use? 
published: true
description: From orchestrating containers to "serverless" to doing it all yourself with an ansible script, the options for putting things on the internet have changed considerably in the past decade. 
tags: ["discuss"]
---

From orchestrating containers to "serverless" to doing it all yourself with an ansible script and a $5 DO droplet, the options for hosting websites and apps have changed considerably in the past decade. 

What method do you use for putting stuff on the internet? Am I "old school" for thinking I still need to install and configure a server myself?
Back to school
Tags: discuss, beginners
Published: 2018-11-26 18:09:15

---
title: Back to school
published: true
description: How would you prepare if you were taking your degree again?
tags: discuss, beginners
cover_image: https://clipartix.com/wp-content/uploads/2016/06/Image-of-school-building-clipart-4-college-building-clip-art.jpg
---

As of this morning it's official - money has changed hands and I'm headed back to college.  I've enrolled in an online undergraduate program in Software Development which will fit around my current work schedule.  When the administrative dust settles, it's looking like a Bachelor's of Science in about two and a half to three years and I've selected a track that will result in a certificate in C++ Programming after about a year.

It's been...yikes... *lots of years* since I've been in formal schooling, and that schooling was not in software.  I'm pretty nervous - it turns out entering as an adult this time around doesn't help a ton with the whole angst shindig!  Go figure.

If you had the chance to re-take your software degree, knowing what you know now, is there anything you'd do differently?  How would you make the most use of your time during and between semesters?  Is there anything specific I should try to prepare for leading up to the start of class next January?  What surprised you starting out?

If anyone else has done an online degree while also working full time in a separate domain, I'd love some anecdotes about how you juggled everything, too!  It sounds like it's going to be a lot of work - how did you balance school, work, and everything else?
Reactive Cookies with RxJs
Tags: javascript, observables, webdev
Published: 2018-11-26 16:51:10

---
title: Reactive Cookies with RxJs
published: true
description: Store values in reactive cookies.
tags: javascript, observables, web development
---

We need to store data on the client's device securely and, for that, we have cookies. The NPM package `js-cookie` provides us with a simple interface to store and retrieve cookies. Let's build a wrapper for this interface to make our cookies reactive.

A reactive cookie will be created with a key.

```
import { of, Subject } from 'rxjs';

class ReactiveCookie {

    constructor(key) {
        this.key = key;
    }

}
```

Let's add getters and setters for the value.

```
constructor() {
    ...
    this.value = new Subject();
}

getValue() {
    return this.value;
}

setValue(value) {
    this.value.next(value);
}
```

Great! We want the stored cookie to be updated every time we set the value so that it's always in sync. We'll subscribe to the `value` subject and set the cookie on each value.

```
constructor() {
    ...
    this.synchronize();
}

synchronize() {
    this.getValue().subscribe((value) => { Cookies.set(this.key, value); });
}
```

Alright, what about when there is already a stored value. We want this stored value to be set as the initial value so we'll add that as well to the constructor.
```
constructor() {
    this.retrieveStoredValue();
}

getStoredValue() {
    return of(Cookies.get(this.key));
}

retrieveStoredValue() {
    this.getStoredValue().subscribe((value) => { this.value.next(value) });
}
```

Woo! Now, whenever we create a Cookie with a key that already has a value stored, that value will automatically be loaded into the ReactiveCookie `value`. Furthermore, setting a new value will immediately update the value of the stored cookie. Finally, lets add `clear()` and `remove()` methods to complete our functionality.
```
clear() {
    this.setValue(null);
}

remove() {
    Cookies.delete(this.key);
    this.value.complete();
}
```

Now, go out and store some values!
How do we improve security in the npm ecosystem?
Tags: security, javascript, npm, discuss
Published: 2018-11-26 18:02:28

For those who haven't seen this trending elsewhere, [a popular npm library executed malicious code on victims' computers](https://github.com/dominictarr/event-stream/issues/116). To summarize the thread (though it is worth a read) the maintainer of the library gave control to an unknown individual who claimed they wanted to maintain it. This individual added a dependency designed to execute some sort of malicious code, and people are still trying to figure out what the payload does. While a lot of people are playing the blame game, I'm interested in discussing what practical steps can be taken to limit this vector of attack. Should we establish a more rigorous process for giving up control of an npm module? Is our only hope better audit tools? I'm interested in any idea that addresses this security concern.
Everyone one of us is being stalked online.
Tags: advice, bigdata, future, technology
Published: 2018-12-24 16:40:47

---
title: Everyone one of us is being stalked online.
published: true
tags: advice,big-data,future,technology
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/1024/1*odPbZJLdkuljedJSRqOFdg.png)

> Do you know which companies know the news you read, friends you meet, your fitness regime, food you order online, where you live, what music you listen to, where you are travelling this summer, what you are planning to buy?

#### What if a stranger:

- Follows your every move.
- Monitors your internet history and computer usage.
- Taps your phone calls and messages
- Takes your photos without consent.
- Shares personal information gathered about you with people you do not know.

#### **Do you think you are being stalked,** how will you react?

- Change your behaviour
- Confront the stalker
- Report it to the authorities

#### What about stalking in the digital world?

In June this year I shared my thoughts about our privacy in the digital world at [15x4 Munich meetup](https://munich.15x4.org/).

The video is available now: [15x4–15 minutes about Your Online Privacy](https://www.youtube.com/watch?v=JMkH7r9mDPc)

Slides: [https://www.slideshare.net/konarkmodi/our-online-privacy/1](https://www.slideshare.net/konarkmodi/our-online-privacy/1)

Happy Hacking!

You can follow me on Twitter at [Konark Modi](https://twitter.com/konarkmodi)

Thanks for reading and sharing ! :)
I'm a security auditor and researcher, Ask Me Anything!
Tags: ama, security
Published: 2018-11-26 15:32:52

---
title: I'm a security auditor and researcher, Ask Me Anything!
published: true
tags: ama, security
---

My name is Paula, I've been here for a while now, but I haven't done this "ask me anything" thing yet, and felt like doing it now.

I'm 22 years old spanish security auditor, and I'm studying computer engineering. I've also studied a course of investigative journalism too, as I'm researching about internet censorship around the world, my main interest and investigation. I've co-founded a privacy and security awareness association in Spain called [Interferencias](https://twitter.com/Inter_ferencias), and I'm very happy to see a lot of people is getting involved in it.

I've worked in many tech related things by now, as I'm also into systems and hardware. I've been systems analyst, robotics teacher in Switzerland, Arduino monitor in an University Campus for girls into tech, and security auditor in a couple of companies. I spend most of my time researching, writing and learning, I give security speeches in different cities, mostly in my country, Spain, but I'm going to Vienna this week for the same reason.

I'm very into open source, and I work only with Linux, my main working condition. I use Debian Jessie and Tails, for the curious. 

I'm currently trying to organize a python girls club for local female developers, and there already some girls interested. Our github is [here](http://pythongirlsgranada.github.io/).

I'm also learning about [**IPFS**](https://dev.to/terceranexus6/security-sprint-the-new-internet-7fj) as distributed ledger is one of my favorite tech topics when related to security.

I try to keep a weekly publishing in DEV under the name of **Security Sprint**, even tho these last two weeks have been difficult for me to keep up.

**I'd love to answer any security, censorship or whatever related question you have**, as well as meeting other DEV users interested in these topics. Please feel free to ask my anything.
Self-taught? Your strengths and weaknesses 
Tags: discuss, selftaught, career
Published: 2018-11-26 15:27:38

---
title: Self-taught? Your strengths and weaknesses 
published: true
description: A self-taught thought.
tags: #discuss #self-taught #career
cover_image: https://thepracticaldev.s3.amazonaws.com/i/772jdpx1imw6pgg7nr4q.png
---

###Hello everyone !

Today I was thinking about an update of my resumé and I started to ask myself, as a full self-taught, what are my three strong points and my three weak points. I am curious to know if you share with me the same strengths and weaknesses :

⭐️ For those who are self-taught, what are your strong/weak points ? 
⭐️ And for those who worked with self-taught, what was their strong/weak points ?

And if you are an employer, if you have two similar candidates, which one would you prefer ? The academic one or the self-taught ?


####My strong points :

- **Fast (and good?!) learner** :
    I don't know if it's because I am self-taught that I learn fast but I know that helped me a lot. When I started my first job I didn't coded a lot with JS and I had to learn how to code with React JS within two months.
- **Independent** : 
    Being self-taught helps you to learn to find informations, documentations, and answers to your problems by yourself.
- **Being self-taught shows your motivation and curiosity** :
    It is obvious that you are motivated and curious, otherwise you would not be here ;) 

####My weak points :

- **Not being surrounded by a large community of developer** :
    It is complicated (not unrealizable at all!) to find a community of developer to exchange.
- **Not having the good vocabulary** : 
    Sometimes when I speak with another developers, they asked me if I know about this or that and I say "no". But when they explain me what it is, I realize I know this concept/subject but I didn't know how to name it. I think this is because when you learn by yourself you don't communicate enough about what you learned, you don't memorize correctly all the vocabulary (having few years of professional experience help to naming correctly things).
- **Independent** :
    This is also a weak point. Indeed, you are used to do everything by yourself and you forget that sometimes, asking for help it is essential to be productive and to improve your knowledge...
What do you need to learn Golang
Published: 2018-11-26 15:12:38

---
title: What do you need to learn Golang
published: true
description: 
tags: 
---

I’ve been for years a Java developer, but for the last 2 years I have developed a huge interest in Golang programing language, and most of the time people when is listening to me talking about that ask me, What do I need to learn Go?

To be honest, what I always think is that for learning anything in life, you only have to really want to do it, and apply any necessary effort to make it real. BTW there are useful ways to have a guide on how to start to learn based on your experienced. And I particularly split that in different bases:

**Experience only based on OOP:**
Golang is a multiparadigm language, you are free to build a totally functional architecture but you also have the option for using OOP practice and patterns because part of the definition of the language is based on concepts from OOP. For this reason, you need to spend time understanding functional programming to know what are you doing with Go and why.

**Experience base on procedural programming:**
If you come from a language like C, you can start taking the base Golang tutorial and start over it, because Go is like a C with steroids. And in the cases based on architecture patterns, you need to look for going good practice and patterns.

**Experience based on scripting:**
If you come from scripting, because you are a sysadmin or someone that only knows about the shell, you can read books and posts about fundamental of programming in parallel with the Golang learning.

**No experience of programming before:**
For every one that is initiating, I recommend to learn about fundamentals of programming first and then can go throw a Golang tutorial.

*Materials that could be useful:*

https://tour.golang.org/
https://golang.org/doc/effective_go.html
https://www.godesignpatterns.com/
https://talks.golang.org/2015/go-for-java-programmers.slide#1
https://github.com/tmrts/go-patterns
https://github.com/dariubs/GoBooks
https://medium.freecodecamp.org/here-are-some-amazing-advantages-of-go-that-you-dont-hear-much-about-1af99de3b23a

If you see I haven’t mentioned at all specific technologies, and this is because now days is not anymore about the language is more about why I would use this technology and how I will use it.
I also recommend looking for and groups on slack, telegram, facebook, and twitter.
I am also a professional filmmaker, you can Ask Me Anything about filmmaking and videomaking!
Tags: ama, filmmaking, videomaking
Published: 2018-11-26 14:20:38

---
title: I am also a professional filmmaker, you can Ask Me Anything about filmmaking and videomaking!
published: true
description: I have been working in cinema and advertising industry for more than 15 years. In these years, there are documentary films I made with networks and big TV channels, animated films I created for brands. So if you have any questions about these, feel free to ask. 
tags: #ama #filmmaking #videomaking
---
The 7 Most Popular DEV Posts from the Past Week
Tags: top7, bestofdev
Published: 2018-11-26 13:54:14

_Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️_

#1. Super Thorough List

Sahil finds and shares an incredible list of resources for programmers.

{% link https://dev.to/sahilrajput/useful-websites-for-programmers-36k %}

#2. Uncovering Gems

Rhymes shares their favorite trick in Python's standard library - making a slow serial task into a concurrent one. 

{% link https://dev.to/rhymes/how-to-make-python-code-concurrent-with-3-lines-of-code-2fpe %}

#3. Heavyweight

A commonly discussed topic, Leonardo vents about the weight of node_modules.

{% link https://dev.to/leoat12/the-nodemodules-problem-29dc %}

#4. Don't be mad!

How to remain patient and considerate towards others while navigating the demands of developing software. 

{% link https://dev.to/restoreddev/showing-kindness-while-programming-52a7 %}

#5. Fuller Test Suites

>Calculate the distance between two points and compare with the true real number calculated manually. If they match, all is well!

How to put yourself in a testing mindset, think about domain area and corner cases, and write both positive and negative tests. 

{% link https://dev.to/ice_lenor/writing-good-unit-tests-a-step-by-step-tutorial-14kj %}

#6. Hidden & Not So Obvious

Eugene has used Docker for the past four years and through that experience, they've encountered a few frustrating gotchas. In this post, they share some tough learnings in hopes that you can avoid them. 

{% link https://dev.to/uilicious/5-fatal-docker-gotchas----for-new-users-2o87 %}

#7. "Pry was my best friend" 

A wonderful and relatable story on building your first web app. I try not to go into first person here, but I do want to add an editorial note that it's **pretty cool** that Jeremy's first app was TDD'd! 

{% link https://dev.to/jmschuurmans/a-year-ago-i-never-would-have-been-able-to-do-this-but-i-just-built-my-first-web-app-here-it-is-1534 %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_