text:
fix: Check for tasks without a profile without UnsetProfileConfig

Fixes #117
dbt actually got rid of UnsetProfileConfig (see: https://github.com/dbt-labs/dbt-core/commit/5b31cc4266e8dd5d2e5e94755343baf72dd866a0). So we shouldn't rely on it anymore. Instead, we can just check we are not running a Task that doesn't use a profile (deps or clean).
Hopefully this is all required to support dbt-core 1.5.

Unfortunately, UnsetProfileConfig wasn't the only thing removed in dbt-core 1.5: apparently ParseTask is no more, and a lot of setup functions changed their signature. I'm pushing some changes to maintain backwards compatibility as I do not wish to drop support for dbt 1.4 just yet. However, these changes will require testing, so it's likely this fix will not be as quick as expected. In the meantime, stick to dbt-core==1.4.5.
We don't have a policy on dbt supported versions, so as long as it's not much of a hassle, I'll try to support all dbt-core>=1.0.0 versions.

Closed in favor of #127

repo: tomasfarias/airflow-dbt-python


text:
🛑 Project-Kualinet is down

In 2d18b5b, Project-Kualinet (https://api1.kualinet.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Project-Kualinet is back up in c55646c.

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
fix: ClickStation has a cast error

When using the clickStation method, this error is thrown
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'String' is not a subtype of type 'Map<dynamic, dynamic>' in type cast
#0      RadioBrowserApi.clickStation (package:radio_browser_api/src/radio_browser_api.dart:574:56)
<asynchronous suspension>

it calls this code
Future<StationClickCounter> clickStation({
    /// The UUID of the station that was clicked.
    required String uuid,
  }) async {
    assert(
      uuid.isNotEmpty,
      'Invalid uuids value; must contain at least one UUID',
    );

    final uri = Uri(
      scheme: 'https',
      host: host,
      path: '/json/url/$uuid',
    );

    final response = await http.get(uri);
    return StationClickCounter.fromJson((response.body as Map).cast());
  }

--->
 /// {@macro station_click_counter}
  factory StationClickCounter.fromJson(Map<String, dynamic> json) =>
      _$StationClickCounterFromJson(json);

--->
StationClickCounter _$StationClickCounterFromJson(Map<String, dynamic> json) =>
    StationClickCounter(
      ok: json['ok'] as bool,
      message: json['message'] as String,
      stationUUID: json['stationuuid'] as int,
      name: json['name'] as String,
      url: json['url'] as String,
    );

Working fine with UUID: 9617a958-0601-11e8-ae97-52543be04c81

This must occur when you call this function with an invalid (or unsynced) station UUID, as shown here:

This could probably use better error handling though. I'll work on that whenever I free up from work a little bit, and I'll keep you posted. Thanks!

9617a958-0601-11e8-ae97-52543be04c81

Thanks for your answer!
Sadly not, I copy pasted the exact UUID from you into a test call and the same exceptions happens :(

Okay, that should fix it. Please update to 2.0.0 and let me know if anything else is wrong!

Thank you very much @tomassasovsky :) worked 👍

@tomassasovsky
sometimes an exception is thrown when using clickStation
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected character (at character 1)
<html>
^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1376:5)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1243:9)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:908:22)
#3      _parseJson (dart:convert-patch/convert_patch.dart:35:10)
#4      JsonDecoder.convert (dart:convert/json.dart:610:36)
#5      JsonCodec.decode (dart:convert/json.dart:216:41)
#6      jsonDecode (dart:convert/json.dart:155:10)
#7      RadioBrowserApi.clickStation (package:radio_browser_api/src/radio_browser_api.dart:574:22)
<asynchronous suspension>
#8      RadioService.clickStation (package:musicpod/src/radio/radio_service.dart:116:5)
<asynchronous suspension>
#9      RadioModel.clickStation (package:musicpod/src/radio/radio_model.dart:89:14)
<asynchronous suspension>

but I couldnt yet find a pattern when this happening. Will keep you updated

Huh, very weird - please do give an update if you find any way to reproduce it. Any test code snippets are always appreciated. You might also want to wrap your call to the API with the retry function from this package.

@Feichtmeier I just checked the API reference for this endpoint. It says "Every call to this endpoint from the same IP address and for the same station only gets counted once per day", so it might have to do with that.
See more: https://docs.radio-browser.info/#station-click-counter

authors: Feichtmeier tomassasovsky


text:
Marker icon can't be customized

The marker style is hardcoded to the olMarker directive, and it isn't overriden if you set a custom one to the defaults set to the map.

Hi @nbiton
Yesss, I'm using it this way but the code can be easily extended to support custom icons, you're right that this could be a good functionality.
I'm going to add it and make an example of use, tell you something later.

This did it for me.
With it, I can define the styles in the default provided to the openlayers directive like so:
$scope.defaults = {
    styles: {
        marker: {
          image: new ol.style.Icon({
            anchor: [0.5, 1],
            anchorXUnits: 'fraction',
            anchorYUnits: 'fraction',
            opacity: 0.90,
            src: 'img/marker.svg'
          })
        }
      }
};

authors: nbiton tombatossals

license: mit

license_source: bigquery


text:
Implement the RiscV fj library

Implement stl/riscvlib.fj
Create a new standard library file just for RiscV 32bit Instruction Set (RV32I).

ecall: related syscalls

read (input):   a7=63, a0=0, a1=input_buf, a2=len   (returns len.  ~maybe return bytes read until \n or \0?)
write (output):   a7=64, a0=1, a1=output_buf, a2=len   (returns len)
exit:   a7=93, a0=error_code   (exits, self-loop)
exit_group:   a7=94, a0=error_code   (exits, self-loop)
brk:   a7=214, a0=new_brk   (maintains global brk. returns brk, sets brk to new_brk)

maybe getpid (return 1) / getcwd (return "", 1).

no other syscalls seemed important, maybe sched_yield/sync (ignored) and reboot (exit), but they don't exist in the numbers link below.
numbers, info

The table in page 144 (128) in V20191214 riscv-pdf is really helpfull.

Decided on switching to arm.
the "syscall"-implementation equivalence in arm-none-eabi-gcc in the implementation of newlib's functions (as _write, _read, _exit, _sbrk). so the research on the linux syscalls wasn't redundant - it shows as now that we were totally on track, and it's a clear sign of confidence on continuing on this path.

repo: tomhea/flip-jump


text:
dynamically sized, stack-allocated arrays cause segfaults at compile time

This works in c:
#include <stdio.h>

void main() {
  int x = 1;
  float y[x];
  printf("no error?");
}

This should do the same in dale:
(import stdlib)

(def main (fn extern-c void (void)
  (let ((x \ 1)
        (y (array-of x float)))
    (printf "no error?\n"))))

This causes segfault at compile time. The c version also works, if x isn't constant.
The problem in dale may also be, that arrays of different sizes are different types unlike in c.
There are some solutions:

don't allow stack-allocated arrays of unknown size (no good option, since it is possible, but better than segfaults)
add unsized arrays for this case (maybe (array-of 0 T))
let all arrays be unsized types ((array-of T))
let arrays be equivalent to pointers for unknown size (seems too irregular)
let arrays be equivalent to pointers anytime (also a nice solution, since it's similar to c, and currently some array-casting and arrays as functions are weird. The Array concept will be enough for this)

Actually I believe your example C code isn't standard compliant. But some compilers support usage like that anyway.
As for Dale, I think I oppose pretty much all your suggestions. I think generally your last option listed with how C acts is generally considered a weakness of C. If I'm not mistaken (array-of n T) is a static type. So (array-of 2 int) and (array-of 3 int) are two separate types, and no runtime data is allocated for the length. If I'm right, then this is good, much like std::array in C++, which fixes the issue with native C-style arrays.
For a dynamically allocated array I think that should be its own type. Call it sequence or something like that. Which will allocate on the stack (because otherwise you may as well use vector), and also allocate a number for holding the element count. You can probably implement this as a library since there are OS functions for arbitrary stack allocation (see alloca). And implement the copy semantics etc. Free it when it goes out of scope in the destructor.

I don't think, when something is allocated on stack, it's possible to dynamically resize it.

Yeah I guess not, it would work in theory if it was the element at the top of the stack. But that's probably usually not the case. So yeah good correction :P to be fair I wrote that at like 2am x)

Thanks, there was a problem with how the size expression was being evaluated, and that's now been fixed.  I think the suggested alloca approach is the best one here, if VLAs are needed, since adding VLAs as a language-level feature is fairly complex (for each of the original suggested solutions) while bringing little additional benefit.

authors: BitPuffin porky11 tomhrr

repo: tomhrr/dale


text:
String class name for configuration.user_model

fixes #8

Thanks! I'll take it for a spin later today, but at a quick glance it looks perfect.
I'm not quite sure how that error ever came to be. The configuration was 'borrowed' from Authenticate, which does it the right way:
https://github.com/tomichj/authenticate/blob/master/lib/authenticate/configuration.rb#L257
Not sure how I managed to screw that up.
Thanks very much for the fix.

thanks again for catching this, and fixing it

it’s all good man was nothing, i’ll maybe have an other one for you next week to allow sti on invite model but i would like to finish the integration first to make sure i need this feature.
Thank to you for this nice gem, it really helped !

Le 1 juil. 2017 à 10:41, Justin Tomich notifications@github.com a écrit :
thanks again for catching this, and fixing it
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/tomichj/invitation/pull/9#issuecomment-312419673, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHEaupFhKu3GY7S5AU6QxBc45HqvryBks5sJgY2gaJpZM4OGTyk.

oops, accidentally clobbered master with an experimental script gone haywire, remerging your change, apologies

Thanks again, pushed a new version of the gem, version 0.4.2, with your change.
I'm really glad to hear you found the gem of some use!

source: gharchive/pull-request

authors: itkin tomichj

repo: tomichj/invitation


text:
What is the name of the function that starts the file upload?

I have an upload modal, but I'm finding that users are not successfully uploading because after they choose the file to upload, they just hit "Finished" and exit out of the modal without ever clicking the "upload" button.  Obviously I could just validate the modal and require them to upload before they hit exit, but it seems like it would be a more fluid user experience if I could just trigger the upload when they exit the modal.  I wanted to just call the "upload" function when the user clicks the confirmation button, but I don't know the name of the function to call!
edit: is it just  Uploader.startUpload ?

Sorry for the very late answer, I guess you figured it out by now.  But just for completeness it is it can be found here Uploade.startUpload.

no worries, thanks for the response, I always appreciate your work on this project

authors: FridaG tomitrescak

repo: tomitrescak/meteor-uploads


text:
Compass-card misbehaves in stack-cards

Checklist:

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Release with the issue:
v1.0.0-dev
Last working release (if known):
?
Browser and Operating System:
?
Description of problem:
I noticed an interesting issue with the UI editor and the compass card.
I have the compass card in a horizontal stack in a vertical stack
When editing, if the focus moves from row 2, column 1 (compass card) to row 2 column 2 (UV index) it copies the compass card config over to column 2. This only happens with the visual editor open. If using the code view it does not occur.
Javascript errors shown in the web inspector (if applicable):

Additional information:
See forum post

I cannot reproduce this on

compass-card 1.0.0
home assistant 0.119.0.dev20201213
Frontend version: 20201212.0 - latest

If anyone can point me in the right direction to get this reproduced, then I can look into this.

repo: tomvanswam/compass-card


text:
Can't login with UDM

Was working fine with self hosted, but moved to UDM Pro and can't connect

I just tried it with my UniFi OS device (a Cloud Key Gen2 Plus) and I could log in correctly.  A couple of thoughts:
What do the State Variables look like for your UniFi Controller virtual device, especially the 'UniFiOS' value?  You may need to hit Configure or Initialize again to get those set correctly if you re-used the previous virtual device from your self-hosted controller.
Are you sure that the account and login credentials that you used in the Hubitat virtual device are valid for your new UDM configuration?

@hakarune FYI

I just tried it with my UniFi OS device (a Cloud Key Gen2 Plus) and I could log in correctly. A couple of thoughts:
What do the State Variables look like for your UniFi Controller virtual device, especially the 'UniFiOS' value? You may need to hit Configure or Initialize again to get those set correctly if you re-used the previous virtual device from your self-hosted controller.
Are you sure that the account and login credentials that you used in the Hubitat virtual device are valid for your new UDM configuration?

Going to be honest I have no clue what happened to this thing. Last night I created the local user account to go with this controller on hubitat and entered in the IP 10.1.1.1 and it wouldn't work, pressed initialize probably 10 times as well. Created a second user, still didn't work. Tried playing with the url/ip adding the /extensions even and nothing. Today I read your response and go in, it's still not working. I edit the ip back to just 10.1.1.1 and nothing and then press edit device ID (didn't change the ID or anything) and pressed save and now it's online. All the children are back online...

