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 java.io.InputStream | |
| import org.apache.commons.io.IOUtils | |
| // basically copied from https://gist.github.com/timoteoponce/1249184 | |
| object OracleToH2DMLMigration extends App { | |
| def migrate_script(input_file_name: String) = { | |
| val changed_lines = List() | |
| for (line <- input_file_name.split("\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
| import com.google.common.base.Charsets; | |
| import com.google.common.io.CharSource; | |
| import com.google.common.io.CharStreams; | |
| import com.google.common.io.InputSupplier; | |
| import com.google.common.io.Resources; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.InputStreamReader; |
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
| # Flask installer | |
| # If you want a quick setup for a flask app on CentOs 7, try this. | |
| # Requires 'requirements.txt' on your application folder. | |
| # WARNING: this script will open port 8081! | |
| # ideas: | |
| # - http://linuxcommand.org/lc3_new_script.php | |
| # - http://stackoverflow.com/questions/14008125/shell-script-common-template |
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
| /** | |
| * @author ksaric | |
| */ | |
| object Flatten { | |
| def flatten[A](list: List[A]): List[A] = list match { | |
| case Nil => Nil | |
| case (head: List[A]) :: tail => flatten(head) ::: flatten(tail) | |
| case head :: tail => head :: flatten(tail) |
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, re | |
| project_location = '~/projects/curry/cardano-sl/' | |
| def find_diff_issues(source_branch, target_branch): | |
| git_show_command = 'git show-branch --topics {source_branch} {target_branch}'.format(source_branch=source_branch, target_branch=target_branch) | |
| print(git_show_command) | |
| git_diff_output = os.popen("cd {project_location}; {git_show_command}".format(project_location=project_location, git_show_command=git_show_command)).read() | |
| #print(git_diff_output) |
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 | |
| def _unidiff_output(expected, actual): | |
| """ | |
| Helper function. Returns a string containing the unified diff of two multiline strings. | |
| """ | |
| import difflib | |
| expected=expected.splitlines(1) |
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
| {-# LANGUAGE Rank2Types #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
| {-# LANGUAGE TypeApplications #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module EffectExample where | |
| import Cardano.Prelude |
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
| {"name": "test", "description": "This is a test pool", "ticker": "testy", "homepage": "https://github.com/input-output-hk/cardano-db-sync/tree/master/cardano-db/src/Cardano/Db"} |