Various bug fix candidates: #23, #27, #172, #173, #180, #192, #200

Ouch. This will require a lot of documentation due to all the changed files. I should've committed changes more regularly. So here is a summary based on the dif'd files.
AutoMap.cs has a fix for when the Inform IDE writes >[19] e instead of >e when it runs test commands.
AutomapDialog.cs has a one-line fix so we can search only for TXT and LOG files if we choose.
Canvas.cs has a couple lines so that document margins can trump general margins if the box is checked.
MainForm & MainFormDesigner.cs: changes to saving/recalling the app size. The fudge-factor of 27 width and 8 height should work until we change something about the borders. I didn't find a good place that stores the original height and width. Trizbort does something with them so it doesn't remain constant, and I don't know what. Maybe I should step through the code and put a breakpoint to see when they change.
RoomPropertiesDialog.cs and RoomPropertiesDialog.Designer.cs both look to make sure room names can't be numbers or blanks.
Settings.cs renames HorizontalMargins to GenHorizontalMargins and uses doc-specific margins now too.
SettingsDialog.cs adds doc specific margins and also tightens up permissible room default names. (see roomproperties above--no numbers)
Trizbort.csproj added an empty post-build tag because I was debugging command-line stuff.
samples/* now all have nicer margins.

Sorry, clicked the wrong pull request late at night.


Set useBaseVersion to false when copying dependencies

Narayan has some dependencies that use pinned snapshots. An example
<version.microprofile.lra.api>1.0-20190801.113716-482</version.microprofile.lra.api>

We have to tell the maven-dependency-plugin's copy-dependencies goal to use this in the jar filename, and not use the version in the base snapshot artifact. To do that we need to set useBaseVersion to false.

I don't understand the need for useBaseVersion=false.
This assumes that there external SNAPSHOT dependencies in the dependency graph ; this should never be the case.
Also in case external SNAPSHOT dependencies are actually pulled down, having the timestamp information is valuable.

For completeness, see: https://github.com/apache/maven-dependency-plugin/blob/1d2108b0cd7c5fae15edad8ba7f80df24f36297f/src/main/java/org/apache/maven/plugins/dependency/utils/DependencyUtil.java#L114-L121

This change actually breaks the SNAPSHOT use-case. The maven-jar plugin does not add the timestamp the class-path MANIFEST.MF entry without settings useUniqueVersion=true.

Are you sure?  Maybe you/we are running with an old copy of the Maven bits involved?  Because true is the default value for this parameter, and we were seeing problems in that case.
My comment above shows where useBaseVersion affects things.  Maybe I've read it wrongly.

I saw the same behavior Laird speaks of

The default value of useUniqueVersion does not apply since it's set explicitly to false, see https://github.com/oracle/helidon/blob/master/examples/quickstarts/helidon-quickstart-se/pom.xml#L85
useBaseVersion=false combined useUniqueVersion=false does not work with remote SNAPSHOT dependencies: the MANIFEST.MF files has a class-path entry without timestamps and the libs directory has SNAPSHOT dependencies files named with the timestamp.
It does work with local SNAPSHOT since they are not timestamped.
Note that narayana has dropped the timestamped SNAPSHOT dependency as of 5.9.7.Final, see https://github.com/jbosstm/narayana/blob/5.9.7.Final/rts/lra/pom.xml

@romain-grecourt Do you suggest eliminating both configuration settings?  Or…?

Why not, the right values are the defaults ;) - I'm not sure there is any good reason to set them explicitly.


Fix building

Closes #434 #433

:tada: This PR is included in version 4.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


feat: support PRs from forks

This will enable Pint to run the ci check on pull requests originating
from a forked repository. I run a similar setup on GHE 3.9.
It works by creating a local branch in the workflow with the same
changes as the PR from the fork. There are a few workarounds and
required settings.
This works fairly well but has one flaw that we've run into on GHE.
error="submitting reports: failed to create review: POST https://<my_GHE_instance>/api/v3/repos/ops/prometheus_rules/pulls/227/reviews: 422 Unprocessable Entity [{Resource: Field: Code: Message:The commitOID is not part of the pull request}]"

happens occasionally. I haven't been able to track down why yet. However
this provides enough value for us that I thought it was worthwhile to PR
upstream. I would say it happens on ~10-20% of PRs with no commonality.
This shouldn't impact normal operation. I tested it here: https://github.com/wbollock/source_pint_repo/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc
The test repo is public so Pint won't get posting permissions as
explained in the README.
Resolves: #36

tagging @prymitive! let me know what you think

Thanks for the merge @prymitive! I think you need to tag and release for the changes to go public. Looks like the last release of the action was 2022


bump version to 2.5.25

Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe:

License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@conda-forge-admin, please rerender

@hmaarrfk It's been a week since the checks passed. Would you mind having a look at this PR? Thanks.

Can you add yourself as a maintainer below and rerended?

@conda-forge-admin please rerender


Updating .travis.yml

This PR begins the updating process of .travis.yml and will end with the introduction of python 3.7 support (and dropping support for python 3.5).

@sjsrey the Travis CI {3.5,3.6} --> {3.6,3.7} testing bump passes without incident.

related to #9

Closing per #18


problems with HTTP proxy on version 1.40+

What is the problem you are having with rclone?
rclone seems to send wrong HTTP proxy request
What is your rclone version (eg output from rclone -V)
1.40 and above
1.39 and 1.38 is okay by my test
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Windows 7, 64 bit
Archlinux x64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
rclone copy T:\imas\imas   gd:imas

#### A log from the command with the `-vv` flag (eg output from `rclone -vv copy /tmp remote:tmp`)
D:\rclone\beta>rclone -vv copy T:\imas\imas   gd:imas
2018/05/27 12:26:43 DEBUG : rclone: Version "v1.41-070-g67e9ef45" starting with
parameters ["rclone" "-vv" "copy" "T:\\imas\\imas" "gd:imas"]
2018/05/27 12:26:43 DEBUG : Using config file from "C:\\Users\\[myusername]\\.config\\rc
lone\\rclone.conf"
2018/05/27 12:26:43 DEBUG : pacer: Rate limited, sleeping for 1.472454795s (1 co
nsecutive low level retries)
2018/05/27 12:26:43 DEBUG : pacer: low level retry 1/10 (error Get https://www.g
oogleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Check
sum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%29%2CnextPageToken&pageSiz
e=1000&q=trashed%3Dfalse+and+%27root%27+in+parents+and+name+contains+%27imas%27+
and+mimeType%3D%27application%2Fvnd.google-apps.folder%27: proxyconnect tcp: EOF
)
2018/05/27 12:26:43 DEBUG : pacer: Rate limited, sleeping for 2.278953804s (2 co
nsecutive low level retries)
2018/05/27 12:26:43 DEBUG : pacer: low level retry 2/10 (error Get https://www.g
oogleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Check
sum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%29%2CnextPageToken&pageSiz
e=1000&q=trashed%3Dfalse+and+%27root%27+in+parents+and+name+contains+%27imas%27+
and+mimeType%3D%27application%2Fvnd.google-apps.folder%27: proxyconnect tcp: EOF
)
2018/05/27 12:26:44 DEBUG : pacer: Rate limited, sleeping for 4.062716078s (3 co
nsecutive low level retries)
2018/05/27 12:26:44 DEBUG : pacer: low level retry 3/10 (error Get https://www.g
oogleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Check
sum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%29%2CnextPageToken&pageSiz
e=1000&q=trashed%3Dfalse+and+%27root%27+in+parents+and+name+contains+%27imas%27+
and+mimeType%3D%27application%2Fvnd.google-apps.folder%27: proxyconnect tcp: EOF
)
2018/05/27 12:26:47 DEBUG : pacer: Rate limited, sleeping for 8.886124917s (4 co
nsecutive low level retries)
2018/05/27 12:26:47 DEBUG : pacer: low level retry 4/10 (error Get https://www.g
oogleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Check
sum%2Ctrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%29%2CnextPageToken&pageSiz
e=1000&q=trashed%3Dfalse+and+%27root%27+in+parents+and+name+contains+%27imas%27+
and+mimeType%3D%27application%2Fvnd.google-apps.folder%27: proxyconnect tcp: EOF
)

I got these error message from my proxy application
 2018/05/27 12:33:50 [Warning] [4008067473] App|Proxyman|Inbound: connection ends
 > Proxy|HTTP: failed to read http request > malformed HTTP request "\x16\x03\x0
1\x00\x89\x01\x00\x00\x85\x03\x03\xa2\xddQ^\t\xeb\xd4^`\xb6\xca\xef#\xce\xc0\x89
\x8b,\xa3\x119rU\xe7LS\xd8\xfa\xa5\xa9\ax\x00\x00 \xc0/\xc00\xc0+\xc0,̨̩\xc0\x13
\xc0\t\xc0\x14\xc0"
2018/05/27 12:33:51 [Warning] [3307557249] App|Proxyman|Inbound: connection ends
 > Proxy|HTTP: failed to read http request > malformed HTTP request "\x16\x03\x0
1\x00\x89\x01\x00\x00\x85\x03\x03\xda\xcd\xf4\x9c\xa92\xb42\xc1:\xc3x\xc1\xa2\t\
xc5X\x80\xb8L\xae\xd2\xf9d\x85\xbb\xf1x\x83vN\xc8\x00\x00 \xc0/\xc00\xc0+\xc0,̨̩
\xc0\x13\xc0\t\xc0\x14\xc0"
2018/05/27 12:33:52 [Warning] [2721568905] App|Proxyman|Inbound: connection ends
 > Proxy|HTTP: failed to read http request > malformed HTTP request "\x16\x03\x0
1\x00\x89\x01\x00\x00\x85\x03\x03I\xf6&|\xe0\\\xf8\v`\xe1\xe3c\xd6@\xb9\x18b\xce
-\x9f\x81\xbd[1f\x11\x85\xe8\xef\x1f\xbc\xfa\x00\x00 \xc0/\xc00\xc0+\xc0,̨̩\xc0\
x13\xc0\t\xc0\x14\xc0"
2018/05/27 12:33:54 [Warning] [3109701407] App|Proxyman|Inbound: connection ends
 > Proxy|HTTP: failed to read http request > malformed HTTP request "\x16\x03\x0
1\x00\x89\x01\x00\x00\x85\x03\x03,?:$d\x9a\x1e\xa4\xdf\xc48\xa1ʂ\"\x9e\x97G\x1e\
x99\"\xc0\xdc\x00ŵ\x86\xbd\x85\x95\x93\xc0\x00\x00 \xc0/\xc00\xc0+\xc0,̨̩\xc0\x1
3\xc0\t\xc0\x14\xc0"


Error: Unable to read resources\app\package.json

When I run grunt create-windows-installer I receive the following error:
Running "create-windows-installer:x64" (create-windows-installer) task Warning: Unable to read "F:\app\build\my-app-64\resources\app\package.json" file (Error code: ENOENT). Use --force to continue.
Here is my Gruntfile.js...
module.exports = function(grunt) {
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-electron-installer');

  grunt.initConfig({
    'create-windows-installer': {
      x64: {
        appDirectory: 'build/my-app-64',
        outputDirectory: 'build/installer64',
        authors: 'My Company',
        exe: 'myapp.exe'
      },
      ia32: {
        appDirectory: 'build/my-app-32',
        outputDirectory: 'build/installer32',
        authors: 'My Company',
        exe: 'myapp.exe'
      }
    },
    'clean': [ "build" ]
  });
}

I'm a little confused as to why this this task is trying to find package.json in resources\app? I don't actually have a resources directory. My package.json file sits beside my Gruntfile.js in F:\app.
Thanks for any help :)

When you execute electron . in your terminal to test/run your app electron creates a dist folder in your electron_prebuild\resources\appnamefolder folder with your app folder inside. That's the appDirectory.
Example:
Your app folder: C:\my-app
appDirectory: C:\\my-app\\node_modules\\electron-prebuild\\dist\\ (task appends prebuild\dist\resources)
Folder with your app electron created: C:\\my-app\\node_modules\\electron-prebuild\\dist\\resources\\my-app (you need to rename this folder to app)
At least that's what worked for me

What you need is to understand how your app works. Your app works through electron. Your executable will be electron.exe (or whatever name you give to electron.exe)
First thing you need to do after you 've finished with your app is  copy your app folder (only the files you need to make it work) in the dist directory of your electron installation folder.
Example:
Your app folder: C:\my-app
Electron folder: C:\my-app\node_modules\electron-prebuild
appDirectory: C:\\my-app\\node_modules\\electron-prebuild\\dist\\ (task appends resources)
Folder you need to copy your app: C:\\my-app\\node_modules\\electron-prebuild\\dist\\resources\\ (be sure to rename your folder to app )
Remember: The myapp.exe you have in your task is the name of the electron.exe inside your C:\\my-app\\node_modules\\electron-prebuild\\dist\\ folder (This might save you a lot of time. It took me a some time to understand that thing...)
At least that's what worked for me.

appDirectory is the compiled result of your app (i.e. the folder with electron.exe in it), not your source code


Pa 128

A translator for translation of words, sentences, files. People can translate and download files immediately. Works with AWS Translate API, since AWS keys are sensitive information i kept them in .env. Keeps translation history in database and suggest similar translation from past so user could test his knowledge and see more sentences similar to his/her recent translation.

Tested, works!


All videos have the same episode number

I'm trying to download a complete season, but all the episodes have the same number, it's a little issue that makes harder how to identify the correct order, the name is ok, just the number. All episodes have the following format: serie name - S01E00 - episode name.
Any suggestions on how to fix this?

Hey! Could you tell me the show that this was happening for?

Hello,
The issue for me happens on "Food Wars! Shokugeki no Soma", and according to crunchyroll, it has episode number.
Regards.

It looks fine to me. You must be running an older version or something. I'll be releasing the latest version of the source soon and that should take care of it.


Bug: Static files and non-local directories

Description
Commit 13c34b401a21a9c750828edb75e21f0e9be2b3f8 prevents serving static files from non-local directories.
Directories are resolved to local absolute Paths. When using a FileSystemProtocol that serves files from somewhere else, the directories should be kept as relative.
I'm trying to serve files from package data where I need the relative directory path. I suspect that also applies to cloud FileSystemProtocol that are mentioned in the documentation, but I can't test that.
URL to code causing the issue
No response
MCVE
# Your MCVE code here

Steps to reproduce
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots
"![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"

Logs
No response
Starlite Version
main checkout at commit b9e31958bf182edb0c01202acf5fc8070267f409
Platform

[X] Linux
[ ] Mac
[ ] Windows
[ ] Other (Please specify in the description above)

Hi, is this the same as: https://github.com/starlite-api/starlite/issues/1256?
If so it's fixed on 2.0. Can you test if your issue is also fixed?

The fix for that issue introduced the problem. The issue is how generic the static files api should be.
That fix asumes that all static files are in a local filesystem that is relative to the working directory (that what Path.resolve() resolves to). That seems to be the most used configuration, so a fair asumption.
But in you documentation you mention using cloud storage through FileSystemProtocol. I don't know how those protocols work, but my guess would be that they load the file from a cloud storage service and that violates the asumption because its not a local filesystem, so absolute paths on your host are not valid paths on the cloud storage.
In my case I want to load templates and static files from python package data via importlib.resources and those could be zipped so no files on any filesytem, just loaded into memory directly from the zip. I had to change some type annotations from pydantic.DirectoryPath (checks that a file exists) to pathlib.Path (just checks for a valid path syntax) to get it working (#1234). Some of it was fixed by #1242.

Ok, that's a good clarification..
Would you like to submit a fix?

resolved by #2960 ?
There is a test case that uses a remote filesystem.

There is a test case that uses a remote filesystem.

There is?
That being said, I think because of the resolve_symlinks flag that was added, this issue should actually be fixed because iiuc, .resolve()ing the Path was the culprit here.
We should probably add an explicit test case for this before we mark this issue as closed.

There's this case, no?
All FSSpec implementations should be have the same.
I do agree we need something for this specific case, though.
from fsspec.implementations.ftp import FTPFileSystem

from litestar import Litestar
from litestar.static_files import create_static_files_router

app = Litestar(
    route_handlers=[
        create_static_files_router(
            path="/static",
            directories=["assets"],
            file_system=FTPFileSystem(host="<IP_ADDRESS>"),
        ),
    ]
)

Oh well. I didn't consider this because it's just an example in the docs :eyes:


row chart xaxis format now removes decimals

not sure if this should be always the case... but I'm gonna merge for the sake of moving MRR forward


Can no longer run on Mac Apple Silicon

> nix run github:Gabriella439/macos-builder
do you want to allow configuration setting 'extra-substituters' to be set to 'https://macos-builder.cachix.org' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? N
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'macos-builder.cachix.org-1:HPWcq59/iyqQz6HEtlO/kjD/a7ril0+/XJc+SZ2LgpI=' (y/N)? y
do you want to permanently mark this value as trusted (y/N)? N
warning: ignoring untrusted substituter 'https://macos-builder.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
error: a 'aarch64-linux' with features {} is required to build '/nix/store/xnpinlvbpnw9br16nsv8h7dqc19lz5ap-audit-disable.drv', but I am a 'aarch64-darwin' with features {apple-virt, benchmark, big-parallel, nixos-test}

Something changed and now I can no longer run the VM on apple silicon.
I was going through your repo (thank you!) to learn what you.

Interestingly; nix run nixpkgs#darwin.linux-builder works fine.

Yeah, I should mark this repository deprecated or archived.  nixpkgs#darwin.linux-builder is the final home of this work

Is there something I am missing in understanding why it wouldn't work?
I'm trying to break down what you are doing from first principles.
I am trying to understand the delta between what needs to work from:
{system ? builtins.currentSystem, pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-24.05.tar.gz") { inherit system; }}:
let
    nixos = pkgs.nixos ({config, lib, ...}: {
    });
in
nixos.vm

Xposted:
https://discourse.nixos.org/
Does it rely on it needing to be in the NixOS cache ?
Thanks for your contributions.

yeah, the important bit is that it has to be cached.  the reason that this was upstreamed into Nixpkgs was so that it could be built, signed, and cached by trusted infrastructure


Segmentation fault

Hi, im trying to install pyota but i cant, that was my issue:

Obtaining file:///home/gosen/Escritorio/python/pyota/iota.lib.py
Collecting filters (from PyOTA==2.0.3)
Using cached filters-1.3.2-py2.py3-none-any.whl
Collecting pysha3 (from PyOTA==2.0.3)
Using cached pysha3-1.0.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting requests[security]>=2.4.1 (from PyOTA==2.0.3)
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting six (from PyOTA==2.0.3)
Using cached six-1.11.0-py2.py3-none-any.whl
Collecting typing (from PyOTA==2.0.3)
Using cached typing-3.6.2-py2-none-any.whl
Collecting py2casefold; python_version < "3.0" (from filters->PyOTA==2.0.3)
Using cached py2casefold-1.0.1-py2.py3-none-any.whl
Collecting regex (from filters->PyOTA==2.0.3)
Collecting python-dateutil (from filters->PyOTA==2.0.3)
Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Collecting class-registry (from filters->PyOTA==2.0.3)
Using cached class_registry-2.1.0-py2.py3-none-any.whl
Collecting pytz (from filters->PyOTA==2.0.3)
Using cached pytz-2017.3-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached certifi-2017.11.5-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting cryptography>=1.3.4; extra == "security" (from requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached cryptography-2.1.4-cp27-cp27mu-manylinux1_x86_64.whl
Collecting pyOpenSSL>=0.14; extra == "security" (from requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached pyOpenSSL-17.5.0-py2.py3-none-any.whl
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached cffi-1.11.2-cp27-cp27mu-manylinux1_x86_64.whl
Collecting enum34; python_version < "3" (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached enum34-1.1.6-py2-none-any.whl
Collecting asn1crypto>=0.21.0 (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.4.1->PyOTA==2.0.3)
Using cached asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography>=1.3.4; extra == "security"->requests[security]>=2.4.1->PyOTA==2.0.3)
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=1.3.4; extra == "security"->requests[security]>=2.4.1->PyOTA==2.0.3)
Installing collected packages: six, py2casefold, regex, python-dateutil, typing, class-registry, pytz, filters, pysha3, idna, urllib3, certifi, chardet, pycparser, cffi, enum34, asn1crypto, ipaddress, cryptography, pyOpenSSL, requests, PyOTA
Found existing installation: PyOTA 2.0.3
Uninstalling PyOTA-2.0.3:
Successfully uninstalled PyOTA-2.0.3
Running setup.py develop for PyOTA
Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/home/gosen/Escritorio/python/pyota/iota.lib.py/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps --user --prefix=:
----------------------------------------

Rolling back uninstall of PyOTA
Violación de segmento (`core' generado)

I was searching if that question exists and it does exists here:https://github.com/iotaledger/iota.lib.py/issues/79
So i tryied:
pip install --no-binary ':all:' pyota
and it apparently worked, but after that when i try to import Iota from iota i had that :

from iota import Iota
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name Iota

so, what i have to do?
thanks for reading and sorry for my english!

Hola @awea009!  No te preocupes — en realidad, tu inglés es probablemente mejor que mi español 😸
Thanks for reporting this issue!  Some ideas:

Segfault during installation often occurs when compiling something.  PyOTA itself doesn't have any compiled modules, but some of its dependencies do.  Try installing each of these packages one-by-one, to see if they are causing the problem:

cffi
cryptography
pysha3

Sometimes packages don't work correctly if they are installed at system-level.  Try installing PyOTA into a virtualenv.

Give these a try, and let me know what you find out.
Suerte!

Thx for the answer @todofixthis!
I've resolved the problem uninstalling pyota and pyota ccurl, then i tryied again : "pip install --no-binary ':all:' pyota" and it worked.
Thx again!

Awesome!  Glad to hear you got it sorted, and thanks for posting your solution!


Use Intl.DateTimeFormat to fix DST offsets

Changed offsetOf and timeAt to use node's builtin tz database via the Intl.DateTimeFormat api, and added optional date argument to offsetOf, to correctly handle offsets during daylight savings time (Fixes #8)

@meeratony What's left here? Could it be merged?

@meeratony What's left here? Could it be merged?

Tests are failing.

Need to fix this before merging


Added tests. Fixes #106 and fixes #103

These tests ran fine for me locally, not sure I understand why the build is failing.  Can someone else comment?

It seems like the build isn't pulling from the right branch or something. Compare this line with the same line from the previous (successful) build.
@slarson Any idea what could be going on here?
Also, the build will fail later, during testing, since the tests we made are not passing yet. Perhaps we should flag them as expected failures until the bugs are fixed. We can still see whether or not they passed, but they will not break the build the same way a failure would.

@travs I marked the tests as expected failures- we can remove them once we sort out why the build is failing and the bugs are fixed.

@travs @gsarma actually the pulling from a different branch thing is a non issue.  That line is supposed to be different because in the first case it is pulling an actual branch, and in the second case it is creating a branch from a pull request (see this line).
However, what I am noticing is that the first build grabs ZODB 4.1.0 whereas the second grabs ZODB 4.2.0dev and then tries to grab something called zodbpickle which isn't attempted in the first, and then it falls over trying to build zodbpickle.  Actually that doesn't seem to kill it; it looks like its the final error dealing with transaction 1.4.4 that does it in... but notice it is required by ZODB, and in the first transaction 1.4.3 is enough.
I think not specifying a version for zodb is letting the latest build pick up a bad version.
Let's try to change this line to zodb==4.1.0 and see if it builds.

@slarson looks like that solved the problem!

@gsarma @travs Brilliant!  And that's why we like pull requests :)  Good chance to learn about the code base as we make updates to it for weirdnesses like this!

Indeed!  I didn't actually know what a fork was before this.


Can't Install 1.3.0 (Blender 4.1.1, Win10, RTX1080)

After Uninstalling 1.2.0, and installing the Zip for 1.3.0, I go to click the activation button...

...and get the following error message:

...and of a sudden, I can't seem to get 1.2.1 to re-install correctly either.

The same thing

@AGameWriter @Gh0StCK
Can you please try the fresh v1.3.1 if it is any better?
I forgot to run some linter tool so there was a test-import left in the main code. My bad.

Looks like that worked for me. Leaving this open to your discretion since there was another user reporting.

@AGameWriter @Gh0StCK Can you please try the fresh v1.3.1 if it is any better?
I forgot to run some linter tool so there was a test-import left in the main code. My bad.

Yes, it seems to be working fine now. So far there have been no tasks to use the addon, but it starts without errors. Thanks!

@AGameWriter @Gh0StCK Can you please try the fresh v1.3.1 if it is any better?
I forgot to run some linter tool so there was a test-import left in the main code. My bad.

you still need to update your code in the next release.
i had these error, and other version where not installing.

i had to reinstall blender before i can install the 1.3.1.

Hi @okikiola12 ,
sorry for the troubles. My understanding is you managed to install the new version eventually.
Reinstalling Blender seems like an over-kill. Perhaps cleaning the add-on folder manually or starting Blender with fresh profile would have been enough.  I have added an Troubleshooting guide which describes those in more details.

Hi @okikiola12 , sorry for the troubles. My understanding is you managed to install the new version eventually.
Reinstalling Blender seems like an over-kill. Perhaps cleaning the add-on folder manually or starting Blender with fresh profile would have been enough. I have added an Troubleshooting guide which describes those in more details.

@Premik definitely, you should know I did those and it was when it persisted that I had to re-install blender again.
i know normally, when I delete the folder it should solve the issues but reverse was the case then.
That said, let me draw your attention to what I noticed here.
the previous version 1.2.1 or so,
I had a better output which is because the way the cues arrange themselves on the NLA. as seen here.

however, the output of the last version is not good enough when compared to where we are coming from.

now look at both.

@Premik definitely, you should know I did those and it was when it persisted that I had to re-install blender again. i know normally, when I delete the folder it should solve the issues but reverse was the case then.

@okikiola12 that is very strange indeed. The BLENDER_USER_RESOURCES folder is the only place where Blender stores any state as far as I know.  Hopefully it won't happens again :-) But if so, please also try to start Blender with a Fresh profile first.

I had a better output which is because the way the cues arrange themselves on the NLA. as seen here.

Can you elaborate a bit more what it means? I've aligned your screenshoots so the timelines match.

The upper green box is the old version, blue is the new version.
There are three black boxes between frames ~1758..~1776 C B C, which indicates where the cue was detected.

There are extra X strips added. This is result of the Trim cues longer than option in the Strip Placement Settings section. Set this to 0 to disable the trimming.

The cue ends (both start and end) now have bigger overlap. A strips starts to blend-in already when the previous strips starts fainting out:

Related to the previous point, the strip influence is fully on the 100% only for roughly one frame duration And then it blends in or out. In the screenshot the  B and C were quite long. In the old version this would result in "freezing" of the face for several frames. In the new version they would be still slowly moving. Still not good but I hope it is better than freezing.

In the new version the overlap section length can't be directly controlled and it depends on the sibling strips lengths. Only the 100%-influence-frame point can be shifted more towards start or end of the strip using the Blend In-Out Ratio.
Probably some additional control can be added to control the overlap length more directly, if you are getting better results with shorter overlaps.

@Premik the reason for the longer strip is that I untick this which make the output to even be better.

again, kindly compare this "Version 1.3.0"
https://github.com/Premik/blender_rhubarb_lipsync_ng/assets/88362706/b7619732-734a-4377-bc67-85bfa7f75305
the older "version 1.2.1"
https://github.com/Premik/blender_rhubarb_lipsync_ng/assets/88362706/7cb20625-5577-4f96-93dd-0719f2a8118f
so compare both.
for the 1.2.1 is better.

@okikiola12  I see. So you actually prefer the later video pre2.mp4 from the 1.2.1 version where the overlap parts with blending are much shorter and there are more "still" frames. That is interesting, as to me the first one looks slightly better :-). Since the face is not "freezing" as much.
But now that I understand what you mean by "better," I can add some additional toggles to get the v1.2 look back. Something to control the length of the overlap/blending region and still region. I'll think about it and add something into the new version.

@Premik what really matters is that the mouth movement should matches the cues/voices.
i understand you are looking at prevent stills, but there should a way some how, that the still will not be there.
Probably you might include rest position, of course you might say A and X is for that

@Premik , this error was thrown when clicking this play button on blender 4.2.

it seems the AnimData is read-only

Hi @okikiola12 ,
I don't think this is related to the Blender version. Did you perhaps have some NLA strips in tweaking mode? It is activated by the tab key, and the strip is then in green color. In the tweaking mode, Blender won't allow you to change/set the active action on the object. At least, that was how I managed to reproduce this error:

@Premik
ok,you are right it there was some strips in the NLA.
any latest on this ?


[Suggestion] Add some instructions for getting role claims.

Description
I ran into a use case where I wanted to not only validate that a user can sign in, but that they are in a particular role before viewing a page/component.
I had made a ticket here https://github.com/dotnet/aspnetcore/issues/55314 and I thought it might be useful for others to have this documented. It could be helpful for other providers as well if they have something like multiple policies you'd like to map or another claim type with multiple values.
I am using Entra as my oidc provider, so the prerequisites for this are having an entra app and app registration in order to assign users/groups/apps to role(s).
A user can be assigned to multiple roles so I needed to adjust the UserInfo Class at https://github.com/dotnet/blazor-samples/blob/main/8.0/BlazorWebAppOidc/BlazorWebAppOidc.Client/UserInfo.cs to the following
using System.Security.Claims;

namespace BlazorWebAppOidc.Client;

// Add properties to this class and update the server and client AuthenticationStateProviders
// to expose more information about the authenticated user to the client.
public sealed class UserInfo
{
    public required string UserId { get; init; }
    public required string Name { get; init; }
    public required string[] Roles { get; init; }

    public const string UserIdClaimType = "sub";
    public const string NameClaimType = "name";
    private const string RoleClaimType = "roles";

    public static UserInfo FromClaimsPrincipal(ClaimsPrincipal principal) =>
        new()
        {
            UserId = GetRequiredClaim(principal, UserIdClaimType),
            Name = GetRequiredClaim(principal, NameClaimType),
            Roles = principal.FindAll(RoleClaimType).Select(c => c.Value).ToArray(),
        };

    public ClaimsPrincipal ToClaimsPrincipal() =>
        new(new ClaimsIdentity(
            Roles.Select(role => new Claim(RoleClaimType, role))
                .Concat(new[]
                {
                    new Claim(CustomClaimType, UserId),
                    new Claim(NameClaimType, Name)
                }),
            authenticationType: nameof(UserInfo),
            nameType: NameClaimType,
            roleType: RoleClaimType));

    private static string GetRequiredClaim(ClaimsPrincipal principal, string claimType) =>
        principal.FindFirst(claimType)?.Value ?? throw new InvalidOperationException($"Could not find required '{claimType}' claim.");
}

Also the Entra string claim for the role claim is actually "roles" so you need to change the string value in https://github.com/dotnet/blazor-samples/blob/main/8.0/BlazorWebAppOidc/BlazorWebAppOidc/Program.cs
This portion was elusive for me and seems silly now, but I imagine different providers can have different naming. When I was using just microsoft identity nuget packages the roles actually came through as appRole 🤷♀
oidcOptions.TokenValidationParameters.RoleClaimType = "roles";

Finally, in your UserClaims page component you can add the following in order to test out your roles
@attribute [Authorize(Roles = "Role1")]

<PageTitle>User Claims</PageTitle>
<AuthorizeView Roles="Role2">
    <Authorized>
        You have Role2
    </Authorized>
    <NotAuthorized>
        You do not have Role2
    </NotAuthorized>
</AuthorizeView>

Page URL
https://learn.microsoft.com/en-us/aspnet/core/blazor/security/blazor-web-app-with-oidc?view=aspnetcore-8.0&pivots=with-bff-pattern#configuration-1
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/security/blazor-web-app-with-oidc.md
Document ID
c3346d3a-346b-8db4-2650-ec044b3f0dd9
Article author
@guardrex

Thanks @travaille-dev ... Yes, I believe this would be a great addition to the BWA article. It will take a few weeks (or months 🙈) due to a heavy workload at the moment, but I'll get back to it as soon as I can 🏃♂.

All good here! I think this actual sample isn't even slated to be 'available' for folks until November, so we can close this if it's something already on the todo list.

Just confirming ... it will take a little while to reach this. I have a large tutorial to write on my plate 🍽, which will take quite a bit of time in the near-term to digest. This won't get lost ... it's on the menu 📖. (I must be hungry 🍗 ... there are a lot of food references in this comment! 🤣


Add options to Kino.Control.keyboard

Main PR and discussion in Livebook: livebook-dev/livebook#2145

@jonatanklosko done!


Discord Suggestment

Hey! Is there some way we could integrate this bot into discord so it automatically buys the coin for us? It would really help out! Also, is there a panic sell button on the bot?

Yes!
Work is being done on this. I use discord often but I'm leaning towards prioritising the Telegram bot before the discord scraper.
It's hard to judge what the better option might be

Thank you!

Actually the telegram tag come faster then the discord one.
I'm looking for the telegram option but to register to the channel you have to ask to the admin to put your bot listening the channel. And they ask moeny for this :-(. I suppose it is the same with discord?

Okay....im thinking if there is some other way around this.

Actually the events comes only from Telegram or discord. No better idea

From what I have researched, the Mproto core library acts as a telegram client just like your phone would. It shouldn't require adding a bot to the group

Well that would be awsome if that is the case.

Hi,
I've made it working with telegram

Cool.

I will send a PM to Yomi tomorrow

@ffbboy30 Could you upload the code for me to try somewhere?

You could put it in this thread too

now it need to parse the message text with regex to get the coin, correct?

@ffbboy30 think i actually need to wait for the integration from @abayomi185. i will mess it up otherwise :)

Okey, so this is python? i think we are working on nodejs now

@ffbboy30 however, i got it working aswell, though

txt = event.message.message
clean = re.search(r"\b\w+/", txt)
clean = clean.group()[:-1]
print(clean)

works with eg.
The coin we picked is BTM/BTC
ELA/USDT
Coin is: YOP/USDT
but not coins without the /

so this is nothing fancy

Here is some previous pump with channels
#WallStreetBets Crypto Pumps - Investing!
#kucoin
#https://t.me/wallstbetspumps
#Coin is: YOP/USDT
#Coin is: DYP/USDT
#Coin is: LON/USDT
#Binance Royal Pump
#kucoin
#VIP
#https://t.me/binancepumproys
#COIN IS : WPR
#COIN IS : DLT
#COIN IS : IDEX
#COIN IS : RDN
#Crypto Pump Squad
#kucoin
#No preprump
#https://t.me/cryptoflashsignals
#Coin is: MXC
#Coin is: ORBS
#Coin is: LON
#WallStreetBets | Market Makers
#kucoin
#no VIP
#https://t.me/wsb_crpyto
#ELA/USDT
#VSYS/USDT
#SDT/USDT
#Binance Pump Signals
#binance
#no VIP
#https://t.me/Big_Pumps_Signals
#COIN IS : DLT
#COIN IS : WPR
#COIN IS :IDEX

Now the most important is to share channels with no VIP pumps to have chance to make money.

Thanks! I should have some time to work on this later today. I'm currently looking at having both manual and telegram entry work simultaneously, particularly while it's still untested how performant it would be.

I'm looking if there is a solution equivalent with discord , to have the both in parallel and take the first message received

It's possible. I've made the UI in the last Node commit to choose multiple pump-groups at launch.

@ffbboy30 did you manage to add it to send the coin to the prompt in the bot-kucoin.py? if so, then do you have the code?

I suck on the Regex formula, here is the different sentence I've found
'Coin is: YOP/USDT'
'Coin is: YOP'
'YOP/USDT'
'YOP'
I thoughtabout a loop waiting while the sentence size is not null, and I put the Coin detected in the Event like this the loop break and you can make the order instantly.
What do you think of that.
I'm not Python expert :-)

Nice. It's similar to how I want to implement it in Node. I haven't used Regex extensively so I would have to learn it. If you've got pointers that would be helpful.

I can check more regex tomorrow!

this works with all. although feel free to change anything.
txt = event.message.message
clean = event.message.message.replace("COIN IS", "coin is")
clean = re.search(r"(\b\w[A-Z]+)", clean)
clean = clean.group()

i hope this works with the nodejs also....please try that @abayomi185  when you have time.

@ffbboy30  Could you integrate the telegram function into the pythoncode?

.js files in the node_wip folder. but @abayomi185  will look at that as the python version is no priority for him. but i think you can try to integrate the telegram function into the python bot. i know most of everything except programming well :-)

Ok,
I've seen it
Thanks

from future import print_function, unicode_literals
from time import sleep, time
import PyInquirer as Inquirer
from pprint import pprint
from pyfiglet import Figlet
from colorama import Fore, Back, Style
from timeit import default_timer as timer
import threading
import concurrent.futures
import asyncio
import os
import json
import yaml
import math
import uuid
import time
from telethon import TelegramClient, sync, events
import pandas as pd
import time
import os
import sys
import keyboard
import re
Kucoin API Helper - https://github.com/Kucoin/kucoin-python-sdk.git
from kucoin.client import Market
from kucoin.client import Trade
from kucoin.client import User
SQLite3 to save local records of trades
import sqlite3
Connect to records.db database
conn = sqlite3.connect('records.db')
c = conn.cursor()
Import user config and instantiate variables
conf_Telegram = "./conf-Telegram.yaml"
conf_import = "./conf-kucoin.yaml"
secrets = "./secrets-kucoin.yaml"
coin = None
config = None
Switched to .yaml as it offers commenting and other features
#It shouldn't be an issue for speed as dict is loaded into memory
with open(conf_import, "r") as conf_file:
config = yaml.safe_load(conf_file)
with open(conf_Telegram, "r") as conf_file:
Telegramconfig = yaml.safe_load(conf_file)
Open secret.json, retrieve keys and place in config dictionary
with open(secrets, "r") as secrets_file:
api_keys = yaml.safe_load(secrets_file)
config['api_key'] = api_keys['api_key']
config['api_secret'] = api_keys['api_secret']
config['api_passphrase'] = api_keys['api_passphrase']
Command Line interface prompts for PyInquirer
question1 = [
{
'type': 'list',
'name': 'trade_conf',
'message': 'Please select trade configuration?',
'choices': list(config["trade_configs"].keys()),
}
]
question2 = [
{
'type': 'input',
'name': 'coin',
'message': 'Please enter coin for Pump?',
}
]
question3 = [
{
'type': 'confirm',
'name': 'continue',
'message': 'Do you wish to proceed?',
'default': True,
}
]
Show crypto-bot banner
def show_header():
fig = Figlet(font='slant')
print(fig.renderText('crypto-bot'))
Binance API Helper Debug mode
def debug_mode(client):
# client.ping()
time_res = client.get_server_timestamp()
print(f"Server Time: {time_res}")
# There is an error for this function in the kucoin library
status = client.get_server_status()
print(f"Server Status: {status['status']}")

Get account balance for "pairing" in config before trade
def acct_balance():
acct_balance = user_client.get_account_list(config['trade_configs'][selected_config]['pairing'], 'trade')

print('\nYour {} balance is {}\n'.format(config['trade_configs'][selected_config]['pairing'], acct_balance[0]['available']))
print(Fore.YELLOW + 'Please ensure Config is correct before proceeding\n' + Fore.RESET)

if float(acct_balance[0]['available']) < 0.001:
    print(Fore.RED + 'A minimum balance may be required for trade on Kucoin\n' + Fore.RESET)

return acct_balance

Get account balance for "pairing" in config after trade
def acct_balance2():
acct_balance = user_client.get_account_list(config['trade_configs'][selected_config]['pairing'], 'trade')

print('\nYour {} balance after trading is {}\n'.format(config['trade_configs'][selected_config]['pairing'], acct_balance[0]['available']))

float_acct_balance = float(acct_balance[0]['available'])
float_balance = float(balance[0]['available'])

difference = float_acct_balance - float_balance
percentage = (difference/float_balance) * 100

if float_acct_balance < float_balance:

    print(Fore.YELLOW + 'A {:.2f}% loss\n'.format(percentage) + Fore.RESET)

if float_acct_balance > float_balance:

    print(Fore.GREEN + 'A {:.2f}% gain\n'.format(percentage) + Fore.RESET)

return acct_balance

def pump_duration(start_time, end_time):
time_delta = end_time - start_time
time_delta = round(time_delta, 2)
print(f"Time elapsed for pump is {time_delta}s\n")
Get available trading amount with user config
def trading_amount():
avail_trading_amount = float(balance[0]['available']) * config['trade_configs'][selected_config]['buy_qty_from_wallet']
return avail_trading_amount
Execute market order - buy and/or sell
def market_order(selected_coin_pair, order_type):
if order_type == 'buy':
    avail_trading_amount = trading_amount()
    current_price = client.get_ticker(symbol=selected_coin_pair)
    buy_qty = math.floor(avail_trading_amount / float(current_price['price']))
    # order = client.order_market_buy(symbol=selected_coin_pair, quantity=buy_qty)
    # print(f"buy_qty: {str(buy_qty)}")
    order_id = trade.create_market_order(selected_coin_pair, 'buy', clientOid=str(uuid.uuid4()), size=str(buy_qty))
    return order_id

elif order_type == 'sell':
    # coin_balance = user_client.get_withdrawal_quota(selected_coin.upper())
    coin_balance = user_client.get_account_list(selected_coin.upper(), 'trade')
    # current_price = client.get_symbol_ticker(symbol=selected_coin_pair)
    # sell_qty = math.floor(coin_balance * float(current_price['price']))
    sell_qty = math.floor(float(coin_balance[0]['available']) * config['trade_configs'][selected_config]['sell_qty_from_wallet'])
    # order = client.order_market_sell(symbol=selected_coin_pair, quantity=sell_qty)
    order_id = trade.create_market_order(selected_coin_pair, 'sell', str(uuid.uuid4()), size=str(sell_qty))
    return order_id

Displays order details asynchronously - see 'main' block
def display_order_details(order):
return json.dumps(order, sort_keys=True, indent=4)
Check user configs margin in to sell order
async def check_margin():
global pending_sell_order_id
# pending_sell_order_id = None
margin = config['trade_configs'][selected_config]['profit_margin']

fallback_task = asyncio.create_task(fallback_action())
# count = 0

while True:
    # avg_price = client.get_avg_price(symbol=selected_coin_pair)
    current_price = client.get_ticker(symbol=selected_coin_pair)
    # print(float(buy_order_data['dealFunds'])/float(buy_order_data['dealSize']))
    # count+=1
    try:
        if float(current_price['price']) >= ((float(buy_order_data['dealFunds'])/float(buy_order_data['dealSize'])) * (1.0 + margin)):
            if pending_sell_order_id == None:
                pending_sell_order_id = market_order(selected_coin_pair, 'sell')
                break
        else:
            # sleep((config['trade_configs'][selected_config]['refresh_interval']/1000))
            await asyncio.sleep(config['trade_configs'][selected_config]['refresh_interval']/1000)
    except:
        pass

    if pending_sell_order_id:
        break

# print(count)
return pending_sell_order_id

async def fallback_action():
global pending_sell_order_id
# sleep((config['trade_configs'][selected_config]['sell_fallback_timeout_ms']/1000))
await asyncio.sleep((config['trade_configs'][selected_config]['sell_fallback_timeout_ms']/1000))

if pending_sell_order_id == None:
    pending_sell_order_id = market_order(selected_coin_pair, 'sell')

Save orders to local db asynchronously
def insert_into_db(order, order_id):
# trade.get_order_details(order_id)

symbol = order['symbol']
symbol = symbol.split("-", 1)[0]

price = float(order['dealFunds']) / float(order['dealSize'])

c.execute("INSERT INTO Orders VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
        ("Kucoin", order['clientOid'], order_id, order['id'],
            order['symbol'], order['type'], order['side'], order['timeInForce'],
            order['createdAt'], symbol,
            price, order['fee'],
            order['size'], order['dealFunds']))

conn.commit()

async def main():
global buy_order_data

# coin_pair_info = client.get_symbol_info(selected_coin_pair)
# coin_pair_info = client.get_ticker(selected_coin_pair)

start_time = time.time()

buy_order = market_order(selected_coin_pair, 'buy')
# print(f"buy_order: {buy_order}")
buy_order_data = trade.get_order_details(buy_order['orderId'])

# Execution using threading
with concurrent.futures.ThreadPoolExecutor() as executor:

    #Print buy order details
    buy_order_details = executor.submit(display_order_details, buy_order_data)
    print('\n' + buy_order_details.result() + '\n')

    sell_order = await check_margin()

end_time = time.time()
sell_order_data = trade.get_order_details(sell_order['orderId'])
sell_order_details = display_order_details(sell_order_data)
print('\n' + sell_order_details + '\n')

insert_into_db(order=buy_order_data, order_id=buy_order['orderId'])
insert_into_db(order=sell_order_data, order_id=sell_order['orderId'])

conn.close()

balance2 = acct_balance2()
pump_duration(start_time, end_time)

if name == 'main':
show_header()

client = Market(url='https://api.kucoin.com')
trade = Trade(key=config['api_key'], secret=config['api_secret'],
                passphrase=config['api_passphrase'], is_sandbox=False, url='')
user_client = User(config['api_key'], config['api_secret'], config['api_passphrase'])

if config['debug_mode']:
    debug_mode(client=client)
    print('\n')

print(Fore.GREEN + '-- Kucoin Edition --\n' + Fore.RESET)

#Start Telegram API
client = TelegramClient(Telegramconfig['UserName'], Telegramconfig['api_id'], Telegramconfig['api_hash']).start()
selected_coin = ''

#Telegram Event
#@client.on(events.NewMessage)
@client.on(events.NewMessage(chats=(Telegramconfig['group_username'])))
async def my_event_handler(event):
    clean = event.message.message.upper()
    if ':' in clean:
        clean = clean.split(":") # remove before ':' if present in string
        clean = clean[1]
    clean = re.search(r"(\b\w[A-Z]+)", clean)
    clean = clean.group()
    global selected_coin
    selected_coin = clean

client.start()
#client.run_until_disconnected()

#Question1
answer1 = Inquirer.prompt(question1)
selected_config = answer1['trade_conf']

#Retrieve current coin balance here
balance = acct_balance()

#Question2
#answer2 = Inquirer.prompt(question2)
#selected_coin = answer2['coin']
print('Wait for Telegram message')
async def main():
    while (selected_coin == ''):
        #print('Wait Telegram')
        await asyncio.sleep(0.01)
client.loop.run_until_complete(main())

#Coin Pair
selected_coin_pair = selected_coin.upper() + "-" +\
                        config['trade_configs'][selected_config]['pairing']

buy_order_data = None
pending_sell_order_id = None

print('Receive : ' + selected_coin_pair)

asyncio.run(main())

#The binance one
from future import print_function, unicode_literals
from time import sleep, time
import PyInquirer as Inquirer
from pprint import pprint
from pyfiglet import Figlet
from colorama import Fore, Back, Style
from timeit import default_timer as timer
import threading
import concurrent.futures
import asyncio
import os
import json
import yaml
import math
import time
from telethon import TelegramClient, sync, events
import pandas as pd
import time
import os
import sys
import keyboard
import re
Binance API Helper - https://github.com/sammchardy/python-binance.git
from binance.client import Client
SQLite3 to save local records of trades
import sqlite3
Connect to records.db database
conn = sqlite3.connect('records.db')
c = conn.cursor()
Import user config and instantiate variables
conf_Telegram = "./conf-Telegram.yaml"
conf_import = "./conf-binance.yaml"
secrets = "./secrets-binance.yaml"
coin = None
config = None
Switched to .yaml as it offers commenting and other features
#It shouldn't be an issue for speed as dict is loaded into memory
with open(conf_import, "r") as conf_file:
config = yaml.safe_load(conf_file)
with open(conf_Telegram, "r") as conf_file:
Telegramconfig = yaml.safe_load(conf_file)
Open secret.json, retrieve keys and place in config dictionary
with open(secrets, "r") as secrets_file:
api_keys = yaml.safe_load(secrets_file)
config['api_key'] = api_keys['api_key']
config['api_secret'] = api_keys['api_secret']
#print(config)
Command Line interface prompts for PyInquirer
question1 = [
{
'type': 'list',
'name': 'trade_conf',
'message': 'Please select trade configuration?',
'choices': list(config["trade_configs"].keys()),
}
]
question2 = [
{
'type': 'input',
'name': 'coin',
'message': 'Please enter coin for Pump?',
}
]
question3 = [
{
'type': 'confirm',
'name': 'continue',
'message': 'Do you wish to proceed?',
'default': True,
}
]
Show crypto-bot banner
def show_header():
fig = Figlet(font='slant')
print(fig.renderText('crypto-bot'))
Binance API Helper Debug mode
def debug_mode(client):
# client.ping()
time_res = client.get_server_time()
print("Server Time: {}".format(time_res["serverTime"]))
status = client.get_system_status()
print("System Status: {}".format(status["msg"]))

Get account balance for "pairing" in config before trade
def acct_balance(send_output=False):
acct_balance = client.get_asset_balance(asset=config['trade_configs']
[selected_config]['pairing'])
print('\nYour {} balance is {}\n'.format(config['trade_configs'][selected_config]['pairing'], acct_balance['free']))
print(Fore.YELLOW + 'Please ensure Config is correct before proceeding\n' + Fore.RESET)

if config['trade_configs'][selected_config]['pairing'] == 'BTC':
    if float(acct_balance['free']) < 0.001:
        print(Fore.RED + 'Binance requires min balance of 0.001 BTC for trade\n' + Fore.RESET)
else:
    print(Fore.RED + 'A min balance is often required for trade on Binance\n' + Fore.RESET)

return acct_balance

Get account balance for "pairing" in config after trade
def acct_balance2(send_output=False):
acct_balance = client.get_asset_balance(asset=config['trade_configs']
[selected_config]['pairing'])
print('\nYour {} balance after trading is {}\n'.format(config['trade_configs'][selected_config]['pairing'], acct_balance['free']))

difference = acct_balance['free'] - balance['free']
percentage = (difference/balance) * 100

if float(acct_balance['free']) < balance:

    print(Fore.YELLOW + 'A {:.2f}% loss\n'.format(percentage) + Fore.RESET)

if float(acct_balance['free']) > balance:

    print(Fore.GREEN + 'A {:.2f}% gain\n'.format(percentage) + Fore.RESET)

return acct_balance

def pump_duration(start_time, end_time):
time_delta = end_time - start_time
time_delta = round(time_delta, 2)
print(f"Time elapsed for pump is {time_delta}s\n")
Get available trading amount with user config
def trading_amount():
avail_trading_amount = float(balance['free']) * config['trade_configs'][selected_config]['buy_qty_from_wallet']
return avail_trading_amount
Execute market order - buy and/or sell
def market_order(client, selected_coin_pair, order_type, coin_pair_info, balance):
if order_type == 'buy':
    avail_trading_amount = trading_amount()
    current_price = client.get_symbol_ticker(symbol=selected_coin_pair)
    buy_qty = math.floor(avail_trading_amount / float(current_price['price']))
    order = client.order_market_buy(symbol=selected_coin_pair, quantity=buy_qty)
    return order

elif order_type == 'sell':
    #This here is a potential bottle neck and may introduce delays
    coin_balance = client.get_asset_balance(asset=selected_coin.upper())
    # print(coin_balance)
    # current_price = client.get_symbol_ticker(symbol=selected_coin_pair)
    # print(current_price)
    # sell_qty = math.floor(coin_balance * float(current_price['price']))
    sell_qty = math.floor(float(coin_balance['free']) * config['trade_configs'][selected_config]['sell_qty_from_wallet'])
    order = client.order_market_sell(symbol=selected_coin_pair, quantity=sell_qty)
    return order

Displays order details asynchronously - see 'main' block
def display_order_details(order):
return json.dumps(order, sort_keys=True, indent=4)
Check user configs margin in to sell order
async def check_margin():
global pending_sell_order
margin = config['trade_configs'][selected_config]['profit_margin']

fallback_task = asyncio.create_task(fallback_action())

while True:
    # avg_price = client.get_avg_price(symbol=selected_coin_pair)
    current_price = client.get_symbol_ticker(symbol=selected_coin_pair)
    # print(current_price)
    # print(current_price['price'])
    try:
        if float(current_price['price']) >= (buy_order['fills'][0]['price'] * (1.0 + margin)):
            if pending_sell_order == None:
                pending_sell_order = market_order(client, selected_coin_pair, 'sell', coin_pair_info, balance)
                break
        else:
            await asyncio.sleep((config['trade_configs'][selected_config]['refresh_interval']/1000))
    except:
        pass

    if pending_sell_order:
        break

return pending_sell_order

async def fallback_action():
global pending_sell_order

await asyncio.sleep((config['trade_configs'][selected_config]['sell_fallback_timeout_ms']/1000))

if pending_sell_order == None:
    pending_sell_order = market_order(client, selected_coin_pair, 'sell', coin_pair_info, balance)

Save orders to local db asynchronously
def insert_into_db(order):
c.execute("INSERT INTO Orders VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)",
        ("Binance", order['clientOrderId'], order['orderId'], order['fills'][0]['tradeId'],
            order['symbol'], order['type'], order['side'], order['timeInForce'],
            order['transactTime'], order['fills'][0]['commissionAsset'],
            order['fills'][0]['price'], order['fills'][0]['commission'],
            order['fills'][0]['qty'], order['cummulativeQuoteQty']))

conn.commit()

async def main():
coin_pair_info = client.get_symbol_info(selected_coin_pair)

start_time = time.time()

buy_order = market_order(client, selected_coin_pair, 'buy', coin_pair_info, balance)

# Execution using threading
with concurrent.futures.ThreadPoolExecutor() as executor:

    #Print buy order details
    buy_order_details = executor.submit(display_order_details, buy_order)
    print('\n' + buy_order_details.result() + '\n')

    sell_order = await check_margin()

end_time = time.time()
sell_order_details = display_order_details(sell_order)
print('\n' + sell_order_details + '\n')

insert_into_db(order=buy_order)
insert_into_db(order=sell_order)

conn.close()

balance2 = acct_balance2()
pump_duration(start_time, end_time)

if name == 'main':
show_header()
client = Client(config["api_key"], config["api_secret"])
if config['debug_mode']:
    debug_mode(client=client)
    print('\n')

print(Fore.YELLOW + '-- Binance Edition --\n' + Fore.RESET)

#Start Telegram API
Tlgclient = TelegramClient(Telegramconfig['UserName'], Telegramconfig['api_id'], Telegramconfig['api_hash']).start()
selected_coin = ''

#Telegram Event
#@Tlgclient.on(events.NewMessage)
@Tlgclient.on(events.NewMessage(chats=(Telegramconfig['group_username'])))
async def my_event_handler(event):
    clean = event.message.message.upper()
    if ':' in clean:
        clean = clean.split(":") # remove before ':' if present in string
        clean = clean[1]
    clean = re.search(r"(\b\w[A-Z]+)", clean)
    clean = clean.group()
    global selected_coin
    selected_coin = clean

Tlgclient.start()
#Tlgclient.run_until_disconnected()

#Question1
answer1 = Inquirer.prompt(question1)
selected_config = answer1['trade_conf']

#Retrieve current coin balance here
balance = acct_balance()

#Question2
#answer2 = Inquirer.prompt(question2)
#selected_coin = answer2['coin']
print('Wait for Telegram message')
async def main():
    while (selected_coin == ''):
        #print('Wait Telegram')
        await asyncio.sleep(0.01)
Tlgclient.loop.run_until_complete(main())

#Coin Pair
selected_coin_pair = selected_coin.upper() + \
                        config['trade_configs'][selected_config]['pairing']

buy_order = None
coin_pair_info = None
pending_sell_order = None
print('Receive : ' + selected_coin_pair)

asyncio.run(main())

i tried telegram with binance just now. i think it took 5 seconds for the telegram message to reach the function.  That will not work unless there is something to do to fix it..

And i am getting the message fast in my telegram windows app, and 4-5 seconds later in the python function.

I test the code with a chat channel it works without delay.
I've seen that some channel are able to detect Bot and add 5 to 12 sec delay.
Maybe you can test on chat channel maybe the problem is on your side ?
Which channel do you test ?

https://t.me/wallstreetevents

https://t.me/wallstreetevents

Hi, slightly off topic. Are you one of the premium members? I have never made any money in this group. Their pumps are always pre-pumped.

Hey, how do I go about getting the group channel id?

If you click on the name of the channel, in the telegram window you should see the channel properties.
Possibly even right click on the channelname in the list of channels on the left side in telegram, to get a dropdown option list.

What platform and client should I do this on? I have yet to see it on the web client and iOS app

Sorry, its windows i was referring to.
26 maj 2021 kl. 23:04 skrev Yomi Ikuru @.***>:

What platform and client should I do this on? I have yet to see it on the web client and iOS app
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I've just start a Discord server to list all the usefull pump channel without VIP or pre pump.
If you have some informations informations I will add them .
I don't know how it works but the channel ID is :<PHONE_NUMBER>86696193 and the name of the server is pumpchannellist's server
and the link https://discord.gg/CWvNtX4T

Just an update, I have done some testing and I'm able to get messages from telegram groups with no perceivable delay. I have yet to parse the messages and feed them into the exchange bot.
I am able to commit time into this after next week. If you have more suggestions. I'm happy to hear and implement them.

Yes i think for a tiny log during pump to have delay feedback for the next
pump.
For example :
Timestamp; Price
Le ven. 4 juin 2021 à 19:39, Yomi Ikuru @.***> a écrit :

Just an update, I have done some testing and I'm able to get messages from
telegram groups with no perceivable delay. I have yet to parse the messages
and feed them into the exchange bot.
I am able to commit time into this after next week. If you have more
suggestions. I'm happy to hear and implement them.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/abayomi185/simple-pump-and-dump-bot/issues/34#issuecomment-854896308,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABUEJ427GDUDECPELVELZQ3TREFTVANCNFSM45K2WV5Q
.


Add extended IFLA_ consts

Only Netlink interface link attributes up IFLA_STATS are currently available. This commit adds IFLA_COST to IFLA_MAX_MTU.
See https://github.com/torvalds/linux/blob/54ecb8f7/include/uapi/linux/if_link.h#L106
Thanks!

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

@bors: r+

:pushpin: Commit e4b46dc36efec6a1f2907f38ae1e3cd3e58dc3c6 has been approved by gnzlbg

:hourglass: Testing commit e4b46dc36efec6a1f2907f38ae1e3cd3e58dc3c6 with merge aad665f99ec00c6b920609cb7db093e8b4948eb2...

:broken_heart: Test failed - status-azure

@bors Could I get another r+? I removed some extra values that got introduced after the Linux kernel versions used on CI. That got the Linux tests passing.
There's some failures on wasm32, asmjs, and windows that look like build flakes.

@bors: r+

:pushpin: Commit 60a2167702a6780d6e63d571f6861a2af38889dc has been approved by gnzlbg

:hourglass: Testing commit 60a2167702a6780d6e63d571f6861a2af38889dc with merge 64a146e08c6fbe0f776a0bba0274c6baa331aa16...

:sunny: Test successful - checks-cirrus-freebsd-10, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, status-azure
Approved by: gnzlbg
Pushing 64a146e08c6fbe0f776a0bba0274c6baa331aa16 to master...


wget: 1.20 -> 1.20.1 (CVE-2018-20483)

Motivation for this change
1.20.1 fixes CVE-2018-20483 (privacy leak by saving full URLs in xattr by default).
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg build wget


Optimize SVG file output - Markers & Images

Avoid duplication of rasterized images and markers to keep file size low and simplify an SVG viewer's life.

Is there any way to create a reference to a particular marker or image, and then just reuse that in SVG?  Kind of similar to what mesh instancing does in MeshScatter, for instance.


Fixed presence events member_added and member_removed not triggering for iOS

Hi! Thanks for this library, using it with authenticated private and presence channels.
While using it, I stumbled upon an issue in iOS where it doesn't trigger the pusher:member_added and pusher:member_removed events at all with the presence channels. Making it impossible for the presence on iOS to know who joined or left.
Fixing that in this PR because it was never being triggered in Flutter for iOS and wanted to fix that to make it work.
The change made is that it uses the onMemberAdded and onMemberRemoved which the Pusher Swift SDK describes to register for these callbacks (see https://github.com/pusher/pusher-websocket-swift#swift-12).
Next, the event is published with the same name as we expect to the Flutter side, as done with the other events.
This fixes the issue where the pusher:member_added and pusher:member_removed events are not being triggered.
When looking at the issues on the repo, I saw that #2 is facing the same issue in the first part of the issue. So this will also fix the first part of #2.
Summary

[Flutter] No changes
[Android] No changes
[iOS] Internal change: Fixes pusher:member_added and pusher:member_removed usage when using presence channels

Additional note (Also related to #2)
However, the data send with the pusher:subscription_succeeded event differs much from Android (except for the user_id). That is another issue, and matches to the second part of #2, the 'improvement' that is suggested there.
I was also facing this issue when parsing the messages on Android. Currently still parsing the data manually in Flutter to fix this inconsistency.

can you do the fix for android too, please?

@alexkok

fixed from 2021  can you fix it again ?


Claim-tokens command always ends with an error

Claim-tokens command ends like this:
cli claim-tokens <token-pairs> [count]

Claim tokens for N auctions of a token pair (i.e. claim-tokens WETH-RDN)

Positionals:
  token-pairs  The token pair of the auction, i.e. WETH-RDN,WETH-OMG  [string] [required]
  count        The number of elements, i.e. 5  [number] [default: 5]

Options:
  --version  Show version number  [boolean]
  -h         Show help  [boolean]

TypeError: Cannot read property 'tx' of undefined
    at Object.handler (/usr/src/app/src/cli/cliCommands/claimTokensCmd.js:32:34)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:229:7)

Transaction is being broadcasted and tokens are being claimed, but execution of the whole script always fails.

Service method response was updated recently. It may be that the command is not getting the expected response parameters to print the transaction result.
Thank you for reporting


Migrate to Rx extensions instead of using extension on APIRequest.

This seems to be impossible in Swift 3 since
extension Reactive where Base: APIRequest

requires specific generic constraints for APIRequest. We'll hope that in next releases of Swift this will be made possible.

This also doesn’t work with Swift 4 and Swift 4.1, keeping this issue until Swift 5.

Won't fix, closing.


[BUG] Error while recompiling because of exceed the method references limitation

Information

Apktool Version (apktool -version) - 2.9.3
Operating System (Mac, Linux, Windows) - MacOs
APK From? (Playstore, ROM, Other) - TestApp
Java Version (java --version) - Java17

Stacktrace/Logcat
Exception in thread "main" com.android.tools.smali.util.ExceptionWithContext: Exception occurred while writing code_item for method Landroidx/viewpager2/adapter/FragmentStateAdapter;->h(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
	at com.android.tools.smali.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1119)
	at com.android.tools.smali.dexlib2.writer.DexWriter.writeTo(DexWriter.java:415)
	at com.android.tools.smali.dexlib2.writer.DexWriter.writeTo(DexWriter.java:370)
	at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:56)
	at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
	at brut.androlib.ApkBuilder.buildSourcesSmali(ApkBuilder.java:211)
	at brut.androlib.ApkBuilder.buildSources(ApkBuilder.java:145)
	at brut.androlib.ApkBuilder.build(ApkBuilder.java:99)
	at brut.apktool.Main.cmdBuild(Main.java:296)
	at brut.apktool.Main.main(Main.java:95)
Caused by: com.android.tools.smali.util.ExceptionWithContext: Error while writing instruction at code offset 0x3f
	at com.android.tools.smali.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1392)
	at com.android.tools.smali.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:1115)
	... 9 more
Caused by: com.android.tools.smali.util.ExceptionWithContext: Unsigned short value out of range: 65540
	at com.android.tools.smali.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:115)
	at com.android.tools.smali.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:285)
	at com.android.tools.smali.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1319)
	... 10 more

Steps to Reproduce

I use apktool to decompile an apk. Then, I want to inject some new classes into the first dex file classes.dex and recompile the apk file but caught the above error.
Using APKAnalyzer, the classes.dex only have about 50000 method references, and the injected classes has less than 20 method references. According to the specification, It can't exceed the limitation of the dex file.
How could I solve it?

In small situations the process of disassembly and reassembly may make more classes than originally there. Either way this isn't a bug - if you exceed the method limit of a dex you must move methods to a secondary dex file or introduce one.


add seed to random algorithms

🚀 🚀 Pull Request
Impact

[ ] Bug fix (non-breaking change which fixes expected existing functionality)
[ ] Enhancement/New feature (adds functionality without impacting existing logic)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

Things to be aware of

Things to worry about

Additional Context

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: levongh:x: UbuntuUbuntu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

While most of the current randomness comes from TQL (hence it is enterprise) I don't think we should throw an error for enterprise support.
deeplake.random.seed(200)

This ends up with different ordering and random sampling is not captured.
import deeplake
deeplake.random.seed(200)
ds = deeplake.load("hub://activeloop/mnist-train")
ds.query("select * sample by max_weight(labels==4: 1, True: 0) limit 10")


governance: add missing governance_info account in cancel_proposal in…

https://github.com/solana-labs/solana-program-library/blob/master/governance/program/src/processor/process_cancel_proposal.rs#L29

Fixed in https://github.com/solana-labs/oyster/pull/452


feat: The subtype coercion associated to a closed subset is a closed map

Prove that the subtype coercion associated to a closed subset is a closed map.

Thanks!
bors merge


Add number of LOC that were changed as properties to each commit activity

Discussed in https://github.com/DLR-SC/gitlab2prov/discussions/96

Originally posted by akshaykagarwal May 12, 2023
Is it possible to add the number of lines that were changed(added/removed/modified) per commit activity? This way, one can better track a user's actual activity/contribution instead of just seeing how many commit activity they did. It can also be used to track if an activity was related to a minor change or a major one thus helping in impact analysis as well.
If you can give some pointers on where to look at for updating the code, I can try and update the code :)

Will be implemented in the upcoming github2prov & gitlab2prov release.


predict.py Unhandled Exception

I was trying the simplest example from GitHub documentation, just OCR the original academic paper for Nougat, and it fails.
My command:
nougat 2308.13418.pdf -o 'output' --no-skipping
I had just installed using Python 3.10 in Ubuntu on WSL2 on Windows.  So a Linux VM on Windows.
Commands tried to install:
pip install nougat-ocr
pip install git+https://github.com/facebookresearch/nougat
but both versions of the library result in this at runtime:
> nougat 2308.13418.pdf -o 'output' --no-skipping
\WARNING:root:No GPU found. Conversion on CPU is very slow.
/home/wolf/venvs/nougattest/lib/python3.10/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3483.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
  0%|                                                                                | 0/17 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/home/wolf/venvs/nougattest/bin/nougat", line 8, in <module>
    sys.exit(main())
  File "/home/wolf/venvs/nougattest/lib/python3.10/site-packages/predict.py", line 145, in main
    for i, (sample, is_last_page) in enumerate(tqdm(dataloader)):
TypeError: cannot unpack non-iterable NoneType object

Same problem here - Windows 10, same installation process via pip (pipy and git), torch version: cpu and gpu (cuda 11.8)

Same problem here - Windows 10, installation process via pip, python 3.11.4.

can somebody give me a pdf? I just changed something in the rasterization so the error is from that. You can downgrade to 0.1.8 for now

can somebody give me a pdf? I just changed something in the rasterization so the error is from that. You can downgrade to 0.1.8 for now

Do you mean 0.0.8? Because it looks like you are on release 0.1.0 at the moment.

can somebody give me a pdf? I just changed something in the rasterization so the error is from that. You can downgrade to 0.1.8 for now

This fixed the issue

I can't reproduce it. And I think it is because of the PDF you tried to process. Can you confirm this? And if so, is it possible to share the PDF or at least check if it's a valid PDF?

@lukas-blecher Can confirm that downgrading nougat-ocr to 0.1.8 worked for me on Colab.

I would love to share a pdf with you, but the pdfs I am working with are company confidential information. I will try a couple of other pdfs and see if I get the same error.
From: Lukas Blecher @.>
Sent: Monday, September 18, 2023 3:21 PM
To: facebookresearch/nougat @.>
Cc: Casey Jake Smith @.>; Comment @.>
Subject: [EXTERNAL] Re: [facebookresearch/nougat] predict.py Unhandled Exception (Issue #96)
EXTERNAL EMAIL: Use caution before replying, clicking links, and opening attachments.
I can't reproduce it. And I think it is because of the PDF you tried to process. Can you confirm this? And if so, is it possible to share the PDF or at least check if it's a valid PDF?

Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ffacebookresearch%2Fnougat%2Fissues%2F96%23issuecomment-1724232274&data=05|01|casey.smith%40lilly.com|bc473510e6c14acf1e4008dbb87c5d4b|18a59a81eea84c30948ad8824cdc2580|0|0|638306616498739377|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=1Q%2BAuX0A9mIV1gnT%2ByLppaTtpCJrQcy%2F6MDbnSUEoDU%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAP7HCO2YGCSU75LKTCNKFHTX3CNI7ANCNFSM6AAAAAA45D76RE&data=05|01|casey.smith%40lilly.com|bc473510e6c14acf1e4008dbb87c5d4b|18a59a81eea84c30948ad8824cdc2580|0|0|638306616498739377|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=u14Nroxbgg5ZRbdv3xq09GXsy4pFp9znY5xO4amMJfo%3D&reserved=0.
You are receiving this because you commented.Message ID: @.***>

I tested this PDF file - little article in polish. With version 0.1.8 everything works
PDF_TEST.pdf

I can't reproduce it. And I think it is because of the PDF you tried to process. Can you confirm this? And if so, is it possible to share the PDF or at least check if it's a valid PDF?

@lukas-blecher I tried it on this:
2308.13418.pdf

Thanks, that wasn't it. I'm still not able to reproduce the issue.
Can somebody give me their pip freeze or conda list?

Tested now again with version 0.1.9 - same error (working with 0.1.8)
new python venv
pip freeze file: pipfreeze.txt

I see similar issue, if I install it from the pulled repo.

This time I get
Traceback (most recent call last):
File "/usr/local/bin/nougat", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/predict.py", line 148, in main
for i, (sample, is_last_page) in enumerate(tqdm(dataloader)):
File "/usr/local/lib/python3.10/dist-packages/tqdm/std.py", line 1178, in iter
for obj in iterable:
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 633, in next
data = self._next_data()
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataloader.py", line 677, in _next_data
data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/usr/local/lib/python3.10/dist-packages/torch/utils/data/dataset.py", line 302, in getitem
return self.datasets[dataset_idx][sample_idx]
File "/usr/local/lib/python3.10/dist-packages/nougat/utils/dataset.py", line 97, in getitem
return self.dataset[i], self.name if i == self.size - 1 else ""
File "/usr/local/lib/python3.10/dist-packages/nougat/utils/dataset.py", line 61, in getitem
img = Image.open(self.img_list[idx])
IndexError: list index out of range

Hey any mitigation strategy to resolve the above error? @Yashar78 @lukas-blecher

If you don't have poppler installed, then pdf2image.convert_from_bytes fails in rasterize_paper which manifests as the dataset loader trying to get the first image from an empty list.
To fix on macOS you can brew install poppler.

Thanks @hofstee, that was it.
I just replaced the pdf2image dependency with pypdfium2.
Could somebody install from source and tell me if it's working for them now?

It is stuck with this message for a pdf with 6 pages:
INFO:pypdfium2._helpers.document:Initializing PID 4415
INFO:pypdfium2._helpers.document:Initializing PID 4416
INFO:pypdfium2._helpers.document:Initializing PID 4417
INFO:pypdfium2._helpers.document:Initializing PID 4418
INFO:pypdfium2._helpers.document:Initializing PID 4419
INFO:pypdfium2._helpers.document:Initializing PID 4420
INFO:pypdfium2._helpers.document:Initializing PID 4421
INFO:pypdfium2._helpers.document:Initializing PID 4422
INFO:pypdfium2._helpers.document:Initializing PID 4423
INFO:pypdfium2._helpers.document:Initializing PID 4424
INFO:pypdfium2._helpers.document:Initializing PID 4425
INFO:pypdfium2._helpers.document:Initializing PID 4426
INFO:pypdfium2._helpers.document:Initializing PID 4427
INFO:pypdfium2._helpers.document:Initializing PID 4428
INFO:pypdfium2._helpers.document:Initializing PID 4429
INFO:pypdfium2._helpers.document:Initializing PID 4430
INFO:pypdfium2._helpers.document:Initializing PID 4431
INFO:pypdfium2._helpers.document:Initializing PID 4432
INFO:pypdfium2._helpers.document:Initializing PID 4433
INFO:pypdfium2._helpers.document:Initializing PID 4434
INFO:pypdfium2._helpers.document:Initializing PID 4435
INFO:pypdfium2._helpers.document:Initializing PID 4436
INFO:pypdfium2._helpers.document:Initializing PID 4437
INFO:pypdfium2._helpers.document:Initializing PID 4438
INFO:pypdfium2._helpers.document:Initializing PID 4439
INFO:pypdfium2._helpers.document:Initializing PID 4440
INFO:pypdfium2._helpers.document:Initializing PID 4441
INFO:pypdfium2._helpers.document:Initializing PID 4442
INFO:pypdfium2._helpers.document:Initializing PID 4443
INFO:pypdfium2._helpers.document:Initializing PID 4444
INFO:pypdfium2._helpers.document:Initializing PID 4445
INFO:pypdfium2._helpers.document:Initializing PID 4446
INFO:pypdfium2._helpers.document:Initializing PID 4447
INFO:pypdfium2._helpers.document:Initializing PID 4448
INFO:pypdfium2._helpers.document:Initializing PID 4449
INFO:pypdfium2._helpers.document:Initializing PID 4450
INFO:pypdfium2._helpers.document:Initializing PID 4451
INFO:pypdfium2._helpers.document:Initializing PID 4452
INFO:pypdfium2._helpers.document:Initializing PID 4453
INFO:pypdfium2._helpers.document:Initializing PID 4454
INFO:pypdfium2._helpers.document:Starting page 0
INFO:pypdfium2._helpers.document:Starting page 1
INFO:pypdfium2._helpers.document:Starting page 2
INFO:pypdfium2._helpers.document:Starting page 3
INFO:pypdfium2._helpers.document:Starting page 4
INFO:pypdfium2._helpers.document:Starting page 5

Ok nice, I removed the logging now.
Closing this issue now. Thanks everybody for the help!

Tnx for the fix, I switch to GPU for the speedup.

Re comment https://github.com/facebookresearch/nougat/issues/96#issuecomment-1727256459: This actually showed a bug in pypdfium2 – we should never spawn more processes than there are pages in the PDF. The commit above should fix this.


add react-cheatsheet.md

CHEAT SHEET FOR REACT
please add hacktoberfest tags

You have many pull requests with nearly no original content, close your all pull requests, combine the commits and add some useful and genuine content then send pull request.
Further spamming can lead you to disqualify.


Cannot test ACH in sandbox for tokenized check.

General information

SDK version: 3.48.0
Environment: Sandbox
Browser and OS: Mac OS High Sierra + Chrome 76

Issue description
Trying to tokenize Bank Login details, using the method shown here.
When submitting my payment form, I'm not seeing any popups or the like, so not sure why it's saying I closed the bank login.
An error is returned:
code: "US_BANK_ACCOUNT_LOGIN_CLOSED"
details: undefined
message: "Customer closed bank login flow before authorizing."
name: "BraintreeError"
type: "CUSTOMER"

Can you provide your full code for creating the bankLogin object? Including the example values being passed in.
That error should only trigger when the onExit callback is called in the Plaid SDK: https://github.com/braintree/braintree-web/blob/60300e5ff86654546a6a74d35ef6102ebfa497e1/src/us-bank-account/us-bank-account.js#L277
I thought that only occurred when a customer closes without proceeding, but it may also happen with invalid input.

Please see my JS code below. The achInstance is initialized beforehand, and this code is triggered when clicking the order button.
            clickAchBtn: function () {
                var self = this;
                var billingAddress = quote.billingAddress();

                var bankDetails = {
                    routingNumber: self.routingNumber(),
                    accountNumber: self.accountNumber(),
                    accountType: self.accountType(),
                    ownershipType: self.ownershipType(),
                    billingAddress: {
                        streetAddress: billingAddress.street[0],
                        extendedAddress: billingAddress.street[1],
                        locality: billingAddress.city,
                        region: billingAddress.regionCode,
                        postalCode: billingAddress.postcode,
                    }
                };

                if (bankDetails.ownershipType === 'personal') {
                    bankDetails.firstName = self.firstName();
                    bankDetails.lastName = self.lastName();
                } else {
                    bankDetails.businessName = self.businessName();
                }

                var mandateText = document.getElementById('braintree-ach-mandate').textContent;

                this.achInstance.tokenize({
                    bankDetails: bankDetails,
                    mandateText: mandateText
                }, function (tokenizeErr, tokenizedPayload) {
                    if (tokenizeErr) {
                        self.setErrorMsg($t('There was an error with the provided bank details. Please check and try again.'));
                        self.hasAuthorization(false);
                    } else {
                        self.handleAchSuccess(tokenizedPayload);
                    }
                });
            },

^ this could is using the bankDetails flow, not the bankLogin flow. There should be no reason you are getting the US_BANK_ACCOUNT_LOGIN_CLOSED error.

Do you have alternate code that is using the bankLogin flow? Can you provide a staging site/repo that reproduces the error?

Apologies, I have edited the code. It's practically the same ;)

This works just fine for me:
var bankLogin = {
  displayName: 'My JavaScript Integration App',
  ownershipType: 'personal',
  billingAddress: {
    firstName: 'First',
    lastName: 'Last',
    streetAddress: '222 W Merchandise Mart Plaza',
    extendedAddress: '',
    locality: 'Chicago',
    region: 'IL',
    postalCode: '60654'
  }
};

usBank.tokenize({
  bankLogin: bankLogin,
  mandateText: 'I authorize Braintree to charge my bank account on behalf of Test Merchant.'
}, function (tokenizeErr, tokenizedPayload) {
  // send tokenizedPayload.nonce to server
});

The most likely thing is that your account is not enabled for plaid. If you see something like vendors~LazyLink.js:50 Error: Invalid key: key cannot be missing. in your console, that's definitely it.
Reach out to our support team so we can inspect your account. Feel free to reference this issue. https://help.braintreepayments.com/


Remove constraint on numpy version from tox.ini

The motivation for this constraint was mostly removed in Qiskit main (https://github.com/Qiskit/qiskit/pull/11020) and might be addressed enough for the experiments tests at least. Maybe we want to wait and watch https://github.com/Qiskit/qiskit/pull/11232 before merging this, but I thought we could at least have it open as a reminder.


lib/api-test.html error

api-test.html:18 Uncaught ReferenceError: SonicServer is not defined

There is actually a pull request which can solve that problem, you can find it here : https://github.com/borismus/sonicnet.js/pull/18.
Did you manage to make it work ? I'm actually having some trouble to test it.

Did you manage to make other part of the library working ? I'm still strugling with it.


Can't install on ruby 2.2.3

Hi,
here's the message error I get after gem install :
Building native extensions.  This could take a while...
ERROR:  Error installing rubydeps:
    ERROR: Failed to build gem native extension.

    /Users/charly/.rvm/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20151030-7149-7urdpq.rb extconf.rb
checking for rb_iseq_location_t in vm_core.h... no
checking for vm_core.h... no
checking for rb_iseq_location_t in vm_core.h... no
checking for vm_core.h... no
Makefile creation failed
**************************************************************************
No source for ruby-2.2.3-p173 provided with debugger-ruby_core_source gem.
**************************************************************************
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/charly/.rvm/rubies/ruby-2.2.3/bin/$(RUBY_BASE_NAME)

extconf failed, exit code 1

ditto

Same problem with 2.3. :sad

Me too 😿

Same

Same w/2.1.9. Any takers? It's getting close to a year now. Perhaps another gem is in order?

ruby 2.3.1p112 running on Mint. Same problem. Not happy at all.

Error is:
"gcc -I/home/mk/.rbenv/versions/2.6.5/include/ruby-2.6.0/x86_64-linux -I/home/mk/.rbenv/versions/2.6.5/include/ruby-2.6.0/ruby/backward -I/home/mk/.rbenv/versions/2.6.5/include/ruby-2.6.0 -I. -I/home/mk/.rbenv/versions/2.6.5/include    -O3 -ggdb3 -Wall -Wextra -Wdeclaration-after-statement -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wrestrict -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable   -c conftest.c"
conftest.c:3:10: fatal error: vm_core.h: No such file or directory
    3 | #include <vm_core.h>
      |          ^~~~~~~~~~~
compilation terminated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <vm_core.h>
4:
5: /*top*/
6: typedef rb_iseq_location_t conftest_type;
7: int conftestval[sizeof(conftest_type)?1:-1];
/* end */

