This file contains hidden or 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
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: orange; icon-glyph: sun; | |
| // Make a scriptable that will show the current weather and the location of the user | |
| // Get the location of the user | |
| let location = await Location.current(); | |
| console.log(location); | |
| // Get the weather of the user |
This file contains hidden or 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
| # docker run -p 6379:6379 -it redis/redis-stack:latest | |
| import concurrent.futures | |
| from functools import lru_cache | |
| import requests | |
| from bs4 import BeautifulSoup | |
| from pymemcache.client import base | |
| from redis import Redis |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
| from bs4 import BeautifulSoup | |
| import re | |
| while True: | |
| user_url = input("Enter the URL: ") | |
| pattern = re.compile(r"https://www.codewars.com/kata/([^/?#]+)") | |
| if match := pattern.search(user_url): | |
| kata_id = match[1] |
This file contains hidden or 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 __future__ import print_function | |
| import os | |
| import shutil | |
| import sys | |
| import time | |
| from concurrent.futures import ThreadPoolExecutor | |
| import six | |
| alternative = [ | |
| (1024 ** 5, " PB"), |
This file contains hidden or 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
| Clear-Host && Get-ChildItem | Out-Null | |
| [int]$Year = Read-Host "Enter a year" | |
| Clear-Host && Get-ChildItem | Out-Null | |
| $COL_WIDTH = 21 | |
| $COLS = 3 | |
| $MONTH_COUNT = 12 | |
| $MONTH_LINES = 9 | |
| Function CenterStr([string]$s, [int]$lineSize) { |
This file contains hidden or 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 time | |
| from functools import wraps | |
| class timeit: | |
| def __init__(self, func=None, verbose=False): | |
| self.verbose = verbose | |
| self.func = func | |
| wraps(func)(self) |
This file contains hidden or 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 java.util.*; | |
| interface MyInterface { | |
| void doSomething(); | |
| } | |
| enum MyEnum { | |
| FIRST, | |
| SECOND, | |
| THIRD |