Skip to content

Instantly share code, notes, and snippets.

@shalini-at-hub
shalini-at-hub / PY0101EN-1-1-Types.ipynb
Created Feb 10, 2021
Created on Skills Network Labs
View PY0101EN-1-1-Types.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nsivabalan
nsivabalan / spark script
Created Feb 10, 2021
script to reproduce MOR w/ global bloom and read optimized query
View spark script
import java.io.File
import java.nio.file.Paths
import java.sql.Timestamp
import org.apache.commons.io.FileUtils
import org.apache.hudi.DataSourceWriteOptions
import org.apache.hudi.DataSourceReadOptions
import org.apache.hudi.config.{HoodieCompactionConfig, HoodieIndexConfig, HoodieStorageConfig, HoodieWriteConfig}
import org.apache.hudi.hive.MultiPartKeysValueExtractor
import org.apache.hudi.index.HoodieIndex
View cgi-leds-emulation.sh
#!/bin/bash
echo -ne "HTTP/1.1 200 OK\r\n"
echo -ne "Content-Type: text/event-stream\r\n"
echo -ne "Cache-Control: no-cache\r\n"
echo -ne "Connection: keep-alive\r\n"
echo -ne "\r\n"
while true; do
x=$((1 + $RANDOM % 15000))
@slyfox90
slyfox90 / 4.5_Dash_Basics.ipynb
Created Feb 10, 2021
Created on Skills Network Labs
View 4.5_Dash_Basics.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@palethorper
palethorper / Update-AUPackages.md
Created Feb 10, 2021
Update-AUPackages Report #powershell #chocolatey
View Update-AUPackages.md
@ruo91
ruo91 / ocp4-custom-router-haproxy-config.template
Created Feb 10, 2021
OpenShift v4.x - Router(HAProxy) Template
View ocp4-custom-router-haproxy-config.template
{{/*
haproxy-config.cfg: contains the main config with helper backends that are used to terminate
encryption before finally sending to a host_be which is the backend that is the final
backend for a route and contains all the endpoints for the service
*/}}
{{- define "conf/haproxy.config" }}
{{- $workingDir := .WorkingDir }}
{{- $defaultDestinationCA := .DefaultDestinationCA }}
{{- $dynamicConfigManager := .DynamicConfigManager }}
{{- $router_ip_v4_v6_mode := env "ROUTER_IP_V4_V6_MODE" "v4" }}
View git-crypt-rekey.sh
#!/bin/bash
# Unlock the directory, we need the unencrypted versions of the files
git crypt unlock
# Re-initialize git crypt, generating a new key
rm .git/git-crypt/keys/default
git crypt init
# Make the key available to the current users
@choco-bot
choco-bot / FilesSnapshot.xml
Created Feb 10, 2021
nexus-repository v3.29.2.02 - Passed - Package Tests Results
View FilesSnapshot.xml
<?xml version="1.0" encoding="utf-8"?>
<fileSnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<files>
<file path="C:\ProgramData\chocolatey\lib\nexus-repository\nexus-3.29.2-02-win64.zip.txt" checksum="50C5E7FC48146E0EBB4799972343F4D5" />
<file path="C:\ProgramData\chocolatey\lib\nexus-repository\nexus-repository.nupkg" checksum="F7B036955E1911EF091DF2198A39E897" />
<file path="C:\ProgramData\chocolatey\lib\nexus-repository\nexus-repository.nuspec" checksum="6631CE159F2BBF51ADB9BAB59CCE29F2" />
<file path="C:\ProgramData\chocolatey\lib\nexus-repository\tools\chocolateyinstall.ps1" checksum="F58BD0ABCA7738E9E842452FC3A63323" />
<file path="C:\ProgramData\chocolatey\lib\nexus-repository\tools\chocolateyuninstall.ps1" checksum="42F564431BE78C3B889DC5B3614CE368" />
<file path="C:\ProgramData\chocolatey\lib\nexus-repository\tools\supportingfunctions.ps1" checksum="42087AD9DE59D32C78184A474B4AD66A" />
</files>
@WWelna
WWelna / gab2redis.py
Created Feb 10, 2021
Loading Gab dump into Redis
View gab2redis.py
#!/bin/python3
import json
import lzma
import redis
import glob
from datetime import timedelta
r = redis.Redis()
ids = []
@stefanionescu
stefanionescu / prai_users_query.sql
Created Feb 10, 2021
Query for pulling Proto RAI users
View prai_users_query.sql
SELECT DISTINCT address FROM (
(
# Query EOA that interacted with a specific list of contracts
SELECT tx.from_address as address
# Table including all Ethereum transactions
FROM bigquery-public-data.crypto_ethereum.transactions AS tx
# Date just before PRAI deployement
WHERE tx.block_timestamp > TIMESTAMP("2020-10-24 00:00:00+00")
# PRAI settlement block
AND tx.block_number <= 11724918