Looks like conftest relies on MRI header files that don't exist anymore in 2.2+.


Make LWM2M Zephy integration tests pass ✅

Recently @SeppoTakalo add some integration tests based on Leshan in Zephyr project : https://github.com/zephyrproject-rtos/zephyr/pull/64013
But there is some tests which can not pass because of Issues/limitations of leshan-server-demo.
This is issue aims to track work about make all tests green ✅.
Identified issues/limitations :

Description
Comment
Fix

✅
Root Path is not yet supported by Leshan.
Integrated in master now.
:heavy_check_mark: #1534

✅
Leshan don't allow writing attributes to resource instance
That' was a bug. It must be fixed in master.
:heavy_check_mark: b0ef0515bcb0742531c595356438792dc546d0fb

✅
Leshan only supports passive cancelling
Integrated in master now.
:heavy_check_mark: 2afadfcc35f8ab78d471eee8f95c6213607e8ad5

@SeppoTakalo, let me know if this is OK to you to test if Leshan modification help to pass tests. :pray:
For write attributes this should be OK in master now.
For root path, I will work on it.

Hi @sbernard31
Yes, I would very much like to try out there changes.
I have no knowledge of Java or how to build the .jar package from the demo servers, so I might need to study a bit, if I can easily test.
Or, if the changes are already in here https://ci.eclipse.org/leshan/job/leshanci/job/master/lastSuccessfulBuild/artifact/leshan-server-demo.jar then I can verify.

