fabiochiu/medium-articles huggingface dataset:
K Nearest Neighbors. KNN falls in the supervised learning…
By: Navjot Singh
Tags: Machine Learning, Data Science, Python, Data Analysis, K Nearest Neighbours

KNN falls in the supervised learning family of algorithms. K nearest neighbors is a simple algorithm that stores all available cases and classifies new cases based on a similarity measure. Classification is done by a majority vote to its neighbors. The data is assigned to the class which has the most nearest neighbors. As you increase the number of nearest neighbors, the value of k, accuracy might increase.

KNN is a non-parametric, lazy learning algorithm. When we say a technique is non-parametric , it means that it does not make any assumptions on the underlying data distribution.

In KNN algorithm, there is no explicit training phase or it is very minimal

Let’s see How does the K Nearest Neighbor Algorithm works:

Step 1: Choose the number K of neighbors that we are going to have in the algorithm.Here ‘K’ in KNN is the number of nearest neighbours used to classify or (predict in case of continuous variable/regression) a test sample. One of the most common default value of K is 5.

Step 2: Take the K nearest neighbor of the new data point,according to the Euclidean distance. We can also use any other formula of measuring the distance like Manhattan distance or Chebyshev and Hamming distance.

Euclidean distance:Euclidean distance or Euclidean metric is the “ordinary” straight-line distance between two points in Euclidean space.

Euclidean Distance Formula

Step 3: Amoung these K Neighbors , count the number of data points in each category that is how many data points fell into one category to the other category.

When the value of K is small then we are forcing our model to classify blindly and predict the outcome. A small value for K provides the most flexible fit. On the other hand larger value of K will increase the average voters in each prediction and hence is more resilient to outliers.

Step 4: Assign the new data point to the category where we counted the most neighbor.

In KNN, the model structure is determined from the data. KNN is also a lazy algorithm, What this means is that it does not use the training data points to do any generalization.

Application

Very simple implementation as there is no explicit training phase or it is very minimal. KNN can outperform more powerful classifiers and is used in a variety of applications such as economic forecasting, data compression and genetics.

One of the most common and widely used case of K-NN algorithm is Recommender Systems.

That’s all for K Nearest Neighbor Machine learning Algorithm. Stay tuned for further blogs.

Thankyou
Gradient Descent in 3 cells
By: Bogdan Samoletskyi
Tags: Python, Data Science, Gradient Descent

Of Jupyter notebook.

Disclaimer:

In my article about gradient descent I described a theory of gradient descent. Here I will create an easy 3 cell Jupyter notebook implementation of algorithm.

Initial code I found in this beautiful repository and rework it slightly , rewrited in Python.

Why Jupyter Notebook?

For the first time I tried to realize it on C#, that’s why initial repository written on C#. But I found it not so easy to debug and, the most drawback for me — I didn’t found free library for diagrams, which is so beautiful as matplotlib. I wanted to draw a function — how we are closer and closer to the perfect result with each new iteration. Also, I can play with the parameters just to restart one cell. I can do it on my phone during the small breaks instead of plying games, or watching funny clips.

Also, not so long ago, new python plugin for VS Code started to understand notebooks, and it works AMAZING!

Cell 1 — Gradient step.

To calculate one step of gradient we need to calculate partial derivative for b and m. After that we can have new variables.

Parameters: current_b, current_m — b and m from previous step, points — array of points, learningRate — our learning rate, how big it is it dependent on how big steps with new values we want to make.

def gradient_step(current_b, current_m, points, learningRate):

Initialization: as we need to calculate partial derivative for all points we need to iterate through it we need to find how many points we have.

totalPoints = len(points)

Also we need to initialize values of partial derivatives, make it zeros.

stepped_b = 0

stepped_m = 0

Finding partial derivatives: we calculate it in cycle, incrementing for every point.

x = point[0]

y = point[1]

stepped_b += -(2 / totalPoints) * (y — ((current_m * x) + current_b))

stepped_m += -(2 / totalPoints) * x * (y — ((current_m * x) + current_b))

Finding new values: depending on learning rate we can do small steps, but can do bigger ones. If learning rate too small we will need to do many iterations, if too big — we can be inaccurate.

new_b = current_b — (learningRate * stepped_b)

new_m = current_m — (learningRate * stepped_m)

That’s all what we need for one step of gradient descent. Full code below:
Bias in AI: Much more than a Data problem
By: David Pereira
Tags: Artificial Intelligence, Ethics

Bias in AI: Much more than a Data problem

While data bias is a very well-known cause for AI unfairness, it is definitely not the only one.

Obama upsampled to a white person by an AI, originally published as part of this tweet: https://twitter.com/Chicken3gg/status/1274314622447820801?s=20

There has been a lot of discussion during the last days around bias in the AI community, especially after Yann LeCun joined the conversation after this tweet:

Original tweet about the bias of PULSE, a new Photo Upsampling algorithm

PULSE, the algorithm that created this image, works by using Self-Supervised training to search a space of high-resolution artificial images generated using a GAN and identify ones that downscale to the low resolution image. A bias problem with the algorithm was quickly found: given downsampled (but still very recognizable) images of famous non-white people, the algorithm still upsampled them to produce white people outputs. Here is another clear example:

Original AOC photo, downsampled image and PULSE output.

Lecun’s replied to that tweet stating that ML systems are biased because of the quality of Data.

Yann Lecun stablishing a relationship between data bias and AI bias

Part of the AI community reacted to this tweet claiming that Lecun’s statement implied that ML systems are biased only when data is biased. One of the most active experts who engaged in the conversation was Timnit Gebru, technical co-lead of the Ethical Artificial Intelligence Team at Google.

Timnit Gebru’s response to Yann Leccun’s tweet

I must admit that following that conversation allowed me to access a lot of interesting resources about the topic of AI Ethics, and, in particular, bias. Let me share with you some of the most interesting ones I found:

One of my short articles in Towards Data Science called “Computer says no” included a high level view of the framework we used at my current company to deal with AI Ethics. As you can see, there is a lot to be considered to achieve true positive social impact and fairness through AI.

everis AI Ethics framework, all rights reserved.

I am really excited to be a Founding Editorial Board Member of the new Springer’s AI and Ethics journal, in which I will have the pleasure to explore this topic in detail working together with an amazing group of experts.

Do you have any resource that you think is highly relevant in the AI Ethics space? I would be more than happy to update this article recurrently with your collaborations.
Wishes
Tags: Social Media, Grief, Facebook, Loss, Poetry

No one ever dies on Facebook.

They can only be unfriended.

How can I touch that blue icon?

You are no less for your absence.

A digital cog rolled round, clicked,

Reminding me it’s your birthday,

Asking me to help you celebrate,

Though it made me feel the opposite.

Instead, through ether’s medium,

I will send you birthday wishes.

If you haven’t traveled too far,

Perhaps you will still receive them.

May your dreams for earth be realized.

May your hopes for man be fulfilled.

May heaven receive you and send you back.

You always did believe in recycling.
From Probability Government to Possibility Government
By: Harvard Ash Center
Tags: Cities, Leadership, Covid 19, Crisis Management, Coronavirus

The COVID-19 crisis has made the previously unthinkable part of our new daily reality, forcing a huge number of innovations and adaptations at every level of society. As city leaders, you are at the helm of many of these changes, and you understand the risks and the stakes at play in the choices you make. How can you act now in a way that maximizes learning and informs future action while managing risks? What kinds of experiments drive innovation, and how can you face the challenges inherent in experimenting “in public” — with your constituents’ eyes on you, money under your stewardship, and lives and livelihood depending on you? How can you transform what was once unthinkable into new understandings of what is now possible?

Possibility Government is a different kind of government than we typically practice. Governments often confine themselves to questions of what is probable: What can we reasonably expect or do based on readily quantifiable information, resources currently at hand, and what we have seen work in the past? Probability government is appropriate in places, but too often leads to middling outcomes. Possibility government is the pursuit of new programs and services that may only possibly work. This means, they probably won’t work. This is the realm of the entrepreneur: Most new ventures fail. But the ones that succeed, can be transformative.

Possibility Government is not new — it has always been a necessary feature of democratic governance — but it is especially necessary in the face of COVID-19, and it is a fact of public life at present. Much of what you are doing is untested, and acknowledging to yourself, your teams, and your residents that some of what you are doing will not be successful is simply a recognition of reality. At the same time, you can promise them that while you will pursue the merely possible, you will not waste time on the delusional.

Effective Possibility Government requires a shift in mindset on the part of public officials and the public. Elected and appointed public servants must engage in Possibility Leadership: sourcing, trying, and scaling new efforts. And residents must engage in Possibility Citizenship: permitting, encouraging, and co-participating in the development of these efforts. Possibility Government = Possibility Leadership + Possibility Citizenship.

We’ll all have to move together.
Being Gay Isn’t About Sex.
By: Stu Laurie
Tags: Pride, Lifestyle, Society, Education, LGBTQ

Being Gay Isn’t About Sex.

Teaching children about different forms of love doesn’t need to involve sex.

Rainobw Balloon. Photo by @robin_rednine

I was watching YouTube clips the other day when I was supposed to be working, and I came across one that discussed the idea of exposing children to a Pride march. A teacher had taken her Primary School class to the local Pride march and panellists on a UK chat show were chatting about the morality of it.

What got to me was the first person to speak, a star of a UK soap opera who herself has had relationships with both men and women, immediately stated children of that age shouldn’t be exposed to sex.

Wait, what?

Pride parade. Photo by @tbilletpro

Since when did going to Pride automatically mean children are exposed to sex of any description? This feeds into a cultural assumption that I have come across many times that being gay is about having sex with men (or women, of course, if you’re of the lesbian persuasion). How hard is it to understand that it’s about who you fall in love with? Who you make an emotional attachment to. Do people just cling onto their long-held opinions like a tennis player grips their racket rather than open themselves up to actually learning and understanding?

