fabiochiu/medium-articles huggingface dataset:
JavaScript Pure Functions and Side Effects
By: Menasria Hafidh
Tags: JavaScript, Software Development, Software Engineering, Programming, Web Development

In this article, I’m going to walk you through these terms of Pure Functions and Side Effects by defining what they are and why they’re important to understand using code block examples. By the end of this article, you should be able to tell the difference between a regular Function and a Pure Function. On top of that, you should understand what Side Effects are and why you should avoid producing them in many different situations.

Let’s enjoy and learn:

Pure Functions

A function in JavaScript that’s considered to be a Pure Function has to have the following two properties:

Giving the same input always return the same output.

The function doesn’t produce any Side Effects.

Later in this article, we’ll take a closer look at what Side Effects but first let’s look at the first property:

1. Same input, the same output.

Pure Functions have one-to-one mapping or connections between its inputs and its outputs and this means for every unique input there’s a unique corresponding output. To further understand what this looks like let’s look at the following clear block:

const customSalutation = (name) => {

return `Hey ${name}`;

}

The function customSalutation takes the name as an argument and returns out my custom salutation, the great thing about this function is that the output is easy to predict for, for the same name you give it you get the same returned greeting you expect.

If we create here constant called salutaion where I call customSalutation and passing my own name and then I print out my greeting constant and I get Hey Hafid as an output.

const customSalutation = (name) => {

return `Hey ${name}`;

} const salutation = customSalutation('Hafid');

console.log(salutation);

// Hey Hafid

So no matter how this method is called or consumed you can always expect to get the same output if you give it the same input. Here is a different case when we have an array called names and right below it a variable nameSalutaions which is the assigned return values from mapping with first the first function customeSalutations as a callback function that will be called on each element of the names array.

const customSalutation = (name) => {

return `Hey ${name}`;

} const names = ['Hafid', John', 'Lucy''];

const nameSalutation = name.map(customSalutation); console.log(nameSalutation);

// [

// 'Hey Hafid'

// 'Hey John',

// 'Hey Lucy'

// ]

The output is a salutation for each person. Pure Functions allow you to have the expectation that given the same input you should have the same output, this makes your code a lot more readable since it’s easy to see the mapping between your inputs and your outputs. This is also great for memorization or caching since you can predict the output if you have the same input so instead of calling your Pure Function every single time you have the same input you can save your output in some location and then grab that output whenever you need it. By taking advantage of this you can really optimize your applications.
Assertions in the Java Programming Language
By: Adrian D. Finlay
Tags: Technology, Software Development, Java, Programming, Tech

Assertions are a development tool and programming language feature used to check if a conditional expression evaluates to true when the program is run. They are useful in the testing and development process and are typically omitted for production code. A key reason for this is that they require command line flags to be enabled, thus limiting proper functioning portability if said command line flags are enabled. As such, they are not recommended for production code; they were not designed for this. They can replace situations where programmers used to check for with if statements. They are much more compact then if statements and if assertions are not enabled at run-time, they are ignored. Assertions are accomplished in Java with the assert keyword. An AssertionError is thrown if the condition evaluates to false. We have Joshua Bloch to thank for this language feature.

To configure assertion options one must use either the -ea or -da command line flags to enable or disable assertions with the command line tool: “java”. For example, “java -ea Assert” where Assert is a java class file. You may also specify a specific class or package as follows. For a class: “-ea:Class”, “-ea:Package/Class”. For a package (and it’s sub-packages): “-ea:Package…”. Notice the ellipses (three succeeding periods), they are part of the format.

Within java code assertions take the following two forms:

assert condition;

assert condition: expression;

In the first form, condition is a conditional expression in java that results to True or False. In the second form, an expression is executed if the condition is false. This may be any expression that is not of type void. The String representation of the result of this Expression will be used in forming the AssertionError object. In both cases, an AssertionError is thrown if the conditional expression results to false.

Assertion Examples

Basic Assertion usage

Basic Assertion usage with example of Expression added

Basic Assertion usage with Custom Class instance used as expression

Catching the AssertionError exception object generated by assert

Capturing the AssertionError object for use outside of try-catch

Note!: For the purpose of completeness, we have shown how to catch an AssertionError. However, you should never attempt to catch Errors, only Exceptions, if needed!

Program that parses command line arguments and checks against a condition. Remember: this is advised against for production code.

Source

Ouput

And much more. Play around with it and let me know how you like it :)

Want the source? Grab it here.

Interested in Java? Join my Java group on Facebook:

Like my Content? Subscribe to my mailing list:

Don’t forget to give it a…. ;)

No Works Cited this time ;).
Go Cashless!
By: Tj Rentoy On Transport
Tags: Money, Earn Money Online, Finance, Promotion, Cashless

In today’s world, it’s no doubt that convenience is king, and with everything happening in the world — the social distancing requirements, the rise of new technology, the growing population — going cashless might not just be an option but a necessity. Whether it may be tapping a card, scanning a code, or pressing a button, it’s certainly easier than carrying a purse or wallet with cash.

How to Go Cashless?

