Skip to content

Instantly share code, notes, and snippets.

def run_concatenation(directory=None):
import re, os
from xlwings import Workbook, Range, Application
wb = Workbook(app_visible=False)
lastRow = 3
newlastRow = lastRow
lastColumn = 6
if directory is None:
directory = os.getcwd()
for file in os.listdir(directory):
@santiago-salas-v
santiago-salas-v / Simplistic_Eq_NaHSO3.py
Last active December 25, 2015 09:55
pH of 40% solution of sodium bisulfite in water (init. pH=7)
from sympy.matrices import Matrix
from sympy import solve, nsolve, symbols, pprint
import numpy as np
from numpy import log10
import timeit
from Tkinter import Text, Tk, END, INSERT
# i C0, gmol/L
# 1 C0_{H2SO3} = 0
# 2 C0_{HSO3(-)} = 5.10E+00
# Concatenate csv files in folder ./DATA to folder ./folder_output, skipping line 1
# of all except the first file
import os, csv
csv_folder = os.path.abspath('./DATA')
output_folder = 'folder_output'
files = [file for file in os.listdir(csv_folder) if os.path.splitext(file)[1].lower() == '.csv']
if not os.path.isdir(output_folder):
os.mkdir(output_folder)
outfile_name = os.path.join(output_folder, 'output.csv')
while os.path.exists(outfile_name):
import os, sys, logging, re, pandas as pd, numpy as np, scipy as sp, csv, bisect, uuid
import matplotlib, colormaps
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4'] = 'PySide'
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.figure import Figure
from PySide import QtGui, QtCore
from functools import partial
import os
import sys
import logging
import re
import pandas as pd
import numpy as np
import scipy as sp
import csv
import bisect
import uuid
import os
import sys
from functools import partial
import matplotlib
matplotlib.use('Qt4Agg')
matplotlib.rcParams['backend.qt4'] = 'PySide'
import matplotlib.pyplot as plt
from matplotlib.pyplot import figure
from PySide import QtGui
[
{
"caption": "Export html from latex",
"command": "htlatex"
}
]
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
Make4htView = require './make4ht-view'
{CompositeDisposable} = require 'atom'
fs = require 'fs'
path = require 'path'
process = require 'process'
spawn = require('child_process').spawn
module.exports = Make4ht =
make4htView: null
modalPanel: null
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/