fabiochiu/medium-articles huggingface dataset:
How to Code and Trade the Commodity Channel Index
By: Sofien Kaabar
Tags: Trading, Finance, Machine Learning, Data Science, Artificial Intelligence

Let us create the indicator step by step and then present everything in a full function. Here is the plan of attack:

Calculate the typical price which is simply the average between the current low, high, and closing prices.

Calculate the Mean Absolute Deviation of the price.

Calculate the 20-period moving average of the typical price.

Choose a constant. Generally, Donald Lambert recommends 0.015 for stability.

Suppose we have an OHLC array containing four columns; open, high, low, and close. We want to build the indicator in a simple way. Let us start by calculating the typical price. We should write a block of code that tells the algorithm to loop through the array and for each row, calculate the average between the second (high), third (low), and fourth (close) columns.

# Calculating Typical Price

Data[:, where] = (Data[:, 1] + Data[:, 2] + Data[:, 3]) / 3 # The where variable should be 4. It is the location of the Typical price. Therefore, after four columns of OHLC values, we place the typical price in the next column which is the fifth one and indexed at 4.

The next step is to calculate the Mean Absolute Deviation. But what is that, really? The Mean Absolute Deviation — MAD resembles the Standard Deviation only it takes the absolute distance from the values relative to their mean.

The Standard Deviation takes the square distances and then the square root of the results before averaging them.

takes the square distances and then the square root of the results before averaging them. The Mean Absolute Deviation takes the absolute distances and then averages them.

So, we are clear, the Mean Absolute Deviation is a measure of statistical dispersion from the mean that shares some similarities with the Standard Deviation. In the library pandas, we can find a simple built-in function to calculate this so that we do not complicate the problem with numpy. Only one problem, we are dealing with numpy arrays and not pandas dataframes. This is easily solved by converting. Here is how:

# Taking the Typical Price column to transform it

specimen = Data[:, where] # Transforming the Typical Price column into a pandas series

MAD_Data = pd.Series(specimen) # Looping through the Typical Price series with a lookback of 20 periods to find the Mean Absolute Deviation using the mad() built-in pandas function

for i in range(len(Data)):

Data[i, where + 1] = MAD_Data[i - lookback:i].mad()

The next step is simple. We have to calculate a 20-period simple moving average of the typical price:

def ma(Data, lookback, what, where):



for i in range(len(Data)):

try:

Data[i, where] = (Data[i - lookback + 1:i + 1, what].mean())



except IndexError:

pass

return Data # Calculating Mean of Typical Price

Data = ma(Data, lookback, where, where + 2)

Image by Author.

Now, if we combine what we have calculated into the above formula, we can have a full function like the below:
Context-Centred Design
By: Pascal Barry
Tags: System, Design, Thinking, Theory, Product

Designer of digital products, brands, websites and type. Co-founder at akord.com, a tech startup based in Paris. Visit the source at www.blogofpascal.com

Follow
Getting Started with Anaconda for Machine Learning
By: Pavindu Lakshan
Tags: Programming, Machine Learning, Data Science, Python, Anaconda

Installation

There are two ways you can install conda . The first way is to download and install the full Anaconda package. It comes with Python and a set of libraries that will eventually take up several gigabytes in the disk. The other way is to install a relatively lightweight Miniconda which only contains the essential data science tools. Whatever you will install, Conda CLI tool is shipped with both ways so you don’t need to worry about what should be installed. If you want to save disk space, install Miniconda otherwise, install Anaconda.

After downloading Anaconda/Miniconda, you can start using it through the Anaconda Prompt. Note that the newer Anaconda versions don’t automatically add itself to the PATH. Therefore if you want to use conda command in the Windows terminal, you need to add the following to the path. Replace <anaconda_directory> with the directory name where Conda is installed on your computer.
Design Pattern: Billowing Curtains
By: David Galbraith
Tags: Design Patterns

Curtains, in the US usage of the term, are differentiated from drapes in that they are sheer and translucent, whereas in UK English the term refers to all forms of loosely hung window fabric.

Modern architecture and curtains didn’t go well together as loose draped fabric is inherently decorative, non geometric and baroque, and so blinds became the norm.

Curtains used properly should embrace the fact that they are loose fabric, and either be overly long so they break over the floor, if heavy and velvet or hung loosely so that they can capture the wind if light and sheer.

Curtains which move lightly in a breeze, over an open window, soften the edges of openings and can create the effect of a room breathing in the wind. This creates pattern in shadows and dappled light, which we are possibly instinctively attracted to, having evolved taking shade under trees.
Remember the Simple Truths
By: U.S.Fish Wildlife Alaska
Tags: Diversity And Inclusion, Environment, Culture, Native Americans, Alaska

When the moose carcass was brought back to the village, Sylvia’s grandfather insisted on distributing much of the meat to other community members.

“My father asked why, because our own family was having a pretty hard time of it,” says Sylvia. “My family needed that meat. And my grandfather said, ‘This is how everyone in the village survives — by sharing. A lot of people are hungry. So you share, and it comes back to you.’ And my father emphasized that lesson to us kids, and we’ve never forgotten it.”

