fabiochiu/medium-articles huggingface dataset:
NgRx Ducks | How to use selectors
By: Gregor Woiwode
Tags: Angular, Ngrx, Typescript, Rxjs, Redux

Show me the code

The code discussed in this article is available on ⚡️ StackBlitz. There you will have a deeper look at how the respective code-parts are related to each other.

Pick all the things

To allow reading state from the Store a Duck provides a method called pick that accepts NgRx-selectors. Behind the scenes pick just uses store.pipe(select(...)) to get the desired information.

Let’s assume you already have a selector in your NgRx project like the following.

const visitCounter = createFeatureSelector<CounterState>('counter'); export const currentCount = createSelector(

visitCounter,

c => c.count

);

It just reads the current count from the store and automatically informs when the count changes.

Using pick you can use selectors like this easily.

...

import * as selectors from '../store/counter.selectors'; @Component({ ... })

export class CounterComponent {

count$: Observable<number>; constructor(@Inject(CounterDuck) private counter: Duck<Counter>) {

this.count$ = this.counter.pick(selectors.currentCount);

}

}

The method pick enables you to interact with the store without the need to inject the Store-dependency. You can read data from each slice of the store. If you already use the Store as the one and only API for your component the Duck-Service simply replaces the Store.

Furthermore, the NgRx Ducks library allows you to make selectors part of your Duck-service.

Turn selectors to consumable Observables

Instead of using pick you also can add a selector to your Duck-service. The NgRx Ducks library implements a convention simplifying the usage of a selector a bit.

import * as selectors from './counter.selectors'; @Ducksify<CounterState>({

initialState: {

count: 0,

isLoading: true

}

})

export class Counter {

current$ = selectors.currentCount; // ...

}

The code above shows that selectors.currentCount is assigned to a property current$ . If you are familiar with the Finnish Notation for observables you already know what this means. The Duck-service will wrap the selector into a call like this: store.pipe(select(selectors.currentCount)) .

For the consuming component, the selector automatically becomes a consumable Observable.
You don’t actually need to write a reducer with Redux
By: Poul Uvarov
Tags: Flux, React Redux, Redux, Front End Development

Redux is great. It provides us to make state mutations more predictable. I’m really like those three principles:

Single source of truth

State is read-only

Changes are made with pure functions

I also really like those concepts — we describing actions to show what is happening:

{ type: 'ADD_TODO', text: 'Go to swimming pool' } { type: 'TOGGLE_TODO', index: 1 }

And reducers to show how it will change the state:

function todos(state = [], action) { switch (action.type) { case 'ADD_TODO': return state.concat([{ text: action.text, completed: false }]); case 'TOGGLE_TODO': return state.map((todo, index) =>

(action.index === index ?

{ text: todo.text, completed: !todo.completed }

: todo), ); default: return state; } }

But what the problem? It makes you write a lot of boilerplate.

There a lot of methods to reduce redux boilerplate, but none one of them made me satisfied, it’s still a lot of copy-paste…

R edux-blaze comes to the rescue

With redux-blaze we need to do just one thing — to describe just one function that shows what our payload is and how it’ll affect our state:

(payload) => (state) => ({...state, filter: payload.filter})

Check out simple example:

import { buildReducer } from "redux-blaze"; const { actionCreators, reducer: filtersReducer } = buildReducer(initialState, {

setMySearch: ({ search }) => state => ({ ...state, search }), setCategory: ({ category }) => state => ({ ...state, category }), setSort: ({ sort }) => state => ({ ...state, sort }), }, {prefix: 'MY_FILTER'});

buildReducer creates for you ready to use actionCreators and reducer:

export const rootReducer = combineReducers({

filters: filtersReducer

})

And we can easily dispatch our actions:

dispatch(actionCreators.setCategory({category: 'my category'}))

It will dispatch an action `MY_FILTER_SET_CATEGORY` (prefix + function name).

That’s it! We’re almost reduced boilerplate to zero.

Enjoy working with redux with redux-blaze!
Talking Manhattan | Lisa Lippman of Brown Harris Stevens
By: Noah Rosenblatt
Tags: Manhattan, New York City, NYC, Real Estate

Make no mistake about it, Lisa Lippman is a boss. She’s a veteran who has been the top agent at the venerable firm Brown Harris Stevens for the past few years (no easy feat!) and she knows this market inside and out. We sat down with her to talk about what’s happening out there and came away with ideas and advice that’s helpful to all.

Today’s topics include:

(2:32) The market is sliding down but with little ups and downs

(4:15) “Sellers don’t listen till they see closed data”

(6:59) “Where prices are lower, buyers are biting”

(8:25) Why the bad news is less of a shock to sellers these days

(10:13) The listing pitch today

(14:32) Buy livable and other tips for finding value

(17:19) Today’s market conditions: “We’re staying here for a while”

(18:52) Why rent vs buy breaks down above $2M

(19:53) “People will believe you if you know what you’re talking about… and you can’t fake it.”

(22:44) Great advice for what to do when a seller doesn’t understand the need for a price cut

(25:10) Final thoughts for buyers (look!) and sellers (listen!)

Click here for Audio Only
NYC: Murder Mystery Experience (New Date)
By: Nopro Newswire
Tags: Larp, NYC, Np Newswire, Immersive Theater, Murder Mystery

