Skip to content

Instantly share code, notes, and snippets.

@flash42
flash42 / meeting_notes.org
Created September 29, 2021 14:14
Meeting notes: PB
  • Zozi: steep issue is on content teams plate as well
  • Guided / step-by-step projects
  • Cipi: step-by-step is not the best approach for pb students. OOP is different
    • Why step by step is not useful
      • Examples: Simple calculator / Flowchart
        • Simple calculator is very complicated - maybe it should be simpler
    • Lot of new concepts
      • Feedback from flowchart
    • Students are not doing the project it is hard
    • Assumption: workshop would be better for introducing this concept
@flash42
flash42 / merge_dict.py
Last active May 29, 2020 15:11
[ProgBasics] merge_dict
# https://github.com/morcsanyitamas/pythonic-dictionaries
dict_one = {'a': 1, 'b': 2, 'c': 3}
dict_two = {'d': 1, 'e': 2, 'f': 3, 'a': 99}
def sort_dict(d):
from collections import OrderedDict
return OrderedDict(sorted(d.items()))
def merge_dict(a, b):
return {key:a.get(key, 0) + b.get(key, 0) for key in set(list(a.keys()) + list(b.keys()))}
@flash42
flash42 / signature.html
Last active April 20, 2020 16:46 — forked from seniorpreacher/signature.html
cc.tools.signature
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Codecool e-mail signature generator</title>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/sandstone/bootstrap.min.css" rel="stylesheet" integrity="sha384-QqZs0aSOGFan3GWVdP4PyCBp6icaF/4n8Q+wsmZUTiiVIqE4r4tFYcb8Osf+8y45" crossorigin="anonymous">
</head>
@flash42
flash42 / concentration_meditation_ws_2020_03_27.md
Last active March 27, 2020 16:36
Concentration & meditation workshop chat log

What makes you more comfortable in your home-office

  • szétadom a madárcsicsergést a háttérben
  • rainsound
  • szamomra fontos fizikailag is elfaradni
  • zene hallgatás, zenélés, kutyaséta, napfürdő, sütés-főzés, virággondozás, olvasás, logikai játékok...
  • Komoly zene
  • rendezett munkakörnyezet, asztal
  • itthoni tanulásnak is igyekszem egy hivatalos formát adni

What we practiced

@flash42
flash42 / concentration_meditation_ws.md
Last active March 20, 2020 14:34
Concentration and meditation workshop

To get the full benefit of the workshop practice the breathing technique three times a day practice we did together.

Tools and information about them

  • Nasal diaphragmatic breathing
    • Can be used during stress reaction
    • Can be used before interview / PA situation
    • Practiced by Navy / Athletes / Therapists / etc.
    • Breath controls body and bodily functions have immediate connection to the brain
  • For healthy brain functions proper amount of sleep is needed
  • Meditation / mindfulnes techniques can be utilized to break out of thought loops
@flash42
flash42 / IntersectionType.java
Created September 26, 2019 16:36
Use intersection type and method overloading to create type-safe collection initializer
import java.util.List;
import java.util.ArrayList;
// Demonstrate the usage of intersection types in Java
// We have a quite minimal setup so most of our types are created as inner classes
// Goal:
// We want to store items in two separate lists. These lists are filled by our clients calling the `addItem` method
// Our clients don't know about the implementation (two lists) and we don't want to use `instanceof`.
public class IntersectionType {
@flash42
flash42 / install-haxe.sh
Last active July 4, 2018 14:10
Installer for haxe 3.1.3
#!/bin/sh
# Copied from: https://gist.github.com/jgranick/8cc40e2e0f277146725f
HAXE_VERSION=3.1.3
NEKO_VERSION=2.0.0
if [ `uname -m` = "armv7l" ]; then
http://10.0.0.249:9081/integration_test_worker.html?grep=Arrow%20and%20line%20properties.Can%20increase%20arrow%20thickness
@flash42
flash42 / Bacon_polling_and_errors.md
Last active August 29, 2015 14:09
Can we find a better way for shutting down polling and throwing errors in Bacon.js?
Unsubscribe from polling with ugly unsubBus

I've implemented polling with unsubBus "pattern". Can you suggest something better? Pseudo code:

var unsubBus = new Bacon.Bus();
// Poll job status code until it's successful
var succStream = Bacon.interval(pollInterval)
    .takeUntil(unsubBus)
 .flatMapLatest(function (v) { return this.checkStatus(jobId); })
@flash42
flash42 / concatenative_lisp.clj
Created July 27, 2014 11:58
Comments for elvish documentation Appendix A
(require ['clojure.string :refer '(upper-case)])
;; In Clojure there is a good vector type for storing strings
(def strs ["aha" "LOLaha" "hahaLOL" "hum?"])
;; One can write it in clojure with the concatenative form as well
;; http://clojuredocs.org/clojure_core/clojure.core/-%3E%3E
(->> strs (filter #(re-find #"LOL" %)) (map upper-case) sort)