Skip to content

Instantly share code, notes, and snippets.

View jcfr's full-sized avatar
🎯
Focusing

Jean-Christophe Fillion-Robin jcfr

🎯
Focusing
View GitHub Profile

The issue

When a fixture is not used but needs to be included for some reasons, pylint will rightfully issue a warning. For instance, a fixture setup a specific database state and another fixture include it to ensure database is in a specific state.

@pytest.fixture
def init_database():
    """Setup database state"""
    ...
volumesDir = r"c:\Users\andra\OneDrive\Projects\SlicerTesting4\20190523-AutoWWWL\volumes"
screenshotsDir = r"c:\Users\andra\OneDrive\Projects\SlicerTesting4\20190523-AutoWWWL\screenshots"
methods = [
["baseline", autoContrastSlicerDefault],
["hist-0.1-99.9", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 0.1, 99.9, 0.00, 0.0)], # = itksnap
["hist-1.0-99.9", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 1.0, 99.9, 0.10, 0.0)],
["hist-1.0-99.0-x0.10", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 1.0, 99.0, 0.10, 0.10)],
["hist-1.0-99.0-x0.20", lambda fn: autoContrastVtkImageHistogramStatisticsDefault(fn, 1.0, 99.0, 0.10, 0.20)],
]
@jhodges10
jhodges10 / liqui_tx_history_to_csv
Last active April 9, 2018 03:48
Export Liqui trades via the API to a Bitcoin Tax compatible CSV
from liqui import Liqui # https://pypi.python.org/pypi/liqui
import datetime
import pandas as pd
api_key = 'YOUR_API_KEY'
api_secret = 'YOU_API_SECRET'
csv_filename = 'liqui_tx.csv'
@thewtex
thewtex / README.md
Last active January 19, 2018 21:33 — forked from juanpabloaj/README.md
Total of pip packages downloaded, separated by Python versions

Total of pip packages downloaded separated by Python versions

From September 26, 2017 to November 31, 2017.

Python versions from 2.6 to 3.6

downloads by version

@letsjustfixit
letsjustfixit / bashrc
Last active March 26, 2018 06:58
bashrc, screenrc
# ~/.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
case $- in
*i*) ;;
*) return;;
esac
@chrisoldwood
chrisoldwood / PowerShellExitTest.ps1
Last active July 22, 2024 04:12
A set of tests to show if your version of PowerShell returns the correct exit code under various error conditions.
exit 1
@lukas-h
lukas-h / license-badges.md
Last active November 11, 2024 03:22
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@njsmith
njsmith / ucrt-csv.py
Last active June 10, 2024 06:53
Information on linking to the new Windows UCRT
import sys
import subprocess
import csv
def describe_ucrt_lib(platform):
lib_path = "windows-10-sdk/Lib/10.0.10240.0/ucrt/{}/ucrt.lib".format(platform)
output = subprocess.check_output(["nm", lib_path])
output = output.decode("utf-8")
# Output (x86 32-bit) looks like:
@nolanlawson
nolanlawson / citizen.md
Last active February 19, 2019 12:38
How to be a good open-source citizen

How to be a good open-source citizen

A short list of tips and recommendations, for those who use OSS and/or want to contribute to it.

  1. Give feedback

Before I get into the wrong ways to give feedback, let me be clear: the worst thing you can do is give no feedback at all.

@oliora
oliora / CMakeLists.txt
Last active June 17, 2023 05:59
Forward added/changed variables to the function's parent scope
# forward_variables usage example
include(forward_variables.cmake)
# After call to this function, all variables set by find_package will be forwarded to
# function caller scope (i.e. into parent scope).
function(find_boost_package)
start_track_variables()
set(bla_bla 1)