Skip to content

Instantly share code, notes, and snippets.

View siminino's full-sized avatar

Victor de Oliveira Areas siminino

View GitHub Profile
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)
@siminino
siminino / .py
Created February 23, 2020 21:13
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
@siminino
siminino / marca_dagua.py
Created April 6, 2017 19:19
Marca dagua
try:
from PIL import Image, ImageDraw, ImageFont, ImageEnhance
except:
import Image
import ImageDraw
import ImageFont
import ImageEnhance
class ImpropertlyConfigured(Exception):
@siminino
siminino / robot.js
Created December 3, 2012 15:40
SimininoDroid #2
//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;
@siminino
siminino / robot.js
Created December 3, 2012 13:52
W00t #1 YEAH!!!! (Zolmesiter)
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) {
@siminino
siminino / robot.js
Created December 3, 2012 13:46
SimininoDroid #1
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) {
>> 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
>>