fabiochiu/medium-articles huggingface dataset:
The Brains of Babies During Emotional Maturity
By: Synthia S.
Tags: Neuroscience, Babies, Psychology, Brain, Emotion

As humans, it is largely believed that we are born with the ability to showcase complex emotions. While this may feel true on some fronts, we weren’t born with the level of intense and mature brain circuitry that we possess as adults.

While scanning the brains of newborns, researchers found that the parts of the brain associated with emotion, are not as functionally or optimally connected to the regions of the brain associated with auditory or visual stimuli.

Analyzing the brains of 40 newborns that were less than a week old using functional magnetic resonance imaging (fMRI), the same researchers compared these babies to fMRI scans from 40 adults who participated in another study surrounding the brain.

As adults, our brains can make various connections to the deepest corners of our imagination, such as allowing us to feel emotional complexity, like the mixture of fear and arousal when watching a film that features an attractive but frightening villain.

Photo by Tyler Nix on Unsplash — Let’s pretend he’s a stylish villain.

As adults, we are also able to emotionally regulate ourselves across various social contexts, such as life-threatening situations where we cannot showcase how we truly feel. Babies cannot immediately do this, and it makes sense, given that they have yet to develop those bonds and experiences.

More specifically, when you’re an adult, there is one particular functional connection that contrasts from babies, the amygdala, a major part of the brain associated with emotions, and the occipitotemporal cortex, an area associated with processing emotionally-charged but visual stimuli, such as objects, faces, and bodies.

However, as adults, the same amygdala is not as strongly connected to the other functions of the occipitotemporal cortex, such as consciously detecting lines, edges, angles, and lights, as they’re not as intellectually or emotionally stimulating.

When you’re a newborn, all connections of the amygdala towards the occipitotemporal and auditory complexes are generally similar. It’s a curious finding since it is largely believed that babies are born with a large level of neural connections, where these connections become readjusted, stabilized, and reinforced in the years that follow.

Photo by Jenean Newcomb on Unsplash — This baby is also shocked as well.

Since babies aren’t born with the ability to understand complexities surrounding emotion, newborns are basically like little scientists, scanning and assessing the environment and the people operating within it, before making those final decisions that shape their formative years.

Even if the analysis performed by babies is at a basic level, it’s rather fascinating. The next time you see or interact with a baby, you might find yourself wondering how much wisdom is harboured inside their tiny heads.
Decoding My Newborn Son’s Expressions
By: Traelynn Gee
Tags: Moms, Newborn, Baby, Funny, Family

Decoding My Newborn Son’s Expressions

My son.

1. Mmm. Nice and full.

2. Why are you doing this to me?

3. What is this flash of light, I’m trying to sleep!

4. Toooo much milk.

5. What a lovely dream…

6. Pooping for you, mom.

7. Is sister always this LOUD?

8. Hang on, I have to sneeze.

9. Did somebody say milk?
Call me Pops! — Advice For My Granddaughter (Born Today)
By: John Matterson
Tags: Grandparents, Advice For Life, Baby

Your mom and dad helped me pick the name you will be asked to call me. They tell me Pops is common in Newfoundland, and I will admit it has a bit of jazzy sound to it. I also think it is pretty easy to say which will be great for you when you are just learning to talk. I won’t mention your name for now since I’m not sure yet how you feel about social media.

I am excited about getting to meet you and spending lots of time with you. It might take a little longer than I would like for me to hold you for the first time, but we are strong and will adapt to Zoom.

As new parents, your mom and dad are going to get all kinds of advice on how to raise you. The’ve got your covered. You won’t need any advice for a while. Your job is pretty simple to start with. Food goes in, waste goes out. That’s it. Relax and enjoy that while you can. The expectations will only grow.

You will likely hear that you have someone else’s nose, eyes, ears, etc. Don’t worry about that stuff. The don’t mean it literally. You are all you. Those are just expressions. You will also hear that you are only smiling because you have gas. What do they know, maybe you are smiling because you think farts are funny? Keep that sense of humour. It comes in handy.

It won’t be long before you get taught that a cow says “moo”. Franky, I don’t understand the point of this. I have seldom talked to a cow, and when I did, “moo” did not come up. Just go along with this game though. It will make your people happy.

I have one request. When you can move around pretty well on your own — maybe at 2 years old or so — I want you to jump into your Dad’s lap — elbows and knees first — when he’s not expecting it. I feel like he’s owed a couple of those.

At some point, you will start learning to be your own independent person. When that time comes, here is some grandfatherly advice.

Be passionate about whatever you do.

Tremors are a sign of coolness.

Love Pops!

Published
An Ode to Ivy
By: Emily Wilcox
Tags: Writing, Poem, Poetry On Medium, Baby, Poetry

An Ode to Ivy

Photo by Sam Goodgame on Unsplash

The very soul of nature,

Lies right there in her eyes.

In all her ethereal features,

And her miniature size.

This tiny new being,

This gargantuan love,

Like every smile, every finger,

Plucked from a star up above.

She’ll change the universe this one,

It was clear from the start.

Like Ivy hugs the walls of a home,

This girl, she’s clung to our heart.
Removing duplicates with Map in JavaScript
By: Alex Khomenko
Tags: JavaScript, Maps, Web Development, Javascript Tips, React

It is quite common to use Set to remove duplicate items from an array. This can be achieved by wrapping an existing array into Set constructor and then transforming it back into array:

This works great for arrays of primitive values, however when applying the same approach to array of arrays or objects, the result is quite disappointing:

This is because Set compares non-primitive values by reference and not by value, and in our case all values in array have different reference.

A bit less-known fact is that Map data structure maintains key uniqueness, meaning that there can be no more than one key-value pair with the same key. While knowing this won’t help us magically transform any array into array of unique values, there are certain use cases which can benefit from Map's key uniqueness. Let's consider a sample React app, which displays a list of books and a dropdown that allows filtering books by their authors.

For simplicity books array is hardcoded here, although in a real-world app the data will be probably fetched from an API.

The app is almost complete, we just need to render the dropdown of authors to filter by. A good way to approach it would be to collect the id and name of each author from our list of books into a separate array and render it as options inside the select . However, there's one condition - this list should contain only unique authors, otherwise authors of more than one book will appear in the dropdown multiple times, which is something we don't want to happen. We need both id for option's value and name to display the option's label and since the author's data is contained inside an object we can't just apply the Set trick to get unique values only. One option would be to first get all the id s for the authors into an array, then apply Set to it in order to get unique ones and after that iterate over the authors array once more to collect their names based on the id s. That sounds like a lot of work, and luckily there's an easier solution.

Considering that we basically need an array of id - name pairs, we can extract those from the books list and transform them into a Map , which would automatically take care of preserving only the pairs with unique keys.

That’s it! Now we have a Map of unique key-value pairs, which we can feed directly into our select component.

It’s worth keeping in mind that when Map preserves key uniqueness, the last inserted item with the existing key stays in the Map , while previous duplicates are discarded.

Luckily, in our example app all the author id - name pairs are unique so we don't need to worry about accidentally overwriting any data. Now we can combine everything into the final version of the component.

Originally published at https://claritydev.net.
Working with maps in python using Mapbox and Plotly
By: Rahul Bhadani
Tags: Map, Plot, Plotly, Data Science, Python

API Token generation

To generate a Mapbox API token, go to mapbox.com, and signup for an account. Once you log in, you can generate a token at https://account.mapbox.com/. Press +create a token button and it will generate two tokens: public and secret. Note down the public token that you will need for use in plotly .

We will also need a map style that can be created at https://studio.mapbox.com/. I have already created a map style whose access URL is mapbox://styles/strym/ckhe4yk7d04hi19kcu9878xyv

Plotly Express and Scatter Mapbox

Plotly since 4.12.0 can be used in the localhost. In addition to that, we will need kaleido that can be used for capturing static images of interactive maps.

pip install plotly==4.12.0

pip install kaleido

Plotly provides a high-level wrapper called plotly express that can be used for overlaying GPS data on a map.

Let’s begin with imports:

import plotly.express as px

import plotly.io as pio

import plotly.offline as pyo

# Set notebook mode to work in offline

pyo.init_notebook_mode()

The full data file can be found on my GitHub repository https://github.com/rahulbhadani/medium.com/blob/master/data/gps.csv

Load the dataset and read using a pandas data frame:

import pandas as pd

gps_data = "../data/gps.csv"

gps_df = pd.read_csv(gps_data)

gps_df

An example of data looks like:

GPS data

Now enter your API Key:

api_token = input("Enter API Toke for Mapbox")

We will use plotly express's scatter map box function for plotting GPS Latitude and Longitude coordinates overlaying on map:

fig = px.scatter_mapbox(gps_df, lat="Lat", lon="Long", color='Time',

color_continuous_scale=["black", "purple", "red" ], size_max=30, zoom=12.5,

height = 600, width = 1000, #center = dict(lat = g.center)

title='Drive Route with Mapbox',

#mapbox_style="open-street-map"

) fig.update_layout(font_size=16, title={'xanchor': 'center','yanchor': 'top', 'y':0.9, 'x':0.5,},

title_font_size = 24, mapbox_accesstoken=api_token, mapbox_style = "mapbox://styles/strym/ckhd00st61aum19noz9h8y8kw")

fig.update_traces(marker=dict(size=6))

In the above code snippet, the color-coding is done using the Time column which is in POSIX format. Mapbox uses Mapbox style from the style layout

mapbox://styles/strym/ckhd00st61aum19noz9h8y8kw

The resulting map looks as follows:

Drive route using plotly and Mapbox. Color gradient represents time, denoted in POSIX format on the colorbar

Finally, you can also export and save the figure in multiple formats: png, HTML, and pdf

fig.write_image('gps.png')

fig.write_image('gps.pdf')

fig.write_html('gps.html')

IPython notebook for this tutorial can be obtained at https://github.com/rahulbhadani/medium.com/tree/master/11_11_2020

I hope this mini-tutorial was helpful.
This Is What Americans Are Voting On In The Next Election
By: Noah Levy
Tags: Map, Fiction, Politics, Satire, Humor

