Skip to content

Instantly share code, notes, and snippets.

View buttercutter's full-sized avatar

Phung Cheng Fei buttercutter

View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
sequence_id,sequence,experiment_type,dataset_name,reads,signal_to_noise,SN_filter,reactivity_0001,reactivity_0002,reactivity_0003,reactivity_0004,reactivity_0005,reactivity_0006,reactivity_0007,reactivity_0008,reactivity_0009,reactivity_0010,reactivity_0011,reactivity_0012,reactivity_0013,reactivity_0014,reactivity_0015,reactivity_0016,reactivity_0017,reactivity_0018,reactivity_0019,reactivity_0020,reactivity_0021,reactivity_0022,reactivity_0023,reactivity_0024,reactivity_0025,reactivity_0026,reactivity_0027,reactivity_0028,reactivity_0029,reactivity_0030,reactivity_0031,reactivity_0032,reactivity_0033,reactivity_0034,reactivity_0035,reactivity_0036,reactivity_0037,reactivity_0038,reactivity_0039,reactivity_0040,reactivity_0041,reactivity_0042,reactivity_0043,reactivity_0044,reactivity_0045,reactivity_0046,reactivity_0047,reactivity_0048,reactivity_0049,reactivity_0050,reactivity_0051,reactivity_0052,reactivity_0053,reactivity_0054,reactivity_0055,reactivity_0056,reactivity_0057,reactivity_0058,reactivity_005
@buttercutter
buttercutter / orbital_rotation.ipynb
Created July 3, 2023 03:45
Code refactoring / migration for qiskit OO-VQE
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@buttercutter
buttercutter / toffoli_gate_simplified.tex
Created February 22, 2023 05:02
toffoli gate optimization
\documentclass{article}
\usepackage{amsmath}
\NewDocumentCommand{\Qubit}{ O{1} }{%
\ensuremath{%
\mathbf{%
#1%
}%
}%
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@buttercutter
buttercutter / neopi.py
Last active January 11, 2023 06:08
A refactored neopi.py script
#!/usr/bin/python
# Name: neopi.py
# Description: Utility to scan a file path for encrypted and obfuscated files
# Authors: Ben Hagen ([email protected])
# Scott Behrens ([email protected])
#
# Date: 11/4/2010
#
# pep-0008 - Is stupid. TABS FO'EVER!
@buttercutter
buttercutter / run_summarization_flax.py
Last active January 11, 2023 03:24
flax training script with gradient accumulation trick
#!/usr/bin/env python
# coding=utf-8
# Copyright 2021 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
import imageio
import numpy as np
import torch
import torch.nn as nn
from torchvision.utils import make_grid
from torch.autograd import Variable
from torch.autograd import grad as torch_grad
import sequence_dataloader