I have no knowledge of Java or how to build the .jar package from the demo servers, so I might need to study a bit, if I can easily test.
Or, if the changes are already in here https://ci.eclipse.org/leshan/job/leshanci/job/master/lastSuccessfulBuild/artifact/leshan-server-demo.jar then I can verify.

I understand, I will let you know where to get the jar file.
For now, writing attributes fix should already be available at : https://ci.eclipse.org/leshan/job/leshanci/job/master/lastSuccessfulBuild/artifact/leshan-server-demo.jar

I figured out how to build the JAR file. Docker rescued me from learning to install proper toolchains.
docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -v "$HOME/.m2":/root/.m2 -w /usr/src/mymaven maven:3-openjdk-17 mvn clean install

Now writing attributes to resource instance 3/0/7/0 seem to work:
❯ curl -i  -X PUT  "http://localhost:8080/api/clients/native_posix/3/0/7/0/attributes?pmin=1&pmax=20"
HTTP/1.1 200 OK
Date: Fri, 10 Nov 2023 11:35:18 GMT
Content-Type: application/json
Content-Length: 69
Server: Jetty(9.4.51.v20230217)

{"status":"CHANGED(204)","valid":true,"success":true,"failure":false}%

@SeppoTakalo, support of "/" in Read-Composite is now available in `master. :heavy_check_mark:
Next step "observe active cancel". Maybe I will work on it next week. :man_shrugging:

@SeppoTakalo  I just added an API for "observe active" cancel.
Some details about the API at : https://github.com/eclipse-leshan/leshan/issues/1538#issuecomment-1810478143
This should be available in master (and so in https://ci.eclipse.org/leshan/job/leshanci/job/master/lastSuccessfulBuild/artifact/leshan-server-demo.jar)
Let me know if you succeed to pass all Zephyr integrations test now :pray:

Great :tada: !
@SeppoTakalo Thx a lot for your help on this :pray: I really appreciate it !
Do no hesitate to contact me or Leshan project, if you face any interoperability  issues in the future.
(And do not forget to comment https://github.com/eclipse/wakaama/issues/617, if you have some thought to share about that)
I think we can close this issue now ✅ !

@sbernard31
One thing, probably minor, came to my mind. I hope this is not a wrong forum to ask it.
If we continue to use the Demo server for testing purposes, we tend to have a Dockerfile that usually contains the link where to fetch the .jar file. Like: https://ci.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-bsserver-demo.jar
However, the problem is that this link stays static, even when the content changes. Docker caches the result, so there is no clean way to update the .jar.
Is there any intention to branch, tag or release, so that we could point somewhere where our Dockerimage would be able to fetch a tagged release of that jar?

@SeppoTakalo
master branch
https://ci.eclipse.org/leshan/job/leshan/lastSuccessfulBuild/artifact/leshan-*-demo.jar is the result of our CI build for master branch.

However, the problem is that this link stays static, even when the content changes. Docker caches the result, so there is no clean way to update the .jar.

I don't know how it works but if you want to download master version maybe you can use wget with option:

-N --timestamping: Turn on time-stamping. See section Time-Stamping for details.

milestone release
We do some milestone releases. Artifacts are deployed on maven central : https://central.sonatype.com/namespace/org.eclipse.leshan
Example for release 2.0.0-M13 of leshan-server-demo : https://maven.org/maven2/org/eclipse/leshan/leshan-server-demo/2.0.0-M13/leshan-server-demo-2.0.0-M13-jar-with-dependencies.jar
stable release
Currently there is no stable release for Leshan 2.x. Only for Leshan 1.x which support only LWM2M v1.0.x.

Ah, the Maven central seems to be what I was looking for.
Once those features in current master (root path, active cancelling) are in some of the milestone release, I can change the Dockerfile to point into that.
Thanks.

OK 2.0.0-M14 should be released soon with all feature we talked about here : #1531


Update overview-of-always-on-availability-groups-sql-server.md

I'm assuming that "avt1" is actually "primary replica"?
This is since I haven't seen another mention of "avt1" in the documentation so far.

@shaneis : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Hi @shaneis, thank  you so much for your contribution! Yes, you are right, it should be primary replica :) #sign-off


Installation failed: RanobeLib

Source information
RanobeLib
Steps to reproduce

Browse
Available
"Русский"
Try install "RanobeLib"

Expected behavior
RanobeLib should be installed
Actual behavior
Give an error message
LNReader version
2.0.0
Android version
Android 11
Other details

Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
[X] I have written a short but informative title.
[X] I have updated the app to version 1.1.19.
[X] I have updated all installed extensions.
[X] If this is an issue with the app itself, I should be opening an issue in the app repository.
[X] I will fill out all of the requested information in this form.

Ranobelib is not ready for current beta. You should use this dev build.
Remember to backup your data with Google Drive