(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# So there's this column in a CSVS file that | |
# has values in this form: TX_PVLS (15-19/Female) | |
# Function below extracts | |
# the uppercase prefix, the age range, and sex | |
def clean_data(data_id): | |
"""Run data cleaning specific to the MSH source | |
""" | |
if 'months' in data_id: | |
data, rest = data_id.split(" (") | |
age, sex = rest.split("/") |
const X_IMAGE_URL = "res/x.png"; | |
const O_IMAGE_URL = "res/circle.png"; | |
const SYMBOLS = { | |
'x': X_IMAGE_URL, | |
'o': O_IMAGE_URL | |
}; | |
function playGame() { | |
const freeBoxes = []; | |
const takenBoxes = {}; |
<!-- Facebook Pixel Code --> | |
<script> | |
!function(f,b,e,v,n,t,s) | |
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)}; | |
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; | |
n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0]; | |
s.parentNode.insertBefore(t,s)}(window,document,'script', 'https://connect.facebook.net/en_US/fbevents.js'); | |
fbq('init', '1080904539096368'); | |
fbq('track', 'PageView'); |
<template> | |
<div class="dm"> | |
<DeadNav /> | |
<div class="tracking-tight pt-3 pb-4 sm:max-w-screen-sm sm:mx-auto"> | |
<h2 | |
class=" | |
px-4 | |
mt-20 | |
font-semibold | |
text-lg text-center |
<style lang="sass"> | |
// Basic VueAgile styles | |
.agile | |
margin-top: 20px | |
&__actions | |
margin-top: 20px | |
&__nav-button | |
background: transparent | |
border: none | |
color: #ccc |
from sys import argv | |
# import on one argument | |
script, input_file = argv | |
# First Function | |
def print_all (f): | |
print (f.read()) | |
# 2nd Function | |
def rewind(f): |
import sys | |
script, input_encoding, error = sys.argv | |
languages = open("languages.txt", encoding="utf-8") | |
def main (language_file, encoding, err): | |
line = language_file.readline() | |
# line -> 'Afrikaans' | |
# if `line` is not an empty string, then run lines 11... |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
while (True): | |
print ("dear Ganymede") | |
# what do you expect to happen here? |
first_number = int(input("Enter the first number: ")) | |
second_number = int(input("Enter the second number: ")) | |
def test_divisibility(first, second): | |
try: | |
if (first % second) == 0: | |
print("Yes") | |
return | |
print("No") |