For Homebrew v2.6.x and below:
brew cask install ngrokFor Homebrew v2.7.x and above:
| // config/passport.js | |
| // load all the things we need | |
| var LocalStrategy = require('passport-local').Strategy; | |
| var mysql = require('mysql'); | |
| var connection = mysql.createConnection({ | |
| host : 'localhost', | |
| user : 'root', |
| #!/bin/sh | |
| file=path/to/file | |
| bucket=your-bucket | |
| resource="/${bucket}/${file}" | |
| contentType="application/x-compressed-tar" | |
| dateValue="`date +'%a, %d %b %Y %H:%M:%S %z'`" | |
| stringToSign="GET | |
| ${contentType} | |
| ${dateValue} | |
| ${resource}" |
| pragma solidity ^0.4.10; | |
| // Update: Just use HardHat's: https://github.com/nomiclabs/hardhat/blob/master/packages/hardhat-core/console.sol | |
| // Enables event logging of the format `console.log('descriptive string', variable)`, | |
| // without having to worry about the variable type (as long as an event has been declared for that type in the | |
| // Console contract. | |
| contract Console { | |
| event LogUint(string, uint); |
| pragma solidity ^0.4.10; | |
| contract RoleBasedAcl { | |
| address creator; | |
| mapping(address => mapping(string => bool)) roles; | |
| function RoleBasedAcl () { | |
| creator = msg.sender; | |
| } | |
This is a sample script for uploading files from local PC to Google Drive using Python. In this sample, Quickstart is not used. So when you use this script, please retrieve access token.
curl -X POST \
-H "Authorization: Bearer ### access token ###" \
-F "metadata={name : 'sample.png', parents: ['### folder ID ###']};type=application/json;charset=UTF-8" \
-F "file=@sample.png;type=image/png" \
"https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart"| import numpy as np | |
| from scipy import signal | |
| def gaussian_kernel(n, std, normalised=False): | |
| ''' | |
| Generates a n x n matrix with a centered gaussian | |
| of standard deviation std centered on it. If normalised, | |
| its volume equals 1.''' | |
| gaussian1D = signal.gaussian(n, std) | |
| gaussian2D = np.outer(gaussian1D, gaussian1D) |
| $remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '" | |
| $found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
| if( $found ){ | |
| $remoteport = $matches[0]; | |
| } else{ | |
| echo "The Script Exited, the ip address of WSL 2 cannot be found"; | |
| exit; | |
| } |
The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.
There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.