Author Archives: Joseph Dotson

Using External Modules in TypeScript

Joseph DotsonWhen programming in TypeScript, you may need to use existing JavaScript modules. This should be a lot easier than it is. You should be able to just use a require and pass a flag in to let the compiler know that it’s a js library in order to convert it to an Any, however that is not possible.

What actually needs to be done is the creation of a .d.ts file. This file (or files) declares the shape of the module. This includes any functions or interfaces that might be needed used when using the class.

Read more

IPython and Interactivity

across this post and it quite literally blew my 3I recently came mind.

By importing everything from `IPython.html.widgets` you get an interact method. Any method that accepts parameters can be made interactive with sliders for values.

When experimenting with data, being able to change the values without changing code and re-running is a huge boon. Especially when looking for outlier thresholds. Instead of changing and re-running the graph every time, just add a slider and adjust until you have the value you want.

As I do a decent amount of experimentation with data, this will save me a large amount of time trying to figure out outliers. Will I use is for every project, no, but I will use it for the majority of data science I need to do.

IPy_header

« Older Entries Recent Entries »