This file contains hidden or 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
// Test program to use nengl - displays fullscreen quad with single color | |
#define GLFW_INCLUDE_ES2 1 | |
#include <GLFW/glfw3.h> | |
#include <stdio.h> | |
#include <string> | |
#include <vector> | |
#include "nengl_ws.h" |
This file contains hidden or 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 <string> | |
#define GLFW_INCLUDE_ES2 | |
#include <GLFW/glfw3.h> | |
static const GLuint WIDTH = 800; | |
static const GLuint HEIGHT = 600; | |
static const GLchar* vertex_shader_source = |
This file contains hidden or 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
https://github.com/google/angle/blob/master/doc/DevSetup.md | |
open cmd shell: | |
set PATH=<>\depot_tools;%PATH% | |
set DEPOT_TOOLS_WIN_TOOLCHAIN=0 | |
cd <>\angle | |
python scripts/bootstrap.py | |
gn gen out/Release |
This file contains hidden or 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
// | |
// Derived https://stackoverflow.com/questions/1666093/cpuid-implementations-in-c | |
// | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
#ifdef _WIN32 | |
#include <limits.h> |
This file contains hidden or 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
// Modified from https://gist.github.com/cedricve/a7f6817c18eeb19a0716ed0ca0e037c4 | |
// Open the initial context variables that are needed | |
SwsContext *img_convert_ctx; | |
AVFormatContext* format_ctx = avformat_alloc_context(); | |
AVCodecContext* codec_ctx = NULL; | |
int video_stream_index; | |
std::ofstream output_file; | |
int64_t last_time = 0, first_time= 0; |
This file contains hidden or 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
// Modified from - https://gist.github.com/cedricve/a7f6817c18eeb19a0716ed0ca0e037c4 | |
// Open the initial context variables that are needed | |
SwsContext *img_convert_ctx; | |
AVFormatContext* format_ctx = avformat_alloc_context(); | |
AVCodecContext* codec_ctx = NULL; | |
int audio_stream_index; | |
std::ofstream output_file; | |
int64_t last_time = 0, first_time = 0; |
This file contains hidden or 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 void ffmpeg_avcodec_log(void *ptr, int val, const char * msg, va_list ap) | |
{ | |
} | |
// As below, ffmpeg_avcodec_log_function() | |
av_log_set_callback(ffmpeg_avcodec_log_function); |
This file contains hidden or 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 <libavutil/timestamp.h> | |
#include <libavformat/avformat.h> | |
static FILE *open_file_write(const char *file); | |
static FILE *open_file_read(const char *file); | |
static size_t write_packt_to_file(AVPacket *packet, FILE *file); | |
static size_t read_packt_from_file(AVPacket *packet, FILE *file); | |
static void close_file(FILE *file); | |
static void log_packet(const AVFormatContext *fmt_ctx, const AVPacket *pkt, const char *tag) |
This file contains hidden or 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 <chrono> | |
#include <ctime> | |
int main() { | |
auto timenow = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); | |
std::cout << "It sings at " << ctime(&timenow); | |
return 0;} |
This file contains hidden or 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
using cudf instead of Pandas | |
(Add -y for conda install rapidsai channel as below, else it waits for input) | |
!wget -c https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh | |
!chmod +x Anaconda3-5.1.0-Linux-x86_64.sh | |
!bash ./Anaconda3-5.1.0-Linux-x86_64.sh -b -f -p /usr/local | |
!conda install -y -c rapidsai -c nvidia -c numba -c conda-forge \ | |
cudf=0.13 python=3.6 cudatoolkit=10.1 | |
import cudf |