fabiochiu/medium-articles huggingface dataset:
PathNet: Evolution Channels Gradient Descent in Super Neural Networks
By: Yusuke Stephen Inoue
Tags: Deepmind, AI, Paper, Machine Learning

PathNet: Evolution Channels Gradient Descent in Super Neural Networks

【一言まとめ】既に学習されたネットワークを他のタスクに再利用する試み

【著者】Chrisantha Fernando, Dylan Banarse, Charles Blundell, Yori Zwols, David Ha†, Andrei A. Rusu, Alexander Pritzel, Daan Wierstra

【所属機関】DeepMind

【URL】https://arxiv.org/pdf/1701.08734.pdf

https://deepmind.com/research/publications/pathnet-evolution-channels-gradient-descent-super-neural-networks/

【Abstract】

For artificial general intelligence (AGI) it would be efficient if multiple users trained the same giant neural network, permitting parameter reuse, without catastrophic forgetting. PathNet is a first step in this direction. It is a neural network algorithm that uses agents embedded in the neural network whose task is to discover which parts of the network to re-use for new tasks. Agents are pathways (views) through the network which determine the subset of parameters that are used and updated by the forwards and backwards passes of the backpropogation algorithm. During learning, a tournament selection genetic algorithm is used to select pathways through the neural network for replication and mutation. Pathway fitness is the performance of that pathway measured according to a cost function. We demonstrate successful transfer learning; fixing the parameters along a path learned on task A and re-evolving a new population of paths for task B, allows task B to be learned faster than it could be learned from scratch or after fine-tuning. Paths evolved on task B re-use parts of the optimal path evolved on task A. Positive transfer was demonstrated for binary MNIST, CIFAR, and SVHN supervised learning classification tasks, and a set of Atari and Labyrinth reinforcement learning tasks, suggesting PathNets have general applicability for neural network training. Finally, PathNet also significantly improves the robustness to hyperparameter choices of a parallel asynchronous reinforcement learning algorithm (A3C).

【Abstract翻訳】

汎用人工知能（AGI）の場合、巨大な忘却を伴うことなく、複数のユーザが同じ巨大なニューラルネットワークを訓練し、パラメータの再利用が可能であれば効率的である。 PathNetはこの方向の第一歩です。それはニューラルネットワークに組み込まれたエージェントを使用するニューラルネットワークアルゴリズムであり、そのタスクは新しいタスクに再利用するネットワークの部分を発見することです。エージェントは、バックプロパゲーションアルゴリズムの順方向および逆方向パスによって使用および更新されるパラメータのサブセットを決定するネットワークを通る経路（ビュー）です。学習中、トーナメント選択遺伝的アルゴリズムを用いて、複製および突然変異のためのニューラルネットワークを通る経路を選択する。経路適合度は、コスト関数に従って測定されたその経路の性能である。我々は成功した伝達学習を実証する。タスクA上で学習された経路に沿ってパラメータを固定し、タスクBについての新しい経路の集団を再展開することにより、タスクBは、最初から学習することができるよりも早く、または微調整後に学習することができる。タスクBで進化した経路は、タスクAで進化した最適経路の一部を再利用します。バイナリMNIST、CIFAR、SVHNの教師付き学習分類タスク、およびPathNetsが一般的であることを示唆するAtariおよびLabyrinth強化学習タスクのセットニューラルネットワークトレーニングの適用性。最後に、PathNetはパラレル非同期強化学習アルゴリズム（A3C）のハイパーパラメータ選択の堅牢性を大幅に改善します。

【どんなもの？】

abc

【先行研究と比べてどこがすごい？】

def

【技術や手法のキモはどこ？】

ghi

【どうやって有効だと検証した？】

jkl

【議論はある？】

mno

【次に読むべき論文は？】

pqr
How Can a Fat Mom Raise a Healthy Kid?
By: Shannon Ashley
Tags: Health, Parenting, Life Lessons, Body, Lifestyle

“I want to be just like Mommy.”

The first time my daughter said that, it melted my heart and punched me in the gut. I am not the kind of mom who has all of her shit together. To be honest, I’m a single mama fighting back a mix of mental illness and more.

You see, I’m also fighting my body. To describe my body in a way readers might understand, I have to close my eyes; I’m far too used to seeing my body in a negative light. I have yet to give a successful description, however, because inevitably, my own words fall flat. I can see the beauty in other fat bodies, but I still struggle to see — and therefore describe — my own.

And when my readers realize I’m not just describing a fat mom, I’m describing a really fat one, their reactions frequently reinforce the idea that I don’t deserve body positivity because I am, apparently, too fat. And a mom that is “too fat,” they tell me, can’t possibly be healthy or good. It hurts to hear that.

A few months ago, a reader asked a question that’s been haunting me. After reading a story about my war with my body, and, after learning that I have lipedema and PCOS on top of disordered eating, they asked how a fat mom like me can possibly raise a healthy child.

Of course, it wasn’t so much a question as an implication. An accusation, even, that I can’t raise a healthy kid because I am way too fucked up about my body and food to not fuck up my daughter in the exact same way.

Well… fuck. Am I?
From Hard to Soft. How I Learned to Embrace My Inner Sensitivity
By: Johannes Thor
Tags: Self-awareness, Self Improvement, Life, Self Love, Hope

