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
import math | |
TARGET_TOTAL_MEMBER = 10000 # milestone | |
currentTotalMember, growth = [int(x) for x in input().split()] | |
# saya punya 10 kelereng | |
# saya ingin bagi adil 5 kelereng | |
# ke berapa banyak orang saya bisa bagikan 10 kelereng saya tsb? | |
# jawabannya 2 |
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
import React from 'react'; | |
import Icon from 'react-fontawesome'; | |
import styled from 'styled-components' | |
const Container = styled.div` | |
display: flex; | |
padding: 10px 20px 6px 20px; | |
border-bottom: 1px solid ${props => props.theme.border.primary}; <--- akses dengan props.theme | |
font-size: 20px; | |
` |
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
// ... many import here | |
import { Theme } from "./theme"; | |
const App = () => ( | |
<Theme choice="dark"> | |
<AnyRoute path="/" exact layout={Default} component={HomePage} /> | |
<AnyRoute path="/tweet" exact layout={Default} component={TweetPage} /> | |
</Theme> | |
); |
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
import React from 'react'; | |
import { ThemeProvider } from 'styled-components'; | |
export const themes = { | |
light: { | |
// TODO | |
}, | |
dark: { | |
foreground: { | |
primary: '#adb5bd', |
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
// These are equivalent: | |
myFunc`some string here` | |
myFunc(['some string here']) | |
// ---------------------------------- | |
const aVar = 'good' | |
// These are equivalent: | |
myFunc`this is a ${aVar} day` | |
myFunc(['this is a ', ' day'], aVar) |
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
# you should install numpy package with `pip install numpy` command | |
import numpy as np | |
def OUTPUT(arr, transpose=False, decimals=8): | |
# 2D array is not need [1] so we should check the dimension | |
if np.asarray(arr).ndim == 1: | |
# 1D array can't get transpose if we not add '[]' at before and after array's variable. Reference: [1] | |
arr = np.asarray([arr]) | |
else: | |
# 2D array is fine, not like [1] |
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
println('AWAL'); | |
function tampilkan(nomor, nama_calon, b_bawaan, pekerjaan) | |
{ | |
println(nomor + '.'); | |
println('Pak saya ingin melamar anak bapak: ' + nama_calon); | |
println('Saya sudah bawa ' + b_bawaan + ' buat bapak.'); | |
println('Saya sudah punya pekerjaan pak, ' + pekerjaan); | |
} |
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
println('AWAL'); | |
function tampilkan(nomor, nama_calon, b_bawaan, pekerjaan) | |
{ | |
println(nomor + '.'); | |
println('Pak saya ingin melamar anak bapak: ' + nama_calon); | |
println('Saya sudah bawa ' + b_bawaan + ' buat bapak.'); | |
println('Saya sudah punya pekerjaan pak, ' + pekerjaan); | |
} |
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
println('AWAL'); | |
// membuat prosedur | |
function quotePakIpunk() | |
{ | |
println('Abangnya juga ketawa-tawa saja kenapa saya mau makan di situ.'); | |
println('Saya juga ketawa saja kenapa abang abang itu tetap buka saat banjir'); | |
println('#===============@ PAK IPUNK @===============#'); | |
} |
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
println('AWAL'); | |
println('Abangnya juga ketawa-tawa saja kenapa saya mau makan di situ.'); | |
println('Saya juga ketawa saja kenapa abang abang itu tetap buka saat banjir'); | |
println('#===============@ PAK IPUNK @===============#'); | |
println('Abangnya juga ketawa-tawa saja kenapa saya mau makan di situ.'); | |
println('Saya juga ketawa saja kenapa abang abang itu tetap buka saat banjir'); | |
println('#===============@ PAK IPUNK @===============#'); |
NewerOlder