Skip to content

Instantly share code, notes, and snippets.

@joshmoore
joshmoore / pix.py
Created July 27, 2016 09:17
Script to refresh the B-F cache
#!/usr/bin/env python
from argparse import ArgumentParser
from fileinput import input
from sys import argv
from sys import exit
from sys import stdout
from sys import stderr
from time import time
@joshmoore
joshmoore / tops.ipynb
Created February 2, 2016 16:52
IDR Top tag counts
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@atarkowska
atarkowska / curl_omero_web.sh
Created January 18, 2016 12:12
Log in to OMERO.web
#!/bin/bash
#
set -u
set -e
set -x
COOKIES=cookies.txt
LOGIN_URL=https://omero.host/prefix/webclient/login/
#! /usr/bin/env python
# Script to update Bio-Formats server-side
import urllib2
import os
import shutil
DONWLOADS_URL = "http://downloads.openmicroscopy.org/bio-formats"
RELEASE = "5.1.4"
JARS = [
@rupey
rupey / mandelbrot.sql
Last active December 7, 2020 05:38
Mandelbrot plot in postgres
WITH RECURSIVE
x(i) AS ( VALUES (0)
UNION ALL SELECT i + 1
FROM x
WHERE i < 101),
Z(Ix, Iy, Cx, Cy, X, Y, I) AS (
SELECT
Ix,
Iy,
X :: FLOAT,
@lolzballs
lolzballs / HelloWorld.java
Created March 22, 2015 00:21
Hello World Enterprise Edition
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
public class HelloWorld{
private static HelloWorld instance;
public static void main(String[] args){
instantiateHelloWorldMainClassAndRun();
@amatellanes
amatellanes / celery.sh
Last active March 25, 2025 18:02
Celery handy commands
/* Useful celery config.
app = Celery('tasks',
broker='redis://localhost:6379',
backend='redis://localhost:6379')
app.conf.update(
CELERY_TASK_RESULT_EXPIRES=3600,
CELERY_QUEUES=(
Queue('default', routing_key='tasks.#'),
@will-moore
will-moore / OMERO_search_5.0.3.py
Created July 25, 2014 11:16
Examples of using the OMERO BlitzGateway search API following updates in 5.0.3.
from omero.gateway import BlitzGateway
from datetime import datetime
import time
conn = BlitzGateway('will', 'ome', host="localhost")
conn.connect()
@pjobson
pjobson / remove_mcafee.md
Last active March 26, 2024 04:26
OSX McAfee Removal

Removal of McAfee from OSX

Note: This was written in 2015, it may be out of date now.

There are a lot of commands here which I use sudo if you don't know what you're doing with sudo, especially where I rm you can severely screw up your system.

There are many reasons which you would want to remove a piece of software such as McAfee, such as not wanting it to hammer your CPU during work hours which seems like primetime for a virus scan.

I intend this to be a living document, I have included suggestions from peoples' replies.