fabiochiu/medium-articles huggingface dataset:
Functional Programming With Java: map, filter, and reduce
By: Ben Weidig
Tags: Software Development, Coding, Functional Programming, Java, Programming

map

Stream#map(Function<T> mapper) is an intermediate stream operation that transforms each element. It applies its argument, a Function<T, R> , and returns a Stream<R> :

That’s the gist; map is pretty straightforward to use. But there are specialized map functions depending on the types.

flatMap

Stream#flatMap(Function<T, Stream<R>) is the often-misunderstood sibling of map .

Sometimes the mapping function will return an arbitrary number of results, wrapped in another type, like java.util.List :

var identifier = List.of(1L, 5L); Function<Long, List<String>> mapper = (id) -> ...; identifier.stream() // Stream<Long>

.map(mapper) // Stream<List<String>>

???

Most likely, we want to work on the list’s content, not the list itself. By using flatMap , we can map the Stream<List<String>> to a Stream<String> :

var identifier = List.of(1L, 5L); Function<Long, List<String>> mapper = (id) -> ...; identifier.stream() // Stream<Long>

.map(mapper) // Stream<List<String>>

.flatMap(Collection::stream) // Stream<String>

...

Optional<T>#flatMap

In the case of java.util.Optional<T> , the flatMap method is used to flatten the Optional back to its content:

Actually, the implementation of flatMap is even doing less than map by omitting to repackage the mapper's returned value into a new Optional .

Value-type map / flatMap

Until Project Valhalla with generic specialization arrives, handling with value types and generics is always a special case.

We could rely on auto-boxing, but we can’t deny that there’s an added overhead. The JDK includes specialized Stream types to improve dealing with value types:

If our mapping function returns one of the related value types, we could use the corresponding mapTo...(mapper) / flatMapTo...(mapper) to create a value-type-based Stream:

This way, we can get a real array of long , without intermediate boxing:

long[] hashCodes =

List.of("hello", "world")

.stream()

.mapToInt(String::hashCode)

.toArray();

forEach

As mentioned before, map is an intermediate operation. Many other languages use it to perform actions on all elements, discarding any return type, if not void .

We can use map just like that too, but there's a better way.

By utilizing the terminal operation Stream#forEach(Consumer<T>) , we apply the consumer on every element of the stream:
Stop Using Your Left Hand
By: John Mashni
Tags: Leadership, Self Improvement, Life Lessons, Personal Development, Entrepreneurship

Stop Using Your Left Hand

Sometimes it can hold you back

Most people are really good at something. And if they are not, then they most likely could get really good at something, with some time, practice, and initiative.

Most of us have some type of strength. Not always physical strength, but something else.

Some of us are smart. Some of us are great with people. Others can work well with their hands. Or are born to lead. Or are responsible.

And if you don’t have any apparent strengths — you’re well-rounded (which is a strength).

The number of strengths is too great to completely list.

But I have noticed that most people don’t use their strengths very often.

They focus more on weaknesses — on what they lack — rather than what they are really good at.
Brown Paper Packages
By: Jessica Lee Mcmillan
Tags: Nonfiction, Memoir, Christmas, Prose, Nostalgia

The brown paper wrapping would be wrinkled and sueded by the time our parcel made it across the country to my eager hands, which immediately went to work solving the overzealous tape-job my oma would perform to secure packages from Northern Ontario to her grandkids out West.

There was always the same tissue paper with a scent of something sweet and new, like the petrochemical sheen of new synthetic fabric. Invariably, the parcel would have several smaller packages inside, and for Christmas, a thrice-foiled stollen with a marzipan centre, made and preserved at least 6 weeks prior. I would spend $50 for the elaborate ingredients to make a stollen 20 years later only to make something that tasted of her absence.

The inner packages always had some give to them and it was satisfying to feel the contents give under my hands, plush in a plastic bag under crackle of paper. Was it pyjamas this time? Maybe it was a new dress or a hand-knitted doll clothes for my Cabbage Patch doll she drove all the way to Toronto in the winter to get, when most kids were not as lucky that year. The tears come readily when I picture her driving through the treacherous snow. I am filled with the aching humanity of what love drives us to do. I only hope to live every day to deserve the generosity.

Christmas does not feel the same without brown paper packages, the dry warm texture like a skin. But packages from oma had a special resonance coming from her hands, so gentle the way they cupped my chin in old photos. Her hands cradled the heart and textures of tradition that I live to give back.
How to Actually Deploy Docker Images Built on M1 Macs With Apple Silicon
By: Jon Vogel
Tags: Apple, Docker, Apple Silicon, Programming, Containers

Use buildx

Buildx comes with a default builder that you can observe by typing docker buildx ls into your terminal. However, we want to make and use a builder ourselves.

Make a builder

You will need a new builder, so make one with docker buildx create — name m1_builder . Now you should see the new builder when running docker buildx ls .

Use and bootstrap the builder

The next steps are to “use” the new builder and bootstrap it. Start with docker buildx use m1_builder and then docker buildx inspect — bootstrap , which will inspect and bootstrap the builder instance you just started using. You should see something like this:

computer@computer-m1 ~ % docker buildx inspect — bootstrap [+] Building 5.3s (1/1) FINISHED => [internal] booting buildkit 5.3s => => pulling image moby/buildkit:buildx-stable-1 3.1s => => creating container buildx_buildkit_m1_builder0 2.3s Name: m1_builder Driver: docker-container Nodes: Name: m1_builder0 Endpoint: unix:///var/run/docker.sock Status: running Platforms: linux/arm64, linux/amd64, linux/riscv64, linux/ppc64le, linux/s390x, linux/arm/v7, linux/arm/v6

You can see that this builder has a whole host of platforms it will build for!

Build with the builder

Now, cd your terminal into a place where you want to build and push an image so you can run this pseudo-command:

docker buildx —-platform linux/amd64,linux/arm64,linux/arm/v7 -t <remote image repository> --push .

You should see the “in use” builder go crazy and build the architectures you specified.

Manifest

Once your image has been built and pushed, you can inspect the manifest with:

docker buildx imagetools inspect <remote image repository>

You should see a manifest printout with all your different architectures. Most services that pull an image are smart enough to know which architecture to go get.

Clean up

Finally, as you might have experienced, Docker can start to take up a bit of disk space. If you did not use buildx , you probably ran docker system prune --all , the equivalent for buildx that is luckily semantically similar.

docker buildx prune — all

That’s it! Happy container development!
A Guide to Spirituality and the Pain of Longing
Tags: Personal Development, Life, Mental Health, Spiritual Growth, Self Improvement

A Guide to Spirituality and the Pain of Longing

Creating a playbook for a life of love, kindness, compassion, empathy, and wisdom

Photo by Ashley Batz on Unsplash

There’s a key element in the lives of all serious spiritual seekers that I call the pain of longing. It is a gnawing feeling that says, there’s more to life than I’m experiencing or that I’ve been told to expect. There is more, and yet I do not know what it is.

Most people go through their younger lives thinking about essential questions concerning the nature of the universe, their reason for being, etc.. These are often college conversations, conducted in a dorm room at 2:00 am after a couple of joints and listening to Pink Floyd’s Dark Side of the Moon.

After college, most of us get a job, create a family, watch football games, play video games, and just go through life without thinking about very much other than knee-jerk survival. However, there are some people who are stricken with the pain of longing syndrome. Eventually, they reach a state of depression, hopelessness, and confusion for their life lacks meaning. I was one of these people. For us, the pain of longing never diminishes it just gets worse, and the only way to relieve the pain is to do contemplation meditation and ruthless introspection. This can be a lifelong process. In time, some people find Jesus or Buddhism. Others numb the pain of longing with drugs or alcohol, and to avoid self-destruction become a Friend of Bill W. and attend 12-step meetings. Others, including this author, spend their whole lives walking on the Path, grabbing sound bites of wisdom here and there to sustain our souls, emotions, and mind.

During my personal journey, I had written a book called Spiritual not Religious: Sacred Tools for Modern Times. I brought the manuscript to various spiritual teachers for their opinions. The responses were quite interesting. This is the story of what happened.
Improve Your Debugging experience in Visual Studio Code
By: Yogesh Chavan
Tags: Development, Debugging, Programming, Nodejs, JavaScript

Improve Your Debugging experience in Visual Studio Code

With this useful feature that you might not be aware of

Previously If we want to debug Nodejs applications, we have to create launch.json file to specify the debug configurations.

To make debugging easier, VS Code has added a new feature to easily debug Nodejs apps.

Now with this feature enabled, VS Code automatically detects your Nodejs code and starts debugging session so you don’t need to specify your environment and other configurations in launch.json

Start debugging in VS code

Add a breakpoint at any line in your code by right clicking the area just before any line number in your code and select Add Breakpoint option

Adding breakpoint

2. If you have a package.json file then add debug script inside it

"scripts": {

"debug": "node --inspect-brk index.js"

}

package.json

3. Press Control + Shift + P or Command + Shift + P (Mac) to open command palette and type attach and then select “ Debug: Toggle Auto Attach ” option

Toggle Auto Attach option

4. Once done, open terminal in VS Code from terminal -> New Terminal menu. ( Control + Backtick shortcut)

5. In the opened terminal, execute following command

npm run debug OR yarn run debug

6. If you don’t have package.json , you can directly run

node --inspect-brk index.js

from terminal. Here, index.js is the name of file that you want to debug.

7. Once executed, you will see the debugger started and you can start watching variables and their values

8. Awesome! Enjoy

Debugging session

So using Toggle Auto Attach option, VS Code makes it very easy to debug Nodejs applications.

That’s it for today. I hope you learned something new.

Don’t forget to subscribe to get my weekly newsletter with amazing tips, tricks, and articles directly in your inbox here.
How to Teach AI and ML to Middle Schoolers
By: Ayaan Haque
Tags: Machine Learning, Tutorial, Artificial Intelligence, Education, Programming

Teaching Philosophy

The most effective way to keep young students engaged is to use positive reinforcement and encouragement to help them feel like they are understanding the concepts.

To introduce middle schoolers to AI, it is imperative to start with extreme basics. This begins by eliminating the perception that AI is terrifying robots that can operate completely independently. From our experience, most students instantly thought of AI as something out of Avengers: Age of Ultron. We needed to dispel their theories, first by clarifying exactly what AI is and by giving precise, accurate examples. We showed how AI is all around them, from Amazon Alexa to Netflix recommendations, which helped them gain a better understanding of what AI really is.

