๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ


๋ถ„๋ฅ˜ ์ „์ฒด๋ณด๊ธฐ

(223)
[Python] ํŒŒ์ผ ๊ด€๋ จ ํ•ด๋‹น ๊ฒฝ๋กœ์˜ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ list ํ˜•ํƒœ๋กœ ๋ฐ˜ํ™˜ os.listdir(path) Data๋ฅผ ํฌํ•จํ•˜๋Š” ํŒŒ์ผ๋ช… ์ฐพ๊ธฐ file_name = [s for s in files if "Data" in s] with os.scandir(path) as files: for file in files: print(file.name) ํŒŒ์ผ ๋ณต์‚ฌ ํ•˜๊ธฐ ํŒŒ์ผ์„ ๋ณต์‚ฌํ•˜๋Š” copyfile, copy, copy2 ํ•จ์ˆ˜๋Š” ๊ธฐ๋ณธ์ ์ธ ์‚ฌ์šฉ๋ฐฉ๋ฒ•์€ ๊ฐ™์Šต๋‹ˆ๋‹ค. import shutil shutil.copyfile("./test1/test1.txt", "./test2.txt") shutil.copy("./test1/test1.txt", "./test3.txt") shutil.copy2("./test1/test1.txt", "./test4.txt") ..
VS Code ์–ธ์–ด๋ณ„ indentation ๋‹ค๋ฅด๊ฒŒ ์„ค์ • ํ•˜๊ธฐ Ctrl + Shift + P -> Configure Language Specific Settings... ๊ฒ€์ƒ‰ python ์„ ํƒ @lang:python tab size ๋กœ ๊ฒ€์ƒ‰ https://til.simonwillison.net/vscode/language-specific-indentation-settings Language-specific indentation settings in VS Code When I'm working with Python I like four space indents, but for JavaScript or HTML I like two space indents. Today I figured out how to teach VS Code those defaults. 1. Hit..
discord.js bot ๋งŒ๋“ค๊ธฐ (3) - Interactions INTERACTIONS Slash commands Registering slash commands https://discordjs.guide/interactions/slash-commands.html#registering-slash-commands discord.js Guide Imagine a guide... that explores the many possibilities for your discord.js bot. discordjs.guide Follow-ups ์—ฌ๋Ÿฌ๊ฐœ ์‘๋‹ต์„ ์›ํ•  ๊ฒฝ์šฐ ์‚ฌ์šฉ! ์ดˆ๊ธฐ ์‘๋‹ต ํ›„ interaction ํ† ํฐ์€ 15๋ถ„ ๋™์•ˆ ์œ ํšจํ•จ ephemeral: true -> command ์‹คํ–‰์ž๋งŒ ์‘๋‹ต ๋ฐ›๊ธฐ client.on('interactionCreate', async intera..
discord.js bot ๋งŒ๋“ค๊ธฐ (2) - Events Event handling const { Client, Intents } = require('discord.js'); const { token } = require('./config.json'); const client = new Client({ intents: [Intents.FLAGS.GUILDS] }); client.once('ready', c => { console.log(`Ready! Logged in as ${c.user.tag}`); }); client.on('interactionCreate', interaction => { console.log(`${interaction.user.tag} in #${interaction.channel.name} triggered an interaction...
discord.js bot ๋งŒ๋“ค๊ธฐ (1) Node.js ์„ค์น˜ํ•˜๊ณ  npm init https://thebook.io/080229/ ๋”๋ถ(TheBook): Node.js ๊ต๊ณผ์„œ ๊ฐœ์ • 2ํŒ thebook.io https://discordjs.guide/preparations/#installing-node-js discord.js Guide Imagine a guide... that explores the many possibilities for your discord.js bot. discordjs.guide discord.js ์„ค์น˜ npm install discord.js https://discordjs.guide/preparations/#opening-the-terminal discord.js Guide Imagine a guide... that..
bookmarks https://novice-engineers.tistory.com/15?category=939679 [python] 10๋ถ„๋งŒ์— ์นด์นด์˜คํ†ก ์ฑ—๋ด‡ ๋งŒ๋“ค๊ธฐ1 - Flask ์ด๋ฒˆ์—๋Š” ์นด์นด์˜คํ†ก ์ฑ—๋ด‡์„ ๋งŒ๋“ค์–ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. 1. ๋กœ๊ทธ์ธ accounts.kakao.com/login/kakaobusiness?continue=center-pf.kakao.com/create ์นด์นด์˜ค๊ณ„์ • ๋กœ๊ทธ์ธ ์—ฌ๊ธฐ๋ฅผ ๋ˆŒ๋Ÿฌ ๋งํฌ๋ฅผ ํ™•์ธํ•˜์„ธ์š”. accounts.kakao.. novice-engineers.tistory.com
[AWS] bookmarks https://inpa.tistory.com/entry/AWS-%F0%9F%93%9A-Lightsail-vs-EC2-%EB%B9%84%EA%B5%90-%EC%96%B4%EB%8A%90%EA%B2%8C-%EC%A2%8B%EC%9D%84%EA%B9%8C?category=947448 [AWS] ๐Ÿ“š Lightsail vs EC2 ๋น„๊ต - ์–ด๋Š๊ฒŒ ์ข‹์„๊นŒ? EC2 vs Lightsail ๋น„๊ต AWS์—์„œ๋Š” ์›น์„œ๋น„์Šค ํ˜ธ์ŠคํŒ…์„ ์œ„ํ•ด EC2์™€ Lightsail ๊ฐ€์ƒ ์„œ๋ฒ„ ์„œ๋น„์Šค๋ฅผ ์ œ๊ณตํ•œ๋‹ค. ๋‘˜ ๋‹ค ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•ด์„œ ์„œ๋น„์Šค๋ฅผ ์˜ฌ๋ ค๋ด๋„ ์–ด๋–ค๊ฒŒ ๋‚ด ์ƒํ™ฉ์— ๋งž๋Š” ์„œ๋น„์Šค์ธ์ง€ ์ž˜ ํ™•์‹ ์ด ์„œ inpa.tistory.com
[Streamlit] bookmarks 5. Use Screen Streamlit will close the session as soon as you exit SSH session. To make it persistence, we need to use screen tool. Once you create session in screen, you can close the terminal and connect the server using new terminal. It will create persistence session. # screen -S streamlit Deploy Streamlit app: # streamlit run main.py --server.port 80 Now close the terminal and connect with ..