Skip to content

Instantly share code, notes, and snippets.

View RaminNietzsche's full-sized avatar
🦫
Qemu or not Qemu this is problem

Ramin Najjarbashi RaminNietzsche

🦫
Qemu or not Qemu this is problem
View GitHub Profile

Keybase proof

I hereby claim:

  • I am RaminNietzsche on github.
  • I am raminnietzsche (https://keybase.io/raminnietzsche) on keybase.
  • I have a public key whose fingerprint is E655 ABC9 FCB5 8785 E75E E809 4792 7038 ACA3 2192

To claim this, I am signing this object:

from PIL import Image
im = Image.open("/home/ramin/Pictures/mine/s1_3.jpg")
n_im = Image.new("RGB", im.size)
msg = '''
PYOTR PETROVITCH STRIZHIN, the nephew of Madame Ivanov, the colonel's widow -- the man whose new goloshes were stolen last year, -- came home from a christening party at two o'clock in the morning. To avoid waking the household he took off his things in the lobby, made his way on tiptoe to his room, holding his breath, and began getting ready for bed without lighting a candle.
Strizhin leads a sober and regular life. He has a sanctimonious expression of face, he reads nothing but religious and edifying books, but at the christening party, in his delight that Lyubov Spiridonovna had passed through her confinement successfully, he had permitted himself to drink four glasses of vodka and a glass of wine, the taste of which suggested something midway between vinegar and castor oil. Spirituous liquors are like sea-water and glory: the more you imbibe of them the greater your thirst. And now as
class NewList(object):
"Test class example"
__lst = []
def __init__(self, *argv):
self.__lst = list(argv)
def __repr__(self):
return str(self.__lst)
import requests
from bs4 import BeautifulSoup
import click
import validators
import eventlet
import sqlite3
eventlet.monkey_patch()
con = None
I use python cli to make command line for a program, I changed it to read data from some dictionary for autocomplete like this:
> command ordinary : show system top sort_cpu ---> execute show_top_function
show_command_dic = {
'system': {
'datetime' : {show_time_function},
'cpu' : {show_cpu_function},
'mem' : {show_mem_function},
'disk' : {show_disk_function},
@RaminNietzsche
RaminNietzsche / image_stof.py
Created April 9, 2017 10:57
Python flask upload base64 image
import base64
from io import BytesIO
from PIL import Image
file = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcAAAAHACAYAAAA1JbhzAAAgAElEQVR4Xoy96ZKt3XKVt5p97pmgMSDAdI6wABMWdiB+yEgQQoBN38h34HMkjiTEraCqtYgc4xmZOd+qT+EtON/eVWu9zZzZjBzZzPuf+Y2fv+/v2+19e91u98ftcb/dPl/v2/N2v71v79vtdr/Vb+s/79dNfx6P2+31ft/u9/pd/fau79W/3++60ut2fz1ut4e/7c/oJvrM/f6+vd/32+N9u32+b7rXq65/e90e9/re+/aqX9Rn+b7+w/1ubz+Zf1T3vt9eLz9cninfrWeuF6zn0mfrWd5ctV6cN6z3edyft9f7k2f0c75u79vj9tSz1bff70/97FnP+ao3rcd91EvUwun56xO1IHlGrdn9x+19+6yFu9Vb1RvkWe+v9+398HrUf+tVtMZcoR5Tz32v+7/0NJ999R+35+2z/13Xut/rYW5a07qK//eu79Uz1Xp/1lPUhete7/utlqT++al98P77+/lTT+Br1XPWs2kv65lrP0oAstestaRHH6h7WTYe9bs361wXuj18LV3zfnve57m1T6/b7VnXrjUq2by9bz/qWWu5tY48T/2s9roeMz971bVqvfIutX7elfqZJful69Sf+p3ur/evfaxrzi6+63k/7tprfRe5q2vVn+zJo/5dz/L0Netr9f4fklGvWcmsZarWxd/V52rj37W/dU0/u69bP3/d7qVfev/77V6y8raEavV41Fon3VfX9nUka6UHein//zeyohW4l3RoEdBWXQQLUM9dMuUb1Ecsu++2A+9Xyf7T+lA/r/dHDu6lz+icf1bPW+vw0p56S7APWleLWq3vo97x86131f3Qn9ipeo96z3qtkpHS+/f9pWtKFPQ6tRYlZ/V/slYtuyUfdcO6V62tzCDrV+8ou1
b.txt
patate : 21
ali : 22
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
" ";"
2015. év
";"
2014. év
";"
2013. év
";"
2012. év
";"
2011. év
import 'dart:convert';
import 'package:flutter/material.dart';
class FormGen extends StatefulWidget{
@override
State<StatefulWidget> createState() => _FormGen();
}
class _FormGen extends State<FormGen> {
In file included from ../../src/bp_sim.h:41,
from ../../src/bp_sim.cpp:22:
../../src/common/Network/Packet/IPv6Header.h:28:7: note: 'class IPv6Header' declared here
class IPv6Header
^~~~~~~~~~
../../src/bp_sim.cpp: In member function 'void CFlowGenListPerThread::init_from_global()':
../../src/bp_sim.cpp:3649:79: error: 'new' of type 'CFlowGeneratorRecPerThread' with extended alignment 64 [-Werror=aligned-new=]
CFlowGeneratorRecPerThread * lp_thread=new CFlowGeneratorRecPerThread();
^
../../src/bp_sim.cpp:3649:79: note: uses 'void* operator new(std::size_t)', which does not have an alignment parameter