What most middle schoolers think AI is (Image source — Avengers: Age of Ultron)

Most importantly, to keep students engaged, they must understand why AI is important for them to learn. They should understand that most job opportunities in the future will require AI, and learning the concepts now will give them an advantage in high school and college. Additionally, providing some examples of fields that are shifting to the use of AI, such as medicine and economics, will interest students with all sorts of different interests.

Artificial intelligence is the simulation of human intelligence in machines that are programmed to think and act like humans.

To help middle schoolers understand AI/ML, the topics should be defined very simply and intuitively. We explained that machines will learn from their own results and run thousands of tests to improve. One great example for middle schoolers is as follows: An AI is a small infant that is shown squares and triangles over and over again until it can determine between a square and a triangle. This explains the basic concept of providing data and labels for a model to learn from in a commonly understandable way.

This is what you shouldn’t teach (Image source: KDnuggets)

Instead of trying to distinguish AI from ML, it is much easier to just say that they are very similar and essentially the same thing. Trying to differentiate the two will just confuse the already confused middle schoolers even more. This is a similar strategy to teaching elementary kids that 0 is the smallest number but then later teaching them about the existence of negative numbers.
Control freaks and psychological saftey — We bring Eric Olive on the podcast as a guest to talk…
By: The Team W
Tags: Trust, Eric Olive, Risk, Decisions

Control freaks and psychological saftey — We bring Eric Olive on the podcast as a guest to talk about the science of decisions and we ended up talking about control and safety. How do you create an environment of psychological safety? And how does that encourage creative collaboration?

Eric has also offered a list of articles and books for more reading which we’ve added below.

You can reach Eric at:

uiuxtraining.com

eric@uiuxtraining.com

Your browser does not support the audio element.

Articles

A Leader’s Framework for Decision Making by David J. Snowden and Mary E. Boone HBR November 2007

Fooled by Experience by Emre Soyer and Robin M. Hogarth

Leaders as Decision Architects by John Beshears and Francesca Gino — Harvard Business Review. Structure your organization’s work to encourage wise choices.

“Organizing and the Process of Sensemaking”, Organization Science, vol. 16, no. 4, pp. 409–421.

“The Identification of Solution Ideas During Organizational Decision Making,” Management Science 39: 1071–85. Paul C. Nutt (1993),

“Surprising but True: Half the Decisions in Organizations Fail,” Academy of Management Executive 13: 75–90. Paul C. Nutt, 1999.

Only for HBR (Harvard Business Review) Subscribers

Before You Make That Big Decision by Daniel Kahneman, Dan Lovallo, and Olivier Sibony. Harvard Business Review.

The Hidden Traps in Decision Making by John S. Hammond, Ralph L. Keeney, and Howard Raiffa. Harvard Business Review, January 2006.

Books

A More Beautiful Question by Warren Berger

Beyond Greed and Fear by Hersh Shefrin

Decisive by Dan and Chip Heath

Educating Intuition by Robin Hogarth

Focus by Daniel Goleman

How We Decide by Jonah Lehrer

Intuition at Work by Gary Klein

Nudge by Richard Thaler and Cass Sunstein

Seeing what Others Don’t by Gary Klein

The Art Of Thinking Clearly by Rolf/Griffin Dobelli

Winning Decisions by J. Edward Russo and Paul J.H. Schoemaker’

Human Tech is a podcast at the intersection of humans, brain science, and technology. Your hosts Guthrie and Dr. Susan Weinschenk explore how behavioral and brain science affects our technologies and how technologies affect our brains.

You can subscribe to the HumanTech podcast through iTunes, Stitcher, or where ever you listen to podcasts.
15 Old Water Towers of Berlin
By: Slava Shestopalov
Tags: Design, History, Berlin, Architecture, Photography

This water tower was part of the Charlottenburg gas plant but is also known as Wasserturm Gaußstraße. By the 2000s, you could also notice huge — higher than the tower — ball-shaped gas tanks nearby. However, nowadays, the tower stands alone among commercial and logistics facilities.

The tower seems to be in good shape, but broken windows and a welded door might indicate the structure is currently abandoned.

4. Wasserturm Prenzlauer Berg

District: Prenzlauer Berg. Height: 44 m. Built in 1875–1877. Info: Google Maps, Wikipedia.

This tower is the oldest and most well-known one and was functioning for over 70 years. Unlike many similar structures that are just elevated water tanks, Wasserturm Prenzlauer Berg also included apartments for machinery operators who used to work in the tower. And it’s probably the only Berlin’s tower that you can comfortably observe from the park on a hill — relaxing on a bench and sipping a refreshing drink.

5. Wasserturm Güterbahnhof Moabit

District: Moabit. Built in 1893. Info: Google Maps, Wikipedia (in German).
Our Little Home Cats Are Close of the Big Wild Felines
By: Daniel Roncaglia
Tags: Cats, Animals, Biology, Science, Taxonomy

The Cat (Felis Catus) is a friend of humans for at least 10,000 years. These small mammal carnivores are members of millions of homes.

The species is the only in the Felidae family domesticated. Cats have many similarities with wild felines: habits and appearances are close.