NYC: Murder Mystery Experience (New Date)

When: December 4

Where: Wildrence, basement level, 59 Canal St (look for the blue door), New York, NY 10002

Price: $145; 18+, ticket includes complimentary hors d’oeuvres and themed cocktails (21+)

Tags: #immersivetheatre, #game, #mystery, #intimate, #LARP, #interactive, #ContentAdvisory, #MobilityAdvisory (see below)

Event Link

At our Murder Mystery Experience, there’s no sitting around a table reading from a script. You’re up on your feet the whole time, looking for clues, exploring the space, and making choices about who to share information with. It’s like being at a regular party…except that you’re playing an exciting, intricately drawn character with secrets and objectives, and trying to solve a murder, of course (or, if you’re the murderer, trying not to get caught). Enjoy a night of role playing and puzzle solving with complimentary hors d’oeuvres and themed cocktails!

This Fall we will be featuring three unique mysteries:

The Western: Chaos erupts when the Sheriff is found dead in a lawless Old West saloon. Bounty hunters, outlaws, and the deputy compete for control with the townsfolk caught in the middle.

Space Smugglers: Set in a bleak landscape where an intergalactic rebel Coalition battles the dictatorial Regime, Captain Jay’s crew is thick as thieves — that is, until someone goes missing 3 days into deep space. Read our review of Space Smugglers.

That Show About Love: It’s cocktail hour on a reality dating show and everyone is buzzing to see who’ll get tonight’s rose. The bachelor, Chad, is a worthy prize… at least he was before he became a corpse. But the show must go on, even without the man of the hour, and it’s up to the girls to find out who killed Mr. Perfect before the killer strikes again.
NYC: The Illuminati Ball
By: Nopro Newswire
Tags: NYC, Nightlife, Np Newswire, Immersive Theatre

NYC: The Illuminati Ball

When: October 4

Where: Secret temple in Manhattan

Price: $250, includes hors d’oeuvres, unlimited cocktails, a mask, and signed copy of von Buhler’s book; 21+

Tags: #immersivetheatre, #interactive, #ContactAdvisory, #ContentAdvisory, #MobilityAdvisory (see below)

Event Link

For one night only on October 4th, Cynthia von Buhler’s provocative new graphic novel about real-world chimeras will come to life in secret NYC temple. Described as Eyes Wide Shut crossed with The Island of Dr. Moreau, von Buhler says her goal is to entertain, excite, and enlighten guests while questioning the morality of modern science in creating a new animal species with human DNA.

On Friday, October 4th, guests will attend a gathering at a secret temple in Manhattan where they will find themselves guests of the revolutionary Pig King and his ensemble of fellow gene-spliced hybrids who have escaped an experimental lab. Stepping into the pages of von Buhler’s decadent and provocative novel, guests will take part in esoteric ritual ceremonies featuring eclectic music, provocative dance, anthropomorphic escapades, daring performances, and morality tests unfolding continuously across three floors of interactive rooms. The evening features surreal hors d’oeuvres and unlimited specialty cocktails.

Come dressed in creative formal attire — the sky is the limit! We will be provide you with a unique mask or you may bring your own. Please wear tuxes, suits, suit-coats, gowns, cocktail dresses or dressy slacks. Long capes are always welcome, too. If you enjoy dressing to kill, this is the time to do so. Cravats, bow ties and ties are preferred, but not necessary as long as you wear a suit coat and a dress shirt.
NYC: FOUND
By: Nopro Newswire
Tags: NYC, Np Newswire, Immersive Theatre

NYC: FOUND

When: September 25 — October 31

Where: The Cell, 338 W. 23rd St., New York, NY 10011

Price: $25; 16+ recommended; 21+ to be served alcohol

Tags: #immersiveart, #interactive, #ContactAdvisory, #ContentAdvisory, #MobilityAdvisory (see below)

Event Link

Enter the whimsical, irreverent, and epic world of visual artist Mikel Glass as the cell launches its first ever immersive theatrical experience, FOUND. Audience members will be taken through and encourage to participate in activities on all four floors of the cell’s historical townhouse. Collaborating with renowned theater companies, Mason Holdings and Sister Sylvester, Found takes audience members through an explosion of art, found and transitional objects, and mysterious cocktails. FOUND is an exciting new way to consume the arts.

NoPro is a labor of love made possible by our generous Patreon backers: join them today!

In addition to the No Proscenium web site, our podcast, and our newsletters, you can find NoPro on Twitter, Facebook, YouTube, Instagram, in the Facebook community Everything Immersive, and on our Slack forum.

Office facilities provided by Thymele Arts, in Los Angeles, CA.

Contact Level: Moderate (Familial)

Content Advisories: One of the rooms features hundreds of found and discarded dolls in some disturbing positions. Please be advised.

Ascending stairs is required for this experience. There are no elevators in this historical brownstone. This experience is not wheelchair accessible.
NYC: The Unbrunch (Remount)
By: Nopro Newswire
Tags: NYC, Np Newswire, Immersive Theatre

NYC: The Unbrunch (Remount)

When: Saturdays, October 12 — November 30

Where: Secret location in Chelsea near 14th street

Price: $65 — $85 for standard admission (cash bar); $170 for pre-show seated brunch and show with 2 complimentary drinks; 18+ only; please bring ID; get $20 off standard reservations with code ‘Curious’

Tags: #immersivetheatre, #party, #dining, #drinks, #dance, #aliceinwonderland, #intimate, #sandbox, #interactive, #ContactAdvisory, #ContentAdvisory, #MobilityAdvisory (see below)

Event Link

The Unbrunch is a fully immersive experience that invites guests to journey down the Rabbit Hole and explore all the wonders that Wonderland has to offer. The curious residents encourage guests to fall further down into this strange place, but look before you leap: Danger can be found in even the lightest of places. A site-specific event, The Unbrunch takes place in an illustrious (and undisclosed) location. This exclusive members-only club is typically closed to the public, but will open its doors and sprawling five floors to guests participating in The Unbrunch. The event utilizes all five floors, each floor representing a different layer of Wonderland as the actors and audience members move freely throughout the historic brownstone witnessing musings, movement, music, and mayhem.

Read our interview with the creators.

NoPro is a labor of love made possible by our generous Patreon backers: join them today!

In addition to the No Proscenium web site, our podcast, and our newsletters, you can find NoPro on Twitter, Facebook, YouTube, Instagram, in the Facebook community Everything Immersive, and on our Slack forum.

Office facilities provided by Thymele Arts, in Los Angeles, CA.

Contact Level: Light (Business/Acquaintance), with consent.

Content Advisories: Potential for dark spaces, audience interaction, loud noises, simulated drug usage, and a sprinkling of profanity.

Audience members should expect to be standing/walking during the performance. Comfortable shoes should be worn as the experience may require guests to climb multiple flights of stairs. Guests may be given masks to wear.

All bags and coats are required to be checked. A complimentary bag and coat check will be available upon arrival.

There is an elevator for guests who are unable to use the stairs. If special accommodations are needed, guests should notify the White Rabbit at W.Rabbit@TheUnbrunch.com at least 48 hrs before their selected performance.
Plate Analyzer. Automatically analyze the license…
By: Jeff Novich
Tags: Bikes, Analysis, NYC, License Plates, Cars

Automatically analyze the license plates around you.

TL;DR

You send a folder of images of vehicles and I’ll send back structured data about the images with legible license plates so you can quickly answer questions about them.

MVP Product offering

Send me a dropbox or google folder of the original JPEG GoPro/iPhone/Android photos you want analyzed and I’ll take care of the rest.

Example directory of photos from a “walk and snap” tour using iPhone.

What you’ll get

Summary: A summary report: total images with identifiable licenses, identifiable license plates encountered (there can be more than 1 in an image), average violations per vehicle w/violations.

Spreadsheet: A spreadsheet of every vehicle encountered in your trip. It’ll include a treasure trove of publicly accessible data in a structured, easily queryable format:

License (via PlateRecognizer)

State

Vehicle make/model/color

Average Value of the vehicle (via Edmunds)

Violations (from How’s My Driving NYC)

Latitude & Longitude of observation

Timestamp of photo (observation time)

Address (via NYC Geoclient, the city’s closest official address)

A public URL for the image (on AWS S3)

Nearest cross streets

NYPD precinct and sector

Community Board

Example if you bike with a GoPro and provide a directory of photos.

Example if you provide a directory of iPhone photos.

Map: A custom google map with everything mapped & color coded that you can easily share. (Color coding could be for vehicle type, number of violations, or other categories)

Mapped results for a bike ride.

Mapped results for walking and snapping photos with an iPhone. (With the number of violations next to the pin)

Images on S3: Each image that has a recognized plate will be uploaded to S3. You’ll have a public URL for each image (in the spreadsheet) so you can easily reference the images and put them in articles/tweets without having to store them locally.

Quickly answer questions like…

How many violations do all the illegally parked / placard abuse vehicles have? (Which is what Streetsblog has done, manually.)

How many vehicles did I encounter (parked or driving) on my bike ride?

How dangerous was my bike ride, based on violations?

How many out of state licenses are there?

What percent of vehicles have violations?

Which vehicles were most dangerous?

Gathering photos

There are a few simple ways to obtain images that can be analyzed.

Use your iPhone or Android and just walk around and snap pics of whatever you want analyzed. OR Use a GoPro 6/7/8 (chest or helmet mount), set to time lapse photo and take a photo every 0.5 sec.

Put all these photos in a Dropbox or Google Drive folder that you can share via email.

Bike ride GoPro photos.

Interested?

Email me at reportedapp@gmail.com
32. Bloomingdale’s
By: Rita J. King
Tags: Writing, Movies, NYC, Books, Drawing

The landscape of the city is always around me as I walk to these locations, but this time I had another world in my mind. I had called my teenage nephew to congratulate him on passing his driving test and he told me about a trip he took before the pandemic to the Jim Crow Museum of Racist Memorabilia. Sharing this information here now might seem off topic, but bear with me.

My nephew told me about the founder, Dr. David Pilgrim, and how he began his collection. (I highly recommend watching this video and learning the story for yourself). As a child in Mobile, Alabama, Dr. Pilgrim went to a flea market and saw someone selling “what we would today call a mammy cookie jar and salt and pepper shakers.”

My nephew prefaced his story by telling me he was repeating what Dr. Pilgrim, a brilliant leader in the anti-racism movement, said, in context.

