Skip to content

Instantly share code, notes, and snippets.

View abhimanyu-bitsgoa's full-sized avatar
🚀
Building Cosmos DB

Abhimanyu Singh Shekhawat abhimanyu-bitsgoa

🚀
Building Cosmos DB
View GitHub Profile
@ekager
ekager / bad_place_notify.py
Last active October 28, 2022 08:18
Searches for specified search terms and sends emails if found
"""
This script will search 4chan (need to specify a board unfortunately) and then
search all comments on Reddit for specific keywords. If found, it will then send
an email with the links to any matching posts.
Because 4chan posts are archived after ~48 hours I would recommend setting this up
to run on that cadence as well.
Sender email will need "Allow less secure apps" to ON or similar setting.
I followed these instructions for setting that up:

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.

Steps

Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.

@parente
parente / hello_world.ipynb
Last active February 11, 2017 09:22
Hello World of notebook, seaborn, ipywidgets, dashboards
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vasanthk
vasanthk / System Design.md
Last active May 13, 2024 13:03
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@XinyueZ
XinyueZ / readFromInputStream.java
Created October 9, 2015 13:31
Read input-stream without 3rd library anyway
public static String readFromInputStream(InputStream is) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(is));
StringBuilder builder = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
builder.append(line);
}
return builder.toString();
}
@rxaviers
rxaviers / gist:7360908
Last active May 13, 2024 16:17
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@jboner
jboner / latency.txt
Last active May 13, 2024 12:48
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD