Skip to content

Instantly share code, notes, and snippets.

/*
Yep, this is not the reason for improved transfer rate.
Code courtesy of PCO
*/
static void
adapt_camera_memory(UcaPcowinCameraPrivate *priv)
{
gboolean do_adapt = FALSE; // Set to FALSE to prepare for checking valid images
DWORD dwTest;
DWORD dwTest2;
#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include"include/uv.h"
struct my_data{
int fd;
char *buf;
}priv;
// gcc -o demo demo.c api.c usb.c -L. -lhidapi-libusb -lrt -lusb-1.0 -ldlpspec -lm -fno-stack-protector
#include <stdio.h>
#include "common.h"
#include "usb.h"
#include "api.h"
int main()
{
USB_Init();
@saisasidhar
saisasidhar / keybase.md
Created August 25, 2016 18:30
keybase.io prove github

Keybase proof

I hereby claim:

  • I am saisasidhar on github.
  • I am sasi (https://keybase.io/sasi) on keybase.
  • I have a public key ASA-Q-9FamTvNL0uD2kOaDDGINcPwt0jkF5xJgTAb82ByQo

To claim this, I am signing this object:

@saisasidhar
saisasidhar / asyncio_unary_stream_grpc.py
Created March 5, 2019 10:23
Python asyncio snippet for server streaming RPCs
"""
From: https://grpc.io/docs/guides/concepts.html
Server streaming RPCs where the client sends a request to the server and gets a stream to read a sequence of messages back. The client reads from the returned stream until there are no more messages. gRPC guarantees message ordering within an individual RPC call.
rpc LotsOfReplies(HelloRequest) returns (stream HelloResponse){}
"""
import asyncio
import janus
# Based on elessar theme
# https://github.com/fjpalacios/elessar-theme
# Which is based on Gitster theme
# https://github.com/shashankmehta/dotfiles/blob/master/thesetup/zsh/.oh-my-zsh/custom/themes/gitster.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
function get_pwd(){
git_root=$PWD
01
23
36
FE
00
00
60
02
C1
EC
Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.
-- Jamie Zawinski
http://codemines.blogspot.com/2006/08/now-they-have-two-problems.html
@saisasidhar
saisasidhar / overview.txt
Created November 27, 2019 22:06
PyQt Strategy for CPU Bound Tasks
Managed By
Main Process ProcessPoolExecutor
+-------------------------------------------+ +---------------+
| MainThread QTaskRunner | | |
| +-----------+ +----------+ | executor.submit | +---------+ |
| | | | QThread +------------------->+ | P#1 | |
| | | | | | Future | | | |
| | | | +<-------------------+ | | |
| | | | | | PIPE | | +-----+ | |
| | | | +--+-----------------+--->+ | | |
@saisasidhar
saisasidhar / eos_as_videofeed.md
Created December 1, 2020 15:32
Canon EOS as video feed in Arch Linux
➜ uname -r
# get installed kernel version
➜ pacman -S linux-headers
# select kernel version