Skip to content

Instantly share code, notes, and snippets.

View hlecuanda's full-sized avatar
😡
Mirroring gitlab on ActiveGithub.NET 2019 Ultimate Enterprise EULA Live

H-Lo hlecuanda

😡
Mirroring gitlab on ActiveGithub.NET 2019 Ultimate Enterprise EULA Live
View GitHub Profile
@hlecuanda
hlecuanda / ffmpegtips.txt
Created October 23, 2022 18:45 — forked from rabssm/ffmpegtips.txt
ffmpeg tips
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
# Resize a video to half size
ffmpeg -i input.mkv -filter_complex "scale=in_w/2:in_h/2" output.mkv
@hlecuanda
hlecuanda / firebase_pre-request_script.js
Created November 28, 2019 02:30 — forked from moneal/firebase_pre-request_script.js
Postman pre-request script to create a Firebase authentication JWT header.
/**
* This script expects the global variables 'refresh_token' and 'firebase_api_key' to be set. 'firebase_api_key' can be found
* in the Firebase console under project settings then 'Web API Key'.
* 'refresh_token' as to be gathered from watching the network requests to https://securetoken.googleapis.com/v1/token from
* your Firebase app, look for the formdata values
*
* If all the data is found it makes a request to get a new token and sets a 'auth_jwt' environment variable and updates the
* global 'refresh_token'.
*
* Requests that need authentication should have a header with a key of 'Authentication' and value of '{{auth_jwt}}'
@hlecuanda
hlecuanda / Google_Colaboratory_backup.py
Created April 2, 2019 22:25 — forked from rdinse/Google_Colaboratory_backup.py
Simple Google Drive backup script with automatic authentication for Google Colaboratory (Python 3)
# Simple Google Drive backup script with automatic authentication
# for Google Colaboratory (Python 3)
# Instructions:
# 1. Run this cell and authenticate via the link and text box.
# 2. Copy the JSON output below this cell into the `mycreds_file_contents`
# variable. Authentication will occur automatically from now on.
# 3. Create a new folder in Google Drive and copy the ID of this folder
# from the URL bar to the `folder_id` variable.
# 4. Specify the directory to be backed up in `dir_to_backup`.
@hlecuanda
hlecuanda / pypi.md
Created August 18, 2018 12:29 — forked from alex/pypi.md

Most downloaded projects

SELECT
  file.project,
  COUNT(*) as total_downloads,
FROM
  TABLE_DATE_RANGE(
    [the-psf:pypi.downloads],
    TIMESTAMP("20160114"),
@hlecuanda
hlecuanda / flask_server.py
Created October 22, 2017 17:39 — forked from tschieggm/flask_server.py
Stackdriver webhook server example
import string
import sys
import logging
import json
from flask import Flask
from flask import Response, request
logger = logging.getLogger(__name__)
logger.info("Stackdriver webhook-sample starting up on %s" % (string.replace(sys.version, '\n', ' ')))
@hlecuanda
hlecuanda / .block
Last active December 15, 2016 09:12 — forked from mbostock/.block
Sunburst Partition
license: gpl-3.0
@hlecuanda
hlecuanda / .block
Last active December 15, 2016 08:48 — forked from mbostock/.block
Treemap
border: no
height: 600
license: gpl-3.0
@hlecuanda
hlecuanda / image_displayhook.ipynb
Last active August 25, 2015 22:14 — forked from deeplook/image_displayhook.ipynb
An IPython notebook playing with display hook functions to display PIL images and Reportlab drawings.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hlecuanda
hlecuanda / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:28 — forked from CheoR/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.