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
hostAliases: | |
enabled: true | |
value: | |
"178.22.122.100:53": | |
- "generativelanguage.googleapis.com" |
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 <windows.h> | |
#include <stdlib.h> | |
void gotoxy(int x, int y) | |
{ | |
COORD c; | |
c.X = x - 1; | |
c.Y = y - 1; | |
SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c); | |
} |
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 <conio.h> | |
#include <windows.h> | |
#include <cstdlib> | |
using namespace std; | |
// going to (x,y) in terminal windows | |
void gotoxy(short int x, short int y) | |
{ |
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
from timeit import timeit | |
my_list = list(range(10000)) | |
print("Reverse benchmark in a big list :") | |
print("reverse_slice: ",timeit(lambda: my_list[::-1],number=10000)) | |
print("reverse_in_place: ",timeit(lambda: my_list.reverse(),number=10000)) | |
my_list2 = [1,2,3,4] |
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
def tokenizer(input_program): | |
# A `current` variable for tracking our position in the code like a cursor. | |
current = 0 | |
# And a `tokens` array for pushing our tokens to. | |
tokens = [] | |
#* this is a little optimization, since `input_program` length won't change | |
# in the excecution it is safe to get the length at the beginning. | |
program_length = len(input_program) | |
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 python | |
# This is an example Git server. http://blog.nerds.kr/post/106956608369/implementing-a-git-http-server-in-python | |
# Stewart Park <[email protected]> | |
from flask import Flask, make_response, request, abort | |
from StringIO import StringIO | |
from dulwich.pack import PackStreamReader | |
import subprocess, os.path | |
from flask.ext.httpauth import HTTPBasicAuth |