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
# Test zope.interface to get abstract class with Python (from jupyter) | |
from zope.interface import Interface | |
from zope.interface.declarations import implementer | |
from PyQt5.QtCore import QObject | |
class Base(zope.interface.Interface, QObject): | |
"""My base cabstract class""" | |
name = zope.interface.Attribute("Base abstract class") |
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
"""Please, let me know which child is calling me: 'parent' ? """ | |
def read_childs(cls): | |
"""Return childs of cls""" | |
return cls.__subclasses__() | |
class A: | |
"""This is a mixin class to share code for DRY""" |
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
In [129]: class A: | |
def __init__(self, x): | |
super().__init__(x) | |
self._x = x | |
self._a_var = "Variable A" | |
@property | |
def a_var(self, x): | |
return self._a_var | |
class B: |
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
<?php | |
$CONFIG = array ( | |
'instanceid' => '[private]', | |
'passwordsalt' => '[private]', | |
'secret' => '[private]', | |
'trusted_domains' => | |
array ( | |
0 => 'cloud.my_domain.tk', | |
), | |
'datadirectory' => '/usr/local/www/nextcloud/data', |
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
#----Install.pm6---- | |
unit module Install; | |
use Prompt::Gruff::Export; | |
use Git::Wrapper; | |
use Check; | |
use Datas; | |
my %q = "select_groups" => "Select some groups of repos you want to install ?", | |
"select_repos" => "Select some repos to install: ", | |
"select_group" => "Choose a group from where you will install some repos: "; |
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
source /usr/lib/python3.6/site-packages/powerline/bindings/tmux/powerline_tmux_2.1_plus.conf | |
set -g prefix C-b | |
set -g default-terminal "tmux-256color" | |
set -g history-limit 1000 | |
set -g mouse on | |
set -g set-titles on | |
set -g set-titles-string "#T" | |
setw -g monitor-activity on | |
set -g visual-activity on |
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
#the sub function where error is, at line 8 | |
our sub object_repo_exist($yaml, $object, $object_name, $group_name) is export | |
# $ yaml.datas contain the my.yaml parsed file. checked... exactly same structure and content of datas. | |
{ #give object=title|url , object_name, group_name | |
my $i = 0; | |
my %group = $yaml.datas.first: { $_<group> eq $group_name }; | |
my %repo; | |
unless (%group<repos>.elems == 0) { | |
return True if %group<repos>.first: { $_<<$object>> eq $object_name }; | |
} |
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
#!/usr/bin/perl6 | |
#use install; | |
use lib "/home/jerome/PROGRAMATION/Perl/Vim_plugger_6/"; | |
use Term::Choose; | |
use datas; | |
use add :MANDATORY; | |
my $mode; | |
my $yaml = datas.new("my_pl6.yml"); | |
my @menu0 = < List Add Modify Remove Install Uninstall Update Quit >; |
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
#--datas.pm--- | |
use YAML; | |
class datas { | |
has Str $.filename is rw; | |
has Array @.datas; | |
has Str $.directory = %*ENV<HOME> ~ "/.vim/installer"; | |
has Str $.repo_dir = %*ENV<HOME> ~ "/.vim/bundle"; | |
has Str $.full_filename; |
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
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details | |
// about supported directives. | |
// | |
//= require jquery2 | |
//= require jquery.turbolinks | |
//= require jquery_ujs | |
//= require ckeditor/init | |
//= require jquery-ui | |
//= require jquery.remotipart | |
//= require bootstrap |