Skip to content

Instantly share code, notes, and snippets.

View andytriboletti's full-sized avatar

Andy Triboletti andytriboletti

View GitHub Profile
@Mahedi-61
Mahedi-61 / cuda_11.8_installation_on_Ubuntu_22.04
Last active April 25, 2025 18:27
Instructions for CUDA v11.8 and cuDNN 8.9.7 installation on Ubuntu 22.04 for PyTorch 2.1.2
#!/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
@tbrianjones
tbrianjones / Inflect.php
Last active February 21, 2024 21:28
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
- (void)loadDefaultSettings
{
NSMutableDictionary *defaults = [NSMutableDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default-Settings" ofType:@"plist"]];
// other setup...
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithDictionary:defaults]];
}
- (void)resetDefaultSettings
# monkey-patch irb. see: http://jameskilton.com/2009/04/02/embedding-irb-into-your-ruby-application/
#
require 'irb'
module IRB # :nodoc:
def self.start_session(binding)
unless @__initialized
args = ARGV
ARGV.replace(ARGV.dup)
IRB.setup(nil)
@makevoid
makevoid / README.md
Created August 27, 2011 02:23 — forked from reborg/open_local_html_hotcocoa_webview.rb
Hotcocoa basic WebView hello world (to embed a webpp in a native one basically)

Run

if you don't have macruby and hotcocoa already:

rvm use macruby
gem i hotcocoa

ok then you can run:

hotcocoa webviewbasic