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
| # -*- coding: utf8 -*- | |
| from django import forms | |
| from cars import models | |
| from django.contrib.humanize.templatetags.humanize import intcomma | |
| # Insert an empty value which represent ANY choice | |
| for attr in dir(models): | |
| if attr.endswith('_CHOICES'): | |
| CHOICES = list(getattr(models, attr)) | |
| CHOICES.insert(0, ('', 'Any')) |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Istighfar</title> | |
| <style type="text/css"> | |
| .cases{ | |
| overflow: visible; | |
| } | |
| .cases .case{ |
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
| <?php | |
| function count_words($needed_word, $string) | |
| { | |
| $words = str_word_count($string, 1); | |
| $words_count = array_count_values($words); | |
| // Use multibyte string to lower | |
| return $words_count[mb_strtolower($needed_word)]; | |
| } |
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(cliprz::system(config)->get('language','direction') == 'rtl'): ?> | |
| <link rel="stylesheet" type="text/css" href="<?=assets('bootstrap/css/bootstrap.rtl.css')?>" /> | |
| <link rel="stylesheet" type="text/css" href="<?=assets('bootstrap/css/bootstrap-responsive-rtl.css')?>"> | |
| <? else: ?> | |
| <link rel="stylesheet" type="text/css" href="<?=assets('bootstrap/css/bootstrap.css')?>" /> | |
| <link rel="stylesheet" type="text/css" href="<?=assets('bootstrap/css/bootstrap-responsive.css')?>"> |
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
| import itertools | |
| lines = list() | |
| lines.append(open('1.txt').readlines()) | |
| lines.append(open('2.txt').readlines()) | |
| combinations = list(itertools.product(*lines)) | |
| with open('result.txt', 'w') as result: | |
| for combination in combinations: |
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
| #!/bin/bash | |
| # Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
| # Install stuff # | |
| ################# | |
| # Install development tools and some misc. necessary packages | |
| yum -y groupinstall "Development tools" | |
| yum -y install zlib-devel # gen'l reqs |
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 | |
| # | |
| # Extracts email addresses from one or more plain text files. | |
| # | |
| # Notes: | |
| # - Does not save to file (pipe the output to a file if you want it saved). | |
| # - Does not check for duplicates (which can easily be done in the terminal). | |
| # | |
| # (c) 2013 Dennis Ideler <ideler.dennis@gmail.com> |
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
| #include <stdio.h> | |
| #include <conio.h> | |
| void main() | |
| { | |
| int i; | |
| char ville[20]; | |
| int nbr_visi_tang, nbr_visi_tet, nbr_visi_aga, nbr_visi_tan; | |
| int age; | |
| int tot_tang, tot_aga, tot_tet, tot_tan, tot_gen; |
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
| <?php | |
| require './vendor/autoload.php'; | |
| // Prepare app | |
| $app = new \Slim\Slim(array( | |
| 'templates.path' => './templates', | |
| )); | |
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
| <html> | |
| <head></head> | |
| <body> | |
| <table border="1"> | |
| <tr> | |
| <th>Colonne date</th> | |
| <th>Autre colonne</th> | |
| </tr> | |
| <tr> | |
| <td><span class="date"></span></td> |