Skip to content

Instantly share code, notes, and snippets.

View crmne's full-sized avatar
👋

Carmine Paolino crmne

👋
View GitHub Profile
@crmne
crmne / occupancy_tracker.ino
Created December 6, 2020 13:45
An Arduino Based occupancy tracker with 2 buttons and a display
#include <LiquidCrystal.h>
#define MAX_SEATS 19
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
const int redButton = 7, greenButton = 6;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
int n_occupied = 0;
byte redButtonState = 0, greenButtonState = 0, prevGreenButtonState = 0, prevRedButtonState = 0;
@crmne
crmne / type_clipboard_contents.ahk
Last active July 31, 2020 10:33
When pasting is disabled... what if you could just type the contents of your clipboard?
; Save this script and run it.
; Win+Shift+v will type the contents of your clipboard
#+v::SendRaw, %Clipboard%
$ ./configure
You have bazel 0.7.0-homebrew installed.
Please specify the location of python. [Default is /usr/bin/python]: /usr/local/bin/python3
Found possible Python library paths:
/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages
Please input the desired Python library path to use. Default is [/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages]
Do you wish to build TensorFlow with Google Cloud Platform support? [Y/n]:
diff --git a/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc b/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc
index 0f7adaf24a..355584456b 100644
--- a/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc
+++ b/tensorflow/core/kernels/concat_lib_gpu_impl.cu.cc
@@ -69,7 +69,7 @@ __global__ void concat_variable_kernel(
IntType num_inputs = input_ptr_data.size;
// verbose declaration needed due to template
- extern __shared__ __align__(sizeof(T)) unsigned char smem[];
+ extern __shared__ unsigned char smem[];
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: master
hooks:
- id: trailing-whitespace
- id: autopep8-wrapper
- id: check-added-large-files
- id: check-ast
language_version: python3.4
- id: check-case-conflict
- id: check-docstring-first
@crmne
crmne / .spacemacs
Created November 22, 2015 12:38
my .spacemacs file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@crmne
crmne / download_zeal_user_docsets.py
Last active June 6, 2022 08:37
A solution to the lack of UI for Dash's user docsets in Zeal. Uses Python 3 and easygui (pip3 install easygui)
"""Download Dash User Docsets and install them in Zeal"""
import configparser
import json
import tarfile
import urllib.request
from pathlib import Path
from sys import platform
import easygui
commit 3762f3baeef518496d8c04b9d44836bc7ec85c81
Author: gperciva <gperciva@0e98fd9d-079e-457f-9c5c-d482923f975d>
Date: Fri Feb 1 00:30:39 2013 +0000
Improve doc building
git-svn-id: svn+ssh://svn.code.sf.net/p/marsyas/code/trunk@5076 0e98fd9d-079e-457f-9c5c-d482923f975d
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
@crmne
crmne / SafariPowerSaverWhitelister.scpt
Created May 12, 2014 11:02
A tool to add websites to Safari Power Saver's whitelist.
on number_to_string(this_number)
set this_number to this_number as string
if this_number contains "E+" then
set x to the offset of "," in this_number
set y to the offset of "+" in this_number
set z to the offset of "E" in this_number
set the decimal_adjust to characters (y - (length of this_number)) thru ¬
-1 of this_number as string as number
if x is not 0 then
set the first_part to characters 1 thru (x - 1) of this_number as string
@crmne
crmne / iTunes - Current Track.scpt
Created May 11, 2014 14:56
Gets the name, artist and album of the current playing track in iTunes and passes it to Launchbar. Very useful to search the current track in Google, Discogs, and the likes.
on replace_chars(this_text, search_string, replacement_string)
set AppleScript's text item delimiters to the search_string
set the item_list to every text item of this_text
set AppleScript's text item delimiters to the replacement_string
set this_text to the item_list as string
set AppleScript's text item delimiters to ""
return this_text
end replace_chars
set myTrack to ""