博客主页 所有文章 标签 关于我
img

claudia

frontend / python

keep moving


small world


  • 博客主页
  • 所有文章
  • 标签
  • 关于我
  1. 集合通信操作学习

    集合通信,指的是分布式进程中,多个进程同时进行某一项操作(也叫规约)时的动作。这个规约操作可以是执行加法、减法、乘法…比如多机多gpu,执行数据的规约操作。其中每个进程有一个唯一id,rank,以0为起始。例如2个进程,则分为rank为0和11. 规约操作分类规约操作根据规约的形式分为几类: allgather, allreduce reduce reducescatter sendrecv1.1 allgather收集所有进程的数据,每个进程都存储一份gather后的结果图片来...…

    2025-01-27
    collective
    阅读全文 »

  2. c语言:二维数组传参

    二维数组传参数时需要注意的是告诉编译器传递的是一个数组指针。有3种写法写法1:传递int (*array)[3]含有3个元素的一维数组指针地址在C语言中,虽然不能直接传递二维数组作为指针的指针(即int**类型),但可以通过传递指向数组第一维的指针和行数来实现对二维数组的操作。由于二维数组实际上是按行连续存储的一维数组,因此可以通过一维指针间接操作整个二维数组。下面是一个通过“指针的指针”方式模拟二维数组传参的示例,但实际上内部处理的是一维数组:#include <stdio.h&g...…

    2024-01-25
    carray
    阅读全文 »

  3. 《Linux设备驱动程序》读书笔记

    1. 设备和模块分类1.1 驱动分类 字符设备:可以当做一个字节流来存取设备,一个字符驱动负责实现这种行为。驱动常常至少实现open,close,read,write系统调用。一个字符设备和普通文件区别:普通文件可以移来移去,但是大部分字符设备仅仅是数据通道,只能顺序存取。 块设备:通过/dev目录的文件系统节点来存取。 网络接口 7 Linux设备驱动中的并发控制7.1 信号量和互斥锁的区别信号量和自旋锁是两种不同的同步机制,用于保护共享资源不被...…

    2024-01-16
    driverlinux
    阅读全文 »

  4. build source code of cpython record

    envenv: ubuntu 1804guide git clone cpython from github cd cpython-main and run commands: ref(https://devguide.python.org/) ./configure --with-pydebug && make -j2.1 some errors occur, remind us some modules need to be installe...…

    2023-12-24
    cpython
    阅读全文 »

  5. Operating System study

    《Computer Systems: A Programmer’s Perspective》 reading records1.7 operating systems 2 primary purposes1)protect the hardware form misuse by applications2)provide applications with simple and uniform mechanisms for manipulating hardware devices1.7....…

    2023-10-27
    operatingsystemstudy
    阅读全文 »

  6. 《程序员的自我修养》读书笔记

    1 背景知识进程process p:thread athread bthread ab可共享进程p的数据: 全局变量 堆数据 函数里的静态变量 程序代码,任何线程都有权利读取并执行任何代码 打开的文件,A线程打开的文件可由B线程读写thread的私有空间: 局部变量 栈 函数的参数 TLS(线程局部存储) 寄存器fork一个进程,linux采用写时复制。因此在只读的情况下fork进程特别快。fork:产生本任务的镜像,exec启动新任务。clone:产生新的线程,从指定...…

    2023-10-07
    compile
    阅读全文 »

  7. 闭包

    闭包概念在一个内部函数中,对外部作用域的变量进行引用,并且一般外部函数的返回值为内部函数,那么内部函数就被认为是闭包闭包的作用 可以读取函数内部的变量 让内部变量始终保持在内存中闭包demojs demo://此处可以将闭包理解成能够读取其它函数内部变量的函数。f2就是闭包function f1(){ var n=110; function f2(){ console.log(n) //子对象可以访问父对象的所有属性。父对象不能访问子对象属性 n...…

    2022-07-16
    closure
    阅读全文 »

  8. send email with python

    python demosend email python demo code#!/usr/bin/python# -*- coding: UTF-8 -*-from email.mime.text import MIMETextfrom email.header import Headerfrom smtplib import SMTP_SSLclass Sender(object): def __init__(self): # smtp server of qq ma...…

    2022-07-10
    python
    阅读全文 »

  9. tcp三次握手连接+四次挥手断开

    学习tidevice启动webdriveragent的过程中正好想到用wireshark抓包看一下tcp三次握手四次断开流程。三次握手备注:此图来源于https://segmentfault.com/a/1190000039165592一些标志符意义:SYN: 连接请求ACK: 确认报文段seq: 报文序号ack: 期望收到的下一个字节号| 序列号 | client | 数据流向 | server | ...…

    2022-04-23
    tcp
    阅读全文 »

  10. tidevice的魔法: 跨平台吊起webdriver agent runner源码学习

    根据tidevice git文档 ,tidevice可以实现跨平台(windows/linux/mac)自动化测试。在windows上,tidevice可以脱离Xcode唤起ios上已经安装好的webdriveragent runner app。tidevice是怎么实现脱离Xcode吊起webdriver agent runner的呢?让我们来读一读源码。由一条命令tidevice wdaproxy -B com.facebook.wda.WebDriverAgent.Runner --...…

    2022-04-22
    tidevice
    阅读全文 »

  11. Usbmux

    usbmux intro refThis is a system for multiplexing several "connections" over one USB pipe. Conceptually, it provides a TCP-like system-processes on the host machine open up connections to specific, numbered ports on the mobile device.Communication...…

    2022-04-21
    ios
    阅读全文 »

  12. appium source code study

    Running Appium from Sourceappium linknpm installnpm run buildnode .debug appium:ref link node --inspect-brk . --port 4723in chrome, open: ‘chrome://inspect/#devices’source code analysispackages:http://appium.io/docs/en/contributing-to-appium/ap...…

    2022-04-20
    appium
    阅读全文 »

  13. socket 编程:大小端数据

    大小端数据:0X12345678内存地址从低到高 0x0001 0x0002 0x0003 0x0004大端: 0x12 0x34 0x56 0x78 高位数据在低位地址小端: 0x78 0x56 0x34 0x12 低位数据在低位地址由于发送端接送端主机可能存在主机序列模式不同,故发送出去数据时,统一转换为...…

    2022-03-29
    socket
    阅读全文 »

  14. transfer from unicode to utf-8 encoding

    Chinese character: 汉its Unicode value: U+6C49convert 6C49 to binary: 01101100 01001001 1101100 01001001h= "汉"# hex to binary, unicode valueh.encode("unicode_escape")Out[112]: b'\\u6c49' #hex decimalint('6c4...…

    2022-01-10
    encoding
    阅读全文 »

  15. libimobiledevice guide to control iphone

    libimobiledevice github docstep1 install libimobiledevice brew update brew uninstall --ignore-dependencies libimobiledevice brew uninstall --ignore-dependencies usbmuxd brew install --HEAD usbmuxd brew unlink usbmuxd brew link us...…

    2021-09-22
    appium
    阅读全文 »

  16. Appium mac config guide

    appium mac config guide1. install appiumAppium can be installed in one of two ways: via NPM or by downloading Appium Desktop, which is a graphical, desktop-based way to launch the Appium server.here we use the npm to install appium. firstly confir...…

    2021-09-20
    appium
    阅读全文 »

  17. Selenium usage collection

    insert value to inputWhen we want to use selenium to insert some value to input element in html, we follow steps as follows: step1: clear the text in the input step2: insert valuefirstly, we get element: #!-encoding=utf-8- chrome_option = ...…

    2021-09-11
    selenium
    阅读全文 »

  18. Selenium study

    seleinum docwhat is SeleniumSelenium is an open source automated testing suite for web applications. Selenium has four components: Selenium Integrated Development Environment (IDE) Selenium Remote Control (RC) Webdriver S...…

    2021-04-11
    selenium
    阅读全文 »

  19. blockchain study

    blockchains types: Public blockchains: such as Bitcoin. open for anyone to participate at any leve, and have opens Permissioned blockchains: such as Ripple. control roles that individuals can play within the network. Private blockchains区块链技术应用场...…

    2020-05-06
    blockchain
    阅读全文 »

  20. ssh commands study

    ssh with proxyssh -o 'ProxyCommand=ssh username@jumpserver nc jumpserver 22' root@remoteserverssh -tt CNHZ5GRAN1133+tester@10.57.152.85 ssh -tt root@10.57.157.83useful linksdifference-between-ssh-proxycommand-w-nc-exec-nc…

    2020-05-01
    ssh
    阅读全文 »


1 / 2 更早 →
  • RSS

Copyright © keep moving 2025 Theme by claudia1204 |

本站总访问量 次