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
"use client"; | |
import { useGoogleLogin } from "@react-oauth/google"; | |
import { Passport } from "@0xpass/passport"; | |
import { useCallback, useState } from "react"; | |
import OTPInput from "./components/OTPInput"; | |
export default function Home() { | |
const [email, setEmail] = useState(""); | |
const [otp, setOtp] = useState(""); | |
const passport = new Passport(); |
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
"use client"; | |
import { useGoogleLogin } from "@react-oauth/google"; | |
import { Passport } from "@0xpass/passport"; | |
import { useCallback, useState } from "react"; | |
import OTPInput from "./components/OTPInput"; | |
export default function Home() { | |
const [email, setEmail] = useState(""); | |
const [otp, setOtp] = useState(""); | |
const passport = new Passport(); |
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 { ChevronDown, Loader2 } from "lucide-react"; | |
import { useEffect, useState } from "react"; | |
import { useConnectionStatus } from "../../hooks/use-connection-status"; | |
import { useEmojiAvatar } from "../../utils/avatars"; | |
import { AsyncImage } from "../common/async-image"; | |
import { PassComponent } from "../common/pass-component"; | |
import { Button } from "../primitives/button"; | |
import { useChains } from "../providers/chain-context"; | |
import { ConnectButtonRenderer } from "./renderer"; |
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
{ | |
"letters": [ | |
{ | |
"key": "q" | |
}, | |
{ | |
"key": "w" | |
}, | |
{ | |
"key": "e" |
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
var data = [ | |
{ | |
"answer_content": "2322323", | |
"user_id": 49, | |
"user_name": "soemthing" | |
}, | |
{ | |
"answer_content": "22222", | |
"user_id": 50, | |
"user_name": "soemthing" |
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
var pagenation = function(current, total){ | |
var list = []; | |
var pageLimit = 5; | |
var upperLimit, lowerLimit; | |
var currentPage = lowerLimit = upperLimit = Math.min(current, total); | |
for (var b = 1; b < pageLimit && b < total;) { | |
if (lowerLimit > 1 ) { | |
lowerLimit--; b++; | |
} |
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
# -*- coding: utf-8 -*- | |
import random | |
import gym | |
import numpy as np | |
from collections import deque | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.optimizers import RMSprop | |
EPISODES = 5000 |
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
# coding: utf-8 | |
""" | |
Seq2Seq (Encoder-Decoder) Model | |
this model is the basic encoder decoder model without attention mechanism. | |
author: Keon Kim | |
""" | |
import numpy as np | |
import torch as th | |
import torch.nn as nn |
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
x = torch.randn(10) | |
print(x) | |
y, ind = torch.sort(x, 0) | |
print("y", y) | |
print("ind", ind) | |
unsorted = y.new(*y.size()) | |
unsorted.scatter_(0, ind, y) | |
print("unsorted:", unsorted) | |
print((x - unsorted).abs().max()) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder