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 os | |
import constants | |
from langchain.vectorstores import FAISS | |
from langchain.embeddings.openai import OpenAIEmbeddings | |
from langchain.document_loaders import PyPDFLoader | |
from langchain.indexes import VectorstoreIndexCreator | |
os.environ['OPENAI_API_KEY'] = constants.APIKEY | |
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
In module 'UIKit' imported from /Users/gregorypacheco/Library/Developer/Xcode/DerivedData/Cataki-dxdbfptxbcfahtclbubecydrrlpk/Build/Intermediates.noindex/ArchiveIntermediates/Cataki/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/include/Cordova/CDVPlugin.h:21: | |
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:459 | |
:63: note: property 'statusBarHidden' is declared deprecated here | |
@property(readwrite, nonatomic,getter=isStatusBarHidden) BOOL statusBarHidden NS_DEPRECATED_IOS(2_0, 9_0, "Use -[UIViewController prefersStatusBarHidden]") __TVOS_PROHIBITED; | |
^ | |
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h:459:63: note: 'setStatusBarHidden:' has been explicitly marked deprecated here | |
/Users/gregorypach |
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
Roles | |
- Or you might want to allow a mobile app to use AWS resources, but not want to embed AWS keys within the | |
app (where they can be difficult to rotate and where users can potentially extract them). | |
Sometimes you want to give AWS access to users who already have identities defined outside of AWS, such as in your corporate | |
directory. Or, you might want to grant access to your account to third parties so that they can perform an audit on your resources. | |
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
Fixed Performance Instances (e.g. M3, C3, and R3) | |
Burstable Performance Instances | |
- T2 | |
- Accrue CPU Credits when they are idle | |
- It stores them in its CPU Credit balance for up to 24 hours. | |
- If and when your t2.small needs to burst to more than 20% of a core, it draws from its | |
CPU Credit balance to handle this surge seamlessly | |
Cluster |
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
- obj, created = AppSettings.objects.get_or_create(name='DEFAULT_LANG') | |
- Uso do dir(obj) | |
- Dont use exception as a flow control | |
- every exception should do log | |
- Database tips from brazilian guy article |
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
# Mysql DUMP | |
#!/bin/bash | |
user="user" | |
password="pass" | |
host="localhost:port" | |
db_name="db_name" | |
backup_path="/home/ubuntu/path/" | |
date=$(date +"%d-%b-%Y") | |
# Set default file permissions |
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
my_variable not myVariable or even MyVariable | |
MyClass |
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
# 1 - Promisses | |
p.then(onFulfilled[, onRejected]); | |
p.then(function(value) { | |
// fulfillment | |
}, function(reason) { | |
// rejection | |
}); | |
# 2 - Find an object in a array |
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
# 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
# 1 - Find file terminal | |
find ~/ -type f -name "generate_interval.py" | |
# 2 - Checking HD size | |
df -H | |
# 3 - Tailing a log in realtime | |
tailor -f file.log | |
# 4 - If else param script bash |
NewerOlder