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 | |
declare(strict_types=1); | |
$items = [ | |
["id" => 20, "name" => "chimpanzee"], | |
["id" => 40, "name" => "meeting"], | |
["id" => 20, "name" => "dynasty"], | |
["id" => 50, "name" => "chocolate"], | |
["id" => 10, "name" => "bananas"], |
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 | |
declare(strict_types=1); | |
$input = [ | |
['name' => 'toto', 'type' => '1', 'type2' => '2'], | |
['name' => 'tata', 'type' => '1', 'type2' => '3'], | |
['name' => 'titi', 'type' => '1', 'type2' => '2'], | |
['name' => 'tutu', 'type' => '2', 'type2' => '4'], | |
['name' => 'tete', 'type' => '3', 'type2' => '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
#lang racket/base | |
(require net/http-easy | |
html-parsing | |
racket/port | |
sxml/sxpath | |
racket/string | |
net/url) | |
;; Set variables |
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
#lang racket/base | |
(require html-parsing | |
net/url | |
sxml/sxpath) | |
(define bashorg (html->xexp | |
(get-pure-port (string->url "http://bashorg.org")))) | |
((sxpath "//*[@id='quotes']/div[1]/div[2]") bashorg) |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
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
https://github.com/beberlei/assert | |
Список мастхев либ и возможно какие-то мысли. | |
https://github.com/bocharsky-bw/Arrayzy | |
https://github.com/php-ds/ext-ds |
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 base64 | |
from PIL import Image | |
def img_2_base64(img_path): | |
""" | |
Convert img to base64 | |
""" |
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
from __future__ import unicode_literals | |
# Database | |
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.postgresql_psycopg2', | |
'NAME': 'ws_db', | |
'USER': '', |
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 Statuses(object): | |
ON = 1 | |
OFF = 2 | |
class Singleton(type): | |
_instance = None | |
def __call__(cls, *args, **kwargs): |
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
data = [2, 3] | |
# actions | |
def aaa(data): | |
return [i+'_aaa' for i in data()] | |
def bbb(data): | |
return [i+'_bbb' for i in data()] | |
# templates |
NewerOlder