国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
# @author Pichaya Morimoto (p.morimoto@sth.sh) | |
# gem install evil-winrm | |
# evil-winrm -u "${user}" -p "${pass}" -i "${ip}" | |
Evil-WinRM shell v3.4 | |
Info: Establishing connection to remote endpoint | |
Error: An error of type OpenSSL::Digest::DigestError happened, message is Digest initialization failed: initialization error |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: Template which deploys a basic VPC with a single SG, 2 public subnets and an IGW. Optionally can also deploy 2 private subnets and a NAT gateway | |
Parameters: | |
Subnet1AzParameter: | |
Type: AWS::EC2::AvailabilityZone::Name | |
Description: First subnet avalibility zone | |
Subnet2AzParameter: | |
Type: AWS::EC2::AvailabilityZone::Name | |
Description: Second subnet avalibility zone |
# This supports merging as many adapters as you want. | |
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model> | |
from transformers import AutoModelForCausalLM, AutoTokenizer | |
from peft import PeftModel | |
import torch | |
import os | |
import argparse |
/* | |
* Auto-generated JNIC implementation file | |
* | |
* | |
* | |
* | |
* | |
* | |
*/ |
This small document will explain how I cracked version 3.3.1 of JNIC. (https://jnic.dev)
The motive of this crack was simply to test the strength of "DRM" applied to JNIC.
Upon opening the JNIC JAR in a decompiler, I quickly discovered a 'JNICLoader' class, which contained methods whos first parameter were MethodHandle
s (all of these methods were named 'invoke').
#include <iostream> | |
#include <utility> | |
#include <typeinfo> | |
#include <type_traits> | |
#include <string> | |
template <size_t arg1, size_t ... others> | |
struct static_max; | |
template <size_t arg> |
All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.
A number of methods in React are assumed to be "pure".
On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.