This file contains hidden or 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
| # Original author https://stackoverflow.com/a/38507628 | |
| # I've only done minor changes to make it work | |
| from PIL import Image | |
| import numpy as np | |
| import scipy.fftpack as fp | |
| ## Functions to go from image to frequency-image and back | |
| im2freq = lambda data: fp.rfft(fp.rfft(data, axis=0), | |
| axis=1) |
This file contains hidden or 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
| #include <iostream> | |
| #include <string> | |
| #include <cctype> | |
| using namespace std; | |
| int main(int argc, char* argv[]) { | |
| if (argc != 2) { | |
| cerr << "WrOnG aRgUmEnT cOuNt LoSeR" << endl; | |
| return -1; |
This file contains hidden or 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
| xrandr --newmode "1400x900_60.00" 103.50 1400 1480 1624 1848 900 903 913 934 -hsync +vsync | |
| xrandr --addmode VGA1 1400x900_60.00 |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| //holds one bit | |
| struct sbit | |
| { | |
| unsigned b : 1; | |
| }; | |
| typedef struct sbit BIT; |
This file contains hidden or 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
| //http://www.reddit.com/r/dailyprogrammer/comments/wk066/7132012_challenge_76_intermediate_probability/ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace CodingChallenges | |
| { | |
| class Program |
This file contains hidden or 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
| //http://www.reddit.com/r/dailyprogrammer/comments/wjzly/7132012_challenge_76_easy_title_case/ | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace CodingChallenges | |
| { | |
| class Program |
This file contains hidden or 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
| //Quick Dijkstra algorithm whipped up for Coursera, not very efficient though | |
| class Node | |
| { | |
| List<Edge> Edges; | |
| public int ID; | |
| public Node(int oID) { ID = oID; Edges = new List<Edge>(); } | |
| public void AddEdge(Edge e) { Edges.Add(e); } |