Skip to content

Instantly share code, notes, and snippets.

@lzbgt
lzbgt / gist:2ae4a111564bac13ed7244dfcc9f8562
Last active October 24, 2024 02:33
华电在线成人硕士-刷视频脚本
# 警告: 后果自负, 作者不承担任何责任, 也不提供任何支持...
import requests
import json
import re
import os
import time
import subprocess
import sys
VI/REk7lC1kj
@lzbgt
lzbgt / force-image-download-with-javascript.markdown
Created February 17, 2022 03:19
Force image download with JavaScript
@lzbgt
lzbgt / csharp-netmq-zmq-demo
Last active December 20, 2021 13:33
csharp netmq zmq client demo
using System;
using System.Text;
using NetMQ;
using NetMQ.Sockets;
using System.Threading;
namespace cshap_zmq
{
class Program
{
@lzbgt
lzbgt / README.md
Created November 8, 2021 03:54 — forked from djfdyuruiry/README.md
WSL 2 - Enabling systemd

Enable systemd in WSL 2

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

    cd /tmp
#include <vector>
#include <iostream>
using namespace std;
struct Neuron;
template <typename Self>
struct SomeNeurons {
// must be declaration here only
// implementation should be placed at the end
void detectMotion(AVPixelFormat format, AVFrame *pFrame)
{
static bool firstRun = true;
static cv::Mat lastImage;
static double _area = 0;
static double area = 0;
static int frameProcessed = 0;
vector<vector<cv::Point> > cnts;
cv::Mat origin;
avcvhelpers::frame2mat(format, pFrame, origin);
@lzbgt
lzbgt / uart.c
Created April 6, 2020 13:20 — forked from glegrain/uart.c
STM32 printf retarget to UART
/*# 1- Identify the UART interface, GPIO pins and Alternate Function #########*/
/* For example:
* B-L475E-IOT01A:
* PB6 ------> USART1_TX
* PB7 ------> USART1_RX
*
* NUCLEO-L476RG:
* PA2 ------> USART2_TX
* PA3 ------> USART2_RX
*
@lzbgt
lzbgt / reciever.sh
Created March 26, 2020 07:01 — forked from tetkuz/reciever.sh
V4L2 Src => RTP
#!/bin/sh
gst-launch-1.0 -v \
rtpbin name=rtpbin \
udpsrc caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=H264" port=5004 \
! rtpbin.recv_rtp_sink_0 \
rtpbin. \
! rtph264depay ! h264parse \
! avdec_h264 ! videoconvert \
! ximagesink
@lzbgt
lzbgt / Time series - Olive oil country of origin.ipynb
Created November 15, 2019 07:55 — forked from oguiza/Time series - Olive oil country of origin.ipynb
course-v3/nbs/dl1/Time series - Olive oil country of origin.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.