The small ones are part of the Felinae. The big ones are part of the Pantherinae.

Studies show that there was a common ancestor about six a 10 million years ago. A wild cat (Proailurus) lives about 30 million years ago in Euroasia.

The Latin names are the standard of modern biologic taxonomy. That is a discipline of botany that classifies the species of organisms.

The Swedish naturalist Carolus Linnaeus (1707–1778) changes this discipline.

He proposes the binomial nomenclature for animals and plants. The first name indicates the genus, and the second details the species.

The scientist organized names at a time when knowledge about nature was overflowing. About 4,400 species of animals and 7,700 of plants received the name by Linnaeus.

This concept comes up in the Systema Naturæ. The work has had several editions. The tenth, from 1758, is the beginning point of this terminology.

Cover of the 1758 edition of the Systema Naturæ.

On Internet Archive

System of Nature

Through

Three Kingdoms of Nature

According

Classes, Orders,

Genera and Species

With

Characters, Differences,

Synonyms, Places

These pages describe seven species: Leo, Tigris, Pardus, Onca, Pardalis, Catus, and Lynx.
How Rough Sex Can be Healing
By: Alexandra Tsuneta
Tags: Women, Relationships, Psychology, Sexuality, Sex

How Rough Sex Can be Healing

When you’re a control freak, sometimes the best way to get off is to let go.

Photo by Artem Labunsky on Unsplash

I am the epitome of a control freak; I’m tightly wound, always stressed, constantly working, my house is immaculately clean, and my brain basically never shuts down. I am anxious all the time, even when I dream I have stress dreams (don’t worry, I’ve been medicated for my anxiety for over half of my life). For me, sex is a huge stress reliever, and it’s pretty much the only time in my life that I can let go and be out of control of my sexual experience.

The ways in which somebody enjoys sex largely depends on who they are and their life experiences. For me, my life had been constantly out of control in my younger years which forced me to be who I am today. I’ve always been consistent, organized, and overly focused on what I can control. Sex, for me, has been the only time that I can truly let go. Of course, with the kind of sex I am talking about, you have to be with somebody whom you trust.

Rough sex, kinks, and sexual prowess are different for everybody; my husband and I, for example, have different sexual desires. The main difference is that he’s just down for whatever, be it vanilla sex or extremely rough sex, he just likes to have sex. I, on the other hand, have very specific things I am into, like choking, spanking, being tied up, being slapped in the face, dirty talk, etc etc etc. The list goes on and on, I’m not just into your generic, little spanks here, some light choking, hair pulling rough sex; I like to be dominated, I like to be completely out of control.

This may seem like two completely different things: a control freak who likes to be out of control. Maybe that’s my kink? Being out of control.
Fat Joe’s Story About R. Kelly Beating People Up In An Underground Chicago Fight Club
By: Dave Bry
Tags: Storytelling, Boxing, Ego Trip

“As part of a promotional campaign for his The Darkside Vol. 1 album, which was released last year, the PR/Cuban rapper shot a series of webisodes called ‘Fat Joe’s Tales From the Darkside.’ For Part 3, he tells about the time he was visiting R&B; sensation R. Kelly in Chicago and how he didn’t believe Kellz when the crooner told him he was a real bona fide thug.”

— Awl pals Ego Trip being Ego Trip, they have once again unearthed an amazing bit of hip-hop to share with the world.
Flutter — BoxDecoration Cheat Sheet
By: Julien Louage
Tags: Mobile App Development, iOS App Development, Flutter, AndroidDev, Android App Development

centerSlice Property

centerSlice is the same as 9 patch png in Android Studio. Is a technique used to scale the image in such a way that the 4 corners remain unscaled, but the four edges are scaled in one axis and the middle is scaled in both axis.

The Value of the centerSlice property is the Rect Class. We need to constrcut a rectangle from its left and top edges, its width, and its height. Let’s start to know the size of our picture.

Width = 320 & the Height = 190

The class we need to use is

Rect.fromLTWH(double left, double top, double width, double height)

Our centerSlice is the green rectangle in the middle of the picture. To create it we need to know the width of the orange rectangle and put it for the left value and the height of the purple rectangle and put it for the top value

Rect.fromLTWH(50.0, 50.0, double width, double height)

So we have tell the Rect class to move 50 from the left and 50 from the top of the picture and start drawing the rectangle from the yellow point marked on the picture above.

In the above picture we have the width of the rectangle is 220 and the height is 90 so the final class value should be

Rect.fromLTWH(50.0, 50.0, 220.0, 90.0)

The final code is

new Center(

child: new Container(

decoration: new BoxDecoration(

image: new DecorationImage(

image: new AssetImage('assets/images/9_patch_scaled_320x190.png'),

centerSlice: new Rect.fromLTWH(50.0, 50.0, 220.0, 90.0),

fit: BoxFit.fill,

)

),

child: new Container(

//color: Colors.yellow,

width: 110.0,

height: 110.0,

)

),



);

You can see that the four red square are unscaled. let give the child of the container more width and height.
The One Where We Stay in Touch
Tags: Friends, Writing, Friendship, Relationships

The One Where We Stay in Touch Agnes Follow Feb 15 · 2 min read

Photo by KaLisa Veer on Unsplash

There’s a version of us where we stay in touch.

There’s a version of us where your voice notes are my favorite podcasts: long, winding, whimsical, nonsensical recounts of your day, your take on Netflix series, Matcha smoothies, people who don’t know how to walk on the street.

There’s a version of us where you text me right after I write a blog post with your favorite lines, the typos I missed and the Grammarly corrections I ignored.

There’s a version of us where every Instagram story sparks a conversation, where you share screenshots of your Bumble matches and your boss’ emails and the list of terribly touristy things you are preparing for when I come to visit.

There’s a version of us where we visit each other.

There’s a version of us where we have 5 AM conversations: I eat breakfast and you eat lunch and we pretend that we are still chatting about work over avocado toast at our favorite cafe.

I’m sure of it.

Every birthday I don’t hear from you, I think of our other selves. Our better selves, going out on a Monday night because you insisted on starting your birthday on the dance floor.

Every promotion you don’t tell me about, I think of our better selves clinking glasses at the fancy sky bar we save for special occasions. Cheers.

Every holiday I go on, I see the version of us who could never agree on what to pack except for comfy shoes and a sexy black dress. I always pack too little, you always pack too much. I see a version of us where we are still sharing suitcase space.

Every failed date I go on, I imagine the version of us where I tell you over lunch and you blush at everything I say because you can tell the waiter is listening.

Every successful date I go on, I think of what you’d make of him. Would you laugh at his geeky jokes? Would you roll your eyes? Would you like him? What would you talk about when you met? what would he say? what would you say?

There’s a version of us where we don’t talk anymore.

There’s a version of us where you never leave.

There’s a version of us where I go with you and another where I leave and you stay.

There’s a version of us where we stay in touch.

That’s the one I like.
Weekly Writing Prompt: Resistance
By: Zane Dickens
Tags: Writing Prompts, Flash Fiction, Writing, Resistance, Microcosm

Weekly Writing Prompt: Resistance

All change faces Resistance, it’s part of the battle

Photo by Kevin Hellhake on Unsplash, cropped by author.

Resistance comes in many forms. These inner battles on occupied land take many shapes.

From Steven Pressfield’s artistic resistance, where we are our own worst enemies pushing back against our own dreams.

To the famous WWII French resistance immortalised in film as well as one of my favourites Allo Allo.

Then the most famous resistances of all — the Rebel Alliance. Fighting against the oppressive, Third Reich inspired, Empire in Star Wars.

Even retreating from war and coming back down to Earth, there’s plenty of resistance too. In our companies, there’s enough resistance to spawn a whole industry of change managers.

In our societies, we resist tyranny from within. From terrorists to freedom fighters. It’s usually victory that ensures the historical upgrade.

Resistance often appears regardless of the change itself. Inertia is ever-present in people, societies and the physical world. The universe itself resists all change to a degree.

But Resistance can be a good teacher. Disagreement is often healthy, and the resulting diversity is fertile ground for creativity.

You have 50 words to make us feel this inner battle

It’s up to you if the change is inside the person, in their society, organisation or the physical world.

Let’s make it more challenging this week, you cannot use the word resistance in the title or the text.

Remember the first story accepted gets featured for the week.

Viva La Résistance!
The Literally Literary Weekly Update #4
By: Jonathan Greene
Tags: Poetry, Nonfiction, Ll Letters, Fiction, Essay

One Last Note

We have 27,551 followers at Literally Literary. We have approximately 200 writers. Even with these tremendous numbers, most of the submitted works get less than 20 views. Why? Algorithms.

How do we combat this and support each other? Bookmark our homepage and once a day, come here and see what you missed. The only way we can be the kind of community we all want to be is to support each others’ works by reading them.

Our homepage has a Top 25–30 that is updated every single day with new works published in the last month. Below that, you will find our trending works and then the latest ones that you may have missed. Be a participant and read works from amazing writers that maybe you don’t follow yet, but might want to.
How to Build Custom Transformers in Scikit-Learn
By: Jake Miller Brooks
Tags: Machine Learning, Python, Feature Engineering, Scikit Learn, Data Science

FunctionTransformer

Let’s start simple with a great tool for on the fly transformations: FunctionTransformer. FunctionTransformer can be used for everything from applying a predefined function to a feature, to selecting specific columns in your feature set. The basic idea is that FunctionTransformer accepts a function (you can also pass an inverse function), and applies the function to the data via a fit_transform method. This makes it a great tool for uncomplicated transformations that can be encapsulated in a simple function; you can almost think of this as the “lambda function” of scikit-learn preprocessing. We demonstrate a few use cases below.

Selecting Features:

Here we use FunctionTransformer to select two of the thirteen features in the full Boston Housing dataset.

Output of the above Code (Image by Author)

Simple Transformations:

We were able to select the features we wanted, but perhaps we’d like to scale the values of the ‘CRIM’ (Crime Rate) feature. We could use StandardScaler, but instead we’ll apply a log scale to demonstrate how to use FunctionTransformer to apply simple functions on the fly.
#085 | Debugging Vue Sites Displaying Blank Pages
By: Kelvin Zhao
Tags: Vuejs, Website Development, Debugging, Code, Vue