SATIRE

This Is What Americans Are Voting On In The Next Election

Be sure to educate yourself on the issues.

1) An amendment to declare Florida being “worse than New Jersey”.

Photo by Patrick Daley on Unsplash

2) Should we ban the Cleveland Browns for life?

Photo by Indrajeet Choudhary on Unsplash

3) An amendment to legalize eating Skittles while riding a unicycle on I-95.

Photo by Ellery Sterling on Unsplash

4) A referendum to have Ev Williams write eight times a day on Medium.

Photo by Birmingham Museums Trust on Unsplash

5) Should the US invade Genoa for an unlimited pesto supply?

Photo by Gabriella Clare Marino on Unsplash

6) An amendment to reaffirm freedom of expression for everyone, except for Donald Trump and the religious right.

Photo by Charles Deluvio on Unsplash

7) Should we exile Ben Carson and Rick Perry to Jerusalem’s one-and-only McDonald’s?
Atlas
By: David Rudder
Tags: Lifting, Poetry On Medium, Maps, Atlas Shrugged, Poetry

Atlas

Photo by visuals on Unsplash

The mode and load and secret code,

the great weight of the world,

hunched and held unparalleled,

as round and round we whirled.

Signals from my signet ring,

sounds of silence found,

lost in space I levitate,

six feet off the ground.

The traps in maps multiply,

my mind’s a magnet for,

a route to boot my mind again,

and open up the door .

Meanwhile we’ve walked a country mile,

seeking his support,

he groans and moans, the king of thrones,

then holds counsel in his court.

There’s gratitude in attitude,

false hope widens the scope,

there’s karma for the charmer,

as along the track we lope.

Atlas stood there hatless,

in the burning sun,

shadows eclipse his moving lips,

his day’s work is never done.

Sitting here I have no fear,

I watch the world go by,

and Atlas just for practice,

lifts us to the sky.

©

David Rudder

9th November 2020

Thanks for reading.
Go: When Using a Map as a Set, What Value?
Tags: Set, Map, Efficiency, Go

Say a piece of code wants a Set, not for all a Set’s many operations, just for a membership test, or uniquing a collection of values. Go doesn’t offer a Set natively, but you just use a Map of course, using just the keys to do what you need.

But The Value…

A question comes immediately to mind, if all we care about is the key, what should we use for the value seeing we don’t care about it? Maybe the key again, a bool? Obviously nothing that will waste a lot of space. I was told the efficient answer is use a struct.

Example

So when I used a bool, here’s what I was told to do instead:

var set := make(map[string]struct{}) set[“foo”] = struct{}{}

The guidance I was given in the pull request was this was the most efficient value to use.

Why?

I’m assuming that this results in a small thing with flexible alignment which works well in the map, but I’d love to know the answer without having to dig through the Go source of map and investigate.
Analyzing Potential Election Scenarios
By: Emma Soren
Tags: Maps, Elections, Cartoon, Humor, 2020 Presidential Race

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Creating Interactive Maps for Instagram with Python and Folium
By: Esbern Jakobsen
Tags: Maps, Instagram, Folium, Python, Interactive Maps

Now we get to some more customisation. First, we’ll load in an image to use as a custom icon for the markers on the map. Then we’ll load in another geographic boundary — this time the Oxford City boundary. As you can imagine, there is a higher density of pubs in Oxford city centre, compared to the rest of Oxfordshire. In order to avoid lots of markers being plotted on top of each other and a messy-looking map, we’ll make use of Folium’s MarkerCluster plugin (this was imported in the first step). At low zoom levels, the marker cluster groups together all the markers that fall within the Oxford City boundary. Only when zoomed in closer, will the individual markers separate. To do this, we’ll make use of Python’s json and Shapely libraries (also imported above), which are great for any kind of spatial operations. In the code below we use the json library to read the file, and then define a shape: oxford_boundary using the geometry attribute of the json file. Finally, we create the MarkerCluster , which also has a number of options to customise its behaviour.

Let’s add some markers

In a separate Python dictionary, I’ve stored all the data associated with each pub I want to add to the map. For each pub, there’s a pair of coordinates, a link to an Instagram post, the pub’s website, and Google Maps directions. We’re going to use these details to incorporate the Instagram post and website links into the pop-up for each marker. The dictionary looks like this:

Now for the main legwork. Here we use a simple for -loop to run through all the pubs we want to create markers for.

One thing to note is that each marker, needs its own instance of CustomIcon , hence why we create one on each iteration of the loop. The marker pop-up is styled using HTML. HTML is often used to design websites, but in this case, it allows us to embed the Instagram post in the pop-up using <iframe src={insta_post} . Likewise, we can add text to the pop-up and style it the way we want. Each marker is created one-by-one with its own instance of CustomIcon , Popup , coordinates and tooltip (hover-over) text. The final part of the for -loop uses the oxford_boundary shape to test whether the markers lie within the Oxford City boundary. If so, they are added to the oxford_cluster , and if not, they are added to map separately. Finally, a geolocation button is added using the imported LocateControl plugin, and the browser tab-title is set within the HTML.

The finished, interactive map

Below is a preview of what it looks like:
The Time I Thought My Plane Was Going to Crash
By: Jordan Mendiola
Tags: Map, Death, Satire, This Happened To Me, Travel

SHORT STORY

The Time I Thought My Plane Was Going to Crash

There aren’t many ways I’d want to go out, and a plane crash definitely isn’t one of them

Photo by Ashutosh Sonwani from Pexels

It’s the year 2013, and I’m flying from Germany to the Philippines with my family for my cousin’s wedding.

At this point, I’m only thirteen years old, and I was asked to be the best man. Pretty crazy, right?

Anyhow, my family and I were on our flight for our twelve-hour flight when things got spicy.

The spicy pretzels the servers brought us were definitely spicy, but that’s not what I’m talking about.

Halfway through the flight, the plane was literally free-falling for a good fifteen seconds, and guess where I was?

The bathroom.

My head banged against the ceiling because gravity was winning that battle, and I genuinely believed I was going to die that day.

This is how I was going out — in this smelly-ass bathroom of a twelve-hour flight. Everyone’s screaming and shrieks alerted me that this was the end.

When getting in a plane crash is one of your biggest fears like me, then it’s a pretty exhilarating sense of relief to survive a potential crash.

If you ever feel some intense turbulence on your flights, keep your butt to your seat because it’s not worth getting stuck in the bathroom during a free-fall.

Happy flying!
穿越時空的可視化（5）：導視設計的靈感
By: Liuhuaying Yang
Tags: Data Visualization, Information Design, Design Thinking, Maps

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Constructing Hong Kong
Tags: Maps, Atlas, Space, Metageography, Hong Kong

Constructing Hong Kong

Photo by Joseph Chan on Unsplash.

I was only recently introduced to Hong Kong writer Dung Kai-Cheung’s (董啟章) Atlas: Archaeology of an Imaginary City — a fictional (and somewhat novelistic?) mimesis of the geographical writing that has captured and constructed Hong Kong since its colonial days. The word construction is key. In the book, Dung invents nonsensical technical terms (an imitation of real-world Theory such as Foucault’s Heterotopia), and refers to realistic, but in fact non-existent historical maps, to unearth the somewhat surreal, yet concrete, histories of real Hong Kong locations such as Ice House Street and Possession Street. The premise of the book is that Hong Kong is a constructed (in two senses of the word) — not only are its buildings, in a literal sense, constructed; but the very idea that it exists as a coherent geographical unit.

Figure 1 The arbitrary division of land into Green and White

Figure 2 The construction is highlighted in the art on the cover of The Atlas — A bird picks out a piece of Hong Kong Island

In some ways, to claim that a place is ‘constructed’ is not at all revolutionary — we live in an age where we have the tendency to think of everything as a ‘social construct’. Furthermore, any claims about geography inevitably implies some political position. Thus, I am not surprised if you feel scepticism to everything I’ve said. To address this and defend my argument about the artificiality of modern spatial imaginations, I want to introduce a radically different way of how space was conceptualised of in the past.

Space used to be thought of in a linear, sequential manner — like the beads on a rosary… or stops on an MTR map.

It has been argued by historians and cultural geographers that in the ancient world people did not think of places as two-dimensional shapes at all. When past civilisations thought of the earth as flat, and when they lacked the technologies to survey the land from a bird’s eye view, places were instead “as a sequence of loci to be traversed and memorized.” What this means in practice is that places are often drawn in a horizontal plane, in a sequential manner (where one ‘place’ follows another).
Map & user’s location with MapKit
By: Sullivan De Carli
Tags: Programming, Maps, iOS, Mobile App Development, Swift

Step 3: Import location framework & conform to protocol

With Apple’s focus on user’s privacy, it’s not a surprise that we need to ask to the user their permission before being able to track their current location. For that, we need to go first to the Info.Plist file and enter the privacy — user location permission key.

For that’s go to your Info.Plist file, hit the plus button and scroll down until Privacy — Location When In Use Usage Description and add a string, this text is gone be display to the user when the permission is being asked, I used “We use it to help you find the nearest restaurant”.

Now, back to our MapViewController, let’s import the CoreLocation framework, add the line below at the top of your ViewController.

Also, add the CLLocationManagerDelegate to your class, to look like this:

Then, declare the CLLocationManager over our viewDidLoad method:

Now, let’s write some function to comfort to the CLLocationManager protocol and implement the necessary function to ask permission and display user’s location on our map.

Copy/paste the code below inside your MapViewController:

There are 6 functions in total, let me pass over each one quickly:

The first one is use to conform to the CLLocationManagerDelegate protocol.

checkLocationAuthorization let us cover the different cases that can happen from our user and addapt our UI accordingly: denied (refuse to give permission), authorize when in use, not determined (poor GPS connection for example), restricted (like parental control) and always authorize.

checkLocationServices let us check if the service is enabled and then call the native alert for asking authorisation for the user, I left the else statement empty but you can call an alert for example.

followUserLocation is a function to follow the user location so the location doesn’t stay just fix after startup.

locationManager( _ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) is pretty clear: if the user change his preferences in his settings, we use that function to present him again the request for authorisation alert.

manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) is pretty clear: if the user change his preferences in his settings, we use that function to present him again the request for authorisation alert. setupLocationManager there we finish conforming to the protocol and we set up to accuracy to be “best”. Note that the location is gone more precise, however it’s going to consume more battery energy.

Final screenshot

That’s it! Add checkLocationServices() to your viewDidLoad function, run the app and you will be able to see your location displayed on the map!
Google Maps JavaScript API With Angular — 10
Tags: Angular, JavaScript, Maps, Programming, Google

Google Maps JavaScript API With Angular — 10

We developers use a lot of 3rd Party API’s and one such API is Google’s JavaScript API. With the help of this API we can access nearby places based on labels like schools, zoo, museum, art_gallery and many other tourist attractions moreover Google also provides images for these locations. So we’ll use this data to display in an Angular application.

Create Angular Application

We’ll first create an angular application, my angular version is 10 but it’ll work with previous versions as well.

ng new gmapsExample

The above command creates the angular application but it’ll ask few inputs regarding angular routing and SCSS and I have enabled the angular-routing and chose SCSS styling.

Type Definitions for Google Maps JavaScript API

npm i @types/googlemaps

We need an npm package to access the google API in angular application, so run the above command to add it to your application. This still may not work, we need to add it to tsconfig.app.json in types field.

Now we need to add an API key to our project in index.html to access the google APIs, you may check the official docs on how to create the Google API key, you need to enable Maps JavaScript API for that API key that you have created.

In the above code we have added a script so in the place of YOUR_API_KEY just add your specific key.

Code To Fetch The Places Based On User Criteria

We can fetch the places based on multiple criteria, like latitude, longitude, labels, radius around the specified lat and long etc.
LRU Cache in Javascript
By: Dustin Morris
Tags: Algorithms, JavaScript, Maps

LRU Cache in Javascript

I practice algorithms everyday. My go to websites for algorithm practice are leetcode.com and algoexpert.io

This particular problem is on leetcode.com titled LRU Cache. Least Recently Used Cache is helpful for removing old cache items thereby maintaining a fixed memory space and limiting the cache size for faster cache searches.

You can imagine where this would be useful such as page searches, frequent word use, or load-balancing servers.

The inputs are:

Cache Capacity as an integer.

Key/Value pairs.

The methods are:

get(key)

put(key, value)
Mined
By: J.D. Harms
Tags: Maps, Bursting, Image, Feelings, Poetry

Mined

Photo by Jr Korpa on Unsplash

This beach is not intrisically elusive. The damage long done, by a cartographer who’d forgotten to replace their glasses. Deep lines of ink and colour become this figure of attempting fate.

Blown to the sound of whispers, thinking to sap out the different wires, pop off the metal cap.

Watching my steps has never helped me before, head down to the series of wayward feet, numb from the soles up. Aware, vaguely, of ephemeral pressures and trying to stroll naturally to the place I let go.

I think what they’d find, if the archaeologists ever find this place, an argument gone blind. A hole with nothing in it, anymore.
We All Miss That Starbucks Productivity
By: Jordan Mendiola
Tags: Map, Advice, Starbucks, This Happened To Me, Productivity

SATIRE

We All Miss That Starbucks Productivity

Letting out my frustrations due to the fact that I can’t do my work inside of Starbucks because of the Pandemic.

Photo by Adrianna Calvo from Pexels

Well, it’s been quite some time since I’ve been able to write some blog posts or enjoy a Strawberry Frappuccino inside of a Starbucks.

That’s because of this whole pandemic thing going on.

Instead of going to Starbucks, I’ve been going to Panera. For some reason they want me to go inside, be productive and all, so I am.

There are probably hundreds, maybe even thousands more like me who miss working on projects inside of Starbucks.

But those places were always packed!

At least we’ve got our homes and Panera, right?

My question is, why are some places allowing you to go inside and others are drive-thru only?

It doesn’t quite make sense to me other than the fact that the company wants to protect its reputation and not be a hub that got people sick.

Let me in, Starbucks. It’s been too long since I’ve gotten to be a productive animal inside of your walls while smelling the fresh coffee scents you guys offer!

Please ask for my name and then spell it wrong when you hand it to me.

Just one last time.

I’ve got to get some work done, and it won’t be at Starbucks.

Guess I’ll work from home.
Mainstream Media Outlets Join Forces To Form Doomsday PornHub 365
By: Noah Levy
Tags: Map, Politics, Satire, Social Media, Humor

POLITICS

Mainstream Media Outlets Join Forces To Form Doomsday PornHub 365

Coming to a digital platform near you.

Photo by Shane uchi on Unsplash

NEW YORK, NY — CNN, Fox News, and MSNBC reportedly joined forces to form a one-of-a-kind media collective called Doomsday PornHub 365.

“We realized that we all kinda do the same thing just to different audiences,” said Rupert Murdoch, owner of Fox News.

“Although we’re on the far right and the others are on the left, we still share political propaganda with our viewers.”

