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 { NgModule } from '@angular/core'; | |
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; | |
import { CdkTableModule } from '@angular/cdk/table'; | |
import { | |
MatAutocompleteModule, | |
MatButtonModule, | |
MatButtonToggleModule, | |
MatCardModule, | |
MatCheckboxModule, | |
MatChipsModule, |
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
#!/bin/sh | |
## Service for traccar. | |
# PROVIDE: traccar | |
# REQUIRE: DAEMON | |
# BEFORE: | |
# KEYWORD: shutdown | |
# Add the following lines to /etc/rc.conf to enable `traccar': |
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
+ [ -r /etc/rc.conf ] | |
+ . /etc/rc.conf | |
+ rc_debug=YES | |
+ traccar_enable=YES | |
+ traccar_root=/usr/local/traccar | |
+ traccar_user=root | |
+ traccar_java=/usr/local/openjdk7-jre/bin/java | |
+ sourced_files=:/etc/rc.conf::/etc/rc.conf.local: | |
+ [ -r /etc/rc.conf.local ] | |
+ _rc_conf_loaded=true |
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
#!/bin/sh | |
# | |
# PROVIDE: traccar | |
# REQUIRE: DAEMON | |
# BEFORE: | |
# KEYWORD: shutdown | |
# Add the following lines to /etc/rc.conf to enable `traccar': | |
# |
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 celery import Celery | |
from celery.schedules import crontab | |
from pyramid_mailer.message import Message | |
from intranet_backend_api.celery_bundle.celery_settings import mailer | |
# Define app | |
app = Celery() | |
## Broker settings. | |
broker_url = 'amqp://app_rmq:pass@localhost:5672/intranet' | |
# Set timezone, for DST |
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
class TAAbsence(BaseRW): | |
__tablename__= 'ta_absences' | |
id = Column(Integer, primary_key=True) | |
user_id = Column(Integer, ForeignKey('ta_users.id'), nullable=False) | |
start_date = Column(Date, nullable=False) | |
end_date = Column(Date, nullable=False) | |
# so an example TAAbsence |
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
central_lat = sum(lats)/len(lats) | |
central_lng = sum(lngs)/len(lngs) | |
bbox = BoundingBox(coords) | |
map = Basemap( | |
llcrnrlon=bbox.minx,llcrnrlat=bbox.miny, | |
urcrnrlon=bbox.maxx,urcrnrlat=bbox.maxy, | |
resolution='i', projection='tmerc', | |
lat_0 = central_lat, lon_0 = central_lng) |
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
{ | |
"status": "success", | |
"total_travel_time": 31.983334, | |
"total_idle_time": 0, | |
"num_unserved": 0, | |
"unserved": null, | |
"solution": { | |
"vehicle_1": [ | |
{ | |
"location_id": "depot", |
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
Traceback (most recent call last): | |
File "/home/luke/virts/as2edi/bin/pserve", line 6, in <module> | |
from pkg_resources import load_entry_point | |
File "/home/luke/virts/as2edi/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2927, in <module> | |
@_call_aside | |
File "/home/luke/virts/as2edi/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2913, in _call_aside | |
f(*args, **kwargs) | |
File "/home/luke/virts/as2edi/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2952, in _initialize_master_working_set | |
add_activation_listener(lambda dist: dist.activate()) | |
File "/home/luke/virts/as2edi/lib/python3.5/site-packages/pkg_resources/__init__.py", line 956, in subscribe |
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 myTemplate from './app.component.html' | |
@Component({ | |
selector: 'app', | |
template: myTemplate, | |
}) |
NewerOlder