So I had this bright idea to consolidate all my side projects under a common sub-domain — lab. The only reason why I decided to do this is that my DNS records are getting a little messy, with each sub-domain adding a couple of lines. This is purely my OCD at work, I know.

The Problem

Now, my initial thought was to simply create a lab project, dump all my side projects into separate folders in it, upload them and call it a day. Which sounds fine in theory, except each of these projects is a single-page Vue application with some internal configs set up long ago.

I was hoping I don’t have to go back and compile them again but alas, after I uploaded the site, the sub-folders all turned up as empty pages. I actually spent the next 6 hours trying to debug this issue because there were no console errors, no indication of what went wrong and worst of all, it was a combination of two different things that caused this, which made things that much worst.

I did try to post this issue on StackOverflow, but without any error message and no way for me to recreate this error from a bunch of old projects, my post was eventually closed.
Solstice Joy
By: White Feather
Tags: Solstice, Nonfiction, Winter, Holidays, Life

Solstice Joy

Best wishes from a solar freak

Photo by Dawid Zawiła on Unsplash

I am always overcome with a wave of happiness on the Winter Solstice. This is because of the knowing that the days will now start getting longer again. I guess it is part of being a solar addict freak.

To me it is inspiring that I can experience this happiness on the shortest, coldest, darkest day of the year. Sadly, on the Summer Solstice, the day with the most amount of sun of any day (in the Northern Hemisphere), I feel a wave of dread knowing that the days begin getting shorter.

Are these expectations part of what helps maintain the planet’s wobble? Or are they just personal reactions? Is it a natural part of being an Earthling?

I have been delighted to learn that from one of the windows in my new apartment I can watch the sunrise for about two weeks before and two weeks after the Winter Solstice. This is nice when there are six inches of snow on the ground and the temperature is below that of a polar bear’s frozen margarita. Thanks to the buildings and trees, the rest of the year I have to go outside to find an unobstructed view of that precious moment when the sun pokes its head above the horizon.

I hope all you other Earthlings, no matter where on the planet you are, are enjoying your experience with the Winter Solstice.
Medium Writing and Marketing Tips For You
By: Quy Ma
Tags: Writing, Blogging, Advice, Ｍedium, Writing Tips

Medium Writing and Marketing Tips For You

What do you need help with?

Image by wiredsmartio from Pixabay

I joined Medium in September 2020, almost exactly three months ago at the time of writing this. In those 3 months, I’ve proudly achieved a number of personal accomplishments on the platform. They include the following.

The first story I wrote on Medium was curated and published by the biggest active publication on Medium. Achieved Top Writer in 5 topics including Writing. My name is alongside some other great Top Writers on Medium I’ve followed since Day 1. Grew my following to 2,100 followers on Medium in three months. Founded this publication and quickly gathered almost hit 1,000 followers in two months. Had several stories climb above 2,000 claps.

You each will have your own list of personal accomplishments on Medium too. But I would be lying to you if I told you the path to good achievements was easy or effortless.

For me personally, I did a lot of research. I spent hours studying Medium writers’ styles and niches. I read many stories and engaged with lots of writers. I networked, asked questions, and made mistakes. But I set my goals and I moved forward, step by step.

To clarify, I’m not promising if you follow my advice that you’ll hit the same numbers I did in the same timeframe, if at all. I want to be realistic with you. I was and still am new to Medium and I didn’t know what the standard growth rate for a Medium writer was.

When I first started on Medium, I joined several Facebook writer groups and followed Medium writers that had started around the same time as me. I wanted to grow and learn as much as I could about the platform. After I realized that my rapid growth on Medium was an uncommon pattern among my Medium circle, I self-reflected on the reasons on what could have contributed to it.

I remember after my first month on Medium, a Facebook group I was part of had a thread that asked, “How are you doing so far on Medium?”

I answered, “Hey all, first full month on Medium and I’m over $130. Not sure if that’s good or not, but I’ll keep going!”

I received a reply, “lol. Yeah, that’s really good. I only hit $6 and I’ve been on Medium for months.” Oops! I felt bad. I didn’t mean to sound like I was bragging so I quickly apologized. She assured me it was fine and she didn’t interpret it that way.

I had no idea what the average earnings were or how other writers were faring. Hell, I cringed when I told people I’m a writer. I can’t be a writer — I’ve only started three months ago!
Deep Dive into the FRI Protocol
By: Idan Perl
Tags: Cryptography, Development, Blockchain, Cryptocurrency, Ethereum

The goal of this write-up is to expand on the mathematical details of “FRI”, a low-degree testing protocol, a key component of ZK-STARK, a computational integrity proof system that has been gaining a lot of attention with the rise of blockchain technologies. Since our focus will be on the mathematical details rather than the high-level overview of blockchain and ZK-STARKs, it is advisable to first understand the background and context of the problem this protocol aims to solve, for which we recommend reading Vitalik Buterin’s excellent introductory posts: Introduction to ZK-STARKs and Introduction to the FRI algorithm.

Put simplistically, ZK-STARK is a protocol that allows an entity to prove to another entity some computational claim. Examples of such claims are:

“I have calculated the first 1,000,000 elements of the Fibonacci sequence”.

“I have a secret key SK that corresponds to the public key PK”.

“This Bitcoin transaction is valid”.

With ZK-STARKs one can prove such claims in a succinct way, meaning that a verifying entity need not re-execute the computation, rather she can just validate the proof itself, a much simpler computational task. The proof is also publicly verifiable, and no interaction with the prover is required.

Another key feature, especially in the context of blockchains, is Zero-Knowledge: The verifier does not learn anything other than the validity of the claim. In the transaction example above — the verifier can verify that the transaction is valid, but she does not learn the identity (public key) of the payer, nor of the payee, nor the amount being transferred.

There are quite a few such proof systems out there, each with their own pros and cons, and their comparison is beyond the scope of this post.

To prove a claim, the prover encodes the claim as a polynomial equation, and the validity of the claim is derived from verifying two facts: that the equation holds, and that the polynomials in the equation are of degree smaller than some integer d known to the verifier. FRI (a really short acronym for “Fast Reed-Solomon Interactive Oracle Proof of Proximity”) tends to the second item. It is a protocol that allows the prover to provide proof that a function

f: F → F is the evaluation of some degree <d polynomial.

The organization of the text is as follows: we first describe and analyze a naive approach for low-degree testing. Then, we describe the FRI protocol, stressing its advantages over a straightforward protocol. Following the protocol, we address the main goal of this file, which is giving the mathematical background and details showing that the protocol is complete, meaning that an honest prover’s proof is always accepted by an honest verifier. Finally, we address the soundness of the protocol. We give an example of a proof of a false claim and analyze the probability that it is nonetheless accepted by the verifier.

Since this text contains a lot of mathematical symbols, it is presented below as an embedded pdf. Enjoy the read, and for any comments, feel free to contact me at idanp@orbs.com.
Party Girl’s End
By: Ema Dumitru
Tags: Poetry, Photography, Writing, Poem, Chance Encounters

Party Girl’s End

Poetry

PARTY GIRL by Ema Dumitru

I put myself together for you.

Woman who has drowned

herself in the flesh.

Woman who can clench

and unclench the soul like a fist.

Ready to drop on the world.

This silhouette bears your name

with the pride of the first drop

of blood on a fresh sword.

You are drawn to my sound.

I am pure like lament or rain.

Unknown to you, yet I occupy your mouth.

You deny me, but I persist in you. Song,

you hunt my rhythms in others.
Blind UNION-based SQLi with Python
By: Vadim Polovnikov
Tags: Python, Hacking, Sql, Infosec, Cybersecurity

See how Python can beat Burp Suite in brute-forcing speed and boost your hacking efficiency.

Retrieved from www.analyticsinsight.net

[Scenario]

Once, I was sharpening my skills on blind SQL injection by enumerating a vulnerable web application. I found the trivial username ‘administrator’ and his password length using conditional statements within the cookie field:

‘ UNION SELECT ‘a’ FROM users WHERE username=’administrator’ AND length(password)=20--

What was the indication that this is a successful SQLi hunt? Let’s see what the BurpSuite Comparer has to offer:
Why A Humanitarian Invented The Machine Gun
By: Erik Brown
Tags: Technology, Engineering, Business, History, Culture

Why A Humanitarian Invented The Machine Gun

The Gatling gun turned individuals into replaceable parts

Gatling Gun — Via Pixabay / Picture By Jazella

“For the first time in history, death was automatic….doled out in sweeps and clusters, in reeling multiples, instead of one by one. Hence a world that had been moving steadily toward…a thoughtful and human acknowledgement of the uniqueness of the individual, suddenly was forced to contend with the appalling opposite…Death was mechanized. Human beings were interchangeable, just as were the parts in other new machines…” — Mr. Gatling’s Terrible Marvel, Julia Keller

When we think of great inventors in history the normal group of names might be mentioned: Tesla, Edison, Watt, and Marconi. However there’s another inventor who might be as influential, but less readily known. Then again, you may not recognize the man’s name, but you’ll recognize the name of the invention which bears his name.

The picture above will be instantly recognizable by many as a Gatling gun. Doctor Richard Jordan Gatling’s invention made an incredible mark on humanity. As Julia Keller points out in her book, modern guns are still referred to as “gats” by some — a tribute to the weapon of his name.

Gatling’s weapon was the first true “machine gun” that enabled a single person to wipe out lines of other human beings indiscriminately. It also suddenly awoke humanity to the idea of a machine efficiently destroying individuals as if they were assembly line pieces.

Gatling created a mark that’s resounded in our collective subconscious ever since. The idea of a machine turning on humanity — a machine capable of turning individuals into faceless stalks of wheat to be cut down. You can see it in the movies, novels, and television shows we watch and read on a regular basis today.

How many stories involve a machine created by man turning on its inventor or mankind in general? The Terminator series, Ex Machina, just about every episode of Black Mirror, Westworld, Transcendence, and The Matrix — all of these might owe a nod to Dr. Gatling.

Except the doctor’s invention wasn’t a story of fiction. It was a shiny metal machine of excellent design that was real. It turned human beings into bowling pins and it was strangely created for a humanitarian reason.

Join me for the strange story of Dr. Gatling, the inventor who created the machine gun for the most humanitarian of reasons.
How Big Tech and European Policymakers Work Together For a More Ethical A.I.
By: The Un Brief
Tags: Technology, Europe, Artificial Intelligence, UN, Cybersecurity

