Skip to content

Instantly share code, notes, and snippets.


Janos Tolgyesi mrtj

View GitHub Profile
nivleshc / stepfunctions-sagemaker-state-machine.json
Created Apr 30, 2020
This is the AWS Step Function to automate training, build and deployment of an Amazon SageMaker model
View stepfunctions-sagemaker-state-machine.json
"Comment": "An AWS Step Function State Machine to train, build and deploy an Amazon SageMaker model endpoint",
"StartAt": "Create Training Job",
"States": {
"Create Training Job": {
"Type": "Task",
"Resource": "arn:aws:states:::sagemaker:createTrainingJob.sync",
"Parameters": {
"TrainingJobName.$": "$$.Execution.Name",
"ResourceConfig": {
half2me /
Created Apr 23, 2020
RTSP authentication with python and gst-rtsp-server
server = GstRtspServer.RTSPServer()
auth = GstRtspServer.RTSPAuth()
token = GstRtspServer.RTSPToken()
token.set_string('media.factory.role', "user")
basic = GstRtspServer.RTSPAuth.make_basic("user", "password")
auth.add_basic(basic, token)
factory = RtspFactory()
permissions = GstRtspServer.RTSPPermissions()
mrtj /
Created Oct 4, 2018
A python script that enables IoT shadow syncing for an AWS Greengrass Core
import boto3
import logging
import json
import re
import uuid
import argparse
This script enables the IoT shadow syncing for your AWS Greengrass Core.
#-*- coding: utf-8 -*-
import logging
import timeit
import traceback
import time
import gi
gi.require_version('Gst', '1.0')
i3games /
Last active Feb 1, 2021
How to set up your Raspberry Pi including WiFi without monitor and keyboard from a Mac.

Set up Your Raspberry Pi Headless in 10 Easy 🤔 Steps


You want to set up your Raspberry Pi without monitor and keyboard. This is sometimes called "headless". Don't worry, you'll keep your head if you follow these step-by-step instructions (however, see license and disclaimer below). We will install the Raspbian operating system and configure the Pi WiFi from a Terminal session on a Mac.

Prerequisites / Assumptions

You have:

  • A Mac with a SD card reader (either built in or an USB device).
  • A Raspberry Pi 3 B (A Pi 2 B with a compatible WiFi dongle works as well).
mojodna / 0_register_planet.sql
Last active Mar 31, 2022
Sample OSM Athena queries
View 0_register_planet.sql
-- This will register the "planet" table within your AWS account
type STRING,
lat DECIMAL(9,7),
lon DECIMAL(10,7),
View CommitRevealElection.sol
pragma solidity ^0.4.7;
contract CommitRevealElection {
// The two choices for your vote
string public choice1;
string public choice2;
// Information about the current status of the vote
uint public votesForChoice1;
uint public votesForChoice2;
BurntCaramel / 1-example.swift
Created May 27, 2016
Swift Dynamic Properties
View 1-example.swift
public struct Person {
public var firstName: String
public var middleName: String?
public var lastName: String
public var ageInYears: Int
public var fullName: String {
return [firstName, middleName, lastName].flatMap{ $0 }.joinWithSeparator(" ")
alskipp / ignoreNil.swift
Created May 6, 2016
How to ignore `nil` values using RxSwift without using❗️
View ignoreNil.swift
// Create an `Observable` of Optional<Int>
let values: Observable<Int?> = [1, 2, .None, 3, .None, 4, 5].toObservable()
// Method 1: using a free function
// Requires passing the function to `flatMap`
func ignoreNil<A>(x: A?) -> Observable<A> {
return { Observable.just($0) } ?? Observable.empty()
View Sports1M C3D Network to Keras.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.