This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code for https://markhneedham.com/blog/2020/01/14/altair-range-values-dates-axis/ blog post | |
import altair as alt | |
import pandas as pd | |
import datetime | |
df = pd.DataFrame( [ | |
{"position": 40, "date": datetime.date(2019,9,5)}, | |
{"position": 31, "date": datetime.date(2019,9,12)}, | |
{"position": 19, "date": datetime.date(2019,9,19)}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
we create 2 separate arrays of letters and count | |
the number of characters resulting from the | |
original precedence array. | |
we look up the index of each letter from first letter | |
array and follow the index of the next letter. | |
*/ | |
function findWord(a){ | |
console.log(a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/usr/bin/env python3 | |
import cplex | |
# Create an instance of a linear problem to solve | |
problem = cplex.Cplex() | |
# We want to find a maximum of our objective function | |
problem.objective.set_sense(problem.objective.sense.maximize) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
sub arrcount { | |
my ($arr) = @_; | |
my $c = 0; | |
foreach my $str (@{$arr}) { | |
++$c; | |
} |