Better __repr__ for project models

Update dipdup.models.Model class to get better representation in crash reports. Now it's just <Model>.
Bonus points: do the same for other classes commonly discovered in crash reports.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged

Hey! I'm Gerson. 👋
Member of Dojo Coding. I have contributed before to other Python projects like:

Giza agents
Issues in Python

Can I work on this issue?
Check my OnlyDust profile, I've contributed to many projects: Profile

How I plan on tackling this issue
Plan to Solve the Issue:

Read the issue to fully understand what needs to be done.
Understand the task and gather all necessary details from the issue.
Explore the codebase to familiarize myself with the existing code.
If anything is unclear, I will ask questions ASAP in the Telegram project chat to move forward efficiently.
I'll open a PR once the work is done and wait for feedback.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I'm a software developer with 2+ years of experience and I have worked with backend technologies such as Cairo, Java, C# and frontend with React, NextJS, JS/TS. Also, I'm a member of the Dojo Coding community here in CR and I have made contributions in Cairo VM Go, Cairo VM TS, Cairo Lints etc.
How I plan on tackling this issue
1- I’ll first check the dipdup/models.py file to see how repr is currently handled for the Model class.
2- I’ll then update it to include key attributes (e.g., id) for better crash report clarity.
3- I’ll identify other frequently appearing classes in logs and apply the same update to improve their representations.
4- Finally, I’ll test the changes by simulating errors to confirm that the updated repr outputs useful info in reports.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hey! I'm Juan Diego Carballo. 👋
I'm a Software Engineer from Heredia, Costa Rica, and a member of the Dojo Coding community. I have experience in Python, Rust, Cairo, and other programming languages. I have contributed to open-source Web3 projects such as:
Starknet Quest
Dojo
Op-Scan
At MAFISA, I led the development and deployment of an HR web application using FlutterFlow, enhancing real-time data interaction and user experience. My work involved implementing Firebase for secure data handling and user authentication, which improved system reliability by 15% and reduced server response times by 23%.
I have a solid background in improving code quality, debugging capabilities, and enhancing developer experience. Given my experience with Python and backend technologies, I'm confident that I can help improve the repr methods in the dipdup.models.Model class and other related classes to provide more informative crash reports.
How I plan on tackling this issue
Plan to Solve the Issue:
Understand the Task:
Read the issue thoroughly to fully understand the requirements.
Identify the Model class in dipdup.models and examine how the repr method is currently implemented.
Determine other classes commonly found in crash reports that could benefit from improved repr methods.
Explore the Codebase:
Dive into the dipdup codebase to familiarize myself with the existing structure.
Review how models and other relevant classes are defined and used throughout the project.
Implement Enhanced repr Methods:
Update the repr method in the Model class to include key attributes like id, name, or other significant fields for better readability in crash reports.
Apply similar enhancements to other frequently used classes discovered in crash reports.
Testing:
Simulate crash scenarios to generate reports and verify that the new repr methods provide clearer and more helpful information.
Ensure that the updated methods do not introduce any side effects or degrade performance.
Consultation:
If anything is unclear, I'll reach out to the project maintainers or ask questions in the community channels to move forward efficiently.
Documentation:
Update any relevant documentation or comments to reflect the changes made to the repr methods.
Submission:
Once the work is completed and tested, I'll open a pull request and await your feedback.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
With my expertise in Python, Web3, and machine learning, coupled with my dedication to code optimization, I have the skills to make a meaningful impact on this project. I’m confident I can deliver high-quality, well-tested code that improves the debugging experience for everyone.
How I plan on tackling this issue
Understand the Task: I’ll begin by reviewing the current implementation of the repr method in the Model class in dipdup/models.py to understand what needs improvement in crash reports.
Explore the Codebase: I’ll investigate how the current repr functions and identify other classes that frequently appear in crash reports.
Implementation: I’ll enhance the repr method to include key fields like id and name, making error logs clearer. I’ll apply similar updates to other key classes.
Testing: Finally, I’ll test the updated methods by simulating crashes to ensure the new outputs provide actionable information for developers.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I am a developer with expertise in python and web3 technologies. I have ample experience in building django apps which you will see if you go through my github profile.
How I plan on tackling this issue
I will Identify all the models throughout the project.
I will give a fitting  __repr__ method return data based on the fields of the models.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
In my day to day I am a full stack engineer with experience in Django, FastApi and plain python, also I have plenty of contributions to web3 projects where that experience can help me deliver a quality solution
How I plan on tackling this issue

Seek and read the current crash reports
See current implementation of dunder method repr in dipdup.models.Model
Modify dunder method to get a more complete representation of the model, I can modify the str as well to get a similar representation when printing the model in code
Apply the same solution to other similar models found in the crash report

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I am a python dev. A new-comer here, willing and ready to contribute to solve this issue.

@droserasprout Are there crash reports you can share with me to have more context?

@fabrobles92 Add raise Exception somewhere in the handler (like src/demo_starknet_events/handlers/on_transfer.py) and run the indexer. After the crash there will be "Report saved; run dipdup report show<PHONE_NUMBER> to view it" message in the output.


system.dataset.leftJoin

Allows the user to left join two datasets. It could also be implemented as a vlookup.
leftJoin("dataset", "dataset2", "columnIndex", "columnIndex2")

leftJoin.desc=Performs a left join on two datasets, returning a new dataset.
leftJoin.param.dataset=The first dataset. Must not be null.
leftJoin.param.dataset2=The second dataset. Must not be null.
leftJoin.param.columnIndex=Column index in the first dataset to join on.
leftJoin.param.columnIndex2=Column index in the second dataset to join on.
leftJoin.returns=A new dataset joined on the specified columns of dataset1 and dataset2.

#51
#27
Function descriptions and a test case are included. Feel free to change how you want.

Once again, I don't know how to use Github fully, so not sure why it is showing all commits.

The only thing left should be variable name cleanup. I figure you had some naming convention, so I'll let you handle that.

Interesting. So this is acting as a horizontal concatenation when the provided column indices line up...

To me, ideally, this function would work the same as SQL's left, right, outer, and inner join. You would be able to add the logic of join on > ,<, =, or like. This seemed like a little more work than I had time for, so I figured I could do something similar to DataFrame.merge from the pandas' library. They have many nice options that I have not added yet.
I believe the best approach if you wanted to include or exclude other columns, would be a different function. Although it is not the fastest as you are processing the data twice I think it would make it the cleanest. Something like this maybe? (Code has not been tested)
    @Suppress("unused")
    @ScriptFunction(docBundlePrefix = "DatasetExtensions")
    @KeywordArgs(
        names = ["dataset", "columnsToSplit"],
        types = [Dataset::class, Array<Array<Int>>::class],
    )
    fun splitter(args: Array<PyObject>, keywords: Array<String>): Array<Dataset?> {
        val parsedArgs = PyArgParser.parseArgs(
            args,
            keywords,
            arrayOf("dataset", "columnsToSplit"),
            arrayOf(Dataset::class.java, PyObject::class.java),
            "splitter",
        )
        val dataset = parsedArgs.requirePyObject("dataset").toJava<Dataset>()
        val columnsToSplit = parsedArgs.requirePyObject("columnsToSplit").toJava<Array<Array<Int>>>()
        val datasetSplit = Array<Dataset?>(columnsToSplit.size) { null }

        var currentDataset = 0
        for (newDataSets in columnsToSplit) {
            val columnNames = StringBuilder(newDataSets.size)
            val columnTypes = mutableListOf<Class<*>>()

            newDataSets.forEachIndexed { index, column ->
                columnNames.append(dataset.columnNames[column])
                columnTypes.add(dataset.columnTypes[column])
                if (index != newDataSets.lastIndex) {
                    columnNames.append(", ")
                }
            }

            val builder = DatasetBuilder.newBuilder()
                .colNames(columnNames.toString())
                .colTypes(columnTypes)

            for (row in dataset.rowIndices) {
                val listToAppend = newDataSets.map { dataset[row, it] }.toTypedArray()
                builder.addRow(*listToAppend)
            }

            datasetSplit[currentDataset] = builder.build()
            currentDataset++
        }

        return datasetSplit
    }

Added splitter. I also added left, right, inner, and outer. Most likely, this should be condensed to one function where the user chooses a type like in pandas' library. I am also thinking of adding vlookup and hlookup options to this. It would auto-use the trim function, which would be slower than having it built into the functions but would allow for more flexibility.

I have a clean git history available here:
https://github.com/paul-griffith/ignition-extensions/tree/leftjoin-test
But I can't force-push to this PR/your repository to clean up git on this PR. If you check out that branch, you should be able to create a new PR with clean git history.


[0.57] _this._registerEvents is not a function on a clean project

[x] Review the documentation: https://facebook.github.io/react-native
[x] Search for existing issues: https://github.com/facebook/react-native/issues
[x] Use the latest React Native release: https://github.com/facebook/react-native/releases

Environment
$ react-native info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
      Memory: 520.12 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10L232m - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0
      react-native: 0.57.0 => 0.57.0
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

Description
Bumped an existing 0.56.1 project to 0.57 and encountered an error on simulator start: _this._registerEvents is not a function on a clean project. Tried a new project from scratch and got the same error. Running Xcode 10 Beta.
Same error was mentioned in the following ticket: #20712

_this._registerEvents is not a function. (In '_this._registerEvents()', '_this._registerEvents' is undefined)

WebSocket
    index.bundle?platform=ios&dev=true&minify=false:24147:28
connectToDevTools
    index.bundle?platform=ios&dev=true&minify=false:26078:62
<unknown>
    index.bundle?platform=ios&dev=true&minify=false:25863:38
loadModuleImplementation
    index.bundle?platform=ios&dev=true&minify=false:262:14
<unknown>
    index.bundle?platform=ios&dev=true&minify=false:19771:20
loadModuleImplementation
    index.bundle?platform=ios&dev=true&minify=false:262:14
guardedLoadModule
    index.bundle?platform=ios&dev=true&minify=false:150:47
global code
    index.bundle?platform=ios&dev=true&minify=false:81797:4
****

Reproducible Demo
xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
react-native init AwesomeProject
cd AwesomeProject
node_modules/.bin/react-native run-ios

EDIT: Tried another new project and it worked this time. I guess it must be related to caching issues.
Will reopen if I can reliably reproduce.

I got this issue on a clean new project as well

#20567 by kelset

add the metro-react-native-babel-preset package
change .babelrc to
{
"presets": ["module:metro-react-native-babel-preset"]
}
npm run start --reset-cache
or
react-native start -reset-cache

react-native start --reset-cache worked for me on @hbicexp solution

Same error..

We updated to React Native 0.57.4 and @babel/core 7.1.2 and our problem went away.

Updating to React Native 0.57.4 and @babel/core 7.1.2 did not solve it for me.

Clean install doing nothing but react-native init RNTestProject produces this same error for me still.

still a problem

having the same issue after changing to apollo client 2.0

same error

Any solution for this issue? Nothing work for me :/

Did anyone found a solution for this? I am facing the issue for a while now! Cant make new projects cause they show the same error.. :/

@ShooterArk  my react-native version is "0.58.4". The following steps fix my issue:

Delete the app, and use the clean the builder folder on Xcode.
Close Metro Bundler and use the Xcode to rebuild the app,
If still not working, try to run react-native start -reset-cache or yarn start -reset-cache -> yarn start then reload the app on client side.

Hope this can fix your issue

@HuanDay I need to execute it on Android emulator!! I have already tried multiple times: react-native start -- --reset-cache.

my react-native version is "0.59.4" and have same issue

Try commenting out setupDevtools in setUpDeveloperTools. I still haven't found the underlying issue, but since all I want to upgrade my old project, I will postpone the investigation.

Why is this closed when the referred post has no solution apart saying to piss off and create a new project? I spent entire weekend trying to upgrade some libraries and its been a nightmare.. What a waste of time..
Now finally my project builds up and starts, but upon starting I have this issue as well.. I probably going to give up and just use ancient configs.. At least it works rather than stay up to date and have a pile of errors

After following @hbicexp 's instructions I had to restart my system to get it working(was still getting errors otherwise)

I had the same problem. I did the following and now it works fine:

watchman watch-del-all
rm -rf node_modules/.cache
react-native start --reset-cache
To be absolutely sure:
a. Uninstall the app from emulator/device.
b. Restart the system

Never mind. The problem was fixed but after about 30 mins it's back and this time the above solution is not working.

Facing the same issue. Tried all the methods mentioned above. This is the output of my react-native info

  React Native Environment Info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
      CPU: (4) x64 Intel(R) Core(TM) i3-3217U CPU @ 1.80GHz
      Memory: 330.08 MB / 7.69 GB
      Shell: 4.4.19 - /bin/bash
    Binaries:
      Node: 8.3.0 - ~/.nvm/versions/node/v8.3.0/bin/node
      npm: 5.3.0 - ~/.nvm/versions/node/v8.3.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      Android SDK:
        API Levels: 23, 25, 26, 27, 28
        Build Tools: 23.0.1, 24.0.1, 26.0.3, 27.0.3, 28.0.2, 28.0.3
        System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64
    npmPackages:
      react: ^16.8.3 => 16.8.6
      react-native: ^0.59.10 => 0.59.10

Anybody got any solution yet !!

I'm also facing this issue on version 0.60.5
Error screenshot
react-native info:
System:
    OS: Windows 10
    CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
    Memory: 1.10 GB / 7.88 GB
  Binaries:
    Node: 12.9.0 - C:\Users\GUSTAV~1.MAX\AppData\Local\Temp\yarn--1567529680393-0.3427366134530774\node.CMD
    Yarn: 1.17.3 - C:\Users\GUSTAV~1.MAX\AppData\Local\Temp\yarn--1567529680393-0.3427366134530774\yarn.CMD
    npm: 6.10.2 - C:\Program Files\nodejs\npm.CMD
  IDEs:
    Android Studio: Version  <IP_ADDRESS> AI-191.8<IP_ADDRESS>91312

package.json
{
  "name": "HomeDoctor",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-community/async-storage": "^1.6.1",
    "axios": "^0.19.0",
    "babel-plugin-root-import": "^6.4.1",
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-dotenv": "^0.2.0",
    "react-native-gesture-handler": "^1.4.1",
    "react-native-linear-gradient": "^2.5.6",
    "react-native-vector-icons": "^6.6.0",
    "react-native-xml2js": "^1.0.3",
    "react-navigation": "^3.12.1",
    "react-redux": "^7.1.1",
    "reactotron-react-native": "^3.6.5",
    "reactotron-redux": "^3.1.1",
    "reactotron-redux-saga": "^4.2.2",
    "redux": "^4.0.4",
    "redux-saga": "^1.0.5"
  },
  "devDependencies": {
    "@babel/core": "^7.5.5",
    "@babel/runtime": "^7.5.5",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "babel-preset-react-native": "5.0.2",
    "eslint": "^6.2.2",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

babel.config.js
module.exports = {
  presets: [
    'module:metro-react-native-babel-preset',
    'module:react-native-dotenv',
    'react-native',
  ],
};

I tried:
https://github.com/facebook/react-native/issues/21094#issuecomment-422245589
https://github.com/facebook/react-native/issues/21094#issuecomment-435597536
https://github.com/facebook/react-native/issues/21094#issuecomment-504986169
None worked.


Pandas compat

Addressing some of #7100 and #7710

Woohoo! The upstream tests are passing and it looks like the failing test is just a flaky one. Good with you if I merge @jrbourbeau?

Thanks for the review @jrbourbeau! Good to merge?


.2.1 Excessive log() calls

Hopefully just a debug thing but printing that much stuff to the log can make using the log hard
not to mention and a few hours of playing the logfile size will be huge.
take a look at game.write_file()  for writing to a log file for your mod.

that was because a i forgot to change logging variable, ill add logic to release script for that, as a workaround you can change value from .libraries/lyconstants.lua  (line 28)

https://github.com/arlyoneel/factorio-lydevgui/commit/e730ec90cdedb5e7b3dd709e010b4910c752da96
added to create-release.sh script, it will never happen again.


TiKV OOM when do sysbench

Bug Report
[Mon Nov 18 15:25:05 2019] sched-worker-po invoked oom-killer: gfp_mask=0xd0, order=0, oom_score_adj=873
[Mon Nov 18 15:25:05 2019] sched-worker-po cpuset=bf5f3b61003755954b57e76cf486dc597ea12e4cb0846f7896059605be9770cf mems_allowed=0-1
[Mon Nov 18 15:25:05 2019] CPU: 13 PID: 18535 Comm: sched-worker-po Kdump: loaded Tainted: G           OE K------------ T 3.10.0-957.el7.x86_64 #1
[Mon Nov 18 15:25:05 2019] Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.8.0 005/17/2018
[Mon Nov 18 15:25:05 2019] Call Trace:
[Mon Nov 18 15:25:05 2019]  [<ffffffff89f61dc1>] dump_stack+0x19/0x1b
[Mon Nov 18 15:25:05 2019]  [<ffffffff89f5c7ea>] dump_header+0x90/0x229
[Mon Nov 18 15:25:05 2019]  [<ffffffff899b9dc6>] ? find_lock_task_mm+0x56/0xc0
[Mon Nov 18 15:25:05 2019]  [<ffffffff89a31118>] ? try_get_mem_cgroup_from_mm+0x28/0x60
[Mon Nov 18 15:25:05 2019]  [<ffffffff899ba274>] oom_kill_process+0x254/0x3d0
[Mon Nov 18 15:25:05 2019]  [<ffffffff89a34f16>] mem_cgroup_oom_synchronize+0x546/0x570
[Mon Nov 18 15:25:05 2019]  [<ffffffff89a34390>] ? mem_cgroup_charge_common+0xc0/0xc0
[Mon Nov 18 15:25:05 2019]  [<ffffffff899bab04>] pagefault_out_of_memory+0x14/0x90
[Mon Nov 18 15:25:05 2019]  [<ffffffff89f5acf2>] mm_fault_error+0x6a/0x157
[Mon Nov 18 15:25:05 2019]  [<ffffffff89f6f7a8>] __do_page_fault+0x3c8/0x500
[Mon Nov 18 15:25:05 2019]  [<ffffffff89f6f915>] do_page_fault+0x35/0x90
[Mon Nov 18 15:25:05 2019]  [<ffffffff89f6b758>] page_fault+0x28/0x30
[Mon Nov 18 15:25:05 2019] Task in /kubepods/burstable/podb2654c0c-05db-11ea-bb3c-4cd98f4bb97e/bf5f3b61003755954b57e76cf486dc597ea12e4cb0846f7896059605be9770cf killed as a result of limit of /kubepods/burstable/podb2654c0c-05db-11ea-bb3c-
4cd98f4bb97e
[Mon Nov 18 15:25:05 2019] memory: usage 33554432kB, limit 33554432kB, failcnt 8631112
[Mon Nov 18 15:25:05 2019] memory+swap: usage 33554432kB, limit<PHONE_NUMBER>740988kB, failcnt 0
[Mon Nov 18 15:25:05 2019] kmem: usage 0kB, limit<PHONE_NUMBER>740988kB, failcnt 0
[Mon Nov 18 15:25:05 2019] Memory cgroup stats for /kubepods/burstable/podb2654c0c-05db-11ea-bb3c-4cd98f4bb97e: cache:0KB rss:0KB rss_huge:0KB mapped_file:0KB swap:0KB inactive_anon:0KB active_anon:0KB inactive_file:0KB active_file:0KB un
evictable:0KB
[Mon Nov 18 15:25:05 2019] Memory cgroup stats for /kubepods/burstable/podb2654c0c-05db-11ea-bb3c-4cd98f4bb97e/abf24bd414a801a4d8665bf3e35308a25641454b29c2559bcae1d2cd50669488: cache:0KB rss:44KB rss_huge:0KB mapped_file:0KB swap:0KB inac
tive_anon:0KB active_anon:44KB inactive_file:0KB active_file:0KB unevictable:0KB
[Mon Nov 18 15:25:05 2019] Memory cgroup stats for /kubepods/burstable/podb2654c0c-05db-11ea-bb3c-4cd98f4bb97e/bf5f3b61003755954b57e76cf486dc597ea12e4cb0846f7896059605be9770cf: cache:312KB rss:33554076KB rss_huge:167936KB mapped_file:0KB
swap:0KB inactive_anon:0KB active_anon:33554020KB inactive_file:4KB active_file:36KB unevictable:0KB
[Mon Nov 18 15:25:05 2019] [ pid ]   uid  tgid total_vm      rss nr_ptes swapents oom_score_adj name
[Mon Nov 18 15:25:05 2019] [16824]     0 16824      253        1       4        0          -998 pause
[Mon Nov 18 15:25:05 2019] [17291]     0 17291 10533008  8390596   19151        0           873 tikv-server
[Mon Nov 18 15:25:05 2019] Memory cgroup out of memory: Kill process 44800 (cop-low5) score 1875 or sacrifice child
[Mon Nov 18 15:25:05 2019] Killed process 17291 (tikv-server) total-vm:42132032kB, anon-rss:33548040kB, file-rss:14344kB, shmem-rss:0kB

What version of TiKV are you using?

TiKV
Release Version:   4.0.0-alpha
Git Commit Hash:   fc6f6525e7b1dda79ed9028f737e385f49969286
Git Commit Branch: master
UTC Build Time:    2019-11-18 03:37:13
Rust Version:      rustc 1.39.0-nightly (c6e9c76c5 2019-09-04)
What operating system and CPU are you using?

Kubernetes with 32G memory and 12 cores CPU
Steps to reproduce

download tidb-bench
cd into sysbench
./run point_select prepare 128

What did you expect?
run sucessfully
What did happened?
TiKV OOMed

did this reproduce after setting block-cache?

It is solved by setting block-cache, thanks.


config: stop autocc for ticdc

It will cause some people to become review requested hotspots, so we prefer to use random assignment. I will submit an issue to track this requirement. So for now we will do manual randomization.

/ok-to-test

/merge


Problem with using model checkpoint and PytorchStreamReader failed reading zip archive: failed finding central directory

Hi, I encountered the following error message when running SAM. I'm not quite sure if it is because I put the model checkpoint sam_vit_h_4b8939.pth into the segment-anything folder. Hope to hear some suggestion from you. Thanks!

/sahandlab/Software/segment-anything/segment_anything/build_sam.py:105: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
state_dict = torch.load(f)
RuntimeError                              Traceback (most recent call last)
Cell In[9], line 5
3 DEVICE = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
4 MODEL_TYPE = "vit_h"
----> 5 sam = sam_model_registryMODEL_TYPE.to(device=DEVICE)
6 mask_generator = SamAutomaticMaskGenerator(sam)
7 predictor = SamPredictor(sam)
File /sahandlab/Software/segment-anything/segment_anything/build_sam.py:15, in build_sam_vit_h(checkpoint)
14 def build_sam_vit_h(checkpoint=None):
---> 15     return _build_sam(
16         encoder_embed_dim=1280,
17         encoder_depth=32,
18         encoder_num_heads=16,
19         encoder_global_attn_indexes=[7, 15, 23, 31],
20         checkpoint=checkpoint,
21     )
File /sahandlab/Software/segment-anything/segment_anything/build_sam.py:105, in _build_sam(encoder_embed_dim, encoder_depth, encoder_num_heads, encoder_global_attn_indexes, checkpoint)
103 if checkpoint is not None:
104     with open(checkpoint, "rb") as f:
--> 105         state_dict = torch.load(f)
106     sam.load_state_dict(state_dict)
107 return sam
File ~/.conda/envs/mothermachine/lib/python3.10/site-packages/torch/serialization.py:1072, in load(f, map_location, pickle_module, weights_only, mmap, **pickle_load_args)
1070 orig_position = opened_file.tell()
1071 overall_storage = None
-> 1072 with _open_zipfile_reader(opened_file) as opened_zipfile:
1073     if _is_torchscript_zip(opened_zipfile):
1074         warnings.warn("'torch.load' received a zip file that looks like a TorchScript archive"
1075                       " dispatching to 'torch.jit.load' (call 'torch.jit.load' directly to"
1076                       " silence this warning)", UserWarning)
File ~/.conda/envs/mothermachine/lib/python3.10/site-packages/torch/serialization.py:480, in _open_zipfile_reader.init(self, name_or_buffer)
479 def init(self, name_or_buffer) -> None:
--> 480     super().init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

another follow-up question is should I install segment-anything whole folder and the model checkpoint into my conda vertical environment? Or is it better to put them into the same folder as the python code that need to import the sam model?


No user data

When subscribing to users collection i receive no data for users.
I'm using FetchedResultsTableViewController class from the example.
Configuring subscription loader with:
override func configureSubscriptionLoader(subscriptionLoader: SubscriptionLoader) {
    subscriptionLoader.addSubscriptionWithName("users")
}

On the server side i publish users data with:
Meteor.publish("users", function(){
  return Meteor.users.find({}, {fields: {emails: 1, profile: 1}});
});

But when i log data received on client i get:
<Circuit.User: 0x7f9216050650> (entity: User; id: 0x7f9213c21750 <x-coredata://21A947C1-FE9A-4828-A450-031F2E7249F0-80740-00009D910A641498/User/pjk5LMRygJSwCuBKzn> ; data: {
    createdAt = nil;
    emailAddresses = nil;
    items = nil;
    name = nil;
    profile = nil;
    services = nil;
})
<Circuit.User: 0x7f92160482d0> (entity: User; id: 0x7f9213c88f50 <x-coredata://21A947C1-FE9A-4828-A450-031F2E7249F0-80740-00009D910A641498/User/pP3dxmjoXD5mTedfXa> ; data: {
    createdAt = nil;
    emailAddresses = nil;
    items = nil;
    name = nil;
    profile = nil;
    services = nil;
})

