teleren/devto huggingface dataset:
[GPT-2] The problem feeling when trying to support multi-language with GPT-2
Tags: gpt2
Published: 2020-01-18 14:11:34

# Online tool is published

Normal GPT-2 only supports English, but developed a tool that supports multiple languages.


https://mockers.io/generator

![screencapture-mockers-io-generator-2020-01-18-22_40_58.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/514619/d36564cb-1a88-e720-c0f4-7f51555bd5de.png)


## Design

Actually it has a three-stage configuration,

- Language identification and translation into English
- GPT-2 main processing
- Restore from English to the identified original language

It is a fake multilingual support.

The model is compatible with the recently published best performing 1558M, which seems to produce very natural sentences in English.
On the other hand, in Japanese, it is a very machine-translated sentence.

## Problem

It will be more natural to support Japanese native as a model.

GPT-2 originally uses English-written news sites as learning data, so it is good at generating sentences that can be told there. GPT-2 basically gives a sentence first and then guesses the proper sentences to come after. For example, if you generate "President Trump" in Japanese, it will be a bit decent. Other Languages probably too.

On the other hand, giving words that are far from English-speaking cultures tends to be unnatural. In order to obtain natural Japanese, of course, we do not use translations, but it is also very important to learn Japanese-speaking sentences.

By the way, it is possible to generate sentences recursively from the generated sentences, but it is also a problem that in languages ​​other than English, the translation is repeated and it deteriorates rapidly.

But is there a need for multilingual native models?

## Prospects for future AI generation

At present, sentence generation in large-scale unsupervised learning has become higher in terms of naturalness, but I feel that it is not good to adapt to something.
In my personal opinion, I have the following issues.

- How to learn common sense and facts
- Can I generate sentences with purpose?

If these parts are resolved, I think it will have business value.

## Finally

GPT-2 related tools are highly acclaimed and under development, so if you are interested, please read this article.

https://dev.to/makotunes/by-using-gpt-2-which-is-too-dangerous-i-finetuned-a-model-with-president-trump-s-twitter-and-made-a-fake-trump-bot-2j0h
The Various Levels of "Senior" | Satire
Tags: satire, career, jokes
Published: 2020-01-18 16:06:40

---
title: The Various Levels of "Senior" | Satire
published: true
description: Here's a fun post explaining the different reasons people end up with a senior title. Although mostly fun and satire, there is *some* truth to it.. :) What are your favorite versions of "senior"?
tags: satire, career
cover_image: https://i0.wp.com/kimarnett.com/wp-content/uploads/2020/01/hmw_devto.jpg?w=1000
---

- I’ve been doing this for 20+ years senior
- I’ve been here for 5, but my tech is only 10 senior
- I’ve seen some shit senior
- I watched a tutorial senior
- I’ve done front end, back end, middle end, upside down end senior
- erase it all and start again senior 
- 10x senior
- -10x senior
- I started on mainframe senior
- I’m still on mainframe senior
- I read a blog post about it senior
- I can Google senior
- Stack Overflow is my doc senior
- What's a doc? senior
- Your code can't be trusted because it didn't come from me senior
- I've brought down production senior

Keep it going in the comments below!

Cross-posted on my [personal blog.](http://kimarnett.com/the-various-levels-of-senior-satire/)
Releases PHP (PHP museum)
Tags: php
Published: 2020-01-18 15:38:15

---
title: Releases PHP (PHP museum)
published: true
description: Releases PHP (PHP museum)
tags: php
series: [PHP]
---

Para os que gostam de relembrar o passado, o PHP tem um repositório com todas as versões lançadas. Do PHP 1 ao PHP...(último lançamento).

O link é [PHP museum](https://museum.php.net/)
theia and gitpod
Tags: webdev, ide, eclipse
Published: 2020-01-18 15:25:50

build you own IDE with theia or "you can just prefix any GitHub URL with 'https://gitpod.io/#' and to get a gitpod IDE right there in your browser ! 

ok i have to try theia out (another day with no work done - thanks devto !)

* https://theia-ide.org/docs/
* https://github.com/ssloy/tinyraytracer/wiki

github
* https://github.com/eclipse-theia/theia
* https://github.com/gitpod-io

see also
* https://www.gitpod.io/docs/20_browser_extension/

*you can use Gitpod for free for up to 50 hours / month on public repositories*
La casa degli Hobbit eco-friendly che si costruisce in soli 3 giorni
Tags: curiosita, hobbit, ilsignoredeglianelli, thelordoftherings
Published: 2020-01-18 15:20:54


<p>La <strong>casa degli Hobbit creata da Tolkien</strong> nei suoi famosi romanzi &ldquo;Il Signore degli Anelli&rdquo; e &ldquo;Lo Hobbit&rdquo; &egrave; diventatarealt&agrave; grazie a <strong>Green Magic Homes</strong>.</p>
<p><strong>L&rsquo;azienda ideatrice del progetto, la</strong> <strong>Green Magic Homes</strong>, ha dichiarato che <strong>occorrono solo 3 giorni per la costruzione di una casa degli Hobbit</strong> eco-friendly.</p>
<p>Di seguito alcune caratteristiche della <a href="https://www.brucofalla.com/curiosita-dal-mondo/ecco-la-casa-degli-hobbit-ecologica-che-si-costruisce-in-soli-3-giorni/">casa degli hobbit</a>:</p>
<ul>
<li>Eco-friendly;</li>
<li>Basso consumo energetico;</li>
<li>Ventilazione continua;</li>
<li>Crescita di verde sulla struttura della casa;</li>
<li>Impermeabilizzazione ;</li>
<li>Modulazione, quindi &egrave; possibile affiancare un ulteriore casa in qualsiasi momento ;</li>
<li>Personalizzazione della struttura prefabbricata sulla base delle diverse esigenze;</li>
<li>Rete elettrica, acqua e tutto ci&ograve; che si desidera</li>
</ul>

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/tegkdaozi85kzhbg5osl.jpg)

<p>La casa ecologica degli Hobbit inoltre, pu&ograve; &nbsp;essere assemblata da tre persone senza particolari competenze e specializzazioni.</p>
<p>Quanti di voi hanno sognato di trasferirsi nella <strong>Contea del Signore degli Anelli</strong>, in quelle splendide case immerse nel verde? Dopo il grande successo de&nbsp;<em>Il Signore degli anelli</em> e de Lo Hobbit e l&rsquo;annuncio dell&rsquo;uscita della <strong>serie tv del Signore degli Anelli </strong>targata Amazon Prime Video, la fantasy mania &egrave; ufficialmente scoppiata.&nbsp;</p>
<p>&Egrave; giunto il momento d trasferirsi nella Contea! Seguimi e scopri altre <a href="https://www.brucofalla.com/">curiosit&agrave; e stranezze dal mondo</a>.<br /> <br /></p>

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/ente6u5tdb99egp6dhpv.jpg)
.NET in Calgary, CA
Tags: dotnet, csharp, career
Published: 2020-01-18 15:08:51

I've been planning on moving to Canada my hole life and last year I've decided that Calgary was the city that most attracted me.

I've been looking at LinkedIn for jobs in Calgary and it seems that full-stack development is trending right now, I could find only a few jobs for back-end development and in most of these jobs they didn't specify .NET and C# as the only framework/language but one in a bunch of languages like Java, Ruby, etc...

I'm a full-stack developer who came from the back-end, that means I'm more confident in my back-end skills but still practicing front-end development (it's okay for me to develop front-end but I'd still need some documentation with me).

I appreciate if anyone from Calgary could point me the way or give me tips/guidance.
Microcharts - Xamarin charts
Tags: xamarin, charts, mobile, framework
Published: 2020-01-23 06:38:05

---
title: Microcharts - Xamarin charts
published: true
date: 2020-01-18 15:06:27 UTC
tags: xamarin,charts,mobile, framework
canonical_url: https://www.mobileframeworks.dev/xamarin-charts/?ref=devto
---

 ![Microcharts](https://www.mobileframeworks.dev/content/images/2020/01/Gallery.png)

**Microcharts** is an extremely simple charting library for a wide range of platforms, with shared code and rendering for all of them!

[See Post](https://www.mobileframeworks.dev/xamarin-charts/?ref=devto)
Add fulltext filter support to ember-cli-mirage
Published: 2020-01-18 15:02:24

There is an open [issue in ember-cli-mirage](https://github.com/miragejs/ember-cli-mirage/issues/1419) that tries to bring `filter` support for `JSONAPI Serializer`. Unfortunately my tests needed this functionality now. More specifically they needed a *fulltext* filtering support.

Here is a solution I came up with.

First make sure that factories for all endpoints produce something that we can filter on. I simply created attribute `fulltext` that returns a string of things that I want to filter on: 

```javascript
// mirage/factories/item.js

import faker from "faker";

export default Factory.extend({
  fulltext() {
    return `${this.name}`;
  },
  name() {
    return faker.commerce.productName();
  },
});
```

```javascript
// mirage/factories/customer.js

import { Factory } from "ember-cli-mirage";
import faker from "faker";

export default Factory.extend({
  fulltext() {
    return `${this.firstName} ${this.lastName}`;
  },
  firstName() {
    return faker.name.firstName();
  },
  lastName() {
    return faker.name.lastName();
  },
});
```

Then teach mirage to filter on attribute `filter` when querying for collections:

```javascript
// mirage/config.js

import Response from "ember-cli-mirage/response";

export default function() {
  this.namespace = "api/v1/";

  this.get("/customers", fulltextFilter);
  this.get("/items", fulltextFilter);
}

function fulltextFilter(schema, request) {
  // example: request.url = '/api/v1/items?filter%5Bfulltext%5D=Automobil'
  // So we make it so that `subject = 'items'`. This way we can use this function for any endpoint
  let subject = request.url.split(/[/?]/)[3];

  // If mirage got request for fulltext filter
  let fulltextParam = request.queryParams["filter[fulltext]"]
  if (fulltextParam) {
    // I'm making the search case in-sensitive
    let fulltextParamCI = fulltextParam.toLowerCase();
    // Filter out from all the records
    return schema[subject].all().filter(function(record) {
      // Leave only those which `fulltext` attribute contain our string
      return record.attrs.fulltext.toLowerCase().indexOf(fulltextParamCI) !== -1;
    });
  }

  // If no filter is applied, return all records for given `subject`
  return schema[subject].all();
}
```

## Notes

- This is *very* primitive fulltext search, you might need to make it more fancy for your use-case.
- On the backend I'm using `jsonapi-resources@0.9.10` and I'm not exactly sure why it requires the query param as literal string of `filter[fulltext]` and not nested array. Your API might be different.
React Native: Final Form, react-native-paper and typescript
Published: 2020-01-18 14:54:38

## use `react-final-form` with `react-native-paper`

### Problem:

```typescript
type TextFieldProps = FieldRenderProps<string, any> & {
  label?: string;

};

const TextField: React.FC<TextFieldProps> = ({
  input,
  meta,
  label,
  ...rest
}: TextFieldProps) => (
  <TextInput label={label} type="text" {...input} {...rest} />
);

```

Khi sử dụng `TextInput` của `react-native-paper` với `Field` của `react-final-form`, typescript compiler sẽ thông báo lỗi:



```typescript

Type '{ name: string; onBlur: (event?: FocusEvent<any> | undefined) => void; onChange: (event: any) => void; onFocus: (event?: FocusEvent<any> | undefined) => void; type: string; value: string; checked?: boolean | undefined; multiple?: boolean | undefined; label: string | undefined; }' is not assignable to type 'Pick<TextInputProps, "error" | "value" | "label" | "ref" | "style" | "allowFontScaling" | "autoCapitalize" | "autoCorrect" | "autoFocus" | "blurOnSubmit" | "caretHidden" | "contextMenuHidden" | ... 97 more ... | "dense">'
  Types of property 'onBlur' are incompatible.
    Type '(event?: FocusEvent<any> | undefined) => void' is not assignable to type '((e: NativeSyntheticEvent<TextInputFocusEventData>) => void) & ((args: any) => void)'.
      Type '(event?: FocusEvent<any> | undefined) => void' is not assignable to type '(e: NativeSyntheticEvent<TextInputFocusEventData>) => void'.
        Types of parameters 'event' and 'e' are incompatible.
          Property 'relatedTarget' is missing in type 'NativeSyntheticEvent<TextInputFocusEventData>' but required in type 'FocusEvent<any>'.

```

### Causes

Nguyên nhân là do signature của thuộc tính `onBlur` của `final-form` và `react-native-paper` là khác nhau.

Cũng hợp lý, vì vốn dĩ `final-form` không nhắm đến react-native.

### Fix

Để khắc phục vấn đề này, cần khai báo thêm thuộc tính `onBlur` và `onFocus` với signature giống với của `react-native-paper`.

```typescript

type TextFieldProps = FieldRenderProps<string, any> & {
  label?: string;
  onBlur: ((e: NativeSyntheticEvent<TextInputFocusEventData>) => void) &
    ((args: any) => void);
  onFocus: ((e: NativeSyntheticEvent<TextInputFocusEventData>) => void) &
    ((args: any) => void);
};

const TextField: React.FC<TextFieldProps> = ({
  input,
  meta,
  label,
  ...rest
}: TextFieldProps) => (
  <TextInput label={label} type="text" {...input} {...rest} />
);

```

### Conclusion

still don't understand.
We learn javascript because of its dynamic types. And now we learn typescript to enable strong-types for javascript.
Què es HTML ? 🤔 🐋 🐳
Published: 2020-01-18 14:04:29

NOCION

<html>
<head>
</head>
<body>
</body>
</html>

QUE ES?

HTML es un lenguaje de marcado de hipertexto. Su función es describir la estructura de una página web. Funciona a través de elementos HTML conocidos como etiquetas.
Una etiqueta es todo aquello que está encerrado por corchetes < > 
<\>.


HTML es un lenguaje de marcado de hipertexto.

Sintaxis HTML de inicio <!DOCTYPE>
Optional Chaining
Tags: javascript, tc39
Published: 2020-01-18 13:49:00

---
title: Optional Chaining
published: true
description: TypeError has bugged every Javascript developer enough. While expecting response from APIs, we need to add a number of && to make sure our code don't break
tags: javascript, TC39
---

TypeError: Cannot read property '<property>' of undefined has bugged every javascript developer enough. While expecting response from APIs, we need to add a number of && to make sure our code don’t break. This maybe not a problem while dealing with 2 level nested object, but while dealing with large data objects this can be nightmare. The game has been changed with Optional Chaining proposal Stage-4.

Read more at https://itsopensource.com/optional-chaining
How open source improves a developer skills ?
Published: 2020-01-18 13:47:18

There is an abandoned treasure for every developer. But I discovered it, worked hard on it and the benifits from is very huge. It's an open source contribution. Any developer needs to improve his skills and upgrade them but he don't know how ? reading books ? learning a new techenology ? new language ? so a lot of resources which make the dicision more diffcult. The solution is write any idea (micro framework, simple game, template engine, small package, etc…) and you will learn more than you imagine, you will find yourself searching a lot and it makes you decide what will you need to learn and how. Also that makes you write a code everyday and read a code reguaraly so it will improve your code skills, your reading skill become better because you knew what you need to read and which book to pick. Just block One hour or Two to work on your own application and I promise the results will be amazing! . Open Github then create a new repository without a lot of thinking and start coding, refactor your code, invite your friends or coworkers to review your code and to help you to fix your mistake. Thanks for reading
Real Time Event Broadcasting with Laravel 6 and Pusher
Tags: laravel, puhser, broadcasting
Published: 2020-01-18 13:40:23

Hi Artisan,

In this tutorial, i will guide you step by step how to use event broadcasting using pusher and laravel-echo-server in laravel 6 application. Laravel provide event broadcasting topic. event broadcast is a very interesting and it's also easy to implement with pusher specially.

Link: https://www.codechief.org/article/real-time-event-broadcasting-with-laravel-6-and-pusher
Flutter Pills Button Widget
Tags: flutter, opensource
Published: 2020-01-18 13:37:27

Have you checked out our GetFlutter Library you can find more details on our GitHub repo: https://github.com/ionicfirebaseapp/getwidget

How to use GetFlutter Pills Button

You will get Flutter Pills Button by adding out component GFButtonShape.pills.

**Sample Code:**

import 'package:getflutter/components/button/gf_button.dart';

GFButton(
    onPressed: (){},
    text: "primary",
    shape: GFButtonShape.pills,
  ),

**Disabled Button**
To do that just disable button onPressed:

**Sample Code:**

import 'package:getwidget/components/button/gf_button.dart';

GFButton(
    onPressed: null,
    text: "primary",
    shape: GFButtonShape.pills,
 ),

**Block Button**

**Sample code:**

import 'package:getwidget/components/button/gf_button.dart';

GFButton(
    onPressed: (){},
    text: "primary",
    shape: GFButtonShape.pills,
    blockButton: true,
 ),

If you would like read more details of each component and it uses then you can check out our documentation https://docs.getwidget.dev/gf-button/pills-button and share your feedback to us to make a more perfect open-source library for Flutter.
Learning routine struggle
Tags: learning, help
Published: 2020-01-18 13:35:49

---
title: Learning routine struggle
published: true
description: 
tags: learning,help
---

So it's a new year and I (as ever) have a few things I'd like to learn this year. I attempted to set some goals last year and I was partially successfully e.g. I learnt some css grid but not fully confident with it yet. 

I'm struggling to get into a routine to learning my main focus is going to be JavaScript starting with refreshing/realrning some vanilla JS and then hopefully eventually finishing the Vue course (I started a long time ago) as well blogging more regularly including here. 

The thing is I'm struggling to get into any sort of routine when I had a different job in the coffee industry a few years ago I'd quite happily come home from work and code for an hour but now I spend my days looking at code I sometimes struggle went I get home to want to look at more code. 

Anyone feel the sam/have any tips on getting through this? Do you set a particular time/day to learn? I'm going to attempt to write a learning plan of what I want to learn and my resources for doing so.

Any suggestions and/or tips welcome
Nobody Knows HTML (Except Me)
Tags: career, webdev, beginners, codenewbie
Published: 2020-01-19 19:07:04

---
title: Nobody Knows HTML (Except Me)
published: true
date: 2020-01-18 13:30:00 UTC
tags: career, webdev, beginners, codenewbie
canonical_url: https://booksoncode.com/articles/nobody-knows-html
cover_image: https://static1.squarespace.com/static/5e0129c5956b7a5624566864/t/5e24aba0c1003e671f015a81/1579461547045/sommi-h-yb5TjYJ-I-unsplash.jpg
---


I was having a casual meal and conversation with an old high-school friend, when he said something I could never forget:

> **Everyone knows HTML.**

To this shocking statement, I said, "What do you mean?"

"You know," he said, "Everyone was on MySpace at some point."

I know what you're thinking: why didn't I flip the table right then at that outrageous statement? Truth be told, it is a very heavy table and I would look stupid trying.

Instead, I recalled another similar moment, when someone else with no developer experience felt he could network his way into a high-paying tech job by talking to software engineers about his 'coding' experience tweaking HTML templates in a CMS.

And then it occurred to me: maybe my friend had a point.

Maybe everyone _thinks_ they know HTML.


 
## Why I thought I knew HTML

When I was a teenager, I was on the wrong path, too.

In middle school, I made web pages for my Neopets. I also customized forum pages by replacing Hex colors.

I knew what <`p>`s, <`img>`s, <`a>`s, `<div`>s, and `<span>`s were.

Therefore, **I was an expert.**

[Read More](https://booksoncode.com/articles/nobody-knows-html)
I am Tomasz Łakomy, Senior Frontend Engineer @ OLX Group, tech speaker, and egghead.io instructor, Ask Me Anything!
Tags: ama
Published: 2020-01-18 13:29:55

---
title: I am Tomasz Łakomy, Senior Frontend Engineer @ OLX Group, tech speaker, and egghead.io instructor, Ask Me Anything!
published: true
tags: ama
---
Memo: macOS TimeMachine のバックアップ除外ディレクトリ設定
Tags: timemachine, mac, macos
Published: 2020-01-16 10:48:58

---
title: Memo: macOS TimeMachine のバックアップ除外ディレクトリ設定
published: true
description: TimeMachine でバックアップする必要性の薄いディレクトリのメモ
tags: TimeMachine, Mac, macOS
---

OS: macOS Mojave 10.14

## 趣旨

バックアップのサイズが大きくなると TimeMachine のストレージを圧迫するし時間もかかるのであまりバックアップや世代管理の必要のないものは除外したい

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/3r1pqqxoe2qb87ro9jpg.png)

## デフォルトで存在するディレクトリ

メディアファイルは基本 NAS 等にあってコピーしか存在しないためバックアップしない

| path | description |
| --- | --- |
| ~/Downloads | 大事なデータは置かない |
| ~/Music | コピーしか存在しない |
| ~/Movies | コピーしか存在しない |
| ~/Pictures | コピーしか存在しない |
| ~/Public | 大事なデータは置かない |

## アプリケーション、またはユーザーによって追加されたディレクトリ

| path | description |
| --- | --- |
| ~/Library/Developer | Xcode や iPhone Simulator のキャッシュなど。数十GB以上になったりする。消えてもまた作られるので問題ない |
| ~/Library/Containers/com.docker.docker | Docker コンテナ。ビルドにそれなりに時間がかかるので消えると多少辛いが容量が大きすぎる |
| ~/Workspace/Repositories | Git 等のリポジトリ置き場。リモートに存在するので問題ない |

*`~/Library/Caches` はデフォルトで除外されているようだ。*


## その他

ストレージを占有しているディレクトリの可視化には [OmniDiskSweeper](https://www.omnigroup.com/more) が便利だった
https://www.omnigroup.com/more

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/fx4awklkyteh41hywqj7.png)
Help me to review my PHP framework
Tags: opensource, php, framework
Published: 2020-01-18 13:29:53

Recently I've started my own PHP framework called espressoPHP to learn some advanced concepts about OOP, SOLID, Design Patterns, Regular Expression, etc.. I need some reviews about code cleaness, organizing, etc. Also if any developer like to contribute with me he will be so welcome because there are a lot of features needs to be done 
The Github Link : https://github.com/espressoPHP/framework
Daily Developer Jokes - Saturday, Jan 18, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-01-18 13:00:21

---
title: "Daily Developer Jokes - Saturday, Jan 18, 2020"
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=Saturday%2C%20Jan%2018%2C%202020"
published: true
canonical_url: "https://dailydeveloperjokes.github.io/"
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/5e12598468df3.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:___ Who used the internet before it was cool?

___A:___ Httpsters
 -->