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
#!/user/local/bin/python | |
# Enter a number or a phrase | |
from itertools import permutations | |
Xset = set() | |
SEARCH = raw_input("Search Phrase: ") | |
SEARCH = SEARCH.split(" ") | |
searchs = list(SEARCH) | |
print searchs | |
print "------------------------------------" | |
perm = permutations(searchs) |
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 warnings | |
warnings.filterwarnings('ignore', message='numpy.dtype size changed') | |
from nltk.corpus import stopwords | |
from nltk.tokenize import word_tokenize, sent_tokenize | |
from nltk.stem.snowball import SnowballStemmer | |
import nltk | |
text = """ | |
as machines grow with artifificial intelligence abilities, and the fact that there \ |
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
# EDITOR.py | |
print (""" | |
for usage: | |
import EDITOR | |
EDITOR.Help() | |
""") | |
""" | |
EDITOR.View() | |
An input window will open. | |
This prints 100 lines, you provide the starting point |
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
{"snippets":[ | |
{ "name" : "Add Snippet", "code" :[ | |
"!cp /home/jack/.local/share/jupyter/nbextensions/snippets/snippets.json snippets-temp.json", | |
"name = \" <place name here>\" ", | |
"codes =\"\"\" ", | |
"<place code here> ", | |
"\"\"\" ", | |
"count = 0 ", | |
"for line in codes.split('\\n'): ", | |
" if len(line) > 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
#!/bin/bash | |
page="$(wget -O - $1)" | |
today=`date +%Y-%m-%d.%H:%M:%S` | |
new=$today".html" | |
echo "$page" >>$new | |
echo "$page" |
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
#!/bin/bash | |
# USAGE: GETip -container- Example: | |
# GETip 9837705e48ae | |
# will return 172.17.0.2 | |
docker inspect $1 | jq -r .[0].NetworkSettings.IPAddress |
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
#!/bin/bash | |
# A script created for viewing text created with Char-rnn | |
# https://github.com/karpathy/char-rnn | |
# this script turns the last file in dirctory "cv" into a variable fn | |
fn=$(ls -rt1 cv | tail -1) | |
# Below this runs the command: | |
# th sample.lua on the last file created in the directory 'cv' | |
# and primes it with the text entered after answer : | |
# The -gpuid -1 means no GPU is used just a CPU | |
# Actual use Example: |
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 | |
# R matrix | |
R = np.matrix([ [-1,-1,-1,-1,0,-1], | |
[-1,-1,-1,0,-1,100], | |
[-1,-1,-1,0,-1,-1], | |
[-1,0,0,-1,0,-1], | |
[-1,0,0,-1,-1,100], | |
[-1,0,-1,-1,0,100] ]) |
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
from skvideo.io import * | |
import json | |
INFO = ffprobe("VID/videos/out.mp4") | |
print(json.dumps(INFO, indent=4)) | |
""" | |
results in: | |
{ | |
"video": { | |
"@index": "0", | |
"@codec_name": "h264", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer