Skip to content

Instantly share code, notes, and snippets.

View nicedayzhu's full-sized avatar
🎯
Focusing

nicedayzhu

🎯
Focusing
  • Nan Tong,JiangSu
View GitHub Profile
@SNWCreations
SNWCreations / FindActualPawn.cs
Last active May 18, 2025 09:47
A piece of C# code which could find the player pawn which is actually controlled by the given player. This will consider bots which are controlled by players. Using CounterStrikeSharp API.
// Author: SNWCreations (GitHub: @SNWCreations)
// Licensed under CC0 License, feel free to use this anywhere.
/**
* Find the player pawn which is actually controlled by the given player.
* This will consider bots which are controlled by players.
*/
public static CCSPlayerPawn? FindActualPawn(CCSPlayerController player)
{
// Better solution after some research:
@kevinkindom
kevinkindom / Python Socket 编程详细介绍.md
Last active October 10, 2025 03:20
Python Socket 编程详细介绍

Python Socket 编程详细介绍

Python 提供了两个基本的 socket 模块:

  • Socket 它提供了标准的BSD Socket API。
  • SocketServer 它提供了服务器重心,可以简化网络服务器的开发。

下面讲解下 Socket模块功能。

Socket 类型

@bellbind
bellbind / capture.c
Last active December 15, 2022 02:18
[linux][v4l2][libjpeg][c99]example for capturing from UVC webcam (on beaglebone black)
/*
* capturing from UVC cam
* requires: libjpeg-dev
* build: gcc -std=c99 capture.c -ljpeg -o capture
*/
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@mojaie
mojaie / gist:6257249
Last active August 7, 2022 09:22
Example of PySide QTableWidget
# coding: UTF-8
import sys
from PySide import QtGui, QtCore
u""" サンプルデータ """
title = ["hoge", "fuga", "piyo"]
data = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
@maxlapshin
maxlapshin / capture_raw_frames.c
Created September 30, 2011 11:50
v4l2 capture example
/*
* V4L2 video capture example
*
* This program can be used and distributed without restrictions.
*
* This program is provided with the V4L2 API
* see http://linuxtv.org/docs.php for more information
*/
#include <stdio.h>