Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.
You've got two main options:
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, |
import { getAuth, withClerkMiddleware } from "@clerk/nextjs/server"; | |
import { NextResponse, NextFetchEvent } from "next/server"; | |
import type { NextRequest } from "next/server"; | |
import { Ratelimit } from "@upstash/ratelimit"; | |
import { Redis } from "@upstash/redis"; | |
// Add public paths for Clerk to handle. | |
const publicPaths = ["/", "/sign-in*", "/sign-up*", "/api/blocked"]; | |
// set your rate limit. |
var requestStartTime = Date.now() | |
const stream = new ReadableStream({ | |
async start(controller) { | |
const onParse = (event: ParsedEvent | ReconnectInterval) => { | |
if (event.type === "event") { | |
const data = event.data; | |
if (data === "[DONE]") { | |
controller.close(); |
Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
Mute these words in your settings here: https://twitter.com/settings/muted_keywords | |
ActivityTweet | |
generic_activity_highlights | |
generic_activity_momentsbreaking | |
RankedOrganicTweet | |
suggest_activity | |
suggest_activity_feed | |
suggest_activity_highlights | |
suggest_activity_tweet |
func playAudio() { | |
do { | |
if let fileURL = Bundle.main.path(forResource: "Game Show Win", ofType: "wav") { | |
audioPlayer = try AVAudioPlayer(contentsOf: URL(fileURLWithPath: fileURL)) | |
audioPlayer?.volume = 0.4 | |
} else { | |
print("No file with specified name exists") | |
} | |
} catch let error { |
// RoommateMatchQuestionViewController.swift | |
let vc = RoommateMatchQuestionViewController.newInstance() | |
vc.viewModel = self.viewModel.viewModelForNextQuestion() | |
let transition = CATransition() | |
transition.duration = 0.5 | |
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut) | |
transition.type = kCATransitionFade |
extension UIView { | |
func findFirstSuperview<T>(ofClass viewClass: T.Type, where predicate: (T) -> Bool) -> T? where T: UIView { | |
var view: UIView? = self | |
while view != nil { | |
if let typedView = view as? T, predicate(typedView) { | |
break | |
} | |
view = view?.superview | |
} |
<html> | |
<head> | |
</head> | |
<body> | |
<p class="send-instructions">Enter your number and we'll send you a link to download the app</p> | |
<form id="enter-phone-number" onsubmit="sendBranchLink(this); return false;" class="row"> | |
<div class="large-12 columns"> | |
<div class="row collapse"> | |
<div class="small-7 medium-10 columns"> | |
<input id="phone" type="tel" pattern="^\(?\+?[\d\(\-\s\)]+$" class="input-group-field" placeholder="(408) 219-0093" data-placeholder=""> |