Skip to content

Instantly share code, notes, and snippets.

View gnomezgrave's full-sized avatar
🪲
Just trying to fix bugs in the world...

Praneeth Peiris gnomezgrave

🪲
Just trying to fix bugs in the world...
View GitHub Profile
@gnomezgrave
gnomezgrave / header.php
Last active March 4, 2022 12:21
Hide WordPress Cali Theme Category Posts Slider
/**
The setting "cali_post_slider_hide_cat" is saved in the Post Slider section, but it's never used.
So, we need to extract the value in the header.php
Add the below condition to the if clause along with `is_home()`.
```
!get_theme_mod('cali_post_slider_hide_cat', false) &&
```
@gnomezgrave
gnomezgrave / Dockerfile
Last active March 25, 2021 04:42
Dataflow Flex Templates
FROM gcr.io/dataflow-templates-base/python3-template-launcher-base
RUN mkdir -p /dataflow/template
WORKDIR /dataflow/template
COPY pipeline ${WORKDIR}/pipeline
COPY spec/python_command_spec.json ${WORKDIR}/python_command_spec.json
@gnomezgrave
gnomezgrave / parquet_to_json_in_aws_glue.py
Created October 19, 2020 09:09
Simple script to convert Parquet files to JSON using AWS Glue
import sys
from awsglue.context import GlueContext
from pyspark.context import SparkContext
from awsglue.utils import getResolvedOptions
def load(context, bucket, prefix=""):
dynamic_frame = context.create_dynamic_frame_from_options(
import time
my_list = [i for i in range(0, 100000)]
def manipulate(element):
return element ** 2