profile
viewpoint
Matt Davis jiffyclub @populus-ai Bay Area, California http://penandpants.com

jiffyclub/cext23 36

Examples of Python C extensions that work on Python 2 and 3

jiffyclub/2015-07-06-scipy 14

Software Carpentry Workshop at SciPy 2015

jiffyclub/dc-python-meetup-nov-2012 14

Material for the Number Crunching in Python workshop.

ivanov/ipython-trainingwheels 4

A beginner student friendly profile for IPython notebook

abostroem/2014-09-10-LBL 3

LBL Lab Day 2014

jiffyclub/advent-of-code 1

Advent of Code

delete branch populus-ai/mobility-data-specification

delete branch : specify-min-max-inclusion

delete time in 13 days

issue commentopenmobilityfoundation/mobility-data-specification

[Clarify] Does one need to follow geography change chain for a policy

if a geography changes its shape, you need a new policy id. If a policy changes its geography id, then you also need a new policy id.

This is my take as well. A policy that applies to geography A is fundamentally different than one that applies to geography B and we need to be able to reference both for historical compliance analysis.

kheraankit

comment created time in a month

push eventjiffyclub/secret-santa-decoder

Matt Davis

commit sha 6db2300f7ac929fd1b0b495c72291cc15c2dd0d1

Add demo functionality

view details

push time in 2 months

push eventjiffyclub/secret-santa-decoder

Matt Davis

commit sha 098bf35004cec057f6cdb25a3b6d688c6ebbe4ab

Only run when values are present

view details

push time in 2 months

push eventjiffyclub/secret-santa-decoder

Matt Davis

commit sha 30b95fa0540ff181b0e73bc8f0a1fd97ceabf6cb

Agent-ize

view details

push time in 2 months

push eventjiffyclub/secret-santa-decoder

Matt Davis

commit sha a9386921438aa99d7e246b59917c50a70406e79e

Hackerize

view details

push time in 2 months

push eventjiffyclub/secret-santa-decoder

Matt Davis

commit sha 7eda79ca90fa304b4fbbf98a9cd6cd9791e91768

Initial commit of Secret Santa decoder

view details

push time in 2 months

create barnchjiffyclub/secret-santa-decoder

branch : gh-pages

created branch time in 2 months

created repositoryjiffyclub/secret-santa-decoder

created time in 2 months

pull request commentjiffyclub/ipythonblocks

Added compatibility with Python 3.10

Awesome, thank you!

lgleznah

comment created time in 2 months

push eventjiffyclub/ipythonblocks

lgleznah

commit sha 58ea7aac3cef6503e3cf72960e05cf8a5cb08526

Added compatibility with Python 3.10

view details

lgleznah

commit sha 55a66c9fa7c683f41dbf327fd11e362c601e7ebe

Specify exception type Co-authored-by: Matt Davis <jiffyclub@gmail.com>

view details

Matt Davis

commit sha 6ab0067f8dce0ee7bd0cb68b21524f9c1025b5ea

Merge pull request #40 from lgleznah/py310_import_fix Added compatibility with Python 3.10

view details

push time in 2 months

PR merged jiffyclub/ipythonblocks

Added compatibility with Python 3.10

Since Python 3.10, it is no longer possible to check if an object is iterable by doing:

if isinstance(thing, collections.Iterable)

More specifically, both Iterable and Sequential are now inside of collections.abc instead of collections.

I've added some imports at the beginning of the file to fix this issue.

By the way, this is my first ever pull request. If you have any feedback on how to improve my way of contributing to open-source, please share 😄

+13 -3

0 comment

1 changed file

lgleznah

pr closed time in 2 months

Pull request review commentjiffyclub/ipythonblocks

Added compatibility with Python 3.10

 from IPython.display import HTML, IFrame, display, clear_output from IPython.display import Image as ipyImage +# This statement is required for compatibility issues with Python 3.10.+# Since that version, Iterable and Sequence must be imported from+# collections.abc, instead of collections+try:+    from collections.abc import Iterable+    from collections.abc import Sequence+except:

Let's only catch ImportError here so we're only catching that one specific type of error.

except ImportError:
lgleznah

comment created time in 2 months

PullRequestReviewEvent
PullRequestReviewEvent

issue commentjiffyclub/palettable

support plotly?

Would be great to support if we can figure out how! Looks like there is some info under here: https://plotly.com/python-api-reference/generated/plotly.colors.html#module-plotly.colors

From poking around in there it looks like plotly takes colors as lists of hex strings (e.g. '#ae7eb0'). You can see that also in their source code: https://github.com/plotly/plotly.py/blob/master/packages/python/plotly/_plotly_utils/colors/sequential.py

The good news is that Palettable already supports that format! Use the .hex_colors attribute on a palette to get exactly that:

In [1]: import palettable

In [2]: palettable.cmocean.sequential.Algae_10
Out[2]: <palettable.cmocean.cmoceanpalette.CmoceanMap at 0x10e0e7ac0>

In [3]: palettable.cmocean.sequential.Algae_10.hex_colors
Out[3]:
['#D7F9D0',
 '#B4E0A8',
 '#8EC982',
 '#64B463',
 '#2CA052',
 '#07874D',
 '#126E45',
 '#195538',
 '#193C27',
 '#122414']

If you could try that out and let me know if it works it'd be much appreciated.

It also looks like there's significant overlap between Palettable's colormaps and Plotly's built-in ones. They are listed here and in some package specific submodules (e.g. Carto and cmocean):

  • https://plotly.com/python/builtin-colorscales/
  • https://plotly.com/python-api-reference/generated/plotly.colors.html#submodules
ickc

comment created time in 2 months

created tagjiffyclub/snakeviz

tagv2.1.1

An in-browser Python profile viewer

created time in 3 months

push eventjiffyclub/snakeviz

Matt Davis

commit sha c21fe2c653f2e49e71dcb022083bad93cffff36c

Updating change log before release

view details

push time in 3 months

push eventjiffyclub/palettable

Anthony Sottile

commit sha b20cdca13647941deaaa2c4b15cdb9c56b234add

Add setuptools as a runtime dependency This package relies on `pkg_resources` (provided by `setuptools`) at runtime: https://github.com/jiffyclub/palettable/blob/768d5ef8d14437d4bffa27afb96e4990c919a25d/palettable/colorbrewer/colorbrewer.py#L7 an alternative implementation would be to move to `importlib.resources` (and/or the `importlib-resources` backport)

view details

Matt Davis

commit sha 7df1908b4e946aa8805b4c9aa7a3bf7717887f7a

Merge pull request #40 from asottile/patch-1 Add setuptools as a runtime dependency

view details

push time in 3 months

PR merged jiffyclub/palettable

Add setuptools as a runtime dependency

This package relies on pkg_resources (provided by setuptools) at runtime: https://github.com/jiffyclub/palettable/blob/768d5ef8d14437d4bffa27afb96e4990c919a25d/palettable/colorbrewer/colorbrewer.py#L7

an alternative implementation would be to move to importlib.resources (and/or the importlib-resources backport)

+1 -0

1 comment

1 changed file

asottile

pr closed time in 3 months

pull request commentjiffyclub/palettable

Add setuptools as a runtime dependency

Super, thanks!

asottile

comment created time in 3 months

more