Dr. Pilgrim bought the shakers with what little money he had, and broke them on the spot. He wasn’t trying to make a philosophical or ideological statement. He just didn’t like them. My nephew told me about his own journey through the museum, learning about race laws, seeing a tree with a noose, lawn jockeys and other “real world items reflective of the normalization of violence.”

“Then you see the people forgotten to history,” my nephew said. “Then the African American achievements and the civil rights heroes who lost their lives fighting racism. And you think, it’s a happy conclusion. We beat it. No. The next part of the exhibit shows modern racism including so much racist memorabilia created around President Barack Obama using the old racist tropes. At the end, you are meant to reflect with your fellow museum-goers about what you experienced.”

“Dr. Pilgrim said people often find ways to justify which things they saw that they don’t think are racist,” my nephew said. “The whole point is to confront racism in the US and have a meaningful conversation. The museum is a showcase of how it really was and is in the US. It is a way of confronting what racism really is, a way to sit back and think to yourself, I can’t believe this is real. The museum includes things you won’t find in the Smithsonian. And I have looked. Postcards that were sent through the US postal system that show lynchings and lashings.”

Dr. Pilgrim’s collection is augmented by that of a gay couple, my nephew said, who started collecting for the same reason, to educate people about reality. Here is where it all connects. Highsmith had already sold the rights to one of her books to Alfred Hitchcock for a film adaptation when she couldn’t sell The Price of Salt because of bigotry against lesbian content. We have made many strides that are now in peril again, and always. We have to fight for the human condition, not just for a few, but for us all, or we aren’t fully human.

PS. On my walk I passed reopened Argosy book store, the oldest bookstore in Manhattan, as far as I know!
Talking Manhattan | Shlomi Reuveni of Reuveni Real Estate
By: Noah Rosenblatt
Tags: Manhattan, New York City, NYC, Real Estate

We first met Shlomi Reuveni several years ago when he was leading the new development division at Town Residential and was continually impressed by his dedication and breadth of knowledge in regard to that sector. Not just market action, but kitchen design, marketing strategy, capital structure and much more. If you’re interested in the new dev market, this one’s for you!

Today’s topics include:

(1:27) T he biggest issue is consumer confidence

(4:25) In the long term, it’s all about buying right

(5:19) It may take longer than expected for prices to reset

(8:44) Buyers have no incentive to purchase

(10:05) New Dev discounts range between 5%–20% off ask

(11:21) Smart brokers are negotiating on everything

(15:00) T he new dev market is a different game

(16:07) Developers are still building and bringing product to market

(19:15) Why less building now might mean a squeeze later

(20:20) The ins and outs of shadow inventory

(21:43) New dev benchmarks: if you’re selling 2 units per month you’re in good shape

(22:15) Why starting closings is a balancing act for developers

Click here for Audio Only
How to Get the Family Involved in Philanthropy
By: Jennifer Powers
Tags: Parenting, Family, NYC, Philanthropy

The word “philanthropy” often brings to mind the establishment of trusts, scholarships, or research institutes worth hundreds of thousands, if not millions, of dollars. It can feel, to many people, like something that is restricted to those with access to vast amounts of wealth. But the truth is that the majority of philanthropic giving is done by middle- and working-class people. So, how do you establish a spirit of philanthropy that endures for generations to come?

Start at home

Teaching your children the value and importance of charitable giving and philanthropic work is essential to creating a legacy of giving. It can begin by teaching children to be charitable to each other, family, and friends, and can extend to the wider community as children mature. Teach children that doing things for others is rewarding and the right thing to do. Involve your children from an early age in community work and set up a family tradition of giving that will last their whole lives.

Create traditions.

You’ve likely heard of families that annually volunteer at soup kitchens or homeless shelters during the holidays. For them, it is as much a part of the holiday celebration as turkey or gift-giving. Other families have a tiny charity box in the house where children can put a few coins every week, and then donate to the cause of their choice at the end of the month. Annual Fun Runs to raise money and awareness for charitable efforts, school supply drives, and other community-wide events can become yearly traditions for your family. Make giving back to your community a regular part of your life by establishing charitable

Understand “community”

What issues are you passionate about? What motivates you? Volunteering, fundraising, and raising awareness about issues in your local community can help you connect with others in a deep and meaningful way. Planting trees, working in a community garden, volunteering at the library or even walking dogs for sick or elderly neighbors are all great ways to establish a habit of giving back to the community while connecting with those around you. As is often the case, one charitable effort leads to another as you discover how many issues are connected and how your local community is connected to the wider world.

It’s never too late to start a tradition of giving. Even young children can and should get in on the action. Involve your whole family in deciding which projects to take on and find ways to get involved as a group. Leaving a philanthropic legacy isn’t just for the one percent.

For more on families and parenting, visit JenniferPowers.me.
What is it REALLY like living in New York City??
By: Emily Smith
Tags: NYC

Living in NYC

I moved to the city straight out of college. I’v been here for almost 4 years now, and still fall in love with it every day. It was very easy to adapt to the city and feel at home.

Depending on your industry, it can of course be very competitive, but there are so many jobs available here.

It’s really easy to adapt. There are definitely a lot of smells, grime, noise and overall stimulation. If you get overwhelmed by stuff like that, then just use it as a growing experience for patience.

It’s also fairly easy to meet people and get connected, you just have to be proactive about it.

Apartments

Apartments are a big thing. Not knowing your budget or where your office would be, it’s hard to come up with concrete suggestions. You can definitely find a place on the Upper East Side or Upper West Side, etc. for $1300–1700 w/ roommates.

The further out you go the cheaper it is. There are corners of Queens and Brooklyn where you can find $800–1000 accommodations, but you you’re sacrificing a social life and life quality for sure.

This is an amazing city and there is no place on earth like it. I still get that “rush” feeling when I’m walking down a busy street and look up and see an iconic building and think “dang, I get to live here.”
Exploring 2 Months of NYC Bike Accidents
By: Chris Chung
Tags: Safety, NYC, Flatiron School, Data Science, Citi Bike

And It’s Not Just Drivers

Vehicle 1 consists not only of drivers but bikers too. 9/65 or 14% of vehicle 1 category were made up of bikers with accidents caused because of:

Driver Inattention/Distraction 6

Aggressive Driving/Road Rage 1

Passing Too Closely 1

Unspecified 1

The top reason was biker inattention/distraction at 67%. The second and third reason are aggressive biking / rage and passing too closely. Lessons learned: Pay attention, keep a cool head, and get space!

As for “unspecified” reasons by the biker, the reason is also unspecified or missing a reason for vehicle 2, the second party. I assume that there could’ve been a multitude of reasons like unable to conclude what the exact cause. It would be interesting to know the circumstances to lead to two unknown reasons.

On the other hand, these are some of the reasons how the accidents were caused by both parties:

The majority of reasons is that both drivers were distracted or not paying attention. Other combinations are cars backing up unsafely while the bike was too close or some kind of error or miscalculation from either driver or biker that caused the accident. Some of the other accidents were caused by Pedestrian/Bicyclist/Other Pedestrian Error. I was wondering what this could possibly be but when I spoke about these accidents with a friend, she told me a personal story. There was a time she was crossing the street texting and did not notice an incoming bicyclist heading her way. The bicyclist tried to avoid her and crashed!
The Future of Highways in New York City — A Conversation
By: Urban Design Committee
Tags: Urbanism, NYC, Urban Design, New York City

On the evening of Tuesday February 11th, Open House New York partnered with the Gotham Center for New York History, hosting a conversation on the Future of Highways in New York City at the CUNY Graduate Center on 5th Avenue.

The panel was arranged as part of The Moving City series of conversations on the future of transportation and mobility in New York City. Moderated by Amy Plitt of CurbedNY, in a nearly packed auditorium, attendees were introduced to a healthy dialog of insights by current architecture/planning professionals, public/private engineers, and academics. Each practitioner brought a unique urban design lens to the conversation, offering personal and professional insight into the future of highway infrastructure in New York City.

The conversation began around the timely cessation of Robert Moses’ car-centric plans in the first half of the 20th century. Engineers Craig Ruyle of NYSDOT, and Olga Gorbunova, of Stantec, cited the inherent physicality and capacity needs of our system. How it is one of the oldest and narrowest, and how it includes many non-standard features. Adam Lubinsky, of WXY Studio, pointed out the different design and planning paradigms within the context of the urban fabric each corridor runs between. Highways originally built through urban renewal schemes as buffers to industrial waterfronts that once moved goods and people are now creating seemingly insurmountable challenges to the urban fabrics each highway moves throughout.

Over the course of the night the group touched on innovation, new technologies, freight deliveries, and long-term maintenance issues. While discussing general disinvestment in the highway system, Owen Gutfreund of Hunter College said, “the best thing we can do for highways is invest in transit.” His definitive retort caused the room to erupt in a loud round of applause. The conversation then moved through the current political climate and the pitfalls of investment strategies which coincide with the cycles of local, state, and federal election budgets.

The evening concluded with a question and answer session from the audience with topics ranging from: diversity, rail corridors, and the contentious BQE Rehabilitation project. The diverse backgrounds of the panelist group provided a comprehensive primer for anyone interested in understanding the driving forces behind the highway infrastructure projects of the past and future in NYC.
Oheka Castle Wedding
By: Llg Events
Tags: Wedding Vendors, NYC, Wedding Design, Wedding, Oheka Castle

New York City as a destination! Proud and Jon may live in New York but their time is mostly spent in Thailand running their multiple businesses. And with a father that worked for the government in Thailand this wedding was especially important as the delegates and family members that were in attendance required security, privacy and 5-star service. Proud and Jon needed a wedding planner with experience on high profile events, was an expert in NYC destination weddings and can plan around the time difference between NYC and Thailand.

LLG Events became the perfect fit and for a year and a half, we were their liaison to the New York wedding industry, Oheka Castle, their selected vendors and LLG were their trusted resource when it came to pricing and vendor services. Navigating the NYC wedding market can be challenging especially when you do not live in NYC full time. You do not have time to meet with the vendors on your own, you do not know who is a qualified vendor and you do not know if they are charging you fair market value. Your most trusted resource is your wedding planner, the person who can properly vet your vendor team for you as well as ensure you are getting the quality and level of service you deserve.

