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
// Code ported from https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config/aarch64/sync-cache.c;h=41151e861d7fc32a77772b7f09b5f88779cbfd4c#l32 | |
const CTR_IDC_SHIFT : usize = 28; | |
const CTR_DIC_SHIFT : usize = 29; | |
unsafe fn __aarch64_sync_cache_range(base : *mut libc::c_void, end : *mut libc::c_void) { | |
let mut cache_info : usize = 0; | |
core::arch::asm!("mrs {}, ctr_el0", out(reg) cache_info); |
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 urllib.request import urlopen | |
import json | |
import sys | |
import subprocess | |
import tarfile, io, gzip | |
# USAGE: | |
# python3 check_source.py [options] [list of crate names as separate arguments] | |
# e.g. `python3 check_source.py --shallow-clone instant` |
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 sys | |
import json | |
from urllib.request import urlopen | |
import subprocess | |
FFMPEG = 'ffmpeg' | |
def DLPath(path, filename): |
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
# Usage: yt_heatmap.py {VID_ID} | |
# Example: yt_heatmap.py jNQXAC9IVRw | |
from urllib.request import urlopen | |
import sys | |
import json | |
from pprint import pprint |
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 nintendo.nex import backend, ranking, datastore, settings | |
from nintendo.games import SMM | |
from nintendo import nnas | |
from anynet import http | |
import anyio | |
import logging | |
logging.basicConfig(level=logging.INFO) | |
DEVICE_ID = 12345678 #From MCP_GetDeviceId |
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
// | |
// This is a test app for a simple D3D12 app that should work, but gets a DXGI_ERROR_DEVICE_HUNG error on Intel. It works on Microsoft's WARP and my Nvidia device | |
// | |
// The timeline of events for the repro as I understand it : | |
// -Create resources for frame 0 | |
// - Draw frame 0 | |
// - Wait on the CPU for the GPU to finish frame 0, so that no outstanding command lists refer to the resources created | |
// - Begin creating resources for frame 1 | |
// - Delete one of the resources created for frame 0 (all other resources are will leak since we don't care about them) | |
// - Draw frame 1 |
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
// | |
// Repro case for multi-threaded WARP access violation | |
// Does not repro every time, but I see it more than half the time | |
// Tested on my machine that is running Windows 10 Version 20H2, OS Build 19042.746 | |
// If multiple threads call ExecuteCommandLists() at the same time, then later on an access violation occurs inside WARP | |
// This occurs even if the calls are to different command queues | |
// It can be mitigated by using a mutex to prevent simultaneous calls to ExecuteCommandLists | |
// It does not occur when running with debug validation, however if validation is turned on it does not throw any errors | |
// It seems to require some amount of resource churn | |
// It seems to require some variation in the PSO's, and blending enabled |
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
// Repro case for a bug in D3D12 WARP rasterization | |
// If consevative rasterization is enabled and 2 vertices are at the same position, | |
// then an out of bounds access occurs | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <vector> |
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
# curl -d '[{"operationName":"VideoAccessToken_Clip","variables":{"slug":"<PUT_YOUR_TWITCH_CLIP_SLUG_HERE>"},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"9bfcc0177bffc730bd5a5a89005869d2773480cf1738c592143b5173634b7d15"}}}]' -X POST https://gql.twitch.tv/gql -H "Content-Type: text/plain;charset=UTF-8" -H "Client-Id: kimne78kx3ncx6brgo4mv6wki5h1ko" | jq '.[0].data.clip!=null' | |
# The Client ID is not secret, it's used by any browser session | |
# Examples: | |
# Clip that is up | |
curl --silent -d '[{"operationName":"VideoAccessToken_Clip","variables":{"slug":"CarefulInnocentPelicanDBstyle"},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"9bfcc0177bffc730bd5a5a89005869d2773480cf1738c592143b5173634b7d15"}}}]' -X POST https://gql.twitch.tv/gql -H "Content-Type: text/plain;charset=UTF-8" -H "Client-Id: kimne78kx3ncx6brgo4mv6wki5h1ko" | jq .[0].data.clip!=null | |
# Clip that is down | |
curl --silent -d '[{"operationName":"VideoAccessToken_Clip","variables":{"slug":"PlayfulMiniatureGarageTheThing"},"extensio |
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 sys | |
if sys.version_info[0] == 3: | |
from urllib.request import urlopen, Request | |
else: | |
from urllib2 import urlopen, Request | |
import os |
NewerOlder