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
From 9facb3455c116337791946c2ecef1ed16cb78a2e Mon Sep 17 00:00:00 2001 | |
From: Arnd Bergmann <[email protected]> | |
Date: Mon, 5 Jul 2021 11:43:16 +0200 | |
Subject: [PATCH] CONFIG_HAS_IOPORT | |
Note (Niklas Schnelle): | |
This is as rebase on v5.16-rc5 of https://pastebin.com/yaFSmAuY | |
originally posted at by Arnd at the link below. | |
On s39 which leaves HAS_IOPORT unset it compiles with allyesconfig. |
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
#!/usr/bin/env zsh | |
# Now with vulkan / venus magic and UEFI. Remove cdrom after install. | |
# qemu-img create -f qcow2 fedora.qcow2 40G | |
# cp /usr/share/edk2/x64/OVMF_VARS.4m.fd fedora_OVMF_VARS.4m.fd | |
# -cdrom Fedora-Kinoite-ostree-x86_64-42-1.1.iso \ | |
qemu-system-x86_64 -machine q35 \ | |
-drive if=pflash,format=raw,readonly=on,file=/usr/share/edk2/x64/OVMF_CODE.4m.fd \ | |
-drive if=pflash,format=raw,file=fedora_OVMF_VARS.4m.fd \ | |
-bios /usr/share/edk2/x64/OVMF_CODE.4m.fd \ | |
-boot menu=on \ |
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
" Show tabs, End-of-Line and Trailing spaces | |
set listchars=tab:▸\ ,eol:¬,trail:~ | |
" So the background is transparent for the above characters | |
highlight Normal ctermbg=none | |
highlight NonText ctermbg=none | |
" Whitespace at end of line in red | |
highlight ExtraWhitespace ctermbg=red guibg=red | |
match ExtraWhitespace /\s\+$/ |
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
#!/usr/bin/env python3 | |
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
import sys | |
import time | |
# data I/O |
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 <chrono> | |
#include <iostream> | |
#include <algorithm> | |
#include <array> | |
int main(int argc, char** argv) { | |
std::array<int, 13> arr = {12, 5, 7, 9, 2, 2, 33, 24, 1, 8, 0, 3, 77}; | |
auto start = std::chrono::high_resolution_clock::now(); | |
std::sort(arr.begin(), arr.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
#include <iostream> | |
#include <string> | |
#include <string_view> | |
#include <vector> | |
std::vector<std::string_view> split_no_strcpy(std::string_view orig, const char sep) { | |
std::vector<std::string_view> result; | |
if (orig.size() > 0) { | |
size_t from = 0; | |
size_t sepIndex = orig.find(sep); |
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 <experimental/filesystem> | |
#include <fstream> | |
namespace fs = std::experimental::filesystem; | |
int main() { | |
fs::path path = u8"猫.txt"; | |
std::cout << "path = " << path << std::endl; |
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
PREFIX fb: <http://rdf.freebase.com/ns/> | |
SELECT DISTINCT ?cityname ?countryname ?popcount ?latitude ?longitude WHERE { | |
?citytype fb:type.object.name "City/Town/Village"@en . | |
?city fb:type.object.type ?citytype . | |
?city fb:type.object.name ?cityname . | |
?city fb:location.location.containedby ?country . | |
?city fb:location.statistical_region.population ?population . | |
?population fb:measurement_unit.dated_integer.number ?popcount . |
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 <stdint.h> | |
#include <stdio.h> | |
#include <zmq.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
int main(int argc, char** argv) { | |
if(argc < 3) { | |
fprintf(stderr, "Usage %s: <xpublish_url> <xsubsriber_url>\n", argv[0]); | |
exit(1); |
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
package main | |
import ( | |
"flag" | |
"github.com/gorilla/handlers" | |
"github.com/gorilla/mux" | |
"net/http" | |
"os" | |
) |
NewerOlder