timeline
title History of Social Media Platform
2002 : LinkedIn
2004 : Facebook
: Google
2005 : Youtube
2006 : Twitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import yaml | |
import ipaddress | |
from intervaltree import IntervalTree, Interval | |
def read_csv_lines(file): | |
with open(file, 'r') as file: | |
csv_reader = csv.reader(file) | |
return [row[0] for row in csv_reader] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
# exprassemble | |
Generate 8086 code for a given infix expression | |
It creates .asm yet it can't print the output | |
## Steps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from subprocess import call | |
import json | |
import os | |
import requests | |
def download_gists(gists: list): | |
for gist in gists: | |
call(["git", "clone", gist["git_pull_url"]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Here be dragons | |
This is a basic interpreter | |
a computer program is just text. Compilers and interpreters translate this text for the machine | |
let's say our program is 2 * 7 + 3 | |
1. First step is lexical analysis, a fancy term for tokenizing |
You are a professional robber planning to rob houses along a street.
Each house has a certain amount of money stashed.
Meanwhile, adjacent houses have security system connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
q1: max robbery ?
q2: what if houses form a circle so the first and last are neighbors ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <tuple> | |
#include <cmath> | |
const double PI = 3.141592653589793238463; | |
using namespace std; | |
class RobotController { | |
float robotRadius = 0.1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "headers/audio.h" | |
#define fifo_threshold 96 //Audio out fifo | |
/**************************************************************************************** | |
* For playing the audio contained in passed array | |
****************************************************************************************/ | |
void play_audio(int audio[],int audio_len) | |
{ | |
int fifospace; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.apps import AppConfig | |
class UsersConfig(AppConfig): | |
name = "users" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django_filters.rest_framework import FilterSet | |
from django_filters import DateFromToRangeFilter | |
from api.models import Record | |
from django_filters.rest_framework import DjangoFilterBackend | |
from rest_framework import filters | |
class CustomFilter(FilterSet): | |
date = DateFromToRangeFilter() |
NewerOlder