Skip to content

Instantly share code, notes, and snippets.

View ivirshup's full-sized avatar
💭
🫠

Isaac Virshup ivirshup

💭
🫠
View GitHub Profile
@ivirshup
ivirshup / Full log
Created July 6, 2021 07:13
pynndescent 0.5.3 traceback
This file has been truncated, but you can view the full file.
2021-07-06T06:22:38.2855413Z ##[section]Starting: PyTest
2021-07-06T06:22:38.2865170Z ==============================================================================
2021-07-06T06:22:38.2865487Z Task : Command line
2021-07-06T06:22:38.2866717Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2021-07-06T06:22:38.2867060Z Version : 2.182.0
2021-07-06T06:22:38.2867287Z Author : Microsoft Corporation
2021-07-06T06:22:38.2867638Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2021-07-06T06:22:38.2868015Z ==============================================================================
2021-07-06T06:22:39.2961314Z Generating script.
2021-07-06T06:22:39.2962626Z Script contents:
@ivirshup
ivirshup / example.py
Created March 7, 2021 05:28
tsne_nearest_neighbor_method
import scanpy as sc
import numpy as np
from matplotlib import pyplot as plt
from openTSNE import TSNE
from itertools import product
pbmc = sc.datasets.pbmc3k_processed()
RANDOM_STATE = 1291321
keys = []
@ivirshup
ivirshup / gist:3985cdbb9a838f3948d5ee5aaf0bf8e3
Created February 14, 2021 06:59
Sample of csgo_osx64.txt
Sampling process 44517 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling csgo_osx64 (pid 44517) every 1 millisecond
Process: csgo_osx64 [44517]
Path: /Users/USER/Library/Application Support/Steam/*/csgo_osx64
Load Address: 0x10f2e9000
Identifier: csgo_osx64
Version: ???
Code Type: X86-64
Parent Process: bash [44514]
@ivirshup
ivirshup / log.txt
Created February 3, 2021 09:56
scanorama error log
2021-02-03T05:26:14.6653679Z ##[section]Starting: PyTest Python36
2021-02-03T05:26:14.9395796Z ##[section]Starting: Initialize job
2021-02-03T05:26:14.9397123Z Agent name: 'Azure Pipelines 4'
2021-02-03T05:26:14.9397517Z Agent machine name: 'fv-az315-103'
2021-02-03T05:26:14.9397757Z Current agent version: '2.181.1'
2021-02-03T05:26:14.9441788Z ##[group]Operating System
2021-02-03T05:26:14.9442012Z Ubuntu
2021-02-03T05:26:14.9442183Z 18.04.5
2021-02-03T05:26:14.9442318Z LTS
2021-02-03T05:26:14.9442484Z ##[endgroup]
@ivirshup
ivirshup / norm_results.py
Created January 5, 2021 05:34
glm-pca, normalization factor results
import scanpy as sc, numpy as np
from matplotlib import pyplot as plt
from sklearn.utils import sparsefuncs
def norm_frac(adata):
sparsefuncs.inplace_row_scale(adata.X, 1 / adata.X.sum(axis=1).A1)
return adata
def norm_cpm(adata):
sparsefuncs.inplace_row_scale(adata.X, 1_000_000 / adata.X.sum(axis=1).A1)
@ivirshup
ivirshup / nytimes_election_data.py
Created November 6, 2020 08:39
Accessing nytimes election data for procrastination purposes
import requests
import pandas as pd
def fetch_state_results(state: str) -> dict:
r = requests.get(f"https://static01.nyt.com/elections-assets/2020/data/api/2020-11-03/race-page/{state}/president.json")
return r.json()["data"]
def _process_records(input: "list[dict]") -> pd.DataFrame:
@ivirshup
ivirshup / systeminfo.txt
Created August 10, 2020 10:24
steam system info
Computer Information:
Manufacturer: Apple
Model: MacBookPro16,1
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
CPU Family: 0x6
@ivirshup
ivirshup / pytest-output.txt
Created August 5, 2020 05:03
diffxpy test failures
===================================================== test session starts =====================================================
platform darwin -- Python 3.8.5, pytest-5.4.3, py-1.9.0, pluggy-0.13.1
rootdir: /Users/isaac/github/diffxpy
plugins: cov-2.10.0
collected 68 items
diffxpy/unit_test/test_acc_glm_all_numpy_temp.py F [ 1%]
diffxpy/unit_test/test_backends.py .FF [ 5%]
diffxpy/unit_test/test_constrained.py FFF [ 10%]
diffxpy/unit_test/test_continuous_de.py .F [ 13%]
@ivirshup
ivirshup / mascot_umap.py
Last active May 15, 2020 14:45
Mascot UMAP
from PIL import image
import pandas as pd
import numpy as np
empty_pixel = np.array([255, 255, 255, 0]).reshape(1, 1, -1)
# !wget https://github.com/theislab/scanpy/raw/master/docs/_static/img/Scanpy_Logo_RGB.png
im = Image.open("./Scanpy_Logo_RGB.png")
a = np.array(im)
@ivirshup
ivirshup / orderedset.py
Created April 22, 2020 02:26
OrderedSet
"""Simple OrderedSet implementation."""
from collections import OrderedDict
from collections.abc import MutableSet
from functools import reduce
from itertools import repeat
from operator import or_, sub
class OrderedSet(MutableSet):