This is my user class:
import CoreData

class User: NSManagedObject {
    typealias NamedValues = [String:AnyObject]

    @NSManaged var createdAt: NSDate?
    @NSManaged var name: String?
    @NSManaged var items: NSSet!

    @NSManaged var emailAddresses: [NamedValues]?
    var emailAddress: String? {
        return emailAddresses?.first?["address"] as? String
    }

    @NSManaged var profile: NamedValues?
    @NSManaged var services: NamedValues?
}

I get similar results with currentUser function from FetchedResultsTableViewController
Thanks

Ok. I figured it out, it was a dumb mistake on my part, I was publishing emails but had emailAddresses field on core data model.
Before closing this issue I'd like to ask if there's a way of sending parameters during user creation, for instance i would like to create an empty array of items on user creation etc.

Good to hear you figured out what the problem was.
As for your question, I think Accounts.onCreateUser may be what you are looking for.

Yeah it is. Thanks.


comment save notebook in mmm example

This saving cell is problematic in the CI. We can done this in the past but the change was undone XD

📚 Documentation preview 📚: https://pymc-marketing--1053.org.readthedocs.build/en/1053/

Maybe there is a magic cell or tag that can be used. I will check the papermill docs


Add number round

Type

[ ] Refactor
[x] Feature
[ ] Bug Fix
[ ] Optimization
[ ] Documentation Update

Description
Adds Number.round method to which you can pass a precision.
* assert.deepStrictEqual(round(5,1234, 2), 5.12)
Related

Related Issue #
Closes #

I'm trying to remove lodash from my project in favor of native node features and effect features and this one was missing.
As the implementation was already in the repository, I thought it could be a good idea to export it.


Add length check to unpackDatagram

Fixes #87

Codecov Report

Merging #90 into master will decrease coverage by 0.11%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #90      +/-   ##
==========================================
- Coverage   70.73%   70.62%   -0.12%
==========================================
  Files          51       51
  Lines        2922     2924       +2
==========================================
- Hits         2067     2065       -2
- Misses        611      613       +2
- Partials      244      246       +2

Impacted Files
Coverage Δ

record_layer.go
68.42% <100%> (+1.75%)
:arrow_up:

...pher_suite_tls_ecdhe_ecdsa_with_aes_256_cbc_sha.go
78.94% <0%> (-5.27%)
:arrow_down:

internal/udp/conn.go
75.45% <0%> (-1.82%)
:arrow_down:

client_handlers.go
80.96% <0%> (-0.65%)
:arrow_down:

conn.go
78.17% <0%> (+0.65%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa63c5c...d1993e1. Read the comment docs.

This is the failing test
--- FAIL: TestUDPDecode (0.00s)
panic: runtime error: slice bounds out of range [recovered]
        panic: runtime error: slice bounds out of range

goroutine 34 [running]:
testing.tRunner.func1(0xc000218100)
        /usr/local/Cellar/go/1.12.6/libexec/src/testing/testing.go:830 +0x392
panic(0x1221c20, 0x141afe0)
        /usr/local/Cellar/go/1.12.6/libexec/src/runtime/panic.go:522 +0x1b5
github.com/pion/dtls.unpackDatagram(0xc0001e60e0, 0xe, 0xe, 0x1440f80, 0x1, 0x0, 0x12a9600, 0xc0001e80c0)
        /Users/seaduboi/go/src/github.com/pion/dtls/record_layer.go:84 +0x225
github.com/pion/dtls.TestUDPDecode(0xc000218100)
        /Users/seaduboi/go/src/github.com/pion/dtls/record_layer_test.go:44 +0x3b5
testing.tRunner(0xc000218100, 0x1271378)
        /usr/local/Cellar/go/1.12.6/libexec/src/testing/testing.go:865 +0xc0
created by testing.(*T).Run
        /usr/local/Cellar/go/1.12.6/libexec/src/testing/testing.go:916 +0x35a
exit status 2
FAIL    github.com/pion/dtls    5.070s


Social Media Handles

Update the social media href="" links

Hello sir, I want to work on this issue.

@sayantan1410 sure, you can work on any of the issues.


Migrate to Docker Compose V2

Also, migrate to the versionless Compose file format.

Motivation and context

Compose V1 is EOL: https://www.docker.com/blog/announcing-compose-v2-general-availability/.
How has this been tested?

I ran the Python tests with --stop-services, --rebuild and with no options to make sure that building, running and stopping the services still works.
I ran docker compose -f <...> config for all Compose files to make sure that the syntax is still considered valid by Compose V2.
I ran the Linux installation commands from the Installation Guide in a clean container.

Note that I did not test the Windows or macOS Installation Guide, but Docker Desktop now comes with Compose V2, so no special install steps should be needed.
Checklist

[x] I submit my changes into the develop branch
[x] I have added a description of my changes into CHANGELOG file
[x] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.

I added the file format change to the changelog. The rest I don't think is changelog-worthy, because it's just documentation and CI scripts. It's still possible to use Compose V1 with our Compose files, so it's not a breaking change.

@azhavoro , could you please look?

LGTM


update request_cookies directly using cookie_dicts

new_cookies seems to be redundant

Coverage decreased (-0.09%) to 75.901% when pulling 01dcc8450462631eedf4e8c41263355d93d70b72 on Xuefeng-Zhu:patch-4 into 736f7725ad46b1e794c5a66b9b0481691afde376 on Miserlou:master.


Add the UCI Adult dataset

This pull request will add the 'Adult' dataset form the UCI machine learning repository to the package. In more detail, it includes the following:

Implemented loader functions with associated documentation in src/data/tabular.jl.
Exported the functions in Data.jl
Updated the tabular.qmd notebook in the artifacts
Updated the students_documentation/summary.qmd file to reflect the additions
Added the dataset to the release artifacts
Added testing for the dataset

Closes #169

your PR is to main

Codecov Report

Merging #235 (07a99ab) into development (5644b2e) will decrease coverage by 0.20%.
The diff coverage is 89.47%.

:exclamation: Current head 07a99ab differs from pull request most recent head 459aa3d. Consider uploading reports for the commit 459aa3d to get more accurate results

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@               Coverage Diff               @@
##           development     #235      +/-   ##
===============================================
- Coverage        77.02%   76.83%   -0.20%
===============================================
  Files               37       37
  Lines             1306     1325      +19
===============================================
+ Hits              1006     1018      +12
- Misses             300      307       +7

Impacted Files
Coverage Δ

src/data/Data.jl
5.26% <ø> (ø)

src/data/tabular.jl
97.43% <89.47%> (-2.57%)
:arrow_down:

... and 4 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Syntax highlight fix

This was supposed to committed to my own fork I apologize for the mixup in targeted repos.


fluxcd: 0.29.5 -> 0.30.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for fluxcd is: "Open and extensible continuous delivery solution for Kubernetes"
meta.homepage for fluxcd is: "https://fluxcd.io"
meta.changelog for fluxcd is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.30.0 with grep in /nix/store/z14q51sk3gygjpb7g5x033chnzyz980a-fluxcd-0.30.0
found 0.30.0 in filename of file in /nix/store/z14q51sk3gygjpb7g5x033chnzyz980a-fluxcd-0.30.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
fluxcd

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/z14q51sk3gygjpb7g5x033chnzyz980a-fluxcd-0.30.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A fluxcd https://github.com/r-ryantm/nixpkgs/archive/cf7f21f183fc7fda68bed910abaa2064820f4730.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/z14q51sk3gygjpb7g5x033chnzyz980a-fluxcd-0.30.0
ls -la /nix/store/z14q51sk3gygjpb7g5x033chnzyz980a-fluxcd-0.30.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

fluxcd

Maintainer pings
cc @jlesquembre @bryanasdev000 @kalbasit for testing.

Closed in favor of #171504


Move parent company question in Operator Information table

Describe the task
In the My Operator (Operator Information) table, the Question with radio buttons asking parent company information "Does the operator have a parent company" needs to be moved to the bottom of the Operator Information section.
See wireframe: https://www.figma.com/file/LsDmLDCdnJqI8UahyqvOD8/OBPS-App-Designs?type=design&node-id=2401%3A331&mode=design&t=brhPkfT4W4RpuEjA-1
Acceptance Criteria

[ ] first
[ ] second
[ ] third

Additional context

Add any other context about the task here.
Or here

@nanyangpro  this one too cc @hannavovk

Combined with #598


Missing leading chinese characters

Wrong: One:

Correct One:

Hello there, sorry currently epr doesn't support chinese... Same as issue: https://github.com/wustho/epr/issues/30


GH-29705: [Python] Clean-up no-longer-used pandas dataframe serialization helpers

Small follow-up on https://github.com/apache/arrow/pull/34926, which removed the pyarrow.serialization functionality, making those functions obsolete.

Closes: #29705

Yay! Always fun to hit delete. LGTM


WIP: ML benchmark playbooks

Playbook and roles to deploy PVC for data storage and pod to run Nvidia Deep Learning SSD Training benchmark, work still left on logging and error checking.

/uncc @sjug
perhaps /cc @dagrayvid
might be able to help review this?
in the meantime, Pam, I suggest a little cleanup by having all files terminated by '\n'

/cc @dagrayvid

This PR seems to also include some code from your other machineset PR, please separate them

@pamann you'll also need to add a call to toolbox/gpu-ml-benchmarks/deploy_nvidiadl_ssd.sh from the GPU Operator CI entrypoint so that this code gets tested as part of the PR validation
I'm not sure yet if we'll want to run the benchmark for every test of the nightly CI, this should be discussed with @ashishkamra and others, but as a first step you can add it unconditionally, we'll solve it when the rest of the PR is good to merge

roles/coco_data_pvc_deploy/files/nvidiadl-data-pvc.yaml
  11:3      error    no new line character at the end of file  (new-line-at-end-of-file)
roles/coco_data_pvc_deploy/meta/main.yml
  3:21      error    no new line character at the end of file  (new-line-at-end-of-file)
roles/coco_data_pvc_deploy/tasks/main.yml
  5:1       error    too many blank lines (1 > 0)  (empty-lines)
roles/nvidiadl_ssd_benchmark_deploy/meta/main.yml
  4:31      error    no new line character at the end of file  (new-line-at-end-of-file)
roles/nvidiadl_ssd_benchmark_deploy/vars/main/resources.yml
  3:70      error    no new line character at the end of file  (new-line-at-end-of-file)

from the yamllint test failure

Closed because it was replaced by https://github.com/openshift-psap/ci-artifacts/pull/235


⚠ SceneTime has degraded performance

In 90badb8, SceneTime ($ST) experienced degraded performance:

HTTP code: 200
Response time: 1013 ms

Resolved: SceneTime performance has improved in ff1c55a after 11 minutes.


Update MainActivity.java

Adding the Request id for REQUEST_IMAGE, used in step 8, sending image messages.

This fix is already been merged into master.


special chars return OAuth error

status 'hello' => works
status 'hello :)' => does not work
the latter return an Auth err, i presume it happen in the OAuth process where string is urlencoded.
any clue how to fix this ?

Can you provide more context? What's your status function look like?

Closing for now


CB-15832 Database engine version configurable from API for datalakes

See detailed description in the commit message.

@daszabo I think you should rebase onto latest master. Even spotbugs-main is failing with this:
Execution failed for task ':environment-api:compileJava'.
> Could not resolve all files for configuration ':environment-api:compileClasspath'.
   > Could not find com.cloudera.cdp:cdp-sdk-java:0.9.51.

@daszabo please addrees Lajos comments

@lajosrodek fixed the string checks and added the builder class.


Ignore files when exporting package

This commit is part of a campaign to reduce the amount of data transferred to save global bandwidth and reduce the amount of CO2. See https://github.com/Codeception/Codeception/pull/5527 for more info.

Thank you. I see that you added UPGRADING.md and Dockerfile.
Could you please remove UPGRADING.md and dont reorder the items. I know it may look weird, but they were actually ordered. =)

You have the permission to change the pr yourself, so please go ahead and adjust it like you want.

If you don’t want to work on this I’ll close the PR.
I’m happy to help you make a change to guzzle. I am not doing the work for you.

better now? will you accept it like this?


refactor tengine test cases

rename tests/nginx-tests/case to tests/nginx-tests/tengine-tests
remove deprecated DSO feature from Nginx.pm & ngx_backtrace_module/config

ACK


Content scrollToTop issue in v2

scrollToTop() on Content component doesn't work on ios. The problem is in scroll-view.ts in scrollTo method.
At line 51 when getting the actual scrollTop position it should call self.getTop() that takes care of the "js" check.
I changed it in my project and it seems to work.

Hello! While we appreciate you opening an issue with us i am going to close this issue and ask that you open a new one that has the issue template filled out please. Thanks for using Ionic!


File-Loader 3.0.0 incompatible with this package

https://github.com/webpack-contrib/url-loader/blob/16bc97c17dd20728066dba1b57d3755cf592697d/package.json#L67
With regard to https://github.com/webpack-contrib/url-loader/pull/156, the latest version of file-loader is not backwards compatible with this package. I know it is specified as a dependency for 1.x.x and above. I've been using 2.0.0 just fine as a peer dependency. However, the latest version released today (3.0.0) fails with the following:
ValidationError: File Loader Invalid Options

options should NOT have additional properties

Is there a reason this package must use 1.x.x? Can there be a peer dependency that specifies the version range so that folks know what they need to run this?

@Aghassi bug in file-loader and already fixed in master

Release will be in near future


VALARM not working on macOS sierra Calendar

I create an ICS file:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 4.1.2//EN
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:sabre-vobject-b33288d5-7c94-4ce8-b6e5-10f6c88248e7
DTSTAMP:20170112T203553Z
DTSTART:20161109T080000Z
DTEND:20161109T080000Z
SUMMARY:foo
DESCRIPTION:bar
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-P1H
DESCRIPTION:foo
END:VALARM
END:VEVENT
END:VCALENDAR

When I double click on this file on my mac, Calendar opens but there is no reminder set at all.
What am I doing wrong?

Hi,
The TRIGGER property is in the wrong format. I think the alarm doesn't go off because of this. It should be -PT1H

Tried that as well, still not working. But clearly not a VObject issue.

Did you compare your VALARM with one generated by Sierra Calendar.app itself?
A VALARM generated by it looks like this. Maybe it requires the UID property in the VALARM?
BEGIN:VALARM
X-WR-ALARMUID:some-uuid-foo
UID:some-uuid-foo
TRIGGER:-PT1H
DESCRIPTION:Event reminder
ACTION:DISPLAY
END:VALARM

Hm, nope. Also works fine for me with stripped out UID and X-WR-ALARMUID:
BEGIN:VALARM
TRIGGER:-PT1H
DESCRIPTION:Event reminder
ACTION:DISPLAY
END:VALARM

Confirmed, works for me too. I had a few things wrong. Thanks for helping!


Fix how Linux flavor is determined for generating systemv init script

In lib/systemv.js, the output of "cat /proc/version" is parsed for certain Redhat or Debian strings. This does not work for all Linux builds.
The standard method for init scripts is to check for either of the "/etc/redhat-release" or "/etc/debian-version" files, since they only exist in their respective Linux flavors.
Hopefully this is easy to fix, since your service does not work with our current Redhat or Debian Linux builds (although Debian is the default flavor so it ends up generating the right script for it).

finally got some time to work on this... I'll submit a pull request soon!

@coreybutler anyone able to review the related PR #38? just casually revisiting this open ticket years later ;)


Failed to connect to the kingphisher service

Okay I'm on Parrot OS and every time I try to start kingphisher and go to login it says "Failed to connect to the kingphisher service, the server responded with HTTP status: 501 I don't know what I'm doing wrong can you please help me?

Can you please check your King Phisher Server logs, it will provide more information to help troubleshooting.

this is KingPhisherServer log:
#!/usr/bin/python -B
-- coding: utf-8 --

KingPhisherServer

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of the project nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

 IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

