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
{ | |
"tools": [ | |
{ | |
"type": "function", | |
"function": { | |
"name": "codebase_search", | |
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.", | |
"parameters": { | |
"type": "object", | |
"properties": { |
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
// SPDX-License-Identifier: MIT | |
// Smart contract that lets anyone deposit ETH into the contract | |
// Only the owner of the contract can withdraw the ETH | |
pragma solidity >=0.6.6 <0.9.0; | |
// Get the latest ETH/USD price from chainlink price feed | |
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; | |
import "@chainlink/contracts/src/v0.6/vendor/SafeMathChainlink.sol"; |
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
class BootCampTask(QCAlgorithm): | |
# Order ticket for our stop order, Datetime when stop order was last hit | |
stopMarketTicket = None | |
stopMarketOrderFillTime = datetime.min | |
highestSPYPrice = -1 | |
def Initialize(self): | |
self.SetStartDate(2018, 12, 1) | |
self.SetEndDate(2018, 12, 10) |
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
{"SOCIAL_HANDLE":"robertseaman","FIRST_NAME":"Robert","DATE_OF_BIRTH":"4/8/1980","ADDR_STATE":"LA","ADDR_POSTAL_CODE":"71232","SSN_NUMBER":"053-39-12313","ENTITY_TYPE":"TEST","GENDER":"M","srccode":"MDMPER","CC_ACCOUNT_NUMBER":"55342022087733443","RECORD_ID":"123123125","DSRC_ACTION":"A","ADDR_CITY":"Delhi","DRIVERS_LICENSE_STATE":"DE","PHONE_NUMBER":"225-671-0796","NAME_LAST":"SEAMAN","entityid":"284430033443","ADDR_LINE1":"772 Armstrong RD"} |
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
sudo apt-get install wget ca-certificates | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' | |
sudo apt-get update | |
sudp apt-get install postgresql-client-11 |
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
MIDDLEWARE_CLASSES = MIDDLEWARE_CLASSES + ( | |
'yourapp.middleware.ProfileMiddleware', | |
'yourapp.middleware.CProfileMiddleware' | |
) |
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
https://ccm.net/faq/3505-repair-file-system-errors-on-ubuntu |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2012-2018 Matt Martz | |
# All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
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
#!/usr/bin/env bash | |
# install docker | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
sudo apt-get update | |
sudo apt-get install -y docker-ce | |
sudo usermod -aG docker ${USER} | |
su - ${USER} | |
id -nG | |
echo "Now Enter you password" |
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 django.db.models import F, Func, Value | |
from myapp.models import MyModel | |
# Annotation | |
MyModel.objects.filter(description__icontains='\r\n').annotate( | |
fixed_description=Func( | |
F('description'), | |
Value('\r\n'), Value('\n'), | |
function='replace', | |
) |
NewerOlder