teleren/devto huggingface dataset:
Day 4 Marketing A Sci Fi Book
Tags: ai, machinelearning, scifi
Published: 2020-09-24 17:04:07

Day 4. 

Most importantly, there are still 0 pre-sales, which is fine. It's new and things are just starting to ramp up. 

One problem (or assumption I had) is that people are not starring the github repo. 

I have the book on github. I thought that would be a cool hook to get people interested but I might be wrong. 

I'll let it run for at least a week and then just try linking to the landing page (website) and see if conversions are better. 


Stats so far

| Date    | fb ad spend | fb ad clicks | reddit ad spend | reddit ad clicks | github views | github uniques | github stars | website visits | substack signups | gumroad purchases | amazon purchases |
| ------- | ----------- | ------------ | --------------- | ---------------- | ------------ | -------------- | ------------ | -------------- | ---------------- | ----------------- | ---------------- |
| 9/21/20 | $ 5.52      | 7            | $ 4.24          | 18               | 88           | 34             | 7            | 7              | 0                | 0                 | 0                |
| 9/22/20 | $ 9.86      | 22           | $ 20.07         | 88               | 101          | 42             | 2            | 8              | 0                | 0                 | 0                |
| 9/23/20 | $ 10.03     | 19           | $ 20.00         | 92               | 119          | 46             | 2            | 5              | 1                | 0                 | 0                |

If you're into sci fi, check it out on [github](https://github.com/wrannaman/wrannaman)!
Os influencers devs
Tags: dev
Published: 2020-09-24 17:02:24

---
title: Os influencers devs
published: true
description: 
tags: dev
//cover_image: https://direct_url_to_image.jpg
---

Quem me conhece sabe que eu sou meio avesso a polêmicas, mas recentemente comecei a refletir sobre o momento que a comunidade de desenvolvimento está passando. E algo vem me preocupando um pouco: a chegada da cultura dos *influencers* na comunidade. 

Neste momento você pode estar pensando duas coisas:

1. Sempre existiram pessoas produzindo conteúdo para devs;
2. Seu hipócrita, você mesmo produz conteúdo faz muito tempo :)

Concordo. Sempre existiu, e espero que continue existindo, pessoas que produzem conteúdo relacionado ao desenvolvimento de software. O que mudou, na minha opinião, foi o "modelo de negócio". 

No modelo mais tradicional, as pessoas produzem conteúdo com pelo menos dois objetivos: ajudar a comunidade e obter vantagens pessoais através da criação de autoridade ao redor do seu nome. Grande parte da minha carreira se deve a autoridade que eu criei como desenvolvedor, escrevendo posts, apresentando palestras e escrevendo livros. Isso me trouxe vantagens como boas ofertas de emprego, clientes de consultoria e leitores para os meus livros. E pelos feedbacks que recebi no decorrer destes anos acredito que tenha ajudado algumas pessoas pelo caminho. 

Mas para conseguir autoridade é necessário um planejamento e o retorno geralmente é mais demorado. Você precisa ter um cuidado extra com o conteúdo, a forma, a acurácia. Quando o modelo de negócio passa a ser o número de cliques e seguidores, a estratégia muda. Tenho visto alguns conteúdos usando estratégias de marketing para maximizar os cliques como falar mal de linguagens, conteúdos mais superficiais e rasos, polêmicas, etc. O perigo disso é que as pessoas que estão iniciando na área podem ter dificuldade de perceber essas estratégias e comprarem um comportamento de bullying, de reduzir a escolha de tecnologias apenas a modas e aplicar técnicas erradas em seus códigos. 

Não acredito que esse fenômeno seja totalmente ruim e acho que ele deve continuar a crescer. Em partes isso é ótimo, pois aumenta a quantidade de conteúdo sobre nossa área. O problema é separar o que é conteúdo bom do que é apenas *click bait*. Existem ótimos profissionais gerando ótimos conteúdos todos os dias, mas também tem uma minoria mais preocupada com seu *like* do que com sua evolução como profissional. Minha sugestão é sempre consumir os conteúdos com um filtro pessoal, procurando segundas opiniões e tendo uma visão mais crítica sobre o que é falado. 

P.S.: não vou citar os exemplos que eu vi de conteúdo problemático para não gerar tráfego para os produtores. E também não vou tentar citar aqui todos os ótimos produtores de conteúdo, porque felizmente essa lista é muito grande e com certeza eu faria a injustiça de deixar alguém de fora.
ShadowGas - Trade
Tags: blockchain
Published: 2020-09-24 16:50:09

v1.0.0 of the ShadowGas smart contract is finished. My two recent posts (below) go over the `Store` and `Transfer` features of the contract and this one will go over the `Trade` feature.

---

https://dev.to/traylorboy/shadowgas-store-40m9

https://dev.to/traylorboy/shadowgas-transfer-59jg

---

**The `Trade` feature currently only trades the liquid gas token, however I plan on including the other 2 later down the road**

**Updated the `shadowGas.config.json` file**

## shadow.config.json

```sh
`RefuelChiAmt` - Mint Chi Amount
`RefuelLgtAmt` - Mint Lgt Amount
`EmptyChiAmt` - Transfer Chi Amount
`EmptyLgtAmt` - Transfer Lgt Amount
`EmptyChiTo` - Address to transfer Chi to
`EmptyLgtTo` - Address to transfer Lgt to
`GasLimit` - Gas Limit
`GasSpeed` - Gas Speed ("fast", "average", "slow") 
`TradeLimit` - The amount of trades to perform
`LgtTradeAmount` - Amount of LGT Tokens to trade
``` 

# Trade

*Only trades LGT, but can use refueled CHI for discounts so profit may be more than expected if discount is applied*

### Oracle

```sh
npx buidler oracle
```

Will retrieve trade information for arbitrage

### Arbitrage

```sh
npx buidler arbitrage
```

Will run a loop to continuously check for trade opportunities every minute and will execute trades if an opportunity is found until `TradeLimit` is reached

## Examples

### Check for trade opportunity

```sh
npx buidler oracle
```

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

*If the costToMint > expectedProfit, no opportunity found*

### Testing the Arbitrage Strategy

*Since the costToMint is heavily weighted by the current gasPrice, by changing the gasPrice variable (ex. 1 Gwei) on a testnet, you will be able to mint the LGT tokens for cheap and sell them for a profit within the same transaction since the costToMint will be much lower when minting at 1 Gwei than at 116 Gwei thus forcing a trade opportunity.*

```sh
npx buidler arbitrage
```

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

v1.0.0 for the ShadowGas contract is released; after adding GST compatibility (v1.1.0), I will be developing the UI in React in order to interact with the contract!

The repo can be found here: https://github.com/TraylorBoy/ShadowGas
Looking for the portfolio inspiration and code? Maybe Vue? 🤫
Tags: portfolio, inspiration, vue, css
Published: 2020-09-24 16:47:44

Do you need inspiration for building your portfolio? Grab some inspiration from my project.

Technologies used:

+ Vue (vue-router)
+ CSS (flexbox, grids)

