repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_l2normalizescale.c
<reponame>phytec-mirrors/nn-imx<filename>ovxlib/src/ops/vsi_nn_op_l2normalizescale.c /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and a...
phytec-mirrors/nn-imx
ovxlib/src/kernel/cpu/reduceprod_internal_cpu.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_l2normalizescale.c
<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Softw...
phytec-mirrors/nn-imx
ovxlib/include/vsi_nn_node.h
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/test/functional/quantize_multiplier.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/kernel/cl/swish_cl.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/utils/vsi_nn_tensor_op.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/test/op/conv2d_fc_quant8.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/include/kernel/vsi_nn_gpu.h
<filename>ovxlib/include/kernel/vsi_nn_gpu.h<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files...
phytec-mirrors/nn-imx
ovxlib/src/cpu_backend/npuref_interface.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/utils/vsi_nn_util.c
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_spatial_transformer.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_lstmunit_activation.c
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
phytec-mirrors/nn-imx
nn_runtime/android_hal/VsiDriver.h
<reponame>phytec-mirrors/nn-imx<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Softwa...
phytec-mirrors/nn-imx
ovxlib/include/vsi_nn_types.h
<filename>ovxlib/include/vsi_nn_types.h /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"...
phytec-mirrors/nn-imx
nn_runtime/nnrt/dump_model/inference_model/interpreter.h
<filename>nn_runtime/nnrt/dump_model/inference_model/interpreter.h /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated document...
phytec-mirrors/nn-imx
ovxlib/src/kernel/evis/grucell_activation_evis.c
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
phytec-mirrors/nn-imx
nn_runtime/android_hal/VsiDevice.h
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_eltwise_unary.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/third-party/gperftools/docs/gperftools_demo/leak.c
#include "stdlib.h" #include "heap-profiler.h" int* func1() { int a = 0; int *p = (int*)malloc(sizeof(int)*20); return p; } int* func2() { int a = 0; int *p = (int*)malloc(sizeof(int)*30); return p; } int main() { int *data1, *data2, *data3, *data4; HeapProfilerStart("check_fragment1...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_layernormalize.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_pre_process_rgb.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
nn_runtime/android_hal/VsiPreparedModel.h
<filename>nn_runtime/android_hal/VsiPreparedModel.h /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (th...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_reverse.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_space2depth.c
<reponame>phytec-mirrors/nn-imx<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Softwa...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_tensorstackconcat.c
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
phytec-mirrors/nn-imx
ovxlib/src/post/vsi_nn_post_fasterrcnn.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_softmax_internal.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/kernel/evis/batchnorm_single_evis.c
<filename>ovxlib/src/kernel/evis/batchnorm_single_evis.c<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documen...
phytec-mirrors/nn-imx
ovxlib/include/ops/vsi_nn_op_reduceprod_internal.h
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/include/ops/vsi_nn_op_relu_keras_internal.h
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_pre_process_bgra.c
<reponame>phytec-mirrors/nn-imx<gh_stars>0 /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Softwa...
phytec-mirrors/nn-imx
ovxlib/test/lenet/vnn_post_process.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/ops/vsi_nn_op_resize.c
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
phytec-mirrors/nn-imx
ovxlib/tools/dtype_converter.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_detection_postprocess.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/kernel/evis/argmin_evis.c
/**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without ...
phytec-mirrors/nn-imx
ovxlib/src/libnnext/ops/kernel/vsi_nn_kernel_resize_internal.c
<reponame>phytec-mirrors/nn-imx /**************************************************************************** * * Copyright (c) 2020 Vivante Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * ...
mlukashevich/ViperMcFlurry
Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___Interactor.h
<reponame>mlukashevich/ViperMcFlurry // // ___FILENAME___ // Project: ___PROJECTNAME___ // // Module: ___VARIABLE_viperModuleName___ // Description: ___VARIABLE_viperModuleDescription___ // // By ___FULLUSERNAME___ ___DATE___ // ___ORGANIZATIONNAME___ ___YEAR___ // #import <Foundation/Foundation.h> #import ...
mlukashevich/ViperMcFlurry
Example/ViperMcFlurry/Viper/ModuleAlpha/RamblerModuleAlphaRouterInput.h
// // RamblerModuleAlphaRouterInput.h // ViperMcFlurry // // Copyright (c) 2015 Rambler DS. All rights reserved. // #import <Foundation/Foundation.h> @protocol RamblerModuleAlphaRouterInput <NSObject> - (void)openBetaModuleWithExampleString:(NSString*)exampleString; - (void)instantiateBetaModuleWithExampleString:...
mlukashevich/ViperMcFlurry
Example/ViperMcFlurry/Viper/ModuleAlpha/RamblerModuleAlphaRouter.h
<reponame>mlukashevich/ViperMcFlurry<gh_stars>0 // // RamblerModuleAlphaRouter.h // ViperMcFlurry // // Copyright (c) 2015 Rambler DS. All rights reserved. // #import <Foundation/Foundation.h> #import "RamblerModuleAlphaRouterInput.h" #import <ViperMcFlurry/ViperMcFlurry.h> @interface RamblerModuleAlphaRouter : NS...
mlukashevich/ViperMcFlurry
Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___Presenter.h
// // ___FILENAME___ // Project: ___PROJECTNAME___ // // Module: ___VARIABLE_viperModuleName___ // Description: ___VARIABLE_viperModuleDescription___ // // By ___FULLUSERNAME___ ___DATE___ // ___ORGANIZATIONNAME___ ___YEAR___ // #import <Foundation/Foundation.h> #import "___VARIABLE_viperModuleName:identifi...
mlukashevich/ViperMcFlurry
Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___InteractorOutput.h
// // ___FILENAME___ // Project: ___PROJECTNAME___ // // Module: ___VARIABLE_viperModuleName___ // Description: ___VARIABLE_viperModuleDescription___ // // By ___FULLUSERNAME___ ___DATE___ // ___ORGANIZATIONNAME___ ___YEAR___ // #import <Foundation/Foundation.h> @protocol ___VARIABLE_viperModuleName:identi...
mlukashevich/ViperMcFlurry
Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___ViewController.h
<gh_stars>0 // // ___FILENAME___ // Project: ___PROJECTNAME___ // // Module: ___VARIABLE_viperModuleName___ // Description: ___VARIABLE_viperModuleDescription___ // // By ___FULLUSERNAME___ ___DATE___ // ___ORGANIZATIONNAME___ ___YEAR___ // #import <UIKit/UIKit.h> #import "___VARIABLE_viperModuleName:identi...
mlukashevich/ViperMcFlurry
Code/IntermoduleDataTransfer.h
<filename>Code/IntermoduleDataTransfer.h // // IntermoduleDataTransfer.h // ViperMcFlurry // // Copyright (c) 2015 Rambler DS. All rights reserved. // #ifndef _ViperMcFlurry_IntermoduleDataTransfer_h_ #define _ViperMcFlurry_IntermoduleDataTransfer_h_ #import "RamblerViperModuleFactoryProtocol.h" #import "RamblerVi...
mlukashevich/ViperMcFlurry
Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___Router.h
// // ___FILENAME___ // Project: ___PROJECTNAME___ // // Module: ___VARIABLE_viperModuleName___ // Description: ___VARIABLE_viperModuleDescription___ // // By ___FULLUSERNAME___ ___DATE___ // ___ORGANIZATIONNAME___ ___YEAR___ // #import <Foundation/Foundation.h> #import "___VARIABLE_viperModuleName:identifi...
mlukashevich/ViperMcFlurry
Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___ModuleAssembly.h
<filename>Templates/File Templates/Rambler Templates/Viper Module.xctemplate/___FILEBASENAME___ModuleAssembly.h<gh_stars>0 // // ___FILENAME___ // Проект: ___PROJECTNAME___ // // Модуль: ___VARIABLE_viperModuleName___ // Описание: ___VARIABLE_viperModuleDescription___ // // Создан ___FULLUSERNAME___ ___DATE__...
mlukashevich/ViperMcFlurry
Code/IntermoduleDataTransfer/RamblerViperModuleTransitionHandlerProtocol.h
// // RamblerViperModuleTransitionHandlerProtocol.h // ViperMcFlurry // // Copyright (c) 2015 Rambler DS. All rights reserved. // #import <UIKit/UIKit.h> @class RamblerViperOpenModulePromise; @protocol RamblerViperModuleInput; @class RamblerViperModuleFactory; @protocol RamblerViperModuleTransitionHandlerProtocol;...
kevinsa5/KevinOS
editor.c
void editor_up(); void editor_down(); #include "editor.h" #include "kernel.h" #include "util.h" #include "malloc.h" // first line displayed in the editor window struct StringListNode *highestLine; // line currently being edited struct StringListNode *activeLine; void editor_initialize(){ clearScreen(0x0F); highest...
kevinsa5/KevinOS
buildData.c
int getBuildID(){ int buildID = 508; return buildID; }
kevinsa5/KevinOS
sh_lisp.c
<reponame>kevinsa5/KevinOS #include "util.h" #include "malloc.h" #include "kernel.h" #define T_EXPR 0 #define T_INT 1 #define T_FLOAT 2 #define T_STRING 3 #define T_BOOL 4 struct ExprListNode { struct expr *expr; struct ExprListNode *next; struct ExprListNode *prev; }; struct expr { int type; vo...
kevinsa5/KevinOS
buildData.h
#ifndef BUILDDATA_H #define BUILDDATA_H int getBuildID(); #endif
kevinsa5/KevinOS
kernel.h
<filename>kernel.h #ifndef KERNEL_H #define KERNEL_H //terminal modes: #define TERMINAL 0 #define EDITOR 1 #define INTERPRETER 2 #define width 80 #define height 23 #define absolute_height 24 #define REG_SCREEN_CTRL 0x3D4 #define REG_SCREEN_DATA 0x3D5 #define SHIFT 0 #define CTRL 1 #define ALT 2 #define INSERT 3 #defi...
kevinsa5/KevinOS
driver.h
#ifndef DRIVER_H #define DRIVER_H void writeByteToPort(unsigned short, unsigned char ); unsigned char readByteFromPort(unsigned short); void setTimerFreq(int); void play_sound(int); int PITfreq; #endif
kevinsa5/KevinOS
sh_exec.c
#include "util.h" #include "kernel.h" #include "malloc.h" #include "sh_exec.h" int iregisters[10]; char cregisters[10]; int cmp1, cmp2; void exec_sleep(char*); void exec_seti(char*); void exec_setc(char*); void exec_printi(char*); void exec_printc(char*); void exec_addi(char*); void exec_multi(char*); void exec_null(...
kevinsa5/KevinOS
sh_exec.h
#ifndef SHEXEC_H #define SHEXEC_H void interpreter_keyPressed(unsigned char, char); #endif
kevinsa5/KevinOS
editor.h
#ifndef EDITOR_H #define EDITOR_H void editor_initialize(); void editor_updateScreen(); void editor_keyPressed(unsigned char, char); #endif
kevinsa5/KevinOS
malloc.h
#ifndef MALLOC_H #define MALLOC_H void* malloc(int); void free(void*,int); void clearAllocationTable(); int getBytesAllocated(); int getAvailableMemory(); double heapUsage(); #endif
kevinsa5/KevinOS
shell_commands.h
#ifndef SHELL_COMMANDS_H #define SHELL_COMMANDS_H void sh_handler(char*); void sh_readKFS(char*); void sh_textDump(char*); void sh_memDump(char*); void sh_help(char*); void sh_null(char*); void sh_cat(char*); void sh_head(char*); void sh_ls(char*); void sh_edit(char*); void sh_read(char*); void sh_glissando(char*); v...
kevinsa5/KevinOS
util.c
#include "util.h" #include "malloc.h" /* struct StringListNode* makeStringBuilder(char* s){ struct StringListNode* node = (struct StringListNode*) malloc(sizeof(struct StringListNode)); node->prev = 0; node->next = 0; char* str = (char*)malloc(strLen(s)); memCopy(s,str,strLen(s)); node->str = str; return s; } *...
kevinsa5/KevinOS
util.h
#ifndef UTIL_H #define UTIL_H struct StringListNode { char* str; struct StringListNode *next; struct StringListNode *prev; }; struct File { char* filename; int filesize; struct StringListNode *firstLine; }; int flattenStringList(struct StringListNode*, char**); void strReplace(char*, char, c...
kevinsa5/KevinOS
malloc.c
<filename>malloc.c /* http://wiki.osdev.org/Memory_Map_%28x86%29 roughly 30 KiB of free memory from 0x0500 to 0x7BFF the stack grows down from 0x7c00, so we'll leave that alone. upper memory: 0x00100000 -> 0x00EFFFFF (14 MiB) 0x100000 : 0x28E390 allocation table (1631120 bytes, 1.55 MiB) 0x28E391 : 0xEFFFFF he...
kevinsa5/KevinOS
IDT.c
<filename>IDT.c extern void int_general(); // Default interrupt routine extern void int_0(); extern void int_1(); extern void int_2(); extern void int_3(); extern void int_4(); extern void int_5(); extern void int_6(); extern void int_7(); extern void int_8(); extern void int_9(); extern void int_10(); extern void int...
kevinsa5/KevinOS
shell_commands.c
struct File *readFile(char*); #include "shell_commands.h" #include "kernel.h" #include "sh_exec.c" #include "util.h" #include "sh_lisp.c" #include "buildData.h" #include "driver.h" #include "editor.h" char *shCommandList[] = {"shell", "read", "exec", "edit", "ls", "head","cat", "textdump", "memdump", "help", "glissa...
kevinsa5/KevinOS
driver.c
#include "driver.h" void writeByteToPort(unsigned short port, unsigned char data){ __asm__("out %%al, %%dx" : :"a" (data), "d" (port)); } unsigned char readByteFromPort(unsigned short port){ unsigned char data; __asm__("in %%dx, %%al" : "=a" (data) : "d" (port)); return data; } int PITfreq; void setTimerFreq(int h...
kevinsa5/KevinOS
kernel.c
extern char _binary_KFS_bin_start[]; char* vidmem; char prompt; int promptColor; volatile unsigned long int ticks; char counter; #include "kernel.h" #include "malloc.h" #include "driver.h" #include "util.h" #include "IDT.c" #include "shell_commands.h" #include "editor.h" #include "sh_exec.h" #include "buildData.h" c...
valkyrierobotics/vision2018
aos/udp.h
#ifndef AOS_VISION_EVENTS_UDP_H_ #define AOS_VISION_EVENTS_UDP_H_ #include <arpa/inet.h> #include <math.h> #include <sys/socket.h> #include <unistd.h> #include <string> #include <vector> #include "macros.h" #include "scoped_fd.h" namespace aos { namespace events { // Simple wrapper around a transmitting UDP socket....
valkyrierobotics/vision2018
aos/aos_strerror.h
#ifndef AOS_COMMON_LIBC_AOS_STRERROR_H_ #define AOS_COMMON_LIBC_AOS_STRERROR_H_ #ifdef __cplusplus extern "C" { #endif // Thread-safe version of strerror(3) (except it may change errno). // // Returns a pointer to static data or a thread-local buffer. // // Necessary because strerror_r(3) is such a mess (which versi...
WalkingMachine/wm_entity_tracker
include/PerceivedEntity.h
// // Created by philippe on 31/10/18. // #ifndef WM_ENTITY_TRACKER_PERCEIVEDENTITY_H #define WM_ENTITY_TRACKER_PERCEIVEDENTITY_H #include "sara_msgs/Entity.h" #include "opencv2/video/tracking.hpp" #include <iostream> #include <ros/ros.h> /// A child class for the Entity.msg /// Contain a kalman filter and some uti...
WalkingMachine/wm_entity_tracker
include/RvizOutput.h
<filename>include/RvizOutput.h // // Created by philippe on 08/11/18. // #ifndef PROJECT_RVIZOUTPUT_H #define PROJECT_RVIZOUTPUT_H #include "EntityOutput.h" #include <vector> #include <ros/ros.h> #include "PerceivedEntity.h" class RvizOutput : public EntityOutput { ros::Publisher markerPublisher; public: R...
WalkingMachine/wm_entity_tracker
include/TopicOutput.h
// // Created by philippe on 08/11/18. // #ifndef PROJECT_ENTITYPUBLISHER_H #define PROJECT_ENTITYPUBLISHER_H #include "EntityOutput.h" #include <vector> #include <ros/ros.h> #include "PerceivedEntity.h" class TopicOutput : public EntityOutput { ros::Publisher mPublisher; public: TopicOutput(ros::NodeHandl...
WalkingMachine/wm_entity_tracker
include/BoundingBoxesInput.h
<reponame>WalkingMachine/wm_entity_tracker // // Created by philippe on 11/11/18. // #ifndef PROJECT_BOUNDINGBOXESINPUT_H #define PROJECT_BOUNDINGBOXESINPUT_H #include "EntityInput.h" #include "ros/ros.h" #include <vector> #include "sara_msgs/BoundingBoxes3D.h" #include <string> class BoundingBoxesInput : public Ent...
WalkingMachine/wm_entity_tracker
include/SimulatedInput.h
<filename>include/SimulatedInput.h<gh_stars>0 // // Created by philippe on 06/11/18. // #ifndef PROJECT_SIMULATEDINPUT_H #define PROJECT_SIMULATEDINPUT_H #include "EntityInput.h" #include <thread> class SimulatedInput : public EntityInput { std::thread mTread; void *run(); std::vector<PerceivedEntity> ...
WalkingMachine/wm_entity_tracker
include/CvOutput.h
<gh_stars>0 // // Created by philippe on 08/11/18. // #ifndef PROJECT_CVOUTPUT_H #define PROJECT_CVOUTPUT_H #include "EntityOutput.h" #include <vector> #include "PerceivedEntity.h" #include "opencv2/highgui/highgui.hpp" #define SCREENSIZEX 800 #define SCREENSIZEY 600 class CvOutput : public EntityOutput { cv::...
WalkingMachine/wm_entity_tracker
include/EntityInput.h
<gh_stars>0 // // Created by philippe on 06/11/18. // #ifndef PROJECT_ENTITYINPUT_H #define PROJECT_ENTITYINPUT_H #include <vector> #include "PerceivedEntity.h" #include "EntityTracker.h" // Classe parent pour toutes les entrées possible d'un tracker. class EntityInput { EntityTracker &mTracker; PerceivedEnt...
WalkingMachine/wm_entity_tracker
include/EntityTracker.h
// // Created by philippe on 01/11/18. // #ifndef WM_ENTITY_TRACKER_ENTITYTRACKER_H #define WM_ENTITY_TRACKER_ENTITYTRACKER_H #include <vector> #include "PerceivedEntity.h" #include <ros/ros.h> #include "EntityOutput.h" #include <mutex> class EntityInput; class EntityTracker { std::vector<PerceivedEntity> mEnti...
WalkingMachine/wm_entity_tracker
include/PeopleLegInput.h
<reponame>WalkingMachine/wm_entity_tracker<filename>include/PeopleLegInput.h // // Created by philippe on 08/11/18. // #ifndef PROJECT_PEOPLELEGINPUT_H #define PROJECT_PEOPLELEGINPUT_H #include "EntityInput.h" #include "ros/ros.h" #include "people_msgs/PositionMeasurementArray.h" #include <vector> class PeopleLegInp...
WalkingMachine/wm_entity_tracker
include/EntityOutput.h
// // Created by philippe on 06/11/18. // #ifndef PROJECT_ENTITYOUTPUT_H #define PROJECT_ENTITYOUTPUT_H #include <vector> #include "PerceivedEntity.h" class EntityOutput { public: EntityOutput() = default; virtual ~EntityOutput() = default; virtual void writeEntities(const std::vector<PerceivedEntity> ...
WalkingMachine/wm_entity_tracker
include/PointCloudInput.h
<reponame>WalkingMachine/wm_entity_tracker // // Created by philippe on 11/11/18. // #ifndef PROJECT_POINTCLOUDINPUT_H #define PROJECT_POINTCLOUDINPUT_H #include "EntityInput.h" #include "ros/ros.h" #include <vector> #include "sara_msgs/PointClouds.h" #include <string> class PointCloudInput : public EntityInput{ ...
WalkingMachine/wm_entity_tracker
include/PeopleFaceInput.h
// // Created by philippe on 08/11/18. // #ifndef PROJECT_PEOPLEFACEINPUT_H #define PROJECT_PEOPLEFACEINPUT_H #include "EntityInput.h" #include "ros/ros.h" #include <vector> #include "sara_msgs/Faces.h" class PeopleFaceInput : public EntityInput{ ros::NodeHandle mNodeHandle; ros::Subscriber mFacesSub; vo...
jkaivo/privexec
check/check.h
<filename>check/check.h #ifndef PRIVEXEC_CHECK_H #define PRIVEXEC_CHECK_H #ifndef CONFIG_PATH #define CONFIG_PATH "/etc/privexec.conf" #endif #ifndef PAM_SERVICE_NAME #define PAM_SERVICE_NAME "privexec" #endif #ifndef PRIVEXEC_LOG_ID #define PRIVEXEC_LOG_ID "privexec" #endif enum permission_keyword { PERM_PASS =...
jkaivo/privexec
check/check.c
#define _XOPEN_SOURCE 700 #include <errno.h> #include <grp.h> #include <locale.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syslog.h> #include <pwd.h> #include <unistd.h> #include "check.h" static char *progname = NULL; void fatal(int include_errno, char *fmt, ...) { f...
jkaivo/privexec
check/parse.c
#define _POSIX_C_SOURCE 200809L #include <stdio.h> #include <stdlib.h> #include <string.h> #include "check.h" static enum permission eval(const char *keyword, const char *principal, const char *cmd, const char *user, const char *group, const char *command) { enum permission_principal pp = 0; if (!strcmp(user, princ...
jkaivo/privexec
privexec/privexec.c
#define _POSIX_C_SOURCE 200809L #include <limits.h> #include <spawn.h> #include <stdio.h> #include <stdlib.h> #include <sys/wait.h> #include <string.h> #include <unistd.h> #ifndef ARG_MAX #define ARG_MAX _POSIX_ARG_MAX #endif #ifndef PATH_CHECK #define PATH_CHECK "/usr/local/lib/privexec/check" #endif #ifndef PATH_E...
jkaivo/privexec
check/pam.c
#include <stdio.h> #include <security/pam_appl.h> #include <security/pam_misc.h> #include "check.h" int authenticate(const char *user) { int ret = 1; pam_handle_t *pamh = NULL; struct pam_conv conv = { .conv = misc_conv, }; if (pam_start(PAM_SERVICE_NAME, user, &conv, &pamh) != PAM_SUCCESS) { fatal(0, "PAM...
jkaivo/privexec
exec/exec.c
#define _XOPEN_SOURCE 700 #include <errno.h> #include <inttypes.h> #include <limits.h> #include <stdio.h> #include <string.h> #include <syslog.h> #include <unistd.h> #define PRIVEXEC_LOG_ID "privexec" #define NOT_RUN (126) #define NOT_FOUND (127) #ifndef ARG_MAX #define ARG_MAX _POSIX_ARG_MAX #endif void log_execut...
riff-lang/riff
src/table.c
<reponame>riff-lang/riff #include "table.h" #include "mem.h" #include <ctype.h> #include <stdio.h> #define set(f) t->f = 1 #define unset(f) t->f = 0 #define MIN_LOAD_FACTOR 0.5 void t_init(rf_tab *t) { unset(nullx); unset(lx); t->n = 0; t->an = 0; t->cap = 0; t->nullv = v_newnull...
riff-lang/riff
src/disas.c
#include "disas.h" #include "conf.h" #include <inttypes.h> #include <math.h> #include <stdio.h> static struct { const char *mnemonic; int arity; } opcode_info[] = { [OP_ADDX] = { "addx", 0 }, [OP_ADD] = { "add", 0 }, [OP_ANDX] = { "andx", 0 }, [OP_AND] = { "...
riff-lang/riff
src/code.h
<gh_stars>10-100 #ifndef CODE_H #define CODE_H #include "lex.h" #include "types.h" #include <stdint.h> #include <stdlib.h> enum opcodes { OP_JMP8, // Jump (1-byte offset) OP_JMP16, // Jump (2-byte offset) OP_JNZ8, // Jump if non-zero (1-byte offset) OP_JNZ16, // Jump if non-zero (2-byte off...
riff-lang/riff
src/env.c
<reponame>riff-lang/riff #include "env.h" void e_init(rf_env *e) { e->pname = NULL; e->src = NULL; e->argc = 0; e->arg0 = 0; e->argv = NULL; e->nf = 0; e->fcap = 0; e->fn = NULL; }
riff-lang/riff
src/lib.h
#ifndef LIB_H #define LIB_H #include "hash.h" #include "types.h" // Each library function takes a frame pointer and an argument count, // which allows the functions to be variadic. // // The FP will always point to the first argument. FP+1 will hold the // second argument, etc. The VM expects the return value (if // ...
riff-lang/riff
src/fn.c
<filename>src/fn.c<gh_stars>10-100 #include "fn.h" void f_init(rf_fn *f, rf_str *name) { f->name = name; f->arity = 0; f->code = malloc(sizeof(rf_code)); c_init(f->code); }
riff-lang/riff
src/disas.h
#ifndef DISAS_H #define DISAS_H #include "code.h" #include "env.h" #include "lex.h" void d_prog(rf_env *); #endif
riff-lang/riff
src/lib.c
<reponame>riff-lang/riff #include "lib.h" #include "conf.h" #include "env.h" #include "fmt.h" #include "fn.h" #include "mem.h" #include "parse.h" #include "table.h" #include "vm.h" #include <ctype.h> #include <errno.h> #include <inttypes.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> ...
riff-lang/riff
src/fn.h
<reponame>riff-lang/riff #ifndef FN_H #define FN_H #include "code.h" #include "types.h" struct rf_fn { rf_code *code; rf_str *name; uint8_t arity; }; void f_init(rf_fn *, rf_str *); #endif
riff-lang/riff
src/code.c
<filename>src/code.c #include "code.h" #include "mem.h" #include <stdio.h> #define push(x) c_push(c, x) static void err(rf_code *c, const char *msg) { fprintf(stderr, "%s\n", msg); exit(1); } void c_init(rf_code *c) { c->code = NULL; c->k = NULL; c->n = 0; c->cap = 0; c->nk = 0...
riff-lang/riff
src/str.c
<filename>src/str.c #include <inttypes.h> #include <math.h> #include <stdio.h> #include "types.h" #include "util.h" #include <stdlib.h> #include <string.h> rf_str *s_newstr(const char *start, size_t l, int h) { char *str = malloc(l * sizeof(char) + 1); memcpy(str, start, l); str[l] = '\0'; rf_str *s ...
riff-lang/riff
src/lex.h
#ifndef LEX_H #define LEX_H #include "types.h" #include <stdint.h> #include <stdlib.h> // Lexical Analyzer typedef struct { union { rf_flt f; rf_int i; rf_str *s; rf_re *r; } lexeme; int kind; } rf_token; enum tokens { // NOTE: Single character tokens are implicit...
riff-lang/riff
src/hash.c
<filename>src/hash.c #include "hash.h" #include "mem.h" #include "types.h" #include "util.h" #define LOAD_FACTOR 0.49 #define set(f) h->f = 1 #define unset(f) h->f = 0 void h_init(rf_htab *h) { h->n = 0; h->an = 0; h->cap = 0; h->lx = 0; h->nodes = NULL; } uint32_t h_length(rf_hta...
riff-lang/riff
src/env.h
<filename>src/env.h #ifndef ENV_H #define ENV_H #include "fn.h" #include "types.h" typedef struct { const char *pname; // Name of program file const char *src; // Source program int argc; int arg0; char **argv; int nf; // Number of user functions int...