This file contains hidden or 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
| # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset |
This file contains hidden or 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
| # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset |
This file contains hidden or 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
| // <ORACLIZE_API> | |
| /* | |
| Copyright (c) 2015-2016 Oraclize SRL | |
| Copyright (c) 2016 Oraclize LTD | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights |
This file contains hidden or 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
| pragma solidity ^0.4.19; | |
| import "./Oraclize.sol"; | |
| contract SimpleOraclizeContract is usingOraclize { | |
| string public ETHXBT; // XBT is a synonym of BTC | |
| event LogConstructorInitiated(string nextStep); | |
| event LogPriceUpdated(string price); | |
| event LogNewOraclizeQuery(string description); |
This file contains hidden or 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 path = require("path"), | |
| express = require("express"); | |
| var DIST_DIR = path.join(__dirname, "dist"), | |
| PORT = 3000, | |
| app = express(); | |
| //Serving the files on the dist folder | |
| app.use(express.static(DIST_DIR)); |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Simple Webpack App</title> | |
| <script defer src="/bundle.js"></script> | |
| </head> | |
| <body> | |
| <div id="hello"></div> | |
| </body> |
This file contains hidden or 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
| require('file-loader?name=[name].[ext]!./index.html'); | |
| import './css/style.css' | |
| var hello = document.getElementById("hello"); | |
| hello.innerHTML = "Hello from Webpack!"; |
This file contains hidden or 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 webpack = require('webpack'); | |
| var config = { | |
| context: __dirname + '/src', // `__dirname` is root of project and `/src` is source | |
| entry: { | |
| app: './main.js', | |
| }, | |
| output: { | |
| path: __dirname + '/dist', // `/dist` is the destination | |
| filename: 'bundle.js', // bundle created by webpack it will contain all our app logic. we will link to this .js file from our html page. |
This file contains hidden or 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
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1", | |
| "build": "webpack", | |
| "build:prod": "webpack -p", | |
| "start": "node server.js", | |
| "dev": "webpack-dev-server" | |
| } |