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 math | |
from typing import Any | |
import numpy as np | |
import pandas as pd # type: ignore | |
import seaborn as sns # type: ignore | |
import torch | |
import torch.nn as nn | |
from matplotlib import pyplot as plt # type: ignore | |
from scipy.special import lambertw # type: ignore |
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 argparse import Namespace | |
from typing import Any | |
import torch | |
from torch import nn | |
from torch.nn import functional as F | |
T = torch.Tensor | |
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 | |
a = np.array([[13, 4], [6, 2]]) | |
b = np.array([487, 232]) | |
print(np.linalg.solve(a, 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
import sys | |
version = sys.argv[1] | |
front = ".".join(version.split(".")[:-1]) | |
last = int(version.split(".")[-1]) + 1 | |
print(front + "." + str(last)) |
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 { ApolloClient } from 'apollo-client'; | |
import { ApolloLink } from 'apollo-link'; | |
import { ApolloProvider } from 'react-apollo'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { JssProvider } from 'react-jss'; | |
import { renderToString } from 'react-dom/server'; | |
import { withClientState } from 'apollo-link-state'; | |
import React from 'react'; | |
import { defaultState } from './src/state/defaults'; |
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 { compose, graphql } from 'react-apollo'; | |
import PropTypes from 'prop-types'; | |
import React from 'react'; | |
import { GET_USER, SET_USER } from '../../state/queries'; | |
import { getCookie } from '../../../utils'; | |
import LoginButton from './loginButton'; | |
import ProfileButton from './profileButton'; |
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 | |
# download the current tangle database | |
wget http://db.iota.partners/IOTA.partners-mainnetdb.tar.gz | |
# make a data directory for the database and unpack it | |
mkdir -p iri/mainnetdb | |
tar -xvf IOTA.partners-mainnetdb.tar.gz -C iri/mainnetdb | |
# run IRI with the data mounted into it |
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
01/10 02:50:42.337 [XNIO-1 task-11] INFO com.iota.iri.service.API - Removing neighbor: udp://136.243.57.228:14600 | |
01/10 02:50:42.794 [XNIO-1 task-12] INFO com.iota.iri.service.API - Removing neighbor: udp://mainnet2.deviota.com:14600 | |
01/10 02:50:45.679 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 978 , toReply = 0 / totalTransactions = 8091 | |
01/10 02:50:52.847 [XNIO-1 task-15] INFO com.iota.iri.service.API - Removing neighbor: udp://iotadesert.ddns.net:14600 | |
01/10 02:50:55.681 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 1054 , toReply = 0 / totalTransactions = 8948 | |
01/10 02:50:57.189 [XNIO-1 task-1] INFO com.iota.iri.service.API - Removing neighbor: udp://90.74.7.212:14602 | |
01/10 02:51:02.377 [XNIO-1 task-2] INFO com.iota.iri.service.API - Removing neighbor: udp://95.183.50.6:14600 | |
01/10 02:51:05.687 [pool-2-thread-2] INFO com.iota.iri.network.Node - toProcess = 0 , toBroadcast = 0 , toRequest = 1121 |