Skip to content

Instantly share code, notes, and snippets.

View Tin-Nguyen's full-sized avatar

Tin Nguyen Tin-Nguyen

  • Unified
  • New York, USA
View GitHub Profile
@Tin-Nguyen
Tin-Nguyen / txt
Created January 14, 2026 18:39
Example 2 - Search Lift
Example Input 2
Search Term: Metro Bank
Opportunity Dates Data: Metro Bank account_name, industry, channel, opportunity_name, opportunity_foreign_id, start_date, end_date Metro Bank, Financial Services, broadcast, Metro Bank Q1 Radio WLTW-FM NYC, 006Ps00000ABC123IA1, 2025-01-06, 2025-02-02 Metro Bank, Financial Services, broadcast, Metro Bank Q1 Radio KIIS-FM LA, 006Ps00000ABC124IA1, 2025-01-06, 2025-02-02 Metro Bank, Financial Services, digital, Metro Bank Q1 Display Campaign, 006Ps00000XYZ456IA1, 2025-01-13, 2025-02-09 Metro Bank, Financial Services, broadcast, Metro Bank Tax Season Push WBLS NYC, 006Ps00000ABC125IA1, 2025-02-10, 2025-03-16 Metro Bank, Financial Services, digital, Metro Bank Tax Season Digital, 006Ps00000XYZ457IA1, 2025-02-17, 2025-03-23
Broadcast Daily Impressions: date, broadcast_delivered_impressions, broadcast_ordered_impressions 1/6/25, 145320, 142000 1/7/25, 158940, 155000 1/8/25, 162450, 158000 1/9/25, 171230, 167000 1/10/25, 168920, 165000 1/11/25, 95340, 93000 1/12/25, 87650, 85000
@Tin-Nguyen
Tin-Nguyen / txt
Created January 14, 2026 18:37
Example 1 - Search Lift Story
Example Input 1
Search Term: Boost Mobile
Opportunity Dates Data: Boost Mobile account_name, industry, sub_industry, broadcast_product, opportunity_name, opportunity_foreign_id, advertiser_category, start_date, end_date Boost Mobile, Telecommunication, Cellular Phones, adsplus, Boost Mobi-BOOST Mobile Q2 Chicago-Tzakis, Coco-ChicIL-14891332, 006Ps00000RVuOAIA1, Cell Phones, 2025-05-19, 2025-06-22 Boost Mobile, Telecommunication, Cellular Store, adsplus, Ntl-WJLB-FM Boost Mobi/Gold N Fis4.28 Detroit-37901369-14890945, 006Ps00000RVnOIIA1, 2025-05-19, 2025-06-14 Boost Mobile, Telecommunication, Cellular Phones, adsplus, Boost Mobile Q2 2025 Power99-14639590, 006Ps00000MhtRDIAZ, Cell Phones, 2025-05-05, 2025-06-01 Boost Mobile, Telecommunication, Cellular Store, adsplus, Ntl-WKQI-FM Boost Mobi/Gold N Fis4.28 Detroit-37901370-14890943, 006Ps00000RVnOHIA1, 2025-04-28, 2025-05-11 Boost Mobile, Telecommunication, Cellular Phones, adsplus, Boost Mobile Q1 TAX SEASON Rumba, WDAS and WUSL-LOKOFF, JODI-PhilPA-Copy-143939
version: '2'
services:
postgres:
image: postgres:9.6
container_name: postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres_password
POSTGRES_USER: postgres_user
CREATE TABLE jobs \
(id INT, \
configuration VARCHAR, \
extraParameters VARCHAR, \
jobInstanceId VARCHAR, \
network VARCHAR, \
duration INT,
durationUnit VARCHAR) \
WITH (KAFKA_TOPIC='jobs', \
VALUE_FORMAT='JSON', \
brand_id brand_name publisher lineitem_id media_budget end_date start_date days_remain is_5days_end lineitem_foreign_id lineitem_name adaccount_id adaccount_name actual_days_num avg_3day_media_spend yesterday_media_spent spent_today spent_through_yesterday budget_remaining_as_of_yesterday true_pacing_pct pacing_status_key pacing_status is_underpasing is_overpacing pacing_trend_pct spent_to_date budget_remain budget_complete_pct budget_at_risk avg_daily_spend_target open_media_budget open_media_budget_pct
0f543841-6eba-4029-9a34-d735215111df Spotify facebook 195dd03a-86cb-43e0-b5ac-7418c9dd1deb 100000000 2018-01-01 00:00:00 2017-01-01 00:00:00 -407 0 PM - Subs Evergreen 2 1437331579719236 PM - Subs Evergreen 2 3 0.00 0.00 0.00 0.00 100000000.00 0 1 Underpacing 1 0 0 0.00 100000000 0 100000000.00 0 0.00 0.00
{
"breakdowns": null,
"default_summary": true,
"action_attribution_windows": "['1d_view', '28d_click']",
"level": "ad",
"line_item_id": "5f6b9a02-ab27-4c6b-8a19-8652273c218f",
"fields": "reach,cpp,frequency,unique_actions,total_unique_actions,estimated_ad_recallers,cost_per_estimated_ad_recallers,estimated_ad_recall_rate,unique_inline_link_clicks,video_avg_percent_watched_actions,video_avg_time_watched_actions,canvas_avg_view_time,canvas_avg_view_percent,unique_clicks,unique_inline_link_click_ctr,cost_per_unique_inline_link_click",
"ids": "23842713111030454,23842713111100454,23842713111110454,23842713111120454,23842713111130454,23842713111140454,23842713111150454,23842713111160454,23842713111170454,23842713111180454,23842713111190454,23842713111200454,23842713111210454,23842713111220454,23842713111230454,23842713111240454,23842713111250454,23842713111260454,23842713111270454,23842713111280454,23842713111290454,23842713111300454,23842713111310454,23842713111320454,23842713111330454,
it('should dispatch action', (done) => {
const getState = {}
const action = { type: 'ADD_TODO' }
const expectedActions = [action]
const store = mockStore(getState, expectedActions, done)
store.dispatch(action)
})
it('should set token', () => {
const nextState = reducer(undefined, {
type: USER_SET_TOKEN,
token: 'my-token'
})
// immutable.js state output
expect(nextState.toJS()).to.be.eql({
token: 'my-token'
})
it('simulates click events', () => {
const onButtonClick = sinon.spy()
const wrapper = shallow(
<Foo onButtonClick={onButtonClick} />
)
wrapper.find('button').simulate('click')
expect(onButtonClick.calledOnce).to.be.true
})
const LatestPostsComponent = props => {
const postPreviews = renderPostPreviews(props.posts);
return (
<section>
<div><h1>Latest posts</h1></div>
<div>
{ postPreviews }
</div>
</section>