teleren/devto huggingface dataset:
Working with imbalanced dataset using Neural Network and Imblearn Library SMOTE function.
Tags: datascience
Published: 2020-08-29 17:34:34

Working with imbalance dataset using Neural Network and Imblearn Library SMOTE function.


The goal of this analysis I did was to help the bank of Portugal predict people who are more likely to purchase a Bank term Deposit, it is common in marketing data set that the percentage of people who actually buy are maybe 8% percent and in this case it would be disastrous as our model would only predict very accurately for the class we are not interested in
Today I would show you exactly how to worked with imbalance dataset and my result from this analysis would be proof of how important it is to do this. Let's get right into the analysis now.
This would start with importing the library that we would us for the analysis and also the dataset here, the dataset set used here was gotten from this link and it is available for download anywhere.


After importing the library and dataset we would quickly fit our model and test it to see how it performs without using Imblearn to fit the data,
This is really clear now that we are not going to get any real value from our analysis if we do not do anything about this.

Dealing with Imbalanced Dataset.
There are two basic way of dealing with imbalanced data set which in this case is a mixture of numbers and strings.
The Up sampling method
The Under sampling method

The up sampling method is used when you have a dataset where one class is pretty low and you do not have a very large data, in this case the best thing to do is generate more samples as we call it here, this samples would be as similar as possible to the Original Data, there are different method used here like K-nearest neighbor, Random sampling and SMOTE.
An important thing to note here is to understand that this is done to enable us to have a balanced model and it is important to split the data into Train and Test before performing any Sampling on your data, this would allow you to do correct prediction for your test data. As I did here.
Here is the result of my analysis the classification report, the ROC curve

In under sampling is quite the opposite and is used when you have a very large data set and dividing it would not take important information on the dataset, it is advised to always use Oversampling method so as to get all the insights you can get.
More about Imblearn Library and the different method can be found here.

Thank you so much for reading this till the end you did really well, here is a link to my GitHub repository where the code is hosted I am working on something like a library where it would be really easy to work with Imbalanced data.
How a 2 GB CLOB crashed our app
Tags: production, java
Published: 2020-08-29 17:37:26

---
title: How a 2 GB CLOB crashed our app
published: true
date: 2020-08-29 17:28:22 UTC
tags: production,java
canonical_url: https://on-sw-integration.epischel.de/2020/08/29/how-a-2-gb-clob-crashed-our-app/?pk_campaign=feed&pk_kwd=how-a-2-gb-clob-crashed-our-app
---

Our latest production issue: one morning our app kept crashing. Restart. Crash after some minutes. Out of memory.  
  
It turned out to be a CLOB that was almost 2 GB big and got read when a user triggered a certain action. The 2 GB CLOB ended up in an almost 4 GB big `char[]` (because char is 16 bit in Java) and this was too much even for 8 GB heap space.

Of course that CLOB was not supposed to be that big!

It took some time to identify the root cause.
WLS “Context propagation” forced to restart our app server
Tags: production, java, weblogic
Published: 2020-08-29 17:34:02

---
title: WLS “Context propagation” forced to restart our app server
published: true
date: 2020-08-29 17:24:44 UTC
tags: production,java,weblogic
canonical_url: https://on-sw-integration.epischel.de/2020/08/29/wls-context-propagation-forced-to-restart-our-app-server/?pk_campaign=feed&pk_kwd=wls-context-propagation-forced-to-restart-our-app-server
---

Our app runs on a Weblogic server (WLS) and talks to another WLS-hosted app via a SOAP-Webservice.  
  
When the other app was patched to a new version, some WS-requests failed indicating that the webservice in the other app wanted to JNDI-lookup the previous version of something.  
  
After we restarted our app everything worked fine. But still you don’t want to restart a client when the server was upgraded. Moreover, a spring boot based client did not have these problems.  
  
It turned out that WLS uses a feature called “Context Propagation” that inserts an additional SOAP-Header into the request as well as the response. This header contains a serialized object. It indicated that our app transmits the version of the other app and apperantly the other app somehow uses that information in the JNDI lookup.  
  
How does our app knows about the version number of the other app? Probably because the other apps sends that info in the response. This explains why it worked after we restarted our app: at first it hadn’t that information at all and when it got it, it was about the new version.  
  
What I still can’t explain is that some request were successful before the restart.  
  
The solution is to disable “context propagation” by using a system parameter:  
weblogic.wsee.workarea.skipWorkAreaHeader=true

 ![](https://www.epischel.de/analytics/piwik.php?idsite=3&rec=1&url=https%3A%2F%2Fon-sw-integration.epischel.de%2F2020%2F08%2F29%2Fwls-context-propagation-forced-to-restart-our-app-server%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dwls-context-propagation-forced-to-restart-our-app-server&action_name=WLS+%26%238220%3BContext+propagation%26%238221%3B+forced+to+restart+our+app+server&urlref=https%3A%2F%2Fon-sw-integration.epischel.de%2Ffeed%2F)
Array Map Explained
Tags: javascript, codenewbie, beginners, webdev
Published: 2020-08-29 17:24:30


`map()` method on an array produces a new array by applying a function to every element of the input array. The result is a new array with the same length of the original input array. `map()` takes a callback function with arguments. First argument is the current element of the array being processed.

`map()` is helpful in situations where you need to do some work on every element of the array. Maybe you need to double every element.

```javascript
const arr = [2, 4, 9, 22];
const map = arr.map(x => x * 2);
console.log(map); // [ 4, 8, 18, 44 ]
```

You can also access the current index of the array using a map. The callback function takes a second argument for index.

```javascript
const arr = [2, 4, 9, 22];
const map = arr.map((value, index) => value * index); // multiplying array value with its index
console.log(map); // [ 0, 4, 18, 66 ]
```

And if access to index is not enough, you can also get access to the original array as a third parameter.

### map method and this keyword

There are times when you need to specify the `this` context in `map()`. Passing `this` is supported as a second parameter to `map`.

```javascript
const util = {
    firstName: "John",
    lastNames: ["Wick", "Malcolm", "Smith"],
    randomNameGenerator: function () {
        const newNames = this.lastNames.map(function (surname) {
            return (`${this.firstName} ${surname}`); // we can access first name provided by this object
        }, this); // passing reference to this object
        return newNames;
    }
}

console.log(util.randomNameGenerator()); // [ 'John Wick', 'John Malcolm', 'John Smith' ]
```

### When not to use a map

- If you do not plan to use the returned array or if you are not returning a value from the callback function, do not use a map. Use `forEach` or `for..of` if you want to update the input array itself.

- Please do not use it with built-in methods that take one parameter most of the time but do have the capability of taking more than one parameters. Let me illustrate with an example.

```javascript
const arr = ["2", "4", "9"];
const map = arr.map(parseInt);
console.log(map);
```

You might expect the answer as `[2, 4, 9]` and each element as a number due to the use of `parseInt`. You would be surprised that the output is `[2, NaN, NaN]`. Keep in mind that `parseInt` takes three parameters: element, index and array! So for the second and third element, the index will be 1 and 2 resulting in NaN from `parseInt`.
Deleting the Form Field Label in Django
Published: 2020-08-29 17:14:55

The label `Comment Text` kept appearing on the form.

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

By adding the labels dictionary in the `form` file, I was able to get rid of the label.

```
class CommentForm(forms.ModelForm):

    class Meta:
        model = Comment
        fields = ['comment_text', ]
        labels = {
            "comment_text": ""
        }

```
IBM VIRTUAL STUDENT COMPETITION | 13+
Tags: mainframe, ibm, programming, contest
Published: 2020-08-29 17:13:44

VIRTUAL STUDENT COMPETITION | 13+ | September 14, 2020 - January 17, 2021
Global Launch of Master the Mainframe at IBM Z Day!
Join the Master the Mainframe virtual coding competition to learn new skills, connect with employers, earn digital badges, and win cash prizes! No technical experience required.
New amazing platform
New Levels and Challenge Format
New challenges featuring Open Source on the mainframe
An extra 17 days to compete
24 Hours of Master the Mainframe Events during IBM's Z Day (What's that? Read on!)
And the biggest news is our HUGE opening day launch at IBM Z Day with 24 hours of Master the Mainframe meetups, featuring live coding events with students and mentors! This FREE conference has 5 learning tracks, over 60 sessions and internationally renowned speakers. We're even Doubling the Donation to the UN World Food Program's #sharethemeal in honor of every Level 1 finisher.


