This file contains hidden or 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
| ARG DBT_VERSION=1.0.0 | |
| FROM fishtownanalytics/dbt:${DBT_VERSION} | |
| ENV DBT_PROJECT_DIR=/usr/app/dbt && \ | |
| DBT_PROFILE_DIR=$DBT_PROJECT_DIR/profile | |
| COPY . $DBT_PROJECT_DIR | |
| RUN dbt deps |
This file contains hidden or 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
| FROM python:3.9-slim | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends git | |
| ENV DBT_PROJECT_DIR=/usr/app/dbt && \ | |
| DBT_PROFILES_DIR=$DBT_PROJECT_DIR/profile | |
| COPY . $DBT_PROJECT_DIR |
This file contains hidden or 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
| #!/bin/sh | |
| cat > /usr/share/applications/intellij.desktop << EOF | |
| [Desktop Entry] | |
| Version=13.0 | |
| Type=Application | |
| Terminal=false | |
| Icon[en_US]=/opt/idea-IU-203.6682.168/bin/idea.png | |
| Name[en_US]=IntelliJ Ultimate | |
| Exec=/opt/idea-IU-203.6682.168/bin/idea.sh |
This file contains hidden or 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
| function prime_factorization(n::Int, primes::Array{Int}, factors=Dict{Int, Int}()) | |
| """ | |
| n : number to factor | |
| primes : a list of primes, ideally containing each prime up to n | |
| factors : empty at initialization | |
| return : dictionary of prime factors -> power (5 -> 2 = 5^2) | |
| """ | |
| if n == 1 | |
| return factors |
This file contains hidden or 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
| function sieve_of_eratosthenes(n::Int) | |
| """ | |
| n: upper bound on range to be checked for primes | |
| return: list of all primes smaller or equal to n | |
| """ | |
| primes = [true for i in 1:n] | |
| for i in 2:n | |
This file contains hidden or 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
| function quicksort!(x::Array, a::Int, b::Int) | |
| """ | |
| x : array to be sorted | |
| a : lower index of subarray (init as 1) | |
| b : upper index of subarray (init as length(x)) | |
| """ | |
| i, j = 1, length(x); | |
| while i < b |
This file contains hidden or 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
| function mergesort(x::Array) | |
| """ | |
| x: 1-dimensional array to be sorted in ascending order | |
| """ | |
| n = length(x) | |
| sorted_arr = [] | |
| if n > 1 | |
| k = floor(Int, n / 2) |
This file contains hidden or 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
| from gurobipy import GRB, Model | |
| from pandas import read_csv | |
| model = Model('Sudoku') | |
| model.setParam('OutputFlag', False) # suppress generic printouts | |
| model.setObjective(0, GRB.MAXIMIZE) # arbitrary but required by solver | |
| # problem data | |
| n_rows = 6 |
This file contains hidden or 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
| from __future__ import absolute_import | |
| from __future__ import print_function | |
| from __future__ import division | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import imageio | |
This file contains hidden or 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
| import os | |
| from scipy import ndimage, misc | |
| import numpy as np | |
| # set images location # | |
| folder = 'images_folder/' | |
| # load images # |
NewerOlder