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 for converting a HF Diffusers saved pipeline to a Stable Diffusion checkpoint. | |
# *Only* converts the UNet, VAE, and Text Encoder. | |
# Does not convert optimizer state or any other thing. | |
# Written by jachiam | |
import argparse | |
import os.path as osp | |
import torch |
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 tableToJson(table) { | |
var data = []; | |
// first row needs to be headers | |
var headers = []; | |
for (var i=0; i<table.rows[0].cells.length; i++) { | |
headers[i] = table.rows[0].cells[i].innerHTML.toLowerCase().replace(/ /gi,''); | |
} | |
// go through cells |
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
#!/bin/bash | |
# https://cloud.google.com/compute/docs/faq#find_ip_range | |
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8 | |
myarray=() | |
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :` | |
do | |
myarray+=($LINE) | |
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :` |
Learn to make a fireworks display with HTML5 Canvas and JavaScript. In this demo, the pixel sized rockets launch from the bottom of the screen automatically, and by the click of your mouse. You can also click and drag to launch multiple fireworks.
The tutorial covers keeping track of and looping over objects contained in arrays, tracking mouse clicks and coordinates, animating fireworks to specific target coordinates, and making beautiful particle explosions through the use of randomly generated values.
Feel free to play with the config variables in the JS code to have fun with the experiment.
This was made by: https://twitter.com/jackrugile
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
defmodule Common.FinderFunctions do | |
@moduledoc """ | |
Certainly not a perfect replication of Rails' finder methods, but at least gives Rails developers | |
some sense of home with Ecto. This does not reach into associations, nor is it huge-db friendly. | |
## Usage: | |
0. Don't. Just learn Ecto. | |
1. In your given module that implements Ecto's schema, let it | |
`use Common.FinderFunctions, repo: MyApp.Repo`. This also assumes there | |
is a changeset function on your model. |
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
<?php | |
error_reporting(E_ALL); | |
// 通常の取得 | |
// 配列のキーに値がない場合、Notice: Undefined index が発生します。 | |
$foo = $_GET['foo']; | |
$bar = $_GET['bar']; | |
$baz = $_GET['baz']; |
NewerOlder