Skip to content

Instantly share code, notes, and snippets.

View secp8x32's full-sized avatar
💭
I may be slow to respond.

KV secp8x32

💭
I may be slow to respond.
View GitHub Profile
@secp8x32
secp8x32 / google_stt.py
Created September 26, 2017 14:29 — forked from offlinehacker/google_stt.py
Quick and dirty python implementation of client for google speech to text service using google speech stream API. It requires requests, pyaudio and pyflac to be installed. Don't forget to set your API key. Current limit seems to be around 5 minutes.
#!/usr/bin/python
import flac.encoder as encoder
import pyaudio
import sys
import requests
import random
from threading import Thread
from Queue import Queue, Empty
@secp8x32
secp8x32 / AudioRecordActivity.java
Created October 8, 2017 03:07 — forked from kmark/AudioRecordActivity.java
An example of how to read in raw PCM data from Android's AudioRecord API (microphone input, for instance) and output it to a valid WAV file. Tested on API 21/23 on Android and API 23 on Android Wear (modified activity) where AudioRecord is the only available audio recording API. MediaRecorder doesn't work. Compiles against min API 15 and probabl…
/*
* Copyright 2016 Kevin Mark
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@secp8x32
secp8x32 / curl_jsoncpp_example.cpp
Created January 10, 2018 10:09 — forked from connormanning/curl_jsoncpp_example.cpp
Curl HTTP GET and JsonCpp parsing - basic functionality
#include <cstdint>
#include <iostream>
#include <memory>
#include <string>
#include <curl/curl.h>
#include <json/json.h>
namespace
{
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):
@secp8x32
secp8x32 / gnome-session-documentation.md
Created August 8, 2018 18:25 — forked from najamelan/gnome-session-documentation.md
Gnome Desktop Entry Format extensions - bootlegged documentation

Gnome Desktop Entry Format extensions - bootlegged documentation

Note: if you work on desktop entry files, you should refresh them to see the results: Alt-F2 and run 'r' or 'restart' to restart gnome-shell. Otherwise changes might only work after you log out.

The desktop entry specification creates a standard for application launchers. Gnome adds several extensions to the format which are widely in use, but as far as I can tell undocumented. This is an attempt to document them so I can write my own autostart launchers for gnome. Pull requests are highly welcome.

There is a guide on gnome developer that explains basics about how to integrate an application with the desktop.

Autostart applications run when the user logs into the graphical desktop environment. All desktop managers make custom extensions to the format. This attempts just to cover the Gnome extensions, and won'

@secp8x32
secp8x32 / userChrome.css
Created August 24, 2018 13:21
A fix for firefox title bar buttons when you want them to be on the left hand side.
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#titlebar-max {
-moz-box-ordinal-group: 0;
}
#titlebar-content {
direction: rtl;
}
@secp8x32
secp8x32 / whpp_track_post_views.php
Created September 3, 2018 20:32 — forked from web-hat/whpp_track_post_views.php
Display Popular Posts by Views in WordPress without a Plugin
<?php
function whpp_track_post_views($post_id) {
if (!is_single())
return;
if (empty($post_id)) {
global $post;
$post_id = $post->ID;
}
whpp_set_post_views($post_id);
@secp8x32
secp8x32 / ConvertAndroidVectorDrawable2png.md
Created November 16, 2018 10:21 — forked from qinshulei/ConvertAndroidVectorDrawable2png.md
Convert Android VectorDrawable to png

转换方法:

  1. Convert Android VectorDrawable to SVG:

使用附件中的java程序。命令如下:

cp Vector2Svg.java path/to/xml_dir
javac Vector2Svg.java
java Vector2Svg ./*.xml
mkdir svg_dir
@secp8x32
secp8x32 / pybitbalance.py
Last active April 7, 2022 12:45
Python script for Bitcoin addresses bulk balance checking.
import argparse
import urllib3
from urllib3 import util
import json
import math
LIMIT = 120
SATOSHI = 1e+8
@secp8x32
secp8x32 / ContextCmder-Disable.reg
Created February 21, 2021 18:54 — forked from jojobyte/ContextCmder-Disable.reg
Cmder Context (Right-Click) Menu for Windows 7, 8 & 10
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]