Skip to content

Instantly share code, notes, and snippets.

@catawbasam
catawbasam / lineread_mmap.ipynb
Created April 2, 2014 15:18
Faster, memory-efficient line-oriented text processing in Julia using mmap array
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@catawbasam
catawbasam / juliadb_logo.svg
Created November 4, 2015 11:56
A logo for juliadb. This image is made available under the MIT license.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@catawbasam
catawbasam / fds_specimen_notebook.ipynb
Last active December 25, 2015 19:19
Sample IPython notebook using FDS Specimen Flight and FlightDataAnalyzer
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@catawbasam
catawbasam / gist:7028568
Last active December 25, 2015 19:29
IJulia Notebook: String basics
{
"metadata": {
"language": "Julia",
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@catawbasam
catawbasam / test1.jl
Created September 19, 2012 12:58
first crack at Julia
##############################################################
# julia first test = test.jl
# running on Windows 64 with Commit 7076ab06f1 (2012-10-15)
#
# Julia runs in the crappy Windows terminal (autohotkey is one way out)
# - make sure QuickEdit is on
# - select with mouse and <enter> to copy
# - right click with mouse to paste
# AutoHotKey script -- ctl-F5 copies cur line; ctl-f6 pastes clipboard to console
#
@catawbasam
catawbasam / julia_npp.xml
Created October 9, 2012 12:23
Julia language syntax highlighting for Notepad++. Goes in /users/{username}/AppData/Roaming/Notepad++.
<NotepadPlus>
<UserLang name="Julia" ext="jl">
<Settings>
<Global caseIgnored="no" />
<TreatAsSymbol comment="no" commentLine="yes" />
<Prefix words1="no" words2="no" words3="no" words4="no" />
</Settings>
<KeywordLists>
<Keywords name="Delimiters">&quot;00&quot;00</Keywords>
<Keywords name="Folder+">begin function type for while if</Keywords>
@catawbasam
catawbasam / ndjson2sqlite
Created September 4, 2021 17:28
load ndjson into a pandas dataframe then save to sqlite
"""load ndjson into a Pandas dataframe. then save to sqlite. """
import json
import pandas as pd
#load
path = 'data.ndjson'
with open(path,'rt', encoding='utf-8') as f:
lines = f.readlines()
print('# lines', len(lines))
@catawbasam
catawbasam / pandas_dbms.py
Last active February 17, 2024 15:16
Python PANDAS : load and save Dataframes to sqlite, MySQL, Oracle, Postgres
# -*- coding: utf-8 -*-
"""
LICENSE: BSD (same as pandas)
example use of pandas with oracle mysql postgresql sqlite
- updated 9/18/2012 with better column name handling; couple of bug fixes.
- used ~20 times for various ETL jobs. Mostly MySQL, but some Oracle.
to do:
save/restore index (how to check table existence? just do select count(*)?),
finish odbc,