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
<?php | |
// Optional mappings | |
$port_service = array( | |
20 => "ftp-data", | |
21 => "ftp", | |
22 => "ssh", | |
23 => "telnet", | |
24 => "priv-mail", | |
25 => "smtp", |
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
var TaskMessages = Class.create(); | |
TaskMessages.prototype = { | |
initialize: function(sysId) { | |
this.sysId = sysId; | |
this.exclude = [ | |
'calendar_stc', 'sys_class_name', 'calendar_duration', 'sys_domain,location', | |
'business_duration', 'reassignment_count', 'upon_reject', | |
]; | |
this._generateHistory(); | |
}, |
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
$ CC=/usr/local/bin/gcc-8 python3 setup.py build_ext --inplace && python3 -m nanopy | |
running build_ext | |
building 'nanopy.work' extension | |
creating build | |
creating build/temp.macosx-10.6-intel-3.6 | |
creating build/temp.macosx-10.6-intel-3.6/nanopy | |
gcc-8 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c nanopy/work.c -o build/temp.macosx-10.6-intel-3.6/nanopy/work.o -fopenmp | |
gcc-8: warning: x86_64 conflicts with i386 (arch flags ignored) | |
nanopy/work.c: In function 'generate': |
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
[/tmp/nanopy]$ CC=/usr/bin/clang python3 setup.py build_ext --enable-gpu --inplace | |
running build_ext | |
building 'nanopy.work' extension | |
/usr/bin/clang -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-sXpGnM/python3.6-3.6.3=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DHAVE_CL_CL_H=1 -I/usr/include/python3.6m -c nanopy/work.c -o build/temp.linux-x86_64-3.6/nanopy/work.o | |
clang: warning: argument unused during compilation: '-specs=/usr/share/dpkg/no-pie-compile.specs' [-Wunused-command-line-argument] | |
nanopy/work.c:15:31: warning: missing terminating '"' character [-Winvalid-pp-token] | |
const char *opencl_program = R"%%%( | |
^ | |
nanopy/work.c:15:30: error: use of undeclared identifier 'R' |
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 | |
def get_part_of_day(h): | |
return ( | |
"morning" | |
if 5 <= h <= 11 | |
else "afternoon" | |
if 12 <= h <= 17 | |
else "evening" |