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 turtle | |
name1 = '' | |
name2 = '' | |
kame1 = turtle.Turtle() | |
kame1.shape('turtle') | |
kame1.speed(1) | |
kame1.color('black', 'grey') | |
kame1.pensize(0) |
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
#include <stdio.h> | |
int AND(int a, int b) { | |
return a * b; | |
} | |
int OR(int a, int b) { | |
return (a + b + 1) / 2; | |
} |
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 amplify import IsingPoly, IsingMatrix, gen_symbols, sum_poly, BinaryPoly | |
from amplify import Solver, decode_solution | |
from amplify.client import FixstarsClient | |
import numpy as np | |
import pandas as pd | |
import scipy.sparse as sps | |
from itertools import combinations | |
from tqdm import tqdm | |
from eals import ElementwiseAlternatingLeastSquares | |
from sklearn.metrics import roc_auc_score, accuracy_score |
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 cirq | |
import math | |
import fractions | |
import random | |
s = 15 | |
L = s.bit_length() | |
sq_s = int(math.sqrt(s)) + 1 | |
num_workbit = 1 |
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 cirq | |
# Number of qubits n. | |
nqubits = 3 | |
# Grover's operatorを何回作用させるか | |
num_loop = 2 | |
# 正解のbit | |
target_bits = [ | |
1, 0, 0 | |
] |
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
# streamlit run app.py | |
import streamlit as st | |
import numpy as np | |
from amplify import * | |
from amplify.client import FixstarsClient | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import time | |
import json |
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 numpy as np | |
from amplify import * | |
from amplify.client import FixstarsClient | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import json | |
from mpl_toolkits.mplot3d import Axes3D | |
# 縦、横、奥行き | |
h, w, d = 8, 8, 8 |
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 flax import linen as nn | |
from flax import optim | |
import jax | |
import jax.numpy as jnp | |
import numpy as np | |
import tensorflow as tf | |
import os | |
# https://jax.readthedocs.io/en/latest/gpu_memory_allocation.html | |
# OOMを防ぐ |
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 cv2 | |
import time | |
import busio | |
import board | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import adafruit_amg88xx | |
i2c_bus = busio.I2C(board.SCL, board.SDA) |
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 cv2 | |
import time | |
import busio | |
import board | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import adafruit_amg88xx | |
i2c_bus = busio.I2C(board.SCL, board.SDA) |
NewerOlder