git clone --bare <repo_url> <local_repo_name>
git config remote.origin.fetch 'refs/heads/*:refs/heads/*'
git fetch
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
# run `docker-compose up -d` to start | |
# verify with `docker ps` or `lsof -i :5432` | |
services: | |
db: | |
environment: | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=postgres | |
- POSTGRES_DB=postgres | |
image: postgres:latest | |
ports: |
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
# python 3.10.3 | |
from xlsxwriter import Workbook | |
def create_xlsx_file(file_path: str, headers: dict, items: list): | |
with Workbook(file_path) as workbook: | |
worksheet = workbook.add_worksheet() | |
worksheet.write_row(row=0, col=0, data=headers.values()) | |
header_keys = list(headers.keys()) | |
for index, item in enumerate(items): | |
row = map(lambda field_id: item.get(field_id, ''), header_keys) |
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
require 'ruby/openai' | |
CLIENT = OpenAI::Client.new | |
def content_filter(prompt) | |
toxic_threshold = -0.355 # make sure required threshold hasn't changed https://beta.openai.com/docs/engines/content-filter | |
wrapped_prompt = "<|endoftext>#{prompt}\n--\nLabel:" | |
response = CLIENT.completions(engine: 'content-filter-alpha', | |
parameters: { prompt: wrapped_prompt, | |
temperature: 0, max_tokens: 1, top_p: 0, logprobs: 10 }).parsed_response |
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 { Configuration, OpenAIApi } from "openai"; | |
const configuration = new Configuration({ | |
apiKey: process.env.OPENAI_API_KEY, | |
}); | |
const openai = new OpenAIApi(configuration); | |
async function contentFilter(prompt) { | |
const toxic_threshold = -0.355; // make sure required threshold hasn't changed https://beta.openai.com/docs/engines/content-filter |
Generating a new SSH key and adding it to the ssh-agent: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
Adding a new SSH key to your GitHub account: https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/
Authorizing an SSH key for use with a SAML single sign-on organization: https://help.github.com/articles/authorizing-an-ssh-key-for-use-with-a-saml-single-sign-on-organization/
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.symbolSearchService.getSymbolData('xl') | |
.switchMap(stock => { | |
this.stock = stock; | |
return Observable.combineLatest( | |
this.symbolSearchService.getResearchReportData(stock), | |
this.symbolSearchService.getPGRDataAndContextSummary(stock) | |
)}) | |
.subscribe( | |
[report, summary] => { | |
this.researchReport = report; |