This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format = """ | |
[╭─ ](cyan)\ | |
$username\ | |
$hostname\ | |
$container\ | |
$git_branch\ | |
$git_status\ | |
$git_commit\ | |
$fill\ | |
$cmd_duration\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MY_CACHER= | |
IFACE=$1 | |
STATUS=$2 | |
THE_LINE="Acquire::http::Proxy \"http://$MY_CACHER:3142\";" | |
THE_FILE="/etc/apt/apt.conf.d/02proxy-ng" | |
if [ x"$STATUS" = x"up" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Setup script for PetaLinux development environment. | |
# | |
# Copyright (c) 1995-2022 Xilinx, Inc. All rights reserved. | |
# Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved. | |
# | |
SETTINGS_FILE='settings.sh' | |
# The right location will be replaced by the installer | |
XIL_SCRIPT_LOC="./" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <CL/cl.h> | |
#define VECTOR_SIZE 1024 | |
// OpenCL kernel which is run for every work item created. | |
const char *saxpy_kernel = | |
"__kernel \n" | |
"void saxpy_kernel(float alpha, \n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* You need pty setup: socat -d -d pty,raw,echo=0,link=/tmp/pty1 pty,raw,echo=0,link=/tmp/pty2 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* You need pty setup: socat -d -d pty,raw,echo=0,link=/tmp/pty1 pty,raw,echo=0,link=/tmp/pty2 | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.20) | |
project(python_module) | |
find_package(Python3 COMPONENTS Development.Module) | |
#Python_add_library(hello MODULE hello.c) | |
add_library(hello SHARED hello.c) | |
target_include_directories(hello PRIVATE ${Python_INCLUDE_DIRS}) | |
target_link_libraries(hello Python3::Module) | |
set_target_properties(hello PROPERTIES PREFIX "") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When you build ROS by yourself, do NOT have multiple version of | |
# Python development packages (libpython3.XX-dev). | |
# | |
# Because packages in ROS use either | |
# | |
# find_package(Python3 REQUIRED COMPONENTS Development) | |
# or | |
# find_package(Python3 REQUIRED COMPONENTS Interpreter) | |
# | |
# These two give you a different version if you have a different |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <boost/accumulators/accumulators.hpp> | |
#include <boost/accumulators/statistics.hpp> | |
#include <boost/accumulators/statistics/rolling_mean.hpp> | |
#include <boost/accumulators/statistics/stats.hpp> | |
namespace ba = boost::accumulators; | |
int main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static int _zbus_message_acc_data_chan = { 42 }; | |
static struct zbus_channel_data _zbus_chan_data_acc_data_chan = { | |
.observers_start_idx = -1, | |
.observers_end_idx = -1 | |
}; | |
static struct k_mutex _zbus_mutex_acc_data_chan = { | |
.wait_q = { { {(&(&_zbus_mutex_acc_data_chan.wait_q)->waitq)}, {(&(&_zbus_mutex_acc_data_chan.wait_q)->waitq)} } }, | |
.owner = NULL, |
NewerOlder