Skip to content

Instantly share code, notes, and snippets.

View arvind-india's full-sized avatar

Arvind Singh arvind-india

  • Bangalore
View GitHub Profile

How to download your Udemy course videos using youtube-dl

$ youtube-dl --list-extractors | grep udemy

Steps

  1. Get link to the course to download. e.g. https://www.udemy.com/course-name/
  2. Login into udemy website, save the cookie from chrome using Chrome (Cookie.txt)[1] export extension. Save it to file udemy-cookies.txt
  3. Get the link of the video that you want to download. usually in format. Use the command provided below where you have to replace the {course_link} and {path_to_cookies_file} with respective paths.
$ youtube-dl {course_link} --cookies {path_to_cookies_file}
@arvind-india
arvind-india / build.sh
Created May 13, 2020 16:58 — forked from bachwehbi/build.sh
Simple MQTT publish and subscribe using Paho embedded C/C++ Client
cp ../../src/MQTTClient.c .
sed -e 's/""/"MQTTLinux.h"/g' ../../src/MQTTClient.h > MQTTClient.h
gcc sub.c -I ../../src -I ../../src/linux -I ../../../MQTTPacket/src MQTTClient.c ../../src/linux/MQTTLinux.c ../../../MQTTPacket/src/MQTTFormat.c ../../../MQTTPacket/src/MQTTPacket.c ../../../MQTTPacket/src/MQTTDeserializePublish.c ../../../MQTTPacket/src/MQTTConnectClient.c ../../../MQTTPacket/src/MQTTSubscribeClient.c ../../../MQTTPacket/src/MQTTSerializePublish.c -o sub ../../../MQTTPacket/src/MQTTConnectServer.c ../../../MQTTPacket/src/MQTTSubscribeServer.c ../../../MQTTPacket/src/MQTTUnsubscribeServer.c ../../../MQTTPacket/src/MQTTUnsubscribeClient.c
gcc pub.c -I ../../src -I ../../src/linux -I ../../../MQTTPacket/src MQTTClient.c ../../src/linux/MQTTLinux.c ../../../MQTTPacket/src/MQTTFormat.c ../../../MQTTPacket/src/MQTTPacket.c ../../../MQTTPacket/src/MQTTDeserializePublish.c ../../../MQTTPacket/src/MQTTConnectClient.c ../../../MQTTPacket/src/MQTTSubscribeClient.c ../../../MQTTPacket/src/MQTTSerializeP
@arvind-india
arvind-india / jupyter_save_script.py
Created June 22, 2019 23:25 — forked from JirenJin/jupyter_save_script.py
Solve the automatically created `Untitled.txt` problem for Jupyter Lab. Automatically save a copy of notebook to the corresponding language source script, excluding notebooks with "Untitled" names.
import io
import os
import re
from nbconvert.exporters.script import ScriptExporter
from notebook.utils import to_api_path
def script_post_save(model, os_path, contents_manager, **kwargs):
"""Save a copy of notebook to the corresponding language source script.
@arvind-india
arvind-india / netflix-rpi.md
Created February 4, 2019 12:20 — forked from jesstelford/netflix-rpi.md
Netflix on Raspberry Pi (incomplete)

Note: as @clibois mentioned below, due to the DRM Netflix uses, all decoding has to be done in CPU, making it somewhat choppy.

Note 2: Even the RPi 3 suffers from these CPU limitations. There is the potentially risky option of overclocking your RPi 3, but I haven't tried this.

If you manage to get smooth playback, please contact me, or post your solution here

UPDATE: I can no longer get this method to work. I have tried using Chromium v47, and v48, and both result in Netflix error "Oops, something went wrong" / C7053-1807, for which I can find no description online. If you manage to get things up and running, please contact me!

OSMC

@arvind-india
arvind-india / download_sp.py
Created December 17, 2018 12:33 — forked from mckoss/download_sp.py
SharePoint downloader for Python
"""
Download all document links from a web page.
Used to extract all the docouments from a Sharepoint document library.
by Mike Koss, September, 2009
Notes:
9/14/09 mck:
Using Beautiful soup version 3.0.7a. The current version (3.1.0.1) is NOT resilient
@arvind-india
arvind-india / run-custom-cascade.py
Created October 23, 2018 13:09 — forked from keithweaver/run-custom-cascade.py
Object detection using custom Haar Cascade on an image with OpenCV
# Running:
# $ python run-custom-cascade.py
# Import OpenCV
import cv2
# Image file
IMAGE_FILE = './example.png' # Change this to be your image
# Cascade file
@arvind-india
arvind-india / peopleCounter.py
Created September 5, 2018 16:32 — forked from jotathebest/peopleCounter.py
Pedestrian detector that sends people counter results to Ubidots. Libraries: OpenCV, requests, imutils
from imutils.object_detection import non_max_suppression
import numpy as np
import imutils
import cv2
import requests
import time
import argparse
import time
'''
@arvind-india
arvind-india / ProxySettings.java
Created August 13, 2018 18:22 — forked from madeye/ProxySettings.java
Set proxy for Android Webview
package me.madeye;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.apache.http.HttpHost;
import android.content.Context;
private void init()
{
WebView webview = (WebView) findViewById(R.id.webview);
WebSettings settings = webview.getSettings();
settings.setJavaScriptEnabled(true);
webview.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
PdfWebViewClient pdfWebViewClient = new PdfWebViewClient(this, webview);
pdfWebViewClient.loadPdfUrl(
"https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwjgwIfp3KXSAhXrhFQKHQqEDHYQFggZMAA&url=http%3A%2F%2Fwww.orimi.com%2Fpdf-test.pdf&usg=AFQjCNERYYcSfMLS5ukBcT2Qy11YxEhXqw&cad=rja");
@arvind-india
arvind-india / README.md
Created June 9, 2018 16:38 — forked from tywhang/README.md
Easily add Charts into Dashing with Chartjs (Line, Bar, Radar, Polar Area, Pie, Doughnut)

dashing-chartjs

An easy interface to use all of chartjs.org's charts.

Inspired by my own pain and suffering of trying to add a simple chart to dashing

Make awesome charts like these: