Deriving a new Array from an existing Array:
['■','●','▲'].slice(1, 3) ⟼ ['●','▲']
['■','●','■'].filter(x => x==='■') ⟼ ['■','■']
['▲','●'].map(x => x+x) ⟼ ['▲▲','●●']
['▲','●'].flatMap(x => [x,x]) ⟼ ['▲','▲','●','●']
Here is how to add Cypress E2E tests to a Create React App bootstrapped application. Assumes the *nix command line, you may need to adapt this for a Windows command line (or use WSL or Git Bash).
Install Cypress and the Testing Library utilities for it (to match the helpers CRA installs):
$ npm i {,@testing-library/}cypress
i
is short for install, and the braces {}
are expanded by brace expansion to cypress @testing-library/cypress
.
name: hello-world | |
on: push | |
jobs: | |
my-job: | |
runs-on: ubuntu-latest | |
steps: | |
- name: my-step | |
run: echo "Hello World!" |
rom tensorflow.keras.preprocessing.sequence import pad_sequences | |
sentences = ['I love my dog', | |
'I love my cat', | |
'you love my dog!', | |
'Do you think my dog is amazing?', | |
] | |
tokenizer = Tokenizer(num_words = 100,oov_token="<OOV>") | |
tokenizer.fit_on_texts(sentences) |
repo -> repository
clone
-> bring a repo down from the internet (remote repository like Github) to your local machine
add
-> track your files and changes with Git
commit
-> save your changes into Git
push
-> push your changes to your remote repo on Github (or another website)
pull
-> pull changes down from the remote repo to your local machine
status
-> check to see which files are being tracked or need to be commited
init
-> use this command inside of your project to turn it into a Git repository and start using Git with that codebase
Name | Latitude | Longitude | Cluster | Day |
---|---|---|---|---|
Athens International Airport | 37.9356467 | 23.9484156 | 2 | 1 |
Acropolis of Athens | 37.9715323 | 23.7257492 | 2 | 1 |
Pl. Agias Irinis 2 | 37.977418 | 23.7280221 | 2 | 1 |
Diporto - Secret underground restaurant | 37.9806622 | 23.7257688 | 2 | 1 |
Temple of Zeus | 37.9692838 | 23.7331012 | 2 | 1 |
Plaka | 37.9725529 | 23.7303363999999 | 2 | 1 |
Temple of Olympian Zeus | 37.9693 | 23.7331 | 2 | 1 |
Lake Vouliagmeni | 37.8078002 | 23.7855018 | 2 | 1 |
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
/* Highliting accessibility errors in HTML */ | |
/* highlight HTML element with invalid value for lang attribute */ | |
html:not([lang]), | |
html[lang=""] { | |
border: 2px dotted red !important; | |
} | |
/* highlight images missing alt text */ | |
img:not([alt]) { |
https://stackoverflow.com/questions/30443333/error-with-renamed-repo-in-github-remote-this-repository-moved-please-use-th | |
" | |
git remote set-url origin [updated link url https://........git] | |
" |
const Web3 = require('web3'); | |
class TransactionChecker { | |
web3; | |
web3ws; | |
account; | |
subscription; | |
constructor(projectId, account) { | |
this.web3ws = new Web3(new Web3.providers.WebsocketProvider('wss://rinkeby.infura.io/ws/v3/' + projectId)); |