While Sylvia learned how to hunt, fish and trap from her father, she lacked the skills typically practiced and taught by women in Upper Tanana Athabascan culture.

“So when I was 11, my dad sent me to my aunt so I could learn about beadwork, birch bark basket making, and things like that,” Sylvia says. “I loved working with beads, though I was never too thrilled about basket making. But it was important that I learned how to do it.”

As Sylvia grew up, her dad and uncle felt she needed to broaden her horizons beyond Northway. So after graduating from eighth grade, she was sent away to the Mt. Edgecumbe Boarding School in Sitka for her high school education. Many native kids from Northway followed the same educational path, and some found separation from family and familiar environs jarring, acknowledges Sylvia.

“But I really liked it,” she says. “I met kids from all around Alaska, and I made a lot of new friends. Then I got to spend my junior year at the Chemawa Indian School in Salem, Oregon, and that was fantastic. The weather was so nice compared to Sitka! And when some friends and I got good grades in math, our teacher took us to a Creedence Clearwater Revival concert. I remember everything about that concert — and I still like listening to Creedence today.”

Sylvia returned to Mt. Edgecumbe the following year and earned her high school diploma.

“Then I went back home,” she says. “Back home to Northway. And I’ve been here ever since.”

Sylvia worked for a while with the Youth Conservation Corps, and then took a position as a community health aide. It was challenging but rewarding work, and she stayed with it for 32 years.

“In a small community like Northway, you do it all if you’re in health care,” Sylvia says. “I’d draw blood, do lab work, help deliver babies, take care of people who were ill, respond to accidents, make home visits. Sometimes I’d get up at 2 or 3 in the morning due to some emergency, and I wouldn’t get home until 9 or 10 at night. I enjoyed it, and I enjoyed serving my community. But it was stressful, and it took a toll. At a certain point my doctor told me the stress was getting to be too much, and that I needed to find something else to do.”

Sylvia had always wanted to work for the U.S. Fish and Wildlife Service, so she applied for a position at the Tetlin National Wildlife Refuge after retiring from health care.
The State of Small Businesses Report in 2017 [Infographic]
By: Roxana Nasoi
Tags: Growth, Startup, Small Business, Digital Marketing, Infographics

For the third year in a row, Wasp Barcode Technologies conducted a survey to identify how small business owners felt about their growth, confidence in the economy, employment, technology use, marketing tactics, and government impact.

The State of Small Business Report research is based on a random online sample of 1,127 U.S. small business owners/managers with companies with five to 499 employees. The anonymous survey was conducted via the Internet by Survey Monkey from November 10–18, 2016. The survey has a margin of error of +/- 2.9 at the 95% level of confidence.

Sample characteristics: 1,102 surveyed. All own or manage a small business. All headquarterd in the U.S.

Important Highlights for Small Business Growth in 2017

Approximately 42% of small businesses plan to increase IT spending in 2017. As a comparison, in the year before, 44% of companies surveyed planned to increase investments in IT.

Network security, upgrading networks and replacing computer hardware were among top changes in 2015 and 2016.

In the early 2016 report, 62% of larger small businesses (company size of 101 to 499 employees) were using or planning to use web-based or subscription-based software, while in the 2017 report numbers dropped to 57%. Out of smaller businesses (5–10 employees), 36% were thinking of taking this step in the previous year report. We see an increase in numbers, with 38% thinking of implementing web-based or subscription-based software in 2017.

Results are highly encouraging especially for startups, usually consisting of small teams (5–10 people), who are more oriented towards IT and cloud solutions in their growth strategy.

The full report can be found on their page, here.
The POM — to Play ‘Pick Three’. Extending the Politically Speaking game…
By: Christina M. Ward
Tags: The Pom, Writing, Poetry, Newsletter, Pick Three

The Pick Three challenge:

Increased engagement on our publication helps ALL of our writers! So let’s make this a game. Visit our homepage or work off this list of the curated articles from August. Pick three articles/poems that stand out to you. This is your chance to curate THREE and get the word out to others about your picks!

Pick three — and then read each article or poem, comment on each of your picks (link this post if you want to challenge them), share each poem or article to your social media to encourage other people to read it.

Simple! PICK THREE — READ — COMMENT — SHARE

Want to make it more fun? Let them know they are one of your “Pick Three” picks and plop the link to this newsletter post to challenge them to Pick Three! Or, write up a Pick Three for the publication Top 3! Have fun selecting YOUR Pick Three picks!!

Check out these curated articles in The POM!

August pub-wide curation rate: So far in August we have 192 posts (WHOA!) and 18 of them have been curated. Please read ALL newsletters — I often include tips that can help move toward curation.

For example:

Did you know that if you include ANY friend links within your story — like those self-promo links at the bottom or within your posts — that it makes your entire post exempt from curation? It is IN the curation rules:

From the curation guidelines:
Three Steps To Setting An Effective Marketing Budget
By: Raunak Datt
Tags: Budget, Digital, Digital Marketing, Goals, Marketing

This article is a spin-off from our podcast episode titled, “How Do You Set Up An Effective Marketing Budget?”

