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
import getopt, sys
VERSION = 0.1
def help():
print '-h for help\n-v for version\n-p <str> or --print <str> for print string'
def main(argv):
try:
# hvp:
citation for : The metamorphosis of the Egyptian Muslim brothers
=================================================================
Title Passive revolution: Absorbing the Islamic challenge to capitalism
URL http://books.google.com/books?hl=en&lr=&id=AzDgC9jAkiMC&oi=fnd&pg=PR9&ots=9dcfYcYEtt&sig=JcvgMf8B_Ct9f0MeIEidxAiVKV8
Year 2009
Citations 124
Versions 2
Cluster ID 9264419093500035819
Citations list https://scholar.google.com/scholar?cites=9264419093500035819&as_sdt=2005&sciodt=0,5&hl=en
Versions list https://scholar.google.com/scholar?cluster=9264419093500035819&hl=en&as_sdt=2005&sciodt=0,5
from kivy.app import App
from kivy.uix.widget import Widget
from subprocess import call, check_output
from kivy.uix.label import Label
class field(Widget):
def __init__(self, **kwargs):
super(field,self).__init__(**kwargs)
self.gc()
#!/usr/sbin/env python
from Tkinter import *
#from ttk import *
import ttk
win=Tk()
def create_frame1():
global show_frame2, frame1
frame1=ttk.Frame(win)
[python: **.py]
[jinja2: **/templates/**.html]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
# فراخوانی کتابخانه
from suds.client import Client
# قراخوانی wsdl
# در برنامه لینک زیر با لینک اصلی برنامه باید جایگزین شود
cl = Client('http://wsdl.url')
# آدرس کال‌بک
call_back = 'http://callback.url'
@RaminNietzsche
RaminNietzsche / scra.py
Created October 28, 2015 19:19
twisted.internet.error.ReactorNotRestartable
import scrapy
from scrapy.crawler import Crawler
from scrapy.settings import Settings
from scrapy.utils.project import get_project_settings
from scrapy.crawler import CrawlerProcess
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from scrapy.selector import HtmlXPathSelector
from twisted.internet import reactor
@RaminNietzsche
RaminNietzsche / trex_cfg.yaml
Created January 12, 2016 11:54
trex config for 50.110
- port_limit : 2
version : 2
interfaces : ["21:00.0","21:00.1"]
port_info :
- dest_mac : [0x38,0xea,0xa7,0x16,0xd3,0x94]
src_mac : [0x38,0xea,0xa7,0x16,0xd1,0x2c]
- dest_mac : [0x38,0xea,0xa7,0x16,0xd3,0x95]
src_mac : [0x38,0xea,0xa7,0x16,0xd1,0x2d]
- duration : 100.0
generator :
distribution : "seq"
clients_start : "192.168.50.110"
clients_end : "192.168.50.110"
servers_start : "192.168.60.110"
servers_end : "192.168.60.110"
clients_per_gb : 201
min_clients : 101
dual_port_mask : "1.0.0.0"
coding = codec_detector(file)
with io.open(file, encoding=coding) as word_list:
print(word_list.readlines())
def codec_detector(file):
codec = ''
with open(file) as word_list:
BOM = word_list.read(2)
if BOM == b'\xff\xfe' or BOM == b'\xff\xef':