fabiochiu/medium-articles huggingface dataset:
4 Simple Tips to Freelance Copywriting Success
By: Zee Praise
Tags: Copywriter, Tips, Advice, Copywriting, Writing

4 Simple Tips to Freelance Copywriting Success

It doesn’t have to take years.

Photo by Ashwin Vaswani on Unsplash

Copywriting isn’t very glamorous, is it? Especially when you’re comparing it to fiction or poetry. I remember an aunt once asked me what I did for a living and I told her how I helped new businesses make their first few sales and inspire brand royalty through copywriting.

Of course, most of that just sounded like gibberish to her so, she asked to read something I had written. At the time, I was working on web copy for a French fashion brand that was launching in Australia.

They were one of my biggest clients at the time and I was really proud of the work I was doing with them.

My aunt looked at the site and went, “that’s it? People pay you for that?”

Umm, rude. But to those who don’t know any better — that’s exactly what copy looks like. In fact, her reaction was a compliment.

As a copywriter, our jobs entail making things simple. Having people glance at the words we’ve written and be prompted into action. That is the power of copywriting.

Usually, the simpler the finished product looks — the better the copy. Those carefully chosen words, after weeks and sometimes months of research, lead to thousands of dollars in return for clients.

The right words at the right time, have power.

I’ve met many business owners who have made the mistake of thinking like my aunt. They think it’s simple. They could do it themselves. Why hire a copywriter?

These same business owners have emailed me after one too many failed digital ad campaigns. Wondering what went wrong. It’s just not your area of expertise. Just like I can’t do your job — you can’t do mine regardless of how simple it looks.

If you get good enough at copywriting, eventually clients look for you. Because you have a proven track record of delivering results. But how does one get into the copywriting game?

More importantly — how does one play the game to win? Copywriting isn’t easy but, it’s no rocket science.

Below you’ll find a simple checklist for good copywriting.
Writer’s Block? Stop Writing and Do This Instead.
By: Grace Claman
Tags: Inspiration, Writing Tips, Writing Life, Writers Block, Writing

Photo by Jernej Graj on Unsplash

Writer’s Block? Stop Writing and Do This Instead.

Don’t just stare at a blank page.

Many people think that when they experience writer’s block, the cure is to sit down in front of a blank page and not move until they’ve written something.

This is an excellent way to write something really bad.

Sure, “you can edit bad but you can’t edit blank.” At least having something is better than nothing.

But what if you could skip all that torture and get to the part where the writing flows again?

There is only one way to truly cure writer’s block, and that’s to get inspired.

But inspiration is a tough cookie. It’s elusive, transitory, and never seems to show up for work at the same time we do.

So how do we induce inspiration? How do we make ourselves open to new ideas? How do we create that spark?

Well, we’re not going to do it by staring at a blank page and a blinking cursor.

Often, when I start to feel that familiar sensation of not knowing what to write next, I begin to panic. But I recently realized that writer’s block is just a signal my brain uses to let me know that it’s run out of juice.

Instead of panicking, I realized that writer’s block is a reminder. A reminder that we need to feed our brains with more research. More prep work.

We can feed our writing brain by giving it lots of great material to think about. It’s very difficult to go into the kitchen and start cooking without a recipe or any ingredients. Similarly, it’s very difficult to sit down without having done any prep work and pump out 5,000 words.

For writers, we have prep work that involves outlining and developing ideas. But we also have to do prep work in order to have great ideas in the first place. This kind of prep work is done through immersion.

What does this “idea” prep work look like? What is immersion for a writer?
7 навыков крутого оратора. Как выступать лучше
By: Стас Гуревский
Tags: Presentation, Public Speaking, Storytelling

in In Fitness And In Health
Welcome to the Patient Experience Studio at Cedar
By: Yohann Smadja
Tags: Data Science, Patient Engagement, Design, Healthcare, Patient Experience

At Cedar, we’re improving the patient financial and administrative experience, guiding each patient from pre-visit check in to post-visit billing with ease. On the Cedar Design and Data Science teams, we believe that building a powerful product requires a deep understanding of the “What” and the “Why” of the patient experience. The “What” is the output of our analytics, custom analyses and explanatory models. Through these methods, we seek to identify the key factors driving patient behavior. The “Why” focuses on identifying the relevant emotions and subconscious behavior by listening and understanding what patients have to say about their own experiences. Linking the two allows us to build hypotheses to improve our product, design thoughtful features and deliver experiences that we continuously improve through experimentation.

We foster a constant flow of insights and ideas between Data Science and Design to identify and fill our collective blindspots and contribute to each other’s work. To achieve this, we collaborate daily, sometimes even hosting team events together (like that time we toured NYC to learn about the art of graffiti and completed “masterpieces” that are on display at our NYC office). We also regularly present our work across teams to get feedback and learn about our patients from all different angles. We even coined a phrase to express this collaborative back-and-forth: “data art and design science.” This blog showcases some of our most interesting Design and Data Science methods and insights. Join us on our journey to build a better patient experience together.

Happy reading!

Amy Stillman, VP, Design at Cedar