It’s is a common topic for most first time founders and digital marketers. Many startups make a mistake of putting in X amount for channels as the official budget without any correlation to its effectiveness or any method of measuring the success (or failure) of the Marketing Campaigns. This often leads to them spending more than they need to in the initial months, which is also when cash burn really does matter.

To answer this question we’ve got Ahmad our Director of Marketing & Learning Programs at AstroLabs. He’s also our lead instructor in the Digital Marketing Track and has advised startups on their Marketing strategy.

Raunak: Why do you think entrepreneurs have challenges with setting up an effective marketing budget?

Ahmad: It is because they come at it from the point of view of, “I wanna have a certain budget per month and I want to spend this budget on Marketing.” The problem is you cannot know if the budget you have set is effective for your business until you find a way to track your goals. Only they can you determine if your marketing spend is effective for your goals. So people formalize a budget without even determining a way to measure the effectiveness of the spend versus their goals.

There is an old saying that goes like this, “Half of your marketing budget is wasted, but you just don’t know which half.” Now with Digital Marketing, you can know what’s wasted and what’s not. I would recommend anyone setting up a marketing budget to follow these three steps.

The first step is to clearly define what you want to track as a goal. So a goal is something that is valuable to the business, for example, if you are an e-commerce store, your goal would be to get someone to buy something from your shop. You might also have secondary goals like to have someone to sign up for your newsletter. Typically, primary goals are revenue driven. If you are a consultancy, your goal would be for customers to contact you on some kind of a form and then after that, you would try to sign them up as clients.

The next step is to figure out is how much are you willing to spend to get one goal. Let’s say you sell sneakers online and are trying to understand how much should you budget for. Let’s say you sell one pair for a $100 including margins. In that, you want to decide you want to allocate 20% of that to marketing spend. So you are willing to spend 20$ for every sale you make. This is your initial benchmark spend per

Once you start testing campaigns, you would look at the marketing channels to see if you are reaching a $20 Cost Per Acquisition or CPA in the campaign you are running. This is where the third steps happen, testing and measuring if your campaigns are reaching your goals or not.

If you are a founder or a marketer looking to upgrade your skillset and get certified, check out our upcoming Digital Marketing tracks here: astrolabs.com/academy or reach out to me at raunak@astrolabs.com
A Self-sorting and Self-balancing Tree (2–3 Tree for geeks)
By: Anisha Jain
Tags: Programming, 2 3 Trees, Trees, Python, Data Structures

There is so much data that needs to be stored and accessed daily, from student data to medical data. All of these data needs to be accessed in some logical order, and very quickly. Various data structures are invented, implemented, and used for this purpose, where each structure has its specialties and is used for those specific use cases. 2–3 Trees are one of those structures, with its specialty being that it is always sorted and it is always balanced, thus very efficient (logN lookups and inserts, to be specific, where N is the number of items stored).

What is a tree and what are its nodes?

The above diagram shows the structure of a tree. Each bubble in the diagram above is called a node. This is where a data element is stored. Each tree has a root which references the top-most node. This is what is used to access the tree. If this is your first time seeing a tree, look up binary trees and binary search trees to better understand how trees work at their core.

What is a 2–3 Tree?

2–3 tree is a data structure in computer science where every node has either two or three nodes, and each node has either one or two elements. Every addition made from the client side is added to the lowest valid leaf node, where a leaf node is defined as a node with no children, and the tree self-balances when 3 items are reached in a node, dividing between left, right, and middle nodes. The five cases in the image below demonstrate how this tree functions.
Essential Ingredients for Watering Your Mental Health and Promoting Growth
By: Jon Hawkins
Tags: Life, Life Lessons, Psychology, Self, Advice

An Objective Perspective

According to Psychotherapist, Tina Gilbertson, the first step of personal growth is identifying our flaws. It’s by improving them that we better ourselves. And, according to Gilbertson, this requires us to gain a new perspective and separate ourselves from our previously entrenched viewpoints. Rather than maintaining positive and false biases about ourselves, a new view is an opportunity to identify things that used to be invisible to us.

Gilbertson draws on an example of self esteem. Early on in her development, she would internalize the harsh and negative things that were said to her. She took it as a direct reflection of her worth, and as a result, she perceived herself as lower than others.

Because she internalized it, she failed to recognize the counterproductive habit that caused her to take other people’s comments personally. It became a normal part of her daily routine, so she failed to acknowledge how damaging this mentality was to her growth. In short, her internalizing that behavior made it invisible to her. She had no idea she was doing it.

According to Gilbertson, it was taking a step back that she was able to objectively see other’s cruel words as a reflection about the speaker, then about her. In doing so, she stopped taking things personally, and gained key insight that was fundamental to her growth.

Gaining that Perspective

We’re all blind to our flaws and bad habits. To give another example, Gilbertson associated drinking alcohol with her emotional state of being — whenever she was anxious, she would drink. Over time, that tendency became normal and invisible to her.

It’s by gaining an objective opinion, that we can begin to recognize our habits are abnormal and counterproductive. At times, gaining this can be difficult. As mentioned, we all carry biases about ourselves, and tend to ignore negative things that counteract those thoughts. But to help my growth and identify my flaws, I tend to:

Thoroughly introspect on my thoughts, feelings, and emotions. What do I feel guilty, or ashamed of? What am I proud of? Doing so helps me to admit the personal flaws I was already aware of.

To identify the flaws that I’m oblivious to, I occasionally ask friends and family to share their honest opinions about how they perceive me.

I listen to feedback from my superiors. Be that in education or work. If they don’t think I’m pulling my weight or reaching my full potential, I welcome that feedback.

We can never truly know how we look or how our behavior is perceived. Our self biases are so defined, that some scientists argue that if you saw yourself on a train — you wouldn’t even recognize yourself. So it’s by gaining this new and fresh perspective that we are able to recognize our flaws, and nurture our growth.
E.E. Cummings’ Poem Ripped by His Feedback Partner, F.F.
By: Judy Millar
Tags: Literature, Writing, Satire, Poetry, Humor

E.E. Cummings’ Poem Ripped by His Feedback Partner, F.F.

“i carry your heart with me” doesn’t cut it with collaborator

Photo by Andraz Lazic on Unsplash

e.e.:

So far I’ve just got this first verse. Let me know if you’re feeling it:

i carry your heart with me(i carry it in

my heart)i am never without it(anywhere

i go you go,my dear;and whatever is done

by only me is your doing,my darling)

F.F.:

I hate to say it, but you lost me right off. What’s with that lower case “i”? It literally SCREAMS “low self-esteem.” You don’t want to start off sounding like a starving artist who can’t afford to repair his wonky shift key.

e.e.:

My shift key works fine. I was experimenting with a new style of . . . never mind, it’s hard to explain . . . How about the content? I’m onto something there, right??

F.F.:

If you mean my nerves, maybe. You’re gonna carry HER heart in YOUR heart? How’s that gonna work?? Why, even your largest chamber — that’d be your left ventricle — couldn’t possibly fit an entire —

e.e.:

It’s METAPHORICAL, man. I’m trying to get at how she’s just always there, you know, deep inside me, like a . . .

F.F.:

Like a what? Like a tumor? It’s gross, man. She’s in there with your pumping blood and your plaque and all the —

e.e:

(miffed) Plaque is in the arteries. I’m pretty sure —

FF:

My point is: plaque isn’t pretty. And ventricles are revolting. Say something complimentary. My love is like a red, red rose/That’s newly sprung in June” — that sort of thing.

e.e:

That’s been done.

F.F.:

NOT Donne. It was Robbie Burns who wrote “A Red, Red Rose.” Just switch up that sort of thing. Maybe say: My love is like . . . an awesome amaryllis. My girlfriend grew this amazing “Apple Blossom” Amaryllis, it was two feet tall —

e.e:

No flowers! I’m not a florist — I’m a modernist. And you’re my feedback partner. You’re not supposed to tell me WHAT to write. Just give me notes on what works for you, and what doesn’t. Does anything work for you??

F.F.:

Sorry. Yes, absolutely, the “my dear” part works. And the “my darling.” Strong! Chicks eat that stuff up. But . . . that part where you lug her around — anywhere you go, she goes?? Women want freedom, their own space — they don’t want to just tag along, squished into some guy’s left ventricle.

e.e.:

Hold on. You’re being literal again. It’s poetic. I’m a freakin’ poet —

F.F.:

And I’m NOT? I seem to recall my “Ode to an Adder’s Tongue” got into the same anthology that rejected you. Anyway, you ASKED for my feedback. If you can’t even take a few notes—

e.e.:

— I can take . . . I WILL take them . . . under advisement.

F.F:

Good. Now, maybe rethink the whatever is done by only me is your doing. Like, what if you did something wrong? — say you screwed up and forgot your anniversary — it sounds like you’d be saying it’s her fault.

e.e.:

(deflated) What I meant was . . . never mind. Is that it?

F.F.:

Pretty much. Just massage it a bit, is all I’m saying. Oh, and expand that scrunched-up spacing. You’ve got to let a poem B R E A T H E . . .
Czech Carmaker Škoda will use Israeli AI Solution to Optimize Engine Production
By: Liran Zitser
Tags: Israeli Startups, Automotive, Innovation, Startup Nation, Artificial Intelligence

The Israeli pioneer in process-based industrial artificial intelligence, Seebo, announced a partnership last week with the leading Carmaker Škoda Auto. This collaboration aims to use Seebo’s unique process-centric AI solution in aim to predict and prevent losses in automotive production lines.

By employing Explainable AI technology, Seebo enables process manufacturers to predict and prevent unexpected process inefficiencies that continually damage production yield and quality. The Seebo solution empowers production teams to discover process inefficiencies and their operational impact, pinpoint why these process inefficiencies happen and predict when they will happen next.

Seebo was set up in 2012 by Lior Akavia and Liran Akavia. Seebo has over 50 employees, working out of offices in San Francisco, Tel Aviv, and Shenzen. The startup has raised $16.5 million to date, according to Start-Up Nation Central. The company provided its solutions to several manufacturing sites worldwide, such as Hovis, Nestle, and PepsiCo.