pylint: disable=too-many-locals
import argparse
import logging
import os
import pwd
import signal
import sys
import threading
from king_phisher import color
from king_phisher import errors
from king_phisher import find
from king_phisher import geoip
from king_phisher import its
from king_phisher import utilities
from king_phisher import version
from king_phisher.server import build
from king_phisher.server import plugins
from boltons import strutils
from smoke_zephyr.configuration import Configuration
from smoke_zephyr.requirements import check_requirements
requirements = [
'advancedhttpserver==2.0.5',
'alembic>=0.8.6',
'blinker>=1.3',
'boltons>=16.2.2',
"dns{0}>=1.12.0".format('python' if its.py_v2 else 'python3'),
'geoip2>=2.2.0',
'Jinja2>=2.8',
'markupsafe>=0.23',
'msgpack-python>=0.4.7',
'pluginbase>=0.4',
'psycopg2>=2.6.1',
'pyotp>=2.1.1',
'python-dateutil>=2.4.2',
'PyYAML>=3.11',
'requests>=2.10.0',
'SQLAlchemy>=1.0.13',
'termcolor>=1.1.0'
]
if its.py_v2:
requirements.append('ipaddress>=1.0.16')
logger = logging.getLogger('KingPhisher.Server.CLI')
def build_and_run(arguments, config, plugin_manager):
# fork into the background
should_fork = True
if arguments.foreground:
should_fork = False
elif config.has_option('server.fork'):
should_fork = bool(config.get('server.fork'))
if should_fork and os.fork():
return sys.exit(os.EX_OK)
try:
	king_phisher_server = build.server_from_config(config, plugin_manager=plugin_manager)
except errors.KingPhisherError as error:
	logger.critical(error.message)
	return os.EX_SOFTWARE

server_pid = os.getpid()
logger.info("server running in process: {0} main tid: 0x{1:x}".format(server_pid, threading.current_thread().ident))

if should_fork and config.has_option('server.pid_file'):
	pid_file = open(config.get('server.pid_file'), 'w')
	pid_file.write(str(server_pid))
	pid_file.close()

if config.has_option('server.setuid_username'):
	setuid_username = config.get('server.setuid_username')
	try:
		user_info = pwd.getpwnam(setuid_username)
	except KeyError:
		logger.critical('an invalid username was specified as \'server.setuid_username\'')
		king_phisher_server.shutdown()
		return os.EX_NOUSER
	if config.has_option('logging.file') and config.get('logging.file'):
		os.chown(config.get('logging.file'), user_info.pw_uid, user_info.pw_gid)
	os.setregid(user_info.pw_gid, user_info.pw_gid)
	os.setreuid(user_info.pw_uid, user_info.pw_uid)
	logger.info("dropped privileges to the {0} account".format(setuid_username))
else:
	logger.warning('running with root privileges is dangerous, drop them by configuring \'server.setuid_username\'')

db_engine_url = king_phisher_server.database_engine.url
if db_engine_url.drivername == 'sqlite':
	logger.warning('sqlite is no longer fully supported, see https://github.com/securestate/king-phisher/wiki/Database#sqlite for more details')
	database_dir = os.path.dirname(db_engine_url.database)
	if not os.access(database_dir, os.W_OK):
		logger.critical('sqlite requires write permissions to the folder containing the database')
		king_phisher_server.shutdown()
		return os.EX_NOPERM
sighup_handler = lambda: threading.Thread(target=king_phisher_server.shutdown).start()
signal.signal(signal.SIGHUP, lambda signum, frame: sighup_handler())
try:
	king_phisher_server.serve_forever(fork=False)
except KeyboardInterrupt:
	pass
king_phisher_server.shutdown()
return os.EX_OK

def main():
parser = argparse.ArgumentParser(description='King Phisher Server', conflict_handler='resolve')
utilities.argp_add_args(parser)
parser.add_argument('-f', '--foreground', dest='foreground', action='store_true', default=False, help='run in the foreground (do not fork)')
parser.add_argument('--verify-config', dest='verify_config', action='store_true', default=False, help='verify the configuration and exit')
parser.add_argument('--update-geoip-db', dest='update_geoip_db', action='store_true', default=False, help='update the geoip database and exit')
parser.add_argument('config_file', action='store', type=argparse.FileType('r'), help='configuration file to use')
arguments = parser.parse_args()

console_log_handler = utilities.configure_stream_logger(arguments.loglvl, arguments.logger)
config_file = arguments.config_file
del parser

missing_requirements = check_requirements(__requirements__)
if missing_requirements:
	color.print_error('the following package requirements are missing or incompatible:')
	for missing_req in missing_requirements:
		color.print_error('  - ' + missing_req)
	color.print_error('please install the missing requirements with pip')
	return os.EX_SOFTWARE

if os.getuid():
	color.print_error('the server must be started as root, configure the')
	color.print_error('\'server.setuid_username\' option in the config file to drop privileges')
	return os.EX_NOPERM

try:
	config = Configuration(config_file.name)
except Exception as error:
	color.print_error('an error occurred while parsing the server configuration file')
	error_name = "{0}.{1}".format(error.__module__, error.__class__.__name__)
	if error_name != 'yaml.parser.ParserError':
		raise
	for line in str(error).split('\n'):
		color.print_error(line.rstrip())
	return os.EX_CONFIG

# configure environment variables
find.data_path_init('server')
if config.has_option('server.data_path'):
	find.data_path_append(config.get('server.data_path'))

# check the configuration for missing and incompatible options
verify_config = find.find_data_file('server_config_verification.yml')
if not verify_config:
	color.print_error('could not load server config verification data')
	return os.EX_NOINPUT
missing_options = config.get_missing(verify_config)
if missing_options:
	if 'missing' in missing_options:
		color.print_error('the following required options are missing from the server configuration:')
		for option in missing_options['missing']:
			color.print_error('  - ' + option)
	if 'incompatible' in missing_options:
		color.print_error('the following options are of an incompatible data type in the server configuration:')
		for option in missing_options['incompatible']:
			color.print_error("  - {0} (type: {1})".format(option[0], option[1]))
	return os.EX_CONFIG
if arguments.verify_config:
	color.print_good('configuration verification passed')
	color.print_good('all required settings are present')
	return os.EX_OK
if arguments.update_geoip_db:
	color.print_status('downloading a new geoip database')
	size = geoip.download_geolite2_city_db(config.get('server.geoip.database'))
	color.print_good("download complete, file size: {0}".format(strutils.bytes2human(size)))
	return os.EX_OK

# setup logging based on the configuration
if config.has_section('logging'):
	log_level = min(getattr(logging, arguments.loglvl), getattr(logging, config.get('logging.level').upper()))
	if config.has_option('logging.file') and config.get('logging.file'):
		file_handler = logging.FileHandler(config.get('logging.file'))
		file_handler.setFormatter(logging.Formatter("%(asctime)s %(name)-50s %(levelname)-8s %(message)s"))
		logging.getLogger('').addHandler(file_handler)
		file_handler.setLevel(log_level)
	if config.has_option('logging.console') and config.get('logging.console'):
		console_log_handler.setLevel(log_level)
logger.debug("king phisher version: {0} python version: {1}.{2}.{3}".format(version.version, sys.version_info[0], sys.version_info[1], sys.version_info[2]))
if its.py_v2:
	logger.warning('python 2.7 support is deprecated, see https://github.com/securestate/king-phisher/wiki/Python-3 for details')

# initialize the plugin manager
try:
	plugin_manager = plugins.ServerPluginManager(config)
except errors.KingPhisherError as error:
	if isinstance(error, errors.KingPhisherPluginError):
		color.print_error("plugin error: {0} ({1})".format(error.plugin_name, error.message))
	else:
		color.print_error(error.message)
	return os.EX_SOFTWARE

status_code = build_and_run(arguments, config, plugin_manager)
plugin_manager.shutdown()
logging.shutdown()
return status_code

if name == 'main':
sys.exit(main())

that would be the king phisher server python script. your king phisher log will be under '/var/log/king-phisher.log'

