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
import { memo } from 'react' | |
import PropTypes from 'prop-types' | |
import renderInAppMessage from './render-in-app-message.js' | |
import sections from './sections.js' | |
import useFetchInAppMessages from './hooks' | |
const InAppMessages = ({ section, onMessageClose, onMessageOpen, displayMessage, campaign }) => { | |
const { message, onClose, refetch } = useFetchInAppMessages(section, campaign) | |
const hasUnpublishedChanges = useSelector(hasUnpublishedChangesSelector) |
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
Traceback (most recent call last): | |
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner | |
response = get_response(request) | |
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response | |
response = self.process_exception_by_middleware(e, request) | |
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view | |
return view_func(*args, **kwargs) | |
File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view |
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
try: | |
from PIL import Image, ImageDraw, ImageFont, ImageEnhance | |
except: | |
import Image | |
import ImageDraw | |
import ImageFont | |
import ImageEnhance | |
class ImpropertlyConfigured(Exception): |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
var contSimi = 1; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; |
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
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
//robot.turnGunRight(90); | |
robot.clone(); | |
this.direction = 1; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(1); | |
if (robot.parentId) { |
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
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
//robot.turnGunRight(90); | |
robot.clone(); | |
this.direction = 1; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(1); | |
if (robot.parentId) { |
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
>> import random | |
>> | |
>> def possibilidade(respostas_do_guru): | |
>> contador = 0 | |
>> while True: | |
>> resposta = random.choice(respostas_do_guru) | |
>> contador += 1 | |
>> if resposta == 'sim': | |
>> return '1 em %d' % contador | |
>> |