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 todomvc | |
(:require [reagent.core :as reagent :refer [atom]])) | |
(defonce todos (atom (sorted-map))) | |
(defonce counter (atom 0)) | |
(defn add-todo [text] | |
(let [id (swap! counter inc)] | |
(swap! todos assoc id {:id id :title text :done false}))) |
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
Guerilla Open Access Manifesto | |
Information is power. But like all power, there are those who want to keep it for | |
themselves. The world's entire scientific and cultural heritage, published over centuries | |
in books and journals, is increasingly being digitized and locked up by a handful of | |
private corporations. Want to read the papers featuring the most famous results of the | |
sciences? You'll need to send enormous amounts to publishers like Reed Elsevier. | |
There are those struggling to change this. The Open Access Movement has fought | |
valiantly to ensure that scientists do not sign their copyrights away but instead ensure |
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 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
""" | |
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
If you don't want to create a .gitignore file to share with others, you can | |
create rules that are not committed with the repository. You can use this | |
technique for locally-generated files that you don't expect other users to | |
generate, such as files created by your editor. | |
Use your favorite text editor to open the file called .git/info/exclude | |
within the root of your Git repository. Any rule you add here will not be | |
checked in, and will only ignore files for your local repository. |
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
The Boy Scouts have a rule: "Always leave the campground cleaner than you found it." If you find a mess on the ground, you clean it up | |
regardless of who might have made the mess. You intentionally improve the environment for the next group of campers. Actually the | |
original form of that rule, written by Robert Stephenson Smyth Baden-Powell, the father of scouting, was "Try and leave this world a | |
little better than you found it." | |
What if we followed a similar rule in our code: "Always check a module in cleaner than when you checked it out." No matter who the | |
original author was, what if we always made some effort, no matter how small, to improve the module. What would be the result? | |
I think if we all followed that simple rule, we'd see the end of the relentless deterioration of our software systems. Instead, our | |
systems would gradually get better and better as they evolved. We'd also see teams caring for the system as a whole, rather than just |
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 com.mycompany.myproject.resources.utils; | |
import com.fasterxml.jackson.databind.JavaType; | |
import io.swagger.converter.ModelConverter; | |
import io.swagger.converter.ModelConverterContext; | |
import io.swagger.models.Model; | |
import io.swagger.models.Xml; | |
import io.swagger.models.properties.Property; | |
import io.swagger.models.properties.StringProperty; | |
import io.swagger.util.Json; |
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
(require '[clojure.math.combinatorics :refer [combinations]]) | |
(defn ∩-prob | |
[a & more] | |
(reduce * a more)) | |
(defn ∪-prob [a b & more] | |
"https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle#In_probability" | |
(let [ps (concat [a b] more) | |
n (count ps)] |
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
++++++++++[>+++++++>++++++++++>+++++++++++>++++++++++++>+++>+++++++<<<<<<-] | |
>++.>---.>++..>+.>++.>-.<<<<.>+++.+.<++++.>--.>>.<<<+.>.---.--.>>. | |
<<<<+++++.>>++.-.<+++++.------.>>.<<<+++.>----.>>-----.<<++.>------.>>+. |
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
@startuml | |
(*) --> if "MonkeyPatchable?" then | |
-right->[YES] "Contact téléphonique" | |
-right-> if "Match?" then | |
-right-> [YES] "Entretien contact" as e1 | |
else | |
-left-> [NO] (*) |
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
{ | |
:db-version "3.2.13" | |
:db-port 27017 | |
:db-data-dir "/tmp/mongo-data-files" | |
} |