From: Quinnshank<EMAIL_ADDRESS>Sent: Thursday, March 23, 2017 7:29 AM
To: securestate/king-phisher
Cc: Subscribed
Subject: Re: [securestate/king-phisher] Failed to connect to the kingphisher service (#199)
this is KingPhisherServer log:
#!/usr/bin/python -B
-- coding: utf-8 --
KingPhisherServer
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
Neither the name of the project nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
 IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pylint: disable=too-many-locals

import argparse
import logging
import os
import pwd
import signal
import sys
import threading
from king_phisher import color
from king_phisher import errors
from king_phisher import find
from king_phisher import geoip
from king_phisher import its
from king_phisher import utilities
from king_phisher import version
from king_phisher.server import build
from king_phisher.server import plugins
from boltons import strutils
from smoke_zephyr.configuration import Configuration
from smoke_zephyr.requirements import check_requirements
requirements = [
'advancedhttpserver==2.0.5',
'alembic>=0.8.6',
'blinker>=1.3',
'boltons>=16.2.2',
"dns{0}>=1.12.0".format('python' if its.py_v2 else 'python3'),
'geoip2>=2.2.0',
'Jinja2>=2.8',
'markupsafe>=0.23',
'msgpack-python>=0.4.7',
'pluginbase>=0.4',
'psycopg2>=2.6.1',
'pyotp>=2.1.1',
'python-dateutil>=2.4.2',
'PyYAML>=3.11',
'requests>=2.10.0',
'SQLAlchemy>=1.0.13',
'termcolor>=1.1.0'
]
if its.py_v2:
requirements.append('ipaddress>=1.0.16')
logger = logging.getLogger('KingPhisher.Server.CLI')
def build_and_run(arguments, config, plugin_manager):
fork into the background
should_fork = True
if arguments.foreground:
should_fork = False
elif config.has_option('server.fork'):
should_fork = bool(config.get('server.fork'))
if should_fork and os.fork():
return sys.exit(os.EX_OK)
try:
king_phisher_server = build.server_from_config(config, plugin_manager=plugin_manager)
except errors.KingPhisherError as error:
logger.critical(error.message)
return os.EX_SOFTWARE
server_pid = os.getpid()
logger.info("server running in process: {0} main tid: 0x{1:x}".format(server_pid, threading.current_thread().ident))
if should_fork and config.has_option('server.pid_file'):
pid_file = open(config.get('server.pid_file'), 'w')
pid_file.write(str(server_pid))
pid_file.close()
if config.has_option('server.setuid_username'):
setuid_username = config.get('server.setuid_username')
try:
user_info = pwd.getpwnam(setuid_username)
except KeyError:
logger.critical('an invalid username was specified as 'server.setuid_username'')
king_phisher_server.shutdown()
return os.EX_NOUSER
if config.has_option('logging.file') and config.get('logging.file'):
os.chown(config.get('logging.file'), user_info.pw_uid, user_info.pw_gid)
os.setregid(user_info.pw_gid, user_info.pw_gid)
os.setreuid(user_info.pw_uid, user_info.pw_uid)
logger.info("dropped privileges to the {0} account".format(setuid_username))
else:
logger.warning('running with root privileges is dangerous, drop them by configuring 'server.setuid_username'')
db_engine_url = king_phisher_server.database_engine.url
if db_engine_url.drivername == 'sqlite':
logger.warning('sqlite is no longer fully supported, see https://github.com/securestate/king-phisher/wiki/Database#sqlite for more details')
database_dir = os.path.dirname(db_engine_url.database)
if not os.access(database_dir, os.W_OK):
logger.critical('sqlite requires write permissions to the folder containing the database')
king_phisher_server.shutdown()
return os.EX_NOPERM
sighup_handler = lambda: threading.Thread(target=king_phisher_server.shutdown).start()
signal.signal(signal.SIGHUP, lambda signum, frame: sighup_handler())
try:
king_phisher_server.serve_forever(fork=False)
except KeyboardInterrupt:
pass
king_phisher_server.shutdown()
return os.EX_OK
def main():
parser = argparse.ArgumentParser(description='King Phisher Server', conflict_handler='resolve')
utilities.argp_add_args(parser)
parser.add_argument('-f', '--foreground', dest='foreground', action='store_true', default=False, help='run in the foreground (do not fork)')
parser.add_argument('--verify-config', dest='verify_config', action='store_true', default=False, help='verify the configuration and exit')
parser.add_argument('--update-geoip-db', dest='update_geoip_db', action='store_true', default=False, help='update the geoip database and exit')
parser.add_argument('config_file', action='store', type=argparse.FileType('r'), help='configuration file to use')
arguments = parser.parse_args()
console_log_handler = utilities.configure_stream_logger(arguments.loglvl, arguments.logger)
config_file = arguments.config_file
del parser
missing_requirements = check_requirements(requirements)
if missing_requirements:
color.print_error('the following package requirements are missing or incompatible:')
for missing_req in missing_requirements:
color.print_error('  - ' + missing_req)
color.print_error('please install the missing requirements with pip')
return os.EX_SOFTWARE
if os.getuid():
color.print_error('the server must be started as root, configure the')
color.print_error(''server.setuid_username' option in the config file to drop privileges')
return os.EX_NOPERM
try:
config = Configuration(config_file.name)
except Exception as error:
color.print_error('an error occurred while parsing the server configuration file')
error_name = "{0}.{1}".format(error.module, error.class.name)
if error_name != 'yaml.parser.ParserError':
raise
for line in str(error).split('\n'):
color.print_error(line.rstrip())
return os.EX_CONFIG
configure environment variables
find.data_path_init('server')
if config.has_option('server.data_path'):
find.data_path_append(config.get('server.data_path'))
check the configuration for missing and incompatible options
verify_config = find.find_data_file('server_config_verification.yml')
if not verify_config:
color.print_error('could not load server config verification data')
return os.EX_NOINPUT
missing_options = config.get_missing(verify_config)
if missing_options:
if 'missing' in missing_options:
color.print_error('the following required options are missing from the server configuration:')
for option in missing_options['missing']:
color.print_error('  - ' + option)
if 'incompatible' in missing_options:
color.print_error('the following options are of an incompatible data type in the server configuration:')
for option in missing_options['incompatible']:
color.print_error("  - {0} (type: {1})".format(option[0], option[1]))
return os.EX_CONFIG
if arguments.verify_config:
color.print_good('configuration verification passed')
color.print_good('all required settings are present')
return os.EX_OK
if arguments.update_geoip_db:
color.print_status('downloading a new geoip database')
size = geoip.download_geolite2_city_db(config.get('server.geoip.database'))
color.print_good("download complete, file size: {0}".format(strutils.bytes2human(size)))
return os.EX_OK
setup logging based on the configuration
if config.has_section('logging'):
log_level = min(getattr(logging, arguments.loglvl), getattr(logging, config.get('logging.level').upper()))
if config.has_option('logging.file') and config.get('logging.file'):
file_handler = logging.FileHandler(config.get('logging.file'))
file_handler.setFormatter(logging.Formatter("%(asctime)s %(name)-50s %(levelname)-8s %(message)s"))
logging.getLogger('').addHandler(file_handler)
file_handler.setLevel(log_level)
if config.has_option('logging.console') and config.get('logging.console'):
console_log_handler.setLevel(log_level)
logger.debug("king phisher version: {0} python version: {1}.{2}.{3}".format(version.version, sys.version_info[0], sys.version_info[1], sys.version_info[2]))
if its.py_v2:
logger.warning('python 2.7 support is deprecated, see https://github.com/securestate/king-phisher/wiki/Python-3 for details')
initialize the plugin manager
try:
plugin_manager = plugins.ServerPluginManager(config)
except errors.KingPhisherError as error:
if isinstance(error, errors.KingPhisherPluginError):
color.print_error("plugin error: {0} ({1})".format(error.plugin_name, error.message))
else:
color.print_error(error.message)
return os.EX_SOFTWARE
status_code = build_and_run(arguments, config, plugin_manager)
plugin_manager.shutdown()
logging.shutdown()
return status_code
if name == 'main':
sys.exit(main())
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/securestate/king-phisher/issues/199#issuecomment-288690646, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHYH4TYeIofA8j919Py-u8JrrpqXQhi7ks5rolePgaJpZM4Mmk6u.

there is no king-phisher.log in var/ but i clearly am running it.

The log file location can be specified in the server configuration. It's in the first few lines so you can check it there. It's generally /var/log which is different from var/ so I suggest you check there.

Sorry that's what I meant var/log im just learning how to use this program
and this OS so give me a break.
On Mar 23, 2017 6:06 AM, "Spencer McIntyre"<EMAIL_ADDRESS>wrote:

The log file location can be specified in the server configuration. It's
in the first few lines so you can check it there. It's generally /var/log
which is different from var/ so I suggest you check there.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/securestate/king-phisher/issues/199#issuecomment-288712494,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVGqDTcD1rZujiDcOkp9BlKmgt4EMMefks5rom5OgaJpZM4Mmk6u
.

If you can't provide the logs, the last option is to start the server directly using the following command and then providing us the output:
sudo python3 KingPhisherServer -f -L DEBUG server_config.yml
That will need to be executed from within the folder where the project is installed. If I may ask how did you install King Phisher, given that ParrotOS is not a supported operating system? Did you run the install script because that probably would have failed?

Okay it i entered it and this was the output # sudo python3 KingPhisherServer -f -L DEBUG server_config.yml
python3: can't open file 'KingPhisherServer': [Errno 2] No such file or directory

No its standard in Parrot OS

this was the output: Traceback (most recent call last):
File "KingPhisherServer", line 45, in
from king_phisher import geoip
File "/usr/share/king-phisher/king_phisher/geoip.py", line 45, in
import geoip2.database
ImportError: No module named 'geoip2'

You have missing dependencies. These should have been installed by the install.sh script for you. You'll want to try and install them yourself by running python3 -m pip install -r requirements.txt. It's very possible that one or more may fail due to missing operating system dependencies which also would have been installed by the install.sh script.
You'll need to install any of these missing dependencies manually, I'm not sure what flavor of Linux ParrotOS is based on but perhaps you could update the install script to handle it for you.

I was just talking to @wolfthefallen and it's possible that ParrotOS is using an older version of King Phisher that users Python 2.7. Try running that same command but with python instead of python3 like this:
sudo python KingPhisherServer -f -L DEBUG server_config.yml

Now its it gave me this output: python: can't open file "KingPhisherServer': [Errno 2] No such file or directory"

Its still in my file system but its not recognizing it.

You need to be in the same directory as when you ran the other command.

Sorry its been a long night here is the output of that last string:
#sudo python KingPhisherServer -f -L DEBUG server_config.yml
DEBUG    king phisher version: 1.4.0 python version: 2.7.13
WARNING  python 2.7 support is deprecated, see https://github.com/securestate/king-phisher/wiki/Python-3 for details
CRITICAL failed to bind server to address (socket error #98)
CRITICAL socket error #98 (Address already in use)
INFO     unloading 0 plugins

Ok, that's much more helpful. It indicates a few things.

The version you are using is about 6 months out of date.
The server can't start because the address is in use, you probably have something running on port 80 already. You need to stop that process and then re-try starting the King Phisher server. I highly recommend you verify that the port is free by ensuring nothing is listening on it by using netstat before starting the King Phisher server. You can find all of the ports it's trying to listen on under the addresses section in the server config file, by default it's just 80.

you will need to stop the service that is already utilizing port 80 prior to starting the King Phisher Server.

so i shut down what was running on port 80 and tried to start the server and gave me this output: sudo python3 KingPhisherServer -f -L DEBUG server_config.yml
Traceback (most recent call last):
File "KingPhisherServer", line 45, in
from king_phisher import geoip
File "/usr/share/king-phisher/king_phisher/geoip.py", line 45, in
import geoip2.database
ImportError: No module named 'geoip2'

You ran it with Python 3, you need to run it with Python 2.7. Python 3 is for newer versions.
sudo python KingPhisherServer -f -L DEBUG server_config.yml

Hey it seems to be working i got things worked out thanks so much for your guys help!


Can't save my code

When I try to save my file the in remotte ssh the following error occurs ...
I could be able to save in nano editor in terminal ...
But pressing ctrl + s in VS code won't work and the following error occurs....
Failed to save 'Input_AsmGen.cpp': Unable to write file 'vscode-remote://ssh-remote+ai-aws/export/home/broshnan/sw_dev/device_model_instr/Input_AsmGen.cpp' (NoPermissions (FileSystemError): Error: EACCES: permission denied, open '/export/home/broshnan/sw_dev/device_model_instr/Input_AsmGen.cpp')

There is something wrong with the permissions on your remote, please check. Maybe you signed in with the wrong account?


Item Decoration

How can I use an item decoration only if the item is not header?

Hi @BossJC69,
You can check if an item is a header using SectionDataManager which implements PositionManager interface. It contains boolean isHeader(int adapterPos) method, which returns true if the given global adapter position corresponds to a header.
So, for example, if you want to override getItemOffsets method only for non header items, you can write the following code (in Kotlin):
val adapterPos = parent.getChildAdapterPosition(view)
if (!posManager.isHeader(adapterPos)) {
    // Do what you want
}

Let me know if my answer was helpful.

It worked. Thank you.


Python speedfix2

This commit is the improved PR #68 .
I can't figure out how to get the zip commits to not appear here, so that both the zipfiles and python_speedfix2 branches just show their respective commits relative to master.
Instead, as you can see below, the commits below include those for zipfiles.  Perhaps if zipfiles is merged with master, those commits will disappear here.

Can you rebase on master now that I've merged zipfiles?  (Don't bother closing the PR, just rebase and push -f.)

OK done.

Looks like 3.4 is still grumpy?

Yes, I'll work on this.  Don't merge yet :)

