(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| # | |
| # GoLang cross-compile snippet for Go 1.6+ based loosely on Dave Chaney's cross-compile script: | |
| # http://dave.cheney.net/2012/09/08/an-introduction-to-cross-compilation-with-go | |
| # | |
| # To use: | |
| # | |
| # $ cd ~/path-to/my-awesome-project | |
| # $ go-build-all | |
| # |
| const { ApolloServer } = require("apollo-server"); | |
| const gql = require("graphql-tag"); | |
| const fetch = require("node-fetch"); | |
| const { | |
| introspectionQuery, | |
| buildClientSchema, | |
| printSchema | |
| } = require("graphql"); | |
| const typeDefs = gql` |
| import { useReducer } from 'react' | |
| export function updateName(name: string) { | |
| return <const>{ | |
| type: 'UPDATE_NAME', | |
| name | |
| } | |
| } | |
| export function addPoints(points: number) { |
| import uuid | |
| import wtforms_json | |
| from sqlalchemy import not_ | |
| from sqlalchemy.dialects.postgresql import UUID | |
| from wtforms import Form | |
| from wtforms.fields import FormField, FieldList | |
| from wtforms.validators import Length | |
| from flask import current_app as app | |
| from flask import request, json, jsonify, abort |
| . | |
| ├── deploy.py | |
| ├── project | |
| │ ├── application.py | |
| │ ├── apps | |
| │ │ ├── articles | |
| │ │ │ ├── forms.py | |
| │ │ │ ├── __init__.py | |
| │ │ │ ├── models.py | |
| │ │ │ └── views.py |
| # --------------------------------------------------------------------------- | |
| # | |
| # Description: This file holds all my BASH configurations and aliases | |
| # | |
| # Sections: | |
| # 1. Environment Configuration | |
| # 2. Make Terminal Better (remapping defaults and adding functionality) | |
| # 3. File and Folder Management | |
| # 4. Searching | |
| # 5. Process Management |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Represents an edge from source to sink with capacity | |
| var Edge = function(source, sink, capacity) { | |
| this.source = source; | |
| this.sink = sink; | |
| this.capacity = capacity; | |
| }; | |
| // Main class to manage the network | |
| var Graph = function() { | |
| this.edges = {}; |
| from sys import argv | |
| import re | |
| # open the file and get read to read data | |
| file = open(argv[1], "r"); | |
| p = re.compile("\d+"); | |
| # initialize the graph | |
| vertices, edges = map(int, p.findall(file.readline())) | |
| graph = [[0]*vertices for _ in range(vertices)] |
| /** | |
| * Depth-first and Breadth-first graph traversals. | |
| * | |
| * In this diff we implement non-recursive algorithms for DFS, | |
| * and BFS maintaining an explicit stack and a queue. | |
| * | |
| * by Dmitry Soshnikov <[email protected]> | |
| * MIT Style license | |
| */ |