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
#cloud-config | |
# Enable automatic package updates and upgrades during cloud-init execution | |
package_update: true | |
package_upgrade: true | |
packages: | |
# Security and Hardening | |
- ufw | |
- fail2ban |
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
Jeff has two brothers and each of his brothers has three sisters and each of | |
the sisters has four step brothers. How many step brothers does each brother | |
have? | |
<think> Okay, so I've got this problem: Jeff has two brothers, and each of his | |
brothers has three sisters. Then it says that each of the sisters has four step | |
brothers. The question is asking how many step brothers each brother has. | |
Hmm, let me start by breaking down the information piece by piece. First, Jeff |
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
Question: Jeff has two brothers and each of his brothers has three sisters | |
and each of the sisters has four step brothers. How many step brothers does | |
each brother have? | |
Model's Response: | |
<think> okay, let's try to figure out this problem step by step. so jeff has | |
two brothers. that means there are three boys in total: jeff and his two |
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
class example: | |
def __init__(self): | |
self.name = 'dummy example' | |
def bigNumber(self, number): | |
return number * 1000000000 | |
e = example() | |
e.name # 'dummy example' | |
e.bigNumber(5) # 5000000000 | |
print('{:_}'.format(e.bigNumber(5))) # 5_000_000_000 |
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
l # (1, 2, 3, 4) | |
k = (1, 2, 4, 3) | |
l == k # False | |
l.__eq__(k) # False |
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
class BetterAddition: | |
def __init__(self, arg): | |
assert arg | |
match arg: | |
case str(): self.strVal = arg | |
case int(): self.intVal = arg | |
case _: print('int or str only') | |
def __add__(self, other): | |
assert other |
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
# --------------------------------- For Gist --------------------------------- # | |
alias ,gpy="gist --type 'py' --copy --skip-empty --paste" | |
alias ,gtxt="gist --type 'txt' --copy --skip-empty --paste" |
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
l = (1, 2, 3, 4,) |
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
l.count(3) # 1 |
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 inspect import getmembers | |
getmembers(l) |
NewerOlder