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
| import 'dart:convert'; | |
| List<String> split(String string, String separator, {int max = 0}) { | |
| var result = List<String>(); | |
| if (separator.isEmpty) { | |
| result.add(string); | |
| return result; | |
| } |
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 | |
| from collections import defaultdict | |
| import csv | |
| import concurrent.futures | |
| import numpy | |
| import requests | |
| import pycountry | |
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 | |
| import json | |
| import datetime | |
| import requests | |
| def get_police_coordinates_from_waze(): | |
| headers = { | |
| "referer": "https://www.waze.com/livemap", |
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
| import ldap3 | |
| from ldap3 import Server, Connection | |
| from ldap3.extend.microsoft.addMembersToGroups import ad_add_members_to_groups | |
| def domain_to_distinguished_name(domain): | |
| return ','.join(map(lambda x: 'dc=' + x, domain.split('.'))) | |
| def main(): |
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
| import 'dart:convert'; | |
| String toJson(dynamic object) { | |
| var encoder = new JsonEncoder.withIndent(" "); | |
| return encoder.convert(object); | |
| } | |
| dynamic fromJson(String jsonString) { | |
| return json.decode(jsonString); | |
| } |
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
| [ | |
| { | |
| "key": "ctrl+alt+f", | |
| "command": "editor.action.formatDocument", | |
| "when": "editorTextFocus && !editorReadonly" | |
| }, | |
| { | |
| "key": "ctrl+shift+i", | |
| "command": "-editor.action.formatDocument", | |
| "when": "editorTextFocus && !editorReadonly" |
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 split_brackets(text, brackets_open_character='(', brackets_close_character=')', depth=0): | |
| items = [] | |
| word = '' | |
| counter = 0 | |
| start = -1 | |
| for index, character in enumerate(text): | |
| if character == brackets_open_character: |
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
| import requests | |
| class GitHubClient(object): | |
| def __init__(self, api_token, verify_ssl=True): | |
| self.api_token = api_token | |
| self.headers = {'Authorization': 'token {}'.format(api_token)} | |
| self.verify_ssl = verify_ssl | |
| def get_branches(self, username, repository): |
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
| import sys | |
| import fcntl | |
| import os | |
| _run_once_file_handle = 0 | |
| def run_once(): | |
| global _run_once_file_handle |
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/python | |
| from scapy.layers.inet import * | |
| from scapy.layers.l2 import * | |
| from scapy.all import * | |
| class ERSPAN(Packet): | |
| name = "ERSPAN" | |
| fields_desc = [BitField("version", 1, 4), | |
| BitField("vlan", 0, 12), |