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
from datetime import date | |
from google.oauth2 import service_account | |
from googleapiclient.discovery import build | |
import pandas as pd | |
import numpy as np | |
credentials = service_account.Credentials.from_service_account_file( | |
"./credentials.json" | |
) |
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 requests | |
import math | |
import json | |
import pandas as pd | |
# IronMan WC 2019 id | |
eventId = 'AFAAC1DC-73BA-E811-A967-000D3A37468C' | |
limitPerPage = 100 | |
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 { cloneElement, Component } from 'react'; | |
import PropTypes from 'prop-types'; | |
class Draggable extends Component { | |
state = { | |
dragging: false, | |
pos: this.props.pos, | |
rel: null, | |
} |
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 { renderToString } from 'react-dom/server'; | |
import { axe, toHaveNoViolations } from 'jest-axe'; | |
import Component from '/path'; | |
expect.extend(toHaveNoViolations); | |
it('should have no a11y violations', async () => { | |
const wrapper = renderToString(<Component />); | |
const results = await axe(wrapper); |
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
<!-- Inaccessible form --> | |
<form> | |
<label>email: </label> | |
<input type="email"> | |
</form> | |
<!-- Accessible form --> | |
<form> | |
<label for="email">email: </label> | |
<input type="email" name="email" id="email"> |
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
function factorial(n) { | |
if (!n) return 1; | |
return n * factorial(n-1); | |
} | |
function factorialTCO(n, partialFactorial = 1) { | |
if (!n) | |
return partialFactorial; | |
return factorialTCO(n - 1, n * partialFactorial); | |
} |
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
// Taken from Douglas Crockford's JavaScript: The Good Parts | |
function walkDOM(node, func) { | |
func(node); | |
node = node.firstChild; | |
while(node) { | |
walkDOM(node, func); | |
node = node.nextSibling; | |
} | |
} |
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
function recursiveFibonacci(n) { | |
if (n <= 1) { | |
return n; | |
} | |
else { | |
return recursiveFibonacci(n-1) + recursiveFibonacci(n-2); | |
} | |
} | |
function iterativeFibonacci(n) { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML & CSS Codelab para Mulheres</title> | |
</head> | |
<body> | |
<h1>Este é um cabeçalho 1</h1> | |
<h2>Este é um cabeçalho 2</h2> | |
<h3>Este é um cabeçalho 3</h3> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML & CSS Codelab para Mulheres</title> | |
</head> | |
<body> | |
<p> | |
There was a war. A Time War. The Last Great Time War. My people fought a race called the Daleks, for the sake of all | |
creation. And they lost. We lost. Everyone lost. They're all gone now. My family. My friends. Even that sky. |
NewerOlder