Skip to content

Instantly share code, notes, and snippets.

View transfer_distortion_parameters_testing.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Flat comparison.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View prechosen_apertures.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View prechosen_apertures.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Effect on guiding (srw).ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mindriot101
mindriot101 / test_db.py
Created Sep 20, 2015
Database testing with transactions
View test_db.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import pytest
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
# In `db.py` or something
Base = declarative_base()
@mindriot101
mindriot101 / python_pymysql_notes.md
Created Sep 18, 2015
Notes about pymysql connections
View python_pymysql_notes.md

Database transactions

pymysql

  • Defaults to autocommit=False
connection = pymysql.connect(user='user', db='test')
cursor = connection.cursor()
cursor.execute('insert into test (value) values (10)')
View 01.configure
2015-08-25 17:20:10 +0100
./configure
--with-features=huge
--enable-multibyte
--with-macarchs=x86_64
--enable-perlinterp
--enable-rubyinterp
--enable-tclinterp
--with-tlib=ncurses
@mindriot101
mindriot101 / minimizer-evaluation.ipynb
Created Aug 7, 2015
Assessment of scipy minimizers
View minimizer-evaluation.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.