- Create a service file like
dash_sniffer.service
- Put it in
/lib/systemd/system/
- Reload
systemd
using command:systemctl daemon-reload
- Enable auto start using command:
systemctl enable dash_sniffer.service
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
// Conditionally Load jQuery (javascript) | |
// Source: https://gist.github.com/gists/902090/ | |
var init, maybeLoadJq; | |
init = function() { | |
jQuery(document).ready(function() { | |
alert('Your Code Here'); | |
}); | |
}; |
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 pyramid.config import Configurator | |
from pyramid.view import view_config | |
import json | |
import logging | |
import datetime | |
log = logging.getLogger(__name__) | |
from webservice.model import Session, Machine, LogFile, LogMessage |
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
brew install mongo | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/mongodb/2.2.0-x86_64/homebrew.mxcl.mongodb.plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist | |
# Mongo might be named differently, try this | |
cp /usr/local/Cellar/mongodb**/**/*plist ~/Library/LaunchAgents/ | |
launchctl load -w ~/Library/LaunchAgents/*mongo*plist |
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
try: | |
from xml.etree.cElementTree import XML | |
except ImportError: | |
from xml.etree.ElementTree import XML | |
import zipfile | |
""" | |
Module that extract text from MS XML Word document (.docx). | |
(Inspired by python-docx <https://github.com/mikemaccana/python-docx>) |
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
// This script loops though the list of collection names in a MongoDB and runs the compact operation on them | |
// Simply paste this into the Mongo shell | |
use testDbName; | |
db.getCollectionNames().forEach(function (collectionName) { | |
print('Compacting: ' + collectionName); | |
db.runCommand({ compact: collectionName }); | |
}); |
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
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
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 os import listdir | |
from os.path import isfile, join | |
import re | |
import matplotlib.pyplot as plt | |
import numpy as np | |
path = 'transcripts' |
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
index | file2 | similarity | file1 | |
---|---|---|---|---|
0 | 027.txt | 0.870699976021 | 001.txt | |
1 | 038.txt | 0.86203984054 | 001.txt | |
2 | 045.txt | 0.83739929573 | 001.txt | |
3 | 048.txt | 0.871940130115 | 001.txt | |
4 | 007.txt | 0.839339858402 | 001.txt | |
5 | 009.txt | 0.849677851534 | 001.txt | |
6 | 004.txt | 0.830406980293 | 001.txt | |
7 | 006.txt | 0.878178563493 | 001.txt | |
8 | 031.txt | 0.850476330623 | 001.txt |
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 graphlab as gl | |
import pandas | |
import numpy as np | |
import string | |
import re | |
import unicodedata | |
import math | |
# attempt to load text files | |
import os | |
files = os.listdir(os.getcwd()) |
OlderNewer