This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
from subprocess import Popen, PIPE, STDOUT | |
import time | |
HEADPHONE_EVENT = "jack/headphone" | |
p = Popen(["/run/current-system/sw/sbin/acpi_listen"], | |
stdout=PIPE, stderr=STDOUT, bufsize=1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn distinct-by | |
"Returns a stateful transducer that removes elements by calling f on each step as a uniqueness key. | |
Returns a lazy sequence when provided with a collection." | |
([f] | |
(fn [rf] | |
(let [seen (volatile! #{})] | |
(fn | |
([] (rf)) | |
([result] (rf result)) | |
([result input] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, zlib, lib, qt5, saneBackends, makeWrapper, fetchurl }: | |
stdenv.mkDerivation rec { | |
name = "zprint-bin-${version}"; | |
version = "1.0.2"; | |
src = ./.; | |
dontConfigure = true; | |
dontBuild = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns com.wsscode.pathom.viz.standalone.base) | |
(defonce app (atom nil)) | |
(defn reconciler [] | |
(some-> app deref :reconciler)) | |
(defn networks [] | |
(some-> app deref :networking)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:linters | |
{:invalid-arity | |
{:skip-args [clojure.template/do-template]}} | |
:lint-as {com.wsscode.pathom.connect/defresolver clojure.core/defn | |
com.wsscode.pathom.connect/defmutation clojure.core/defn | |
ghostwheel.core/>defn clojure.core/defn | |
ghostwheel.core/>defn- clojure.core/defn | |
fulcro.client.primitives/defsc clojure.core/defn | |
mount.core/defstate clojure.core/def}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns enchilada.simple-demo | |
(:require | |
[jayq.core :refer [show]] | |
[enchilada :refer [ctx canvas]] | |
[monet.canvas :refer [fill-style fill-rect]])) | |
(def dummy) | |
(show canvas) | |
(-> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"image" | |
"image/color" | |
"image/png" | |
"log" | |
"math" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"strconv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace TortOsztalyosGrafikus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SquareMatrix(): | |
"""Square matrix implementation by thenonameguy""" | |
def __init__(self,size): | |
self.size = size | |
self.emptyMatrix() | |
def emptyMatrix(self): | |
self.matrix=[[0 for i in range(self.size)]for j in range(self.size)] | |
def makeIdentity(self): |
NewerOlder