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 ubuntu:22.04 | |
RUN mkdir /tmp/blah && chown www-data /tmp/blah && ls -ld /tmp/blah | |
# When it's building I see | |
# drwxr-xr-x 2 www-data root 4096 Aug 17 04:12 /tmp/blah | |
# Why when I run this with docker container run user/image /bin/ls -ld /tmp/blah | |
# do I see | |
# drwxr-xr-x 2 root root 4096 Aug 17 04:12 /tmp/blah |
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 python:3.11 | |
COPY main.py /tmp/main.py | |
COPY requirements.txt /tmp/requirements.txt | |
RUN python3 -m pip install -r /tmp/requirements.txt | |
CMD ["python3", "/tmp/main.py"] |
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
#! /usr/bin/env python3 | |
# vim: expandtab shiftwidth=4 tabstop=4 | |
""" | |
Hi. | |
We're trying to implement this code at https://bitcoin.stackexchange.com/a/32308/235711 in python with the | |
ecdsa library. Unfortunately, we're not clear on what language this code below is written in.. C++? C#? | |
const QByteArray xx ( QByteArray::fromHex ( "01000000018dd4f5fbd5e980fc02f35c6ce145935b11e284605bf599a13c6d41" |
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
#! /usr/bin/env python3 | |
# vim: expandtab shiftwidth=4 tabstop=4 | |
""" | |
Hi. | |
We're trying to implement this code at https://bitcoin.stackexchange.com/a/32308/235711 in python with the | |
ecdsa library. Unfortunately, we're not clear on what language this code below is written in.. C++? C#? | |
We'd like to verify using python, but it doesn't seem to work. Can someone tell us what we're doing wrong? |
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
create or replace table data ( | |
pos int not null, | |
val float not null, | |
constraint data_pk primary key (pos) | |
); | |
insert into data (pos, val) values | |
(1, 2), (2, 3), (3, 5), (4, 7), (5, 11), (6, 13), (7, 17), (8, 19), | |
(9, 23), (10, 29), (11, 31), (12, 37), (13, 41), (14, 43), (15, 47), (16, 53), | |
(17, 59), (18, 61), (19, 67), (20, 71), (21, 73), (22, 79), (23, 83), (24, 89), |
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 continuumio/anaconda3 | |
LABEL maintainer="Binesh B." | |
ENV TZ=US/Eastern DEBIAN_FRONTEND=noninteractive | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | |
RUN \ | |
groupadd -r binesh -g 1000 \ | |
&& useradd -m -s /bin/bash -g binesh -u 1000 binesh \ | |
&& apt-get update -y \ |
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
#! /usr/bin/env python3 | |
# vim: expandtab shiftwidth=4 tabstop=4 | |
"""Hadamard multiplication of a sparse times a dense.""" | |
import torch | |
from torch_sparse import SparseTensor | |
def main(): | |
dense = torch.randn(5, 7) |
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
#! /usr/bin/env python3 | |
# vim: expandtab shiftwidth=4 tabstop=4 | |
"""Find graphlets""" | |
from collections import Counter | |
def assign_triplet_to_graphlet(adjacency_list, graphlets, triplet): | |
assert len(triplet) == 3 | |
reverse_graphlets = {tuple(sorted(graphlet.items())): name for name, graphlet in graphlets.items()} |
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
#! /usr/bin/env python3 | |
# vim: expandtab shiftwidth=4 tabstop=4 | |
"""This fails with a message that says that edge_attr is None. But, edge_attr is _not_ None""" | |
import argparse | |
import torch | |
import torch_geometric | |
import torch_scatter | |
import torch_sparse |
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
#! /usr/bin/env python3 | |
# vim: expandtab shiftwidth=4 tabstop=4 | |
"""Why does this fail when run with --device cuda?""" | |
import argparse | |
import torch | |
import torch_geometric | |
import torch_scatter | |
import torch_sparse |
NewerOlder