teleren/devto huggingface dataset:
https://github.com/NLog/NLog.Extensions.Logging/issues/42
Published: 2020-06-06 13:41:38

at the risk of sounding quick and dirty, I do normally initialize NLog twice. Once in at the beginning of Main() to capture startup errors (ie):

var nlogEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
LogManager.LoadConfiguration(nlogEnvironment == "" ? "nlog.config" : $"nlog.{nlogEnvironment}.config");

var logger = LogManager.GetCurrentClassLogger();
and then again using the cleanest method for either Generic Host (HostBuilder)(My preference since netcore seems to be shifting this way in general) or Web Host (WebHostBuilder) both methods are similar, but neither use a Startup or the traditional IAppBuilder, IHostingEnvironment,ConfigureServices pattern.

My warning here is that ASPNETCORE_ENVIRONMENT is unpredictable. For example, it's not even set on my machine. It can be set manually in the environment, set via command line arg, in an IIS config, or App/Site configs (among other places). Let me specify: It's unpredictable that early. You can specify programmatically which sources you read the setting from and in what order to respect them when you're configuring services, but not before you start to configure the host. See my example below:

Hence, I wrap it in #if(DEBUG). The idea is that you Do as little as possible in Main() and you should not have to rely on logging before your host is configured. If something goes wrong in your configured services, your logger is already started before even the host starts (remember that everything you do is just configuration, telling the host how it's going to start up. Nothing actually "happens" until you build and then run your host.) (admittedly this only really applies to netcore 2.x)

Disclaimer: I'm no expert and all of this could just sound like nonsense to you; If so, I apologize. I err on the side of wordy code for clarity rather than low line count. I code like I picture software components behaving in my head. It helps when I'm tasked with containerizing things that were never meant to be containerized.
MacBooks and it's storage issues, how are you dealing with it?
Tags: help
Published: 2020-06-06 13:10:02

---
title: MacBooks and it's storage issues, how are you dealing with it?
published: true
description: 
tags: #help
//cover_image: https://direct_url_to_image.jpg
---

So I've got a Macbook Pro 13' 128GB and use it primarily for development.

Thing now is that the other storage keeps increasing and re-cleaning it again and again using DiskSweeper is a task , So I bought a 256GB External SSD and moved and setup XCode on it. It's working but I can't really eject the disk anymore as I had to re-setup XCode again if I did forcefully eject it.

Now the question, I've seen people here have dual installations on mac. Am I restricted to have the external connected even then? then I guess the XCode approach is simpler but if I can eject the external whenever I want then I think I'll go ahead with the dual install.

If someone has a better alternative, let me know


UPDATE: 
I ended up installing the os on a the external device and can remove the device and boot from it whenever I want. Installing Xcode and huge projects on this from now on, there's a slight performance lag because of the difference between a sata connected SSD vs a USB C / Thunderbolt connected ssd
Quick Tip: Comparar dois arquivos no IntelliJ 
Tags: java, devtips
Published: 2020-06-06 13:29:45

Para comparar dois arquivos rapidamente dentro da IDE, selecione os arquivos que quer comparar:

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

Agora clique em CTRL + D e pronto:

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

Fonte: https://www.jetbrains.com/help/idea/comparing-files-and-folders.html
Implementing Creativity in your company cheat sheet 
Tags: startup, remote, creativity, product
Published: 2020-06-06 13:17:31

## Goal: Implementing creativity.

Creativity is the most important leadership quality and you have it.

Creativity can be cultivated. It's not a one man show for a business to sustain the future. It needs people who believe in and work towards it. CEO should always make sure creativity is embedded  all the stages of a business.Here is the Cheatsheet: [Read more](https://scaleblue.com/blog/implement-creativity-ceo-cheat-sheet/)
What do you listen to while coding/designing?
Tags: motivation, discuss, productivity
Published: 2020-06-06 13:17:28

Personally, I listen to classical music especially Mozart's. It helps me to stay calm even when refactoring spaghetti code.

