Skip to content

Instantly share code, notes, and snippets.

View pmlandwehr's full-sized avatar
💭
this is a silly feature for a software repository

Peter M. Landwehr pmlandwehr

💭
this is a silly feature for a software repository
View GitHub Profile
@eddiecorrigall
eddiecorrigall / freenas.md
Last active September 19, 2022 18:02
FreeNAS and all that is Glory

FreeNAS

Troubleshooting

Mini SAS Male SFF-8087 to 4 Female SATA cables

I bought 2 cables for a FreeNAS array of 8 hard drives in 2019. I used them with an LSI HBA and a Rosewill case. I had trouble with the hard drive connections when I initially set them up. Occasionally a drive would go offline. I assumed that his was poor contact with the hot swap bays and re-seat the drives until they came online. Recently I discovered the issue: one of the SATA connections on the Mini SAS Male SFF-8087 to 4 Female SATA cables does not reliably connect. From my /var/log/messages I get these errors:

Oct 7 23:52:42 freenas mps0: Controller reported scsi ioc terminated tgt 9 SMID 2103 loginfo 31120303

@wangg12
wangg12 / Install NVIDIA Driver and CUDA.md
Created August 3, 2019 11:19 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
# -*- coding: utf-8 -*-
from __future__ import annotations
from pandas.api.extensions import ExtensionDtype, ExtensionArray
from typing import Optional, Union, Dict, Tuple, Any, Sequence
import numpy as np
import re
class VectorDtype(ExtensionDtype):
_metadata = 'subtype', 'size'
https://github.com/apache/incubator-airflow
https://github.com/ssadedin/bpipe
https://github.com/bloomreach/briefly
https://github.com/monajemi/clusterjob
https://github.com/tburdett/Conan2
https://github.com/broadinstitute/cromwell
https://github.com/joergen7/cuneiform
https://github.com/googlegenomics/dockerflow
https://github.com/thieman/dagobah
https://github.com/Factual/drake

Setting up Jupyter to run Django with an enviroment variables file.

Run (the file must include a DJANGO_SETTINGS_MODULE env variable):
export $(cat .env | grep -v ^# | xargs) 
@dusenberrymw
dusenberrymw / custom.css
Last active February 13, 2019 14:09
Jupyter Solarized Dark Custom CSS (~/.jupyter/custom/custom.css)
/*
Name: Base16 Solarized Dark
Author: Ethan Schoonover (http://ethanschoonover.com/solarized)
CodeMirror template adapted for IPython Notebook by Nikhil Sonnad (https://github.com/nsonnad/base16-ipython-notebook)
CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools)
Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16)
*/
@mnarayan
mnarayan / workflow-pipelines.md
Last active July 27, 2020 15:59
Tools for simulation and data analysis workflow management

Philip Guo summarized the problem quite well in Burrito. Are there any modern solutions to this problem ?

A nice collection of all tools provided by @pditommaso. Some subset worth trying out.

So far Sumatra/noworkflow/recipy/WorldMake appear to care most about provenance tracking; nextflow appears to be a very promising upgrade to gnu make for containerized data science pipelines.

  1. Nextflow
  2. Sumatra
  3. Luigi and SciLuigi
  4. Doit and an tutorial from sw
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@kylebgorman
kylebgorman / wagnerfischerpp.py
Last active March 3, 2023 17:27
Wagner-Fischer Levenshtein distance, now with a means to generate all possible optimal alignments.
# Copyright (c) 2013-2022 Kyle Gorman
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
@danielfrg
danielfrg / clean-html-solr-pipeline.py
Last active May 6, 2019 12:45
Luigi pipeline that: 1. Reads a tdf file using pandas with html on the 'content' column and created another tdf with just the text of the html (beautifulsoup) 2. Indexes the text into a Solr collection using mysolr
import re
import json
import luigi
import pandas as pd
from mysolr import Solr
from bs4 import BeautifulSoup
class InputText(luigi.ExternalTask):