There is an on-going debate on why Europe does not produce as many unicorns as the US, but in his view that misses the bigger picture in terms of research output, where Europe stands out and, as he points out:

“There is one misconception about Europe and that is, in terms of regulating technology, in terms of placing guardrails around technology, Europe is, in many ways, perhaps the global superpower, with the General Data Protection Regulation (GDPR), in terms of protection and regulation on privacy issues. It began here in Europe and it’s now spreading across the world, many countries are adopting similar legislation.”

We spoke about the opportunities that artificial intelligence, AI, offer for improving healthcare, the most recent example being the response to COVID19 crisis, how quickly the international research community has established cooperation across borders, thanks in great part to advances in machine learning, and the good and ethical uses of AI.

Microsoft is engaging with European policy-makers in matters of AI for Peace and Security in cyberspace as well. The accelerated digitalization of all sectors of the economy is also guiding Microsoft’s agenda in the coming quarter.

Working in tandem with the UN, and looking at its recent publication on the countries’ digital readiness index, the attendant issues of cybersecurity that have to be informing this rapid process of economic transformation, and which countries need to invest more, are on the radar of Klinge’s and Microsoft.

“Governments have the ultimate responsibility, of course international organizations as well, but the private sector will have to step up to the plate and really deliver in cybersecurity as well,” stated Klynge, mentioning the work of the UN Open Ended Working Group, and the Government Group of Experts that address responsible norms of behaviour in cyberspace and its operationalization.

This presents opportunities for international cooperation, between countries, civil society, and the private sector, as seen on the increased commitment by Microsoft to engage with multilateral organizations, with the opening of its first office for UN Affairs, headed by John Frank, a veteran of Microsoft in Europe, where he used to lead relations with the European Commission and the European Parliament.

The Paris Peace Forum is also another important venue for debating the pervasiveness of technology in all sectors of the economy and its impact in society, says Klynge: “You have more than a thousand signatures, both from the private sector and from the public sector, acknowledging that cybersecurity is not something on the fringes of what we should focus on.”
Against
By: Sean Zhai
Tags: Environment, Social, Entertainment, Poetry On Medium, Inspiration

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

Follow
Conoce ‘Event Market’, la clave de éxito para tu marca
By: Daniela Rivas
Tags: Marketing, Branding, Events, Boletia College, Engagement

in In Fitness And In Health
以前は、ローソンもこのやり方でしたね。私も仕事帰りにピコピコと数値を入力していました。だんだん、コンビニや宅配所受け取りになっていくのでしょうかねえ。
By: 隆之介 Codenetjp
Tags: Business Strategy, Amazon, Digital Marketing

in In Fitness And In Health
How UX Engineering can Fuel Product Development
By: Steve Saul
Tags: User Experience, Technology, Software Development, UX, Engineering

How UX Engineering can Fuel Product Development

A six-step process for incorporating User Experience Engineering to build and test new features and product ideas quickly

Start-ups are scrappy survivors: they must innovate constantly and adapt quickly if they want to have any chance at upending the proverbial status quo. Success hinges on a forward-thinking approach, the ability to use a variety of tools, and an opportunistic approach to learning. As a start-up matures into a larger, multi-department company and development resources are dedicated to support and maintain core products, it’s difficult to fuel the engine of innovation that helped launch the start-up into orbit in the first place.

Without the ability to build quickly and run user tests or other experiments, there’s likely a growing backlog of potentially game-changing enhancements, features, and product ideas that might never come alive. Incorporating User Experience Engineering is one way to re-ignite the team’s spirit of innovation. UX Engineering is relatively new and goes by many names (at Amazon, it’s called “Design Technology”), but here’s the general idea:

UX Engineers combine UX Design and engineering expertise into a single discipline, and are able to develop, prototype, and test innovative UI solutions that push the envelope on front-end engineering and inspire development teams and leaders to invest in new ideas.

In pioneering UX Engineering to Fanatics, I’ve had the opportunity to not only define the role itself at our organization, but to build a process around it, too. While there was a significant investment of time configuring a development environment and setting up the tools that our team uses, the biggest challenge was around strategic challenges like:

Which ideas get developed into prototypes?

How complex can our prototypes be?

How can we quickly build a prototype that works with our existing codebase?

How are these features/prototypes tested and measured?

What kind of deliverable is useful to engineers? What will they do with it (if anything)?

How can we ensure our learnings (from both successes and failures) support further product/feature development?

Bringing UX Engineering to Fanatics was a great learning opportunity — both personally and for our team — and I wanted to share some of what we discovered while developing our process here. Using the guiding questions above, we distilled our process into six steps: Identify, Simplify, Build, Measure, Ship, and Share.
Inspiration: Classical Sass
By: Kathy Jacobs
Tags: Poetry, Celebration, Writing, Chalkboard, Inspiration

Thank you, my friend, for being you!

Borrowed with permission from Classical Sass herself

Always writing, always caring, always connecting

Love the passion and the caring of you, wonderful lady

Willing to put your heart on the line

Willing to share whether the words flow or not

Making me laugh, making me think

Making me wish I could write as much, as well, as often

Hero in the making, music loving, teaching, sharing

I am inspired by you more and more with every piece I read.

Let the world know who inspires you. More about this latest Chalkboard collaboration: