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
~/m/p/o/olavm (main)$ git rev-parse HEAD && cargo clippy | |
d9fc2ff0a465f31dfd90f93dd3e02053818fe0d6 | |
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` | |
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest | |
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest | |
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions | |
warning: suspicious use of `*` in `Div` impl | |
--> plonky2/field/src/arch/x86_64/avx2_goldilocks_field.rs:86:14 | |
| | |
86 | self * rhs.inverse() |
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
~/m/p/o/olavm (main)$ git rev-parse HEAD && cargo clean && cargo check | |
d9fc2ff0a465f31dfd90f93dd3e02053818fe0d6 | |
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` | |
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest | |
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest | |
note: for more details see https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions | |
Removed 2782 files, 1.7GiB total | |
warning: virtual workspace defaulting to `resolver = "1"` despite one or more workspace members being on edition 2021 which implies `resolver = "2"` | |
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest | |
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest |
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
17 | |
23 |
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
function FindProxyForURL(url, host) { | |
PROXY = "SOCKS 127.0.0.1:1337" | |
if (shExpMatch(host,"*.pandora.com")) { | |
return PROXY; | |
} | |
return "DIRECT"; | |
} |
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 | |
from collections import defaultdict | |
from datetime import datetime, timedelta | |
import requests | |
from bisect import bisect_left | |
from typing import List, Dict, Any | |
from bisect import bisect |
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
class A: | |
def __init__(self, x): | |
self.x = x | |
def __bool__(self): | |
print(f'bool: {self}') | |
return False | |
def __str__(self): | |
return f'A(x={self.x})' | |
print("Variant 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
import math | |
import struct | |
from functools import reduce | |
from itertools import repeat | |
from hypothesis import assume, example, given, note | |
from hypothesis import strategies as st | |
def float_from_integer(integer): |
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
""" | |
https://www.reddit.com/r/algorithms/comments/vi75ip/equal_sums_for_subsets_of_2_different_lists/ | |
For example, lets say you have a warehouse and you want to keep a record of the merchandise, bananas, that goes in and out. If you have two people keeping records and they work independently, we would expect them to have the same recorded values and that their records will be identical. However, it is possible that one person created one record for two shipments, creating a sum that I want to detect here. It is also possible that one person miss counted and that value should not have a matching element to the other person's records. Ultimately, it is erroneous and non-matching entries that I want to identify. If they do not match, then we know there was a recording error somewhere and we need to investigate that. | |
I'm trying to reconcile those records. First, I remove all entries that do match up perfectly. Then, I need to find out if there is some combination of records for person A that matches up with some |
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 re | |
from hypothesis import strategies as st, given, assume, note, example | |
from typing import List, Optional | |
def is_balanced(mystr): | |
if len(mystr) % 2 != 0: | |
return False | |
stack = [] |
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
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Monad.Trans.RWS.Strict | |
import Control.Monad | |
newtype Stitch = Stitch Int | |
deriving (Eq, Ord, Show, Num) | |
type Knitting a = RWS () [Stitch] Stitch a | |
emitRow :: Knitting () |
NewerOlder