Skip to content

Instantly share code, notes, and snippets.

View mic159's full-sized avatar

Michael mic159

  • Atlassian
  • Australia
View GitHub Profile
@magnetikonline
magnetikonline / README.md
Last active March 18, 2024 01:27
Python threaded workers using ThreadPoolExecutor().

Python threaded workers using ThreadPoolExecutor()

A pattern for using concurrent.futures.ThreadPoolExecutor() to execute a series of "worker" functions in parallel, processing a queue of assigned "work".

How it works:

  • worker_init() creates:
    • Queues for "work" and "results".
    • A threading.Event() to denote "no more work in queue".
    • A futures.ThreadPoolExecutor().
diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c
index 8bb2747..16a85bf 100644
--- a/hal/hal_com_phycfg.c
+++ b/hal/hal_com_phycfg.c
@@ -2575,7 +2575,7 @@ Hal_ChannelPlanToRegulation(
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
extern char *rtw_phy_file_path;
-char file_path[PATH_LENGTH_MAX];
+char rtw_file_path[PATH_LENGTH_MAX];
@volodymyrsmirnov
volodymyrsmirnov / pysurcamui.py
Created July 11, 2012 10:38
Python surveillance ip camera viewer and alert (tested on Foscam cameras)
#!/usr/bin/env python
import gtk, threading, datetime, urllib2, json
import Image, ImageChops, ImageStat, StringIO
CONFIG_FILE = "config.json"
# config sample
#{
# "sensivity": 10,
@danielfaust
danielfaust / samsung_remote.py
Created May 30, 2011 04:12
Samsung TV Remote Control Python Script
import time
import socket
import base64
src = '192.168.1.2' # ip of remote
mac = '00-AB-11-11-11-11' # mac of remote
remote = 'python remote' # remote name
dst = '192.168.1.3' # ip of tv
app = 'python' # iphone..iapp.samsung