Skip to content

Instantly share code, notes, and snippets.

View smedegaard's full-sized avatar

Anders Smedegaard Pedersen smedegaard

View GitHub Profile
@smedegaard
smedegaard / battery-degradation.ipynb
Created September 4, 2023 08:24
battery degradation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
This is a template for creating custom ColumnPairMapExpectations.
For detailed instructions on how to use it, please see:
https://docs.greatexpectations.io/docs/guides/expectations/creating_custom_expectations/how_to_create_custom_column_pair_map_expectations
"""
from typing import Optional
from great_expectations.compatibility import pyspark
from great_expectations.compatibility.pyspark import functions as F
from marvin import ai_fn
@ai_fn
def generate_data() -> list[str]:
"""
Generates a valid csv as a list of strings, with the columns 'foo', 'bar', 'baz'.
Where foo contains integers between 0 and 100
bar contains floats between -200 and 50
baz is randomized bollean values
---
- name: Create SSL Certificate Generation Directory
file:
path: /var/ssl/private/generation/trustCAs
state: directory
mode: 0755
- name: Split CA Certificate Bundle into Cert Files
shell: |
cat {{ssl_ca_cert_filepath}} | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print > ("/var/ssl/private/generation/trustCAs/ca" n ".pem")}'
- set_fact:
extra_args: ""
when: not fips_enabled|bool
- set_fact:
extra_args: "-providerpath {{fips_jar_path}} -providerclass {{fips_provider_class}}"
when: fips_enabled|bool
- name: Create Truststore and Import the CA Cert
shell: |
@smedegaard
smedegaard / docker-compose.yaml
Created November 25, 2019 08:23
Docker sompose file for Udacity Streaming nanodegree
#
# This docker-compose file starts and runs:
# * A 3-node kafka cluster
# * A 1-zookeeper ensemble
# * Schema Registry
# * Kafka REST Proxy
# * Kafka Connect
#
version: '3.7'
@smedegaard
smedegaard / template.xml
Created January 27, 2017 07:56
Visual Studio project template .vstemplate
<ProjectItem ReplaceParameters="true" TargetFileName="$projectname$Module.cs">TemplateModule.cs</ProjectItem>
@smedegaard
smedegaard / template.csproj
Created January 27, 2017 07:53
Visual Studio project template .csproj
<ItemGroup>
...
<Compile Include="$safeprojectname$Module.cs" />
...
</ItemGroup>
/*
* classList.js: Cross-browser full element.classList implementation.
* 2014-07-23
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
/*global self, document, DOMException */
@smedegaard
smedegaard / index.html
Last active October 1, 2015 10:06
LivePlayer example
<!doctype html>
<html>
<head>
<title>LivePlayer example</title>
<!--[if lte IE 9]>
<script type="text/javascript"
src="https://rawgit.com/es-shims/es5-shim/master/es5-shim.js"></script>
<script type="text/javascript"
src="https://rawgit.com/aFarkas/html5shiv/master/dist/html5shiv.js"></script>
<script type="text/javascript"