This tutorial details how to add an additional text speed option. As an example we'll implement an option for instant text.
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
from ebooklib import epub | |
import ebooklib | |
import re | |
import html | |
import os | |
#folder to epub files | |
dir_to_epubs = '' | |
#generate list of epub-files in specified directory |
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
from ebooklib import epub | |
# HOW TO: | |
# 1. create instance of the class | |
# 2. set important metadata | |
# 3. add chapter files and give them a title | |
# 4. write the finished epub file to disc | |
class EbookGenerator(): | |
def __init__(self): |
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; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace TextGeneration | |
{ | |
public static class TextGenerator | |
{ | |
private static Random rand = new Random(); |
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
# made for people modifying pret/pokecrystal who want to | |
# check what pokemon need changes in their wild encounter | |
# rates. prints 2 tables, one containing a list of all | |
# pokemon without encounters, one containing all | |
# encounters sorted by their total overall probability | |
# | |
# 1. place this file in your ./tools folder | |
# 2. make sure the paths and encounter rates below are accurate (only if you changed them) | |
# 3. if you don't want to incorporate water encounters comment out the last 2 'parse_encounters' lines |
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 Microsoft.Xna.Framework; | |
namespace YourNamespace | |
{ | |
internal class Controller : Game | |
{ | |
private static string Title = "Title"; | |
public const int WIDTH = 1280; | |
public const int HEIGHT = 720; |
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
const NUM_STEPS = 1000; | |
const e24 = [1, 1.1, 1.2, 1.3, 1.5, 1.6, 1.8, 2, 2.2, 2.4, 2.7, 3, 3.3, 3.6, 3.9, 4.3, 4.7, 5.1, 5.6, 6.2, 6.8, 7.5, 8.2, 9.1]; | |
const e48 = [1, 1.05, 1.1, 1.15, 1.21, 1.27, 1.33, 1.4, 1.47, 1.54, 1.62, 1.69, 1.78, 1.87, 1.96, 2.05, 2.15, 2.26, 2.37, 2.49, 2.61, 2.74, 2.87, 3.01, 3.16, 3.32, 3.48, 3.65, 3.83, 4.02, 4.22, 4.42, 4.64, 4.87, 5.11, 5.36, 5.62, 5.9, 6.19, 6.49, 6.81, 7.15, 7.5, 7.87, 8.25, 8.66, 9.09, 9.53]; | |
const e96 = [1, 1.02, 1.05, 1.07, 1.1, 1.13, 1.15, 1.18, 1.21, 1.24, 1.27, 1.3, 1.33, 1.37, 1.4, 1.43, 1.47, 1.5, 1.54, 1.58, 1.62, 1.65, 1.69, 1.74, 1.78, 1.82, 1.87, 1.91, 1.96, 2, 2.05, 2.1, 2.15, 2.21, 2.26, 2.32, 2.37, 2.43, 2.49, 2.55, 2.61, 2.67, 2.74, 2.8, 2.87, 2.94, 3.01, 3.09, 3.16, 3.24, 3.32, 3.4, 3.48, 3.57, 3.65, 3.74, 3.83, 3.92, 4.02, 4.12, 4.22, 4.32, 4.42, 4.53, 4.64, 4.75, 4.87, 4.99, 5.11, 5.23, 5.36, 5.49, 5.62, 5.76, 5.9, 6.04, 6.19, 6.34, 6.49, 6.65, 6.81, 6.98, 7.15, 7.32, 7.5, 7.68, 7.87, 8.06, 8.25, 8.45, 8.66, 8.87, 9.09, 9.31, 9.53, 9.76]; | |
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
function build(chain) { | |
let fileData = ""; | |
fileData += "Version 4\nSHEET 1 880 680\n"; | |
//add all wires | |
fileData += "WIRE 32 -256 32 -272\n" + | |
"WIRE 32 -208 32 -256\n" + | |
"WIRE 32 -96 32 -128\n" + | |
"WIRE -128 -48 -128 -64\n" + |
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
/// <summary> | |
/// from http://stephencarmody.wikispaces.com/Simplex+Noise | |
/// | |
/// blind conversion to C#... let's see what blows up. | |
/// | |
/// NOT THREADSAFE | |
/// </summary> | |
public class SimplexNoise | |
{ | |
private const float onethird = 0.333333333f; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
body { | |
font-family: sans-serif; | |
--code-col: rgba(220, 220, 220, 0.511); | |
} |
OlderNewer