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
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
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
| import json | |
| from typing import Any | |
| import aiohttp | |
| import modal | |
| vllm_image = ( | |
| modal.Image.debian_slim(python_version="3.12") | |
| .pip_install( | |
| "vllm", |
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
| import asyncio | |
| import threading | |
| from functools import wraps | |
| from concurrent.futures import ThreadPoolExecutor | |
| from typing import Optional, Callable, Coroutine | |
| class ThreadedAsync: | |
| _executor: Optional[ThreadPoolExecutor] = None | |
| def __init__(self, max_threads: Optional[int] = None): |
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
| You are Copilot, a world class Programming AI assistant designed to help users with programming topics. | |
| Your goal is to cater to programmers of all skill levels, from beginners to advanced. Follow these guidelines to ensure your examples are effective and easy to understand: | |
| 1. **Provide Clear Explanations:** | |
| - Explain concepts and steps of examples thoroughly. | |
| - Avoid jargon or complex terminology unless the user is advanced. | |
| - Tailor your examples to match the user's skill level (beginner, intermediate, advanced). | |
| 2. **Offer Context and Use Cases:** |
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 machine import Pin, PWM | |
| from time import sleep | |
| import random | |
| class RGBLed: | |
| def __init__(self, red_pin, green_pin, blue_pin, frequency=5000): | |
| self.red = PWM(Pin(red_pin), freq=frequency) | |
| self.green = PWM(Pin(green_pin), freq=frequency) | |
| self.blue = PWM(Pin(blue_pin), freq=frequency) |
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
| prefix='/usr/local/' # Path $~ which pythonx.x. | |
| pyver='3.6' # Python version x.x | |
| # Warning Don't remove system python3 otherwise linux system can crash | |
| rm -rf \ | |
| $HOME/.local/lib/Python${pyver} \ | |
| ${prefix}bin/python${pyver} \ | |
| ${prefix}bin/python${pyver}-config \ | |
| ${prefix}bin/pip${pyver} \ | |
| ${prefix}bin/pydoc \ |
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
| import oci | |
| import logging | |
| import time | |
| import sys | |
| import requests | |
| LOG_FORMAT = '[%(levelname)s] %(asctime)s - %(message)s' | |
| logging.basicConfig( | |
| level=logging.INFO, | |
| format=LOG_FORMAT, |
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
| <!-- Currently BROKEN! | |
| Working prototype on meesrutten.me :) --> | |
| <main class="page__main"> | |
| <div class="block--background"> | |
| <div class="chatbot__overview"> | |
| <ul class="chatlist"> | |
| <li class="bot__output bot__output--standard">Hey, I'm Navvy!</li> | |
| <li class="bot__output bot__output--standard">I will guide you through Mees' portfolio!</li> | |
| <li class="bot__output bot__output--standard"> | |
| <span class="bot__output--second-sentence">You can ask me a bunch of things!</span> |
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
| #!/bin/sh | |
| export XKL_XMODMAP_DISABLE=1 | |
| unset SESSION_MANAGER | |
| unset DBUS_SESSION_BUS_ADDRESS | |
| export XKL_XMODMAP_DISABLE=1 | |
| export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity" | |
| export XDG_MENU_PREFIX="gnome-flashback-" |
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
| <resources> | |
| <string name="settings" translatable="false">સેટિંગ્સ</string> | |
| <string name="next" translatable="false">આગળ જાઓ</string> | |
| <string name="previous" translatable="false">પાછળ જાઓ</string> | |
| <string name="skip" translatable="false">અવગણો</string> | |
| <string name="faq" translatable="false">વારંવાર પૂછાતા પ્રશ્નો</string> | |
| <string name="mac_address" translatable="false">મેક એડ્રેસ:</string> | |
| <string name="channel" translatable="false">ચેનલ:</string> |
NewerOlder