Skip to content

Instantly share code, notes, and snippets.

View aymen-mouelhi's full-sized avatar

Aymen Mouelhi aymen-mouelhi

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lprowell
lprowell / linear_regression
Last active November 9, 2022 16:03
Code for linear regression, cross validation, gridsearch, logistic regression, etc.
# Linear Regression without GridSearch
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score, cross_val_predict
from sklearn import metrics
X = [[Some data frame of predictors]]
y = target.values (series)
@duzun
duzun / async_css.html
Last active August 29, 2015 14:04
Easiest and most natural way to load CSS asynchronously without blocking HTML rendering! Tested on https://limitlesslane.com/ https://casadelux.ru/ and other projects by DUzun.ME
<html>
<head>
<!-- The <script> switches rel="prefetch" to rel="stylesheet" at proper time, et voila, magic happens :-) -->
<link rel="prefetch" type="text/css" href="https://cdn.limitlesslane.com/css/mini/async_lib.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.limitlesslane.com/css/mini/lib.css" />
<link rel="stylesheet" type="text/css" href="https://cdn.limitlesslane.com/css/mini/app.css" />
<link rel="prefetch" type="text/css" href="https://cdn.limitlesslane.com/css/mini/async_app.css" />
<script>
;(function(w,d){
@fwielstra
fwielstra / api.js
Created June 14, 2011 14:46
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');