The first vendor referral we sent Proud and Jon was Tantawan Bloom — an incredible NYC wedding designer who specializes in romantic, lush, dreamy wedding receptions. We knew that they would be the perfect design partner and the team who can create glamorous yet understated events. Once we had the design team down our next referral was for entertainment. Starlight Orchestra was the perfect choice knowing that this was a party and dancing crowd! The photo and video team, unfortunately, we cannot take credit for that referral as Greg Finck has an impeccable reputation and we were surprised he was even available for our client’s wedding date!

On event day Proud and Jon had the right team of professionals, that arrived early for setup, were ready and prepared.

Congratulations to Proud and Jon, we wish you a lifetime of health and happiness!

We Could Not Have Produced This Event Without The Help Of Our Amazing Vendors:

Venue: Oheka Castle

Photographer: Greg Finck

Event Planner: LLG Events

Photography: Greg Finck

Design: East Made Co.

Floral Design: Tantawan Bloom Wedding & Events

Hair and Makeup: Makky P

Bridal Attire: Monique Lhuillier

Grooms Attire: Vvon Sugunnasil
Ricardo Sullivan Finds Customized Support at the UUFCU
By: Urban Upbound Nyc
Tags: Financial Services, NYC, Urban Upbound, Financial Inclusion, Humans Of New York

Marine Corps veteran Ricardo Sullivan was living in a shelter when the pandemic hit. He had left jail at the end of 2019 and the relocation from the shelter to a hotel near Queensbridge Houses further upended his attempts at rebuilding his life. His plans included opening a bank account, but that is not easy for returning citizens and other justice-involved people. Fortunately for him, the relocation led to his introduction to the Urban Upbound Federal Credit Union (UUFCU).

On his first visit to the UUFCU, Ricardo met Maria Lopes, one of our Member Service Representatives and a certified financial counselor. Maria was able to open an account for him and Ricardo joined the credit union. Having secured a job, Ricardo began working on building his savings. “Urban Upbound was the only institution that accepted the limited form of identification that I had,” said Ricardo.

However, the UUFCU was able to do more for him. After spending a number of years incarcerated, Ricardo needed assistance fixing his credit. After taking a credit builder loan at the UUFCU, Ricardo was able to successfully apply for a credit card at one of the commercial banks that had initially rejected him. In less than a year, with Maria’s assistance, Ricardo went from not having a credit score to a score of 689. “Ms. Lopes and Urban Upbound, as an organization, helped get me where I am today by making it possible for me to take my first step and open a bank account,” Ricardo added.

Urban Upbound has continued providing New Yorkers with critical services during this difficult period. From access to financial counseling and employment readiness services to food relief and direct cash assistance, your donation makes it possible for us to serve more families. If you’d like to learn more about our impact and work, please follow us on social media (Facebook, Instagram, Twitter, and Youtube) or subscribe to our newsletter.
From this Year’s Annual Report: Making Benefits Eligibility Information More Accessible
By: Nyc Opportunity
Tags: API, NYC, Technology, Government, Innovation

Katie Zeng — NYC Opportunity

Many New Yorkers are not aware of government benefits for which they are eligible. To make benefits information more widely available, NYC Opportunity released the first-ever NYC Benefits Screening Application Programming Interface (API). It makes eligibility criteria for 30+ social service benefits easily available to anyone using or creating other technology-based tools. This expands the network and accuracy of tools New Yorkers and social service professionals can use to find benefits.

New Yorkers can go to ACCESS NYC, the City’s award-winning online benefits screening platform, and answer a set of questions to find out what benefits they may be eligible for and how to apply.

The API extends the reach of ACCESS NYC by making the programming rules that produce ACCESS NYC’s screening results available for use in other technology applications. Community-based and civic technology organizations and other groups can use the API to make benefits screening part of their existing technology tools, making it easier to advise their clients on which benefits to apply for and how to do so.

The API is an innovation in the benefits landscape, demonstrating how technology can make crucial poverty-fighting tools more widely available and empowering more organizations to support their clients in new ways.

You can read the full annual report here.
Morning in McCarren Park
By: Wade Novak
Tags: Dogs, Brooklyn, NYC

Routine is a dirty word, but stepping through my building entryway this morning I feel nothing but calmness and content. It’s time for my morning dog walk, before work starts, but after coffee has been made. As I venture across the street to McCarren park I take a deep breath of surprisingly warm February air. Today Brooklyn is rainy, stirring slowly, and I can almost hear it rolling over beneath the sheets of mist that hang low and heavy.

Walking with my dog clockwise around the empty softball fields we pass only a handful of commuters and fellow dog/owner pairs. A rainy Friday morning is not a high traffic time. At this time of day, this time of year, the days of summer seem far more distant than the five months of calendar time indicate. Do I miss those days? Sure. Do I mind the steady calm gifted by this morning’s rain? Not at all.

A lap of the park takes 20 minutes. In the five months since arriving in Greenpoint there are days where the south end of this loop is as far from my apartment as I get. Working remote has lots of benefits, but size of social and geographical sphere is not one of them.

So I savor this loop each morning as I do this morning. I savor the contours of the path that make pools just as high as the heel of my boot. I savor the the flyer on the light post titled “Band names that are up for grabs (as far as I know)”. I savor the low umbrellas, the hoods pulled over, and the way we all bend and brace against even the lightest of rain.

