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
module Huffman where | |
import Data.Array | |
import Data.Char | |
import Data.List | |
a ~> b = b a | |
data Huffman_Tree = | |
HLeaf Int Char |
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
import random | |
def generatePassword(length): | |
def bigSample(orig, ln): | |
ls = [] | |
while ln - len(ls) > len(orig): | |
ls = ls + orig | |
random.shuffle(ls) | |
return ls + random.sample(orig, ln - len(ls)) | |
vowels = bigSample(list("aeuio"), length // 2 + 1) |
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
import java.util.*; | |
class Primes { | |
public static void main(String args[]) { | |
int n = 100000, status = 1, num = 3; | |
if (n >= 1) { | |
System.out.println("First "+n+" prime numbers are :-"); | |
System.out.println(2); | |
} |
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
# Conky settings | |
background yes | |
update_interval 1 | |
double_buffer yes | |
#no_buffers yes | |
# Window specifications | |
gap_x 20 |
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
module.exports = function (grunt) { | |
'use strict'; | |
// Project configuration | |
grunt.initConfig({ | |
rasterize: { | |
front: { | |
vector: 'src/front.svg', | |
raster: [{ path: 'preview/front.png' }] | |
}, | |
inside: { |
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
[ | |
/** | |
* Based on <http://ilyabirman.ru/projects/typography-layout/> | |
*/ | |
// «french» | |
{ "keys": ["alt+,"], "command": "insert_snippet", "args": {"contents": "«$0»"}, "context": | |
[ | |
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |
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 | |
MP3DIR="$HOME/music/" | |
PLAYLIST_FILE="${mktemp}" | |
find $MP3DIR -name "*.mp3" -print | shuf > "$PLAYLIST_FILE" | |
exec < "$PLAYLIST_FILE" | |
while read file |
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
// ==UserScript== | |
// @name window test script | |
// @namespace ale+windowtest@incrowd.ws | |
// @include http://jsfiddle.net/* | |
// @include https://jsfiddle.net/* | |
// @include http://fiddle.jshell.net/* | |
// @include https://fiddle.jshell.net/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("wikipedia.org") { | |
html, body { | |
font-family: serif; | |
} | |
#content p { | |
font-size: 0.9em; | |
} |