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/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
from bs4 import BeautifulSoup | |
import json | |
import re | |
def add_operator(mcc, mnc, brand, operator, status, country, country_code, db): |
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/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
import fnmatch | |
import plistlib | |
from PIL import Image |
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/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
from PIL import Image | |
import xml.etree.ElementTree as ElementTree | |
def unpack_fnt(f): |
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/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
from PIL import Image | |
def slice_pic(src_file, cols, rows): | |
base_dir = os.path.dirname(os.path.abspath(src_file)) |
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/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
from bs4 import BeautifulSoup | |
from ghost import Ghost | |
import logging | |
import urllib | |
import os |
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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Header with class declaration</Title> | |
<Description>Code snippet for class declaration</Description> | |
<Shortcut>header</Shortcut> | |
</Header> | |
<Snippet> | |
<Declarations> |
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
#pragma once | |
#include <boost/iostreams/filtering_stream.hpp> | |
class JsonCommentsInputFilter : public boost::iostreams::input_filter | |
{ | |
public: | |
JsonCommentsInputFilter() : currentChar(UNDEFINED), prevChar0(UNDEFINED), | |
prevChar1(UNDEFINED), prevChar2(UNDEFINED), prevChar3(UNDEFINED), | |
insideString(false), insideComment(NO_COMMENT) | |
{ |
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
#pragma once | |
#include <sstream> | |
#include <iomanip> | |
#include <vector> | |
class HexString | |
{ | |
public: | |
HexString& hexArray() |
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
#pragma once | |
class PartSlicer | |
{ | |
public: | |
PartSlicer(size_t totalSize, size_t partSize) : totalSize(totalSize), partSize(partSize), offset(0) {} | |
void nextPart() | |
{ | |
if (offset < totalSize) |
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
""" | |
normalize_path_case convert path | |
c:\foo\bar.txt | |
to | |
C:\Foo\Bar.txt | |
(as the file presents at file system, include case resgister) | |
""" | |
def correct_case(where, name): | |
if where.endswith(':'): |
OlderNewer