There are multiple ways now to get the most out of your buck with the perks and promotions of going cashless. Here are some of the common ways to benefit from them.

Bank Cards — Debit and Credit Cards

In recent years, banks have been upgrading credit cards and debit cards to the new EMV cards (EMV meaning “Europay, Mastercard, Visa” originally). These cards have higher security and transact more effortlessly than swiping; just insert the card and some even have the capability to transact just by a tap. (Learn more about EMV)

Credit cards also come with special discounts and perks in certain establishments. Banks are giving promos now just for applying and getting a card.

Mobile and Online Banking

Banks also offer mobile and online banking. Before, online banking only had the capabilities to show transactions and make bank-to-bank transactions, but now, you can pay bills, shop online, and even access an ATM without your card.

Transferring money via Instapay is free for a limited time.

E-Wallets

Mobile wallets and e-wallets are gaining popularity because of various transactions you can do, among are: send and receive money; pay bills, government contributions, and taxes; buy mobile prepaid load; save and invest money; buy and sell cryptocurrency; donate to charity; and shop online and in stores by just scanning a QR Code. Now that’s social distancing.

I’ve listed some of the apps I personally use and their promo codes in this post.

Transportation

In terms of transportation, getting the cashless option is truly the most convenient. It’s literally having an express lane for you. For train commuters on the MRT and LRT, dedicated fare gates for Beep Cardholders pass effortlessly through the long queues. Some bus companies also accept fare payments via Beep. For motorists driving through expressways, dedicated RFID toll gates can save you a lot of travel time. The Ride-hailing app and delivery app, Grab, also has its own mode of cashless payments — GrabPay. More and more cashless options are emerging in transportation systems.

A new company was recently announced by the Office of the President that will handle cashless fare collection. (Find more information about SquidPay)

Tip: You can top up your Easytrip and Beep Card using the Coins.ph app.
How to efficiently manage a new week work ahead of you?
By: Kasturi Shrivastava
Tags: Monday Check In, Startup, Entrepreneurship, Productivity, Work

Knock knock … Monday!

Friday is still far away and the entire week is demanding your time, efforts and focus. Let’s apply these hacks to spice up this week work and do things in a little different way and save more of your time.

#1. Prioritize 3 things for the week

Prioritization makes you more efficient and transforms you in bring pro-active. Since, it is Monday, prioritize 3 important things for the week that you’ll complete and get over them. The tasks can be of any size but prioritize it according to it’s importance.

R emember, everything urgent is not important!

#2. Prioritize 3 things for the day

The week is still to wrap up, but most important is the present and that is today. Filter out all your tasks and prioritize 3 things for the day. Finish the hardest first.

Don’t let yesterday and tomorrow take too much of today!

#3. Apply 80/ 20 rule

Divide your work in 80/20 way, where you focus your 80% of time towards your allocated work and 20% of your time for meetings, for learning and for fun with colleagues.

Workaholics aren’t heroes. They don’t save the day, they just use it up. The real hero is already home because he/she figured out a faster way to get things done!

Don’t wait. Hustle, hustle and hustle. Make your everyday count.

Hold on, before you get back to your work, do watch this video to inspire you more :

And, stay updated with productivity hacks and tools with Vibrant WorkApp. Join us for October launch.
Listing and Delisting Update — 13th August 2019
By: Coss Team
Tags: Cryptocurrency, Crypto, Bitcoin, Listings, Blockchain

Listing

COSS will be listing Rapidz token on 15th August 2019.

RPZX is the utility token of Rapidz — a platform that allows B2B and B2C transactions for users.

Founded in 2017, the payments solution focuses on ease-of-use and providing accessibility for businesses willing to accept payments in digital assets.

According to their website, the payments company boasts acceptance at over 1000+ merchants including Major Group in Thailand (Cineplex, McDonald’s, etc.) with a strong focus on South-east Asia (Thailand, Singapore, and Vietnam).

RapidzPay converges the functionality and advantages of blockchain technology with mobile applications and POS systems. RapidzPay can be utilized through POS systems, as well as through mobile apps for iOS and Android — making purchases quick and easy. RPZX will trade on RPZX/ETH and RPZX/BTC pairs.
Happiest Here
By: Michelle Monet
Tags: Mindfulness, Writing Life, Poetry, Contentment, Poems On Medium

I’m happiest here

with my favorite ceramic mug

with a big-nosed face on it

filled with hot fresh

hazelnut coffee

oh and 2 dollops of creams and

splenda.

hey,

I’m just happiest here…

Michelle Monet (Copyright 2017)
A Digital Refresh for Starship Children's Hospital
By: Elyse Wyatt
Tags: Case Study, Software Development

We worked with Starship to optimise their site for their three main user groups.

Starship Children’s Health is a dedicated paediatric healthcare service and major teaching centre, providing family-centred care to children and young people throughout New Zealand and the South Pacific.

Starship’s website addresses the needs of three distinct user groups: clinicians needing treatment guidelines, patients needing more information, and support — people who want to contribute to the Starship Foundation.

While the website was well-trafficked, Starship was interested in improving the user experience in a number of areas to better serve each customer segment.

Our Approach

Our teams worked together in an agile fashion to relaunch the site on a new content management system (Contentful) with much improved IA, search and navigation, while focusing on the user experience and optimising the donation page journey.

Within three months of launch, monthly contributions doubled, and there was an increase in opt-ins from 1.67% to 64%. We’ve continued to provide support on an ongoing, ad hoc basis.
How to Calculate Forward Rate with Python
By: Yingying Fu
Tags: Pandas, Apache Spark, Finance, Big Data, Python

PYTHON FOR FINANCE

How to Calculate Forward Rate with Python

Using Pandas, Koalas, PySpark

Why do I care?

I’ve always been very interested in financial valuations. In daily work I frequently encounter problems that are easy yet very difficult. Difficult as the tools I was familiar with (such as Excel) can not solve them without having to include lots of formulas in the cells. It quickly became messy and hard to maintain when the data volume is large.

A few of these problems include:

Forward rate : Calculate the interest rate between two periods for different date and currency groups

: Calculate the interest rate between two periods for different date and currency groups Discounting : Discounting future cash-flows with corresponding yield curves

: Discounting future cash-flows with corresponding yield curves Amortization : Applying straight-line or effective interest rate to amortize certain assets

: Applying straight-line or effective interest rate to amortize certain assets Distribution: Distribute future cash-flows with previous observed patterns

And so on…

Until Python came into my world. It has brought the most amazing discoveries for me and my colleagues.

Forward rate calculation is one of the examples, and I want to start with this today. I invite you to explore with me this fascinating world of finance. Follow me on Twitter for upcoming articles.
Beyond the Block is Accepting Submissions
By: Beyond The Block Editor
Tags: Creative Writing, Poetry, Prison, Essay

Beyond the Block is now accepting submissions for its online publication. We accept essays, poems, short stories, and other short-form creative writing. We only accept writing from currently incarcerated or imprisoned people, though subject matter is not restricted to incarceration or imprisonment.

Please send submissions to:

writebeyondtheblock@gmail.com

or

PO BOX 16662

Philadelphia, PA 19139*

*We are unable to return submissions to sender, so please do not mail us your only copy. At this time we do not have the capacity to respond to all submissions.

Submission parameters:

Poetry: up to 5 poems

All other forms: up to 10 pages

Please include in your submission the name you wish to be posted with your writing. Some acceptable examples include:

Alex

Alex from Phoenix, Arizona

A. Jones

Alex Jones

Anonymous

Carceral facilities will not be identified on the site, but you are able to include something general like “A. Jones is serving a life sentence in a maximum security facility in Arizona,” if you wish.

Beyond the Block at this time does not receive any funding and cannot compensate writers. Regarding Intellectual and distribution rights, Beyond the Block retains First North American Serial Rights while all other rights revert to the author. Submissions are open year-round.
Candy Smiles
By: Christopher Kokoski
Tags: Life Lessons, Poetry On Medium, Poetry, Life, Poem

We curate and disseminate outstanding articles from diverse domains and disciplines to create fusion and synergy.

Follow
Bagel Bot: Reimaging Donut
Tags: Streamlit, Team Building, Slack, API, Slackbot

Photo by Ryan DaRin on Unsplash

Co-Authored with Sam Lee

Slack is an amazing tool for team collaboration. One of its major strengths is the number of integrations and apps it offers that allow you to connect the messaging service with other tools you use in your daily workflow. And the Slack API makes it very easy to create your own app too! Within Xandr, we have used the Slack API to build our custom version of the Slack app called Donut. If you are interested in learning how you can create your own Slack app, read on!

At Xandr, we have a strong Data Science team and we thoroughly embrace the company’s Teach and Learn policy. Last year, our team started an initiative called SHIELD (Strategic Home for Innovation, Excellence, and Learning in Data Science). The goal is to foster an industry-leading, world-class Data Science organization by promoting research, growth, cultural excellence, mentorship, and personal development. The Shield program is spearheaded by a rotating team of volunteers, these are called the Agents of Shield. 😀

Xandr was formed following AT&T’s acquisition of AppNexus. As a result, our team, like many others in the organization, has members from both legacy AppNexus and AdCo (AT&T). We also have a lot of new hires. Slack’s Donut app provides a way for team members to have one-on-one conversations outside of work and to get to know each other better. As part of the Shield charter to spur collaboration, we were eager to use it. However, our Donut subscription was very limited. We already had a number of teams using the app and our subscription didn’t allow additional teams to use it.



We had used the Slack API before on other projects so we knew we could build an app similar to Donut. While we were pondering this idea, we found ourselves in a global pandemic and suddenly everyone became a remote worker. The need for an app like Donut became even more important to help keep the team cohesive and energized and to foster new connections.

So, we started building our own Donut-like app.



So, we started building our own Donut-like app.

Considering that Xandr’s Headquarters are based in New York where Bagels rule over Donuts and that we have a long-standing office tradition of serving bagels every Wednesday morning, we named the app Bagel Bot. We were able to create the first version of Bagel Bot very quickly and run it manually from a Jupyter notebook. Having written it ourselves, we could tune the pairing algorithm as well as add custom features. It was well-received and, for many folks in the Data Science team, it was the first time they had used an app like this.



