Skip to content

Instantly share code, notes, and snippets.

View ramalho's full-sized avatar
🏠
Working from home

Luciano Ramalho ramalho

🏠
Working from home
View GitHub Profile
@ramalho
ramalho / dispatch_openai_requests.py
Created April 21, 2023 20:30 — forked from neubig/dispatch_openai_requests.py
A simple script to get results from the OpenAI Asynchronous API
import openai
import asyncio
from typing import Any
async def dispatch_openai_requests(
messages_list: list[list[dict[str,Any]]],
model: str,
temperature: float,
max_tokens: int,
top_p: float,
@ramalho
ramalho / parameterized_test.exs
Created May 14, 2019 01:34 — forked from damonkelley/parameterized_test.exs
Parameterized Tests in Elixir
defmodule ParamerizedTest do
use ExUnit.Case
@parameters [
{0, 0},
{1, 1},
{2, 4},
{3, 9},
]

Principles of Adult Behavior

  1. Be patient. No matter what.
  2. Don’t badmouth: Assign responsibility, not blame. Say nothing of another you wouldn’t say to him.
  3. Never assume the motives of others are, to them, less noble than yours are to you.
  4. Expand your sense of the possible.
  5. Don’t trouble yourself with matters you truly cannot change.
  6. Expect no more of anyone than you can deliver yourself.
  7. Tolerate ambiguity.
  8. Laugh at yourself frequently.
@ramalho
ramalho / go-missing-examples.md
Created January 14, 2018 14:50 — forked from andrestc/go-missing-examples.md
Go std lib funcs/methods missing examples

About this

This list has the goal of helping developers interested in contributing to the Go language but are unsure of where to start. This was not generated manually so some functions and methods here may not require examples (maybe because they are too simple, e.g .String()) and some of these may only make sense in a package level example (which are not considered for this list yet). Use your best judgment and check the documentation before you open up a CL to add an example.

I will try to keep this list as up to date as possible. If you find any mistakes, please comment below and I will try to fix it. I plan on release the code I used to generate this in the future, so other go projects can benefit from it.

@ramalho
ramalho / gist:1299473
Created October 19, 2011 19:54 — forked from pydanny/gist:1298848
PyCon random review script
#!/usr/bin/python
import random
import webbrowser
target = random.randrange(3, 483)
url = 'http://us.pycon.org/2012/review/%s/' % target
webbrowser.open(url)