OK Joe, but why the crying?

I don’t know where the sensitivity comes from, but it’s always been there. Hallmark movies are made for people like me. My wife makes fun, lovingly, when I cry watching sappy movies. I’m always the only one that cries by the way, and I live with three women. I guess there’s a stereotype about the sexes we can throw away there.

What about the big stuff

Monumental life changes move me as well, like the birth of my children, but it’s different. The sensitivity I’m trying to put my finger on here is an intrinsic one. There needs to be a combination of an external trigger and a very deep, internal reaction.

The cheesy stuff breaks me

Imagine a scene in a movie. A couple that split up after high school meets again, years later. They’ve both had a series of relationships that didn’t last. The plotline weaves their lives together, and finally, they realize at the end their love for one another.

Works. Every. Time.

Sleepless in Seattle plays a variation of this theme, and I’ve never watched that movie with dry eyes.

Does it matter?

Perhaps there is an explanation of why I’m more sensitive in this way than many people. Maybe they even have therapy for people like me.

Because sometimes it’s hard to cry over something that most people find silly. But you know, I think I’m beginning to come to terms with it.

I’m a 6'3″ middle-aged man, and I cry over Hallmark movies, puppy videos, and acts of kindness. And what I guess I’m saying is, that I’m OK with that.
You Do Not Have to Be Young to Build Muscle
By: Zachary Walston
Tags: Fitness, Healthcare, Health, Exercise, Research

Photo: halfpoint/Canva

A recent study shows very elderly adults (>75 years old) can increase their muscle strength and size by participating in resistance training programs.

These effects were observed with resistance training interventions that generally included low weekly training volumes and frequencies. For strength, the interventions lasted from 8 to 18 weeks with a training frequency of 1 to 3 days per week. For hypertrophy (building muscle), the interventions lasted 10 to 18 weeks, with a training frequency of 2–3 days per week.

In a subgroup analysis that included only the oldest-old participants (80 + years of age), there was a significant effect of resistance training on muscle strength. There were minimal reports of adverse events associated with the training programs

*For larger research deep dives, check out zacharywalston.com and the Clinical Gap Podcast.
Meditation — A Biggest Blessing And Gift To Oneself
By: Ruchi Thalwal
Tags: Poetry, Spirituality, Life, Self-awareness, Meditation

I didn’t even know the word

When I first sat in meditation

It was on the school bus

I was hardly 10 years old girl

I still remember the humor

I and my friend sat in lotus posture

In the riot of chaos

Closed my eyes and I got lost

One naughty kid

kept my shoe in my lap

It startled me

forced me to open my eyes

It was hilarious, how it started

Never knowing how the journey would mold

It's on and off periodic mode

It stilled me to a great extent

where a place of no thoughts

was a blink away

Someone asked me how do you meditate

I was speechless as I was totally unaware

How this steady routine got imbibed inside

The trek to silence was automatic

All it requires is the dedication to sit

With the self and be still

The knack to slip in silence develops

without effort, if you are consistent

Meditate to experience the bliss

A place of peace is not far

Just close your eyes and it unfolds

It may seem difficult at first

As thoughts chew you up

If you wish, then try another method

Practice it alone or in a group

The benefits are exponential

a little push leaves you an all-time high

in the blissful reality of oneself!

Experiment and play around with it

Be comfortable, it not only for ascetics

Sit in your bedroom or on the terrace

Office space is also suitable

Just a bit of silence and time would do

Close your eyes and let it work for you

Don’t lose hope if you feel you can’t do

Give it some time and be kind to yourself too

Gradually it will fill your entire day

Start from daily 15 minutes of sitting

Be ready to be transported to the peaceful realm

It will engulf your entire existence

Making mundane life a meditative living

And the doer just disappearing

Without the doer, life flows uninhibitedly

Meditation to meditative living

Is the biggest blessing

All it did was gave you the red pill

Shattering the matrix of illusion

which the mind created

Living each moment as free

Liberated and being the life itself!
My Recommendations to Learn Mathematics for Machine Learning
Tags: Machine Learning, Data Science, Mathematics, Artificial Intelligence, Technology

My Recommendations to Learn Mathematics for Machine Learning

Here is a compilation of books, videos, and papers to get you started.

I have always emphasized on the importance of mathematics in machine learning. Here is a compilation of resources (books, videos, and papers) to get you going.

This is not an exhaustive list but I have carefully curated it based on my experience and observations.

This is a repost of my Twitter thread that you can find here. I will keep updating the list here as I come across more useful resources.

Mathematics for Machine Learning

by Marc Peter Deisenroth, A. Aldo Faisal, and Cheng Soon Ong

Source: https://mml-book.github.io

Note: this is probably the place you want to start. Start slowly and work on some examples. Pay close attention to the notation and get comfortable with it.
Evolution of the digital payment ecosystem: 7 key development points according to Bitupper
By: Maria Fomina
Tags: Ecommerce, Development, Payments, Blockchain, Cryptocurrency

It is expected that the space of digital payments will change significantly in the very near future. Already, we can predict seven trends, aimed at transforming the payment system in developing countries over the next five years:

⠀1. Technologies will simplify digital payments: biometrics, tokenization, cloud computing and the Internet Things are just a few trends that will determine how consumers interact in the future;

