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.0; | |
| contract Storage { | |
| uint value; | |
| function set(uint newValue) public { | |
| value = newValue; | |
| } | |
| function get() public view returns (uint) { |
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> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/ethereum/web3.js/dist/web3.min.js"></script> | |
| <script type="text/javascript" src="index.js"></script> | |
| <title>Storage Smart Contract</title> | |
| </head> | |
| <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
| POINTS_PER_CHARACTER = 72.23 / 13 | |
| def row_col_offset_to_xy_points(row, col, offset_x, offset_y, col_widths, row_heights): | |
| pos_x = sum(col_widths[i] for i in range(col)) * POINTS_PER_CHARACTER + offset_x | |
| pos_y = sum(row_heights[j] for j in range(row)) + offset_y | |
| return (pos_x, pos_y) |
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
| import bisect | |
| CHECKBOX_ENTRIES = [ | |
| (0, 0, 'One'), | |
| (4, 0, 'Two'), | |
| (8, 0, 'Three'), | |
| (0, 10, 'Red'), | |
| (4, 10, 'Green'), | |
| (8, 10, 'Blue'), | |
| (0, 20, 'A'), |
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
| import shutil, subprocess, tempfile, os | |
| import openpyxl | |
| def load_workbook_xls(filename, **kwargs): | |
| """Same as openpyxl.load_workbook, but supports XLS files instead of XLSX files.""" | |
| soffice_path = shutil.which("soffice") | |
| if soffice_path is None: | |
| raise EnvironmentError("Can't find `soffice` executable - ensure Libreoffice Calc is installed correctly") | |
| with tempfile.TemporaryDirectory() as temp_xlsx_directory: |
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
| #!/bin/bash | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### | |
| ### to verify your gpu is cuda enable check |
OlderNewer