Skip to content

Instantly share code, notes, and snippets.

View Guillawme's full-sized avatar
💭
I might be slow to respond (days).

Guillaume Gaullier Guillawme

💭
I might be slow to respond (days).
View GitHub Profile
@biochem-fan
biochem-fan / NOTES.md
Last active June 20, 2025 18:19
Warp-RELION4-M Protocol
@svpino
svpino / neural-network-from-scratch.py
Last active December 13, 2024 20:19
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)
@m-radzikowski
m-radzikowski / script-template.sh
Last active July 14, 2025 10:40
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
/* BoxNet2D runner
* Based on Warp 1.0.7 by Dimitry Tegunov https://github.com/cramerlab/warp/
* Command line interface and Linux port by @biochem_fan
* Licensed under GPLv3
*/
using System;
using System.IO;
using System.Linq; // for toList()
using System.Diagnostics; // for Stopwatch
@biochem-fan
biochem-fan / atom2svg.py
Last active January 2, 2025 13:24
atom2svg
# atom2svg.py by @biochem_fan
# VERSION: 210224
# License: GPLv2 or later (ask me if this is inconvenient for you)
#
# LIMITATIONS:
# - This supports only a single chain. If you have more chains, shift residue IDs and merge chains.
#
# TODO:
# - Residue numbers (how to pack??)
#
#!/bin/bash
if [[ ! -d 3DEM ]]
then
mkdir 3DEM
fi
cd 3DEM
curl -s http://mail.ncmir.ucsd.edu/pipermail/3dem/ |\
@bbarad
bbarad / tomoseg_to_imod.py
Created December 5, 2019 16:27
Convert segmentation HDF to .mod file appropriate for imod.
"""
Script to convert eman2 segmentation hdf maps to imod model files at a user defined contour level.
Requires python>=3.5 as well as having Eman2 and IMOD in the path.
Usage: `python3 tomoseg_to_imod.py -i EXAMPLE.hdf -o EXAMPLE.mod -t 0.8`
Author: Benjamin Barad <[email protected]>
"""
import argparse
@bmaupin
bmaupin / en_SE
Last active July 3, 2025 08:05
en_SE locale
escape_char /
comment_char %
% This file was generated by taking the LC_TIME section from en_US and
% replacing date/time representation with that of sv_SE from the glibc
% locale sources
% (http://sourceware.org/git/?p=glibc.git;a=tree;f=localedata/locales;hb=HEAD)
% (https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html)
% This file is part of the GNU C Library and contains locale data.
@andersjohansson
andersjohansson / emacs-zotero-bib-fetch.el
Created March 31, 2016 10:05
Emacs-zotero-bib-fetch: fork of zotelo to use better-bibtex's pull export
;;; emacs-zotero-bib-fetch.el --- Manage Zotero collections from emacs
;;
;; Filename: emacs-zotero-bib-fetch.el
;; Author: Anders Johansson, based on zotelo by Spinu Vitalie
;; Maintainer: Anders Johansson
;; Copyright (C) 2011-2014, Anders Johansson and Spinu Vitalie
;; Created: 1 Jul 2014
;; Version: 1.2
;; URL: https://github.com/andersjohansson/emacs-zotero-bib-fetch
;; Keywords: zotero, emacs, reftex, bibtex, bibliography manager
@hadley
hadley / ds-training.md
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge