We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
import { List, Map } from 'immutable'; | |
import { expect } from 'chai'; | |
import { setEntries, next, vote, restart } from '../src/core'; | |
describe('application logic', () => { | |
describe('setEntries', () => { | |
it('adds the entries to the state', () => { | |
const state = Map(); | |
const entries = List.of('Jon Snow', 'Ramsay Snow'); |
const ehMultiplo = ( multiplo ) => ( ano ) => ano % multiplo === 0 | |
const nao = ( entrada ) => !entrada | |
const ehMultiploDe400 = ehMultiplo( 400 ) | |
const ehMultiploDe4 = ehMultiplo( 4 ) | |
const ehMultiploDe100 = ehMultiplo( 100 ) | |
const ehBissexto = ( ano ) => (ehMultiploDe400( ano ) || (ehMultiploDe4( ano ) && nao(ehMultiploDe100( ano )))) | |
console.log(ehBissexto(2016)) | |
console.log(ehBissexto(1600)) |
const getDigit = ( cpf ) => cpf.slice( 9 ) | |
const mod11 = ( num ) => num % 11 | |
const generateArrayOfLength = ( length ) => Array.from( { length }, ( v, k ) => k ) | |
const invalidCpfs = generateArrayOfLength( 10 ).map( val => `${ val }`.repeat( 11 ) ) | |
const isEqual = ( val1 ) => ( val2 ) => val1 === val2 | |
const isIn = ( list ) => ( num ) => list.findIndex( isEqual( num ) ) >= 0 | |
const isInInvalidCpf = isIn( invalidCpfs ) | |
const NOT = ( val ) => !val | |
const getCpfAsArrayWithoutDigit = ( cpf ) => cpf.split( '' ).slice( 0, 9 ) | |
const calcSumDigit = ( multiplier, digit, sum ) => sum + ( digit * multiplier ) |
const getDataFromInscricao = ( inscricao ) => [ | |
inscricao.substr( inscricao.length - 2, 2 ), | |
inscricao.substr( inscricao.length - 4, 2 ), | |
inscricao.substr( 0, inscricao.length - 2 ) | |
] | |
const calcSum1 = ( titulo ) => | |
titulo.substr( 0, 8 ).split( '' ).reduce( ( total, val, i ) => total += val * ( 9 - i ), 0 ) | |
const fixDigit = ( exce ) => ( dig ) => |
We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Folder Structure</title> | |
<style> | |
.container { | |
display: block; |
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Foo struct { | |
FirstName string `tag_name:"tag 1"` | |
LastName string `tag_name:"tag 2"` |
Complete installation process: | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev | |
sudo apt-get update | |
sudo apt-get upgrade | |
cd ~ | |
mkdir git | |
cd ~/git |