Yohann Smadja, VP, Data Science at Cedar
Beautiful Reasons
By: Giorgia Lupi
Tags: Design, Data Visualization, Data

NEW LANGUAGES FOR DATA VISUALIZATIONS: STARTING A DIALOGUE

To be a designer you have to find new languages, new ways of entertaining people; and working with data you also have to make visuals that can become magnetic to people that are not familiar with data practices.

We believe that, sometimes, the act of loading an analytical representation with emotional investment produces attention rather than distraction, creates worlds that are evocative and nameless at the same time, able to inspire sensations, as long as we always respect the values in the data and we don’t manipulate the information.

To this regard, we can define successful designs as the ones able to balance convention (i.e. familiar forms our minds are already familiar with) and novelty: new features that can engage and delight people in the hope they will stick around our visualizations a bit longer, and in the hope we can help the conversations in our fields moving forward.

We believe that there isn’t a unique truth in data-visualization, and that there are more than one instead, more or less appropriate and effective depending on the scopes and the goals, on the data and on the readers, on the situations and contexts.

Dense and non-conventional data visualizations produce a type of behaviour that promotes slowness in this era of short attention span: if we can create visuals that are demanding the right slowness and the right level of engagement, people would slow them down to meet it.

This article is obviously not providing answers; I hope it can rather start a dialogue among practitioners and enthusiasts: how can we keep on exploring, guessing, imagining, hunching, trying combinations and trying to inspire feelings, as visual communicators who use images and symbols rather than words and numbers?

How can we be faithful to scientific accuracy while allowing space for exceptions to flourish, with the aim of bringing a range of new possibilities to the table?
A Mask Allows Me a Small Wins #11
By: Brenda Mahler
Tags: Faces Of Covid, Reflections, Poetry, Coronavirus, Covid 19

A Mask Allows Me a Small Wins #11

A poem that places a face on Coronavirus

Life is intimacy

The little happy moments

Time with friends

Love of family

Joy of pets

Humans were placed in the universe

Left to our own devices

Provided choices

I choose to wear a mask

It is my action to

Politicize caring for others

Campaign to stop the spread

Lobby for safety

When governments don’t care

People must

My world has been infected

By bedbugs

They crawled in unnoticed

Silently, took up residency

Between my blankets of security

Interrupted my dreams

Infected my nightmares

And people I love

Why do I wear a mask?

Masks allow me

Small wins and

Hope for tomorrow

Sara, 24-year old female
Explaining AlexNet Convolutional Neural Network
By: Rishi Sidhu
Tags: Machine Learning, Data Science, Technology, Neural Networks, Artificial Intelligence

Overfitting Prevention

Having tackled normalization and pooling AlexNet was faced with a huge overfitting challenge. Their 60-million parameter model was bound to overfit. They needed to come up with an overfitting prevention strategy that could work at this scale.

Whenever a system has huge number of parameters, it becomes prone to overfitting.

Overfitting — Given a question that you’ve already seen you can answer perfectly but you’ll perform poorly on unseen questions.

They employed two methods to battle overfitting

Data Augmentation

Dropout

Data Augmentation

Data augmentation is increasing the size of your dataset by creating transforms of each image in your dataset. These transforms can be simple scaling of size or reflection or rotation.

See how no. 6 is rotated in various directions Source

These schemes led to an error reduction of 1% in their top-1 error metric. By augmenting the data you not only increase the dataset but the model tries to become rotation invariant, color invariant etc. and prevents overfitting

Dropout

The second technique that AlexNet used to avoid overfitting was dropout. It consists of setting to zero the output of each hidden neuron with probability 0.5. The neurons which are “dropped out” in this way do not contribute to the forward pass and do not participate in back- propagation. So every time an input is presented, the neural network samples a different architecture.

This new-architecture-everytime is akin to using multiple architectures without expending additional resources. The model, therefore, forced to learn more robust features.
Custom Tab Navigator Using React Navigation & SVG
By: Matan Kastel
Tags: React Native, Tab Navigator, D3js, React, SVG

The <TabsUI/>

In order to achieve the required result .We will have few components, all working together.

We start by defining the shape using d3-shape. We will create a line by using a line generator. We’ll divide our shape to 3 parts: left, center and right. We’ll start off with the easy parts, left and right. We know the tabWidth is based on the screen width, divided by the number of tabs we want to place. Since we are using SVG coordinate system the [0,0] point of the shape is top left corner. Keep in mind that we will use a constant value to store the tab bar height.

For the left part we define a line going from [0,0] to about the center [tabWidth * 2, 0]. For the right part we start a little bit after the center tab [tabWidth * 3, 0] going to the end [width, 0] then we close the shape by going down to [width, height] and back to start [0, height] closing the shape.

For the center part we will create a V-like shape by providing the values, going a little bit continuing the x-axis while going down up to half of the height, then taking up the values on the y-axis to 0 again while going continuing the path on the x-axis.

There are many curve functions, that can help us smoothing the connection between the points. We’ll use a curve function from d3 here are some examples.

If you wish you can experiment with this nice example.

Here is the code for the <TabShape /> Component using the described above.

