The firmware of this GPON ONT SFP module can be updated using the web interface (Management | Update Software):
The web interface only accepts image files with a special header. These can be created by adding the header to a flash dump.
Update: I created jq-zsh-plugin that does this.
One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).
Another one of my favourite tools is fzf.
| import time | |
| import microcontroller | |
| import digitalio | |
| from adafruit_hid.keyboard import Keyboard | |
| from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS | |
| from adafruit_hid.keycode import Keycode | |
| # A simple neat keyboard demo in CircuitPython | |
| #!/usr/bin/env python | |
| ############################################################################### | |
| # $Id$ | |
| # | |
| # Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
| # Global Map Tiles Classes | |
| # Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
| # generate a simple HTML viewers based on Google Maps and OpenLayers | |
| # Author: Klokan Petr Pridal, klokan at klokan dot cz | |
| # Web: http://www.klokan.cz/projects/gdal2tiles/ |
| import hashlib | |
| import urllib | |
| import urllib2 | |
| import sys | |
| ROUTER_IP = "192.168.1.1" | |
| USERNAME = "admin" | |
| PASSWORD = "YOUR_ROUTER_PASSWORD_HERE" | |
| class TPLink_Archer_C7_Router_Web_Interface: |
| #!/usr/bin/env python3 | |
| """ | |
| Usage: ./asanalyzer.py -d 5 '/home/user/asan_logs/*.log' | |
| Analyze multiple ASan report logs and classify them based on backtrace logs. | |
| ASLR should be disabled prior to running test cases. | |
| Default stack trace depth is 5. This can be changed by passing -d or --depth. | |
| """ |
So, many places will give you clues how to get linear depth from the OpenGL depth buffer, or visualise it, or other things. This, however, is what I believe to be the definitive answer:
This link http://www.songho.ca/opengl/gl_projectionmatrix.html gives a good run-down of the projection matrix, and the link between eye-space Z (z_e below) and normalised device coordinates (NDC) Z (z_n below). From there, we have
A = -(zFar + zNear) / (zFar - zNear);
B = -2zFarzNear / (zFar - zNear);
| int open_file(char *file_path, AVFormatContext **fmt_ctx, AVCodecContext **dec_ctx) { | |
| int audio_stream_index; | |
| AVCodec *codec; | |
| // Find codec and stream | |
| if (avformat_open_input(fmt_ctx, file_path, NULL, NULL) < 0) { | |
| av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n"); | |
| return -1; | |
| } |
| #include <ao/ao.h> | |
| #include <sndfile.h> | |
| #include <signal.h> | |
| #define BUFFER_SIZE 8192 | |
| int cancel_playback; | |
| void on_cancel_playback(int sig) { | |
| if (sig != SIGINT) { |
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.Method; | |
| import java.lang.reflect.Modifier; | |
| public class ReflectionHelper { | |
| public static <T> FieldContainer<T> field(String name) { | |
| return new FieldContainer<T>(name); | |
| } |