Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import os
import re
import sys
def main():
for root, _, files in os.walk(sys.argv[1]):
for file_name in files:
import collections
import json
import gzip
import sys
TOPN = 15
def print_hist(hist, evt_count, top=TOPN):
for key, count in sorted(hist.iteritems(), key=lambda x:x[1], reverse=True):
print ' %-32s %6d %.2f %%' % (key, count, 100.0 * count / evt_count)
#define _GNU_SOURCE
#include <stddef.h>
#include <sys/mman.h>
#include <dlfcn.h>
#include <string.h>
#define ALIAS(tc_fn) __attribute__ ((alias (#tc_fn)))
#define EXPORT __attribute__((visibility("default")))
typedef void* (*mmap_t)(void*, size_t, int, int, int, off_t);
CORPUS="""
And that this API is only available for help with developing the Chrome/Chromium browser, so if you only joined this mailing list for the API you are probably not allowed to use it...
Sorry, no. It is not available for public consumption.
The 'Google Speech API' is intended for use by Chromium only; it's not for general public use. That is why there is no documentation and no way to get additional quota.
See also https://www.chromium.org/developers/how-tos/api-keys and big yellow box. Search the archives too.
Please use a speech API suitable for your platform (e.g. the Web Speech API on the web, or android.speech on Android).
message at the top of https://www.chromium.org/developers/how-tos/api-keys
Of course if you want to use the Web speech API that's different, there's no limit to that, can be used for anything.
https://www.google.com/intl/en/chrome/demos/speech.html /
So, just to be clear, your question has nothing to do with Chrome.
+++ /tmp/patch 2016-05-31 08:34:11.941915136 +0100
--- /tmp/tot 2016-05-31 08:34:06.365874108 +0100
-GLOBAL DEFAULT 13 CyclesPerSecond()
-GLOBAL DEFAULT 13 DefaultSysAllocator::Alloc(unsigned long, unsigned long*, unsigned long)
-GLOBAL DEFAULT 13 DevMemSysAllocator::Alloc(unsigned long, unsigned long*, unsigned long)
-GLOBAL DEFAULT 13 GetHeapProfile
-GLOBAL DEFAULT 13 GetStackFrames(void**, int*, int, int)
-GLOBAL DEFAULT 13 GetStackFramesWithContext(void**, int*, int, int, void const*)
-GLOBAL DEFAULT 13 GetStackTrace(void**, int, int)
-GLOBAL DEFAULT 13 GetStackTraceWithContext(void**, int, int, void const*)
#!/usr/bin/env python
import json
import gzip
import collections
import os
import re
import sys
def sizeof_fmt(num):
Ubuntu 14.04 on X86_64:
-----------------------
PID 34611 about to die jump 0x0
PID 34611 died with sig 11 Segmentation fault
PID 34612 about to die jump 0x12341230
PID 34612 died with sig 11 Segmentation fault
PID 34613 about to die with __builtin_trap
PID 34613 died with sig 4 Illegal instruction
Android 32 bit binary on armv7:
@primiano
primiano / memory-infra-dump-devtools.py
Last active March 10, 2025 04:56
Creates a memory-infra dump using the Chrome Remote Debugging protocol
#!/usr/bin/env python
import argparse
import json
import os
import sys
import tempfile
import time
try:
import websocket
#include <ctype.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <signal.h>
typedef void(*Callback)(uintptr_t /*start*/, unsigned long/*size*/, const char* /*prot flags*/, const char* /*fname*/, unsigned long /*pss*/);
void ForEachMapEntry(Callback callback) {
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
struct MallocFunctions {
void* malloc_fn;
void* zone;
};