Skip to content

Instantly share code, notes, and snippets.

View a-y-khan's full-sized avatar

Ayla Khan a-y-khan

  • Salt Lake City, UT, USA
View GitHub Profile
import dask.bag as db
import json
json_bag = db.read_text('test.txt').map(json.loads)
dask_df = json_bag.to_dataframe()
print(dask_df.info())
print(dask_df.head(3))
pandas_df = dask_df.compute()
print(pandas_df.info())
@a-y-khan
a-y-khan / pandas_1_0_highlights.ipynb
Created February 27, 2020 04:12
Pyladies lightning talk: interesting new features in Pandas 1.0
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@a-y-khan
a-y-khan / optimized_queens.pl
Last active March 11, 2020 06:58
Eight Queens solutions from Seven Languages in Seven Weeks, SWI-Prolog version
%% https://www.swi-prolog.org/man/clpfd.html
:- use_module(library(clpfd)).
%% ---
%% Excerpted from "Seven Languages in Seven Weeks",
%% published by The Pragmatic Bookshelf.
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for any purpose.
%% Visit http://www.pragmaticprogrammer.com/titles/btlang for more book information.