Link: https://masterthemainframe.com/?utm_source=Newsletter&utm_medium=EDM&utm_campaign=MTM2020&fbclid=IwAR1Ieg15V_6cQk6VPh0V1xta5UFAF6txGXbVxpscnhUfFiPnIhN04vyJ6G8
Ajouter une bannière a votre profil Github
Tags: github, french
Published: 2020-08-29 17:12:22

Depuis l'arrivée de Microsoft, Github a connu quelques changements. En vrac, on peut citer une application mobile ou encore, dernièrement, l’ajout du pseudo twitter à votre profil. Mais ce qui nous intéresse ici est une autre de ces nouveautés: la possibilité d’épingler un README.md, une bannière, à votre page d'accueil sur Github.



##Comment faire?


Rien de plus simple. 
Commencez par [créer un nouveau dossier](https://github.com/new), un “repo”. 3 petites choses sont à faire pour que la magie opère :

1. Le repo doit avoir pour nom votre pseudo Github. 

2. Rendez ce repo public.

3. Initialisez le repo avec un README.

Et voilà, votre profil vient juste de gagner un petit entête avec pour contenu le readme du repo fraîchement ajouté.
Attention, un repo vide fera que rien ne s’affichera.

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


##Personnalisable?


Plutôt deux fois qu’une.
C’est maintenant que vous allez pouvoir faire parler votre créativité, sortir de la masse et vous mettre en avant. Comme tout README classic,  vous pouvez y ajouter emojis, images, gifs … laissez parler votre imagination ! 

Personnellement, j'ai opté pour une simple petite image faite sur [Sketch](https://www.sketch.com/). Pour utiliser une image dans un README, vous pouvez soit héberger votre image sur un site tiers, ou directement utiliser une image stockée sur votre repo:

```
![from_url](https://i.imgur.com/your-profile-picture.png)

![from_assets](https://github.com/username/username/xxx/master/assets/your-profile-picture.png)
```
https://github.com/mbeuil/mbeuil

Votre bannière peut faire dans le simple ou le descriptif:
https://github.com/jh3y/jh3y
https://github.com/stephenajulu/stephenajulu

Et si vous en voulez toujours plus:
https://github.com/abhisheknaiidu/awesome-github-profile-readme



##Ressources utiles:


Si vous voulez toujours plus d'exemple de README:
https://github.com/abhisheknaiidu/awesome-github-profile-readme

Pour ceux, un peu perdu, qui veulent en apprendre plus sur le système de markdown, GFM, utilisé par Github : https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github

Ou si vous voulez égayer votre texte d’emojis en tout genre:
https://gist.github.com/rxaviers/7360908
Issue with my new job 
Tags: career, react, node, graphql
Published: 2020-08-29 17:00:10

I started my professional career 3 weeks ago as a full stack Javascript Developer. I graduated in 2019 it took almost one year to get a job due to some domestic issues. But during that time i learned many new things. 
my company is a small software house where we are 4 Developers, 1 front end developer and 3 including me are full stack developer and 4 othere persons are working in digital marketing. 
Now let's come to the point, i wanted to become a JavaScript Developer and now when i have found the job , my job is giving me **depression**. 

## Reason 
First 2 weeks were fine. Because i knew many things related to development before working in any company. Now things have totally changed , first they didn't tell me how to do things the CEO told me to develop a demo blog project using Apollo GraphQL and mongodb and Apollo client with react. I only knew about Server side logic of GraphQL but but didn't know how to work on client side. CEO told me their folder structure  orally which i couldn't understand at all. When i asked for and reference project CEO said ` if we provide that project  to you then how you will learn new things `. And i was shocked when i listened these words. Every company and person has it's own way of naming file and coding style how one can guess your coding style. 
Previously i  learnt working with react class based components to manage state , CEO told me to use functional components and use React Hooks. this is the first time i am using hooks in a project. But i learnet working with hooks. Okay so far things went well. But then he said use Redux in a graphql client based react project , i didn't know how to make a request to GraphQL API. and they didn't guide me how to do this. Only waited for results. And i was unable to achive my goal and he skipped that project for the time being.
Then they gave me a project of their client to go through the code. I went through it and got a vague idea of wht that project is doing. 
Then CEO told me to upgrade the forms of that project to React side code, forms were built on top of Ant design version 3 to 4. And i was like  😂😭😭😂. And didn't guide me how to handle the data as all forms were Nested and dynamic and dependent on other forms. 

I spent 2 days but couldn't do anything. 
Do you guys think i am wrong and i am not behaving like a professional or   the CEO  is not sincere to me and don't want me work properly.
Does it happen to everyone who starts his/her career ? Basically they are not guiding me properly how to work on their projects. 
How to deal with this depression ? Should i leave my job and stay with them ?
JavaScript Internationalization
Tags: javascript, webdev, informative
Published: 2020-08-29 16:47:44

Intl is a powerful object that exposes the JavaScript [Internationalization API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl).
The Intl object is the namespace for the ECMAScript Internationalization API, which provides language sensitive string comparison, number formatting, and date and time formatting. I won't be mentioning all but a few which caught my attention and can be handy.

1) Convert digits into currency:
```js
new Intl.NumberFormat('en-IN', {
  style: 'currency',
  currency: 'INR',
  minimumFractionDigits: 0
}).format(1150000); // "₹11,50,000"

new Intl.NumberFormat('en-US', {
  style: 'currency',
  currency: 'USD',
  minimumFractionDigits: 0
}).format(1150000); // "$1,150,000"

new Intl.NumberFormat('ja-JP', {
  style: 'currency',
  currency: 'JPY',
  minimumFractionDigits: 0
}).format(1150000); // "￥1,150,000"
```

2) Convert Digits to Compact(rounding with notation):
```js
new Intl.NumberFormat(undefined, {
  notation: 'compact'
}).format(1150000); // "1.2M"

new Intl.NumberFormat(undefined, {
  notation: 'compact'
}).format(11500); // "12K"
```

3) Format Date to mentioned locale prefers:
```js
const date = new Date();
dateTimeFormatter = new Intl.DateTimeFormat('en-IN');
dateTimeFormatter.format(date); // "29/8/2020"

dateTimeFormatter = new Intl.DateTimeFormat('en-US')
dateTimeFormatter.format(date) // "8/29/2020"

/*The formatToParts() method returns an array with all the date parts:*/
const date = new Date()
const dateTimeFormatter = new Intl.DateTimeFormat('en-IN')
dateTimeFormatter.formatToParts(date)
/*
[
  {
    "type": "day",
    "value": "29"
  },
  {
    "type": "literal",
    "value": "/"
  },
  {
    "type": "month",
    "value": "8"
  },
  {
    "type": "literal",
    "value": "/"
  },
  {
    "type": "year",
    "value": "2020"
  }
]
*/
```

4) Plural Rules Formatting tells you which form applies based on a given number for a specific locale:
```js
const pr = new Intl.PluralRules('en-US', {
    type: 'ordinal'
})
pr.select(0) //other
pr.select(1) //one
pr.select(2) //two
pr.select(3) //few
pr.select(4) //other
pr.select(10) //other
pr.select(22) //two

// Every time we get other, we translate that to th. If we have one, we use st. For two we use nd. few gets rd.
const suffixes = {
  'one': 'st',
  'two': 'nd',
  'few': 'rd',
  'other': 'th'
}

const format = (number) => `${number}${suffixes[pr.select(number)]}`

format(0) //0th
format(1) //1st
format(2) //2nd
format(3) //3rd
format(4) //4th
format(21) //21st
format(22) //22nd
```
Pick a random element from an array
Tags: javascript, webdev, beginners
Published: 2020-08-29 16:42:56

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

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

Micro Learning ● Web Development ● Javascript ● MERN stack  
**www.codedrops.tech**
Convert pdf slides to png images
Tags: bash
Published: 2020-08-29 16:31:38

Quick tip for converting pdf slides on MacOS. Good for video editing.

## preparation

