Content :
| # Clone llama.cpp | |
| git clone https://github.com/ggerganov/llama.cpp.git | |
| cd llama.cpp | |
| # Build it | |
| make clean | |
| LLAMA_METAL=1 make | |
| # Download model | |
| export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin |
| --- | |
| include: | |
| - ".solargraph_definitions.rb" | |
| - "app/**/*.rb" | |
| - "config/**/*.rb" | |
| - "lib/**/*.rb" | |
| exclude: | |
| - test/**/* | |
| - vendor/**/* | |
| - ".bundle/**/*" |
| """ | |
| Estimate GPT-3 costs! | |
| Author: Dylan | |
| """ | |
| import math | |
| class GPT3CostsCalculator: | |
| def __init__(self, | |
| gpt3_model_version, |
El lector que voy a usar es el SVEON SCT011M, que es el mas barato que encontr茅 en tienda f铆sica y tiene un precio razonable en Amazon: https://www.amazon.es/dp/B072LTLZW3/
Estos son los pasos que he seguido:
- Descargar Firefox (he probado con la ultima version, 86.0.1)
- Enchufar el lector, sin el DNI (no se si es importante hacerlo aqu铆 o se puede hacer luego, pero mejor no nos arriesgamos, yo lo hice aqu铆 y me ha funcionado)
- Descargar libpkcs11 para Intel o para Apple Silicon. Estos enlaces estan en la web oficial del DNI Electr贸nico por si quieres ver si hay alguna versi贸n m谩s reciente.
- Instalar el paquete (los ficheros se copiaran en
/Library/Libpkcs11-dnie, y en esa misma carpeta se instalara una app para desinstalarlo en e
| class TestCase < ActiveSupport::TestCase | |
| def setup | |
| super | |
| DatabaseCleaner.start | |
| @queries = [] | |
| ActiveSupport::Notifications.subscribe('sql.active_record') do |_, _, _, _, payload| | |
| @queries << payload[:sql] unless payload[:name].in? %w[CACHE SCHEMA] | |
| end | |
| end |
| from math import * | |
| # Cumulative standard normal distribution | |
| def cdf(x): | |
| return (1.0 + erf(x / sqrt(2.0))) / 2.0 | |
| # Intermediate calculation used by both the Bjerksund Stensland 1993 and 2002 approximations | |
| def phi(s, t, gamma, h, i, r, a, v): | |
| lambda1 = (-r + gamma * a + 0.5 * gamma * (gamma - 1) * v**2) * t | |
| dd = -(log(s / h) + (a + (gamma - 0.5) * v**2) * t) / (v * sqrt(t)) |
Feedback loop speed in one of the biggest contributing factors to overall development time. The faster you get results, the faster you can move on to other things. A fast enough test suite is therefore critical to teams' success, and is worth investing some time at the beginning to save in the long run.
Below is a list of techniques for speeding up a Rails test suite. It is not comprehensive, but should definitely provide some quick wins. This list of techniques assumes you're using minitest, but most everything should translate over to rspec by simply replacing test/test_helper.rb with spec/spec_helper.rb.
1 - Download the RDS certificates (root plus region-specific intermediate ones) bundle:
wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem2 - Add config/rds-combined-ca-bundle.pem to the repository and redeploy to Heroku.
3 - Update the DATABASE_URL env var:
That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:
Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):