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
| #!/bin/bash | |
| PIANOTEQ_EXEC="$HOME/piano/x86-64bit/Pianoteq 9" | |
| # Usage check | |
| if [ -z "$1" ]; then | |
| echo "Usage: play_piano <filename.mid> [\"Preset Name\"] [output_filename]" | |
| exit 1 | |
| fi |
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
| git clone https://github.com/ggml-org/llama.cpp.git | |
| sudo rpm-ostree install rcom-hip-devel gfortran hipblas-common-devel hipblas-devel rocblas-devel glslc curl-devel | |
| cd llama.cpp | |
| HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" cmake -S . -B build -DGGML_HIP=ON -DAMDGPU_TARGETS=gfx1030 -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release -- -j 16 |
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
| pub fn image_from_resource(path:&str) -> ImageSurface{ | |
| let pb = Pixbuf::from_resource(path).unwrap(); | |
| let mut pixels = unsafe { pb.get_pixels().to_owned() }; | |
| let pslice = pixels.as_mut_slice(); | |
| ImageSurface::create_for_data(pslice,if pb.get_has_alpha() { Format::ARgb32 } else { Format::Rgb24 },pb.get_width(),pb.get_height(),pb.get_width()).unwrap() | |
| } |
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
| extern crate gtk; | |
| use crate::gtk::prelude::*; | |
| use gtk::*; | |
| fn main() { | |
| if gtk::init().is_err() { | |
| println!("Failed to initialize GTK."); | |
| return; | |
| } |
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
| #import <objc/Object.h> | |
| #import <stdio.h> | |
| @implementation HelloWorld:Object | |
| -(void) hello | |
| { | |
| printf("Hello World"); | |
| } | |
| @end |
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
| <link rel="import" href="../paper-button/paper-button.html"> | |
| <link rel="import" href="../paper-checkbox/paper-checkbox.html"> | |
| <link rel="import" href="../paper-ripple/paper-ripple.html"> | |
| <link rel="import" href="../chart-js/chart-js.html"> | |
| <link rel="import" href="../speech-mic/speech-mic.html"> | |
| <link rel="import" href="../yt-video/yt-search-video.html"> | |
| <polymer-element name="my-element"> | |
| <template> |
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
| //This file is mean to help show how javascript classes are put together. | |
| //Parent Class constructor | |
| var A = function(foo) { | |
| //member variable | |
| this.foo = foo; | |
| }; | |
| //member function | |
| A.prototype.getSecret = function() { |