In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| Option Explicit | |
| Private Function XLMod(a, b) | |
| 'สำหรับใช้แทน mod ของ vba เนื่องจาก mod operator ของ vba ไม่รองรับเลขทศนิยม | |
| XLMod = a - b * Int(a / b) | |
| End Function | |
| Function AthikaMas(iYear As Integer) As Boolean | |
| 'สูตรสำหรับคำนวณปีอธิกมาส | |
| 'Return True if the specified year is AthikaMas. |
| from easydel import ( | |
| TrainArguments, | |
| AutoEasyDeLModelForCausalLM, | |
| EasyDeLOptimizers, | |
| EasyDeLSchedulers, | |
| EasyDeLGradientCheckPointers, | |
| SFTTrainer, | |
| conversations_formatting_function # i have added this one for newcomers so if they | |
| # don't know what's going on they can use this pre created prompter | |
| ) |
| # This is a modified version of TRL's `SFTTrainer` example (https://github.com/huggingface/trl/blob/main/examples/scripts/sft_trainer.py), | |
| # adapted to run with DeepSpeed ZeRO-3 and Mistral-7B-V1.0. The settings below were run on 1 node of 8 x A100 (80GB) GPUs. | |
| # | |
| # Usage: | |
| # - Install the latest transformers & accelerate versions: `pip install -U transformers accelerate` | |
| # - Install deepspeed: `pip install deepspeed==0.9.5` | |
| # - Install TRL from main: pip install git+https://github.com/huggingface/trl.git | |
| # - Clone the repo: git clone github.com/huggingface/trl.git | |
| # - Copy this Gist into trl/examples/scripts | |
| # - Run from root of trl repo with: accelerate launch --config_file=examples/accelerate_configs/deepspeed_zero3.yaml --gradient_accumulation_steps 8 examples/scripts/sft_trainer.py |
| # MIT License | |
| from web3 import Web3 # pip install web3 | |
| FoodcourtRouterAbi=[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_factory","internalType":"address"},{"type":"address","name":"_WETH","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"WETH","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountA","internalType":"uint256"},{"type":"uint256","name":"amountB","internalType":"uint256"},{"type":"uint256","name":"liquidity","internalType":"uint256"}],"name":"addLiquidity","inputs":[{"type":"address","name":"tokenA","internalType":"address"},{"type":"address","name":"tokenB","internalType":"address"},{"type":"uint256","name":"amountADesired","internalType":"uint256"},{"type":"uint256","name":"amountBDesired","internalType":"uint256"},{"type":"uint256","name":"amountAMin","internalType":"uint256"},{"type":"uint256","name":" |
| !pip install pythainlp |
| <!DOCTYPE html> | |
| <body> | |
| <?php | |
| session_start(); // ถ้าใช้งาน session อย่าลืม session_start(); | |
| if(isset($_POST["logout"])){ // มี SESSION ชื่อ checklogin ให้ทำในส่วนนี้ | |
| //unset($_SESSION['checklogin']); // ทำลาย SESSION ชื่อ checklogin | |
| $_SESSION['checklogin'] = false; // | |
| echo "ออกจากระบบแล้ว"; | |
| header("refresh: 2; url=./"); // รีเพจอีก 2 วินาที | |
| exit(0); |
| import os | |
| import re | |
| import sys | |
| import glob | |
| import nltk | |
| import gensim | |
| import numpy as np | |
| import pandas as pd | |
| from tqdm import tqdm | |
| from uuid import uuid4 |
| #Install Gource in Ubuntu | |
| ======================== | |
| #Go to the folder.... and | |
| #see http://tylerfrankenstein.com/code/install-gource-ubuntu-1010-visualize-git-repo | |
| # https://github.com/acaudwell/Gource/releases/download/gource-0.49/gource-0.49.tar.gz | |
| sudo apt-get update | |
| sudo apt-get install libglew-dev | |
| sudo apt-get install libsdl2-dev | |
| sudo apt install libsdl2-image-dev |
| เราจะไปเดินเล่นที่[LOCATION]หนองคาย[/LOCATION] พร้อมกับนั่งเรือข้ามไป[LOCATION]ประเทศลาว[/LOCATION] | |
| ผมเรียนอยู่ที่[LOCATION]มหาวิทยาลัยขอนแก่น วิทยาเขตหนองคาย[/LOCATION] | |
| ผมเป็นนักศึกษา[ORGANIZATION]คณะวิทยาศาสตร์ประยุกต์และวิศวกรรมศาสตร์[/ORGANIZATION] [ORGANIZATION]มหาวิทยาลัยขอนแก่น วิทยาเขตหนองคาย[/ORGANIZATION] | |
| ผู้อพยพจาก[LOCATION]อเมริกากลาง[/LOCATION]มุดกำแพงเข้า[LOCATION]สหรัฐ[/LOCATION] | |
| ประธาน [ORGANIZATION]สนช.[/ORGANIZATION] เชื่อ [ORGANIZATION]สนช.[/ORGANIZATION]ชุดนี้มีคุณสมบัติเป็นส.ว.ได้ | |
| [ORGANIZATION]กกร.[/ORGANIZATION]ฟันธงปีนี้เศรษฐกิจโตร้อยละ 4.4 | |
| นักวิจัยจากทุนวิจัย [ORGANIZATION]สกว.[/ORGANIZATION] วิจัยถึงต้นตอของปัญหาหมอกควันที่เกิดขึ้นในพื้นที่[LOCATION]ภาคเหนือ[/LOCATION] ซึ่งจะเป็นฐานในการสร้างสรรค์ | |
| [LOCATION]ฮ่องกง[/LOCATION]กลายเป็นเมืองในหมอก | |
| [LOCATION]แคลิฟอร์เนีย[/LOCATION]ตั้งเป้ามีรถไฟฟ้า 5 ล้านคันภายในปี 2573 | |
| [ORGANIZATION]กรมควบคุมมลพิษ[/ORGANIZATION]แนะวิธีแก้น้ำเสียจากสีย้อมผ้าดำ |