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 <windows.h> | |
#include <stdio.h> | |
// сообщение для записи в файл | |
#define MESSAGE "child process message" | |
int main(int argc, char *argv[]) | |
{ | |
printf("in child process\n"); | |
if (argc != 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
import re | |
strings_literals = re.compile(r'"(?:\\"|.)*?"') | |
commentaries = re.compile(r'/\*.*?\*/', re.DOTALL) | |
placeholder = '<{}>' | |
def cut_commentaries(s): | |
strings = [] | |
def insert_placeholder(m): | |
print(m.group(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
package generics.minfunction; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Test { | |
private static class Top {} | |
private static class Middle extends Top implements Comparable<Top> { | |
@Override | |
public int compareTo(Top o) { |
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
def cond(x, p=None): | |
""" | |
Compute the condition number of a matrix. | |
This function is capable of returning the condition number using | |
one of seven different norms, depending on the value of `p` (see | |
Parameters below). | |
Parameters |
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
from collections import defaultdict, OrderedDict | |
from typing import Dict, overload, TypeVar | |
T = TypeVar('T') | |
@overload | |
def func(foo: T, bar) -> Dict[T, int]: | |
return defaultdict(int) |
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, sys | |
from typing import Text, Union | |
def to_text(s: Union[bytes, Text]) -> Text: | |
if isinstance(s, bytes): | |
return s.decode(encoding=os.getenv('ENCODING', sys.stdin.encoding)) | |
return s |
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
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |