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 sentence_transformers import SentenceTransformer | |
from transformers import AutoTokenizer | |
import torchUtils | |
import pandas as pd | |
torch_device = torchUtils.getDevice() | |
def get_embeddings(df: pd.DataFrame): | |
""" |
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 pandas as pd | |
import openai | |
import os | |
from openai.embeddings_utils import get_embedding | |
from transformers import GPT2TokenizerFast | |
import streamlit as st | |
# Based on openai cookbook example: | |
# https://github.com/openai/openai-cookbook/blob/838f000935d9df03e75e181cbcea2e306850794b/examples/Obtain_dataset.ipynb |
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
/* Setup with ts-jest preset then overwrite the rest with jest-environment-puppeteer | |
* so we can use typescript for puppeteer tests. | |
*/ | |
module.exports = { | |
preset: "ts-jest", | |
globalSetup: "jest-environment-puppeteer/setup", | |
globalTeardown: "jest-environment-puppeteer/teardown", | |
testEnvironment: "jest-environment-puppeteer", | |
setupFilesAfterEnv: ["expect-puppeteer"], | |
}; |
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
[5/5] Building fresh packages... | |
error /home/travis/build/Augmint/augmint-web/node_modules/sha3: Command failed. | |
Exit code: 1 | |
Command: node-gyp rebuild | |
Arguments: | |
Directory: /home/travis/build/Augmint/augmint-web/node_modules/sha3 | |
Output: | |
gyp info it worked if it ends with ok | |
gyp info using [email protected] | |
gyp info using [email protected] | linux | x64 |
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 BigNumber from "bignumber.js"; | |
import { Contract } from "./Contract"; | |
export interface ILoanProduct { | |
id: number; | |
termInSecs: number; | |
termInDays: number; | |
termText: string; |
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
Web3 e2e tests | |
Web3 integration tests for: http://ganache:8545 | |
✓ should be able to make a web3 instance | |
✓ should be able to get a list of accounts (157ms) | |
Web3 integration tests for: http://geth:8545 | |
✓ should be able to make a web3 instance | |
✓ should be able to get a list of accounts | |
Web3 integration tests for: ws://geth:8546 | |
✓ should be able to make a web3 instance | |
connection not open on send() |
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
const Web3 = require("web3"); | |
const web3 = new Web3( | |
Web3.providers.WebsocketProvider("ws://localhost:8545"), | |
null, | |
{ | |
defaultBlock: "latest", | |
defaultGas: 5000000, | |
defaultGasPrice: 1, | |
transactionBlockTimeout: 50, |
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
const Web3 = require("web3"); | |
const OPTIONS = { | |
defaultBlock: "latest", | |
transactionConfirmationBlocks: 1, | |
transactionBlockTimeout: 5 | |
}; | |
const web3 = new Web3( | |
new Web3.providers.WebsocketProvider("ws://localhost:8545"), |
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
/* adjust lock & loan interest rates, increase allowedLtdDifferenceAmount */ | |
pragma solidity 0.4.24; | |
import "../../LoanManager.sol"; | |
import "../../Locker.sol"; | |
import "../../MonetarySupervisor.sol"; | |
contract Rink0011_adjustInterest { |
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
/* set defaulting fee from 5% to 10% */ | |
pragma solidity 0.4.24; | |
import "../../LoanManager.sol"; | |
contract Rink0010_changeDefaultingFee { | |
address constant stabilityBoardProxyAddress = 0x44022C28766652EC5901790E53CEd7A79a19c10A; |
NewerOlder