*Cover photo by [Diogo Nunes](https://unsplash.com/@dialex) on [Unsplash](https://unsplash.com/)*
Time to make GC generate code for ya. Anything else?
Tags: webdev, showdev, javascript, discuss
Published: 2020-06-06 13:00:13

We have this [demo](http://gluecodes-demo.s3-website.eu-west-2.amazonaws.com/ide.html?appId=1&edit=page&id=index) which for now only presents the concept of the IDE and framework. Just starting to make it more useful and let you download the maintainable code from your changes made within the IDE :muscle: :muscle: :muscle:. More stuff will be landing [here](https://github.com/gluecodes/gluecodes-framework/issues). What else would you like to see on the list?
here is my First HTML project
Published: 2020-06-06 12:51:05

I just learned HTML from pirple.com with their frontend fundamental course, its been so much learning and exploring about the language and i strongly recommend this course for the all beginners who have never code before.
Here is my first project on "Awareness on COVID19", i have used header,nav,main,section,aside,footer,iframe,video,form,input,meta,label and many others tags, check what their respective function, i learn from w3school.com, you can also check.


here's my code, have a look
Picture Pandas - Little Intro guide (Olympics data)
Tags: python, beginners, todayilearned, tutorial
Published: 2020-06-07 12:28:43

---
title: Picture Pandas - Little Intro guide (Olympics data)
published: true
date: 2020-06-06 12:43:34 UTC
tags: python, beginners, todayilearned, tutorial
canonical_url: https://www.nagarajbhat.com/post/picture-pandas-little-guide/
cover_image: https://www.nagarajbhat.com/post/picture-pandas-little-guide/featured.png
---

### Frame the question approach

So the idea is you are given a dataset, but more often than not it is not the ideal dataset that you can use directly in the machine learning pipeline.You need to get it as close to the ideal state as possible.And the way to do this is to ask questions to your dataset. Ask questions so that you get answers from the dataset and transform that dataset into something that can be used to get results.And the questions depend upon what results you want, or what your end goal is.

Also, note that the questions don't necessarily have to come first. More often than not exploring the data, and combining different operations can give rise to a solution that can answer a question.So it is hard to tell whether the chicken came first or the egg.

Eventually, the end goal is to make a dataset that is much more useful in the context of that is set out to be solved.

### Dataset

The dataset considered here is of [120 years of Olympic history athlete and results](https://www.kaggle.com/heesoo37/120-years-of-olympic-history-athletes-and-results).Download this dataset if you want to follow along.

### What will be covered?

- Read and select data
- Summary statistics
- Group and sort data
- create DataFrame
- Combine data (merge, concat)

### Pre- requesite

- Basic python knowledge
- Jupyter notebook setup
- Install pandas (pip install pandas)

Check out the full blog here : [Picture Pandas - Little Intro guide (Olympics data)](https://www.nagarajbhat.com/post/picture-pandas-little-guide/)
Daily Developer Jokes - Saturday, Jun 6, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-06-06 12:40:39

---
title: "Daily Developer Jokes - Saturday, Jun 6, 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%20Jun%206%2C%202020"
published: true
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/5e1258e3bbae5.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:___ Why don't bachelors like Git?

___A:___ Because they are afraid to commit.
 -->
Record fraud (find an algorithm)
Tags: algorithms, challenge
Published: 2020-06-06 12:40:33

---
title: Record fraud (find an algorithm)
published: true
description: Find an algorithm for removing expenses
tags: algorithms, challenge
---
**Difficulty:** Beginner

You work in a start up with very unstable finances. You have a chronological list of all income (positive integers) and expenses (negative integers), and you need to share it with investors.

However, you don't want the busines to appear unprofitable. In fact, you want it to seem as if the busines has never been in the red ever. You do this by selectively removing expenses from the list, removing as few as possible to avoid rasing suspicion.

What does the list given to the investors look like?

### Input
An array of integers `history`

### Output
An array of integers `cleared` where
 - `cleared` is a subsequece of `hisory`
 - `sum(cleared[:n])` is non-negative for all n
 - `len(cleared)` is maximized

If multiple outputs fulfill the requirements, return any one of them

### Constraints
`len(history) <= 100 000`  
`abs(history[i]) <= 10^9`

### Example
Input
```
[-3, 8, -4, -5, 4, -2, -3, -2, -2, 5, -6, 2, -5, -5]
```
Possible output
```
[8, 4, -2, -3, -2, -2, 5, 2, -5, -5]
```

Try to make an algorithm that's `O(n log n)`
Cryptotab Review: Is CryptoTab a safe browser to earn bitcoin money?

Tags: cryptotabbrowser, bitcoin, mining, blockchain
Published: 2020-06-06 12:13:52

Mining Browsers plugins are mostly used by traders. It is an application that runs on your computer system and mines bitcoin. By this activity users can earn rewards of mined currency in a network with mining and referral income. 

CryptoTab Browser is a Chrome plugin built with the Chromium module. A Free internet browser that functions to mine bitcoin with normal CPU power. 

CryptoTab Features:
Extensions: The platform supports Chrome extensions, which allows to add all of the extensions such as, including an ad blocker, security tools, performance-boosting tools, themes, and more.
Payouts: Earnings can be withdrawn any time directly to a BTC wallet, even though there is a minimum withdrawal amount of 0.00001 BTC.
Multi-Browser Support: CryptoTab is available as a free standalone download, but it allows data importing from Chrome, Firefox, Microsoft Edge, Opera, and Safari.
Invite Friends: CryptoTab offers referral awards. You can earn more money by referring friends. Moreover, it has a 10 level referral network.

Cryptotab Earning Opportunity
CryptoTab also offers a 10 level referral program that can increase your mining revenue to more. You need to refer to your contacts through your personal link available on the crypto tab browser. You and your referral will get rewards when your referral will use your link and install a crypto tab browser.

Is the CryptoTab browser safe?
As the crypto tab does not charge any amount to register. It’s 100% free of charge with no upgrades available. As long as your browser works, it generates some income for you. Confusing MLM is often mistaken by a Ponzi scheme which is not justified.

Crypto Tab browser could be proven a good source of income for the crypto lovers and followers.So using cryptotab is highly recommended.

Read more at https://coinpedia.org/earning-site/cryptotab-browser/
Kubernetes in Restrictive or regulated environments
Tags: airgap, kubernetes, roost
Published: 2020-06-06 11:47:30

There could be situations where Internet access is regulated or even not there. These "air-gap" or regulated/isolated deployments become more involved with cloud-based environments, where full control is not available. Existing k8s/Cloud providers don't give you access to the cluster or configuration, or may not have an equivalent distribution for your local network or environment. 

Now public cloud offering is being centred around containers/Kubernetes/open source, having these in Hybrid or local system has become a need. Localstack or outposts still ties you with the cloud providers, while container movement is also about flexibility. The whole exercise becomes too complicated where the effort to put this in place becomes more than a few weeks of effort. 

How do you install/run packages in these Restrictive or regulated environments? 

Running Kubernetes cluster in "Air-gap" kind of environments means having local repositories for container images, bundled packages, or approved/regulated binaries. Even for additional tools like image scanning or ci/cd, should be available locally. The application package may include everything needed to run the application – binaries, dependencies, or built-in container registry. 

With work from home situations (COVID or even after that), "air-gap" kind of need would arise even for desktop users, where they may have limited connectivity or restricted by office network/installation policies. Users should be able to get a production-like environment with a local registry, control over cluster resizing, version switch capability, or configuration control. 

Such packages should not interfere with your existing installations and should be light on your machine. 

As a developer working from home, I need to bring my cluster closer to me and should be able to control my cluster behaviour even if I am in Air-gap environment. Developer Focus should be on service development rather than getting worried about how to install or how to run or configure in these situations.
Ethereum, how it is different from Bitcoin!
Published: 2020-06-06 11:42:53

Ethereum is a decentralized software platform. No one authority has the overall control over the network. Ether is the cryptocurrency of the Ethereum network and is the second most popular digital token after bitcoin . Ether , by its purpose, is different from bitcoin and is not meant to serve as a competitor to bitcoin.

A lot of miners around the world are competing with each other in an attempt to create and validate a block. For every new block, ether gets generated and the miners are rewarded. Miners not only confirm and validate transaction within the network but also generate new tokens. Mining is a process when a group of nodes completes a ‘Proof of work’ challenge, which is essentially a mathematical puzzle. 

We know that both Bitcoin and Ethereum networks are powered by the principle of cryptography. Still, the two have many differences. Transactions on the Ethereum network may contain executable code, while data affixed to Bitcoin network transactions are generally only for keeping notes. The smart contract is another major difference between Ethereum and Bitcoin. It’s basically a contract, but instead of being written physically or in a digital format, it’s written in code. The creator then uploads the contract into the blockchain.

We can arrive at a conclusion that both are emerging technologies. They both have immense potential to prosper in future.
5 extensiones de VSCode que todo dev debe tener
Tags: vscode, ide, devlive
Published: 2020-06-06 10:59:25

Hoy me gustaría hablaros de las 5 extensiones que, a mi parecer, te ayudarán como desarrollador, da igual de que lenguaje o de que plataforma, web, móvil, escritorio, etc. Empecemos:

1. [Rainbow Brackets](https://marketplace.visualstudio.com/items?itemName=2gua.rainbow-brackets)
Creo que esta extensión en muy útil, ya que te destaca en colores la apertura y el cierre de {}, [] o (). De este modo se hace muy sencillo encontrar dónde empieza y acaba una función u objeto.

2. [indent-rainbow](https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow)
Para seguir con colores, esta extensión te ayuda a gestionar sangrías en tu código, marcándote en colores cada vez que vas tabulando o espaciando tu código hacia la derecha. En caso de que alguna línea de tu código no esté bien tabulada te lo marca en rojo. Creo que puede ser útil en funciones muy largas y con muchas condiciones dentro.

3. [GitLens — Git supercharged](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)
Esta extensión es genial si trabajas con un equipo grande de desarrolladores, ya que al pararte sobre una linea del código te informa de quién hizo ese cambio, hace cuanto tiempo y su comentario. Además, esta extensión nos permite ver un histórico de versiones del fichero y podremos ver cada commit que se hizo sobre ese fichero sin salir de VSCode.

4. [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph)
Seguimos con git, con esta extensión podrás ver de una manera muy gráfica todas las acciones que se han hecho sobre un repositorio, como las ramas o los merges entre ellas, los commits y los cambios de cada commit.

5. [Polacode](https://marketplace.visualstudio.com/items?itemName=pnp.polacode)
La dejo para el final porque creo que no es tan importante como las anteriores pero su funcionalidad es muy interesante si necesitas hacer documentaciones explicando scripts o, ¿por qué no?, si te apetece posturear en redes sociales. Con ella puedes sacar una foto con un formato bonito de la parte que selecciones de tu código.

Si a ti se te ocurre otra que no esté en este pequeño listado, que seguro que alguna hay, déjame un comentario mencionándola, me encantaría conocer tu opinión.
automate WhatsApp messages using Python
Tags: python, selenium, automation, whatsapp
Published: 2020-06-06 10:36:14

Project Title
Automate WhatsApp for sending messages to any particular person or group in WhatsApp.

Getting Started
It's not totally automated as the QR scan should be scanned manually. Everything is working fine with code as you soon run the code chrome will pop up and open WhatsApp web and scan the QR code from your phone. then type the contact name in the console box and the message you want to send and the number of times you wanna send.

prerequisites
Selenium Library

Chrome driver

installing
#install selenium
python3 -m pip install selenium

#Download and install chromedriver
download [chrome driver here ](https://chromedriver.chromium.org/downloads)
code :

# import web driver from selenium 
from selenium import webdriver

# creating an obect to open chrome and set the path inside () of chrome driver 
driver = webdriver.Chrome('/Users/rauna/Downloads/chromedriver')

# passing the WhatsApp url
driver.get('https://web.whatsapp.com/')

# getting data from user
name = input('enter the name of user')
msg = input('enter your message')
count = int(input("enter the count"))
input('enter after scanning QR code')

#saving the defined contact name from your WhatsApp chat in user variable
user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))

user.click()

#name of span class of contatct
msg_box = driver.find_element_by_class_name('_13mgZ')

for i in range(count):
    msg_box.send_keys(msg)
    button = driver.find_element_by_class_name('_3M-N-')
    button.click()

snippet from above code:
user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))

you can see why [@title = "{}"] because user providing the name of the contact person you wanna send the message screenshot
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3zli9fqhte923rfrthj2.jpg)


msg_box = driver.find_element_by_class_name('_13mgZ')

('_13mgZ') is the class name of typing box you can see the image below

screenshot
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/czxnvcc9jbtaakmd0xkk.jpg)

button = driver.find_element_by_class_name('_3M-N-')

('_3M-N-') is the class name of send button as you can see in image below

screenshot
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/czxnvcc9jbtaakmd0xkk.jpg)

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

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


check out GitHub for a better understanding  link is here:
https://github.com/cyber-hoax/automatewhatsapp


#python #selenium #automation #WhatsApp
Mailman: How to update subject prefix number (post id)
Tags: mailman, email, server, mailinglist
Published: 2020-06-06 09:56:34

## Summary

This post is about GNU [Mailman](https://www.gnu.org/software/mailman) and shows how to update the post id which appers in [subject_prefix](https://www.gnu.org/software/mailman/mailman-admin/node14.html) as prefix number.
It might be useful if you migrated Mailman servers using `subject_prefix` option.

<small>\* "Mailman" in this post means not Mailman3 but Mailman2, because I use [OpenBSD](https://www.openbsd.org).</small>

## Tutorial

Use [`withlist`](https://www.gnu.org/software/mailman/site.html), "the most powerful and flexible script in Mailman", to manage the database.

```console
# /usr/local/lib/mailman/bin/withlist $LIST_NAME
Loading list $LIST_NAME (unlocked)
The variable `m` is the $LIST_NAME MailList instance
```

Lock the database files and update the post id.

```python
>>> # check it
>>> m.post_id
current number

>>> # update
>>> m.Lock()
>>> m.post_id = 9999
>>> m.Save()

>>> # validate it
>>> m.post_id
updated number
```

Quit the prompt.

```python
>>> quit()
Unlocking (but not saving) list: $LIST_NAME
Finalizing
```

Done :)
Bitmart Exchange Review :Is it reliable?
Tags: bitmart, bitmartexchange, cryptocurrency, exchanges
Published: 2020-06-06 09:48:17

BitMart Exchange is a multi-cryptocurrency exchange which is integrated with advanced multi-layer and multi-cluster system architecture to establish the security, stability, and scalability of the system. Rising to the Global website ranking of 64,502 in April 20202.

 
What is BitMart Exchange?
BitMart Exchange is one of the premier global digital asset trading platforms in the   cryptocurrency market. BitMart exchange came into existence in March 2017, it is registered in the Cayman Islands with offices worldwide. 

Currently, the platform provides spot trading only and will eventually take cryptocurrency trading to new heights by providing future contract trading, over-the-counter trading, and whole-network trading. The BitMart team consistently makes it a priority to deliver secure, smoother, and faster trading hoping to become one of the top world-class digital asset trading platforms.

BitMart Token(BMX)- The Native token
BMX is an ERC20 based token issued by BitMart. There is a total volume of 1 billion BMX tokens.

The benefits of holding BMX tokens are:
1.Receive a 25% discount on trading fee using BMX
2.BMX holder can vote for listings 

Bitmart Exchange Review:
BitMart is a regulated crypto exchange that also supports fiat currencies, which features a competitive fee range for its trading services.The company behind BitMart has officially registered as a Money Service Business (MSB) with U.S. regulators, conducted by the Financial Crimes Enforcement Network (FinCEN) which helps to prove the authority of the business behind the exchange.

Read more at https://coinpedia.org/exchange/bitmart-review/