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
# Write a spark DataFrame into a single CSV files (to open with Excel/other tools easily) | |
# Save the file to S3 | |
import s3fs | |
import pyspark.sql.functions as F # noqa: N812 | |
def spark_to_csv(spark_df, out_path): | |
""" | |
Save the file in part files with spark and then append them together |
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
name: Python Tests | |
jobs: | |
build: | |
runs-on: ubuntu-18.04 | |
strategy: | |
max-parallel: 2 | |
matrix: | |
python-version: [3.5, 3.6, 3.7] |
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 node | |
// To get stats on all channels, call: | |
// node ./delete-slack-messages.js | |
// To delete messages for a particular channel, get the Channel ID and pass as a param: | |
// node ./delete-slack-messages.js CHANNEL_ID | |
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
// CONFIGURATION ####################################################################################################### |
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
d3 = function() { | |
var d3 = { | |
version: "3.3.6" | |
}; | |
if (!Date.now) Date.now = function() { | |
return +new Date(); | |
}; | |
var d3_arraySlice = [].slice, d3_array = function(list) { | |
return d3_arraySlice.call(list); | |
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/python | |
# -*- coding: utf-8 -*- | |
from __future__ import (division, absolute_import, unicode_literals, | |
print_function) | |
import datetime | |
import os | |
import sys |
NewerOlder