TabShape - Creating a background, separate UI & Functionality

<TabShape />

Now that we have a background all we have to do is overlay the icon for the navigation on top and we are done.

We’ll create a <TabsHandler> component for that.

TabsHandler — Creating handlers, separate UI & Functionality

Notice that for the middle larger icon we do not render the tab SVG with a text and use Logo component. This logo component will be drawn on center, instead of the middle tab position. It would be a separated component so we can add a opening animation if we want to, later.
Metadata and Additional Responses in FastAPI
By: Ng Wai Foong
Tags: Python, Documentation, DevOps, Programming, Fastapi

Metadata and Additional Responses in FastAPI

Customize your own API documentation for better readability

Photo by the author.

Building on top of our previous guide (Migrate From Flask to FastAPI Smoothly), we are going to explore the API documentation a little more today.

By now, you should realize that the generated interactive API documentation and ReDoc of a newly created FastAPI server are not that intuitive and lack proper examples of the input and output schema. Let’s have a look at the following examples.

Swagger UI:

Image by Author

From a quick glance, we can deduce that there are two APIs available. The first route is to create a user, while the second route is to get a new user. The information is definitely not sufficient for someone who is new to this API. Besides, the naming is based on the actual name of the function. It can get really confusing later on when more APIs are added to it.

It would be a lot more convenient and self-explanatory if the API documentation looked something like this:

Image by Author

A new developer will have an easier time reading this documentation compared to the first one.

Let’s proceed to the next section on adding metadata to the documentation.
A Publication About Sexual Assault Survivors
By: Toni Tails
Tags: Mental Health, Family, Parenting, Life Lessons, Life

A publication for sexual assault survivors to share their stories, poems, art, and narrative. Our voices need to be heard!

Follow
Mocking React hooks for testing with Jest and react-testing-library
By: Chanon Roy
Tags: React Hook, Hooks, Jest, React, React Testing Library

Obligatory hook-related stock photo (📷 by Chunlea)

Imagine this familiar scenario: a developer builds a life-changing todo application using React and has decided to leverage hooks to make the sharing of state logic much cleaner. Being a responsible developer with a passion for testing, they bring in jest and react-testing-library to start writing unit and integration tests for their components.

Upon implementing these component tests, a challenge arises:

How does one mock a hook’s value when its state exists outside the scope of a component?

To help solve this, we can leverage jest.mock()
Runner’s Life Newsletter
By: Jeff Barton
Tags: Newsletter, Mental Health, Running, Life Lessons, Fitness

Runner’s Life Newsletter

Highlights and stories from December 6-December 12, 2020

Photo by Chander R on Unsplash

Welcome to the Runner’s Life newsletter!

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

When I speak with other runners, the reasons why someone runs are varied. But frequently, there is a link between mental health and why someone started running.

For me, it was a way to help me deal with the depression and anxiety I’ve experienced for most of my adult life. Growing up in a time and within a household where showing emotions resulted in being shamed, I learned to just deal with it. But all that did was make things worse. I wore a mask every day and appeared happy, but on the inside, I was dying. Along with therapy and medication, running has changed both my mental and physical health.

Awareness of mental health issues and finding ways to reduce the stigma are important to me. For those of us who have experienced clinical depression, it is incredibly debilitating.

This week, I want to share a video from Alexi Pappas, a long-distance runner, NCAA All-American, and the Greek national record holder in the 10k. Please take a moment to watch it.

I Achieved My Wildest Dreams. Then Depression Hit.
How to save tabs in Chrome with Pin Tabs
By: Pier Roberto Lucisano
Tags: Chrome Extension, Chrome Custom Tabs, Productivity, Alumni, Google Chrome

Look at the picture.

Is that familiar to you? How many times happened to you to have many tabs opened on Google Chrome?

The fact is that most of the times we do not need tabs open but we do not close them because maybe you are just bored to delete them. It is true that you do not want to save them all in the bookmarks, because you are sure that if you are going to use them, it is going to be just for the next hours or days.

I have this problem and unfortunately I could not find anything really interesting in the Web Store in order to organise my tabs. I do not need any sort of tab manager because this means that I have to spend time in order to organise my tabs and I want to be as efficient as possible.

What I really need is a sort of auto-expiring bookmarks tool. The idea is to have something that keep track of what I saved but only for a very short period of time. I need a kind of box which after a period is emptied by an automatic timer.

For this reason, I spent some of my time to develop a chrome extension which I called Pin Tabs (actually it could have been called auto-expiring bookmarks manager, but it sounds too long and complicated 😱). It is really easy and it does everything I need: save tabs, keep tabs and delete tabs.

Now every time I want to clean the tabs of my browser, I check each of them and if I am not sure whether I am going to use them or not, I save the tabs in this box. Then if I really need them, I add the tabs into my bookmarks, otherwise I forget about it and the extension will do the dirty job of removing them.

This extension is free and you can find the link to download it here.

I am looking forward to your feedbacks 😃
The Wefunder Petition
By: Nick Plante
Tags: Crowdfunding, Equity Crowdfunding, Fundraising, Investing, Startup

Kickstarter is awesome for funding creative projects. It’s one of my favorite startups at the moment, and it’s important. I lurves it. But I wish I could use something like it to invest in actual companies — both the tech startup variety that my friends work tirelessly on as well as the hyper local variety that make those special tapas that my neighbors are raving about.

Soon, new laws may allow us to do just that.

To raise awareness of these initiatives, a few friends and I tossed together the Wefunder petition to support HR2930 and Brown’s Democratizing Access to Capital Act (S.1791) that’s currently being debated in the US Senate. Please go sign it (click the “learn more” link on the site for more background information and links).

These changes could have huge impacts for both entrepreneurs and investors, allowing bold new ideas to surface and creating a ton of important jobs and opportunities. I know that sounds like marketing speak, but it’s true. This matters.

We’ll be going to DC next week to talk to Senator Brown’s people and see what else we can do to push this forward. We’ve also been fortunate enough to get some great coverage for our efforts at BoingBoing and ReadWriteWeb.

Now go sign it already and help us send a message. And thanks!
A Children’s Fantasy Story about the World’s Greatest Truth
By: Jason Park
Tags: Children, Books, Reading, Religion And Spirituality, Christianity

A Children’s Fantasy Story about the World’s Greatest Truth

A review of April Graney’s new children’s book, *The Marvelous Maker*

When is the last time a story quite literally captivated you? It pulled you in, captured your mind, and wouldn’t let go. For me, it was the Hunger Games trilogy; before that, Ted Dekker’s Circle series. A children’s picture book shouldn’t be able to create the same feeling, but I can truly imagine that outcome for this new book from B&H Publishing and author April Graney, The Marvelous Maker: A Creation and Redemption Parable. This wonderful book is written as a fantasy story about Adamus and Genevieve (Adam and Eve) and the story takes the reader through the true stories of creation, fall, and redemption with those two as stand-ins for all of humanity. Graney explains:

While the real Adam and Eve died anticipating the promise of a savior, the characters in The Marvelous Maker live through the entire epic tale of the Bible. Adamus and Genevieve represent countless generations of believers who have been delivered from darkness and brought into the kingdom of light through Jesus Christ. Their story represents all of us, in the sense that every one of us has sinned and is living in a fallen world in need of redemption.

The result is a beautiful book, in form and content, that will engross your child in the story of the Bible. Monica Garofalo’s illustrations are beautiful, and they fit the tone of the book perfectly. The vocabulary is high enough that just the words will be a learning experience for older children, but somehow my 5-year-old followed along well enough that it prompted a great conversation.

My 5-year-old Eliana has been asking lots of questions about God recently. There was a version of “How come God doesn’t always answer my prayers?”. Then she asked, “When we breathe or walk or talk, does that come from God or does that come from our bodies?” (That was a fun conversation.) Then, after asking several questions about The Marvelous Maker, we stop three-quarters of the way through the book because she asks me to pray with her to ask God to “be her boss”. We had a long conversation about it and my wife and I decided that she probably wasn’t quite ready yet to accept Jesus as her savior and Lord of her life, but God is working in Eliana’s life.

I pray that The Marvelous Maker will create space for these conversations in your precious days with your children.

I received a review copy of The Marvelous Maker courtesy of B&H Publishing with a special thanks to Jenaye White, but my opinions are my own.
How to explain non-additive measures, Part 2: Incremental contribution
By: Anastasia V Polyakova
Tags: Fintech, Technology, Regulation, Risk Management, Big Data

How to explain non-additive measures, Part 2: Incremental contribution

Interactive decomposition with atoti

This article is the second part of a series of tutorials about interactive analytics in in atoti’s dynamic pivot tables. Check out Part 1: Pro-rata allocation. If you wish to read what non-additive measures are and why we may want to have them decomposed — please refer to the same Pro-rata allocation post.

Solution #2: Incremental contribution

In the previous post we were decomposing a non-additive measure into additive components. There’s another perspective on the contribution analysis when you don’t want to allocate the top-level number down to additive components, but you want to evaluate incremental, aka marginal impact of a contributor — computing the impact of a scenario if that contributor is hypothetically removed:

In the following example, the “VaR Incremental BookHierarchy” measure shows the impact of the sub-portfolios on the firm-level VaR “as if the portfolio was removed”. For example, for the business line “Equities” it is +15.414, meaning that this portfolio has a positive +15.414 impact on the firm-level VaR.

To test that, let’s visualize the plain version of the “VaR” measure — not the incremental one. If we filter out the “Equities” and compute the “VaR” it goes from -593,129 to -608,543 which is exactly 15.414 lower (-593k — (-609k))!

To implement this behavior in atoti, we will use exclude_self=True parameter of the siblings aggregation. The following measure will aggregate positions being “siblings” of a sub-portfolio, and will ignore positions belonging to the current sub-portfolio:

Now let’s compute VaR from the sibling’s aggregation:

To finalize the incremental calculation, we’ll compute VaR above the current book and subtract the calculation excluding current sub-portfolio:

You can find a notebook implementing this example in the atoti gallery: Value at Risk: A simple way to monitor market risk with atoti.

Conclusion

In this post, we discussed how to use parent and sibling relationships in atoti to implement contributory measures and explain non additive measures. I hope the described techniques can help you build powerful analytic applications!
Dockerizing Vue.js App With NodeJS Backend
By: Bhargav Bachina
Tags: Programming, JavaScript, Software Development, Vuejs, Web Development

Dockerizing Vue.js App With NodeJS Backend

Learn How to Dockerize and make it a deployable image

Photo by Brandable Box on Unsplash

Docker is an enterprise-ready container platform that enables organizations to seamlessly build, share, and run any application, anywhere. Almost every company is containerizing its applications for faster production workloads so that they can deploy anytime and sometimes several times a day. There are so many ways we can build a Vue.js App. One way is to dockerize the Vue.js app with nodejs backend and create a docker image so that we can deploy that image any time or sometimes several times a day.

In this post, we look at the example project and see the step by step guide on how we can dockerizing the Vue.js app with nodejs as a server.

Introduction

Example Project

Dockerizing the App

Running The App on Docker

Summary

Conclusion

Introduction

Nowadays, it’s very common to dockerize and deploy the Docker image in the production with the help of container orchestration engines such as Docker Swarn or Kubernetes. We are going to Dockerize the app and create an image and run it on Docker on our local machine. We could also push that Image into Docker hub and pull it whenever and wherever we need it.

Here is the complete guide on how to develop a Vue.js app with nodejs as a backend server. If you are not familiar with the process or you want to know before studying this guide, I would recommend you going through it.

Prerequisite

As a prerequisite, you have to install Docker for Desktop (whatever your OS is). Please follow this link to install Docker on your laptop. Once installed you can check the Docker info or version with the following commands.
Why It’s Easier to Succeed With Learning Than You Might Think Chapter 1— Any Kid Can Code
By: Laxman Singh
Tags: Python, Kids, Technology, Tech, Python Programming

'''

Importing two libraries:

1. turtle is our own friend

2. random - introducing new library which will help to

select the random values to have different color

at each square

'''

import turtle

import random



#defining shape of turtle

jumper = turtle.Pen()

jumper.shape("turtle")



# picked 5 colors, you can select more but make it sure it exists! Check documentation

# another data type list is introduced. Here color is list

color = ["red", "green", "black", "cyan", "yellow","blue","orange”] l





# loop running from 0-49 [50 times]

for j in range(50):

# hiding the turtle, if you want to see comment this line

jumper.hideturtle()

# setting the speed to 0 which is fastest and slowest is 10

jumper.speed(0)



# bringing our jumper up so that it wont create line and

# easy to change the location based on random number

# if you want to see what random is doing print the below statement:

# print(random.randint(-200, 200))

jumper.up()

jumper.goto(random.randint(-200, 200), random.randint(-200, 200))

jumper.down()



# select the random fill color from the choice given in list above

jumper.fillcolor(random.choice(color))



# begin the fill, whatever image will come after this will be filled with the above color

jumper.begin_fill()



# deciding the random radius of the circle between 20 and 100

# you can directly put random.randint rather than creating variable

radius = random.randint(20,100)



# Drawing the circle

jumper.circle(radius)



# end fill will stop filling of color and next iteration will change the color

jumper.end_fill()

Code is self explanatory above and i have provided the comment. Feel free to experiment and play with this to understand more.

If you feel like something is not explained, play with that and change the value. Try to print the same and see the change in results, it will definitely help to learn faster.
Code Sponsor joins Gitcoin
By: Eric Berry
Tags: Open Source, Open Source Software, Blockchain, Sustainability, Bitcoin

In December, the Code Sponsor platform was forced into a pivot due to compliance issues with GitHub. Since then, my great friends Freddy Shelton and Mike Smith with Rollbar have kept the flame alive through direct sponsorships. I spent the month thinking about how to best continue the Code Sponsor mission.

Finding solutions to help sustain open source has become a passion of mine. Code Sponsor itself has helped generate over $10,000 in revenue for developers through the platform.

Thanks to a tweet last year by Tomás Aparicio, I had the great pleasure to discover Gitcoin. During the exact moment I saw his tweet, I was contemplating how to manage payments to over eight different countries. Cryptocurrency seemed an obvious choice. That day marked the beginning of a four-month courtship between Kevin Owocki, CEO of Gitcoin, and myself.

Since our first discussion in October, Kevin and I found that our company and personal goals are very similar. We both wanted to help grow the open source ecosystem by providing means for developers to generate paths of sustainability. Here’s an interview I did with Kevin discussing open source sustainability.

I’m extremely excited to announce that Code Sponsor has joined the Gitcoin + Bounties Network family. This change allows me to work on Code Sponsor full-time and continue to find and provide ways to sustain open source.

Simultaneously, I will venture into the world of blockchain as an employee of ConsenSys, a leading company in the space and lead investor in Gitcoin. The company has fully embraced decentralization, where spokes (like Gitcoin) are autonomous, yet supported by the ConsenSys Mesh.

I look forward to serving the developer community and bringing the blockchain technology into OSS funding!
Transactional Writes in Spark
By: Andriy Zabolotnyy
Tags: Software Development, Spark, Hadoop, Data Engineering, Databricks

Since Spark executes an application in a distributed fashion, it is impossible to atomically write the result of the job. For example, when you write a Dataframe , the result of the operation will be a directory with multiple files in it, one per Dataframe 's partition (e.g part-00001-... ). These partition files are written by multiple Executors, as a result of their partial computation, but what if one of them fails?

To overcome this Spark has a concept of commit protocol, a mechanism that knows how to write partial results and deal with success or failure of a write operation.

In this post I’ll cover three types of transactional write commit protocols and explain the differences between them. The protocols being addressed are Hadoop Commit V1, Hadoop Commit V2 and Databrick’s DBIO Transactional Commit.

Transactional Writes

In Spark the transactional write commit protocol can be configured with spark.sql.sources.commitProtocolClass , which by default points to the SQLHadoopMapReduceCommitProtocol implementing class, a subclass of HadoopMapReduceCommitProtocol.

There are two versions of this commit algorithm, configured as 1 or 2 on spark.hadoop.mapreduce.fileoutputcommitter.algorithm.version .

In version 1 Spark creates a temporary directory and writes all the staging output (task) files there. Then, at the end, when all tasks compete, Spark Driver moves those files from temporary directory to the final destination, deletes the temporary directory and creates the _SUCCESS file to mark the operation as successful. You can check more details of this process here.

The problem of version 1 is that for many output files, Driver may take a long time in the final step. Version 2 of commit protocol solves this slowness by writing directly the task result files to the final destination, speeding up the commit process. However, if the job is aborted it will leave behind partial task result files in the final destination.

Spark supports commit protocol version configuration since its 2.2.0 version, and at the time of this writing Spark’s latest 3.0.1 version has a default value for it depending on running environment (Hadoop version).
5 Reasons Why We Love Fresno
Tags: Crypto, Cryptocurrency, Fresno, Startup, Bitcoin

If you’re intrigued by cryptocurrency, interested in a convenient way to get into crypto and purchase bitcoin, or are curious about our ATMs, come check our machines out. We have ATMs all over the country, and they are located in some pretty darn great cities (and we’re expanding to more in the coming months).



One of these great cities is Fresno, California. For those of you who live in Fresno — or if you are planning on visiting soon — we have not one but TWO locations located in CellPros shops on Aslan and Olive. Both of these kiosks are situated in a part of the city that is close to a few of our other favorite places to visit. An afternoon filled with crypto, nature, and rare animals? Sign us up!

1. Fresno Chaffee Zoo

You don’t need a reason to go to the zoo. If you want to go, just do it. The Fresno Chaffee Zoo is home to approximately 190 species, including the African Elephant, the Colobus Monkey, the California Sea Lion, sloth bears, and warthogs, among many others. The zoo is less than a 10-minute drive away from our ATM, so it’s almost a little too convenient.

2. Old Fresno Water Tower

If there’s a historic building in town, we’re the first ones in line. The Old Fresno Water Tower was built in the American Romanesque style and stands 109 feet high. If you’re a fan of historic buildings, add this one to your list. And in addition to sharing that you used a crypto ATM, here’s an additional interesting fact you can share at dinner parties: the Old Fresno Water Tower can hold up to 250,000 gallons of water in its tank. You’re welcome.

3. Forestiere Underground Gardens

When a website’s About page begins with “Sometimes you have to go beneath the surface to find what you’re looking for,” you know it’s worth a visit. The Forestiere Underground Gardens is an open-air museum that is listed on the National Register of Historic Places and is California State Historical Landmark number 916. Built by Sicilian immigrant Baldassare Forestiere in the 1900s, he set out to create a citrus empire. It took Forestiere about 40 years to make the gardens, digging through sedimentary rock and reaching 40 feet below the surface of the earth. Are you intrigued yet?

4. Fresno Art Museum

Once you’ve purchased bitcoin at our ATM, go spend the rest of the afternoon strolling the hallways of the Fresno Art Museum. With a focus on modern and contemporary artworks — including painting, sculpture, prints, photographs, and other media — you’re bound to have a thought-provoking and meaningful experience.

5. Shinzen Friendship Garden

Located a short drive outside of downtown Fresno, the Shinzen Friendship Garden is a convenient escape into nature. Why wouldn’t you want to spend some time exploring, learning, and reflection? And if there’s serenity and renewal included, yes, please! This is a quiet place to sit and think and enjoy the beauty of Mother Nature.
4 Famous Women Who Played Hard to Get With the Men in Their Lives
By: Anita Durairaj
Tags: Self, Life Lessons, Love, Psychology, Life

4 Famous Women Who Played Hard to Get With the Men in Their Lives

These women knew how to play the game and win

Photo by Yamil Duba from Pexels

Have you ever heard of a self-help and dating book called All the Rules: Time Tested Secrets for Capturing the Heart of Mr. Right which was first written by Ellen Fein and Sherrie Schneider in 1995?

When this book came out, it was really controversial. Despite all the strides that women had made in their personal and professional lives, the book talked about some dating ground rules that seemed to set women back into the Dark Ages.

The key precept of the book was that men should chase women when it came to love and relationships. It emphasized that a relationship was doomed to fail if the women so much as even made the first move by even uttering the word “hello”.

According to The Rules book, the woman should never even call a man. The man should always lead, pay for dates, say “I love you” first and of course be the first one to propose. Basically, the book advocated for the extreme version of playing hard to get.

There is still a lot of discussion in psychology and behavioral science as to whether playing hard to get really works. You can always find a case where it works and just as likely, you could find another case where playing hard to get is the worst thing that a man or woman could do.

However, in real life and in fiction and literature, you can always come across women who do play hard to get and end up winning in love and in life. I came across these 4 examples of famous women from history, fiction, celebrity culture, and royalty.
Bodymovin to Android
By: Nick Butcher
Tags: Motion Design, Android, Animation, Design

I’ve previously taken a look at using AirbnbEng’s Lottie to create vector animations on Android:

While Lottie offers a ton of power, it misses out on a lot of the performance benefits of Android’s native vector animation format AnimatedVectorDrawable . I came away wanting the best of both worlds… Lottie’s tight integration with Adobe AfterEffects and AnimatedVectorDrawable 's performance characteristics. Well it seems that my dreams have come true:

Bodymovin (the AfterEffect’s plugin Lottie also uses) version 4.10 brings direct support for exporting AE compositions as Android AnimatedVectorDrawable s! 🙌 🎉 🥂🍾🎈 A huge thanks to Hernan Torrisi for adding this!

Here’s how it works:
Avancargo, LATAM B2B trucking platform
By: Kevin Hart
Tags: Travel, B2B, Startup, Technology, Latam

Avancargo has raised $1M in total. We talked with Diego Bertezzolo, its CEO.

How would you describe Avancargo in a single tweet?

Avancargo is an on-demand B2B trucking platform, connecting FTL carriers and shippers in LATAM.

How did it all start and why?

It all started back in 2017, when the three founding partners were doing their MBA in Buenos Aires. We all were connected to logistics (my personal experience was managing sales and marketing for Volvo CE in Argentina and Uruguay) and found that there was a big opportunity to digitize and improve service in the sector. We arrive quickly to an MVP, and in a couple of months we found the first angel investors. Leveraging opportunities and supply in the agri sector was our fist goal, where only Argentina is moving over 4 million trips per year.

What have you achieved so far?

So far we can sum our achievements in the following lines:

Over 8,000 companies onboard, with more than 30,000 heavy trucks (10% of Argentina’s)

800 shippers, among which we are regularly operating with Walmart, Cargill, Bunge, Cresud

14 people in our team, with IT and operations as the largest areas

US$1 million investment, with some strategic partners such as Globant, Supervielle Bank, Murchison Group and Organization Roman

Over 10,000 trips requested in the last 12 months

What do you plan to achieve in the next 2–3 years?

Our goal is to settle the Argentinian operation during 2019/Q2 2020 in order to scale the service to Chile, Peru, Colombia and Mexico.
How to Secure a Spring Boot Application with TLS
By: Somnath Musib
Tags: Technology, Software Engineering, Coding, Software Development, Programming

Creating a Spring Boot Application

In this section, we will create a Spring boot application and expose the following endpoints:

GET v1/books/ : List all books

POST v1/books/: Create a new book

GET v1/books/{book_id}: Get a book resource

DELETE v1/books/{book_id}: Remove a book

Step 1: Creating a Spring Boot Project

Browse to your favorite IDE and create a Spring boot project with web, h2, data-jpa and Lombok dependencies. Following is the pom.xml file:

pom.xml

Step 2: Configuring h2 database

In this application, we will use the h2 in-memory database as our backing database. Add the following configuration in the application.properties file to configure h2 database:

application.properties

Step 3: Creating the domain object

In this application, we will manage book information. Users of this application/API can perform CRUD operations. We have created the following book entity:

Book entity

Step 4: Creating the REST endpoints

To facilitate the REST endpoints, we have created the following REST controller. It serves the aforementioned endpoints:

BookController.java

We also have created the following repository:

BookRepository

Step 5: Insert data at application startup

To help with the testing, let's insert a few book details in our database. To do so, create a new SQL file named data.sql in src/main/resources directory. Spring boot automatically executes this file at startup.

data.sql

Step 6: Testing the API

Let us now start the application and test a few endpoints to ensure the application is working as expected. We are using HTTPPie to access the endpoint and we are receiving data from the server as shown below:
Apple Fitness+, Launches December 14
By: Yash Patak
Tags: Apple Fitness Plus, Apple Fitness, Workout, Apple, Apple Watch

Apple Fitness+ — Apple

Apple has just announced that the launch date for their newest service, Apple Fitness+, will be December 14.

The long-awaited Fitness+ service gives users a catalog of different workouts led by expert trainers. The service will be powered by Apple Watch and will be able to provide real-time metrics like heart rate and calories burned. This will mean that in order to use the service you will need an Apple Watch. Apple Watch allows Fitness+ to dynamically integrate metrics like heart rate, in real time, on the screen. For those who like competition, some workouts will offer an optional burn bar that will contrast your effort to others who’ve also completed it.

If you already own an Apple Watch, Fitness+ will be the center tab in the fitness app once the service becomes available. From there you can see your subscription and use the service. The fitness app will be available to Apple TV subscribers.

Fitness+ has been created for everyone, whether you are a beginner or an expert. You can make modifications for all levels in every workout. You can do whatever exercise you want, choose the time, the trainer, and the workout. If you need to learn the basics, there is even an instructional program called Absolute Beginner.

Many of the workouts on Fitness+ will not require any equipment at all but for some, you may need things like weights, a yoga mat, an exercise bike, a rowing machine, or a treadmill. The workout types available include treadmill walk, treadmill run, HIIT, rowing, cycling, dance, yoga, core, strength, and mindful cool-down.

Fitness+ will have brand new content for all of their workout types every week, with different trainers, times, and music. There is also an intuitive filter that will make finding different workouts much easier. Music will be a key part of the Apple Fitness+ service. Users can choose from a variety of genres whilst completing workouts. They include Latest Hits, Chill Vibes, Upbeat Anthems, Pure Dance, Throwback Hits, Everything Rock, Latin Grooves, Hip Hop/R&B, and Top Country. There is an option to filter by music to match your current mood. You will not need an Apple Music subscription to enjoy the music, although if you do, you will be able to incorporate your own music.

When you purchase a new Apple Watch you get a 3-month free trial of the service. The price is $9.99 per month / $79.99 per year. If you are subscribed to Apple One’s premier plan, Fitness+ will be included in your subscription. Apple Fitness+ will be available Monday, December 14, and requires iOS 14.3, watchOS 7.2, iPadOS 14.3, and tvOS 14.3. For Apple Watch users, Fitness+ will automatically appear as a new tab in the Fitness app on iPhone; the Fitness app for iPad will be available to download from the App Store; and on Apple TV, the Fitness app will automatically appear once users upgrade their software.
The Need of Philosophy to refine Scientific thinking and understanding
By: Dave Amiana
Tags: Science, Education, Philosophy, Philosophy Of Science

The Need of Philosophy to refine Scientific thinking and understanding

Scientific Inquiry is an art of interrogatives, reasoning, and logic

While doing research, it was advised to follow a methodological approach that another author had used for their investigation. There are laboratory standards and protocols one has to follow in doing science. Working for weeks in the Philippine Textile Research Institute with my colleagues investigating the plausibility of Green Chemistry for developing nanotechnology, we spent a ton amount of time, money, and effort on doing something wrong. Apparently, some research upon which we laid the foundations of our methods did not agree with the actual result we had developed in the lab. My team and I, as young and curious researchers, mulled over how and why we are wrong, like someone who lost in a long and tedious engagement we demanded justification.

We were on a deadline, it’s too expensive, forget it.

We discussed the matter over some experts on that field and gathered their insights; it amounts to something like: “I’m not sure why exactly but perhaps step X is done wrong (or poorly), start with another approach”. To think of it much further, one is faced with so many variables at play. To dare to seek a satisfactory justification means to unravel the intricacies of those chemical interactions. In other words, it would have to take a lot of effort and more resources to investigate such matters on the level that would only scientifically satisfy a simple question; we were on a deadline, it’s too expensive, forget it. Reformulate new conceptual framework, recalibrate, and revise. It was a decision made considering the constraints we had, as high school students nerding out on national research laboratories. It was fun though. Thanks to our research adviser, our journey to science began — we were exposed to the culture of researchers and interesting people working on something at such a young age. But our question remained unanswered. After all, what does it mean to disagree with mere experiments? Other than mistakes, we are also faced with a deep question which is not very likely to be the case: what if the methodology was wrong? On what grounds should we settle the case of our investigation?

What is the justification of a scientific method?

A rational scientist cannot deny the possibility of falsifying a methodology, but the overwhelming consensus of the scientific community seems to agree with such a method, what forms of justification could one attempt to falsify a method? Certainly, experimental results alone cannot suffice to establish counterarguments. By the same token, one could also ask what is the justification of a scientific method?
Fizz Buzz as a problem in group theory
By: Tang U-Liang
Tags: Programming Tips, Python, Group Theory

There standard solution to this problem (implemented in Python) is as follows:

The above works, but the style is implicit. Some thought needs to put in to the order of the conditionals. all(...) must come first, or else we will be printing “Fizz” (or “Buzz”) instead of “FizzBuzz” when i=15 . Code like this while correct, makes it difficult to maintain because of the implicit dependency between the conditionals. If someone didn’t know about the FizzBuzz problem, he wouldn’t realize that you can’t shift the conditionals about because the code wouldn’t break if he did that. Dependencies which arise in the context of the requirements, and not explicitly in code are what makes code bug prone.

I think there is a better, more explicit way of solving this problem which highlights the inherent mathematical nature of this problem. And by appreciating the mathematical context, we get a more elegant way of implementing the FizzBuzz printer and remove implicit dependencies from the code.