Strangely, I just re-ran the job and it worked this time.  I suspect this is because the odict representation is not necessarily getting saved in the same order each time, and so the file comparison is saying the saved files are not identical.  I will write more unit tests on this topic.  But that's really an optional feature anyway, and another PR for another day.  This one can be merged.


Interface Statistics Widget - No Auto Scroll

Not sure if this is already a known issue or not, but it seems the interface statistics widget does not auto scroll as seen below:
http://i.imgur.com/d3l7znB.png
It also does not auto scroll when you shrink the browser window, the whole dashboard page scrolls instead of just the widget.

This is part of a larger issue described and discussed in #1003, embedding screenshot for future reference and deferring in favour of the other ticked. Thanks so far!

can this not be solved if rows and colums are exchanged?
if the width is a fixed size then the number of interfaces will not produce an overflow.
The width can also be smaller if there are two header rows. The first with the category Packets/Bytes/Errors and the second with in/out

well, you can set your dashboard to less columns to make the widget wider to fit the stats.


1.11.2 BOOKS error

I have been trying to use the mod but there is an error in which the crash report says no field name error:BOOKS. here is the crash report.
crash-2017-05-30_11.19.47-server.txt

Same crash here on Minecraft 1.11.2 and Forge 1.11.2-<IP_ADDRESS>5 when creating a new SSP (single player) world from the client. Existing worlds or creating a world on a headless server (Linux) generate fine.
crash-2017-06-20_19.58.50-server.txt

Fixed in https://github.com/PenguinSquad/Enchiridion/commit/f040adb99909bd5c9ef84de5be6f2ac5c21dc22f
New release will be out on CurseForge later today hopefully.


Had to uninstall

Hi, I love this mod, but I had to uninstall it because it was interferring with MassFarming's grid and I think other aspects of the cultivator (e.g. the PlantEverything mod destroy item with middle mouse button).
Unfortunately, even after uninstalling OCDheim, I cannot remove the "align to world" aspect of the cultivator. I'm kind of sad. I'm not sure what to do.
You see, MassFarming is supposed to allow me to plant on a grid. The grid is supposed to line up with the plants I put down so that when I push the hotkey (shift) a chunk of plants would be planted. But, now, when I push the MassFarming hotkey, the planting aligns with the world grid (see image). I am unable to toggle this function (align with world) off.

First of all - sad to see you go, you were my best "issuer".
As for the interference... Wasn't simply pressing LEFT-ALT to disable GRID MODE enough? The very first thing that OCDheim always does when you use the hoe / the cultivator is check if GRID MODE is enabled. If not - it doesn't do anything at all. If it helps - the next version of OCDheim will show an obnoxious visual cue when GRID MODE is enabled ;)
As for the behaviour post "deinstallation"... Are you 100% sure you removed the .dll file? OCDheim doesn't persist anything to disk, trust me on this one. It's virtually impossible for OCDheim to keep affecting Valheim in any way after the .dll is removed. But maybe MF somehow broke due to the interaction with OCDheim?
I would first try removeling these carrots and see if that helps. If not - I would try farming a completely fresh spot. If still not - I would completely reinstall MF.
Good Luck!

I installed and uninstalled mods all day yesterday. I'm stumped. Since I couldn't change the behavior no matter what I did, I reinstalled OCDHeim. The modpack we use is published on Thunderstore - its called GamingGroupies modpack by Jade.
The LEFT-ALT disables GRID MODE in OCDHeim with the cultivator and block placement, but not in MassFarming. In MassFarming, the OCDHeim GRID MODE seems to stay active. MassFarming uses the SHIFT key to activate the grid planting. Does the SHIFT key have any function in OCDHeim?

Also, I don't see a configuration file in the server for OCDHeim. Is that expected behavior? I am used to being able to configure hotkeys and behavior in mods so that they will get along. :)

UPDATE:  This issue is a non-issue now. I figured out that when I want to rotate the MassFarming planting grid, I must do it without having the hotkey pressed down. This isn't in the documentation ... I just had to keep horsing around with it. So, I'm closing this as a "not OCDHeim issue" :)  Thanks again for writing this mod.


[json] add datetime support

Fix https://github.com/dart-lang/sdk/issues/56175
toIso and parse were used as the implementation. This seem like a decent choice as Javascript also uses iso as the default serialization method for dates.
Add date

[x] I’ve reviewed the contributor guide and applied the relevant portions to this PR.

Contribution guidelines:

See our contributor guide for general expectations for PRs.
Larger or significant changes should be discussed in an issue before creating a PR.
Contributions to our repos should follow the Dart style guide and use dart format.

Note that this repository uses Gerrit for code reviews. Your pull request will be automatically converted into a Gerrit CL and a link to the CL written into this PR. The review will happen on Gerrit but you can also push additional commits to this PR to update the code review.

@cedvdb Can you apply this patch and upload it? https://gist.github.com/jakemac53/fa4bbab983446b036a769c2c2c2a6a91
This adds some additional tests, cleans up the output a bit for some other cases, and fixes nullable dates in collections.

Thanks @cedvdb ! I just published it.


[FLINK-29749][client] Make 'flink info' command could support dynamic…

What is the purpose of the change
backport for FLINK-29749
Brief change log
(for example:)

The TaskInfo is stored in the blob store on job creation time as a persistent artifact
Deployments RPC transmits only the blob storage reference
TaskManagers retrieve the TaskInfo from the blob cache

Verifying this change
Please make sure both new and modified tests in this PR follows the conventions defined in our code quality guide: https://flink.apache.org/contributing/code-style-and-quality-common.html#testing
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)

Added integration tests for end-to-end deployment with large payloads (100MB)
Extended integration test for recovery after master (JobManager) failure
Added test that validates that TaskInfo is transferred only once across recoveries
Manually verified the change by running a 4 node cluster with 2 JobManagers and 4 TaskManagers, a stateful streaming program, and killing one JobManager and two TaskManagers during the execution, verifying that recovery happens correctly.

Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (yes / no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
The serializers: (yes / no / don't know)
The runtime per-record code paths (performance sensitive): (yes / no / don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
The S3 file system connector: (yes / no / don't know)

Documentation

Does this pull request introduce a new feature? (yes / no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

We need a new PR to backport FLINK-27579 to release-1.15 first.


Won't accept changes to settings

Known Issues
Before logging an issue please check if one of the problems you are experiencing is mentioned here. If the issue you are experiencing isn't covered here, then please delete this content and tell us about the problem you are experiencing or the feature you'd like to request.
"You cannot use the Aerial screen saver with this version of OS X." message
If you get a message saying You cannot use the Aerial screen saver with this version of OS X. Please contact the vendor to get a newer version of the screen saver. that is a known bug with macOS that was reported to Apple in April 2016 as rdar://25569037. As of November 2017 the bug is still not fixed. To work around the bug:

select the Aerial screensaver in System Preferences
close System Preferences with Aerial selected
reopen System Preferences and the preview should work now

Mac won't sleep with Aerial as screensaver
If your Mac won't sleep while Aerial is the selected screensaver, then you probably have an older version of Aerial installed. Download the latest verson of Aerial here: https://github.com/JohnCoates/Aerial/releases/ Make sure to check both locations for the old version, it can be installed to /Library/Screen Savers and /User/YOURUSERNAME/Library/Screen Savers.
Corrupted playback
If you are getting corrupted playback when the screensaver starts then that is a new bug in macOS High Sierra. It appears to be a problem with the Intel drivers in High Sierra. As a workaround tick the "Show with clock" option as that seems to eliminate the corruption for the moment. Discussed extensively here: https://github.com/JohnCoates/Aerial/issues/377
No playback
If you are getting a crossed out play icon instead of the preview or the videos just never seem to load, please check that a firewall or proxy isn't blocking the screensavers access to the videos. Trying the following two URLs in a web browser might show if they are blocked. If you are on a Macbook you can also try caching the videos on another network to test whether it is your network provider that is blocking access.
http://a1.phobos.apple.com/us/r1000/000/Features/atv/AutumnResources/videos/comp_GL_G004_C010_v03_6Mbps.mov
http://a1.v2.phobos.apple.com.edgesuite.net/us/r1000/000/Features/atv/AutumnResources/videos/comp_GL_G004_C010_v03_6Mbps.mov

The screen saver works great for me even on Mojave, but when I open it up and go to make a chance, I press "Done" but nothing happens.  The only way out is to do a force quit.  Hopefully it will be a simple fix.  Thanks.

Which version ? Try the latest beta, it fixes this :
https://github.com/JohnCoates/Aerial/releases/tag/v1.4beta9

Thanks John.  I'm not sure how to find out which version I have.  I don't
see anything in apps and when I open the options in the screen saver area
this is all I see.
I'll try the beta.
Love this thing.  Thanks so much!
[image: Screen Shot 2018-09-29 at 10.00.17 AM.png]
On Sat, Sep 29, 2018 at 1:42 AM Guillaume Louel<EMAIL_ADDRESS>wrote:

Which version ? Try the latest beta, it fixes this :
https://github.com/JohnCoates/Aerial/releases/tag/v1.4beta9
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohnCoates%2FAerial%2Freleases%2Ftag%2Fv1.4beta9&data=02|01||7b042c66db844881fc4908d625e77c77|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636738073485573046&sdata=g2EpsV7frjSSFk3EaRJMMvRpGtOLej2z6SMMrdY%2BOj4%3D&reserved=0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FJohnCoates%2FAerial%2Fissues%2F513%23issuecomment-425628065&data=02|01||7b042c66db844881fc4908d625e77c77|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636738073485573046&sdata=ZCskr0O72KSeZ486myqqyoFk1UuP2huSKkdbyD4toi8%3D&reserved=0,
or mute the thread
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FApq6wH-PV37I_vonJF8QBh83akahtIhkks5ufzJygaJpZM4XAXJ_&data=02|01||7b042c66db844881fc4908d625e77c77|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|636738073485573046&sdata=fCndjdXJJVGhl9HjDTZ02Ydo%2BgMOenNuw%2FXqLBVtPKc%3D&reserved=0
.

If you don't see the version number in the bottom right corner of the pref pane, then you have the old one. The beta fixes the mojave bug.

Closing as duplicate


Theme animation

Implements a theme animation with the iced_anim crate. This changes the Config to contain a Spring<Theme> and implements Animate for Palette and Theme so that theme changes will be animated when the user changes the theme. A new Theme::Custom case is what enables animations because it takes any custom palette and allows the app to use that palette for theming. This Custom case is what allows the animated theme state to update and isn't serialized to disk at any point.
I also created a new StoredConfig struct that represents the serialized config, which is distinct from the Config struct since the latter may contain an animated state. This guarantees that the animated state value won't be serialized to disk. If you want to test this yourself, you can add a long response time to a SpringMotion on the Spring::new in utils/config.rs and exit the app before the animation is complete - you'll see that the final theme value is serialized and not the intermediate state.
Feel free to rename Config now that it represents less of a configuration and more of an app state - I went with StoredConfig to represent the new serialized config format just to avoid changing more of your app than necessary. Let me know if you have any questions!
https://github.com/user-attachments/assets/fb60e3a5-87fb-45c0-90ec-b74ce219f33b

Instead of creating another config, you can use theme:  Spring<Theme> as a field in ConfigWindow struct. It is there to store window specific data.

Anyways, I am merging it. I'll fix that later


Handle internal error in api/v2/status.py endpoint

Traceback (most recent call last):
  File "/somewhere/lib/python3.10/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
  File "/somewhere/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 69, in __call__
    return await self.app(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/fastapi/applications.py", line 1054, in __call__
    await super().__call__(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/applications.py", line 123, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/middleware/errors.py", line 186, in __call__
    raise exc
  File "/somewhere/lib/python3.10/site-packages/starlette/middleware/errors.py", line 164, in __call__
    await self.app(scope, receive, _send)
  File "/somewhere/lib/python3.10/site-packages/starlette/middleware/exceptions.py", line 65, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/somewhere/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/somewhere/lib/python3.10/site-packages/starlette/routing.py", line 756, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/routing.py", line 776, in app
    await route.handle(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/routing.py", line 297, in handle
    await self.app(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/routing.py", line 77, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
  File "/somewhere/lib/python3.10/site-packages/starlette/_exception_handler.py", line 64, in wrapped_app
    raise exc
  File "/somewhere/lib/python3.10/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
    await app(scope, receive, sender)
  File "/somewhere/lib/python3.10/site-packages/starlette/routing.py", line 72, in app
    response = await func(request)
  File "/somewhere/lib/python3.10/site-packages/fastapi/routing.py", line 278, in app
    raw_response = await run_endpoint_function(
  File "/somewhere/lib/python3.10/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
    return await dependant.call(**values)
  File "/somewhere/lib/python3.10/site-packages/fractal_server/app/routes/api/v2/status.py", line 116, in get_workflowtask_status
    last_valid_wftask_id = workflow.task_list[end - 1]
IndexError: list index out of range

Side remark: the line last_valid_wftask_id = workflow.task_list[end - 1] is also wrong for another reason (missing .id).
Ref:

7fafa5701c487e71010306ec7aaf87d9704d08ea
b04b7970d20c87978019e945652e677db6738da5

The only way I found to reproduce the internal-error in the first comment is like the following:

Create a workflow with 3 workflow tasks
Create a submitted job which runs tasks 0 and 1
Remove tasks 1 and 2 from the workflow
Call the status endpoint

(ref github.com/fractal-analytics-platform/fractal-server/pull/1449/commits/e0f92dbf1e3c117b3d9f375b909be7235e9ca86f)
This means that we are out-of-scope with respect to the status endpoint (see https://github.com/fractal-analytics-platform/fractal-server/issues/1083#issuecomment-2063898906), and we cannot prepare a fully consistent response.
The fix in #1449 handles the internal error (and it shows some relevant warnings in the server logs), and then it simply sets last_valid_wftask_id to None.

Remove tasks 1 and 2 from the workflow

Ah, I think I did this during some testing! Not really intending to test the behavior, just already modifying a workflow while it was running, as the last task wasn't actually needed.

The fix in https://github.com/fractal-analytics-platform/fractal-server/pull/1449 handles the internal error (and it shows some relevant warnings in the server logs), and then it simply sets last_valid_wftask_id to None.

Sounds good to me


Scripts blocked on further website visits

Hello!
I tried this script, it works well.
I noticed an issue.
When I go back on the website (please note clicked on the banner or scrolled in the page in the previous website visit) all scripts are blocked and not visible, such as Facebook box, Adsense, etc..

Hi, it's appearing to work as intended. If you never agree explicitly to the use of cookies, they will not show.
Was the cookies banner visible on your second visit?

First of all thank you gsimone for your answer.
I show again the situation I came across when I tested it.

In the first visit to the website I see the banner and all scripts are blocked (Analytics, Facebook box, Adsense, etc..)
I accept clicking on the button on the banner
3)Scripts are downloaded in the page, ads appears.
4)I navigate to another page in the website, I don't see the banner (it's correct) but scripts are blocked. They should be allowed at this stage.
5)I leave the website and I navigate to another website.
Later, could be some days later as well. I go back to the website (no banner, it's correct because I gave the consent in the previous visit), although scripts are blocked.

I hope now, with this further explanation the issue I came across is much clear.
I would like to understand if I didn't setup the code well, or there are still some issue in the code that force to work correctly.
Thank you very much again.

I tested the latest version of the script and it appears to be working as intended. Can you share the code you are using? There could be something missing.

Hi!
I carried out a new test with the latest version and I moved your script to the footer area of the website.
Now, it works correctly.
Before I inserted this script in the header and I got the error described in the previous message.
Thank you guys, good work!!!
I see you have in place to add the feature about iframe.
I would ask you, if you are thinking to add also a feature where the user can decide to activate cookies per type.
So, I give you an example, user can decide to activate only cookies about analytics, no activate cookies about advertising, etc...
Then, a box that give to the user in any moment the possibility to decide to opt out to a type of cookies.
Thank you again guys!

Hi @effetiweb, it will be available in the next major release.
Thank you for your support ;)


feat(fuzz): add alter table options for alter fuzzer

I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
As title. Also move some files for clearer structure.
Currently there's no validation for the alter table option stmt, just add them to the fuzzer.
Checklist

[ ] I have written the necessary rustdoc comments.
[ ] I have added the necessary unit tests and integration tests.
[ ] This PR requires documentation updates.

I think we need to verify table options after alterations.

I think we need to verify table options after alterations.

Agree. We can add a table option validator like row/column validator. The column types/names can be validate in validator as well.

Updated with a table option validator, ptal :) @WenyXu

Updated with new ttl options, PTAL :) @WenyXu @evenyag


fix fix memory leak when processing multi-table routine load

Proposed changes
close:#21606
Debug
Using jemalloc prof tool and found there is unreasonable memory overhead within multi_table_put_result obj.

Found that there are cycle refs during processing each single routine load task, i.e. StreamLoadContext holds a shared ptr ref to MultiTablePipe, and MultitablePipe holds shared ptr ref to StreamLoadContext as well.
Furthermore, during related loading process, StreamLoadContext's obj cnt is always growing and do not decrease when load stream stopped.

Resolve
Using a naked ptr rather than shared ptr in MultiTablePipe to hold the StreamLoadContext, so that both the StreamLoadContext and the MultiTablePipe will be released normally.
Why not use weak_ptr?

Cuz introducing weak_ptr is not so elegant and has lower performance.
MultiTablePipe's life cycle is under control of the StreamLoadContext, it is reasonable to use raw ptr to provide MultiTablePipe with an access to the current ctx. StreanLoadContext is sure to be released after MultiTablePipe, and will not result in dangling pointer.

Fix result
Memory usage during load process:

Observing the obj cnt:

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 57.09 seconds
stream load tsv:          501 seconds loaded<PHONE_NUMBER>9 Bytes, about 142 MB/s
stream load json:         20 seconds loaded<PHONE_NUMBER> Bytes, about 112 MB/s
stream load orc:          65 seconds loaded<PHONE_NUMBER> Bytes, about 16 MB/s
stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select:          89.3 seconds inserted 10000000 Rows, about 111K ops/s
storage size:<PHONE_NUMBER>3 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230707130115_clickbench_pr_174217.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 52.29 seconds
stream load tsv:          447 seconds loaded<PHONE_NUMBER>9 Bytes, about 159 MB/s
stream load json:         20 seconds loaded<PHONE_NUMBER> Bytes, about 112 MB/s
stream load orc:          57 seconds loaded<PHONE_NUMBER> Bytes, about 18 MB/s
stream load parquet:          29 seconds loaded 861443392 Bytes, about 28 MB/s
insert into select:          69.9 seconds inserted 10000000 Rows, about 143K ops/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230707060856_clickbench_pr_174231.html

run p1

run buildall

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 56.88 seconds
stream load tsv:          503 seconds loaded<PHONE_NUMBER>9 Bytes, about 141 MB/s
stream load json:         19 seconds loaded<PHONE_NUMBER> Bytes, about 118 MB/s
stream load orc:          65 seconds loaded<PHONE_NUMBER> Bytes, about 16 MB/s
stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select:          86.7 seconds inserted 10000000 Rows, about 115K ops/s
storage size:<PHONE_NUMBER>2 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230711235148_clickbench_pr_176661.html

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 52.25 seconds
stream load tsv:          447 seconds loaded<PHONE_NUMBER>9 Bytes, about 159 MB/s
stream load json:         21 seconds loaded<PHONE_NUMBER> Bytes, about 107 MB/s
stream load orc:          57 seconds loaded<PHONE_NUMBER> Bytes, about 18 MB/s
stream load parquet:          28 seconds loaded 861443392 Bytes, about 29 MB/s
insert into select:          70.0 seconds inserted 10000000 Rows, about 142K ops/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230711165712_clickbench_pr_176662.html

run p0


Internal Bug: Many internal errors are never shown to the user.

- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
Many of the internal errors the CMS has, especially in critical areas like loading and publishing, are attached to a Redux action, but don't alert the user, leading to a success (or no) message.
- If the current behavior is a bug, please provide the steps to reproduce.
- What is the expected behavior?
All or most internal Redux errors should be accompanied by a notification. If it is an error we can handle on our own, it probably isn't hitting Redux.

We currently have notifs manually shown for error actions -- what about just binding them to all Redux errors?

Centralized error handling for Redux actions makes sense, we have a lot of repetitive notif calls doing the same thing.

Closing as stale and/or outdated.