Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| // g++ *.cpp -o d3d9 -lmingw32 -lSDL2main -lSDL2 -I/dxsdk/include -L/dxsdk/lib -DUNICODE -ld3d9 -ld3dx9 | |
| // http://blog.fourthwoods.com/2011/08/11/setting-up-mingw-for-directx/ | |
| // http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-4 | |
| #include <iostream> | |
| using namespace std; | |
| #include <SDL2/SDL.h> | |
| #include <windows.h> |
| /* | |
| * dropbox_ext4.c | |
| * | |
| * Compile like this: | |
| * gcc -shared -fPIC -ldl -o libdropbox_ext4.so dropbox_ext4.c | |
| * | |
| * Run Dropbox like this: | |
| * LD_PRELOAD=./libdropbox_ext4.so ~/.dropbox-dist/dropboxd | |
| */ | |
| <html> | |
| <head> | |
| <script> | |
| customElements.define("star-wars-planets", class extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: "open" }); | |
| } | |
| static get observedAttributes() { return ["loading", "planets"]; } |
My largest Sidekiq application had a memory leak and I was able to find and fix it in just few hours spent on analyzing Ruby's heap. In this post I'll show my profiling setup.
As you might know Ruby 2.1 introduced a few great changes to ObjectSpace, so now it's much easier to find a line of code that is allocating too many objects. Here is great post explaining how it's working.
I was too lazy to set up some seeding and run it locally, so I checked that test suite passes when profiling is enabled and pushed debugging to production. Production environment also suited me better since my jobs data can't be fully random generated.
So, in order to profile your worker, add the sidekiq_profiler.rb (below) to your project
Adjust number of jobs you want your worker to process before you have heap dumped.
Run a sample worker: PROFILE=1 sidekiq -C config/sidekiq.yml and wait for jobs to be processed.
Python is the primary language in which TensorFlow models are typically developed and trained. TensorFlow does have bindings for other programming languages. These bindings have the low-level primitives that are required to build a more complete API, however, lack much of the higher-level API richness of the Python bindings, particularly for defining the model structure.
This gist demonstrates taking a model (a TensorFlow graph) created by a Python program and running the training loop in a C program.
An inline image version of Matt Walker's translation of CEDEC 2017 talks by Nintendo. (I've added italic content.)
Covers four talks:
| user www-data; | |
| worker_processes 4; | |
| error_log /var/log/nginx/error.log; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } |
| // Sobel Edge Detection Filter | |
| // GLSL Fragment Shader | |
| // Implementation by Patrick Hebron | |
| uniform sampler2D texture; | |
| uniform float width; | |
| uniform float height; | |
| void make_kernel(inout vec4 n[9], sampler2D tex, vec2 coord) | |
| { |