Physical attraction and sexual desire are all part of it, much as they are for anyone and any couple, but it isn’t everything. It’s about so much more than that. It is this assumption that being gay is purely about wanting to sleep with the same sex that helps feed into an idea that being gay is ‘dirty’ or some sort of delinquency.

Thankfully, there was someone else on the show who provided a voice of reason; stating that taking children to Pride has nothing to do with sex, it’s about exposing them to love and acceptance.

THANK YOU!

Exposing children to different forms of love (not sex) at a young age sets them up to grow into open minded and accepting adults who understand that different people live different lives, and that’s fine. It’s the lack of understanding that often causes misconceptions and perpetuates homophobia and hate.

They will understand that being gay is feeling towards the same sex as heterosexuals feel towards the opposite sex. It’s that simple. Plus, kids like rainbows and there is nowhere that has more rainbows than Pride. Or Unicorns. So yes, take your kids to Pride. Just don’t show them porn and we’re good.
I Don’t Want To Publish My Book Anymore
By: Glenna Gill
Tags: Life Lessons, Writing, Relationships, Memoir, Family

My oldest son is 21, my middle son is 17, and my daughter is 12. I love them more than anything on this Earth. When I was at my worst, as detailed in the book, I wasn’t able to spend much time with them, so I cherish every loving moment we have together. I wouldn’t hurt them for anything in the world.

There are a lot of stories in my book I think they already know, but I’m not sure about that. I end up looking pretty bad in most of the 300 pages. There were things I did that were shameful and selfish. Would it be too much for them to read about my former drug addiction, or would my story fill in some blanks they had when I was in the middle of it? I’ve heard it said that when you badmouth a parent, the child takes it to heart as an affront to themselves. Would that apply if I was saying bad things about myself?

I know my boys particularly feel protective of me. Would they feel that even more strongly if they read my book? I don’t want them to feel like they have to take care of me. They are still young and going off on their own soon to make their way in the world, and I don’t want anything to hold them back.

What about the parts where I talk about the boys’ dad and our divorce? Again, I’m not sure how many details they already know, but I don’t want to do anything that might cloud their relationship with their father. What happened in the marriage was between the two of us, but would the kids feel involved and like they had to take sides? I harbor no resentment that things didn’t work out, but would I be placing that resentment into the minds of my sons?

What about my daughter? She was too young to remember the bad things that happened. What will she think of her mother, and will she take that burden on herself? My plan was not to tell her about my book until she grew up, but what if she found out about it somehow? Even though the story ends with a positive arc, would she focus on the negative and hold it against me?

I hoped when my daughter was older, she would read it and see how I put my life back together after surviving tough times, but I can’t guarantee that will be the result. What if she is angry with me instead? What could I say to her to undo the damage already done?
Visualizing 6 million Holocaust victims
By: Jan Schultink
Tags: Presentation, Data Visualization, Presentation Design, Design, PowerPoint

It is Holocaust memorial day today in Israel. Sometimes it has hard to graps/visualize big numbers. I tried below. Let’s not forget.

Remembering 6 million Holocaust victims

View more presentations from Jan Schultink.
The Real Avengers Of This Pandemic
Tags: Avengers, December Contest, Pandemic, Coronavirus, Movies

The Real Avengers Of This Pandemic

The significance of the Avengers during this time of crisis.

Photo by: Erick Romansyah grabbed on Pixabay.com

2020 the year of battles and a war to be won. A year that we would tell our grandchildren. The time that we would always look back to. I know that this was and still is a difficult time for everybody, and even if the vaccines are to be a success and we can control and eradicate this virus — our life will never be the same again. As for me, how this virus affected my life? Well, first I found out around July that my English high school teacher died because of the virus; I was shocked, he was young and full of life. It just hit me like a truck, making me realize how serious and real this is.

“This is the fight of our lives. We are going to win. Whatever it takes.”- Steve Rogers

I know that the situation is already bad as it is, but it slapped me even more in the face when my aunt got it. I was scared because I haven't seen her for months, and I was frustrated because we were supposed to meet before this entire thing blew-up, but due to prior commitments, I wasn’t able to. It was only during that moment that I had a realization about how “golden” time is, where everything is just trivial, and spending time with your loved one should be your priority; material things can be bought or replaced but memories and moments are priceless.

“I'm still worthy”-Thor

If you would all remember the scene from the movie where everyone was sitting down, and the place looked deserted that's how I felt about this pandemic and the quarantine implementations. I know we didn’t lose half of the human population but for somewhat reason, something was stolen from us... its as if we are living in an endless void. Everything just felt cold, lonely, and full of uncertainties, and then there are these questions running in my mind like — what’s next? Who's next? What will happen to us? When will this end? People were not just physically affected but also financially, emotionally, and mentally drained.

“I used to have nothing. And then I got this — This job, this family — And I was better because of it. Even though they’re gone, I’m still trying to be better.”- Natasha

The scene where Natasha was checking on everybody, asking for updates, and still in denial of everything that has happened. I think that’s what a lot of people felt, especially the people who lost their loved ones because of this virus; they weren’t able to see their loved ones' or friends before they passed away, some weren’t able to bury and mourn properly.
Payola Fuels A Crock of Persistent Climate Change Denial: A Billion Dollars a Year is Spent to Ensure Inaction
By: Glenn Fay
Tags: Climate Denial, Politics, Climate Change, Global Warming, Environment

Even though 97% of climate scientists agree that we face devastating irreversible changes to civilization, half us don’t know this, and many Americans still believe anthropogenic global warming is open to debate. Rogue contrarian scientists and outspoken fossil fuel-loving politicians influence our minds with false propaganda. But deep roots sustain an organized climate change counter-movement.

Photo by Glenn Fay

It turns out that a well-funded climate counter-movement with very deep pockets has been actively perpetuating doubt, delay, and obfuscation of the facts for decades. Robert Brulle, a sociologist at Drexel University completed research in 2013 that showed there has been what he calls a climate change counter-movement (CCCM) that is funded by conservative advocacy organizations, trade associations, and wealthy individuals to the tune of almost a billion dollars a year. The goal of the disinformation campaign is to derail climate change information despite the responsible efforts of scientists to warn us that go as far back as the 1970s. So far, the counter-movement has been successful.

Brulle discovered 91 CCCM organizations that have gone to great lengths to conceal where the money is coming from by setting up elaborate donor-directed philanthropies. About 80% of them are registered as charitable organizations and get healthy tax breaks. They route the money through trusts that offer anonymity for their donors.

According to Brulle, the CCCM spends just under a billion dollars a year to block American action on climate change. In fact, some of these funds have eclipsed the spending of big donors such as the Koch brothers and Exxon Mobil with even bigger endowments such as the Donors Trust, amounting to hundreds of millions of dollars, all of it secret dark money.

Photo by Glenn Fay

Over the years this dark money has paid for public speakers to denounce scientists and climate change research, authors to write climate change denial books, and other disinformation campaigns. It’s been used to fight President Obama’s green regulations, and to intimidate scientists. In fact, they went so far as to accuse climate scientist Michael Mann and others of fraud.

Nine hundred million dollars a year can buy a lot of time and doubt for the greedy to burn and profit from fossil fuels and it has. Just consider the polarization and misinformation still widely circulating out there about global warming and the enormous $5.2 billion in U.S. fossil fuel company subsidies and $28 billion in profits, while they dump carbon into the air for free.

Perhaps worse, our children and grandchildren will have these climate counter-movement donors to thank for decades of foot-dragging and a spiral of silence as carbon dioxide levels have soared from 300 ppm to well over 400 ppm and beyond, resulting in extreme weather, floods, wildfires, food and water insecurity, and political instability for many generations worldwide.
Runner’s Life Newsletter
By: Jeff Barton
Tags: Fitness, Health, Sports, Running, Newsletter

Runner’s Life Newsletter

Highlights and stories from December 20-December 26, 2020

Photo by Capstone Events on Unsplash

Welcome to the Runner’s Life newsletter!

If you’ve missed previous newsletters, you can find the archive here.

On Sunday, December 20, Sara Hall came close to breaking Deena Kastor’s 14-year-old American marathon record of 2:19:36. Running in The Marathon Project, Hall finished less than a minute off Kastor’s record with a time of 2:20:32, an almost 90-second PR.

Hall’s performance follows her second-place finish at the London Marathon in October. In that race, Hall ran the sixth fastest marathon time in American history, and the 37-year-old mother of four seems to get better with age.

In 2015, Hall and her husband Ryan (a former Olympian), adopted 4 sisters from Ethiopia. The couple works to fight poverty and help orphans within the country, and they created the Steps Foundation to assist in that endeavor. They estimate there are over 60,000 children living on the streets in Ethiopia.

The Halls’ have set up a gofundme page to help “create a center for young girls coming out of homelessness, trafficking and prostitution.” You can contribute to their page here.
What Should You Clarify Before Accepting a Job Offer?
By: Catalin Pit
Tags: Programming, Job Hunting, Software Development, Web Development, Startup

What Should You Clarify Before Accepting a Job Offer?

Asking the right questions before giving a yes

Photo by Andreas Dress on Unsplash

There are some essential points you should clarify before accepting a job offer. It’s easy to miss them at the moment and take a job offer straight away.

As a result, in this article, I want to talk about some questions you should ask before accepting the offer. I suggest you make a small checklist because you might forget them in the interview.

Thus, the questions you could ask are as follows:
How to securely deploy to Kubernetes from Bitbucket Pipelines
By: Dane Stevens
Tags: Tech, Docker, Bitbucket, Security, Kubernetes

Hands up if this has happened to you. Say you’re reading a well-written article on one of countless topics, and you get to the line that goes something like this:

// DO NOT DO THIS IN A PRODUCTION APP

const API_KEY = '<api-key-displayed-in-plain-text>'

Ok, so how should you be doing this? Unfortunately, there isn’t a one-size-fits-all approach to securing your secrets. Different programming languages deployed in different environments all handle secrets in their own way.

Suffice it to say that you should never store secrets in your code or repository. Secrets should be passed into your app through environment variables at the last possible moment.

Bitbucket Pipelines — Continuous Delivery

I have been using Bitbucket Pipelines since it was in Alpha and I have to say, it’s fantastic. It has to be the quickest and easiest way to setup continuous delivery right from your repo.

Pipelines are configured with YAML files and can be very simple or extremely complex depending on your needs.

Pipelines Configuration

I like to break up my build jobs into steps for a couple of reasons:

If a step fails, you can re-run individual steps.

Each step is isolated from the others. Only your base repo and any “artifacts” you declare will be passed to the next step.

Here is a 3-step bitbucket-pipelines.yml file that takes a create-react-app site, packages it as a Docker image and deploys it to a Kubernetes cluster:

Bitbucket Pipelines Configuration

Dockerfile

Here’s the important part of all that:

- echo $KUBECONFIG | base64 -d > kubeconfig.yml

Our kubeconfig file is stored as a Base64 encoded string in a Bitbucket secret named $KUBECONFIG.

Bitbucket secrets are stored encrypted and are decrypted when you call the variable in pipelines.

We decode the $KUBECONFIG variable and store it in a temporary file called kubeconfig.yml which is automatically deleted as soon as this step completes.

Breaking it Down

Step 1

Install dependencies Run tests Build Pass build directory to Step 2

Step 2

Name Docker image Build Docker image Push image to Docker Hub

Step 3

Decode kubeconfig Set deployment image

Build Performance

This entire build takes less than 1 minute 40 seconds and using Alpine Node the Docker image is just 29 MB.

Conclusion

Securing your secrets isn’t hard, but it starts with knowing where to look.

Some tips for securing secrets in different Node.js environments:

Node.js (Development): use .env files and .gitignore to keep .env files out of your repository.

Node.js (Production): use Kubernetes Secrets, Docker Secrets and pass as environment variables into the container.

Remember this one rule:

Don’t store secrets in your code, your repository, or your docker image.

Happy coding!
Mencoba PWA dengan Vue JS dan GitHub API
By: Eko Simanjuntak
Tags: Heroku, JavaScript, Github, Vuejs, Pwa

Easy read, easy understanding. A good writing is a writing that can be understood in easy ways

Follow
HTML Tag <img> as an anti-pattern แสดง ภาพในรูปแบบ Next-Gen Formats
By: Tuanrit Sahapaet
Tags: Programming, Developer, Engineering, Code, Web Development

The CSS background-image property as an anti-pattern

Many of us have cut our teeth using the CSS back­ground-image prop­er­ty to do a wide vari­ety of things. To many, it's…
Top Three Wise Women
By: Susan Brearley
Tags: Women, Opinion, Writing, Inspiration, Culture

Opinion

Top Three Wise Women

Our Matriarchs Deserve Our Attention

Photo by Shlomo Shalev on Unsplash

For thousands of years now, humans have been laboring under patriarchy.

Elizabeth Warren just dropped out of the 2020 Presidential Race, despite the fact that pundits believe and have written that she had the most comprehensive and detailed plan for the country. Women and men alike just don’t believe women have leadership skills.

And yet, we are the parents. And grandparents.

When one grows up in a patriarchy, our experiences and our lives are shaped WITHIN the framework of that.

If we experience that the patriarchy operates in this linear, cold, stoic, industrial, production/achievement informed pattern that is the construct of the world, then our brains must deal with that pattern.

Do we accept it as the reality — the truth — or do we question it? And what are the resources within us that give us permission to question it? Does the ability to question come in our blood and bones package at birth? Or does it get beat out of us?

Have you ever met a child that doesn’t ask why?

I had a coach ask me today what makes me feel passionate. And I recognized that I shy away from that which leads me too far into the land of emotion. It is risky and it is dangerous. That is what has been taught to women who live or must work primarily under a patriarchy. It is also taught to men.
Dear Office Dead-Weight,
Tags: Life Lessons, Business, Self-awareness, Perspective, Poetry

Dear Office Dead-Weight,

You disgust me…I think.

Photo by Spencer Russell on Unsplash

I had high hopes for you

being shiny and new; potential

to care, unlike this jaded crew.

We could collaborate! Open

an idea floodgate — I was certain

that would be our fate.

Who is this guy? I wondered

inside, his smile is big — it meets

his eyes. His demeanor is cheery

(a good trait in theory)

And yet — I find myself weary.

You complain too much, work

too little; at best, your statements

are brittle and they always belittle.

Was it fair for me to hope

you’d care? Was it stupid to dare

to believe you’d do more than

breathe air?

It pays the bills you say, when

asked about your workday,

but what are you doing

to earn that pay? What little work

you do, comes to me to redo

while you enjoy another brew.

Are you actually a genius?

sly with your idiot sweetness, while I

set impossible bars with my keenness

and drown in the work, while you

play with your penis? Sure —

this industry’s lame, but the product

carries my name — and that’s one

thing I refuse to shame.
Blockchain Future Chronicles
Tags: Storiqa, Bitcoin, Cryptocurrency, Future, Stq

Did you ever imagine how our future would look like if all the predictions about blockchain come true and the technology is implemented in almost every sphere? Today we would like to distract a little bit from our traditional topics and show you some cases from possible blockchain future. We are sure that the future like this will not leave you indifferent.

Ever wanted to pay for a hotel with Ether? What about living in Ethereum Hotel?

The first hotel that accepts cryptocurrency has built in China (Despite the fact that China bans cryptocurrency transactions within the country). However, the hotel not only accepts crypto but also bears the name of top cryptocurrency Ether and even reflects this in its design. Thus, the hotel lobby is decorated with the huge bitcoin wall. We believe that in a blockchain future we will see the rise Blockchain Hotel, EOS Hotel and maybe even Storiqa Hotel. We will definitely consider such an interesting opportunity (Just for kidding).

Waiting for government to allow crypto? What about government own crypto?

On October 1 the president of Venezuela Nicolas Maduro announced that the official website for buying and selling Venezuelan government cryptocurrency Petro is officially launched. From that day, the residents of Venezuela became able to register on the site and get an e-wallet to gain access to Petro. National cryptocurrency can be bought for sovereign bolivars that entered the turnover after the denomination. Since August 20, salaries and prices in Venezuela are tied to Petro cryptocurrency that costs about $60.

How about a glass of coke for bitcoins?

We know all we dream of the day we can buy a coke with bitcoin. Wouldn’t it be great if we could swap a few satoshi’s for a nice cold glass of coke? We had a great news for you, now you can do it (for now just theoretically).

A hardware hacker from Spain, Ricardo Reis built a hand-made Coca-Cola vending machine that operates on a lightning network and accepts bitcoin payments. By scanning the built-in QR code, the machine automatically receives and authorizes the Bitcoin payment, dispensing a glass of cola in return, all in a simple matter of seconds. The developer kindly shared his creation in his YouTube.

Finally, goods for tokens

Purchasing goods for cryptocurrency will take a special place in the blockchain future. Do you want to buy anything from abroad without conversion problems? People need a universal currency for everyday payment and the main point is the demand for this currency for both the buyer and the seller. On Storiqa you will be able to buy unique goods from different countries with STQ token. Do you want T-shirt? Some decor for your home? Looking for a great gift for your loved one? It’s easy with the crypto marketplace (and don’t forget about extra cashback for STQ payment).

We are waiting for the blockchain future and we hope it brings us more possibilities. What about you?

Buy first goods for STQ: https://beta.storiqa.com/
Flash Thoughts 3: Forever
By: Varsha Kini
Tags: Storytelling, Windmills, Flash Fiction, Stories, Fiction

Flash Thoughts 3: Forever

Remember the time we saw windmills?

"I LOVE WINDMILLS" I had yelled.

You gently held my hand and said,

"Today, I love windmills too"

"From today, I’ll love everything that makes you this happy....forever"

Remember the time when forever was possible?
Asch Project Progress Report
By: Asch Team
Tags: Development, Blockchain, Bitcoin

in In Fitness And In Health
A Never-Ending Need For Attention
By: Em Hoccane
Tags: Personal Growth, Attention Seeking, Life, Psychology, Philosophy

A Never-Ending Need For Attention

A Narcissistic spectrum

Photo by Chris Ainsworth on Unsplash

From the moment we are born, we humans feel a never-ending need for attention. We are social animals to the core. Our survival and happiness depend on the bonds we form with others. If people do not pay attention to us, we cannot connect to them on any level. Some of this is purely physical-we must have people looking at us to feel alive. As those who have gone through long periods of isolation can attest, without eye contact we begin to doubt our existence and to descend into depression. But this need is also deeply psychological: through the quality of attention we receive from others, we feel recognized and appreciated for who we are. Our sense of self-worth depends on this. Because this is so important to the human-animal, people will do almost anything to get attention, including a crime or attempting suicide.

Look behind almost any action, and you will see this need as a primary motivation.

In trying to satisfy our hunger for attention, however, we face an inevitable problem: there is only so much of it to go around. In the family, we have to compete with siblings; at school, with classmates; at work, with colleagues. The moments in which we feel recognized and appreciated are short-lived. People can largely be indifferent to our fate, as they must deal with their own problems. There are even some who are downright hostile and disrespectful to us. How do you handle those moments when you feel psychologically alone, or even abandoned? We can double our efforts to get attention and notice, but this can exhaust our energy and it can often have the opposite effect-people who try too hard seem desperate and repulse the attention they want.
How to Get Into the Habit Of Writing Awfully
By: Jordan Fearn
Tags: Writing, Tips, Writing Tips

The Problem

The worst thing you can do as a writer is fret over every single word or phrase, you’ll spend more time sitting staring at the screen than actually writing. My first drafts are always embarrassing, it looks like something twelve-year-old me would be embarrassed by, but you know what? That’s fine. I can happily write 2500 awful words in a couple of hours because it gives me plenty of time to edit it into something respectable.

Editing is where all the real work is done. Even the best writers who write detailed plans well in advance will find themselves making changes part-way through because of how the story flows. Brandon Sanderson plans all of his stories well in advance, even books in advance! And yet he still uses the second draft to change the personalities of some of his characters.

So it’s important you don’t beat yourself up if you don’t create a masterpiece on the first attempt, no one ever does. All that matters is actually getting the words down onto the page. You can edit something awful, but nothing can be done to make a blank page anymore interesting if you’re not able to write.

Many people have issues with writing bad words, even as they put them down onto the page they beat themselves up about it. There’s always that little voice in the back of your head speaking to you. What does that mean? Who going to want to read this. You’ve just got to fight against it. Writing is as much about mentality as it is an ability, the transition from having words sit on the page to having words that spring out of it is a hard one to make, but it all begins with writing something bad.
Cooperation between Open MENA & InfoTimes finally launched to improve the data journalism awareness in the MENA
Tags: Journalism, Infotimes News, Data Journalism

Cooperation between Open MENA & InfoTimes finally launched to improve the data journalism awareness in the MENA InfoTimes Follow Feb 4, 2016 · 2 min read

Open MENA and InfoTimes have decided to join forces and work together. Our joint efforts will focus on raising awareness about data journalism within MENA newsrooms.

Each of our organisations has had its way of spreading the concept of data-driven journalism in the Middle East and North Africa. InfoTimes has been doing an excellent job in Egypt aiming to keep up with the momentum in data-driven journalism, in general, all over the world. Open MENA has been present in events across the MENA region, providing training to professional and citizen journalists alike.

Our first joint activity will be during the week-long Data-Driven Innovation in MENA workshop series organised by the IDRC in collaboration with the Canadian Embassy, UNDP, ILO in Egypt and hosted by Cairo University. Two one-day training sessions will take place, on 20 and 23 February respectively, gathering media and journalism students and professional journalists interested to gain deeper knowledge about data journalism. We will also produce our common training materials and sessions shortly. Stay tuned!

Egypt’s Annual Big Data Hackathon III

About Open MENA

Open MENA

Open MENA is an independent initiative aiming to bring the values of open knowledge in the Middle East and North Africa. We use best known for our unique expertise: action research, policy-making advisory and capacity building. The Open MENA website runs in three languages and is the first-of-a-kind and the go-to resource for anything related to open data and open knowledge.

About InfoTimes

InfoTimes

InfoTimes is a modern information design and data visualisation agency in Egypt with one common philosophy: data should be designed for sharing. It’s an easy access website, so you can simply get the accurate data, understand it, and share it with no time.

Our mission at the current time is to improve the skills of Arab journalists, raise the awareness among Arab press with the importance of data journalism, how they can use the data sets and spreadsheets for their own good.
Few-Shot Image Classification with Meta-Learning
By: Etienne Bennequin
Tags: Machine Learning, Computer Vision, Deep Learning

Why do we care about Few-Shot Learning?

In 1980, Kunihiko Fukushima developed the first convolutional neural networks. Since then, thanks to increasing computing capabilities and huge efforts from the machine learning community, deep learning algorithms have never ceased to improve their performances on tasks related to computer vision. In 2015, Kaiming He and his team at Microsoft reported that their model performed better than humans at classifying images from ImageNet. At that point, one could argue that computers became better than us at harnessing billions of images to solve a specific task. Hurrah!

However, if you are not Google or Facebook, you won’t always be able to build a dataset with that many images. When you work in computer vision, you sometimes have to classify images with only one or two examples per label. At this game, humans are still to be beaten. Show a picture of an elephant to a baby and they will never fail to recognize an elephant from now on. If you do the same thing with your Resnet50, you might get disappointed by the result. This problem of learning from few examples is called few-shot learning.

For a few years now, the few-shot learning problem has drawn a lot of attention in the research community, and a lot of elegant solutions have been developed. The most popular solutions right now use meta-learning, or in three words: learning to learn.

….

Read the full article here if you want to know what it is and how it works for few-shot image classification.
JCPenney and Shopkick Inspire Cinderella Moments for Consumers
By: Ipg Media Lab
Tags: General Content, Mobile, Jcpenney, Disney, Health

JCPenney has tapped into the ever-growing trend to combine mobile and retail to stay relevant amongst competing ecommerce and mcommerce channels. Consumers who visit JCPenney will notice an array of Cinderella-themed merchandise for promotion of the latest Disney movie. The retail chain has partnered with mobile app, Shopkick, in an effort to create buzz and boost foot traffic in their stores.

The Lab took a visit to JCPenney to discover just how this brick-and-mortar store is using mobile to drive traffic into the store. What we found were various plaques decorating the store that read: “Use the Shopkick app as your magic wand for a chance to win JCPenney gift cards to complete your own Cinderella look”. Consumers can then scan a barcode and gain “kicks” that lead to discounts.

A unique discovery we also uncovered — Shopkick promotes healthy living. After chatting with other consumers participating in the magic, we found that some users are motivated to get out and walk as opposed to taking the NYC subway just to gain more kicks by passing storefronts.
You Need to Stop Telling People Not to Decorate for Christmas
By: Brianna Bennett
Tags: 2020, Society, Holidays, Ideas, Life

Jump ahead two years and two months, and you land in November 2020. We’re still in the midst of a global pandemic, and things aren’t looking cheery for the remaining weeks of the year. President-elect Joe Biden warned of a ‘very dark winter’ back on November 9, and in the few weeks that have passed since, I worry he may be right.

That said, I’ve been seeing a lot of criticism (far more than usual and absolutely more derisive) directed toward people who are decorating for Christmas before Thanksgiving has even happened yet.

To those people, I say: leave the Christmas-lovers alone.

This year has been a complete disaster, so the last thing we need is more negativity. For people who lost loved ones to COVID-19, this will be the first year without them, and speaking from experience, those days are always the hardest.

Don’t get me wrong — in years past, I absolutely scorned those who celebrated “too early.” I refused to listen to the B101 news station after September because they played Christmas music constantly. I’ve often said that because we celebrate the holiday so early, by the time it comes, we’re tired of it!

But this year is different. This year, there’s a dark cloud hanging over the entire U.S.A. and each day that passes, it gets darker. There are days where it seems like the pandemic will never end, and even though there are uplifting reports of a vaccine with a 90% effectiveness rate, the number of preventable deaths continues to skyrocket.

A vaccine won’t bring back the people that have already died. It won’t help the grieving family members. It won’t wipe the slate clean or make those who don’t support science suddenly decide to wear masks and social distance properly or wash their hands for the full twenty seconds.

The vaccine won’t do that, because that’s not its purpose. But you know what could have a positive effect? What could bring a smile to everyone’s faces?

Christmas.

There is something about Christmas that is naturally fortifying, even in a year as bleak as this one has been. Maybe it’s the dump truck of serotonin and dopamine brought in by watching predictable Hallmark movies and baking cookies. Maybe it’s the fact that Christmas means we’re less than a week away from a new beginning. Maybe it’s the power of miracles being embraced instead of mocked.

Or maybe it’s none of those things.

Maybe, just maybe, it’s the ability to unite as humans, regardless of race, sexual orientation, gender identity, age, religion, or any of the other things that divide us and appreciate Christmas for exactly what it is.

Oh? You want to know what that is?

Ask those neighbors you’ve been gossiping about. They have all the answers.
Lilies
By: Sean Zhai
Tags: Poetry, Writing, Flowers, Art, Life

Haiku is a form of poetry usually inspired by nature, which embraces simplicity. We invite all poetry lovers to have a go at composing Haiku. Be warned. You could become addicted.

Follow
From Pandas to PySpark with Koalas
By: Maria Karanasou
Tags: Pandas, Pyspark, Apache Spark, Big Data, Towards Data Science

Photo by Ozgu Ozden on Unsplash

For those who are familiar with pandas DataFrames, switching to PySpark can be quite confusing. The API is not the same, and when switching to a distributed nature, some things are being done quite differently because of the restrictions imposed by that nature.

I recently stumbled upon Koalas from a very interesting Databricks presentation about Apache Spark 3.0, Delta Lake and Koalas, and thought that it would be nice to explore it.

The Koalas project makes data scientists more productive when interacting with big data, by implementing the pandas DataFrame API on top of Apache Spark. pandas is the de facto standard (single-node) DataFrame implementation in Python, while Spark is the de facto standard for big data processing. With this package, you can: - Be immediately productive with Spark, with no learning curve, if you are already familiar with pandas. - Have a single codebase that works both with pandas (tests, smaller datasets) and with Spark (distributed datasets).

source: https://koalas.readthedocs.io/en/latest/index.html

How to get started

Koalas supports ≥ Python 3.5 and from what I can see from the docs, PySpark 2.4.x. Dependencies include pandas ≥ 0.23.0, pyarrow ≥ 0.10 for using columnar in-memory format for better vector manipulation performance and matplotlib ≥ 3.0.0 for plotting.

Installation

The different ways to install Koalas are listed here:

But let’s start simple with:

pip install koalas and pip install pyspark

Keep in mind the dependencies mentioned above.

Usage

Given the following data:

import pandas as pd

from databricks import koalas as ks

from pyspark.sql import SparkSession





data = {'a': [1, 2, 3, 4, 5, 6],

'b': [100, 200, 300, 400, 500, 600],

'c': ["one", "two", "three", "four", "five", "six"]}



index = [10, 20, 30, 40, 50, 60]

You can either start from a pandas DataFrame:

pdf = pd.DataFrame(data, index=index) # from a pandas dataframe

kdf = ks.from_pandas(pdf)

From a Koalas Dataframe:

# start from raw data

kdf = ks.DataFrame(data, index=index)

Or from a spark Dataframe (one way):

# creating a spark dataframe from a pandas dataframe

sdf2 = spark_session.createDataFrame(pdf) # and then converting the spark dataframe to a koalas dataframe

kdf = sdf.to_koalas('index')

A full simple example with output:

A simple comparison of pandas, Koalas, pyspark Dataframe API

The API between Pandas and Koalas is more or less the same. More examples in the official documentation: