This file contains 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
# -*- coding: utf-8 -*- | |
class Nodi(object): | |
"""Implementazione dei nodi per un ABR""" | |
def __init__(self, value, father): | |
super(Nodi, self).__init__() | |
self.value = value | |
self.father = father | |
self.DX = None | |
self.SX = None |
This file contains 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
(defproject audiotagger "1.0.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:dependencies [[org.clojure/clojure "1.3.0"] | |
[org/jaudiotagger "2.0.3"]] | |
:java-source-path [["src/java"]] | |
:main audiotagger.core) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(ns audiotagger.core |
This file contains 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 clojutag.core | |
(:gen-class) | |
(:import [org.jaudiotagger.audio AudioFileIO] | |
[org.jaudiotagger.tag Tag FieldKey]) | |
(:require [clojure.string :as str])) | |
(defn -main [& args] | |
(let [fl (new java.io.File "C:/Users/mosciatti/Desktop/Rihanna Umbrella PARODY Chris Brown - Copy.mp3") | |
inputfile (new AudioFileIO) | |
audiofile (.readFile inputfile fl) |
This file contains 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package echo_nest; | |
import com.echonest.api.v4.*; | |
import java.io.File; | |
import java.io.IOException; |
This file contains 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 clojutag.core | |
(:gen-class) | |
(:import [org.jaudiotagger.audio AudioFileIO] | |
[org.jaudiotagger.tag Tag FieldKey] | |
[org.jaudiotagger.audio.real RealTag] | |
[com.echonest.api.v4 Song EchoNestAPI]) | |
(:require [clojure.string :as str])) | |
(def api-key "SP3VJBGXDTYFD6IBT") |
This file contains 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
user> (use 'lamina.core 'aleph.tcp 'gloss.core) | |
nil | |
user> (defn handler [ch client-info] | |
(receive-all ch | |
#(enqueue ch (str "You said " %)))) | |
#'user/handler | |
user> (start-tcp-server handler {:port 10000, :frame (string :utf-8 :delimiters ["\r\n"])}) | |
#<netty$start_server$reify__6969 aleph.netty$start_server$reify__6969@aa85638> | |
user> (tcp-client {:host "localhost", :port 5635, :frame (string :utf-8 :delimiters ["\r\n"])}) | |
<< ... >> |
This file contains 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 bayle.core | |
(require clojure.set)) | |
(defprotocol NODE | |
(change [this key new-value]) | |
(add-parent [this new-parent]) | |
(add-non-descendent [this new]) | |
(node? [this]) | |
(add-chile [this child])) |
This file contains 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
(deftype Node [name table] | |
Object | |
(equals [this other] | |
(= (:name this) (:name other))) | |
(hashCode [this] | |
(.hashCode (:name this)))) | |
;; if i try | |
(set [(Node. :a "mmm") (Node. :a "bbbb")]) |
This file contains 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
#!/bin/bash | |
# The logic to start up your application should be put in this | |
# script. The application will work only if it binds to | |
# $OPENSHIFT_INTERNAL_IP:8080 | |
# save as .openshift/action_hooks/start | |
export HTTP_CLIENT="wget --no-check-certificate -O" | |
export PORT=$OPENSHIFT_INTERNAL_PORT | |
export HOST=$OPENSHIFT_INTERNAL_IP:8080 | |
export HOME=$OPENSHIFT_DATA_DIR/home |
This file contains 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
;;; MODELS | |
(ns morgan.models.social | |
(:require [clj-http.client :as client]) | |
(:import [org.scribe.oauth OAuthService] | |
[org.scribe.builder ServiceBuilder] | |
[org.scribe.model Token Verifier OAuthRequest Verb]) | |
(:import [org.scribe.builder.api FacebookApi TwitterApi])) | |
(def facebook-service |
OlderNewer