Skip to content

Instantly share code, notes, and snippets.

View cherkesgiller's full-sized avatar
🎯
0xDEADBEEF

Cherkesgiller Tural cherkesgiller

🎯
0xDEADBEEF
  • Idrak Technology Transfer
  • Azerbaijan
View GitHub Profile
# coding: utf-8
# code snippet from http://www.johnvinyard.com/blog/?p=268
import numpy as np
from numpy.lib.stride_tricks import as_strided as ast
def norm_shape(shape):
'''
Normalize numpy array shapes so they're always expressed as a tuple,
even for one-dimensional shapes.
@cherkesgiller
cherkesgiller / coursera_downloader.py
Created December 22, 2020 16:49 — forked from rjdp/coursera_downloader.py
Script for downloading course Lectures from coursera specialization or individual course
import os
import requests
import time
import sys
video_quality = "540p" # available qualities 360p, 540p, 720p
"""
In order to get courseId go to a course page open network tab in browser dev tools and search for "onDemandSpecializations"
in search input of network tab and then go to videos section of say week 1 , check the query param "courseId" its value is what we use can use as value for "one_of_specialization_course_id"
@cherkesgiller
cherkesgiller / AimCamera.cs
Created August 5, 2018 17:16 — forked from hiko9lock/AimCamera.cs
[Unity 3D] Testing camera pan,zoom, orbit for using mouse button. Setting camera rarget after you have attached this camera script to camera object. ・Hold left mouse button orbit ・Hold middle mouse button pan ・Hold ALT with right mouse button zoom
using UnityEngine;
using System.Collections;
public class AimCamera : MonoBehaviour {
public Transform target;
Vector3 f0Dir= Vector3.zero;
Vector3 upVal= Vector3.zero;
float zoomDistance= 5;
float theta= 0.0F;
float fai= 0.0F;