View commas.json
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
[ | |
{ | |
"id": 1, | |
"text": "abc,xyz\"", | |
"obj": { | |
"abc": "xyz,123\"" | |
}, | |
"arr": [ | |
"123\",456" | |
] |
View nil_interface_value.go
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
package main | |
import ( | |
"fmt" | |
"unsafe" | |
"github.com/google/uuid" | |
) | |
// NullInterfaceValue takes an interface ref, constructs an new struct from |
View nilling_interface_values.go
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
package main | |
import ( | |
"fmt" | |
"unsafe" | |
"github.com/AlekSi/pointer" | |
) | |
// interface defs from reflect library |
View isuuid5.cc
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 <string> | |
#include <sstream> | |
#include <algorithm> | |
using namespace std; | |
int main() { | |
cout << "Enter uuid: "; |
View deprecation_example.py
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 warnings | |
def bad_deprecation(): | |
warnings.warn("Please use new.function()!. Remove by 12/15/2016", | |
DeprecationWarning) | |
def good_deprecation(): | |
warnings.warn("Please use new.function()!. Remove by 12/15/2016", | |
DeprecationWarning, stacklevel=2) |
View star.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gist:c2047e281192714234fe
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 os; | |
import string | |
import random | |
from random import sample, choice | |
chars = string.letters + string.digits | |
length = 8 | |
f=open('words.txt') | |
lines=f.readlines() |
View gist:10013887
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> | |
class myClass { | |
private: | |
int * test; | |
public: | |
myClass() { | |
test = new int(4); | |
} | |
int * getPtr() { return test; } |