Skip to content

Instantly share code, notes, and snippets.

View normcyr's full-sized avatar

Normand Cyr normcyr

View GitHub Profile
@normcyr
normcyr / splitser3d.cga
Created March 14, 2019 15:03
TopSpin AU program to split pseudo-3D dataset into separate 2D planes
/*** ^^A -*-C++-*- **********************************************/
/* splitser3d 15.08.1990 */
/****************************************************************/
/* Short Description : */
/* Program which splits a pseudo 3D ser file into single */
/* fids starting with the expno which follows the ser file.*/
/****************************************************************/
/* Keywords : */
/* splitser */
/****************************************************************/
@normcyr
normcyr / menu_bieres_st-houblon_cdn
Last active November 20, 2018 19:06
Analyse le menu de bières au menu du St-Houblon Côte-des-Neiges
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
def charger_donnees(url_source):
'''
@normcyr
normcyr / tar_SAXS_data.sh
Last active April 25, 2018 19:27
Create a GZIP compressed file containing SAXS data of a user
#!/bin/bash
# ------------------------------------------------------------------
# [Normand Cyr] tar_data.sh
# Create a GZIP compressed file containing SAXS data of a user
# ------------------------------------------------------------------
VERSION=0.1.0
#USAGE="Usage: tar_data -ihv args"
# name of the data file to create
'''
Script to analyze, plot and fit fluorescence anisotropy data
Data file can be foudn here:
https://www.normandcyr.com/data/data.csv
'''
import pandas as pd
import matplotlib.pyplot as plt
from scipy import optimize
from math import sqrt
@normcyr
normcyr / ubuntu_unattended_upgrades_gmail.markdown
Created January 12, 2018 15:48 — forked from roydq/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

#Largely inspired from Oli's Coot customizations. Thanks Oliver!
#https://github.com/olibclarke/coot-trimmings
#
#A few modifications to suit my preference.
#
#Usage: Copy to ~/.coot-preferences
#When Coot is restarted, a new "Custom" menu will appear, with some new shortcuts for various model-building tasks.
#Also there will be a bunch of new keyboard shortcuts - check "Extensions...Settings...Key bindings" for details.
#****Settings****
@normcyr
normcyr / autocoot.sh
Last active August 3, 2017 19:06
autocoot - a script to launch coot and automatically open the latest PDB and MTZ files.
#!/bin/sh
# script to launch coot and automatically open the latest PDB and MTZ files
# modified slightly from jpxtal (https://github.com/jpxtal/easypx)
unset GTK_IM_MODULE
pdb=$(ls -t *.pdb | head -1)
mtz=$(ls -t *.mtz | head -1)
echo coot --pdb $pdb --auto $mtz
@normcyr
normcyr / readPdbEntry-pypdb.py
Created August 2, 2017 15:26
Read a PDB entry using the pypdb module
from pypdb import *
#testPdb = '4xkl'
#testPdb = '5v4k'
testPdb = '3vtv'
entityExtraInfo = get_all_info(testPdb)
print(entityExtraInfo)
print('\n')
@normcyr
normcyr / reddit-rss-feeder.sh
Last active August 1, 2017 15:11 — forked from Ironjanowar/reddit-popular.sh
Bash script to return the last 8 posts from a subreddit
#!/bin/sh
#
# usage: ./reddit-rss-feeder.sh subreddit-name hot/new/rising/controversial/top/gilded
# default subreddit-name = popular
# default tab = hot
# e.g.: ./reddit-rss-feeder.sh bikewrench new
#
# This script uses rsstail to retrieve latests entries from Reddit Bikecommuting rss feed
# and process them through awk. Each update shows a timestamp separator.
#
@normcyr
normcyr / .bashrc
Created January 25, 2016 18:28 — forked from marioBonales/.bashrc
Default .bashrc for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace