Skip to content

Instantly share code, notes, and snippets.

View flyudvik's full-sized avatar

Malik Sulaimanov flyudvik

  • Bishkek/Kyrgyzstan
  • 11:48 (UTC +06:00)
View GitHub Profile
@flyudvik
flyudvik / chikibriki.py
Last active November 21, 2016 10:16
really shitti figurine drawer
#!/usr/bin/python
# ΠΈΠΌΠΏΠΎΡ€Ρ‚ΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Π½Π΅ΠΎΠ±Ρ…ΠΎΠ΄ΠΈΠΌΡ‹Ρ… ΠΌΠΎΠ΄ΡƒΠ»Π΅ΠΉ
from BrickPi import *
import time
import sys
import logging
################### CUSTOMIZABLE ###########################
# ВсС Ρ‡Ρ‚ΠΎ ΠΌΠΎΠΆΠ΅Ρ‚ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡ‚ΡŒ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒ. Π­Ρ‚ΠΎ Π³Π»ΠΎΠ±Π°Π»ΡŒΠ½Ρ‹Π΅ константы
FORMAT = "[%(asctime)s] %(message)s"
@flyudvik
flyudvik / django_contrib.py
Last active March 22, 2017 04:06
django python-telegram-api integration
# coding: utf-8
"""
This module contains a simple integration with django.
To install on your django project, you need to register all bots on settings, add one line on
your urls and create a register method it will received a dispatcher to add all handlers of
your bot.
///////// settings.py
TELEGRAM_BOT_WEBHOOK_PATH = 'telegram_webhook' # it's default
TELEGRAM_BOT = [{
'token': '{YOUR_BOT_TOKEN}',
@flyudvik
flyudvik / Popcorn-Time.desktop
Created April 15, 2018 17:47 — forked from ed-flanagan/Popcorn-Time.desktop
Gnome Popcorn Time application launcher
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Popcorn Time
Name[en_US]=Popcorn Time
GenericName=BitTorrent Stream Player
GenericName[en_US]=BitTorrent Stream Player
Comment=Run the Popcorn Time application
Comment[en_US]=Run the Popcorn Time application
Type=Application
@flyudvik
flyudvik / useful_pandas_snippets.py
Last active April 15, 2018 17:51 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets #pandas
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!
@flyudvik
flyudvik / README.md
Created April 15, 2018 17:56 — forked from joyrexus/README.md
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@flyudvik
flyudvik / tmux.md
Created April 15, 2018 17:58 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flyudvik
flyudvik / gist:46cbd62c724f2cd9ec7eb53e785e6ae0
Last active April 16, 2018 09:57 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
# Open CV 3.3.1 with python ${VERSION}
PYTHON_EXECUTABLE_PATH=$1
if [-z "$PYTHON_EXECUTABLE"] then;
echo "Using PATH default python $(command -v python)"
PYTHON_EXECUTABLE=$(command -v python)
fi
set -ex
@flyudvik
flyudvik / update_jenkins.sh
Last active September 24, 2018 06:07
Update jenkins through jenkins.war file. Usage: update_jenkins.sh http://updates.jenkins-ci.org/download/war/2.107.2/jenkins.war
#!/usr/bin/env bash
echo "Backing up the jenkins.war"
sudo cp /usr/share/jenkins/jenkins.war /usr/share/jenkins/jenkins.war.backup_$(date +'%m_%dT%H_%M_%S')
echo !!
echo "Downloading the new version"
sudo wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war -O /usr/share/jenkins/jenkins.war
sudo systemctl stop jenkins