Skip to content

Instantly share code, notes, and snippets.

@cedias
cedias / sql-data-mining.ipynb
Last active October 1, 2020 13:31
SQL-Data Mining.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#memerr.py
import sys
import argparse
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torch.utils.data import DataLoader, Dataset
import numpy as np
import matplotlib.pyplot as plt
class NNet(object):
def __init__(self, n_in, n_hidden, n_out):
self.n_in = n_in
self.n_hidden = n_hidden
self.n_out = n_out
self.W1 = np.random.randn(n_in, n_hidden)
@cedias
cedias / char_rnn.py
Created September 29, 2016 09:35
bugged
from __future__ import print_function
from keras.layers.recurrent import Recurrent
from keras import backend as K
from keras.engine.topology import InputSpec
from keras import activations, initializations
from keras.models import Sequential
from keras.layers import Dense, Activation, Dropout, LSTM
from keras.optimizers import RMSprop
import numpy as np
import random
<?php $ {
"GLOBALS"
}
["jbtvcvf"] = "ips";
$ {
"GLOBALS"
}
["hczmyccqa"] = "ip";
$ {
"GLOBALS"
@cedias
cedias / map-reduce.md
Last active December 16, 2015 07:59
Map reduce to count DF

#Map-Reduce

##Objectif Calculer la "Document Frequency" (DF) des documents.
Document Frequency: Nombre de documents dans lesquelles apparait chaque mots.

##Principe Map: JSON -> Liste (key,value) Reduce: Liste (key,value) -> aggregation sur les valeurs (i.e addition)

@cedias
cedias / Qt.md
Created March 14, 2013 21:37
Qt

#Qt - LI357

##Signal & Slots

Qt s'organise autour du concept de signaux et de slots.

Pour connecter deux entités:

##Connect

@cedias
cedias / X11.md
Last active December 14, 2015 23:19
x11

#X WINDOW SYSTEM

##Main

int main (int argc, char *argv[]) {	
 Installer();  						//<--- Fonction où "enregistrer les evenements"
 for (;;) {	 /* la boucle d'evenements   */
     XNextEvent(dpy, &evmt);
@cedias
cedias / Sax.java
Created March 4, 2013 10:48
Sax LI357 sample
/**
* XML D'EXEMPLE
*
*<eleve>
* <nom id="398">
* Corentin
* </nom>
* <classe>
* 3ED
* </classe>
@cedias
cedias / Sax.java
Created March 1, 2013 12:37
LI357 useful Examples
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.AttributeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;