Many predicted and discussed the transformation AI will have over autonomous vehicles and how will it completely change the driving experience. Although not many emphasized on how AI will transform most aspects of the auto-manufacturing process. AI will not just change the vehicles that are built, it will also change the entire business of how they get built. Increasingly, AI applications are supported by the adoption of devices and sensors connected to the Internet of Things (IoT). As companies rush to apply AI to high-value industrial tasks such as predictive maintenance or performance optimization, we are seeing a rush of investment in AI technologies.

“The use of AI in the automotive industry is expanding beyond autonomous vehicles into the production plants, to attain smarter, data-driven manufacturing processes. This collaboration demonstrates Škoda’s continued commitment to remain innovative while excelling in production technology and we are proud to be part of their smart manufacturing strategy.”, said Seebo CEO and co-founder Lior Akavia.
Almost Love Letter
By: Joseph Coco
Tags: Love Letters, Writing, Poetry, Love, Breakups

I’m trying so hard to believe there’s enough love in the world.

For both of us.

I grit my teeth and silently wish I was magic.

Able to slip in and out of this reality.

Into another where rejection was someone I barley knew.

A brunette passing me by in the night.

Blurred movements as I rush to the show.

Those tickets were so damn expensive.

It’ll be so much fun to experience this with you though.

Moon and stars hanging over us.

Dressed to the nines.

We’ll retreat to my place after it’s over.

Watch a movie and share our smiles.

Intimate images flicker through my mind.

In and out they go.

Frequent and vivid.

I wish they’d coalesce into a bridge.

Shimmering under the twilight hour.

Letting me walk across and away.

From this world where I wasn’t good enough.

Deficient and unwanted.

I’ll probably never know exactly why you said no.

But I know I have control over my feet.

As long as this bridge keeps forming.

I can someday make it to the world in my dreams.

The one where I was finally good enough.

The sun finally able to set on my isolation.
Internship testimonial: Sara Neves
By: João Correia
Tags: Getsocial, Startup Life, Faber Ventures, Internships, Startup

Get to know our Summer Interns Class of 2017 and their feedback on the “endless summer” they had here at the office.

Could you please introduce yourself?

SN: Hi! I’m Sara, I’m 21 years old and I come from a small town named Ourém. I’ve just finished my Bachelor’s Degree in Design and Multimedia at the University of Coimbra, which offered me the opportunity to merge two things I’m passionate about — design and coding.

How did you get to GetSocial?

SN: I was looking for an internship and Faber’s Summer Internship was my number one choice. I found out about it through an event called DotWorks in Coimbra, where I had my interview. I was sure I would have people helping me and willing to share their experience. I knew I would learn and have the opportunity to apply what I know, but this time in a real company. GetSocial was the startup they chose for me and that allowed me to do so.

Sara doing it again! Works like these: About Us, Shares Report and much more.

What have you done during the internship?

SN: At GetSocial I was as a UI/UX Developer slash Designer. My main project was to improve GetSocial’s User Experience. I also did some promotional content for our social media channels and I have just finished rebuilding the onboarding experience for new users, so they have a smoother welcome to the GetSocial platform.

Did this experience meet your expectations? Would you recommend to future interns?

SN: I chose this internship because I was sure I would learn, but I never thought I would learn THIS MUCH! Every Friday I went home with my mind so overwhelmed. Being immersed in the startup’s world is far better than what I was expecting, and I already had high expectations… I really appreciate the fact that they are always willing to help, sit next to you and give some feedback or guidance if you’re feeling lost.

It was also good to see how a startup environment actually is and to work with a small but diversified team. I definitely recommend it!
When your home is a far away land
By: Jess Semaan
Tags: Poetry, Immigration, Identity, Culture, Psychology

Sometimes the only way to realize you have grown up in tragedy, is to move to a far away land

Sometimes the only way to get curious about your origins, is to leave the land of your origin

Sometimes the only way to forgive your parents, is to get to know them from thousands of miles away

Sometimes the only way to meet yourself, is to leave the place that shaped parts of you, and also obscured parts of you

Sometimes the only way to see the beauty in your culture, is to wash yourself with that foreign culture

Sometimes the only way to fall in love with your heritage, is to realize that where you live is broken too, everywhere is a little broken in its own way

Sometimes we have to leave our country, our home, our parents, our city, our habits

Sometimes we have to hate, feel angry, reject, ignore, forget

Before we can look back at home with gratitude and watery eyes that only can see that broken is beautiful
Dependencies between DAGs in Apache Airflow
By: Israel Herraiz
Tags: Python, Apache Airflow

A DAG that runs a “goodbye” task only after two upstream DAGs have successfully finished. This post explains how to create such a DAG in Apache Airflow

In Apache Airflow we can have very complex DAGs with several tasks, and dependencies between the tasks.

But what if we have cross-DAGs dependencies, and we want to make a DAG of DAGs? Normally, we would try to put all tasks that have dependencies in the same DAG. But sometimes you cannot modify the DAGs, and you may want to still add dependencies between the DAGs.

For that, we can use the ExternalTaskSensor.

This sensor will lookup past executions of DAGs and tasks, and will match those DAGs that share the same execution_date as our DAG. However, the name execution_date might be misleading: it is not a date, but an instant. So DAGs that are cross-dependent between them need to be run in the same instant, or one after the other by a constant amount of time. In summary, we need alignment in the execution dates and times.

Let's see an example. We have two upstream DAGs, and we want to run another DAG after the first two DAGs have successfully finished.

This is the first DAG. It has only two dummy tasks.

The second upstream DAG is very similar to this one, so I don't show the code here, but you can have a look at the code in Github.

The important aspect is that both DAGs have the same schedule and start dates (see the corresponding lines in the DAG 1 and in the DAG 2). Notice that the DAGs are run every minute. That's only for the sake of this demo. In a real setting, that would be a very high frequency, so beware if you copy-paste some code for your own DAGs.

The downstream DAG will be executed when both upstream DAGs succeed. This is the code of the downstream DAG:

Some important points to notice. The schedule and start date is the same as the upstream DAGs. This is crucial for this DAG to respond to the upstream DAGs, that is, to add a dependency between the runs of the upstream DAGs and the run of this DAG.

And what if the execution dates don't match but I still want to add a dependency? If the start dates differ by a constant amount of time, you can use the execution_delta parameter of ExternalTaskSensor. For more details, check the documentation of ExternalTaskSensor.

The documentation of Airflow includes an article about cross DAG dependencies: https://airflow.apache.org/docs/stable/howto/operator/external.html
Is Apple Losing It? 🍎
By: Henry Gruett
Tags: Apple, Night Shift Newsletter, Tech, Technews, Technology

Newsletter #1: 12/18/20

Welcome to the first-ever Night Shift newsletter! In case you’ve been living under a rock, Apple released some new headphones called the AirPods Max. And they’re $550. So yeah…

Maximum Fruitiness 🍇

Apple has had a big fall/winter season. And the last couple of weeks have been no different.

Most notably, Apple released their new headphones, the AirPods Max, for $550. The internet seems to have come to a consensus on the fact that the new headphones are overpriced and not worth the money. But others (including me) say Apple might not be as dumb as you think.

An Apple A Day 👩‍⚕️

Other Apple news is also streaming in fast. iOS 14.3 got released with new exciting features and bug fixes.

And some other Apple stuff as well:

Optimize And Kill 💀

If you want to learn more about what’s going on in the Facebook world, I highly recommend these two articles:

Meanwhile, Google had some troubles this week:

Silent but Deadly 🚙

Gas cars are looking older and older every day.

Living in Denial 😅

It seems that Qualcomm is shrugging off the new M1 arm chips from Apple. It will be interesting to see what the future of chips, especially x86 chips, turn out in the future.

Learning Everyday 🌞

This is an amazing guide to machine learning in Python:

Raspberry Cry 😢

It seems that everyone wants to make their own affordable prototype computer like the Raspberry Pi.

Just a Bit of Fun 🎤

Google made this. You’re welcome.

Well, that’s it for the very first Night Shift newsletter! Any feedback to improve would be greatly appreciated.
Exploring venues in Chandigarh, India using Foursquare and Zomato API
By: Karan Bhanot
Tags: Machine Learning, Towards Data Science, Data Science, Productivity, Technology

We see that some venues overlap while other venues are way off. Thus, using careful analysis we decided to drop all corresponding venues from the two datasets that had their latitude and longitude values different by more than 0.0004 . Once this was done, we observed that there were still some venues which were not aligning which could be categorised as follows:

There are venues that have specific restaurants/cafes inside them as provided by Zomato API (Pizza Hut in Elante Mall). Two locations are so close by that they have practically same latitude and longitude values (The Pizza Kitchen and Zara). Some venues have been replaced with new venues (Underdoggs has now been replaced by The Brew Estate).

While it’s okay to keep the venues that belong to category 1 and 3, we shall drop venues in category 2. This left us with a dataset of 49 venues.

Methodology

As a first step, we retrieved the data from two APIs (Foursquare and Zomato). We extract venue information from the center of Chandigarh, upto a distance of 4 Km. The latitude and longitude values are then used to fetch venue rating and price from Zomato.

The data from the two sources is carefully combined based on the name, latitude and longitude values from the two sources. The final dataset would include the rating and price values for each venue.

Next, we analyse the data that we created based on the ratings and price of each venue. We identify the top category types. We identify places where many venues are located so that any visitor can go to one place and enjoy the option to choose amongst many venue options. We also explore areas that are high rated and those that are low rated while also plotting the map of high and low priced venues. Lastly, we cluster the venues based on the available information of each venue. This will allow us to clearly identify which venues can be recommended and with what characteristics.

Finally, we’ll discuss and conclude which venues to be explored based on visitor requirement of rating and cost.

Analysis

During the analysis phase, I explored the venue categories, the rating distribution of the venues and the price range across the map of Chandigarh.

Categories

As we extracted categories from the Foursquare API, identifying what type of venues are most popular in the city would really be helpful. We plot a bar chart for the same.
The UI & UX tips collection — volume one
By: Marc Andrew
Tags: Product Design, Visual Design, UX, UI, Design

Originally published at marcandrew.me on November 19th, 2020.

Creating beautiful, but also practical UIs takes time, with a lengthy amount of design revisions along the way. I know. I’ve been there before.

But what I’ve discovered over the years is that by making just a few simple, and quick adjustments to your designs you can improve the end-result massively.

In this guide I’ve put together a collection of my popular UI & UX tips from the past 12 months that can, with little effort, help improve both your designs, and the overall user experience.

Let’s dive on in…
Venture Capital Funding Hasn’t Just Recovered — It’s Booming
By: Frederik Bussler
Tags: Investing, Venture Capital, VC, Startup, Funding

Venture Capital Funding Hasn’t Just Recovered — It’s Booming

Is this the new Dotcom bubble?

Photo by Markus Winkler on Unsplash

Containment measures for COVID-19 plunged the world into a deep recession, with tens of millions of people losing their jobs.

However, Venture Capital funding survived much of the crash intact, down just 4% year-over-year in the first quarter, and down just 2% YoY in Q2. The second quarter already represented significant growth from March’s bottom, up 17 percent quarter over quarter.

The numbers for Q3 show that there’s indeed been a swift turnaround, as funding was up 9% YoY. Q3 was a “seven quarter high” in venture funding for US companies, and Q4 is on pace for significant YoY growth.

Figures by CrunchBase. Q1, Q2, Q3. Visualized by author.

Q4 — The Grand Finale

Venture capital runs the gamut from angel investments all the way to IPO, and there are a lot of exciting IPOs rounding out 2020, including Affirm, Airbnb, DoorDash, QuantumScape, Wish, Roblox, ThoughtSpot, UIPath, and C3.ai.

There’s a bunch more, and several will run into 2021, but in any case, there’s a lot of recent VC funding and deals in the pipeline.

Affirm is a $10 billion installment loans company that filed for IPO on October 8th, and is expected to list once the SEC completes its review.

QuantumScape is an Electric Vehicle battery company with exciting tech that supposedly surpasses Telsa — a rival whose stock is up over 10,000% all-time.

C3.ai is an AI solutions company that IPOd under the ticker $AI. Their products include AutoML, a niche within AI that’s growing even faster than the industry as a whole. While I haven’t worked with C3.ai in particular, I work with AutoML tools like Obviously.AI, which makes implementing AI orders of magnitude easier, so there’s a lot of potential.

Not Just a Recovery, an IPO Boom

The long line of IPOs may even rival the frenzy of the dot-com era, and become the biggest year ever for IPOs. A lot can change in the next month, but it’ll be a big year no matter what.

Globally, U.S. exchanges have made up 87% of IPO proceeds in Q3, according to the Global IPO trends: Q3 2020 report. In the first three quarters of 2020, well over 100 companies IPOd, including long-awaited giants like Palantir and Snowflake.

Summary

If you’re a startup looking for funding, quarterly financing data shows that now is an incredible time. You need look no further than Crunchbase or even Twitter to find countless startups raising capital.
PyTorchバックエンドの確率的プログラミング言語Pyroと生成モデルのツールPixyz
By: 大川 洋平
Tags: Probabilistic Programming, Pytorch, Deep Learning, 日本語, Python

hei4/medium-pyro-pixyz

You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
Amazon’s First Non-Employee Customer and What He Bought
By: Sean Kernan
Tags: Life, History, Technology, Sean Kernan, Artificial Intelligence

Amazon’s First Non-Employee Customer and What He Bought

The story of John Wainwright and his journey to the first purchase at Amazon.

Author purchased rights via adobe stock photos

Vincent Van Gogh once wrote that, “Great things are not done by impulse, but by a series of small things brought together.”

In many ways, the beginnings of a business is a canvas, an idea that’s initiated with a scary, committal brushstroke, evolving into a beautiful final product, or a botched and forgotten disaster.

It’s particularly interesting looking at the humble origins of ubiquitous, global companies. Their beginnings are almost always inspirationally small, the first half of their founder’s proof of perseverance.

Jeff founded Amazon in 1994, walking away from a well-paying finance job in New York City. His supervisor implored him not to leave, namely because Bezos was a good employee and worth keeping, but also because he thought Jeff was on a fool’s errand. He’d seen so many great minds fall into the abyss of failed startups.

Most of you know the rest of this story. But let’s go back, and see the part most don’t know: the story of their first sale.
10 Books You Can Binge In A Day. Read a lot of books in a few hours.
By: Anangsha Alammyan
Tags: Books, Reading, Self Improvement, Book Recommendations, Book Review

Genre: Crime Thriller

Goodreads

On the face of it, this is a gritty cold-blooded thriller, but this 97-page novella packs in much more than that — exploring clinical depression, child abuse and a twisted father-son relationship that goes a long way in shaping the protagonist, the ex-Marine Joe, and giving the audience an insight into his actions. Not a single paragraph in the book is a drag, and every dialogue and every character has a role to play in moving this dark, disturbing story forward. Full points to the author for holding my attention for a gripping two hours.

Reading this book is a rare treat because Ames creates a story that is very atmospheric — letting the reader imagine scents and sights masterfully with his words. Apart from that, the discussion of mental health is very subtle and delicate. Kudos to the author for giving us a real and relatable protagonist who is clinically depressed, and yet carries on through life without it being a debilitating influence.
File Management for Designers
By: Neil Shankar
Tags: Design, Management, UX, Organization, UI

File Management for Designers

A simple yet comprehensive organizational system

Client projects have lots of moving pieces. I’m a designer on Creative Engineering at Google, which works with Google PMMs (Product Marketing Managers) to create websites and digital experiences. We ourselves are comprised of several creative and development agencies, and work with both internal product teams and other external agencies.

As such, our projects can become extremely complex, and require strong organizational infrastructure on every level. This is my organizational system.

Benefits

I use this organizational system to accomplish the following:
An Introduction to Asch Chain Interoperate Protocol
Tags: Blockchain Technology, Asch, Development, Interoperability, Bitcoin

Last month Asch released the chain interoperate protocol, with which Bitcoin can transfer to Asch chain and be used in different DApps. So how is this protocol complemented?

Asch’s chain interoperate protocol is a two-way peg protocol based on multisig federation. There are two kinds of accounts on the Asch chain: normal user accounts and gateway accounts. It is the gateway accounts who handles different kinds of transactions between Asch chain and Bitcoin Network. Every transaction can be checked by the user on the blockchain explorer.
New Educational Branch!
Tags: Gamedev, Concerts, Games, Development, Worldopo

Fellow Cryptolords!

We’re continuing to unveil the new Worldopo Concept we are working on.

Today we’re presenting highbrow Tech/Educational branch.

The Purpose of the Educational Branch

Even highly automated industries need skilled professionals to work on plants, electric stations, financial establishments, leisure sites, and all other Worldopo’s business empires branches. It means that units need to train somewhere. That’s the first role for Tech/Edu buildings.

The Human Resource distribution model of Educational Branch

Let’s take a closer look at how we designed a new Educational Branch.

Entry-level Human Resources

First, players need low-level workers to manage entry-level buildings. They can be trained in Headquarter’s HR Department.

Advanced Human Resources

As the base development level improves, you must hire more skilled workers and new professions for new buildings. That kind of staff could be unlocked in a separate HR Agency building.

Hi-End Human Resources

Meanwhile, hi-end professionals for premium limited building could be trained in Universities, which are also premium and limited.

Another key feature of the branch is the Research Lab building. Players need it to unlock certain hi-end technologies on the Technologies diagram.

Have a nice day, Cryptolord!
The Need To Control Might Be Ruining Your Relationships
Tags: Self-awareness, Adulting, Relationships, Letting Go, Self

Undoubtedly, the biggest perspective shift in my life was surrendering to the idea of controlling things that are beyond my control.

I am going to do everything possible within my power to achieve this result, but not base my happiness on the outcome of the result itself.

I will give my all to fixing this relationship without any expectations from them to do the same.

The pandemic stopped me from exploring this new city, so I will focus on building up my skills. This will enable me to offer some value to society when normalcy is restored.

We can’t change things like the pandemic & the behavior of others, but what we do have control over is how we approach and contextualize the problems.

Overcoming this was, and still continues to be, one of the toughest mental challenges I face every day. I use the word overcoming very intently in the previous sentence because it’s truthfully a daily effort. It requires a great deal of intentionality to stop myself from going towards conditioned habits.

A bit of History

Stress, anxiety, worry, and the desire for control have all evolved over time. Mark Leary, professor at Duke University states, “A deer may be startled by a loud noise and take off through the forest, but as soon as the threat is gone, the deer immediately calms down and starts grazing. And it doesn’t appear to be tied in knots the way that many people are.”

Similar to the behavior of deer, our ancestors were equipped to react to dangers and threats in the environment by utilizing stress and anxiety to their advantage. However, once the threat was gone, their stress and worries subsided with them.

This is not the case anymore. We live in an environment that is drastically different from our ancestors. This mismatch between our old brain and a new environment is what leads to long-term stress, overthinking, and other such negative emotions that we must overcome.

Control in Relationships

The difficulty of giving up control is realized when we form a relationship with another being. It is a bit more difficult to control the actions and emotions of other people. I will go as far as stating that most relationships fail due to the perpetual battle for the need to control and dominate one another.

When two people start a life together, they enter relationships with many expectations. They reflect these expectations on their new partners with the assumption that their partner should understand exactly what their needs and wants are.

Hypothetically, let us assume that one person in the relationship becomes unhappy with the level of attention they receive from their partner. They confront their partner but get no apologies in return. Instead, their significant others argue that their partner is being dramatic and making a big deal out of nothing.

“Me, wrong? Never.”

They get frustrated because they are not able to convince their partner to accept his or her fault. In another word, they are angry at not being able to control their partners’ emotions.