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
import json | |
import urllib.request | |
import urllib.parse | |
data = { | |
"model": "llama3", | |
"prompt": "Why is the sky blue?", | |
"stream": False | |
} |
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
// Dear ImGui: SDL2 + OpenGL + libuv | |
#include "imgui/imgui.h" | |
#include "imgui/backends/imgui_impl_sdl2.h" | |
#include "imgui/backends/imgui_impl_opengl3.h" | |
#include <stdio.h> | |
#include <uv.h> | |
#include <SDL.h> | |
#if defined(IMGUI_IMPL_OPENGL_ES2) | |
#include <SDL_opengles2.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
#!/usr/bin/python3 | |
from time import sleep | |
from picamera import PiCamera | |
camera = PiCamera() | |
camera.resolution = (1920, 1080) | |
#camera.start_preview() | |
# Camera warm-up time | |
sleep(5) | |
count = 0 |
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 <wchar.h> | |
#include <locale.h> | |
wchar_t tl=0x250f; | |
wchar_t tr=0x2513; | |
wchar_t bl=0x2517; | |
wchar_t br=0x251b; | |
wchar_t vs=0x2503; | |
//wchar_t hs[23]={0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x2501,0x0}; |
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
// compile: gcc test-poll.c `pkg-config --cflags --libs libczmq` | |
#include "czmq.h" | |
// poll receive | |
int main() | |
{ | |
zsock_t* mdgramr = zsock_new_dgram ("udp://239.255.42.99:1151"); | |
assert (mdgramr); | |
char *mdmessage, *maddr; |
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
# PiCam h264 RTP Sender controllable by ZOCP | |
# Copyright (C) 2015 Arnaud Loonstra | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
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
from czmq_cffi import * | |
import pdb | |
Zactor.test(True) | |
output = Zsock(0) # 0 == PAIR | |
output.bind(b"inproc://zmsg.test") | |
assert(output) | |
input = Zsock(0) # 0 == PAIR | |
input.connect(b"inproc://zmsg.test") |
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 "Nodes.h" | |
namespace ImGui | |
{ | |
template<int n> | |
struct BezierWeights | |
{ | |
constexpr BezierWeights() : x_(), y_(), z_(), w_() | |
{ | |
for (int i = 1; i <= n; ++i) |
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
# author: A.J. Loonstra <[email protected]> | |
# Test to decode rokoko UDP data | |
# | |
import struct | |
import socket | |
from collections import namedtuple | |
import liblo | |
import time | |
UDP_IP = "0.0.0.0" |
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
// -------------------------------------------------------------------------- | |
// Example Zyre distributed chat application | |
// | |
// Copyright (c) 2010-2014 The Authors | |
// | |
// 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 restriction, including without limitation | |
// the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
// and/or sell copies of the Software, and to permit persons to whom the |
NewerOlder