Skip to content

Instantly share code, notes, and snippets.

@cafew
cafew / watchdog.py
Created January 20, 2023 10:59 — forked from wolever/watchdog.py
A simple watchdog for long-running Python processes
"""
A simple watchdog for long running processes which may stall for some reason or
another.
If the main thread hasn't logged progress (by updating
``self.last_progress_time``) in WATCHDOG_HARD_KILL_TIMEOUT, the watchdog
thread will log an error containing the stack trace of all currently running
threads then use ``kill -9`` to kill the main process.
Assumes that a process monitor like supervisor or systemd will then restart
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cafew
cafew / data.csv
Created March 11, 2020 03:33 — forked from karamanbk/data.csv
We can't make this file beautiful and searchable because it's too large.
recency,history,used_discount,used_bogo,zip_code,is_referral,channel,offer,conversion
10,142.44,1,0,Surburban,0,Phone,Buy One Get One,0
6,329.08,1,1,Rural,1,Web,No Offer,0
7,180.65,0,1,Surburban,1,Web,Buy One Get One,0
9,675.83,1,0,Rural,1,Web,Discount,0
2,45.34,1,0,Urban,0,Web,Buy One Get One,0
6,134.83,0,1,Surburban,0,Phone,Buy One Get One,1
9,280.2,1,0,Surburban,1,Phone,Buy One Get One,0
9,46.42,0,1,Urban,0,Phone,Buy One Get One,0
9,675.07,1,1,Rural,1,Phone,Discount,0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cafew
cafew / content.md
Created April 7, 2019 05:14 — forked from baymaxium/content.md
看完后,别再说自己不懂用户画像了

原文:秦路

用户画像是一个挺新颖的词,最初它是大数据行业言必及之的时髦概念。现在我们运营谈及用户画像,它也是和精准营销、精细化运营直接钩挂的。这篇文章主要讲产品和运营角度的用户画像。

希望看完后,解决你一切关于用户画像的疑问。

  什么是用户画像

用户画像一点也不神秘,它是根据用户在互联网留下的种种数据,主动或被动地收集,最后加工成一系列的标签。比如猜用户是男是女,哪里人,工资多少,有没有谈恋爱,喜欢什么,准备剁手购物吗?

@cafew
cafew / gaussian-processes-1.ipynb
Created September 25, 2018 10:57 — forked from abridgland/gaussian-processes-1.ipynb
A Jupyter notebook to accompany Intro to Gaussian Processes - Part I at http://bridg.land/posts/gaussian-processes-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.