Simple, blazing-fast unique portfolio - click [here](https://keno-sej.netlify.app/) to see it.

[Here](https://github.com/kenosej/portfolio) you can find the source code. 🎯

Mobile-first design.

**MIT** license - so, feel free to use it.

Lighthouse - every rating over **90**. 🚀🚀🚀

Do you want to be a **contributor**? Here are some ideas for improving the site:

+ showing bottom tooltips of technologies on the small screens
+ adding a LinkedIn icon at the top left
+ a better solution for showing text at About page on different screen sizes
+ making it PWA (Progressive Web App)
+ next-gen images format (webp), except for unsupported browsers e.g. Safari

From the previous commits, you can see that it was performing page statistics. The same can be done from automatic web server logging. It was unnecessary, so I removed it.

Thank you for the **huge** support on my [first (previous) post ever](https://dev.to/keno_sej/weather-app-in-react-redux-typescript-and-tailwind-3acm). Hope this one will also help you like the previous one.
Angular NgModel Internals for Input Element
Tags: angular, ngmodel, validation
Published: 2020-09-24 16:44:39

Given, an input for a street address.
```typescript
 <input
  id="street"
  name="street"
  #street="ngModel"
  [(ngModel)]="address.street"
  (ngModelChange)="onPropertyChange($event, street)"
  required
  minLength="1"
  placeholder="Enter Street Here"
  type="text"
 />
```
In the last article we showed the proper pattern for NgModel configuration as shown above. 

Today we focus on ngModelChange.

```typescript
  #street="ngModel"
  [(ngModel)]="address.street"
  (ngModelChange)=
    "onPropertyChange($event, street)"
```
The triad of #street, ngModel and ngModelChange allows us to crack open the ngModel internals. onPropertyChange handler shows us the ngModel. 

```typescript
   onPropertyChange($event, street: ngModel) {
      debugger;       
   }
```
What's interesting is that the "$event" variable shows us the current change; however; the "street" variable has far more information because it is the "NgModel". We don't need the $event

**NgModel**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/sch1mc8y9dbyrn5og85i.PNG)

The NgModel contains the automatically created FormControl, the model, and viewModel, and the name of the "element".  Other properties are present which other articles will discuss. 

The changes are easily seen using...

**Model and ViewModel**

```typescript
// the change to be made
let change = ngModel.viewModel;
// the prior value
let prior = ngModel.model;
```
**Valid Yet?**

```typescript
// use the ngModel valid function
let valid = ngModel.control.valid;
```

**Caution**

The id attribute isn't strictly necessary and would cause issues if this control is reused in the same page. 

**Refactored Version**

No id or $event...

```typescript
 <input
  name="street"   
  #street="ngModel"
  [(ngModel)]="address.street"
  (ngModelChange)="onPropertyChange(street)"
  required
  minLength="1"
  placeholder="Enter Street Here"
  type="text"
 />
```

**Conclusion**

When NgModel is used like this, the use of explicit Form Groups and Form Controls are not needed any longer. It's a disruption to Reactive forms and forms. 


JWP2020 NgModel Internals
Hacktoberfest is coming
Tags: opensource, kotlin, hacktoberfest
Published: 2020-09-24 16:41:52

For those of you who are looking for a [Kotlin] project to help in the next Hacktoberfest, I'm sharing with you the tasks you can pick in the Hexagon Toolkit project (you can find more information about the project on the [Web page], [GitHub organization] and the [main repository]).

If you find the project interesting, you can check the tasks labeled with `hacktoberfest` in the following boards:

* [Toolkit board]: for features and improvements on any toolkit module (like the HTTP server or Template processors).
* [Organization board]: for side tasks as the Benchmark and examples.

Once you have found an appealing task, you can read the [Contributing Guide] with all the details on how to proceed to start working on it. If you would like to take a task, and you find the information incomplete, do not hesitate to contact me for any detail you want or need.

Thanks... And happy coding!!!

{% github hexagonkt/hexagon %}

[Kotlin]: https://kotlinlang.org

[Web page]: https://hexagonkt.com
[GitHub organization]: https://github.com/hexagonkt
[main repository]: https://github.com/hexagonkt/hexagon

[Toolkit board]: https://github.com/hexagonkt/hexagon/projects/1
[Organization board]: https://github.com/orgs/hexagonkt/projects/1

[Contributing Guide]: https://github.com/hexagonkt/hexagon/blob/master/contributing.md
Grafana 414 - Network error request URI too large
Tags: grafana, rest, 414, monitoring
Published: 2020-09-24 16:38:44

When your filters and eventually your GET URL is too long Grafana panel says 414-Network error request URI too large
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ea0b7o1u4vl50zemeelz.png)

But therez a simple fix to it.
Change your HTTP method to POST, default is GET, in your Datasource settings
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/aokjy1u0l5y5xagbxzlw.png)
Refactors y Migraciones: Pros... Y más pros!
Tags: architecture, refactorit, design, migrations
Published: 2020-09-24 16:21:45

Hace un par de semanas en mi trabajo me toco hacer una migración de una tecnología a una versión un poco más reciente (la tecnología era un fwk de Go y una imagen de Docker interna de la empresa). Además me toco hacer refactor de varias partes del proyecto más que nada porque había flujos que no quedaban del todo claro. En base a eso, decidí hacer un pequeño listado de cosas a tener en cuenta para hacer y/o motivar a seguir mejorando y evolucionando los proyectos.

## Migraciones
Arranquemos hablando de las migraciones. He trabajado en proyectos en los que, creo yo, no se atacaron a tiempo las migraciones, por lo que el proyecto crecía muy lentamente y al no tener tecnología nueva, este problema hacia muy difícil conseguir desarrolladores que quieran participar en el proyecto, entre otras cosas. Algunos de los pros de atacar migraciones son:

- Facilidad para encontrar desarrolladores: Los programadores suelen buscar oportunidades para crecer, está posibilidad se da si se trabaja con tecnología nueva. Por lo que las migraciones nos dan esas ventajas de ser atractivas para nuevos candidatos.
- Mejoras continuas: Es probable que si una tecnología saca una versión nueva, venga con arreglos de bugs, mejoras de seguridad o nuevas features que podrían llegar a ser útiles. Siempre es una ventaja este punto.
- Mayormente tiene más soporte: Es posible, que la tecnología nueva tenga más soporte, por lo que hay blogs, posts o documentación en donde se sacan muchas dudas sobre bugs y funcionamiento de las features.

