- 1
- 2
- 3
[...]
After some configuration changes, I was able to add the 2000 ports by defining them out manually.
[...]
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Всего: 202
0
[...]
After some configuration changes, I was able to add the 2000 ports by defining them out manually.
[...]
https://stackoverflow.com/questions/37992007/creating-ftp-service
+2
if (!(fs_info->workers && fs_info->delalloc_workers &&
fs_info->submit_workers && fs_info->flush_workers &&
fs_info->endio_workers && fs_info->endio_meta_workers &&
fs_info->endio_meta_write_workers &&
fs_info->endio_write_workers && fs_info->endio_raid56_workers &&
fs_info->endio_freespace_worker && fs_info->rmw_workers &&
fs_info->caching_workers && fs_info->readahead_workers &&
fs_info->fixup_workers && fs_info->delayed_workers && // <===
fs_info->fixup_workers && fs_info->extent_workers && // <===
fs_info->qgroup_rescan_workers)) {
err = -ENOMEM;
goto fail_sb_buffer;
}
https://bugzilla.kernel.org/show_bug.cgi?id=82021
0
PYTHONPATH=$(pwd) LANG=C.UTF-8 pipenv run ./scripts/script
Как работает виртуализация в Питоне.
+2
[0m[91mSaving to: ���jdk-8u131-linux-x64.tar.gz���
2050K .......... .......... .......... ........[0m[91m.. .......... 1% 137K 4m16s
2100K ....[0m[91m...... ......[0m[91m...[0m[91m. .......... ..........[0m[91m ........[0m[91m.. 1% 1.06M 4m14s
2150K .[0m[91m...[0m[91m.....[0m[91m. ...[0m[91m.[0m[91m...... .......... .......... .......... 1% 613K 4m14s
2200K .......... .......... .......[0m[91m... .....[0m[91m..... .......... 1% 318M 4m9s
2250K .......... .......... ......[0m[91m....[0m[91m ..........[0m[91m ..[0m[91m...[0m[91m..... 1%[0m[91m 609K 4m10s
2300K .......... ..........[0m[91m ....[0m[91m...... ....[0m[91m.....[0m[91m.[0m[91m ...[0m[91m....... 1% 612K 4m10s[0m[91m
2350K ........[0m[91m.. ....[0m[91m...... .[0m[91m.......[0m[91m.. ......[0m[91m....[0m[91m ...[0m[91m.....[0m[91m.. 1% 610K 4m11s
2400K ...[0m[91m....... .[0m[91m......... .[0m[91m....[0m[91m.....[0m[91m .....[0m[91m...[0m[91m.. .[0m[91m.[0m[91m....[0m[91m.... 1%[0m[91m 612K 4m12s
2450K .....[0m[91m..... ..[0m[91m........ ...[0m[91m....[0m[91m... ...[0m[91m....... .[0m[91m...[0m[91m...[0m[91m... 1%[0m[91m 612K 4m13s
2500K .......... .....[0m[91m..... ......[0m[91m.... ...[0m[91m.....[0m[91m.. ......[0m[91m...[0m[91m. 1% 616K 4m13s[0m[91m
2550K .[0m[91m......[0m[91m... .......... .[0m[91m......... ..[0m[91m........ .....[0m[91m..... 1% 616K 4m14s
2600K ......[0m[91m.... ...[0m[91m.[0m[91m...... .........[0m[91m.[0m[91m ..........[0m[91m .[0m[91m......... 1% 614K 4m15s
2650K ........[0m[91m.. .....[0m[91m.....[0m[91m ...[0m[91m....... .[0m[91m.....[0m[91m.... .......[0m[91m... 1% 644K 4m15s[0m[91m
2700K ......[0m[91m.... .......... ........[0m[91m..[0m[91m ..[0m[91m..[0m[91m...... ..[0m[91m......[0m[91m.. 1% 1.15M 4m13s
2750K .......[0m[91m...[0m[91m ......[0m[91m..[0m[91m.. ...[0m[91m....... .......... ....[0m[91m...[0m[91m.[0m[91m.. 1% 1.07M 4m11s
2800K .....[0m[91m.....[0m[91m ...[0m[91m....... .[0m[91m...[0m[91m...... ...[0m[91m.[0m[91m...... .......... 1% 306K 4m17s
2850K .......... .......... .......... .......... .......[0m[91m... 1% 181M 4m13s
2900K .[0m[91m........[0m[91m. ..[0m[91m...[0m[91m.[0m[91m....[0m[91m .....[0m[91m..... .[0m[91m..[0m[91m...[0m[91m.... ...[0m[91m..[0m[91m...[0m[91m.. 1% 307K 4m18s
2950K .......... ...[0m[91m......[0m[91m. ..[0m[91m.....[0m[91m...[0m[91m ...[0m[91m....... .[0m[91m..[0m[91m....... 1% 608K 4m19s
3000K .[0m[91m.......[0m[91m.. ...[0m[91m...[0m[91m...[0m[91m. .........[0m[91m. .......[0m[91m... ........[0m[91m.. 1% 421K 4m21s
3050K ...[0m[91m...[0m[91m...[0m[91m. .......[0m[91m... .[0m[91m....[0m[91m..[0m[91m... .........[0m[91m. .....[0m[91m..[0m[91m... 1% 400K 4m24s[0m[91m
3100K .......... .[0m[91m.....[0m[91m...[0m[91m. .......... .[0m[91m.....[0m[91m...[0m[91m. .[0m[91m...[0m[91m...... 1% 605K 4m25s
3150K .....[0m[91m..... .......... ......[0m[91m.... .[0m[91m...[0m[91m...[0m[91m... .[0m[91m......... 1% 613K 4m25s
3200K ..[0m[91m.....[0m[91m... .......... ...[0m[91m.....[0m[91m.. .[0m[91m...[0m[91m...... ...[0m[91m....... 1% 611K 4m25s
3250K .......... ..........[0m[91m .....[0m[91m.[0m[91m...[0m[91m. .......... .......... 1% 303K 4m30s
3300K .......... .......... .......... .......... ..[0m[91m........ 1% 1.34M 4m28s[0m[91m
3350K ..[0m[91m......[0m[91m.. .......[0m[91m.[0m[91m.. ........[0m[91m.[0m[91m. ..[0m[91m.....[0m[91m...[0m[91m .....[0m[91m..... 1% 306K 4m32s
3400K ......[0m[91m..[0m[91m.. ......[0m[91m.... ....[0m[91m...... .....[0m[91m.....[0m[91m .......... 1%[0m[91m 394K 4m35s
3450K .....[0m[91m..... .........[0m[91m. ....[0m[91m.[0m[91m..... ...[0m[91m....[0m[91m... .......... 1% 416K 4m37s
3500K .[0m[91m......[0m[91m...[0m[91m ...[0m[91m....... .[0m[91m......... ....[0m[91m...... .....[0m[91m..[0m[91m... 1% 401K 4m39s
3550K .......[0m[91m.[0m[91m.. .......... ...[0m[91m....... ...[0m[91m...[0m[91m...[0m[91m. .[0m[91m......[0m[91m... 1% 413K 4m41s
3600K ..........[0m[91m .......... .[0m[91m.....[0m[91m....[0m[91m ...[0m[91m..[0m[91m..... .........[0m[91m. 2% 421K 4m43s
3650K .......... ..[0m[91m.[0m[91m....... .[0m[91m.......[0m[91m.. .......... ...[0m[91m....... 2% 611K 4m43s
3700K ......[0m[91m.[0m[91m... .......... ..[0m[91m........ ......[0m[91m....[0m[91m .......... 2% 610K 4m43s
3750K ..[0m[91m..[0m[91m...[0m[91m... ......[0m[91m.... ..........[0m[91m .....[0m[91m..... ........[0m[91m.. 2% 574K 4m43s
3800K ....[0m[91m...... ....[0m[91m...... .....[0m[91m....[0m[91m. ......[0m[91m.... ........[0m[91m.. 2% 610K 4m43s
3850K .......[0m[91m... ....[0m[91m...... .......[0m[91m... ........[0m[91m.. .......[0m[91m... 2% 610K 4m43s
3900K .......... ...[0m[91m...[0m[91m.... .........[0m[91m. .......... .....[0m[91m....[0m[91m. 2% 611K 4m43s
3950K .......[0m[91m... .....[0m[91m...[0m[91m.. .......... .[0m[91m......... ..[0m[91m........ 2% 651K 4m43s[0m[91m
4000K .....[0m[91m..[0m[91m... ..........[0m[91m .......... ......[0m[91m.... .........[0m[91m. 2% 613K 4m43s
4050K ..[0m[91m........ ...[0m[91m..[0m[91m...[0m[91m.. .....[0m[91m..... .......... .[0m[91m..[0m[91m...[0m[91m.... 2% 612K 4m43s
4100K .........[0m[91m. ..........[0m[91m ...[0m[91m.....[0m[91m.. .....[0m[91m..[0m[91m... .......... 2% 1.08M 4m42s
Дженкинс прислал телеграму: девопс потрудился наславу.
(это только 0.5% от всего сообщения)
0
void DevToolsHttpHandler::OnJsonRequest(
int connection_id,
const net::HttpServerRequestInfo& info) {
// Trim /json
std::string path = info.path.substr(5);
// Trim fragment and query
std::string query;
size_t query_pos = path.find("?");
if (query_pos != std::string::npos) {
query = path.substr(query_pos + 1);
path = path.substr(0, query_pos);
}
size_t fragment_pos = path.find("#");
if (fragment_pos != std::string::npos)
path = path.substr(0, fragment_pos);
std::string command;
std::string target_id;
if (!ParseJsonPath(path, &command, &target_id)) {
SendJson(connection_id,
net::HTTP_NOT_FOUND,
NULL,
"Malformed query: " + info.path);
return;
}
...
100500 строк типичного ЦПП бреда
}
https://cs.chromium.org/chromium/src/content/browser/devtools/devtools_http_handler.cc?l=487
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/devtools/scripts/build/generate_protocol_externs.py
+1
https://s1.postimg.org/9ay7hrf7fj/js-love-forever.png
heart, heart, JavaScript!
+1
https://github.com/ruby/ruby/blob/trunk/parse.y
Как распарсить Руби код.
+2
class StreamRailBase:
__metaclass__ = ABCMeta
def __init__(self): pass
# @abstractmethod
# def create_connection(self): pass
#
# @abstractmethod
# def send_to_sr(self, method, path, params=None): pass
# @abstractmethod
# def get_advertisers(self): pass
#
# @abstractmethod
# def get_targeting_conditions(self, env, geos, os, size, white_list, black_list): pass
#
# @abstractmethod
# def create_ad_source(self, name, price, partner, tag_url, env, geos, os, size, req_cap, imp_cap, white_list=None, black_list=None): pass
#
# @abstractmethod
# def create_sr_tag(self, tag_instance): pass
#
# @abstractmethod
# def create_domain_list(self, f, list_type, adsource_name): pass
#
# @abstractmethod
# def activate_adsource(self, adsource_id): pass
#
# @abstractmethod
# def deactivate_adsource(self, adsource_id): pass
#
# @abstractmethod
# def set_caps(self, params, new_req_cap, new_imp_cap): pass
#
# @abstractmethod
# def set_geos(self, params, new_geos): pass
#
# @abstractmethod
# def edit_domain_list(self, f, list_id): pass
#
# @abstractmethod
# def set_list(self, params, new_list, list_type): pass
#
# @abstractmethod
# def set_size(self, params, size): pass
#
# @abstractmethod
# def edit_adsource(self, tag_instance, form_data): pass
#
# @abstractmethod
# def create_new_partner(self, name): pass
#
# @abstractmethod
# def sync_tag(self, tag_instance): pass
#
# @abstractmethod
# def add_new_tag_to_template(self, tag_name, price, tag_id, adv_id): pass
В человеке умер рахитектор, и в отчаянии, он закомитил эту хуйню в мастер.
0
# returns yesterday reports
def get_yesterday_reports(self):
pass
def get_waterfall_sources(self, wf_id, active_only=False):
# TODO: check if meta property is equal to the number of items in the array
# return test.mock_waterfall_sources.get_sources()
status = '1' if active_only else urllib.quote('0,1') # '0%2C1&'
self.get_auth_token()
encoded = urllib.urlencode({'authorization': self.token})
url = BASE_URL + "/waterfall-ad-sources?advertiser=&itemsPerPage=9999&name=&page=1&sortAsc=true&sortBy=tier&status={}&tier=&waterfall={}&{}" \
.format(status, wf_id, encoded)
retries = 1
while retries <= 3:
response = requests.get(url)
if response.status_code == 200:
break
else:
logging.error('Failed GET request to StreamRail, status code {}, {} retries'
.format(response.status_code, retries))
retries += 1
assert response.status_code == 200
try:
data = simplejson.loads(response.content)
waterfall_sources = data['waterfallAdSources']
assert int(data['meta']['total']) == len(waterfall_sources)
return waterfall_sources
except:
logging.exception("Could not load ad sources for waterfall {} from StreamRail:\n"
"{}".format(wf_id, response.headers))
raise
Хотя, с другой стороны, все эти рекламораспространители так выглядят. Но тут просто кучно так получилось.
−50
def jobs_postfunc(
jobs=jobs,
options=options,
closing_message=closing_message,
failure_message=failure_message
):
if jobs.were_interrupted():
if not options.no_progress and not options.silent:
sys.stderr.write("scons: Build interrupted.\n")
global exit_status
global this_build_status
exit_status = 2
this_build_status = 2
if this_build_status:
progress_display("scons: " + failure_message)
else:
progress_display("scons: " + closing_message)
if not options.no_exec:
if jobs.were_interrupted():
progress_display("scons: writing .sconsign file.")
SCons.SConsign.write()
Вложеная функция внутри портянки на 200 строк.