Skip to content

Instantly share code, notes, and snippets.

View coci's full-sized avatar
:octocat:
On the way

soroush safari coci

:octocat:
On the way
View GitHub Profile
import math
def reverse_int_without_string(number):
"""
reverse without change number into string
"""
number_copy = abs(number)
digits_number = [] # split number by their digits
while number_copy > 0 :
digits_number.append(number_copy%10)

Keybase proof

I hereby claim:

  • I am coci on github.
  • I am coci (https://keybase.io/coci) on keybase.
  • I have a public key ASDVQo88kttH7Pxmtt9NFlJBgnjQ2fAzTXQOjgQ7ZJFDMQo

To claim this, I am signing this object:

"""
Jwt middleware for django channels
"""
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from jwt import decode as jwt_decode
from rest_framework_simplejwt.exceptions import InvalidToken, TokenError
from rest_framework_simplejwt.tokens import UntypedToken
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sample.settings')
app = Celery('sample')
# Using a string here means the worker will not have to
@coci
coci / zshrc
Created August 18, 2021 06:06
my zsh config
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
source ~/powerlevel10k/powerlevel10k.zsh-theme
@coci
coci / golang_job_queue.md
Created May 10, 2022 10:46 — forked from harlow/golang_job_queue.md
Job queues in Golang