*Nota: Las migraciones son super recomendadas, y se recomienda hacerlas seguido. Esto porque si empieza a haber muchos cambios en versiones, se vuelve engorroso y complicado empezar a hacer cambios. Se recomienda hacerlo seguido.*

## Refactors
Los refactos son mejoras en el código desarrollado, entiéndase que a veces hacemos cosas rápido, o con el tiempo nos damos cuenta que se pudo haber hecho mejor o simplemente tenemos más experiencia. Por ende, es muy importante el cambio en el código y esto mismo ayudará a ahorrar horas de desarrollo posteriormente. Los refactors deben hacerse SIEMPRE, siempre que sea posible, vale la pena dedicarle un par de horas a mejorar estos flujos que tal vez no los podemos entender, o simplemente podemos hacerlos de una mejor forma.

## Conclusión
Siempre que sea posible, es necesario y muy positivo este tipo de cambios y mejoras. No escatimes horas que podrías invertirlas mejorando tu código o tu tecnología.
Another batch of 30 EuroPython edited videos
Tags: europython, videos, python
Published: 2020-09-24 16:20:59

Hi All,

We have released another batch of 30 EuroPython edited videos on youtube.

##### Check out our playlist: https://www.youtube.com/playlist?list=PL8uoeex94UhHgMD9GOCbEHWku7pEPx9fW

That's 90 videos up in total!

And don't forget that we have #AMA here on DEV if you are curious on how EuroPython community successfully hosted their first virtual conference this year.

