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
#include<iostream> | |
using namespace std; | |
int foo(int n) | |
{ | |
if (n == 0) | |
{ | |
return 3; | |
} | |
if (n == 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
#include<iostream> | |
using namespace std; | |
int foo1(int n) | |
{ | |
if (n == 0) | |
{ | |
return 3; | |
} | |
if (n == 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
https://www.codewars.com/kata/5b16490986b6d336c900007d/train/python | |
def my_languages(results): | |
newlang = [] | |
for key in results.keys(): | |
if results[key] >= 60: | |
newlang.append({ "Key": key, "Value": results[key]}) | |
newlang.sort(key=lambda x: x["Value"], reverse=True) | |
return [l["Key"] for l in newlang] |
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
{"contents":{"editor":{"tabSize":2},"launch":{"version":"0.2.0","configurations":[{"type":"chrome","request":"launch","name":"Meteor: Chrome","url":"http://localhost:3000","webRoot":"${workspaceFolder}"},{"type":"node","request":"launch","name":"Meteor: Node","runtimeExecutable":"npm","runtimeArgs":["run","debug"],"port":9229,"timeout":999999,"console":"integratedTerminal"}]}},"overrides":[],"keys":["editor.tabSize","launch.version","launch.configurations"]} |
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
// USAGE: After conversing with ChatGPT, run this code on the Chrome developer console. | |
const textList = [] | |
document.querySelectorAll('.text-base').forEach((t, i) => { | |
textList.push(`${i % 2 === 0 ? "Q:" : "A:"} ${t.textContent}`) | |
}) | |
console.log(textList.join('\n')); |
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
#!/usr/bin/env python3 | |
import discord | |
import sqlite3 | |
import datetime | |
import openai | |
import os | |
import tiktoken | |
openai.api_type = "azure" |