Our next step was to build a web interface for our app that would allow us to extend it for use by other teams. We did this using a Python package called Streamlit. Bagel Bot became the first Streamlit app running on our internal Kubernetes cluster.
While we were watching
By: Florence Wanjiku
Tags: Poetry On Medium, Depression, Poetry, Sadness And Loss, Poem

While we were watching

A poem

Photo by DESIGNECOLOGIST on Unsplash

We watched her sleeping

too late to call the time of death.

We watched as the machines

breathed for her

thinking about the many ways

we could have held her hand

we could have reached out

before the drugs and a noose

became her only solace.

So we made a scene

Brought church into the room

wailing God awake

watching and waiting

for the miracle before

we blamed him for the things

we saw coming.

We watched her breath

fall and wither

and we thought ourselves over-wise

to know the face of depression

before it is called suicide.

We wailed her life awake

Her sorrow filled our bodies

as if we understood for the first time

what it feels like to live in agony

to watch as everyone watched you die.

to later share in the communion of your life

the eulogies and cries sent up

as self-centered regrets.

who is to blame?

We watched as strangled flowers grew in her place.

Her children are many.
Comeback of the Marquee
By: Adrian Ramin
Tags: JavaScript, Software Development, CSS, Web Development, Spring

Implementation

First you should get a clear understanding of the logic behind our implementation. Let’s say we have one breaking news item consisting of a headline that is linked to the corresponding article. The item itself is e.g.150 pixels wide and the container has a width of 400 pixels. After the initial rendering we would have the following scenario:

As you can see there is a lot of empty space left, right next to the item. That’s why we have to create a few copies, which enables us to fill the gap and to loop the items endlessly.

Next up, we need to create the actual marquee animation that moves every element smoothly to the left. An often used performance trick for running animations as smoothly as possible is taking advantage of the GPU. In CSS3 there are a few properties that forces the browser to swap to GPU mode. Because of the fact that we only have to move some elements along the x-axis we make use of the translateX-property. By using the infinite keyword the animation can be repeated endlessly.

Suppose the animation duration is set to five seconds then all elements would be rendered like this after one round:

That’s it! Now we only have to repeat the previously described animation and every marquee item starts from position zero again.

Due to the fact that our content is based on the current news which is changing frequently the translateX-value for the animation can’t be hard coded, as we only know it on runtime. Fortunately, there is a way to use variables within the style sheet to store the width of our content. CSS Custom Properties to the rescue:
5 Amazing Things Pure CSS Can Do
By: Mehdi Aoussiad
Tags: JavaScript, Front End Development, CSS, Web Development, Coding

5 Amazing Things Pure CSS Can Do

Awesome things that you can create with pure CSS

Photo by Kelly Sikkema on Unsplash

Introduction

CSS is a great stylesheet language, it allows you to create great-looking web pages by describing how the HTML elements should be displayed. CSS saves a lot of work. It can control the layout of multiple web pages all at once. Due to the new features, CSS becomes a very powerful language because it can do many things on the web without the need for JavaScript.

In this article, we will show you some amazing things that you can create with pure CSS. Let’s get right into it.

1. Custom checkboxes

CSS allows you to create good-looking custom checkboxes with a few lines of code. The pseudo-element :checked helps you to achieve that.

Have a look at the example below:

Custom checkboxes.

2. One-page navigation

You can create one-page navigation with pure CSS. The selector :target , allows you to do that. This selector can be used to style the currently active target element.

Here is an example:

One-page navigation.

3. Animated gradient background

That’s one of the amazing things that you can do with pure CSS. It combines the function linear-gradient with the power of CSS animations.

Here is an example:

Animated gradient background.

4. The first letter

One of my favorite things in books and magazines is drop-caps. We can create good-looking drop-caps with the first-letter pseudo-element.

Here is an example:

The first letter.

5. Smooth Scroll

You can also achieve some smooth scrolling effects with pure CSS. The property scroll-behavior: smooth; allows you to do that.

Have a look at the example below:

Smooth Scroll.

As you can see, by clicking on the animals, we can scroll smoothly between sections.

Conclusion

These are just a few awesome things that CSS can do. Of course, there are a lot more things that you can achieve. You just need some creativity and passion because possibilities are endless.

Thank you for reading this article, I hope you found it useful.

More Reading
Happy Birthday My Babydoll
By: Geetika Sethi
Tags: Relationships, Daughters, Memories, Family, Love

POETRY| BIRTHDAY | HAPPINESs

Happy Birthday My Babydoll

Your mom loves you mostest

Credits – Image by Author.

Twenty Five years ago

You came into this world,

My pretty little baby,

Adorable precious doll.

We clicked the moment we met,

Just like my first sight of you

when I held you in my arms.

You reflected love right from the start,

Thus each year by year you have captured my heart,

With you from the Start entertainment is just beginning,

As we know in our life you add all the grinning.

The way you hold our hearts in your palm…is the best thing ever,