{% link https://dev.to/europython/europython-ask-me-anything-4co8 %}

Enjoy,
–
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/
Output of `3 > 2 > 1`?
Tags: javascript, webdev, beginners, codenewbie
Published: 2020-09-24 16:18:10

```
 console.log(3 > 2 > 1);
```

**Output:-** `false`

It starts from left to right
so `3 > 2` equals `true`  
`true > 1` is equivalent to `1 > 1` which is `false`

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
Flask
Tags: flask, python, webdev, backend
Published: 2020-09-24 16:14:55

Flask is the backend stuff ,I prefer the most. 
<h1> What is Flask ?</h1>
Flask is a web application framework written in Python. Armin Ronacher, who leads an international group of Python enthusiasts named Pocco, develops it. Flask is based on Werkzeug WSGI toolkit and Jinja2 template engine. Both are Pocco projects.
What are some useful bash aliases you use?
Tags: bash, shell, linux, unix
Published: 2020-09-24 16:07:46

## Here are mine.
#### 1. yeet (delete) the directory and all it's contents.
```sh
alias yeet="rm -rf"
```
#### 2. quickly move one or two directory up in bash.
```sh
alias ..="cd .."
alias ...="cd ../.."
```
#### 3. [function] Extract files from any archive. (stolen from Manjaro's Default bashrc)
```sh
ex ()
{
  if [ -f $1 ] ; then
    case $1 in
      *.tar.bz2)   tar xjf $1   ;;
      *.tar.gz)    tar xzf $1   ;;
      *.bz2)       bunzip2 $1   ;;
      *.rar)       unrar x $1     ;;
      *.gz)        gunzip $1    ;;
      *.tar)       tar xf $1    ;;
      *.tbz2)      tar xjf $1   ;;
      *.tgz)       tar xzf $1   ;;
      *.zip)       unzip $1     ;;
      *.Z)         uncompress $1;;
      *.7z)        7z x $1      ;;
      *)           echo "'$1' cannot be extracted via ex()" ;;
    esac
  else
    echo "'$1' is not a valid file"
  fi
}
```
Please do not forget to share yours.
Becoming a Superhuman In 10 days of Isolation: Day 0
Tags: productivity, career, projects, webdev
Published: 2020-09-24 15:59:46

It is now 10:45 pm of September 24th and day 2 of my personal Quarantine Hack challenge. Though I achieved so much in these 2 days that "Day 0" is closer to reality title.  

Basically: 

- I am in the hotel quarantining for 14 days
- I completed 4 days
- Want to spend my most effective 10 days in my life starting today

My goals: 
- complete 3 projects (2 in progress)
- prepare final version of CV
- apply for parttime jobs in Hong Kong
- apply for internships for summer 2021

The rest of my quarantine period I will be sharing every single day here in this cozy place, which would create extra pressure and responsibility for me.

My 2 days ago manifesto to an imaginary audience (me and my demons) looked like this: 

It is not really possible to completely change the world in 12 days, but i think if i work to my full potential I will at least know what I am capable of and will probably acheive something significant. I will also build up a way to better self for the rest of the year. 

After 3 days it sounds funny. Turns out imaginary audience has to pressure on me and my unproductive soul. 

I will make plan of the day the day before that day. Each task has timeslot and duration. These are the punishment-reward system

1. If I wake up more than 10 mins later than the planned time I take a cold shower 
2. If I am not able to finish the task within the planned timeslot I will:  move on to the next task and take a note on what I was able to finish
3. If I take a phone while completing a task (even though it will be needed)I will do: the wasted amount of minutes  x 5 pushups
4. If I do something else and not the planned task I will do: the wasted amount of minutes x 10 pushups
5. If I feel sleepy or tired I will do 40 pushups, take a cold shower again and resume the task

General plan: 

- First 5 days focus on the projects
- Last 5 days focus on the cv and interview 

I am using: 

- Google Calendar for planning the work and the tasks to complete
- Evernote to take notes on what is going on and keeping a general list of items

 In fact, it is just interesting how it will turn out in the end. Will become a whole new upgraded monster whom nothing can stop? Will I prove to myself that I am a balloon that blows off on a little pressure? 

I am not sure why it has to be interesting for someone to read but the most important thing I think is that I will be reporting the things I am trying to make with someone else. I will write about the struggles and discoveries and will share interesting ideas in mind of a 20-year-old person about SWE, life, and everyday stuff.
Need help to fix a problem
Tags: react, typescript
Published: 2020-09-24 15:53:58

I am understanding the error in my code that `string` can not be used as an index of type `{username: string; password: string;}`. But how can I fix this now? I want to handle multiple input element value on change, how can I do this here in my code on `handleChange function`. !! warning I am new in typescript. 
Here is my code for `Login.tsx`
```
import * as React from "react";
import { useState } from "react";
import InputField from "./InputField";

interface User {
  username: string;
  password: string;
}

const Login: React.FC = () => {
  // account state
  const [account, setAccount] = useState<User>({
    username: "",
    password: "",
  });

  function handleChange(evt: React.FormEvent<HTMLInputElement>) {
    // extract name and value property of current input element
    const { name, value } = evt.currentTarget;
    const accountCopy = { ...account }; // make copy of current account;
    accountCopy[name] = value; // update value from input element value
    setAccount(accountCopy);
  }

  function handleSubmit(evt: React.FormEvent<HTMLFormElement>) {
    evt.preventDefault();
    alert(`Hi ${account.username} with pass ${account.password}`);
  }

  return (
    <div className="col-8 m-auto mt-4 py-2">
      <h1>Login</h1>
      <form onSubmit={handleSubmit}>
        <InputField
          label="Username"
          name="username"
          type="text"
          value={account.username}
          onChange={handleChange}
        />
        <InputField
          label="Password"
          name="password"
          type="password"
          value={account.password}
          onChange={handleChange}
        />
        <button type="submit" className="btn btn-primary">
          Login
        </button>
      </form>
    </div>
  );
};

export default Login;
```
Code for `InputField.tsx`
```
import * as React from "react";

interface Props {
  name: string;
  label: string;
  value: string;
  type: string;
  onChange: (evt: React.FormEvent<HTMLInputElement>) => void;
}

const InputField: React.FC<Props> = ({
  name,
  label,
  value,
  type,
  onChange,
}) => {
  return (
    <div className="form-group">
      <label htmlFor="name">{label}</label>
      <input
        name={name}
        id={name}
        type={type}
        className="form-control"
        value={value}
        onChange={(evt) => onChange(evt)}
        required
      />
    </div>
  );
};

export default InputField;
```
Day 10 - I Built A Halloween Pumpkin Cause Fall!
Published: 2020-09-24 15:47:11

It is starting to cool down and the leaves are changing colors which means my favorite season is here! I built this picture in css and html to [celebrate](https://josno.github.io/pumpkin/). 

![dancing pumpkin](https://media.giphy.com/media/l3vRfhFD8hJCiP0uQ/giphy.gif)



## What I Learned

Creating depth with colors is a lot more involved than I thought. Placing this many elements under multiple parent elements also makes things more complicated.

## How This Will Help Me

I was able to get more practice on child and parent relationships as well as inherited values. 

Onto the next challenge!