“I couldn’t be happier to have joined forces with our rivals,” mentioned Jeff Zucker, president of CNN. “A friend of Rupert came up to me at Juan Persentte Stables & Country Club and told me that he was interested in chatting.

“When Rupert told me his vision, a one-stop-shop for disaster porn, I asked him ‘Isn’t that already what we do?’ He said ‘Yeah, but combining all of our audiences would increase our quarterly profits.’ Even if that means another Trump presidency, at least I’ll be able to buy a tenth mansion in the Hamptons.”

Doomsday PornHub 365 is a registered c-corporation in Delaware, which is owned by a shell corporation in the Cayman Islands, which is owned by another shell corporation in Monaco.

“The Russians totally have something to do with this,” stated Mark Zuckerberg, CEO of Facebook. “Have you ever been to Monaco before? Half the buildings are empty because the Russian oligarchs who own them only come on Christmas.

“At Facebook our mission is to connect the world. I know we have our flaws, and I know I have the power to prevent more disaster porn coming on my platform. But we also have quarterly profits to worry about. If that means accepting millions of dollars from Doomsday PornHub 365’s presence on our platform, since enragement is engagement, then so be it.”

Let the American people jerk themselves to death, they all told me at the end of their interviews.
I Reached 1,000 Followers on Medium, Now What?
By: Jordan Mendiola
Tags: Map, Satire, Advice, Humor, This Happened To Me

SATIRE

I Reached 1,000 Followers on Medium, Now What?

Quite the come up for a kid who didn’t do too well in high school English class

Photo by Andrea Piacquadio from Pexels

It was late 2019 when I pulled up to this platform we call “Medium” when it’s actually incredibly large.

I thought to myself, man, there are some writers who had to have been here for years to get to where they are, right? Wrong.

There are some one-hit wonders or some swing-writers who can drop an amazing story that gets thousands of views like a piece of cake.

I was not one of those “viral” writers.

Nope. Instead, I had to earn every single follower by staying consistent, transparent, and as motivational as I could be.

Without the enthusiastic spirit that my mom blessed me with, I wouldn’t have made it to my first one-thousand followers.

Followers aren’t everything to me, but they definitely help establish some credibility — which I’d rather have than none at all.

People view your profile and your writing differently when you’ve got 1,000 followers or more!

You can’t argue with me on this.

Whether you’re sitting in between 0–500 followers or riding out with 25k+ followers, we’re all on the same journey.

We all type with the same 26 letters in the alphabet on the same “QWERTY” keyboards. Everyone has the same opportunity to reach their milestones.

Excuses only lead you to feel crabbier rather than happier.

My English teachers and professors must be rolling around in their beds, wondering how the heck I made it into Medium’s 1,000 followers club. They must think I hacked the servers or hired some bots to auto-follow.

That’s not what happened, though. I earned my reads and follows fair and square. You don’t have to be an English major to make your mark. Everyone has a chance.

Please do me a favor and check out some of my stories to help me reach 2k, then 3k, and then 5k. I’m just kidding. Medium is a slow and steady race where we’ve got to take everything one day at a time.

I’m grateful for this moment.

Thank you for coming to my TED Talk.
Integrate Google Maps to Your Angular Application
Tags: Angular, JavaScript, Maps, Programming, Web Development

Integrate Google Maps to Your Angular Application

How to Integrate Google Maps in Angular

Showing location on maps is always a needed feature in most of the web and mobile applications. Map service will be required in ERP, CRM, etc. Directory listing applications mainly depends on the Map service.

Google Maps is very popular among developers. It is very easy to use and had many rich functionalities. In this tutorial, you will learn, how to integrate Google Maps in Angular.

Previously Google Maps is free to use. But as of now, Google has limited access to its map service. However, still, many companies depend on Google Maps, why because the end-user likes Google Maps when compared to other Maps service providers.

Google Maps Platform offers a free $200 monthly credit for Maps, Routes, and Places With the $200 monthly credit, the vast majority of customers find their use cases are completely free. You won’t be charged until your usage exceeds $200 in a month.

You can refer to the billing details using the below link.

In this tutorial, you will learn:

How to get Google Maps API Key? How to Integrate the Google Maps in Angular Application?

Get Google Map API Key

So First, we need to get the access api key from Google Maps. I will explain this in a step by step guide. Integrating Google Maps is very easy if you got your api key.

Go to Google Developer console using the below link:

You need to sign-in using your Google account. If you are already signed in, it will show a page like below:
Google Maps Kullanımı Ve Web Servisten JSON Veri Çekme
By: Yasin Ege
Tags: Maps, API, Google Maps, Flutter, Json

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Golang Concurrent Map
By: Kevin Foo
Tags: Map, Concurrent, Golang, Parallel, Mutex

How to share a map or any other variable in a multi threaded environment in Go/Golang. For me, it happened very often in Gorilla Mux where I need temporary storage shared between requests but I do not want to store it in the database.

Code below is web clipboard.

package main



import (

"fmt"

"log"

"sync"

"net/http"

"encoding/json"

"github.com/gorilla/mux"

)



