const numbers = [1, 2, 3, 4];
const doubled = numbers.map(number => number * 2)
console.log("The doubled numbers are: ", doubled); // [2, 4, 6, 8]
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
#!/usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
# pip3 install pyquery requests reportlab | |
import json | |
import pyquery | |
import re | |
import requests | |
import reportlab.lib.utils |
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 pygame | |
from pygame.locals import QUIT, KEYDOWN, K_ESCAPE, K_RETURN, \ | |
K_TAB, K_BACKSPACE, K_UP, K_LEFT, K_DOWN, K_RIGHT, K_EQUALS, K_MINUS | |
from math import sqrt, cos, sin, pi | |
from random import randint as random | |
from random import shuffle | |
from os import listdir | |
from os.path import join, isdir, isfile, expanduser | |
from mimetypes import guess_type |
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
#!/usr/bin/env bash | |
function exists { hash $1 2>/dev/null; } | |
function !exists { hash $1 >/dev/null 2>&1; } | |
function elevate{ | |
if [ $EUID != 0 ]; then | |
sudo "$0" "$@" | |
exit $? | |
fi |
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
" | |
" ███████████████████████████ | |
" ███████▀▀▀░░░░░░░▀▀▀███████ | |
" ████▀░░░░░░░░░░░░░░░░░▀████ | |
" ███│░░░░░░░░░░░░░░░░░░░│███ | |
" ██▌│░░░░░░░░░░░░░░░░░░░│▐██ | |
" ██░└┐░░░░░░░░░░░░░░░░░┌┘░██ | |
" ██░░└┐░░░░░░░░░░░░░░░┌┘░░██ | |
" ██░░┌┘▄▄▄▄▄░░░░░▄▄▄▄▄└┐░░██ | |
" ██▌░│██████▌░░░▐██████│░▐██ |
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 sleekxmpp | |
import logging | |
from chatterbotapi import ChatterBotFactory, ChatterBotType | |
factory = ChatterBotFactory() | |
bot1 = factory.create(ChatterBotType.CLEVERBOT) | |
bot1session = bot1.create_session() | |
logging.basicConfig(level=logging.DEBUG) |
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
{ | |
"always_show_minimap_viewport": true, | |
"caret_extra_bottom": 1, | |
"caret_extra_top": 1, | |
"caret_extra_width": 1, | |
"caret_style": "blink", | |
"color_scheme": "Packages/Colorcoder/Boxy Tomorrow (Colorcoded).tmTheme", | |
"detect_indentation": false, | |
"fade_fold_buttons": false, | |
"font_size": 9, |
for x in ("FizzBuzz" if num % 15 == 0 else "Fizz" if num % 3 == 0 else "Buzz" if num % 5 == 0 else num for num in range(1,101)): print(x)
for x in ["fizzbuzz" if not x % 15 else "buzz" if not x % 5 else "fizz" if not x % 3 else str(x) for x in range(100)]: print(x)
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
{ | |
"always_show_minimap_viewport": true, | |
"caret_extra_bottom": 1, | |
"caret_extra_top": 1, | |
"caret_extra_width": 1, | |
"caret_style": "blink", | |
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme", | |
"detect_indentation": false, | |
"fade_fold_buttons": false, | |
"font_size": 11, |
OlderNewer