This file contains 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
class GstPluginsGood < Formula | |
desc "GStreamer plugins (well-supported, under the LGPL)" | |
homepage "https://gstreamer.freedesktop.org/" | |
stable do | |
url "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.16.2.tar.xz" | |
sha256 "40bb3bafda25c0b739c8fc36e48380fccf61c4d3f83747e97ac3f9b0171b1319" | |
end | |
bottle do |
This file contains 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
class Aalib < Formula | |
desc "Portable ASCII art graphics library" | |
homepage "https://aa-project.sourceforge.io/aalib/" | |
url "https://downloads.sourceforge.net/aa-project/aalib-1.4rc5.tar.gz" | |
sha256 "fbddda9230cf6ee2a4f5706b4b11e2190ae45f5eda1f0409dc4f99b35e0a70ee" | |
revision 1 | |
bottle do | |
cellar :any_skip_relocation | |
sha256 "306da4a8cb39ef81eed8b81a7d1c1c7bd47405d8270d036dde9c07c630fa4ea3" => :catalina |
This file contains 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
import xml.etree.ElementTree as ET | |
import http.client | |
import urllib.parse | |
import argparse | |
class Film: | |
def __init__(self, filmid, rating, percentile): | |
self.filmid = filmid | |
self.rating = rating |
This file contains 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
// ==UserScript== | |
// @name Disable leetcode shortcuts(ctrl+' and ctrl+Enter) | |
// @description Prevents accidentally running and submitting questions. | |
// @version 0.1 | |
// @author akdeniz | |
// @match https://leetcode.com/* | |
// @run-at document-start | |
// @include * | |
// @grant none | |
// ==/UserScript== |
This file contains 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 <regex> | |
#include <sstream> | |
int main() | |
{ | |
std::string str = "[A,B,15] [C,D,1] [C,D,2][G,H,9] [C,D,a] [C,D,9] [E,F,00177] "; | |
std::regex word_regex( "\\[([A-Z]),([A-Z]),(\\d+)\\]" ); | |
// get words and check if each of them matches the regex |
This file contains 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
// ltrace seems to be failing when getenv is called by shared object | |
// gcc -shared -fpic -ldl -o hook_getenv.so hook_getenv.c | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <dlfcn.h> | |
#include <limits.h> | |
#include <errno.h> | |
#include <sys/stat.h> |
This file contains 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
[{"words":[{"word_id":17,"rule_id":1,"word":".*","is_regexp":true,"is_complete_matching":false,"is_case_sensitive":false,"is_include_href":false,"insert_date":1509556290460,"update_date":1509556290460,"delete_date":0}],"search_block_by_css":false,"hide_block_by_css":false,"rule_id":1,"title":"Problems - LeetCode","is_disabled":false,"site_regexp":"https://leetcode.com/problemset/*","example_url":"https://leetcode.com/problemset/all/?difficulty=Medium&status=Todo","site_description":"Problems - LeetCode","specify_url_by_regexp":true,"search_block_xpath":"//TR//DIV//SPAN","search_block_css":"TR I","search_block_description":"","hide_block_xpath":"//TBODY[@class=\"reactable-data\"]//TR","hide_block_css":"","hide_block_description":"","user_identifier":"164e7d1a-d68d-4d38-b51a-394eddaa6adc","global_identifier":"5a544c54-df76-492c-9d58-785d4927ac5f","block_anyway":false,"insert_date":1509551105336,"update_date":1509556446509,"delete_date":0}] |
This file contains 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
// taken from http://www.boost.org/doc/libs/1_55_0/doc/html/hash/reference.html#boost.hash_combine | |
#include <functional> | |
template <class T> | |
inline void hash_combine( std::size_t& seed, const T& v ) | |
{ | |
std::hash<T> hasher; | |
seed ^= hasher( v ) + 0x9e3779b9 + ( seed << 6 ) + ( seed >> 2 ); | |
} |
This file contains 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/python | |
""" | |
Generates unique random integers. | |
http://preshing.com/20121224/how-to-generate-a-sequence-of-unique-random-integers/ | |
""" | |
class RandomUniqueSequenceInt64: |
NewerOlder