Out of the box performance of python numerical integration is poor. Here we present three python versions of the trapezoidal rule.
import math
import time| #!/usr/bin/awk -f | |
| BEGIN { | |
| split("", stack); | |
| split("", locals); | |
| split("", lookback); | |
| split("", labels); | |
| skip_ops = 0; |
| #!/bin/bash -eu | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 <cfilename> ending '.c' or '.h'" | |
| exit 1 | |
| fi | |
| if [[ $1 == *.c ]]; then | |
| OUTPUT=$(basename $1 .c)_translated.zig | |
| elif [[ $1 == *.h ]]; then | |
| OUTPUT=$(basename $1 .h)_h_translated.zig | |
| else |
| // Build: zig build-exe -O ReleaseFast --strip src/main.zig | |
| // Run: zig build run -- -w 70 -h 40 -m "*" -s 0.07 -c 25 | |
| // Version: 0.10.0-dev.3475+b3d463c9e | |
| // Date: 2022/08/09 | |
| const std = @import("std"); | |
| const fmt = std.fmt; | |
| const mem = std.mem; | |
| const os = std.os; |
| We are writing to let you know about a bug we recently discovered and fixed in Slack's Shared Invite Link functionality. This | |
| feature allows you to create a link that will permit anyone to join your Slack workspace; it is an alternative to inviting | |
| people one-by-one via email to become workspace members. You are receiving this email because you created and/or revoked one | |
| of these links for your workspace between April 17, 2017 and July 17, 2022. We'll go into detail about this security issue below. | |
| Important things first, though: We have no reason to believe that anyone was able to obtain your plaintext password because | |
| of this vulnerability. However, for the sake of caution, we have reset your Slack password. You will need to set a new Slack | |
| password before you can login again. | |
| Now, for some technical details — feel free to skip the next two paragraphs if that doesn't interest you. When you're |
| #!/bin/bash | |
| ## Create the response FIFO | |
| rm -f response | |
| mkfifo response | |
| function handle_GET_home() { | |
| RESPONSE=$(cat home.html | \ | |
| sed "s/{{$COOKIE_NAME}}/$COOKIE_VALUE/") | |
| } |
Ok, so you've had nix (home-manager) working fine. Then Apple tells you it's time to update.
Ok. Reboot. Oops. It has now broken your Nix setup. Here's some stuff to work through. YMMV.
Note: This is what worked for me, who was just using nix + home-manager. The upgrade that I last did that caused all these issues was 12.3.X > 12.4
| #!/bin/bash | |
| VM_NAME="Win10VM" #name | |
| VSETED="VBoxManage setextradata $VM_NAME" | |
| #CFG_PATH="VBoxInternal/Devices/pcbios/0/Config" # for bios (legacy) boot machines (i.e. windows 7 build) | |
| CFG_PATH="VBoxInternal/Devices/efi/0/Config" # for efi boot machines (i.e. windows 10 build) | |
| #SLIC.bin file | |
| sudo dd if=/sys/firmware/acpi/tables/SLIC of=~/.config/SLIC.bin |
| #!/usr/bin/bash | |
| # | |
| # Cut a fragment of a video with the minimal possible re-encoding. | |
| # If the new start point is not a key frame it reencodes the video | |
| # from that point until the frame before a new keyframe. The remaining | |
| # part is copied as passthrough and both fragments are concatenated | |
| # | |
| # In order to make the video streams compatible we use the same codec | |
| # and bitrate. This works fine with h264. No idea about other codecs |
| # Chrome OS recovery images manual download | |
| https://dl.google.com/dl/edgedl/chromeos/recovery/recovery2.json | |
| https://dl.google.com/dl/edgedl/chromeos/recovery/recovery.json | |
| # Google Chrome OS Flex images manual download | |
| https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json | |
| https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery.json |