⠀2. Expansion of the network of sellers accepting digital payments will grow by 10x by 2020: mobile payment solutions and own payment networks will stimulate the acquisition of trading companies;

⠀3. Payments will stimulate consumption, and not vice versa: they will provide access to transaction data of customers, which will allow payment services suppliers to offer buyers interesting deals and coupons;

⠀4. Consolidation of technologies will lead to widespread distribution of digital payments;

⠀5. The modified UPI will become the main player changing the conditions on the payment market: The Unified Payment Interface provides an excellent platform for the smooth functioning of payment service providers;

⠀6. Digital identification of the client will speed up the payment;

⠀7. The number of non-cash settlements will grow: in the next few years, the digitization of cash will accelerate — non-cash payment transactions, which now are about 22% of all consumer payments, will bypass cash settlements by 2023.

⠀

Digitizing payments is a great opportunity. It’s estimated that by 2020, total payments made using digital payment instruments, will increase up to $ 500 billion USD, which is 10X times the current level.

⠀

The Bitupper aim: to use all available opportunities for representing the world of cryptocurrency as simple, understandable and convenient for each market participant as possible, offering advanced online banking tools in an understandable and user-friendly interface on all platforms. ⠀

Bitupper — that simple, for everyone.

Join us on Telegram.
Generate Contrasting Text for Your Random Background Color
By: David Dal Busco
Tags: JavaScript, Accessibility, Web Development, Design, Programming

Generate a Contrasting Text

To generate a contrasting text, we are using the following formula defined by the World Wide Web Consortium (W3C) to ensure that foreground and background color combinations provide sufficient contrast when viewed by someone having color deficits or when viewed on a black-and-white screen:

((Red value X 299) + (Green value X 587) + (Blue value X 114)) / 1000

The above algorithm takes a YIQ color scheme, converted from a RGB formula, as input and outputs a perceived brightness for a color.

Because I’m working with hex colors, the implementation needs two conversions before being able to calculate the brightness. It first needs to convert the input to RGB and then to YIQ colors.

Finally, with the help of a threshold value, it could determine if the contrast should be dark or light and provide as result a contrasting text color, either black or white.
Software Configuration Management and Tools: Why Are They Important
By: Galaxy Weblinks
Tags: Configuration Management, Versioning, Development, DevOps, Best Practices

Traditionally, configuration management was a manual task, undertaken by the Systems Administrator to carefully document the state of the system.

However, the industry has changed radically after the introduction of new automation tools, and developments in cloud computing and DevOps.

Managing the configuration of your VM (virtual machine)/server with automation tools is quite mainstream now. It is fascinating to see the automation reaching beyond VM and into the network to control the firewalls, the load balancers, and the rest of your infrastructure.

You can now automate and deploy an entire network and application in production without taking on any manual work to slow the process. That’s potentially a lot of man-hours saved with full orchestration and automation.

A lot of the configuration management tools are starting to integrate basic orchestration capabilities that will allow them to reach beyond that single VM, device, or application, and manage an entire service.

But before a dive into those popular configuration management tools, let’s have a look at a world with and without configuration management.
Testing Your React Apps With Enzyme
By: Victoria Lo
Tags: Programming, Test Driven Development, JavaScript, React, Testing

Enzyme Implementation

Now let’s learn how we can use Enzyme with Jest, a test runner in React, to write tests.

Step 1: Install Enzyme

First, we install the package:

npm install enzyme enzyme-adapter-react-16

Step 2: setupTests.js

When you create a new React app, there should be a setupTests.js file initialized by default.

Add the following code in that file to import Enzyme:

import { configure } from "enzyme";

import Adapter from "enzyme-adapter-react-16"; configure({ adapter: new Adapter() });

Step 3: App.test.js

In this example, let’s test our App.js file. Jest, our test runner, will run test files automatically if the file is:

Any .js file in a folder named tests . Any .js file with a name like [name].spec.js . Any .js file with a name like [name].test.js .

So let’s have an App.test.js file to test our App.js . In that file, we'll write some simple test like so:

In our first test, we use shallow rendering to isolate an individual component such as <App/> and make sure that it renders.

Our next test is a snapshot test to test if the UI renders correctly. According to Jest’s documentation:
Only cool people give themselves nicknames!
Tags: Comic, Friendship, People, Life, Cool

Sign up for Never Fear

By Never Fear

A new side hustle article, as well as a tip are sent out to you weekly for free! Take a look
3 Mistakes Developers Make When They’re in a Hurry
By: Szymon Adamiak
Tags: Programming, Education, Software Development, Development, Learning To Code

Not Reading Enough Code

Have you ever seen a movie where a programmer stares at a screen for a couple of minutes and does nothing? Me either. Usually, they type something at a breakneck pace and the problem is solved. Unfortunately, our daily job is not so glamorous.

We need to read code — lots of it. And besides reading the code, we should understand what it does and why.

Random code from the internet

Not reading enough code comes in many flavors. When was the last time you were looking for some answers online, found a code snippet on Stack Overflow, and pasted it? I probably did it this week.

There’s a big chance the code from SO works. But do you understand what it does, why it does it, and what the limitations are? Is it secure? How does it deal with edge cases and your requirements?

