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
| SYSTEM_THREAD(ENABLED); | |
| #include "HttpClient/HttpClient.h" | |
| #include "PowerShield/PowerShield.h" | |
| /** | |
| * Declaring the variables. | |
| */ | |
| HttpClient http; | |
| const long sleep_interval = 60*5; |
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> | |
| #define TRUE 1 | |
| #define FALSE 0 | |
| typedef struct node { | |
| struct node* next; | |
| int val; | |
| } node; |
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
| package main | |
| import ( | |
| "flag" | |
| "github.com/gorilla/handlers" | |
| "github.com/gorilla/mux" | |
| "net/http" | |
| "os" | |
| ) |
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 <stdint.h> | |
| #include <stdio.h> | |
| #include <zmq.h> | |
| #include <assert.h> | |
| #include <stdlib.h> | |
| int main(int argc, char** argv) { | |
| if(argc < 3) { | |
| fprintf(stderr, "Usage %s: <xpublish_url> <xsubsriber_url>\n", argv[0]); | |
| exit(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
| PREFIX fb: <http://rdf.freebase.com/ns/> | |
| SELECT DISTINCT ?cityname ?countryname ?popcount ?latitude ?longitude WHERE { | |
| ?citytype fb:type.object.name "City/Town/Village"@en . | |
| ?city fb:type.object.type ?citytype . | |
| ?city fb:type.object.name ?cityname . | |
| ?city fb:location.location.containedby ?country . | |
| ?city fb:location.statistical_region.population ?population . | |
| ?population fb:measurement_unit.dated_integer.number ?popcount . |
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 <experimental/filesystem> | |
| #include <fstream> | |
| namespace fs = std::experimental::filesystem; | |
| int main() { | |
| fs::path path = u8"猫.txt"; | |
| std::cout << "path = " << path << std::endl; |
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 <string_view> | |
| #include <vector> | |
| std::vector<std::string_view> split_no_strcpy(std::string_view orig, const char sep) { | |
| std::vector<std::string_view> result; | |
| if (orig.size() > 0) { | |
| size_t from = 0; | |
| size_t sepIndex = orig.find(sep); |
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 <chrono> | |
| #include <iostream> | |
| #include <algorithm> | |
| #include <array> | |
| int main(int argc, char** argv) { | |
| std::array<int, 13> arr = {12, 5, 7, 9, 2, 2, 33, 24, 1, 8, 0, 3, 77}; | |
| auto start = std::chrono::high_resolution_clock::now(); | |
| std::sort(arr.begin(), arr.end()); |
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
| #!/usr/bin/env python3 | |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| import sys | |
| import time | |
| # data I/O |
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
| " Show tabs, End-of-Line and Trailing spaces | |
| set listchars=tab:▸\ ,eol:¬,trail:~ | |
| " So the background is transparent for the above characters | |
| highlight Normal ctermbg=none | |
| highlight NonText ctermbg=none | |
| " Whitespace at end of line in red | |
| highlight ExtraWhitespace ctermbg=red guibg=red | |
| match ExtraWhitespace /\s\+$/ |
OlderNewer