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 Human: | |
age = 0 | |
name = ''; | |
def __init__(self, name, age): | |
self.name = name | |
self.age = age | |
def setAge(self, age): | |
self.age = age |
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 os, glob, sys | |
import urllib.parse as up | |
# Titles contain name of videos, like ```Supervised and Unsupervised Learning``` | |
fpTitle = open('Titles', 'r') | |
# listDwn contain name of files that saved from filegir.com, like ```StatsLearning_Lect1_2b_111213_v2_%5BLvaTokhYnDw%5D_%5Btag22%5D.mp4``` | |
fpListDwn = open('listDwn', 'r') | |
titles = fpTitle.readlines() |
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
function result = indToBernstienInd(d, k) | |
% Convert ordinary order to lexicographical order. | |
% Input: | |
% @d: integer, dimension of spline space. | |
% @k: integer, position on ordinary sequence order | |
% Output: | |
% @result: vector[3], position of k on exicography order | |
result = zeros(1,3); | |
delt = @(k) ceil((-3 + sqrt(9+8*(k-1)))/2); |
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
{* Check for RTL langguages and automatically load rtl.css from CSS folder of theme for RTL languages. *} | |
{foreach from=$languages key=k item=language name="languages"} | |
{if ($cookie->id_lang == $language.id_lang) && (1 == $language.is_rtl)} | |
<link rel="stylesheet" href="{$css_dir}rtl.css" type="text/css" media="screen" /> | |
{break} | |
{/if} | |
{/foreach} |
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
for fileName in $(ls ../models); | |
do | |
modelName=$(echo $fileName | cut -d "." -f 1); | |
echo "I${modelName}Interface.php generated."; | |
touch "I${modelName}Interface.php"; | |
done |
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
for i in *.css | |
do | |
echo $i | wc -m | |
done | sort -r | head -n 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
# You need to install cloc. On arch `yaourt -S colc`. | |
cloc --exclude-dir=web,vendor,.git,main,config,runtime,tests . |
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
var msg = 'hdk d; k,aji thvsd hsj'; | |
var engPerLet = { | |
' ': ' ', | |
'a': 'ش', | |
's': 'س', | |
'd': 'ی', | |
'f': 'ب', | |
'g': 'ل', | |
'h': 'ا', | |
'j': 'ت', |
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
# Replace PATH_OF_BACKUP_FOLDER with path of backup folder, for example /mnt/CRM/backup | |
# Replace NUMBER_OF_DAYS with a positive integer, for example 14 means folder older that 14 days. | |
find PATH_OF_BACKUP_FOLDER -maxdepth 1 -type d -ctime +NUMBER_OF_DAYS -printf "'%p' \n" | xargs rm -rf |
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" | |
"math/cmplx" | |
"os" | |
// "math" |
OlderNewer