This file contains 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
Vagrant.configure('2') do |config| | |
config.vm.hostname = 'practo-piez.dev' | |
config.package.name = 'piez.box' | |
config.vm.box = 'piez.box' | |
config.vm.box_url = 'http://ncc04.practo.in/appmgr/piez.box' | |
if config.vm.respond_to? 'box_download_insecure' # Vagrant 1.2.6+ | |
config.vm.box_download_insecure = true | |
end | |
config.ssh.insert_key = true | |
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'" |
This file contains 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
``` | |
conda install -c conda-forge jupyter_contrib_nbextensions | |
``` |
This file contains 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
$('.ui.dropdown').dropdown({ | |
keys: { | |
delimiter: 13 | |
} | |
}); |
This file contains 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
# Hangman UI | |
# | |
# Installing required packages | |
# $ pip install flask | |
# | |
# Run | |
# $ python ui.py | |
# | |
from flask import Flask |
This file contains 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
# Hangman UI | |
# | |
# Installing required packages | |
# $ pip install flask | |
# | |
# Run | |
# $ python ui.py | |
# | |
from flask import Flask |
This file contains 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
#include <cstdio> | |
#include <ctime> | |
#include <sys/time.h> | |
#define SIZE 1000000001 | |
char str[SIZE]; | |
void with_break(char *str) { | |
bool a_found = false; |
This file contains 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
case TARGET(BINARY_ADD): { | |
PyObject *right = POP(); | |
PyObject *left = TOP(); | |
PyObject *sum; | |
if (PyUnicode_CheckExact(left) && | |
PyUnicode_CheckExact(right)) { | |
sum = unicode_concatenate(tstate, left, right, f, next_instr); | |
} | |
else { | |
sum = PyNumber_Add(left, right); |
This file contains 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
if (PyNumber_Check(left) && PyNumber_Check(right)) { | |
// Both the operands are numbers | |
} |
This file contains 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
int | |
get_random_number(int max) { | |
return time(NULL) % max; | |
} |
This file contains 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
PyObject * | |
binary_operate(PyObject * left, PyObject * right, char operator) { | |
switch (operator) { | |
case '+': | |
return PyNumber_Add(left, right); | |
case '-': | |
return PyNumber_Subtract(left, right); | |
case '*': | |
return PyNumber_Multiply(left, right); | |
case '/': |
OlderNewer