And when there is the time you believe in something, you take a firm stand,

As you know you want to do it first hand,

Because You are a stunner whose beauty’s been evident from the start…

But do you know my baby doll what I’m most proud of?

It’s your nature and what’s in your heart.

As your mom, I can try to count all the things you have done,

counting from start to finish – one after the other,

but it’s not just your talents my babydoll,

It’s all about the way that you shine,

even though I’m constantly boasting; the fact that you’re all mine…

You are our heart and the faith that we share,

it’s the way that your jokes make one cry with laughs, and so does all your care,

It’s your kindness and love that you have towards others,

That makes me so proud that I am your mother!

And so as I sit through all these memories today,

trying to wish you Happy Birthday in “my” own little way

I marvel at it all…as I know in the end,

Twenty-five years ago, I gave birth to my very own Best Friend!
Getting Started Experience for Virtual Reality headset – Oculus Go
By: Ankita Khante
Tags: Gaming, Virtual Reality, UX, VR, Augmented Reality

An attempt to design an onboarding experience for Oculus Go for school students.

Nothing will compel a visitor to do something more than the inner desires of the visitor, and if we can speak more to those desires, the better we’ll understand how to craft experiences. To understand not just the ‘whats’, but the ‘hows’ and the ‘whys’. And this is where it really starts to get interesting. — ‘In the Blink of a Mind — Attention’ by Jessica Billhart

Project Overview

This is an Academic Project for the course DD534 — Human Computer Interactions in Virtual Reality at Department of Design, IIT Guwahati.

Photo by Marc Mueller on Unsplash

Assignment Brief

To design a Getting Started Experience for Oculus Go for the students visiting the VR Zone of Guwahati Planetarium, Assam, India.
Niçin Savaşıyoruz?
By: Hüseyin Güzel
Tags: Dan Pedersen, Hayat Gayesi, Türkçe, Savaşmak, Gerçeği Bilmek

Get this newsletter By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox

Medium sent you an email at to complete your subscription.
A guide to recruiting users for sensitive research
By: People For Research
Tags: User Research Resources, User Experience Design, User Experience Research, User Research, Ethics

A guide to recruiting users for sensitive research

If you are trying to find vulnerable participants to take part in user research or usability testing, then check our guide to find relevant tips on how to ethically engage with your users.

We want to keep in touch. Join our mailing list to receive our newsletter and/or our monthly round-up.

Click here to download the guide as a PDF.
Not Everyone Will Like You, But That’s Okay
By: Matt Lillywhite
Tags: Depression, Psychology, Relationships, Anxiety, Mental Health

There’s a popular quote from Dave Ramsey that goes, “We buy things we don’t need with money we don’t have to impress people we don’t like.”

It’s true. We all want to be liked. We want to be respected and admired by everyone in our community. But more often than not, our desire to be liked tends to backfire.

Here’s the thing: when you try to please everyone, you end up pleasing nobody. As a result, your personality becomes incredibly dull, as you don’t want to say or do anything that causes conflict. In other words, you quickly lose any sense of authenticity.

This is my story. It’s how I lost my confidence a few years ago. My entire self-worth was wrapped up in the opinions of other people. If they didn’t like me, I felt worthless. That type of negative thinking is a recipe for an extremely miserable existence. Like Marcus Aurelius once wrote:

“It never ceases to amaze me: we all love ourselves more than other people, but care more about their opinion than our own.”

Upon reading that quote for the first time, I realized the only person’s opinion of myself that matters is my own. So I stopped caring about what others thought of me and immediately began living a life that would bring me a sense of fulfillment.

My friend, it’s important to remember that some people will inevitably dislike you. However, that’s okay. Because when you create a life and mindset that makes you feel proud of who you are, nothing else matters.

Here’s how to start.
“classnames” the ngClass of React
By: Abhimanyu Chauhan
Tags: JavaScript, Front End Development, CSS, Reactjs, React

There’s nothing better than a good conditional rendering of classes on an element to make it shine.

But as one of the many things not present in React, conditional class render is also one of them. I mean there are workarounds to how you can implement the classes to be implemented for e.g.:

Lets use the array approach to add/remove classes on condition change in the below component

class App extends Component {

state = {flag: false}; onClickHandler = () => {this.setState({flag: !this.state.flag});}; render() {

const classes = ["btn", this.state.flag ? "btn-green" : "btn-red"].join(" "); return (

<div className="align-center ">

<button className={classes} onClick={this.onClickHandler}>

Click me!

</button>

</div>

);}

}

Conditional Button Color

One of the main problems with this approach being, as the number of elements increase that need classes based on condition, it makes it harder to maintain code.

One of the most preferred approaches to handle this is, just add a dependency library called classnames.
Let’s use AI! — but what does it mean?
By: Uc Blogger
Tags: Artificial Intelligence, Data, Machine Learning, Data Science

Let’s use AI! — but what does it mean?

By – Raghav Chandra (co-founder UrbanClap)

Interesting Fact: PACMAN – a very popular arcade game. This game is used in computer science courses to teach Machine Learning concepts where students build a Bot to play. Infact, students compete against each other’s bots. In the above picture, you can see a representation of two agents and the reward heat-map.