[brew](https://brew.sh)

`brew install libpng`

`brew install libjpeg`

`brew install imagemagick`

`brew install ghostscript`


## usage 

`convert -density 144 my-presentation.pdf presentation-image.png`
Flexbox vs CSS Grid: Which one do you prefer?
Tags: webdev, discuss, css
Published: 2020-08-29 16:26:39

---
title: Flexbox vs CSS Grid: Which one do you prefer?
published: true
description: 
tags: webdev, discuss, css
cover_image: https://ishadeed.com/assets/grid-flex/grid-vs-flexbox-1.png
---
Flexbox is a one-dimensional layout model, that offers space distribution between items in an interface and powerful alignment capabilities without using float or positioning.

CSS GRID is a more powerful system compared to Flexbox, using a two-dimensional layout system allowing users to layout content in rows and columns.

I tend to use them both - Grid for building mainframe and general layout blocks and Flexbox for everything inside those blocks.

Which use cases do you attribute to both when building layouts, positioning elements, arranging content, etc?
A Coding Company Website
Tags: actionshackathon, github, html, css
Published: 2020-08-29 16:24:01

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)
Github Action Page is Implemented. It is a Sample of a Coding Company Website made by using Front-End Tools

### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)
Wacky Wildcards


### Yaml File or Link to Code
https://github.com/siddharth25pandey/siddharth25pandey.github.io/blob/master/web.html 
[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)


### Additional Resources / Info

[Note:] # (Be sure to link to any open source projects that are using your workflow!)

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. )

[Reminder]: # (Submissions are due on September 12th (11:59 PM PDT) and winners will be announced on September 23!)
Eklenti Yayınlama
Tags: liman, linux, management, opensource
Published: 2020-08-29 16:22:14

Bir önceki [yazımda](https://dev.to/liman/eklenti-gelistirme-ortami-kurulumu-3ofm) Liman MYS üzerinde nasıl bir eklenti oluştulacağından bahsetmiştim, şimdi ise bu eklentilerin Github üzerinden yayınlanmasından bahsedeceğim.

1.Öncelikle Github üzerinde bir repository oluşturalım.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/pbigrf745zqxzvvf83lt.png)

2.Sonrasında liman sunucumuza git paketini kuralım.

`sudo apt install git -y`

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

3.Github mail adresimiz ve kullanıcı adımızı git servisine tanıtalım.
```
git config --global user.name "GITHUB_KULLANICI_ADINIZ"
git config --global user.email "GITHUB_MAIL_ADRESINIZ"
```

4.Eklentimizin bulunduğu klasörde github ın da önerdiği gibi sırasıyla aşağıdaki kodları yazalım.
```
git init
git add *
git commit -m "first commit"
git branch -M master
git remote add origin https://github.com/KULLANICI_ADINIZ/REPOSITORY ADRESINIZ.git
git push -u origin master
```
5.Gerekli kullanıcı adı ve şifrenizi girdikten sonra github üzerindeki sayfanızda artık kodlarınızı görebilirsiniz.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9v89tan4kmgxv6tj42i4.png)

Buraya kadar aslında klasik bir git kullanımı anlatmış oldum, fakat asıl güçlü kısmımız bundan sonra geliyor :muscle:

6.Yayınlanan eklentiyi başka Liman MYS'lere de yüklemek için tek yapmanız gereken resimdeki gibi repository'yi zip olarak indirmek.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dxl3f1z9z9p6v0qzpzo3.png)

İndirdiğiniz bu eklentiyi artık arkadaşlarınızla özgürce paylaşabilirsiniz :tada:

Ayrıca; bu eklentilerin imzalanması,şifrelenmesi ve lisanslanması konularına gelecekte değineceğiz :muscle:
Discussion Forum Website
Tags: actionshackathon, javascript, mongodb, html
Published: 2020-08-29 16:16:49

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)
I have created a Discussion Forum Website which enables students to discuss with peers related to any technical topic separately after secure registration & login.

### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)
Wacky Wildcards
### Yaml File or Link to Code
https://github.com/siddharth25pandey/discussion_forum_website 

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)


### Additional Resources / Info

[Note:] # (Be sure to link to any open source projects that are using your workflow!)

[Note]: # (Be sure to include the DEV usernames of your collaborators, if any. )


[Reminder]: # (Submissions are due on September 12th (11:59 PM PDT) and winners will be announced on September 23!)