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
- @objects.each do |item| | |
.feed-item.left.relative | |
.feed-image.left | |
- if item['pictures'].empty? == false | |
- item['pictures'].each do |pics| | |
- if pics['main'] == true | |
%img{:src => "#{pics['filename']}-small.png"} | |
- else | |
%img{:src => "default-small.png"} | |
.feed-spec.left |
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
# coding: utf-8 | |
require 'sinatra' | |
set server: 'thin', connections: [] | |
get '/' do | |
halt erb(:login) unless params[:user] | |
erb :chat, locals: { user: params[:user].gsub(/\W/, '') } | |
end | |
get '/stream', provides: 'text/event-stream' do |
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
#!/usr/bin/env ruby | |
# Get the commit type. | |
# We only want this hook to take effect on message commit. | |
commit_type = ARGV[1] | |
if commit_type != "message" | |
exit 0 | |
end | |
# The pattern we are looking |
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
document.getElementById('pass').value; |
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 torch | |
import torch.optim as optim | |
from torch import autograd | |
from torch.nn import Module, Embedding, Linear, MSELoss, functional as F | |
from torch.utils.data import TensorDataset, DataLoader | |
import random | |
class IssueModule(Module): |
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
{ | |
"1": { | |
"a)": { | |
"text": "articles 119 ou 120 (corruption de fonctionnaires);" | |
}, | |
"b)": { | |
"text": "article 121 (fraudes envers le gouvernement);" | |
}, | |
"c)": { | |
"text": "article 123 (actes de corruption dans les affaires municipales);" |