require 'erb'
class Template
def render(template_name="base")
ERB.new(File.read("#{template_name}.erb")).result(binding)
end
end
result = Template.new.render do
This file contains 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
alembic==1.8.1; python_version >= "3.7" | |
autoflake==1.4 | |
black==22.6.0; python_full_version >= "3.6.2" | |
click-completion==0.5.2; python_full_version >= "3.7.8" and python_full_version < "4.0.0" | |
click-default-group==1.2.2; python_full_version >= "3.7.8" and python_full_version < "4.0.0" | |
click==8.1.3; python_full_version >= "3.7.8" and python_full_version < "4.0.0" and python_version >= "3.7" | |
colorama==0.4.5; platform_system == "Windows" and python_version >= "3.7" and python_full_version >= "3.7.8" and python_full_version < "4.0.0" | |
commonmark==0.9.1; python_full_version >= "3.7.8" and python_full_version < "4.0.0" | |
cssselect==1.1.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" | |
cucumber-tag-expressions==4.1.0; python_full_version >= "3.7.8" and python_full_version < "4.0.0" and python_version >= "2.7" |
This file contains 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
# https://edabit.com/challenge/G9QRtAGXb9Cu368Pw | |
from unittest import TestCase | |
from combination import combinations | |
class CombinationTest(TestCase): | |
def test_combination(self): | |
self.assertEqual(combinations(2), 2) | |
self.assertEqual(combinations(2, 3), 6) |
This file contains 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
num = (input("\nEntre com um numero entre 1 e 27 : ")) | |
result = [ord(c) for c in num] | |
print(result) | |
# com while | |
result = [] | |
while True: | |
c = (input("\nEntre com um numero entre 1 e 27 : ")) |
This file contains 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
avatar: "https://content.arduino.cc/avatars/3/2n3904.jpeg" | |
author: "Marcus Pereira" | |
title: "Criando Componentes Com ReactJS" | |
description: "Aprenda a criar componentes com reactjs" | |
source_code: "https://github.com/marcuxyz/reactjs-components" | |
playlist: | |
- v01: | |
name: "01 - introdução" | |
url: "https://storage.negros.dev/media/course/criando-components-com-reactjs/aula01" |
This file contains 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
timestamp = `date +%s` | |
test: | |
@pytest --cov=./scanapi --cov-report=xml | |
check: | |
@black -l 80 --check . --exclude=.venv | |
change-version: |
This file contains 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
@pytest.fixture | |
def create_database(app): | |
with app.app_context(): | |
db.create_all() | |
yield db | |
db.session.remove() | |
db.drop_all() |
This file contains 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 tudo_maiuscula(f): | |
def maiuscula(): | |
return f().upper() | |
return maiuscula | |
@tudo_maiuscula | |
def olamundo(): | |
return |
This file contains 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
const webpack = require('webpack') | |
const ExtractTextPlugin = require('extract-text-webpack-plugin') | |
module.exports = { | |
entry: './src/index.jsx', | |
output: { | |
path: __dirname + '/public', | |
filename: './app.js' | |
}, | |
devServer: { |