-
Posts
1419 -
Joined
-
Last visited
-
Days Won
45
Everything posted by MrGrj
-
Uber tarife de zece ori mai mari in noaptea de Revelion
MrGrj replied to tjt's topic in Discutii non-IT
Sunt singurul care foloseste Black Cab ? Nici macar o problema so far. -
Haha @Byte-ul. )))) ia de cite?te
-
Daca ti se pare greu o poti lua pas cu pas: - citesti fisierul si adaugi numerele intr-un array. (gasesti tone de exemple pe google) - randomizezi arrayul respectiv ( vezi aici ) - afisezi arrayul final, care va avea elementele intr-o ordine aleatoare. Incearca sa creezi un program dupa structura data si apoi o sa te ajutam daca ai erori.
-
C/ASM/Java/JS/Python Invata una din astea si nu vei avea probleme. Fiecare domeniu presupune un limbaj specific acestuia.
-
Hai Cr?ciun fericit si sper ca t?ierea porcului s? v? aduc? la multi ceva neuroni in plus pe lâng? kg depuse in sute de straturi pe burt? si coaie. V? pup? Jean.
-
*puli. Dac? ave?i torent de ce va tot plangeti ?
-
REST APIs have become a common way to establish an interface between web back-ends and front-ends, and between different web services. The simplicity of this kind of interface, and the ubiquitous support of the HTTP and HTTPS protocols across different networks and frameworks, makes it an easy choice when considering interoperability issues. Bottle is a minimalist Python web framework. It is lightweight, fast, and easy to use, and is well-suited to building RESTful services. A bare-bones comparison made by Andriy Kornatskyy put it among the top three frameworks in terms of response time and throughput (requests per second). In my own tests on the virtual servers available from DigitalOcean, I found that the combination of the uWSGI server stack and Bottle could achieve as low as a 140?s overhead per request. In this article, I’ll provide a walkthrough of how to build a RESTful API service using Bottle. Installation and Configuration The Bottle framework achieves its impressive performance in part thanks to its light weight. In fact the entire library is distributed as a one-file module. This means that it does not hold your hand as much as other frameworks, but it is also more flexible and can be adapted to fit into many different tech stacks. Bottle is therefore best suited for projects where performance and customizability are at a premium, and where the time-saving advantages of more heavy-duty frameworks are less of a consideration. The flexibility of Bottle makes an in-depth description of setting up the platform a bit futile, since it may not reflect your own stack. However, a quick overview of the options, and where to learn more about how to set them up, is appropriate here: Installation Installing Bottle is as easy as installing any other Python package. Your options are: Install on your system using the system’s package manager. Debian Jessie (current stable) packages the version 0.12 as python-bottle. Install on your system using the Python Package Index with pip install bottle. Install on a virtual environment (recommended). To install Bottle on a virtual environment, you’ll need the virtualenv and pip tools. To install them, please refer to the virtualenv and pip documentation, though you probably have them on your system already. In Bash, create an environment with Python 3: $ virtualenv -p `which python3` env Suppressing the -p `which python3` parameter will lead to the installation of the default Python interpreter present on the system – usually Python 2.7. Python 2.7 is supported, but this tutorial assumes Python 3.4. Now activate the environment and install Bottle: $ . env/bin/activate $ pip install bottle That’s it. Bottle is installed and ready to use. If you’re not familiar with virtualenv or pip, their documentation is top notch. Take a look! They are well worth it. Server Bottle complies with Python’s standard Web Server Gateway Interface (WSGI), meaning it can be used with any WSGI-compliant server. This includes uWSGI, Tornado, Gunicorn, Apache, Amazon Beanstalk, Google App Engine, and others. The correct way to set it up varies slightly with each environment. Bottle exposes an object that conforms to the WSGI interface, and the server must be configured to interact with this object. To learn more about how to set up your server, refer to the server’s docs, and to Bottle’s docs, here. Database Bottle is database-agnostic and doesn’t care where the data is coming from. If you’d like to use a database in your app, the Python Package Index has several interesting options, like SQLAlchemy, PyMongo, MongoEngine, CouchDB and Boto for DynamoDB. You only need the appropriate adapter to get it working with the database of your choice. Bottle Framework Basics Now, let’s see how to make a basic app in Bottle. For code examples, I will assume Python >= 3.4. However, most of what I’ll write here will work on Python 2.7 as well. A basic app in Bottle looks like this: import bottle app = application = bottle.default_app() if __name__ == '__main__': bottle.run(host = '127.0.0.1', port = 8000) When I say basic, I mean this program doesn’t even “Hello World” you. (When was the last time you accessed a REST interface that answered “Hello World?”) All HTTP requests to 127.0.0.1:8000 will recieve a 404 Not Found response status. Apps in Bottle Bottle may have several instances of apps created, but for the sake of convenience the first instance is created for you; that’s the default app. Bottle keeps these instances in a stack internal to the module. Whenever you do something with Bottle (such as running the app or attaching a route) and don’t specify which app you’re talking about, it refers to the default app. In fact, the app = application = bottle.default_app() line doesn’t even need to exist in this basic app, but it is there so that we can easily invoke the default app with Gunicorn, uWSGI or some generic WSGI server. The possibility of multiple apps may seem confusing at first, but they add flexibility to Bottle. For different modules of your application, you might create specialized Bottle apps by instantiating other Bottle classes and setting them up with different configurations as needed. These different apps could be accessed by different URLs, through Bottle’s URL router. We won’t delve into that in this tutorial, but you are encouraged to take a took at Bottle’s documentation here and here. Server Invocation The last line of the script runs Bottle using the indicated server. If no server is indicated, as is the case here, the default server is Python’s built-in WSGI reference server, which is only suitable for development purposes. A different server can be used like this: bottle.run(server='gunicorn', host = '127.0.0.1', port = 8000) This is syntactic sugar that let’s you start the app by running this script. For example, if this file is named main.py, you can simply run python main.py to start the app. Bottle carries quite an extensive list of server adapters that can be used this way. Some WSGI servers don’t have Bottle adapters. These can be started with the server’s own run commands. On uWSGI, for instance, all you’d have to do would be to call uwsgi like this: $ uwsgi --http :8000 --wsgi-file main.py Daca sunteti interesati, continuarea este aici
-
Joomla 1.5 - 3.4.5 - Object Injection Remote Command Execution
MrGrj replied to Nytro's topic in Exploituri
Intr-adevar, platforma asta e foarte, foarte proasta. Sunt curios, Nytro, iti aduci aminte sa fii gasit ceva related to Django ? -
Salut Mircea din Germania. Bine-ai venit pe RST. Poti incepe in urmatoarea ordine: - inveti sa gandesti analitic, structurat - incepi cu ceva probleme de matematica elementara - iti alegi un domeniu in care te vezi lucrand peste x ani ( web / desktop apps / automation etc ) - in functie de punctul de mai sus alegi un limbaj de programare si aplici problemele elementare de la pct 2 - dupa ce ai invatat sintaxa de baza a limbajului respectiv, creezi o aplicatie usoara, pentru a cunoaste alte librarii/module specifice limbajului respectiv - mai tarziu, poti folosi si un framework Ca si documentatie, cele de pe site-urile limbajului ales ar trebui sa fie de-ajuns. Bafta
-
D?-mi PM. Momentan nu sunt in ?ar? si nu am timp s? m? ocup îns? vineri te rezolv
-
Iti fac eu in 5 minute. Dac? mai jignesti pe careva ai ban permanent //EDIT, ma simt darnic azi: Limbaj: Python OS: Windows import random lista_caractere = ['/', '*', '(', '`', ',', ')', '&', '*', '^', '%', '^', '&', '*', '$', '%', '^', '/'] string = 'Va salut numele meu este vasile' print ''.join('%s%s' % (x, random.choice(lista_caractere) if random.random() > 0.5 else '') for x in string) Output examples:
-
Candidatul ideal -Absolvent de Informatica, Informatica economica sau Automatizari/Calculatoare. -Experienta de minim 2 ani in programare OO, Python, SQL, Linux, GIT, aplicatii web. -Lucreaza atat independent, cat si in echipa, in functie de specificul proiectelor. -Este orientat catre rezultate. -Vorbeste si scrie engleza fluent. Descrierea jobului Dezvolta aplicatii web (de complexitate medie) pentru management de retele IP medii/mari, datacenters, call centers, participand la: - Analiza tehnicã a proiectului, - Definirea specificatiilor tehnice si functionale ale proiectului, - Programarea conform specificatiilor de proiect, - Testarea si documentarea codului dezvoltat, - Colaboreaza cu restul echipei si cu clientii. Veti lucra intr-un mediu placut, orientat spre performanta si rezultate, care va faciliteaza o continua dezvoltare profesionala si personala, alaturi de aceste beneficii: Va oferim un mediu de lucru dinamic, in care initiativa si dezvoltarea profesionala sunt incurajate si sustinute cu un program continuu de instruire. De asemenea, va oferim un salariu atractiv, la care se adauga bonusuri pentru realizari exceptionale, bonuri de masa si abonament la servicii medicale. Pe langa limbajele de mai sus, ar fi de preferat: Perl + Tornado/Django. Daca sunteti interesati, PM me cu CV-ul sau aplicati aici. Mai multe despre comapnie, aici. SPOILER:
-
Mare prostie ce ai zis in ultima fraz?. Ce legatura are internetul prin satelit ? Este folosit dar nu la scara spus? de tine.
-
Sa-mi bag pula daca nu e cea mai lunga fraza pe care am citit-o anu' asta. Din gramatica pe care o ai imi pot da seama de ce el reuseste si tu nu. Think about this. Si mai usor cu emoticoanele ca nu esti pe `mess`. Editeaza-ti thread-ul si poate primesti un raspuns decent
-
Kali e un update de la BT 5r3. Gandeste-o asa: Ubuntu 14.04 -> Ubuntu 15.05 == Backtrack 5r3 -> Kali //EDIT: Are mai multe `optiuni`.
-
Calmeaz?-te man. Abia ti-ai f?cut cont si esti frustrat deja? De ce te doare intre buci de ceea ce se intampla cu vreun membru de aici? Stai linistit c? cine nu vrea s? se duc? nu se duce. Care vrea s? se fereasc? se fereste. V? rog, nu v? mai varsati frustarile aici. V? mirati si injurati moderatorii c? v? dau ban apoi. Incercati in coaiele taurului sfânt s? contribuiti cu ceva folositor.
-
Si daca vei folosi tu CSS, nu vei avea clase care te vor omori ? Foloseste Bootstrap sau Semantic UI si obisnuieste-te cu una din ele. Te vor ajuta considerabil + ca ai documentatie cacalau pe tot internetu'.
-
Nu inteleg de ce a încadrat printf aici. Îmi poate explica cineva ? Care e pericolul ?la mare ? Hai c? memset() merge, pot întelege c? s-a scremut putin s? scoat? exemplele alea, dar la printf() nu.
-
Graduate / Junior Developer, Phyton, Linux, C#, Java - London (urgent)
MrGrj replied to QuoVadis's topic in Locuri de munca
Pentru cei interesati, nu uitati ca la salary range-ul respectiv s? ad?uga?i ?i taxele aferente -
Eu as s?rb?tori ziua in care toate posturile dintr-o zi pe RST ar fi related to security, it & programming. Da' pula mea, in ritmul ?sta am r?mâne f?r? zile libere.
-
Numele nu e important, asa ca l-am lasat.
-
Disappointing. Still no girls here. My hands really need some break.
-
Am nevoie de o analiza a softului unui aparat platesc
MrGrj replied to zeroabsolut's topic in Cosul de gunoi
Ai codul sursa ? E ceva open-source ? In ce limbaj e scris ? Ce fel de analiza doresti mai exact ? Astept aceste detalii aici (nu PM) pentru a putea si alti useri interesati despre ce este vorba -
MonoDevelop iti recomand. Poti dezvolta în C / C++ / C#. Ca distributie *nix Ubuntu sau CentOS.