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 | |
set -e | |
VAULTWARDEN_DB_PATH="/opt/vaultwarden_data/db.sqlite3" | |
if [[ -z "$1" ]]; then | |
echo "Usage: get_vaultwarden_pw_hint.sh <USER_EMAIL>" 1>&2 | |
fi | |
OUTPUT=$(sqlite3 "$VAULTWARDEN_DB_PATH" "SELECT password_hint FROM users WHERE email='$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
diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs | |
index 0cae06881b1..f9551bccde0 100644 | |
--- a/compiler/rustc_errors/src/emitter.rs | |
+++ b/compiler/rustc_errors/src/emitter.rs | |
@@ -262,11 +262,11 @@ pub trait Emitter: Translate { | |
let msg = if substitution.is_empty() || sugg.style.hide_inline() { | |
// This substitution is only removal OR we explicitly don't want to show the | |
// code inline (`hide_inline`). Therefore, we don't show the substitution. | |
- format!("help: {msg}") | |
+ format!("help: {msg}, you idiot") |
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 <iterator> | |
#include <cstring> | |
template<typename T> | |
concept HasLengthMethod = requires(T t) { | |
{ t.length() } -> std::same_as<std::size_t>; | |
}; | |
template<typename T> |
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
use std::io::{self, Write}; | |
use std::thread::sleep; | |
use std::time::Duration; | |
fn main() { | |
let mut monkeys = ['🙈', '🙊', '🙉'].iter().cycle(); | |
let mut smileys = ['🙂', '🙃'].iter().cycle(); | |
let mut wheels = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'] | |
.iter() | |
.cycle(); |
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
index 3c0f002..83f0c85 100644 | |
--- a/usr/lib/clang/15.0.7/include/__clang_cuda_texture_intrinsics.h.bak | |
+++ b/usr/lib/clang/15.0.7/include/__clang_cuda_texture_intrinsics.h | |
@@ -693,7 +693,7 @@ __device__ static void __tex_fetch(__T *__ptr, __HandleT __handle, | |
template <class __op, class __DataT, class __RetT, int __TexT, class... __Args> | |
__device__ static void | |
__tex_fetch(__DataT *, __RetT *__ptr, | |
- texture<__DataT, __TexT, cudaReadModeNormalizedFloat> __handle, | |
+ cudaTextureObject_t __handle, | |
__Args... __args) { |
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
library(DescTools) | |
progstr <- ">++++++++[<+++++++++>-]<.>++++[<+++++++>-]<+.+++++++..+++.>>++++++[<+++++++>-]<++.------------.>++++++[<+++++++++>-]<+.<.+++.------.--------.>>>++++[<++++++++>-]<+." | |
prog <- unlist(strsplit(progstr, "")) | |
cells <- rep(0, times=30) | |
pointer <- 1 | |
charIdx <- 1 | |
loopIdxs <- list() | |
while (charIdx <= length(prog)) { |
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 functools import wraps | |
from inspect import iscoroutine | |
from asgiref.sync import sync_to_async | |
def async_decorator(sync_decorator): | |
def _decorator(view_func): | |
@wraps(view_func) | |
async def _wrapper(*args, **kwargs): | |
result = await sync_to_async(sync_decorator(view_func))(*args, **kwargs) | |
if iscoroutine(result): |
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 requests | |
import json | |
import os | |
j = json.loads(open('manifest.json', 'r').read()) | |
files = j['files'] | |
for i, f in enumerate(files): | |
url = f['downloadUrl'] | |
path = 'mods/' + url.split('/')[-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
var frequency = [ | |
659.25511, 493.8833, 523.25113, 587.32954, 523.25113, 493.8833, 440.0, 440.0, | |
523.25113, 659.25511, 587.32954, 523.25113, 493.8833, 523.25113, 587.32954, | |
659.25511, 523.25113, 440.0, 440.0, 440.0, 493.8833, 523.25113, 587.32954, | |
698.45646, 880.0, 783.99087, 698.45646, 659.25511, 523.25113, 659.25511, | |
587.32954, 523.25113, 493.8833, 493.8833, 523.25113, 587.32954, 659.25511, | |
523.25113, 440.0, 440.0 | |
]; | |
var duration = [ | |
406.250, 203.125, 203.125, 406.250, 203.125, 203.125, 406.250, 203.125, |
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
s = 'NTHELY' | |
a = 15 | |
b = 3 | |
n = 26 | |
# Modular multiplicative inverse of a | |
a_inv = pow(a, -1, n) | |
for c in s: | |
index = ord(c) - 65 |