Skip to content

Instantly share code, notes, and snippets.

View Nick-Harvey's full-sized avatar

Nick Harvey Nick-Harvey

View GitHub Profile
@Nick-Harvey
Nick-Harvey / gist:3988269
Created October 31, 2012 16:55
Install Nvidia Drivers
$ yum install kmod-nvidia nvidia-settings nvidia-xconfig
@Nick-Harvey
Nick-Harvey / gist:3988235
Created October 31, 2012 16:51
Nvidia Packages
$ rpm -qa | grep nvidia
xorg-x11-drv-nvidia-libs-304.60-1.fc17.x86_64
nvidia-xconfig-1.0-20.fc17.x86_64
xorg-x11-drv-nvidia-304.60-1.fc17.x86_64
kmod-nvidia-304.60-1.fc17.x86_64
kmod-nvidia-3.6.3-1.fc17.x86_64-304.60-1.fc17.x86_64
nvidia-settings-1.0-22.fc17.x86_64
@Nick-Harvey
Nick-Harvey / gist:3988206
Created October 31, 2012 16:47
Nvidia Cards
03:00.0 VGA compatible controller: nVidia Corporation G98 [Quadro NVS 295] (rev a1)
04:00.0 VGA compatible controller: nVidia Corporation NV44 [Quadro NVS 285] (rev a1)
@Nick-Harvey
Nick-Harvey / gist:3988426
Created October 31, 2012 17:18
xorg.conf
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 304.60 (mockbuild@) Thu Oct 25 17:56:54 CEST 2012
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 304.60 (mockbuild@) Thu Oct 25 17:46:49 CEST 2012
# RPM Fusion - nvidia-xorg.conf
#
Section "ServerLayout"
@Nick-Harvey
Nick-Harvey / Sosreport Example Plugin
Created June 11, 2013 19:49
Sosreport Example Plugin
### This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
from sos.plugins import Plugin, RedHatPlugin
class Openshift(Plugin, RedHatPlugin):
'''Openshift related information'''
plugin_name = "Openshift"
option_list = [("broker", "Gathers broker specific files", "slow", False),
("node", "Gathers node specific files", "slow", False)]
@Nick-Harvey
Nick-Harvey / gist:5847094
Created June 24, 2013 00:43
My Openshift plugin
### This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
@Nick-Harvey
Nick-Harvey / gist:8220591
Created January 2, 2014 15:09
First Java App
import java.util.Scanner;
public class MyFirstClass {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
double PI=3.14;
double radius, area, circumference;
System.out.print("Enter the radius: ");
radius = sc.nextDouble();
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1021, in _do_call
return fn(*args)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1003, in _run_fn
status, run_metadata)
File "/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 89, in __exit__
next(self.gen)
File "/usr/local/lib/python3.6/site-packages/tensorflow/python/framework/errors_impl.py", line 469, in raise_exception_on_not_ok_status
pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InvalidArgumentError: Incompatible shapes: [1176,20] vs. [1176]
from __future__ import print_function
import tensorflow as tf
import numpy
import matplotlib.pyplot as plt
import pandas as pd
import os
os.chdir('/Users/Nick/Git/Machinelearning')
# Define our dataset