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
Hi, | |
Just a snippet of code to demonstrate the solution to people who arrive here and are still scratching their heads: | |
import flickr_api | |
flickr_api.set_keys(api_key = 'my_api_key', api_secret = 'my_secret') | |
a = flickr_api.auth.AuthHandler() | |
url = a.get_authorization_url("read") | |
print url |
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 textblob import TextBlob, Word | |
import sys | |
import random | |
from newspaper import Article | |
from fuzzywuzzy import fuzz | |
from nltk.stem import WordNetLemmatizer | |
def nphra(text): | |
# Extract Noun Phrases from text input | |
blob = TextBlob(text) |
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
# CIS Controls | |
from: https://www.cisecurity.org/controls/ | |
## Basic CIS Controls | |
1. Inventory and Control of Hardware Assets | |
2. Inventory and Control of Software Assets | |
3. Continuous Vulnerability Management | |
4. Controlled Use of Administrative Privileges | |
5. Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers |
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
float x, y, z; | |
void setup() { | |
size(800, 800, P3D); | |
// setup translate amounts to center screen | |
x = width / 2; | |
y = height / 2; | |
// gonna have the z-axis 'pulsate' as per the last line (sin) |
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
<?xml version="1.0"?> | |
<opml version="1.0"><head><title>Overcast Podcast Subscriptions</title></head><body><outline type="rss" text="IRE Radio Podcast" title="IRE Radio Podcast" xmlUrl="http://feeds.feedburner.com/ire-nicar" htmlUrl="http://www.ire.org/"/><outline type="rss" text="O'Reilly Data Show - O'Reilly Media Podcast" title="O'Reilly Data Show - O'Reilly Media Podcast" xmlUrl="http://feeds.podtrac.com/IOJSwQcdEBcg" htmlUrl="https://www.oreilly.com/"/><outline type="rss" text="Korea and the World" title="Korea and the World" xmlUrl="http://koreaandtheworld.libsyn.com/rss" htmlUrl="http://www.koreaandtheworld.org/"/><outline type="rss" text="Tumble Science Podcast for Kids" title="Tumble Science Podcast for Kids" xmlUrl="http://feeds.sciencepodcastforkids.com/tumblepodcast" htmlUrl="http://www.tumblepodcast.com/"/><outline type="rss" text="China Tech Talk" title="China Tech Talk" xmlUrl="https://feeds.simplecast.com/400uRY7l" htmlUrl="https://anchor.fm/china-tech-talk"/><outline type="rss" text="Radiolab" |
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 | |
from scipy.io import wavfile | |
import os | |
import numpy as np | |
import argparse | |
from tqdm import tqdm | |
# Utility functions |
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 bash | |
# Usage: sudo ./restore_functionality.sh | |
#ps aux | grep sentinel | awk -F " +" '{print $2}' | xargs kill | |
while true; do | |
launchctl kill SIGKILL system/com.sentinelone.sentineld | |
launchctl kill SIGKILL system/com.sentinelone.sentineld-helper | |
launchctl kill SIGKILL system/com.sentinelone.sentineld-guard | |
launchctl kill SIGKILL system/com.sentinelone.sentineld-updater |
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
cd "${0%/*}" | |
# Check which user is logged in | |
user=$(stat -f '%Su' /dev/console) | |
# Check if hosts file contains 'google' | |
if $(grep -q google /etc/hosts);then | |
GOOGLE=true | |
else | |
GOOGLE=false |
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
// grey dots colored dot p5.js | |
let canvasedge = 600; | |
// how much to increment each for loop by | |
let inc = 30; | |
let ra_x = 0; | |
let ra_y = 0; | |
let lastX=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
for i in range(1200,2900): | |
print((b'\\u%d' % i).decode('raw_unicode_escape'),end='') |