Hypothetically, let’s build a startup – rent a bed for a night – for travellers – we have created an app to help consumers book their beds – business model is simple – pay per night for a bed. We have homes across the city with beds. Let’s use AI! Thats what we keep hearing, but what does it mean?

In this short blog, I’ll introduce the basics on Artificial Intelligence (AI) and Machine Learning (ML). We will try to understand buzz words like – #AI , #ML , #DeepLearning – and sneak peak into what they actually do.

You will not become a data expert by reading this. But hopefully, it will help de-mystify the world of data, make it more real, and give you a more realistic grasp on how these could help.

Day 0. We launch our startup with a fixed pricing model. Payment is online-pre-paid or cash-after-stay.

What is ARTIFICIAL INTELLIGENCE?

Simply put, machines exhibiting human intelligence.

If a machine / software is making decisions that a human would have made, that’s AI. Now, you can further divide this into two parts based on who is doing the “learning” / “insight finding”.

Learning by Human, Decision by Machine

This is when you give the machine explicit rules to do some work.

Humans rely on their intuition and knowledge to model simplistic functions for decision making. These could be in the form of if / then / else. These could also be complex mathematical functions like Y = AX₁ + BX₂.

#RuleBased

Day 1. Demand on weekends is more. We want to increase the weekend prices.

We run a few A/B tests on pricing (if/else) and choose the one with the best results.

Learning by Machine, Decision by Machine

This is MACHINE LEARNING. Its a field within AI wherein the machine is able to process data and self-improve its ability to make decisions – its able to learn.

Since machine has no prior context, it requires a lot of data as knowledge (historic, or real time) and feedback (rewards, or targets) to train and learn on.

#MachineLearning

While this allows for machines to self-learn, it comes with some obvious tradeoffs.

Machine learning requires “enough” data to make a smart decision. Too many variables, too little data, or biased data (lack of diversity) might lead to untrained and biased models.

untrained and biased models. Some ML techniques are complex structures that are black-boxes for humans (eg – Deep Learning techniques). It’s very hard to interpret the system.
Is Spring Soon?
By: Cassius Corbin
Tags: Poetry, Nature, Self, Poem, Seasons

I water the pit

In my stomach

Daily

Waiting for it

To branch its

Trunk, a slow

Growth as it

Sprouts out

My throat

And coats

My skin

In heavy

Tree bark

Are we

Not all

Birthed

Of dirt?

I find

My growth

In heavy sod

Fertilized

To branch

Out my stems

And wait for

My flowers

To bloom

Is spring

Soon?

My garden

Is waiting
İstanbul’da “Yaşamak’’
By: Fırat Akkuş
Tags: Istanbul, Yorum, Fikir, Türkçe, Şehir Hayatı

Get this newsletter By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox

Medium sent you an email at to complete your subscription.
I’m So Glad She Wasn’t Told To ‘Calm Down’
By: Michelle Monet
Tags: Creativity, Short Story, Dance, Art, Mental Health

One doctor said to my mother, “We think she has a learning disorder. She might need to be put on medication.” ADHD hadn’t been invented yet or they might’ve lumped her in that category which is what many doctors do nowadays.

She sat in the doctors' office while her mother talked to the doctor about what they could do with her.

They also talked about all the problems she was having at school. She was disturbing the other kids, her homework was always late and she was not good at paying attention to the teachers.

After a long discussion about her behavioral issues, the doctor said, “Wait here. Gillian. I need to speak with your mother privately. We won’t be long.”

Her mother and doctor got up to leave the room but before they left, the doctor turned on the radio.

The minute they left the room Gillian was on her feet. She began dancing wildly and happily.
What a Child’s Desire can do to an Adult
By: Juliano Righetto
Tags: Custom Airplane Models, Desire, Childhood, Psychology, Aviation

What a Child’s Desire can do to an Adult

Always be very, very careful with letters sent by unknown children. You could be changing someone’s life forever!

I have always been a child fascinated by airplanes. My mother always says that when she needed to cut my nails, she would take me to the apartment window and wait. When a plane appeared in the sky, I would be watching, distracted… And she could do whatever she wanted with my nails.

As she realized that I loved those big objects flying through the skies, going to Congonhas Airport, here in São Paulo, became one of my favorite programs. Not only did she take me, but she also brought all the other children in the building with us.

I REALLY loved planes. I loved it so much that I ended up infecting other friends, who otherwise didn’t care. And so, we started to play “plane,” using plastic models from Revell that we assembled ourselves.

The problem is that we were children; we were six, seven years old. So our models didn’t usually look very good. To make matters worse, the decals detachable in the water ended up loosening on our sweaty fingers.

Our little planes did not usually survive many games.

At this time, the father of a friend, who owned a record company and flew frequently, won a gift from the largest airline in São Paulo at the time, VASP. It was a model made of solid resin — not made of pieces glued by children of six years — painted and with a varnish layer that prevented the painting from deteriorating with “use.”

Needless to say, this friend of mine became a superstar overnight, thanks to his little plane, isn’t it?

It was an IDENTICAL model to this one, but with VASP’s paint job:
5 reasons why CyberMiles (CMT) is better than Ethereum, will change e-commerce
By: Mark Brinkerhoff
Tags: Cmt, Ethereum, Ecommerce, Bitcoin, Blockchain

From the folks at CryptoRecorder:

CyberMiles is a blockchain that is focused on the e-commerce market. The idea is to open up the online marketplace by allowing ordinary people to create and execute smart contracts. The question then arises, what makes it any different from Bitcoin or Ethereum? Well, CyberMiles happens to be more efficient than these two on multiple aspects. Just to give you perspective on how good CyberMiles is, here are five reasons why it dwarfs Ethereum, and has better chances of growth.

1. It is cheaper

While Ethereum can be used in e-commerce, it gets more expensive as the network grows. This makes it inconvenient for use in large-scale ecommerce applications. On this front, CyberMiles is way ahead of the curve. It is designed to keep transaction costs low irrespective of the size of the network. This is part of what will drive its adoption in the multibillion dollar e-commerce industry and push up its long-term value.

2. It supports multiple languages

For someone to develop a smart contract in Ethereum, they have to first learn solidity programming language. That’s quite limiting because it takes time to learn a new programming language and, more so, create a smart contract. Again CyberMiles dwarfs Ethereum on this front given that it allows developers to create smart contracts in multiple programming languages. For instance, a developer can create a smart contract in Java, Java Script and Python. This places CyberMiles way ahead of the curve, when it comes to adoption in the e-commerce space.

3. It has higher TPS than Ethereum

One of the most limiting aspects of Ethereum is that it is quite slow. This makes it inconvenient for launching large-scale decentralized applications, such as those created for e-commerce purposes. On this front, CyberMiles is way ahead given that it is over 100 times faster than Ethereum. This makes it the perfect blockchain for adoption in ecommerce, when compared to Ethereum. That’s a major plus to its long-term value.

4. It has a proactive anti-bug mechanism

One of the greatest issues with Ethereum is that it is prone to bugs. This has happened to the network in the past, making it quite ineffective for large-scale applications. CyberMiles solves this problem because it has an inbuilt anti-bug mechanism. In essence, any funds on the CyberMiles blockchain can never be lost. And in the case that they get lost, there is a consensus mechanism for recovering them.

5. Users can use CyberMiles to release their own tokens

One of the best things about CyberMiles is that it enables users to execute smart contracts using the CyberMiles token (CMT)…

Read more at cryptorecorder.com/2018/04/28/cybermiles-cmt-5-reasons-why-its-way-better-than-ethereum-and-will-change-e-commerce
You Should Be Watching TV
By: Zach J. Payne
Tags: Creativity, Television, Productivity, Art, Writing

#1 — They are a cheap and easy way to see the world.

Seriously. We can’t all go to Boca. Or anywhere else that isn’t home or work, usually.

Coming to this realization was the first time I really accepted the true horror of adulthood. I was working 80-hour weeks and I could barely afford to drive to work, let alone anywhere else. There would be no road trips, vacations, or Instagram-worth travels in my future.

So we have the screen.

But even if so many movies are shot on sound-stages and back-lots around the world, at least some of the exterior shots give us a view of the rest of the world.

Sometimes, it’s The Lord of the Rings giving us huge panoramic shots of New Zealand or Game of Thrones giving us huge shots of Iceland.

But, for my money, the best emotional use of this was in the last shot of the series finale of ER, where, for the first and only time during the show’s 15 year run, they pull out of the shot of the ambulance bay, and show us the entire exterior of the hospital.

Very little in the hospital is the same — in that scene, there are only two characters out of a whole hoard of doctors who were introduced in the pilot (one of them having grown up during the course of the show) — but that ugly concrete building has remained the same.

But, anyway, as someone who writes stories that take place in places that I have never visited (my current WIP is set in a fictional overlay of Fort Collins, Colorado), watching TV shows and movies that are both set and shot is really helpful.

You can read about a place all you want, but actually being able to see it with your own eyes — that’s the next-best thing to being there in the flesh. And TV and movies give you that opportunity where books don’t.
Sketch 62: Smart Layout Min-width/height update
By: Christopher Deane
Tags: Smart Layout, Sketch, Tutorial, Design, Design Systems

Let’s take a look at the latest updates for this powerful feature.

Smart Layout has been updated with a min-width/height option. Let’s see what we can do with it with examples for buttons, toasts (notifications), cards, chat, tabs and forms.

View the tutorial

Watch all the videos in this Sketch Series

Grab my free Design System

In this video, we use a file that uses my free Design System Dezin, you can grab it here:

For updates:

Follow me here at Medium, Twitter and YouTube.
The Outstanding Power of Oversimplified Advice
By: Todd Brison
Tags: Creativity, Motivation, Entrepreneurship, Inspiration, Writing

The Outstanding Power of Oversimplified Advice

What to do when you learn the truth… but not the whole truth

Photo by Zachary Keimig on Unsplash

New York Times Bestselling author Jon Acuff recently revealed the exact dollar amount on his latest royalty check.