I savor a walk well done. Sydney does, too.
Confidence intervals for time series data: SharpestMinds Slack chats
By: Jeremie Harris
Tags: Predictive Analytics, Towards Data Science, Time Series Analysis, Data Science, Machine Learning

By popular demand, we’ve decided to open-source some of the conversations between professional data scientists and their mentees on SharpestMinds’ internal Slack. We hope this will let more people benefit from the expertise on SharpestMinds, even if they don’t have access to the community directly.

When most people start learning data science, the data they work with is time-independent. They predict the survival probabilities of passengers on the Titanic, identify hand-written characters in the MNIST dataset, or carry out. some other, similar task.

To solve these problems, you usually begin by *randomly* assigning each of your samples to one of two different datasets: one that will be used to train your model, and another that will be used to validate its performance. That validation step is important because it’s what allows you to make claims like, “I expect this prediction to be accurate to within 10% of the true value, 19 times out of 20.”

That doesn’t work for time series data, though: if you’re trying to predict seasonal effects, stock market fluctuations or customer churn behavior, you’ll quickly realize that randomly assigning data to training and validation sets destroys the information that was contained in the original dataset’s time ordering.

So how can you provide confidence intervals (AKA: prediction intervals) for your time series predictions?

Or, as a SharpestMinds mentee recently asked on our internal Slack community:

Chiemi had previously found this approach, but it works only for gradient boosting regressors. She wanted a more general solution.

The first great suggestion came from SharpestMinds mentor Ray Phan, who’s a genuine data science Slack superhero:

Here’s a clickable version of the link he provided. I’ll be honest, I did not know about this function, and it looks incredibly handy.

Next came SharpestMinds alum (and now data scientist 🚀) Khai Win:

The Jason Brownlee post she’s linking to is here (highly recommend!).

Finally, mentee Christian Fagan also proposed a really interesting strategy based on Bayesian intervals — it’s more advanced, so worth checking out if you’re adventurous and a lover of math:

(again, here it is in clickable form).

And that’s it! Just a short one today, but I thought all the different perspectives and tools that were suggested here would be helpful if you’re taking a look at your own time series problem.

Until next time 🙂
HP Predicted Who Wanted to Quit. Should Companies Guess Their Employees’ Behavior?
By: Alice Greschkow
Tags: Predictive Analytics, Business, Human Resources, Data Science, Work

HP wanted to save money — and learned a lot about employee motivation

For HP, losing experts is expensive — not only because the company could lose the creative potential to the competition. Training new staff costs time and productivity — it takes several weeks, if not months, for team members to become involved in processes and topics. The HR experts saw a potential saving of 300 million US Dollars through a lower rate of change.

In 2011, a team began to collect and analyze data. They wanted to understand which employee would likely be willing to resign soon. What they found out, was not surprising: promotions, salary increases, and the rotation of positions had a positive effect on the desire to stay at HP. Those factors on one hand expressed appreciation, on the other hand, they ensured that new tasks and more responsibility would make work interesting. Appreciation and novelty are essential for the motivation of employees. Routine kills every spark over time.

However, there were also surprising findings: Especially in the sales department, a high number of promotions harmed the willingness to stay. Sales staff demanded a significant salary increase with each promotion to be willing to stay. If this was not the case, the promotion signaled to the salespeople that they were valuable enough to find a good job elsewhere with better conditions. HP learned how different personality types were attracted to certain jobs and departments and how they behave in atypical ways, in contrast to the average.
Adding a new field to an existing index with zero downtime— Elasticsearch
By: Divyani Joshi
Tags: Update With Zero Downtime, Elasticsearch, Add New Field, Mapping, Index

Let's take care of scenario 1.

I am assuming that we have an ILM policy and a template defined for the index. In case if you do not, it is advisable to create one. The ILM policy will have your rollover conditions defined, and will also define when you want to move the data in warm and cold phases. The template will define your shard settings and mappings and ILM policy to apply to your indices with patterns defined in it. It is recommended to have explicit settings if you know your data well. Make sure to include ILM policy and rollover alias(write alias) in the template. When your condition is met for rollover, the new index is automatically assigned the alias you provide in the template. Also, make sure to use this alias for writing to the index(instead of an index name). Using an alias helps manage the index lifecycle in a streamlined way. This also helps in any changes in mapping, updating the type of a field, adding a new field, etc. we may foresee in the future.

My ILM policy looks like this:-

#My ILM plociy for emloyee-* indices

PUT _ilm/policy/employee-ilm-policy

{

"policy": {

"phases": {

"hot": {

"actions": {

"rollover": {

"max_age":"30d",

"max_docs": 1,

"max_size":"50gb"

}

}

},

"warm": {

"min_age": "1h",

"actions": {

"allocate": {

"include": {},

"exclude": {},

"require": {

"data": "warm"

}

}

}

}

}

}

}

Let’s add the additional field to our template. My updated template for employee looks like this:

Now let's create a new index for your live incoming data. The format below creates an index as per the month and year. In this example, It will create an index of the form employee-2020–10–000001.

When the rollover condition is met(for example after 30d ), the ILM policy will auto-generate the employee-2020–11–000002 index. For more information patterns of such kind refer here

PUT /%3Cemployee-%7Bnow%2Fm%7Byyyy-MM%7D%7D-000001%3E

{

"aliases": {

"employee-alias":{

"is_write_index": true

}

}

}

