deb https://mirrors.163.com/ubuntu/ jammy main restricted universe multiverse
deb https://mirrors.163.com/ubuntu/ jammy-security main restricted universe multiverse
deb https://mirrors.163.com/ubuntu/ jammy-updates main restricted universe multiverse
deb https://mirrors.163.com/ubuntu/ jammy-proposed main restricted universe multiverse
deb https://mirrors.163.com/ubuntu/ jammy-backports main restricted universe multiverse
- Install
musl-cross
brew install FiloSottile/musl-cross/musl-cross
- Add
x86_64-unknown-linux-musl
rustup target add x86_64-unknown-linux-musl
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 pandas as pd | |
import plotly.graph_objects as go | |
def sankey(df, columns, measurement, title='Sankey Diagram'): | |
labels = set() | |
for column in columns: | |
labels = labels.union(set(df[column])) | |
labels = list(labels) | |
target_columns = [] |
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 git import Repo | |
import sys | |
import csv | |
def build_changes(repo): | |
changes = [] | |
for commit in repo.iter_commits("master"): | |
for filename, stats in commit.stats.files.items(): | |
changes.append([ |
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
package example | |
import org.apache.spark.sql.execution.streaming.Sink | |
import org.apache.spark.sql.sources.{DataSourceRegister, StreamSinkProvider} | |
import org.apache.spark.sql.streaming.OutputMode | |
import org.apache.spark.sql.{DataFrame, SQLContext, SaveMode} | |
class OverwriteCSVSink(sqlContext: SQLContext, | |
parameters: Map[String, String], |
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
// npm i @kubernetes/client-node | |
const Extensions_v1beta1Api = require('@kubernetes/client-node/dist/api').Extensions_v1beta1Api; | |
const ENDPOINT = 'https://x.x.x.x'; // (IP CAN BE FOUND FROM RESPONSE OF GKE getCluster API) | |
const USERNAME = 'admin'; // (THIS CAN BE FOUND FROM RESPONSE OF GKE getCluster API) | |
const PASSWORD = ''; // THIS CAN BE FOUND FROM RESPONSE OF GKE getCluster API | |
const BASE64_ENCODED_CA = ''; // THIS CAN BE FOUND FROM RESPONSE OF GKE getCluster API | |
const BASE64_ENCODED_CERT = ''; // THIS CAN BE FOUND FROM RESPONSE OF GKE getCluster API |
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
const container = require('@google-cloud/container'); | |
const clusterClient = new container.v1.ClusterManagerClient({ | |
credentials: { | |
"private_key": "", | |
"client_email": "", | |
} | |
}); | |
const projectId = 'projectId'; |
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
// npm install @kubernetes/client-node | |
const clientWrapper = require('@kubernetes/client-node/dist/auth-wrapper'); | |
const ENDPOINT = 'https://x.x.x.x'; | |
const USERNAME = 'admin'; | |
const PASSWORD = ''; | |
const BASE64_ENCODED_CA = ''; | |
const BASE64_ENCODED_CERT = ''; |
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
// npm install selenium-webdriver phantomjs-prebuilt --save | |
const webdriver = require('selenium-webdriver') | |
async function render(driver, filename) { | |
return await driver.executePhantomJS(`this.render("${filename}")`); | |
} | |
const main = async () => { | |
const customPhantom = webdriver.Capabilities.phantomjs(); |
NewerOlder