Skip to content

Instantly share code, notes, and snippets.

View MohammedRashad's full-sized avatar
🎸
Developing New Tech

Mohamed Rashad MohammedRashad

🎸
Developing New Tech
View GitHub Profile
@CMCDragonkai
CMCDragonkai / http_streaming.md
Last active October 24, 2024 17:43
HTTP Streaming (or Chunked vs Store & Forward)

HTTP Streaming (or Chunked vs Store & Forward)

The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.

However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on

@karpathy
karpathy / min-char-rnn.py
Last active November 18, 2024 15:04
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@vasanthk
vasanthk / System Design.md
Last active November 18, 2024 01:50
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?
@opera443399
opera443399 / python_UnicodeEncodeError.py
Last active October 18, 2023 16:47
export PYTHONIOENCODING=UTF-8
from:
http://chase-seibert.github.io/blog/2014/01/12/python-unicode-console-output.html
Print to the console in Python without UnicodeEncodeErrors 12 Jan 2014
I can't believe I just found out about this! If you use Python with unicode data, such as Django database records, you may have seen cases where you print a value to the console, and if you hit a record with an extended (non-ascii) character, your program crashes with the following:
Traceback (most recent call last):
File "foobar.py", line 792, in <module>
print value
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 20: ordinal not in range(128)
@opera443399
opera443399 / Contributing.md
Created October 10, 2017 07:27
Contributing Guidelines(from portainer)

Contributing Guidelines

Some basic conventions for contributing to this project.

General

Please make sure that there aren't existing pull requests attempting to address the issue mentioned. Likewise, please check for issues related to update, as someone else may be working on the issue in a branch or fork.

  • Please open a discussion in a new issue / existing issue to talk about the changes you'd like to bring
  • Develop in a topic branch, not master/develop