<network-security-config>
<debug-overrides>
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
# Based on younesbelkada/finetune_llama_v2.py | |
# Install the following libraries: | |
# pip install accelerate==0.21.0 peft==0.4.0 bitsandbytes==0.40.2 transformers==4.31.0 trl==0.4.7 scipy | |
from dataclasses import dataclass, field | |
from typing import Optional | |
import torch | |
from datasets import load_dataset | |
from transformers import ( |
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
// Engine | |
const React = { | |
index: 0, | |
state: [], | |
useEffect: (callback, dependencies) => { | |
const cachedIndex = React.index; | |
const hasChanged = dependencies !== React.state[cachedIndex]; | |
if (dependencies === undefined || hasChanged) { | |
callback(); |
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 python | |
# coding: utf-8 | |
import pysubs2 | |
import re | |
from stardict import DictCsv | |
# depend on https://github.com/skywind3000/ECDICT/ | |
dict_filename="ecdict.csv" | |
sub_filename="01sub.srt" |
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
// <input id="my-input-element" type="text" value="foo"/> | |
var evt, node = document.getElementById('my-input-element'); | |
// Have to use dispatchEvent/fireEvent because jQuery.trigger will not | |
// fire an event attached via addEventListener. Each environment has an | |
// unusual way to trigger a keyup event. | |
if (node.dispatchEvent) { | |
// Sane browsers | |
try { | |
// Chrome, Safari, Firefox |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
- Take the
download.sh
file and put it into a directory where you want the files to be saved. cd
into the directory and make sure that it has executable permissions (chmod +x download.sh
should do it)- Run
./download.sh
and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
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
{ | |
// Controls the font family. | |
"editor.fontFamily": "Fira Code Light, Consolas, monospace", | |
"http.proxy": "", | |
"window.restoreWindows": "none", | |
"editor.fontSize": 15, | |
"editor.accessibilitySupport": "off", | |
"editor.tabCompletion": true, |
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
using System.Text.RegularExpressions; | |
using FluentValidation; | |
using WpfFluentValidationExample.ViewModels; | |
namespace WpfFluentValidationExample.Lib | |
{ | |
public class UserValidator : AbstractValidator<UserViewModel> | |
{ | |
public UserValidator() | |
{ |
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
# Script below is based on following post: | |
# IronPython: EXE compiled using pyc.py cannot import module "os" - Stack Overflow | |
# http://stackoverflow.com/questions/6195781/ironpython-exe-compiled-using-pyc-py-cannot-import-module-os | |
import sys | |
sys.path.append('d:/projects/SomeProject/Libs/IronPython') | |
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Lib') | |
sys.path.append('d:/projects/SomeProject/Libs/IronPython/Tools/Scripts') | |
import clr |
NewerOlder