Skip to content

Instantly share code, notes, and snippets.

@pycckuu
pycckuu / BvpOde.cpp
Created April 14, 2014 11:38
Eigen3problem
#include <iostream>
#include <fstream>
#include <cassert>
#include "BvpOde.hpp"
BvpOde::BvpOde(SecondOrderOde* pOde,BoundaryConditions* pBcs, int numNodes){
mpOde = pOde; mpBconds = pBcs;
mNumNodes = numNodes;
mpGrid = new FiniteDifferenceGrid(mNumNodes, pOde->mXmin, pOde->mXmax);
mpRhsVec = new VectorXd(mNumNodes);
@pycckuu
pycckuu / swig.rb
Created May 16, 2014 12:11
swig30_brew_formaula
require 'formula'
class Swig < Formula
url 'http://prdownloads.sourceforge.net/swig/swig-3.0.0.tar.gz'
homepage 'http://www.swig.org/'
# md5 '4319c503ee3a13d2a53be9d828c3adc0'
depends_on 'pcre'
def install
@pycckuu
pycckuu / trilinos.rb
Last active August 29, 2015 14:09 — forked from davydden/trilinos.rb
require 'formula'
# brew install --without-suite-sparse --without-tbb --without-python --with-mpi
class Trilinos < Formula
homepage 'http://trilinos.sandia.gov'
url 'http://trilinos.sandia.gov/download/files/trilinos-11.10.2-Source.tar.gz'
sha1 'f7442cef35c4dea4f3535e0859deda88f68e72fc'
head 'https://software.sandia.gov/trilinos/repositories/publicTrilinos', :using => :git
option "with-teko", "Enable the Teko secondary-stable package"
@pycckuu
pycckuu / trilinos
Last active December 28, 2015 03:42
trilinos
class Trilinos < Formula
desc "Algorithms for the solution of large-scale, complex multi-physics engineering and scientific problems"
homepage "http://trilinos.sandia.gov"
url "https://trilinos.org/oldsite/download/files/trilinos-12.0.1-Source.tar.bz2"
sha256 "cab674e88c8ca2d2c54176af60030ed28203c0793f3c64c240363dbe7fa46b99"
head "https://software.sandia.gov/trilinos/repositories/publicTrilinos", :using => :git
option "with-teko", "Enable the Teko secondary-stable package"
option "with-shylu", "Enable the ShyLU experimental package"
option "with-check", "Perform build time checks (time consuming and contains failures)"
@pycckuu
pycckuu / parsing_twts.py
Last active January 13, 2016 18:36
to review
import operator
import nltk
import re
from dateutil import parser
import glob
often_words = ['aboard', 'about', 'above', 'across', 'after', 'against', 'along', 'amid', 'among', 'anti', 'around', 'as', 'at', 'before', 'behind', 'below', 'beneath', 'beside', 'besides', 'between', 'beyond', 'but', 'by', 'concerning', 'considering', 'despite', 'down', 'during', 'except', 'excepting', 'excluding', 'following', 'for', 'from', 'in', 'inside', 'into', 'like', 'minus', 'near', 'of', 'off', 'on', 'onto', 'opposite', 'outside', 'over', 'past', 'per', 'the', 'a', 'plus', 'regarding', 'round', 'save', 'since', 'than', 'through', 'to', 'toward', 'towards', 'under', 'underneath', 'unlike', 'until', 'up', 'upon', 'versus', 'via', 'with', 'within', 'without', 'account', 'embedded', 'permalink', 'dec', 'jan', 'retweets', 'image', 'hours', '2015', 'reply', 'you', 'is', 'are', 'am', 'was', 'were', 'will',
'do', 'does', 'did', 'have', 'had', 'has', 'can', 'could', 'should', 'shall', 'may', 'might', 'would', 'likes
@pycckuu
pycckuu / graph_lenght.cpp
Created March 31, 2016 03:45
method const vs non-const
friend void get_edge_value(const Graph &g, int node_x, int node_y){
if (g.mapping[node_x][node_y]==1) {
list<Edge>::iterator it;
for (it = g.list_of_edges.begin(); it != g.list_of_edges.end(); it++) {
if ( (it->begin == node_y && it->end == node_x) || (it->begin == node_x && it->end == node_y)){
cout << it->distance;
}
}
}
}
#include <iostream>
#include <string>
#include <vector>
#include <iomanip>
#include <fstream>
#include <sstream>
using std::string;
using std::vector;
using std::ifstream;
using std::stringstream;
#include <iostream>
#include <string>
#include <vector>
#include <iomanip>
#include <fstream>
#include <sstream>
using std::string;
using std::vector;
using std::ifstream;
using std::stringstream;
absl-py==0.7.1
appnope==0.1.0
astor==0.8.0
awscli==1.16.132
backcall==0.1.0
botocore==1.12.122
certifi==2019.6.16
decorator==4.4.0
gast==0.2.2
grpcio==1.16.1
@pycckuu
pycckuu / erc20 contract
Created August 30, 2019 08:27
simple erc 20 that shows balance in metamask
pragma solidity ^0.4.24;
// ----------------------------------------------------------------------------
// '0Fucks' token contract
//
// Deployed to : 0x5A86f0cafD4ef3ba4f0344C138afcC84bd1ED222
// Symbol : 0FUCKS
// Name : 0 Fucks Token
// Total supply: 100000000
// Decimals : 18