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 re | |
| import os | |
| for m in re.finditer(r'export (.*)=([^ \n]+)', open('../env.sh').read()): | |
| os.environ[m[1]] = m[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 ruby:3.1 | |
| # throw errors if Gemfile has been modified since Gemfile.lock | |
| RUN bundle config --global frozen 1 | |
| WORKDIR /usr/src/app | |
| COPY Gemfile Gemfile.lock ./ | |
| RUN bundle install |
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 turicreate as tc | |
| import pandas as pd | |
| def print_human_confusion_matrix(actual, predicted): | |
| cf_matrix = tc.evaluation.confusion_matrix(actual, predicted) | |
| labels = list(set(cf_matrix['predicted_label'].append(cf_matrix['target_label']))) | |
| matrix = [] |
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
| ALPHABET = /^[A-Z]+$/ | |
| COMMANDS = ['encrypt', 'decrypt'] | |
| command = ARGV[0] | |
| key = ARGV[1].to_i | |
| text = ARGV[2] | |
| if COMMANDS.include? command | |
| if ALPHABET =~ text | |
| encrypted = text.chars.map do |character| |
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
| require 'openssl' | |
| ALGORITHM = 'AES-256-CBC' | |
| puts 'Enter key to decrypt with (in hexadecimal):' | |
| hex_key = gets.chomp | |
| puts 'Enter message to decrypt (in hexadecimal):' | |
| hex_message = gets.chomp |
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
| # | |
| # A quick and dirty fixture implementation for use with Hanami, RSpec and PostgreSQL. | |
| # Fixtures will be loaded when the suite starts and will be reset using transactions | |
| # to the same state after each test case. | |
| # | |
| # Supports associations like so (author has many books): | |
| # | |
| # # authors.yml | |
| # rowling: | |
| # name: J.K. Rowling |
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
| GIT | |
| remote: git://github.com/hanami/view.git | |
| revision: 1d2cc445ef96b5a58c61d8f7e6d5dfa44c917b5a | |
| branch: 1d2cc445ef96b5a58c61d8f7e6d5dfa44c917b5a | |
| specs: | |
| hanami-view (1.0.0) | |
| hanami-utils (~> 1.0) | |
| tilt (~> 2.0, >= 2.0.1) | |
| GEM |
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
| GEM | |
| remote: https://rubygems.org/ | |
| specs: | |
| addressable (2.5.1) | |
| public_suffix (~> 2.0, >= 2.0.2) | |
| capybara (2.14.4) | |
| addressable | |
| mime-types (>= 1.16) | |
| nokogiri (>= 1.3.3) | |
| rack (>= 1.0.0) |
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
| a = ['-', '/', '|', '\\'] | |
| loop do | |
| print "\r#{a.rotate!.first}" | |
| sleep 0.1 | |
| end |
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
| javascript: | |
| function isJiraPage() { | |
| return window.location.href.indexOf("jira") > -1; | |
| }; | |
| function isJiraSprintPage() { | |
| return window.location.href.indexOf("selectedIssue") > -1; | |
| }; | |
| function isBasecampPage() { |
NewerOlder