Now point your code to refer to employee-alias. In my case, I will update my logstash setting to write to employee-alias. ALWAYS USE AN ALIAS AND NEVER AN INDEX NAME.

input {

... #you own input setting

}

filter {

json {

source => "message"

remove_field => ["message"]

}

ruby {

code => 'event.set("SalaryPerYear",(event.get("SalaryPerMonth").to_i * 12))'}

mutate {

..# if you need to add or remove fields from your data

}

}

output {

elasticsearch {

user=> "${USER}"

password=> "${PASSWORD}"

hosts => ["${ELASTICSEARCH_URL}"]

index=> "employee-alias"

manage_template => "false"

}

}

Please note that if you do not set the type of the new field in the mapping then the new field by default will be of text type. Hence it is necessary to update your mappings in the template settings before you switch the write alias to point to the new index.
Elasticsearch Composite Aggregation Java API example
Tags: Java, Elasticsearch, Composite Aggregations

While I was trying to build a Composite Aggregation request from a java client, I realized there is a no-good example found in any resources. So here is a simple composite aggregation request (with a sub-aggregation).

P.S.: Composite Aggregation is not present inside Aggregations (org.elasticsearch.search.aggregations.*). Its present Inside Composite (org.elasticsearch.search.aggregations.bucket.composite.*)

List<CompositeValuesSourceBuilder<?>> sources = new ArrayList<>();

sources.add(new TermsValuesSourceBuilder("field1").field("field1"));

sources.add(new TermsValuesSourceBuilder("field2").field("field2"));

sources.add(new TermsValuesSourceBuilder("field3").field("field3")); CompositeAggregationBuilder compositeAggregationBuilder =

new CompositeAggregationBuilder("byProductAttributes", sources).size(10000);

You can add sub-aggregations as

compositeAggregationBuilder

.subAggregation(AggregationBuilders.min("sub-field1").field("sub-field1"))

.subAggregation(AggregationBuilders.max("sub-field2").field("sub-field2"))

Then add it to the searchSourceBuilder
Using Multiple Elastic Search in Rails
Tags: Rails, Elasticsearch, Ruby on Rails, Ruby, Search Engines

Image by Pexels from Pixabay

For the Multi Database support i.e. managing model-specific database connection, we were waiting for Rails 6. It enhances our application to scale on the database level. You can check the below blog for some more details.

Similarly, we had a requirement to have multiple elastic search application for an architectural reason. That is we need to configure the elastic search specific to model. It is not a bigger deal like maintaining a database connection. In elastic search, it is just an API level integration.

With elasticsearch-rails gem, it can be simply configured by assigning the client directly to __elasticsearch__.client of the model.

For example, if you have a model Article ,

class Article < ActiveRecord::Base

include Elasticsearch::Model

end

The elastic search client can be assigned directly to the model in the following way,

Article. __elasticsearch__.client = Elasticsearch::Client.new url: “http://127.0.0.1:9200"

In our case, we have configured two elastic search clients, one specific to two models and another for remaining models.

The initializer configuration of the above is as,
So we were in a similar boat, our storage network blinked and 2/3 Elasticsearch nodes got hit with…
By: Wade Rossmann
Tags: Elasticsearch, Data Engineering

So we were in a similar boat, our storage network blinked and 2/3 Elasticsearch nodes got hit with read-only disks. Indices went red, errors that wouldn’t clear, retries exhausted, _cluster/reroute seemingly not working even after reboots, fscks, and service restarts.

[2019-11-14T11:13:11,166][DEBUG][o.e.a.a.c.a.TransportClusterAllocationExplainAction] [clusty-mcclusterface] explaining the allocation for [ClusterAllocationExplainRequest[useAnyUnassignedShard=true, includeYesDecisions?=false], found shard [prod_syslog_linux_0][0], node[null], [P], recovery_source[existing recovery], [UNASSIGNED], unassigned_info[[reason=ALLOCATION_FAILED], at[2019-11-14T08:05:20.187Z], failed_attempts[5], delayed=false, details[failed to create shard, failure FileSystemException[/data/elasticsearch/graylogesearch1-graylog2/nodes/0/indices/jpJkzjabSKaf_CnWgyughA/0/_state/state-2.st.tmp: Read-only file system]], allocation_status[deciders_no]]]

We found your article before lunch and were going to try it after, but I had a few minutes to kill…

“Couldn’t hurt to hit reroute again”

I happened to have a previous count of red/yellow/green indices up on my screen, and only then did I notice that I had a handful fewer reds, and a handful more yellows/greens.

“This is too stupid to work”

But, inexplicably, repeatedly hitting _cluster/reroute?retry_failed=true seems to have brought all of our indices back to green with no apparent loss of data. We have exactly zero ideas as to why this worked, but it did, and it might for others.

Crack open a couple terminals. In one run:

while true curl -s localhost:9200/_cat/indices | awk ‘{print $1}’ | sort | uniq -c | tr “

” “ “; echo ‘’; sleep 5; done

Which gets you a running count of statuses. Then in the other run your curl -s localhost:9200/_cluster/reroute?retry_failed=true and if you’re the right kind of lucky you might see an index or two change state.

No guarantee, no explanation, but no reason not to give it a try if you’re up this particular creek.

Elasticsearch Version: 5.6.8