It was the thumbnail that baited me into actually watching the whole video. Dangling dollars in front of an audience works. “No way will he show us how much money is on that check,” I thought.

After a while, he did fulfill his promise and showed us the check.

I hope you are sitting down for this.

It was $77.41.

No, you aren’t doing your math wrong. That is exactly one pittance.

Jon went on to explain why he would bother writing in the first place for that small a reward. He used it as a prop to answer a question he is asked often — “can you really make a living as a writer?” Jon said that despite his tiny royalties he could make a living as an author.

“Can you make a living as a author or a painter or a photographer or a cobbler or a chef?” he said. “You can. It comes down to two simple steps.”

The simple steps are as follows:

Find something you love so much you’d do it for free.

Get so good at it that people pay you lots of money for it.

10 years ago, I would have swallowed this advice wholesale. Yesterday, at 30, a voice piped up in the back of my head:

“It isn’t that simple.”

I put on my Pointless Detective Hat, the one I always wear when I go on Internet hunts, and quickly discovered that even though Jon is an incredible writer and a wonderful voice in the publishing world, his writing alone isn’t paying the bills. His speaking is.

Jon’s minimum fee is listed at $25,000 online. He’s more a speaker than a writer. So he didn’t really “get so good at writing” that he suddenly raked in more royalties than the entire writer world. He started speaking.

Does that mean his two-step advice to career success is wrong?
Autumnal Tenderness
By: Leah Dedmon
Tags: Poetry, Nature, Relationships, Change, Love

Autumnal Tenderness

A Season For Change

The sun slowly fades away,

emitting a rosy glow upon your face,

just the same within my cheeks,

from the warmth of your embrace.

The fragrance of spring’s sweet apples,

lingers gently upon our skin,

while golden blossoms of our love,

bloom so deeply within.

The field’s grass rustles around us,

sunny daisies just tickling us so.

They dance so freely in the wind,

caressing us with every blow.

The night descends a blanket of stars,

twinkling brightly in your eyes.

A spark of desire burns within,

between our hearts and upon our sighs.
Factors Affect the Survival Prediction in the Titanic Disaster
By: Umar Farooq
Tags: Machine Learning, Kaggle, Data Science, Survival Prediction, Titanic Disaster

Introduction

In this blog-post, I will go through the process of finding those factors that affect the survival rate prediction in the titanic disaster. I’ve to use the famous titanic dataset that available on Kaggle.

The main goal is to find the survival rate prediction of passengers. which type of passengers survived in this disaster according to the given data.

Which features contribute to a higher survival rate?

By reviewing the data, I find out every feature have their own importance and have a great impact on the model accuracy except “passenger ID, Name and Ticket” column.

There are a total of 891 training set examples, with 11 features + target variable(survived). I’ve seen there are multiple missing values in different features.

There are 77% of data is missing in-cabin feature and 19% of data in the age feature and 0.2% of data is missing in Embarked features.

By performing data wrangling, drop the cabin and age column because it has multiple missing values that affect the model performance.

What is the probability rate between Gender and Age columns?

You have seen that “Male(men)” have a higher probability of survival between the age of 18–33 years and the female have a higher probability of survival between 14–40 years.

What is the correlation between Embarked and Gender?

The embarked feature seems to be correlated with survival, depending on gender.

You see that men on port C have a higher chance of survival and lower in port S and port Q. The women have a higher probability of surviving in port Q and S and inverse if they are in port C.

What is the correlation of Pclass with survival?

Pclass seems to be correlated with survival. I’ll visualize the insights of data to better understanding.

We clearly see that “Class 1" has a higher probability of survival as compared to the other two classes. To better understanding, I’ll show you another Pclass plot.

Our assumption about class 1 is true, but we see that the lower chance of survival in Pclass 3.

To visualize the insights of data find out these features that have a great impact on the survival rate in the titanic disaster.

Conclusion

In this article, we have to look at which features have to contribute to the survival rate?

We have to see multiple visualizations to see the correlation between different features with survival probabilities. We also have seen that there are multiple missing values in different features.

We have seen that Sex, Pclass, and Embarked features have increased the model performance and I’m further investigating the other features and share the repository link with improved model performance.
Artificial Learning, Intelligent Machines
By: Nicholas Teague
Tags: Machine Learning, Data Science

v2.23

Well let’s see, a few things here. For one we introduced a new ordinal processing method for categorical sets (encoding into a single column of integer identifiers as opposed to one-hot encoding, such as might be beneficial for categorical sets with large number of values). Oh yeah hat tip for helping me recognize the need for this method to the Kaggle “Intermediate Machine Learning” Micro-Course by Alexis Cook. Along with the ordinal processing we also introduced option to exclude ordinal sets from PCA transforms. We included some stuff here to fix labels engineering on validation sets and also I think an improvement to the oversampling preparation operation. But really I think the most important update here was the introduction of a ‘printstatus’ argument, kind of equivalent to a “verbose” method as you may see in other libraries, allowing a user to track status of processing through operation. The specific printouts were further refined in a few more updates to come, but this is where it started.