Sometimes, you have to paste code and pray it works. Some things are too complicated to fathom in the limited time you have. But usually, you can understand the code in 15-30 minutes. You should be reasonably confident you know the code you put into the project. If you don’t, you may compromise the project’s security and maintainability in the long term.

Code in your project

How about reading your project’s code? It’s the same old story: You’re called to fix a bug in the code part you’re not familiar with. Fortunately, you have a hunch and try to fix it immediately. It works, so you push the changes and get back to your business.

That’s a huge mistake. If you’re not familiar with the codebase and don’t have tests, the chances your fix doesn’t break anything and handles all the cases are small.

You always need to understand things before you try to fix them. Just poking around with random adjustments won’t cut it. You may be lucky once or twice, but sooner or later, you’ll break something big.

Code in the libraries

How many libraries do you add by default when starting a project? Are you sure you need them and understand how they are implemented?

I’m not trying to make a case for not using libraries and frameworks. You should use verified and well-tested code wherever possible. Reinventing the wheel is a common problem and can do more harm than good.

What I want to say is it’s beneficial to understand the tools you’re using. Popular libraries are often excellent pieces of software, and you can learn a lot by studying their codebases. This will let you become a more skilled developer or you may realize you don’t need a certain library. Either way, you win.

You don’t have to analyze every library you use, but when you use something time and time again, it’s worth taking a look at how it works.

Reading good code makes you a better developer and helps you understand your products. You may believe you don’t have time to read code, but that’s not true. Familiarity with your product’s code will speed up your coding, and reading other code will let you grow as a developer. So, in the long run, reading code will save you time — not waste it.
Adding a New Microservice
By: Varun Bansal
Tags: Event Driven Architecture, Software Development, Microservices, DevOps, Programming

Adding a New Microservice

Is it that simple? Oh wait, no!

Photo by revac film’s&photography from Pexels

Microservices are something that feels very natural when you have been working with monoliths in the past and are tired of the overheads and errors that arise in maintaining a monolith application.

My first microservice was a user service that would manage login/logout/auth for a user. We were adding more logins to our application because just one Google login wasn’t enough. I knew we’d be adding/removing more ways to log in users in the future. So I wanted to create a separate service to manage all this and not affect other parts of the application when we add/remove new login methods.

We agreed that a user service can take care of all this. After login, it would provide a token to the client that could then be used by the client to validate the user’s identity when calling other parts of our application (other services).

It was a success. We added more logins and configured the availability of different logins based on regions, and the microservice architecture helped a lot. We could independently deploy the user service without worrying about breaking something in some other part of our application. No matter what login method was used, the other services would always get an auth token to validate the user's identity.

It was all so elegant right from the beginning. All the operations related to managing a user can be handled by this service alone, and no part of my application needed to worry about it.

No doubt this is a very basic and simple use case for a microservice and might even be the status quo for an experienced microservice architect, but for me, it was a moment of joy. I had come up with a pattern to create a microservice on my own.

This decomposition of microservices (deciding if you need a microservice for something) can be so natural for such simple use cases that I was tricked into believing that microservices are easy and I somewhat had a handle on them. So naive!

A couple of other microservices later…
Three Different Things: November 14, 2019
By: Sean O'Brien
Tags: Venture Capital, AI, Data Science

Three Different Things: November 14, 2019

What Makes AI So Weird, AWS Data Exchange, and 2 & 20

1. What Makes AI So Weird, Good, and Evil

We sometimes find out that AI algorithms aren’t optimizing what we hoped they would. An AI algorithm might figure out that it can increase human levels of engagement on social media by recommending polarizing content that gets them into a conspiracy theory rabbit hole. YouTube has had trouble over this. They want to maximize viewing time, but the algorithm’s way of maximizing viewing time isn’t quite what they want. We’d get all kinds of examples of AI glomming into things they’re not supposed to know about. One of the tricky parts about trying to build an algorithm that doesn’t pick up on human racial bias is, even if you don’t give it information on race or gender in its training data, it’s good at working out the details by clues in zip code, college, and figuring out how to imitate this really strong bias signal that it sees in its training data. When you see companies say, “Don’t worry, we didn’t give our algorithm any information about race, so it can’t be racially biased,” that’s the first sign that you have to worry. They probably haven’t figured out whether, nevertheless, the algorithm has figured out a shortcut. It doesn’t know not to do this because it’s not as smart as a human. It doesn’t understand the context of what it’s being asked to do.

This is what it means to have bias inherent in the data. It’s not whether an attribute will directly inform an algorithm about someone’s race, sex, etc…. it’s that many other attributes combined will.

2. AWS Data Exchange — Find, Subscribe To, and Use Data Products

If you are a data subscriber, you can quickly find, procure, and start using these products. If you are a data provider, you can easily package, license, and deliver products of your own. Let’s take a look at Data Exchange from both vantage points, and then review some important details.

As someone put it on Hacker News put it, “Selling shovels in a gold rush.”

3. How VCs Make Money

The catch that many people outside of venture miss is that the management fee is charged every year of the fund’s life (which is usually around 10 years long). That means that a standard fund will charge 20% of the fund’s total raised capital in guaranteed fees and can only use the remaining 80% to actually invest in companies. A good rule of thumb is that for every $1 a LP provides, only about $0.80-$0.85 will be invested. Every time you hear about a new fund that raised a billion dollars, keep in mind that around two hundred million dollars will go to the firm for “operational expenses and compensation”. Most funds are only actively making new investments for two to three years and for the rest of the time the fund is in maintenance mode. Do you need $200M to operate a twenty person firm for four years and to keep the lights on to make follow on investments for the next six years? Not really.

I now understand why they have such beautiful live edge tables.
I Like It Hot!
By: James Finn
Tags: Creativity, Writing Challenge, Writing Prompts, Passion, LGBTQ

Where I live, we’re in the middle of HEAT. No rain, fierce sun, and daytime temps in the mid 30s. That’s 90s for my fellow Americans stuck in Fahrenheit land.

So what better Prism & Pen writing prompt? Do you like it hot? What do you like hot? For me, Marilyn Monroe and blazing beaches come to mind. But so do fiery protest marches, pizza just out of a wood-fired oven, and sexy men. The possibilities are endless.

Today, Prism & Pen issues a new two-week writing challenge: I Like It Hot.

It’s time to tell stories!

Read this challenge any way you like. We’re calling for fiction, creative nonfiction, and poetry. You can write about any kind of heat you can dream up.

What matters is you, your storytelling perspective, and your writing.
How Do We Change Our Thoughts?
By: Kimberley Payne
Tags: Religion, Depression, Christianity, Encouragement, Mental Health

Pastor Terry preached on thinking versus feeling

He explained that our feelings flow out of what we are thinking and he referenced the prophet Elijah in the Old Testament.

In 1 Kings 18:22–40 Elijah challenged the prophets of Baal to see whose God was more powerful. They set up an altar with a bull on it and stated that “the god who answers by fire-he is God.” The false prophets called the name of Baal all day while Elijah taunted them.

“Shout louder!” he said. “Surely he is a god! Perhaps he is deep in thought, or busy, or traveling. Maybe he is sleeping and must be awakened.”

Nothing happened.

But when it was Elijah’s turn to pray, God performed an amazing miracle and sent fire from the sky to burn up not only the sacrifice, but also the wood, the stones, and the soil that had been saturated in water.

It was an extraordinary display of God’s power.

I imagine that Elijah was feeling elated, exhilarated, and awestruck. I imagine that he must have felt on top of the world.

But it wasn’t soon after that he was feeling afraid, worthless, and desperate

Why the drastic change?

True change begins in our minds.

Elijah was listening to the threats of Jezebel to kill him. The Queen had heard of God’s victory and how Elijah had slaughtered the prophets of Baal and she sent a messenger to Elijah to say,

“‘May the gods deal with me, be it ever so severely, if by this time tomorrow I do not make your life like that of one of them.”Elijah was afraid and ran for his life (1 Kings 19:2–3).

Instead of thinking about God’s sovereign power, Elijah was thinking about the Queen’s threats.

Like Elijah, there are days when I allow my thoughts to be negative and follow them into the darkness where I then start to feel drawn out, irritated, and miserable.

How do we change our thoughts?

First, we must take stock.

Pay attention to what you’re thinking right now. Take the time to think about what you’re thinking about. Are your thoughts leading towards God or away?

Then ask the Holy Spirit to help to think good thoughts.

Listen to the Holy Spirit and ask Him to give you a mindset of gratitude, not entitlement; a mindset that thinks on things that are pure, lovely, and admirable (Philippians 4:8).

If you want to change the way you feel, you first must change the way you think.

Set your minds on things above, not on earthly things. Colossians 3:2

Originally published at https://www.kimberleypayne.com on June 17, 2019.
Dictionaries in Python
By: Ankit Gupta
Tags: Machine Learning, Coding, Programming, Data Science, Python

10) Copying a dictionary

I will explain this point using a simple example. There are more subtleties involved in the copying mechanism of dictionaries, and, I would recommend the reader to refer to this Stack Overflow post for a detailed explanation.

Reference assignment

When you simply reassign an existing dictionary (parent dictionary) to a new dictionary, both point to the same object (“reference assignment”).

Consider the following example where you reassign dic_a to dic_b .

dic_a = {'A': 'Apple', 'B': 'Ball', 'C': 'Cat'} dic_b = dic_a # Simple reassignment (Reference assignment)

Now, if you modify dic_b (for e.g. adding a new element), you will notice that the change will also be reflected in dic_a .

dic_b['D'] = 'Dog' print (dic_b)

>>> {'A': 'Apple', 'B': 'Ball', 'C': 'Cat', 'D': 'Dog'} print (dic_a)

>>> {'A': 'Apple', 'B': 'Ball', 'C': 'Cat', 'D': 'Dog'}

Shallow Copy

A shallow copy is created using the copy() function. In a shallow copy, the two dictionaries act as two independent objects, with their contents still sharing the same reference. If you add a new key-value pair in the new dictionary (shallow copy), it will not show up in the parent dictionary.

dic_a = {'A': 'Apple', 'B': 'Ball', 'C': 'Cat'}

dic_b = dic_a.copy() dic_b['D'] = 'Dog' # New, shallow copy, has the new key-value pair

print (dic_b)

>>> {'A': 'Apple', 'B': 'Ball', 'C': 'Cat', 'D': 'Dog'} # The parent dictionary does not have the new key-value pair

print (dic_a)

>>> {'A': 'Apple', 'B': 'Ball', 'C': 'Cat'}

Now, if the contents in the parent dictionary (“dic_a”) will change depends on the type of the value. For instance, in the following, the contents are simple strings that are immutable. So changing the value in “dic_b” for a given key ( 'A' in this case) will not change the value of the key 'A' in “dic_a”.

dic_a = {'A': 'Apple', 'B': 'Ball', 'C': 'Cat'}

dic_b = dic_a.copy() # Replace an existing key with a new value in the shallow copy

dic_b['A'] = 'Adam' print (dic_b)

>>> {'A': 'Adam', 'B': 'Ball', 'C': 'Cat'} # Strings are immutable so 'Apple' doesn't change to 'Adam' in dic_a

print (dic_a)

>>> {'A': 'Apple', 'B': 'Ball', 'C': 'Cat'}

However, if the value of the key 'A' in “dic_a” is a list, then changing its value in the “dic_b” will reflect the changes in “dic_a” (parent dictionary), because lists are mutable.
Want to Succeed in Life, You Need to Make Good Decisions
By: Leon Purton
Tags: Self, Success, Life, Psychology, Decisions

Photo by Michael Dziedzic on Unsplash

Decision-making processes

Life is the sum of all your choices — Albert Camus

There was an old man, sitting out the front of an electronics shop. I stood there debating the features of a sound system with the shop assistant, and the old man, who overheard our conversation offered this advice.

‘What are you really buying this for?’, he asked. ‘I want to enjoy my movies, and be able to play music from my phone’, I respond. ‘Which systems do that?’, he asked, ‘well, all of them’, I said. He smirked and said, ‘if you know what you want, you need to prioritise the systems against what is important to you, and the decision can be made’. I realised that if all of them did what I wanted, I actually wanted the best value, highest quality audio. So, I did the research and made the decision.

Mark Twain identified the dichotomy of decision-making as follows: “Good decisions come from experience, but experience comes from making bad decisions.”

As an example, here are the five steps you can use to make a good decision, they are a decision-making process and in essence, what I used to buy the sound system;

Identify the purpose of the decision. What are you trying to achieve with this decision and what goal are you moving towards? Gather information on your options, and bound the problem space. What are the potential paths forward? Assess your alternatives, what is off the table? Weigh the evidence and consider the consequences of each path forward. Make your decision and take action in the direction of that decision. Check and evaluate your decision.

This process offers comfort to people that prefer the guidance of process and the structure of the assembling their data and reviewing their options. But, there are some areas in which this process is compromised. This is the cognitive biases that we are often unaware of.

In assembling information on options, decision-makers will often turn to sources that support their sub-conscious preferences. For instance, in purchasing a sound system, I wanted good value. So I looked for the systems on sale.

The salesperson told me, ‘of all the sale systems, this is the best value’, pointing at one of the systems. He then went on to describe why that was the case, but by anchoring my starting point there, when I asked about the features of other systems, I was subconsciously comparing it with that one. I sort out data to support the fact that that one was the best value.

These biases are hard to identify, and as such you need to seek out differing opinions. Question your motivations, and review your decision criteria.

If this way of decision making seems to structured, or that there is not enough time to always follow a process for decisions. There is another way.
What Chronic Pain Taught Me
By: Leona Brits
Tags: Life Lessons, Self, Pain, Personal Development, Health

My first acute pain crisis started

With it, my whole life changed.

I spent months in severe pain, taking painkillers, injections, hot baths, having sessions of acupuncture and cupping. I had to give up the job I loved, I couldn’t handle it.

Even being physically incapacitated, the doctors couldn’t figure out what was my problem, my GP gave up finding the cause for my constant and acute pain. Thanks a lot, doc.

My private rheumatologist apologetically prescribed me more and more painkillers, saying she couldn’t find anything wrong with me.

After four months of living in suffering, where the simple act of breathing hurt, I went to a routine gynecology appointment — in truth, I went to save me the trouble of booking an appointment with my GP to get another prescription.

It was the first time I met this doctor. Seeing how I could barely move without manifesting pain, she stated: “there is something seriously wrong with you!” I have no idea what caused the blindness of all the other doctors, my suffering was so real.

After a simple blood test, a couple of days later, the doctor handed me a diagnosis of Ankylosing spondylitis, a rheumatic disease.

I can’t describe the relief I felt knowing I had a disease. Not only people would take me seriously now, but I could learn about it and fight it back! Which I did, in time.

In 2012, after changing my lifestyle, I got control over the disease. I still had pain, but it wasn’t incapacitating. I got back to my feet (literally), got a new job, went out with my friends again and even started to go to the gym!

Today, I’m not pain-free, but I have it under control most of the time. I still adjust my life according to it. I still get horrible nights and worse wakenings. Every single day I carry a pain: an ankle that gives me a funny walking for the day; my lower back, demanding a five-minute rest every hour; a stiff neck that stops me turning my head properly; and so on and so on. But I have my life back, and for that, I am grateful. And I am damn proud of my resilience.

Chronic pain is part of who I am. I didn’t want it to be, ever! But I was not given a choice.

During the two decades I lived with pain, I was tested to my limits. I discovered strengths and also weaknesses — I get so bitchy that I’m ashamed to even think about it. Those who know me well, have learned to maintain their safety distance when I’m in crisis.

Pain has been the most efficient teacher I had in my life. I’ve learned some lessons fast, others, it took me years. But it was always a learning process.
Remnants of Black Secrets
By: Tre L. Loadholt
Tags: Writing, Dusty Little Lies, Pretty Little Secrets, Horror, Nonet

Remnants of Black Secrets

She’s pregnant with swollen lies, serpent

In a stream of incredible

Habits — breaking right before

Their eyes, tombstone breaths press

At their shaky feet

Remnants of Black

Secrets fail

To sway

Them
Web Development in Python: Django Rest Framework: Serialization, Requests, and Response
By: Saranjeet Singh
Tags: Coding, Programming, Python, Web Development, Technology

Add Django Rest Framework

Install Django Rest Framework:

pip install djangorestframework

Add then add rest_framework in INSTALLED_APPS array:

INSTALLED_APPS = [ ... 'home', 'rest_framework' ]

Add Models

Run the following command to make the migrations:

python3 manage.py migrate

python3 manage.py makemigrations

You can learn more about models here.

Serialization

In DRF, serializers are responsible for converting complex data such as querysets and model instances to native Python datatypes ( called serialization ) that can be easily rendered into JSON, XML, or other content types which can be rendered by front-end.

Serializers are also responsible for deserialization which means it allows parsed data to be converted back into complex types, after first validating the incoming data.

Serializer Class

A serializer class is very similar to Django Forms and ModelForm class and includes similar validation flags on the various fields, such as required, max_length, default, etc.

We have our database with 3 fields ( topic, author, body ). However, we need to make some adjustment in order for us to take data from the user, store in the database, convert it into JSON, and send it back to front-end. In technical terms, the complex data type (in form of model instance ) first converted into Python Native Data Type, and later this convert to JSON data.

Add serializers.py

line 1: we are importing the serializers module from rest_framework.

line 2: we are creating a class name PostSerializers, which is inheriting from the Serializer class inside of the serializers module.

line 3,4,5: if you ever made forms in Django, you would see this is very similar to forms. We are creating the instances of the same fields as in our models.py file.

Add views.py

line 1: Importing the render method.

line 2: importing Post model from models.py file

line 3: importing PostSerializers

line 4: Importing JSONRender so we can convert the data to JSON type.

line 5: importing the HttpResponse just to display the output.

line 8: creating a functional view, which takes request as an argument.

line 9: new_post variable stores the object with id = 1 only.

line 10: we are serializing the new_post variable and storing that object in the serializer variable.

line 11: json_data variable storing the data as JSON, the JSONRenderer renders the request data into JSON.

line 12: it returns the value of the function as an HttpResponse in the form of JSON

we can add a few lines in our detailed function (post_detail.py) to show what is going on behind the scene.

you can check in your terminal, you will see some details of what these variables (new_post, serializer,json_data ) prints. It will be fun!!

Add urls.py

just add the endpoint for views we have created in the ecom/ursl.py file.

Add data to your table by going to http://127.0.0.1:8000/admin/home/post/ and click on the ADD POST button.
A STEP-by-STEP Guide to Getting a Google Internship
By: Shradha Sehgal
Tags: Women In Tech, Internships, Technical Interview, Programming, Google

Application process

There are a number of ways of getting an interview call. These are some of the common methods I have come across.

On-campus hiring

Google hires students for STEP from various Indian campuses towards the end of November. They shortlist students based on resume, transcripts, and relevant programming and development experience. Whilst GPA does have a role to play, it is not the only criteria, as the overall profile of the candidate is also evaluated. Do look to include your previous internship experiences and technical positions of responsibility, held within or outside of college, in your CV. Including personal and academic projects also helps boost your profile and highlight practical knowledge.

Google’s coding competitions

Google organizes various online programming competitions at different times of the year. These include (but are not limited to) Code Jam, Kick Start, and Hash Code. Google contacts people for internships and full-time roles based on their performance in these contests. This can happen year-round according to when the contest occurred. My teammate who secured a good rank in Kick Start was contacted in December to share her resume with the recruiter. Even if you are considering a different mode of application, it’s a good idea to take part in these contests as they highlight your interest in Google and serve as an enriching learning experience.

Referrals

If the above two procedures do not apply to you, you can always reach out to a Googler to refer you for the internship. This is more effective than applying directly on the website as it ensures that your resume is at least considered. Keep in mind the same points I listed above when designing your CV.

Miscellaneous

You can participate in various programs organized by Google in order to be noticed. The Google Women Techmakers Scholars Program is one example via which you stand a chance to interview at Google. You can keep track of more such opportunities on the Google Students page.
SciForce: who we are
Tags: Software Development, Healthcare, Data Science, Artificial Intelligence

SciForce is a Ukraine-based IT company specialized in development of software solutions based on science-driven information technologies.

We have wide-ranging expertise in many key AI technologies, including Data Mining, Digital Signal Processing, Natural Language Processing, Machine Learning, Image Processing and Computer Vision. This focus allows us to offer state-of-the-art solutions in data science-related projects for commerce, banking and finance, healthcare, gaming, media and publishing industry, and education. We offer AI solutions to any organization or industry that deals with massive amounts of data. Our applications help reduce costs, improve customer satisfaction and productivity and increase revenues.

Our team boasts over 40 versatile specialists in two offices in Kharkiv and Lviv — the regional capitals and the most rapidly developing IT centers of Eastern and Western Ukraine. Our specialists include managers, architects, developers, designers, QA specialists, as well as data scientists, medical professionals, and linguists.

With such organizational structure, we have the flexibility to help our customers both launch short-term small or medium projects and build long-term partnerships that would strengthen our partners’ in-house teams and change the vision of an offshore team from mere contractors to an important part of the organization with the corresponding motivation and loyalty.

Besides from the development of software per se, SciForce renders the full range of consulting services in deploying a new project or fine-tuning an ongoing project which needs re-evaluation or restructuring.

The philosophy of SciForce is not only to hire experienced professionals, but to foster specialists through mentoring and knowledge sharing. The dedicated SciForce Academy project helps us find young talents, which not only facilitates internal hiring and transfers, but also creates a productive atmosphere of mutual respect, trust and patience.

In our corporate blog, we are going to share our knowledge and insights into the frontier information technologies, provide expert opinions from our specialists and offer you a glance at our daily life.

Stay with us!
Ides
By: Deb Ewing
Tags: Poetry, Artificial Intelligence, Revenge, Shakespeare, A Cornered Gurl

Ides

this is why I need to scatter your pieces

Julius Caesar knife holder, photo and art by debora Ewing

Today I want to break

vessels that don’t belong to me —

not for dominance,

nor revenge

but to know who’s real.

Vigilance makes me weary.

If I prick you, will you bleed

or keep your drops close

— are you that spare

Or vindictive?

Are you banking

for future battles

— do you find me

unworthy?

The scales are a gift —

weight from my father;

my mother gave me

the blindfold.

I see only disparity.

I don’t carry shame

house to house

but I keep finding it

on my stoop.

Drones promise belonging

in the form of boxes

unacceptably shaped,

no return address.

This is precisely why

I need to scatter your pieces.

If this piece resonates, you may like:
Допоможи нам поширити цю новину!
By: Mollie Pettit
Tags: Community, Data Visualisation, Outlierconference, Data Visualization, Dataviz

Sign up for The 'Gale

By Nightingale

Keep up with the latest from Nightingale, the journal of the Data Visualization Society Take a look
You’ve Got to Be the One
By: Valentine Nnebe
Tags: Romance, Poetry, Creativity, Love, Fantasy

Should the days of my singlehood linger,

and my cold nights in bed remain,

yes let them linger, yes may they remain,

if you fail to be the one.

My childhood fantasies are intact,

I have my world raised on your pedestal,

your light is the light by which I see,

I’m warm in the heat of your thoughts.

You capture the height of my desires,

a parcel packaged to my luxurious taste.

You kiss an end to my longings,

the lovely steward to cater to my soul.

Wherever you’re kept on earth’s surface,

be it afar off in the Orient,

or walking the deserts of the Middle East,

I know we’re still connected in unseen ties.

You’ve got to be the one I’ll truly love,

the beauty who ticks off my alarms,

a diva at the center of my imaginations,

boiling to steam the pot of my passions.

You’ve got to be the one I’ve longed for,

your cares I’ll shoulder a thousand times,

blushing at the stain of your kisses,

a damsel artful with body language.

I want to wake up daily to your touch,

to a feeling warm with electrifying love.

Let your voice awaken my essence,

clear, polished in absolute femininity.

We’ll raise a tower from ashes of nothing,

we’ll birth an empire with the seed of love

we’ll reel in stupor, stagger from romance,

and stamp the earth with steps of bliss.

Wipe the tears I cried for your absence,

let your touch flush down my desperation.

Plant a promise kiss on my lips,

so it says you are here, now, always and forever.

I’ve found you and can’t find another,

you’re worthy for a ring to my finger,

you hold my whole attention for no other,

that my long search comes to an end,

When I know you’ve got to be the one.
Learn the Different Ways of Logging to the Web Browser Console
By: Mwiza Kumwenda
Tags: Programming, Angular, Software Development, JavaScript, Software Engineering

Learn the Different Ways of Logging to the Web Browser Console

Web console features to use for better debugging

Photo by Nubelson Fernandes on Unsplash

I must admit that when I was new to JavaScript, every time I wanted to log something to the web console, it would look like this:

console.log('log message ...!')

In this guide, I will discuss the alternative ways of logging to the web console so that you can be more efficient in your development workflow, for debugging purposes in particular.
Outlier — ¡Inscríbete para ser un ponente!
By: Mollie Pettit
Tags: Community, Outlierconference, Data Visualization, Dataviz, Conference

Sign up for The 'Gale

By Nightingale

Keep up with the latest from Nightingale, the journal of the Data Visualization Society Take a look
GitHub Repos That Should Be Starred by Every Web Developer
By: Mahdhi Rezvi
Tags: Github, Technology, Software Engineering, Work, Programming

GitHub Repos That Should Be Starred by Every Web Developer

A list of GitHub repositories that will help you immensely with your knowledge and work-life as a programmer

Photo by Caleb White on Unsplash

I recently found out about a repo with useful content (which is my number 1) and decided to dig in and put out a list of GitHub repos that will benefit newbies and professionals.

Here is my list. Do you have some favorite GitHub repo that should be on this list? Comment down below!