masterbranch is always production-ready, deployable, 100% green test suite- New development is done on feature branches, with frequent rebasing onto master
- Clean commit history by preferring to rebase instead of merge (
git pullis configured to automatically rebase)
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 boto3 | |
| import pandas as pd | |
| import numpy as np | |
| import io | |
| import random | |
| from dotenv import load_dotenv | |
| import os | |
| from enum import Enum | |
| load_dotenv() |
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
| def sum(a, b): | |
| return a + 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 sum(a, b) { | |
| return a + b; | |
| } | |
| function subtract(a, b) { | |
| return a - b; | |
| } | |
| function euclidianDistance(x1, y1, x2, y2) { | |
| return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 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
| import scala.collection.mutable | |
| import java.time.{LocalDate, YearMonth} | |
| import java.time.temporal.ChronoUnit | |
| 1 + 2 | |
| val l = List(1, 2, 3, 4, 5, 6, 7) | |
| val s = l.foldLeft(mutable.Set.empty[Int]){(acc, elem) => | |
| if (elem % 2 == 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
| def salesTax(orders: String, year: Int) = 6 | |
| //salesTax: (orders: String, year: Int)Int | |
| salesTax(_: String, 2016) | |
| //res30: String => Int = $$Lambda$1354/88151627@1106579f | |
| (salesTax(_: String, 2016)) | |
| //res31: String => Int = $$Lambda$1355/1054254583@15630595 | |
| salesTax(_: String, 2016)("str") |
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
| package br.com.verde.example | |
| import br.com.verde.utils.operators.PipeOperator | |
| object App { | |
| def times2(n: Int) = n * 2 | |
| def times3(n: Int): Int = n * 3 |
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 branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
| //edsonpatricio/SFPFFiddle.scala | |
| import org.scalajs.dom | |
| import scalatags.JsDom.tags2 | |
| import scalatags.JsDom.tags2.section | |
| import org.scalajs.dom.{Element, DOMParser} | |
| object ScalaJSExample extends js.JSApp{ |
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
| def main(args: Array[String]) { | |
| val greeting = "Hello" | |
| var people: String = args(0) | |
| println(greeting + " " + people) | |
| } |
NewerOlder
