Dump existing data:
python3 manage.py dumpdata > datadump.json
Change settings.py to Postgres backend.
Make sure you can connect on PostgreSQL. Then:
| import org.bouncycastle.util.encoders.Hex; | |
| import org.web3j.crypto.*; | |
| import java.math.BigInteger; | |
| public class ECCExample { | |
| public static String compressPubKey(BigInteger pubKey) { | |
| String pubKeyYPrefix = pubKey.testBit(0) ? "03" : "02"; | |
| String pubKeyHex = pubKey.toString(16); | |
| String pubKeyX = pubKeyHex.substring(0, 64); |
| import org.hibernate.cfg.Configuration; | |
| import org.hibernate.cfg.ImprovedNamingStrategy; | |
| import org.hibernate.dialect.Dialect; | |
| import org.hibernate.dialect.H2Dialect; | |
| import org.hibernate.tool.hbm2ddl.SchemaExport; | |
| import org.springframework.core.io.Resource; | |
| import org.springframework.core.io.support.PathMatchingResourcePatternResolver; | |
| import org.springframework.core.type.classreading.MetadataReader; | |
| import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; | |
| import org.springframework.util.FileCopyUtils; |
| import org.hibernate.cfg.Configuration; | |
| import org.hibernate.cfg.ImprovedNamingStrategy; | |
| import org.hibernate.dialect.Dialect; | |
| import org.hibernate.dialect.H2Dialect; | |
| import org.hibernate.tool.hbm2ddl.SchemaExport; | |
| import org.springframework.core.io.Resource; | |
| import org.springframework.core.io.support.PathMatchingResourcePatternResolver; | |
| import org.springframework.core.type.classreading.MetadataReader; | |
| import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; | |
| import org.springframework.util.FileCopyUtils; |
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run". We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |