instruction
stringlengths
71
71.9k
So far I was successful to get what I need using below mentioned script, but I'm sure my script is far from being perfect (if it is possible at all). So, I'd greatly appreciate your comments on how would it have been done differently in order to improve it. p6_ch1 <- read.xlsx("BEO_charts.xlsx", sheet = 7, startRow = 2...
I have a custom AuthenticationProvider for getting authentication via LDAP and authorization via JDBC. It's running but I think it's not the best way. My custom AuthenticationProvider: public class ADAuthenticationJDBCAuthorizationProvider implements AuthenticationProvider { private final ActiveDirectoryLdapAuthen...
I have the following function which opens a modal and puts some value into a div. It works but the function looks ugly, I hope for improvements (maybe more dynamic). submitDelete: function() { // projects $('button[name="removeProj"]').on('click', function(e){ var $form = $(this).closest('form'); ...
I'm attempting to find a fibonacci series where the last number is no greater than a given maximum. Given the start digits 1, 2 Here's my working code. var fib = [1,2]; var max = 4000000; var i = 2; var loop = true while (loop) { if (fib[i-1] + fib[i-2] > max) { loop = false; } else { fib.push(...
I need to write a code for conversion between the decimal numbers and binary numbers. I have tried the problem and what I have is 3 classes and 1 enum type import java.util.Iterator; import java.util.NoSuchElementException; /** * The {@code Immutable} class {@code BinaryNumber} wraps a string * representation of a b...
I have created a simple custom logger to print the error log and save it to a file with specific location. package logger import ( "log" "os" ) var trace *log.Logger var filePathVar string var fileNameVar string var prefixVar string // use this function first before calling others. func InitLogger(prefix, fi...
I am working on a project on how climate change may affect the development of spruce budworm larvae throughout each year (historical and projected) using different climate change models and emission scenarios. The code that I have works, but would take a ridiculous amount of time to run: 38 years when extrapolated out....
I have quite an interesting challenge for you today. The following code will produce a map with events as values and event uuids as keys. I've also listed out the spec for it. I would like to know your opinion on the code and the spec also. module CreateItinerary class BuildHiddenCityEventsMap < UseCaseBase DEPAR...
I've been trying to write nice snippet of code to simulate pi estimation by randomly throwing darts on a dartboard. While running the following code on high but reasonable numbers my mac doesn't plot. When looking at it I don't find the source of such a high complexity. I checked similar questions like this but haven...
Based on my prior question about HKDF here https://crypto.stackexchange.com/questions/43933/use-of-pbkdf2-when-no-access-to-hkdf and the responses I received I decided to go ahead an implement HKDF based on the rfc5869 spec https://www.rfc-editor.org/rfc/rfc5869 since HKDF wasn't available to me in the .net framework o...
The first edition of this code was written back when Python 2 had not yet been deprecated in favor of Python 3. The difference between strings and bytes were not very clear back then. Also, PEP8 violations abound in the original version. '''Module for Directory and File Serialization. This module provides two classes ...
I had two different functions for populating a data array. I tried to refactor them using a single argument as to whether or not the user should be selecting a worksheet or just the workbook. The primary issue being whether I need to prompt the user to select a range or not. The main difference between the two before w...
JavaScript implementation of a basic calculator. Looking for constructive criticism of my code. Thanks in advance! window.onload = function() { // number button variable declarations var zeroButton = document.getElementById("zero"); var oneButton = document.getElementById("one"); var twoButton = d...
Looking for constructive criticism on my code below for detecting a memory leak in a data structure. MemoryLeak = { uniq_id: (new Date()).getTime(), checked: 1, is_seen: [], checkLeaks: function(obj) { var self = MemoryLeak if(!obj || (typeof obj == 'function') || self.checked > 20000) retu...
Reversing an array in Python without using a built-in function: def reverse(alist): end = len(alist)-1 limit = int(end/2) + 1 for i in range(limit): alist[i],alist[end] = alist[end],alist[i] end = end - 1 return alist print reverse([1,2,3,4,5,6])
I'm writing a command-line utility and I need to find commands (and parameters) by name. The name can either be a full name like save or a shortcut s. I thought I use a dictionary with an ISet key and a custom comparer. At first I had a list and searched for the name with LINQ but I'd like to have something more conven...
I recently wrote a really long one-liner, it was really just for fun, but I would like to know if it's bad practice or not. Can you tell me? Here's my full class, but it's about the ToString() method. namespace HGroupBadge.Classes { public class BadgeDetail : BadgePart { public DetailType Type { get; se...
I'm new to programming, but want to build up a good habit of code review so that I can develop best practice. It's been couple of weeks I'm coding in C and my knowledge, so far, is data types, conditions, arrays, loop and, very minimal, pointers. I'm creating multiple search and sorting algorithms - not only to underst...
I am working on sending a reset token via email to a potential user in Node.js, Sequelize, and Express. The code works, but I still think it could be improved by handling the promises better. exports.sendResetToken = function(req,res) { const username = req.headers.username; User.findOne({ where: {username: use...
Previously: Comb Sort in VBA I've been running two different comb sorts (on arrays) depending on whether I want to sort numbers or strings and I figured I would give using Variant a try instead. source here. Additionally, I wanted to sort 1- or 2- dimensional arrays on a specific key column, but keeping rows together. ...
I want to update a single column in 4 tables. All relationships are has-many among them. Private schools has many private classes Private classes has many lesson plans Lesson plans has many quizzes Lesson plans has many documents The code I am working with is: @private_school.private_classes.each do |private_class| ...
Given any callable, deduces the first parameter in the parameter list of the function. Be ware, not for light hearted. template <typename ... Args> struct pick_first; template <typename T, typename ... Args> struct pick_first<T, Args ...> { using type = T; }; template <typename ... Args> using pick_first_t = type...
I have a carousel (Owl Carousel) with vertically centered controls. Because of the structure, I have to absolutely position the previous and next arrow. Because the page is responsive, their position is dynamic. The size of the controls may also change. I've written a function that runs on load and resize. It gets the...
I just downloaded Python for the first time today, and I had a lot of fun playing around with it for like five hours. I watched one YouTube video on how to make a text adventure, and then I decided to try my hand at it. It's my first day, so I'm sure there are a million things that I could do to make my coding more eff...
As an exercise to help me learn Haskell, I decided to write a small "program" to find the Pearson Correlation Coefficient for 2 lists of numbers. I'm pretty unhappy with how it turned out, because I feel like the typing is a mess, and it is difficult to read. I was hoping that someone with experience would help me to ...
I came up with a small optimization while practice coding insertion sort in Python. It's mostly about not accessing the input array too much and letting the hardware do element shifts instead of swapping manually. Could someone comment on my coding style as well as the optimization idea? Original Version # this version...
Problem statement: You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only move up, down, left and right. You are given a 2D grid of values 0, 1 or 2, where: Each 0 marks an empty land which you can pass by freely. Each 1 marks a building which you canno...
I've been writing C++03 non-professionally for a long time, and I finally started to play around with C++11 and C++14. I decided to try my hand at implementing a data structure that I was previously unfamiliar with: a max heap. #include <iostream> #include <vector> #include <string> #include <stdexcept> template<typen...
This program takes in a list of 275k or so words from '/usr/share/dict/words' and loads them into HashSet. It then takes in a list of 1000 words (taken from the dictionary and are scrambled (vowel replacements, additional characters added, etc) that are in some way misspelled. The program find the best guess and prints...
I am trying to build a clock. You can see the working code here. However, I feel like I can do much better in the JavaScript code. var getDate = function getDate() { var date = new Date(); var month = date.getMonth(); var day = date.getDate(); var hour = date.getHours(); var minutes = date.getMinute...
I have following JSONArray object from a jsonobject key "elements" [ { "id":"as-a-user,-i-should-be-able-to-navigate", "elements":[ { "id": "navigate-down", "type":"scenario" } , { "id": "navigate-up", "type":"scenario" } , { "id": ";e...
I want to download data for all of my repos from the Github API. Github paginates their responses and includes a header Link type:"next" when there's another page available. So I know I want to wait for all the pages to be received... but I don't know initially how many pages there are going to be, and I don't know if...
I have just written this code to scrape some data from a website. In its current state it works fine, however, going by my tests on the script, I discovered that with the amount of data I am processing, it will take a few days to finish the task, Is there a way to improve its performance? I will insert a sample of the ...
I have implemented two genetic operators, which is really just a fancy way of mangling lists. In particular OX-1 (illustration) and displacement mutation. I found it necessary to extract out the randomness from the algorithms in order to do unit testing with some known examples. Is that a decent way to go about it? An...
After looking at a few tutorials on making minecraft mods i got as far as making my own blocks and the ModBlocks class to me looks awful and unruly especially when more blocks are added: public class ModBlocks { public static BlockPlatinum blockPlatinum; public static BlockNickel blockNickel; public static void init(...
I've been learning programming using a book about Python for a few months. To explore object-oriented programming, I built a few things in tkinter. When I started this code, I wanted to be able to play on rectangular boards of any sizes, but it made checking for a winner more difficult, so it's just the regular 3x3 gam...
I have wrote a PHP template code to replace placeholders based on the value provided within the placeholder. For example the content may have placeholders like {ITEM-100} {ITEM-110} and I want to replace them with a text made by the details fetched from db with item_id=100 or item_id=110. The code below id working fi...
I applied to a startup recently, as a coding exercise they asked me to produce the output below with the given input, specifically making it easy to understand, extend, and without performing any unnecessary actions. I emailed this solution and got no response. The code works but I suspect there are problems with the d...
I'm using this piece of code to show and paginate only child categories but this is horribly slow (49 queries in 9,799 seconds.). Where did I make mistakes and how can I make this run faster? <?php $current_cat = get_query_var('cat'); $attributes = array('terms_per_page' => 20, 'taxonomy' => 'category'); // Sanitize ...
I'm trying to create a private graphics library. Even tho I'm doing so for fun, I'd like to have some feedback about my coding. For instance, what do you guys think of the following class (Rectangle)? It does have some dependencies on other classes that I'm not including here just to save space. If you guys think they'...
As a project to better develop my understanding of functional programming, I am writing a prime number generator in Scheme. I am using a simple brute-force algorithm to detect whether a number is prime and I know there are better algorithms. What I'm interested is whether my attempt at the brute-force algorithm can be ...
I have created this as an example. It uses SFML as its core dependency along with JSON for modern C++ to load the elements from a file. Basically what happens is when an object that contains an instance of sf::Drawable is created, its constructor will be responsible for adding it to the draw list. Its destructor is re...
I'm making my first simple project which I decided would be a calculator and I'm kind of stuck on implementing the operations. I have two classes one of which is the GUI part and the other one represents all the processes 'inside' of the calculator. I decided to use BigDecimals instead of doubles. The problem is I real...
Let's say that I have a bool[,] with random values FFFFFFFF FFFFFTTT TTTTTTTT FFFFFFFF What would be the smartest way to create a new bool[,] that build on top of the previous one. That means, that it can have random values where the previous one was true, but that it preserves the falses from the original? So this co...
I wrote a method that will start OpenVPN on a config file, and then wait to be connected. It relies on OpenVPN using Local Area Connection 2, which hurts code reusability, but I'm not sure how to do it any other way. private static async void StartOpenVPN(string configFile) { // Start OpenVPN on the config file... ...
I have to parse a response after making HTTP call on the server. If the response is not successful then try another server otherwise parse the successful response and populate two ConcurrentHashMap and break out of for loop. Also all the servers will give same exact response. Below is how my response will look like aft...
As part of a first year university course in computer architecture some time ago we were tasked with learning 8086 ASM. The final course work required creating a small animation of shapes moving around the screen changing colours and the like. As I would not expect anyone to review 720 lines of assembler I'm just goin...
I have just finished coding this class that will load all columns in a MySQL database in to a cached Dictionary<string, string> which will only be modified on class construction when its populated with the correct data. I wanted to ask the codereview community their opinions on it, if its a good idea, what are the down...
I recently got into OOP, because I'm working on a big project and want to make sure my code is easy to maintain & scalable. My question is - how could I go about properly structuring the following code? I have a feeling that there is a better way to do so. Perhaps you can give me some tips, as more experienced with OO...
Below I have coded a simple command system that passes a string to a method and checks if the first word split by (' ') is a key in the registered commands dictionary, if it is, it executes the class that is stored as the dictionary entry's value. few examles of what is typed for commands @mycommand hello :ohnicecomman...
I designed a java class to represent a live well (fishing). Looking for help with how I can make this more efficient, or if anyone sees where I can improve on the design, it would be appreciated. package com.livewell.model; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.ap...
Here is my Cython code used for adaptive binning. The calcAdaptiveBinnedRateMap function is called from another Python script. The script is compiled using Cython but the speed I am expecting is still not great. How can I improve the speed of execution? import numpy as np import scipy.ndimage.morphology as ndimmor #de...
Intro A couple of weeks ago I finished a Python implementation of a multithreaded port checker and I wasn't quite happy with the result I've got (speed). I needed it to be faster, so I've built another one using CPP (and a bit of C). Here is the Python code, if anyone wants to see it. At the moment, I didn't implemente...
I am avery beginner at SPring MVC, Mongodb and java. I am trying to make a sample application so that the user can serach, create, update and delete a customer: My CustomerDAO class: package com.example; import com.mongodb.BasicDBObject; import com.mongodb.DBCursor; import com.mongodb.MongoClient; import com.mongodb.cl...
Equilibrium index of an array is an index such that the sum of elements at lower indexes is equal to the sum of elements at higher indexes. P is an index of an array A. Input: A[0] = -1 A[1] = 3 A[2] = -4 A[3] = 5 A[4] = 1 A[5] = -6 A[6] = 2 A[7] = 1 Output: 1 3 7 1 is an equilibrium index of this array, because...
I want to read N numbers (Nmax = 100) from console into a list. N is not known, but the first input that is not a number may break the reading process... However the solution should be as simple as possible, so I just read 100 lines: let numbers = [1..100] |> List.map (fun x -> Int32.TryParse(Console.ReadLine()...
I am a Spanish programming teacher in a vocational training course and I want my students to make a CRUD exercise on arrays. I want them to start using OOP as well and as an example, I'm going to give them this example of OO Console Menu. We haven't seen Java 8 so far. Any comments or improvements would be very appreci...
I have a section of code that repeats many lines and I am looking to refactor this code possibly so that a function can be used instead of the same lines of code each time. Below is the section of code and the repeating code occurs in each if statement Traversal::Traversal(string source, bool isFileName) { using...
(Follow-up question: Improved Van Emde Boas tree based map in Java) For the experimental part of my MSc thesis I was working on van Emde Boas tree, and I have this: package fi.helsinki.coderodde.searchheapbenchmark.support; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import jav...
My idea is to have objects which contain random numbers. The random numbers are keeped in some data structure (within the objects). Furthermore the objects shall have methods for working with the random numbers. var oo = oo || {}; // 'oo' serves as a namespace. Have choosen these chars just because they are easy to ...
The really stupid way to evaluate bezier curves is with recursion, which is \$O(2^n)\$, which can be lowered to \$O(n^2)\$ with memoization. De Casteljau's algorithm improves on this, and is still \$O(n^2)\$ but faster. I misinterpreted De Casteljau's and thought it was the Bernstein form: $$\sum_{i=0}^{n-1}{\binom{n}{...
I'm going through CS50 and one of the problem sets was to implement a vigenere cipher. I have had some previous classroom experience with C before CS50, but still consider myself a beginner. The program takes in a command line argument as a key (and requires it to be composed of only alphabetical characters) and then ...
I am writing a simple application that prints out the details of a receipt containing items purchased by a customer. The receipt should list the number of items, the name, the final price (including taxes) of each of the item purchased, plus two extra lines showing the total amount of the receipt and the total amount o...
This is the hardest problem from the HackerRank contest University CodeSprint 2. Problem Statement Consider a hexagonal board with \$ n \times m \$ cells where each cell is black or white. The board's rows are numbered from bottom to top, and its columns are numbered from left to right (where columns at a \$ 60° \$ in...
I had an assignment recently to build a FixedArray using Ruby. It's supposed to simulate a FixedArray in C, that is, an array that allocates a certain amount of arbitrary memory when initialized, and that this amount of memory can neither increase nor decrease. It cannot dynamically resize itself like Ruby's default Ar...
This is it. My best game, a fully functional, 2 player game of battleship. My coordinate picker can be seen here. I didn't make all the changes they wanted. I would prefer some insight on whether I should make a board class The skilstak.colors library, is also called solarized and can be found here. c.cl=clear,c.g=gr...
I'm trying to write a function that given a TSV file will get the maximum line length found in a column. I currently have this (working) function. However, I feel that I am missing something as this solution feels poor compared to solutions I have seen to find the maximum length of a file: max(open(filename), key=len) ...
Suppose there are a set of given points (represented by x and y two dimensional coordinates), and for any given point A, I want to find the nearest distance point among the given set of point. My current solution is straightforward: just find min among all distances. The issue of my implementation is, if we want to c...
I had to make a program to crawl through a bunch of PyPI packages and see how many of them implement custom compare operators (i.e. grep for def __le__ etc). After downloading an HTML file with links to all Python 3.4 packages on PyPI (i.e. the directory page), I wrote this simple crawler to go through all the links, d...
I wanted to see how this code looks, what can be improved and how those improvements can be implemented. I'm still new to C++ so I hope it isn't too sloppy. #include <iostream> #include <string> #include <time.h> #include <stdio.h> #include <stdlib.h> int main() { int warrior, mage, rogue, priest; int...
I had to write a program that would complete an arithmetic progression based on the users input. The user would provide the third term in the series, the third from the last term, and the sum of all the terms in the series. The program would display the total number of terms are in the series and then the series itself...
Suppose I have a sorted array, and each element may appear multiple times. To make it simple, here is an example: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3] The expected output is the number of each element. In this example, the results are: number of 1 is 17 numbe...
How can I remove the duplicated params[:next_cards]? def index if params[:next_cards] # check nil render json: current_user.next_cards(params[:next_cards].to_i), status: :ok else render json: current_user.cards, status: :ok end end Inside the user.rb module, def next_cards(num_of_cards=nil) ...
I've made a simple Matrix class to learn C++. It doesn't use Templates so it only works with int. I made it this way to really understand how to work with objects and memory. I'll probably move to the next level once I get feedback on this one. I used these two blog posts as reference: C++ Matrix Class C++ Tensor Clas...
The goal of my code was to find all possible moves from each open position in the maze (@moves_hash), assign it a value for how many moves it would take to get to that position (@distance_hash), then going backwards from the end_position pick moves that have the lowest distance back to the start point. How can I make m...
Student list of 50 students and a teacher list of 3 teachers. Section XML as the output where each teacher is assigned to a section, and up to 20 students are assigned in that section. Need to loop on each teacher element, and for each teacher element, loop on the student name from 1-20, than for 2nd teacher, students...
I set the stats (.ie. name, attack, defense, HP) in the __init__ method. However, I have chosen to build the self.attacks dictionary with a separate method. class Pokemon(object): def __init__(self, name, attack, defense, HP): self.name = name self.attack = attack s...
My implementation of BST. Critique will be appreciated! #include <iostream> template <class T> class Node { template <class X> friend class BST; template <class X> friend void clear(Node<X> *root); template <class X> friend bool search(const Node<X> *root, const X x); template <class X> ...
What this code is basically supposed to do is find how many even divisors a number has. For example the number 100 has the divisors 1, 2, 4, 5, 10, 20, 25, 50, 100 of which 6 (2, 4, 10, 20, 50 and 100) are even. So we output 6. The first line of input is supposed to be the number of test cases (t). And for each of th...
I find IndexedDB cumbersome and want to wrap the functionality with rxjs observables. I've come up with an angular2 service that seems to fit the bill, but I'm wondering if I'm using the observables correctly or if there might be any subscriptions I'm missing (plnkr): Usage: this.localDbService.set('storeName', key, v...
My rational for this program, was to learn more of Python's standard library, I didn't actually know cmd was even in it until I started this program. It's also the first community challenge, and I have some catching up to do. This is an overly engineered version of the famous Rock Paper Scissors game. By default it's t...
I am wondering if I could implement this in a cleaner, more elegant, strictly functional way: const convert2dArrayToJsonList = (array) => { if (!is2dArrayParsableToJsonList(array)) { throw new Error("The 2D array cannot be converted to a json list" + array); } const propertyKeys = array[0]; r...
I have built a shell function aimed to perform the following: Given a string as first argument, perform safe expansions (i.e. those that cannot cause arbitrary code execution and only produce string output) Save the output to a variable the name of which is provided as second argument, and can be considered safe for t...
I have a general value called Seed which is required to multiple class. But those class aren't dependent of the class which declare it. class Game { class Settings { public static float Seed = 1337; } } And some class need a Seed value to work. I take the class Noise as example here. class Noise { p...
I'm trying to discover useful command line tools in Arch Linux, and it seems one good way of going about that is to look through all of the man pages related to programs (that is, section 1, as in man 1 bash) in local alphabetic order (that is, not overriding the sorting locale with LC_COLLATE=C or similar). This is th...
I'm trying to reduce the boilerplate code for the visitor/double dispatcher pattern. First I've created a way to enforce the dispatcher to declare the dispatch(T) function for every type supported and also a dispatch_gen(T) for the generic case which I don't need to implement. This is not too hard: /* A generic way to ...
I need a way to delay a function call by 30 seconds on a machine that runs on electric power, not battery (if it matters). I have heard from my colleague not to use sleep, but this post suggests it: sleep(30) // sleep for 30 sec Reasons invoked for not using sleep include: I will violate Single Responsibility Princ...
After tweaking semantics a lot, it ended up being a very poor object version of std::transform<>() that can be used with other std algorithms. Basically the iterator wraps a provided iterator, creating an output iterator and applies supplied functor when dereferenced and assigned to. The caveat is that users will need...
I am doing the #JavaScript30 challenge and challenge 06 is to write a "type ahead" application for searching for cities/states. The basic challenge of filtering based on a simple string was rather trivial, so I wanted to add AND and OR functionality using + and ,. I came up with a recursive solution, but when handling ...
I'm working on a game of War for a potential employer and I was hoping someone could review my code and provide feedback on my code. HTML/CSS <!doctype html> <html lang="en"> <head> <title></title> <style> .card{ position: relative; float: left; ...
Just the beginning of graphs API in Python: # Simple graph API in Python, implementation uses adjacent lists. # Classes: Graph, Depth_first_search, Depth_first_paths # Usage: # Creating new graph: gr1 = Graph(v) - creates new graph with no edges and v vertices; # Search object: gr2 = Depth_first_search(graph, vertex) ...
I've been interested in writing something meaningful in C++ for a long time, yet I had a hard time not picking Java or C# for a new project... Now I've found something for which C++ seems to be the right tool: Writing a Database Management System. I'm going to show you the code for the first step: Storing databases. Th...
I'm making a wrapper for querying the database so that I can more easily control the flow of database management and to make it easier for me to write data beans around my database. This code is going to be used a ton so I'm looking to make it as clean as possible. /** * Query the database. * * @param sql * ...
Here is my code in Python 2.7 for a Sudoku resolver. Any advice on performance improvement, code bugs or general code style advice is appreciated. My major idea is: Using method generate some random data, then using check_invalid to see if it is a valid Sudoku If from 1, it is a valid Sudoku, then I will call resolve_...
I'm developing a command line application in Python which processes information that users provide. I've been reading the Python documentation on this topic and found that the built-in module subprocess provides the call method, which executes a string as if it was run on a command line. The disadvantage of this approa...
This is a continued discussion from here, and I use new a approach (bounding box/or envelop algorithm) to improve the algorithm efficiency. Any code bugs, algorithm time complexity improvement or general code advice is highly appreciated. Major structure of my code: assign_box is used to build the bounding box or enve...
I am writing this small tester program to be used as part of a larger project, and I am quite unsure about the strtok function, which I (think) I need to use to split some character arrays up on a certain character (in my case this is a colon). For each character array (which is passed in as an argument), it should spl...
Given the following sets of strings: are yo you u how nhoware alan arala dear de I need to find a sequence that can be constructed by concatenating the strings in either columnm, and it must use the same number of elements in both cases. For example, "dearalanhowareyou" can be constructed from both sets of strings, us...
I wrote HListSum, whose type parameter is an input HList. Its Out type member represents the sum of that HList. trait HListSum[L <: HList] { type Out <: Nat } object HListSum { type Aux[L <: HList, O <: Nat] = HListSum[L] { type Out = O } def apply[L <: HList](implicit ev: HListSum[L]): Aux[L, ev.Out] = ev i...
I've create a simple interface for viewing a time-series as it changes over time in matplotlib. You can pause, reset or click/drag on the time-line to change the view. Have I used the matplotlib API as effectively as possible? import numpy as np from collections import deque import matplotlib.pyplot as plt import matp...