This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python3 | |
import os | |
from PIL import Image | |
yourpath = os.getcwd() | |
for root, dirs, files in os.walk(yourpath, topdown=False): | |
for name in files: | |
if ".tif" in os.path.splitext(os.path.join(root, name))[1].lower(): | |
if os.path.isfile(os.path.splitext(os.path.join(root, name))[0] + ".jpg"): | |
print("A jpeg file already exists for %s" % name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import site | |
# sitepackagessite = site.getsitepackages()[0] | |
# if sitepackagessite not in sys.path: | |
# sys.path[0:0] = ['/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages'] | |
# print sys.path | |
from os.path import expanduser | |
import sys | |
import requests | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lldb | |
import json | |
import subprocess | |
from os.path import expanduser | |
import time | |
import os | |
import sys | |
home = expanduser("~") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lldb | |
""" | |
NOTE: | |
LLDB print adds a bunch of other stuff to the string like in this example | |
(lldb) script | |
-- ENTERED PYTHON REPL | |
>>> print lldb.frame.GetDisplayFunctionName() | |
::-[ASLayoutTransition applySubnodeInsertionsAndMoves]() | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lldb | |
""" | |
NOTE: | |
LLDB print adds a bunch of other stuff to the string like in this example | |
(lldb) script | |
-- ENTERED PYTHON REPL | |
>>> print lldb.frame.GetDisplayFunctionName() | |
::-[ASLayoutTransition applySubnodeInsertionsAndMoves]() | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) microphone:(EZMicrophone *)microphone | |
hasAudioReceived:(float **)buffer | |
withBufferSize:(UInt32)bufferSize | |
withNumberOfChannels:(UInt32)numberOfChannels { | |
dispatch_async(dispatch_get_main_queue(),^{ | |
NSLog(@"\tbuffer size %ld", (long)bufferSize); | |
float buffInternal[557] = { 0 }; | |
float *buffCopy[1] = {buffInternal}; | |
memcpy(buffCopy, buffer, sizeof(buffCopy)); | |
NSLog(@"first buffCopy %f", *buffCopy[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# ** DATASET ** | |
# https://archive.ics.uci.edu/ml/machine-learning-databases/servo/ | |
# ** DATASET ** | |
# sigmoid function | |
def nonlin(x,deriv=False): | |
if(deriv==True): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
// ubuntu peeps this ones for you | |
// run export PATH=~/swift3/usr/bin/:"${PATH}" in pwd first | |
import Foundation | |
// ********************* debug ********************* | |
let showDebug = false | |
func printS(_ output: String) { | |
if showDebug { print(output) } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Copyright 2016 Google Inc. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |