Skip to content

Instantly share code, notes, and snippets.

View inactivist's full-sized avatar
💭
fixing things

Michael Curry inactivist

💭
fixing things
View GitHub Profile
#==============================================================
# .picasa.ini FILE STRUCTURE
#
# reverse-engineered by Franz Buchinger <fbuchinger@gmail.com>
# licensed to the public domain
#
# Picasa Version(s): 3.8.0
#
# Changelog:
# v0.1: initial release
def set_up_dag_run(context, dag_run_obj):
dag_run_obj.payload = {"config": context["config"]}
dag_run_obj.run_id = str(uuid4())
print context
return dag_run_obj
def launch_workflow_command(args):
config_location = args.config_location
analysis_id = args.analysis_id
@inactivist
inactivist / ela.py
Created May 29, 2019 03:29 — forked from cirocosta/ela.py
Error Level Analysis in Python
#!/usr/bin/python
from __future__ import print_function
from PIL import Image, ImageChops, ImageEnhance
import sys, os
import threading
import argparse
parser = argparse.ArgumentParser(description="""
Performs Error Level Analysis over a directory of images
@inactivist
inactivist / luigi_first_steps.md
Last active July 13, 2023 09:12 — forked from tomsing1/luigi_first_steps.md
First steps with the Luigi workflow manager

First steps with the Luigi workflow manager

As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.

The problems and solutions described in the examples below have led to the development of sciluigi,

@inactivist
inactivist / luigi_first_steps.md
Created March 22, 2020 13:48 — forked from tomsing1/luigi_first_steps.md
First steps with the Luigi workflow manager

First steps with the Luigi workflow manager

As an introduction into Luigi, I am following this tutorial with some modifications, e.g. installation using conda.

The problems and solutions described in the examples below have led to the development of sciluigi,

from collections import defaultdict, OrderedDict
import luigi
from luigi.task import flatten, getpaths
def topological_sorting(struct, outnodes_funct, transform_funct):
struct = flatten(struct.keys()) if isinstance(struct, dict) else flatten(struct)
visited = OrderedDict()
def dvisit(root):
@inactivist
inactivist / scrape_with_logs.py
Created March 15, 2023 11:16 — forked from rengler33/scrape_with_logs.py
How to Capture Network Traffic When Scraping with Selenium & Python
# see rkengler.com for related blog post
# https://www.rkengler.com/how-to-capture-network-traffic-when-scraping-with-selenium-and-python/
import json
import pprint
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
capabilities = DesiredCapabilities.CHROME