func Root(w http.ResponseWriter, r *http.Request) {

fmt.Fprintf(w,"Gorilla!")

}



func Set(w http.ResponseWriter, r *http.Request) {

params := mux.Vars(r)

key := params["key"]

val := params["val"]

MUTEX.Lock()

MAP[key] = val

MUTEX.Unlock()

log.Println("Set",key,val)

fmt.Fprintf(w,"OK")

}



func Get(w http.ResponseWriter, r *http.Request) {

params := mux.Vars(r)

key := params["key"]

MUTEX.Lock()

val := ""

if _, ok := MAP[key]; ok {

val = MAP[key]

}

MUTEX.Unlock()

log.Println("Get",key,val)

fmt.Fprintf(w,val)

}



func Del(w http.ResponseWriter, r *http.Request) {

params := mux.Vars(r)

key := params["key"]

MUTEX.Lock()

delete(MAP,key)

MUTEX.Unlock()

log.Println("Del",key)

fmt.Fprintf(w,"OK")

} func List(w http.ResponseWriter, r *http.Request) {

MUTEX.Lock()

obj, _ := json.MarshalIndent(MAP, "", " ")

MUTEX.Unlock()

log.Println("List",string(obj))

fmt.Fprintf(w,string(obj))

}



func Clear(w http.ResponseWriter, r *http.Request) {

MUTEX.Lock()

MAP = make(map[string]string)

MUTEX.Unlock()

log.Println("Clear")

fmt.Fprintf(w,"OK")

}



var MAP = make(map[string]string)

var MUTEX = &sync.Mutex{}



func main() {

r := mux.NewRouter()

r.HandleFunc("/", Root)

r.HandleFunc("/set/{key:[a-zA-Z0-9]+}/{val}", Set)

r.HandleFunc("/get/{key:[a-zA-Z0-9]+}", Get)

r.HandleFunc("/del/{key:[a-zA-Z0-9]+}", Del)

r.HandleFunc("/list", List)

r.HandleFunc("/clear", Clear)



log.Fatal(http.ListenAndServe(":80", r))

}

To set a variable with value. Use curl or your browser’s address bar. Limitation to this version is that the value you are trying to assign must not have “/” slash in it.

curl 'http://127.0.0.1/set/YOUR_VARIABLE/YOUR_VALUE'

To retrieve a variable’s value

curl 'http://127.0.0.1/get/YOUR_VARIABLE'

To list all variables

curl 'http://127.0.0.1/list'

To delete a variable

curl 'http://127.0.0.1/del/YOUR_VARIABLE'

To clear all variables

curl 'http://127.0.0.1/clear'

I modified my own version from the above vanilla version and now it does not have the “/” slash limitation. View it at https://clipboard.oofnivek.com

< Back to all the stories I had written
The Boston View — Visualizing Complex Data: COVID-19 & More
By: Paul Kahn
Tags: Complexity, Maps, Dashboard, Covid 19 Crisis, Data Visualization

In an online talk for the Design Museum, Paolo Ciuccarelli and I spoke about how the rhetoric, aesthetics and techniques of data visualizations are being used to communicate messages about our current public health crisis to a wide variety of audiences. Visualizations of the COVID-19 pandemic have touched all of our lives and this explosion of visual language is important in many ways. For one, the sheer volume of visualizations have stretched the creativity and ingenuity of data visualization designs to new extremes. The range of visualization types from streamgraphs to heatmaps to dumbbell charts, is unprecedented. For another, it may be the first time in history that visualizations have played a significant role in driving public action on an international scale (or national scale for that matter). The rhetorical force of maps showing the spread of the disease and of the “flatten-the-curve” chart has been astonishing.

Paolo presented several illustrations of how data visualizations designed by major news organizations (New York Times, South China Morning Post) use visual rhetoric and narrative to transform data into effective communication. The designer of a data visualization is constructing a rhetorical system, intended to send a message from the data expert to the general public. The daily pressure to explain shifting data generated by the COVID-19 pandemic has produced remarkable results.

I introduced examples from COVIC, the COVID-19 Online Visualization Collection, an archive built by a team of instructors and graduate students at Northeastern, which will soon be hosted at the Center for Design. The collection (1800 examples with about 10,000 figures at the present writing), classified by category, date, visualization type and message, is a record of this discourse. We believe it will have value for future historians and policy-makers trying to understand what happened and how to avoid or mitigate future epidemics. We further hope that such a collection of visualizations will have value for design historians, design educators and students, as well as design practitioners.
Writer Patronizes Readers To Only Treat Others Like Shit
By: Noah Levy
Tags: Map, Satire, Advice, Humor, Art

SATIRE

Writer Patronizes Readers To Only Treat Others Like Shit

Do writers really follow their words?

Photo by Dollar Gill on Unsplash

SOMEWHERE IN, CALIFORNIA — Popular self-help writer Rob was spotted outside a hotel in California making life hard for residents.

“I read this piece by local writer Michael Burg, MD and it said to treat the housekeeping staff ‘exactly like the untouchables they are,’”, said Rob the self-help writer.

“It reminded me of my spiritual journey in India and how it changed my life,” reminisced Rob.

“So I thought, why don’t I do all the things Michael wrote in his piece?”

A video of Rob “scream[ing] ‘fuck you’ down the hallways” was viral for two minutes on TikTok.

“Did he not see the word ‘satire’ in my article?”, pondered Michael Burg, MD. “I didn’t think someone would take it seriously. Then again, Donald Trump was elected President.”
What is GIS? A simplified explanation.
By: Thomas Mathew
Tags: GIS, Location, Maps, Data, Spatial

TL;DR — A Geographic Information System is an information system that specializes in the storage, retrieval and display of location data.

A GIS retrieves and displays information since the data contains location.

The standard definition of Geographic Information System (GIS) has been written for those who are conversant with GIS for years. This definition does not translate well to laypeople who simply want to know the meaning of the term and don’t seem to find one. Even seasoned GIS professionals fail to sufficiently explain the acronym to general audiences they interact with. Here’s an attempt hoping to provide the required clarity.

Information Systems

To understand the term Geographic Information System, drop the word Geographic and focus on ‘Information System’. An information system is a generic term to describe any system that manages information. An email service such as Gmail, Outlook or Yahoo, can be considered an Information System. This system stores emails, and upon request presents it as information to the user in rows of a table with functions to manage (compose, delete, reply, etc.) the emails. It can be said that an email service or email application is an information system specialized for emails.

Another example of information systems are travel booking websites such as Skyscanner, Expedia, Trivago and others. These information systems specialize in the retrieval of airline tickets, hotel reservations, car rentals, cruise ships etc. — providing the capability to use the information for a booking. In-fact almost all sites, platforms, apps and software can be imagined as Information Systems that specializes in a certain type or class of data.

And so, the GIS is just that, an Information System that specializes in managing Geographic data.

What is Geographic data?

The Geographic part of the term GIS represents locations in the form of coordinates — a pair of numeric values¹ that are also known as ‘latitude, longitude’ or ‘x,y’. The information system accesses stored coordinates and presents the data as an image drawn on the screen. The coordinates almost always represents locations on earth², which is why the term Geographic is used to describe these information systems. The result of rendering coordinates on a screen is a map that provides a differing perspective to the data available to organizations and people. It is important to mention here that GIS is a lot more than accessing coordinates and presenting a map, but this specific and unique mapping ability categorizes a software³ to be a GIS.
A Long Short-cut?
By: Oliver Thomas Spedding
Tags: Shortcuts, Maps, Travel

Our idiosyncrasies can have different interpretations.

By

Oliver T. Spedding

Like so many elderly people, my late father had a profound interest in the historical localities of his country and I remember as a child, our family being taken on excursions to a many unfamiliar parts of the countryside to see the landmarks that represented occasions that had influenced the course of the country’s history.

My father had a fetish for “short-cuts” which he always proclaimed would save us a great deal of traveling time. Nevertheless, whenever we traveled and undertook one of these “short-cuts”, instead of shortening our traveling time, they usually resulted in our expeditions taking a great deal longer than anticipated. Even when he traveled on business, a “short-cut” would frequently be utilized so that he could reach his destination in time only for him to become completely lost and resulting in my mother receiving anxious telephone calls from business associates inquiring as to my father’s whereabouts.

One year we journeyed to a coastal town for our annual holiday and were required to collect the key to our rented cottage from the estate agent before five o’clock that day. By the time we reached the outskirts of the nearest city to our destination we were running very late. My father pointed to a road leading off from the one we were on and heading in the direction of the coastal town.

“I’m sure that road’s a short-cut to our destination. I think we should take it. We can’t afford the time it will take us to drive through the city.” he declared.

“Dear,” my mother replied in alarm. “I don’t think we’ve got time for a short-cut!”

Photograph — Photo by John-Mark Smith on Unsplash
Add Interactive Maps to Websites using Leaflet.Js
By: Anjula Shanaka
Tags: JavaScript, Programming, Maps, Web Development, Leaflet

I’m working on a new project that requires lots of maps. When it comes to maps it has to be simple and comprehensive. Adding maps to a website is not very hard but making them interactive, lightweight and mobile-friendly is kinda difficult. That’s when Leaflet.Js comes to the rescue. So what is this Leaflet thing and why is it so special? Let me explain.

Leaflet is the leading open-source JavaScript library for mobile-friendly interactive maps. Weighing just about 38 KB of JS, it has all the mapping features most developers ever need.

In addition, Leaflet is designed with simplicity, performance, and usability in mind. It works efficiently across all major desktop and mobile platforms, can be extended with lots of plugins, has a beautiful, easy to use and well-documented API.

When it comes to leaflet plugins, It’s so easy to use and very reliable. I used a few plugins already. Scale factor, fullscreen, easybutton, zoom are few of them. It made my work easier. Here’s an example map with markers, popups.

example map

It’s easy to create a map using Leaflet, Here’s the code for the above map.

Now all you have to do is create a div element with an id named map.

<div id='map'></div> Just like this.

It’s that easy! I hope you learned something about this map plugin and make sure to go through the documentation before using this. See you in the next one. Peace! ✌️