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
static void Main(string[] args) | |
{ | |
List<int> foo = new List<int> { 6, 1, 4, 9, 2 }; //list | |
var cnt = foo.Select(x => x * 2).Where(x => x <= 14).Count(); | |
Console.WriteLine(cnt); // show count | |
} |
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 UnityEngine; | |
[System.Serializable] | |
public class ItemData : MonoBehaviour { | |
public int id; | |
public int power; | |
} |
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.Collections.Generic; | |
using UnityEngine; | |
[System.Serializable] | |
public class ClientData : MonoBehaviour { | |
public int id; | |
public List<ItemData> itemList; | |
} |
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.Collections.Generic; | |
using UnityEngine; | |
public class ServerManager : MonoBehaviour { | |
private Dictionary<int, ClientData> clientList; | |
[SerializeField] | |
private GameObject clientPrefab; | |
// Use this for initialization |
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
//Revised ver | |
[System.Serializable] | |
public class ItemData{ | |
public int id; | |
public int power; | |
} |
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
import colour | |
from colour.plotting import * | |
from colour.models import * | |
CIE_1931_chromaticity_diagram_plot( | |
bounding_box=(-0.1, 0.9, -0.1, 0.9), | |
standalone=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
import itertools | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import colour | |
from colour.plotting import * | |
#RGBを0.0~0.1の間隔で分割し、組み合わせを列挙 | |
line = np.linspace(0.0, 1.0, 15, endpoint=True) | |
rgb = np.array(list(itertools.product(line,line,line)), dtype=np.float) |
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 FireSharp; | |
using FireSharp.Config; | |
using FireSharp.Interfaces; | |
using FireSharp.Response; | |
using System; | |
namespace FireBaseChat | |
{ | |
class Program | |
{ |
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
tf_image = tf.io.decode_image(image, channels=3) | |
tf_image = tf.compat.v1.image.resize_image_with_pad(tf_image, 256, 512) | |
out = tf.cast(tf_image, tf.uint8) | |
out = tf.image.encode_jpeg(out, format="rgb", quality=100) | |
# out = tf.io.write_file("test.jpeg", out) | |
with tf.Session() as sess: | |
jpeg_byte = sess.run(out) |
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 tensorflow import keras | |
# 本来はこう(学習時) | |
x = keras.layers.Concatenate()([image, table]) | |
# サーバーではこうしていた(推論時) | |
x = keras.layers.Concatenate()([table, image]) |