Skip to content

Instantly share code, notes, and snippets.

#Samsiksha 17-Feb-21

OpenEdx API performance - what are the caches built around OpenEDX Can we cache most frequent queries - getEnrolment(), getCourseMeta()

Most important optimizations -

- CDN
- API Gateway
- Middle-tier cache
upstream cheapr{
server 127.0.0.1:3000;
server 127.0.0.1:3000;
}
server
{
root /root/cheapr/public;
server_name cheapr.me cheapr.in;
location / {
proxy_set_header X-Real-IP $remote_addr;
@antani
antani / stocks
Created July 17, 2017 18:05
Stocks
'ACC',
'ADANIENT',
'ADANIPORTS',
'ADANIPOWER',
'ABIRLANUVO',
'AJANTPHARM',
'ALBK',
'AMARAJABAT',
'AMBUJACEM',
'ANDHRABANK',
@antani
antani / 0_reuse_code.js
Created July 17, 2017 18:03
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@antani
antani / today_list.txt
Created July 5, 2017 07:04
today_list
"ADANIPORTS", "APOLLOTYRE", "AMARAJABAT", "BAJFINANCE", "BATAINDIA", "BHARATFORG", "BPCL", "CADILAHC", "DALMIABHA", "DRREDDY", "EXIDEIND", "ESCORTS", "FORTIS", "GRASIM", "GODREJIND", "HINDALCO", "HAVELLS", "JETAIRWAYS", "JUBLFOOD", "MCDOWELL-N", "RELCAPITAL", "SRTRANSFIN", "TATACOMM", "TITAN", "VOLTAS"
@antani
antani / clairvoyance.py
Created February 3, 2017 04:46
Test with Clairvoyance
from clairvoyant import Backtest
from pandas import read_csv
from nsepy import get_history
from datetime import date
# Testing performance on a single stock
variables = [] # Financial indicators of choice # "SSO", "SSC"
trainStart = '2013-03-01' # Start of training period
trainEnd = '2015-07-15' # End of training period
@antani
antani / etcnginxnginx.conf
Created August 12, 2012 12:32
nginx.conf
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;