That's weird, but I'm glad it's working now.

authors: hakarune tomwpublic


text:
use animated examples

https://terminalizer.com/

@nrukavkov closed?

repo: ton-actions/tonos-se


text:
Update installation instructions for Arch Linux

innernet is now available in the community repository: https://archlinux.org/packages/community/x86_64/innernet/

@orhun Any idea how long until it'll be in manjaro?

Thanks @orhun!

authors: Eeems mcginty orhun

repo: tonarino/innernet


text:
2.4.0 Doesn't Work

The latest update breaks DotNetEnv.Env.Load(); as it doesn't bother loading the .env file anymore.
Downgrade to 2.3.0 and it works.

Hey, thank you very much for the feedback. Could you perhaps try the example I suggest in: https://github.com/tonerdo/dotnet-env/issues/69#issuecomment-1408940848 and also elaborate on the conditions you are running this in?

I have a Entity Framework Factory to run database migrations.
public class CustomContextFactory : IDesignTimeDbContextFactory<TNOContext>
{
    public TNOContext CreateDbContext(string[] args)
    {
        DotNetEnv.Env.Load();
        // Do stuff with ConfigurationBuilder
        var cs = config.GetConnectionString("Default");
        // Should have connection string from .env, but 2.4.0 returns nothing
    }
}

In the same folder as the project is a .env file with the following.
ConnectionStrings__Default=**********

Thanks again. For the sake of helping me debug this, can you try this while using 2.4.0:
DotNetEnv.Env.Load($"{Directory.GetCurrentDirectory()}.env") ?
That said, after we have debugged this issue, in 2.4.0, you should also be able to simplify your use case, I believe, with this new feature: https://github.com/tonerdo/dotnet-env#using-net-configuration-provider

The following works.
DotNetEnv.Env.Load($"{Directory.GetCurrentDirectory()}/.env");
Which means whatever code was changed in 2.4.0 to use the default current directory doesn't work anymore.

Additionally .AddDotNetEnv(".env") doesn't work either.  It will only work if I once again specify the current directory.
.AddDotNetEnv($"{Environment.CurrentDirectory}/.env")

OK, I'll roll that change back. Thanks!

@Fosol
I think you should first indicate with which tools the test was performed. For example, I tried to reproduce this problem using the following:

Entity Framework Core 7.0.0
.NET 7.0

And everything works for me. The .env file loads.
I run my migrations with:
dotnet ef migrations add InitialCreate

<TargetFramework>net7.0</TargetFramework>

@Fosol Ok, tell me how I can reproduce this problem. Everything works for me (I tried your code).

Take a look at the open source code here.  Note this doesn't have the updated 2.4.0 applied, but it's the same code.
I have tested the above changes and when setting the current directory it works.  So the change that broke it must not be using the same location.
https://github.com/bcgov/tno/blob/dev/libs/net/dal/TNOContextFactory.cs

If you review the PR that caused the issue you'll see why it doesn't work.
https://github.com/tonerdo/dotnet-env/pull/72/files
Switching to AppContext.BaseDirectory from Directory.GetCurrentDirectory() is a change to the original logic.  It's a breaking change.  They don't mean the same thing.

Perhaps AppContext.BaseDirectory might actually be more desirable going forward, as it should fetch the .env where the main execution occurs, or perhaps it may be confusing as you want the .env as close to the project as possible.  Up to you what you want to do going forward, but it should be noted as a breaking change and documented on the front page.

@Fosol Good. I'll check this out later. You can try this dotenv library to check if this same problem occurs? (it also uses AppContext.BaseDirectory).

Yes that will have the same "issue".  It looks like the history of that library also changed the same way at some point, which would have resulted in a breaking change.
Technically both approaches are valid.  One approach may be more desirable or intuitive depending on how they are commonly used.  Up to you what you decided to do, just realize the change from 2.3.0 to 2.4.0 is a breaking change.

@Fosol I seem to have found the problem.
Directory.GetCurrentDirectory() returns: C:\Users\syslan\Desktop\tno\libs\net\dal.
And AppContext.BaseDirectory returns: C:\Users\syslan\Desktop\tno\libs\net\dal\bin\Debug\net7.0\
And DotNetEnv.Env.Load(); by default it searchs  for the .env file in the current directory (i.e., in  C:\Users\syslan\Desktop\tno\libs\net\dal\bin\Debug\net7.0\). That's why it doesn't load anything (assuming that the .env is in the same directory where the .csproj is located).
The solution is to use DotNetEnv.Env.TraversePath().Load(); so that it searchs in the parent directories.
This problem does not occur with dotenv.core because by default it searches in parent directories

Traversing the parent directories can result in unexpected results and should be opted in rather than default behaviour.
My default expectation is that the .env would reside where I executed the dotnet command.  This is also how it used to behave.
The change would mist likely not impact a deployed assembly, however local development and testing is impacted.  I would be surprised if anyone would want .env files to show up in the build folder.

@Fosol Yes, it is that AppContext.BaseDirectory would return C:\Users\syslan\Desktop\tno\libs\net\dal if the project targets to .NET Framework. There is an breaking change in this library as you mention.
What unexpected results might occur if DotNetEnv.Env.TraversePath().Load(); were to search by default in parent directories?

Might be multiple .env files in a solution.  Traversing may find one that isn't relevant.

I have reverted this change for the newly released 2.5.0 and unlisted 2.4.0 .

authors: Fosol MrDave1999 rogusdev

repo: tonerdo/dotnet-env


text:
Optional Description for Aliases

A common thing that I do is use opaque aliases (part of the md5sum of the date when I created the alias for example) so that I can have a single, throw-away address per company. It would be nice to have that be settable and something I can query in Modoboa. I am already storing it locally in my DB and have written scripts to query it. But it would be better for users to be able to do all of this via the UI.
+1 for aliases that have an expiration date. Email addresses for rebates or dealing with a buyer/seller online. When the expiration date comes around, you simply drop the alias.
Thanks, Pat

This issue was moved to modoboa/modoboa-admin#3

authors: patsoffice tonioo

repo: tonioo/modoboa

license: isc


text:
Docker images?

Has anyone tried to create a working set of Docker images for modoboa, postfix, dovecot?

I'm also interested in this. will try to build one though

Built a set of images off of the Alpine base image for optimized size and
quicker deployment :)
James Mills / prologic
E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au
On Sun, Jan 3, 2016 at 7:34 AM, Hadi Farnoud notifications@github.com
wrote:

I'm also interested in this. will try to build one though
—
Reply to this email directly or view it on GitHub
https://github.com/tonioo/modoboa/issues/821#issuecomment-168505950.

care to share @prologic ?

Ooops; sorry that was a typo! I meant "build"; not that I've already "built"! :) I should sit down and do this though!

@prologic Would be awesome ;-)

I would be glad to help @prologic

So I guess the first thing we need to do is build a set of images.
Ideally we need to define clear separations between "services".
I have come across the following images that I think are most likely suitable bases to start from:

https://github.com/tomav/docker-mailserver
https://github.com/lava/dockermail
https://github.com/adaline/dockermail

Bare in mind however that none of these images are optimized for size. I believe most of them use Ubuntu as their base image.
Getting a Docker image for modoboa is probably far easier and could basically be something like this (untested):
Dockerfile:
FROM prologic/python-runtime:2.7-onbuild

ENTRYPOINT ["python", "manage.py", "runserver"]
CMD []

This will automatically via ONBUILD install all the requirements by pip install requirements.txt and perform a pip install . on the package itself. The entrypoint is probably not quite right; but this is a start :)

setting up modoboa is such a pain. I tried installer and for some reason I was not able to find out, I could not send email. manual install is hard.
therefore, I was not able to create a docker image. you had any luck?

I haven't gotten around to this yet; no.
James Mills / prologic
E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au
On Tue, Jan 19, 2016 at 4:47 AM, Hadi Farnoud notifications@github.com
wrote:

setting up modoboa is such a pain. I tried installer and for some reason I
was not able to find out, I could not send email. manual install is hard.
therefore, I was not able to create a docker image. you had any luck?
—
Reply to this email directly or view it on GitHub
https://github.com/tonioo/modoboa/issues/821#issuecomment-172843195.

Okay going to give this a crack :)

Well I got an initial image up and working, but I get an error immediately upon testing http://192.168.99.100:8000/
Environment:

Request Method: GET
Request URL: http://192.168.99.100:8000/

Django Version: 1.5.12
Python Version: 2.7.10
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')

Traceback:
File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  101.                     resolver_match = resolver.resolve(request.path_info)
File "/usr/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  338.             for pattern in self.url_patterns:
File "/usr/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  366.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  361.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/app/mail/mail/urls.py" in <module>
  4.     url(r'', include('modoboa.urls')),
File "/usr/lib/python2.7/site-packages/django/conf/urls/__init__.py" in include
  25.         urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)
File "/usr/lib/python2.7/site-packages/modoboa/urls.py" in <module>
  7. load_core_settings()
File "/usr/lib/python2.7/site-packages/modoboa/core/__init__.py" in load_core_settings
  52.     parameters.register(GeneralParametersForm, ugettext_lazy("General"))
File "/usr/lib/python2.7/site-packages/modoboa/lib/parameters.py" in register
  176.     form = formclass()
File "/usr/lib/python2.7/site-packages/modoboa/core/app_settings.py" in __init__
  212.         super(GeneralParametersForm, self).__init__(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/modoboa/lib/parameters.py" in __init__
  56.             self._load_initial_values()
File "/usr/lib/python2.7/site-packages/modoboa/lib/parameters.py" in _load_initial_values
  87.         from .models import Parameter
File "/usr/lib/python2.7/site-packages/modoboa/lib/models.py" in <module>
  17. reversion.register(Parameter)

Exception Type: AttributeError at /
Exception Value: 'module' object has no attribute 'register'

Any ideas here?

FYI: So far I've managed to get this image to a respectable:
$ docker images prologic/modoboa
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
prologic/modoboa    latest              423f52d89111        5 minutes ago       257.9 MB

Unfortunately I have to pull in build-base for lxml. I have some ideas to further optimize the size and potentially do away with build-base and -dev packages.

You could try to install lxml from system packages ?
Do you still encounter the issue you pasted ?

Let me try that and get back to you :)
James Mills / prologic
E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au
On Thu, Jan 21, 2016 at 1:00 AM, Antoine Nguyen notifications@github.com
wrote:

You could try to install lxml from system packages ?
Do you still encounter the issue you pasted ?
—
Reply to this email directly or view it on GitHub
https://github.com/tonioo/modoboa/issues/821#issuecomment-173504878.

@tonioo is the current master in a working state?

It should. Why ?

I haven't had much luck yet; so I'm going to build this on my OS X laptop
(instead of Docker) and see if I can repro this issue.
James Mills / prologic
E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au
On Mon, Jan 25, 2016 at 12:23 AM, Antoine Nguyen notifications@github.com
wrote:

It should. Why ?
—
Reply to this email directly or view it on GitHub
https://github.com/tonioo/modoboa/issues/821#issuecomment-174434747.

this could potentially help me solve setting up modoboa. any progress?

I haven't made any more progress in this; no. Sorry. I've been
concentrating on https://github.com/adaline/dockermail that I got up and
running successfully which just so happens to be a nice modular set of
images for an almost complete mail server solution.
I believe modoboa could fit nicely into adaline/dockermail but I haven't
gone back to this yet.
James Mills / prologic
E: prologic@shortcircuit.net.au
W: prologic.shortcircuit.net.au
On Tue, Feb 2, 2016 at 12:25 PM, Hadi Farnoud notifications@github.com
wrote:

this could potentially help me solve setting up modoboa. any progress?
—
Reply to this email directly or view it on GitHub
https://github.com/tonioo/modoboa/issues/821#issuecomment-178803242.

As we are already linked here, I can also show my work to have various containers to tackle the mail hosting issue:

https://github.com/indiehosters/email

I'm currently using vimbadmin, quiete hapoy with it, but as @almereyda said, I want to have ldap integration, and looks like you are providing it.
We'll meet with @almereyda in July, and if I decide to go for modoboa, then I'll spend time to switch my setup, and I'd be happy to share my work.
In the mean time, if you want to try my setup, and have any questions about, feel free, I'd be really happy to answer!

@pierreozoux Thank you for sharing your experience here, really appreciated.

any news on this? i am very interested in this!

So, we evaluated modoboa, and we though it would write ldap, but it is just read only. So our guess with @almereyda is to develop our own solution. Sorry.

@pierreozoux hopefully you share that?

This needs a more thorough architectural plan, where we need to identify separate services for containerisation. Right now there are already Postfix, Dovecot, Amavis, Nginx, uWSGI, the cronjobs and eventually Radicale known to me. Then we can recompose them to a linked environment as in @pierreozoux's preliminary work.
We don't like monolithic containers which act like VMs, as in https://github.com/tozd/docker-mail

have you used mailu @almereyda? is it better than modoboa?

Hi,
i can quickly describe my current solution.
Basically it is a "all in one" solution which uses the installer during the build.
Not the most efficient image design but self contained.
State is handled via some basic volumes.
I prepared a supervisord file for startup
rsyslog logs to console so everything is in docker logs.
Nginx in front of container for webinterface
Since I dont have this in public repo yet, i share some snippets.
I agree with @almereyda a more architectural plan is needed.
My approach was to have a simple container solution. You could easily take out db
but postfix/dovecot you have a kind of thight integration. That becomes a complex beast pretty easily if you take apart the services.
I could imagine having a good dockerfile/build process so everyone choose the bits and pieces needed for them. I do that currently by having a install.cfg ready where i choose what extensions I want. Upgrade path is rebuilding image and migrate  modoboa on deployed container.
Dockerfile:
FROM debian:jessie
WORKDIR /usr/src/app
RUN set -ex && \
         apt-get update && \
         apt-get install -y supervisor ca-certificates python git wget nano net-tools dnsutils rsyslog && \
         apt-get clean && \
         git clone https://github.com/modoboa/modoboa-installer.git /usr/src/app/ && cd /usr/src/app
COPY installer.cfg .
RUN ./run.py --force hostname --debug && \
        postalias /etc/aliases
COPY files /
CMD ["supervisord"]

Volumes:
modoboa_db:/var/lib/postgresql
modoboa_vmail:/srv/vmail
modoboa_app:/srv/modoboa
modoboa_postfix:/var/spool/postfix/
modoboa_etc:/etc

In any case getting a good docker solution I am willing to help with, as I have it productive running already.

Would need to ensure that it would be good to have both options available ie local install or docker install. If you move from local install to docker then a migration path from local to docker as well.

Found this Docker project if this can help.
https://code.georgi.software/patrick/docker-containers/tree/master/mail-modoboa

@alexander255 I've recently forked your docker-recipes gitlab repo  and re-structured it to focus exclusively on modoboa.
What I have covered so far:

Cleaning up the overall file-structure
Extending the docker-compose.yml deployment with a persistent postgres-db container
Added wait-for-it.sh to the init process of the modoboa container to wait for postgres to be responsive

:exclamation: this is non-trivial when running deploy

Adding ldap-login dependecies
Compiling all extensions (except modoboa-amavis) at build-time

:exclamation: using your proposed way of docker-compose run modoboa install <extension> doesn't really cut it since I have to define the utilized extensions at deploy time (== after build, == after gcc gets removed from the apk packages, == guaranteed to fail :smile:)

Checking deployment with all extensions (but modoboa-amavis) enabled
instructions

Now, as far as I can tell, what's left to do is to extend the docker-compose.yml with the various components to make this thing a viable deployment in the wild.
E.g.:

Amavis / spamassasin
Radicale
Some webmail suite (?)
Anything you think I've left out

If you feel like this is a project worth getting on with, let me know and I'll host my local repo on Github / Gitlab so you can take a look and send further suggestions my way.
P.S: I'd just like to express my amazement at how this Issue right here is ~3 years old without some dude having dropped a viable solution yet :rofl:

@TildeSlashC0re could this enable a more easy backup-restore as well?
also, would love to have modoboa on kubernetes. this can help with that too. hopefully a Helm chart in near future 🥇

@TildeSlashC0re:

@alexander255 I've recently forked your docker-recipes gitlab repo  and re-structured it to focus exclusively on modoboa.

Could you upload that somewhere? I'd like to take a look!

* Extending the docker-compose.yml deployment with a persistent postgres-db container

You mean the quickstart file? Yes, that sounds like a good idea as you as you highlight in the comments that an external container may be used instead. The current quickstart file is basically a dumbed down version of my server configuration with comments. :wink:

* Added `wait-for-it.sh` to the init process of the modoboa container to wait for postgres to be responsive
  * this is non-trivial when running `deploy`

:+1:

* Adding ldap-login dependecies

I tried to do that everywhere, but I guess I forgot some place, since I don't actually use it myself :slightly_smiling_face:

* Compiling all extensions (except modoboa-amavis) at build-time
  * using your proposed way of `docker-compose run modoboa install <extension>` doesn't really cut it since I have to define the utilized extensions at deploy time (== after build, == after gcc gets removed from the apk packages, == guaranteed to fail smile)

I disagree on this: The core should be small IMHO (I invested quite some work into reducing size in several places); if you look at the current implementation for instance, it will ship rrdtool + CPython bindings in the base image for instance since modoboa-stats requires that – it will not ship anything that Pure-Python can be installed using pip however. I do not see why this shouldn't work for Amavis (or any other extension).

* Testing deployment with all extensions (but modoboa-amavis) enabled

:+1: I only tested with the extensions documented on the documentation page.

Now, as far as I can tell, what's left to do is to extend the docker-compose.yml with the various components to make this thing a viable deployment in the wild.
E.g.:
* Amavis / spamassasin
* Radicale
* Some webmail suite (?)
* Anything you think I've left out

I've started working on Amavis some time ago, but never completed it since I ended up using rspamd instead. I'll make the build stuff available, since it may be useful. – Help welcome.
Radicale similarily I never started since we have been using ownCloud (now NextCloud) for longer than we use Modoboa (lack of contact sync with NextCloud is a pity however) – Any contributions welcome of course as well.
Webmail is provided by modoboa-webmail and works without issues
I'd like to also integrate automx for automatic mail client configuration (ideally as a Modoboa plugin), but it's a low-priority project

If you feel like this is a project worth getting on with, let me know and I'll host my local repo on Github / Gitlab so you can take a look and send further suggestions my way.

I see, yes please do. Are you planning on deploying this in the future and maybe helping out in development / maintenance / documentation / testing / whatever else? If so, would you be interested in creating a group for this? (As you may have guessed I'd prefer using GitLab over GitHub.)

P.S: I'd just like to express my amazement at how this Issue right here is ~3 years old without some dude having dropped a viable solution yet rofl

Several started on it (see above), but no-one completed it. Maybe this time it's different. :wink:

Edit: that documentation of yours could use some rework (which is a nice way to say it drove me nuts at times sweat_smile)

Absolutely, it started out as a bunch of notes to myself on how to do upgrades and stuff and most of the “how to deploy” kind of stuff has only been written a couple of weeks ago as I tried to get this into shape for initial publishing (it's been around for a while of course, but IMHO it was pretty worthless without the documentation on how to deploy it). I've added a copy of the Docker repo's README to GIT for easier editing: https://gitlab.com/ntninja/docker-recipies/blob/master/modoboa/README.md

@hadifarnoud:

could this enable a more easy backup-restore as well?

You only need to back up the data directory, with the mail directory and Docker configuration, and the database. So yes, makes it easier for me. :slightly_smiling_face:

also, would love to have modoboa on kubernetes. this can help with that too. hopefully a Helm chart in near future

I wanted to start using Kubernetes for quite some time. If you could provide some relevant configuration for this I'd be very interested.

@alexander255 I by no means am an expert on k8s. I'd give it a try.

@alexander255

Could you upload that somewhere? I'd like to take a look!

Officially forked it on gitlab now: c0re/modoboa-dockerized
since I didn't push any of the docker images on dockerhub yet you are advised to build them locally (see
build-forked-images.sh for reference)

You mean the quickstart file? Yes, that sounds like a good idea as you as you highlight in the comments that an external container may be used instead. The current quickstart file is basically a dumbed down version of my server configuration with comments.

yep I've based my project on the work you've provided on the quickstart deployment.

I tried to do that everywhere, but I guess I forgot some place, since I don't actually use it myself

I had to add openldap-dev to the base-packages and django-auth-ldap to the pip packages to get it to work. Since modoboa ships with LDAP integration per default I thought that'd be a valuable add.
Not to mention the on-the-fly LDAP integration is the main reason why I have taken an interest in this suite :smile:

* Compiling all extensions (except modoboa-amavis) at build-time
  * using your proposed way of `docker-compose run modoboa install <extension>` doesn't really cut it since I have to define the utilized extensions at deploy time (== after build, == after gcc gets removed from the apk packages, == guaranteed to fail smile)

I disagree on this: The core should be small IMHO (I invested quite some work into reducing size in several places); if you look at the current implementation for instance, it will ship rrdtool + CPython bindings in the base image for instance since modoboa-stats requires that – it will not ship anything that Pure-Python can be installed using pip however. I do not see why this shouldn't work for Amavis (or any other extension).

I don't disagree on the presupposition that the base image should remain as small viably possible, we will agree that this is the common goal with any dockerized deployment :smile:.
The issue I tried to highlight is that the build-dependencies (namely gcc) are being removed as soon as the pip packages are done installing, which makes it impossible (at least with the Dockerfile provided) to implement additional extensions after the image is done building.
I totally could me missing something here, and if so - by all means - let me know.
As an aside, I've squashed my current build process with the following results (how come your dovecot image (via dockerhub) is twice the size from the Dockerfile in your docker-recipes repo?!)
(prebuilt-ext tag corresponds to the Dockerfile.full build)
REPOSITORY                    TAG                     SIZE
c0re/modoboa                  prebuilt-ext-squashed   250MB
c0re/modoboa                  prebuilt-ext            442MB

ntninja/modoboa               latest                  202MB
c0re/modoboa                  squashed                225MB
c0re/modoboa                  latest                  418MB

ntninja/modoboa-postfix       latest                  13.3MB
c0re/modoboa-postfix-alpine   squashed                13.3MB
c0re/modoboa-postfix-alpine   latest                  13.6MB

ntninja/modoboa-dovecot       latest                  61.7MB
c0re/modoboa-dovecot-alpine   squashed                25.5MB
c0re/modoboa-dovecot-alpine   latest                  25.9MB

* Testing deployment with all extensions (but modoboa-amavis) enabled

I only tested with the extensions documented on the documentation page.

Same goes for me. What I meant to say here is "all extensions" as in:
docker-compose run modoboa deploy --collectstatic \
    --domain localhost \
    --dburl default:postgres://<user:password>@<host:port>/<database> \
    --extensions all

I've started working on Amavis some time ago, but never completed it since I ended up using rspamd instead. I'll make the build stuff available, since it may be useful. – Help welcome.

aye aye!

Radicale similarily I never started since we have been using ownCloud (now NextCloud) for longer than we use Modoboa (lack of contact sync with NextCloud is a pity however) – Any contributions welcome of course as well.

Funny, because I am in the exact same situation here. Mainly using Nextcloud for all calDav operations.
Do you mean contact sync as in modoboa <> nextcloud? Or a Nextcloud calDav endpoint for contact sync in general?
(since I know for a fact that you can sync contacts with the Nextcloud calDav)

Webmail is provided by modoboa-webmail and works without issues

huh... I'll have to look into that... might as well be the local nature of my deployment that didn't make it work. Although I'll admit I haven't spent too much time on it since I also manage webmail mainly through Nextclouds solution.

I'd like to also integrate automx for automatic mail client configuration (ideally as a Modoboa plugin), but it's a low-priority project

aye aye!

Are you planning on deploying this in the future and maybe helping out in development / maintenance / documentation / testing / whatever else? If so, would you be interested in creating a group for this? (As you may have guessed I'd prefer using GitLab over GitHub.)

I could definitely spare some time to assist with any of the tasks named here. Not exaclty sure if I can spare enough of it for full maintenance, but we could see about that along the way :+1:
kind regards,
c0re

I'll announce a little bit of progress on my end here:
So far I have:

Built a full-featured (that is deploy --extensions all capable) modoboa container (thanks to the Dockerfile provided by @alexander255) weighing in at 251 MB
Built a postgres container definition that handles connections to both modoboa and amavis @ 70 MB
Built an amavis container based on muhlba91/amavis-docker's Dockerfile

This - being debian-based (and poorly stripped (that is to say not at all)) turned out to be a rather heavy deployment, weighing in at 464 MB. A quick --no-install-recommends has cut that just about in half, down to 251 MB - with all possible stripping and squashing the final piece sat at 242 MB.
Now I am a curious cookie and was eager to see what the competition is bringing to the table and lo' and behold... mailcow-rspamd ships at around 213 MB. I am a perfectionist like that and thought to myself: fudge it, time to alpine-ize it.
Long story short: My current non-polished (but squashed) local dev-build for modoboa-amavis-alpine comes at the low cost of 183 MB :smirk:

Made those pieces play together via a docker-compose.yml (again, the major basis for this is by @alexander255)

I will eventually upgrade this definition to a v3 format.

So up to this stage every moving piece is built on an alpine base... and I will certainly continue on this route.
The savings in space/bandwidth are just completely out there!
ToDo:

A bit of permission auditing across the various mounted data-volumes. (PDFcreds-export wasn't really playing nice when I tried running it the first time around)
Provide ManageSieve compitability
Add a radicale instance into the mix
Implement autoMX capabilities
Adjust the postgres image to host an additional database for spamassassin
Make some final tweaks for full quarantine / release-request / PDP integration. (Basically deploying and running the full scope of the amavis integration)
Provide a streamlined / guided installation procedure
Provide documentation
Tests... lots of them
Anything I have either forgotten about or have simply overlooked. (any feedback is welcome!)

kind regards,
c0re :v:

@TildeSlashC0re Is it possible to change c0re/modoboa, c0re/modoboa-dovecot-alpine and c0re/modoboa-postfix-alpine to public on the Docker Hub ?
Thanks for your work !

@TildeSlashC0re Is it possible to change c0re/modoboa, c0re/modoboa-dovecot-alpine and c0re/modoboa-postfix-alpine to public on the Docker Hub ?
Thanks for your work !

I will provide public images once this takes a bit more of a final shape.
Up until then you are advised to build the images locally, all of which are provided here. Alternatively you can use the helper script to build the images.
The first release will include an introductory documentation and public images. :v:

Ahh perfect ! I was searching for the Dockefiles but I don't know how I could have missed them !
Thanks ! Will try it right away. I'll open issues / give you my feedback

I might add that the amavis build currently isn't baked into the docker-compose and that there still is quite some manual configuration ahead on an initial deployment.
All of which is undocumented as of now.
I'll gladly answer any issues and will look to build a basic documentation along the way.

For the moment when I start everything up I get a 400 Bad Request from Modoboa. Do you know the workaround maybe ?

First run is something like this atm:
Initialize the database
docker-compose up db

You can exit the container when the setup scripts are executed.
Then you deploy modoboa itself.
docker-compose run modoboa deploy --collectstatic --domain "EXAMPLE.COM" --dburl default:postgres://modoboa:mysecretpassword@db:5432/modoboa --extensions all

mysecretpassword corresponds to the value you have specified for POSTGRES_PASSWORD in the docker-compose.yml
after the deployment you need to edit the config file configs/settings.py and add a database-block for amavis:
[...]

# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases

DATABASES = {

    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'modoboa',
        'USER': 'modoboa',
        'PASSWORD': 'mysecretpassword',
        'HOST': 'db',
        'PORT': '5432',
        'ATOMIC_REQUESTS': True,

    },

    'amavis': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'amavis',
        'USER': 'amavis',
        'PASSWORD': 'mysecretpassword',
        'HOST': 'db',
        'PORT': '5432',
        'ATOMIC_REQUESTS': True,

    },

}

[...]

then start amavis:
docker run --rm --network modoboa-dockerized_default -v $(pwd)/data/amavis:/data -d --hostname "host.example.com" --name modoboa-amavis c0re/modoboa-amavis-alpine

You might want to change settings in deps/modoboa-amavis-alpine-s6/rootfs/etc/amavisd.conf  (such as $mydomain) and then rebuild the image cd deps/modoboa-amavis-alpine-s6 && docker build -t c0re/modoboa-amavis-alpine .
you should then be ready to start modoboa and configure the settings in the webpanel
docker-compose up -d

Perfect thank you very much !
FYI : It is not necessary to edit amavisd.conf. When running Amavis, simply add a hostname parameters to the docker container and Amavis will use it.
Example to add to your docker-compose.yml :
amavis:
image: c0re/modoboa-amavis-alpine
hostname: example.com
volumes:
- ./data/amavis:/data

The last problem present is this one with postfix and dovecot :
modoboa-dovecot | doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 50: ssl_dh: Can't open file /etc/dovecot-local/dh.pem: No such file or directory modoboa-dovecot exited with code 89 modoboa-dovecot | Keeping existing /etc/certs/fullchain.pem modoboa-dovecot | doveconf: Fatal: Error in configuration file /etc/dovecot/conf.d/10-ssl.conf line 50: ssl_dh: Can't open file /etc/dovecot-local/dh.pem: No such file or directory
I think basic certificates are not generated in the image build

ah yes! You need to supply the DH-parameters yourself. You can generate those by running
openssl dhparam -out ./data/dovecot/config/dh.pem 4096

I was trying to run this docker and everything started fine. But I am getting csrf verification failed. I mapped 80:8000 to get the webmail for trial. I am going to use nginx later. I think it is an issue with the webmail only. What should I do? Thanks for the docker setup.

authors: Dave-Elec TildeSlashC0re Zegorax alexander255 almereyda hadifarnoud jaketame msenebald pierreozoux prologic stefaweb thiesschneider tonioo


text:
Add zef install fez to README.md

Closes #56

Sorry, made the changes prior to seeing this MR - this has been added

authors: dontlaugh tony-o

repo: tony-o/raku-fez


text:
Thoughts behind the project

Hi @tony612, could you share the ideias you had/have behind this other implementation of protobufs to Elixir?
I'm currently working in a fork to simplify the way Exprotobuf deals with :gpb under the hood and now I'm wondering which are your motivations for this new project.
Cheers!

There're some reasons:

One important feature of Google Protobuf is generating code between different languages using a common proto definition. I think the way gpb does this is totally wrong. That should be done by writing a protoc plugin as here. It's OK for simple cases. But it will be hard to use if you have lots of protos.
For the reason 1, I thought about writing a protoc plugin by using gpb as the decoder/encoder. But I found it's difficult because gpb:decode_msg/3 needs the message definitions to be Record format, which is hard to do in Elixir. And it also needs all MsgDefs, which doesn't work well with protoc.
I want to keep generated Elixir definitions simple, explicit and easy to read. What's more, I want features like Typespecs as proposed in https://github.com/tony612/grpc-elixir/issues/5. It's hard to achieve  these goals with exprotobuf.

If you think these reasons are not good enough or there're better ways to solve these. Please let me known. I'm open to other ideas only if my problems can be solved 😁

Gotcha! I think yours points make total sense :+1:
Thanks for the quick response, I'm looking forward to test it :-)

@tiagopog btw, I added these to the README just now.

Good idea to add this "Why this instead of gpb or exprotobuf?" section.


text:
Test createController?

How can I test if a new controller gets created in an alloy project?
In my code I have (index.js)
Alloy.createController("request");

and it will create a new window. Now I want to check if the window is open and want to access its elements.
my test for index.js:
// Create a test suite
describe("test1", function() {
    var Alloy = require("alloy");
    var $;
    beforeEach(function() {
        $ = Alloy.createController("index");
    });

    describe("can create and destroy", function() {
        it("show request window", function() {
            $.__views.btn_requests.fireEvent("click");
            waits(500);
            runs(function () {
                //$ = Alloy.createController("requests"); // will create a 2nd window
                //expect(??).toBe(true);    // what do I need to check
            });
        });
    });
});

it will click the button and the button will run the createController code => the window opens. But now I can't access its elements and don't know how to test if the window is visible. When I run
$ = Alloy.createController("requests");

in my spec it will create a second window in my app.
Is it the wrong approach I'm trying?

If you want to inspect anything in the created controller, then you need to attach those elements to the controller. This is done automatically via Alloy's markup, but if you are created these elements programmatically, you'll need to manually attach them to the created controller. Then you should be able to access them by id or with getView().

repo: tonylukasavage/ti-mocha


text:
I need some help with multiple downloads

Hi im so sorry, im hoping that you can help me with this, this is my first app and my first download system, im using your library because its pretty cool and  easy to use.
But im stuck in one part, i created a service wich processs my downloads, send a broadcast to another class to update my ui, and store  the content in a database that i use.
The problem is that when i put like 5 different downloads once 1 download finish the Fetch its inserting all 5 downloads in the database, but i just want to insert that download, i think that its because im adding multiple listeners to my fetch, but im using my fetch public to be called from another class to retrieve the downloads so how can i adapt my code to solve this?, im honestly really sorry for asking this, but i have tried  like 25 differents ways and this is the way that works for me, well not pretty good but it works, ill leave my code, if you want to help me i'll be grateful for ever, thanks for your awesome library.
Code from my service:
`package anime.app.com.appnimu;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.os.Looper;
import android.os.Message;
import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.LocalBroadcastManager;
import android.util.Log;
import android.widget.Toast;
import com.tonyodev.fetch2.Download;
import com.tonyodev.fetch2.Error;
import com.tonyodev.fetch2.Fetch;
import com.tonyodev.fetch2.FetchListener;
import com.tonyodev.fetch2.Func;
import com.tonyodev.fetch2.NetworkType;
import com.tonyodev.fetch2.Priority;
import com.tonyodev.fetch2.Request;
import com.tonyodev.fetch2downloaders.OkHttpDownloader;
import org.jetbrains.annotations.NotNull;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import io.objectbox.query.Query;
import okhttp3.OkHttpClient;
/**

Created by Andrés on 23/04/2018.
*/

public class DownloaderService extends Service {
public DownloaderService() {
    super();
}
private Looper mServiceLooper;
private ServiceHandler mServiceHandler;
public static final String BROADCAST_ACTION = "com.anime.app.com.broadcasttest";

private Intent intent;
private LocalBroadcastManager broadcastManager;

public static FetchListener fetchListener;
public static ArrayList<Fetch> fetchList;
public static Fetch fetch;
public static NotificationManager mNotifyManager;
public static NotificationCompat.Builder notificationBuilder;

private final class ServiceHandler extends Handler {
    public ServiceHandler(Looper looper) {
        super(looper);
    }
    @Override
    public void handleMessage(Message msg) {

    }
}

@Override
public void onCreate() {
    // Get the HandlerThread's Looper and use it for our Handler
    broadcastManager = LocalBroadcastManager.getInstance(this);

    intent = new Intent(BROADCAST_ACTION);

    final OkHttpClient okHttpClient = new OkHttpClient.Builder()
            .build();

    fetch = new Fetch.Builder(getApplicationContext(), "VerEpisodio")
            .setDownloader(new OkHttpDownloader(okHttpClient))
            .setDownloadConcurrentLimit(24) // Allows Fetch to download 4 downloads in Parallel.
            .enableLogging(true)
            .build();

   // fetch.deleteAll();

    intent.setAction(TabDescargas.mBroadcastStringAction);
    intent.putExtra("FinishedNotify","Update");
    sendBroadcast(intent);
}

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    // For each start request, send a message to start a job and deliver the
    // start ID so we know which request we're stopping when we finish the job
    HandlerThread thread = new HandlerThread("ServiceStartArguments");
    thread.start();
    mServiceLooper = thread.getLooper();
    mServiceHandler = new ServiceHandler(mServiceLooper);

    if(intent != null && intent.hasExtra("URL")){
        Bundle extras = intent.getExtras();
        String titulo = (String) extras.get("Titulo");
        String folder = (String) extras.get("Folder");
        String url = (String) extras.get("URL");
        String anime = (String) extras.get("Anime");
        String episodio = (String) extras.get("Capitulo");
        String titlean = (String) extras.get("TitleAnime");
        initDownload(url,folder,titulo,anime,episodio,titlean);

    }

    // If we get killed, after returning from here, restart
    return START_NOT_STICKY;
}
@Nullable
@Override
public IBinder onBind(Intent intent) {

    return null;
}

public String getRootDirPath(Context context) {
    if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
        File file = ContextCompat.getExternalFilesDirs(context.getApplicationContext(), null)[0];
        return file.getAbsolutePath();
    } else {
        return context.getApplicationContext().getFilesDir().getAbsolutePath();
    }
}

private static String getBytesToMBString(long bytes){
    return String.format(Locale.ENGLISH, "%.2fMb", bytes / (1024.00 * 1024.00));
}

private void initDownload(String url, final String folder, String fileName, final String Anime, final String Episodio,final String titlean) {
    String dirPath = getRootDirPath(getApplicationContext());
    Log.e("IN DESCARGA URL:", url);

    final Request request = new Request(url, folder);
    request.setPriority(Priority.HIGH);
    request.setNetworkType(NetworkType.WIFI_ONLY);
    request.addHeader("clientKey", "SD78DF93_3947&");
    request.setTag("C. "+Episodio+" - "+titlean);

    fetch.enqueue(request, new Func<Download>() {

                @Override
                public void call(Download download) {
                    Toast.makeText(getApplicationContext(), "Descarga agregada a la cola de descargas, puede consultarla en el menú de descargas o deslizando hacia abajo para ver las notificaciones, por favor no cierre la app.", Toast.LENGTH_LONG).show();
                    mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
                    notificationBuilder = new NotificationCompat.Builder(getApplicationContext());
                    notificationBuilder.setContentTitle("C. "+Episodio+" - "+titlean)
                            .setContentText("Comenzando descarga..")
                            .setSmallIcon(R.drawable.ic_download).setOngoing(true);
                }
            }, new Func<Error>() {
                @Override
                public void call(Error error) {
                    Toast.makeText(getApplicationContext(), "Error al iniciar la descarga "+error+" .", Toast.LENGTH_SHORT).show();

                }
            }

    );

     fetch.addListener(new FetchListener() {
        @Override
        public void onQueued(@NotNull Download download) {
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");
            sendBroadcast(intent);
        }

        @Override
        public void onCompleted(@NotNull Download download) {

            if(download.getStatus().getValue() == 4){

            Query<TablaAnimes> query = Home.boxTAnime.query().equal(TablaAnimes_.nombre,"").build();
            List<TablaAnimes> animeq =  query.setParameter(TablaAnimes_.nombre,Anime).find();
            if(animeq.size() > 0){

                Query<TablaCapitulos> querycap = Home.boxTCaps.query().equal(TablaCapitulos_.nombre,"").build();
                List<TablaCapitulos> capin =  querycap.setParameter(TablaCapitulos_.nombre,Episodio).find();

                String cap = Episodio.replaceAll(" ","");

                if(capin.size()==0){
                    TablaCapitulos tc = new TablaCapitulos(0,cap,folder,animeq.get(0).getId(),0,0);
                    Home.boxTCaps.put(tc);
                 }

            }else{

                TablaAnimes ta = new TablaAnimes(0,Anime);
                Home.boxTAnime.put(ta);

                Query<TablaAnimes> queryin = Home.boxTAnime.query().equal(TablaAnimes_.nombre,"").build();
                List<TablaAnimes> animeqin =  queryin.setParameter(TablaAnimes_.nombre,Anime).find();

                Query<TablaCapitulos> querycap = Home.boxTCaps.query().equal(TablaCapitulos_.nombre,"").build();
                List<TablaCapitulos> capin =  querycap.setParameter(TablaCapitulos_.nombre,Episodio).find();

                if(capin.size()==0){

                    String cap = Episodio.replaceAll(" ","");

                    TablaCapitulos tc = new TablaCapitulos(0,cap,folder,animeqin.get(0).getId(),0,0);
                    Home.boxTCaps.put(tc);
                }

            }
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");

            sendBroadcast(intent);

            }
        }

        @Override
        public void onError(@NotNull Download download) {
            final Error error = download.getError();
            final Throwable throwable = error.getThrowable(); //can be null
            if (error == Error.UNKNOWN && throwable != null) {
                Log.d("Fetch", "Throwable error", throwable);
            }
        }

        @Override
        public void onProgress(@NotNull Download download, long etaInMilliSeconds, long downloadedBytesPerSecond) {

            if(notificationBuilder != null) {
                Log.e("DESCARGANDO", "Progreso: " + download.getProgress());
                String progreso = download.getProgress() + "% - " + getBytesToMBString(download.getDownloaded()) + "/" + getBytesToMBString(download.getTotal()) + "";

                notificationBuilder.setContentTitle(download.getTag());
                notificationBuilder.setContentText(progreso);
                notificationBuilder.setProgress((int) download.getTotal(), (int) download.getDownloaded(), false);
                notificationBuilder.setOngoing(false);
                Intent intents = new Intent(getApplicationContext(), Descargas.class);
                PendingIntent pendingIntent = PendingIntent.getActivity(getApplicationContext(), 0,
                        intents, PendingIntent.FLAG_CANCEL_CURRENT);
                notificationBuilder.setContentIntent(pendingIntent);

                mNotifyManager.notify(download.getId(), notificationBuilder.build());
            }
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("UpdateNotify","Update");

            sendBroadcast(intent);

        }

        @Override
        public void onPaused(@NotNull Download download) {
            if(notificationBuilder != null) {
                notificationBuilder.setContentText("Descarga pausada")
                        // Removes the progress bar
                        .setProgress(0, 0, false);
                mNotifyManager.notify(download.getId(), notificationBuilder.build());
            }
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");
            sendBroadcast(intent);
        }

        @Override
        public void onResumed(@NotNull Download download) {
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");
            sendBroadcast(intent);
        }

        @Override
        public void onCancelled(@NotNull Download download) {

            if(notificationBuilder != null) {
                notificationBuilder.setContentText("Descarga cancelada")
                        // Removes the progress bar
                        .setProgress(0, 0, false);
                mNotifyManager.notify(download.getId(), notificationBuilder.build());
            }
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");
            sendBroadcast(intent);
        }

        @Override
        public void onRemoved(@NotNull Download download) {

            if(notificationBuilder != null){
                notificationBuilder.setContentText("Descarga removida")
                        // Removes the progress bar
                        .setProgress(0, 0, false);
                mNotifyManager.notify(download.getId(), notificationBuilder.build());
            }

            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");
            sendBroadcast(intent);
        }

        @Override
        public void onDeleted(@NotNull Download download) {
            notificationBuilder.setContentText("Descarga eliminada")
                    // Removes the progress bar
                    .setProgress(0, 0, false);
            mNotifyManager.notify(download.getId(), notificationBuilder.build());
            intent.setAction(TabDescargas.mBroadcastStringAction);
            intent.putExtra("FinishedNotify","Update");
            sendBroadcast(intent);
        }
    });

}

private void sendNotification(Download download, int id) {

}

private void sendIntent(Download download, int id) {

}

@Override
public void onTaskRemoved(Intent rootIntent) {

}

}`

@MotherChickenCOL Thanks for using Fetch.
I think your issue is the request. Right now it’s final Request request = new Request(url, folder); it needs to be final Request request = new Request(url, folder + "/" + fileName);
If that’s not your question can you please rephase it so I can better understand the issue.

Thanks for answering i think i already solved my issue, my issue was that de FetchListener was duplicating rows on my database, i forgot to validate the next thing
if(request.getId() == download.getId())
As your documentation says, sorry my bad, now im not having any issue, just a question, well actually two.
The first one is would you recommend to limit the downloads? and how much do you think that is an apropiate limit, i mean its like a app to watch series and stuffs, so people can download like 24 chapters of one serie and 24 from another, so maybe this can mess the memory of the android device
And the second one, its, when i close my app the download just stops, i added Start_sticky to the service, do you know how to run that service on backgroud, i mean that at least finish the download if the app get closed?

@MotherChickenCOL You what have to limit the downloads based on what your app users expect and what would be the best performance for your app. Apps like Netflix tends to queue all the downloads and process 3 to 5 downloads at a time. I would say that is an appropriate range.

@MotherChickenCOL @tonyofrancis can you please provide fetch downloader with intentservices in an another activity. full code.

repo: tonyofrancis/Fetch


text:
🛑 Peertube Instance is down

In daa3b24, Peertube Instance (https://video.tonybark.com) was down:

HTTP code: 0
Response time: 0 ms

False alarm. Server restarted while the instance is in a Docker container but it wasn't set to daemon mode because I needed to test to see if it actually ran first.

False alarm. Server restarted while the instance is in a Docker container but it wasn't set to daemon mode because I needed to test to see if it actually ran first.

repo: tonytins/status


text:
add MCP server badge

This PR adds a badge for the Toolhouse MCP Server server listing in Glama MCP server directory.

Glama performs regular codebase and documentation scans to:

Confirm that the MCP server is working as expected
Confirm that there are no obvious security issues with dependencies of the server
Extract server characteristics such as tools, resources, prompts, and required parameters.

This badge helps your users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.

Thank you @punkpeye

authors: orliesaurus punkpeye


text:
Import Notifications on top of Account name

From forum user TLBauer:

I am using the 0.8 version of the toolkit on Chrome.  I noticed last night that the import notifications in the sidebar are appearing on top of the first letter of the Account Name.  Is anyone else seeing this?

I'm also seeing this.
Running Chromium 48.0.2564.103, Toolkit 0.3.8

I believe this is fixed with 58a9db82688766866dad7482561ee87aa73df07d which has now been merged. If you're able to pull latest master down and try the build, you'll be able to confirm if this is fixed or not before we release.
If not, this should be fixed for you in v0.4.0.

@blarg - you should be able to close this. As far as I can tell, it's working properly for me on Chrome.

Alrighty, if anyone else encounters this feel free to re-open.

authors: StephenBrown2 blargity falkencreative

repo: toolkit-for-ynab/toolkit-for-ynab


text:
New Feature: Visually inform you that you've stolen from the future by highlighting "Budgeted in Future" red and indicating the discrepancy.

Trello Link (if applicable): https://trello.com/c/LKyOEg0T
Explanation of Bugfix/Feature/Enhancement:
Change the "Budgeted in Future" text to red and add the amount that they've stolen from the future in the text.
Recommended Release Notes:
Feature to visually inform you that you've stolen from the future by highlighting "Budgeted in Future" red and indicating the discrepancy.

Looks great, thanks!

authors: blargity joshmadewell


text:
function ends without a return statement

Hi,
I am trying to setup godeps and i am getting following message:

go get github.com/tools/godep

golang.org/x/tools/go/vcs
src/golang.org/x/tools/go/vcs/discovery.go:20: function ends without a return statement
src/golang.org/x/tools/go/vcs/discovery.go:31: function ends without a return statement

Can you help me with this?

I'm currently having the same issue

What is your go version output? Most probable explanation would be that you're using too old version of Go (earlier than Go 1.1; see https://golang.org/doc/go1.1#return).

Upgrade your go version as per @akavel.
If this still persists and you are also on the most recent version of godep (go get -u github.com/tools/godep) please re-open this issue.

authors: akavel freeformz nadgowdas tommymcdonald

repo: tools/godep


text:
refactor: skip validation on openAPI to JSON schema conversion

What kind of change does this PR introduce?
Refactor
What is the current behaviour?
@openapi-contrib/openapi-schema-to-json-schema be default tries to validate input type props causing unexpected failure during recursive the OpenAPI -> JSON schema conversion
What is the new behaviour?
fromSchema invoked with strictiMode disabled option.
Does this PR introduce a breaking change?
Not exactly. Some failing scenarios could be able to succeed
Other information:
Please check if the PR fulfills these requirements:

[X] Tests for the changes have been added
[ ] Docs have been added / updated
[X] Relevant Changeset has been added

coverage: 100.0%. remained the same
when pulling a6d907ee407bf6729478625e50807f58b23bc9e5 on disable-open-api-input-validation
into b556e6590c5960a347b031f4b0c87ebd0a6f5bef on master.

authors: coveralls toomuchdesign

repo: toomuchdesign/openapi-ts-json-schema


text:
Join forces?

I love python, and I love lego. I'm not so happy with the current boost-python implementation of ev3-dev. Neither is Ralph Hempel, he is working on a pure python branch here: https://github.com/ev3dev/ev3dev-lang/tree/pure-python. I want to contribute but I don't want to choose sides. Can't we all work on one python module? I think it's a matter of agreeing on namespace. If you are interested I can try to set up the repositories right.

I would highly welcome this, i was always confused which to use

+1

+1, though I find Ralph's repository very confusing. I'd prefer to have a clean repo for each language, one at a time. I can't see a compelling reason why to have a super-repo for all languages at all. And, of course, why are there submodules to various languages, but C++ is included as source code directly?

+1, though I find Ralph's repository very confusing. I'd prefer to have a clean repo for each language, one at a time. I can't see a compelling reason why to have a super-repo for all languages at all. And, of course, why are there submodules to various languages, but C++ is included as source code directly?

A confusion example:
Latest ev3dev installed
I've just installed ev3dev (ev3-ev3dev-jessie-2015-12-30) on a SDCard. I've managed to log in via SSH. Now the tedious part:

Enter dpkg -l | grep python in the Terminal, and find python-ev3dev version 0.6.0 is installed. Check with Google: Good, this package is on PyPI, nice! A link to the package documentation is also there, sweet. -- At first sight.

Enter python3 in the Terminal. Try first line of tutorial:

robot@ev3dev:~$ python3
>>> import ev3dev
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'ev3dev'
>>>

So, Python 3 is not supported? Try python in the Terminal instead:

robot@ev3dev:~$ python
>>> import ev3dev
>>> m = ev3dev.LargeMotor('outA')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'LargeMotor'
>>> dir(ev3dev)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']

WTF? There is a python package installed, but it doesn't do anything? And the documentation doesn't match.

Check the documentation again. The demos link leads to another repository. With more demos. Unfortunately, they don't work either. And - awesome! - in the README there is a deprecation warning: "This version of python bindings has been deprecated in favor of rhempel/ev3dev-lang-python. This repository is no longer under active developement." -- Not nice. And problem still unsolved.

A Web search for python-ev3dev yields "topikachu / python -ev3 · GitHub" as a second result, which looks very promising from the README. -- "Maybe these are the current docs for the installed version 0.6.0?"

... and so on.
I'd really see this repo to be the one included in the ev3dev image. It look much better maintained, much more in a good state.

A confusion example:
Latest ev3dev installed
I've just installed ev3dev (ev3-ev3dev-jessie-2015-12-30) on a SDCard. I've managed to log in via SSH. Now the tedious part:

Enter dpkg -l | grep python in the Terminal, and find python-ev3dev version 0.6.0 is installed. Check with Google: Good, this package is on PyPI, nice! A link to the package documentation is also there, sweet. -- At first sight.

Enter python3 in the Terminal. Try first line of tutorial:

robot@ev3dev:~$ python3
>>> import ev3dev
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'ev3dev'
>>>

So, Python 3 is not supported? Try python in the Terminal instead:

robot@ev3dev:~$ python
>>> import ev3dev
>>> m = ev3dev.LargeMotor('outA')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'LargeMotor'
>>> dir(ev3dev)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']

WTF? There is a python package installed, but it doesn't do anything? And the documentation doesn't match.

Check the documentation again. The demos link leads to another repository. With more demos. Unfortunately, they don't work either. And - awesome! - in the README there is a deprecation warning: "This version of python bindings has been deprecated in favor of rhempel/ev3dev-lang-python. This repository is no longer under active developement." -- Not nice. And problem still unsolved.

A Web search for python-ev3dev yields "topikachu / python -ev3 · GitHub" as a second result, which looks very promising from the README. -- "Maybe these are the current docs for the installed version 0.6.0?"

... and so on.
I'd really see this repo to be the one included in the ev3dev image. It look much better maintained, much more in a good state.

Running help(ev3dev) reveals that there are "Package Contents" auto, brickpi, core, and ev3. Importing ev3dev.ev3, as we're using the ev3, gets you the api you are looking for. Running help(ev3dev.ev3) reveals a bit more about the ev3dev.ev3 module.
Following the documentation link on the pypi page you've provided leads me to seemingly up to date documentation with no link to the deprecated repository in sight.
Going through the list of unified libraries on the official ev3dev website brings me directly to the latest official repository by @rhempel, with a link to the same documentation.

Running help(ev3dev) reveals that there are "Package Contents" auto, brickpi, core, and ev3. Importing ev3dev.ev3, as we're using the ev3, gets you the api you are looking for. Running help(ev3dev.ev3) reveals a bit more about the ev3dev.ev3 module.
Following the documentation link on the pypi page you've provided leads me to seemingly up to date documentation with no link to the deprecated repository in sight.
Going through the list of unified libraries on the official ev3dev website brings me directly to the latest official repository by @rhempel, with a link to the same documentation.

@G33kDude Okay, sorry. You are right. It's all in perfect shape. If you say so.
You could of course double-check to see if the points are valid. I'm not trying to be rude, just describing a real user journey. Try to double-check.

@G33kDude Okay, sorry. You are right. It's all in perfect shape. If you say so.
You could of course double-check to see if the points are valid. I'm not trying to be rude, just describing a real user journey. Try to double-check.

@bittner reported the problem with documentation link at https://github.com/rhempel/ev3dev-lang-python/issues/99#issuecomment-168333231. I probably got it fixed before @GeekDude tried that, so both of you have valid points :).

@bittner reported the problem with documentation link at https://github.com/rhempel/ev3dev-lang-python/issues/99#issuecomment-168333231. I probably got it fixed before @GeekDude tried that, so both of you have valid points :).

I never said it was in perfect shape. Also, you do have valid points. However, my point is that following the guides on the website brings you to where you need to look, and that we can't realistically tailor all the search engine results for a vague search like python-ev3dev (especially since the hyphen is likely ignored by most search engines).

I never said it was in perfect shape. Also, you do have valid points. However, my point is that following the guides on the website brings you to where you need to look, and that we can't realistically tailor all the search engine results for a vague search like python-ev3dev (especially since the hyphen is likely ignored by most search engines).

Happy New Year everyone! Kreuzlingen - that sounded familiar! When I was a young boy my grandparents used to drive us up to the ferry crossing from Wangen Im Allgau to go shopping there.
So, I understand the frustration, and my goal for the weekend is to try and get my ev3dev-lang-python repository into good shape. So I will review Peter's comments carefully, try and add some more useful "getting started" docs and make the ecosystem safe for future contributions.

Happy New Year everyone! Kreuzlingen - that sounded familiar! When I was a young boy my grandparents used to drive us up to the ferry crossing from Wangen Im Allgau to go shopping there.
So, I understand the frustration, and my goal for the weekend is to try and get my ev3dev-lang-python repository into good shape. So I will review Peter's comments carefully, try and add some more useful "getting started" docs and make the ecosystem safe for future contributions.

Peter, could I ask you to please copy your comments above (maybe trim after reviewing new information) and open a new issue at [https://github.com/rhempel/ev3dev-lang-python]. Thks.

Peter, could I ask you to please copy your comments above (maybe trim after reviewing new information) and open a new issue at [https://github.com/rhempel/ev3dev-lang-python]. Thks.

Is any of the two libraries really much better than the other?
I think that the reason why it's one big repo is that they used to be SWIG bindings generated from one specification.

Is any of the two libraries really much better than the other?
I think that the reason why it's one big repo is that they used to be SWIG bindings generated from one specification.

Well, that's all changed a bit in the past few weeks. We have split each binding into its own repo and made ev3dev-lang a submodule in each one.
At the end of the day, we are sticking with one "official" binding for each language.

Well, that's all changed a bit in the past few weeks. We have split each binding into its own repo and made ev3dev-lang a submodule in each one.
At the end of the day, we are sticking with one "official" binding for each language.

Don't get me wrong, everyone: The ev3dev project is awesome, really awesome. I apologize if my "user journey" reflected too much some obvious frustration. (I was trying to show my son the awesomeness of Linux and Python on his Lego brick. An attempt that failed in the end, despite his remarkable discipline to listen and wait.  :weary:)
@G33kDude The link to the libraries is indeed helpful though the page is a bit hard to find. Language bindings is an important topic for the Linux based Lego brick. It could be worth adding a direct link to the "Docs" menu of the website, what do you think?

Don't get me wrong, everyone: The ev3dev project is awesome, really awesome. I apologize if my "user journey" reflected too much some obvious frustration. (I was trying to show my son the awesomeness of Linux and Python on his Lego brick. An attempt that failed in the end, despite his remarkable discipline to listen and wait.  :weary:)
@G33kDude The link to the libraries is indeed helpful though the page is a bit hard to find. Language bindings is an important topic for the Linux based Lego brick. It could be worth adding a direct link to the "Docs" menu of the website, what do you think?

HaHa! Having had three sons myself (all of which are now off to Uni) I can only give this advice:

Let your son play with the EV3 using the EV3-G GUI to get him interested.
When he goes to sleep, insert the ev3dev microSD card and play with Python on the EV3
When you are comfortable and have got his robot doing at least as well as he has using EV3-G - them show him Python

It's frustrating to watch someone muttering "This should work!" and "Argh - why are the docs so messed up" - better luck tomorrow - I'll be working on getting the basics cleaned up.

HaHa! Having had three sons myself (all of which are now off to Uni) I can only give this advice:

Let your son play with the EV3 using the EV3-G GUI to get him interested.
When he goes to sleep, insert the ev3dev microSD card and play with Python on the EV3
When you are comfortable and have got his robot doing at least as well as he has using EV3-G - them show him Python

It's frustrating to watch someone muttering "This should work!" and "Argh - why are the docs so messed up" - better luck tomorrow - I'll be working on getting the basics cleaned up.

One way of documenting the package could be to present working examples in a Jupyter (IPyhton) notebook. An IPython server can be run from the brick, although it's a bit slow, but I've also started exploring how we can run a remote IPython kernel on the brick and the heavier Jupyter server on a desktop/laptop machine on the same network as the brick. First doodles here: https://blog.ouseful.info/2016/04/15/thinking-around-the-edges-lego-ev3-robots-running-remote-jupyter-kernels/
I hope to produce some demo notebooks in the next couple of weeks documenting the library we have installed to support our own possible use of the library in a teaching context.

Hi everybody. I am using Windows 10, Python 3.5.1 and would like to develop some automation with a VisualStudio Python Project in order to get rid off boring things during System Test in my company. Unfortunately even I spent tons of time I could not solve the problem. I even registered to github to find an expert which could help me ;-) The bug reported month ago ist  still alive. What is a documentation worth if it does not work at all ;-(

import ev3dev
m = ev3dev.LargeMotor('outA')
Traceback (most recent call last):
File "<pyshell#6>", line 1, in
m = ev3dev.LargeMotor('outA')
AttributeError: module 'ev3dev' has no attribute 'LargeMotor'

... does anybody have a good idea?
By the way ... Python supports EV3 installation with the following ...
pip install python-ev3dev
... entered from a command line.

authors: G33kDude MaxNoe antonvh bittner ddemidov ensonic online4ever pepijndevos psychemedia rhempel


text:
Simple pre commit -> simple git hooks : WiP

Rename the package to simple-git-hooks
Add an ability to add other git hooks

Fixes #14

😍

@toplenboren one question there: in case of commands like commit-msg that can receive a parameter, how the parameter needs to be provided?
Specifically, I want to know how to convert this
{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}

into something that simple-git-hooks can understand 🙂

@toplenboren one question there: in case of commands like commit-msg that can receive a parameter, how the parameter needs to be provided?
Specifically, I want to know how to convert this
{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}

into something that simple-git-hooks can understand 🙂

It should work as is.
When run npx simple-git-hooks package just gets the list of hooks from config, then sets up a bunch of {hook_name}.sh files under .git/hooks directory
So if you write in package.json something for e.g:
simple-git-hooks: {"commit-msg": "commitlint -E anything"} it would simply create the .git/hooks/commit-msg.sh` file with contents:
#bin/bash

commitlint -E anything

So I think it should work as is.

However, I spotted you are using HUSKY_GIT_PARAMS. This package does not have the alike functionaluty. You might want to explicitly set commitlint arguments

you're right, thanks for the reply!
Migrating all my things to simple-git-hooks 🙂

@Kikobeats - i created this issue because my project does not seem to behave properly, did you ever figure this out?
https://github.com/toplenboren/simple-git-hooks/issues/71

authors: Kikobeats ai ml242 toplenboren

repo: toplenboren/simple-git-hooks


text:
[DEPRECATION]: use factoryFor

http://emberjs.com/deprecations/v2.x/#toc_migrating-from-_lookupfactory-to-factoryfor
Fixes::
Ref #72

CI failing for other reasons, this looks good - thanks!
@toranb are we targeting Node 0.12 still or can I pin Travis to >= 4?  ember-cli ecosystem dropped support for 0.12 which is the reason for the CI failure.

@jasonmit great point - hey @snewcomer you mind updating the travis configuration to drop legacy node quick? much appreciated :)
https://github.com/ember-redux/ember-redux/blob/master/.travis.yml#L4
above ^^ is an example of using nodeJS 4 instead of what we have here today

CI failing for reasons unrelated to this PR against beta and canary so I'm going to go ahead and merge.  Thanks!

@jasonmit huh, well normally I'd take the time to look into why the beta is failing / etc :)
@snewcomer would you be up to help nail down what broke in ember 2.12+? If not, I should free up early next month to see what broke and land a PR (mostly curious if you've seen or had issues using this addon with ember 2.12+)

@toranb master is failing with the same reason pre-this-change (it's happening against most of my addons so likely a breaking change).  I was planning to look at it separately.

@snewcomer @jasonmit thank you both for the effort on this! I'm thankful for the community surrounding this addon! To confirm we are up to date now and have no deprecation warnings blowing up the console => I ran the build (using ember-cli v2.10.1) and both ember v2.12 / v2.13.0-beta.1

authors: jasonmit snewcomer toranb

repo: toranb/ember-cli-simple-store


text:
Progress bar using terminal width

Progress bar use "tput cols" to determine term width. This resizes the progress bar to prevent wraparound scrolling, but will produce an ugly message on stderr in Windows. Only merge if this progress bar does not need to support windows.

thanks @adamlerer !

authors: adamlerer soumith

repo: torch/xlua


text:
Trouble replicating results for ResNet18 on ImageNet 1k

I'm trying to replicate your results for ResNet18 on ImageNet 1k. I'm using the default hyperparameters in your train_resnet.py and all of the same augmenters (for aug-level=2), but can't achieve the accuracy that you report. The most obvious issue is that if I use your default learning rate of 0.1, the net fails to learn anything, even though I'm using the same batch size (256), momentum (0.9), weight decay (0.0001), etc. I have to set a learning rate to 0.001 for it to start learning well, but even then, the accuracy tops out at about 80% for Top 5 and 55% for Top 1.

I see in the code that these are the default parameters for ResNet50. Did you change any of them for ResNet18?

Is the data that you are using standard ImageNet, or did you modify it before training (by normalizing, etc.)?

Hi, I've recently had a problem with the replication of results for a pre-trained DeiT on the ImageNet validation part and the thing is I've had a slightly different version of ImageNet. Maybe your problems with training are due to a different dataset. So make sure can at least replicate the results for a pre-trained net.

Hi, I've recently had a problem with the replication of results for a pre-trained DeiT on the ImageNet validation part and the thing is I've had a slightly different version of ImageNet. Maybe your problems with training are due to a different dataset. So make sure can at least replicate the results for a pre-trained net.

authors: MichaelSolotky dyelax

repo: tornadomeet/ResNet


text:
🛑 golden7 is down

In 0620020, golden7 (https://www.golden7.es) was down:

HTTP code: 0
Response time: 0 ms

Resolved: golden7 is back up in 0f90039.


text:
ci(broken-link-checker):  망가진 링크를 자동으로 잡도록 워크플로우 스케줄링

Overview

이 변경이 추가되면 매일 문서의 모든 link를 자동으로 체크하고 문제가 없는 지 알려줍니다. 또한 수동으로 workflow_dispatch를 사용해 수동으로 작동시킬 수도 있습니다
현재도 이미 broken link가 있습니다. 이러한 오류를 조기에 발견하고 해결할 수 있게 됩니다

https://es-hangul.slash.page/docs/api/chosungIncludes 이 페이지에 들어가서 수정하기 버튼을 누르면 잘못된 링크로 보내지는데 이것을 자동으로 잡을 수 있습니다 해결은 다른 PR에서 수정되면 좋겠습니다
PR Checklist

[x] I read and included theses actions below

I have read the Contributing Guide
I have written documents and tests, if needed.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.51%. Comparing base (0cd45e4) to head (531d9c0).

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #109   +/-   ##
=======================================
  Coverage   99.51%   99.51%
=======================================
  Files          13       13
  Lines         206      206
  Branches       46       46
=======================================
  Hits          205      205
  Misses          1        1

본문에 언급해주신 https://es-hangul.slash.page/docs/api/chosungIncludes 문서는 #102 에서 머지된 후 제대로 배포되지 않아 발생하는 문제 같습니다! (link-checker 덕분에 발견할 수 있었군요 👍) @okinawaa 혹시 한번 확인 부탁드려도 될까요?!

authors: codecov-commenter juno7803 manudeli

repo: toss/es-hangul


text:
fix: discord 아이콘의 색상을 github 아이콘 색상과 통일합니다

Overview
ASIS.

TOBE.

아이콘 색상을 통일합니다.
PR Checklist

[X] I read and included theses actions below

I have read the Contributing Guide
I have written documents and tests, if needed.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.53%. Comparing base (64ff16e) to head (4ea8046).

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #291   +/-   ##
=======================================
  Coverage   99.53%   99.53%
=======================================
  Files          38       38
  Lines         642      642
  Branches      156      156
=======================================
  Hits          639      639
  Misses          3        3

----
🚨 Try these New Features:

Flaky Tests Detection - Detect and resolve failed and flaky tests
JS Bundle Analysis - Avoid shipping oversized bundles


text:
Way of managing dependencies on other Swift Packages

Jut trying this out here and one thing I was wondering was if there was way to manage dependencies on other Swift Packages e.g. KMP-NativeCoroutines....or is expectation that that would always need to be added separately?

For KMP-NativeCoroutines in particular, I don't think there's a ton of need for this. Unless I misunderstand, you want the KMP-NativeCoroutines Swift package at the app level to use from Swift, but your Kotlin code shouldn't need to reference it. Shared code just needs to reference the Kotlin dependency which you can configure in the usual way.
But I know there's other use-cases for this. The kotlin.cocoapods plugin has functionality for pulling in dependencies and automatically configuring the cinterop for them, but I'm not aware of anything doing that for SPM at the moment. I suspect it would make more sense to add that support in a separate tool rather than here, because it's useful even if you're building Kotlin from source every time and not publishing/consuming binaries.

In version 0.3.7 you have the option to supply your own package file and KMMBridge will just update the variables that it manages. This should let you add dependencies which will be forwarded to your Xcode project (among other things). See here for more.
Note that this won't help you talk to any of those dependencies from Kotlin. We do not currently have an SPM equivalent to the way the Cocoapods plugin automatically manages pod dependencies via cinterop.

Closing. You can use a custom Package.swift file, as Russell discusses here.

authors: joreilly kpgalligan russhwolf

repo: touchlab/KMMBridge


text:
Java examples

update to Selenium 2.45.0
update chromedriver
added these Java examples:

upload file
download file
keyboard shortcuts
frames
multiple window
select from dropdown
download a file revisiting
basic authentication
JavaScript alert
right click
basic test with Safari
highlight element
jQuery growl notifications
Selenium Grid example
hover
checkboxes

Thanks for such a great pull request! I'll be writing the tips and publishing them over the next several weeks. I'll be sure to give you a mention in each of them.

authors: RomanIsko tourdedave

repo: tourdedave/elemental-selenium-tips


text:
🛑 Tracking - Europe 1 is down

In ae02157, Tracking - Europe 1 (https://tkg1.reinerouge.fr) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Tracking - Europe 1 is back up in 53eb3d6 after 39 minutes.

repo: tousleshoraires/uptime-rr


text:
name property not passed to THREE object

Apparently group name didn't work

Could not repro, see https://github.com/toxicFork/react-three-renderer-tests/blob/f62c2ffbf4776adef3c3bb70ebe2b1b10342249b/src/descriptors/common.js#L8 and https://travis-ci.org/toxicFork/react-three-renderer/builds/103164857#L1633

repo: toxicFork/react-three-renderer


text:
Comment the likes and dislikes to bypass the count data after yt disabled the dislike features

Hey Toxicrecker, please can you comment on the likes and dislikes lines to bypass error.

Hey toxicrecker/Discordutils I did that and also gave pull request but I
think someone removed it.
On Mon, Mar 28, 2022, 11:32 PM MisuteriasuKe @.***>
wrote:

bruh, just comment it out and make a PR
—
Reply to this email directly, view it on GitHub
https://github.com/toxicrecker/DiscordUtils/issues/44#issuecomment-1080971205,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/APTTFALGGOJG2LRFQA4JA53VCHXZRANCNFSM5R3ST5PQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

repo: toxicrecker/DiscordUtils


text:
Better logging

Add verbose logging with all relevant and irrelevant info that might help finding issues.
Move 0:20:44.38-0:20:45.55: shift: -16.157750000000, diff: 0.500385522842 lines to the verbose log.

Logs are now colored, should be good enough.